--- /srv/reproducible-results/rbuild-debian/r-b-build.nssOkOx4/b1/dune-geometry_2.9.0-4_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.nssOkOx4/b2/dune-geometry_2.9.0-4_amd64.changes ├── Files │ @@ -1,4 +1,4 @@ │ │ 2aebc5748fb0582a44feb9807bdd945f 390900 debug optional libdune-geometry-dev-dbgsym_2.9.0-4_amd64.deb │ a787e0fabe003750a746be00c3ad5ac7 296384 libdevel optional libdune-geometry-dev_2.9.0-4_amd64.deb │ - fab92f9a67a82117728e548b43e80caf 1525496 doc optional libdune-geometry-doc_2.9.0-4_all.deb │ + 22ada70a3aae53aa959a0a29ca3a9c1a 1526084 doc optional libdune-geometry-doc_2.9.0-4_all.deb ├── libdune-geometry-doc_2.9.0-4_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2023-07-15 14:03:47.000000 debian-binary │ │ --rw-r--r-- 0 0 0 15712 2023-07-15 14:03:47.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 1509592 2023-07-15 14:03:47.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 15760 2023-07-15 14:03:47.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 1510132 2023-07-15 14:03:47.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -14,15 +14,14 @@ │ │ │ │ │ usr/share/doc/libdune-geometry-doc/copyright │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00134.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 │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ │ │ 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 │ │ │ │ │ @@ -40,14 +39,15 @@ │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00209.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00209_source.html │ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ │ │ +usr/share/doc/libdune-geometry-doc/doxygen/a00212_source.html │ │ │ │ │ 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 │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -19,61 +19,61 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 845 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3307 2022-10-20 18:03:11.000000 ./usr/share/doc/libdune-geometry-doc/changelog.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2567 2023-01-12 15:07:27.000000 ./usr/share/doc/libdune-geometry-doc/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3075 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00134.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3049 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00164.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3047 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00167.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5567 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00170.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 117778 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00170_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10618 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00173.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34670 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00173_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10328 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 99226 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10293 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 98931 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9692 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 96784 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14353 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 118175 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10134 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86047 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5299 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 112512 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10165 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66730 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6873 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 85999 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3400 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26542 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5394 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66962 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13461 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 94629 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7986 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00209.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 171806 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00209_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4352 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5106 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12688 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5096 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9368 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11783 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 156234 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5671 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29350 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7240 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29452 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4510 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8120 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5862 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36535 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5592 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44620 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6690 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35007 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3400 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00170.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26542 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00170_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4352 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00173.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5567 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 117778 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5592 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44620 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4510 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8120 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5106 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12688 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5671 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29350 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11783 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 156234 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13461 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 94629 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5394 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66962 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5299 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 112512 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6690 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35007 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10328 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 99226 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10618 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00209.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34670 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00209_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10293 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 98931 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14353 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 118175 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9692 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 96784 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10134 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86047 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5862 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36535 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7986 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 171806 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5096 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9368 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7240 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29452 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10165 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66730 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6873 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 85999 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5813 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00242.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5068 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00243.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11280 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00243.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5016 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00244.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3926 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00244.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 62508 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00245.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3734 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00245.png │ │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3162 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_8c28f2953344a167049ba6db5a27148a_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7099 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_b609f53bbb5e26b8e9292001c59476a3.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2492 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_b609f53bbb5e26b8e9292001c59476a3_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4026 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_de8ef2d1b4283b99fcb86ec9d2fa66db.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1994 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_de8ef2d1b4283b99fcb86ec9d2fa66db_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3989 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 45631 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/doxygen.css │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26050 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dune-geometry.tag.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26054 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dune-geometry.tag.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7704 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dynsections.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13979 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/files.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 836 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_0.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 929 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_0_dark.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2566 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_1.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 536 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_10.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 917 2023-07-15 14:03:47.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_100.png │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00170.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: affinegeometry.hh File Reference │ │ │ │ +dune-geometry: deprecated_topology.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,46 +69,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
affinegeometry.hh File Reference
│ │ │ │ +
deprecated_topology.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

│ │ │ │ -
#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::AffineGeometry< ct, mydim, cdim >
 Implementation of the Geometry interface for affine geometries. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

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

Detailed Description

│ │ │ │ -

An implementation of the Geometry interface for affine geometries.

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,10 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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> │ │ │ │ │ +deprecated_topology.hh File Reference │ │ │ │ │ _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_._._. │ │ │ │ │ -  │ │ │ │ │ -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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00170_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: affinegeometry.hh Source File │ │ │ │ +dune-geometry: deprecated_topology.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,689 +74,176 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
affinegeometry.hh
│ │ │ │ +
deprecated_topology.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE 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_DEPRECATED_TOPOLOGY_HH
│ │ │ │ +
6#define DUNE_DEPRECATED_TOPOLOGY_HH
│ │ │ │
7
│ │ │ │ -
13#include <cmath>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ │ -
16#include <dune/common/fvector.hh>
│ │ │ │ -
17
│ │ │ │ -
18#include <dune/geometry/type.hh>
│ │ │ │ +
8 namespace Impl
│ │ │ │ +
9 {
│ │ │ │ +
10
│ │ │ │ +
11 // Basic Topology Types
│ │ │ │ +
12 // --------------------
│ │ │ │ +
13
│ │ │ │ +
14 // PointDeprecationHelper can be used to prevent a deprecation warning for Point
│ │ │ │ +
15 struct PointDeprecationHelper
│ │ │ │ +
16 {
│ │ │ │ +
17 static const unsigned int dimension = 0;
│ │ │ │ +
18 static const unsigned int numCorners = 1;
│ │ │ │
19
│ │ │ │ -
│ │ │ │ -
20namespace Dune
│ │ │ │ -
21{
│ │ │ │ -
22
│ │ │ │ -
23 // External Forward Declarations
│ │ │ │ -
24 // -----------------------------
│ │ │ │ -
25
│ │ │ │ -
│ │ │ │ -
26 namespace Geo
│ │ │ │ -
27 {
│ │ │ │ -
28
│ │ │ │ -
29 template< typename Implementation >
│ │ │ │ -
30 class ReferenceElement;
│ │ │ │ -
31
│ │ │ │ -
32 template< class ctype, int dim >
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35 template< class ctype, int dim >
│ │ │ │ -
36 struct ReferenceElements;
│ │ │ │ -
37
│ │ │ │ -
38 }
│ │ │ │ -
│ │ │ │ +
20 static const unsigned int id = 0;
│ │ │ │ +
21
│ │ │ │ +
22 static std::string name () { return "p"; }
│ │ │ │ +
23 };
│ │ │ │ +
24
│ │ │ │ +
25 using Point [[deprecated("Use GeometryTypes::vertex instead.")]] = PointDeprecationHelper;
│ │ │ │ +
26
│ │ │ │ +
27
│ │ │ │ +
28 template< class BaseTopology >
│ │ │ │ +
29 struct [[deprecated("Use GeometryTypes::prismaticExtension(GeometryType gt) instead.")]] Prism
│ │ │ │ +
30 {
│ │ │ │ +
31 static const unsigned int dimension = BaseTopology::dimension + 1;
│ │ │ │ +
32 static const unsigned int numCorners = 2 * BaseTopology::numCorners;
│ │ │ │ +
33
│ │ │ │ +
34 static const unsigned int id = BaseTopology::id | ((unsigned int)prismConstruction << (dimension-1));
│ │ │ │ +
35
│ │ │ │ +
36 static std::string name () { return BaseTopology::name() + "l"; }
│ │ │ │ +
37 };
│ │ │ │ +
38
│ │ │ │
39
│ │ │ │ -
40
│ │ │ │ -
41 namespace Impl
│ │ │ │ -
42 {
│ │ │ │ -
43
│ │ │ │ -
44 // FieldMatrixHelper
│ │ │ │ -
45 // -----------------
│ │ │ │ -
46
│ │ │ │ -
47 template< class ct >
│ │ │ │ -
48 struct FieldMatrixHelper
│ │ │ │ -
49 {
│ │ │ │ -
50 typedef ct ctype;
│ │ │ │ +
40 template< class BaseTopology >
│ │ │ │ +
41 struct [[deprecated("Use GeometryTypes::conicalExtension(GeometryType gt) instead.")]] Pyramid
│ │ │ │ +
42 {
│ │ │ │ +
43 static const unsigned int dimension = BaseTopology::dimension + 1;
│ │ │ │ +
44 static const unsigned int numCorners = BaseTopology::numCorners + 1;
│ │ │ │ +
45
│ │ │ │ +
46 static const unsigned int id = BaseTopology::id | ((unsigned int)pyramidConstruction << (dimension-1));
│ │ │ │ +
47
│ │ │ │ +
48 static std::string name () { return BaseTopology::name() + "o"; }
│ │ │ │ +
49 };
│ │ │ │ +
50
│ │ │ │
51
│ │ │ │ -
52 template< int m, int n >
│ │ │ │ -
53 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &ret )
│ │ │ │ -
54 {
│ │ │ │ -
55 for( int i = 0; i < m; ++i )
│ │ │ │ -
56 {
│ │ │ │ -
57 ret[ i ] = ctype( 0 );
│ │ │ │ -
58 for( int j = 0; j < n; ++j )
│ │ │ │ -
59 ret[ i ] += A[ i ][ j ] * x[ j ];
│ │ │ │ -
60 }
│ │ │ │ -
61 }
│ │ │ │ -
62
│ │ │ │ -
63 template< int m, int n >
│ │ │ │ -
64 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &ret )
│ │ │ │ -
65 {
│ │ │ │ -
66 for( int i = 0; i < n; ++i )
│ │ │ │ -
67 {
│ │ │ │ -
68 ret[ i ] = ctype( 0 );
│ │ │ │ -
69 for( int j = 0; j < m; ++j )
│ │ │ │ -
70 ret[ i ] += A[ j ][ i ] * x[ j ];
│ │ │ │ -
71 }
│ │ │ │ -
72 }
│ │ │ │ -
73
│ │ │ │ -
74 template< int m, int n, int p >
│ │ │ │ -
75 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret )
│ │ │ │ -
76 {
│ │ │ │ -
77 for( int i = 0; i < m; ++i )
│ │ │ │ -
78 {
│ │ │ │ -
79 for( int j = 0; j < p; ++j )
│ │ │ │ -
80 {
│ │ │ │ -
81 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
82 for( int k = 0; k < n; ++k )
│ │ │ │ -
83 ret[ i ][ j ] += A[ i ][ k ] * B[ k ][ j ];
│ │ │ │ -
84 }
│ │ │ │ -
85 }
│ │ │ │ -
86 }
│ │ │ │ -
87
│ │ │ │ -
88 template< int m, int n, int p >
│ │ │ │ -
89 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret )
│ │ │ │ -
90 {
│ │ │ │ -
91 for( int i = 0; i < n; ++i )
│ │ │ │ -
92 {
│ │ │ │ -
93 for( int j = 0; j < p; ++j )
│ │ │ │ -
94 {
│ │ │ │ -
95 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
96 for( int k = 0; k < m; ++k )
│ │ │ │ -
97 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ];
│ │ │ │ -
98 }
│ │ │ │ -
99 }
│ │ │ │ -
100 }
│ │ │ │ +
52
│ │ │ │ +
53 // Properties of Topologies
│ │ │ │ +
54 // ------------------------
│ │ │ │ +
55
│ │ │ │ +
56 template< class Topology >
│ │ │ │ +
57 struct [[deprecated("Use GeometryType::isSimplex() instead.")]] IsSimplex
│ │ │ │ +
58 : public std::integral_constant< bool, (Topology::id >> 1) == 0 >
│ │ │ │ +
59 {};
│ │ │ │ +
60
│ │ │ │ +
61 template< class Topology >
│ │ │ │ +
62 struct [[deprecated("Use GeometryType::isCube() instead.")]] IsCube
│ │ │ │ +
63 : public std::integral_constant< bool, (Topology::id | 1) == (1 << Topology::dimension) - 1 >
│ │ │ │ +
64 {};
│ │ │ │ +
65
│ │ │ │ +
78 [[deprecated("Use GeometryType::isPrismatic() or GeometryType::isConical() instead.")]]
│ │ │ │ +
79 inline static bool isTopology ( TopologyConstruction construction, unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ │ +
80 {
│ │ │ │ +
81 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ +
82 assert( (0 <= codim) && (codim <= dim) );
│ │ │ │ +
83 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == (unsigned int)construction);
│ │ │ │ +
84 }
│ │ │ │ +
85
│ │ │ │ +
86
│ │ │ │ +
87 // SimplexTopology
│ │ │ │ +
88 // ---------------
│ │ │ │ +
89
│ │ │ │ +
90 template< unsigned int dim >
│ │ │ │ +
91 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology
│ │ │ │ +
92 {
│ │ │ │ +
93 typedef Pyramid< typename SimplexTopology< dim-1 >::type > type;
│ │ │ │ +
94 };
│ │ │ │ +
95
│ │ │ │ +
96 template<>
│ │ │ │ +
97 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology< 0 >
│ │ │ │ +
98 {
│ │ │ │ +
99 typedef Point type;
│ │ │ │ +
100 };
│ │ │ │
101
│ │ │ │ -
102 template< int m, int n >
│ │ │ │ -
103 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ -
104 {
│ │ │ │ -
105 for( int i = 0; i < n; ++i )
│ │ │ │ -
106 {
│ │ │ │ -
107 for( int j = 0; j <= i; ++j )
│ │ │ │ -
108 {
│ │ │ │ -
109 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
110 for( int k = 0; k < m; ++k )
│ │ │ │ -
111 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ];
│ │ │ │ -
112 }
│ │ │ │ -
113 }
│ │ │ │ -
114 }
│ │ │ │ -
115
│ │ │ │ -
116 template< int m, int n >
│ │ │ │ -
117 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ -
118 {
│ │ │ │ -
119 for( int i = 0; i < n; ++i )
│ │ │ │ -
120 {
│ │ │ │ -
121 for( int j = 0; j <= i; ++j )
│ │ │ │ -
122 {
│ │ │ │ -
123 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
124 for( int k = 0; k < m; ++k )
│ │ │ │ -
125 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ];
│ │ │ │ -
126 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ -
127 }
│ │ │ │ -
128
│ │ │ │ -
129 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ -
130 for( int k = 0; k < m; ++k )
│ │ │ │ -
131 ret[ i ][ i ] += A[ k ][ i ] * A[ k ][ i ];
│ │ │ │ -
132 }
│ │ │ │ -
133 }
│ │ │ │ +
102
│ │ │ │ +
103
│ │ │ │ +
104 // CubeTopology
│ │ │ │ +
105 // ------------
│ │ │ │ +
106
│ │ │ │ +
107 template< unsigned int dim >
│ │ │ │ +
108 struct [[deprecated("Use GeometryTypes::cube(dim) instead.")]] CubeTopology
│ │ │ │ +
109 {
│ │ │ │ +
110 typedef Prism< typename CubeTopology< dim-1 >::type > type;
│ │ │ │ +
111 };
│ │ │ │ +
112
│ │ │ │ +
113 template<>
│ │ │ │ +
114 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] CubeTopology< 0 >
│ │ │ │ +
115 {
│ │ │ │ +
116 typedef Point type;
│ │ │ │ +
117 };
│ │ │ │ +
118
│ │ │ │ +
119
│ │ │ │ +
120
│ │ │ │ +
121 // PyramidTopology
│ │ │ │ +
122 // ---------------
│ │ │ │ +
123
│ │ │ │ +
124 template< unsigned int dim >
│ │ │ │ +
125 struct [[deprecated]] PyramidTopology
│ │ │ │ +
126 {
│ │ │ │ +
127 typedef Pyramid< typename CubeTopology< dim-1 >::type > type;
│ │ │ │ +
128 };
│ │ │ │ +
129
│ │ │ │ +
130
│ │ │ │ +
131
│ │ │ │ +
132 // PrismTopology
│ │ │ │ +
133 // -------------
│ │ │ │
134
│ │ │ │ -
135 template< int m, int n >
│ │ │ │ -
136 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ │ -
137 {
│ │ │ │ -
138 /*
│ │ │ │ -
139 if (m==2) {
│ │ │ │ -
140 ret[0][0] = A[0]*A[0];
│ │ │ │ -
141 ret[1][1] = A[1]*A[1];
│ │ │ │ -
142 ret[1][0] = A[0]*A[1];
│ │ │ │ -
143 }
│ │ │ │ -
144 else
│ │ │ │ -
145 */
│ │ │ │ -
146 for( int i = 0; i < m; ++i )
│ │ │ │ -
147 {
│ │ │ │ -
148 for( int j = 0; j <= i; ++j )
│ │ │ │ -
149 {
│ │ │ │ -
150 ctype &retij = ret[ i ][ j ];
│ │ │ │ -
151 retij = A[ i ][ 0 ] * A[ j ][ 0 ];
│ │ │ │ -
152 for( int k = 1; k < n; ++k )
│ │ │ │ -
153 retij += A[ i ][ k ] * A[ j ][ k ];
│ │ │ │ -
154 }
│ │ │ │ -
155 }
│ │ │ │ -
156 }
│ │ │ │ -
157
│ │ │ │ -
158 template< int m, int n >
│ │ │ │ -
159 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ │ -
160 {
│ │ │ │ -
161 for( int i = 0; i < m; ++i )
│ │ │ │ -
162 {
│ │ │ │ -
163 for( int j = 0; j < i; ++j )
│ │ │ │ -
164 {
│ │ │ │ -
165 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
166 for( int k = 0; k < n; ++k )
│ │ │ │ -
167 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ];
│ │ │ │ -
168 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ -
169 }
│ │ │ │ -
170 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ -
171 for( int k = 0; k < n; ++k )
│ │ │ │ -
172 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ];
│ │ │ │ -
173 }
│ │ │ │ -
174 }
│ │ │ │ -
175
│ │ │ │ -
176 template< int n >
│ │ │ │ -
177 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ │ -
178 {
│ │ │ │ -
179 for( int i = 0; i < n; ++i )
│ │ │ │ -
180 {
│ │ │ │ -
181 ret[ i ] = ctype( 0 );
│ │ │ │ -
182 for( int j = 0; j <= i; ++j )
│ │ │ │ -
183 ret[ i ] += L[ i ][ j ] * x[ j ];
│ │ │ │ -
184 }
│ │ │ │ -
185 }
│ │ │ │ -
186
│ │ │ │ -
187 template< int n >
│ │ │ │ -
188 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ │ -
189 {
│ │ │ │ -
190 for( int i = 0; i < n; ++i )
│ │ │ │ -
191 {
│ │ │ │ -
192 ret[ i ] = ctype( 0 );
│ │ │ │ -
193 for( int j = i; j < n; ++j )
│ │ │ │ -
194 ret[ i ] += L[ j ][ i ] * x[ j ];
│ │ │ │ -
195 }
│ │ │ │ -
196 }
│ │ │ │ -
197
│ │ │ │ -
198 template< int n >
│ │ │ │ -
199 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ -
200 {
│ │ │ │ -
201 for( int i = 0; i < n; ++i )
│ │ │ │ -
202 {
│ │ │ │ -
203 for( int j = 0; j < i; ++j )
│ │ │ │ -
204 {
│ │ │ │ -
205 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
206 for( int k = i; k < n; ++k )
│ │ │ │ -
207 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ];
│ │ │ │ -
208 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ -
209 }
│ │ │ │ -
210 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ -
211 for( int k = i; k < n; ++k )
│ │ │ │ -
212 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ];
│ │ │ │ -
213 }
│ │ │ │ -
214 }
│ │ │ │ -
215
│ │ │ │ -
216 template< int n >
│ │ │ │ -
217 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ -
218 {
│ │ │ │ -
219 for( int i = 0; i < n; ++i )
│ │ │ │ -
220 {
│ │ │ │ -
221 for( int j = 0; j < i; ++j )
│ │ │ │ -
222 {
│ │ │ │ -
223 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ -
224 for( int k = 0; k <= j; ++k )
│ │ │ │ -
225 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ];
│ │ │ │ -
226 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ -
227 }
│ │ │ │ -
228 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ -
229 for( int k = 0; k <= i; ++k )
│ │ │ │ -
230 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ];
│ │ │ │ -
231 }
│ │ │ │ -
232 }
│ │ │ │ -
233
│ │ │ │ -
234 template< int n >
│ │ │ │ -
235 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< ctype, n, n > &ret, const bool checkSingular = false )
│ │ │ │ -
236 {
│ │ │ │ -
237 using std::sqrt;
│ │ │ │ -
238 for( int i = 0; i < n; ++i )
│ │ │ │ -
239 {
│ │ │ │ -
240 ctype &rii = ret[ i ][ i ];
│ │ │ │ -
241
│ │ │ │ -
242 ctype xDiag = A[ i ][ i ];
│ │ │ │ -
243 for( int j = 0; j < i; ++j )
│ │ │ │ -
244 xDiag -= ret[ i ][ j ] * ret[ i ][ j ];
│ │ │ │ -
245
│ │ │ │ -
246 // in some cases A can be singular, e.g. when checking local for
│ │ │ │ -
247 // outside points during checkInside
│ │ │ │ -
248 if( checkSingular && ! ( xDiag > ctype( 0 )) )
│ │ │ │ -
249 return false ;
│ │ │ │ -
250
│ │ │ │ -
251 // otherwise this should be true always
│ │ │ │ -
252 assert( xDiag > ctype( 0 ) );
│ │ │ │ -
253 rii = sqrt( xDiag );
│ │ │ │ -
254
│ │ │ │ -
255 ctype invrii = ctype( 1 ) / rii;
│ │ │ │ -
256 for( int k = i+1; k < n; ++k )
│ │ │ │ -
257 {
│ │ │ │ -
258 ctype x = A[ k ][ i ];
│ │ │ │ -
259 for( int j = 0; j < i; ++j )
│ │ │ │ -
260 x -= ret[ i ][ j ] * ret[ k ][ j ];
│ │ │ │ -
261 ret[ k ][ i ] = invrii * x;
│ │ │ │ -
262 }
│ │ │ │ -
263 }
│ │ │ │ -
264
│ │ │ │ -
265 // return true for meaning A is non-singular
│ │ │ │ -
266 return true;
│ │ │ │ -
267 }
│ │ │ │ -
268
│ │ │ │ -
269 template< int n >
│ │ │ │ -
270 static ctype detL ( const FieldMatrix< ctype, n, n > &L )
│ │ │ │ -
271 {
│ │ │ │ -
272 ctype det( 1 );
│ │ │ │ -
273 for( int i = 0; i < n; ++i )
│ │ │ │ -
274 det *= L[ i ][ i ];
│ │ │ │ -
275 return det;
│ │ │ │ -
276 }
│ │ │ │ -
277
│ │ │ │ -
278 template< int n >
│ │ │ │ -
279 static ctype invL ( FieldMatrix< ctype, n, n > &L )
│ │ │ │ -
280 {
│ │ │ │ -
281 ctype det( 1 );
│ │ │ │ -
282 for( int i = 0; i < n; ++i )
│ │ │ │ -
283 {
│ │ │ │ -
284 ctype &lii = L[ i ][ i ];
│ │ │ │ -
285 det *= lii;
│ │ │ │ -
286 lii = ctype( 1 ) / lii;
│ │ │ │ -
287 for( int j = 0; j < i; ++j )
│ │ │ │ -
288 {
│ │ │ │ -
289 ctype &lij = L[ i ][ j ];
│ │ │ │ -
290 ctype x = lij * L[ j ][ j ];
│ │ │ │ -
291 for( int k = j+1; k < i; ++k )
│ │ │ │ -
292 x += L[ i ][ k ] * L[ k ][ j ];
│ │ │ │ -
293 lij = (-lii) * x;
│ │ │ │ -
294 }
│ │ │ │ -
295 }
│ │ │ │ -
296 return det;
│ │ │ │ -
297 }
│ │ │ │ -
298
│ │ │ │ -
299 // calculates x := L^{-1} x
│ │ │ │ -
300 template< int n >
│ │ │ │ -
301 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ │ -
302 {
│ │ │ │ -
303 for( int i = 0; i < n; ++i )
│ │ │ │ -
304 {
│ │ │ │ -
305 for( int j = 0; j < i; ++j )
│ │ │ │ -
306 x[ i ] -= L[ i ][ j ] * x[ j ];
│ │ │ │ -
307 x[ i ] /= L[ i ][ i ];
│ │ │ │ -
308 }
│ │ │ │ -
309 }
│ │ │ │ -
310
│ │ │ │ -
311 // calculates x := L^{-T} x
│ │ │ │ -
312 template< int n >
│ │ │ │ -
313 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ │ -
314 {
│ │ │ │ -
315 for( int i = n; i > 0; --i )
│ │ │ │ -
316 {
│ │ │ │ -
317 for( int j = i; j < n; ++j )
│ │ │ │ -
318 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ];
│ │ │ │ -
319 x[ i-1 ] /= L[ i-1 ][ i-1 ];
│ │ │ │ -
320 }
│ │ │ │ -
321 }
│ │ │ │ -
322
│ │ │ │ -
323 template< int n >
│ │ │ │ -
324 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A )
│ │ │ │ -
325 {
│ │ │ │ -
326 // return A[0][0]*A[1][1]-A[1][0]*A[1][0];
│ │ │ │ -
327 FieldMatrix< ctype, n, n > L;
│ │ │ │ -
328 cholesky_L( A, L );
│ │ │ │ -
329 return detL( L );
│ │ │ │ -
330 }
│ │ │ │ -
331
│ │ │ │ -
332 template< int n >
│ │ │ │ -
333 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A )
│ │ │ │ -
334 {
│ │ │ │ -
335 FieldMatrix< ctype, n, n > L;
│ │ │ │ -
336 cholesky_L( A, L );
│ │ │ │ -
337 const ctype det = invL( L );
│ │ │ │ -
338 LTL( L, A );
│ │ │ │ -
339 return det;
│ │ │ │ -
340 }
│ │ │ │ -
341
│ │ │ │ -
342 // calculate x := A^{-1} x
│ │ │ │ -
343 template< int n >
│ │ │ │ -
344 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n > &x, const bool checkSingular = false )
│ │ │ │ -
345 {
│ │ │ │ -
346 FieldMatrix< ctype, n, n > L;
│ │ │ │ -
347 const bool invertible = cholesky_L( A, L, checkSingular );
│ │ │ │ -
348 if( ! invertible ) return invertible ;
│ │ │ │ -
349 invLx( L, x );
│ │ │ │ -
350 invLTx( L, x );
│ │ │ │ -
351 return invertible;
│ │ │ │ -
352 }
│ │ │ │ -
353
│ │ │ │ -
354 template< int m, int n >
│ │ │ │ -
355 static ctype detATA ( const FieldMatrix< ctype, m, n > &A )
│ │ │ │ -
356 {
│ │ │ │ -
357 if( m >= n )
│ │ │ │ -
358 {
│ │ │ │ -
359 FieldMatrix< ctype, n, n > ata;
│ │ │ │ -
360 ATA_L( A, ata );
│ │ │ │ -
361 return spdDetA( ata );
│ │ │ │ -
362 }
│ │ │ │ -
363 else
│ │ │ │ -
364 return ctype( 0 );
│ │ │ │ -
365 }
│ │ │ │ -
366
│ │ │ │ -
372 template< int m, int n >
│ │ │ │ -
373 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A )
│ │ │ │ -
374 {
│ │ │ │ -
375 using std::abs;
│ │ │ │ -
376 using std::sqrt;
│ │ │ │ -
377 // These special cases are here not only for speed reasons:
│ │ │ │ -
378 // The general implementation aborts if the matrix is almost singular,
│ │ │ │ -
379 // and the special implementation provide a stable way to handle that case.
│ │ │ │ -
380 if( (n == 2) && (m == 2) )
│ │ │ │ -
381 {
│ │ │ │ -
382 // Special implementation for 2x2 matrices: faster and more stable
│ │ │ │ -
383 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] );
│ │ │ │ -
384 }
│ │ │ │ -
385 else if( (n == 3) && (m == 3) )
│ │ │ │ -
386 {
│ │ │ │ -
387 // Special implementation for 3x3 matrices
│ │ │ │ -
388 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ];
│ │ │ │ -
389 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ];
│ │ │ │ -
390 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ];
│ │ │ │ -
391 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] );
│ │ │ │ -
392 }
│ │ │ │ -
393 else if ( (n == 3) && (m == 2) )
│ │ │ │ -
394 {
│ │ │ │ -
395 // Special implementation for 2x3 matrices
│ │ │ │ -
396 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ];
│ │ │ │ -
397 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ];
│ │ │ │ -
398 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ];
│ │ │ │ -
399 return sqrt( v0*v0 + v1*v1 + v2*v2);
│ │ │ │ -
400 }
│ │ │ │ -
401 else if( n >= m )
│ │ │ │ -
402 {
│ │ │ │ -
403 // General case
│ │ │ │ -
404 FieldMatrix< ctype, m, m > aat;
│ │ │ │ -
405 AAT_L( A, aat );
│ │ │ │ -
406 return spdDetA( aat );
│ │ │ │ -
407 }
│ │ │ │ -
408 else
│ │ │ │ -
409 return ctype( 0 );
│ │ │ │ -
410 }
│ │ │ │ -
411
│ │ │ │ -
412 // A^{-1}_L = (A^T A)^{-1} A^T
│ │ │ │ -
413 // => A^{-1}_L A = I
│ │ │ │ -
414 template< int m, int n >
│ │ │ │ -
415 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ │ -
416 {
│ │ │ │ -
417 static_assert((m >= n), "Matrix has no left inverse.");
│ │ │ │ -
418 FieldMatrix< ctype, n, n > ata;
│ │ │ │ -
419 ATA_L( A, ata );
│ │ │ │ -
420 const ctype det = spdInvA( ata );
│ │ │ │ -
421 ATBT( ata, A, ret );
│ │ │ │ -
422 return det;
│ │ │ │ -
423 }
│ │ │ │ -
424
│ │ │ │ -
425 template< int m, int n >
│ │ │ │ -
426 static void leftInvAx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &y )
│ │ │ │ -
427 {
│ │ │ │ -
428 static_assert((m >= n), "Matrix has no left inverse.");
│ │ │ │ -
429 FieldMatrix< ctype, n, n > ata;
│ │ │ │ -
430 ATx( A, x, y );
│ │ │ │ -
431 ATA_L( A, ata );
│ │ │ │ -
432 spdInvAx( ata, y );
│ │ │ │ -
433 }
│ │ │ │ -
434
│ │ │ │ -
436 template< int m, int n >
│ │ │ │ -
437 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ │ -
438 {
│ │ │ │ -
439 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ │ -
440 using std::abs;
│ │ │ │ -
441 if( (n == 2) && (m == 2) )
│ │ │ │ -
442 {
│ │ │ │ -
443 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ │ -
444 const ctype detInv = ctype( 1 ) / det;
│ │ │ │ -
445 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ │ -
446 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ │ -
447 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ │ -
448 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ │ -
449 return abs( det );
│ │ │ │ -
450 }
│ │ │ │ -
451 else
│ │ │ │ -
452 {
│ │ │ │ -
453 FieldMatrix< ctype, m , m > aat;
│ │ │ │ -
454 AAT_L( A, aat );
│ │ │ │ -
455 const ctype det = spdInvA( aat );
│ │ │ │ -
456 ATBT( A , aat , ret );
│ │ │ │ -
457 return det;
│ │ │ │ -
458 }
│ │ │ │ -
459 }
│ │ │ │ -
460
│ │ │ │ -
461 template< int m, int n >
│ │ │ │ -
462 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &y )
│ │ │ │ -
463 {
│ │ │ │ -
464 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ │ -
465 FieldMatrix< ctype, m, m > aat;
│ │ │ │ -
466 Ax( A, x, y );
│ │ │ │ -
467 AAT_L( A, aat );
│ │ │ │ -
468 // check whether aat is singular and return true if non-singular
│ │ │ │ -
469 return spdInvAx( aat, y, true );
│ │ │ │ -
470 }
│ │ │ │ -
471 };
│ │ │ │ -
472
│ │ │ │ -
473 } // namespace Impl
│ │ │ │ -
474
│ │ │ │ -
475
│ │ │ │ -
476
│ │ │ │ -
482 template< class ct, int mydim, int cdim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
484 {
│ │ │ │ -
485 public:
│ │ │ │ -
486
│ │ │ │ -
488 typedef ct ctype;
│ │ │ │ -
489
│ │ │ │ -
491 static const int mydimension= mydim;
│ │ │ │ -
492
│ │ │ │ -
494 static const int coorddimension = cdim;
│ │ │ │ -
495
│ │ │ │ -
497 typedef FieldVector< ctype, mydimension > LocalCoordinate;
│ │ │ │ -
498
│ │ │ │ -
500 typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
│ │ │ │ -
501
│ │ │ │ -
503 typedef ctype Volume;
│ │ │ │ -
504
│ │ │ │ -
506 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
│ │ │ │ -
507
│ │ │ │ -
509 typedef FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed;
│ │ │ │ -
510
│ │ │ │ -
512 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ │ -
513
│ │ │ │ -
515 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ │ -
516
│ │ │ │ -
517 private:
│ │ │ │ - │ │ │ │ -
520
│ │ │ │ - │ │ │ │ -
522
│ │ │ │ -
523 // Helper class to compute a matrix pseudo inverse
│ │ │ │ -
524 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ │ -
525
│ │ │ │ -
526 public:
│ │ │ │ -
│ │ │ │ -
528 AffineGeometry ( const ReferenceElement &refElement, const GlobalCoordinate &origin,
│ │ │ │ -
529 const JacobianTransposed &jt )
│ │ │ │ -
530 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt)
│ │ │ │ -
531 {
│ │ │ │ -
532 integrationElement_ = MatrixHelper::template rightInvA< mydimension, coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ │ -
533 }
│ │ │ │ -
│ │ │ │ -
534
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
537 const JacobianTransposed &jt )
│ │ │ │ -
538 : AffineGeometry(ReferenceElements::general( gt ), origin, jt)
│ │ │ │ -
539 { }
│ │ │ │ -
│ │ │ │ -
540
│ │ │ │ -
542 template< class CoordVector >
│ │ │ │ -
│ │ │ │ -
543 AffineGeometry ( const ReferenceElement &refElement, const CoordVector &coordVector )
│ │ │ │ -
544 : refElement_(refElement), origin_(coordVector[0])
│ │ │ │ -
545 {
│ │ │ │ -
546 for( int i = 0; i < mydimension; ++i )
│ │ │ │ -
547 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_;
│ │ │ │ -
548 integrationElement_ = MatrixHelper::template rightInvA< mydimension, coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ │ -
549 }
│ │ │ │ -
│ │ │ │ -
550
│ │ │ │ -
552 template< class CoordVector >
│ │ │ │ -
│ │ │ │ -
553 AffineGeometry ( Dune::GeometryType gt, const CoordVector &coordVector )
│ │ │ │ -
554 : AffineGeometry(ReferenceElements::general( gt ), coordVector)
│ │ │ │ -
555 { }
│ │ │ │ -
│ │ │ │ -
556
│ │ │ │ -
558 bool affine () const { return true; }
│ │ │ │ -
559
│ │ │ │ -
561 Dune::GeometryType type () const { return refElement_.type(); }
│ │ │ │ -
562
│ │ │ │ -
564 int corners () const { return refElement_.size( mydimension ); }
│ │ │ │ -
565
│ │ │ │ -
│ │ │ │ -
567 GlobalCoordinate corner ( int i ) const
│ │ │ │ -
568 {
│ │ │ │ -
569 return global( refElement_.position( i, mydimension ) );
│ │ │ │ -
570 }
│ │ │ │ -
│ │ │ │ -
571
│ │ │ │ -
573 GlobalCoordinate center () const { return global( refElement_.position( 0, 0 ) ); }
│ │ │ │ -
574
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
582 {
│ │ │ │ -
583 GlobalCoordinate global( origin_ );
│ │ │ │ -
584 jacobianTransposed_.umtv( local, global );
│ │ │ │ -
585 return global;
│ │ │ │ -
586 }
│ │ │ │ -
│ │ │ │ -
587
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
602 {
│ │ │ │ - │ │ │ │ -
604 jacobianInverseTransposed_.mtv( global - origin_, local );
│ │ │ │ -
605 return local;
│ │ │ │ -
606 }
│ │ │ │ -
│ │ │ │ -
607
│ │ │ │ -
│ │ │ │ -
618 ctype integrationElement ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ -
619 {
│ │ │ │ -
620 return integrationElement_;
│ │ │ │ -
621 }
│ │ │ │ -
│ │ │ │ -
622
│ │ │ │ -
│ │ │ │ -
624 Volume volume () const
│ │ │ │ -
625 {
│ │ │ │ -
626 return integrationElement_ * refElement_.volume();
│ │ │ │ -
627 }
│ │ │ │ -
│ │ │ │ -
628
│ │ │ │ -
│ │ │ │ -
635 const JacobianTransposed &jacobianTransposed ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ -
636 {
│ │ │ │ -
637 return jacobianTransposed_;
│ │ │ │ -
638 }
│ │ │ │ -
│ │ │ │ -
639
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
647 {
│ │ │ │ -
648 return jacobianInverseTransposed_;
│ │ │ │ -
649 }
│ │ │ │ -
│ │ │ │ -
650
│ │ │ │ -
│ │ │ │ -
657 Jacobian jacobian ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ -
658 {
│ │ │ │ -
659 return jacobianTransposed_.transposed();
│ │ │ │ -
660 }
│ │ │ │ -
│ │ │ │ -
661
│ │ │ │ -
│ │ │ │ -
668 JacobianInverse jacobianInverse ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ -
669 {
│ │ │ │ -
670 return jacobianInverseTransposed_.transposed();
│ │ │ │ -
671 }
│ │ │ │ -
│ │ │ │ -
672
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
674 {
│ │ │ │ -
675 return geometry.refElement_;
│ │ │ │ -
676 }
│ │ │ │ -
│ │ │ │ -
677
│ │ │ │ -
678 private:
│ │ │ │ -
679 ReferenceElement refElement_;
│ │ │ │ -
680 GlobalCoordinate origin_;
│ │ │ │ -
681 JacobianTransposed jacobianTransposed_;
│ │ │ │ -
682 JacobianInverseTransposed jacobianInverseTransposed_;
│ │ │ │ -
683 ctype integrationElement_;
│ │ │ │ -
684 };
│ │ │ │ -
│ │ │ │ -
685
│ │ │ │ -
686} // namespace Dune
│ │ │ │ -
│ │ │ │ -
687
│ │ │ │ -
688#endif // #ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ -
unspecified-type ReferenceElement
Returns the type of reference element for the argument type T.
Definition referenceelements.hh:497
│ │ │ │ -
Definition affinegeometry.hh:21
│ │ │ │ -
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ │ -
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:241
│ │ │ │ -
decltype(auto) type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:171
│ │ │ │ -
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ │ -
decltype(auto) position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:203
│ │ │ │ -
Definition affinegeometry.hh:33
│ │ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ -
Implementation of the Geometry interface for affine geometries.
Definition affinegeometry.hh:484
│ │ │ │ -
AffineGeometry(const ReferenceElement &refElement, const CoordVector &coordVector)
Create affine geometry from reference element and a vector of vertex coordinates.
Definition affinegeometry.hh:543
│ │ │ │ -
AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from GeometryType, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:536
│ │ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
Type for local coordinate vector.
Definition affinegeometry.hh:497
│ │ │ │ -
Dune::GeometryType type() const
Obtain the type of the reference element.
Definition affinegeometry.hh:561
│ │ │ │ -
static const int mydimension
Dimension of the geometry.
Definition affinegeometry.hh:491
│ │ │ │ -
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:528
│ │ │ │ -
ctype Volume
Type used for volume.
Definition affinegeometry.hh:503
│ │ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition affinegeometry.hh:668
│ │ │ │ -
friend ReferenceElement referenceElement(const AffineGeometry &geometry)
Definition affinegeometry.hh:673
│ │ │ │ -
AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector)
Create affine geometry from GeometryType and a vector of vertex coordinates.
Definition affinegeometry.hh:553
│ │ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition affinegeometry.hh:618
│ │ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
Definition affinegeometry.hh:515
│ │ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Type for the Jacobian matrix.
Definition affinegeometry.hh:512
│ │ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition affinegeometry.hh:646
│ │ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Type for the transposed Jacobian matrix.
Definition affinegeometry.hh:506
│ │ │ │ -
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition affinegeometry.hh:567
│ │ │ │ -
int corners() const
Obtain number of corners of the corresponding reference element.
Definition affinegeometry.hh:564
│ │ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse mapping.
Definition affinegeometry.hh:601
│ │ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Type for the transposed inverse Jacobian matrix.
Definition affinegeometry.hh:509
│ │ │ │ -
static const int coorddimension
Dimension of the world space.
Definition affinegeometry.hh:494
│ │ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the mapping.
Definition affinegeometry.hh:581
│ │ │ │ -
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition affinegeometry.hh:573
│ │ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition affinegeometry.hh:657
│ │ │ │ -
ct ctype
Type used for coordinates.
Definition affinegeometry.hh:488
│ │ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
Type for coordinate vector in world space.
Definition affinegeometry.hh:500
│ │ │ │ -
bool affine() const
Always true: this is an affine geometry.
Definition affinegeometry.hh:558
│ │ │ │ -
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition affinegeometry.hh:635
│ │ │ │ -
Volume volume() const
Obtain the volume of the element.
Definition affinegeometry.hh:624
│ │ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ +
135 template< unsigned int dim >
│ │ │ │ +
136 struct [[deprecated]] PrismTopology
│ │ │ │ +
137 {
│ │ │ │ +
138 typedef Prism< typename SimplexTopology< dim-1 >::type > type;
│ │ │ │ +
139 };
│ │ │ │ +
140
│ │ │ │ +
141
│ │ │ │ +
142
│ │ │ │ +
143
│ │ │ │ +
144 // IfTopology
│ │ │ │ +
145 // ----------
│ │ │ │ +
146
│ │ │ │ +
147 template< template< class > class Operation, int dim, class Topology = PointDeprecationHelper >
│ │ │ │ +
148 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology
│ │ │ │ +
149 {
│ │ │ │ +
150 template< class... Args >
│ │ │ │ +
151 static auto apply ( unsigned int topologyId, Args &&... args )
│ │ │ │ +
152 {
│ │ │ │ +
153 if( topologyId & 1 )
│ │ │ │ +
154 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
│ │ │ │ +
155 else
│ │ │ │ +
156 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
│ │ │ │ +
157 }
│ │ │ │ +
158 };
│ │ │ │ +
159
│ │ │ │ +
160 template< template< class > class Operation, class Topology >
│ │ │ │ +
161 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology< Operation, 0, Topology >
│ │ │ │ +
162 {
│ │ │ │ +
163 template< class... Args >
│ │ │ │ +
164 static auto apply ([[maybe_unused]] unsigned int topologyId, Args &&... args)
│ │ │ │ +
165 {
│ │ │ │ +
166 return Operation< Topology >::apply( std::forward< Args >( args )... );
│ │ │ │ +
167 }
│ │ │ │ +
168 };
│ │ │ │ +
169
│ │ │ │ +
170 } // namespace Impl
│ │ │ │ +
171#endif
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,798 +1,188 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -affinegeometry.hh │ │ │ │ │ +deprecated_topology.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ │ -6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ │ +5#ifndef DUNE_DEPRECATED_TOPOLOGY_HH │ │ │ │ │ +6#define DUNE_DEPRECATED_TOPOLOGY_HH │ │ │ │ │ 7 │ │ │ │ │ -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> │ │ │ │ │ +8 namespace Impl │ │ │ │ │ +9 { │ │ │ │ │ +10 │ │ │ │ │ +11 // Basic Topology Types │ │ │ │ │ +12 // -------------------- │ │ │ │ │ +13 │ │ │ │ │ +14 // PointDeprecationHelper can be used to prevent a deprecation warning for │ │ │ │ │ +Point │ │ │ │ │ +15 struct PointDeprecationHelper │ │ │ │ │ +16 { │ │ │ │ │ +17 static const unsigned int dimension = 0; │ │ │ │ │ +18 static const unsigned int numCorners = 1; │ │ │ │ │ 19 │ │ │ │ │ -_2_0namespace _D_u_n_e │ │ │ │ │ -21{ │ │ │ │ │ -22 │ │ │ │ │ -23 // External Forward Declarations │ │ │ │ │ -24 // ----------------------------- │ │ │ │ │ -25 │ │ │ │ │ -_2_6 namespace Geo │ │ │ │ │ -27 { │ │ │ │ │ -28 │ │ │ │ │ -29 template< typename Implementation > │ │ │ │ │ -30 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ │ -31 │ │ │ │ │ -32 template< class ctype, int dim > │ │ │ │ │ -_3_3 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; │ │ │ │ │ -34 │ │ │ │ │ -35 template< class ctype, int dim > │ │ │ │ │ -36 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ │ -37 │ │ │ │ │ -38 } │ │ │ │ │ +20 static const unsigned int id = 0; │ │ │ │ │ +21 │ │ │ │ │ +22 static std::string name () { return "p"; } │ │ │ │ │ +23 }; │ │ │ │ │ +24 │ │ │ │ │ +25 using Point [[deprecated("Use GeometryTypes::vertex instead.")]] = │ │ │ │ │ +PointDeprecationHelper; │ │ │ │ │ +26 │ │ │ │ │ +27 │ │ │ │ │ +28 template< class BaseTopology > │ │ │ │ │ +29 struct [[deprecated("Use GeometryTypes::prismaticExtension(GeometryType gt) │ │ │ │ │ +instead.")]] Prism │ │ │ │ │ +30 { │ │ │ │ │ +31 static const unsigned int dimension = BaseTopology::dimension + 1; │ │ │ │ │ +32 static const unsigned int numCorners = 2 * BaseTopology::numCorners; │ │ │ │ │ +33 │ │ │ │ │ +34 static const unsigned int id = BaseTopology::id | ((unsigned │ │ │ │ │ +int)prismConstruction << (dimension-1)); │ │ │ │ │ +35 │ │ │ │ │ +36 static std::string name () { return BaseTopology::name() + "l"; } │ │ │ │ │ +37 }; │ │ │ │ │ +38 │ │ │ │ │ 39 │ │ │ │ │ -40 │ │ │ │ │ -41 namespace Impl │ │ │ │ │ +40 template< class BaseTopology > │ │ │ │ │ +41 struct [[deprecated("Use GeometryTypes::conicalExtension(GeometryType gt) │ │ │ │ │ +instead.")]] Pyramid │ │ │ │ │ 42 { │ │ │ │ │ -43 │ │ │ │ │ -44 // FieldMatrixHelper │ │ │ │ │ -45 // ----------------- │ │ │ │ │ -46 │ │ │ │ │ -47 template< class ct > │ │ │ │ │ -48 struct FieldMatrixHelper │ │ │ │ │ -49 { │ │ │ │ │ -50 typedef ct ctype; │ │ │ │ │ +43 static const unsigned int dimension = BaseTopology::dimension + 1; │ │ │ │ │ +44 static const unsigned int numCorners = BaseTopology::numCorners + 1; │ │ │ │ │ +45 │ │ │ │ │ +46 static const unsigned int id = BaseTopology::id | ((unsigned │ │ │ │ │ +int)pyramidConstruction << (dimension-1)); │ │ │ │ │ +47 │ │ │ │ │ +48 static std::string name () { return BaseTopology::name() + "o"; } │ │ │ │ │ +49 }; │ │ │ │ │ +50 │ │ │ │ │ 51 │ │ │ │ │ -52 template< int m, int n > │ │ │ │ │ -53 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ │ -ctype, n > &x, FieldVector< ctype, m > &ret ) │ │ │ │ │ -54 { │ │ │ │ │ -55 for( int i = 0; i < m; ++i ) │ │ │ │ │ -56 { │ │ │ │ │ -57 ret[ i ] = ctype( 0 ); │ │ │ │ │ -58 for( int j = 0; j < n; ++j ) │ │ │ │ │ -59 ret[ i ] += A[ i ][ j ] * x[ j ]; │ │ │ │ │ -60 } │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -63 template< int m, int n > │ │ │ │ │ -64 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ │ -ctype, m > &x, FieldVector< ctype, n > &ret ) │ │ │ │ │ -65 { │ │ │ │ │ -66 for( int i = 0; i < n; ++i ) │ │ │ │ │ -67 { │ │ │ │ │ -68 ret[ i ] = ctype( 0 ); │ │ │ │ │ -69 for( int j = 0; j < m; ++j ) │ │ │ │ │ -70 ret[ i ] += A[ j ][ i ] * x[ j ]; │ │ │ │ │ -71 } │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -74 template< int m, int n, int p > │ │ │ │ │ -75 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ │ -ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret ) │ │ │ │ │ -76 { │ │ │ │ │ -77 for( int i = 0; i < m; ++i ) │ │ │ │ │ -78 { │ │ │ │ │ -79 for( int j = 0; j < p; ++j ) │ │ │ │ │ +52 │ │ │ │ │ +53 // Properties of Topologies │ │ │ │ │ +54 // ------------------------ │ │ │ │ │ +55 │ │ │ │ │ +56 template< class Topology > │ │ │ │ │ +57 struct [[deprecated("Use GeometryType::isSimplex() instead.")]] IsSimplex │ │ │ │ │ +58 : public std::integral_constant< bool, (Topology::id >> 1) == 0 > │ │ │ │ │ +59 {}; │ │ │ │ │ +60 │ │ │ │ │ +61 template< class Topology > │ │ │ │ │ +62 struct [[deprecated("Use GeometryType::isCube() instead.")]] IsCube │ │ │ │ │ +63 : public std::integral_constant< bool, (Topology::id | 1) == (1 << │ │ │ │ │ +Topology::dimension) - 1 > │ │ │ │ │ +64 {}; │ │ │ │ │ +65 │ │ │ │ │ +78 [[deprecated("Use GeometryType::isPrismatic() or GeometryType::isConical() │ │ │ │ │ +instead.")]] │ │ │ │ │ +79 inline static bool isTopology ( TopologyConstruction construction, unsigned │ │ │ │ │ +int topologyId, int dim, int codim = 0 ) noexcept │ │ │ │ │ 80 { │ │ │ │ │ -81 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -82 for( int k = 0; k < n; ++k ) │ │ │ │ │ -83 ret[ i ][ j ] += A[ i ][ k ] * B[ k ][ j ]; │ │ │ │ │ +81 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ +82 assert( (0 <= codim) && (codim <= dim) ); │ │ │ │ │ +83 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == │ │ │ │ │ +(unsigned int)construction); │ │ │ │ │ 84 } │ │ │ │ │ -85 } │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -88 template< int m, int n, int p > │ │ │ │ │ -89 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ │ -ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret ) │ │ │ │ │ -90 { │ │ │ │ │ -91 for( int i = 0; i < n; ++i ) │ │ │ │ │ +85 │ │ │ │ │ +86 │ │ │ │ │ +87 // SimplexTopology │ │ │ │ │ +88 // --------------- │ │ │ │ │ +89 │ │ │ │ │ +90 template< unsigned int dim > │ │ │ │ │ +91 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] │ │ │ │ │ +SimplexTopology │ │ │ │ │ 92 { │ │ │ │ │ -93 for( int j = 0; j < p; ++j ) │ │ │ │ │ -94 { │ │ │ │ │ -95 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -96 for( int k = 0; k < m; ++k ) │ │ │ │ │ -97 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ]; │ │ │ │ │ -98 } │ │ │ │ │ -99 } │ │ │ │ │ -100 } │ │ │ │ │ +93 typedef Pyramid< typename SimplexTopology< dim-1 >::type > type; │ │ │ │ │ +94 }; │ │ │ │ │ +95 │ │ │ │ │ +96 template<> │ │ │ │ │ +97 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] │ │ │ │ │ +SimplexTopology< 0 > │ │ │ │ │ +98 { │ │ │ │ │ +99 typedef Point type; │ │ │ │ │ +100 }; │ │ │ │ │ 101 │ │ │ │ │ -102 template< int m, int n > │ │ │ │ │ -103 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ -ctype, n, n > &ret ) │ │ │ │ │ -104 { │ │ │ │ │ -105 for( int i = 0; i < n; ++i ) │ │ │ │ │ -106 { │ │ │ │ │ -107 for( int j = 0; j <= i; ++j ) │ │ │ │ │ -108 { │ │ │ │ │ -109 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -110 for( int k = 0; k < m; ++k ) │ │ │ │ │ -111 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; │ │ │ │ │ -112 } │ │ │ │ │ -113 } │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -116 template< int m, int n > │ │ │ │ │ -117 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ │ -n, n > &ret ) │ │ │ │ │ -118 { │ │ │ │ │ -119 for( int i = 0; i < n; ++i ) │ │ │ │ │ -120 { │ │ │ │ │ -121 for( int j = 0; j <= i; ++j ) │ │ │ │ │ -122 { │ │ │ │ │ -123 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -124 for( int k = 0; k < m; ++k ) │ │ │ │ │ -125 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; │ │ │ │ │ -126 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ -127 } │ │ │ │ │ -128 │ │ │ │ │ -129 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ -130 for( int k = 0; k < m; ++k ) │ │ │ │ │ -131 ret[ i ][ i ] += A[ k ][ i ] * A[ k ][ i ]; │ │ │ │ │ -132 } │ │ │ │ │ -133 } │ │ │ │ │ +102 │ │ │ │ │ +103 │ │ │ │ │ +104 // CubeTopology │ │ │ │ │ +105 // ------------ │ │ │ │ │ +106 │ │ │ │ │ +107 template< unsigned int dim > │ │ │ │ │ +108 struct [[deprecated("Use GeometryTypes::cube(dim) instead.")]] CubeTopology │ │ │ │ │ +109 { │ │ │ │ │ +110 typedef Prism< typename CubeTopology< dim-1 >::type > type; │ │ │ │ │ +111 }; │ │ │ │ │ +112 │ │ │ │ │ +113 template<> │ │ │ │ │ +114 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] │ │ │ │ │ +CubeTopology< 0 > │ │ │ │ │ +115 { │ │ │ │ │ +116 typedef Point type; │ │ │ │ │ +117 }; │ │ │ │ │ +118 │ │ │ │ │ +119 │ │ │ │ │ +120 │ │ │ │ │ +121 // PyramidTopology │ │ │ │ │ +122 // --------------- │ │ │ │ │ +123 │ │ │ │ │ +124 template< unsigned int dim > │ │ │ │ │ +125 struct [[deprecated]] PyramidTopology │ │ │ │ │ +126 { │ │ │ │ │ +127 typedef Pyramid< typename CubeTopology< dim-1 >::type > type; │ │ │ │ │ +128 }; │ │ │ │ │ +129 │ │ │ │ │ +130 │ │ │ │ │ +131 │ │ │ │ │ +132 // PrismTopology │ │ │ │ │ +133 // ------------- │ │ │ │ │ 134 │ │ │ │ │ -135 template< int m, int n > │ │ │ │ │ -136 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ -ctype, m, m > &ret ) │ │ │ │ │ +135 template< unsigned int dim > │ │ │ │ │ +136 struct [[deprecated]] PrismTopology │ │ │ │ │ 137 { │ │ │ │ │ -138 /* │ │ │ │ │ -139 if (m==2) { │ │ │ │ │ -140 ret[0][0] = A[0]*A[0]; │ │ │ │ │ -141 ret[1][1] = A[1]*A[1]; │ │ │ │ │ -142 ret[1][0] = A[0]*A[1]; │ │ │ │ │ -143 } │ │ │ │ │ -144 else │ │ │ │ │ -145 */ │ │ │ │ │ -146 for( int i = 0; i < m; ++i ) │ │ │ │ │ -147 { │ │ │ │ │ -148 for( int j = 0; j <= i; ++j ) │ │ │ │ │ +138 typedef Prism< typename SimplexTopology< dim-1 >::type > type; │ │ │ │ │ +139 }; │ │ │ │ │ +140 │ │ │ │ │ +141 │ │ │ │ │ +142 │ │ │ │ │ +143 │ │ │ │ │ +144 // IfTopology │ │ │ │ │ +145 // ---------- │ │ │ │ │ +146 │ │ │ │ │ +147 template< template< class > class Operation, int dim, class Topology = │ │ │ │ │ +PointDeprecationHelper > │ │ │ │ │ +148 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology │ │ │ │ │ 149 { │ │ │ │ │ -150 ctype &retij = ret[ i ][ j ]; │ │ │ │ │ -151 retij = A[ i ][ 0 ] * A[ j ][ 0 ]; │ │ │ │ │ -152 for( int k = 1; k < n; ++k ) │ │ │ │ │ -153 retij += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ │ -154 } │ │ │ │ │ -155 } │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 template< int m, int n > │ │ │ │ │ -159 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ │ -m, m > &ret ) │ │ │ │ │ -160 { │ │ │ │ │ -161 for( int i = 0; i < m; ++i ) │ │ │ │ │ +150 template< class... Args > │ │ │ │ │ +151 static auto apply ( unsigned int topologyId, Args &&... args ) │ │ │ │ │ +152 { │ │ │ │ │ +153 if( topologyId & 1 ) │ │ │ │ │ +154 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId │ │ │ │ │ +>> 1, std::forward< Args >( args )... ); │ │ │ │ │ +155 else │ │ │ │ │ +156 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply │ │ │ │ │ +( topologyId >> 1, std::forward< Args >( args )... ); │ │ │ │ │ +157 } │ │ │ │ │ +158 }; │ │ │ │ │ +159 │ │ │ │ │ +160 template< template< class > class Operation, class Topology > │ │ │ │ │ +161 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology< Operation, │ │ │ │ │ +0, Topology > │ │ │ │ │ 162 { │ │ │ │ │ -163 for( int j = 0; j < i; ++j ) │ │ │ │ │ -164 { │ │ │ │ │ -165 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -166 for( int k = 0; k < n; ++k ) │ │ │ │ │ -167 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ │ -168 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ -169 } │ │ │ │ │ -170 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ -171 for( int k = 0; k < n; ++k ) │ │ │ │ │ -172 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ]; │ │ │ │ │ -173 } │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 template< int n > │ │ │ │ │ -177 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ │ -ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ │ -178 { │ │ │ │ │ -179 for( int i = 0; i < n; ++i ) │ │ │ │ │ -180 { │ │ │ │ │ -181 ret[ i ] = ctype( 0 ); │ │ │ │ │ -182 for( int j = 0; j <= i; ++j ) │ │ │ │ │ -183 ret[ i ] += L[ i ][ j ] * x[ j ]; │ │ │ │ │ -184 } │ │ │ │ │ -185 } │ │ │ │ │ -186 │ │ │ │ │ -187 template< int n > │ │ │ │ │ -188 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ │ -ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ │ -189 { │ │ │ │ │ -190 for( int i = 0; i < n; ++i ) │ │ │ │ │ -191 { │ │ │ │ │ -192 ret[ i ] = ctype( 0 ); │ │ │ │ │ -193 for( int j = i; j < n; ++j ) │ │ │ │ │ -194 ret[ i ] += L[ j ][ i ] * x[ j ]; │ │ │ │ │ -195 } │ │ │ │ │ -196 } │ │ │ │ │ -197 │ │ │ │ │ -198 template< int n > │ │ │ │ │ -199 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ │ -n, n > &ret ) │ │ │ │ │ -200 { │ │ │ │ │ -201 for( int i = 0; i < n; ++i ) │ │ │ │ │ -202 { │ │ │ │ │ -203 for( int j = 0; j < i; ++j ) │ │ │ │ │ -204 { │ │ │ │ │ -205 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -206 for( int k = i; k < n; ++k ) │ │ │ │ │ -207 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ]; │ │ │ │ │ -208 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ -209 } │ │ │ │ │ -210 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ -211 for( int k = i; k < n; ++k ) │ │ │ │ │ -212 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ]; │ │ │ │ │ -213 } │ │ │ │ │ -214 } │ │ │ │ │ -215 │ │ │ │ │ -216 template< int n > │ │ │ │ │ -217 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ │ -n, n > &ret ) │ │ │ │ │ -218 { │ │ │ │ │ -219 for( int i = 0; i < n; ++i ) │ │ │ │ │ -220 { │ │ │ │ │ -221 for( int j = 0; j < i; ++j ) │ │ │ │ │ -222 { │ │ │ │ │ -223 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ -224 for( int k = 0; k <= j; ++k ) │ │ │ │ │ -225 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ]; │ │ │ │ │ -226 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ -227 } │ │ │ │ │ -228 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ -229 for( int k = 0; k <= i; ++k ) │ │ │ │ │ -230 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ]; │ │ │ │ │ -231 } │ │ │ │ │ -232 } │ │ │ │ │ -233 │ │ │ │ │ -234 template< int n > │ │ │ │ │ -235 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< │ │ │ │ │ -ctype, n, n > &ret, const bool checkSingular = false ) │ │ │ │ │ -236 { │ │ │ │ │ -237 using std::sqrt; │ │ │ │ │ -238 for( int i = 0; i < n; ++i ) │ │ │ │ │ -239 { │ │ │ │ │ -240 ctype &rii = ret[ i ][ i ]; │ │ │ │ │ -241 │ │ │ │ │ -242 ctype xDiag = A[ i ][ i ]; │ │ │ │ │ -243 for( int j = 0; j < i; ++j ) │ │ │ │ │ -244 xDiag -= ret[ i ][ j ] * ret[ i ][ j ]; │ │ │ │ │ -245 │ │ │ │ │ -246 // in some cases A can be singular, e.g. when checking local for │ │ │ │ │ -247 // outside points during checkInside │ │ │ │ │ -248 if( checkSingular && ! ( xDiag > ctype( 0 )) ) │ │ │ │ │ -249 return false ; │ │ │ │ │ -250 │ │ │ │ │ -251 // otherwise this should be true always │ │ │ │ │ -252 assert( xDiag > ctype( 0 ) ); │ │ │ │ │ -253 rii = sqrt( xDiag ); │ │ │ │ │ -254 │ │ │ │ │ -255 ctype invrii = ctype( 1 ) / rii; │ │ │ │ │ -256 for( int k = i+1; k < n; ++k ) │ │ │ │ │ -257 { │ │ │ │ │ -258 ctype x = A[ k ][ i ]; │ │ │ │ │ -259 for( int j = 0; j < i; ++j ) │ │ │ │ │ -260 x -= ret[ i ][ j ] * ret[ k ][ j ]; │ │ │ │ │ -261 ret[ k ][ i ] = invrii * x; │ │ │ │ │ -262 } │ │ │ │ │ -263 } │ │ │ │ │ -264 │ │ │ │ │ -265 // return true for meaning A is non-singular │ │ │ │ │ -266 return true; │ │ │ │ │ -267 } │ │ │ │ │ -268 │ │ │ │ │ -269 template< int n > │ │ │ │ │ -270 static ctype detL ( const FieldMatrix< ctype, n, n > &L ) │ │ │ │ │ -271 { │ │ │ │ │ -272 ctype det( 1 ); │ │ │ │ │ -273 for( int i = 0; i < n; ++i ) │ │ │ │ │ -274 det *= L[ i ][ i ]; │ │ │ │ │ -275 return det; │ │ │ │ │ -276 } │ │ │ │ │ -277 │ │ │ │ │ -278 template< int n > │ │ │ │ │ -279 static ctype invL ( FieldMatrix< ctype, n, n > &L ) │ │ │ │ │ -280 { │ │ │ │ │ -281 ctype det( 1 ); │ │ │ │ │ -282 for( int i = 0; i < n; ++i ) │ │ │ │ │ -283 { │ │ │ │ │ -284 ctype &lii = L[ i ][ i ]; │ │ │ │ │ -285 det *= lii; │ │ │ │ │ -286 lii = ctype( 1 ) / lii; │ │ │ │ │ -287 for( int j = 0; j < i; ++j ) │ │ │ │ │ -288 { │ │ │ │ │ -289 ctype &lij = L[ i ][ j ]; │ │ │ │ │ -290 ctype x = lij * L[ j ][ j ]; │ │ │ │ │ -291 for( int k = j+1; k < i; ++k ) │ │ │ │ │ -292 x += L[ i ][ k ] * L[ k ][ j ]; │ │ │ │ │ -293 lij = (-lii) * x; │ │ │ │ │ -294 } │ │ │ │ │ -295 } │ │ │ │ │ -296 return det; │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -299 // calculates x := L^{-1} x │ │ │ │ │ -300 template< int n > │ │ │ │ │ -301 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ │ -&x ) │ │ │ │ │ -302 { │ │ │ │ │ -303 for( int i = 0; i < n; ++i ) │ │ │ │ │ -304 { │ │ │ │ │ -305 for( int j = 0; j < i; ++j ) │ │ │ │ │ -306 x[ i ] -= L[ i ][ j ] * x[ j ]; │ │ │ │ │ -307 x[ i ] /= L[ i ][ i ]; │ │ │ │ │ -308 } │ │ │ │ │ -309 } │ │ │ │ │ -310 │ │ │ │ │ -311 // calculates x := L^{-T} x │ │ │ │ │ -312 template< int n > │ │ │ │ │ -313 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ │ -&x ) │ │ │ │ │ -314 { │ │ │ │ │ -315 for( int i = n; i > 0; --i ) │ │ │ │ │ -316 { │ │ │ │ │ -317 for( int j = i; j < n; ++j ) │ │ │ │ │ -318 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ]; │ │ │ │ │ -319 x[ i-1 ] /= L[ i-1 ][ i-1 ]; │ │ │ │ │ -320 } │ │ │ │ │ -321 } │ │ │ │ │ -322 │ │ │ │ │ -323 template< int n > │ │ │ │ │ -324 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A ) │ │ │ │ │ -325 { │ │ │ │ │ -326 // return A[0][0]*A[1][1]-A[1][0]*A[1][0]; │ │ │ │ │ -327 FieldMatrix< ctype, n, n > L; │ │ │ │ │ -328 cholesky_L( A, L ); │ │ │ │ │ -329 return detL( L ); │ │ │ │ │ -330 } │ │ │ │ │ -331 │ │ │ │ │ -332 template< int n > │ │ │ │ │ -333 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A ) │ │ │ │ │ -334 { │ │ │ │ │ -335 FieldMatrix< ctype, n, n > L; │ │ │ │ │ -336 cholesky_L( A, L ); │ │ │ │ │ -337 const ctype det = invL( L ); │ │ │ │ │ -338 LTL( L, A ); │ │ │ │ │ -339 return det; │ │ │ │ │ -340 } │ │ │ │ │ -341 │ │ │ │ │ -342 // calculate x := A^{-1} x │ │ │ │ │ -343 template< int n > │ │ │ │ │ -344 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n │ │ │ │ │ -> &x, const bool checkSingular = false ) │ │ │ │ │ -345 { │ │ │ │ │ -346 FieldMatrix< ctype, n, n > L; │ │ │ │ │ -347 const bool invertible = cholesky_L( A, L, checkSingular ); │ │ │ │ │ -348 if( ! invertible ) return invertible ; │ │ │ │ │ -349 invLx( L, x ); │ │ │ │ │ -350 invLTx( L, x ); │ │ │ │ │ -351 return invertible; │ │ │ │ │ -352 } │ │ │ │ │ -353 │ │ │ │ │ -354 template< int m, int n > │ │ │ │ │ -355 static ctype detATA ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ │ -356 { │ │ │ │ │ -357 if( m >= n ) │ │ │ │ │ -358 { │ │ │ │ │ -359 FieldMatrix< ctype, n, n > ata; │ │ │ │ │ -360 ATA_L( A, ata ); │ │ │ │ │ -361 return spdDetA( ata ); │ │ │ │ │ -362 } │ │ │ │ │ -363 else │ │ │ │ │ -364 return ctype( 0 ); │ │ │ │ │ -365 } │ │ │ │ │ -366 │ │ │ │ │ -372 template< int m, int n > │ │ │ │ │ -373 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ │ -374 { │ │ │ │ │ -375 using std::abs; │ │ │ │ │ -376 using std::sqrt; │ │ │ │ │ -377 // These special cases are here not only for speed reasons: │ │ │ │ │ -378 // The general implementation aborts if the matrix is almost singular, │ │ │ │ │ -379 // and the special implementation provide a stable way to handle that case. │ │ │ │ │ -380 if( (n == 2) && (m == 2) ) │ │ │ │ │ -381 { │ │ │ │ │ -382 // Special implementation for 2x2 matrices: faster and more stable │ │ │ │ │ -383 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] ); │ │ │ │ │ -384 } │ │ │ │ │ -385 else if( (n == 3) && (m == 3) ) │ │ │ │ │ -386 { │ │ │ │ │ -387 // Special implementation for 3x3 matrices │ │ │ │ │ -388 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ]; │ │ │ │ │ -389 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ]; │ │ │ │ │ -390 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ]; │ │ │ │ │ -391 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] ); │ │ │ │ │ -392 } │ │ │ │ │ -393 else if ( (n == 3) && (m == 2) ) │ │ │ │ │ -394 { │ │ │ │ │ -395 // Special implementation for 2x3 matrices │ │ │ │ │ -396 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ]; │ │ │ │ │ -397 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ]; │ │ │ │ │ -398 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ]; │ │ │ │ │ -399 return sqrt( v0*v0 + v1*v1 + v2*v2); │ │ │ │ │ -400 } │ │ │ │ │ -401 else if( n >= m ) │ │ │ │ │ -402 { │ │ │ │ │ -403 // General case │ │ │ │ │ -404 FieldMatrix< ctype, m, m > aat; │ │ │ │ │ -405 AAT_L( A, aat ); │ │ │ │ │ -406 return spdDetA( aat ); │ │ │ │ │ -407 } │ │ │ │ │ -408 else │ │ │ │ │ -409 return ctype( 0 ); │ │ │ │ │ -410 } │ │ │ │ │ -411 │ │ │ │ │ -412 // A^{-1}_L = (A^T A)^{-1} A^T │ │ │ │ │ -413 // => A^{-1}_L A = I │ │ │ │ │ -414 template< int m, int n > │ │ │ │ │ -415 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ -ctype, n, m > &ret ) │ │ │ │ │ -416 { │ │ │ │ │ -417 static_assert((m >= n), "Matrix has no left inverse."); │ │ │ │ │ -418 FieldMatrix< ctype, n, n > ata; │ │ │ │ │ -419 ATA_L( A, ata ); │ │ │ │ │ -420 const ctype det = spdInvA( ata ); │ │ │ │ │ -421 ATBT( ata, A, ret ); │ │ │ │ │ -422 return det; │ │ │ │ │ -423 } │ │ │ │ │ -424 │ │ │ │ │ -425 template< int m, int n > │ │ │ │ │ -426 static void leftInvAx ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ │ -FieldVector< ctype, m > &x, FieldVector< ctype, n > &y ) │ │ │ │ │ -427 { │ │ │ │ │ -428 static_assert((m >= n), "Matrix has no left inverse."); │ │ │ │ │ -429 FieldMatrix< ctype, n, n > ata; │ │ │ │ │ -430 ATx( A, x, y ); │ │ │ │ │ -431 ATA_L( A, ata ); │ │ │ │ │ -432 spdInvAx( ata, y ); │ │ │ │ │ -433 } │ │ │ │ │ -434 │ │ │ │ │ -436 template< int m, int n > │ │ │ │ │ -437 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ -ctype, n, m > &ret ) │ │ │ │ │ -438 { │ │ │ │ │ -439 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ │ -440 using std::abs; │ │ │ │ │ -441 if( (n == 2) && (m == 2) ) │ │ │ │ │ -442 { │ │ │ │ │ -443 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]); │ │ │ │ │ -444 const ctype detInv = ctype( 1 ) / det; │ │ │ │ │ -445 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv; │ │ │ │ │ -446 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv; │ │ │ │ │ -447 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv; │ │ │ │ │ -448 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv; │ │ │ │ │ -449 return abs( det ); │ │ │ │ │ -450 } │ │ │ │ │ -451 else │ │ │ │ │ -452 { │ │ │ │ │ -453 FieldMatrix< ctype, m , m > aat; │ │ │ │ │ -454 AAT_L( A, aat ); │ │ │ │ │ -455 const ctype det = spdInvA( aat ); │ │ │ │ │ -456 ATBT( A , aat , ret ); │ │ │ │ │ -457 return det; │ │ │ │ │ -458 } │ │ │ │ │ -459 } │ │ │ │ │ -460 │ │ │ │ │ -461 template< int m, int n > │ │ │ │ │ -462 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ │ -FieldVector< ctype, n > &x, FieldVector< ctype, m > &y ) │ │ │ │ │ -463 { │ │ │ │ │ -464 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ │ -465 FieldMatrix< ctype, m, m > aat; │ │ │ │ │ -466 Ax( A, x, y ); │ │ │ │ │ -467 AAT_L( A, aat ); │ │ │ │ │ -468 // check whether aat is singular and return true if non-singular │ │ │ │ │ -469 return spdInvAx( aat, y, true ); │ │ │ │ │ -470 } │ │ │ │ │ -471 }; │ │ │ │ │ -472 │ │ │ │ │ -473 } // namespace Impl │ │ │ │ │ -474 │ │ │ │ │ -475 │ │ │ │ │ -476 │ │ │ │ │ -482 template< class ct, int mydim, int cdim> │ │ │ │ │ -_4_8_3 class _A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ │ -484 { │ │ │ │ │ -485 public: │ │ │ │ │ -486 │ │ │ │ │ -_4_8_8 typedef ct _c_t_y_p_e; │ │ │ │ │ -489 │ │ │ │ │ -_4_9_1 static const int _m_y_d_i_m_e_n_s_i_o_n= mydim; │ │ │ │ │ -492 │ │ │ │ │ -_4_9_4 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ │ -495 │ │ │ │ │ -_4_9_7 typedef FieldVector< ctype, mydimension > _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -498 │ │ │ │ │ -_5_0_0 typedef FieldVector< ctype, coorddimension > _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -501 │ │ │ │ │ -_5_0_3 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ │ -504 │ │ │ │ │ -_5_0_6 typedef FieldMatrix< ctype, mydimension, coorddimension > │ │ │ │ │ -_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ -507 │ │ │ │ │ -_5_0_9 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; │ │ │ │ │ -510 │ │ │ │ │ -_5_1_2 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ │ -513 │ │ │ │ │ -_5_1_5 typedef FieldMatrix< ctype, mydimension, coorddimension > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ │ -516 │ │ │ │ │ -517 private: │ │ │ │ │ -519 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_ _> > _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ │ -520 │ │ │ │ │ -521 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_ _> _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ │ -522 │ │ │ │ │ -523 // Helper class to compute a matrix pseudo inverse │ │ │ │ │ -524 typedef Impl::FieldMatrixHelper< ct > MatrixHelper; │ │ │ │ │ -525 │ │ │ │ │ -526 public: │ │ │ │ │ -_5_2_8 _A_f_f_i_n_e_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, const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -&origin, │ │ │ │ │ -529 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ -530 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt) │ │ │ │ │ -531 { │ │ │ │ │ -532 integrationElement_ = MatrixHelper::template rightInvA< mydimension, │ │ │ │ │ -coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ ); │ │ │ │ │ -533 } │ │ │ │ │ -534 │ │ │ │ │ -_5_3_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 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &origin, │ │ │ │ │ -537 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ -538 : _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_s::general( gt ), origin, jt) │ │ │ │ │ -539 { } │ │ │ │ │ -540 │ │ │ │ │ -542 template< class CoordVector > │ │ │ │ │ -_5_4_3 _A_f_f_i_n_e_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, const CoordVector │ │ │ │ │ -&coordVector ) │ │ │ │ │ -544 : refElement_(refElement), origin_(coordVector[0]) │ │ │ │ │ -545 { │ │ │ │ │ -546 for( int i = 0; i < _m_y_d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -547 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_; │ │ │ │ │ -548 integrationElement_ = MatrixHelper::template rightInvA< mydimension, │ │ │ │ │ -coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ ); │ │ │ │ │ -549 } │ │ │ │ │ -550 │ │ │ │ │ -552 template< class CoordVector > │ │ │ │ │ -_5_5_3 _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 ) │ │ │ │ │ -554 : _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_s::general( gt ), coordVector) │ │ │ │ │ -555 { } │ │ │ │ │ -556 │ │ │ │ │ -_5_5_8 bool _a_f_f_i_n_e () const { return true; } │ │ │ │ │ -559 │ │ │ │ │ -_5_6_1 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const { return refElement_._t_y_p_e(); } │ │ │ │ │ -562 │ │ │ │ │ -_5_6_4 int _c_o_r_n_e_r_s () const { return refElement_._s_i_z_e( _m_y_d_i_m_e_n_s_i_o_n ); } │ │ │ │ │ -565 │ │ │ │ │ -_5_6_7 _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 │ │ │ │ │ -568 { │ │ │ │ │ -569 return _g_l_o_b_a_l( refElement_._p_o_s_i_t_i_o_n( i, _m_y_d_i_m_e_n_s_i_o_n ) ); │ │ │ │ │ -570 } │ │ │ │ │ -571 │ │ │ │ │ -_5_7_3 _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_._p_o_s_i_t_i_o_n( 0, │ │ │ │ │ -0 ) ); } │ │ │ │ │ -574 │ │ │ │ │ -_5_8_1 _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 │ │ │ │ │ -582 { │ │ │ │ │ -583 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l( origin_ ); │ │ │ │ │ -584 jacobianTransposed_.umtv( _l_o_c_a_l, _g_l_o_b_a_l ); │ │ │ │ │ -585 return _g_l_o_b_a_l; │ │ │ │ │ -586 } │ │ │ │ │ -587 │ │ │ │ │ -_6_0_1 _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 │ │ │ │ │ -602 { │ │ │ │ │ -603 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l; │ │ │ │ │ -604 jacobianInverseTransposed_.mtv( _g_l_o_b_a_l - origin_, _l_o_c_a_l ); │ │ │ │ │ -605 return _l_o_c_a_l; │ │ │ │ │ -606 } │ │ │ │ │ -607 │ │ │ │ │ -_6_1_8 _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 │ │ │ │ │ -619 { │ │ │ │ │ -620 return integrationElement_; │ │ │ │ │ -621 } │ │ │ │ │ -622 │ │ │ │ │ -_6_2_4 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ │ -625 { │ │ │ │ │ -626 return integrationElement_ * refElement_._v_o_l_u_m_e(); │ │ │ │ │ -627 } │ │ │ │ │ -628 │ │ │ │ │ -_6_3_5 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 │ │ │ │ │ -636 { │ │ │ │ │ -637 return jacobianTransposed_; │ │ │ │ │ -638 } │ │ │ │ │ -639 │ │ │ │ │ -_6_4_6 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 │ │ │ │ │ -647 { │ │ │ │ │ -648 return jacobianInverseTransposed_; │ │ │ │ │ -649 } │ │ │ │ │ -650 │ │ │ │ │ -_6_5_7 _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 │ │ │ │ │ -658 { │ │ │ │ │ -659 return jacobianTransposed_.transposed(); │ │ │ │ │ -660 } │ │ │ │ │ -661 │ │ │ │ │ -_6_6_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 ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -&_l_o_c_a_l) const │ │ │ │ │ -669 { │ │ │ │ │ -670 return jacobianInverseTransposed_.transposed(); │ │ │ │ │ -671 } │ │ │ │ │ -672 │ │ │ │ │ -_6_7_3 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 _A_f_f_i_n_e_G_e_o_m_e_t_r_y &geometry ) │ │ │ │ │ -674 { │ │ │ │ │ -675 return geometry.refElement_; │ │ │ │ │ -676 } │ │ │ │ │ -677 │ │ │ │ │ -678 private: │ │ │ │ │ -679 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_; │ │ │ │ │ -680 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e origin_; │ │ │ │ │ -681 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jacobianTransposed_; │ │ │ │ │ -682 _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_; │ │ │ │ │ -683 _c_t_y_p_e integrationElement_; │ │ │ │ │ -684 }; │ │ │ │ │ -685 │ │ │ │ │ -686} // namespace Dune │ │ │ │ │ -687 │ │ │ │ │ -688#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. │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ -unspecified-type ReferenceElement │ │ │ │ │ -Returns the type of reference element for the argument type T. │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:497 │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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_:_:_v_o_l_u_m_e │ │ │ │ │ -CoordinateField volume() const │ │ │ │ │ -obtain the volume 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_:_:_t_y_p_e │ │ │ │ │ -decltype(auto) type(int i, int c) const │ │ │ │ │ -obtain the type of subentity (i,c) │ │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:171 │ │ │ │ │ -_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_:_:_p_o_s_i_t_i_o_n │ │ │ │ │ -decltype(auto) position(int i, int c) const │ │ │ │ │ -position of the barycenter of entity (i,c) │ │ │ │ │ -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_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:33 │ │ │ │ │ -_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:170 │ │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ │ -Implementation of the Geometry interface for affine geometries. │ │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:484 │ │ │ │ │ -_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:543 │ │ │ │ │ -_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:536 │ │ │ │ │ -_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:497 │ │ │ │ │ -_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:561 │ │ │ │ │ -_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:491 │ │ │ │ │ -_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:528 │ │ │ │ │ -_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:503 │ │ │ │ │ -_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:668 │ │ │ │ │ -_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:673 │ │ │ │ │ -_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:553 │ │ │ │ │ -_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:618 │ │ │ │ │ -_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:515 │ │ │ │ │ -_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:512 │ │ │ │ │ -_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:646 │ │ │ │ │ -_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:506 │ │ │ │ │ -_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:567 │ │ │ │ │ -_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:564 │ │ │ │ │ -_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:601 │ │ │ │ │ -_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:509 │ │ │ │ │ -_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:494 │ │ │ │ │ -_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:581 │ │ │ │ │ -_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:573 │ │ │ │ │ -_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:657 │ │ │ │ │ -_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:488 │ │ │ │ │ -_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:500 │ │ │ │ │ -_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:558 │ │ │ │ │ -_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:635 │ │ │ │ │ -_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:624 │ │ │ │ │ -_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:126 │ │ │ │ │ +163 template< class... Args > │ │ │ │ │ +164 static auto apply ([[maybe_unused]] unsigned int topologyId, Args &&... │ │ │ │ │ +args) │ │ │ │ │ +165 { │ │ │ │ │ +166 return Operation< Topology >::apply( std::forward< Args >( args )... ); │ │ │ │ │ +167 } │ │ │ │ │ +168 }; │ │ │ │ │ +169 │ │ │ │ │ +170 } // namespace Impl │ │ │ │ │ +171#endif │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00173.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: base.cc File Reference │ │ │ │ +dune-geometry: referenceelementimplementation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,87 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros | │ │ │ │ -Functions
│ │ │ │ -
base.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
referenceelementimplementation.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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

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

Go to the source code of this file.

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

│ │ │ │ -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...
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/geometry/referenceelementimplementation.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -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,56 +1,17 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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> │ │ │ │ │ -_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_._._. │ │ │ │ │ -  │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +referenceelementimplementation.cc File Reference │ │ │ │ │ +#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_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_:_:_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. │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ │   │ │ │ │ │ -********** 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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: pyramidtriangulation.cc File Reference │ │ │ │ +dune-geometry: affinegeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,86 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros | │ │ │ │ -Functions
│ │ │ │ -
pyramidtriangulation.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
affinegeometry.hh 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"
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ +
#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::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::AffineGeometry< ct, mydim, cdim >
 Implementation of the Geometry interface for affine geometries. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -

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

│ │ │ │ -Macros

#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<int dimension, class CoordType >
FieldVector< CoordType, dimension > Dune::RefinementImp::PyramidTriangulation::transformCoordinate (FieldVector< CoordType, dimension > point)
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC

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

Detailed Description

│ │ │ │ +

An implementation of the Geometry interface for affine geometries.

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,59 +1,29 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +affinegeometry.hh File Reference │ │ │ │ │ +An implementation of the Geometry interface for affine geometries. _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> │ │ │ │ │ -#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_:_:_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   _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) │ │ │ │ │ -  │ │ │ │ │ -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 │ │ │ │ │ -  │ │ │ │ │ -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) │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ │   │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPYYRRAAMMIIDDTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +An implementation of the Geometry interface for affine geometries. │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: pyramidtriangulation.cc Source File │ │ │ │ +dune-geometry: affinegeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,523 +70,693 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pyramidtriangulation.cc
│ │ │ │ +
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 (C) DUNE 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_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ │
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 {
│ │ │ │ +
13#include <cmath>
│ │ │ │ +
14
│ │ │ │ +
15#include <dune/common/fmatrix.hh>
│ │ │ │ +
16#include <dune/common/fvector.hh>
│ │ │ │ +
17
│ │ │ │ +
18#include <dune/geometry/type.hh>
│ │ │ │ +
19
│ │ │ │ +
│ │ │ │ +
20namespace Dune
│ │ │ │ +
21{
│ │ │ │ +
22
│ │ │ │ +
23 // External Forward Declarations
│ │ │ │ +
24 // -----------------------------
│ │ │ │ +
25
│ │ │ │
│ │ │ │ -
26 namespace PyramidTriangulation
│ │ │ │ -
27 {
│ │ │ │ -
28 // ////////////
│ │ │ │ -
29 //
│ │ │ │ -
30 // Utilities
│ │ │ │ -
31 //
│ │ │ │ -
32
│ │ │ │ - │ │ │ │ - │ │ │ │ -
35
│ │ │ │ -
36 // ////////////////////////////////////
│ │ │ │ -
37 //
│ │ │ │ -
38 // Refine a pyramid with simplices
│ │ │ │ -
39 //
│ │ │ │ +
26 namespace Geo
│ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
29 template< typename Implementation >
│ │ │ │ +
30 class ReferenceElement;
│ │ │ │ +
31
│ │ │ │ +
32 template< class ctype, int dim >
│ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
35 template< class ctype, int dim >
│ │ │ │ +
36 struct ReferenceElements;
│ │ │ │ +
37
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
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;
│ │ │ │ +
41 namespace Impl
│ │ │ │ +
42 {
│ │ │ │ +
43
│ │ │ │ +
44 // FieldMatrixHelper
│ │ │ │ +
45 // -----------------
│ │ │ │ +
46
│ │ │ │ +
47 template< class ct >
│ │ │ │ +
48 struct FieldMatrixHelper
│ │ │ │ +
49 {
│ │ │ │ +
50 typedef ct ctype;
│ │ │ │ +
51
│ │ │ │ +
52 template< int m, int n >
│ │ │ │ +
53 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &ret )
│ │ │ │ +
54 {
│ │ │ │ +
55 for( int i = 0; i < m; ++i )
│ │ │ │ +
56 {
│ │ │ │ +
57 ret[ i ] = ctype( 0 );
│ │ │ │ +
58 for( int j = 0; j < n; ++j )
│ │ │ │ +
59 ret[ i ] += A[ i ][ j ] * x[ j ];
│ │ │ │ +
60 }
│ │ │ │ +
61 }
│ │ │ │ +
62
│ │ │ │ +
63 template< int m, int n >
│ │ │ │ +
64 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &ret )
│ │ │ │ +
65 {
│ │ │ │ +
66 for( int i = 0; i < n; ++i )
│ │ │ │ +
67 {
│ │ │ │ +
68 ret[ i ] = ctype( 0 );
│ │ │ │ +
69 for( int j = 0; j < m; ++j )
│ │ │ │ +
70 ret[ i ] += A[ j ][ i ] * x[ j ];
│ │ │ │ +
71 }
│ │ │ │ +
72 }
│ │ │ │
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
│ │ │ │ - │ │ │ │ -
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)
│ │ │ │ +
74 template< int m, int n, int p >
│ │ │ │ +
75 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret )
│ │ │ │ +
76 {
│ │ │ │ +
77 for( int i = 0; i < m; ++i )
│ │ │ │ +
78 {
│ │ │ │ +
79 for( int j = 0; j < p; ++j )
│ │ │ │ +
80 {
│ │ │ │ +
81 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
82 for( int k = 0; k < n; ++k )
│ │ │ │ +
83 ret[ i ][ j ] += A[ i ][ k ] * B[ k ][ j ];
│ │ │ │ +
84 }
│ │ │ │ +
85 }
│ │ │ │ +
86 }
│ │ │ │ +
87
│ │ │ │ +
88 template< int m, int n, int p >
│ │ │ │ +
89 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret )
│ │ │ │ +
90 {
│ │ │ │ +
91 for( int i = 0; i < n; ++i )
│ │ │ │ +
92 {
│ │ │ │ +
93 for( int j = 0; j < p; ++j )
│ │ │ │ +
94 {
│ │ │ │ +
95 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
96 for( int k = 0; k < m; ++k )
│ │ │ │ +
97 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ];
│ │ │ │ +
98 }
│ │ │ │ +
99 }
│ │ │ │ +
100 }
│ │ │ │ +
101
│ │ │ │ +
102 template< int m, int n >
│ │ │ │ +
103 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ +
104 {
│ │ │ │ +
105 for( int i = 0; i < n; ++i )
│ │ │ │ +
106 {
│ │ │ │ +
107 for( int j = 0; j <= i; ++j )
│ │ │ │ +
108 {
│ │ │ │ +
109 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
110 for( int k = 0; k < m; ++k )
│ │ │ │ +
111 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ];
│ │ │ │ +
112 }
│ │ │ │ +
113 }
│ │ │ │ +
114 }
│ │ │ │ +
115
│ │ │ │ +
116 template< int m, int n >
│ │ │ │ +
117 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ │
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:
│ │ │ │ - │ │ │ │ -
165 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
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;
│ │ │ │ +
119 for( int i = 0; i < n; ++i )
│ │ │ │ +
120 {
│ │ │ │ +
121 for( int j = 0; j <= i; ++j )
│ │ │ │ +
122 {
│ │ │ │ +
123 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
124 for( int k = 0; k < m; ++k )
│ │ │ │ +
125 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ];
│ │ │ │ +
126 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ +
127 }
│ │ │ │ +
128
│ │ │ │ +
129 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ +
130 for( int k = 0; k < m; ++k )
│ │ │ │ +
131 ret[ i ][ i ] += A[ k ][ i ] * A[ k ][ i ];
│ │ │ │ +
132 }
│ │ │ │ +
133 }
│ │ │ │ +
134
│ │ │ │ +
135 template< int m, int n >
│ │ │ │ +
136 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ │ +
137 {
│ │ │ │ +
138 /*
│ │ │ │ +
139 if (m==2) {
│ │ │ │ +
140 ret[0][0] = A[0]*A[0];
│ │ │ │ +
141 ret[1][1] = A[1]*A[1];
│ │ │ │ +
142 ret[1][0] = A[0]*A[1];
│ │ │ │ +
143 }
│ │ │ │ +
144 else
│ │ │ │ +
145 */
│ │ │ │ +
146 for( int i = 0; i < m; ++i )
│ │ │ │ +
147 {
│ │ │ │ +
148 for( int j = 0; j <= i; ++j )
│ │ │ │ +
149 {
│ │ │ │ +
150 ctype &retij = ret[ i ][ j ];
│ │ │ │ +
151 retij = A[ i ][ 0 ] * A[ j ][ 0 ];
│ │ │ │ +
152 for( int k = 1; k < n; ++k )
│ │ │ │ +
153 retij += A[ i ][ k ] * A[ j ][ k ];
│ │ │ │ +
154 }
│ │ │ │ +
155 }
│ │ │ │ +
156 }
│ │ │ │ +
157
│ │ │ │ +
158 template< int m, int n >
│ │ │ │ +
159 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ │ +
160 {
│ │ │ │ +
161 for( int i = 0; i < m; ++i )
│ │ │ │ +
162 {
│ │ │ │ +
163 for( int j = 0; j < i; ++j )
│ │ │ │ +
164 {
│ │ │ │ +
165 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
166 for( int k = 0; k < n; ++k )
│ │ │ │ +
167 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ];
│ │ │ │ +
168 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ +
169 }
│ │ │ │ +
170 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ +
171 for( int k = 0; k < n; ++k )
│ │ │ │ +
172 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ];
│ │ │ │ +
173 }
│ │ │ │ +
174 }
│ │ │ │
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),
│ │ │ │ -
193 backend(BackendRefinement::vBegin(nIntervals_)),
│ │ │ │ -
194 backendEnd(BackendRefinement::vEnd(nIntervals_))
│ │ │ │ -
195 {
│ │ │ │ -
196 if (end)
│ │ │ │ -
197 kuhnIndex = nKuhnSimplices;
│ │ │ │ -
198 }
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
200 template<int dimension, class CoordType>
│ │ │ │ -
201 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
204 {
│ │ │ │ -
205 ++backend;
│ │ │ │ -
206 if(backend == backendEnd)
│ │ │ │ -
207 {
│ │ │ │ -
208 backend = BackendRefinement::vBegin(nIntervals_);
│ │ │ │ -
209 ++kuhnIndex;
│ │ │ │ -
210 }
│ │ │ │ -
211 }
│ │ │ │ -
│ │ │ │ -
212
│ │ │ │ -
213 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
216 coords() const
│ │ │ │ -
217 {
│ │ │ │ -
218 return transformCoordinate(referenceToKuhn(backend.coords(),
│ │ │ │ -
219 getPermutation<dimension>(kuhnIndex)));
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
222 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
225 {
│ │ │ │ -
226 std::vector<CoordVector> corners(1);
│ │ │ │ -
227 corners[0] = referenceToKuhn(backend.coords(), getPermutation<dimension>(kuhnIndex));
│ │ │ │ -
228 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230
│ │ │ │ -
231 template<int dimension, class CoordType>
│ │ │ │ -
232 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
234 index() const
│ │ │ │ -
235 {
│ │ │ │ -
236 return kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.index();
│ │ │ │ -
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);
│ │ │ │ +
176 template< int n >
│ │ │ │ +
177 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ │ +
178 {
│ │ │ │ +
179 for( int i = 0; i < n; ++i )
│ │ │ │ +
180 {
│ │ │ │ +
181 ret[ i ] = ctype( 0 );
│ │ │ │ +
182 for( int j = 0; j <= i; ++j )
│ │ │ │ +
183 ret[ i ] += L[ i ][ j ] * x[ j ];
│ │ │ │ +
184 }
│ │ │ │ +
185 }
│ │ │ │ +
186
│ │ │ │ +
187 template< int n >
│ │ │ │ +
188 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ │ +
189 {
│ │ │ │ +
190 for( int i = 0; i < n; ++i )
│ │ │ │ +
191 {
│ │ │ │ +
192 ret[ i ] = ctype( 0 );
│ │ │ │ +
193 for( int j = i; j < n; ++j )
│ │ │ │ +
194 ret[ i ] += L[ j ][ i ] * x[ j ];
│ │ │ │ +
195 }
│ │ │ │ +
196 }
│ │ │ │ +
197
│ │ │ │ +
198 template< int n >
│ │ │ │ +
199 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ +
200 {
│ │ │ │ +
201 for( int i = 0; i < n; ++i )
│ │ │ │ +
202 {
│ │ │ │ +
203 for( int j = 0; j < i; ++j )
│ │ │ │ +
204 {
│ │ │ │ +
205 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
206 for( int k = i; k < n; ++k )
│ │ │ │ +
207 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ];
│ │ │ │ +
208 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ +
209 }
│ │ │ │ +
210 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ +
211 for( int k = i; k < n; ++k )
│ │ │ │ +
212 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ];
│ │ │ │ +
213 }
│ │ │ │ +
214 }
│ │ │ │ +
215
│ │ │ │ +
216 template< int n >
│ │ │ │ +
217 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ │ +
218 {
│ │ │ │ +
219 for( int i = 0; i < n; ++i )
│ │ │ │ +
220 {
│ │ │ │ +
221 for( int j = 0; j < i; ++j )
│ │ │ │ +
222 {
│ │ │ │ +
223 ret[ i ][ j ] = ctype( 0 );
│ │ │ │ +
224 for( int k = 0; k <= j; ++k )
│ │ │ │ +
225 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ];
│ │ │ │ +
226 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ │ +
227 }
│ │ │ │ +
228 ret[ i ][ i ] = ctype( 0 );
│ │ │ │ +
229 for( int k = 0; k <= i; ++k )
│ │ │ │ +
230 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ];
│ │ │ │ +
231 }
│ │ │ │ +
232 }
│ │ │ │ +
233
│ │ │ │ +
234 template< int n >
│ │ │ │ +
235 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< ctype, n, n > &ret, const bool checkSingular = false )
│ │ │ │ +
236 {
│ │ │ │ +
237 using std::sqrt;
│ │ │ │ +
238 for( int i = 0; i < n; ++i )
│ │ │ │ +
239 {
│ │ │ │ +
240 ctype &rii = ret[ i ][ i ];
│ │ │ │ +
241
│ │ │ │ +
242 ctype xDiag = A[ i ][ i ];
│ │ │ │ +
243 for( int j = 0; j < i; ++j )
│ │ │ │ +
244 xDiag -= ret[ i ][ j ] * ret[ i ][ j ];
│ │ │ │ +
245
│ │ │ │ +
246 // in some cases A can be singular, e.g. when checking local for
│ │ │ │ +
247 // outside points during checkInside
│ │ │ │ +
248 if( checkSingular && ! ( xDiag > ctype( 0 )) )
│ │ │ │ +
249 return false ;
│ │ │ │
250
│ │ │ │ -
251 void increment();
│ │ │ │ -
252
│ │ │ │ -
253 IndexVector vertexIndices() const;
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ -
264 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ │ -
265 constexpr static int nKuhnSimplices = 2;
│ │ │ │ -
266
│ │ │ │ - │ │ │ │ +
251 // otherwise this should be true always
│ │ │ │ +
252 assert( xDiag > ctype( 0 ) );
│ │ │ │ +
253 rii = sqrt( xDiag );
│ │ │ │ +
254
│ │ │ │ +
255 ctype invrii = ctype( 1 ) / rii;
│ │ │ │ +
256 for( int k = i+1; k < n; ++k )
│ │ │ │ +
257 {
│ │ │ │ +
258 ctype x = A[ k ][ i ];
│ │ │ │ +
259 for( int j = 0; j < i; ++j )
│ │ │ │ +
260 x -= ret[ i ][ j ] * ret[ k ][ j ];
│ │ │ │ +
261 ret[ k ][ i ] = invrii * x;
│ │ │ │ +
262 }
│ │ │ │ +
263 }
│ │ │ │ +
264
│ │ │ │ +
265 // return true for meaning A is non-singular
│ │ │ │ +
266 return true;
│ │ │ │ +
267 }
│ │ │ │
268
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
272 };
│ │ │ │ -
│ │ │ │ -
273
│ │ │ │ -
274 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
276 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ │ -
277 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ │ -
278 backend(BackendRefinement::eBegin(nIntervals_)),
│ │ │ │ -
279 backendEnd(BackendRefinement::eEnd(nIntervals_))
│ │ │ │ +
269 template< int n >
│ │ │ │ +
270 static ctype detL ( const FieldMatrix< ctype, n, n > &L )
│ │ │ │ +
271 {
│ │ │ │ +
272 ctype det( 1 );
│ │ │ │ +
273 for( int i = 0; i < n; ++i )
│ │ │ │ +
274 det *= L[ i ][ i ];
│ │ │ │ +
275 return det;
│ │ │ │ +
276 }
│ │ │ │ +
277
│ │ │ │ +
278 template< int n >
│ │ │ │ +
279 static ctype invL ( FieldMatrix< ctype, n, n > &L )
│ │ │ │
280 {
│ │ │ │ -
281 if (end)
│ │ │ │ -
282 kuhnIndex = nKuhnSimplices;
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
284
│ │ │ │ -
285 template<int dimension, class CoordType>
│ │ │ │ -
286 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
289 {
│ │ │ │ -
290 ++backend;
│ │ │ │ -
291 if (backend == backendEnd)
│ │ │ │ -
292 {
│ │ │ │ -
293 backend = BackendRefinement::eBegin(nIntervals_);
│ │ │ │ -
294 ++kuhnIndex;
│ │ │ │ +
281 ctype det( 1 );
│ │ │ │ +
282 for( int i = 0; i < n; ++i )
│ │ │ │ +
283 {
│ │ │ │ +
284 ctype &lii = L[ i ][ i ];
│ │ │ │ +
285 det *= lii;
│ │ │ │ +
286 lii = ctype( 1 ) / lii;
│ │ │ │ +
287 for( int j = 0; j < i; ++j )
│ │ │ │ +
288 {
│ │ │ │ +
289 ctype &lij = L[ i ][ j ];
│ │ │ │ +
290 ctype x = lij * L[ j ][ j ];
│ │ │ │ +
291 for( int k = j+1; k < i; ++k )
│ │ │ │ +
292 x += L[ i ][ k ] * L[ k ][ j ];
│ │ │ │ +
293 lij = (-lii) * x;
│ │ │ │ +
294 }
│ │ │ │
295 }
│ │ │ │ -
296 }
│ │ │ │ -
│ │ │ │ -
297
│ │ │ │ -
298 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
301 vertexIndices() const
│ │ │ │ -
302 {
│ │ │ │ -
303 IndexVector indices = backend.vertexIndices();
│ │ │ │ -
304
│ │ │ │ -
305 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_);
│ │ │ │ -
306 indices += base;
│ │ │ │ -
307
│ │ │ │ -
308 return indices;
│ │ │ │ +
296 return det;
│ │ │ │ +
297 }
│ │ │ │ +
298
│ │ │ │ +
299 // calculates x := L^{-1} x
│ │ │ │ +
300 template< int n >
│ │ │ │ +
301 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ │ +
302 {
│ │ │ │ +
303 for( int i = 0; i < n; ++i )
│ │ │ │ +
304 {
│ │ │ │ +
305 for( int j = 0; j < i; ++j )
│ │ │ │ +
306 x[ i ] -= L[ i ][ j ] * x[ j ];
│ │ │ │ +
307 x[ i ] /= L[ i ][ i ];
│ │ │ │ +
308 }
│ │ │ │
309 }
│ │ │ │ -
│ │ │ │
310
│ │ │ │ -
311 template<int dimension, class CoordType>
│ │ │ │ -
312 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
314 index() const
│ │ │ │ -
315 {
│ │ │ │ -
316 return kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.index();
│ │ │ │ -
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 {
│ │ │ │ -
347 return transformCoordinate(referenceToKuhn(local,
│ │ │ │ -
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
│ │ │ │ -
355 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ -
356 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ -
357 {
│ │ │ │ -
358 public:
│ │ │ │ - │ │ │ │ -
360 typedef SubEntityIterator This;
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
311 // calculates x := L^{-T} x
│ │ │ │ +
312 template< int n >
│ │ │ │ +
313 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ │ +
314 {
│ │ │ │ +
315 for( int i = n; i > 0; --i )
│ │ │ │ +
316 {
│ │ │ │ +
317 for( int j = i; j < n; ++j )
│ │ │ │ +
318 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ];
│ │ │ │ +
319 x[ i-1 ] /= L[ i-1 ][ i-1 ];
│ │ │ │ +
320 }
│ │ │ │ +
321 }
│ │ │ │ +
322
│ │ │ │ +
323 template< int n >
│ │ │ │ +
324 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A )
│ │ │ │ +
325 {
│ │ │ │ +
326 // return A[0][0]*A[1][1]-A[1][0]*A[1][0];
│ │ │ │ +
327 FieldMatrix< ctype, n, n > L;
│ │ │ │ +
328 cholesky_L( A, L );
│ │ │ │ +
329 return detL( L );
│ │ │ │ +
330 }
│ │ │ │ +
331
│ │ │ │ +
332 template< int n >
│ │ │ │ +
333 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A )
│ │ │ │ +
334 {
│ │ │ │ +
335 FieldMatrix< ctype, n, n > L;
│ │ │ │ +
336 cholesky_L( A, L );
│ │ │ │ +
337 const ctype det = invL( L );
│ │ │ │ +
338 LTL( L, A );
│ │ │ │ +
339 return det;
│ │ │ │ +
340 }
│ │ │ │ +
341
│ │ │ │ +
342 // calculate x := A^{-1} x
│ │ │ │ +
343 template< int n >
│ │ │ │ +
344 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n > &x, const bool checkSingular = false )
│ │ │ │ +
345 {
│ │ │ │ +
346 FieldMatrix< ctype, n, n > L;
│ │ │ │ +
347 const bool invertible = cholesky_L( A, L, checkSingular );
│ │ │ │ +
348 if( ! invertible ) return invertible ;
│ │ │ │ +
349 invLx( L, x );
│ │ │ │ +
350 invLTx( L, x );
│ │ │ │ +
351 return invertible;
│ │ │ │ +
352 }
│ │ │ │ +
353
│ │ │ │ +
354 template< int m, int n >
│ │ │ │ +
355 static ctype detATA ( const FieldMatrix< ctype, m, n > &A )
│ │ │ │ +
356 {
│ │ │ │ +
357 if( m >= n )
│ │ │ │ +
358 {
│ │ │ │ +
359 FieldMatrix< ctype, n, n > ata;
│ │ │ │ +
360 ATA_L( A, ata );
│ │ │ │ +
361 return spdDetA( ata );
│ │ │ │ +
362 }
│ │ │ │ +
363 else
│ │ │ │ +
364 return ctype( 0 );
│ │ │ │ +
365 }
│ │ │ │ +
366
│ │ │ │ +
372 template< int m, int n >
│ │ │ │ +
373 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A )
│ │ │ │ +
374 {
│ │ │ │ +
375 using std::abs;
│ │ │ │ +
376 using std::sqrt;
│ │ │ │ +
377 // These special cases are here not only for speed reasons:
│ │ │ │ +
378 // The general implementation aborts if the matrix is almost singular,
│ │ │ │ +
379 // and the special implementation provide a stable way to handle that case.
│ │ │ │ +
380 if( (n == 2) && (m == 2) )
│ │ │ │ +
381 {
│ │ │ │ +
382 // Special implementation for 2x2 matrices: faster and more stable
│ │ │ │ +
383 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] );
│ │ │ │ +
384 }
│ │ │ │ +
385 else if( (n == 3) && (m == 3) )
│ │ │ │ +
386 {
│ │ │ │ +
387 // Special implementation for 3x3 matrices
│ │ │ │ +
388 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ];
│ │ │ │ +
389 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ];
│ │ │ │ +
390 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ];
│ │ │ │ +
391 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] );
│ │ │ │ +
392 }
│ │ │ │ +
393 else if ( (n == 3) && (m == 2) )
│ │ │ │ +
394 {
│ │ │ │ +
395 // Special implementation for 2x3 matrices
│ │ │ │ +
396 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ];
│ │ │ │ +
397 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ];
│ │ │ │ +
398 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ];
│ │ │ │ +
399 return sqrt( v0*v0 + v1*v1 + v2*v2);
│ │ │ │ +
400 }
│ │ │ │ +
401 else if( n >= m )
│ │ │ │ +
402 {
│ │ │ │ +
403 // General case
│ │ │ │ +
404 FieldMatrix< ctype, m, m > aat;
│ │ │ │ +
405 AAT_L( A, aat );
│ │ │ │ +
406 return spdDetA( aat );
│ │ │ │ +
407 }
│ │ │ │ +
408 else
│ │ │ │ +
409 return ctype( 0 );
│ │ │ │ +
410 }
│ │ │ │
411
│ │ │ │ -
412 } // namespace RefinementImp
│ │ │ │ -
413} // namespace Dune
│ │ │ │ -
414
│ │ │ │ -
415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
412 // A^{-1}_L = (A^T A)^{-1} A^T
│ │ │ │ +
413 // => A^{-1}_L A = I
│ │ │ │ +
414 template< int m, int n >
│ │ │ │ +
415 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ │ +
416 {
│ │ │ │ +
417 static_assert((m >= n), "Matrix has no left inverse.");
│ │ │ │ +
418 FieldMatrix< ctype, n, n > ata;
│ │ │ │ +
419 ATA_L( A, ata );
│ │ │ │ +
420 const ctype det = spdInvA( ata );
│ │ │ │ +
421 ATBT( ata, A, ret );
│ │ │ │ +
422 return det;
│ │ │ │ +
423 }
│ │ │ │ +
424
│ │ │ │ +
425 template< int m, int n >
│ │ │ │ +
426 static void leftInvAx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &y )
│ │ │ │ +
427 {
│ │ │ │ +
428 static_assert((m >= n), "Matrix has no left inverse.");
│ │ │ │ +
429 FieldMatrix< ctype, n, n > ata;
│ │ │ │ +
430 ATx( A, x, y );
│ │ │ │ +
431 ATA_L( A, ata );
│ │ │ │ +
432 spdInvAx( ata, y );
│ │ │ │ +
433 }
│ │ │ │ +
434
│ │ │ │ +
436 template< int m, int n >
│ │ │ │ +
437 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ │ +
438 {
│ │ │ │ +
439 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ │ +
440 using std::abs;
│ │ │ │ +
441 if( (n == 2) && (m == 2) )
│ │ │ │ +
442 {
│ │ │ │ +
443 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ │ +
444 const ctype detInv = ctype( 1 ) / det;
│ │ │ │ +
445 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ │ +
446 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ │ +
447 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ │ +
448 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ │ +
449 return abs( det );
│ │ │ │ +
450 }
│ │ │ │ +
451 else
│ │ │ │ +
452 {
│ │ │ │ +
453 FieldMatrix< ctype, m , m > aat;
│ │ │ │ +
454 AAT_L( A, aat );
│ │ │ │ +
455 const ctype det = spdInvA( aat );
│ │ │ │ +
456 ATBT( A , aat , ret );
│ │ │ │ +
457 return det;
│ │ │ │ +
458 }
│ │ │ │ +
459 }
│ │ │ │ +
460
│ │ │ │ +
461 template< int m, int n >
│ │ │ │ +
462 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &y )
│ │ │ │ +
463 {
│ │ │ │ +
464 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ │ +
465 FieldMatrix< ctype, m, m > aat;
│ │ │ │ +
466 Ax( A, x, y );
│ │ │ │ +
467 AAT_L( A, aat );
│ │ │ │ +
468 // check whether aat is singular and return true if non-singular
│ │ │ │ +
469 return spdInvAx( aat, y, true );
│ │ │ │ +
470 }
│ │ │ │ +
471 };
│ │ │ │ +
472
│ │ │ │ +
473 } // namespace Impl
│ │ │ │ +
474
│ │ │ │ +
475
│ │ │ │ +
476
│ │ │ │ +
482 template< class ct, int mydim, int cdim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
484 {
│ │ │ │ +
485 public:
│ │ │ │ +
486
│ │ │ │ +
488 typedef ct ctype;
│ │ │ │ +
489
│ │ │ │ +
491 static const int mydimension= mydim;
│ │ │ │ +
492
│ │ │ │ +
494 static const int coorddimension = cdim;
│ │ │ │ +
495
│ │ │ │ +
497 typedef FieldVector< ctype, mydimension > LocalCoordinate;
│ │ │ │ +
498
│ │ │ │ +
500 typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
│ │ │ │ +
501
│ │ │ │ +
503 typedef ctype Volume;
│ │ │ │ +
504
│ │ │ │ +
506 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
│ │ │ │ +
507
│ │ │ │ +
509 typedef FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed;
│ │ │ │ +
510
│ │ │ │ +
512 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ │ +
513
│ │ │ │ +
515 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ │ +
516
│ │ │ │ +
517 private:
│ │ │ │ + │ │ │ │ +
520
│ │ │ │ + │ │ │ │ +
522
│ │ │ │ +
523 // Helper class to compute a matrix pseudo inverse
│ │ │ │ +
524 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ │ +
525
│ │ │ │ +
526 public:
│ │ │ │ +
│ │ │ │ +
528 AffineGeometry ( const ReferenceElement &refElement, const GlobalCoordinate &origin,
│ │ │ │ +
529 const JacobianTransposed &jt )
│ │ │ │ +
530 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt)
│ │ │ │ +
531 {
│ │ │ │ +
532 integrationElement_ = MatrixHelper::template rightInvA< mydimension, coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ │ +
533 }
│ │ │ │ +
│ │ │ │ +
534
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
537 const JacobianTransposed &jt )
│ │ │ │ +
538 : AffineGeometry(ReferenceElements::general( gt ), origin, jt)
│ │ │ │ +
539 { }
│ │ │ │ +
│ │ │ │ +
540
│ │ │ │ +
542 template< class CoordVector >
│ │ │ │ +
│ │ │ │ +
543 AffineGeometry ( const ReferenceElement &refElement, const CoordVector &coordVector )
│ │ │ │ +
544 : refElement_(refElement), origin_(coordVector[0])
│ │ │ │ +
545 {
│ │ │ │ +
546 for( int i = 0; i < mydimension; ++i )
│ │ │ │ +
547 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_;
│ │ │ │ +
548 integrationElement_ = MatrixHelper::template rightInvA< mydimension, coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ │ +
549 }
│ │ │ │ +
│ │ │ │ +
550
│ │ │ │ +
552 template< class CoordVector >
│ │ │ │ +
│ │ │ │ +
553 AffineGeometry ( Dune::GeometryType gt, const CoordVector &coordVector )
│ │ │ │ +
554 : AffineGeometry(ReferenceElements::general( gt ), coordVector)
│ │ │ │ +
555 { }
│ │ │ │ +
│ │ │ │ +
556
│ │ │ │ +
558 bool affine () const { return true; }
│ │ │ │ +
559
│ │ │ │ +
561 Dune::GeometryType type () const { return refElement_.type(); }
│ │ │ │ +
562
│ │ │ │ +
564 int corners () const { return refElement_.size( mydimension ); }
│ │ │ │ +
565
│ │ │ │ +
│ │ │ │ +
567 GlobalCoordinate corner ( int i ) const
│ │ │ │ +
568 {
│ │ │ │ +
569 return global( refElement_.position( i, mydimension ) );
│ │ │ │ +
570 }
│ │ │ │ +
│ │ │ │ +
571
│ │ │ │ +
573 GlobalCoordinate center () const { return global( refElement_.position( 0, 0 ) ); }
│ │ │ │ +
574
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
582 {
│ │ │ │ +
583 GlobalCoordinate global( origin_ );
│ │ │ │ +
584 jacobianTransposed_.umtv( local, global );
│ │ │ │ +
585 return global;
│ │ │ │ +
586 }
│ │ │ │ +
│ │ │ │ +
587
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
602 {
│ │ │ │ + │ │ │ │ +
604 jacobianInverseTransposed_.mtv( global - origin_, local );
│ │ │ │ +
605 return local;
│ │ │ │ +
606 }
│ │ │ │ +
│ │ │ │ +
607
│ │ │ │ +
│ │ │ │ +
618 ctype integrationElement ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ +
619 {
│ │ │ │ +
620 return integrationElement_;
│ │ │ │ +
621 }
│ │ │ │ +
│ │ │ │ +
622
│ │ │ │ +
│ │ │ │ +
624 Volume volume () const
│ │ │ │ +
625 {
│ │ │ │ +
626 return integrationElement_ * refElement_.volume();
│ │ │ │ +
627 }
│ │ │ │ +
│ │ │ │ +
628
│ │ │ │ +
│ │ │ │ +
635 const JacobianTransposed &jacobianTransposed ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ +
636 {
│ │ │ │ +
637 return jacobianTransposed_;
│ │ │ │ +
638 }
│ │ │ │ +
│ │ │ │ +
639
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
647 {
│ │ │ │ +
648 return jacobianInverseTransposed_;
│ │ │ │ +
649 }
│ │ │ │ +
│ │ │ │ +
650
│ │ │ │ +
│ │ │ │ +
657 Jacobian jacobian ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ +
658 {
│ │ │ │ +
659 return jacobianTransposed_.transposed();
│ │ │ │ +
660 }
│ │ │ │ +
│ │ │ │ +
661
│ │ │ │ +
│ │ │ │ +
668 JacobianInverse jacobianInverse ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ │ +
669 {
│ │ │ │ +
670 return jacobianInverseTransposed_.transposed();
│ │ │ │ +
671 }
│ │ │ │ +
│ │ │ │ +
672
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
674 {
│ │ │ │ +
675 return geometry.refElement_;
│ │ │ │ +
676 }
│ │ │ │ +
│ │ │ │ +
677
│ │ │ │ +
678 private:
│ │ │ │ +
679 ReferenceElement refElement_;
│ │ │ │ +
680 GlobalCoordinate origin_;
│ │ │ │ +
681 JacobianTransposed jacobianTransposed_;
│ │ │ │ +
682 JacobianInverseTransposed jacobianInverseTransposed_;
│ │ │ │ +
683 ctype integrationElement_;
│ │ │ │ +
684 };
│ │ │ │ +
│ │ │ │ +
685
│ │ │ │ +
686} // namespace Dune
│ │ │ │ +
│ │ │ │ +
687
│ │ │ │ +
688#endif // #ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
unspecified-type ReferenceElement
Returns the type of reference element for the argument type T.
Definition referenceelements.hh:497
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition pyramidtriangulation.cc:51
│ │ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:336
│ │ │ │ -
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:394
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Refinement::CoordVector CoordVector
Definition pyramidtriangulation.cc:246
│ │ │ │ - │ │ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition pyramidtriangulation.cc:247
│ │ │ │ -
Refinement::IndexVector IndexVector
Definition pyramidtriangulation.cc:245
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
SubEntityIterator This
Definition pyramidtriangulation.cc:360
│ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:359
│ │ │ │ - │ │ │ │ +
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ │ +
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:241
│ │ │ │ +
decltype(auto) type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:171
│ │ │ │ +
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ │ +
decltype(auto) position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:203
│ │ │ │ +
Definition affinegeometry.hh:33
│ │ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ +
Implementation of the Geometry interface for affine geometries.
Definition affinegeometry.hh:484
│ │ │ │ +
AffineGeometry(const ReferenceElement &refElement, const CoordVector &coordVector)
Create affine geometry from reference element and a vector of vertex coordinates.
Definition affinegeometry.hh:543
│ │ │ │ +
AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from GeometryType, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:536
│ │ │ │ +
FieldVector< ctype, mydimension > LocalCoordinate
Type for local coordinate vector.
Definition affinegeometry.hh:497
│ │ │ │ +
Dune::GeometryType type() const
Obtain the type of the reference element.
Definition affinegeometry.hh:561
│ │ │ │ +
static const int mydimension
Dimension of the geometry.
Definition affinegeometry.hh:491
│ │ │ │ +
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:528
│ │ │ │ +
ctype Volume
Type used for volume.
Definition affinegeometry.hh:503
│ │ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition affinegeometry.hh:668
│ │ │ │ +
friend ReferenceElement referenceElement(const AffineGeometry &geometry)
Definition affinegeometry.hh:673
│ │ │ │ +
AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector)
Create affine geometry from GeometryType and a vector of vertex coordinates.
Definition affinegeometry.hh:553
│ │ │ │ +
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition affinegeometry.hh:618
│ │ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
Definition affinegeometry.hh:515
│ │ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Type for the Jacobian matrix.
Definition affinegeometry.hh:512
│ │ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition affinegeometry.hh:646
│ │ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Type for the transposed Jacobian matrix.
Definition affinegeometry.hh:506
│ │ │ │ +
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition affinegeometry.hh:567
│ │ │ │ +
int corners() const
Obtain number of corners of the corresponding reference element.
Definition affinegeometry.hh:564
│ │ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse mapping.
Definition affinegeometry.hh:601
│ │ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Type for the transposed inverse Jacobian matrix.
Definition affinegeometry.hh:509
│ │ │ │ +
static const int coorddimension
Dimension of the world space.
Definition affinegeometry.hh:494
│ │ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the mapping.
Definition affinegeometry.hh:581
│ │ │ │ +
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition affinegeometry.hh:573
│ │ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition affinegeometry.hh:657
│ │ │ │ +
ct ctype
Type used for coordinates.
Definition affinegeometry.hh:488
│ │ │ │ +
FieldVector< ctype, coorddimension > GlobalCoordinate
Type for coordinate vector in world space.
Definition affinegeometry.hh:500
│ │ │ │ +
bool affine() const
Always true: this is an affine geometry.
Definition affinegeometry.hh:558
│ │ │ │ +
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition affinegeometry.hh:635
│ │ │ │ +
Volume volume() const
Obtain the volume of the element.
Definition affinegeometry.hh:624
│ │ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,604 +1,798 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +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 (C) DUNE 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_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ │ 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 PyramidTriangulation │ │ │ │ │ +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 │ │ │ │ │ +_2_0namespace _D_u_n_e │ │ │ │ │ +21{ │ │ │ │ │ +22 │ │ │ │ │ +23 // External Forward Declarations │ │ │ │ │ +24 // ----------------------------- │ │ │ │ │ +25 │ │ │ │ │ +_2_6 namespace Geo │ │ │ │ │ 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 // │ │ │ │ │ +28 │ │ │ │ │ +29 template< typename Implementation > │ │ │ │ │ +30 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ │ +31 │ │ │ │ │ +32 template< class ctype, int dim > │ │ │ │ │ +_3_3 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; │ │ │ │ │ +34 │ │ │ │ │ +35 template< class ctype, int dim > │ │ │ │ │ +36 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ │ +37 │ │ │ │ │ +38 } │ │ │ │ │ +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; │ │ │ │ │ +41 namespace Impl │ │ │ │ │ +42 { │ │ │ │ │ +43 │ │ │ │ │ +44 // FieldMatrixHelper │ │ │ │ │ +45 // ----------------- │ │ │ │ │ +46 │ │ │ │ │ +47 template< class ct > │ │ │ │ │ +48 struct FieldMatrixHelper │ │ │ │ │ +49 { │ │ │ │ │ +50 typedef ct ctype; │ │ │ │ │ +51 │ │ │ │ │ +52 template< int m, int n > │ │ │ │ │ +53 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ │ +ctype, n > &x, FieldVector< ctype, m > &ret ) │ │ │ │ │ +54 { │ │ │ │ │ +55 for( int i = 0; i < m; ++i ) │ │ │ │ │ +56 { │ │ │ │ │ +57 ret[ i ] = ctype( 0 ); │ │ │ │ │ +58 for( int j = 0; j < n; ++j ) │ │ │ │ │ +59 ret[ i ] += A[ i ][ j ] * x[ j ]; │ │ │ │ │ +60 } │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +63 template< int m, int n > │ │ │ │ │ +64 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ │ +ctype, m > &x, FieldVector< ctype, n > &ret ) │ │ │ │ │ +65 { │ │ │ │ │ +66 for( int i = 0; i < n; ++i ) │ │ │ │ │ +67 { │ │ │ │ │ +68 ret[ i ] = ctype( 0 ); │ │ │ │ │ +69 for( int j = 0; j < m; ++j ) │ │ │ │ │ +70 ret[ i ] += A[ j ][ i ] * x[ j ]; │ │ │ │ │ +71 } │ │ │ │ │ +72 } │ │ │ │ │ 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 │ │ │ │ │ -81 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ -82 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ -83 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ -84 │ │ │ │ │ -85 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ -86 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_> _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ -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::_C_o_d_i_m │ │ │ │ │ -101 { │ │ │ │ │ -102 class SubEntityIterator; │ │ │ │ │ -_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 BackendRefinement::nVertices(nIntervals) * nKuhnSimplices; │ │ │ │ │ +74 template< int m, int n, int p > │ │ │ │ │ +75 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ │ +ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret ) │ │ │ │ │ +76 { │ │ │ │ │ +77 for( int i = 0; i < m; ++i ) │ │ │ │ │ +78 { │ │ │ │ │ +79 for( int j = 0; j < p; ++j ) │ │ │ │ │ +80 { │ │ │ │ │ +81 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +82 for( int k = 0; k < n; ++k ) │ │ │ │ │ +83 ret[ i ][ j ] += A[ i ][ k ] * B[ k ][ j ]; │ │ │ │ │ +84 } │ │ │ │ │ +85 } │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +88 template< int m, int n, int p > │ │ │ │ │ +89 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ │ +ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret ) │ │ │ │ │ +90 { │ │ │ │ │ +91 for( int i = 0; i < n; ++i ) │ │ │ │ │ +92 { │ │ │ │ │ +93 for( int j = 0; j < p; ++j ) │ │ │ │ │ +94 { │ │ │ │ │ +95 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +96 for( int k = 0; k < m; ++k ) │ │ │ │ │ +97 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ]; │ │ │ │ │ +98 } │ │ │ │ │ +99 } │ │ │ │ │ +100 } │ │ │ │ │ +101 │ │ │ │ │ +102 template< int m, int n > │ │ │ │ │ +103 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ +ctype, n, n > &ret ) │ │ │ │ │ +104 { │ │ │ │ │ +105 for( int i = 0; i < n; ++i ) │ │ │ │ │ +106 { │ │ │ │ │ +107 for( int j = 0; j <= i; ++j ) │ │ │ │ │ +108 { │ │ │ │ │ +109 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +110 for( int k = 0; k < m; ++k ) │ │ │ │ │ +111 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; │ │ │ │ │ 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) │ │ │ │ │ +113 } │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +116 template< int m, int n > │ │ │ │ │ +117 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ │ +n, n > &ret ) │ │ │ │ │ 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 BackendRefinement::nElements(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 │ │ │ │ │ +119 for( int i = 0; i < n; ++i ) │ │ │ │ │ +120 { │ │ │ │ │ +121 for( int j = 0; j <= i; ++j ) │ │ │ │ │ +122 { │ │ │ │ │ +123 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +124 for( int k = 0; k < m; ++k ) │ │ │ │ │ +125 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; │ │ │ │ │ +126 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ +127 } │ │ │ │ │ +128 │ │ │ │ │ +129 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ +130 for( int k = 0; k < m; ++k ) │ │ │ │ │ +131 ret[ i ][ i ] += A[ k ][ i ] * A[ k ][ i ]; │ │ │ │ │ +132 } │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +135 template< int m, int n > │ │ │ │ │ +136 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ +ctype, m, m > &ret ) │ │ │ │ │ +137 { │ │ │ │ │ +138 /* │ │ │ │ │ +139 if (m==2) { │ │ │ │ │ +140 ret[0][0] = A[0]*A[0]; │ │ │ │ │ +141 ret[1][1] = A[1]*A[1]; │ │ │ │ │ +142 ret[1][0] = A[0]*A[1]; │ │ │ │ │ +143 } │ │ │ │ │ +144 else │ │ │ │ │ +145 */ │ │ │ │ │ +146 for( int i = 0; i < m; ++i ) │ │ │ │ │ +147 { │ │ │ │ │ +148 for( int j = 0; j <= i; ++j ) │ │ │ │ │ +149 { │ │ │ │ │ +150 ctype &retij = ret[ i ][ j ]; │ │ │ │ │ +151 retij = A[ i ][ 0 ] * A[ j ][ 0 ]; │ │ │ │ │ +152 for( int k = 1; k < n; ++k ) │ │ │ │ │ +153 retij += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ │ +154 } │ │ │ │ │ +155 } │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +158 template< int m, int n > │ │ │ │ │ +159 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ │ +m, m > &ret ) │ │ │ │ │ +160 { │ │ │ │ │ +161 for( int i = 0; i < m; ++i ) │ │ │ │ │ 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 Refinement::CoordVector _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 increment(); │ │ │ │ │ -171 │ │ │ │ │ -172 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -173 │ │ │ │ │ -174 _G_e_o_m_e_t_r_y geometry() const; │ │ │ │ │ +163 for( int j = 0; j < i; ++j ) │ │ │ │ │ +164 { │ │ │ │ │ +165 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +166 for( int k = 0; k < n; ++k ) │ │ │ │ │ +167 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ │ +168 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ +169 } │ │ │ │ │ +170 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ +171 for( int k = 0; k < n; ++k ) │ │ │ │ │ +172 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ]; │ │ │ │ │ +173 } │ │ │ │ │ +174 } │ │ │ │ │ 175 │ │ │ │ │ -176 int index() 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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ -193 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(nIntervals_)), │ │ │ │ │ -194 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(nIntervals_)) │ │ │ │ │ -195 { │ │ │ │ │ -196 if (end) │ │ │ │ │ -197 kuhnIndex = nKuhnSimplices; │ │ │ │ │ -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() │ │ │ │ │ +176 template< int n > │ │ │ │ │ +177 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ │ +ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ │ +178 { │ │ │ │ │ +179 for( int i = 0; i < n; ++i ) │ │ │ │ │ +180 { │ │ │ │ │ +181 ret[ i ] = ctype( 0 ); │ │ │ │ │ +182 for( int j = 0; j <= i; ++j ) │ │ │ │ │ +183 ret[ i ] += L[ i ][ j ] * x[ j ]; │ │ │ │ │ +184 } │ │ │ │ │ +185 } │ │ │ │ │ +186 │ │ │ │ │ +187 template< int n > │ │ │ │ │ +188 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ │ +ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ │ +189 { │ │ │ │ │ +190 for( int i = 0; i < n; ++i ) │ │ │ │ │ +191 { │ │ │ │ │ +192 ret[ i ] = ctype( 0 ); │ │ │ │ │ +193 for( int j = i; j < n; ++j ) │ │ │ │ │ +194 ret[ i ] += L[ j ][ i ] * x[ j ]; │ │ │ │ │ +195 } │ │ │ │ │ +196 } │ │ │ │ │ +197 │ │ │ │ │ +198 template< int n > │ │ │ │ │ +199 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ │ +n, n > &ret ) │ │ │ │ │ +200 { │ │ │ │ │ +201 for( int i = 0; i < n; ++i ) │ │ │ │ │ +202 { │ │ │ │ │ +203 for( int j = 0; j < i; ++j ) │ │ │ │ │ 204 { │ │ │ │ │ -205 ++backend; │ │ │ │ │ -206 if(backend == backendEnd) │ │ │ │ │ -207 { │ │ │ │ │ -208 backend = BackendRefinement::vBegin(nIntervals_); │ │ │ │ │ -209 ++kuhnIndex; │ │ │ │ │ -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_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(referenceToKuhn(backend.coords(), │ │ │ │ │ -219 getPermutation(kuhnIndex))); │ │ │ │ │ -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_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 │ │ │ │ │ -225 { │ │ │ │ │ -226 std::vector corners(1); │ │ │ │ │ -227 corners[0] = referenceToKuhn(backend.coords(), getPermutation │ │ │ │ │ -(kuhnIndex)); │ │ │ │ │ -228 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, 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 kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.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); │ │ │ │ │ +205 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +206 for( int k = i; k < n; ++k ) │ │ │ │ │ +207 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ]; │ │ │ │ │ +208 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ +209 } │ │ │ │ │ +210 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ +211 for( int k = i; k < n; ++k ) │ │ │ │ │ +212 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ]; │ │ │ │ │ +213 } │ │ │ │ │ +214 } │ │ │ │ │ +215 │ │ │ │ │ +216 template< int n > │ │ │ │ │ +217 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ │ +n, n > &ret ) │ │ │ │ │ +218 { │ │ │ │ │ +219 for( int i = 0; i < n; ++i ) │ │ │ │ │ +220 { │ │ │ │ │ +221 for( int j = 0; j < i; ++j ) │ │ │ │ │ +222 { │ │ │ │ │ +223 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ │ +224 for( int k = 0; k <= j; ++k ) │ │ │ │ │ +225 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ]; │ │ │ │ │ +226 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ │ +227 } │ │ │ │ │ +228 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ │ +229 for( int k = 0; k <= i; ++k ) │ │ │ │ │ +230 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ]; │ │ │ │ │ +231 } │ │ │ │ │ +232 } │ │ │ │ │ +233 │ │ │ │ │ +234 template< int n > │ │ │ │ │ +235 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< │ │ │ │ │ +ctype, n, n > &ret, const bool checkSingular = false ) │ │ │ │ │ +236 { │ │ │ │ │ +237 using std::sqrt; │ │ │ │ │ +238 for( int i = 0; i < n; ++i ) │ │ │ │ │ +239 { │ │ │ │ │ +240 ctype &rii = ret[ i ][ i ]; │ │ │ │ │ +241 │ │ │ │ │ +242 ctype xDiag = A[ i ][ i ]; │ │ │ │ │ +243 for( int j = 0; j < i; ++j ) │ │ │ │ │ +244 xDiag -= ret[ i ][ j ] * ret[ i ][ j ]; │ │ │ │ │ +245 │ │ │ │ │ +246 // in some cases A can be singular, e.g. when checking local for │ │ │ │ │ +247 // outside points during checkInside │ │ │ │ │ +248 if( checkSingular && ! ( xDiag > ctype( 0 )) ) │ │ │ │ │ +249 return false ; │ │ │ │ │ 250 │ │ │ │ │ -251 void increment(); │ │ │ │ │ -252 │ │ │ │ │ -253 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -254 int index() const; │ │ │ │ │ -255 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -256 │ │ │ │ │ -257 _G_e_o_m_e_t_r_y geometry() 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 _R_e_f_i_n_e_m_e_n_t_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t _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 nKuhnSimplices = 2; │ │ │ │ │ -266 │ │ │ │ │ -_2_6_7 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ │ +251 // otherwise this should be true always │ │ │ │ │ +252 assert( xDiag > ctype( 0 ) ); │ │ │ │ │ +253 rii = sqrt( xDiag ); │ │ │ │ │ +254 │ │ │ │ │ +255 ctype invrii = ctype( 1 ) / rii; │ │ │ │ │ +256 for( int k = i+1; k < n; ++k ) │ │ │ │ │ +257 { │ │ │ │ │ +258 ctype x = A[ k ][ i ]; │ │ │ │ │ +259 for( int j = 0; j < i; ++j ) │ │ │ │ │ +260 x -= ret[ i ][ j ] * ret[ k ][ j ]; │ │ │ │ │ +261 ret[ k ][ i ] = invrii * x; │ │ │ │ │ +262 } │ │ │ │ │ +263 } │ │ │ │ │ +264 │ │ │ │ │ +265 // return true for meaning A is non-singular │ │ │ │ │ +266 return true; │ │ │ │ │ +267 } │ │ │ │ │ 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ -278 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(nIntervals_)), │ │ │ │ │ -279 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(nIntervals_)) │ │ │ │ │ +269 template< int n > │ │ │ │ │ +270 static ctype detL ( const FieldMatrix< ctype, n, n > &L ) │ │ │ │ │ +271 { │ │ │ │ │ +272 ctype det( 1 ); │ │ │ │ │ +273 for( int i = 0; i < n; ++i ) │ │ │ │ │ +274 det *= L[ i ][ i ]; │ │ │ │ │ +275 return det; │ │ │ │ │ +276 } │ │ │ │ │ +277 │ │ │ │ │ +278 template< int n > │ │ │ │ │ +279 static ctype invL ( FieldMatrix< ctype, n, n > &L ) │ │ │ │ │ 280 { │ │ │ │ │ -281 if (end) │ │ │ │ │ -282 kuhnIndex = nKuhnSimplices; │ │ │ │ │ -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 ++backend; │ │ │ │ │ -291 if (backend == backendEnd) │ │ │ │ │ -292 { │ │ │ │ │ -293 backend = BackendRefinement::eBegin(nIntervals_); │ │ │ │ │ -294 ++kuhnIndex; │ │ │ │ │ +281 ctype det( 1 ); │ │ │ │ │ +282 for( int i = 0; i < n; ++i ) │ │ │ │ │ +283 { │ │ │ │ │ +284 ctype &lii = L[ i ][ i ]; │ │ │ │ │ +285 det *= lii; │ │ │ │ │ +286 lii = ctype( 1 ) / lii; │ │ │ │ │ +287 for( int j = 0; j < i; ++j ) │ │ │ │ │ +288 { │ │ │ │ │ +289 ctype &lij = L[ i ][ j ]; │ │ │ │ │ +290 ctype x = lij * L[ j ][ j ]; │ │ │ │ │ +291 for( int k = j+1; k < i; ++k ) │ │ │ │ │ +292 x += L[ i ][ k ] * L[ k ][ j ]; │ │ │ │ │ +293 lij = (-lii) * x; │ │ │ │ │ +294 } │ │ │ │ │ 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 │ │ │ │ │ +296 return det; │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +299 // calculates x := L^{-1} x │ │ │ │ │ +300 template< int n > │ │ │ │ │ +301 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ │ +&x ) │ │ │ │ │ 302 { │ │ │ │ │ -303 _I_n_d_e_x_V_e_c_t_o_r indices = backend.vertexIndices(); │ │ │ │ │ -304 │ │ │ │ │ -305 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_); │ │ │ │ │ -306 indices += base; │ │ │ │ │ -307 │ │ │ │ │ -308 return indices; │ │ │ │ │ +303 for( int i = 0; i < n; ++i ) │ │ │ │ │ +304 { │ │ │ │ │ +305 for( int j = 0; j < i; ++j ) │ │ │ │ │ +306 x[ i ] -= L[ i ][ j ] * x[ j ]; │ │ │ │ │ +307 x[ i ] /= L[ i ][ i ]; │ │ │ │ │ +308 } │ │ │ │ │ 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 kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.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(backend.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 = backend.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(referenceToKuhn(local, │ │ │ │ │ -348 getPermutation(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::_C_o_d_i_m:: │ │ │ │ │ -SubEntityIterator │ │ │ │ │ -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 SubEntityIterator _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_>_:_: │ │ │ │ │ -_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(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 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 │ │ │ │ │ +311 // calculates x := L^{-T} x │ │ │ │ │ +312 template< int n > │ │ │ │ │ +313 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ │ +&x ) │ │ │ │ │ +314 { │ │ │ │ │ +315 for( int i = n; i > 0; --i ) │ │ │ │ │ +316 { │ │ │ │ │ +317 for( int j = i; j < n; ++j ) │ │ │ │ │ +318 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ]; │ │ │ │ │ +319 x[ i-1 ] /= L[ i-1 ][ i-1 ]; │ │ │ │ │ +320 } │ │ │ │ │ +321 } │ │ │ │ │ +322 │ │ │ │ │ +323 template< int n > │ │ │ │ │ +324 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A ) │ │ │ │ │ +325 { │ │ │ │ │ +326 // return A[0][0]*A[1][1]-A[1][0]*A[1][0]; │ │ │ │ │ +327 FieldMatrix< ctype, n, n > L; │ │ │ │ │ +328 cholesky_L( A, L ); │ │ │ │ │ +329 return detL( L ); │ │ │ │ │ +330 } │ │ │ │ │ +331 │ │ │ │ │ +332 template< int n > │ │ │ │ │ +333 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A ) │ │ │ │ │ +334 { │ │ │ │ │ +335 FieldMatrix< ctype, n, n > L; │ │ │ │ │ +336 cholesky_L( A, L ); │ │ │ │ │ +337 const ctype det = invL( L ); │ │ │ │ │ +338 LTL( L, A ); │ │ │ │ │ +339 return det; │ │ │ │ │ +340 } │ │ │ │ │ +341 │ │ │ │ │ +342 // calculate x := A^{-1} x │ │ │ │ │ +343 template< int n > │ │ │ │ │ +344 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n │ │ │ │ │ +> &x, const bool checkSingular = false ) │ │ │ │ │ +345 { │ │ │ │ │ +346 FieldMatrix< ctype, n, n > L; │ │ │ │ │ +347 const bool invertible = cholesky_L( A, L, checkSingular ); │ │ │ │ │ +348 if( ! invertible ) return invertible ; │ │ │ │ │ +349 invLx( L, x ); │ │ │ │ │ +350 invLTx( L, x ); │ │ │ │ │ +351 return invertible; │ │ │ │ │ +352 } │ │ │ │ │ +353 │ │ │ │ │ +354 template< int m, int n > │ │ │ │ │ +355 static ctype detATA ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ │ +356 { │ │ │ │ │ +357 if( m >= n ) │ │ │ │ │ +358 { │ │ │ │ │ +359 FieldMatrix< ctype, n, n > ata; │ │ │ │ │ +360 ATA_L( A, ata ); │ │ │ │ │ +361 return spdDetA( ata ); │ │ │ │ │ +362 } │ │ │ │ │ +363 else │ │ │ │ │ +364 return ctype( 0 ); │ │ │ │ │ +365 } │ │ │ │ │ +366 │ │ │ │ │ +372 template< int m, int n > │ │ │ │ │ +373 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ │ +374 { │ │ │ │ │ +375 using std::abs; │ │ │ │ │ +376 using std::sqrt; │ │ │ │ │ +377 // These special cases are here not only for speed reasons: │ │ │ │ │ +378 // The general implementation aborts if the matrix is almost singular, │ │ │ │ │ +379 // and the special implementation provide a stable way to handle that case. │ │ │ │ │ +380 if( (n == 2) && (m == 2) ) │ │ │ │ │ +381 { │ │ │ │ │ +382 // Special implementation for 2x2 matrices: faster and more stable │ │ │ │ │ +383 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] ); │ │ │ │ │ +384 } │ │ │ │ │ +385 else if( (n == 3) && (m == 3) ) │ │ │ │ │ +386 { │ │ │ │ │ +387 // Special implementation for 3x3 matrices │ │ │ │ │ +388 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ]; │ │ │ │ │ +389 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ]; │ │ │ │ │ +390 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ]; │ │ │ │ │ +391 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] ); │ │ │ │ │ +392 } │ │ │ │ │ +393 else if ( (n == 3) && (m == 2) ) │ │ │ │ │ +394 { │ │ │ │ │ +395 // Special implementation for 2x3 matrices │ │ │ │ │ +396 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ]; │ │ │ │ │ +397 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ]; │ │ │ │ │ +398 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ]; │ │ │ │ │ +399 return sqrt( v0*v0 + v1*v1 + v2*v2); │ │ │ │ │ +400 } │ │ │ │ │ +401 else if( n >= m ) │ │ │ │ │ +402 { │ │ │ │ │ +403 // General case │ │ │ │ │ +404 FieldMatrix< ctype, m, m > aat; │ │ │ │ │ +405 AAT_L( A, aat ); │ │ │ │ │ +406 return spdDetA( aat ); │ │ │ │ │ +407 } │ │ │ │ │ +408 else │ │ │ │ │ +409 return ctype( 0 ); │ │ │ │ │ +410 } │ │ │ │ │ 411 │ │ │ │ │ -412 } // namespace RefinementImp │ │ │ │ │ -413} // namespace Dune │ │ │ │ │ -414 │ │ │ │ │ -415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ │ -_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.... │ │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ +412 // A^{-1}_L = (A^T A)^{-1} A^T │ │ │ │ │ +413 // => A^{-1}_L A = I │ │ │ │ │ +414 template< int m, int n > │ │ │ │ │ +415 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ +ctype, n, m > &ret ) │ │ │ │ │ +416 { │ │ │ │ │ +417 static_assert((m >= n), "Matrix has no left inverse."); │ │ │ │ │ +418 FieldMatrix< ctype, n, n > ata; │ │ │ │ │ +419 ATA_L( A, ata ); │ │ │ │ │ +420 const ctype det = spdInvA( ata ); │ │ │ │ │ +421 ATBT( ata, A, ret ); │ │ │ │ │ +422 return det; │ │ │ │ │ +423 } │ │ │ │ │ +424 │ │ │ │ │ +425 template< int m, int n > │ │ │ │ │ +426 static void leftInvAx ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ │ +FieldVector< ctype, m > &x, FieldVector< ctype, n > &y ) │ │ │ │ │ +427 { │ │ │ │ │ +428 static_assert((m >= n), "Matrix has no left inverse."); │ │ │ │ │ +429 FieldMatrix< ctype, n, n > ata; │ │ │ │ │ +430 ATx( A, x, y ); │ │ │ │ │ +431 ATA_L( A, ata ); │ │ │ │ │ +432 spdInvAx( ata, y ); │ │ │ │ │ +433 } │ │ │ │ │ +434 │ │ │ │ │ +436 template< int m, int n > │ │ │ │ │ +437 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ │ +ctype, n, m > &ret ) │ │ │ │ │ +438 { │ │ │ │ │ +439 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ │ +440 using std::abs; │ │ │ │ │ +441 if( (n == 2) && (m == 2) ) │ │ │ │ │ +442 { │ │ │ │ │ +443 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]); │ │ │ │ │ +444 const ctype detInv = ctype( 1 ) / det; │ │ │ │ │ +445 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv; │ │ │ │ │ +446 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv; │ │ │ │ │ +447 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv; │ │ │ │ │ +448 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv; │ │ │ │ │ +449 return abs( det ); │ │ │ │ │ +450 } │ │ │ │ │ +451 else │ │ │ │ │ +452 { │ │ │ │ │ +453 FieldMatrix< ctype, m , m > aat; │ │ │ │ │ +454 AAT_L( A, aat ); │ │ │ │ │ +455 const ctype det = spdInvA( aat ); │ │ │ │ │ +456 ATBT( A , aat , ret ); │ │ │ │ │ +457 return det; │ │ │ │ │ +458 } │ │ │ │ │ +459 } │ │ │ │ │ +460 │ │ │ │ │ +461 template< int m, int n > │ │ │ │ │ +462 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ │ +FieldVector< ctype, n > &x, FieldVector< ctype, m > &y ) │ │ │ │ │ +463 { │ │ │ │ │ +464 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ │ +465 FieldMatrix< ctype, m, m > aat; │ │ │ │ │ +466 Ax( A, x, y ); │ │ │ │ │ +467 AAT_L( A, aat ); │ │ │ │ │ +468 // check whether aat is singular and return true if non-singular │ │ │ │ │ +469 return spdInvAx( aat, y, true ); │ │ │ │ │ +470 } │ │ │ │ │ +471 }; │ │ │ │ │ +472 │ │ │ │ │ +473 } // namespace Impl │ │ │ │ │ +474 │ │ │ │ │ +475 │ │ │ │ │ +476 │ │ │ │ │ +482 template< class ct, int mydim, int cdim> │ │ │ │ │ +_4_8_3 class _A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ │ +484 { │ │ │ │ │ +485 public: │ │ │ │ │ +486 │ │ │ │ │ +_4_8_8 typedef ct _c_t_y_p_e; │ │ │ │ │ +489 │ │ │ │ │ +_4_9_1 static const int _m_y_d_i_m_e_n_s_i_o_n= mydim; │ │ │ │ │ +492 │ │ │ │ │ +_4_9_4 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ │ +495 │ │ │ │ │ +_4_9_7 typedef FieldVector< ctype, mydimension > _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +498 │ │ │ │ │ +_5_0_0 typedef FieldVector< ctype, coorddimension > _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +501 │ │ │ │ │ +_5_0_3 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ │ +504 │ │ │ │ │ +_5_0_6 typedef FieldMatrix< ctype, mydimension, coorddimension > │ │ │ │ │ +_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ +507 │ │ │ │ │ +_5_0_9 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; │ │ │ │ │ +510 │ │ │ │ │ +_5_1_2 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ │ +513 │ │ │ │ │ +_5_1_5 typedef FieldMatrix< ctype, mydimension, coorddimension > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ │ +516 │ │ │ │ │ +517 private: │ │ │ │ │ +519 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_ _> > _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ │ +520 │ │ │ │ │ +521 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_ _> _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ │ +522 │ │ │ │ │ +523 // Helper class to compute a matrix pseudo inverse │ │ │ │ │ +524 typedef Impl::FieldMatrixHelper< ct > MatrixHelper; │ │ │ │ │ +525 │ │ │ │ │ +526 public: │ │ │ │ │ +_5_2_8 _A_f_f_i_n_e_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, const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +&origin, │ │ │ │ │ +529 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ +530 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt) │ │ │ │ │ +531 { │ │ │ │ │ +532 integrationElement_ = MatrixHelper::template rightInvA< mydimension, │ │ │ │ │ +coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ ); │ │ │ │ │ +533 } │ │ │ │ │ +534 │ │ │ │ │ +_5_3_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 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &origin, │ │ │ │ │ +537 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ +538 : _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_s::general( gt ), origin, jt) │ │ │ │ │ +539 { } │ │ │ │ │ +540 │ │ │ │ │ +542 template< class CoordVector > │ │ │ │ │ +_5_4_3 _A_f_f_i_n_e_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, const CoordVector │ │ │ │ │ +&coordVector ) │ │ │ │ │ +544 : refElement_(refElement), origin_(coordVector[0]) │ │ │ │ │ +545 { │ │ │ │ │ +546 for( int i = 0; i < _m_y_d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ +547 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_; │ │ │ │ │ +548 integrationElement_ = MatrixHelper::template rightInvA< mydimension, │ │ │ │ │ +coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ ); │ │ │ │ │ +549 } │ │ │ │ │ +550 │ │ │ │ │ +552 template< class CoordVector > │ │ │ │ │ +_5_5_3 _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 ) │ │ │ │ │ +554 : _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_s::general( gt ), coordVector) │ │ │ │ │ +555 { } │ │ │ │ │ +556 │ │ │ │ │ +_5_5_8 bool _a_f_f_i_n_e () const { return true; } │ │ │ │ │ +559 │ │ │ │ │ +_5_6_1 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const { return refElement_._t_y_p_e(); } │ │ │ │ │ +562 │ │ │ │ │ +_5_6_4 int _c_o_r_n_e_r_s () const { return refElement_._s_i_z_e( _m_y_d_i_m_e_n_s_i_o_n ); } │ │ │ │ │ +565 │ │ │ │ │ +_5_6_7 _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 │ │ │ │ │ +568 { │ │ │ │ │ +569 return _g_l_o_b_a_l( refElement_._p_o_s_i_t_i_o_n( i, _m_y_d_i_m_e_n_s_i_o_n ) ); │ │ │ │ │ +570 } │ │ │ │ │ +571 │ │ │ │ │ +_5_7_3 _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_._p_o_s_i_t_i_o_n( 0, │ │ │ │ │ +0 ) ); } │ │ │ │ │ +574 │ │ │ │ │ +_5_8_1 _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 │ │ │ │ │ +582 { │ │ │ │ │ +583 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l( origin_ ); │ │ │ │ │ +584 jacobianTransposed_.umtv( _l_o_c_a_l, _g_l_o_b_a_l ); │ │ │ │ │ +585 return _g_l_o_b_a_l; │ │ │ │ │ +586 } │ │ │ │ │ +587 │ │ │ │ │ +_6_0_1 _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 │ │ │ │ │ +602 { │ │ │ │ │ +603 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l; │ │ │ │ │ +604 jacobianInverseTransposed_.mtv( _g_l_o_b_a_l - origin_, _l_o_c_a_l ); │ │ │ │ │ +605 return _l_o_c_a_l; │ │ │ │ │ +606 } │ │ │ │ │ +607 │ │ │ │ │ +_6_1_8 _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 │ │ │ │ │ +619 { │ │ │ │ │ +620 return integrationElement_; │ │ │ │ │ +621 } │ │ │ │ │ +622 │ │ │ │ │ +_6_2_4 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ │ +625 { │ │ │ │ │ +626 return integrationElement_ * refElement_._v_o_l_u_m_e(); │ │ │ │ │ +627 } │ │ │ │ │ +628 │ │ │ │ │ +_6_3_5 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 │ │ │ │ │ +636 { │ │ │ │ │ +637 return jacobianTransposed_; │ │ │ │ │ +638 } │ │ │ │ │ +639 │ │ │ │ │ +_6_4_6 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 │ │ │ │ │ +647 { │ │ │ │ │ +648 return jacobianInverseTransposed_; │ │ │ │ │ +649 } │ │ │ │ │ +650 │ │ │ │ │ +_6_5_7 _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 │ │ │ │ │ +658 { │ │ │ │ │ +659 return jacobianTransposed_.transposed(); │ │ │ │ │ +660 } │ │ │ │ │ +661 │ │ │ │ │ +_6_6_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 ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +&_l_o_c_a_l) const │ │ │ │ │ +669 { │ │ │ │ │ +670 return jacobianInverseTransposed_.transposed(); │ │ │ │ │ +671 } │ │ │ │ │ +672 │ │ │ │ │ +_6_7_3 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 _A_f_f_i_n_e_G_e_o_m_e_t_r_y &geometry ) │ │ │ │ │ +674 { │ │ │ │ │ +675 return geometry.refElement_; │ │ │ │ │ +676 } │ │ │ │ │ +677 │ │ │ │ │ +678 private: │ │ │ │ │ +679 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_; │ │ │ │ │ +680 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e origin_; │ │ │ │ │ +681 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jacobianTransposed_; │ │ │ │ │ +682 _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_; │ │ │ │ │ +683 _c_t_y_p_e integrationElement_; │ │ │ │ │ +684 }; │ │ │ │ │ +685 │ │ │ │ │ +686} // namespace Dune │ │ │ │ │ +687 │ │ │ │ │ +688#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. │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ +unspecified-type ReferenceElement │ │ │ │ │ +Returns the type of reference element for the argument type T. │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:497 │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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_:_:_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:336 │ │ │ │ │ -_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:394 │ │ │ │ │ -_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 │ │ │ │ │ -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 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_:_:_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 │ │ │ │ │ -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_:_:_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_:_:_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_:_:_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_:_:_C_o_d_i_m_:_:_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_ _>_:_:_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 │ │ │ │ │ -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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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 │ │ │ │ │ -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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_:_:_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_<_ _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_:_:_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_:_:_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_:_:_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_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:433 │ │ │ │ │ +_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_:_:_v_o_l_u_m_e │ │ │ │ │ +CoordinateField volume() const │ │ │ │ │ +obtain the volume 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_:_:_t_y_p_e │ │ │ │ │ +decltype(auto) type(int i, int c) const │ │ │ │ │ +obtain the type of subentity (i,c) │ │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:171 │ │ │ │ │ +_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_:_:_p_o_s_i_t_i_o_n │ │ │ │ │ +decltype(auto) position(int i, int c) const │ │ │ │ │ +position of the barycenter of entity (i,c) │ │ │ │ │ +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_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:33 │ │ │ │ │ +_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:170 │ │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ │ +Implementation of the Geometry interface for affine geometries. │ │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:484 │ │ │ │ │ +_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:543 │ │ │ │ │ +_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:536 │ │ │ │ │ +_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:497 │ │ │ │ │ +_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:561 │ │ │ │ │ +_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:491 │ │ │ │ │ +_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:528 │ │ │ │ │ +_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:503 │ │ │ │ │ +_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:668 │ │ │ │ │ +_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:673 │ │ │ │ │ +_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:553 │ │ │ │ │ +_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:618 │ │ │ │ │ +_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:515 │ │ │ │ │ +_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:512 │ │ │ │ │ +_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:646 │ │ │ │ │ +_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:506 │ │ │ │ │ +_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:567 │ │ │ │ │ +_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:564 │ │ │ │ │ +_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:601 │ │ │ │ │ +_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:509 │ │ │ │ │ +_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:494 │ │ │ │ │ +_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:581 │ │ │ │ │ +_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:573 │ │ │ │ │ +_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:657 │ │ │ │ │ +_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:488 │ │ │ │ │ +_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:500 │ │ │ │ │ +_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:558 │ │ │ │ │ +_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:635 │ │ │ │ │ +_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:624 │ │ │ │ │ +_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:126 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: prismtriangulation.cc File Reference │ │ │ │ +dune-geometry: referenceelement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,86 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros | │ │ │ │ -Functions
│ │ │ │ -
prismtriangulation.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
referenceelement.hh 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"
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │
│ │ │ │

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

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
namespace  Dune::Geo
 
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)
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,57 +1,25 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -#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 │ │ │ │ │ +referenceelement.hh File Reference │ │ │ │ │ #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___, │ │ │ │ │ - _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ -  Implementation of the refinement of a prism into simplices. _M_o_r_e_._._. │ │ │ │ │ + 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_:_:_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_ _> │ │ │ │ │ +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_:_:_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) │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ │   │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPRRIISSMMTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: prismtriangulation.cc Source File │ │ │ │ +dune-geometry: referenceelement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,520 +70,264 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
prismtriangulation.cc
│ │ │ │ +
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 (C) DUNE 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_REFERENCEELEMENT_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ │
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 {
│ │ │ │ -
│ │ │ │ -
26 namespace PrismTriangulation
│ │ │ │ -
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
│ │ │ │ -
65 template<int dimension_, class CoordType>
│ │ │ │ + │ │ │ │ +
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>
│ │ │ │ +
23 class ReferenceElementImplementation;
│ │ │ │ +
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 {
│ │ │ │ -
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;
│ │ │ │ +
69 using Geometry = implementation-defined;
│ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72#endif // DOXYGEN
│ │ │ │ +
73
│ │ │ │ +
75 using ctype = typename Implementation::ctype;
│ │ │ │ +
76
│ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ -
93 };
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95 template<int dimension, class CoordType>
│ │ │ │ -
96 template<int codimension>
│ │ │ │ -
│ │ │ │ -
97 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ │ -
98 {
│ │ │ │ -
99 class SubEntityIterator;
│ │ │ │ - │ │ │ │ -
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;
│ │ │ │ +
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
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ -
162 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
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),
│ │ │ │ -
189 backend(BackendRefinement::vBegin(nIntervals_)),
│ │ │ │ -
190 backendEnd(BackendRefinement::vEnd(nIntervals_))
│ │ │ │ -
191 {
│ │ │ │ -
192 if (end)
│ │ │ │ -
193 kuhnIndex = nKuhnSimplices;
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
196 template<int dimension, class CoordType>
│ │ │ │ -
197 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 ++backend;
│ │ │ │ -
202 if (backend == backendEnd)
│ │ │ │ -
203 {
│ │ │ │ -
204 backend = BackendRefinement::vBegin(nIntervals_);
│ │ │ │ -
205 ++kuhnIndex;
│ │ │ │ -
206 }
│ │ │ │ -
207 }
│ │ │ │ +
│ │ │ │ +
153 auto subEntities ( int i, int c, int cc ) const
│ │ │ │ +
154 {
│ │ │ │ +
155 return _impl->subEntities(i,c,cc);
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
158
│ │ │ │ +
│ │ │ │ +
171 decltype(auto) type(int i, int c) const
│ │ │ │ +
172 {
│ │ │ │ +
173 return _impl->type(i,c);
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
176
│ │ │ │ +
│ │ │ │ +
184 decltype(auto) type() const
│ │ │ │ +
185 {
│ │ │ │ +
186 return _impl->type();
│ │ │ │ +
187 }
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
189
│ │ │ │ +
│ │ │ │ +
203 decltype(auto) position(int i, int c) const
│ │ │ │ +
204 {
│ │ │ │ +
205 return _impl->position(i,c);
│ │ │ │ +
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
│ │ │ │ -
215 return transformCoordinate(referenceToKuhn(backend.coords(),
│ │ │ │ -
216 getPermutation<dimension>((kuhnIndex + 2) % 4)));
│ │ │ │ -
217 }
│ │ │ │ -
│ │ │ │ -
218
│ │ │ │ -
219 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
222 {
│ │ │ │ -
223 std::vector<CoordVector> corners(1);
│ │ │ │ -
224 corners[0] = transformCoordinate(referenceToKuhn(backend.coords(),
│ │ │ │ -
225 getPermutation<dimension>((kuhnIndex + 2) % 4)));
│ │ │ │ -
226 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ -
227 }
│ │ │ │ -
│ │ │ │ -
228
│ │ │ │ -
229 template<int dimension, class CoordType>
│ │ │ │ -
230 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
232 index() const
│ │ │ │ -
233 {
│ │ │ │ -
234 return kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.index();
│ │ │ │ -
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;
│ │ │ │ +
│ │ │ │ +
216 bool checkInside(const Coordinate& local) const
│ │ │ │ +
217 {
│ │ │ │ +
218 return _impl->checkInside(local);
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220
│ │ │ │ +
221
│ │ │ │ +
233 template<int codim>
│ │ │ │ +
│ │ │ │ +
234 typename Codim<codim>::Geometry geometry(int i) const
│ │ │ │ +
235 {
│ │ │ │ +
236 return _impl->template geometry<codim>(i);
│ │ │ │ +
237 }
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
239
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
242 {
│ │ │ │ +
243 return _impl->volume();
│ │ │ │ +
244 }
│ │ │ │ +
│ │ │ │ +
245
│ │ │ │
246
│ │ │ │ -
247 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ │ -
248
│ │ │ │ -
249 void increment();
│ │ │ │ -
250
│ │ │ │ -
251 IndexVector vertexIndices() const;
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ -
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),
│ │ │ │ -
276 backend(BackendRefinement::eBegin(nIntervals_)),
│ │ │ │ -
277 backendEnd(BackendRefinement::eEnd(nIntervals_))
│ │ │ │ -
278 {
│ │ │ │ -
279 if (end)
│ │ │ │ -
280 kuhnIndex = nKuhnSimplices;
│ │ │ │ -
281 }
│ │ │ │ -
│ │ │ │ -
282
│ │ │ │ -
283 template<int dimension, class CoordType>
│ │ │ │ -
284 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
287 {
│ │ │ │ -
288 ++backend;
│ │ │ │ -
289 if (backend == backendEnd)
│ │ │ │ -
290 {
│ │ │ │ -
291 backend = BackendRefinement::eBegin(nIntervals_);
│ │ │ │ -
292 ++kuhnIndex;
│ │ │ │ -
293 }
│ │ │ │ -
294 }
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
296 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
299 vertexIndices() const
│ │ │ │ -
300 {
│ │ │ │ -
301 IndexVector indices = backend.vertexIndices();
│ │ │ │ +
│ │ │ │ +
258 decltype(auto) integrationOuterNormal(int face) const
│ │ │ │ +
259 {
│ │ │ │ +
260 return _impl->integrationOuterNormal(face);
│ │ │ │ +
261 }
│ │ │ │ +
│ │ │ │ +
262
│ │ │ │ +
263
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
272 : _impl(nullptr)
│ │ │ │ +
273 {}
│ │ │ │ +
│ │ │ │ +
274
│ │ │ │ +
│ │ │ │ +
280 const Implementation& impl() const
│ │ │ │ +
281 {
│ │ │ │ +
282 return *_impl;
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
284
│ │ │ │ +
│ │ │ │ +
286 bool operator==(const ReferenceElement& r) const
│ │ │ │ +
287 {
│ │ │ │ +
288 return _impl == r._impl;
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
290
│ │ │ │ +
│ │ │ │ +
292 bool operator!=(const ReferenceElement& r) const
│ │ │ │ +
293 {
│ │ │ │ +
294 return not (*this == r);
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
296
│ │ │ │ +
│ │ │ │ +
298 friend std::size_t hash_value(const ReferenceElement& r)
│ │ │ │ +
299 {
│ │ │ │ +
300 return reinterpret_cast<std::size_t>(r._impl);
│ │ │ │ +
301 }
│ │ │ │ +
│ │ │ │
302
│ │ │ │ -
303 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_);
│ │ │ │ -
304 indices += base;
│ │ │ │ -
305
│ │ │ │ -
306 return indices;
│ │ │ │ -
307 }
│ │ │ │ -
│ │ │ │ -
308
│ │ │ │ -
309 template<int dimension, class CoordType>
│ │ │ │ -
310 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
312 index() const
│ │ │ │ -
313 {
│ │ │ │ -
314 return kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.index();
│ │ │ │ -
315 }
│ │ │ │ -
│ │ │ │ -
316
│ │ │ │ -
317 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
320 coords() const
│ │ │ │ -
321 {
│ │ │ │ -
322 return global(backend.coords());
│ │ │ │ -
323 }
│ │ │ │ +
303 private:
│ │ │ │ +
304
│ │ │ │ +
305 // The implementation must be a friend to construct a wrapper around itself.
│ │ │ │ +
306 friend Implementation;
│ │ │ │ +
307
│ │ │ │ +
308 // The reference container is a friend to be able to call setImplementation.
│ │ │ │ +
309 friend class Impl::ReferenceElementContainer<ctype,dimension>;
│ │ │ │ +
310
│ │ │ │ +
311 // Constructor for wrapping an implementation reference (required internally by the default implementation)
│ │ │ │ +
312 ReferenceElement(const Implementation& impl)
│ │ │ │ +
313 : _impl(&impl)
│ │ │ │ +
314 {}
│ │ │ │ +
315
│ │ │ │ +
316 void setImplementation(const Implementation& impl)
│ │ │ │ +
317 {
│ │ │ │ +
318 _impl = &impl;
│ │ │ │ +
319 }
│ │ │ │ +
320
│ │ │ │ +
321 const Implementation* _impl;
│ │ │ │ +
322
│ │ │ │ +
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:
│ │ │ │ - │ │ │ │ -
356 typedef SubEntityIterator This;
│ │ │ │ -
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
│ │ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
325 }
│ │ │ │ +
326
│ │ │ │ +
327}
│ │ │ │ +
328
│ │ │ │ +
329
│ │ │ │ +
330#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
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:336
│ │ │ │ -
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:394
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:261
│ │ │ │ -
SubEntityIterator This
Definition prismtriangulation.cc:356
│ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:355
│ │ │ │ - │ │ │ │ - │ │ │ │ +
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ │ +
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:241
│ │ │ │ +
ReferenceElement()
Constructs an empty reference element.
Definition referenceelement.hh:271
│ │ │ │ +
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition referenceelement.hh:292
│ │ │ │ +
decltype(auto) type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:171
│ │ │ │ +
typename Implementation::Coordinate Coordinate
The coordinate type.
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:234
│ │ │ │ +
static constexpr int dimension
The dimension of the reference element.
Definition referenceelement.hh:87
│ │ │ │ +
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 Implementation::ctype ctype
The coordinate field type.
Definition referenceelement.hh:75
│ │ │ │ +
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ │ +
decltype(auto) type() const
obtain the type of this reference element
Definition referenceelement.hh:184
│ │ │ │ +
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition referenceelement.hh:280
│ │ │ │ +
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition referenceelement.hh:216
│ │ │ │ +
ctype CoordinateField
The coordinate field type.
Definition referenceelement.hh:78
│ │ │ │ +
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition referenceelement.hh:286
│ │ │ │ +
decltype(auto) position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:203
│ │ │ │ +
decltype(auto) integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition referenceelement.hh:258
│ │ │ │ +
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:298
│ │ │ │ +
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
│ │ │ │ +
ctype Volume
Type used for volume.
Definition referenceelement.hh:84
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,603 +1,294 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +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 (C) DUNE 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_REFERENCEELEMENT_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ │ 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 PrismTriangulation │ │ │ │ │ -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 │ │ │ │ │ -65 template │ │ │ │ │ -_6_6 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +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 Geo { │ │ │ │ │ +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 ReferenceElementImplementation; │ │ │ │ │ +24 │ │ │ │ │ +25 // forward declaration for backwards compatibility conversion │ │ │ │ │ +26 template │ │ │ │ │ +27 struct ReferenceElements; │ │ │ │ │ +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 { │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -80 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ -81 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ -82 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ -83 │ │ │ │ │ -84 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ -85 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_> _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ -93 }; │ │ │ │ │ -94 │ │ │ │ │ -95 template │ │ │ │ │ -96 template │ │ │ │ │ -_9_7 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ -98 { │ │ │ │ │ -99 class SubEntityIterator; │ │ │ │ │ -_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 BackendRefinement::nVertices(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) │ │ │ │ │ +_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 BackendRefinement::nElements(nIntervals) * 3; │ │ │ │ │ +132 return _impl->subEntity(i,c,ii,cc); │ │ │ │ │ 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 Refinement::CoordVector _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 increment(); │ │ │ │ │ -168 │ │ │ │ │ -169 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -170 _G_e_o_m_e_t_r_y geometry () const; │ │ │ │ │ -171 │ │ │ │ │ -172 int index() 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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ -189 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(nIntervals_)), │ │ │ │ │ -190 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(nIntervals_)) │ │ │ │ │ -191 { │ │ │ │ │ -192 if (end) │ │ │ │ │ -193 kuhnIndex = nKuhnSimplices; │ │ │ │ │ -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 ++backend; │ │ │ │ │ -202 if (backend == backendEnd) │ │ │ │ │ -203 { │ │ │ │ │ -204 backend = BackendRefinement::vBegin(nIntervals_); │ │ │ │ │ -205 ++kuhnIndex; │ │ │ │ │ +_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_7_1 decltype(auto) _t_y_p_e(int i, int c) const │ │ │ │ │ +172 { │ │ │ │ │ +173 return _impl->type(i,c); │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +176 │ │ │ │ │ +_1_8_4 decltype(auto) _t_y_p_e() const │ │ │ │ │ +185 { │ │ │ │ │ +186 return _impl->type(); │ │ │ │ │ +187 } │ │ │ │ │ +188 │ │ │ │ │ +189 │ │ │ │ │ +_2_0_3 decltype(auto) _p_o_s_i_t_i_o_n(int i, int c) const │ │ │ │ │ +204 { │ │ │ │ │ +205 return _impl->position(i,c); │ │ │ │ │ 206 } │ │ │ │ │ -207 } │ │ │ │ │ +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(referenceToKuhn(backend.coords(), │ │ │ │ │ -216 getPermutation((kuhnIndex + 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(referenceToKuhn(backend.coords(), │ │ │ │ │ -225 getPermutation((kuhnIndex + 2) % 4))); │ │ │ │ │ -226 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, 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 kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.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; │ │ │ │ │ +_2_1_6 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 │ │ │ │ │ +217 { │ │ │ │ │ +218 return _impl->checkInside(local); │ │ │ │ │ +219 } │ │ │ │ │ +220 │ │ │ │ │ +221 │ │ │ │ │ +233 template │ │ │ │ │ +_2_3_4 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 │ │ │ │ │ +235 { │ │ │ │ │ +236 return _impl->template geometry(i); │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +239 │ │ │ │ │ +_2_4_1 _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d _v_o_l_u_m_e() const │ │ │ │ │ +242 { │ │ │ │ │ +243 return _impl->volume(); │ │ │ │ │ +244 } │ │ │ │ │ +245 │ │ │ │ │ 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 increment(); │ │ │ │ │ -250 │ │ │ │ │ -251 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -252 int index() const; │ │ │ │ │ -253 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -254 │ │ │ │ │ -255 _G_e_o_m_e_t_r_y geometry () 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 _R_e_f_i_n_e_m_e_n_t_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t _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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ -276 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(nIntervals_)), │ │ │ │ │ -277 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(nIntervals_)) │ │ │ │ │ -278 { │ │ │ │ │ -279 if (end) │ │ │ │ │ -280 kuhnIndex = nKuhnSimplices; │ │ │ │ │ -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() │ │ │ │ │ +_2_5_8 decltype(auto) _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 │ │ │ │ │ +259 { │ │ │ │ │ +260 return _impl->integrationOuterNormal(face); │ │ │ │ │ +261 } │ │ │ │ │ +262 │ │ │ │ │ +263 │ │ │ │ │ +_2_7_1 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t() │ │ │ │ │ +272 : _impl(nullptr) │ │ │ │ │ +273 {} │ │ │ │ │ +274 │ │ │ │ │ +_2_8_0 const Implementation& _i_m_p_l() const │ │ │ │ │ +281 { │ │ │ │ │ +282 return *_impl; │ │ │ │ │ +283 } │ │ │ │ │ +284 │ │ │ │ │ +_2_8_6 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 │ │ │ │ │ 287 { │ │ │ │ │ -288 ++backend; │ │ │ │ │ -289 if (backend == backendEnd) │ │ │ │ │ -290 { │ │ │ │ │ -291 backend = BackendRefinement::eBegin(nIntervals_); │ │ │ │ │ -292 ++kuhnIndex; │ │ │ │ │ -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 = backend.vertexIndices(); │ │ │ │ │ +288 return _impl == r._impl; │ │ │ │ │ +289 } │ │ │ │ │ +290 │ │ │ │ │ +_2_9_2 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 │ │ │ │ │ +293 { │ │ │ │ │ +294 return not (*this == r); │ │ │ │ │ +295 } │ │ │ │ │ +296 │ │ │ │ │ +_2_9_8 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) │ │ │ │ │ +299 { │ │ │ │ │ +300 return reinterpret_cast(r._impl); │ │ │ │ │ +301 } │ │ │ │ │ 302 │ │ │ │ │ -303 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_); │ │ │ │ │ -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 kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.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(backend.coords()); │ │ │ │ │ -323 } │ │ │ │ │ +303 private: │ │ │ │ │ +304 │ │ │ │ │ +305 // The implementation must be a friend to construct a wrapper around │ │ │ │ │ +itself. │ │ │ │ │ +306 friend Implementation; │ │ │ │ │ +307 │ │ │ │ │ +308 // The reference container is a friend to be able to call │ │ │ │ │ +setImplementation. │ │ │ │ │ +309 friend class Impl::ReferenceElementContainer<_c_t_y_p_e,_d_i_m_e_n_s_i_o_n>; │ │ │ │ │ +310 │ │ │ │ │ +311 // Constructor for wrapping an implementation reference (required │ │ │ │ │ +internally by the default implementation) │ │ │ │ │ +312 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const Implementation& _i_m_p_l) │ │ │ │ │ +313 : _impl(&_i_m_p_l) │ │ │ │ │ +314 {} │ │ │ │ │ +315 │ │ │ │ │ +316 void setImplementation(const Implementation& _i_m_p_l) │ │ │ │ │ +317 { │ │ │ │ │ +318 _impl = &_i_m_p_l; │ │ │ │ │ +319 } │ │ │ │ │ +320 │ │ │ │ │ +321 const Implementation* _impl; │ │ │ │ │ +322 │ │ │ │ │ +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 backend.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(referenceToKuhn(local, getPermutation │ │ │ │ │ -((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::_C_o_d_i_m:: │ │ │ │ │ -SubEntityIterator │ │ │ │ │ -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 SubEntityIterator _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(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 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 │ │ │ │ │ -_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.... │ │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ +325 } │ │ │ │ │ +326 │ │ │ │ │ +327} │ │ │ │ │ +328 │ │ │ │ │ +329 │ │ │ │ │ +330#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:21 │ │ │ │ │ -_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:336 │ │ │ │ │ -_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:394 │ │ │ │ │ -_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 │ │ │ │ │ +_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_:_:_v_o_l_u_m_e │ │ │ │ │ +CoordinateField volume() const │ │ │ │ │ +obtain the volume 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_:_:_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:271 │ │ │ │ │ +_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:292 │ │ │ │ │ +_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 │ │ │ │ │ +decltype(auto) type(int i, int c) const │ │ │ │ │ +obtain the type of subentity (i,c) │ │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:171 │ │ │ │ │ +_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_o_r_d_i_n_a_t_e │ │ │ │ │ +typename Implementation::Coordinate Coordinate │ │ │ │ │ +The coordinate type. │ │ │ │ │ +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:234 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_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_:_:_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_:_:_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_:_:_C_o_d_i_m_:_:_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_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 │ │ │ │ │ -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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_:_:_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_<_ _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_:_:_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_<_ _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_:_:_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 │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:433 │ │ │ │ │ +The dimension of the reference element. │ │ │ │ │ +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_:_:_c_t_y_p_e │ │ │ │ │ +typename Implementation::ctype ctype │ │ │ │ │ +The coordinate field type. │ │ │ │ │ +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 │ │ │ │ │ +decltype(auto) type() const │ │ │ │ │ +obtain the type of this reference element │ │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:184 │ │ │ │ │ +_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:280 │ │ │ │ │ +_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:216 │ │ │ │ │ +_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_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ │ +ctype CoordinateField │ │ │ │ │ +The coordinate field type. │ │ │ │ │ +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:286 │ │ │ │ │ +_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 │ │ │ │ │ +decltype(auto) position(int i, int c) const │ │ │ │ │ +position of the barycenter of entity (i,c) │ │ │ │ │ +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 │ │ │ │ │ +decltype(auto) integrationOuterNormal(int face) const │ │ │ │ │ +obtain the integration outer normal of the reference element │ │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:258 │ │ │ │ │ +_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:298 │ │ │ │ │ +_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_:_:_V_o_l_u_m_e │ │ │ │ │ +ctype Volume │ │ │ │ │ +Type used for 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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: hcubetriangulation.cc File Reference │ │ │ │ +dune-geometry: refinement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,82 +65,34 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
hcubetriangulation.cc File Reference
│ │ │ │ +
refinement.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

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

│ │ │ │ -
#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include "base.cc"
│ │ │ │ -#include "simplex.cc"
│ │ │ │ +
#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::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::HCubeTriangulation
 This namespace contains the Refinement implementation for triangulating hypercubes (GeometryType::cube -> GeometryType::simplex)
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Macros

#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_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_HCUBETRIANGULATION_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,55 +1,21 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -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" │ │ │ │ │ +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_:_:_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_ _> │ │ │ │ │ -  │ │ │ │ │ -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_:_:_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_:_:_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_:_:_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_:_:_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 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___H_C_U_B_E_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ │ -  │ │ │ │ │ ********** 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 │ │ │ │ │ +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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: hcubetriangulation.cc Source File │ │ │ │ +dune-geometry: refinement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,508 +70,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hcubetriangulation.cc
│ │ │ │ +
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 (C) DUNE 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_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
30#include <dune/geometry/type.hh>
│ │ │ │ -
31
│ │ │ │ -
32#include "base.cc"
│ │ │ │ -
33#include "simplex.cc"
│ │ │ │ -
34
│ │ │ │ -
35namespace Dune
│ │ │ │ -
36{
│ │ │ │ -
37 namespace RefinementImp
│ │ │ │ -
38 {
│ │ │ │ -
│ │ │ │ -
46 namespace HCubeTriangulation {
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
92 };
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
94 template<int dimension, class CoordType>
│ │ │ │ -
95 template<int codimension>
│ │ │ │ -
│ │ │ │ -
96 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ │ -
97 {
│ │ │ │ -
98 class SubEntityIterator;
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ -
161 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
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;
│ │ │ │ -
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),
│ │ │ │ -
189 backend(BackendRefinement::vBegin(nIntervals_)),
│ │ │ │ -
190 backendEnd(BackendRefinement::vEnd(nIntervals_))
│ │ │ │ -
191 {
│ │ │ │ -
192 if (end)
│ │ │ │ -
193 kuhnIndex = nKuhnSimplices;
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
196 template<int dimension, class CoordType>
│ │ │ │ -
197 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 ++backend;
│ │ │ │ -
202 if (backend == backendEnd)
│ │ │ │ -
203 {
│ │ │ │ -
204 backend = BackendRefinement::vBegin(nIntervals_);
│ │ │ │ -
205 ++kuhnIndex;
│ │ │ │ -
206 }
│ │ │ │ -
207 }
│ │ │ │ -
│ │ │ │ -
208
│ │ │ │ -
209 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
212 coords() const
│ │ │ │ -
213 {
│ │ │ │ -
214 return referenceToKuhn(backend.coords(), getPermutation<dimension>(kuhnIndex));
│ │ │ │ -
215 }
│ │ │ │ -
│ │ │ │ -
216
│ │ │ │ -
217 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
220 {
│ │ │ │ -
221 std::vector<CoordVector> corners(1);
│ │ │ │ -
222 corners[0] = referenceToKuhn(backend.coords(), getPermutation<dimension>(kuhnIndex));
│ │ │ │ -
223 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ -
224 }
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
226 template<int dimension, class CoordType>
│ │ │ │ -
227 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
229 index() const
│ │ │ │ -
230 {
│ │ │ │ -
231 return kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.index();
│ │ │ │ -
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();
│ │ │ │ -
248
│ │ │ │ -
249 IndexVector vertexIndices() const;
│ │ │ │ -
250 int index() const;
│ │ │ │ -
251 CoordVector coords() const;
│ │ │ │ -
252
│ │ │ │ -
253 Geometry geometry() const;
│ │ │ │ +
250// The interface (template<...> class StaticRefinement) is not included here
│ │ │ │ +
251// since it derives from parts which I consider implementation. Look
│ │ │ │ +
252// into refinement/base.cc if the documentation is above is not enough.
│ │ │ │ +
253#include "refinement/base.cc"
│ │ │ │
254
│ │ │ │ -
255 private:
│ │ │ │ -
256 CoordVector global(const CoordVector &local) const;
│ │ │ │ -
257
│ │ │ │ -
258 protected:
│ │ │ │ - │ │ │ │ -
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),
│ │ │ │ -
274 backend(BackendRefinement::eBegin(nIntervals_)),
│ │ │ │ -
275 backendEnd(BackendRefinement::eEnd(nIntervals_))
│ │ │ │ -
276 {
│ │ │ │ -
277 if (end)
│ │ │ │ -
278 kuhnIndex = nKuhnSimplices;
│ │ │ │ -
279 }
│ │ │ │ -
│ │ │ │ -
280 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
283 : nIntervals_(other.nIntervals_), kuhnIndex(other.kuhnIndex),
│ │ │ │ -
284 backend(other.backend),
│ │ │ │ -
285 backendEnd(other.backendEnd)
│ │ │ │ -
286 {}
│ │ │ │ -
│ │ │ │ -
287
│ │ │ │ -
288 template<int dimension, class CoordType>
│ │ │ │ -
289 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
292 {
│ │ │ │ -
293 ++backend;
│ │ │ │ -
294 if (backend == backendEnd)
│ │ │ │ -
295 {
│ │ │ │ -
296 backend = BackendRefinement::eBegin(nIntervals_);
│ │ │ │ -
297 ++kuhnIndex;
│ │ │ │ -
298 }
│ │ │ │ -
299 }
│ │ │ │ -
│ │ │ │ -
300
│ │ │ │ -
301 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
304 vertexIndices() const
│ │ │ │ -
305 {
│ │ │ │ -
306 IndexVector indices = backend.vertexIndices();
│ │ │ │ -
307
│ │ │ │ -
308 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_);
│ │ │ │ -
309 indices += base;
│ │ │ │ -
310
│ │ │ │ -
311 return indices;
│ │ │ │ -
312 }
│ │ │ │ -
│ │ │ │ -
313
│ │ │ │ -
314 template<int dimension, class CoordType>
│ │ │ │ -
315 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
317 index() const
│ │ │ │ -
318 {
│ │ │ │ -
319 return kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.index();
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ -
360 typedef SubEntityIterator This;
│ │ │ │ -
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 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
│ │ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ -
Definition affinegeometry.hh:21
│ │ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:336
│ │ │ │ -
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:394
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition hcubetriangulation.cc:260
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:359
│ │ │ │ -
SubEntityIterator This
Definition hcubetriangulation.cc:360
│ │ │ │ - │ │ │ │ +
255#include "refinement/hcube.cc"
│ │ │ │ +
256#include "refinement/simplex.cc"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
260
│ │ │ │ +
261#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,588 +1,44 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +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 (C) DUNE 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_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -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 HCubeTriangulation { │ │ │ │ │ -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 │ │ │ │ │ -80 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ -81 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ -82 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ -83 │ │ │ │ │ -84 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ -85 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_> _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ -92 }; │ │ │ │ │ -93 │ │ │ │ │ -94 template │ │ │ │ │ -95 template │ │ │ │ │ -_9_6 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ -97 { │ │ │ │ │ -98 class SubEntityIterator; │ │ │ │ │ -_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 BackendRefinement::nVertices(nIntervals) * factorial(int │ │ │ │ │ -(dimension)); │ │ │ │ │ -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 BackendRefinement::nElements(nIntervals) * factorial(int │ │ │ │ │ -(dimension)); │ │ │ │ │ -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 Refinement::CoordVector _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 increment(); │ │ │ │ │ -167 │ │ │ │ │ -168 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -169 │ │ │ │ │ -170 _G_e_o_m_e_t_r_y geometry() const; │ │ │ │ │ -171 │ │ │ │ │ -172 int index() 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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ -189 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(nIntervals_)), │ │ │ │ │ -190 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(nIntervals_)) │ │ │ │ │ -191 { │ │ │ │ │ -192 if (end) │ │ │ │ │ -193 kuhnIndex = nKuhnSimplices; │ │ │ │ │ -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 ++backend; │ │ │ │ │ -202 if (backend == backendEnd) │ │ │ │ │ -203 { │ │ │ │ │ -204 backend = BackendRefinement::vBegin(nIntervals_); │ │ │ │ │ -205 ++kuhnIndex; │ │ │ │ │ -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 return referenceToKuhn(backend.coords(), getPermutation │ │ │ │ │ -(kuhnIndex)); │ │ │ │ │ -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_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 │ │ │ │ │ -220 { │ │ │ │ │ -221 std::vector corners(1); │ │ │ │ │ -222 corners[0] = referenceToKuhn(backend.coords(), getPermutation │ │ │ │ │ -(kuhnIndex)); │ │ │ │ │ -223 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, 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 kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.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 nIntervals_, 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 increment(); │ │ │ │ │ -248 │ │ │ │ │ -249 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -250 int index() const; │ │ │ │ │ -251 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -252 │ │ │ │ │ -253 _G_e_o_m_e_t_r_y geometry() const; │ │ │ │ │ +250// The interface (template<...> class StaticRefinement) is not included here │ │ │ │ │ +251// since it derives from parts which I consider implementation. Look │ │ │ │ │ +252// into refinement/base.cc if the documentation is above is not enough. │ │ │ │ │ +253#include "_r_e_f_i_n_e_m_e_n_t_/_b_a_s_e_._c_c" │ │ │ │ │ 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 _R_e_f_i_n_e_m_e_n_t_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t _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_1 constexpr static int nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ -274 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(nIntervals_)), │ │ │ │ │ -275 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(nIntervals_)) │ │ │ │ │ -276 { │ │ │ │ │ -277 if (end) │ │ │ │ │ -278 kuhnIndex = nKuhnSimplices; │ │ │ │ │ -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 : nIntervals_(other.nIntervals_), kuhnIndex(other.kuhnIndex), │ │ │ │ │ -284 backend(other.backend), │ │ │ │ │ -285 backendEnd(other.backendEnd) │ │ │ │ │ -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 ++backend; │ │ │ │ │ -294 if (backend == backendEnd) │ │ │ │ │ -295 { │ │ │ │ │ -296 backend = BackendRefinement::eBegin(nIntervals_); │ │ │ │ │ -297 ++kuhnIndex; │ │ │ │ │ -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 = backend.vertexIndices(); │ │ │ │ │ -307 │ │ │ │ │ -308 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_); │ │ │ │ │ -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 kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.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(backend.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 backend.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 referenceToKuhn(local, getPermutation(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::_C_o_d_i_m:: │ │ │ │ │ -SubEntityIterator │ │ │ │ │ -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 SubEntityIterator _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_>_:_: │ │ │ │ │ -_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(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 { 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 │ │ │ │ │ -397#ifndef DOXYGEN │ │ │ │ │ -398 template │ │ │ │ │ -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 Imp; │ │ │ │ │ -412 }; │ │ │ │ │ -413#endif │ │ │ │ │ -414 │ │ │ │ │ -415 } // namespace RefinementImp │ │ │ │ │ -416} // namespace Dune │ │ │ │ │ -417 │ │ │ │ │ -418#endif // DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ │ +255#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_._c_c" │ │ │ │ │ +256#include "_r_e_f_i_n_e_m_e_n_t_/_s_i_m_p_l_e_x_._c_c" │ │ │ │ │ +257#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" │ │ │ │ │ +258#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" │ │ │ │ │ +259#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" │ │ │ │ │ +260 │ │ │ │ │ +261#endif // DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ │ +_p_y_r_a_m_i_d_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. │ │ │ │ │ +_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ │ _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 │ │ │ │ │ -_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:21 │ │ │ │ │ -_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:336 │ │ │ │ │ -_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:394 │ │ │ │ │ -_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_:_:_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_:_:_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 │ │ │ │ │ -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_:_:_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_:_:_C_o_d_i_m_:_:_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_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_ _>_:_:_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 │ │ │ │ │ -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 │ │ │ │ │ -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 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_ _>_:_:_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_,_ _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_ _>_:_:_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_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 │ │ │ │ │ -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_ _>_:_:_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__ │ │ │ │ │ -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 │ │ │ │ │ -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_:_:_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_<_ _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_:_:_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_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_<_ _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_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:433 │ │ │ │ │ +_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,... │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: simplex.cc File Reference │ │ │ │ +dune-geometry: typefromvertexcount.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,111 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces | │ │ │ │ -Macros
│ │ │ │ -
simplex.cc File Reference
│ │ │ │ +Functions
│ │ │ │ +
typefromvertexcount.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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

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

│ │ │ │ Functions

Utilities
int Dune::RefinementImp::Simplex::factorial (int n)
 Calculate n!
 
int Dune::RefinementImp::Simplex::binomial (int upper, int lower)
 calculate $\left({upper}\atop{lower}\right)$
 
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.
 
GeometryType Dune::geometryTypeFromVertexCount (unsigned int dim, unsigned int vertices)
 Utitlity function to construct the correct geometry type given the dimension and the number of vertices.
 
│ │ │ │ -

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_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,95 +1,22 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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> │ │ │ │ │ + * _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> │ │ │ │ │ -#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_ _> │ │ │ │ │ -  │ │ │ │ │ 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 │ │ │ │ │ -  │ │ │ │ │ FFuunnccttiioonnss │ │ │ │ │ -Utilities │ │ │ │ │ - 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_:_:_f_a_c_t_o_r_i_a_l │ │ │ │ │ - (int n) │ │ │ │ │ -  Calculate n! │ │ │ │ │ -  │ │ │ │ │ - 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_:_:_b_i_n_o_m_i_a_l │ │ │ │ │ - (int upper, int lower) │ │ │ │ │ -  calculate[$\left({upper}\atop │ │ │ │ │ - {lower}\right)$] │ │ │ │ │ -  │ │ │ │ │ -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. │ │ │ │ │ +_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) │ │ │ │ │ +  Utitlity function to construct the correct geometry type given │ │ │ │ │ + the dimension and the number of vertices. │ │ │ │ │   │ │ │ │ │ -********** 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__GGRRIIDD__CCOOMMMMOONN__RREEFFIINNEEMMEENNTT__SSIIMMPPLLEEXX__CCCC ********** │ │ │ │ │ -#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: simplex.cc Source File │ │ │ │ +dune-geometry: typefromvertexcount.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,676 +70,77 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
simplex.cc
│ │ │ │ +
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 (C) DUNE 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_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ │
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
│ │ │ │ -
251#include <algorithm>
│ │ │ │ -
252
│ │ │ │ -
253#include <dune/common/fvector.hh>
│ │ │ │ -
254#include <dune/common/math.hh>
│ │ │ │ -
255
│ │ │ │ - │ │ │ │ - │ │ │ │ -
258#include <dune/geometry/type.hh>
│ │ │ │ -
259
│ │ │ │ -
260#include "base.cc"
│ │ │ │ -
261
│ │ │ │ -
262namespace Dune {
│ │ │ │ -
263
│ │ │ │ -
264 namespace RefinementImp {
│ │ │ │ -
265
│ │ │ │ -
│ │ │ │ -
272 namespace Simplex {
│ │ │ │ -
273
│ │ │ │ -
274 // //////////////////
│ │ │ │ -
275 //
│ │ │ │ -
277 //
│ │ │ │ -
278
│ │ │ │ -
280
│ │ │ │ -
288 [[deprecated("Use factorial from dune-common's math.hh")]]
│ │ │ │ -
│ │ │ │ -
289 inline int factorial(int n)
│ │ │ │ -
290 {
│ │ │ │ -
291 int prod = 1;
│ │ │ │ -
292 for(int i = 1; i <= n; ++i)
│ │ │ │ -
293 prod *= i;
│ │ │ │ -
294 return prod;
│ │ │ │ -
295 }
│ │ │ │ -
│ │ │ │ -
296
│ │ │ │ -
304 [[deprecated("Use binomial from dune-common's math.hh")]]
│ │ │ │ -
│ │ │ │ -
305 inline int binomial(int upper, int lower)
│ │ │ │ -
306 {
│ │ │ │ -
307 lower = std::min( lower, upper - lower );
│ │ │ │ -
308 if(lower < 0)
│ │ │ │ -
309 return 0;
│ │ │ │ -
310 int prod = 1;
│ │ │ │ -
311 for(int i = upper - lower; i < upper; ++i)
│ │ │ │ -
312 prod *= (i+1);
│ │ │ │ -
313 return prod / Dune::factorial(lower);
│ │ │ │ -
314 }
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
322 template<int dimension>
│ │ │ │ -
│ │ │ │ -
323 int pointIndex(const FieldVector<int, dimension> &point)
│ │ │ │ -
324 {
│ │ │ │ -
325 int index = 0;
│ │ │ │ -
326 for(int i = 0; i < dimension; ++i)
│ │ │ │ -
327 index += Dune::binomial(dimension-i + point[i]-1, dimension-i);
│ │ │ │ -
328 return index;
│ │ │ │ -
329 }
│ │ │ │ -
│ │ │ │ -
330
│ │ │ │ -
335 template<int n>
│ │ │ │ -
│ │ │ │ -
336 FieldVector<int, n> getPermutation(int m)
│ │ │ │ -
337 {
│ │ │ │ -
338 FieldVector<int, n> perm;
│ │ │ │ -
339 for(int i = 0; i < n; ++i)
│ │ │ │ -
340 perm[i] = i;
│ │ │ │ -
341
│ │ │ │ -
342 int base = 1;
│ │ │ │ -
343 for(int i = 1; i <= n; ++i)
│ │ │ │ -
344 base *= i;
│ │ │ │ -
345
│ │ │ │ -
346 for(int i = n; i > 0; --i) {
│ │ │ │ -
347 base /= i;
│ │ │ │ -
348 int d = m / base;
│ │ │ │ -
349 m %= base;
│ │ │ │ -
350 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t;
│ │ │ │ -
351 }
│ │ │ │ -
352 return perm;
│ │ │ │ -
353 }
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
355#if 0
│ │ │ │ -
356 Has to be checked
│ │ │ │ -
357 // calculate the index of a permutation
│ │ │ │ -
358 template<int n>
│ │ │ │ -
359 int getPermIndex(const FieldVector<int, n>& test) // O(n^2)
│ │ │ │ -
360 {
│ │ │ │ -
361 int m = 0;
│ │ │ │ -
362 FieldVector<int, n> perm;
│ │ │ │ -
363 for(int i = 0; i < n; ++i)
│ │ │ │ -
364 perm[i] = i;
│ │ │ │ -
365
│ │ │ │ -
366 int base = 1;
│ │ │ │ -
367 for(int i = 1; i <= n; ++i)
│ │ │ │ -
368 base *= i;
│ │ │ │ -
369
│ │ │ │ -
370 for(int i = n; i > 0; --i) {
│ │ │ │ -
371 base /= i;
│ │ │ │ -
372 int d;
│ │ │ │ -
373 for(d = 0; d < i; ++d)
│ │ │ │ -
374 if(test[i-1] == perm[i-1-d])
│ │ │ │ -
375 break;
│ │ │ │ -
376 m += d * base;
│ │ │ │ -
377 int d = m / base;
│ │ │ │ -
378 m %= base;
│ │ │ │ -
379 perm[i-1-d] = perm[i-1];
│ │ │ │ -
380 }
│ │ │ │ -
381 }
│ │ │ │ -
382#endif
│ │ │ │ -
383
│ │ │ │ -
384 // map between the reference simplex and some arbitrary kuhn simplex (denoted by it's permutation)
│ │ │ │ -
392 template<int dimension, class CoordType>
│ │ │ │ -
393 FieldVector<CoordType, dimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
395 FieldVector<CoordType, dimension> point,
│ │ │ │ -
397 const FieldVector<int, dimension> &kuhn)
│ │ │ │ -
398 {
│ │ │ │ -
399 for(int i = dimension - 1; i > 0; --i)
│ │ │ │ -
400 point[kuhn[i-1]] += point[kuhn[i]];
│ │ │ │ -
401 return point;
│ │ │ │ -
402 }
│ │ │ │ -
│ │ │ │ -
403
│ │ │ │ -
411 template<int dimension, class CoordType>
│ │ │ │ -
412 FieldVector<CoordType, dimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
414 FieldVector<CoordType, dimension> point,
│ │ │ │ -
416 const FieldVector<int, dimension> &kuhn)
│ │ │ │ -
417 {
│ │ │ │ -
418 for(int i = 0; i < dimension - 1; ++i)
│ │ │ │ -
419 point[kuhn[i]] -= point[kuhn[i+1]];
│ │ │ │ -
420 return point;
│ │ │ │ -
421 }
│ │ │ │ -
│ │ │ │ -
422
│ │ │ │ -
423
│ │ │ │ -
425
│ │ │ │ -
426 // /////////////////////////////////////////
│ │ │ │ -
427 //
│ │ │ │ -
428 // refinement implementation for simplices
│ │ │ │ -
429 //
│ │ │ │ -
430
│ │ │ │ -
431 template<int dimension_, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
433 {
│ │ │ │ -
434 public:
│ │ │ │ -
435 constexpr static int dimension = dimension_;
│ │ │ │ -
436 typedef CoordType ctype;
│ │ │ │ -
437
│ │ │ │ -
438 template<int codimension>
│ │ │ │ -
439 struct Codim;
│ │ │ │ - │ │ │ │ -
441 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ │ - │ │ │ │ -
443 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ │ -
444
│ │ │ │ -
445 static int nVertices(int nIntervals);
│ │ │ │ -
446 static VertexIterator vBegin(int nIntervals);
│ │ │ │ -
447 static VertexIterator vEnd(int nIntervals);
│ │ │ │ -
448
│ │ │ │ -
449 static int nElements(int nIntervals);
│ │ │ │ -
450 static ElementIterator eBegin(int nIntervals);
│ │ │ │ -
451 static ElementIterator eEnd(int nIntervals);
│ │ │ │ -
452 };
│ │ │ │ -
│ │ │ │ -
453
│ │ │ │ -
454 template<int dimension, class CoordType>
│ │ │ │ -
455 template<int codimension>
│ │ │ │ -
│ │ │ │ -
456 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ │ -
457 {
│ │ │ │ -
458 class SubEntityIterator;
│ │ │ │ -
459 // We don't need the caching, but the uncached MultiLinearGeometry has bug FS#1209
│ │ │ │ - │ │ │ │ -
461 };
│ │ │ │ -
│ │ │ │ -
462
│ │ │ │ -
463 template<int dimension, class CoordType>
│ │ │ │ -
464 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
466 nVertices(int nIntervals)
│ │ │ │ -
467 {
│ │ │ │ -
468 return Dune::binomial(dimension + nIntervals, (int)dimension);
│ │ │ │ -
469 }
│ │ │ │ -
│ │ │ │ -
470
│ │ │ │ -
471 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
474 vBegin(int nIntervals)
│ │ │ │ -
475 {
│ │ │ │ -
476 return VertexIterator(nIntervals);
│ │ │ │ -
477 }
│ │ │ │ -
│ │ │ │ -
478
│ │ │ │ -
479 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
482 vEnd(int nIntervals)
│ │ │ │ -
483 {
│ │ │ │ -
484 return VertexIterator(nIntervals, true);
│ │ │ │ -
485 }
│ │ │ │ -
│ │ │ │ -
486
│ │ │ │ -
487 template<int dimension, class CoordType>
│ │ │ │ -
488 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
490 nElements(int nIntervals)
│ │ │ │ -
491 {
│ │ │ │ -
492 return Dune::power(nIntervals, int(dimension));
│ │ │ │ -
493 }
│ │ │ │ -
│ │ │ │ -
494
│ │ │ │ -
495 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
498 eBegin(int nIntervals)
│ │ │ │ -
499 {
│ │ │ │ -
500 return ElementIterator(nIntervals);
│ │ │ │ -
501 }
│ │ │ │ -
│ │ │ │ -
502
│ │ │ │ -
503 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
506 eEnd(int nIntervals)
│ │ │ │ -
507 {
│ │ │ │ -
508 return ElementIterator(nIntervals, true);
│ │ │ │ -
509 }
│ │ │ │ -
│ │ │ │ -
510
│ │ │ │ -
511 // //////////////
│ │ │ │ -
512 //
│ │ │ │ -
513 // The iterator
│ │ │ │ -
514 //
│ │ │ │ -
515
│ │ │ │ -
516 template<int dimension, class CoordType, int codimension>
│ │ │ │ - │ │ │ │ -
518
│ │ │ │ -
519 // vertices
│ │ │ │ -
520
│ │ │ │ -
521 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
522 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ │ -
523 {
│ │ │ │ -
524 public:
│ │ │ │ - │ │ │ │ -
526 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
527 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ │ - │ │ │ │ -
529
│ │ │ │ -
530 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ │ -
531
│ │ │ │ -
532 void increment();
│ │ │ │ -
533 bool equals(const This &other) const;
│ │ │ │ -
534
│ │ │ │ -
535 CoordVector coords() const;
│ │ │ │ -
536 Geometry geometry () const;
│ │ │ │ -
537
│ │ │ │ -
538 int index() const;
│ │ │ │ -
539 protected:
│ │ │ │ -
540 typedef FieldVector<int, dimension> Vertex;
│ │ │ │ -
541
│ │ │ │ -
542 int size;
│ │ │ │ - │ │ │ │ -
544 };
│ │ │ │ -
│ │ │ │ -
545
│ │ │ │ -
546 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
548 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ │ -
549 : size(nIntervals)
│ │ │ │ -
550 {
│ │ │ │ -
551 vertex[0] = (end) ? size + 1 : 0;
│ │ │ │ -
552 for(int i = 1; i < dimension; ++ i)
│ │ │ │ -
553 vertex[i] = 0;
│ │ │ │ -
554 }
│ │ │ │ -
│ │ │ │ -
555
│ │ │ │ -
556 template<int dimension, class CoordType>
│ │ │ │ -
557 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
560 {
│ │ │ │ -
561 assert(vertex[0] <= size);
│ │ │ │ -
562 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ │ -
563 ++vertex[i];
│ │ │ │ -
564 if(i == 0 || vertex[i] <= vertex[i-1])
│ │ │ │ -
565 break;
│ │ │ │ -
566 else
│ │ │ │ -
567 vertex[i] = 0;
│ │ │ │ -
568 }
│ │ │ │ -
569 }
│ │ │ │ -
│ │ │ │ -
570
│ │ │ │ -
571 template<int dimension, class CoordType>
│ │ │ │ -
572 bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
574 equals(const This &other) const
│ │ │ │ -
575 {
│ │ │ │ -
576 return size == other.size && vertex == other.vertex;
│ │ │ │ -
577 }
│ │ │ │ -
│ │ │ │ -
578
│ │ │ │ -
579 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
582 coords() const
│ │ │ │ -
583 {
│ │ │ │ -
584 Vertex ref = kuhnToReference(vertex, getPermutation<dimension>(0));
│ │ │ │ -
585
│ │ │ │ -
586 CoordVector coords;
│ │ │ │ -
587 for(int i = 0; i < dimension; ++i)
│ │ │ │ -
588 coords[i] = CoordType(ref[i]) / size;
│ │ │ │ -
589 return coords;
│ │ │ │ -
590 }
│ │ │ │ -
│ │ │ │ -
591
│ │ │ │ -
592 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
595 {
│ │ │ │ -
596 std::vector<CoordVector> corners(1);
│ │ │ │ -
597 corners[0] = (CoordVector)vertex;
│ │ │ │ -
598 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ -
599 }
│ │ │ │ -
│ │ │ │ -
600
│ │ │ │ -
601 template<int dimension, class CoordType>
│ │ │ │ -
602 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
604 index() const
│ │ │ │ -
605 {
│ │ │ │ -
606 return pointIndex(vertex);
│ │ │ │ -
607 }
│ │ │ │ -
│ │ │ │ -
608
│ │ │ │ -
609 // elements
│ │ │ │ -
610
│ │ │ │ -
611 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
612 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ │ -
613 {
│ │ │ │ -
614 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
618 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ │ - │ │ │ │ -
620
│ │ │ │ -
621 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ │ -
622
│ │ │ │ -
623 void increment();
│ │ │ │ -
624 bool equals(const This &other) const;
│ │ │ │ -
625
│ │ │ │ -
626 IndexVector vertexIndices() const;
│ │ │ │ -
627 int index() const;
│ │ │ │ -
628 CoordVector coords() const;
│ │ │ │ -
629
│ │ │ │ -
630 Geometry geometry () const;
│ │ │ │ -
631
│ │ │ │ -
632 private:
│ │ │ │ -
633 CoordVector global(const CoordVector &local) const;
│ │ │ │ -
634
│ │ │ │ -
635 protected:
│ │ │ │ -
636 typedef FieldVector<int, dimension> Vertex;
│ │ │ │ -
637 constexpr static int nKuhnIntervals = Dune::factorial(dimension);
│ │ │ │ -
638
│ │ │ │ - │ │ │ │ - │ │ │ │ -
641 int size;
│ │ │ │ - │ │ │ │ -
643 };
│ │ │ │ -
│ │ │ │ -
644
│ │ │ │ -
645 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
647 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ │ -
648 : kuhnIndex(0), size(nIntervals), index_(0)
│ │ │ │ -
649 {
│ │ │ │ -
650 for(int i = 0; i < dimension; ++i)
│ │ │ │ -
651 origin[i] = 0;
│ │ │ │ -
652 if(end) {
│ │ │ │ -
653 index_ = Refinement::nElements(nIntervals);
│ │ │ │ -
654 origin[0] = size;
│ │ │ │ -
655 }
│ │ │ │ -
656 }
│ │ │ │ -
│ │ │ │ -
657
│ │ │ │ -
658 template<int dimension, class CoordType>
│ │ │ │ -
659 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
662 {
│ │ │ │ -
663 assert(origin[0] < size);
│ │ │ │ -
664
│ │ │ │ -
665 ++index_;
│ │ │ │ -
666
│ │ │ │ -
667 while(1) {
│ │ │ │ -
668 ++kuhnIndex;
│ │ │ │ -
669 if(kuhnIndex == nKuhnIntervals) {
│ │ │ │ -
670 kuhnIndex = 0;
│ │ │ │ -
671 // increment origin
│ │ │ │ -
672 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ │ -
673 ++origin[i];
│ │ │ │ -
674 if(i == 0 || origin[i] <= origin[i-1])
│ │ │ │ -
675 break;
│ │ │ │ -
676 else
│ │ │ │ -
677 origin[i] = 0;
│ │ │ │ -
678 }
│ │ │ │ -
679 }
│ │ │ │ -
680
│ │ │ │ -
681 // test whether the current simplex has any corner outside the kuhn0 simplex
│ │ │ │ -
682 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ │ -
683 Vertex corner = origin;
│ │ │ │ -
684 bool outside = false;
│ │ │ │ -
685 for(int i = 0; i < dimension; ++i) {
│ │ │ │ -
686 // next corner
│ │ │ │ -
687 ++corner[perm[i]];
│ │ │ │ -
688 if(perm[i] > 0)
│ │ │ │ -
689 if(corner[perm[i]] > corner[perm[i]-1]) {
│ │ │ │ -
690 outside = true;
│ │ │ │ -
691 break;
│ │ │ │ -
692 }
│ │ │ │ -
693 }
│ │ │ │ -
694 if(!outside)
│ │ │ │ -
695 return;
│ │ │ │ -
696 }
│ │ │ │ -
697 }
│ │ │ │ -
│ │ │ │ -
698
│ │ │ │ -
699 template<int dimension, class CoordType>
│ │ │ │ -
700 bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
702 equals(const This &other) const
│ │ │ │ -
703 {
│ │ │ │ -
704 return size == other.size && index_ == other.index_;
│ │ │ │ -
705 }
│ │ │ │ -
│ │ │ │ -
706
│ │ │ │ -
707 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
710 vertexIndices() const
│ │ │ │ -
711 {
│ │ │ │ -
712 IndexVector indices;
│ │ │ │ -
713 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ │ -
714 Vertex vertex = origin;
│ │ │ │ -
715 indices[0] = pointIndex(vertex);
│ │ │ │ -
716 for(int i = 0; i < dimension; ++i) {
│ │ │ │ -
717 ++vertex[perm[i]];
│ │ │ │ -
718 indices[i+1] = pointIndex(vertex);
│ │ │ │ -
719 }
│ │ │ │ -
720 if (kuhnIndex%2 == 1)
│ │ │ │ -
721 for(int i = 0; i < (dimension+1)/2; ++i) {
│ │ │ │ -
722 int t = indices[i];
│ │ │ │ -
723 indices[i] = indices[dimension-i];
│ │ │ │ -
724 indices[dimension-i] = t;
│ │ │ │ -
725 }
│ │ │ │ -
726 return indices;
│ │ │ │ -
727 }
│ │ │ │ -
│ │ │ │ -
728
│ │ │ │ -
729 template<int dimension, class CoordType>
│ │ │ │ -
730 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
732 index() const
│ │ │ │ -
733 {
│ │ │ │ -
734 return index_;
│ │ │ │ -
735 }
│ │ │ │ -
│ │ │ │ -
736
│ │ │ │ -
737 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
740 coords() const
│ │ │ │ -
741 {
│ │ │ │ - │ │ │ │ -
743 ::simplex().position(0,0));
│ │ │ │ -
744 }
│ │ │ │ -
│ │ │ │ -
745
│ │ │ │ -
746 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
749 {
│ │ │ │ -
750 std::vector<CoordVector> corners(dimension+1);
│ │ │ │ - │ │ │ │ -
752 for(int i = 0; i <= dimension; ++i)
│ │ │ │ -
753 corners[i] = global(refelem.position(i, dimension));
│ │ │ │ -
754 return Geometry(refelem.type(), corners);
│ │ │ │ -
755 }
│ │ │ │ -
│ │ │ │ -
756
│ │ │ │ -
757 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
760 global(const CoordVector &local) const {
│ │ │ │ -
761 CoordVector v =
│ │ │ │ -
762 referenceToKuhn(local, getPermutation<dimension>(kuhnIndex));
│ │ │ │ -
763 v += origin;
│ │ │ │ -
764 v /= (typename CoordVector::value_type)size;
│ │ │ │ -
765 return kuhnToReference(v, getPermutation<dimension>(0));
│ │ │ │ -
766 }
│ │ │ │ -
767
│ │ │ │ -
768 // common
│ │ │ │ -
769
│ │ │ │ -
770 template<int dimension, class CoordType>
│ │ │ │ -
771 template<int codimension>
│ │ │ │ -
│ │ │ │ -
772 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ │ -
773 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ -
774 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ -
775 {
│ │ │ │ -
776 public:
│ │ │ │ - │ │ │ │ -
778
│ │ │ │ -
779 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ │ -
780 };
│ │ │ │ -
│ │ │ │ -
781
│ │ │ │ -
782#ifndef DOXYGEN
│ │ │ │ -
783
│ │ │ │ -
784 template<int dimension, class CoordType>
│ │ │ │ -
785 template<int codimension>
│ │ │ │ - │ │ │ │ -
787 SubEntityIterator(int nIntervals, bool end)
│ │ │ │ -
788 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ │ -
789 {}
│ │ │ │ -
790
│ │ │ │ -
791#endif
│ │ │ │ -
792
│ │ │ │ -
793 } // namespace Simplex
│ │ │ │ -
│ │ │ │ -
794
│ │ │ │ -
795 } // namespace RefinementImp
│ │ │ │ -
796
│ │ │ │ -
797
│ │ │ │ -
798 namespace RefinementImp {
│ │ │ │ -
799
│ │ │ │ -
800 // ///////////////////////
│ │ │ │ -
801 //
│ │ │ │ -
802 // The refinement traits
│ │ │ │ -
803 //
│ │ │ │ -
804
│ │ │ │ -
805#ifndef DOXYGEN
│ │ │ │ -
806 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ │ -
807 int dim>
│ │ │ │ -
808 struct Traits<
│ │ │ │ -
809 topologyId, CoordType, coerceToId, dim,
│ │ │ │ -
810 typename std::enable_if<
│ │ │ │ -
811 ((GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ │ -
812 (topologyId >> 1) &&
│ │ │ │ -
813 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ │ -
814 (coerceToId >> 1)
│ │ │ │ -
815 )>::type
│ │ │ │ -
816 >
│ │ │ │ -
817 {
│ │ │ │ -
818 typedef Simplex::RefinementImp<dim, CoordType> Imp;
│ │ │ │ -
819 };
│ │ │ │ -
820#endif
│ │ │ │ -
821
│ │ │ │ -
822
│ │ │ │ -
823 } // namespace RefinementImp
│ │ │ │ -
824
│ │ │ │ -
825} // namespace Dune
│ │ │ │ -
826
│ │ │ │ -
827#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ - │ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10namespace Dune {
│ │ │ │ +
11
│ │ │ │ +
16 inline
│ │ │ │ +
│ │ │ │ +
17 GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
│ │ │ │ +
18 {
│ │ │ │ +
19 switch (dim)
│ │ │ │ +
20 {
│ │ │ │ +
21 case 0 :
│ │ │ │ +
22 return GeometryTypes::vertex;
│ │ │ │ +
23 case 1 :
│ │ │ │ +
24 return GeometryTypes::line;
│ │ │ │ +
25 case 2 :
│ │ │ │ +
26 switch (vertices) {
│ │ │ │ +
27 case 3 :
│ │ │ │ +
28 return GeometryTypes::triangle;
│ │ │ │ +
29 case 4 :
│ │ │ │ +
30 return GeometryTypes::quadrilateral;
│ │ │ │ +
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 GeometryTypes::tetrahedron;
│ │ │ │ +
38 case 5 :
│ │ │ │ +
39 return GeometryTypes::pyramid;
│ │ │ │ +
40 case 6 :
│ │ │ │ +
41 return GeometryTypes::prism;
│ │ │ │ +
42 case 8 :
│ │ │ │ +
43 return GeometryTypes::hexahedron;
│ │ │ │ +
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.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
int pointIndex(const FieldVector< int, dimension > &point)
calculate the index of a given gridpoint within a Kuhn0 simplex
Definition simplex.cc:323
│ │ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:336
│ │ │ │ -
int factorial(int n)
Calculate n!
Definition simplex.cc:289
│ │ │ │ -
int binomial(int upper, int lower)
calculate
Definition simplex.cc:305
│ │ │ │ -
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:394
│ │ │ │ -
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:413
│ │ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ -
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:204
│ │ │ │ -
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:440
│ │ │ │ -
FieldVector< int, dimension+1 > IndexVector
Definition simplex.cc:443
│ │ │ │ -
CoordType ctype
Definition simplex.cc:436
│ │ │ │ -
static int nVertices(int nIntervals)
Definition simplex.cc:466
│ │ │ │ -
static int nElements(int nIntervals)
Definition simplex.cc:490
│ │ │ │ -
static ElementIterator eEnd(int nIntervals)
Definition simplex.cc:506
│ │ │ │ -
static VertexIterator vEnd(int nIntervals)
Definition simplex.cc:482
│ │ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition simplex.cc:442
│ │ │ │ -
static VertexIterator vBegin(int nIntervals)
Definition simplex.cc:474
│ │ │ │ -
static ElementIterator eBegin(int nIntervals)
Definition simplex.cc:498
│ │ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition simplex.cc:441
│ │ │ │ -
static constexpr int dimension
Definition simplex.cc:435
│ │ │ │ - │ │ │ │ -
Dune::CachedMultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition simplex.cc:460
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:525
│ │ │ │ - │ │ │ │ -
Refinement::template Codim< dimension >::Geometry Geometry
Definition simplex.cc:527
│ │ │ │ -
RefinementIteratorSpecial< dimension, CoordType, dimension > This
Definition simplex.cc:528
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
FieldVector< int, dimension > Vertex
Definition simplex.cc:636
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition simplex.cc:618
│ │ │ │ - │ │ │ │ - │ │ │ │ -
RefinementIteratorSpecial< dimension, CoordType, 0 > This
Definition simplex.cc:619
│ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:615
│ │ │ │ - │ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:777
│ │ │ │ +
GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
Utitlity function to construct the correct geometry type given the dimension and the number of vertic...
Definition typefromvertexcount.hh:17
│ │ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,738 +1,79 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ + * _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 (C) DUNE 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_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ │ 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 │ │ │ │ │ -251#include │ │ │ │ │ -252 │ │ │ │ │ -253#include │ │ │ │ │ -254#include │ │ │ │ │ -255 │ │ │ │ │ -256#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> │ │ │ │ │ -257#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> │ │ │ │ │ -258#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ │ -259 │ │ │ │ │ -260#include "_b_a_s_e_._c_c" │ │ │ │ │ -261 │ │ │ │ │ -262namespace _D_u_n_e { │ │ │ │ │ -263 │ │ │ │ │ -264 namespace RefinementImp { │ │ │ │ │ -265 │ │ │ │ │ -_2_7_2 namespace Simplex { │ │ │ │ │ -273 │ │ │ │ │ -274 // ////////////////// │ │ │ │ │ -275 // │ │ │ │ │ -277 // │ │ │ │ │ -278 │ │ │ │ │ -280 │ │ │ │ │ -288 [[deprecated("Use factorial from dune-common's math.hh")]] │ │ │ │ │ -_2_8_9 inline int _f_a_c_t_o_r_i_a_l(int n) │ │ │ │ │ -290 { │ │ │ │ │ -291 int prod = 1; │ │ │ │ │ -292 for(int i = 1; i <= n; ++i) │ │ │ │ │ -293 prod *= i; │ │ │ │ │ -294 return prod; │ │ │ │ │ -295 } │ │ │ │ │ -296 │ │ │ │ │ -304 [[deprecated("Use binomial from dune-common's math.hh")]] │ │ │ │ │ -_3_0_5 inline int _b_i_n_o_m_i_a_l(int upper, int lower) │ │ │ │ │ -306 { │ │ │ │ │ -307 lower = std::min( lower, upper - lower ); │ │ │ │ │ -308 if(lower < 0) │ │ │ │ │ -309 return 0; │ │ │ │ │ -310 int prod = 1; │ │ │ │ │ -311 for(int i = upper - lower; i < upper; ++i) │ │ │ │ │ -312 prod *= (i+1); │ │ │ │ │ -313 return prod / Dune::factorial(lower); │ │ │ │ │ -314 } │ │ │ │ │ -315 │ │ │ │ │ -322 template │ │ │ │ │ -_3_2_3 int _p_o_i_n_t_I_n_d_e_x(const FieldVector &point) │ │ │ │ │ -324 { │ │ │ │ │ -325 int index = 0; │ │ │ │ │ -326 for(int i = 0; i < dimension; ++i) │ │ │ │ │ -327 index += Dune::binomial(dimension-i + point[i]-1, dimension-i); │ │ │ │ │ -328 return index; │ │ │ │ │ -329 } │ │ │ │ │ -330 │ │ │ │ │ -335 template │ │ │ │ │ -_3_3_6 FieldVector _g_e_t_P_e_r_m_u_t_a_t_i_o_n(int m) │ │ │ │ │ -337 { │ │ │ │ │ -338 FieldVector perm; │ │ │ │ │ -339 for(int i = 0; i < n; ++i) │ │ │ │ │ -340 perm[i] = i; │ │ │ │ │ -341 │ │ │ │ │ -342 int base = 1; │ │ │ │ │ -343 for(int i = 1; i <= n; ++i) │ │ │ │ │ -344 base *= i; │ │ │ │ │ -345 │ │ │ │ │ -346 for(int i = n; i > 0; --i) { │ │ │ │ │ -347 base /= i; │ │ │ │ │ -348 int d = m / base; │ │ │ │ │ -349 m %= base; │ │ │ │ │ -350 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t; │ │ │ │ │ -351 } │ │ │ │ │ -352 return perm; │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -355#if 0 │ │ │ │ │ -356 Has to be checked │ │ │ │ │ -357 // calculate the index of a permutation │ │ │ │ │ -358 template │ │ │ │ │ -359 int getPermIndex(const FieldVector& test) // O(n^2) │ │ │ │ │ -360 { │ │ │ │ │ -361 int m = 0; │ │ │ │ │ -362 FieldVector perm; │ │ │ │ │ -363 for(int i = 0; i < n; ++i) │ │ │ │ │ -364 perm[i] = i; │ │ │ │ │ -365 │ │ │ │ │ -366 int base = 1; │ │ │ │ │ -367 for(int i = 1; i <= n; ++i) │ │ │ │ │ -368 base *= i; │ │ │ │ │ -369 │ │ │ │ │ -370 for(int i = n; i > 0; --i) { │ │ │ │ │ -371 base /= i; │ │ │ │ │ -372 int d; │ │ │ │ │ -373 for(d = 0; d < i; ++d) │ │ │ │ │ -374 if(test[i-1] == perm[i-1-d]) │ │ │ │ │ -375 break; │ │ │ │ │ -376 m += d * base; │ │ │ │ │ -377 int d = m / base; │ │ │ │ │ -378 m %= base; │ │ │ │ │ -379 perm[i-1-d] = perm[i-1]; │ │ │ │ │ -380 } │ │ │ │ │ -381 } │ │ │ │ │ -382#endif │ │ │ │ │ -383 │ │ │ │ │ -384 // map between the reference simplex and some arbitrary kuhn simplex │ │ │ │ │ -(denoted by it's permutation) │ │ │ │ │ -392 template │ │ │ │ │ -393 FieldVector │ │ │ │ │ -_3_9_4 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n( │ │ │ │ │ -395 FieldVector point, │ │ │ │ │ -397 const FieldVector &kuhn) │ │ │ │ │ -398 { │ │ │ │ │ -399 for(int i = dimension - 1; i > 0; --i) │ │ │ │ │ -400 point[kuhn[i-1]] += point[kuhn[i]]; │ │ │ │ │ -401 return point; │ │ │ │ │ -402 } │ │ │ │ │ -403 │ │ │ │ │ -411 template │ │ │ │ │ -412 FieldVector │ │ │ │ │ -_4_1_3 _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e( │ │ │ │ │ -414 FieldVector point, │ │ │ │ │ -416 const FieldVector &kuhn) │ │ │ │ │ -417 { │ │ │ │ │ -418 for(int i = 0; i < dimension - 1; ++i) │ │ │ │ │ -419 point[kuhn[i]] -= point[kuhn[i+1]]; │ │ │ │ │ -420 return point; │ │ │ │ │ -421 } │ │ │ │ │ -422 │ │ │ │ │ -423 │ │ │ │ │ -425 │ │ │ │ │ -426 // ///////////////////////////////////////// │ │ │ │ │ -427 // │ │ │ │ │ -428 // refinement implementation for simplices │ │ │ │ │ -429 // │ │ │ │ │ -430 │ │ │ │ │ -431 template │ │ │ │ │ -_4_3_2 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -433 { │ │ │ │ │ -434 public: │ │ │ │ │ -_4_3_5 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ │ -_4_3_6 typedef CoordType _c_t_y_p_e; │ │ │ │ │ -437 │ │ │ │ │ -438 template │ │ │ │ │ -439 struct _C_o_d_i_m; │ │ │ │ │ -_4_4_0 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; │ │ │ │ │ -_4_4_1 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -_4_4_2 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; │ │ │ │ │ -_4_4_3 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -444 │ │ │ │ │ -445 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ -446 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ -447 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ -448 │ │ │ │ │ -449 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ -450 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ │ -451 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ │ -452 }; │ │ │ │ │ -453 │ │ │ │ │ -454 template │ │ │ │ │ -455 template │ │ │ │ │ -_4_5_6 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ -457 { │ │ │ │ │ -458 class SubEntityIterator; │ │ │ │ │ -459 // We don't need the caching, but the uncached MultiLinearGeometry has bug │ │ │ │ │ -FS#1209 │ │ │ │ │ -_4_6_0 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 _G_e_o_m_e_t_r_y; │ │ │ │ │ -461 }; │ │ │ │ │ -462 │ │ │ │ │ -463 template │ │ │ │ │ -464 int │ │ │ │ │ -_4_6_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_>_:_: │ │ │ │ │ -466_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ │ -467 { │ │ │ │ │ -468 return Dune::binomial(dimension + nIntervals, (int)dimension); │ │ │ │ │ -469 } │ │ │ │ │ -470 │ │ │ │ │ -471 template │ │ │ │ │ -472 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_7_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_>_:_: │ │ │ │ │ -474_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ │ -475 { │ │ │ │ │ -476 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ │ -477 } │ │ │ │ │ -478 │ │ │ │ │ -479 template │ │ │ │ │ -480 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_8_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_>_:_: │ │ │ │ │ -482_ _v_E_n_d(int nIntervals) │ │ │ │ │ -483 { │ │ │ │ │ -484 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ │ -485 } │ │ │ │ │ -486 │ │ │ │ │ -487 template │ │ │ │ │ -488 int │ │ │ │ │ -_4_8_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_>_:_: │ │ │ │ │ -490_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ │ -491 { │ │ │ │ │ -492 return Dune::power(nIntervals, int(dimension)); │ │ │ │ │ -493 } │ │ │ │ │ -494 │ │ │ │ │ -495 template │ │ │ │ │ -496 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_9_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_>_:_: │ │ │ │ │ -498_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ │ -499 { │ │ │ │ │ -500 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ │ -501 } │ │ │ │ │ -502 │ │ │ │ │ -503 template │ │ │ │ │ -504 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 │ │ │ │ │ -_5_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_>_:_: │ │ │ │ │ -506_ _e_E_n_d(int nIntervals) │ │ │ │ │ -507 { │ │ │ │ │ -508 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ │ -509 } │ │ │ │ │ -510 │ │ │ │ │ -511 // ////////////// │ │ │ │ │ -512 // │ │ │ │ │ -513 // The iterator │ │ │ │ │ -514 // │ │ │ │ │ -515 │ │ │ │ │ -516 template │ │ │ │ │ -_5_1_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; │ │ │ │ │ -518 │ │ │ │ │ -519 // vertices │ │ │ │ │ -520 │ │ │ │ │ -521 template │ │ │ │ │ -_5_2_2 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 │ │ │ │ │ -523 { │ │ │ │ │ -524 public: │ │ │ │ │ -_5_2_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; │ │ │ │ │ -_5_2_6 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -_5_2_7 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; │ │ │ │ │ -_5_2_8 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; │ │ │ │ │ -529 │ │ │ │ │ -530 _R_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); │ │ │ │ │ -531 │ │ │ │ │ -532 void increment(); │ │ │ │ │ -533 bool equals(const _T_h_i_s &other) const; │ │ │ │ │ -534 │ │ │ │ │ -535 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -536 _G_e_o_m_e_t_r_y geometry () const; │ │ │ │ │ -537 │ │ │ │ │ -538 int index() const; │ │ │ │ │ -539 protected: │ │ │ │ │ -_5_4_0 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ │ -541 │ │ │ │ │ -_5_4_2 int _s_i_z_e; │ │ │ │ │ -_5_4_3 _V_e_r_t_e_x _v_e_r_t_e_x; │ │ │ │ │ -544 }; │ │ │ │ │ -545 │ │ │ │ │ -546 template │ │ │ │ │ -_5_4_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -548_ _R_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) │ │ │ │ │ -549 : size(nIntervals) │ │ │ │ │ -550 { │ │ │ │ │ -551 vertex[0] = (end) ? size + 1 : 0; │ │ │ │ │ -552 for(int i = 1; i < dimension; ++ i) │ │ │ │ │ -553 vertex[i] = 0; │ │ │ │ │ -554 } │ │ │ │ │ -555 │ │ │ │ │ -556 template │ │ │ │ │ -557 void │ │ │ │ │ -_5_5_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_>_:_: │ │ │ │ │ -559_ _i_n_c_r_e_m_e_n_t() │ │ │ │ │ -560 { │ │ │ │ │ -561 assert(vertex[0] <= size); │ │ │ │ │ -562 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ │ -563 ++vertex[i]; │ │ │ │ │ -564 if(i == 0 || vertex[i] <= vertex[i-1]) │ │ │ │ │ -565 break; │ │ │ │ │ -566 else │ │ │ │ │ -567 vertex[i] = 0; │ │ │ │ │ -568 } │ │ │ │ │ -569 } │ │ │ │ │ -570 │ │ │ │ │ -571 template │ │ │ │ │ -572 bool │ │ │ │ │ -_5_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -574_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ │ -575 { │ │ │ │ │ -576 return size == other._s_i_z_e && vertex == other._v_e_r_t_e_x; │ │ │ │ │ -577 } │ │ │ │ │ -578 │ │ │ │ │ -579 template │ │ │ │ │ -580 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_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -582_ _c_o_o_r_d_s() const │ │ │ │ │ -583 { │ │ │ │ │ -584 _V_e_r_t_e_x ref = _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(vertex, getPermutation(0)); │ │ │ │ │ -585 │ │ │ │ │ -586 _C_o_o_r_d_V_e_c_t_o_r coords; │ │ │ │ │ -587 for(int i = 0; i < dimension; ++i) │ │ │ │ │ -588 coords[i] = CoordType(ref[i]) / size; │ │ │ │ │ -589 return coords; │ │ │ │ │ -590 } │ │ │ │ │ -591 │ │ │ │ │ -592 template │ │ │ │ │ -593 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_9_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 │ │ │ │ │ -595 { │ │ │ │ │ -596 std::vector corners(1); │ │ │ │ │ -597 corners[0] = (_C_o_o_r_d_V_e_c_t_o_r)vertex; │ │ │ │ │ -598 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, corners); │ │ │ │ │ -599 } │ │ │ │ │ -600 │ │ │ │ │ -601 template │ │ │ │ │ -602 int │ │ │ │ │ -_6_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -604_ _i_n_d_e_x() const │ │ │ │ │ -605 { │ │ │ │ │ -606 return _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ │ -607 } │ │ │ │ │ -608 │ │ │ │ │ -609 // elements │ │ │ │ │ -610 │ │ │ │ │ -611 template │ │ │ │ │ -_6_1_2 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 │ │ │ │ │ -613 { │ │ │ │ │ -614 public: │ │ │ │ │ -_6_1_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; │ │ │ │ │ -_6_1_6 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; │ │ │ │ │ -_6_1_7 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; │ │ │ │ │ -_6_1_8 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; │ │ │ │ │ -_6_1_9 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; │ │ │ │ │ -620 │ │ │ │ │ -621 _R_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); │ │ │ │ │ -622 │ │ │ │ │ -623 void increment(); │ │ │ │ │ -624 bool equals(const _T_h_i_s &other) const; │ │ │ │ │ -625 │ │ │ │ │ -626 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -627 int index() const; │ │ │ │ │ -628 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -629 │ │ │ │ │ -630 _G_e_o_m_e_t_r_y geometry () const; │ │ │ │ │ -631 │ │ │ │ │ -632 private: │ │ │ │ │ -633 _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; │ │ │ │ │ -634 │ │ │ │ │ -635 protected: │ │ │ │ │ -_6_3_6 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ │ -_6_3_7 constexpr static int nKuhnIntervals = Dune::factorial(dimension); │ │ │ │ │ -638 │ │ │ │ │ -_6_3_9 _V_e_r_t_e_x _o_r_i_g_i_n; │ │ │ │ │ -_6_4_0 int _k_u_h_n_I_n_d_e_x; │ │ │ │ │ -_6_4_1 int _s_i_z_e; │ │ │ │ │ -_6_4_2 int _i_n_d_e_x__; │ │ │ │ │ -643 }; │ │ │ │ │ -644 │ │ │ │ │ -645 template │ │ │ │ │ -_6_4_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_>_:_: │ │ │ │ │ -647_ _R_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) │ │ │ │ │ -648 : kuhnIndex(0), size(nIntervals), index_(0) │ │ │ │ │ -649 { │ │ │ │ │ -650 for(int i = 0; i < dimension; ++i) │ │ │ │ │ -651 origin[i] = 0; │ │ │ │ │ -652 if(end) { │ │ │ │ │ -653 index_ = Refinement::nElements(nIntervals); │ │ │ │ │ -654 origin[0] = size; │ │ │ │ │ -655 } │ │ │ │ │ -656 } │ │ │ │ │ -657 │ │ │ │ │ -658 template │ │ │ │ │ -659 void │ │ │ │ │ -_6_6_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_>_:_: │ │ │ │ │ -661_ _i_n_c_r_e_m_e_n_t() │ │ │ │ │ -662 { │ │ │ │ │ -663 assert(origin[0] < size); │ │ │ │ │ -664 │ │ │ │ │ -665 ++index_; │ │ │ │ │ -666 │ │ │ │ │ -667 while(1) { │ │ │ │ │ -668 ++kuhnIndex; │ │ │ │ │ -669 if(kuhnIndex == nKuhnIntervals) { │ │ │ │ │ -670 kuhnIndex = 0; │ │ │ │ │ -671 // increment origin │ │ │ │ │ -672 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ │ -673 ++origin[i]; │ │ │ │ │ -674 if(i == 0 || origin[i] <= origin[i-1]) │ │ │ │ │ -675 break; │ │ │ │ │ -676 else │ │ │ │ │ -677 origin[i] = 0; │ │ │ │ │ -678 } │ │ │ │ │ -679 } │ │ │ │ │ -680 │ │ │ │ │ -681 // test whether the current simplex has any corner outside the kuhn0 │ │ │ │ │ -simplex │ │ │ │ │ -682 FieldVector perm = getPermutation(kuhnIndex); │ │ │ │ │ -683 _V_e_r_t_e_x corner = origin; │ │ │ │ │ -684 bool outside = false; │ │ │ │ │ -685 for(int i = 0; i < dimension; ++i) { │ │ │ │ │ -686 // next corner │ │ │ │ │ -687 ++corner[perm[i]]; │ │ │ │ │ -688 if(perm[i] > 0) │ │ │ │ │ -689 if(corner[perm[i]] > corner[perm[i]-1]) { │ │ │ │ │ -690 outside = true; │ │ │ │ │ -691 break; │ │ │ │ │ -692 } │ │ │ │ │ -693 } │ │ │ │ │ -694 if(!outside) │ │ │ │ │ -695 return; │ │ │ │ │ -696 } │ │ │ │ │ -697 } │ │ │ │ │ -698 │ │ │ │ │ -699 template │ │ │ │ │ -700 bool │ │ │ │ │ -_7_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_,_ _0_>_:_: │ │ │ │ │ -702_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ │ -703 { │ │ │ │ │ -704 return size == other._s_i_z_e && index_ == other._i_n_d_e_x__; │ │ │ │ │ -705 } │ │ │ │ │ -706 │ │ │ │ │ -707 template │ │ │ │ │ -708 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 │ │ │ │ │ -_7_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_,_ _0_>_:_: │ │ │ │ │ -710_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ -711 { │ │ │ │ │ -712 _I_n_d_e_x_V_e_c_t_o_r indices; │ │ │ │ │ -713 FieldVector perm = getPermutation(kuhnIndex); │ │ │ │ │ -714 _V_e_r_t_e_x vertex = origin; │ │ │ │ │ -715 indices[0] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ │ -716 for(int i = 0; i < dimension; ++i) { │ │ │ │ │ -717 ++vertex[perm[i]]; │ │ │ │ │ -718 indices[i+1] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ │ -719 } │ │ │ │ │ -720 if (kuhnIndex%2 == 1) │ │ │ │ │ -721 for(int i = 0; i < (dimension+1)/2; ++i) { │ │ │ │ │ -722 int t = indices[i]; │ │ │ │ │ -723 indices[i] = indices[dimension-i]; │ │ │ │ │ -724 indices[dimension-i] = t; │ │ │ │ │ -725 } │ │ │ │ │ -726 return indices; │ │ │ │ │ -727 } │ │ │ │ │ -728 │ │ │ │ │ -729 template │ │ │ │ │ -730 int │ │ │ │ │ -_7_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_,_ _0_>_:_: │ │ │ │ │ -732_ _i_n_d_e_x() const │ │ │ │ │ -733 { │ │ │ │ │ -734 return index_; │ │ │ │ │ -735 } │ │ │ │ │ -736 │ │ │ │ │ -737 template │ │ │ │ │ -738 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 │ │ │ │ │ -_7_3_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_>_:_: │ │ │ │ │ -740_ _c_o_o_r_d_s() const │ │ │ │ │ -741 { │ │ │ │ │ -742 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_> │ │ │ │ │ -743 ::simplex().position(0,0)); │ │ │ │ │ -744 } │ │ │ │ │ -745 │ │ │ │ │ -746 template │ │ │ │ │ -747 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 │ │ │ │ │ -_7_4_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_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ -749 { │ │ │ │ │ -750 std::vector corners(dimension+1); │ │ │ │ │ -751 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(); │ │ │ │ │ -752 for(int i = 0; i <= dimension; ++i) │ │ │ │ │ -753 corners[i] = global(refelem.position(i, dimension)); │ │ │ │ │ -754 return _G_e_o_m_e_t_r_y(refelem.type(), corners); │ │ │ │ │ -755 } │ │ │ │ │ -756 │ │ │ │ │ -757 template │ │ │ │ │ -758 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 │ │ │ │ │ -759 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_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_>_:_: │ │ │ │ │ -760_ _g_l_o_b_a_l(const CoordVector &local) const { │ │ │ │ │ -761 CoordVector v = │ │ │ │ │ -762 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, getPermutation(kuhnIndex)); │ │ │ │ │ -763 v += origin; │ │ │ │ │ -764 v /= (typename CoordVector::value_type)size; │ │ │ │ │ -765 return _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(v, getPermutation(0)); │ │ │ │ │ -766 } │ │ │ │ │ -767 │ │ │ │ │ -768 // common │ │ │ │ │ -769 │ │ │ │ │ -770 template │ │ │ │ │ -771 template │ │ │ │ │ -_7_7_2 class _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m:: │ │ │ │ │ -SubEntityIterator │ │ │ │ │ -773 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ │ -774 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 │ │ │ │ │ -775 { │ │ │ │ │ -776 public: │ │ │ │ │ -_7_7_7 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; │ │ │ │ │ -778 │ │ │ │ │ -_7_7_9 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ │ -780 }; │ │ │ │ │ -781 │ │ │ │ │ -782#ifndef DOXYGEN │ │ │ │ │ -783 │ │ │ │ │ -784 template │ │ │ │ │ -785 template │ │ │ │ │ -786 _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_:_: │ │ │ │ │ -787_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ │ -788 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(nIntervals, │ │ │ │ │ -end) │ │ │ │ │ -789 {} │ │ │ │ │ -790 │ │ │ │ │ -791#endif │ │ │ │ │ -792 │ │ │ │ │ -793 } // namespace Simplex │ │ │ │ │ -794 │ │ │ │ │ -795 } // namespace RefinementImp │ │ │ │ │ -796 │ │ │ │ │ -797 │ │ │ │ │ -798 namespace RefinementImp { │ │ │ │ │ -799 │ │ │ │ │ -800 // /////////////////////// │ │ │ │ │ -801 // │ │ │ │ │ -802 // The refinement traits │ │ │ │ │ -803 // │ │ │ │ │ -804 │ │ │ │ │ -805#ifndef DOXYGEN │ │ │ │ │ -806 template │ │ │ │ │ -808 struct Traits< │ │ │ │ │ -809 topologyId, CoordType, coerceToId, dim, │ │ │ │ │ -810 typename std::enable_if< │ │ │ │ │ -811 ((GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ │ -812 (topologyId >> 1) && │ │ │ │ │ -813 (GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ │ -814 (coerceToId >> 1) │ │ │ │ │ -815 )>::type │ │ │ │ │ -816 > │ │ │ │ │ -817 { │ │ │ │ │ -818 typedef Simplex::RefinementImp Imp; │ │ │ │ │ -819 }; │ │ │ │ │ -820#endif │ │ │ │ │ -821 │ │ │ │ │ -822 │ │ │ │ │ -823 } // namespace RefinementImp │ │ │ │ │ -824 │ │ │ │ │ -825} // namespace Dune │ │ │ │ │ -826 │ │ │ │ │ -827#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ -_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 │ │ │ │ │ +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 GeometryTypes::vertex; │ │ │ │ │ +23 case 1 : │ │ │ │ │ +24 return GeometryTypes::line; │ │ │ │ │ +25 case 2 : │ │ │ │ │ +26 switch (vertices) { │ │ │ │ │ +27 case 3 : │ │ │ │ │ +28 return GeometryTypes::triangle; │ │ │ │ │ +29 case 4 : │ │ │ │ │ +30 return GeometryTypes::quadrilateral; │ │ │ │ │ +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 GeometryTypes::tetrahedron; │ │ │ │ │ +38 case 5 : │ │ │ │ │ +39 return GeometryTypes::pyramid; │ │ │ │ │ +40 case 6 : │ │ │ │ │ +41 return GeometryTypes::prism; │ │ │ │ │ +42 case 8 : │ │ │ │ │ +43 return GeometryTypes::hexahedron; │ │ │ │ │ +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. │ │ │ │ │ -_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 │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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:323 │ │ │ │ │ -_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:336 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_f_a_c_t_o_r_i_a_l │ │ │ │ │ -int factorial(int n) │ │ │ │ │ -Calculate n! │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:289 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_b_i_n_o_m_i_a_l │ │ │ │ │ -int binomial(int upper, int lower) │ │ │ │ │ -calculate │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:305 │ │ │ │ │ -_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: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_:_:_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:413 │ │ │ │ │ -_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:170 │ │ │ │ │ -_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:204 │ │ │ │ │ -_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:433 │ │ │ │ │ -_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_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ │ -Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:440 │ │ │ │ │ -_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_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ -FieldVector< int, dimension+1 > IndexVector │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:443 │ │ │ │ │ -_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_t_y_p_e │ │ │ │ │ -CoordType ctype │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:436 │ │ │ │ │ -_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:466 │ │ │ │ │ -_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:490 │ │ │ │ │ -_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:506 │ │ │ │ │ -_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:482 │ │ │ │ │ -_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_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:442 │ │ │ │ │ -_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:474 │ │ │ │ │ -_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:498 │ │ │ │ │ -_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_o_r_d_V_e_c_t_o_r │ │ │ │ │ -FieldVector< CoordType, dimension > CoordVector │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:441 │ │ │ │ │ -_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 │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:435 │ │ │ │ │ -_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:457 │ │ │ │ │ -_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_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Dune::CachedMultiLinearGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ │ -Geometry │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:460 │ │ │ │ │ -_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:517 │ │ │ │ │ -_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_ _> │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:523 │ │ │ │ │ -_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: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_t_e_r_a_t_o_r_S_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:525 │ │ │ │ │ -_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: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_, │ │ │ │ │ -_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:527 │ │ │ │ │ -_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:528 │ │ │ │ │ -_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:540 │ │ │ │ │ -_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:542 │ │ │ │ │ -_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_ _> │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:613 │ │ │ │ │ -_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:640 │ │ │ │ │ -_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:636 │ │ │ │ │ -_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:639 │ │ │ │ │ -_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:642 │ │ │ │ │ -_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:618 │ │ │ │ │ -_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:616 │ │ │ │ │ -_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:617 │ │ │ │ │ -_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:619 │ │ │ │ │ -_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:615 │ │ │ │ │ -_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:641 │ │ │ │ │ -_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_<_ _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_:_:_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:777 │ │ │ │ │ +_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) │ │ │ │ │ +Utitlity function to construct the correct geometry type given the dimension │ │ │ │ │ +and the number of vertic... │ │ │ │ │ +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:126 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: hcube.cc File Reference │ │ │ │ +dune-geometry: typeindex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,88 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
hcube.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
typeindex.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

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

Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ 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 <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::RefinementImp::HCube::RefinementImp< dimension_, CoordType >
 Refinement implementation for hypercubes More...
class  Dune::LocalGeometryTypeIndex
 Compute per-dimension indices for geometry types. More...
 
struct  Dune::RefinementImp::HCube::RefinementImp< dimension_, CoordType >::Codim< codimension >
 
class  Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, codimension >
 SubEntityIterator base class for hypercube refinement. More...
 
class  Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, dimension >
 
class  Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, 0 >
 
class  Dune::RefinementImp::HCube::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::GlobalGeometryTypeIndex
 Compute indices for geometry types, taking the dimension into account. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
 
namespace  Dune::RefinementImp::HCube
 This namespace contains the Refinement implementation for hypercubes (GeometryType::cube).
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Macros

#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
 
│ │ │ │

Detailed Description

│ │ │ │ -

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

│ │ │ │ -

See Refinement implementation for hypercubes.

│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_HCUBE_CC

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,60 +1,30 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -hcube.cc File Reference │ │ │ │ │ -This file contains the _R_e_f_i_n_e_m_e_n_t implementation for hypercubes │ │ │ │ │ -(quadrilaterals, hexahedrons, etc.). _M_o_r_e_._._. │ │ │ │ │ -#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_/_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> │ │ │ │ │ -#include "_b_a_s_e_._c_c" │ │ │ │ │ +_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_._._. │ │ │ │ │ +#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_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 implementation for hypercubes _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_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_:_:_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_p_e_c_i_a_l_< │ │ │ │ │ - _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -  SubEntityIterator base class for hypercube refinement. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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_:_:_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_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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ -  This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for │ │ │ │ │ - hypercubes (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_c_u_b_e). │ │ │ │ │ -  │ │ │ │ │ -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___C_C │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file contains the _R_e_f_i_n_e_m_e_n_t implementation for hypercubes │ │ │ │ │ -(quadrilaterals, hexahedrons, etc.). │ │ │ │ │ -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_ _h_y_p_e_r_c_u_b_e_s. │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__HHCCUUBBEE__CCCC ********** │ │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ +Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: hcube.cc Source File │ │ │ │ +dune-geometry: typeindex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,477 +70,165 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hcube.cc
│ │ │ │ +
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 (C) DUNE 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_HCUBE_CC
│ │ │ │ -
6#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ │
7
│ │ │ │ -
42#include <cassert>
│ │ │ │ -
43
│ │ │ │ -
44#include <dune/common/fvector.hh>
│ │ │ │ -
45#include <dune/common/iteratorfacades.hh>
│ │ │ │ -
46
│ │ │ │ - │ │ │ │ - │ │ │ │ -
49
│ │ │ │ -
50#include "base.cc" // for RefinementTraits
│ │ │ │ -
51
│ │ │ │ -
52namespace Dune
│ │ │ │ -
53{
│ │ │ │ -
54 namespace RefinementImp
│ │ │ │ -
55 {
│ │ │ │ -
│ │ │ │ -
62 namespace HCube
│ │ │ │ -
63 {
│ │ │ │ -
73 template<int dimension_, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 {
│ │ │ │ -
76 public:
│ │ │ │ -
78 constexpr static int dimension = dimension_;
│ │ │ │ -
79 //- Know yourself
│ │ │ │ - │ │ │ │ -
81
│ │ │ │ -
82 template<int codimension>
│ │ │ │ -
83 struct Codim;
│ │ │ │ - │ │ │ │ -
85 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ │ - │ │ │ │ -
87 typedef FieldVector<int, (1<<dimension)> IndexVector;
│ │ │ │ -
88
│ │ │ │ -
89 static unsigned nVertices(unsigned nIntervals);
│ │ │ │ -
90 static VertexIterator vBegin(unsigned nIntervals);
│ │ │ │ -
91 static VertexIterator vEnd(unsigned nIntervals);
│ │ │ │ -
92
│ │ │ │ -
93 static unsigned nElements(unsigned nIntervals);
│ │ │ │ -
94 static ElementIterator eBegin(unsigned nIntervals);
│ │ │ │ -
95 static ElementIterator eEnd(unsigned nIntervals);
│ │ │ │ -
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 unsigned
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
109 nVertices(unsigned nIntervals)
│ │ │ │ -
110 {
│ │ │ │ -
111 // return (nIntervals + 1)^dim
│ │ │ │ -
112 return Dune::power(nIntervals+1u, unsigned(dimension));
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
115 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
118 vBegin(unsigned nIntervals)
│ │ │ │ -
119 {
│ │ │ │ -
120 return VertexIterator(0,nIntervals);
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
123 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ +
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)) ?
│ │ │ │ +
81 GeometryTypes::none(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
│ │ │ │
│ │ │ │ - │ │ │ │ -
126 vEnd(unsigned nIntervals)
│ │ │ │ -
127 {
│ │ │ │ -
128 return VertexIterator(nVertices(nIntervals),nIntervals);
│ │ │ │ -
129 }
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131 template<int dimension, class CoordType>
│ │ │ │ -
132 unsigned
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
134 nElements(unsigned nIntervals)
│ │ │ │ -
135 {
│ │ │ │ -
136 static_assert(dimension >= 0,
│ │ │ │ -
137 "Negative dimension given, what the heck is that supposed to mean?");
│ │ │ │ -
138 // return nIntervals^dim
│ │ │ │ -
139 return Dune::power(nIntervals, unsigned(dimension));
│ │ │ │ -
140 }
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
142 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
145 eBegin(unsigned nIntervals)
│ │ │ │ -
146 {
│ │ │ │ -
147 return ElementIterator(0,nIntervals);
│ │ │ │ -
148 }
│ │ │ │ -
│ │ │ │ -
149
│ │ │ │ -
150 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
153 eEnd(unsigned nIntervals)
│ │ │ │ -
154 {
│ │ │ │ -
155 return ElementIterator(nElements(nIntervals),nIntervals);
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158 //
│ │ │ │ -
159 // The iterators
│ │ │ │ -
160 //
│ │ │ │ -
161
│ │ │ │ -
162#ifdef DOXYGEN
│ │ │ │ -
174 template<int dimension, class CoordType, int codimension>
│ │ │ │ - │ │ │ │ -
176#else
│ │ │ │ -
177 template<int dimension, class CoordType, int codimension>
│ │ │ │ - │ │ │ │ -
179#endif //DOXYGEN
│ │ │ │ -
180
│ │ │ │ -
181 // for vertices
│ │ │ │ -
182
│ │ │ │ -
183 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
184 class RefinementSubEntityIteratorSpecial<dimension, CoordType, dimension>
│ │ │ │ -
185 {
│ │ │ │ -
186 public:
│ │ │ │ - │ │ │ │ -
188 typedef typename Refinement::template Codim<dimension>::SubEntityIterator Common;
│ │ │ │ -
189 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
190
│ │ │ │ -
191 CoordVector coords() const;
│ │ │ │ -
192
│ │ │ │ -
193 private:
│ │ │ │ -
194 const Common & asCommon() const
│ │ │ │ -
195 {
│ │ │ │ -
196 return *static_cast<const Common*>(this);
│ │ │ │ -
197 }
│ │ │ │ -
198 };
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
200 template<int dimension, class CoordType>
│ │ │ │ -
201 typename RefinementSubEntityIteratorSpecial<dimension, CoordType, dimension>::CoordVector
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
203 coords() const
│ │ │ │ -
204 {
│ │ │ │ -
205 std::array<unsigned int, dimension> v(asCommon().vertexCoord());
│ │ │ │ -
206 CoordVector c;
│ │ │ │ -
207 for (int d = 0; d < dimension; d++)
│ │ │ │ -
208 {
│ │ │ │ -
209 c[d] = v[d]*1.0 / asCommon()._nIntervals;
│ │ │ │ -
210 }
│ │ │ │ -
211 return c;
│ │ │ │ -
212 }
│ │ │ │ -
│ │ │ │ -
213
│ │ │ │ -
214 // for elements
│ │ │ │ -
215
│ │ │ │ -
216 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
217 class RefinementSubEntityIteratorSpecial<dimension, CoordType, 0>
│ │ │ │ -
218 {
│ │ │ │ -
219 public:
│ │ │ │ - │ │ │ │ -
221 typedef typename Refinement::template Codim<0>::SubEntityIterator Common;
│ │ │ │ -
222 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ -
223 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
224
│ │ │ │ -
225 IndexVector vertexIndices() const;
│ │ │ │ -
226 CoordVector coords() const;
│ │ │ │ -
227
│ │ │ │ -
228 private:
│ │ │ │ -
229 const Common & asCommon() const
│ │ │ │ -
230 {
│ │ │ │ -
231 return *static_cast<const Common*>(this);
│ │ │ │ -
232 }
│ │ │ │ -
233 };
│ │ │ │ -
│ │ │ │ -
234
│ │ │ │ -
235 template<int dimension, class CoordType>
│ │ │ │ -
236 typename RefinementSubEntityIteratorSpecial<dimension, CoordType, 0>::IndexVector
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
238 vertexIndices() const
│ │ │ │ -
239 {
│ │ │ │ -
240 constexpr static int nIndices = 1 << dimension;
│ │ │ │ -
241
│ │ │ │ -
242 // cell index tuple
│ │ │ │ -
243 std::array<unsigned int, dimension> e(asCommon().cellCoord());
│ │ │ │ -
244
│ │ │ │ -
245 // vertices
│ │ │ │ -
246 IndexVector vec;
│ │ │ │ -
247 for(int i = 0; i < nIndices; ++i)
│ │ │ │ -
248 {
│ │ │ │ -
249 int base = 1;
│ │ │ │ -
250 std::array<unsigned int, dimension> alpha(asCommon().idx2multiidx(i));
│ │ │ │ -
251 for (int d = 0; d < dimension; d++) {
│ │ │ │ -
252 vec[i] += (alpha[d] + e[d]) * base;
│ │ │ │ -
253 base *= asCommon()._nIntervals+1;
│ │ │ │ -
254 }
│ │ │ │ -
255 }
│ │ │ │ -
256 return vec;
│ │ │ │ -
257 }
│ │ │ │ -
│ │ │ │ -
258
│ │ │ │ -
259 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
262 coords() const
│ │ │ │ -
263 {
│ │ │ │ -
264 std::array<unsigned int, dimension> v(asCommon().cellCoord());
│ │ │ │ -
265 CoordVector c;
│ │ │ │ -
266 for (int d=0; d<dimension; d++)
│ │ │ │ -
267 {
│ │ │ │ -
268 c[d] = (v[d]*1.0 + 0.5) / asCommon()._nIntervals;
│ │ │ │ -
269 }
│ │ │ │ -
270 return c;
│ │ │ │ -
271 }
│ │ │ │ -
│ │ │ │ -
272
│ │ │ │ -
273 // common
│ │ │ │ -
274 template<int dimension, class CoordType>
│ │ │ │ -
275 template<int codimension>
│ │ │ │ -
│ │ │ │ -
276 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ │ -
277 : public ForwardIteratorFacade<typename RefinementImp<dimension,
│ │ │ │ -
278 CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ -
279 public RefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ -
280 {
│ │ │ │ -
281 public:
│ │ │ │ - │ │ │ │ -
283 typedef typename Refinement::template Codim<codimension>::SubEntityIterator This;
│ │ │ │ -
284
│ │ │ │ -
285 SubEntityIterator(unsigned int index, unsigned int nIntervals);
│ │ │ │ -
286
│ │ │ │ -
287 bool equals(const This &other) const;
│ │ │ │ -
288 void increment();
│ │ │ │ -
289
│ │ │ │ -
290 int index() const;
│ │ │ │ -
291 Geometry geometry () const;
│ │ │ │ -
292 private:
│ │ │ │ -
293 friend class RefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>;
│ │ │ │ -
294 unsigned int _index;
│ │ │ │ -
295 unsigned int _nIntervals;
│ │ │ │ -
296
│ │ │ │ -
297 std::array<unsigned int, dimension>
│ │ │ │ -
298 cellCoord(unsigned int idx) const
│ │ │ │ -
299 {
│ │ │ │ -
300 return idx2coord(idx, _nIntervals);
│ │ │ │ -
301 }
│ │ │ │ -
302
│ │ │ │ -
303 std::array<unsigned int, dimension>
│ │ │ │ -
304 vertexCoord(unsigned int idx) const
│ │ │ │ -
305 {
│ │ │ │ -
306 return idx2coord(idx, _nIntervals+1u);
│ │ │ │ -
307 }
│ │ │ │ -
308
│ │ │ │ -
309 std::array<unsigned int, dimension>
│ │ │ │ -
310 cellCoord() const
│ │ │ │ -
311 {
│ │ │ │ -
312 return cellCoord(_index);
│ │ │ │ -
313 }
│ │ │ │ -
314
│ │ │ │ -
315 std::array<unsigned int, dimension>
│ │ │ │ -
316 vertexCoord() const
│ │ │ │ -
317 {
│ │ │ │ -
318 return vertexCoord(_index);
│ │ │ │ -
319 }
│ │ │ │ -
320
│ │ │ │ -
321 std::array<unsigned int, dimension>
│ │ │ │ -
322 idx2coord(unsigned int idx, unsigned int w) const
│ │ │ │ -
323 {
│ │ │ │ -
324 std::array<unsigned int, dimension> c;
│ │ │ │ -
325 for (unsigned int d = 0; d < dimension; d++)
│ │ │ │ -
326 {
│ │ │ │ -
327 c[d] = idx%w;
│ │ │ │ -
328 idx = idx/w;
│ │ │ │ -
329 }
│ │ │ │ -
330 return c;
│ │ │ │ -
331 }
│ │ │ │ -
332
│ │ │ │ -
333 unsigned int
│ │ │ │ -
334 coord2idx(std::array<unsigned int, dimension> c, unsigned int w) const
│ │ │ │ -
335 {
│ │ │ │ -
336 unsigned int i = 0;
│ │ │ │ -
337 for (unsigned int d = dimension; d > 0; d--)
│ │ │ │ -
338 {
│ │ │ │ -
339 i *= w;
│ │ │ │ -
340 i += c[d-1];
│ │ │ │ -
341 }
│ │ │ │ -
342 return i;
│ │ │ │ -
343 }
│ │ │ │ -
344
│ │ │ │ -
345 std::array<unsigned int, dimension>
│ │ │ │ -
346 idx2multiidx(unsigned int idx) const
│ │ │ │ -
347 {
│ │ │ │ -
348 std::array<unsigned int, dimension> alpha;
│ │ │ │ -
349 for (unsigned int i = 0; i < dimension; ++i)
│ │ │ │ -
350 alpha[i] = (idx >> i) & 1u;
│ │ │ │ -
351 return alpha;
│ │ │ │ -
352 }
│ │ │ │ -
353 };
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
355#ifndef DOXYGEN
│ │ │ │ -
356 template<int dimension, class CoordType>
│ │ │ │ -
357 template<int codimension>
│ │ │ │ -
358 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
359 SubEntityIterator(unsigned int index, unsigned int nIntervals)
│ │ │ │ -
360 : _index(index), _nIntervals(nIntervals)
│ │ │ │ -
361 {}
│ │ │ │ -
362
│ │ │ │ -
363 template<int dimension, class CoordType>
│ │ │ │ -
364 template<int codimension>
│ │ │ │ -
365 bool
│ │ │ │ -
366 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
367 equals(const This &other) const
│ │ │ │ -
368 {
│ │ │ │ -
369 return ((_index == other._index) && (_nIntervals == other._nIntervals));
│ │ │ │ -
370 }
│ │ │ │ -
371
│ │ │ │ -
372 template<int dimension, class CoordType>
│ │ │ │ -
373 template<int codimension>
│ │ │ │ -
374 void
│ │ │ │ -
375 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
376 increment()
│ │ │ │ -
377 {
│ │ │ │ -
378 ++_index;
│ │ │ │ -
379 }
│ │ │ │ -
380
│ │ │ │ -
381 template<int dimension, class CoordType>
│ │ │ │ -
382 template<int codimension>
│ │ │ │ -
383 int
│ │ │ │ -
384 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
385 index() const
│ │ │ │ -
386 {
│ │ │ │ -
387 return _index;
│ │ │ │ -
388 }
│ │ │ │ -
389
│ │ │ │ -
390 template<int dimension, class CoordType>
│ │ │ │ -
391 template<int codimension>
│ │ │ │ -
392 typename RefinementImp<dimension, CoordType>::template Codim<codimension>::Geometry
│ │ │ │ -
393 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::geometry () const
│ │ │ │ -
394 {
│ │ │ │ -
395 std::array<unsigned int,dimension> intCoords = idx2coord(_index,_nIntervals);
│ │ │ │ -
396
│ │ │ │ -
397 Dune::FieldVector<CoordType,dimension> lower;
│ │ │ │ -
398 Dune::FieldVector<CoordType,dimension> upper;
│ │ │ │ -
399
│ │ │ │ -
400 assert(codimension == 0 or codimension == dimension);
│ │ │ │ -
401
│ │ │ │ -
402 if constexpr (codimension == 0) {
│ │ │ │ -
403 for (size_t j = 0; j < dimension; j++)
│ │ │ │ -
404 {
│ │ │ │ -
405 lower[j] = double(intCoords[j]) / double(_nIntervals);
│ │ │ │ -
406 upper[j] = double(intCoords[j] + 1) / double(_nIntervals);
│ │ │ │ -
407 }
│ │ │ │ -
408
│ │ │ │ -
409 return typename RefinementImp<dimension,
│ │ │ │ -
410 CoordType>::template Codim<codimension>::Geometry(lower,upper);
│ │ │ │ -
411 } else {
│ │ │ │ -
412 for (size_t j = 0; j < dimension; j++)
│ │ │ │ -
413 lower[j] = upper[j] = double(intCoords[j]) / double(_nIntervals);
│ │ │ │ -
414
│ │ │ │ -
415 return typename RefinementImp<dimension,
│ │ │ │ -
416 CoordType>::template Codim<codimension>::Geometry(lower,upper,std::bitset<dimension>(0));
│ │ │ │ -
417 }
│ │ │ │ -
418 }
│ │ │ │ -
419
│ │ │ │ -
420#endif // DOXYGEN
│ │ │ │ -
421
│ │ │ │ -
422 } // namespace HCube
│ │ │ │ -
│ │ │ │ -
423
│ │ │ │ -
424 // ///////////////////////
│ │ │ │ -
425 //
│ │ │ │ -
426 // The refinement traits
│ │ │ │ -
427 //
│ │ │ │ -
428
│ │ │ │ -
429#ifndef DOXYGEN
│ │ │ │ -
430 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ │ -
431 int dim>
│ │ │ │ -
432 struct Traits<
│ │ │ │ -
433 topologyId, CoordType, coerceToId, dim,
│ │ │ │ -
434 typename std::enable_if<
│ │ │ │ -
435 (dim >= 2 &&
│ │ │ │ -
436 (GeometryTypes::cube(dim).id() >> 1) ==
│ │ │ │ -
437 (topologyId >> 1) &&
│ │ │ │ -
438 (GeometryTypes::cube(dim).id() >> 1) ==
│ │ │ │ -
439 (coerceToId >> 1)
│ │ │ │ -
440 )>::type
│ │ │ │ -
441 >
│ │ │ │ -
442 {
│ │ │ │ -
443 typedef HCube::RefinementImp<dim, CoordType> Imp;
│ │ │ │ -
444 };
│ │ │ │ -
445#endif
│ │ │ │ -
446
│ │ │ │ -
447 } // namespace RefinementImp
│ │ │ │ -
448
│ │ │ │ -
449} // namespace Dune
│ │ │ │ -
450
│ │ │ │ -
451#endif // DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ - │ │ │ │ -
A geometry implementation for axis-aligned hypercubes.
│ │ │ │ +
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);
│ │ │ │ +
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.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
A geometry implementation for axis-aligned hypercubes.
Definition axisalignedcubegeometry.hh:50
│ │ │ │ -
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ │ -
Refinement implementation for hypercubes
Definition hcube.cc:75
│ │ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition hcube.cc:86
│ │ │ │ -
static ElementIterator eEnd(unsigned nIntervals)
Definition hcube.cc:153
│ │ │ │ -
static unsigned nVertices(unsigned nIntervals)
Definition hcube.cc:109
│ │ │ │ -
static VertexIterator vEnd(unsigned nIntervals)
Definition hcube.cc:126
│ │ │ │ -
FieldVector< int,(1<< dimension)> IndexVector
Definition hcube.cc:87
│ │ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
Definition hcube.cc:84
│ │ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition hcube.cc:85
│ │ │ │ -
static unsigned nElements(unsigned nIntervals)
Definition hcube.cc:134
│ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcube.cc:80
│ │ │ │ -
static ElementIterator eBegin(unsigned nIntervals)
Definition hcube.cc:145
│ │ │ │ -
static constexpr int dimension
Know your own dimension.
Definition hcube.cc:78
│ │ │ │ -
static VertexIterator vBegin(unsigned nIntervals)
Definition hcube.cc:118
│ │ │ │ - │ │ │ │ -
Dune::AxisAlignedCubeGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition hcube.cc:103
│ │ │ │ -
SubEntityIterator base class for hypercube refinement.
Definition hcube.cc:175
│ │ │ │ - │ │ │ │ -
Refinement::template Codim< dimension >::SubEntityIterator Common
Definition hcube.cc:188
│ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcube.cc:220
│ │ │ │ -
Refinement::template Codim< 0 >::SubEntityIterator Common
Definition hcube.cc:221
│ │ │ │ - │ │ │ │ - │ │ │ │ -
SubEntityIterator(unsigned int index, unsigned int nIntervals)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcube.cc:282
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Refinement::template Codim< codimension >::SubEntityIterator This
Definition hcube.cc:283
│ │ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ +
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:222
│ │ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ +
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:367
│ │ │ │ +
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,527 +1,183 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -hcube.cc │ │ │ │ │ +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 (C) DUNE 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_HCUBE_CC │ │ │ │ │ -_6#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ │ 7 │ │ │ │ │ -42#include │ │ │ │ │ -43 │ │ │ │ │ -44#include │ │ │ │ │ -45#include │ │ │ │ │ -46 │ │ │ │ │ -47#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> │ │ │ │ │ -48#include <_d_u_n_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_._h_h> │ │ │ │ │ -49 │ │ │ │ │ -50#include "_b_a_s_e_._c_c" // for RefinementTraits │ │ │ │ │ -51 │ │ │ │ │ -52namespace _D_u_n_e │ │ │ │ │ -53{ │ │ │ │ │ -54 namespace RefinementImp │ │ │ │ │ -55 { │ │ │ │ │ -_6_2 namespace HCube │ │ │ │ │ -63 { │ │ │ │ │ -73 template │ │ │ │ │ -_7_4 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -75 { │ │ │ │ │ -76 public: │ │ │ │ │ -_7_8 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ │ -79 //- Know yourself │ │ │ │ │ -_8_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; │ │ │ │ │ -81 │ │ │ │ │ -82 template │ │ │ │ │ -83 struct _C_o_d_i_m; │ │ │ │ │ -_8_4 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; │ │ │ │ │ -_8_5 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -_8_6 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; │ │ │ │ │ -_8_7 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -88 │ │ │ │ │ -89 static unsigned _n_V_e_r_t_i_c_e_s(unsigned nIntervals); │ │ │ │ │ -90 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(unsigned nIntervals); │ │ │ │ │ -91 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(unsigned nIntervals); │ │ │ │ │ -92 │ │ │ │ │ -93 static unsigned _n_E_l_e_m_e_n_t_s(unsigned nIntervals); │ │ │ │ │ -94 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(unsigned nIntervals); │ │ │ │ │ -95 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(unsigned nIntervals); │ │ │ │ │ -96 }; │ │ │ │ │ -97 │ │ │ │ │ -98 template │ │ │ │ │ -99 template │ │ │ │ │ -_1_0_0 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ -101 { │ │ │ │ │ -102 class SubEntityIterator; │ │ │ │ │ -_1_0_3 typedef _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_e_o_m_e_t_r_y; │ │ │ │ │ -104 }; │ │ │ │ │ -105 │ │ │ │ │ -106 template │ │ │ │ │ -107 unsigned │ │ │ │ │ -_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(unsigned nIntervals) │ │ │ │ │ -110 { │ │ │ │ │ -111 // return (nIntervals + 1)^dim │ │ │ │ │ -112 return Dune::power(nIntervals+1u, unsigned(dimension)); │ │ │ │ │ -113 } │ │ │ │ │ -114 │ │ │ │ │ -115 template │ │ │ │ │ -116 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_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_>_:_: │ │ │ │ │ -118_ _v_B_e_g_i_n(unsigned nIntervals) │ │ │ │ │ -119 { │ │ │ │ │ -120 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(0,nIntervals); │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -123 template │ │ │ │ │ -124 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_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_>_:_: │ │ │ │ │ -126_ _v_E_n_d(unsigned nIntervals) │ │ │ │ │ -127 { │ │ │ │ │ -128 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nVertices(nIntervals),nIntervals); │ │ │ │ │ -129 } │ │ │ │ │ -130 │ │ │ │ │ -131 template │ │ │ │ │ -132 unsigned │ │ │ │ │ -_1_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_>_:_: │ │ │ │ │ -134_ _n_E_l_e_m_e_n_t_s(unsigned nIntervals) │ │ │ │ │ -135 { │ │ │ │ │ -136 static_assert(dimension >= 0, │ │ │ │ │ -137 "Negative dimension given, what the heck is that supposed to mean?"); │ │ │ │ │ -138 // return nIntervals^dim │ │ │ │ │ -139 return Dune::power(nIntervals, unsigned(dimension)); │ │ │ │ │ -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_B_e_g_i_n(unsigned nIntervals) │ │ │ │ │ -146 { │ │ │ │ │ -147 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(0,nIntervals); │ │ │ │ │ -148 } │ │ │ │ │ -149 │ │ │ │ │ -150 template │ │ │ │ │ -151 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_5_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_>_:_: │ │ │ │ │ -153_ _e_E_n_d(unsigned nIntervals) │ │ │ │ │ -154 { │ │ │ │ │ -155 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nElements(nIntervals),nIntervals); │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 // │ │ │ │ │ -159 // The iterators │ │ │ │ │ -160 // │ │ │ │ │ -161 │ │ │ │ │ -162#ifdef DOXYGEN │ │ │ │ │ -174 template │ │ │ │ │ -_1_7_5 class _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_p_e_c_i_a_l {}; │ │ │ │ │ -176#else │ │ │ │ │ -177 template │ │ │ │ │ -178 class _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_p_e_c_i_a_l; │ │ │ │ │ -179#endif //DOXYGEN │ │ │ │ │ -180 │ │ │ │ │ -181 // for vertices │ │ │ │ │ -182 │ │ │ │ │ -183 template │ │ │ │ │ -_1_8_4 class _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_p_e_c_i_a_l │ │ │ │ │ -185 { │ │ │ │ │ -186 public: │ │ │ │ │ -_1_8_7 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_8_8 typedef typename Refinement::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 │ │ │ │ │ -_C_o_m_m_o_n; │ │ │ │ │ -_1_8_9 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -190 │ │ │ │ │ -191 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -192 │ │ │ │ │ -193 private: │ │ │ │ │ -194 const _C_o_m_m_o_n & asCommon() const │ │ │ │ │ -195 { │ │ │ │ │ -196 return *static_cast(this); │ │ │ │ │ -197 } │ │ │ │ │ -198 }; │ │ │ │ │ -199 │ │ │ │ │ -200 template │ │ │ │ │ -201 typename RefinementSubEntityIteratorSpecial::CoordVector │ │ │ │ │ -_2_0_2 _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_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_ _c_o_o_r_d_s() const │ │ │ │ │ -204 { │ │ │ │ │ -205 std::array v(asCommon().vertexCoord()); │ │ │ │ │ -206 _C_o_o_r_d_V_e_c_t_o_r c; │ │ │ │ │ -207 for (int d = 0; d < dimension; d++) │ │ │ │ │ -208 { │ │ │ │ │ -209 c[d] = v[d]*1.0 / asCommon()._nIntervals; │ │ │ │ │ -210 } │ │ │ │ │ -211 return c; │ │ │ │ │ -212 } │ │ │ │ │ -213 │ │ │ │ │ -214 // for elements │ │ │ │ │ -215 │ │ │ │ │ -216 template │ │ │ │ │ -_2_1_7 class _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_p_e_c_i_a_l │ │ │ │ │ -218 { │ │ │ │ │ -219 public: │ │ │ │ │ -_2_2_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; │ │ │ │ │ -_2_2_1 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _C_o_m_m_o_n; │ │ │ │ │ -_2_2_2 typedef typename Refinement::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -_2_2_3 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -224 │ │ │ │ │ -225 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -226 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ -227 │ │ │ │ │ -228 private: │ │ │ │ │ -229 const _C_o_m_m_o_n & asCommon() const │ │ │ │ │ -230 { │ │ │ │ │ -231 return *static_cast(this); │ │ │ │ │ -232 } │ │ │ │ │ -233 }; │ │ │ │ │ -234 │ │ │ │ │ -235 template │ │ │ │ │ -236 typename RefinementSubEntityIteratorSpecial:: │ │ │ │ │ -IndexVector │ │ │ │ │ -_2_3_7 _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_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_>_:_: │ │ │ │ │ -238_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ -239 { │ │ │ │ │ -240 constexpr static int nIndices = 1 << dimension; │ │ │ │ │ -241 │ │ │ │ │ -242 // cell index tuple │ │ │ │ │ -243 std::array e(asCommon().cellCoord()); │ │ │ │ │ -244 │ │ │ │ │ -245 // vertices │ │ │ │ │ -246 _I_n_d_e_x_V_e_c_t_o_r vec; │ │ │ │ │ -247 for(int i = 0; i < nIndices; ++i) │ │ │ │ │ -248 { │ │ │ │ │ -249 int base = 1; │ │ │ │ │ -250 std::array alpha(asCommon().idx2multiidx(i)); │ │ │ │ │ -251 for (int d = 0; d < dimension; d++) { │ │ │ │ │ -252 vec[i] += (alpha[d] + e[d]) * base; │ │ │ │ │ -253 base *= asCommon()._nIntervals+1; │ │ │ │ │ -254 } │ │ │ │ │ -255 } │ │ │ │ │ -256 return vec; │ │ │ │ │ -257 } │ │ │ │ │ -258 │ │ │ │ │ -259 template │ │ │ │ │ -260 typename _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_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 │ │ │ │ │ -_2_6_1 _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_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_>_:_: │ │ │ │ │ -262_ _c_o_o_r_d_s() const │ │ │ │ │ -263 { │ │ │ │ │ -264 std::array v(asCommon().cellCoord()); │ │ │ │ │ -265 _C_o_o_r_d_V_e_c_t_o_r c; │ │ │ │ │ -266 for (int d=0; d │ │ │ │ │ -275 template │ │ │ │ │ -_2_7_6 class _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m:: │ │ │ │ │ -SubEntityIterator │ │ │ │ │ -277 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ │ -279 public _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_p_e_c_i_a_l │ │ │ │ │ -280 { │ │ │ │ │ -281 public: │ │ │ │ │ -_2_8_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_8_3 typedef typename Refinement::template _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 │ │ │ │ │ -_T_h_i_s; │ │ │ │ │ -284 │ │ │ │ │ -_2_8_5 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(unsigned int index, unsigned int nIntervals); │ │ │ │ │ -286 │ │ │ │ │ -_2_8_7 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ │ -_2_8_8 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ -289 │ │ │ │ │ -_2_9_0 int _i_n_d_e_x() const; │ │ │ │ │ -_2_9_1 Geometry _g_e_o_m_e_t_r_y () const; │ │ │ │ │ -292 private: │ │ │ │ │ -293 friend class _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_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, │ │ │ │ │ -codimension>; │ │ │ │ │ -294 unsigned int _index; │ │ │ │ │ -295 unsigned int _nIntervals; │ │ │ │ │ -296 │ │ │ │ │ -297 std::array │ │ │ │ │ -298 cellCoord(unsigned int idx) const │ │ │ │ │ -299 { │ │ │ │ │ -300 return idx2coord(idx, _nIntervals); │ │ │ │ │ -301 } │ │ │ │ │ -302 │ │ │ │ │ -303 std::array │ │ │ │ │ -304 vertexCoord(unsigned int idx) const │ │ │ │ │ -305 { │ │ │ │ │ -306 return idx2coord(idx, _nIntervals+1u); │ │ │ │ │ -307 } │ │ │ │ │ -308 │ │ │ │ │ -309 std::array │ │ │ │ │ -310 cellCoord() const │ │ │ │ │ -311 { │ │ │ │ │ -312 return cellCoord(_index); │ │ │ │ │ -313 } │ │ │ │ │ -314 │ │ │ │ │ -315 std::array │ │ │ │ │ -316 vertexCoord() const │ │ │ │ │ -317 { │ │ │ │ │ -318 return vertexCoord(_index); │ │ │ │ │ -319 } │ │ │ │ │ -320 │ │ │ │ │ -321 std::array │ │ │ │ │ -322 idx2coord(unsigned int idx, unsigned int w) const │ │ │ │ │ -323 { │ │ │ │ │ -324 std::array c; │ │ │ │ │ -325 for (unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; d++) │ │ │ │ │ -326 { │ │ │ │ │ -327 c[d] = idx%w; │ │ │ │ │ -328 idx = idx/w; │ │ │ │ │ -329 } │ │ │ │ │ -330 return c; │ │ │ │ │ -331 } │ │ │ │ │ -332 │ │ │ │ │ -333 unsigned int │ │ │ │ │ -334 coord2idx(std::array c, unsigned int w) const │ │ │ │ │ -335 { │ │ │ │ │ -336 unsigned int i = 0; │ │ │ │ │ -337 for (unsigned int d = _d_i_m_e_n_s_i_o_n; d > 0; d--) │ │ │ │ │ -338 { │ │ │ │ │ -339 i *= w; │ │ │ │ │ -340 i += c[d-1]; │ │ │ │ │ -341 } │ │ │ │ │ -342 return i; │ │ │ │ │ -343 } │ │ │ │ │ -344 │ │ │ │ │ -345 std::array │ │ │ │ │ -346 idx2multiidx(unsigned int idx) const │ │ │ │ │ -347 { │ │ │ │ │ -348 std::array alpha; │ │ │ │ │ -349 for (unsigned int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i) │ │ │ │ │ -350 alpha[i] = (idx >> i) & 1u; │ │ │ │ │ -351 return alpha; │ │ │ │ │ -352 } │ │ │ │ │ -353 }; │ │ │ │ │ -354 │ │ │ │ │ -355#ifndef DOXYGEN │ │ │ │ │ -356 template │ │ │ │ │ -357 template │ │ │ │ │ -358 RefinementImp::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -359 SubEntityIterator(unsigned int index, unsigned int nIntervals) │ │ │ │ │ -360 : _index(index), _nIntervals(nIntervals) │ │ │ │ │ -361 {} │ │ │ │ │ -362 │ │ │ │ │ -363 template │ │ │ │ │ -364 template │ │ │ │ │ -365 bool │ │ │ │ │ -366 RefinementImp::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -367 equals(const This &other) const │ │ │ │ │ -368 { │ │ │ │ │ -369 return ((_index == other._index) && (_nIntervals == other._nIntervals)); │ │ │ │ │ -370 } │ │ │ │ │ -371 │ │ │ │ │ -372 template │ │ │ │ │ -373 template │ │ │ │ │ -374 void │ │ │ │ │ -375 RefinementImp::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -376 increment() │ │ │ │ │ -377 { │ │ │ │ │ -378 ++_index; │ │ │ │ │ -379 } │ │ │ │ │ -380 │ │ │ │ │ -381 template │ │ │ │ │ -382 template │ │ │ │ │ -383 int │ │ │ │ │ -384 RefinementImp::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -385 index() const │ │ │ │ │ -386 { │ │ │ │ │ -387 return _index; │ │ │ │ │ -388 } │ │ │ │ │ -389 │ │ │ │ │ -390 template │ │ │ │ │ -391 template │ │ │ │ │ -392 typename RefinementImp::template Codim:: │ │ │ │ │ -Geometry │ │ │ │ │ -393 RefinementImp::Codim:: │ │ │ │ │ -SubEntityIterator::geometry () const │ │ │ │ │ -394 { │ │ │ │ │ -395 std::array intCoords = idx2coord │ │ │ │ │ -(_index,_nIntervals); │ │ │ │ │ -396 │ │ │ │ │ -397 Dune::FieldVector lower; │ │ │ │ │ -398 Dune::FieldVector upper; │ │ │ │ │ -399 │ │ │ │ │ -400 assert(codimension == 0 or codimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -401 │ │ │ │ │ -402 if constexpr (codimension == 0) { │ │ │ │ │ -403 for (size_t j = 0; j < _d_i_m_e_n_s_i_o_n; j++) │ │ │ │ │ -404 { │ │ │ │ │ -405 lower[j] = double(intCoords[j]) / double(_nIntervals); │ │ │ │ │ -406 upper[j] = double(intCoords[j] + 1) / double(_nIntervals); │ │ │ │ │ -407 } │ │ │ │ │ -408 │ │ │ │ │ -409 return typename RefinementImp<_d_i_m_e_n_s_i_o_n, │ │ │ │ │ -410 CoordType>::template _C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y(lower,upper); │ │ │ │ │ -411 } else { │ │ │ │ │ -412 for (size_t j = 0; j < _d_i_m_e_n_s_i_o_n; j++) │ │ │ │ │ -413 lower[j] = upper[j] = double(intCoords[j]) / double(_nIntervals); │ │ │ │ │ -414 │ │ │ │ │ -415 return typename RefinementImp<_d_i_m_e_n_s_i_o_n, │ │ │ │ │ -416 CoordType>::template _C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y(lower,upper,std:: │ │ │ │ │ -bitset(0)); │ │ │ │ │ -417 } │ │ │ │ │ -418 } │ │ │ │ │ -419 │ │ │ │ │ -420#endif // DOXYGEN │ │ │ │ │ -421 │ │ │ │ │ -422 } // namespace HCube │ │ │ │ │ -423 │ │ │ │ │ -424 // /////////////////////// │ │ │ │ │ -425 // │ │ │ │ │ -426 // The refinement traits │ │ │ │ │ -427 // │ │ │ │ │ -428 │ │ │ │ │ -429#ifndef DOXYGEN │ │ │ │ │ -430 template │ │ │ │ │ -432 struct Traits< │ │ │ │ │ -433 topologyId, CoordType, coerceToId, dim, │ │ │ │ │ -434 typename std::enable_if< │ │ │ │ │ -435 (dim >= 2 && │ │ │ │ │ -436 (GeometryTypes::cube(dim).id() >> 1) == │ │ │ │ │ -437 (topologyId >> 1) && │ │ │ │ │ -438 (GeometryTypes::cube(dim).id() >> 1) == │ │ │ │ │ -439 (coerceToId >> 1) │ │ │ │ │ -440 )>::type │ │ │ │ │ -441 > │ │ │ │ │ -442 { │ │ │ │ │ -443 typedef HCube::RefinementImp Imp; │ │ │ │ │ -444 }; │ │ │ │ │ -445#endif │ │ │ │ │ -446 │ │ │ │ │ -447 } // namespace RefinementImp │ │ │ │ │ -448 │ │ │ │ │ -449} // namespace Dune │ │ │ │ │ -450 │ │ │ │ │ -451#endif // DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ -_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. │ │ │ │ │ +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 GeometryTypes::none(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); │ │ │ │ │ +159 } │ │ │ │ │ +160 │ │ │ │ │ +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 │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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 geometry implementation for axis-aligned hypercubes. │ │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_C_o_d_i_m │ │ │ │ │ -Static tag representing a codimension. │ │ │ │ │ -DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -Refinement implementation for hypercubes │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:75 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 hcube.cc:86 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ │ -static ElementIterator eEnd(unsigned nIntervals) │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:153 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ │ -static unsigned nVertices(unsigned nIntervals) │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:109 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ │ -static VertexIterator vEnd(unsigned nIntervals) │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:126 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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,(1<< dimension)> IndexVector │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:87 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 hcube.cc:84 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 hcube.cc:85 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ │ -static unsigned nElements(unsigned nIntervals) │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:134 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:80 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ │ -static ElementIterator eBegin(unsigned nIntervals) │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:145 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -Know your own dimension. │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:78 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ │ -static VertexIterator vBegin(unsigned nIntervals) │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:118 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:101 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Dune::AxisAlignedCubeGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ │ -Geometry │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:103 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_p_e_c_i_a_l │ │ │ │ │ -SubEntityIterator base class for hypercube refinement. │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:175 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:189 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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_m_m_o_n │ │ │ │ │ -Refinement::template Codim< dimension >::SubEntityIterator Common │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:188 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:187 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:220 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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_m_m_o_n │ │ │ │ │ -Refinement::template Codim< 0 >::SubEntityIterator Common │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:221 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:223 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:222 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_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(unsigned int index, unsigned int nIntervals) │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_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_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_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 hcube.cc:282 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ │ -int index() const │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ │ -Refinement::template Codim< codimension >::SubEntityIterator This │ │ │ │ │ -DDeeffiinniittiioonn hcube.cc:283 │ │ │ │ │ +_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:126 │ │ │ │ │ +_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:222 │ │ │ │ │ +_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:372 │ │ │ │ │ +_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:377 │ │ │ │ │ +_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:367 │ │ │ │ │ +_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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelementimplementation.hh File Reference │ │ │ │ +dune-geometry: virtualrefinement.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,45 +70,97 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
referenceelementimplementation.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Functions
│ │ │ │ +
virtualrefinement.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ + │ │ │ │ +

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

│ │ │ │
#include <cassert>
│ │ │ │ -#include <algorithm>
│ │ │ │ -#include <limits>
│ │ │ │ -#include <tuple>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <typeinfo>
│ │ │ │ +#include <dune/common/exceptions.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>
│ │ │ │ +#include <dune/common/iteratorfacades.hh>
│ │ │ │ +#include "type.hh"
│ │ │ │ +#include "refinement.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, dimension >
 
class  Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, 0 >
 
class  Dune::VirtualRefinement< dimension, CoordType >::Codim< codimension >
 
class  Dune::VirtualRefinementSubEntityIteratorBackSpecial< dimension, CoordType, dimension >
 
class  Dune::VirtualRefinementSubEntityIteratorBackSpecial< dimension, CoordType, 0 >
 
class  Dune::VirtualRefinement< dimension, CoordType >::SubEntityIteratorBack< dimension, CoordType >
 
class  Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >
 
class  Dune::VirtualRefinementImpSubEntityIteratorBackSpecial< topologyId, CoordType, coerceToId, dimension, dimension >
 
class  Dune::VirtualRefinementImpSubEntityIteratorBackSpecial< topologyId, CoordType, coerceToId, dimension, 0 >
 
class  Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::SubEntityIteratorBack< codimension >
 
class  Dune::RefinementBuilder< dimension, CoordType >
 
class  Dune::RefinementBuilder< 1, CoordType >
 
class  Dune::RefinementBuilder< 3, CoordType >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Macros

#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<int dimension, class CoordType >
VirtualRefinement< dimension, CoordType > & Dune::buildRefinement (GeometryType geometryType, GeometryType coerceTo)
 return a reference to the VirtualRefinement according to the parameters
 
│ │ │ │ +

Detailed Description

│ │ │ │ +

This file contains the virtual wrapper around refinement.

│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_GEOMETRY_VIRTUALREFINEMENT_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,33 +1,74 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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.hh 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 | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +virtualrefinement.cc File Reference │ │ │ │ │ +This file contains the virtual wrapper around refinement. _M_o_r_e_._._. │ │ │ │ │ #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_/_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 │ │ │ │ │ +#include "_t_y_p_e_._h_h" │ │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_._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_:_:_V_i_r_t_u_a_l_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_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_:_:_V_i_r_t_u_a_l_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_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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _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_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_< │ │ │ │ │ + _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _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_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _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_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_ _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_B_u_i_l_d_e_r_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _1_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _3_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___G_E_O_M_E_T_R_Y___V_I_R_T_U_A_L_R_E_F_I_N_E_M_E_N_T___C_C │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t< dimension, CoordType > _D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t (_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ + &  geometryType, _G_e_o_m_e_t_r_y_T_y_p_e coerceTo) │ │ │ │ │ + return a reference to the │ │ │ │ │ +  _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t according to the │ │ │ │ │ + parameters │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +This file contains the virtual wrapper around refinement. │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__VVIIRRTTUUAALLRREEFFIINNEEMMEENNTT__CCCC ********** │ │ │ │ │ +#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00191_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelementimplementation.hh Source File │ │ │ │ +dune-geometry: virtualrefinement.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,721 +74,817 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
referenceelementimplementation.hh
│ │ │ │ +
virtualrefinement.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 (C) DUNE 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
│ │ │ │ -
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
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 {
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ +
7#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ +
8
│ │ │ │ +
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"
│ │ │ │ +
23
│ │ │ │ +
24namespace Dune
│ │ │ │ +
25{
│ │ │ │ +
26 // //////////////////////////////////////////
│ │ │ │ +
27 //
│ │ │ │ +
28 // The virtual base class and its iterators
│ │ │ │ +
29 //
│ │ │ │ +
30
│ │ │ │ +
31 //
│ │ │ │ +
32 // Refinement
│ │ │ │ +
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
│ │ │ │ +
35 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
39 {
│ │ │ │ +
40 return VertexIterator(vBeginBack(tag));
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
43 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
47 {
│ │ │ │ +
48 return VertexIterator(vEndBack(tag));
│ │ │ │ +
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 }
│ │ │ │ +
51 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return ElementIterator(eBeginBack(tag));
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
59 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
63 {
│ │ │ │ +
64 return ElementIterator(eEndBack(tag));
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 //
│ │ │ │ +
68 // The iterators
│ │ │ │ +
69 //
│ │ │ │ +
70
│ │ │ │ +
71 template<int dimension, class CoordType, int codimension>
│ │ │ │ + │ │ │ │ +
73
│ │ │ │ +
74 // The iterator for vertices
│ │ │ │ +
75 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
76 class VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, dimension>
│ │ │ │ +
77 {};
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79 // The iterator for elements
│ │ │ │ +
80 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
81 class VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, 0>
│ │ │ │ +
82 {
│ │ │ │ +
83 public:
│ │ │ │ + │ │ │ │ +
85 typedef typename Refinement::template Codim<0>::SubEntityIterator Common;
│ │ │ │ +
86 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ +
87
│ │ │ │ +
88 IndexVector vertexIndices() const;
│ │ │ │ +
89 };
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
91 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
94 vertexIndices() const
│ │ │ │ +
95 {
│ │ │ │ +
96 return static_cast<const Common *>(this)->backend->vertexIndices();
│ │ │ │ +
97 }
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
99 // The iterator common stuff
│ │ │ │ +
100 template<int dimension, class CoordType>
│ │ │ │ +
101 template<int codimension>
│ │ │ │ +
│ │ │ │ +
102 class VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ │ +
103 : public ForwardIteratorFacade<typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ +
104 public VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ +
105 {
│ │ │ │ +
106 public:
│ │ │ │ + │ │ │ │ +
108 typedef typename Refinement::template Codim<codimension>::SubEntityIterator This;
│ │ │ │ +
109 typedef typename Refinement::template SubEntityIteratorBack<codimension> IteratorBack;
│ │ │ │ +
110 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
111
│ │ │ │ + │ │ │ │ +
113 SubEntityIterator(const This &other);
│ │ │ │ + │ │ │ │ +
115
│ │ │ │ +
116 This &operator=(const This &other);
│ │ │ │ +
117
│ │ │ │ +
118 bool equals(const This &other) const;
│ │ │ │ +
119 void increment();
│ │ │ │ +
120
│ │ │ │ +
121 int index() const;
│ │ │ │ +
122
│ │ │ │ +
123 // If you simply use an unqualified CoordVector here g++-4.2 chokes
│ │ │ │ + │ │ │ │ +
125 CoordVector coords() const;
│ │ │ │ +
126 private:
│ │ │ │ +
127 friend class VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>;
│ │ │ │ +
128 IteratorBack *backend;
│ │ │ │ +
129 };
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
131#ifndef DOXYGEN
│ │ │ │ +
132 template<int dimension, class CoordType>
│ │ │ │ +
133 template<int codimension>
│ │ │ │ + │ │ │ │ +
135 SubEntityIterator(IteratorBack *backend_)
│ │ │ │ +
136 : backend(backend_)
│ │ │ │ +
137 {}
│ │ │ │ +
138
│ │ │ │ +
139 template<int dimension, class CoordType>
│ │ │ │ +
140 template<int codimension>
│ │ │ │ + │ │ │ │ +
142 SubEntityIterator(const This &other)
│ │ │ │ +
143 : backend(other.backend->clone())
│ │ │ │ +
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 // ----------------
│ │ │ │ +
146 template<int dimension, class CoordType>
│ │ │ │ +
147 template<int codimension>
│ │ │ │ +
148 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
149 ~SubEntityIterator()
│ │ │ │ +
150 {
│ │ │ │ +
151 delete backend;
│ │ │ │ +
152 }
│ │ │ │ +
153
│ │ │ │ +
154 template<int dimension, class CoordType>
│ │ │ │ +
155 template<int codimension>
│ │ │ │ +
156 typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator &
│ │ │ │ +
157 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
158 operator=(const This &other)
│ │ │ │ +
159 {
│ │ │ │ +
160 delete backend;
│ │ │ │ +
161 backend = other.backend->clone();
│ │ │ │ +
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
│ │ │ │ +
164 template<int dimension, class CoordType>
│ │ │ │ +
165 template<int codimension>
│ │ │ │ +
166 bool
│ │ │ │ +
167 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
168 equals(const This &other) const
│ │ │ │ +
169 { return *backend == *(other.backend); }
│ │ │ │ +
170
│ │ │ │ +
171 template<int dimension, class CoordType>
│ │ │ │ +
172 template<int codimension>
│ │ │ │ +
173 void
│ │ │ │ +
174 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
175 increment()
│ │ │ │ +
176 {
│ │ │ │ +
177 ++*backend;
│ │ │ │ +
178 }
│ │ │ │ +
179
│ │ │ │ +
180 template<int dimension, class CoordType>
│ │ │ │ +
181 template<int codimension>
│ │ │ │ +
182 int
│ │ │ │ +
183 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
184 index() const
│ │ │ │ +
185 { return backend->index(); }
│ │ │ │ +
186
│ │ │ │ +
187 template<int dimension, class CoordType>
│ │ │ │ +
188 template<int codimension>
│ │ │ │ +
189 typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator::CoordVector
│ │ │ │ +
190 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
191 coords() const
│ │ │ │ +
192 { return backend->coords(); }
│ │ │ │ +
193#endif // DOXYGEN
│ │ │ │ +
194
│ │ │ │ +
195 //
│ │ │ │ +
196 // The iterator backend
│ │ │ │ +
197 //
│ │ │ │ +
198
│ │ │ │ +
199 template<int dimension, class CoordType, int codimension>
│ │ │ │ + │ │ │ │ +
201
│ │ │ │ +
202 // The iterator backend for vertices
│ │ │ │ +
203 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
204 class VirtualRefinementSubEntityIteratorBackSpecial<dimension, CoordType, dimension>
│ │ │ │ +
205 {
│ │ │ │ +
206 public:
│ │ │ │
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( codim > 0 )
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
209 {}
│ │ │ │ +
│ │ │ │ +
210 };
│ │ │ │ +
│ │ │ │ +
211
│ │ │ │ +
212 // The iterator backend for elements
│ │ │ │ +
213 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
215 {
│ │ │ │ +
216 public:
│ │ │ │ + │ │ │ │ +
218 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ +
219
│ │ │ │ +
220 virtual IndexVector vertexIndices() const = 0;
│ │ │ │ +
221
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
223 {}
│ │ │ │ +
│ │ │ │ +
224 };
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
226 // The iterator backend common stuff
│ │ │ │ +
227 template<int dimension, class CoordType>
│ │ │ │ +
228 template<int codimension>
│ │ │ │ +
│ │ │ │ +
229 class VirtualRefinement<dimension, CoordType>::SubEntityIteratorBack
│ │ │ │ +
230 : public VirtualRefinementSubEntityIteratorBackSpecial<dimension, CoordType, codimension>
│ │ │ │ +
231 {
│ │ │ │ +
232 public:
│ │ │ │ + │ │ │ │ +
234 typedef typename Refinement::template SubEntityIteratorBack<codimension> This;
│ │ │ │ +
235 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
236
│ │ │ │ + │ │ │ │ +
238
│ │ │ │ +
239 virtual This *clone() const = 0;
│ │ │ │ +
240
│ │ │ │ +
241 virtual bool operator==(const This &other) const = 0;
│ │ │ │ +
242 virtual This &operator++() = 0;
│ │ │ │ +
243
│ │ │ │ +
244 virtual int index() const = 0;
│ │ │ │ +
245 virtual CoordVector coords() const = 0;
│ │ │ │ +
246 };
│ │ │ │ +
│ │ │ │ +
247
│ │ │ │ +
248 // /////////////////////////////////////////////////
│ │ │ │ +
249 //
│ │ │ │ +
250 // The derived classes and their iterator backends
│ │ │ │ +
251 //
│ │ │ │ +
252
│ │ │ │ +
253 //
│ │ │ │ +
254 // The refinement implementation
│ │ │ │ +
255 //
│ │ │ │ +
256
│ │ │ │ +
257 template<unsigned topologyId, class CoordType,
│ │ │ │ +
258 unsigned coerceToId, int dimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
260 : public Dune::VirtualRefinement<dimension, CoordType>
│ │ │ │ +
261 {
│ │ │ │ +
262 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
265
│ │ │ │ +
266 template<int codimension>
│ │ │ │ + │ │ │ │ +
268
│ │ │ │ +
269 int nVertices(Dune::RefinementIntervals tag) const;
│ │ │ │
270
│ │ │ │ -
271
│ │ │ │ +
271 int nElements(Dune::RefinementIntervals tag) const;
│ │ │ │
272
│ │ │ │ -
273 // referenceIntegrationOuterNormals
│ │ │ │ -
274 // --------------------------------
│ │ │ │ -
275
│ │ │ │ -
276 template< class ct, int cdim >
│ │ │ │ -
277 inline unsigned int
│ │ │ │ -
278 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ │ -
279 const FieldVector< ct, cdim > *origins,
│ │ │ │ -
280 FieldVector< ct, cdim > *normals )
│ │ │ │ -
281 {
│ │ │ │ -
282 assert( (dim > 0) && (dim <= cdim) );
│ │ │ │ -
283 assert( topologyId < numTopologies( dim ) );
│ │ │ │ -
284
│ │ │ │ -
285 if( dim > 1 )
│ │ │ │ -
286 {
│ │ │ │ -
287 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ │ -
288 if( isPrism( topologyId, dim ) )
│ │ │ │ -
289 {
│ │ │ │ -
290 const unsigned int numBaseFaces
│ │ │ │ -
291 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals );
│ │ │ │ -
292
│ │ │ │ -
293 for( unsigned int i = 0; i < 2; ++i )
│ │ │ │ -
294 {
│ │ │ │ -
295 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ │ -
296 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 );
│ │ │ │ -
297 }
│ │ │ │ -
298
│ │ │ │ -
299 return numBaseFaces+2;
│ │ │ │ -
300 }
│ │ │ │ -
301 else
│ │ │ │ -
302 {
│ │ │ │ -
303 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ │ -
304 normals[ 0 ][ dim-1 ] = ct( -1 );
│ │ │ │ -
305
│ │ │ │ -
306 const unsigned int numBaseFaces
│ │ │ │ -
307 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 );
│ │ │ │ -
308 for( unsigned int i = 1; i <= numBaseFaces; ++i )
│ │ │ │ -
309 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ];
│ │ │ │ -
310
│ │ │ │ -
311 return numBaseFaces+1;
│ │ │ │ -
312 }
│ │ │ │ -
313 }
│ │ │ │ -
314 else
│ │ │ │ -
315 {
│ │ │ │ -
316 for( unsigned int i = 0; i < 2; ++i )
│ │ │ │ -
317 {
│ │ │ │ -
318 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ │ -
319 normals[ i ][ 0 ] = ct( 2*int( i )-1 );
│ │ │ │ -
320 }
│ │ │ │ -
321
│ │ │ │ -
322 return 2;
│ │ │ │ -
323 }
│ │ │ │ -
324 }
│ │ │ │ -
325
│ │ │ │ -
326 template< class ct, int cdim >
│ │ │ │ -
327 inline unsigned int
│ │ │ │ -
328 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ │ -
329 FieldVector< ct, cdim > *normals )
│ │ │ │ -
330 {
│ │ │ │ -
331 assert( (dim > 0) && (dim <= cdim) );
│ │ │ │ -
332
│ │ │ │ -
333 FieldVector< ct, cdim > *origins
│ │ │ │ -
334 = new FieldVector< ct, cdim >[ size( topologyId, dim, 1 ) ];
│ │ │ │ -
335 referenceOrigins( topologyId, dim, 1, origins );
│ │ │ │ -
336
│ │ │ │ -
337 const unsigned int numFaces
│ │ │ │ -
338 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals );
│ │ │ │ -
339 assert( numFaces == size( topologyId, dim, 1 ) );
│ │ │ │ -
340
│ │ │ │ -
341 delete[] origins;
│ │ │ │ + │ │ │ │ +
274 private:
│ │ │ │ + │ │ │ │ +
276
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
281 };
│ │ │ │ +
│ │ │ │ +
282
│ │ │ │ +
283 template<unsigned topologyId, class CoordType,
│ │ │ │ +
284 unsigned coerceToId, int dimension>
│ │ │ │ +
285 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension> &
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
287 {
│ │ │ │ +
288 static VirtualRefinementImp instance_{};
│ │ │ │ +
289 return instance_;
│ │ │ │ +
290 }
│ │ │ │ +
│ │ │ │ +
291
│ │ │ │ +
292 template<unsigned topologyId, class CoordType,
│ │ │ │ +
293 unsigned coerceToId, int dimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
296 {
│ │ │ │ +
297 return StaticRefinement::nVertices(tag);
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299
│ │ │ │ +
300 template<unsigned topologyId, class CoordType,
│ │ │ │ +
301 unsigned coerceToId, int dimension>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
305 {
│ │ │ │ +
306 return new SubEntityIteratorBack<dimension>(StaticRefinement::vBegin(tag));
│ │ │ │ +
307 }
│ │ │ │ +
308
│ │ │ │ +
309 template<unsigned topologyId, class CoordType,
│ │ │ │ +
310 unsigned coerceToId, int dimension>
│ │ │ │ + │ │ │ │ +
312 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::
│ │ │ │ +
313 vEndBack(Dune::RefinementIntervals tag) const
│ │ │ │ +
314 {
│ │ │ │ +
315 return new SubEntityIteratorBack<dimension>(StaticRefinement::vEnd(tag));
│ │ │ │ +
316 }
│ │ │ │ +
317
│ │ │ │ +
318 template<unsigned topologyId, class CoordType,
│ │ │ │ +
319 unsigned coerceToId, int dimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
321 {
│ │ │ │ +
322 return StaticRefinement::nElements(tag);
│ │ │ │ +
323 }
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
325 template<unsigned topologyId, class CoordType,
│ │ │ │ +
326 unsigned coerceToId, int dimension>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
330 {
│ │ │ │ +
331 return new SubEntityIteratorBack<0>(StaticRefinement::eBegin(tag));
│ │ │ │ +
332 }
│ │ │ │ +
333
│ │ │ │ +
334 template<unsigned topologyId, class CoordType,
│ │ │ │ +
335 unsigned coerceToId, int dimension>
│ │ │ │ + │ │ │ │ +
337 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::
│ │ │ │ +
338 eEndBack(Dune::RefinementIntervals tag) const
│ │ │ │ +
339 {
│ │ │ │ +
340 return new SubEntityIteratorBack<0>(StaticRefinement::eEnd(tag));
│ │ │ │ +
341 }
│ │ │ │
342
│ │ │ │ -
343 return numFaces;
│ │ │ │ -
344 }
│ │ │ │ -
345
│ │ │ │ -
346 } // namespace Impl
│ │ │ │ -
347
│ │ │ │ -
348
│ │ │ │ -
349
│ │ │ │ -
350 // ReferenceElement
│ │ │ │ -
351 // ----------------
│ │ │ │ -
352
│ │ │ │ -
371 template< class ctype_, int dim >
│ │ │ │ -
372 class ReferenceElementImplementation
│ │ │ │ -
373 {
│ │ │ │ -
374
│ │ │ │ -
375 public:
│ │ │ │ -
376
│ │ │ │ -
378 using ctype = ctype_;
│ │ │ │ -
379
│ │ │ │ -
381 using CoordinateField = ctype;
│ │ │ │ -
382
│ │ │ │ -
384 using Coordinate = Dune::FieldVector<ctype,dim>;
│ │ │ │ -
385
│ │ │ │ -
387 static constexpr int dimension = dim;
│ │ │ │ -
388
│ │ │ │ -
390 typedef ctype Volume;
│ │ │ │ -
391
│ │ │ │ -
392 private:
│ │ │ │ -
393
│ │ │ │ -
394 friend class Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ │ -
395
│ │ │ │ -
396 struct SubEntityInfo;
│ │ │ │ -
397
│ │ │ │ -
398 template< int codim > struct CreateGeometries;
│ │ │ │ -
399
│ │ │ │ -
400 public:
│ │ │ │ -
402 template< int codim >
│ │ │ │ -
403 struct Codim
│ │ │ │ -
404 {
│ │ │ │ -
406 typedef AffineGeometry< ctype, dim-codim, dim > Geometry;
│ │ │ │ -
407 };
│ │ │ │ +
343 //
│ │ │ │ +
344 // The iterator backend implementation
│ │ │ │ +
345 //
│ │ │ │ +
346
│ │ │ │ +
347 // The iterator backend implementation specialties
│ │ │ │ +
348 template<unsigned topologyId, class CoordType,
│ │ │ │ +
349 unsigned coerceToId, int dimension, int codimension>
│ │ │ │ + │ │ │ │ +
351
│ │ │ │ +
352 // The iterator backend implementation specialties for vertices
│ │ │ │ +
353 template<unsigned topologyId, class CoordType,
│ │ │ │ +
354 unsigned coerceToId, int dimension>
│ │ │ │ +
│ │ │ │ +
355 class VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, dimension>
│ │ │ │ +
356 : public VirtualRefinement<dimension, CoordType>::template SubEntityIteratorBack<dimension>
│ │ │ │ +
357 {};
│ │ │ │ +
│ │ │ │ +
358
│ │ │ │ +
359 // The iterator backend implementation specialties for elements
│ │ │ │ +
360
│ │ │ │ +
361 template<unsigned topologyId, class CoordType,
│ │ │ │ +
362 unsigned coerceToId, int dimension>
│ │ │ │ +
│ │ │ │ +
363 class VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, 0>
│ │ │ │ +
364 : public VirtualRefinement<dimension, CoordType>::template SubEntityIteratorBack<0>
│ │ │ │ +
365 {
│ │ │ │ +
366 public:
│ │ │ │ + │ │ │ │ +
368 typedef typename VirtualRefinementImp::template SubEntityIteratorBack<0> Common;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
371 typedef typename RefinementBase::IndexVector IndexVector;
│ │ │ │ +
372
│ │ │ │ +
373 IndexVector vertexIndices() const;
│ │ │ │ +
374 };
│ │ │ │ +
│ │ │ │ +
375
│ │ │ │ +
376 template<unsigned topologyId, class CoordType,
│ │ │ │ +
377 unsigned coerceToId, int dimension>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
380 vertexIndices() const
│ │ │ │ +
381 {
│ │ │ │ +
382 IndexVector vIndices;
│ │ │ │ +
383 vIndices.reserve(StaticRefinement::IndexVector::dimension);
│ │ │ │ +
384
│ │ │ │ +
385 typename StaticRefinement::IndexVector sIndices = static_cast<const Common *>(this)->backend.vertexIndices();
│ │ │ │ +
386 for(int i = 0; i < StaticRefinement::IndexVector::dimension; ++i)
│ │ │ │ +
387 vIndices.push_back(sIndices[i]);
│ │ │ │ +
388 return vIndices;
│ │ │ │ +
389 }
│ │ │ │ +
│ │ │ │ +
390
│ │ │ │ +
391 // The shared iterator backend implementation
│ │ │ │ +
392 template<unsigned topologyId, class CoordType,
│ │ │ │ +
393 unsigned coerceToId, int dimension>
│ │ │ │ +
394 template<int codimension>
│ │ │ │ +
│ │ │ │ +
395 class VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack
│ │ │ │ +
396 : public VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, codimension>
│ │ │ │ +
397 {
│ │ │ │ +
398 public:
│ │ │ │ +
399 typedef typename StaticRefinement::template Codim<codimension>::SubEntityIterator BackendIterator;
│ │ │ │ + │ │ │ │ +
401 typedef typename VirtualRefinement::template SubEntityIteratorBack<codimension> Base;
│ │ │ │ + │ │ │ │ +
403
│ │ │ │ + │ │ │ │ +
405 SubEntityIteratorBack(const This &other);
│ │ │ │ +
406
│ │ │ │ +
407 Base *clone() const;
│ │ │ │
408
│ │ │ │ -
409 // ReferenceElement cannot be copied.
│ │ │ │ -
410 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = delete;
│ │ │ │ +
409 bool operator==(const Base &other) const;
│ │ │ │ +
410 Base &operator++();
│ │ │ │
411
│ │ │ │ -
412 // ReferenceElementImplementation cannot be copied.
│ │ │ │ -
413 ReferenceElementImplementation& operator= ( const ReferenceElementImplementation& ) = delete;
│ │ │ │ +
412 int index() const;
│ │ │ │ +
413 CoordVector coords() const;
│ │ │ │
414
│ │ │ │ -
415 // ReferenceElementImplementation is default-constructible (required for storage in std::array)
│ │ │ │ -
416 ReferenceElementImplementation () = default;
│ │ │ │ -
417
│ │ │ │ -
422 int size ( int c ) const
│ │ │ │ -
423 {
│ │ │ │ -
424 assert( (c >= 0) && (c <= dim) );
│ │ │ │ -
425 return info_[ c ].size();
│ │ │ │ -
426 }
│ │ │ │ +
415 private:
│ │ │ │ +
416 friend class VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, codimension>;
│ │ │ │ +
417 BackendIterator backend;
│ │ │ │ +
418 };
│ │ │ │ +
│ │ │ │ +
419
│ │ │ │ +
420 template<unsigned topologyId, class CoordType,
│ │ │ │ +
421 unsigned coerceToId, int dimension>
│ │ │ │ +
422 template<int codimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
425 : backend(backend_)
│ │ │ │ +
426 {}
│ │ │ │ +
│ │ │ │
427
│ │ │ │ -
439 int size ( int i, int c, int cc ) const
│ │ │ │ -
440 {
│ │ │ │ -
441 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ -
442 return info_[ c ][ i ].size( cc );
│ │ │ │ -
443 }
│ │ │ │ -
444
│ │ │ │ -
458 int subEntity ( int i, int c, int ii, int cc ) const
│ │ │ │ -
459 {
│ │ │ │ -
460 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ -
461 return info_[ c ][ i ].number( ii, cc );
│ │ │ │ -
462 }
│ │ │ │ -
463
│ │ │ │ -
479 auto subEntities ( int i, int c, int cc ) const
│ │ │ │ -
480 {
│ │ │ │ -
481 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ -
482 return info_[ c ][ i ].numbers( cc );
│ │ │ │ -
483 }
│ │ │ │ -
484
│ │ │ │ -
493 const GeometryType &type ( int i, int c ) const
│ │ │ │ -
494 {
│ │ │ │ -
495 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ -
496 return info_[ c ][ i ].type();
│ │ │ │ -
497 }
│ │ │ │ -
498
│ │ │ │ -
500 const GeometryType &type () const { return type( 0, 0 ); }
│ │ │ │ -
501
│ │ │ │ -
511 const Coordinate &position( int i, int c ) const
│ │ │ │ -
512 {
│ │ │ │ -
513 assert( (c >= 0) && (c <= dim) );
│ │ │ │ -
514 return baryCenters_[ c ][ i ];
│ │ │ │ -
515 }
│ │ │ │ -
516
│ │ │ │ -
524 bool checkInside ( const Coordinate &local ) const
│ │ │ │ -
525 {
│ │ │ │ -
526 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon();
│ │ │ │ -
527 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, tolerance );
│ │ │ │ -
528 }
│ │ │ │ +
428 template<unsigned topologyId, class CoordType,
│ │ │ │ +
429 unsigned coerceToId, int dimension>
│ │ │ │ +
430 template<int codimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
432 SubEntityIteratorBack(const This &other)
│ │ │ │ +
433 : VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, codimension>(other),
│ │ │ │ +
434 backend(other.backend)
│ │ │ │ +
435 {}
│ │ │ │ +
│ │ │ │ +
436
│ │ │ │ +
437 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ +
438 template<int codimension>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
441 clone() const
│ │ │ │ +
442 { return new This(*this); }
│ │ │ │ +
│ │ │ │ +
443
│ │ │ │ +
444 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ +
445 template<int codimension>
│ │ │ │ +
446 bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
448 operator==(const Base &other) const
│ │ │ │ +
449 {
│ │ │ │ +
450 try {
│ │ │ │ +
451 return backend == dynamic_cast<const This &>(other).backend;
│ │ │ │ +
452 }
│ │ │ │ +
453 catch(const std::bad_cast&)
│ │ │ │ +
454 {
│ │ │ │ +
455 return false;
│ │ │ │ +
456 }
│ │ │ │ +
457 }
│ │ │ │ +
│ │ │ │ +
458
│ │ │ │ +
459 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ +
460 template<int codimension>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
464 {
│ │ │ │ +
465 ++backend;
│ │ │ │ +
466 return *this;
│ │ │ │ +
467 }
│ │ │ │ +
│ │ │ │ +
468
│ │ │ │ +
469 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ +
470 template<int codimension>
│ │ │ │ +
471 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
473 index() const
│ │ │ │ +
474 { return backend.index(); }
│ │ │ │ +
│ │ │ │ +
475
│ │ │ │ +
476 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ +
477 template<int codimension>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
480 coords() const
│ │ │ │ +
481 { return backend.coords(); }
│ │ │ │ +
│ │ │ │ +
482
│ │ │ │ +
483 // ////////////////////////
│ │ │ │ +
484 //
│ │ │ │ +
485 // The refinement builder
│ │ │ │ +
486 //
│ │ │ │ +
487
│ │ │ │ +
488 template<int dimension, class CoordType>
│ │ │ │ +
489 class RefinementBuilder;
│ │ │ │ +
490
│ │ │ │ +
501 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
504 GeometryType geometryType,
│ │ │ │ +
506 GeometryType coerceTo)
│ │ │ │ +
507 {
│ │ │ │ +
508 // Check that the user used valid geometry types
│ │ │ │ +
509 assert(geometryType.dim() == dimension && coerceTo.dim() == dimension);
│ │ │ │ +
510 return RefinementBuilder<dimension, CoordType>::build( geometryType.id(), coerceTo.id() );
│ │ │ │ +
511 }
│ │ │ │ +
│ │ │ │ +
512
│ │ │ │ +
513 // In principle the trick with the class is no longer necessary,
│ │ │ │ +
514 // but I'm keeping it in here so it will be easier to specialize
│ │ │ │ +
515 // buildRefinement when someone implements pyramids and prisms
│ │ │ │ +
516 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
518 {
│ │ │ │ +
519 public:
│ │ │ │ +
520 static
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
522 build(unsigned topologyId, unsigned coerceToId)
│ │ │ │ +
523 {
│ │ │ │ +
524 topologyId &= ~1;
│ │ │ │ +
525 coerceToId &= ~1;
│ │ │ │ +
526
│ │ │ │ +
527 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
│ │ │ │ +
528 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
│ │ │ │
529
│ │ │ │ -
541 template< int codim >
│ │ │ │ -
542 typename Codim< codim >::Geometry geometry ( int i ) const
│ │ │ │ -
543 {
│ │ │ │ -
544 return std::get< codim >( geometries_ )[ i ];
│ │ │ │ -
545 }
│ │ │ │ -
546
│ │ │ │ -
548 Volume volume () const
│ │ │ │ -
549 {
│ │ │ │ -
550 return volume_;
│ │ │ │ -
551 }
│ │ │ │ -
552
│ │ │ │ -
560 const Coordinate &integrationOuterNormal ( int face ) const
│ │ │ │ -
561 {
│ │ │ │ -
562 assert( (face >= 0) && (face < int( integrationNormals_.size() )) );
│ │ │ │ -
563 return integrationNormals_[ face ];
│ │ │ │ -
564 }
│ │ │ │ +
530 switch( topologyId )
│ │ │ │ +
531 {
│ │ │ │ +
532 //case GeometryType::simplex:
│ │ │ │ +
533 case idSimplex :
│ │ │ │ +
534 //switch( coerceTo )
│ │ │ │ +
535 switch( coerceToId )
│ │ │ │ +
536 {
│ │ │ │ +
537 //case GeometryType::simplex:
│ │ │ │ +
538 case idSimplex :
│ │ │ │ + │ │ │ │ +
540 default :
│ │ │ │ +
541 break;
│ │ │ │ +
542 }
│ │ │ │ +
543 break;
│ │ │ │ +
544
│ │ │ │ +
545 //case GeometryType::cube:
│ │ │ │ +
546 case idCube :
│ │ │ │ +
547 switch( coerceToId )
│ │ │ │ +
548 {
│ │ │ │ +
549 case idSimplex :
│ │ │ │ + │ │ │ │ +
551 case idCube :
│ │ │ │ + │ │ │ │ +
553 default :
│ │ │ │ +
554 break;
│ │ │ │ +
555 }
│ │ │ │ +
556 break;
│ │ │ │ +
557
│ │ │ │ +
558 default :
│ │ │ │ +
559 break;
│ │ │ │ +
560 }
│ │ │ │ +
561 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, "
│ │ │ │ +
562 << coerceToId << " >.");
│ │ │ │ +
563 }
│ │ │ │ +
│ │ │ │ +
564 };
│ │ │ │ +
│ │ │ │
565
│ │ │ │ -
566 private:
│ │ │ │ -
567 void initialize ( unsigned int topologyId )
│ │ │ │ -
568 {
│ │ │ │ -
569 assert( topologyId < Impl::numTopologies( dim ) );
│ │ │ │ -
570
│ │ │ │ -
571 // set up subentities
│ │ │ │ -
572 for( int codim = 0; codim <= dim; ++codim )
│ │ │ │ -
573 {
│ │ │ │ -
574 const unsigned int size = Impl::size( topologyId, dim, codim );
│ │ │ │ -
575 info_[ codim ].resize( size );
│ │ │ │ -
576 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ -
577 info_[ codim ][ i ].initialize( topologyId, codim, i );
│ │ │ │ -
578 }
│ │ │ │ +
566 template<class CoordType>
│ │ │ │ +
│ │ │ │ +
567 class RefinementBuilder<1, CoordType>
│ │ │ │ +
568 {
│ │ │ │ +
569 static const std::size_t dimension = 1;
│ │ │ │ +
570 public:
│ │ │ │ +
571 static
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
573 build(unsigned topologyId, unsigned coerceToId)
│ │ │ │ +
574 {
│ │ │ │ +
575 topologyId &= ~1;
│ │ │ │ +
576 coerceToId &= ~1;
│ │ │ │ +
577
│ │ │ │ +
578 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
│ │ │ │
579
│ │ │ │ -
580 // compute corners
│ │ │ │ -
581 const unsigned int numVertices = size( dim );
│ │ │ │ -
582 baryCenters_[ dim ].resize( numVertices );
│ │ │ │ -
583 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) );
│ │ │ │ -
584
│ │ │ │ -
585 // compute barycenters
│ │ │ │ -
586 for( int codim = 0; codim < dim; ++codim )
│ │ │ │ -
587 {
│ │ │ │ -
588 baryCenters_[ codim ].resize( size(codim) );
│ │ │ │ -
589 for( int i = 0; i < size( codim ); ++i )
│ │ │ │ -
590 {
│ │ │ │ -
591 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) );
│ │ │ │ -
592 const unsigned int numCorners = size( i, codim, dim );
│ │ │ │ -
593 for( unsigned int j = 0; j < numCorners; ++j )
│ │ │ │ -
594 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, dim ) ];
│ │ │ │ -
595 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners );
│ │ │ │ -
596 }
│ │ │ │ -
597 }
│ │ │ │ -
598
│ │ │ │ -
599 // compute reference element volume
│ │ │ │ -
600 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim );
│ │ │ │ -
601
│ │ │ │ -
602 // compute integration outer normals
│ │ │ │ -
603 if( dim > 0 )
│ │ │ │ -
604 {
│ │ │ │ -
605 integrationNormals_.resize( size( 1 ) );
│ │ │ │ -
606 Impl::referenceIntegrationOuterNormals( topologyId, dim, &(integrationNormals_[ 0 ]) );
│ │ │ │ -
607 }
│ │ │ │ -
608
│ │ │ │ -
609 // set up geometries
│ │ │ │ -
610 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CreateGeometries< i >::apply( *this, geometries_ ); } );
│ │ │ │ -
611 }
│ │ │ │ -
612
│ │ │ │ -
613 template< int... codim >
│ │ │ │ -
614 static std::tuple< std::vector< typename Codim< codim >::Geometry >... >
│ │ │ │ -
615 makeGeometryTable ( std::integer_sequence< int, codim... > );
│ │ │ │ -
616
│ │ │ │ -
618 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 >() ) ) GeometryTable;
│ │ │ │ +
580 if (topologyId == 0 && coerceToId == 0)
│ │ │ │ + │ │ │ │ +
582
│ │ │ │ +
583 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, "
│ │ │ │ +
584 << coerceToId << " >.");
│ │ │ │ +
585 }
│ │ │ │ +
│ │ │ │ +
586 };
│ │ │ │ +
│ │ │ │ +
587
│ │ │ │ +
588 template<class CoordType>
│ │ │ │ +
│ │ │ │ +
589 class RefinementBuilder<3, CoordType>
│ │ │ │ +
590 {
│ │ │ │ +
591 static const std::size_t dimension = 3;
│ │ │ │ +
592 public:
│ │ │ │ +
593 static
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
595 build(unsigned topologyId, unsigned coerceToId)
│ │ │ │ +
596 {
│ │ │ │ +
597 topologyId &= ~1;
│ │ │ │ +
598 coerceToId &= ~1;
│ │ │ │ +
599
│ │ │ │ +
600 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
│ │ │ │ +
601 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
│ │ │ │ +
602 constexpr unsigned idPrism = GeometryTypes::prism.id() & ~1;
│ │ │ │ +
603 constexpr unsigned idPyramid = GeometryTypes::pyramid.id() & ~1;
│ │ │ │ +
604
│ │ │ │ +
605 switch( topologyId )
│ │ │ │ +
606 {
│ │ │ │ +
607 //case GeometryType::simplex:
│ │ │ │ +
608 case idSimplex :
│ │ │ │ +
609 //switch( coerceTo )
│ │ │ │ +
610 switch( coerceToId )
│ │ │ │ +
611 {
│ │ │ │ +
612 //case GeometryType::simplex:
│ │ │ │ +
613 case idSimplex :
│ │ │ │ + │ │ │ │ +
615 default :
│ │ │ │ +
616 break;
│ │ │ │ +
617 }
│ │ │ │ +
618 break;
│ │ │ │
619
│ │ │ │ -
621 ctype volume_;
│ │ │ │ -
622
│ │ │ │ -
623 std::vector< Coordinate > baryCenters_[ dim+1 ];
│ │ │ │ -
624 std::vector< Coordinate > integrationNormals_;
│ │ │ │ -
625
│ │ │ │ -
627 GeometryTable geometries_;
│ │ │ │ -
628
│ │ │ │ -
629 std::vector< SubEntityInfo > info_[ dim+1 ];
│ │ │ │ -
630 };
│ │ │ │ -
631
│ │ │ │ -
633 template< class ctype, int dim >
│ │ │ │ -
634 struct ReferenceElementImplementation< ctype, dim >::SubEntityInfo
│ │ │ │ -
635 {
│ │ │ │ -
636 // Compute upper bound for the number of subsentities.
│ │ │ │ -
637 // If someone knows an explicit formal feel free to
│ │ │ │ -
638 // implement it here.
│ │ │ │ -
639 static constexpr std::size_t maxSubEntityCount()
│ │ │ │ -
640 {
│ │ │ │ -
641 std::size_t maxCount=0;
│ │ │ │ -
642 for(std::size_t codim=0; codim<=dim; ++codim)
│ │ │ │ -
643 maxCount = std::max(maxCount, binomial(std::size_t(dim),codim)*(1 << codim));
│ │ │ │ -
644 return maxCount;
│ │ │ │ -
645 }
│ │ │ │ -
646
│ │ │ │ -
647 using SubEntityFlags = std::bitset<maxSubEntityCount()>;
│ │ │ │ -
648
│ │ │ │ -
649 class SubEntityRange
│ │ │ │ -
650 : public Dune::IteratorRange<const unsigned int*>
│ │ │ │ -
651 {
│ │ │ │ -
652 using Base = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ │ -
653
│ │ │ │ -
654 public:
│ │ │ │ -
655
│ │ │ │ -
656 using iterator = Base::iterator;
│ │ │ │ -
657 using const_iterator = Base::const_iterator;
│ │ │ │ -
658
│ │ │ │ -
659 SubEntityRange(const iterator& begin, const iterator& end, const SubEntityFlags& contains) :
│ │ │ │ -
660 Base(begin, end),
│ │ │ │ -
661 containsPtr_(&contains),
│ │ │ │ -
662 size_(end-begin)
│ │ │ │ -
663 {}
│ │ │ │ +
620 //case GeometryType::cube:
│ │ │ │ +
621 case idCube :
│ │ │ │ +
622 switch( coerceToId )
│ │ │ │ +
623 {
│ │ │ │ +
624 case idSimplex :
│ │ │ │ + │ │ │ │ +
626 case idCube :
│ │ │ │ + │ │ │ │ +
628 default :
│ │ │ │ +
629 break;
│ │ │ │ +
630 }
│ │ │ │ +
631 break;
│ │ │ │ +
632
│ │ │ │ +
633 //case GeometryType::prism:
│ │ │ │ +
634 case idPrism :
│ │ │ │ +
635 switch( coerceToId )
│ │ │ │ +
636 {
│ │ │ │ +
637 case idSimplex :
│ │ │ │ + │ │ │ │ +
639 default :
│ │ │ │ +
640 break;
│ │ │ │ +
641 }
│ │ │ │ +
642 break;
│ │ │ │ +
643
│ │ │ │ +
644 //case GeometryType::pyramid:
│ │ │ │ +
645 case idPyramid :
│ │ │ │ +
646 switch( coerceToId )
│ │ │ │ +
647 {
│ │ │ │ +
648 case idSimplex :
│ │ │ │ + │ │ │ │ +
650 default :
│ │ │ │ +
651 break;
│ │ │ │ +
652 }
│ │ │ │ +
653 break;
│ │ │ │ +
654
│ │ │ │ +
655 default :
│ │ │ │ +
656 break;
│ │ │ │ +
657 }
│ │ │ │ +
658 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, "
│ │ │ │ +
659 << coerceToId << " >.");
│ │ │ │ +
660 }
│ │ │ │ +
│ │ │ │ +
661 };
│ │ │ │ +
│ │ │ │ +
662
│ │ │ │ +
663} // namespace Dune
│ │ │ │
664
│ │ │ │ -
665 SubEntityRange() :
│ │ │ │ -
666 Base(),
│ │ │ │ -
667 containsPtr_(nullptr),
│ │ │ │ -
668 size_(0)
│ │ │ │ -
669 {}
│ │ │ │ -
670
│ │ │ │ -
671 std::size_t size() const
│ │ │ │ -
672 {
│ │ │ │ -
673 return size_;
│ │ │ │ -
674 }
│ │ │ │ -
675
│ │ │ │ -
676 bool contains(std::size_t i) const
│ │ │ │ -
677 {
│ │ │ │ -
678 return (*containsPtr_)[i];
│ │ │ │ -
679 }
│ │ │ │ -
680
│ │ │ │ -
681 private:
│ │ │ │ -
682 const SubEntityFlags* containsPtr_;
│ │ │ │ -
683 std::size_t size_;
│ │ │ │ -
684 std::size_t offset_;
│ │ │ │ -
685 };
│ │ │ │ -
686
│ │ │ │ -
687 using NumberRange = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ │ -
688
│ │ │ │ -
689 SubEntityInfo ()
│ │ │ │ -
690 : numbering_( nullptr )
│ │ │ │ -
691 {
│ │ │ │ -
692 std::fill( offset_.begin(), offset_.end(), 0 );
│ │ │ │ -
693 }
│ │ │ │ -
694
│ │ │ │ -
695 SubEntityInfo ( const SubEntityInfo &other )
│ │ │ │ -
696 : offset_( other.offset_ ),
│ │ │ │ -
697 type_( other.type_ ),
│ │ │ │ -
698 containsSubentity_( other.containsSubentity_ )
│ │ │ │ -
699 {
│ │ │ │ -
700 numbering_ = allocate();
│ │ │ │ -
701 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ │ -
702 }
│ │ │ │ -
703
│ │ │ │ -
704 ~SubEntityInfo () { deallocate( numbering_ ); }
│ │ │ │ -
705
│ │ │ │ -
706 const SubEntityInfo &operator= ( const SubEntityInfo &other )
│ │ │ │ -
707 {
│ │ │ │ -
708 type_ = other.type_;
│ │ │ │ -
709 offset_ = other.offset_;
│ │ │ │ -
710
│ │ │ │ -
711 deallocate( numbering_ );
│ │ │ │ -
712 numbering_ = allocate();
│ │ │ │ -
713 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ │ -
714
│ │ │ │ -
715 containsSubentity_ = other.containsSubentity_;
│ │ │ │ -
716
│ │ │ │ -
717 return *this;
│ │ │ │ -
718 }
│ │ │ │ -
719
│ │ │ │ -
720 int size ( int cc ) const
│ │ │ │ -
721 {
│ │ │ │ -
722 assert( (cc >= 0) && (cc <= dim) );
│ │ │ │ -
723 return (offset_[ cc+1 ] - offset_[ cc ]);
│ │ │ │ -
724 }
│ │ │ │ -
725
│ │ │ │ -
726 int number ( int ii, int cc ) const
│ │ │ │ -
727 {
│ │ │ │ -
728 assert( (ii >= 0) && (ii < size( cc )) );
│ │ │ │ -
729 return numbering_[ offset_[ cc ] + ii ];
│ │ │ │ -
730 }
│ │ │ │ -
731
│ │ │ │ -
732 auto numbers ( int cc ) const
│ │ │ │ -
733 {
│ │ │ │ -
734 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_[ cc+1 ], containsSubentity_[cc]);
│ │ │ │ -
735 }
│ │ │ │ -
736
│ │ │ │ -
737 const GeometryType &type () const { return type_; }
│ │ │ │ -
738
│ │ │ │ -
739 void initialize ( unsigned int topologyId, int codim, unsigned int i )
│ │ │ │ -
740 {
│ │ │ │ -
741 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i );
│ │ │ │ -
742 type_ = GeometryType( subId, dim-codim );
│ │ │ │ -
743
│ │ │ │ -
744 // compute offsets
│ │ │ │ -
745 for( int cc = 0; cc <= codim; ++cc )
│ │ │ │ -
746 offset_[ cc ] = 0;
│ │ │ │ -
747 for( int cc = codim; cc <= dim; ++cc )
│ │ │ │ -
748 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim );
│ │ │ │ -
749
│ │ │ │ -
750 // compute subnumbering
│ │ │ │ -
751 deallocate( numbering_ );
│ │ │ │ -
752 numbering_ = allocate();
│ │ │ │ -
753 for( int cc = codim; cc <= dim; ++cc )
│ │ │ │ -
754 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] );
│ │ │ │ -
755
│ │ │ │ -
756 // initialize containsSubentity lookup-table
│ │ │ │ -
757 for(std::size_t cc=0; cc<= dim; ++cc)
│ │ │ │ -
758 {
│ │ │ │ -
759 containsSubentity_[cc].reset();
│ │ │ │ -
760 for(std::size_t idx=0; idx<std::size_t(size(cc)); ++idx)
│ │ │ │ -
761 containsSubentity_[cc][number(idx,cc)] = true;
│ │ │ │ -
762 }
│ │ │ │ -
763 }
│ │ │ │ -
764
│ │ │ │ -
765 protected:
│ │ │ │ -
766 int codim () const { return dim - type().dim(); }
│ │ │ │ -
767
│ │ │ │ -
768 unsigned int *allocate () { return (capacity() != 0 ? new unsigned int[ capacity() ] : nullptr); }
│ │ │ │ -
769 void deallocate ( unsigned int *ptr ) { delete[] ptr; }
│ │ │ │ -
770 unsigned int capacity () const { return offset_[ dim+1 ]; }
│ │ │ │ -
771
│ │ │ │ -
772 private:
│ │ │ │ -
773 unsigned int *numbering_;
│ │ │ │ -
774 std::array< unsigned int, dim+2 > offset_;
│ │ │ │ -
775 GeometryType type_;
│ │ │ │ -
776 std::array< SubEntityFlags, dim+1> containsSubentity_;
│ │ │ │ -
777 };
│ │ │ │ -
778
│ │ │ │ -
779
│ │ │ │ -
780 template< class ctype, int dim >
│ │ │ │ -
781 template< int codim >
│ │ │ │ -
782 struct ReferenceElementImplementation< ctype, dim >::CreateGeometries
│ │ │ │ -
783 {
│ │ │ │ -
784 template< int cc >
│ │ │ │ -
785 static typename ReferenceElements< ctype, dim-cc >::ReferenceElement
│ │ │ │ -
786 subRefElement( const ReferenceElementImplementation< ctype, dim > &refElement, int i, std::integral_constant< int, cc > )
│ │ │ │ -
787 {
│ │ │ │ -
788 return ReferenceElements< ctype, dim-cc >::general( refElement.type( i, cc ) );
│ │ │ │ -
789 }
│ │ │ │ -
790
│ │ │ │ - │ │ │ │ -
792 subRefElement(const ReferenceElementImplementation< ctype, dim > &refElement,
│ │ │ │ -
793 [[maybe_unused]] int i, std::integral_constant<int, 0>)
│ │ │ │ -
794 {
│ │ │ │ -
795 return refElement;
│ │ │ │ -
796 }
│ │ │ │ -
797
│ │ │ │ -
798 static void apply ( const ReferenceElementImplementation< ctype, dim > &refElement, GeometryTable &geometries )
│ │ │ │ -
799 {
│ │ │ │ -
800 const int size = refElement.size( codim );
│ │ │ │ -
801 std::vector< FieldVector< ctype, dim > > origins( size );
│ │ │ │ -
802 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds( size );
│ │ │ │ -
803 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 ]), &(jacobianTransposeds[ 0 ]) );
│ │ │ │ -
804
│ │ │ │ -
805 std::get< codim >( geometries ).reserve( size );
│ │ │ │ -
806 for( int i = 0; i < size; ++i )
│ │ │ │ -
807 {
│ │ │ │ -
808 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i ] );
│ │ │ │ -
809 std::get< codim >( geometries ).push_back( geometry );
│ │ │ │ -
810 }
│ │ │ │ -
811 }
│ │ │ │ -
812 };
│ │ │ │ -
813
│ │ │ │ -
814#endif // DOXYGEN
│ │ │ │ -
815
│ │ │ │ -
816 } // namespace Geo
│ │ │ │ -
817
│ │ │ │ -
818} // namespace Dune
│ │ │ │ -
819
│ │ │ │ -
820#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ │ -
An implementation of the Geometry interface for affine geometries.
│ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ - │ │ │ │ +
665#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ +
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.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
@ size
Definition quadraturerules.hh:145
│ │ │ │ -
int binomial(int upper, int lower)
calculate
Definition simplex.cc:305
│ │ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ -
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:198
│ │ │ │ +
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:503
│ │ │ │ +
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ │ +
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
typedef IndexVector
The IndexVector of the Refinement.
Definition base.cc:177
│ │ │ │ +
static VertexIterator vEnd(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:217
│ │ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ +
Definition virtualrefinement.cc:72
│ │ │ │ +
Refinement::template Codim< 0 >::SubEntityIterator Common
Definition virtualrefinement.cc:85
│ │ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:84
│ │ │ │ +
Refinement::IndexVector IndexVector
Definition virtualrefinement.cc:86
│ │ │ │ +
VirtualRefinement< dimension, CoordType >::template Codim< codimension >::SubEntityIterator::CoordVector coords() const
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Refinement::template SubEntityIteratorBack< codimension > IteratorBack
Definition virtualrefinement.cc:109
│ │ │ │ +
Refinement::CoordVector CoordVector
Definition virtualrefinement.cc:110
│ │ │ │ +
Refinement::template Codim< codimension >::SubEntityIterator This
Definition virtualrefinement.cc:108
│ │ │ │ +
bool equals(const This &other) const
│ │ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:107
│ │ │ │ + │ │ │ │ +
Definition virtualrefinement.cc:200
│ │ │ │ +
virtual ~VirtualRefinementSubEntityIteratorBackSpecial()
Definition virtualrefinement.cc:208
│ │ │ │ + │ │ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:217
│ │ │ │ +
Refinement::IndexVector IndexVector
Definition virtualrefinement.cc:218
│ │ │ │ +
virtual ~VirtualRefinementSubEntityIteratorBackSpecial()
Definition virtualrefinement.cc:222
│ │ │ │ +
Definition virtualrefinement.cc:231
│ │ │ │ + │ │ │ │ +
Refinement::template SubEntityIteratorBack< codimension > This
Definition virtualrefinement.cc:234
│ │ │ │ + │ │ │ │ +
Refinement::CoordVector CoordVector
Definition virtualrefinement.cc:235
│ │ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:233
│ │ │ │ +
virtual bool operator==(const This &other) const =0
│ │ │ │ +
virtual CoordVector coords() const =0
│ │ │ │ +
virtual ~SubEntityIteratorBack()
Definition virtualrefinement.cc:237
│ │ │ │ + │ │ │ │ +
Definition virtualrefinement.cc:261
│ │ │ │ +
int nVertices(Dune::RefinementIntervals tag) const
Get the number of Vertices.
Definition virtualrefinement.cc:295
│ │ │ │ +
Dune::VirtualRefinement< dimension, CoordType > VirtualRefinement
Definition virtualrefinement.cc:264
│ │ │ │ +
int nElements(Dune::RefinementIntervals tag) const
Get the number of Elements.
Definition virtualrefinement.cc:320
│ │ │ │ +
static VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > & instance()
Definition virtualrefinement.cc:286
│ │ │ │ +
Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension > StaticRefinement
Definition virtualrefinement.cc:263
│ │ │ │ +
Definition virtualrefinement.cc:397
│ │ │ │ +
VirtualRefinement::template SubEntityIteratorBack< codimension > Base
Definition virtualrefinement.cc:401
│ │ │ │ +
VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::template SubEntityIteratorBack< codimension > This
Definition virtualrefinement.cc:400
│ │ │ │ +
StaticRefinement::template Codim< codimension >::SubEntityIterator BackendIterator
Definition virtualrefinement.cc:399
│ │ │ │ +
VirtualRefinement::CoordVector CoordVector
Definition virtualrefinement.cc:402
│ │ │ │ + │ │ │ │ +
VirtualRefinementImp::template SubEntityIteratorBack< 0 > Common
Definition virtualrefinement.cc:368
│ │ │ │ + │ │ │ │ +
VirtualRefinement< dimension, CoordType > RefinementBase
Definition virtualrefinement.cc:370
│ │ │ │ +
Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > VirtualRefinementImp
Definition virtualrefinement.cc:367
│ │ │ │ +
VirtualRefinementImp::StaticRefinement StaticRefinement
Definition virtualrefinement.cc:369
│ │ │ │ +
Definition virtualrefinement.cc:518
│ │ │ │ +
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:522
│ │ │ │ +
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:573
│ │ │ │ +
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:595
│ │ │ │ +
VirtualRefinement base class.
Definition virtualrefinement.hh:294
│ │ │ │ +
SubEntityIteratorBack< dimension > VertexIteratorBack
Definition virtualrefinement.hh:318
│ │ │ │ +
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:38
│ │ │ │ +
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:54
│ │ │ │ +
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:62
│ │ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition virtualrefinement.hh:301
│ │ │ │ +
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:46
│ │ │ │ +
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition virtualrefinement.hh:308
│ │ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition virtualrefinement.hh:299
│ │ │ │ +
SubEntityIteratorBack< 0 > ElementIteratorBack
Definition virtualrefinement.hh:319
│ │ │ │ +
codim database of VirtualRefinement
Definition virtualrefinement.hh:378
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,767 +1,1002 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -referenceelementimplementation.hh │ │ │ │ │ +virtualrefinement.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 (C) DUNE 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 │ │ │ │ │ -7 │ │ │ │ │ -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{ │ │ │ │ │ -31 │ │ │ │ │ -32 namespace Geo │ │ │ │ │ -33 { │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ +_7#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ +8 │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ +20 │ │ │ │ │ +21#include "_t_y_p_e_._h_h" │ │ │ │ │ +22#include "_r_e_f_i_n_e_m_e_n_t_._h_h" │ │ │ │ │ +23 │ │ │ │ │ +24namespace _D_u_n_e │ │ │ │ │ +25{ │ │ │ │ │ +26 // ////////////////////////////////////////// │ │ │ │ │ +27 // │ │ │ │ │ +28 // The virtual base class and its iterators │ │ │ │ │ +29 // │ │ │ │ │ +30 │ │ │ │ │ +31 // │ │ │ │ │ +32 // Refinement │ │ │ │ │ +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 │ │ │ │ │ +35 template │ │ │ │ │ +36 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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 │ │ │ │ │ +_3_7 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ +38_ _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) const │ │ │ │ │ +39 { │ │ │ │ │ +40 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(vBeginBack(tag)); │ │ │ │ │ +41 } │ │ │ │ │ +42 │ │ │ │ │ +43 template │ │ │ │ │ +44 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_5 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ +46_ _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) const │ │ │ │ │ +47 { │ │ │ │ │ +48 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(vEndBack(tag)); │ │ │ │ │ +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 _s_i_z_e ( 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 == _s_i_z_e( 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 } │ │ │ │ │ +51 template │ │ │ │ │ +52 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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 │ │ │ │ │ +_5_3 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ +54_ _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) const │ │ │ │ │ +55 { │ │ │ │ │ +56 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(eBeginBack(tag)); │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +59 template │ │ │ │ │ +60 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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 │ │ │ │ │ +_6_1 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ +62_ _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) const │ │ │ │ │ +63 { │ │ │ │ │ +64 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(eEndBack(tag)); │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +67 // │ │ │ │ │ +68 // The iterators │ │ │ │ │ +69 // │ │ │ │ │ +70 │ │ │ │ │ +71 template │ │ │ │ │ +_7_2 class _V_i_r_t_u_a_l_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_p_e_c_i_a_l; │ │ │ │ │ +73 │ │ │ │ │ +74 // The iterator for vertices │ │ │ │ │ +75 template │ │ │ │ │ +_7_6 class _V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ +77 {}; │ │ │ │ │ +78 │ │ │ │ │ +79 // The iterator for elements │ │ │ │ │ +80 template │ │ │ │ │ +_8_1 class _V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ +82 { │ │ │ │ │ +83 public: │ │ │ │ │ +_8_4 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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; │ │ │ │ │ +_8_5 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _C_o_m_m_o_n; │ │ │ │ │ +_8_6 typedef typename Refinement::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +87 │ │ │ │ │ +88 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ +89 }; │ │ │ │ │ +90 │ │ │ │ │ +91 template │ │ │ │ │ +92 typename _V_i_r_t_u_a_l_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_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 │ │ │ │ │ +_9_3 _V_i_r_t_u_a_l_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_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_>_:_: │ │ │ │ │ +94_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ +95 { │ │ │ │ │ +96 return static_cast(this)->backend->vertexIndices(); │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +99 // The iterator common stuff │ │ │ │ │ +100 template │ │ │ │ │ +101 template │ │ │ │ │ +_1_0_2 class _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::_C_o_d_i_m:: │ │ │ │ │ +SubEntityIterator │ │ │ │ │ +103 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ │ +104 public _V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ +105 { │ │ │ │ │ +106 public: │ │ │ │ │ +_1_0_7 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_0_8 typedef typename Refinement::template _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 │ │ │ │ │ +_T_h_i_s; │ │ │ │ │ +_1_0_9 typedef typename Refinement::template _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> │ │ │ │ │ +_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ +_1_1_0 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +111 │ │ │ │ │ +_1_1_2 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(_I_t_e_r_a_t_o_r_B_a_c_k *backend); │ │ │ │ │ +_1_1_3 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(const _T_h_i_s &other); │ │ │ │ │ +_1_1_4 _~_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(); │ │ │ │ │ +115 │ │ │ │ │ +_1_1_6 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _T_h_i_s &other); │ │ │ │ │ +117 │ │ │ │ │ +_1_1_8 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ │ +_1_1_9 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ +120 │ │ │ │ │ +_1_2_1 int _i_n_d_e_x() const; │ │ │ │ │ +122 │ │ │ │ │ +123 // If you simply use an unqualified CoordVector here g++-4.2 chokes │ │ │ │ │ +124 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_t_e_m_p_l_a_t_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:: │ │ │ │ │ +_1_2_5 CoordVector _c_o_o_r_d_s() const; │ │ │ │ │ +126 private: │ │ │ │ │ +127 friend class _V_i_r_t_u_a_l_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_p_e_c_i_a_l; │ │ │ │ │ +128 _I_t_e_r_a_t_o_r_B_a_c_k *backend; │ │ │ │ │ +129 }; │ │ │ │ │ +130 │ │ │ │ │ +131#ifndef DOXYGEN │ │ │ │ │ +132 template │ │ │ │ │ +133 template │ │ │ │ │ +134 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_:_: │ │ │ │ │ +135_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(IteratorBack *backend_) │ │ │ │ │ +136 : backend(backend_) │ │ │ │ │ +137 {} │ │ │ │ │ +138 │ │ │ │ │ +139 template │ │ │ │ │ +140 template │ │ │ │ │ +141 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_:_: │ │ │ │ │ +142_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(const This &other) │ │ │ │ │ +143 : backend(other.backend->clone()) │ │ │ │ │ +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 // ---------------- │ │ │ │ │ +146 template │ │ │ │ │ +147 template │ │ │ │ │ +148 VirtualRefinement::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +149 ~SubEntityIterator() │ │ │ │ │ +150 { │ │ │ │ │ +151 delete backend; │ │ │ │ │ +152 } │ │ │ │ │ +153 │ │ │ │ │ +154 template │ │ │ │ │ +155 template │ │ │ │ │ +156 typename VirtualRefinement::template │ │ │ │ │ +Codim::SubEntityIterator & │ │ │ │ │ +157 VirtualRefinement::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +158 operator=(const This &other) │ │ │ │ │ +159 { │ │ │ │ │ +160 delete backend; │ │ │ │ │ +161 backend = other.backend->clone(); │ │ │ │ │ +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 ) ) │ │ │ │ │ +164 template │ │ │ │ │ +165 template │ │ │ │ │ +166 bool │ │ │ │ │ +167 VirtualRefinement::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +168 equals(const This &other) const │ │ │ │ │ +169 { return *backend == *(other.backend); } │ │ │ │ │ +170 │ │ │ │ │ +171 template │ │ │ │ │ +172 template │ │ │ │ │ +173 void │ │ │ │ │ +174 VirtualRefinement::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +175 increment() │ │ │ │ │ 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 │ │ │ │ │ +177 ++*backend; │ │ │ │ │ +178 } │ │ │ │ │ +179 │ │ │ │ │ +180 template │ │ │ │ │ +181 template │ │ │ │ │ +182 int │ │ │ │ │ +183 VirtualRefinement::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +184 index() const │ │ │ │ │ +185 { return backend->index(); } │ │ │ │ │ +186 │ │ │ │ │ +187 template │ │ │ │ │ +188 template │ │ │ │ │ +189 typename VirtualRefinement::template │ │ │ │ │ +Codim::SubEntityIterator::CoordVector │ │ │ │ │ +190 VirtualRefinement::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +191 coords() const │ │ │ │ │ +192 { return backend->coords(); } │ │ │ │ │ +193#endif // DOXYGEN │ │ │ │ │ +194 │ │ │ │ │ +195 // │ │ │ │ │ +196 // The iterator backend │ │ │ │ │ +197 // │ │ │ │ │ +198 │ │ │ │ │ +199 template │ │ │ │ │ +_2_0_0 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l; │ │ │ │ │ +201 │ │ │ │ │ +202 // The iterator backend for vertices │ │ │ │ │ +203 template │ │ │ │ │ +_2_0_4 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +205 { │ │ │ │ │ +206 public: │ │ │ │ │ 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( codim > 0 ) │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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 } │ │ │ │ │ +_2_0_8 virtual _~_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l() │ │ │ │ │ +209 {} │ │ │ │ │ +210 }; │ │ │ │ │ +211 │ │ │ │ │ +212 // The iterator backend for elements │ │ │ │ │ +213 template │ │ │ │ │ +_2_1_4 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +215 { │ │ │ │ │ +216 public: │ │ │ │ │ +_2_1_7 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_1_8 typedef typename Refinement::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +219 │ │ │ │ │ +_2_2_0 virtual _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 = 0; │ │ │ │ │ +221 │ │ │ │ │ +_2_2_2 virtual _~_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l() │ │ │ │ │ +223 {} │ │ │ │ │ +224 }; │ │ │ │ │ +225 │ │ │ │ │ +226 // The iterator backend common stuff │ │ │ │ │ +227 template │ │ │ │ │ +228 template │ │ │ │ │ +_2_2_9 class _V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +230 : public _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +231 { │ │ │ │ │ +232 public: │ │ │ │ │ +_2_3_3 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_3_4 typedef typename Refinement::template _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> │ │ │ │ │ +_T_h_i_s; │ │ │ │ │ +_2_3_5 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +236 │ │ │ │ │ +_2_3_7 virtual _~_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k() {} │ │ │ │ │ +238 │ │ │ │ │ +_2_3_9 virtual _T_h_i_s *_c_l_o_n_e() const = 0; │ │ │ │ │ +240 │ │ │ │ │ +_2_4_1 virtual bool _o_p_e_r_a_t_o_r_=_=(const _T_h_i_s &other) const = 0; │ │ │ │ │ +_2_4_2 virtual _T_h_i_s &_o_p_e_r_a_t_o_r_+_+() = 0; │ │ │ │ │ +243 │ │ │ │ │ +_2_4_4 virtual int _i_n_d_e_x() const = 0; │ │ │ │ │ +_2_4_5 virtual _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const = 0; │ │ │ │ │ +246 }; │ │ │ │ │ +247 │ │ │ │ │ +248 // ///////////////////////////////////////////////// │ │ │ │ │ +249 // │ │ │ │ │ +250 // The derived classes and their iterator backends │ │ │ │ │ +251 // │ │ │ │ │ +252 │ │ │ │ │ +253 // │ │ │ │ │ +254 // The refinement implementation │ │ │ │ │ +255 // │ │ │ │ │ +256 │ │ │ │ │ +257 template │ │ │ │ │ +_2_5_9 class _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +260 : public _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +261 { │ │ │ │ │ +262 public: │ │ │ │ │ +_2_6_3 typedef _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_> _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ +_2_6_4 typedef _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ +265 │ │ │ │ │ +266 template │ │ │ │ │ +267 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ +268 │ │ │ │ │ +269 int nVertices(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ 270 │ │ │ │ │ -271 │ │ │ │ │ +271 int nElements(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ 272 │ │ │ │ │ -273 // referenceIntegrationOuterNormals │ │ │ │ │ -274 // -------------------------------- │ │ │ │ │ -275 │ │ │ │ │ -276 template< class ct, int cdim > │ │ │ │ │ -277 inline unsigned int │ │ │ │ │ -278 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ │ -279 const FieldVector< ct, cdim > *origins, │ │ │ │ │ -280 FieldVector< ct, cdim > *normals ) │ │ │ │ │ -281 { │ │ │ │ │ -282 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ │ -283 assert( topologyId < numTopologies( dim ) ); │ │ │ │ │ -284 │ │ │ │ │ -285 if( dim > 1 ) │ │ │ │ │ -286 { │ │ │ │ │ -287 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ │ -288 if( isPrism( topologyId, dim ) ) │ │ │ │ │ -289 { │ │ │ │ │ -290 const unsigned int numBaseFaces │ │ │ │ │ -291 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals ); │ │ │ │ │ -292 │ │ │ │ │ -293 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ │ -294 { │ │ │ │ │ -295 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ │ -296 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 ); │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -299 return numBaseFaces+2; │ │ │ │ │ -300 } │ │ │ │ │ -301 else │ │ │ │ │ -302 { │ │ │ │ │ -303 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ │ -304 normals[ 0 ][ dim-1 ] = ct( -1 ); │ │ │ │ │ -305 │ │ │ │ │ -306 const unsigned int numBaseFaces │ │ │ │ │ -307 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 ); │ │ │ │ │ -308 for( unsigned int i = 1; i <= numBaseFaces; ++i ) │ │ │ │ │ -309 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ]; │ │ │ │ │ -310 │ │ │ │ │ -311 return numBaseFaces+1; │ │ │ │ │ -312 } │ │ │ │ │ -313 } │ │ │ │ │ -314 else │ │ │ │ │ -315 { │ │ │ │ │ -316 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ │ -317 { │ │ │ │ │ -318 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ │ -319 normals[ i ][ 0 ] = ct( 2*int( i )-1 ); │ │ │ │ │ -320 } │ │ │ │ │ -321 │ │ │ │ │ -322 return 2; │ │ │ │ │ +273 static _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_> │ │ │ │ │ +&instance(); │ │ │ │ │ +274 private: │ │ │ │ │ +275 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p() {} │ │ │ │ │ +276 │ │ │ │ │ +277 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *vBeginBack(_D_u_n_e_:_: │ │ │ │ │ +_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ +278 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *vEndBack(_D_u_n_e_:_: │ │ │ │ │ +_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ +279 typename _V_i_r_t_u_a_l_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_B_a_c_k *eBeginBack(_D_u_n_e_:_: │ │ │ │ │ +_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ +280 typename _V_i_r_t_u_a_l_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_B_a_c_k *eEndBack(_D_u_n_e_:_: │ │ │ │ │ +_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ +281 }; │ │ │ │ │ +282 │ │ │ │ │ +283 template │ │ │ │ │ +285 VirtualRefinementImp & │ │ │ │ │ +_2_8_6 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_s_t_a_n_c_e() │ │ │ │ │ +287 { │ │ │ │ │ +288 static _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p instance_{}; │ │ │ │ │ +289 return instance_; │ │ │ │ │ +290 } │ │ │ │ │ +291 │ │ │ │ │ +292 template │ │ │ │ │ +_2_9_4 int _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +295_ _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) const │ │ │ │ │ +296 { │ │ │ │ │ +297 return _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(tag); │ │ │ │ │ +298 } │ │ │ │ │ +299 │ │ │ │ │ +300 template │ │ │ │ │ +302 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k * │ │ │ │ │ +303 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +304_ _v_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ +305 { │ │ │ │ │ +306 return new SubEntityIteratorBack(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n(tag)); │ │ │ │ │ +307 } │ │ │ │ │ +308 │ │ │ │ │ +309 template │ │ │ │ │ +311 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k * │ │ │ │ │ +312 VirtualRefinementImp:: │ │ │ │ │ +313 vEndBack(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ +314 { │ │ │ │ │ +315 return new SubEntityIteratorBack(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d(tag)); │ │ │ │ │ +316 } │ │ │ │ │ +317 │ │ │ │ │ +318 template │ │ │ │ │ +_3_2_0 int _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_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) const │ │ │ │ │ +321 { │ │ │ │ │ +322 return _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(tag); │ │ │ │ │ 323 } │ │ │ │ │ -324 } │ │ │ │ │ -325 │ │ │ │ │ -326 template< class ct, int cdim > │ │ │ │ │ -327 inline unsigned int │ │ │ │ │ -328 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ │ -329 FieldVector< ct, cdim > *normals ) │ │ │ │ │ +324 │ │ │ │ │ +325 template │ │ │ │ │ +327 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_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_B_a_c_k * │ │ │ │ │ +328 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +329_ _e_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ 330 { │ │ │ │ │ -331 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ │ -332 │ │ │ │ │ -333 FieldVector< ct, cdim > *origins │ │ │ │ │ -334 = new FieldVector< ct, cdim >[ _s_i_z_e( topologyId, dim, 1 ) ]; │ │ │ │ │ -335 referenceOrigins( topologyId, dim, 1, origins ); │ │ │ │ │ -336 │ │ │ │ │ -337 const unsigned int numFaces │ │ │ │ │ -338 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals ); │ │ │ │ │ -339 assert( numFaces == _s_i_z_e( topologyId, dim, 1 ) ); │ │ │ │ │ -340 │ │ │ │ │ -341 delete[] origins; │ │ │ │ │ +331 return new SubEntityIteratorBack<0>(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(tag)); │ │ │ │ │ +332 } │ │ │ │ │ +333 │ │ │ │ │ +334 template │ │ │ │ │ +336 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_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_B_a_c_k * │ │ │ │ │ +337 VirtualRefinementImp:: │ │ │ │ │ +338 eEndBack(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ +339 { │ │ │ │ │ +340 return new SubEntityIteratorBack<0>(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d(tag)); │ │ │ │ │ +341 } │ │ │ │ │ 342 │ │ │ │ │ -343 return numFaces; │ │ │ │ │ -344 } │ │ │ │ │ -345 │ │ │ │ │ -346 } // namespace Impl │ │ │ │ │ -347 │ │ │ │ │ -348 │ │ │ │ │ -349 │ │ │ │ │ -350 // ReferenceElement │ │ │ │ │ -351 // ---------------- │ │ │ │ │ -352 │ │ │ │ │ -371 template< class ctype_, int dim > │ │ │ │ │ -372 class ReferenceElementImplementation │ │ │ │ │ -373 { │ │ │ │ │ -374 │ │ │ │ │ -375 public: │ │ │ │ │ -376 │ │ │ │ │ -378 using ctype = ctype_; │ │ │ │ │ -379 │ │ │ │ │ -381 using CoordinateField = ctype; │ │ │ │ │ -382 │ │ │ │ │ -384 using Coordinate = Dune::FieldVector; │ │ │ │ │ -385 │ │ │ │ │ -387 static constexpr int dimension = dim; │ │ │ │ │ -388 │ │ │ │ │ -390 typedef ctype Volume; │ │ │ │ │ -391 │ │ │ │ │ -392 private: │ │ │ │ │ -393 │ │ │ │ │ -394 friend class Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ │ -395 │ │ │ │ │ -396 struct SubEntityInfo; │ │ │ │ │ -397 │ │ │ │ │ -398 template< int codim > struct CreateGeometries; │ │ │ │ │ -399 │ │ │ │ │ -400 public: │ │ │ │ │ -402 template< int codim > │ │ │ │ │ -403 struct Codim │ │ │ │ │ -404 { │ │ │ │ │ -406 typedef AffineGeometry< ctype, dim-codim, dim > Geometry; │ │ │ │ │ -407 }; │ │ │ │ │ +343 // │ │ │ │ │ +344 // The iterator backend implementation │ │ │ │ │ +345 // │ │ │ │ │ +346 │ │ │ │ │ +347 // The iterator backend implementation specialties │ │ │ │ │ +348 template │ │ │ │ │ +_3_5_0 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l; │ │ │ │ │ +351 │ │ │ │ │ +352 // The iterator backend implementation specialties for vertices │ │ │ │ │ +353 template │ │ │ │ │ +_3_5_5 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +356 : public _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::template │ │ │ │ │ +SubEntityIteratorBack │ │ │ │ │ +357 {}; │ │ │ │ │ +358 │ │ │ │ │ +359 // The iterator backend implementation specialties for elements │ │ │ │ │ +360 │ │ │ │ │ +361 template │ │ │ │ │ +_3_6_3 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +364 : public _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::template │ │ │ │ │ +SubEntityIteratorBack<0> │ │ │ │ │ +365 { │ │ │ │ │ +366 public: │ │ │ │ │ +_3_6_7 typedef _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_> _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p; │ │ │ │ │ +_3_6_8 typedef typename VirtualRefinementImp::template SubEntityIteratorBack<0> │ │ │ │ │ +_C_o_m_m_o_n; │ │ │ │ │ +_3_6_9 typedef typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ +_3_7_0 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_B_a_s_e; │ │ │ │ │ +_3_7_1 typedef typename RefinementBase::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +372 │ │ │ │ │ +373 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ +374 }; │ │ │ │ │ +375 │ │ │ │ │ +376 template │ │ │ │ │ +378 typename _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_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_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +_3_7_9 _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_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_,_ _0_>_:_: │ │ │ │ │ +380_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ +381 { │ │ │ │ │ +382 _I_n_d_e_x_V_e_c_t_o_r vIndices; │ │ │ │ │ +383 vIndices.reserve(StaticRefinement::IndexVector::dimension); │ │ │ │ │ +384 │ │ │ │ │ +385 typename _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r sIndices = static_cast(this)->backend.vertexIndices(); │ │ │ │ │ +386 for(int i = 0; i < StaticRefinement::IndexVector::dimension; ++i) │ │ │ │ │ +387 vIndices.push_back(sIndices[i]); │ │ │ │ │ +388 return vIndices; │ │ │ │ │ +389 } │ │ │ │ │ +390 │ │ │ │ │ +391 // The shared iterator backend implementation │ │ │ │ │ +392 template │ │ │ │ │ +394 template │ │ │ │ │ +_3_9_5 class _V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +396 : public _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +397 { │ │ │ │ │ +398 public: │ │ │ │ │ +_3_9_9 typedef typename StaticRefinement::template _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 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ │ +_4_0_0 typedef typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> _T_h_i_s; │ │ │ │ │ +_4_0_1 typedef typename VirtualRefinement::template │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> _B_a_s_e; │ │ │ │ │ +_4_0_2 typedef typename _V_i_r_t_u_a_l_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; │ │ │ │ │ +403 │ │ │ │ │ +404 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r &backend); │ │ │ │ │ +405 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _T_h_i_s &other); │ │ │ │ │ +406 │ │ │ │ │ +407 _B_a_s_e *clone() const; │ │ │ │ │ 408 │ │ │ │ │ -409 // ReferenceElement cannot be copied. │ │ │ │ │ -410 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = │ │ │ │ │ -delete; │ │ │ │ │ +409 bool operator==(const _B_a_s_e &other) const; │ │ │ │ │ +410 _B_a_s_e &operator++(); │ │ │ │ │ 411 │ │ │ │ │ -412 // ReferenceElementImplementation cannot be copied. │ │ │ │ │ -413 ReferenceElementImplementation& operator= ( const │ │ │ │ │ -ReferenceElementImplementation& ) = delete; │ │ │ │ │ +412 int index() const; │ │ │ │ │ +_4_1_3 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ 414 │ │ │ │ │ -415 // ReferenceElementImplementation is default-constructible (required for │ │ │ │ │ -storage in std::array) │ │ │ │ │ -416 ReferenceElementImplementation () = default; │ │ │ │ │ -417 │ │ │ │ │ -422 int _s_i_z_e ( int c ) const │ │ │ │ │ -423 { │ │ │ │ │ -424 assert( (c >= 0) && (c <= dim) ); │ │ │ │ │ -425 return info_[ c ].size(); │ │ │ │ │ -426 } │ │ │ │ │ +415 private: │ │ │ │ │ +416 friend class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l; │ │ │ │ │ +417 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r backend; │ │ │ │ │ +418 }; │ │ │ │ │ +419 │ │ │ │ │ +420 template │ │ │ │ │ +422 template │ │ │ │ │ +_4_2_3 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +424_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r &backend_) │ │ │ │ │ +425 : backend(backend_) │ │ │ │ │ +426 {} │ │ │ │ │ 427 │ │ │ │ │ -439 int _s_i_z_e ( int i, int c, int cc ) const │ │ │ │ │ -440 { │ │ │ │ │ -441 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ -442 return info_[ c ][ i ].size( cc ); │ │ │ │ │ -443 } │ │ │ │ │ -444 │ │ │ │ │ -458 int subEntity ( int i, int c, int ii, int cc ) const │ │ │ │ │ -459 { │ │ │ │ │ -460 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ -461 return info_[ c ][ i ].number( ii, cc ); │ │ │ │ │ -462 } │ │ │ │ │ -463 │ │ │ │ │ -479 auto subEntities ( int i, int c, int cc ) const │ │ │ │ │ -480 { │ │ │ │ │ -481 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ -482 return info_[ c ][ i ].numbers( cc ); │ │ │ │ │ -483 } │ │ │ │ │ -484 │ │ │ │ │ -493 const GeometryType &type ( int i, int c ) const │ │ │ │ │ -494 { │ │ │ │ │ -495 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ -496 return info_[ c ][ i ].type(); │ │ │ │ │ -497 } │ │ │ │ │ -498 │ │ │ │ │ -500 const GeometryType &type () const { return type( 0, 0 ); } │ │ │ │ │ -501 │ │ │ │ │ -511 const Coordinate &position( int i, int c ) const │ │ │ │ │ -512 { │ │ │ │ │ -513 assert( (c >= 0) && (c <= dim) ); │ │ │ │ │ -514 return baryCenters_[ c ][ i ]; │ │ │ │ │ -515 } │ │ │ │ │ -516 │ │ │ │ │ -524 bool checkInside ( const Coordinate &local ) const │ │ │ │ │ -525 { │ │ │ │ │ -526 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon │ │ │ │ │ -(); │ │ │ │ │ -527 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, │ │ │ │ │ -tolerance ); │ │ │ │ │ -528 } │ │ │ │ │ +428 template │ │ │ │ │ +430 template │ │ │ │ │ +_4_3_1 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +432_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _T_h_i_s &other) │ │ │ │ │ +433 : _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l(other), │ │ │ │ │ +434 backend(other.backend) │ │ │ │ │ +435 {} │ │ │ │ │ +436 │ │ │ │ │ +437 template │ │ │ │ │ +438 template │ │ │ │ │ +439 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_B_a_s_e * │ │ │ │ │ +_4_4_0 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +441_ _c_l_o_n_e() const │ │ │ │ │ +442 { return new _T_h_i_s(*this); } │ │ │ │ │ +443 │ │ │ │ │ +444 template │ │ │ │ │ +445 template │ │ │ │ │ +446 bool │ │ │ │ │ +_4_4_7 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +448_ _o_p_e_r_a_t_o_r_=_=(const _B_a_s_e &other) const │ │ │ │ │ +449 { │ │ │ │ │ +450 try { │ │ │ │ │ +451 return backend == dynamic_cast(other).backend; │ │ │ │ │ +452 } │ │ │ │ │ +453 catch(const std::bad_cast&) │ │ │ │ │ +454 { │ │ │ │ │ +455 return false; │ │ │ │ │ +456 } │ │ │ │ │ +457 } │ │ │ │ │ +458 │ │ │ │ │ +459 template │ │ │ │ │ +460 template │ │ │ │ │ +461 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_B_a_s_e & │ │ │ │ │ +_4_6_2 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +463_ _o_p_e_r_a_t_o_r_+_+() │ │ │ │ │ +464 { │ │ │ │ │ +465 ++backend; │ │ │ │ │ +466 return *this; │ │ │ │ │ +467 } │ │ │ │ │ +468 │ │ │ │ │ +469 template │ │ │ │ │ +470 template │ │ │ │ │ +471 int │ │ │ │ │ +_4_7_2 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +473_ _i_n_d_e_x() const │ │ │ │ │ +474 { return backend.index(); } │ │ │ │ │ +475 │ │ │ │ │ +476 template │ │ │ │ │ +477 template │ │ │ │ │ +478 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +_4_7_9 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +480_ _c_o_o_r_d_s() const │ │ │ │ │ +481 { return backend.coords(); } │ │ │ │ │ +482 │ │ │ │ │ +483 // //////////////////////// │ │ │ │ │ +484 // │ │ │ │ │ +485 // The refinement builder │ │ │ │ │ +486 // │ │ │ │ │ +487 │ │ │ │ │ +488 template │ │ │ │ │ +489 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r; │ │ │ │ │ +490 │ │ │ │ │ +501 template │ │ │ │ │ +502 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ +_5_0_3 _b_u_i_l_d_R_e_f_i_n_e_m_e_n_t( │ │ │ │ │ +504 _G_e_o_m_e_t_r_y_T_y_p_e geometryType, │ │ │ │ │ +506 _G_e_o_m_e_t_r_y_T_y_p_e coerceTo) │ │ │ │ │ +507 { │ │ │ │ │ +508 // Check that the user used valid geometry types │ │ │ │ │ +509 assert(geometryType._d_i_m() == dimension && coerceTo._d_i_m() == dimension); │ │ │ │ │ +510 return _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_b_u_i_l_d( geometryType._i_d(), │ │ │ │ │ +coerceTo._i_d() ); │ │ │ │ │ +511 } │ │ │ │ │ +512 │ │ │ │ │ +513 // In principle the trick with the class is no longer necessary, │ │ │ │ │ +514 // but I'm keeping it in here so it will be easier to specialize │ │ │ │ │ +515 // buildRefinement when someone implements pyramids and prisms │ │ │ │ │ +516 template │ │ │ │ │ +_5_1_7 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r │ │ │ │ │ +518 { │ │ │ │ │ +519 public: │ │ │ │ │ +520 static │ │ │ │ │ +521 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ +_5_2_2 _b_u_i_l_d(unsigned topologyId, unsigned coerceToId) │ │ │ │ │ +523 { │ │ │ │ │ +524 topologyId &= ~1; │ │ │ │ │ +525 coerceToId &= ~1; │ │ │ │ │ +526 │ │ │ │ │ +527 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1; │ │ │ │ │ +528 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1; │ │ │ │ │ 529 │ │ │ │ │ -541 template< int codim > │ │ │ │ │ -542 typename Codim< codim >::Geometry geometry ( int i ) const │ │ │ │ │ -543 { │ │ │ │ │ -544 return std::get< codim >( geometries_ )[ i ]; │ │ │ │ │ -545 } │ │ │ │ │ -546 │ │ │ │ │ -548 Volume volume () const │ │ │ │ │ -549 { │ │ │ │ │ -550 return volume_; │ │ │ │ │ -551 } │ │ │ │ │ -552 │ │ │ │ │ -560 const Coordinate &integrationOuterNormal ( int face ) const │ │ │ │ │ -561 { │ │ │ │ │ -562 assert( (face >= 0) && (face < int( integrationNormals_.size() )) ); │ │ │ │ │ -563 return integrationNormals_[ face ]; │ │ │ │ │ -564 } │ │ │ │ │ +530 switch( topologyId ) │ │ │ │ │ +531 { │ │ │ │ │ +532 //case GeometryType::simplex: │ │ │ │ │ +533 case idSimplex : │ │ │ │ │ +534 //switch( coerceTo ) │ │ │ │ │ +535 switch( coerceToId ) │ │ │ │ │ +536 { │ │ │ │ │ +537 //case GeometryType::simplex: │ │ │ │ │ +538 case idSimplex : │ │ │ │ │ +539 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_S_i_m_p_l_e_x_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +540 default : │ │ │ │ │ +541 break; │ │ │ │ │ +542 } │ │ │ │ │ +543 break; │ │ │ │ │ +544 │ │ │ │ │ +545 //case GeometryType::cube: │ │ │ │ │ +546 case idCube : │ │ │ │ │ +547 switch( coerceToId ) │ │ │ │ │ +548 { │ │ │ │ │ +549 case idSimplex : │ │ │ │ │ +550 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +551 case idCube : │ │ │ │ │ +552 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_C_u_b_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +553 default : │ │ │ │ │ +554 break; │ │ │ │ │ +555 } │ │ │ │ │ +556 break; │ │ │ │ │ +557 │ │ │ │ │ +558 default : │ │ │ │ │ +559 break; │ │ │ │ │ +560 } │ │ │ │ │ +561 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, │ │ │ │ │ +" │ │ │ │ │ +562 << coerceToId << " >."); │ │ │ │ │ +563 } │ │ │ │ │ +564 }; │ │ │ │ │ 565 │ │ │ │ │ -566 private: │ │ │ │ │ -567 void initialize ( unsigned int topologyId ) │ │ │ │ │ +566 template │ │ │ │ │ +_5_6_7 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r<1, CoordType> │ │ │ │ │ 568 { │ │ │ │ │ -569 assert( topologyId < Impl::numTopologies( dim ) ); │ │ │ │ │ -570 │ │ │ │ │ -571 // set up subentities │ │ │ │ │ -572 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ │ -573 { │ │ │ │ │ -574 const unsigned int _s_i_z_e = Impl::size( topologyId, dim, codim ); │ │ │ │ │ -575 info_[ codim ].resize( size ); │ │ │ │ │ -576 for( unsigned int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ │ -577 info_[ codim ][ i ].initialize( topologyId, codim, i ); │ │ │ │ │ -578 } │ │ │ │ │ +569 static const std::size_t dimension = 1; │ │ │ │ │ +570 public: │ │ │ │ │ +571 static │ │ │ │ │ +572 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ +_5_7_3 _b_u_i_l_d(unsigned topologyId, unsigned coerceToId) │ │ │ │ │ +574 { │ │ │ │ │ +575 topologyId &= ~1; │ │ │ │ │ +576 coerceToId &= ~1; │ │ │ │ │ +577 │ │ │ │ │ +578 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1; │ │ │ │ │ 579 │ │ │ │ │ -580 // compute corners │ │ │ │ │ -581 const unsigned int numVertices = _s_i_z_e( dim ); │ │ │ │ │ -582 baryCenters_[ dim ].resize( numVertices ); │ │ │ │ │ -583 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) ); │ │ │ │ │ -584 │ │ │ │ │ -585 // compute barycenters │ │ │ │ │ -586 for( int codim = 0; codim < dim; ++codim ) │ │ │ │ │ -587 { │ │ │ │ │ -588 baryCenters_[ codim ].resize( _s_i_z_e(codim) ); │ │ │ │ │ -589 for( int i = 0; i < _s_i_z_e( codim ); ++i ) │ │ │ │ │ +580 if (topologyId == 0 && coerceToId == 0) │ │ │ │ │ +581 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_S_i_m_p_l_e_x_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +582 │ │ │ │ │ +583 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, │ │ │ │ │ +" │ │ │ │ │ +584 << coerceToId << " >."); │ │ │ │ │ +585 } │ │ │ │ │ +586 }; │ │ │ │ │ +587 │ │ │ │ │ +588 template │ │ │ │ │ +_5_8_9 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r<3, CoordType> │ │ │ │ │ 590 { │ │ │ │ │ -591 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) ); │ │ │ │ │ -592 const unsigned int numCorners = _s_i_z_e( i, codim, dim ); │ │ │ │ │ -593 for( unsigned int j = 0; j < numCorners; ++j ) │ │ │ │ │ -594 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, │ │ │ │ │ -dim ) ]; │ │ │ │ │ -595 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners ); │ │ │ │ │ -596 } │ │ │ │ │ -597 } │ │ │ │ │ -598 │ │ │ │ │ -599 // compute reference element volume │ │ │ │ │ -600 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim ); │ │ │ │ │ -601 │ │ │ │ │ -602 // compute integration outer normals │ │ │ │ │ -603 if( dim > 0 ) │ │ │ │ │ -604 { │ │ │ │ │ -605 integrationNormals_.resize( _s_i_z_e( 1 ) ); │ │ │ │ │ -606 Impl::referenceIntegrationOuterNormals( topologyId, dim, & │ │ │ │ │ -(integrationNormals_[ 0 ]) ); │ │ │ │ │ -607 } │ │ │ │ │ -608 │ │ │ │ │ -609 // set up geometries │ │ │ │ │ -610 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CreateGeometries< i >::apply( *this, geometries_ ); } ); │ │ │ │ │ -611 } │ │ │ │ │ -612 │ │ │ │ │ -613 template< int... codim > │ │ │ │ │ -614 static std::tuple< std::vector< typename Codim< codim >::Geometry >... > │ │ │ │ │ -615 makeGeometryTable ( std::integer_sequence< int, codim... > ); │ │ │ │ │ -616 │ │ │ │ │ -618 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 │ │ │ │ │ ->() ) ) GeometryTable; │ │ │ │ │ +591 static const std::size_t dimension = 3; │ │ │ │ │ +592 public: │ │ │ │ │ +593 static │ │ │ │ │ +594 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ +_5_9_5 _b_u_i_l_d(unsigned topologyId, unsigned coerceToId) │ │ │ │ │ +596 { │ │ │ │ │ +597 topologyId &= ~1; │ │ │ │ │ +598 coerceToId &= ~1; │ │ │ │ │ +599 │ │ │ │ │ +600 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1; │ │ │ │ │ +601 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1; │ │ │ │ │ +602 constexpr unsigned idPrism = GeometryTypes::prism.id() & ~1; │ │ │ │ │ +603 constexpr unsigned idPyramid = GeometryTypes::pyramid.id() & ~1; │ │ │ │ │ +604 │ │ │ │ │ +605 switch( topologyId ) │ │ │ │ │ +606 { │ │ │ │ │ +607 //case GeometryType::simplex: │ │ │ │ │ +608 case idSimplex : │ │ │ │ │ +609 //switch( coerceTo ) │ │ │ │ │ +610 switch( coerceToId ) │ │ │ │ │ +611 { │ │ │ │ │ +612 //case GeometryType::simplex: │ │ │ │ │ +613 case idSimplex : │ │ │ │ │ +614 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_S_i_m_p_l_e_x_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +615 default : │ │ │ │ │ +616 break; │ │ │ │ │ +617 } │ │ │ │ │ +618 break; │ │ │ │ │ 619 │ │ │ │ │ -621 ctype volume_; │ │ │ │ │ -622 │ │ │ │ │ -623 std::vector< Coordinate > baryCenters_[ dim+1 ]; │ │ │ │ │ -624 std::vector< Coordinate > integrationNormals_; │ │ │ │ │ -625 │ │ │ │ │ -627 GeometryTable geometries_; │ │ │ │ │ -628 │ │ │ │ │ -629 std::vector< SubEntityInfo > info_[ dim+1 ]; │ │ │ │ │ -630 }; │ │ │ │ │ -631 │ │ │ │ │ -633 template< class ctype, int dim > │ │ │ │ │ -634 struct ReferenceElementImplementation< ctype, dim >::SubEntityInfo │ │ │ │ │ -635 { │ │ │ │ │ -636 // Compute upper bound for the number of subsentities. │ │ │ │ │ -637 // If someone knows an explicit formal feel free to │ │ │ │ │ -638 // implement it here. │ │ │ │ │ -639 static constexpr std::size_t maxSubEntityCount() │ │ │ │ │ -640 { │ │ │ │ │ -641 std::size_t maxCount=0; │ │ │ │ │ -642 for(std::size_t codim=0; codim<=dim; ++codim) │ │ │ │ │ -643 maxCount = std::max(maxCount, _b_i_n_o_m_i_a_l(std::size_t(dim),codim)*(1 << │ │ │ │ │ -codim)); │ │ │ │ │ -644 return maxCount; │ │ │ │ │ -645 } │ │ │ │ │ -646 │ │ │ │ │ -647 using SubEntityFlags = std::bitset; │ │ │ │ │ -648 │ │ │ │ │ -649 class SubEntityRange │ │ │ │ │ -650 : public Dune::IteratorRange │ │ │ │ │ -651 { │ │ │ │ │ -652 using Base = typename Dune::IteratorRange; │ │ │ │ │ -653 │ │ │ │ │ -654 public: │ │ │ │ │ -655 │ │ │ │ │ -656 using iterator = Base::iterator; │ │ │ │ │ -657 using const_iterator = Base::const_iterator; │ │ │ │ │ -658 │ │ │ │ │ -659 SubEntityRange(const iterator& begin, const iterator& end, const │ │ │ │ │ -SubEntityFlags& contains) : │ │ │ │ │ -660 Base(begin, end), │ │ │ │ │ -661 containsPtr_(&contains), │ │ │ │ │ -662 size_(end-begin) │ │ │ │ │ -663 {} │ │ │ │ │ +620 //case GeometryType::cube: │ │ │ │ │ +621 case idCube : │ │ │ │ │ +622 switch( coerceToId ) │ │ │ │ │ +623 { │ │ │ │ │ +624 case idSimplex : │ │ │ │ │ +625 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +626 case idCube : │ │ │ │ │ +627 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_C_u_b_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +628 default : │ │ │ │ │ +629 break; │ │ │ │ │ +630 } │ │ │ │ │ +631 break; │ │ │ │ │ +632 │ │ │ │ │ +633 //case GeometryType::prism: │ │ │ │ │ +634 case idPrism : │ │ │ │ │ +635 switch( coerceToId ) │ │ │ │ │ +636 { │ │ │ │ │ +637 case idSimplex : │ │ │ │ │ +638 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_P_r_i_s_m_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +639 default : │ │ │ │ │ +640 break; │ │ │ │ │ +641 } │ │ │ │ │ +642 break; │ │ │ │ │ +643 │ │ │ │ │ +644 //case GeometryType::pyramid: │ │ │ │ │ +645 case idPyramid : │ │ │ │ │ +646 switch( coerceToId ) │ │ │ │ │ +647 { │ │ │ │ │ +648 case idSimplex : │ │ │ │ │ +649 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_P_y_r_a_m_i_d_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +_i_n_s_t_a_n_c_e(); │ │ │ │ │ +650 default : │ │ │ │ │ +651 break; │ │ │ │ │ +652 } │ │ │ │ │ +653 break; │ │ │ │ │ +654 │ │ │ │ │ +655 default : │ │ │ │ │ +656 break; │ │ │ │ │ +657 } │ │ │ │ │ +658 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, │ │ │ │ │ +" │ │ │ │ │ +659 << coerceToId << " >."); │ │ │ │ │ +660 } │ │ │ │ │ +661 }; │ │ │ │ │ +662 │ │ │ │ │ +663} // namespace Dune │ │ │ │ │ 664 │ │ │ │ │ -665 SubEntityRange() : │ │ │ │ │ -666 Base(), │ │ │ │ │ -667 containsPtr_(nullptr), │ │ │ │ │ -668 size_(0) │ │ │ │ │ -669 {} │ │ │ │ │ -670 │ │ │ │ │ -671 std::size_t _s_i_z_e() const │ │ │ │ │ -672 { │ │ │ │ │ -673 return size_; │ │ │ │ │ -674 } │ │ │ │ │ -675 │ │ │ │ │ -676 bool contains(std::size_t i) const │ │ │ │ │ -677 { │ │ │ │ │ -678 return (*containsPtr_)[i]; │ │ │ │ │ -679 } │ │ │ │ │ -680 │ │ │ │ │ -681 private: │ │ │ │ │ -682 const SubEntityFlags* containsPtr_; │ │ │ │ │ -683 std::size_t size_; │ │ │ │ │ -684 std::size_t offset_; │ │ │ │ │ -685 }; │ │ │ │ │ -686 │ │ │ │ │ -687 using NumberRange = typename Dune::IteratorRange; │ │ │ │ │ -688 │ │ │ │ │ -689 SubEntityInfo () │ │ │ │ │ -690 : numbering_( nullptr ) │ │ │ │ │ -691 { │ │ │ │ │ -692 std::fill( offset_.begin(), offset_.end(), 0 ); │ │ │ │ │ -693 } │ │ │ │ │ -694 │ │ │ │ │ -695 SubEntityInfo ( const SubEntityInfo &other ) │ │ │ │ │ -696 : offset_( other.offset_ ), │ │ │ │ │ -697 type_( other.type_ ), │ │ │ │ │ -698 containsSubentity_( other.containsSubentity_ ) │ │ │ │ │ -699 { │ │ │ │ │ -700 numbering_ = allocate(); │ │ │ │ │ -701 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ │ -702 } │ │ │ │ │ -703 │ │ │ │ │ -704 ~SubEntityInfo () { deallocate( numbering_ ); } │ │ │ │ │ -705 │ │ │ │ │ -706 const SubEntityInfo &operator= ( const SubEntityInfo &other ) │ │ │ │ │ -707 { │ │ │ │ │ -708 type_ = other.type_; │ │ │ │ │ -709 offset_ = other.offset_; │ │ │ │ │ -710 │ │ │ │ │ -711 deallocate( numbering_ ); │ │ │ │ │ -712 numbering_ = allocate(); │ │ │ │ │ -713 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ │ -714 │ │ │ │ │ -715 containsSubentity_ = other.containsSubentity_; │ │ │ │ │ -716 │ │ │ │ │ -717 return *this; │ │ │ │ │ -718 } │ │ │ │ │ -719 │ │ │ │ │ -720 int _s_i_z_e ( int cc ) const │ │ │ │ │ -721 { │ │ │ │ │ -722 assert( (cc >= 0) && (cc <= dim) ); │ │ │ │ │ -723 return (offset_[ cc+1 ] - offset_[ cc ]); │ │ │ │ │ -724 } │ │ │ │ │ -725 │ │ │ │ │ -726 int number ( int ii, int cc ) const │ │ │ │ │ -727 { │ │ │ │ │ -728 assert( (ii >= 0) && (ii < _s_i_z_e( cc )) ); │ │ │ │ │ -729 return numbering_[ offset_[ cc ] + ii ]; │ │ │ │ │ -730 } │ │ │ │ │ -731 │ │ │ │ │ -732 auto numbers ( int cc ) const │ │ │ │ │ -733 { │ │ │ │ │ -734 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_ │ │ │ │ │ -[ cc+1 ], containsSubentity_[cc]); │ │ │ │ │ -735 } │ │ │ │ │ -736 │ │ │ │ │ -737 const GeometryType &type () const { return type_; } │ │ │ │ │ -738 │ │ │ │ │ -739 void initialize ( unsigned int topologyId, int codim, unsigned int i ) │ │ │ │ │ -740 { │ │ │ │ │ -741 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i │ │ │ │ │ -); │ │ │ │ │ -742 type_ = GeometryType( subId, dim-codim ); │ │ │ │ │ -743 │ │ │ │ │ -744 // compute offsets │ │ │ │ │ -745 for( int cc = 0; cc <= codim; ++cc ) │ │ │ │ │ -746 offset_[ cc ] = 0; │ │ │ │ │ -747 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ │ -748 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim ); │ │ │ │ │ -749 │ │ │ │ │ -750 // compute subnumbering │ │ │ │ │ -751 deallocate( numbering_ ); │ │ │ │ │ -752 numbering_ = allocate(); │ │ │ │ │ -753 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ │ -754 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, │ │ │ │ │ -numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] ); │ │ │ │ │ -755 │ │ │ │ │ -756 // initialize containsSubentity lookup-table │ │ │ │ │ -757 for(std::size_t cc=0; cc<= dim; ++cc) │ │ │ │ │ -758 { │ │ │ │ │ -759 containsSubentity_[cc].reset(); │ │ │ │ │ -760 for(std::size_t idx=0; idx offset_; │ │ │ │ │ -775 GeometryType type_; │ │ │ │ │ -776 std::array< SubEntityFlags, dim+1> containsSubentity_; │ │ │ │ │ -777 }; │ │ │ │ │ -778 │ │ │ │ │ -779 │ │ │ │ │ -780 template< class ctype, int dim > │ │ │ │ │ -781 template< int codim > │ │ │ │ │ -782 struct ReferenceElementImplementation< ctype, dim >::CreateGeometries │ │ │ │ │ -783 { │ │ │ │ │ -784 template< int cc > │ │ │ │ │ -785 static typename ReferenceElements< ctype, dim-cc >::ReferenceElement │ │ │ │ │ -786 subRefElement( const ReferenceElementImplementation< ctype, dim > │ │ │ │ │ -&refElement, int i, std::integral_constant< int, cc > ) │ │ │ │ │ -787 { │ │ │ │ │ -788 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 │ │ │ │ │ -) ); │ │ │ │ │ -789 } │ │ │ │ │ -790 │ │ │ │ │ -791 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 │ │ │ │ │ -792 subRefElement(const ReferenceElementImplementation< ctype, dim > │ │ │ │ │ -&refElement, │ │ │ │ │ -793 [[maybe_unused]] int i, std::integral_constant) │ │ │ │ │ -794 { │ │ │ │ │ -795 return refElement; │ │ │ │ │ -796 } │ │ │ │ │ -797 │ │ │ │ │ -798 static void apply ( const ReferenceElementImplementation< ctype, dim > │ │ │ │ │ -&refElement, GeometryTable &geometries ) │ │ │ │ │ -799 { │ │ │ │ │ -800 const int _s_i_z_e = refElement.size( codim ); │ │ │ │ │ -801 std::vector< FieldVector< ctype, dim > > origins( size ); │ │ │ │ │ -802 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds │ │ │ │ │ -( size ); │ │ │ │ │ -803 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 │ │ │ │ │ -]), &(jacobianTransposeds[ 0 ]) ); │ │ │ │ │ -804 │ │ │ │ │ -805 std::get< codim >( geometries ).reserve( size ); │ │ │ │ │ -806 for( int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ │ -807 { │ │ │ │ │ -808 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, │ │ │ │ │ -std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i │ │ │ │ │ -] ); │ │ │ │ │ -809 std::get< codim >( geometries ).push_back( geometry ); │ │ │ │ │ -810 } │ │ │ │ │ -811 } │ │ │ │ │ -812 }; │ │ │ │ │ -813 │ │ │ │ │ -814#endif // DOXYGEN │ │ │ │ │ -815 │ │ │ │ │ -816 } // namespace Geo │ │ │ │ │ -817 │ │ │ │ │ -818} // namespace Dune │ │ │ │ │ -819 │ │ │ │ │ -820#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ │ -_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. │ │ │ │ │ +665#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ +_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ +This file simply includes all Refinement implementations so you don't have to │ │ │ │ │ +do them separately. │ │ │ │ │ _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 │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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:145 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_b_i_n_o_m_i_a_l │ │ │ │ │ -int binomial(int upper, int lower) │ │ │ │ │ -calculate │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:305 │ │ │ │ │ -_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:188 │ │ │ │ │ -_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:198 │ │ │ │ │ +_D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType │ │ │ │ │ +geometryType, GeometryType coerceTo) │ │ │ │ │ +return a reference to the VirtualRefinement according to the parameters │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:503 │ │ │ │ │ +_D_u_n_e_:_:_C_o_d_i_m │ │ │ │ │ +Static tag representing a codimension. │ │ │ │ │ +DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ │ +_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_:_:_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_:_:_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_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +typedef IndexVector │ │ │ │ │ +The IndexVector of the Refinement. │ │ │ │ │ +DDeeffiinniittiioonn base.cc:177 │ │ │ │ │ +_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_:_:_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:126 │ │ │ │ │ +_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:372 │ │ │ │ │ +_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:377 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:72 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_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_m_m_o_n │ │ │ │ │ +Refinement::template Codim< 0 >::SubEntityIterator Common │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:85 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_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 │ │ │ │ │ +VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:84 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_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 virtualrefinement.cc:86 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ │ +VirtualRefinement< dimension, CoordType >::template Codim< codimension >:: │ │ │ │ │ +SubEntityIterator::CoordVector coords() const │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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(const This &other) │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &other) │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ │ +int index() const │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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() │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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(IteratorBack *backend) │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ +Refinement::template SubEntityIteratorBack< codimension > IteratorBack │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:109 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:110 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ │ +Refinement::template Codim< codimension >::SubEntityIterator This │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:108 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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 │ │ │ │ │ +VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:107 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:200 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +virtual ~VirtualRefinementSubEntityIteratorBackSpecial() │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:208 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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 │ │ │ │ │ +virtual IndexVector vertexIndices() const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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 │ │ │ │ │ +VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:217 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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 virtualrefinement.cc:218 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +virtual ~VirtualRefinementSubEntityIteratorBackSpecial() │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:222 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:231 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_i_n_d_e_x │ │ │ │ │ +virtual int index() const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_T_h_i_s │ │ │ │ │ +Refinement::template SubEntityIteratorBack< codimension > This │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:234 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_c_l_o_n_e │ │ │ │ │ +virtual This * clone() const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:235 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:233 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +virtual bool operator==(const This &other) const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_c_o_o_r_d_s │ │ │ │ │ +virtual CoordVector coords() const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_~_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ +virtual ~SubEntityIteratorBack() │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:237 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ +virtual This & operator++()=0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:261 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ │ +int nVertices(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get the number of Vertices. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:295 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +Dune::VirtualRefinement< dimension, CoordType > VirtualRefinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:264 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ │ +int nElements(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get the number of Elements. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:320 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_i_n_s_t_a_n_c_e │ │ │ │ │ +static VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > & │ │ │ │ │ +instance() │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:286 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension > │ │ │ │ │ +StaticRefinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:263 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:397 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_B_a_s_e │ │ │ │ │ +VirtualRefinement::template SubEntityIteratorBack< codimension > Base │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:401 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_T_h_i_s │ │ │ │ │ +VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::template │ │ │ │ │ +SubEntityIteratorBack< codimension > This │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:400 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ │ +StaticRefinement::template Codim< codimension >::SubEntityIterator │ │ │ │ │ +BackendIterator │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:399 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +VirtualRefinement::CoordVector CoordVector │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:402 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:350 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_C_o_m_m_o_n │ │ │ │ │ +VirtualRefinementImp::template SubEntityIteratorBack< 0 > Common │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:368 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +RefinementBase::IndexVector IndexVector │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:371 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_B_a_s_e │ │ │ │ │ +VirtualRefinement< dimension, CoordType > RefinementBase │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:370 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > │ │ │ │ │ +VirtualRefinementImp │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:367 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +VirtualRefinementImp::StaticRefinement StaticRefinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:369 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:518 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_:_:_b_u_i_l_d │ │ │ │ │ +static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, │ │ │ │ │ +unsigned coerceToId) │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:522 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _1_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_b_u_i_l_d │ │ │ │ │ +static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, │ │ │ │ │ +unsigned coerceToId) │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:573 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _3_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_b_u_i_l_d │ │ │ │ │ +static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, │ │ │ │ │ +unsigned coerceToId) │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:595 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +VirtualRefinement base class. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:294 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ +SubEntityIteratorBack< dimension > VertexIteratorBack │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:318 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n │ │ │ │ │ +VertexIterator vBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an VertexIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:38 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n │ │ │ │ │ +ElementIterator eBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an ElementIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:54 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d │ │ │ │ │ +ElementIterator eEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an ElementIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:62 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:301 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d │ │ │ │ │ +VertexIterator vEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an VertexIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:46 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +FieldVector< CoordType, dimension > CoordVector │ │ │ │ │ +The CoordVector of the VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:308 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +SubEntityIteratorBack< 0 > ElementIteratorBack │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ │ +codim database of VirtualRefinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:378 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelements.hh File Reference │ │ │ │ +dune-geometry: quadraturerules.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,73 +72,118 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ -Typedefs | │ │ │ │ -Functions
│ │ │ │ -
referenceelements.hh File Reference
│ │ │ │ +Macros | │ │ │ │ +Enumerations
│ │ │ │ +
quadraturerules.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <algorithm>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <iostream>
│ │ │ │ #include <limits>
│ │ │ │ -#include <tuple>
│ │ │ │ +#include <mutex>
│ │ │ │ #include <utility>
│ │ │ │ #include <vector>
│ │ │ │ -#include <array>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/common/std/type_traits.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/dimension.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/referenceelement.hh>
│ │ │ │ -#include <dune/geometry/referenceelementimplementation.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  Dune::Geo::ReferenceElements< ctype_, dim >
 Class providing access to the singletons of the reference elements. More...
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  Dune::Transitional
namespace  Dune::QuadratureType
 Defines an enum for currently available quadrature rules.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Typedefs

template<typename T , int dim>
using Dune::ReferenceElement = unspecified-type
 Returns the type of reference element for the argument type T.
 

│ │ │ │ +Macros

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

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

│ │ │ │ +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,60 +1,85 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +_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 │ │ │ │ │ +#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 <_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   _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_._._. │ │ │ │ │ +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   _D_u_n_e_:_:_T_r_a_n_s_i_t_i_o_n_a_l │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = unspecified-type │ │ │ │ │ -  Returns the type of reference element for the argument type T. │ │ │ │ │ -  │ │ │ │ │ -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. │ │ │ │ │ +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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelements.hh Source File │ │ │ │ +dune-geometry: quadraturerules.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,421 +74,474 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
referenceelements.hh
│ │ │ │ +
quadraturerules.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE 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
│ │ │ │ -
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9
│ │ │ │ -
10#include <algorithm>
│ │ │ │ +
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 <tuple>
│ │ │ │ +
12#include <mutex>
│ │ │ │
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 {
│ │ │ │ +
15
│ │ │ │ +
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
│ │ │ │ +
30namespace Dune {
│ │ │ │
31
│ │ │ │ -
32#ifndef DOXYGEN
│ │ │ │ -
33
│ │ │ │ -
34
│ │ │ │ -
35 template<typename ctype, int dim>
│ │ │ │ -
36 class DeprecatedReferenceElement
│ │ │ │ -
37 : public ReferenceElement<ReferenceElementImplementation<ctype,dim>>
│ │ │ │ -
38 {
│ │ │ │ -
39
│ │ │ │ -
40 protected:
│ │ │ │ -
41
│ │ │ │ -
42 DeprecatedReferenceElement() = default;
│ │ │ │ -
43
│ │ │ │ -
44 public:
│ │ │ │ -
45
│ │ │ │ -
46 DeprecatedReferenceElement(const DeprecatedReferenceElement&) = delete;
│ │ │ │ -
47 DeprecatedReferenceElement& operator=(const DeprecatedReferenceElement&) = delete;
│ │ │ │ +
36 class QuadratureOrderOutOfRange : public NotImplemented {};
│ │ │ │ +
37
│ │ │ │ +
43 template<typename ct, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 public:
│ │ │ │ +
47 constexpr static int dimension = dim;
│ │ │ │
48
│ │ │ │ -
49 DeprecatedReferenceElement(const ReferenceElementImplementation<ctype,dim>& impl)
│ │ │ │ -
50 : ReferenceElement<ReferenceElementImplementation<ctype,dim>>(impl)
│ │ │ │ -
51 {}
│ │ │ │ -
52
│ │ │ │ -
53 };
│ │ │ │ +
50 typedef ct Field;
│ │ │ │ +
51
│ │ │ │ +
53 typedef Dune::FieldVector<ct,dim> Vector;
│ │ │ │
54
│ │ │ │ -
55
│ │ │ │ -
56 template<typename ctype, int dim>
│ │ │ │ -
57 class ConstructibleDeprecatedReferenceElement
│ │ │ │ -
58 : public DeprecatedReferenceElement<ctype,dim>
│ │ │ │ -
59 {
│ │ │ │ -
60 public:
│ │ │ │ -
61 ConstructibleDeprecatedReferenceElement() = default;
│ │ │ │ -
62 };
│ │ │ │ -
63
│ │ │ │ -
64
│ │ │ │ -
65 namespace Impl
│ │ │ │ -
66 {
│ │ │ │ -
67
│ │ │ │ -
68 // ReferenceElementContainer
│ │ │ │ -
69 // -------------------------
│ │ │ │ -
70
│ │ │ │ -
71 template< class ctype, int dim >
│ │ │ │ -
72 class ReferenceElementContainer
│ │ │ │ -
73 {
│ │ │ │ -
74 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0;
│ │ │ │ -
75
│ │ │ │ -
76 using Implementation = ReferenceElementImplementation< ctype, dim >;
│ │ │ │ -
77 using ConstructibleDeprecatedReferenceElement = Dune::Geo::ConstructibleDeprecatedReferenceElement<ctype,dim>;
│ │ │ │ -
78
│ │ │ │ -
79 public:
│ │ │ │ -
80
│ │ │ │ -
81 using DeprecatedReferenceElement = Dune::Geo::DeprecatedReferenceElement<ctype,dim>;
│ │ │ │ -
82
│ │ │ │ -
83 using ReferenceElement = Dune::Geo::ReferenceElement< Implementation >;
│ │ │ │ -
84 using value_type = ReferenceElement;
│ │ │ │ -
85 using const_iterator = const value_type*;
│ │ │ │ -
86
│ │ │ │ -
87 ReferenceElementContainer ()
│ │ │ │ -
88 {
│ │ │ │ -
89 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId )
│ │ │ │ -
90 {
│ │ │ │ -
91 implementations_[ topologyId ].initialize( topologyId );
│ │ │ │ -
92 reference_elements_[ topologyId ].setImplementation( implementations_[ topologyId ] );
│ │ │ │ -
93 }
│ │ │ │ -
94 }
│ │ │ │ -
95
│ │ │ │ -
96 const ReferenceElement& operator() ( const GeometryType &type ) const
│ │ │ │ -
97 {
│ │ │ │ -
98 assert( type.dim() == dim );
│ │ │ │ -
99 return reference_elements_[ type.id() ];
│ │ │ │ -
100 }
│ │ │ │ -
101
│ │ │ │ -
102 const ReferenceElement& simplex () const
│ │ │ │ -
103 {
│ │ │ │ -
104 return reference_elements_[ Dune::GeometryTypes::simplex(dim).id() ];
│ │ │ │ -
105 }
│ │ │ │ -
106
│ │ │ │ -
107 const ReferenceElement& cube () const
│ │ │ │ -
108 {
│ │ │ │ -
109 return reference_elements_[ Dune::GeometryTypes::cube(dim).id() ];
│ │ │ │ -
110 }
│ │ │ │ -
111
│ │ │ │ -
112 const ReferenceElement& pyramid () const
│ │ │ │ -
113 {
│ │ │ │ -
114 return reference_elements_[ Dune::GeometryTypes::pyramid.id() ];
│ │ │ │ -
115 }
│ │ │ │ -
116
│ │ │ │ -
117 const ReferenceElement& prism () const
│ │ │ │ -
118 {
│ │ │ │ -
119 return reference_elements_[ Dune::GeometryTypes::prism.id() ];
│ │ │ │ -
120 }
│ │ │ │ -
121
│ │ │ │ -
122 const_iterator begin () const
│ │ │ │ -
123 {
│ │ │ │ -
124 return reference_elements_.data();
│ │ │ │ -
125 }
│ │ │ │ -
126
│ │ │ │ -
127 const_iterator end () const
│ │ │ │ -
128 {
│ │ │ │ -
129 return reference_elements_.data() + numTopologies;
│ │ │ │ -
130 }
│ │ │ │ -
131
│ │ │ │ -
132 // here, we make sure to actually return a const reference to something
│ │ │ │ -
133 // that is guaranteed not to become invalid, as otherwise, we might run
│ │ │ │ -
134 // straight into debugging hell when a user binds the return value to a
│ │ │ │ -
135 // const ref and the temporary goes out of scope.
│ │ │ │ -
136 const DeprecatedReferenceElement& deprecated(const ReferenceElement& v) const
│ │ │ │ -
137 {
│ │ │ │ -
138 return reference_elements_[v.impl().type(0,0).id()];
│ │ │ │ -
139 }
│ │ │ │ -
140
│ │ │ │ -
141 private:
│ │ │ │ -
142
│ │ │ │ -
143 std::array<Implementation,numTopologies> implementations_;
│ │ │ │ -
144 std::array<ConstructibleDeprecatedReferenceElement,numTopologies> reference_elements_;
│ │ │ │ -
145
│ │ │ │ -
146 };
│ │ │ │ -
147
│ │ │ │ +
│ │ │ │ +
56 QuadraturePoint (const Vector& x, ct w) : local(x)
│ │ │ │ +
57 {
│ │ │ │ +
58 weight_ = w;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
62 const Vector& position () const
│ │ │ │ +
63 {
│ │ │ │ +
64 return local;
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ +
68 const ct &weight () const
│ │ │ │ +
69 {
│ │ │ │ +
70 return weight_;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 protected:
│ │ │ │ +
74 FieldVector<ct, dim> local;
│ │ │ │ + │ │ │ │ +
76 };
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
│ │ │ │ +
81 namespace QuadratureType {
│ │ │ │ +
│ │ │ │ +
82 enum Enum {
│ │ │ │ + │ │ │ │ +
93
│ │ │ │ + │ │ │ │ +
100
│ │ │ │ + │ │ │ │ +
107
│ │ │ │ + │ │ │ │ +
120
│ │ │ │ + │ │ │ │ +
128
│ │ │ │ + │ │ │ │ +
136
│ │ │ │ + │ │ │ │ +
145 size
│ │ │ │ +
146 };
│ │ │ │ +
│ │ │ │ +
147 }
│ │ │ │ +
│ │ │ │
148
│ │ │ │ -
149 } // namespace Impl
│ │ │ │ -
150
│ │ │ │ -
151
│ │ │ │ -
152#endif // DOXYGEN
│ │ │ │ -
153
│ │ │ │ -
154
│ │ │ │ -
155 // ReferenceElements
│ │ │ │ -
156 // ------------------------
│ │ │ │ -
157
│ │ │ │ -
168 template< class ctype_, int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
170 {
│ │ │ │ -
171
│ │ │ │ -
173 using ctype = ctype_;
│ │ │ │ -
174
│ │ │ │ - │ │ │ │ -
177
│ │ │ │ -
179 static constexpr int dimension = dim;
│ │ │ │ -
180
│ │ │ │ -
181 private:
│ │ │ │ +
152 template<typename ct, int dim>
│ │ │ │ +
│ │ │ │ +
153 class QuadratureRule : public std::vector<QuadraturePoint<ct,dim> >
│ │ │ │ +
154 {
│ │ │ │ +
155 public:
│ │ │ │ + │ │ │ │ +
162
│ │ │ │ +
163 protected:
│ │ │ │ + │ │ │ │ +
166
│ │ │ │ + │ │ │ │ +
169 public:
│ │ │ │ +
171 constexpr static int d = dim;
│ │ │ │ +
172
│ │ │ │ +
174 typedef ct CoordType;
│ │ │ │ +
175
│ │ │ │ +
177 virtual int order () const { return delivered_order; }
│ │ │ │ +
178
│ │ │ │ +
180 virtual GeometryType type () const { return geometry_type; }
│ │ │ │ +
181 virtual ~QuadratureRule(){}
│ │ │ │
182
│ │ │ │ -
183 using Container = Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ │ -
184
│ │ │ │ -
185 public:
│ │ │ │ +
185 typedef typename std::vector<QuadraturePoint<ct,dim> >::const_iterator iterator;
│ │ │ │
186
│ │ │ │ -
188 using ReferenceElement = typename Container::ReferenceElement;
│ │ │ │ -
189
│ │ │ │ -
191 using Iterator = typename Container::const_iterator;
│ │ │ │ -
192
│ │ │ │ - │ │ │ │ +
187 protected:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
190 };
│ │ │ │ +
│ │ │ │ +
191
│ │ │ │ +
192 // Forward declaration of the factory class,
│ │ │ │ +
193 // needed internally by the QuadratureRules container class.
│ │ │ │ +
194 template<typename ctype, int dim> class QuadratureRuleFactory;
│ │ │ │
195
│ │ │ │ -
197 static const ReferenceElement&
│ │ │ │ -
│ │ │ │ -
198 general ( const GeometryType& type )
│ │ │ │ -
199 {
│ │ │ │ -
200 return container() ( type );
│ │ │ │ -
201 }
│ │ │ │ -
│ │ │ │ -
202
│ │ │ │ -
│ │ │ │ -
204 static const ReferenceElement& simplex ()
│ │ │ │ -
205 {
│ │ │ │ -
206 return container().simplex();
│ │ │ │ -
207 }
│ │ │ │ -
│ │ │ │ -
208
│ │ │ │ -
│ │ │ │ -
210 static const ReferenceElement& cube ()
│ │ │ │ -
211 {
│ │ │ │ -
212 return container().cube();
│ │ │ │ -
213 }
│ │ │ │ -
│ │ │ │ -
214
│ │ │ │ -
│ │ │ │ -
215 static Iterator begin ()
│ │ │ │ -
216 {
│ │ │ │ -
217 return container().begin();
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
│ │ │ │ -
220 static Iterator end ()
│ │ │ │ -
221 {
│ │ │ │ -
222 return container().end();
│ │ │ │ -
223 }
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
225#ifndef DOXYGEN
│ │ │ │ -
226 static const typename Container::DeprecatedReferenceElement&
│ │ │ │ -
227 deprecated(const ReferenceElement& v)
│ │ │ │ -
228 {
│ │ │ │ -
229 return container().deprecated(v);
│ │ │ │ -
230 }
│ │ │ │ -
231#endif // DOXYGEN
│ │ │ │ -
232
│ │ │ │ -
233 private:
│ │ │ │ -
234
│ │ │ │ -
235 DUNE_EXPORT static const Container& container ()
│ │ │ │ -
236 {
│ │ │ │ -
237 static Container container;
│ │ │ │ -
238 return container;
│ │ │ │ -
239 }
│ │ │ │ -
240 };
│ │ │ │ -
│ │ │ │ -
241
│ │ │ │ -
242 } // namespace Geo
│ │ │ │ +
199 template<typename ctype, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
201
│ │ │ │ + │ │ │ │ +
204
│ │ │ │ +
205 // indexed by quadrature order
│ │ │ │ +
206 using QuadratureOrderVector = std::vector<std::pair<std::once_flag, QuadratureRule> >;
│ │ │ │ +
207
│ │ │ │ +
208 // indexed by geometry type
│ │ │ │ +
209 using GeometryTypeVector = std::vector<std::pair<std::once_flag, QuadratureOrderVector> >;
│ │ │ │ +
210
│ │ │ │ +
211 // indexed by quadrature type enum
│ │ │ │ +
212 using QuadratureCacheVector = std::vector<std::pair<std::once_flag, GeometryTypeVector> >;
│ │ │ │ +
213
│ │ │ │ +
215 DUNE_EXPORT const QuadratureRule& _rule(const GeometryType& t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre) const
│ │ │ │ +
216 {
│ │ │ │ +
217 assert(t.dim()==dim);
│ │ │ │ +
218
│ │ │ │ +
219 DUNE_ASSERT_CALL_ONCE();
│ │ │ │ +
220
│ │ │ │ +
221 static QuadratureCacheVector quadratureCache(QuadratureType::size);
│ │ │ │ +
222
│ │ │ │ +
223 auto& [ onceFlagQuadratureType, geometryTypes ] = quadratureCache[qt];
│ │ │ │ +
224 // initialize geometry types for this quadrature type once
│ │ │ │ +
225 std::call_once(onceFlagQuadratureType, [&types = geometryTypes]{
│ │ │ │ +
226 types = GeometryTypeVector(LocalGeometryTypeIndex::size(dim));
│ │ │ │ +
227 });
│ │ │ │ +
228
│ │ │ │ +
229 auto& [ onceFlagGeometryType, quadratureOrders ] = geometryTypes[LocalGeometryTypeIndex::index(t)];
│ │ │ │ +
230 // initialize quadrature orders for this geometry type and quadrature type once
│ │ │ │ +
231 std::call_once(onceFlagGeometryType, [&, &orders = quadratureOrders]{
│ │ │ │ +
232 // we only need one quadrature rule for points, not maxint
│ │ │ │ +
233 const auto numRules = dim == 0 ? 1 : QuadratureRuleFactory<ctype,dim>::maxOrder(t, qt)+1;
│ │ │ │ +
234 orders = QuadratureOrderVector(numRules);
│ │ │ │ +
235 });
│ │ │ │ +
236
│ │ │ │ +
237 // we only have one quadrature rule for points
│ │ │ │ +
238 auto& [ onceFlagQuadratureOrder, quadratureRule ] = quadratureOrders[dim == 0 ? 0 : p];
│ │ │ │ +
239 // initialize quadrature rule once
│ │ │ │ +
240 std::call_once(onceFlagQuadratureOrder, [&, &rule = quadratureRule]{
│ │ │ │ + │ │ │ │ +
242 });
│ │ │ │
243
│ │ │ │ -
245 using Geo::ReferenceElements;
│ │ │ │ +
244 return quadratureRule;
│ │ │ │ +
245 }
│ │ │ │
246
│ │ │ │ -
247
│ │ │ │ -
248#ifdef DOXYGEN
│ │ │ │ -
249
│ │ │ │ -
251
│ │ │ │ -
294 template<typename... T>
│ │ │ │ -
295 unspecified-value-type referenceElement(T&&... t);
│ │ │ │ -
296
│ │ │ │ -
297#endif
│ │ │ │ +
248 DUNE_EXPORT static QuadratureRules& instance()
│ │ │ │ +
249 {
│ │ │ │ +
250 static QuadratureRules instance;
│ │ │ │ +
251 return instance;
│ │ │ │ +
252 }
│ │ │ │ +
253
│ │ │ │ +
255 QuadratureRules () = default;
│ │ │ │ +
256 public:
│ │ │ │ +
258 static unsigned
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
261 {
│ │ │ │ + │ │ │ │ +
263 }
│ │ │ │ +
│ │ │ │ +
264
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
267 {
│ │ │ │ +
268 return instance()._rule(t,p,qt);
│ │ │ │ +
269 }
│ │ │ │ +
│ │ │ │ +
270
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
273 {
│ │ │ │ +
274 GeometryType gt(t,dim);
│ │ │ │ +
275 return instance()._rule(gt,p,qt);
│ │ │ │ +
276 }
│ │ │ │ +
│ │ │ │ +
277 };
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
279} // end namespace Dune
│ │ │ │ +
280
│ │ │ │ +
281#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ │ +
282
│ │ │ │ +
283// 0d rules
│ │ │ │ +
284#include "quadraturerules/pointquadrature.hh"
│ │ │ │ +
285// 1d rules
│ │ │ │ +
286#include "quadraturerules/gausslobattoquadrature.hh"
│ │ │ │ +
287#include "quadraturerules/gaussquadrature.hh"
│ │ │ │ +
288#include "quadraturerules/gaussradauleftquadrature.hh"
│ │ │ │ +
289#include "quadraturerules/gaussradaurightquadrature.hh"
│ │ │ │ +
290#include "quadraturerules/jacobi1quadrature.hh"
│ │ │ │ +
291#include "quadraturerules/jacobi2quadrature.hh"
│ │ │ │ +
292#include "quadraturerules/jacobiNquadrature.hh"
│ │ │ │ +
293// 3d rules
│ │ │ │ +
294#include "quadraturerules/prismquadrature.hh"
│ │ │ │ +
295// general rules
│ │ │ │ +
296#include "quadraturerules/simplexquadrature.hh"
│ │ │ │ +
297#include "quadraturerules/tensorproductquadrature.hh"
│ │ │ │
298
│ │ │ │ -
299
│ │ │ │ -
301
│ │ │ │ -
314 template<typename T, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
316 {
│ │ │ │ - │ │ │ │ -
318 }
│ │ │ │ +
299#undef DUNE_INCLUDING_IMPLEMENTATION
│ │ │ │ +
300
│ │ │ │ +
301namespace Dune {
│ │ │ │ +
302
│ │ │ │ +
309 template<typename ctype, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
311 private:
│ │ │ │ +
312 friend class QuadratureRules<ctype, dim>;
│ │ │ │ +
313 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ +
314 {
│ │ │ │ +
315 return TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ │ +
316 }
│ │ │ │ +
317 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ +
318 {
│ │ │ │ +
319 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ │ +
320 }
│ │ │ │ +
321 };
│ │ │ │
│ │ │ │ -
319
│ │ │ │ -
320
│ │ │ │
322
│ │ │ │ -
334 template<typename T, int dim, std::enable_if_t<IsNumber<std::decay_t<T>>::value, int> = 0>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
336 {
│ │ │ │ - │ │ │ │ -
338 }
│ │ │ │ -
│ │ │ │ -
339
│ │ │ │ -
340
│ │ │ │ -
341#ifndef DOXYGEN
│ │ │ │ -
342
│ │ │ │ -
343 // helpers for the ReferenceElement<> meta function
│ │ │ │ -
344
│ │ │ │ -
345 namespace Impl {
│ │ │ │ -
346
│ │ │ │ -
347 // Evaluates to the correct reference element iff <T...> matches the pattern <number_type,Dim<int>>
│ │ │ │ -
348 // otherwise, it's ill-formed. Should be used with detected_or and friends.
│ │ │ │ -
349
│ │ │ │ -
350 template<typename... T>
│ │ │ │ -
351 struct DefaultReferenceElementExtractor;
│ │ │ │ -
352
│ │ │ │ -
353 template<typename T, typename std::enable_if<IsNumber<T>::value,int>::type dim>
│ │ │ │ -
354 struct DefaultReferenceElementExtractor<T,Dim<dim>>
│ │ │ │ -
355 {
│ │ │ │ - │ │ │ │ -
357 };
│ │ │ │ -
358
│ │ │ │ -
359 template<typename... T>
│ │ │ │ -
360 using DefaultReferenceElement = typename DefaultReferenceElementExtractor<T...>::type;
│ │ │ │ -
361
│ │ │ │ -
362 }
│ │ │ │ -
363
│ │ │ │ -
364 // looks up the type of a reference element by trying to instantiate the correct overload
│ │ │ │ -
365 // of referenceElement() for the given arguments. This will fail if there is no valid
│ │ │ │ -
366 // overload and should be used with detected_or or some other utility that places the
│ │ │ │ -
367 // instantiation in SFINAE context.
│ │ │ │ -
368 //
│ │ │ │ -
369 // this is placed directly in namespace Dune to avoid any weird surprises
│ │ │ │ -
370
│ │ │ │ -
371 template<typename... T>
│ │ │ │ -
372 using LookupReferenceElement = decltype(referenceElement(std::declval<T>()...));
│ │ │ │ -
373
│ │ │ │ -
374#endif // DOXYGEN
│ │ │ │ -
375
│ │ │ │ -
│ │ │ │ -
376 namespace Transitional {
│ │ │ │ -
377
│ │ │ │ -
378#ifndef DOXYGEN
│ │ │ │ -
379
│ │ │ │ -
380 // this abomination checks whether the template signature matches the special case
│ │ │ │ -
381 // ReferenceElement<number_type,Dune::Dim<int>> and otherwise defers the type lookup
│ │ │ │ -
382 // to a decltype on a call to referenceElement(std::declval<T>())
│ │ │ │ -
383
│ │ │ │ -
384 template<typename... T>
│ │ │ │ -
385 using ReferenceElement = Std::detected_or_t<
│ │ │ │ -
386 Std::detected_t<LookupReferenceElement,T...>,
│ │ │ │ -
387 Impl::DefaultReferenceElement,
│ │ │ │ -
388 T...
│ │ │ │ -
389 >;
│ │ │ │ -
390
│ │ │ │ -
391#else // DOXYGEN
│ │ │ │ -
392
│ │ │ │ -
394
│ │ │ │ -
416 template<typename... T>
│ │ │ │ -
417 using ReferenceElement = unspecified-type;
│ │ │ │ -
418
│ │ │ │ -
419#endif //DOXYGEN
│ │ │ │ -
420
│ │ │ │ -
421 }
│ │ │ │ -
│ │ │ │ -
422
│ │ │ │ -
423#ifndef DOXYGEN
│ │ │ │ -
424
│ │ │ │ -
425 namespace Impl {
│ │ │ │ -
426
│ │ │ │ -
427 // helpers for triggering a deprecation warning for occurrences of the old
│ │ │ │ -
428 // ReferenceElement syntax (Dune::ReferenceElement<T,int>)
│ │ │ │ -
429
│ │ │ │ -
430 // this looks a little weird, encoding the type in the return type of a nested function,
│ │ │ │ -
431 // but it was the only reliable way to trigger the warning iff the compiler encounters
│ │ │ │ -
432 // an invalid use. Other solutions either miss some (or all) uses or trigger false alarms.
│ │ │ │ -
433
│ │ │ │ -
434 template<typename T>
│ │ │ │ -
435 struct ValidReferenceElementTypeSignature
│ │ │ │ -
436 {
│ │ │ │ -
437 Transitional::ReferenceElement<T> check();
│ │ │ │ -
438 };
│ │ │ │ -
439
│ │ │ │ -
440 template<typename T>
│ │ │ │ -
441 struct DeprecatedReferenceElementTypeSignature
│ │ │ │ -
442 {
│ │ │ │ -
443 [[deprecated("Dune::ReferenceElement<T,int> is deprecated, please use Dune::ReferenceElement<Geometry> (if you have a geometry), Dune::ReferenceElements<T,int>::ReferenceElement or Dune::Transitional::ReferenceElement<T,Dune::Dim<int>> instead. After Dune 2.6, you will be able to use Dune::ReferenceElement<T,Dune::Dim<int>>.")]] T check();
│ │ │ │ -
444 };
│ │ │ │ -
445
│ │ │ │ -
446 } // namespace Impl
│ │ │ │ -
447
│ │ │ │ -
448 // This just makes sure the user doesn't use invalid syntax (by checking against the -1 default for
│ │ │ │ -
449 // the dimension, and then either hands back the old-style type along with a deprecation warning or
│ │ │ │ -
450 // forwards to the transitional version
│ │ │ │ -
451 template<typename T, int dim = -1>
│ │ │ │ -
452 using ReferenceElement = decltype(
│ │ │ │ -
453 std::declval<
│ │ │ │ -
454 typename std::conditional<
│ │ │ │ -
455 dim == -1,
│ │ │ │ -
456 Impl::ValidReferenceElementTypeSignature<T>,
│ │ │ │ -
457 Impl::DeprecatedReferenceElementTypeSignature<Geo::DeprecatedReferenceElement<T,dim>>
│ │ │ │ -
458 >::type
│ │ │ │ -
459 >().check());
│ │ │ │ -
460
│ │ │ │ -
461#else // DOXYGEN
│ │ │ │ -
462
│ │ │ │ +
323 template<typename ctype>
│ │ │ │ +
│ │ │ │ +
324 class QuadratureRuleFactory<ctype, 0> {
│ │ │ │ +
325 private:
│ │ │ │ +
326 constexpr static int dim = 0;
│ │ │ │ +
327 friend class QuadratureRules<ctype, dim>;
│ │ │ │ +
328 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum)
│ │ │ │ +
329 {
│ │ │ │ +
330 if (t.isVertex())
│ │ │ │ +
331 {
│ │ │ │ +
332 return std::numeric_limits<int>::max();
│ │ │ │ +
333 }
│ │ │ │ +
334 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ +
335 }
│ │ │ │ +
336 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int , QuadratureType::Enum)
│ │ │ │ +
337 {
│ │ │ │ +
338 if (t.isVertex())
│ │ │ │ +
339 {
│ │ │ │ +
340 return PointQuadratureRule<ctype>();
│ │ │ │ +
341 }
│ │ │ │ +
342 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ +
343 }
│ │ │ │ +
344 };
│ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
346 template<typename ctype>
│ │ │ │ +
│ │ │ │ +
347 class QuadratureRuleFactory<ctype, 1> {
│ │ │ │ +
348 private:
│ │ │ │ +
349 constexpr static int dim = 1;
│ │ │ │ +
350 friend class QuadratureRules<ctype, dim>;
│ │ │ │ +
351 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ +
352 {
│ │ │ │ +
353 if (t.isLine())
│ │ │ │ +
354 {
│ │ │ │ +
355 switch (qt) {
│ │ │ │ + │ │ │ │ +
357 return GaussQuadratureRule1D<ctype>::highest_order;
│ │ │ │ + │ │ │ │ +
359 return Jacobi1QuadratureRule1D<ctype>::highest_order;
│ │ │ │ + │ │ │ │ +
361 return Jacobi2QuadratureRule1D<ctype>::highest_order;
│ │ │ │ + │ │ │ │ +
363 return GaussLobattoQuadratureRule1D<ctype>::highest_order;
│ │ │ │ + │ │ │ │ +
365 return JacobiNQuadratureRule1D<ctype>::maxOrder();
│ │ │ │ + │ │ │ │ +
367 return GaussRadauLeftQuadratureRule1D<ctype>::highest_order;
│ │ │ │ + │ │ │ │ +
369 return GaussRadauRightQuadratureRule1D<ctype>::highest_order;
│ │ │ │ +
370 default :
│ │ │ │ +
371 DUNE_THROW(Exception, "Unknown QuadratureType");
│ │ │ │ +
372 }
│ │ │ │ +
373 }
│ │ │ │ +
374 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ +
375 }
│ │ │ │ +
376 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ +
377 {
│ │ │ │ +
378 if (t.isLine())
│ │ │ │ +
379 {
│ │ │ │ +
380 switch (qt) {
│ │ │ │ + │ │ │ │ +
382 return GaussQuadratureRule1D<ctype>(p);
│ │ │ │ + │ │ │ │ +
384 return Jacobi1QuadratureRule1D<ctype>(p);
│ │ │ │ + │ │ │ │ +
386 return Jacobi2QuadratureRule1D<ctype>(p);
│ │ │ │ + │ │ │ │ +
388 return GaussLobattoQuadratureRule1D<ctype>(p);
│ │ │ │ + │ │ │ │ +
390 return JacobiNQuadratureRule1D<ctype>(p);
│ │ │ │ + │ │ │ │ +
392 return GaussRadauLeftQuadratureRule1D<ctype>(p);
│ │ │ │ + │ │ │ │ +
394 return GaussRadauRightQuadratureRule1D<ctype>(p);
│ │ │ │ +
395 default :
│ │ │ │ +
396 DUNE_THROW(Exception, "Unknown QuadratureType");
│ │ │ │ +
397 }
│ │ │ │ +
398 }
│ │ │ │ +
399 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ +
400 }
│ │ │ │ +
401 };
│ │ │ │ +
│ │ │ │ +
402
│ │ │ │ +
403 template<typename ctype>
│ │ │ │ +
│ │ │ │ +
404 class QuadratureRuleFactory<ctype, 2> {
│ │ │ │ +
405 private:
│ │ │ │ +
406 constexpr static int dim = 2;
│ │ │ │ +
407 friend class QuadratureRules<ctype, dim>;
│ │ │ │ +
408 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ +
409 {
│ │ │ │ +
410 unsigned order =
│ │ │ │ +
411 TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ │ +
412 if (t.isSimplex())
│ │ │ │ +
413 order = std::max
│ │ │ │ +
414 (order, unsigned(SimplexQuadratureRule<ctype,dim>::highest_order));
│ │ │ │ +
415 return order;
│ │ │ │ +
416 }
│ │ │ │ +
417 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ +
418 {
│ │ │ │ +
419 if (t.isSimplex()
│ │ │ │ + │ │ │ │ +
421 && p <= SimplexQuadratureRule<ctype,dim>::highest_order)
│ │ │ │ +
422 {
│ │ │ │ +
423 return SimplexQuadratureRule<ctype,dim>(p);
│ │ │ │ +
424 }
│ │ │ │ +
425 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ │ +
426 }
│ │ │ │ +
427 };
│ │ │ │ +
│ │ │ │ +
428
│ │ │ │ +
429 template<typename ctype>
│ │ │ │ +
│ │ │ │ +
430 class QuadratureRuleFactory<ctype, 3> {
│ │ │ │ +
431 private:
│ │ │ │ +
432 constexpr static int dim = 3;
│ │ │ │ +
433 friend class QuadratureRules<ctype, dim>;
│ │ │ │ +
434 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ +
435 {
│ │ │ │ +
436 unsigned order =
│ │ │ │ +
437 TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ │ +
438 if (t.isSimplex())
│ │ │ │ +
439 order = std::max
│ │ │ │ +
440 (order, unsigned(SimplexQuadratureRule<ctype,dim>::highest_order));
│ │ │ │ +
441 if (t.isPrism())
│ │ │ │ +
442 order = std::max
│ │ │ │ +
443 (order, unsigned(PrismQuadratureRule<ctype,dim>::highest_order));
│ │ │ │ +
444 return order;
│ │ │ │ +
445 }
│ │ │ │ +
446 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ +
447 {
│ │ │ │ +
448
│ │ │ │ +
449 if (t.isSimplex()
│ │ │ │ + │ │ │ │ +
451 && p <= SimplexQuadratureRule<ctype,dim>::highest_order)
│ │ │ │ +
452 {
│ │ │ │ +
453 return SimplexQuadratureRule<ctype,dim>(p);
│ │ │ │ +
454 }
│ │ │ │ +
455 if (t.isPrism()
│ │ │ │ + │ │ │ │ +
457 && p <= PrismQuadratureRule<ctype,dim>::highest_order)
│ │ │ │ +
458 {
│ │ │ │ +
459 return PrismQuadratureRule<ctype,dim>(p);
│ │ │ │ +
460 }
│ │ │ │ +
461 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ │ +
462 }
│ │ │ │ +
463 };
│ │ │ │ +
│ │ │ │
464
│ │ │ │ -
496 template<typename T, int dim>
│ │ │ │ -
497 using ReferenceElement = unspecified-type;
│ │ │ │ -
498
│ │ │ │ -
499#endif // DOXYGEN
│ │ │ │ -
500
│ │ │ │ -
501
│ │ │ │ -
502
│ │ │ │ -
503} // namespace Dune
│ │ │ │ -
504
│ │ │ │ -
505#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
│ │ │ │ -
unspecified-type ReferenceElement
Returns the type of reference element for the argument type T.
Definition referenceelements.hh:497
│ │ │ │ +
465#ifndef DUNE_NO_EXTERN_QUADRATURERULES
│ │ │ │ +
466 extern template class GaussLobattoQuadratureRule<double, 1>;
│ │ │ │ +
467 extern template class GaussQuadratureRule<double, 1>;
│ │ │ │ +
468 extern template class GaussRadauLeftQuadratureRule<double, 1>;
│ │ │ │ +
469 extern template class GaussRadauRightQuadratureRule<double, 1>;
│ │ │ │ +
470 extern template class Jacobi1QuadratureRule<double, 1>;
│ │ │ │ +
471 extern template class Jacobi2QuadratureRule<double, 1>;
│ │ │ │ +
472 extern template class JacobiNQuadratureRule<double, 1>;
│ │ │ │ +
473 extern template class PrismQuadratureRule<double, 3>;
│ │ │ │ +
474 extern template class SimplexQuadratureRule<double, 2>;
│ │ │ │ +
475 extern template class SimplexQuadratureRule<double, 3>;
│ │ │ │ +
476#endif // !DUNE_NO_EXTERN_QUADRATURERULES
│ │ │ │ +
477
│ │ │ │ +
478} // end namespace
│ │ │ │ +
479
│ │ │ │ +
480#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.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
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:170
│ │ │ │ -
static Iterator begin()
Definition referenceelements.hh:215
│ │ │ │ -
Iterator iterator
Iterator over available reference elements.
Definition referenceelements.hh:194
│ │ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ -
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:210
│ │ │ │ -
static Iterator end()
Definition referenceelements.hh:220
│ │ │ │ -
ctype_ ctype
The coordinate field type of the contained reference elements.
Definition referenceelements.hh:173
│ │ │ │ -
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:198
│ │ │ │ -
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:204
│ │ │ │ -
typename Container::const_iterator Iterator
Iterator over available reference elements.
Definition referenceelements.hh:191
│ │ │ │ -
static constexpr int dimension
The dimension of the contained reference elements.
Definition referenceelements.hh:179
│ │ │ │ -
ctype CoordinateField
The coordinate field type of the contained reference elements.
Definition referenceelements.hh:176
│ │ │ │ -
Static tag representing a dimension.
Definition dimension.hh:16
│ │ │ │ +
Enum
Definition quadraturerules.hh:82
│ │ │ │ +
@ GaussJacobi_n_0
Gauss-Legendre rules with .
Definition quadraturerules.hh:119
│ │ │ │ +
@ GaussJacobi_2_0
Gauss-Legendre rules with .
Definition quadraturerules.hh:106
│ │ │ │ +
@ GaussRadauRight
Gauss-Radau rules including the right endpoint.
Definition quadraturerules.hh:144
│ │ │ │ +
@ GaussJacobi_1_0
Gauss-Jacobi rules with .
Definition quadraturerules.hh:99
│ │ │ │ +
@ size
Definition quadraturerules.hh:145
│ │ │ │ +
@ GaussLobatto
Gauss-Lobatto rules.
Definition quadraturerules.hh:127
│ │ │ │ +
@ GaussRadauLeft
Gauss-Radau rules including the left endpoint.
Definition quadraturerules.hh:135
│ │ │ │ +
@ GaussLegendre
Gauss-Legendre rules (default)
Definition quadraturerules.hh:92
│ │ │ │ +
Exception thrown if a desired QuadratureRule is not available, because the requested order is to high...
Definition quadraturerules.hh:36
│ │ │ │ +
Single evaluation point in a quadrature rule.
Definition quadraturerules.hh:44
│ │ │ │ +
const Vector & position() const
return local coordinates of integration point i
Definition quadraturerules.hh:62
│ │ │ │ +
Dune::FieldVector< ct, dim > Vector
Type used for the position of a quadrature point.
Definition quadraturerules.hh:53
│ │ │ │ +
ct Field
Number type used for coordinates and quadrature weights.
Definition quadraturerules.hh:50
│ │ │ │ +
const ct & weight() const
return weight associated with integration point i
Definition quadraturerules.hh:68
│ │ │ │ +
ct weight_
Definition quadraturerules.hh:75
│ │ │ │ +
static constexpr int dimension
Dimension of the integration domain.
Definition quadraturerules.hh:47
│ │ │ │ +
QuadraturePoint(const Vector &x, ct w)
set up quadrature of given order in d dimensions
Definition quadraturerules.hh:56
│ │ │ │ +
FieldVector< ct, dim > local
Definition quadraturerules.hh:74
│ │ │ │ +
Abstract base class for quadrature rules.
Definition quadraturerules.hh:154
│ │ │ │ +
virtual ~QuadratureRule()
Definition quadraturerules.hh:181
│ │ │ │ +
static constexpr int d
The space dimension.
Definition quadraturerules.hh:171
│ │ │ │ +
virtual GeometryType type() const
return type of element
Definition quadraturerules.hh:180
│ │ │ │ +
int delivered_order
Definition quadraturerules.hh:189
│ │ │ │ +
QuadratureRule(GeometryType t, int order)
Constructor for a given geometry type and a given quadrature order.
Definition quadraturerules.hh:168
│ │ │ │ +
GeometryType geometry_type
Definition quadraturerules.hh:188
│ │ │ │ +
ct CoordType
The type used for coordinates.
Definition quadraturerules.hh:174
│ │ │ │ +
QuadratureRule()
Default constructor.
Definition quadraturerules.hh:161
│ │ │ │ +
virtual int order() const
return order
Definition quadraturerules.hh:177
│ │ │ │ +
QuadratureRule(GeometryType t)
Constructor for a given geometry type. Leaves the quadrature order invalid
Definition quadraturerules.hh:165
│ │ │ │ +
std::vector< QuadraturePoint< ct, dim > >::const_iterator iterator
Definition quadraturerules.hh:185
│ │ │ │ +
Factory class for creation of quadrature rules, depending on GeometryType, order and QuadratureType.
Definition quadraturerules.hh:310
│ │ │ │ +
A container for all quadrature rules of dimension dim
Definition quadraturerules.hh:200
│ │ │ │ +
static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
maximum quadrature order for given geometry type and quadrature type
Definition quadraturerules.hh:259
│ │ │ │ +
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:272
│ │ │ │ +
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:266
│ │ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ +
constexpr bool isPrism() const
Return true if entity is a prism.
Definition type.hh:321
│ │ │ │ +
constexpr bool isVertex() const
Return true if entity is a vertex.
Definition type.hh:291
│ │ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ +
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition type.hh:132
│ │ │ │ +
constexpr bool isLine() const
Return true if entity is a line segment.
Definition type.hh:296
│ │ │ │
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ +
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition type.hh:331
│ │ │ │ +
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,476 +1,587 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -referenceelements.hh │ │ │ │ │ +quadraturerules.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ │ -6#define DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ │ +7#define DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11#include │ │ │ │ │ -12#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> │ │ │ │ │ +15 │ │ │ │ │ +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_/_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 │ │ │ │ │ -29 namespace Geo │ │ │ │ │ -30 { │ │ │ │ │ +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 │ │ │ │ │ +30namespace _D_u_n_e { │ │ │ │ │ 31 │ │ │ │ │ -32#ifndef DOXYGEN │ │ │ │ │ -33 │ │ │ │ │ -34 │ │ │ │ │ -35 template │ │ │ │ │ -36 class DeprecatedReferenceElement │ │ │ │ │ -37 : public ReferenceElement> │ │ │ │ │ -38 { │ │ │ │ │ -39 │ │ │ │ │ -40 protected: │ │ │ │ │ -41 │ │ │ │ │ -42 DeprecatedReferenceElement() = default; │ │ │ │ │ -43 │ │ │ │ │ -44 public: │ │ │ │ │ -45 │ │ │ │ │ -46 DeprecatedReferenceElement(const DeprecatedReferenceElement&) = delete; │ │ │ │ │ -47 DeprecatedReferenceElement& operator=(const DeprecatedReferenceElement&) = │ │ │ │ │ -delete; │ │ │ │ │ +_3_6 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 {}; │ │ │ │ │ +37 │ │ │ │ │ +43 template │ │ │ │ │ +_4_4 class _Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t { │ │ │ │ │ +45 public: │ │ │ │ │ +_4_7 constexpr static int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ 48 │ │ │ │ │ -49 DeprecatedReferenceElement(const ReferenceElementImplementation& │ │ │ │ │ -impl) │ │ │ │ │ -50 : ReferenceElement>(impl) │ │ │ │ │ -51 {} │ │ │ │ │ -52 │ │ │ │ │ -53 }; │ │ │ │ │ +_5_0 typedef ct _F_i_e_l_d; │ │ │ │ │ +51 │ │ │ │ │ +_5_3 typedef Dune::FieldVector _V_e_c_t_o_r; │ │ │ │ │ 54 │ │ │ │ │ -55 │ │ │ │ │ -56 template │ │ │ │ │ -57 class ConstructibleDeprecatedReferenceElement │ │ │ │ │ -58 : public DeprecatedReferenceElement │ │ │ │ │ -59 { │ │ │ │ │ -60 public: │ │ │ │ │ -61 ConstructibleDeprecatedReferenceElement() = default; │ │ │ │ │ -62 }; │ │ │ │ │ -63 │ │ │ │ │ -64 │ │ │ │ │ -65 namespace Impl │ │ │ │ │ -66 { │ │ │ │ │ -67 │ │ │ │ │ -68 // ReferenceElementContainer │ │ │ │ │ -69 // ------------------------- │ │ │ │ │ -70 │ │ │ │ │ -71 template< class ctype, int dim > │ │ │ │ │ -72 class ReferenceElementContainer │ │ │ │ │ -73 { │ │ │ │ │ -74 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0; │ │ │ │ │ -75 │ │ │ │ │ -76 using Implementation = ReferenceElementImplementation< ctype, dim >; │ │ │ │ │ -77 using ConstructibleDeprecatedReferenceElement = Dune::Geo:: │ │ │ │ │ -ConstructibleDeprecatedReferenceElement; │ │ │ │ │ -78 │ │ │ │ │ -79 public: │ │ │ │ │ -80 │ │ │ │ │ -81 using DeprecatedReferenceElement = Dune::Geo:: │ │ │ │ │ -DeprecatedReferenceElement; │ │ │ │ │ -82 │ │ │ │ │ -83 using ReferenceElement = _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_ _>; │ │ │ │ │ -84 using value_type = ReferenceElement; │ │ │ │ │ -85 using const_iterator = const value_type*; │ │ │ │ │ -86 │ │ │ │ │ -87 ReferenceElementContainer () │ │ │ │ │ -88 { │ │ │ │ │ -89 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId ) │ │ │ │ │ -90 { │ │ │ │ │ -91 implementations_[ topologyId ].initialize( topologyId ); │ │ │ │ │ -92 reference_elements_[ topologyId ].setImplementation( implementations_ │ │ │ │ │ -[ topologyId ] ); │ │ │ │ │ -93 } │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -96 const ReferenceElement& operator() ( const GeometryType &type ) const │ │ │ │ │ -97 { │ │ │ │ │ -98 assert( type.dim() == dim ); │ │ │ │ │ -99 return reference_elements_[ type.id() ]; │ │ │ │ │ -100 } │ │ │ │ │ -101 │ │ │ │ │ -102 const ReferenceElement& simplex () const │ │ │ │ │ -103 { │ │ │ │ │ -104 return reference_elements_[ Dune::GeometryTypes::simplex(dim)._i_d() ]; │ │ │ │ │ -105 } │ │ │ │ │ -106 │ │ │ │ │ -107 const ReferenceElement& cube () const │ │ │ │ │ -108 { │ │ │ │ │ -109 return reference_elements_[ Dune::GeometryTypes::cube(dim)._i_d() ]; │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -112 const ReferenceElement& pyramid () const │ │ │ │ │ -113 { │ │ │ │ │ -114 return reference_elements_[ Dune::GeometryTypes::pyramid._i_d() ]; │ │ │ │ │ -115 } │ │ │ │ │ -116 │ │ │ │ │ -117 const ReferenceElement& prism () const │ │ │ │ │ -118 { │ │ │ │ │ -119 return reference_elements_[ Dune::GeometryTypes::prism._i_d() ]; │ │ │ │ │ -120 } │ │ │ │ │ -121 │ │ │ │ │ -122 const_iterator begin () const │ │ │ │ │ -123 { │ │ │ │ │ -124 return reference_elements_.data(); │ │ │ │ │ -125 } │ │ │ │ │ -126 │ │ │ │ │ -127 const_iterator end () const │ │ │ │ │ -128 { │ │ │ │ │ -129 return reference_elements_.data() + numTopologies; │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -132 // here, we make sure to actually return a const reference to something │ │ │ │ │ -133 // that is guaranteed not to become invalid, as otherwise, we might run │ │ │ │ │ -134 // straight into debugging hell when a user binds the return value to a │ │ │ │ │ -135 // const ref and the temporary goes out of scope. │ │ │ │ │ -136 const DeprecatedReferenceElement& deprecated(const ReferenceElement& v) │ │ │ │ │ -const │ │ │ │ │ -137 { │ │ │ │ │ -138 return reference_elements_[v.impl().type(0,0).id()]; │ │ │ │ │ -139 } │ │ │ │ │ -140 │ │ │ │ │ -141 private: │ │ │ │ │ -142 │ │ │ │ │ -143 std::array implementations_; │ │ │ │ │ -144 std::array │ │ │ │ │ -reference_elements_; │ │ │ │ │ -145 │ │ │ │ │ -146 }; │ │ │ │ │ -147 │ │ │ │ │ +_5_6 _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) │ │ │ │ │ +57 { │ │ │ │ │ +58 _w_e_i_g_h_t__ = w; │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +_6_2 const _V_e_c_t_o_r& _p_o_s_i_t_i_o_n () const │ │ │ │ │ +63 { │ │ │ │ │ +64 return _l_o_c_a_l; │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +_6_8 const ct &_w_e_i_g_h_t () const │ │ │ │ │ +69 { │ │ │ │ │ +70 return _w_e_i_g_h_t__; │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +73 protected: │ │ │ │ │ +_7_4 FieldVector _l_o_c_a_l; │ │ │ │ │ +_7_5 ct _w_e_i_g_h_t__; │ │ │ │ │ +76 }; │ │ │ │ │ +77 │ │ │ │ │ +_8_1 namespace QuadratureType { │ │ │ │ │ +_8_2 enum _E_n_u_m { │ │ │ │ │ +_9_2 _G_a_u_s_s_L_e_g_e_n_d_r_e = 0, │ │ │ │ │ +93 │ │ │ │ │ +_9_9 _G_a_u_s_s_J_a_c_o_b_i___1___0 = 1, │ │ │ │ │ +100 │ │ │ │ │ +_1_0_6 _G_a_u_s_s_J_a_c_o_b_i___2___0 = 2, │ │ │ │ │ +107 │ │ │ │ │ +_1_1_9 _G_a_u_s_s_J_a_c_o_b_i___n___0 = 3, │ │ │ │ │ +120 │ │ │ │ │ +_1_2_7 _G_a_u_s_s_L_o_b_a_t_t_o = 4, │ │ │ │ │ +128 │ │ │ │ │ +_1_3_5 _G_a_u_s_s_R_a_d_a_u_L_e_f_t = 5, │ │ │ │ │ +136 │ │ │ │ │ +_1_4_4 _G_a_u_s_s_R_a_d_a_u_R_i_g_h_t = 6, │ │ │ │ │ +145 _s_i_z_e │ │ │ │ │ +_1_4_6 }; │ │ │ │ │ +147 } │ │ │ │ │ 148 │ │ │ │ │ -149 } // namespace Impl │ │ │ │ │ -150 │ │ │ │ │ -151 │ │ │ │ │ -152#endif // DOXYGEN │ │ │ │ │ -153 │ │ │ │ │ -154 │ │ │ │ │ -155 // ReferenceElements │ │ │ │ │ -156 // ------------------------ │ │ │ │ │ -157 │ │ │ │ │ -168 template< class ctype_, int dim > │ │ │ │ │ -_1_6_9 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ │ -170 { │ │ │ │ │ -171 │ │ │ │ │ -_1_7_3 using _c_t_y_p_e = ctype_; │ │ │ │ │ -174 │ │ │ │ │ -_1_7_6 using _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d = _c_t_y_p_e; │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 static constexpr int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -180 │ │ │ │ │ -181 private: │ │ │ │ │ +152 template │ │ │ │ │ +_1_5_3 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e : public std::vector > │ │ │ │ │ +154 { │ │ │ │ │ +155 public: │ │ │ │ │ +_1_6_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) {} │ │ │ │ │ +162 │ │ │ │ │ +163 protected: │ │ │ │ │ +_1_6_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) {} │ │ │ │ │ +166 │ │ │ │ │ +_1_6_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) {} │ │ │ │ │ +169 public: │ │ │ │ │ +_1_7_1 constexpr static int _d = dim; │ │ │ │ │ +172 │ │ │ │ │ +_1_7_4 typedef ct _C_o_o_r_d_T_y_p_e; │ │ │ │ │ +175 │ │ │ │ │ +_1_7_7 virtual int _o_r_d_e_r () const { return _d_e_l_i_v_e_r_e_d___o_r_d_e_r; } │ │ │ │ │ +178 │ │ │ │ │ +_1_8_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; } │ │ │ │ │ +_1_8_1 virtual _~_Q_u_a_d_r_a_t_u_r_e_R_u_l_e(){} │ │ │ │ │ 182 │ │ │ │ │ -183 using Container = Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ │ -184 │ │ │ │ │ -185 public: │ │ │ │ │ +_1_8_5 typedef typename std::vector >::const_iterator │ │ │ │ │ +_i_t_e_r_a_t_o_r; │ │ │ │ │ 186 │ │ │ │ │ -_1_8_8 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = typename Container::ReferenceElement; │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 using _I_t_e_r_a_t_o_r = typename Container::const_iterator; │ │ │ │ │ -192 │ │ │ │ │ -_1_9_4 using _i_t_e_r_a_t_o_r = _I_t_e_r_a_t_o_r; │ │ │ │ │ +187 protected: │ │ │ │ │ +_1_8_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; │ │ │ │ │ +_1_8_9 int _d_e_l_i_v_e_r_e_d___o_r_d_e_r; │ │ │ │ │ +190 }; │ │ │ │ │ +191 │ │ │ │ │ +192 // Forward declaration of the factory class, │ │ │ │ │ +193 // needed internally by the QuadratureRules container class. │ │ │ │ │ +194 template class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y; │ │ │ │ │ 195 │ │ │ │ │ -197 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& │ │ │ │ │ -_1_9_8 _g_e_n_e_r_a_l ( const _G_e_o_m_e_t_r_y_T_y_p_e& type ) │ │ │ │ │ -199 { │ │ │ │ │ -200 return container() ( type ); │ │ │ │ │ -201 } │ │ │ │ │ -202 │ │ │ │ │ -_2_0_4 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 () │ │ │ │ │ -205 { │ │ │ │ │ -206 return container().simplex(); │ │ │ │ │ -207 } │ │ │ │ │ -208 │ │ │ │ │ -_2_1_0 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _c_u_b_e () │ │ │ │ │ -211 { │ │ │ │ │ -212 return container().cube(); │ │ │ │ │ -213 } │ │ │ │ │ -214 │ │ │ │ │ -_2_1_5 static _I_t_e_r_a_t_o_r _b_e_g_i_n () │ │ │ │ │ +199 template │ │ │ │ │ +_2_0_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s { │ │ │ │ │ +201 │ │ │ │ │ +203 using _Q_u_a_d_r_a_t_u_r_e_R_u_l_e = _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_>; │ │ │ │ │ +204 │ │ │ │ │ +205 // indexed by quadrature order │ │ │ │ │ +206 using QuadratureOrderVector = std::vector >; │ │ │ │ │ +207 │ │ │ │ │ +208 // indexed by geometry type │ │ │ │ │ +209 using GeometryTypeVector = std::vector >; │ │ │ │ │ +210 │ │ │ │ │ +211 // indexed by quadrature type enum │ │ │ │ │ +212 using QuadratureCacheVector = std::vector >; │ │ │ │ │ +213 │ │ │ │ │ +215 DUNE_EXPORT const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e& _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 │ │ │ │ │ 216 { │ │ │ │ │ -217 return container().begin(); │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -_2_2_0 static _I_t_e_r_a_t_o_r _e_n_d () │ │ │ │ │ -221 { │ │ │ │ │ -222 return container().end(); │ │ │ │ │ -223 } │ │ │ │ │ -224 │ │ │ │ │ -225#ifndef DOXYGEN │ │ │ │ │ -226 static const typename Container::DeprecatedReferenceElement& │ │ │ │ │ -227 deprecated(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& v) │ │ │ │ │ -228 { │ │ │ │ │ -229 return container().deprecated(v); │ │ │ │ │ -230 } │ │ │ │ │ -231#endif // DOXYGEN │ │ │ │ │ -232 │ │ │ │ │ -233 private: │ │ │ │ │ -234 │ │ │ │ │ -235 DUNE_EXPORT static const Container& container () │ │ │ │ │ -236 { │ │ │ │ │ -237 static Container container; │ │ │ │ │ -238 return container; │ │ │ │ │ -239 } │ │ │ │ │ -240 }; │ │ │ │ │ -241 │ │ │ │ │ -242 } // namespace Geo │ │ │ │ │ +217 assert(t._d_i_m()==dim); │ │ │ │ │ +218 │ │ │ │ │ +219 DUNE_ASSERT_CALL_ONCE(); │ │ │ │ │ +220 │ │ │ │ │ +221 static QuadratureCacheVector quadratureCache(_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e); │ │ │ │ │ +222 │ │ │ │ │ +223 auto& [ onceFlagQuadratureType, geometryTypes ] = quadratureCache[qt]; │ │ │ │ │ +224 // initialize geometry types for this quadrature type once │ │ │ │ │ +225 std::call_once(onceFlagQuadratureType, [&types = geometryTypes]{ │ │ │ │ │ +226 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)); │ │ │ │ │ +227 }); │ │ │ │ │ +228 │ │ │ │ │ +229 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)]; │ │ │ │ │ +230 // initialize quadrature orders for this geometry type and quadrature type │ │ │ │ │ +once │ │ │ │ │ +231 std::call_once(onceFlagGeometryType, [&, &orders = quadratureOrders]{ │ │ │ │ │ +232 // we only need one quadrature rule for points, not maxint │ │ │ │ │ +233 const auto numRules = dim == 0 ? 1 : _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_>_:_: │ │ │ │ │ +_m_a_x_O_r_d_e_r(t, qt)+1; │ │ │ │ │ +234 orders = QuadratureOrderVector(numRules); │ │ │ │ │ +235 }); │ │ │ │ │ +236 │ │ │ │ │ +237 // we only have one quadrature rule for points │ │ │ │ │ +238 auto& [ onceFlagQuadratureOrder, quadratureRule ] = quadratureOrders[dim == │ │ │ │ │ +0 ? 0 : p]; │ │ │ │ │ +239 // initialize quadrature rule once │ │ │ │ │ +240 std::call_once(onceFlagQuadratureOrder, [&, &_r_u_l_e = quadratureRule]{ │ │ │ │ │ +241 _r_u_l_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_>_:_:_r_u_l_e(t, p, qt); │ │ │ │ │ +242 }); │ │ │ │ │ 243 │ │ │ │ │ -245 using Geo::ReferenceElements; │ │ │ │ │ +244 return quadratureRule; │ │ │ │ │ +245 } │ │ │ │ │ 246 │ │ │ │ │ -247 │ │ │ │ │ -248#ifdef DOXYGEN │ │ │ │ │ -249 │ │ │ │ │ -251 │ │ │ │ │ -294 template │ │ │ │ │ -_2_9_5 unspecified-value-type _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(T&&... t); │ │ │ │ │ -296 │ │ │ │ │ -297#endif │ │ │ │ │ +248 DUNE_EXPORT static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s& instance() │ │ │ │ │ +249 { │ │ │ │ │ +250 static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s instance; │ │ │ │ │ +251 return instance; │ │ │ │ │ +252 } │ │ │ │ │ +253 │ │ │ │ │ +255 _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s () = default; │ │ │ │ │ +256 public: │ │ │ │ │ +258 static unsigned │ │ │ │ │ +_2_5_9 _m_a_x_O_r_d_e_r(const _G_e_o_m_e_t_r_y_T_y_p_e& t, │ │ │ │ │ +260 _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) │ │ │ │ │ +261 { │ │ │ │ │ +262 return _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_>_:_:_m_a_x_O_r_d_e_r(t,qt); │ │ │ │ │ +263 } │ │ │ │ │ +264 │ │ │ │ │ +_2_6_6 static const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e& _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) │ │ │ │ │ +267 { │ │ │ │ │ +268 return instance()._rule(t,p,qt); │ │ │ │ │ +269 } │ │ │ │ │ +270 │ │ │ │ │ +_2_7_2 static const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e& _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) │ │ │ │ │ +273 { │ │ │ │ │ +274 _G_e_o_m_e_t_r_y_T_y_p_e gt(t,dim); │ │ │ │ │ +275 return instance()._rule(gt,p,qt); │ │ │ │ │ +276 } │ │ │ │ │ +277 }; │ │ │ │ │ +278 │ │ │ │ │ +279} // end namespace Dune │ │ │ │ │ +280 │ │ │ │ │ +_2_8_1#define DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ +282 │ │ │ │ │ +283// 0d rules │ │ │ │ │ +284#include "quadraturerules/pointquadrature.hh" │ │ │ │ │ +285// 1d rules │ │ │ │ │ +286#include "quadraturerules/gausslobattoquadrature.hh" │ │ │ │ │ +287#include "quadraturerules/gaussquadrature.hh" │ │ │ │ │ +288#include "quadraturerules/gaussradauleftquadrature.hh" │ │ │ │ │ +289#include "quadraturerules/gaussradaurightquadrature.hh" │ │ │ │ │ +290#include "quadraturerules/jacobi1quadrature.hh" │ │ │ │ │ +291#include "quadraturerules/jacobi2quadrature.hh" │ │ │ │ │ +292#include "quadraturerules/jacobiNquadrature.hh" │ │ │ │ │ +293// 3d rules │ │ │ │ │ +294#include "quadraturerules/prismquadrature.hh" │ │ │ │ │ +295// general rules │ │ │ │ │ +296#include "quadraturerules/simplexquadrature.hh" │ │ │ │ │ +297#include "quadraturerules/tensorproductquadrature.hh" │ │ │ │ │ 298 │ │ │ │ │ -299 │ │ │ │ │ -301 │ │ │ │ │ -314 template │ │ │ │ │ -_3_1_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_> = {}) │ │ │ │ │ -316 { │ │ │ │ │ -317 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); │ │ │ │ │ -318 } │ │ │ │ │ -319 │ │ │ │ │ -320 │ │ │ │ │ +299#undef DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ +300 │ │ │ │ │ +301namespace _D_u_n_e { │ │ │ │ │ +302 │ │ │ │ │ +309 template │ │ │ │ │ +_3_1_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ +311 private: │ │ │ │ │ +312 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ +313 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) │ │ │ │ │ +314 { │ │ │ │ │ +315 return TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ │ +316 } │ │ │ │ │ +317 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) │ │ │ │ │ +318 { │ │ │ │ │ +319 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ │ +320 } │ │ │ │ │ +321 }; │ │ │ │ │ 322 │ │ │ │ │ -334 template>:: │ │ │ │ │ -value, int> = 0> │ │ │ │ │ -_3_3_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_>) │ │ │ │ │ -336 { │ │ │ │ │ -337 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); │ │ │ │ │ -338 } │ │ │ │ │ -339 │ │ │ │ │ -340 │ │ │ │ │ -341#ifndef DOXYGEN │ │ │ │ │ -342 │ │ │ │ │ -343 // helpers for the ReferenceElement<> meta function │ │ │ │ │ -344 │ │ │ │ │ -345 namespace Impl { │ │ │ │ │ -346 │ │ │ │ │ -347 // Evaluates to the correct reference element iff matches the │ │ │ │ │ -pattern > │ │ │ │ │ -348 // otherwise, it's ill-formed. Should be used with detected_or and friends. │ │ │ │ │ -349 │ │ │ │ │ -350 template │ │ │ │ │ -351 struct DefaultReferenceElementExtractor; │ │ │ │ │ -352 │ │ │ │ │ -353 template::value,int>::type │ │ │ │ │ -dim> │ │ │ │ │ -354 struct DefaultReferenceElementExtractor> │ │ │ │ │ -355 { │ │ │ │ │ -356 using type = typename _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_T_,_d_i_m_>_:_: │ │ │ │ │ -_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ │ -357 }; │ │ │ │ │ -358 │ │ │ │ │ -359 template │ │ │ │ │ -360 using DefaultReferenceElement = typename │ │ │ │ │ -DefaultReferenceElementExtractor::type; │ │ │ │ │ -361 │ │ │ │ │ -362 } │ │ │ │ │ -363 │ │ │ │ │ -364 // looks up the type of a reference element by trying to instantiate the │ │ │ │ │ -correct overload │ │ │ │ │ -365 // of referenceElement() for the given arguments. This will fail if there │ │ │ │ │ -is no valid │ │ │ │ │ -366 // overload and should be used with detected_or or some other utility that │ │ │ │ │ -places the │ │ │ │ │ -367 // instantiation in SFINAE context. │ │ │ │ │ -368 // │ │ │ │ │ -369 // this is placed directly in namespace Dune to avoid any weird surprises │ │ │ │ │ -370 │ │ │ │ │ -371 template │ │ │ │ │ -372 using LookupReferenceElement = decltype(_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(std::declval │ │ │ │ │ -()...)); │ │ │ │ │ -373 │ │ │ │ │ -374#endif // DOXYGEN │ │ │ │ │ -375 │ │ │ │ │ -_3_7_6 namespace Transitional { │ │ │ │ │ -377 │ │ │ │ │ -378#ifndef DOXYGEN │ │ │ │ │ -379 │ │ │ │ │ -380 // this abomination checks whether the template signature matches the │ │ │ │ │ -special case │ │ │ │ │ -381 // ReferenceElement> and otherwise defers the │ │ │ │ │ -type lookup │ │ │ │ │ -382 // to a decltype on a call to referenceElement(std::declval()) │ │ │ │ │ -383 │ │ │ │ │ -384 template │ │ │ │ │ -385 using ReferenceElement = Std::detected_or_t< │ │ │ │ │ -386 Std::detected_t, │ │ │ │ │ -387 Impl::DefaultReferenceElement, │ │ │ │ │ -388 T... │ │ │ │ │ -389 >; │ │ │ │ │ -390 │ │ │ │ │ -391#else // DOXYGEN │ │ │ │ │ -392 │ │ │ │ │ -394 │ │ │ │ │ -416 template │ │ │ │ │ -417 using ReferenceElement = unspecified-type; │ │ │ │ │ -418 │ │ │ │ │ -419#endif //DOXYGEN │ │ │ │ │ -420 │ │ │ │ │ -421 } │ │ │ │ │ -422 │ │ │ │ │ -423#ifndef DOXYGEN │ │ │ │ │ -424 │ │ │ │ │ -425 namespace Impl { │ │ │ │ │ -426 │ │ │ │ │ -427 // helpers for triggering a deprecation warning for occurrences of the old │ │ │ │ │ -428 // ReferenceElement syntax (Dune::ReferenceElement) │ │ │ │ │ -429 │ │ │ │ │ -430 // this looks a little weird, encoding the type in the return type of a │ │ │ │ │ -nested function, │ │ │ │ │ -431 // but it was the only reliable way to trigger the warning iff the compiler │ │ │ │ │ -encounters │ │ │ │ │ -432 // an invalid use. Other solutions either miss some (or all) uses or │ │ │ │ │ -trigger false alarms. │ │ │ │ │ -433 │ │ │ │ │ -434 template │ │ │ │ │ -435 struct ValidReferenceElementTypeSignature │ │ │ │ │ -436 { │ │ │ │ │ -437 Transitional::ReferenceElement check(); │ │ │ │ │ -438 }; │ │ │ │ │ -439 │ │ │ │ │ -440 template │ │ │ │ │ -441 struct DeprecatedReferenceElementTypeSignature │ │ │ │ │ -442 { │ │ │ │ │ -443 [[deprecated("Dune::ReferenceElement is deprecated, please use │ │ │ │ │ -Dune::ReferenceElement (if you have a geometry), Dune:: │ │ │ │ │ -ReferenceElements::ReferenceElement or Dune::Transitional:: │ │ │ │ │ -ReferenceElement> instead. After Dune 2.6, you will be able to │ │ │ │ │ -use Dune::ReferenceElement>.")]] T check(); │ │ │ │ │ -444 }; │ │ │ │ │ -445 │ │ │ │ │ -446 } // namespace Impl │ │ │ │ │ -447 │ │ │ │ │ -448 // This just makes sure the user doesn't use invalid syntax (by checking │ │ │ │ │ -against the -1 default for │ │ │ │ │ -449 // the dimension, and then either hands back the old-style type along with │ │ │ │ │ -a deprecation warning or │ │ │ │ │ -450 // forwards to the transitional version │ │ │ │ │ -451 template │ │ │ │ │ -452 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = decltype( │ │ │ │ │ -453 std::declval< │ │ │ │ │ -454 typename std::conditional< │ │ │ │ │ -455 dim == -1, │ │ │ │ │ -456 Impl::ValidReferenceElementTypeSignature, │ │ │ │ │ -457 Impl::DeprecatedReferenceElementTypeSignature> │ │ │ │ │ -458 >::type │ │ │ │ │ -459 >().check()); │ │ │ │ │ -460 │ │ │ │ │ -461#else // DOXYGEN │ │ │ │ │ -462 │ │ │ │ │ +323 template │ │ │ │ │ +_3_2_4 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ +325 private: │ │ │ │ │ +_3_2_6 constexpr static int dim = 0; │ │ │ │ │ +327 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ +328 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) │ │ │ │ │ +329 { │ │ │ │ │ +330 if (t._i_s_V_e_r_t_e_x()) │ │ │ │ │ +331 { │ │ │ │ │ +332 return std::numeric_limits::max(); │ │ │ │ │ +333 } │ │ │ │ │ +334 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ +335 } │ │ │ │ │ +336 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) │ │ │ │ │ +337 { │ │ │ │ │ +338 if (t.isVertex()) │ │ │ │ │ +339 { │ │ │ │ │ +340 return PointQuadratureRule(); │ │ │ │ │ +341 } │ │ │ │ │ +342 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ +343 } │ │ │ │ │ +344 }; │ │ │ │ │ +345 │ │ │ │ │ +346 template │ │ │ │ │ +_3_4_7 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ +348 private: │ │ │ │ │ +_3_4_9 constexpr static int dim = 1; │ │ │ │ │ +350 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ +351 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) │ │ │ │ │ +352 { │ │ │ │ │ +353 if (t._i_s_L_i_n_e()) │ │ │ │ │ +354 { │ │ │ │ │ +355 switch (qt) { │ │ │ │ │ +356 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 : │ │ │ │ │ +357 return GaussQuadratureRule1D::highest_order; │ │ │ │ │ +358 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 : │ │ │ │ │ +359 return Jacobi1QuadratureRule1D::highest_order; │ │ │ │ │ +360 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 : │ │ │ │ │ +361 return Jacobi2QuadratureRule1D::highest_order; │ │ │ │ │ +362 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 : │ │ │ │ │ +363 return GaussLobattoQuadratureRule1D::highest_order; │ │ │ │ │ +364 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 : │ │ │ │ │ +365 return JacobiNQuadratureRule1D::maxOrder(); │ │ │ │ │ +366 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 : │ │ │ │ │ +367 return GaussRadauLeftQuadratureRule1D::highest_order; │ │ │ │ │ +368 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 : │ │ │ │ │ +369 return GaussRadauRightQuadratureRule1D::highest_order; │ │ │ │ │ +370 default : │ │ │ │ │ +371 DUNE_THROW(Exception, "Unknown QuadratureType"); │ │ │ │ │ +372 } │ │ │ │ │ +373 } │ │ │ │ │ +374 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ +375 } │ │ │ │ │ +376 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) │ │ │ │ │ +377 { │ │ │ │ │ +378 if (t.isLine()) │ │ │ │ │ +379 { │ │ │ │ │ +380 switch (qt) { │ │ │ │ │ +381 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 : │ │ │ │ │ +382 return GaussQuadratureRule1D(p); │ │ │ │ │ +383 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 : │ │ │ │ │ +384 return Jacobi1QuadratureRule1D(p); │ │ │ │ │ +385 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 : │ │ │ │ │ +386 return Jacobi2QuadratureRule1D(p); │ │ │ │ │ +387 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 : │ │ │ │ │ +388 return GaussLobattoQuadratureRule1D(p); │ │ │ │ │ +389 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 : │ │ │ │ │ +390 return JacobiNQuadratureRule1D(p); │ │ │ │ │ +391 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 : │ │ │ │ │ +392 return GaussRadauLeftQuadratureRule1D(p); │ │ │ │ │ +393 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 : │ │ │ │ │ +394 return GaussRadauRightQuadratureRule1D(p); │ │ │ │ │ +395 default : │ │ │ │ │ +396 DUNE_THROW(Exception, "Unknown QuadratureType"); │ │ │ │ │ +397 } │ │ │ │ │ +398 } │ │ │ │ │ +399 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ +400 } │ │ │ │ │ +401 }; │ │ │ │ │ +402 │ │ │ │ │ +403 template │ │ │ │ │ +_4_0_4 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ +405 private: │ │ │ │ │ +_4_0_6 constexpr static int dim = 2; │ │ │ │ │ +407 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ +408 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) │ │ │ │ │ +409 { │ │ │ │ │ +410 unsigned order = │ │ │ │ │ +411 TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ │ +412 if (t._i_s_S_i_m_p_l_e_x()) │ │ │ │ │ +413 order = std::max │ │ │ │ │ +414 (order, unsigned(SimplexQuadratureRule::highest_order)); │ │ │ │ │ +415 return order; │ │ │ │ │ +416 } │ │ │ │ │ +417 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) │ │ │ │ │ +418 { │ │ │ │ │ +419 if (t._i_s_S_i_m_p_l_e_x() │ │ │ │ │ +420 && ( 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 ) │ │ │ │ │ +421 && p <= SimplexQuadratureRule::highest_order) │ │ │ │ │ +422 { │ │ │ │ │ +423 return SimplexQuadratureRule(p); │ │ │ │ │ +424 } │ │ │ │ │ +425 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ │ +426 } │ │ │ │ │ +427 }; │ │ │ │ │ +428 │ │ │ │ │ +429 template │ │ │ │ │ +_4_3_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ +431 private: │ │ │ │ │ +_4_3_2 constexpr static int dim = 3; │ │ │ │ │ +433 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ +434 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) │ │ │ │ │ +435 { │ │ │ │ │ +436 unsigned order = │ │ │ │ │ +437 TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ │ +438 if (t._i_s_S_i_m_p_l_e_x()) │ │ │ │ │ +439 order = std::max │ │ │ │ │ +440 (order, unsigned(SimplexQuadratureRule::highest_order)); │ │ │ │ │ +441 if (t._i_s_P_r_i_s_m()) │ │ │ │ │ +442 order = std::max │ │ │ │ │ +443 (order, unsigned(PrismQuadratureRule::highest_order)); │ │ │ │ │ +444 return order; │ │ │ │ │ +445 } │ │ │ │ │ +446 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) │ │ │ │ │ +447 { │ │ │ │ │ +448 │ │ │ │ │ +449 if (t._i_s_S_i_m_p_l_e_x() │ │ │ │ │ +450 && ( 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 ) │ │ │ │ │ +451 && p <= SimplexQuadratureRule::highest_order) │ │ │ │ │ +452 { │ │ │ │ │ +453 return SimplexQuadratureRule(p); │ │ │ │ │ +454 } │ │ │ │ │ +455 if (t._i_s_P_r_i_s_m() │ │ │ │ │ +456 && 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 │ │ │ │ │ +457 && p <= PrismQuadratureRule::highest_order) │ │ │ │ │ +458 { │ │ │ │ │ +459 return PrismQuadratureRule(p); │ │ │ │ │ +460 } │ │ │ │ │ +461 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ │ +462 } │ │ │ │ │ +463 }; │ │ │ │ │ 464 │ │ │ │ │ -496 template │ │ │ │ │ -_4_9_7 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = unspecified-type; │ │ │ │ │ -498 │ │ │ │ │ -499#endif // DOXYGEN │ │ │ │ │ -500 │ │ │ │ │ -501 │ │ │ │ │ -502 │ │ │ │ │ -503} // namespace Dune │ │ │ │ │ -504 │ │ │ │ │ -505#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ │ -_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 │ │ │ │ │ +465#ifndef DUNE_NO_EXTERN_QUADRATURERULES │ │ │ │ │ +466 extern template class GaussLobattoQuadratureRule; │ │ │ │ │ +467 extern template class GaussQuadratureRule; │ │ │ │ │ +468 extern template class GaussRadauLeftQuadratureRule; │ │ │ │ │ +469 extern template class GaussRadauRightQuadratureRule; │ │ │ │ │ +470 extern template class Jacobi1QuadratureRule; │ │ │ │ │ +471 extern template class Jacobi2QuadratureRule; │ │ │ │ │ +472 extern template class JacobiNQuadratureRule; │ │ │ │ │ +473 extern template class PrismQuadratureRule; │ │ │ │ │ +474 extern template class SimplexQuadratureRule; │ │ │ │ │ +_4_7_5 extern template class SimplexQuadratureRule; │ │ │ │ │ +476#endif // !DUNE_NO_EXTERN_QUADRATURERULES │ │ │ │ │ +477 │ │ │ │ │ +478} // end namespace │ │ │ │ │ +479 │ │ │ │ │ +480#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. │ │ │ │ │ _t_y_p_e_._h_h │ │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ │ -_d_i_m_e_n_s_i_o_n_._h_h │ │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h │ │ │ │ │ -_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_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ -unspecified-type ReferenceElement │ │ │ │ │ -Returns the type of reference element for the argument type T. │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:497 │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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:170 │ │ │ │ │ -_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:215 │ │ │ │ │ -_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_t_e_r_a_t_o_r │ │ │ │ │ -Iterator iterator │ │ │ │ │ -Iterator over available reference elements. │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.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_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:188 │ │ │ │ │ -_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:210 │ │ │ │ │ -_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:220 │ │ │ │ │ -_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 │ │ │ │ │ -ctype_ ctype │ │ │ │ │ -The coordinate field type of the contained reference elements. │ │ │ │ │ -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_:_:_g_e_n_e_r_a_l │ │ │ │ │ -static const ReferenceElement & general(const GeometryType &type) │ │ │ │ │ -get general reference elements │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:198 │ │ │ │ │ -_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:204 │ │ │ │ │ -_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_t_e_r_a_t_o_r │ │ │ │ │ -typename Container::const_iterator Iterator │ │ │ │ │ -Iterator over available reference elements. │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +_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:82 │ │ │ │ │ +_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:119 │ │ │ │ │ +_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:106 │ │ │ │ │ +_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:144 │ │ │ │ │ +_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:99 │ │ │ │ │ +_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:145 │ │ │ │ │ +_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:127 │ │ │ │ │ +_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:135 │ │ │ │ │ +_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:92 │ │ │ │ │ +_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:36 │ │ │ │ │ +_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:44 │ │ │ │ │ +_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:62 │ │ │ │ │ +_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:53 │ │ │ │ │ +_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:50 │ │ │ │ │ +_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:68 │ │ │ │ │ +_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:75 │ │ │ │ │ +_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 │ │ │ │ │ -The dimension of the contained reference elements. │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:179 │ │ │ │ │ -_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_o_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ │ -ctype CoordinateField │ │ │ │ │ -The coordinate field type of the contained reference elements. │ │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:176 │ │ │ │ │ -_D_u_n_e_:_:_D_i_m │ │ │ │ │ -Static tag representing a dimension. │ │ │ │ │ -DDeeffiinniittiioonn dimension.hh:16 │ │ │ │ │ +Dimension of the integration domain. │ │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:47 │ │ │ │ │ +_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:56 │ │ │ │ │ +_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:74 │ │ │ │ │ +_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:154 │ │ │ │ │ +_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:181 │ │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_d │ │ │ │ │ +static constexpr int d │ │ │ │ │ +The space dimension. │ │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:171 │ │ │ │ │ +_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:180 │ │ │ │ │ +_D_u_n_e_:_:_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 │ │ │ │ │ +int delivered_order │ │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:189 │ │ │ │ │ +_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:168 │ │ │ │ │ +_D_u_n_e_:_:_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 │ │ │ │ │ +GeometryType geometry_type │ │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:188 │ │ │ │ │ +_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:174 │ │ │ │ │ +_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:161 │ │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_o_r_d_e_r │ │ │ │ │ +virtual int order() const │ │ │ │ │ +return order │ │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:177 │ │ │ │ │ +_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:165 │ │ │ │ │ +_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:185 │ │ │ │ │ +_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:310 │ │ │ │ │ +_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:200 │ │ │ │ │ +_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:259 │ │ │ │ │ +_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:272 │ │ │ │ │ +_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:266 │ │ │ │ │ _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:126 │ │ │ │ │ +_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:321 │ │ │ │ │ +_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:291 │ │ │ │ │ +_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:372 │ │ │ │ │ +_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:132 │ │ │ │ │ +_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:296 │ │ │ │ │ _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:377 │ │ │ │ │ +_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:331 │ │ │ │ │ +_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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: type.hh File Reference │ │ │ │ +dune-geometry: axisalignedcubegeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,56 +71,43 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
type.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
axisalignedcubegeometry.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

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

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

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cstdint>
│ │ │ │ -#include <string>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/keywords.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/common/unused.hh>
│ │ │ │ -#include <dune/geometry/deprecated_topology.hh>
│ │ │ │ +
#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>
│ │ │ │
│ │ │ │

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...
class  Dune::AxisAlignedCubeGeometry< CoordType, dim, coorddim >
 A geometry implementation for axis-aligned hypercubes. 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.
 
│ │ │ │

Detailed Description

│ │ │ │ -

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

│ │ │ │ +

A geometry implementation for axis-aligned hypercubes.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,38 +1,27 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -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 │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_e_p_r_e_c_a_t_e_d___t_o_p_o_l_o_g_y_._h_h> │ │ │ │ │ +_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> │ │ │ │ │ _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_._._. │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ -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. │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ │ +A geometry implementation for axis-aligned hypercubes. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: type.hh Source File │ │ │ │ +dune-geometry: axisalignedcubegeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,496 +74,356 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
type.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 (C) DUNE 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_HH
│ │ │ │ -
6#define DUNE_GEOMETRY_TYPE_HH
│ │ │ │ -
7
│ │ │ │ -
12#include <cassert>
│ │ │ │ -
13#include <cstdint>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ │ +
7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ │ +
8
│ │ │ │ +
13#include <bitset>
│ │ │ │
14
│ │ │ │ -
15#include <string>
│ │ │ │ -
16#include <type_traits>
│ │ │ │ -
17
│ │ │ │ -
18#include <dune/common/exceptions.hh>
│ │ │ │ -
19#include <dune/common/keywords.hh>
│ │ │ │ -
20#include <dune/common/typetraits.hh>
│ │ │ │ -
21#include <dune/common/unused.hh>
│ │ │ │ +
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{
│ │ │ │ -
25
│ │ │ │ -
26 namespace Impl
│ │ │ │ -
27 {
│ │ │ │ -
28
│ │ │ │ -
29 enum TopologyConstruction { pyramidConstruction = 0, prismConstruction = 1 };
│ │ │ │ -
30
│ │ │ │ -
31 // Dynamic Topology Properties
│ │ │ │ -
32 // ---------------------------
│ │ │ │ -
33
│ │ │ │ -
42 inline static unsigned int numTopologies ( int dim ) noexcept
│ │ │ │ -
43 {
│ │ │ │ -
44 return (1u << dim);
│ │ │ │ -
45 }
│ │ │ │ -
46
│ │ │ │ -
58 inline bool static isPyramid ( unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ │ -
59 {
│ │ │ │ -
60 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ -
61 assert( (0 <= codim) && (codim < dim) );
│ │ │ │ -
62 return (((topologyId & ~1) & (1u << (dim-codim-1))) == 0);
│ │ │ │ -
63 }
│ │ │ │ -
64
│ │ │ │ -
76 inline static bool isPrism ( unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ │ -
77 {
│ │ │ │ -
78 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ -
79 assert( (0 <= codim) && (codim < dim) );
│ │ │ │ -
80 return (( (topologyId | 1) & (1u << (dim-codim-1))) != 0);
│ │ │ │ -
81 }
│ │ │ │ +
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
│ │ │ │ -
90 inline static unsigned int baseTopologyId ( unsigned int topologyId, int dim, int codim = 1 ) noexcept
│ │ │ │ -
91 {
│ │ │ │ -
92 assert( (dim >= 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ -
93 assert( (0 <= codim) && (codim <= dim) );
│ │ │ │ -
94 return topologyId & ((1u << (dim-codim)) - 1);
│ │ │ │ -
95 }
│ │ │ │ -
96
│ │ │ │ -
97 } // namespace Impl
│ │ │ │ -
98
│ │ │ │ -
99// the Topology classes are deprecated and will be removed for the 2.8.
│ │ │ │ -
100// Temporarily a header 'deprecated_topology.hh' is provided which will be removed after the 2.9 release.
│ │ │ │ -
101#if __GNUC__ >= 7
│ │ │ │ -
102# pragma GCC diagnostic push
│ │ │ │ -
103# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ │ -
104#endif
│ │ │ │ - │ │ │ │ -
106#if __GNUC__ >= 7
│ │ │ │ -
107# pragma GCC diagnostic pop
│ │ │ │ -
108#endif
│ │ │ │ -
109
│ │ │ │ -
110 // GeometryType
│ │ │ │ -
111 // -------------
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
126 {
│ │ │ │ -
127 public:
│ │ │ │ -
128
│ │ │ │ -
│ │ │ │ -
131 enum
│ │ │ │ -
132 BasicType {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
138 none
│ │ │ │ -
139 };
│ │ │ │ -
│ │ │ │ -
140
│ │ │ │ -
141 private:
│ │ │ │ -
142
│ │ │ │ -
144 unsigned char dim_;
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
115 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ │ +
116 const Dune::FieldVector<ctype,coorddim> upper)
│ │ │ │ +
117 : lower_(lower),
│ │ │ │ +
118 upper_(upper),
│ │ │ │ +
119 axes_()
│ │ │ │ +
120 {
│ │ │ │ +
121 static_assert(dim==coorddim, "Use this constructor only if dim==coorddim!");
│ │ │ │ +
122 // all 'true', but is never actually used
│ │ │ │ +
123 axes_ = (1<<coorddim)-1;
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
│ │ │ │ +
133 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ │ +
134 const Dune::FieldVector<ctype,coorddim> upper,
│ │ │ │ +
135 const std::bitset<coorddim>& axes)
│ │ │ │ +
136 : lower_(lower),
│ │ │ │ +
137 upper_(upper),
│ │ │ │ +
138 axes_(axes)
│ │ │ │ +
139 {
│ │ │ │ +
140 assert(axes.count()==dim);
│ │ │ │ +
141 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
142 if (not axes_[i])
│ │ │ │ +
143 upper_[i] = lower_[i];
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │
145
│ │ │ │ -
147 bool none_;
│ │ │ │ -
148
│ │ │ │ -
150 unsigned int topologyId_;
│ │ │ │ -
151
│ │ │ │ -
152 // Internal type used for the Id. The exact nature of this type is kept
│ │ │ │ -
153 // as an implementation detail on purpose. We use a scoped enum here because scoped enums
│ │ │ │ -
154 // can be used as template parameters, but are not implicitly converted to other integral
│ │ │ │ -
155 // types by the compiler. That way, we avoid unfortunate implicit conversion chains, e.g.
│ │ │ │ -
156 // people trying to work with GlobalGeometryTypeIndex, but forgetting to actually call
│ │ │ │ -
157 // GlobalGeometryTypeIndex::index(gt) and just using gt directly.
│ │ │ │ -
158 enum class IdType : std::uint64_t
│ │ │ │ -
159 {};
│ │ │ │ -
160
│ │ │ │ -
161 public:
│ │ │ │ -
162
│ │ │ │ -
193 using Id = IdType;
│ │ │ │ +
│ │ │ │ +
150 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower)
│ │ │ │ +
151 : lower_(lower)
│ │ │ │ +
152 {}
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
156 {
│ │ │ │ +
157 return GeometryTypes::cube(dim);
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
162 {
│ │ │ │ +
163 GlobalCoordinate result;
│ │ │ │ +
164 if (dim == coorddim) { // fast case
│ │ │ │ +
165 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
166 result[i] = lower_[i] + local[i]*(upper_[i] - lower_[i]);
│ │ │ │ +
167 } else if (dim == 0) { // a vertex -- the other fast case
│ │ │ │ +
168 result = lower_; // hope for named-return-type-optimization
│ │ │ │ +
169 } else { // slow case
│ │ │ │ +
170 size_t lc=0;
│ │ │ │ +
171 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
172 result[i] = (axes_[i])
│ │ │ │ +
173 ? lower_[i] + local[lc++]*(upper_[i] - lower_[i])
│ │ │ │ +
174 : lower_[i];
│ │ │ │ +
175 }
│ │ │ │ +
176 return result;
│ │ │ │ +
177 }
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
181 {
│ │ │ │ +
182 LocalCoordinate result;
│ │ │ │ +
183 if (dim == coorddim) { // fast case
│ │ │ │ +
184 for (size_t i=0; i<dim; i++)
│ │ │ │ +
185 result[i] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ │ +
186 } else if (dim != 0) { // slow case
│ │ │ │ +
187 size_t lc=0;
│ │ │ │ +
188 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
189 if (axes_[i])
│ │ │ │ +
190 result[lc++] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ │ +
191 }
│ │ │ │ +
192 return result;
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │
194
│ │ │ │ -
│ │ │ │ -
202 constexpr operator Id() const
│ │ │ │ -
203 {
│ │ │ │ -
204 // recreate the exact storage layout that this class is using, making conversion
│ │ │ │ -
205 // extremely cheap
│ │ │ │ -
206 std::uint64_t id = dim_ | (std::uint64_t(none_) << 8) | (std::uint64_t(topologyId_) << 32);
│ │ │ │ -
207 return static_cast<Id>(id);
│ │ │ │ -
208 }
│ │ │ │ -
│ │ │ │ -
209
│ │ │ │ -
│ │ │ │ -
222 constexpr Id toId() const
│ │ │ │ -
223 {
│ │ │ │ -
224 return static_cast<Id>(*this);
│ │ │ │ -
225 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
197 {
│ │ │ │ +
198 JacobianTransposed result;
│ │ │ │ +
199
│ │ │ │ +
200 // Actually compute the result. Uses different methods depending
│ │ │ │ +
201 // on what kind of matrix JacobianTransposed is.
│ │ │ │ +
202 jacobianTransposed(result);
│ │ │ │ +
203
│ │ │ │ +
204 return result;
│ │ │ │ +
205 }
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
209 {
│ │ │ │ + │ │ │ │ +
211
│ │ │ │ +
212 // Actually compute the result. Uses different methods depending
│ │ │ │ +
213 // on what kind of matrix JacobianTransposed is.
│ │ │ │ + │ │ │ │ +
215
│ │ │ │ +
216 return result;
│ │ │ │ +
217 }
│ │ │ │ +
│ │ │ │ +
218
│ │ │ │ +
│ │ │ │ +
220 Jacobian jacobian([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ │ +
221 {
│ │ │ │ +
222 return jacobianTransposed(local).transposed();
│ │ │ │ +
223 }
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
227 {
│ │ │ │ +
228 return jacobianInverseTransposed(local).transposed();
│ │ │ │ +
229 }
│ │ │ │
│ │ │ │ -
226
│ │ │ │ +
230
│ │ │ │
│ │ │ │ -
234 constexpr GeometryType(Id id)
│ │ │ │ -
235 : dim_(static_cast<std::uint64_t>(id) & 0xFF)
│ │ │ │ -
236 , none_(static_cast<std::uint64_t>(id) & 0x100)
│ │ │ │ -
237 , topologyId_(static_cast<std::uint64_t>(id) >> 32)
│ │ │ │ -
238 {}
│ │ │ │ -
│ │ │ │ -
239
│ │ │ │ -
242
│ │ │ │ -
│ │ │ │ -
244 constexpr GeometryType ()
│ │ │ │ -
245 : dim_(0), none_(true), topologyId_(0)
│ │ │ │ -
246 {}
│ │ │ │ +
234 Volume integrationElement([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ │ +
235 {
│ │ │ │ +
236 return volume();
│ │ │ │ +
237 }
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
241 {
│ │ │ │ +
242 GlobalCoordinate result;
│ │ │ │ +
243 if (dim==0)
│ │ │ │ +
244 result = lower_;
│ │ │ │ +
245 else {
│ │ │ │ +
246 // Since lower_==upper_ for unused coordinates, this always does the right thing
│ │ │ │ +
247 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
248 result[i] = CoordType(0.5) * (lower_[i] + upper_[i]);
│ │ │ │ +
249 }
│ │ │ │ +
250 return result;
│ │ │ │ +
251 }
│ │ │ │
│ │ │ │ -
247
│ │ │ │ +
252
│ │ │ │
│ │ │ │ -
254 constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool isNone)
│ │ │ │ -
255 : dim_(dim), none_(isNone), topologyId_(topologyId)
│ │ │ │ -
256 {}
│ │ │ │ -
│ │ │ │ -
257
│ │ │ │ -
│ │ │ │ -
263 constexpr GeometryType(unsigned int topologyId, unsigned int dim)
│ │ │ │ -
264 : dim_(dim), none_(false), topologyId_(topologyId)
│ │ │ │ -
265 {}
│ │ │ │ -
│ │ │ │ -
266
│ │ │ │ -
277 template<class TopologyType,
│ │ │ │ -
278 class = std::void_t<decltype(TopologyType::dimension), decltype(TopologyType::id)>>
│ │ │ │ -
│ │ │ │ -
279 explicit GeometryType(TopologyType t)
│ │ │ │ -
280 : dim_(TopologyType::dimension), none_(false), topologyId_(TopologyType::id)
│ │ │ │ -
281 {
│ │ │ │ -
282 DUNE_UNUSED_PARAMETER(t);
│ │ │ │ +
254 int corners() const
│ │ │ │ +
255 {
│ │ │ │ +
256 return 1<<dim;
│ │ │ │ +
257 }
│ │ │ │ +
│ │ │ │ +
258
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
261 {
│ │ │ │ +
262 GlobalCoordinate result;
│ │ │ │ +
263 if (dim == coorddim) { // fast case
│ │ │ │ +
264 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
265 result[i] = (k & (1<<i)) ? upper_[i] : lower_[i];
│ │ │ │ +
266 } else if (dim == 0) { // vertex
│ │ │ │ +
267 result = lower_; // rely on named return-type optimization
│ │ │ │ +
268 } else { // slow case
│ │ │ │ +
269 unsigned int mask = 1;
│ │ │ │ +
270
│ │ │ │ +
271 for (size_t i=0; i<coorddim; i++) {
│ │ │ │ +
272 if (not axes_[i])
│ │ │ │ +
273 result[i] = lower_[i];
│ │ │ │ +
274 else {
│ │ │ │ +
275 result[i] = (k & mask) ? upper_[i] : lower_[i];
│ │ │ │ +
276 mask = (mask<<1);
│ │ │ │ +
277 }
│ │ │ │ +
278 }
│ │ │ │ +
279 }
│ │ │ │ +
280
│ │ │ │ +
281
│ │ │ │ +
282 return result;
│ │ │ │
283 }
│ │ │ │
│ │ │ │
284
│ │ │ │ -
│ │ │ │ -
291 constexpr bool isVertex() const {
│ │ │ │ -
292 return dim_==0;
│ │ │ │ -
293 }
│ │ │ │ -
│ │ │ │ -
294
│ │ │ │ -
│ │ │ │ -
296 constexpr bool isLine() const {
│ │ │ │ -
297 return dim_==1;
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
│ │ │ │ -
301 constexpr bool isTriangle() const {
│ │ │ │ -
302 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0001;
│ │ │ │ -
303 }
│ │ │ │ -
│ │ │ │ -
304
│ │ │ │ -
│ │ │ │ -
306 constexpr bool isQuadrilateral() const {
│ │ │ │ -
307 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0011;
│ │ │ │ -
308 }
│ │ │ │ -
│ │ │ │ -
309
│ │ │ │ -
│ │ │ │ -
311 constexpr bool isTetrahedron() const {
│ │ │ │ -
312 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0001;
│ │ │ │ -
313 }
│ │ │ │ -
│ │ │ │ -
314
│ │ │ │ -
│ │ │ │ -
316 constexpr bool isPyramid() const {
│ │ │ │ -
317 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0011;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
287 {
│ │ │ │ +
288 ctype vol = 1;
│ │ │ │ +
289 if (dim == coorddim) { // fast case
│ │ │ │ +
290 for (size_t i=0; i<dim; i++)
│ │ │ │ +
291 vol *= upper_[i] - lower_[i];
│ │ │ │ +
292 // do nothing if dim == 0
│ │ │ │ +
293 } else if (dim != 0) { // slow case
│ │ │ │ +
294 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
295 if (axes_[i])
│ │ │ │ +
296 vol *= upper_[i] - lower_[i];
│ │ │ │ +
297 }
│ │ │ │ +
298 return vol;
│ │ │ │ +
299 }
│ │ │ │ +
│ │ │ │ +
300
│ │ │ │ +
│ │ │ │ +
302 bool affine() const
│ │ │ │ +
303 {
│ │ │ │ +
304 return true;
│ │ │ │ +
305 }
│ │ │ │ +
│ │ │ │ +
306
│ │ │ │ +
│ │ │ │ +
307 friend Dune::Transitional::ReferenceElement< ctype, Dim<dim> > referenceElement ( const AxisAlignedCubeGeometry & /* geometry */ )
│ │ │ │ +
308 {
│ │ │ │ + │ │ │ │ +
310 }
│ │ │ │ +
│ │ │ │ +
311
│ │ │ │ +
312 private:
│ │ │ │ +
313 // jacobianTransposed: fast case --> diagonal matrix
│ │ │ │ +
314 void jacobianTransposed ( DiagonalMatrix<ctype,dim> &jacobianTransposed ) const
│ │ │ │ +
315 {
│ │ │ │ +
316 for (size_t i=0; i<dim; i++)
│ │ │ │ +
317 jacobianTransposed.diagonal()[i] = upper_[i] - lower_[i];
│ │ │ │
318 }
│ │ │ │ -
│ │ │ │
319
│ │ │ │ -
│ │ │ │ -
321 constexpr bool isPrism() const {
│ │ │ │ -
322 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0101;
│ │ │ │ -
323 }
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ -
│ │ │ │ -
326 constexpr bool isHexahedron() const {
│ │ │ │ -
327 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0111;
│ │ │ │ -
328 }
│ │ │ │ -
│ │ │ │ -
329
│ │ │ │ -
│ │ │ │ -
331 constexpr bool isSimplex() const {
│ │ │ │ -
332 return ! none_ && (topologyId_ | 1) == 1;
│ │ │ │ -
333 }
│ │ │ │ -
│ │ │ │ -
334
│ │ │ │ -
│ │ │ │ -
336 constexpr bool isCube() const {
│ │ │ │ -
337 return ! none_ && ((topologyId_ ^ ((1 << dim_)-1)) >> 1 == 0);
│ │ │ │ -
338 }
│ │ │ │ -
│ │ │ │ -
339
│ │ │ │ -
│ │ │ │ -
341 constexpr bool isConical() const {
│ │ │ │ -
342 return ! none_ && (((topologyId_ & ~1) & (1u << (dim_-1))) == 0);
│ │ │ │ -
343 }
│ │ │ │ -
│ │ │ │ +
320 // jacobianTransposed: slow case --> dense matrix
│ │ │ │ +
321 void jacobianTransposed ( FieldMatrix<ctype,dim,coorddim> &jacobianTransposed ) const
│ │ │ │ +
322 {
│ │ │ │ +
323 if (dim==0)
│ │ │ │ +
324 return;
│ │ │ │ +
325
│ │ │ │ +
326 size_t lc = 0;
│ │ │ │ +
327 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
328 if (axes_[i])
│ │ │ │ +
329 jacobianTransposed[lc++][i] = upper_[i] - lower_[i];
│ │ │ │ +
330 }
│ │ │ │ +
331
│ │ │ │ +
332 // jacobianInverseTransposed: fast case --> diagonal matrix
│ │ │ │ +
333 void jacobianInverseTransposed ( DiagonalMatrix<ctype,dim> &jacobianInverseTransposed ) const
│ │ │ │ +
334 {
│ │ │ │ +
335 for (size_t i=0; i<dim; i++)
│ │ │ │ +
336 jacobianInverseTransposed.diagonal()[i] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ │ +
337 }
│ │ │ │ +
338
│ │ │ │ +
339 // jacobianInverseTransposed: slow case --> dense matrix
│ │ │ │ +
340 void jacobianInverseTransposed ( FieldMatrix<ctype,coorddim,dim> &jacobianInverseTransposed ) const
│ │ │ │ +
341 {
│ │ │ │ +
342 if (dim==0)
│ │ │ │ +
343 return;
│ │ │ │
344
│ │ │ │ -
│ │ │ │ -
349 constexpr bool isConical(const int& step) const {
│ │ │ │ -
350 return ! none_ && (((topologyId_ & ~1) & (1u << step)) == 0);
│ │ │ │ -
351 }
│ │ │ │ -
│ │ │ │ +
345 size_t lc = 0;
│ │ │ │ +
346 for (size_t i=0; i<coorddim; i++)
│ │ │ │ +
347 if (axes_[i])
│ │ │ │ +
348 jacobianInverseTransposed[i][lc++] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ │ +
349 }
│ │ │ │ +
350
│ │ │ │ +
351 Dune::FieldVector<ctype,coorddim> lower_;
│ │ │ │
352
│ │ │ │ -
│ │ │ │ -
354 constexpr bool isPrismatic() const {
│ │ │ │ -
355 return ! none_ && (( (topologyId_ | 1) & (1u << (dim_-1))) != 0);
│ │ │ │ -
356 }
│ │ │ │ +
353 Dune::FieldVector<ctype,coorddim> upper_;
│ │ │ │ +
354
│ │ │ │ +
355 std::bitset<coorddim> axes_;
│ │ │ │ +
356 };
│ │ │ │
│ │ │ │
357
│ │ │ │ -
│ │ │ │ -
362 constexpr bool isPrismatic(const int& step) const {
│ │ │ │ -
363 return ! none_ && (( (topologyId_ | 1) & (1u << step)) != 0);
│ │ │ │ -
364 }
│ │ │ │ -
│ │ │ │ -
365
│ │ │ │ -
│ │ │ │ -
367 constexpr bool isNone() const {
│ │ │ │ -
368 return none_;
│ │ │ │ -
369 }
│ │ │ │ -
│ │ │ │ -
370
│ │ │ │ -
│ │ │ │ -
372 constexpr unsigned int dim() const {
│ │ │ │ -
373 return dim_;
│ │ │ │ -
374 }
│ │ │ │ -
│ │ │ │ -
375
│ │ │ │ -
│ │ │ │ -
377 constexpr unsigned int id() const {
│ │ │ │ -
378 return topologyId_;
│ │ │ │ -
379 }
│ │ │ │ -
│ │ │ │ -
380
│ │ │ │ -
│ │ │ │ -
388 constexpr bool operator==(const GeometryType& other) const {
│ │ │ │ -
389 return ( ( none_ == other.none_ )
│ │ │ │ -
390 && ( ( none_ == true )
│ │ │ │ -
391 || ( ( dim_ == other.dim_ )
│ │ │ │ -
392 && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) )
│ │ │ │ -
393 )
│ │ │ │ -
394 )
│ │ │ │ -
395 );
│ │ │ │ -
396 }
│ │ │ │ -
│ │ │ │ -
397
│ │ │ │ -
│ │ │ │ -
399 constexpr bool operator!=(const GeometryType& other) const {
│ │ │ │ -
400 return ! ((*this)==other);
│ │ │ │ -
401 }
│ │ │ │ -
│ │ │ │ -
402
│ │ │ │ -
│ │ │ │ -
404 constexpr bool operator < (const GeometryType& other) const {
│ │ │ │ -
405 return ( ( none_ < other.none_ )
│ │ │ │ -
406 || ( !( other.none_ < none_ )
│ │ │ │ -
407 && ( ( dim_ < other.dim_ )
│ │ │ │ -
408 || ( (other.dim_ == dim_)
│ │ │ │ -
409 && ((topologyId_ >> 1) < (other.topologyId_ >> 1) )
│ │ │ │ -
410 )
│ │ │ │ -
411 )
│ │ │ │ -
412 )
│ │ │ │ -
413 );
│ │ │ │ -
414 }
│ │ │ │ -
│ │ │ │ -
415
│ │ │ │ -
418 };
│ │ │ │ -
│ │ │ │ -
419
│ │ │ │ -
│ │ │ │ -
421 inline std::ostream& operator<< (std::ostream& s, const GeometryType& a)
│ │ │ │ -
422 {
│ │ │ │ -
423 if (a.isSimplex())
│ │ │ │ -
424 {
│ │ │ │ -
425 s << "(simplex, " << a.dim() << ")";
│ │ │ │ -
426 return s;
│ │ │ │ -
427 }
│ │ │ │ -
428 if (a.isCube())
│ │ │ │ -
429 {
│ │ │ │ -
430 s << "(cube, " << a.dim() << ")";
│ │ │ │ -
431 return s;
│ │ │ │ -
432 }
│ │ │ │ -
433 if (a.isPyramid())
│ │ │ │ -
434 {
│ │ │ │ -
435 s << "(pyramid, 3)";
│ │ │ │ -
436 return s;
│ │ │ │ -
437 }
│ │ │ │ -
438 if (a.isPrism())
│ │ │ │ -
439 {
│ │ │ │ -
440 s << "(prism, 3)";
│ │ │ │ -
441 return s;
│ │ │ │ -
442 }
│ │ │ │ -
443 if (a.isNone())
│ │ │ │ -
444 {
│ │ │ │ -
445 s << "(none, " << a.dim() << ")";
│ │ │ │ -
446 return s;
│ │ │ │ -
447 }
│ │ │ │ -
448 s << "(other [" << a.id() << "], " << a.dim() << ")";
│ │ │ │ -
449 return s;
│ │ │ │ -
450 }
│ │ │ │ -
│ │ │ │ -
451
│ │ │ │ -
452
│ │ │ │ -
454
│ │ │ │ -
│ │ │ │ -
458 namespace GeometryTypes {
│ │ │ │ -
459
│ │ │ │ -
461
│ │ │ │ -
464 inline constexpr GeometryType simplex(unsigned int dim)
│ │ │ │ -
465 {
│ │ │ │ -
466 return GeometryType(0,dim,false);
│ │ │ │ -
467 }
│ │ │ │ -
468
│ │ │ │ -
470
│ │ │ │ -
473 inline constexpr GeometryType cube(unsigned int dim)
│ │ │ │ -
474 {
│ │ │ │ -
475 return GeometryType(((dim>1) ? ((1 << dim) - 1) : 0),dim,false);
│ │ │ │ -
476 }
│ │ │ │ -
477
│ │ │ │ -
479
│ │ │ │ -
482 inline constexpr GeometryType none(unsigned int dim)
│ │ │ │ -
483 {
│ │ │ │ -
484 return GeometryType(0,dim,true);
│ │ │ │ -
485 }
│ │ │ │ -
486
│ │ │ │ -
488 inline constexpr GeometryType conicalExtension(const GeometryType& gt)
│ │ │ │ -
489 {
│ │ │ │ -
490 return GeometryType(gt.id(), gt.dim()+1, gt.isNone());
│ │ │ │ -
491 }
│ │ │ │ -
492
│ │ │ │ -
494 inline constexpr GeometryType prismaticExtension(const GeometryType& gt)
│ │ │ │ -
495 {
│ │ │ │ -
496 return GeometryType(gt.id() | ((1 << gt.dim())), gt.dim()+1, gt.isNone());
│ │ │ │ -
497 }
│ │ │ │ -
498
│ │ │ │ -
499#ifndef __cpp_inline_variables
│ │ │ │ -
500 namespace {
│ │ │ │ -
501#endif
│ │ │ │ -
502
│ │ │ │ -
504
│ │ │ │ -
507 DUNE_INLINE_VARIABLE constexpr GeometryType vertex = GeometryType(0,0,false);
│ │ │ │ -
508
│ │ │ │ -
510
│ │ │ │ -
513 DUNE_INLINE_VARIABLE constexpr GeometryType line = GeometryType(0,1,false);
│ │ │ │ -
514
│ │ │ │ -
516
│ │ │ │ -
519 DUNE_INLINE_VARIABLE constexpr GeometryType triangle = simplex(2);
│ │ │ │ -
520
│ │ │ │ -
522
│ │ │ │ -
525 DUNE_INLINE_VARIABLE constexpr GeometryType quadrilateral = cube(2);
│ │ │ │ -
526
│ │ │ │ -
528
│ │ │ │ -
531 DUNE_INLINE_VARIABLE constexpr GeometryType tetrahedron = simplex(3);
│ │ │ │ -
532
│ │ │ │ -
534
│ │ │ │ -
537 DUNE_INLINE_VARIABLE constexpr GeometryType pyramid = GeometryType(0b0011,3,false);
│ │ │ │ -
538
│ │ │ │ -
540
│ │ │ │ -
543 DUNE_INLINE_VARIABLE constexpr GeometryType prism = GeometryType(0b0101,3,false);
│ │ │ │ -
544
│ │ │ │ -
546
│ │ │ │ -
549 DUNE_INLINE_VARIABLE constexpr GeometryType hexahedron = cube(3);
│ │ │ │ -
550
│ │ │ │ -
551#ifndef __cpp_inline_variables
│ │ │ │ -
552 }
│ │ │ │ -
553#endif
│ │ │ │ -
554
│ │ │ │ -
555 }
│ │ │ │ -
│ │ │ │ -
556
│ │ │ │ -
557 namespace Impl
│ │ │ │ -
558 {
│ │ │ │ -
559
│ │ │ │ -
561 inline constexpr GeometryType getBase(const GeometryType& gt) {
│ │ │ │ -
562 return GeometryType(gt.id() & ((1 << (gt.dim()-1))-1), gt.dim()-1, gt.isNone());
│ │ │ │ -
563 }
│ │ │ │ -
564
│ │ │ │ -
565
│ │ │ │ -
566 // IfGeometryType
│ │ │ │ -
567 // ----------
│ │ │ │ -
568
│ │ │ │ -
569 template< template< GeometryType::Id > class Operation, int dim, GeometryType::Id geometryId = GeometryTypes::vertex >
│ │ │ │ -
570 struct IfGeometryType
│ │ │ │ -
571 {
│ │ │ │ -
572 static constexpr GeometryType geometry = geometryId;
│ │ │ │ -
573 template< class... Args >
│ │ │ │ -
574 static auto apply ( GeometryType gt, Args &&... args )
│ │ │ │ -
575 {
│ │ │ │ -
576 GeometryType lowerGeometry(gt.id() >>1 , gt.dim()-1, gt.isNone());
│ │ │ │ -
577
│ │ │ │ -
578 if( gt.id() & 1 )
│ │ │ │ -
579 return IfGeometryType< Operation, dim-1, GeometryTypes::prismaticExtension(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... );
│ │ │ │ -
580 else
│ │ │ │ -
581 return IfGeometryType< Operation, dim-1, GeometryTypes::conicalExtension(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... );
│ │ │ │ -
582 }
│ │ │ │ -
583 };
│ │ │ │ -
584
│ │ │ │ -
585 template< template< GeometryType::Id > class Operation, GeometryType::Id geometryId >
│ │ │ │ -
586 struct IfGeometryType< Operation, 0, geometryId>
│ │ │ │ -
587 {
│ │ │ │ -
588 template< class... Args >
│ │ │ │ -
589 static auto apply ([[maybe_unused]] GeometryType gt, Args &&... args )
│ │ │ │ -
590 {
│ │ │ │ -
591 return Operation< geometryId >::apply( std::forward< Args >( args )... );
│ │ │ │ -
592 }
│ │ │ │ -
593 };
│ │ │ │ -
594 } // namespace Impl
│ │ │ │ -
595} // namespace Dune
│ │ │ │ -
596
│ │ │ │ -
597#endif // DUNE_GEOMETRY_TYPE_HH
│ │ │ │ - │ │ │ │ +
358} // namespace Dune
│ │ │ │ +
359#endif
│ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
std::ostream & operator<<(std::ostream &s, const GeometryType &a)
Prints the type to an output stream.
Definition type.hh:421
│ │ │ │ +
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:210
│ │ │ │ +
A geometry implementation for axis-aligned hypercubes.
Definition axisalignedcubegeometry.hh:50
│ │ │ │ +
Volume volume() const
Return the element volume.
Definition axisalignedcubegeometry.hh:286
│ │ │ │ +
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:133
│ │ │ │ +
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:115
│ │ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Inverse Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:226
│ │ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Inverse Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:208
│ │ │ │ +
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:150
│ │ │ │ +
static constexpr int mydimension
Dimension of the cube element.
Definition axisalignedcubegeometry.hh:56
│ │ │ │ +
static constexpr int coorddimension
Dimension of the world space that the cube element is embedded in.
Definition axisalignedcubegeometry.hh:59
│ │ │ │ +
GlobalCoordinate corner(int k) const
Return world coordinates of the k-th corner of the element.
Definition axisalignedcubegeometry.hh:260
│ │ │ │ +
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
│ │ │ │ +
friend Dune::Transitional::ReferenceElement< ctype, Dim< dim > > referenceElement(const AxisAlignedCubeGeometry &)
Definition axisalignedcubegeometry.hh:307
│ │ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:196
│ │ │ │ +
FieldVector< ctype, coorddim > GlobalCoordinate
Type used for a vector of world coordinates.
Definition axisalignedcubegeometry.hh:68
│ │ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Map a point in global (world) coordinates to element coordinates.
Definition axisalignedcubegeometry.hh:180
│ │ │ │ +
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:155
│ │ │ │ +
int corners() const
Return the number of corners of the element.
Definition axisalignedcubegeometry.hh:254
│ │ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:220
│ │ │ │ +
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:234
│ │ │ │ +
GlobalCoordinate center() const
Return center of mass of the element.
Definition axisalignedcubegeometry.hh:240
│ │ │ │ +
bool affine() const
Return if the element is affine. Here: yes.
Definition axisalignedcubegeometry.hh:302
│ │ │ │ +
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:161
│ │ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ -
constexpr GeometryType(unsigned int topologyId, unsigned int dim)
Constructor, using the topologyId (integer) and the dimension.
Definition type.hh:263
│ │ │ │ -
constexpr bool operator<(const GeometryType &other) const
less-than operation for use with maps
Definition type.hh:404
│ │ │ │ -
constexpr bool operator!=(const GeometryType &other) const
Check for inequality.
Definition type.hh:399
│ │ │ │ -
constexpr bool isPyramid() const
Return true if entity is a pyramid.
Definition type.hh:316
│ │ │ │ -
constexpr bool isTetrahedron() const
Return true if entity is a tetrahedron.
Definition type.hh:311
│ │ │ │ -
constexpr bool isPrism() const
Return true if entity is a prism.
Definition type.hh:321
│ │ │ │ -
constexpr bool isVertex() const
Return true if entity is a vertex.
Definition type.hh:291
│ │ │ │ -
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:388
│ │ │ │ -
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:222
│ │ │ │ -
constexpr bool isConical(const int &step) const
Return true if entity was constructed with a conical product in the chosen step.
Definition type.hh:349
│ │ │ │ -
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ -
constexpr bool isPrismatic(const int &step) const
Return true if entity was constructed with a prismatic product in the chosen step.
Definition type.hh:362
│ │ │ │ -
constexpr bool isTriangle() const
Return true if entity is a triangle.
Definition type.hh:301
│ │ │ │ -
GeometryType(TopologyType t)
Constructor from static TopologyType class.
Definition type.hh:279
│ │ │ │ -
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:254
│ │ │ │ -
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition type.hh:132
│ │ │ │ -
@ cube
Cube element in any nonnegative dimension.
Definition type.hh:134
│ │ │ │ -
@ simplex
Simplicial element in any nonnegative dimension.
Definition type.hh:133
│ │ │ │ -
@ pyramid
Four sided pyramid in three dimensions.
Definition type.hh:135
│ │ │ │ -
@ extended
Other, more general topology, representable as topologyId.
Definition type.hh:137
│ │ │ │ -
@ none
Even more general topology, cannot be specified by a topologyId. Two GeometryTypes with 'none' type a...
Definition type.hh:138
│ │ │ │ -
@ prism
Prism element in three dimensions.
Definition type.hh:136
│ │ │ │ -
constexpr GeometryType(Id id)
Reconstruct a Geometry type from a GeometryType::Id.
Definition type.hh:234
│ │ │ │ -
constexpr bool isCube() const
Return true if entity is a cube of any dimension.
Definition type.hh:336
│ │ │ │ -
constexpr GeometryType()
Default constructor, not initializing anything.
Definition type.hh:244
│ │ │ │ -
constexpr bool isConical() const
Return true if entity was constructed with a conical product in the last step.
Definition type.hh:341
│ │ │ │ -
constexpr bool isLine() const
Return true if entity is a line segment.
Definition type.hh:296
│ │ │ │ -
constexpr bool isQuadrilateral() const
Return true if entity is a quadrilateral.
Definition type.hh:306
│ │ │ │ -
constexpr bool isPrismatic() const
Return true if entity was constructed with a prismatic product in the last step.
Definition type.hh:354
│ │ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ -
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:367
│ │ │ │ -
constexpr bool isHexahedron() const
Return true if entity is a hexahedron.
Definition type.hh:326
│ │ │ │ -
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition type.hh:331
│ │ │ │ -
IdType Id
An integral id representing a GeometryType.
Definition type.hh:193
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,564 +1,429 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -type.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 (C) DUNE 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_HH │ │ │ │ │ -6#define DUNE_GEOMETRY_TYPE_HH │ │ │ │ │ -7 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ │ +7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ │ +8 │ │ │ │ │ +13#include │ │ │ │ │ 14 │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include │ │ │ │ │ -19#include │ │ │ │ │ -20#include │ │ │ │ │ -21#include │ │ │ │ │ +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{ │ │ │ │ │ -25 │ │ │ │ │ -26 namespace Impl │ │ │ │ │ -27 { │ │ │ │ │ -28 │ │ │ │ │ -29 enum TopologyConstruction { pyramidConstruction = 0, prismConstruction = 1 │ │ │ │ │ -}; │ │ │ │ │ -30 │ │ │ │ │ -31 // Dynamic Topology Properties │ │ │ │ │ -32 // --------------------------- │ │ │ │ │ -33 │ │ │ │ │ -42 inline static unsigned int numTopologies ( int dim ) noexcept │ │ │ │ │ -43 { │ │ │ │ │ -44 return (1u << dim); │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -58 inline bool static isPyramid ( unsigned int topologyId, int dim, int codim = │ │ │ │ │ -0 ) noexcept │ │ │ │ │ -59 { │ │ │ │ │ -60 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ -61 assert( (0 <= codim) && (codim < dim) ); │ │ │ │ │ -62 return (((topologyId & ~1) & (1u << (dim-codim-1))) == 0); │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -76 inline static bool isPrism ( unsigned int topologyId, int dim, int codim = 0 │ │ │ │ │ -) noexcept │ │ │ │ │ -77 { │ │ │ │ │ -78 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ -79 assert( (0 <= codim) && (codim < dim) ); │ │ │ │ │ -80 return (( (topologyId | 1) & (1u << (dim-codim-1))) != 0); │ │ │ │ │ -81 } │ │ │ │ │ +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 │ │ │ │ │ -90 inline static unsigned int baseTopologyId ( unsigned int topologyId, int │ │ │ │ │ -dim, int codim = 1 ) noexcept │ │ │ │ │ -91 { │ │ │ │ │ -92 assert( (dim >= 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ -93 assert( (0 <= codim) && (codim <= dim) ); │ │ │ │ │ -94 return topologyId & ((1u << (dim-codim)) - 1); │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97 } // namespace Impl │ │ │ │ │ -98 │ │ │ │ │ -99// the Topology classes are deprecated and will be removed for the 2.8. │ │ │ │ │ -100// Temporarily a header 'deprecated_topology.hh' is provided which will be │ │ │ │ │ -removed after the 2.9 release. │ │ │ │ │ -101#if __GNUC__ >= 7 │ │ │ │ │ -102# pragma GCC diagnostic push │ │ │ │ │ -103# pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ │ -104#endif │ │ │ │ │ -105#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_e_p_r_e_c_a_t_e_d___t_o_p_o_l_o_g_y_._h_h> │ │ │ │ │ -106#if __GNUC__ >= 7 │ │ │ │ │ -107# pragma GCC diagnostic pop │ │ │ │ │ -108#endif │ │ │ │ │ -109 │ │ │ │ │ -110 // GeometryType │ │ │ │ │ -111 // ------------- │ │ │ │ │ -112 │ │ │ │ │ -_1_2_5 class _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -126 { │ │ │ │ │ -127 public: │ │ │ │ │ -128 │ │ │ │ │ -_1_3_1 enum │ │ │ │ │ -132 _B_a_s_i_c_T_y_p_e { │ │ │ │ │ -_1_3_3 _s_i_m_p_l_e_x, │ │ │ │ │ -_1_3_4 _c_u_b_e, │ │ │ │ │ -_1_3_5 _p_y_r_a_m_i_d, │ │ │ │ │ -_1_3_6 _p_r_i_s_m, │ │ │ │ │ -_1_3_7 _e_x_t_e_n_d_e_d, │ │ │ │ │ -138 _n_o_n_e │ │ │ │ │ -_1_3_9 }; │ │ │ │ │ -140 │ │ │ │ │ -141 private: │ │ │ │ │ -142 │ │ │ │ │ -144 unsigned char dim_; │ │ │ │ │ +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_5 _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, │ │ │ │ │ +116 const Dune::FieldVector upper) │ │ │ │ │ +117 : lower_(lower), │ │ │ │ │ +118 upper_(upper), │ │ │ │ │ +119 axes_() │ │ │ │ │ +120 { │ │ │ │ │ +121 static_assert(dim==coorddim, "Use this constructor only if │ │ │ │ │ +dim==coorddim!"); │ │ │ │ │ +122 // all 'true', but is never actually used │ │ │ │ │ +123 axes_ = (1< lower, │ │ │ │ │ +134 const Dune::FieldVector upper, │ │ │ │ │ +135 const std::bitset& axes) │ │ │ │ │ +136 : lower_(lower), │ │ │ │ │ +137 upper_(upper), │ │ │ │ │ +138 axes_(axes) │ │ │ │ │ +139 { │ │ │ │ │ +140 assert(axes.count()==dim); │ │ │ │ │ +141 for (size_t i=0; i lower) │ │ │ │ │ +151 : lower_(lower) │ │ │ │ │ +152 {} │ │ │ │ │ +153 │ │ │ │ │ +_1_5_5 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e() const │ │ │ │ │ +156 { │ │ │ │ │ +157 return GeometryTypes::cube(dim); │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 _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 │ │ │ │ │ +162 { │ │ │ │ │ +163 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ │ +164 if (dim == coorddim) { // fast case │ │ │ │ │ +165 for (size_t i=0; i(_i_d); │ │ │ │ │ -208 } │ │ │ │ │ -209 │ │ │ │ │ -_2_2_2 constexpr Id _t_o_I_d() const │ │ │ │ │ -223 { │ │ │ │ │ -224 return static_cast(*this); │ │ │ │ │ -225 } │ │ │ │ │ -226 │ │ │ │ │ -_2_3_4 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(Id id) │ │ │ │ │ -235 : dim_(static_cast(_i_d) & 0xFF) │ │ │ │ │ -236 , none_(static_cast(_i_d) & 0x100) │ │ │ │ │ -237 , topologyId_(static_cast(_i_d) >> 32) │ │ │ │ │ -238 {} │ │ │ │ │ -239 │ │ │ │ │ -242 │ │ │ │ │ -_2_4_4 constexpr _G_e_o_m_e_t_r_y_T_y_p_e () │ │ │ │ │ -245 : dim_(0), none_(true), topologyId_(0) │ │ │ │ │ -246 {} │ │ │ │ │ -247 │ │ │ │ │ -_2_5_4 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) │ │ │ │ │ -255 : dim_(_d_i_m), none_(_i_s_N_o_n_e), topologyId_(topologyId) │ │ │ │ │ -256 {} │ │ │ │ │ -257 │ │ │ │ │ -_2_6_3 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(unsigned int topologyId, unsigned int _d_i_m) │ │ │ │ │ -264 : dim_(_d_i_m), none_(false), topologyId_(topologyId) │ │ │ │ │ -265 {} │ │ │ │ │ -266 │ │ │ │ │ -277 template> │ │ │ │ │ -_2_7_9 explicit _G_e_o_m_e_t_r_y_T_y_p_e(TopologyType t) │ │ │ │ │ -280 : dim_(TopologyType::dimension), none_(false), topologyId_(TopologyType:: │ │ │ │ │ -_i_d) │ │ │ │ │ -281 { │ │ │ │ │ -282 DUNE_UNUSED_PARAMETER(t); │ │ │ │ │ +_1_9_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([[maybe_unused]] const │ │ │ │ │ +_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ │ +197 { │ │ │ │ │ +198 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d result; │ │ │ │ │ +199 │ │ │ │ │ +200 // Actually compute the result. Uses different methods depending │ │ │ │ │ +201 // on what kind of matrix JacobianTransposed is. │ │ │ │ │ +202 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(result); │ │ │ │ │ +203 │ │ │ │ │ +204 return result; │ │ │ │ │ +205 } │ │ │ │ │ +206 │ │ │ │ │ +_2_0_8 _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 │ │ │ │ │ +209 { │ │ │ │ │ +210 _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; │ │ │ │ │ +211 │ │ │ │ │ +212 // Actually compute the result. Uses different methods depending │ │ │ │ │ +213 // on what kind of matrix JacobianTransposed is. │ │ │ │ │ +214 _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); │ │ │ │ │ +215 │ │ │ │ │ +216 return result; │ │ │ │ │ +217 } │ │ │ │ │ +218 │ │ │ │ │ +_2_2_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 │ │ │ │ │ +221 { │ │ │ │ │ +222 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(); │ │ │ │ │ +223 } │ │ │ │ │ +224 │ │ │ │ │ +_2_2_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([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& │ │ │ │ │ +_l_o_c_a_l) const │ │ │ │ │ +227 { │ │ │ │ │ +228 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(); │ │ │ │ │ +229 } │ │ │ │ │ +230 │ │ │ │ │ +_2_3_4 _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 │ │ │ │ │ +235 { │ │ │ │ │ +236 return _v_o_l_u_m_e(); │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +_2_4_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r() const │ │ │ │ │ +241 { │ │ │ │ │ +242 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ │ +243 if (dim==0) │ │ │ │ │ +244 result = lower_; │ │ │ │ │ +245 else { │ │ │ │ │ +246 // Since lower_==upper_ for unused coordinates, this always does the right │ │ │ │ │ +thing │ │ │ │ │ +247 for (size_t i=0; i > │ │ │ │ │ +_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 */ ) │ │ │ │ │ +308 { │ │ │ │ │ +309 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(); │ │ │ │ │ +310 } │ │ │ │ │ +311 │ │ │ │ │ +312 private: │ │ │ │ │ +313 // jacobianTransposed: fast case --> diagonal matrix │ │ │ │ │ +314 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 │ │ │ │ │ +315 { │ │ │ │ │ +316 for (size_t i=0; i> 1 == 0); │ │ │ │ │ -338 } │ │ │ │ │ -339 │ │ │ │ │ -_3_4_1 constexpr bool _i_s_C_o_n_i_c_a_l() const { │ │ │ │ │ -342 return ! none_ && (((topologyId_ & ~1) & (1u << (dim_-1))) == 0); │ │ │ │ │ -343 } │ │ │ │ │ +320 // jacobianTransposed: slow case --> dense matrix │ │ │ │ │ +321 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 │ │ │ │ │ +322 { │ │ │ │ │ +323 if (dim==0) │ │ │ │ │ +324 return; │ │ │ │ │ +325 │ │ │ │ │ +326 size_t lc = 0; │ │ │ │ │ +327 for (size_t i=0; i diagonal matrix │ │ │ │ │ +333 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 │ │ │ │ │ +334 { │ │ │ │ │ +335 for (size_t i=0; i dense matrix │ │ │ │ │ +340 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 │ │ │ │ │ +341 { │ │ │ │ │ +342 if (dim==0) │ │ │ │ │ +343 return; │ │ │ │ │ 344 │ │ │ │ │ -_3_4_9 constexpr bool _i_s_C_o_n_i_c_a_l(const int& step) const { │ │ │ │ │ -350 return ! none_ && (((topologyId_ & ~1) & (1u << step)) == 0); │ │ │ │ │ -351 } │ │ │ │ │ +345 size_t lc = 0; │ │ │ │ │ +346 for (size_t i=0; i lower_; │ │ │ │ │ 352 │ │ │ │ │ -_3_5_4 constexpr bool _i_s_P_r_i_s_m_a_t_i_c() const { │ │ │ │ │ -355 return ! none_ && (( (topologyId_ | 1) & (1u << (dim_-1))) != 0); │ │ │ │ │ -356 } │ │ │ │ │ +353 Dune::FieldVector upper_; │ │ │ │ │ +354 │ │ │ │ │ +355 std::bitset axes_; │ │ │ │ │ +356 }; │ │ │ │ │ 357 │ │ │ │ │ -_3_6_2 constexpr bool _i_s_P_r_i_s_m_a_t_i_c(const int& step) const { │ │ │ │ │ -363 return ! none_ && (( (topologyId_ | 1) & (1u << step)) != 0); │ │ │ │ │ -364 } │ │ │ │ │ -365 │ │ │ │ │ -_3_6_7 constexpr bool _i_s_N_o_n_e() const { │ │ │ │ │ -368 return none_; │ │ │ │ │ -369 } │ │ │ │ │ -370 │ │ │ │ │ -_3_7_2 constexpr unsigned int _d_i_m() const { │ │ │ │ │ -373 return dim_; │ │ │ │ │ -374 } │ │ │ │ │ -375 │ │ │ │ │ -_3_7_7 constexpr unsigned int _i_d() const { │ │ │ │ │ -378 return topologyId_; │ │ │ │ │ -379 } │ │ │ │ │ -380 │ │ │ │ │ -_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 ( ( none_ == other.none_ ) │ │ │ │ │ -390 && ( ( none_ == true ) │ │ │ │ │ -391 || ( ( dim_ == other.dim_ ) │ │ │ │ │ -392 && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) ) │ │ │ │ │ -393 ) │ │ │ │ │ -394 ) │ │ │ │ │ -395 ); │ │ │ │ │ -396 } │ │ │ │ │ -397 │ │ │ │ │ -_3_9_9 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 { │ │ │ │ │ -400 return ! ((*this)==other); │ │ │ │ │ -401 } │ │ │ │ │ -402 │ │ │ │ │ -_4_0_4 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 { │ │ │ │ │ -405 return ( ( none_ < other.none_ ) │ │ │ │ │ -406 || ( !( other.none_ < none_ ) │ │ │ │ │ -407 && ( ( dim_ < other.dim_ ) │ │ │ │ │ -408 || ( (other.dim_ == dim_) │ │ │ │ │ -409 && ((topologyId_ >> 1) < (other.topologyId_ >> 1) ) │ │ │ │ │ -410 ) │ │ │ │ │ -411 ) │ │ │ │ │ -412 ) │ │ │ │ │ -413 ); │ │ │ │ │ -414 } │ │ │ │ │ -415 │ │ │ │ │ -418 }; │ │ │ │ │ -419 │ │ │ │ │ -_4_2_1 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) │ │ │ │ │ -422 { │ │ │ │ │ -423 if (a._i_s_S_i_m_p_l_e_x()) │ │ │ │ │ -424 { │ │ │ │ │ -425 s << "(simplex, " << a._d_i_m() << ")"; │ │ │ │ │ -426 return s; │ │ │ │ │ -427 } │ │ │ │ │ -428 if (a._i_s_C_u_b_e()) │ │ │ │ │ -429 { │ │ │ │ │ -430 s << "(cube, " << a._d_i_m() << ")"; │ │ │ │ │ -431 return s; │ │ │ │ │ -432 } │ │ │ │ │ -433 if (a._i_s_P_y_r_a_m_i_d()) │ │ │ │ │ -434 { │ │ │ │ │ -435 s << "(pyramid, 3)"; │ │ │ │ │ -436 return s; │ │ │ │ │ -437 } │ │ │ │ │ -438 if (a._i_s_P_r_i_s_m()) │ │ │ │ │ -439 { │ │ │ │ │ -440 s << "(prism, 3)"; │ │ │ │ │ -441 return s; │ │ │ │ │ -442 } │ │ │ │ │ -443 if (a._i_s_N_o_n_e()) │ │ │ │ │ -444 { │ │ │ │ │ -445 s << "(none, " << a._d_i_m() << ")"; │ │ │ │ │ -446 return s; │ │ │ │ │ -447 } │ │ │ │ │ -448 s << "(other [" << a._i_d() << "], " << a._d_i_m() << ")"; │ │ │ │ │ -449 return s; │ │ │ │ │ -450 } │ │ │ │ │ -451 │ │ │ │ │ -452 │ │ │ │ │ -454 │ │ │ │ │ -_4_5_8 namespace GeometryTypes { │ │ │ │ │ -459 │ │ │ │ │ -461 │ │ │ │ │ -464 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e simplex(unsigned int dim) │ │ │ │ │ -465 { │ │ │ │ │ -466 return _G_e_o_m_e_t_r_y_T_y_p_e(0,dim,false); │ │ │ │ │ -467 } │ │ │ │ │ -468 │ │ │ │ │ -470 │ │ │ │ │ -473 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e cube(unsigned int dim) │ │ │ │ │ -474 { │ │ │ │ │ -475 return _G_e_o_m_e_t_r_y_T_y_p_e(((dim>1) ? ((1 << dim) - 1) : 0),dim,false); │ │ │ │ │ -476 } │ │ │ │ │ -477 │ │ │ │ │ -479 │ │ │ │ │ -482 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e none(unsigned int dim) │ │ │ │ │ -483 { │ │ │ │ │ -484 return _G_e_o_m_e_t_r_y_T_y_p_e(0,dim,true); │ │ │ │ │ -485 } │ │ │ │ │ -486 │ │ │ │ │ -488 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e conicalExtension(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) │ │ │ │ │ -489 { │ │ │ │ │ -490 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()); │ │ │ │ │ -491 } │ │ │ │ │ -492 │ │ │ │ │ -494 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e prismaticExtension(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) │ │ │ │ │ -495 { │ │ │ │ │ -496 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()); │ │ │ │ │ -497 } │ │ │ │ │ -498 │ │ │ │ │ -499#ifndef __cpp_inline_variables │ │ │ │ │ -500 namespace { │ │ │ │ │ -501#endif │ │ │ │ │ -502 │ │ │ │ │ -504 │ │ │ │ │ -507 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e vertex = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -(0,0,false); │ │ │ │ │ -508 │ │ │ │ │ -510 │ │ │ │ │ -513 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e line = _G_e_o_m_e_t_r_y_T_y_p_e(0,1,false); │ │ │ │ │ -514 │ │ │ │ │ -516 │ │ │ │ │ -519 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e triangle = simplex(2); │ │ │ │ │ -520 │ │ │ │ │ -522 │ │ │ │ │ -525 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e quadrilateral = cube(2); │ │ │ │ │ -526 │ │ │ │ │ -528 │ │ │ │ │ -531 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e tetrahedron = simplex(3); │ │ │ │ │ -532 │ │ │ │ │ -534 │ │ │ │ │ -537 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e pyramid = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -(0b0011,3,false); │ │ │ │ │ -538 │ │ │ │ │ -540 │ │ │ │ │ -543 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e prism = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -(0b0101,3,false); │ │ │ │ │ -544 │ │ │ │ │ -546 │ │ │ │ │ -549 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e hexahedron = cube(3); │ │ │ │ │ -550 │ │ │ │ │ -551#ifndef __cpp_inline_variables │ │ │ │ │ -552 } │ │ │ │ │ -553#endif │ │ │ │ │ -554 │ │ │ │ │ -555 } │ │ │ │ │ -556 │ │ │ │ │ -557 namespace Impl │ │ │ │ │ -558 { │ │ │ │ │ -559 │ │ │ │ │ -561 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) { │ │ │ │ │ -562 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()); │ │ │ │ │ -563 } │ │ │ │ │ -564 │ │ │ │ │ -565 │ │ │ │ │ -566 // IfGeometryType │ │ │ │ │ -567 // ---------- │ │ │ │ │ -568 │ │ │ │ │ -569 template< template< GeometryType::Id > class Operation, int dim, │ │ │ │ │ -_G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d geometryId = GeometryTypes::vertex > │ │ │ │ │ -570 struct IfGeometryType │ │ │ │ │ -571 { │ │ │ │ │ -572 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ -573 template< class... Args > │ │ │ │ │ -574 static auto apply ( GeometryType gt, Args &&... args ) │ │ │ │ │ -575 { │ │ │ │ │ -576 GeometryType lowerGeometry(gt.id() >>1 , gt.dim()-1, gt.isNone()); │ │ │ │ │ -577 │ │ │ │ │ -578 if( gt.id() & 1 ) │ │ │ │ │ -579 return IfGeometryType< Operation, dim-1, GeometryTypes::prismaticExtension │ │ │ │ │ -(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... ); │ │ │ │ │ -580 else │ │ │ │ │ -581 return IfGeometryType< Operation, dim-1, GeometryTypes::conicalExtension │ │ │ │ │ -(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... ); │ │ │ │ │ -582 } │ │ │ │ │ -583 }; │ │ │ │ │ -584 │ │ │ │ │ -585 template< template< GeometryType::Id > class Operation, _G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d │ │ │ │ │ -geometryId > │ │ │ │ │ -586 struct IfGeometryType< Operation, 0, geometryId> │ │ │ │ │ -587 { │ │ │ │ │ -588 template< class... Args > │ │ │ │ │ -589 static auto apply ([[maybe_unused]] GeometryType gt, Args &&... args ) │ │ │ │ │ -590 { │ │ │ │ │ -591 return Operation< geometryId >::apply( std::forward< Args >( args )... ); │ │ │ │ │ -592 } │ │ │ │ │ -593 }; │ │ │ │ │ -594 } // namespace Impl │ │ │ │ │ -595} // namespace Dune │ │ │ │ │ -596 │ │ │ │ │ -597#endif // DUNE_GEOMETRY_TYPE_HH │ │ │ │ │ -_d_e_p_r_e_c_a_t_e_d___t_o_p_o_l_o_g_y_._h_h │ │ │ │ │ +358} // namespace Dune │ │ │ │ │ +359#endif │ │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ +_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:21 │ │ │ │ │ -_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:421 │ │ │ │ │ +_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:210 │ │ │ │ │ +_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 geometry implementation for axis-aligned hypercubes. │ │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:50 │ │ │ │ │ +_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:286 │ │ │ │ │ +_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:133 │ │ │ │ │ +_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:115 │ │ │ │ │ +_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:226 │ │ │ │ │ +_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:208 │ │ │ │ │ +_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:150 │ │ │ │ │ +_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_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int mydimension │ │ │ │ │ +Dimension of the cube element. │ │ │ │ │ +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_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int coorddimension │ │ │ │ │ +Dimension of the world space that the cube element is embedded in. │ │ │ │ │ +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:260 │ │ │ │ │ +_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_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ +friend Dune::Transitional::ReferenceElement< ctype, Dim< dim > > │ │ │ │ │ +referenceElement(const AxisAlignedCubeGeometry &) │ │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:307 │ │ │ │ │ +_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:196 │ │ │ │ │ +_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_:_:_l_o_c_a_l │ │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ +Map a point in global (world) coordinates to element coordinates. │ │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:180 │ │ │ │ │ +_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:155 │ │ │ │ │ +_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:254 │ │ │ │ │ +_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:220 │ │ │ │ │ +_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:234 │ │ │ │ │ +_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:240 │ │ │ │ │ +_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:302 │ │ │ │ │ +_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:161 │ │ │ │ │ _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:126 │ │ │ │ │ -_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:263 │ │ │ │ │ -_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:404 │ │ │ │ │ -_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:399 │ │ │ │ │ -_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:316 │ │ │ │ │ -_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:311 │ │ │ │ │ -_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:321 │ │ │ │ │ -_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:291 │ │ │ │ │ -_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:388 │ │ │ │ │ -_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:222 │ │ │ │ │ -_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:349 │ │ │ │ │ -_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:372 │ │ │ │ │ -_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:362 │ │ │ │ │ -_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:301 │ │ │ │ │ -_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:279 │ │ │ │ │ -_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:254 │ │ │ │ │ -_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:132 │ │ │ │ │ -_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:134 │ │ │ │ │ -_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:133 │ │ │ │ │ -_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:135 │ │ │ │ │ -_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:137 │ │ │ │ │ -_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:138 │ │ │ │ │ -_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:136 │ │ │ │ │ -_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:234 │ │ │ │ │ -_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:336 │ │ │ │ │ -_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:244 │ │ │ │ │ -_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:341 │ │ │ │ │ -_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:296 │ │ │ │ │ -_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:306 │ │ │ │ │ -_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:354 │ │ │ │ │ -_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:377 │ │ │ │ │ -_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:367 │ │ │ │ │ -_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:326 │ │ │ │ │ -_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:331 │ │ │ │ │ -_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:193 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: deprecated_topology.hh File Reference │ │ │ │ +dune-geometry: referenceelementimplementation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,19 +69,46 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
deprecated_topology.hh File Reference
│ │ │ │ +
│ │ │ │ +Namespaces
│ │ │ │ +
referenceelementimplementation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ +
#include <cassert>
│ │ │ │ +#include <algorithm>
│ │ │ │ +#include <limits>
│ │ │ │ +#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/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,10 +1,33 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -deprecated_topology.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 <_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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: deprecated_topology.hh Source File │ │ │ │ +dune-geometry: referenceelementimplementation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,176 +74,721 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
deprecated_topology.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 (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DEPRECATED_TOPOLOGY_HH
│ │ │ │ -
6#define DUNE_DEPRECATED_TOPOLOGY_HH
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ │
7
│ │ │ │ -
8 namespace Impl
│ │ │ │ -
9 {
│ │ │ │ -
10
│ │ │ │ -
11 // Basic Topology Types
│ │ │ │ -
12 // --------------------
│ │ │ │ -
13
│ │ │ │ -
14 // PointDeprecationHelper can be used to prevent a deprecation warning for Point
│ │ │ │ -
15 struct PointDeprecationHelper
│ │ │ │ -
16 {
│ │ │ │ -
17 static const unsigned int dimension = 0;
│ │ │ │ -
18 static const unsigned int numCorners = 1;
│ │ │ │ -
19
│ │ │ │ -
20 static const unsigned int id = 0;
│ │ │ │ -
21
│ │ │ │ -
22 static std::string name () { return "p"; }
│ │ │ │ -
23 };
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
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
│ │ │ │ -
25 using Point [[deprecated("Use GeometryTypes::vertex instead.")]] = PointDeprecationHelper;
│ │ │ │ -
26
│ │ │ │ -
27
│ │ │ │ -
28 template< class BaseTopology >
│ │ │ │ -
29 struct [[deprecated("Use GeometryTypes::prismaticExtension(GeometryType gt) instead.")]] Prism
│ │ │ │ -
30 {
│ │ │ │ -
31 static const unsigned int dimension = BaseTopology::dimension + 1;
│ │ │ │ -
32 static const unsigned int numCorners = 2 * BaseTopology::numCorners;
│ │ │ │ -
33
│ │ │ │ -
34 static const unsigned int id = BaseTopology::id | ((unsigned int)prismConstruction << (dimension-1));
│ │ │ │ -
35
│ │ │ │ -
36 static std::string name () { return BaseTopology::name() + "l"; }
│ │ │ │ -
37 };
│ │ │ │ -
38
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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 template< class BaseTopology >
│ │ │ │ -
41 struct [[deprecated("Use GeometryTypes::conicalExtension(GeometryType gt) instead.")]] Pyramid
│ │ │ │ -
42 {
│ │ │ │ -
43 static const unsigned int dimension = BaseTopology::dimension + 1;
│ │ │ │ -
44 static const unsigned int numCorners = BaseTopology::numCorners + 1;
│ │ │ │ +
40 namespace Impl
│ │ │ │ +
41 {
│ │ │ │ +
42 template< class ctype, int dim >
│ │ │ │ +
43 class ReferenceElementContainer;
│ │ │ │ +
44 }
│ │ │ │
45
│ │ │ │ -
46 static const unsigned int id = BaseTopology::id | ((unsigned int)pyramidConstruction << (dimension-1));
│ │ │ │ -
47
│ │ │ │ -
48 static std::string name () { return BaseTopology::name() + "o"; }
│ │ │ │ -
49 };
│ │ │ │ +
46 template< class ctype, int dim >
│ │ │ │ +
47 struct ReferenceElements;
│ │ │ │ +
48
│ │ │ │ +
49
│ │ │ │
50
│ │ │ │ -
51
│ │ │ │ -
52
│ │ │ │ -
53 // Properties of Topologies
│ │ │ │ -
54 // ------------------------
│ │ │ │ -
55
│ │ │ │ -
56 template< class Topology >
│ │ │ │ -
57 struct [[deprecated("Use GeometryType::isSimplex() instead.")]] IsSimplex
│ │ │ │ -
58 : public std::integral_constant< bool, (Topology::id >> 1) == 0 >
│ │ │ │ -
59 {};
│ │ │ │ +
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
│ │ │ │ -
61 template< class Topology >
│ │ │ │ -
62 struct [[deprecated("Use GeometryType::isCube() instead.")]] IsCube
│ │ │ │ -
63 : public std::integral_constant< bool, (Topology::id | 1) == (1 << Topology::dimension) - 1 >
│ │ │ │ -
64 {};
│ │ │ │ +
62 unsigned int size ( unsigned int topologyId, int dim, int codim );
│ │ │ │ +
63
│ │ │ │ +
64
│ │ │ │
65
│ │ │ │ -
78 [[deprecated("Use GeometryType::isPrismatic() or GeometryType::isConical() instead.")]]
│ │ │ │ -
79 inline static bool isTopology ( TopologyConstruction construction, unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ │ -
80 {
│ │ │ │ -
81 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ -
82 assert( (0 <= codim) && (codim <= dim) );
│ │ │ │ -
83 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == (unsigned int)construction);
│ │ │ │ -
84 }
│ │ │ │ +
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
│ │ │ │ -
87 // SimplexTopology
│ │ │ │ -
88 // ---------------
│ │ │ │ -
89
│ │ │ │ -
90 template< unsigned int dim >
│ │ │ │ -
91 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology
│ │ │ │ -
92 {
│ │ │ │ -
93 typedef Pyramid< typename SimplexTopology< dim-1 >::type > type;
│ │ │ │ -
94 };
│ │ │ │ +
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 template<>
│ │ │ │ -
97 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] SimplexTopology< 0 >
│ │ │ │ -
98 {
│ │ │ │ -
99 typedef Point type;
│ │ │ │ -
100 };
│ │ │ │ -
101
│ │ │ │ -
102
│ │ │ │ -
103
│ │ │ │ -
104 // CubeTopology
│ │ │ │ -
105 // ------------
│ │ │ │ -
106
│ │ │ │ -
107 template< unsigned int dim >
│ │ │ │ -
108 struct [[deprecated("Use GeometryTypes::cube(dim) instead.")]] CubeTopology
│ │ │ │ -
109 {
│ │ │ │ -
110 typedef Prism< typename CubeTopology< dim-1 >::type > type;
│ │ │ │ -
111 };
│ │ │ │ +
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<>
│ │ │ │ -
114 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] CubeTopology< 0 >
│ │ │ │ -
115 {
│ │ │ │ -
116 typedef Point type;
│ │ │ │ -
117 };
│ │ │ │ -
118
│ │ │ │ +
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
│ │ │ │ -
121 // PyramidTopology
│ │ │ │ -
122 // ---------------
│ │ │ │ -
123
│ │ │ │ -
124 template< unsigned int dim >
│ │ │ │ -
125 struct [[deprecated]] PyramidTopology
│ │ │ │ -
126 {
│ │ │ │ -
127 typedef Pyramid< typename CubeTopology< dim-1 >::type > type;
│ │ │ │ -
128 };
│ │ │ │ -
129
│ │ │ │ -
130
│ │ │ │ -
131
│ │ │ │ -
132 // PrismTopology
│ │ │ │ -
133 // -------------
│ │ │ │ -
134
│ │ │ │ -
135 template< unsigned int dim >
│ │ │ │ -
136 struct [[deprecated]] PrismTopology
│ │ │ │ -
137 {
│ │ │ │ -
138 typedef Prism< typename SimplexTopology< dim-1 >::type > type;
│ │ │ │ -
139 };
│ │ │ │ -
140
│ │ │ │ -
141
│ │ │ │ -
142
│ │ │ │ -
143
│ │ │ │ -
144 // IfTopology
│ │ │ │ -
145 // ----------
│ │ │ │ +
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 template< template< class > class Operation, int dim, class Topology = PointDeprecationHelper >
│ │ │ │ -
148 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology
│ │ │ │ -
149 {
│ │ │ │ -
150 template< class... Args >
│ │ │ │ -
151 static auto apply ( unsigned int topologyId, Args &&... args )
│ │ │ │ -
152 {
│ │ │ │ -
153 if( topologyId & 1 )
│ │ │ │ -
154 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
│ │ │ │ -
155 else
│ │ │ │ -
156 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
│ │ │ │ +
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 };
│ │ │ │ +
158
│ │ │ │
159
│ │ │ │ -
160 template< template< class > class Operation, class Topology >
│ │ │ │ -
161 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology< Operation, 0, Topology >
│ │ │ │ -
162 {
│ │ │ │ -
163 template< class... Args >
│ │ │ │ -
164 static auto apply ([[maybe_unused]] unsigned int topologyId, Args &&... args)
│ │ │ │ -
165 {
│ │ │ │ -
166 return Operation< Topology >::apply( std::forward< Args >( args )... );
│ │ │ │ -
167 }
│ │ │ │ -
168 };
│ │ │ │ -
169
│ │ │ │ -
170 } // namespace Impl
│ │ │ │ -
171#endif
│ │ │ │ +
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
│ │ │ │ +
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( codim > 0 )
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
271
│ │ │ │ +
272
│ │ │ │ +
273 // referenceIntegrationOuterNormals
│ │ │ │ +
274 // --------------------------------
│ │ │ │ +
275
│ │ │ │ +
276 template< class ct, int cdim >
│ │ │ │ +
277 inline unsigned int
│ │ │ │ +
278 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ │ +
279 const FieldVector< ct, cdim > *origins,
│ │ │ │ +
280 FieldVector< ct, cdim > *normals )
│ │ │ │ +
281 {
│ │ │ │ +
282 assert( (dim > 0) && (dim <= cdim) );
│ │ │ │ +
283 assert( topologyId < numTopologies( dim ) );
│ │ │ │ +
284
│ │ │ │ +
285 if( dim > 1 )
│ │ │ │ +
286 {
│ │ │ │ +
287 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ │ +
288 if( isPrism( topologyId, dim ) )
│ │ │ │ +
289 {
│ │ │ │ +
290 const unsigned int numBaseFaces
│ │ │ │ +
291 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals );
│ │ │ │ +
292
│ │ │ │ +
293 for( unsigned int i = 0; i < 2; ++i )
│ │ │ │ +
294 {
│ │ │ │ +
295 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ │ +
296 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 );
│ │ │ │ +
297 }
│ │ │ │ +
298
│ │ │ │ +
299 return numBaseFaces+2;
│ │ │ │ +
300 }
│ │ │ │ +
301 else
│ │ │ │ +
302 {
│ │ │ │ +
303 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ │ +
304 normals[ 0 ][ dim-1 ] = ct( -1 );
│ │ │ │ +
305
│ │ │ │ +
306 const unsigned int numBaseFaces
│ │ │ │ +
307 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 );
│ │ │ │ +
308 for( unsigned int i = 1; i <= numBaseFaces; ++i )
│ │ │ │ +
309 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ];
│ │ │ │ +
310
│ │ │ │ +
311 return numBaseFaces+1;
│ │ │ │ +
312 }
│ │ │ │ +
313 }
│ │ │ │ +
314 else
│ │ │ │ +
315 {
│ │ │ │ +
316 for( unsigned int i = 0; i < 2; ++i )
│ │ │ │ +
317 {
│ │ │ │ +
318 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ │ +
319 normals[ i ][ 0 ] = ct( 2*int( i )-1 );
│ │ │ │ +
320 }
│ │ │ │ +
321
│ │ │ │ +
322 return 2;
│ │ │ │ +
323 }
│ │ │ │ +
324 }
│ │ │ │ +
325
│ │ │ │ +
326 template< class ct, int cdim >
│ │ │ │ +
327 inline unsigned int
│ │ │ │ +
328 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ │ +
329 FieldVector< ct, cdim > *normals )
│ │ │ │ +
330 {
│ │ │ │ +
331 assert( (dim > 0) && (dim <= cdim) );
│ │ │ │ +
332
│ │ │ │ +
333 FieldVector< ct, cdim > *origins
│ │ │ │ +
334 = new FieldVector< ct, cdim >[ size( topologyId, dim, 1 ) ];
│ │ │ │ +
335 referenceOrigins( topologyId, dim, 1, origins );
│ │ │ │ +
336
│ │ │ │ +
337 const unsigned int numFaces
│ │ │ │ +
338 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals );
│ │ │ │ +
339 assert( numFaces == size( topologyId, dim, 1 ) );
│ │ │ │ +
340
│ │ │ │ +
341 delete[] origins;
│ │ │ │ +
342
│ │ │ │ +
343 return numFaces;
│ │ │ │ +
344 }
│ │ │ │ +
345
│ │ │ │ +
346 } // namespace Impl
│ │ │ │ +
347
│ │ │ │ +
348
│ │ │ │ +
349
│ │ │ │ +
350 // ReferenceElement
│ │ │ │ +
351 // ----------------
│ │ │ │ +
352
│ │ │ │ +
371 template< class ctype_, int dim >
│ │ │ │ +
372 class ReferenceElementImplementation
│ │ │ │ +
373 {
│ │ │ │ +
374
│ │ │ │ +
375 public:
│ │ │ │ +
376
│ │ │ │ +
378 using ctype = ctype_;
│ │ │ │ +
379
│ │ │ │ +
381 using CoordinateField = ctype;
│ │ │ │ +
382
│ │ │ │ +
384 using Coordinate = Dune::FieldVector<ctype,dim>;
│ │ │ │ +
385
│ │ │ │ +
387 static constexpr int dimension = dim;
│ │ │ │ +
388
│ │ │ │ +
390 typedef ctype Volume;
│ │ │ │ +
391
│ │ │ │ +
392 private:
│ │ │ │ +
393
│ │ │ │ +
394 friend class Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ │ +
395
│ │ │ │ +
396 struct SubEntityInfo;
│ │ │ │ +
397
│ │ │ │ +
398 template< int codim > struct CreateGeometries;
│ │ │ │ +
399
│ │ │ │ +
400 public:
│ │ │ │ +
402 template< int codim >
│ │ │ │ +
403 struct Codim
│ │ │ │ +
404 {
│ │ │ │ +
406 typedef AffineGeometry< ctype, dim-codim, dim > Geometry;
│ │ │ │ +
407 };
│ │ │ │ +
408
│ │ │ │ +
409 // ReferenceElement cannot be copied.
│ │ │ │ +
410 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = delete;
│ │ │ │ +
411
│ │ │ │ +
412 // ReferenceElementImplementation cannot be copied.
│ │ │ │ +
413 ReferenceElementImplementation& operator= ( const ReferenceElementImplementation& ) = delete;
│ │ │ │ +
414
│ │ │ │ +
415 // ReferenceElementImplementation is default-constructible (required for storage in std::array)
│ │ │ │ +
416 ReferenceElementImplementation () = default;
│ │ │ │ +
417
│ │ │ │ +
422 int size ( int c ) const
│ │ │ │ +
423 {
│ │ │ │ +
424 assert( (c >= 0) && (c <= dim) );
│ │ │ │ +
425 return info_[ c ].size();
│ │ │ │ +
426 }
│ │ │ │ +
427
│ │ │ │ +
439 int size ( int i, int c, int cc ) const
│ │ │ │ +
440 {
│ │ │ │ +
441 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ +
442 return info_[ c ][ i ].size( cc );
│ │ │ │ +
443 }
│ │ │ │ +
444
│ │ │ │ +
458 int subEntity ( int i, int c, int ii, int cc ) const
│ │ │ │ +
459 {
│ │ │ │ +
460 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ +
461 return info_[ c ][ i ].number( ii, cc );
│ │ │ │ +
462 }
│ │ │ │ +
463
│ │ │ │ +
479 auto subEntities ( int i, int c, int cc ) const
│ │ │ │ +
480 {
│ │ │ │ +
481 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ +
482 return info_[ c ][ i ].numbers( cc );
│ │ │ │ +
483 }
│ │ │ │ +
484
│ │ │ │ +
493 const GeometryType &type ( int i, int c ) const
│ │ │ │ +
494 {
│ │ │ │ +
495 assert( (i >= 0) && (i < size( c )) );
│ │ │ │ +
496 return info_[ c ][ i ].type();
│ │ │ │ +
497 }
│ │ │ │ +
498
│ │ │ │ +
500 const GeometryType &type () const { return type( 0, 0 ); }
│ │ │ │ +
501
│ │ │ │ +
511 const Coordinate &position( int i, int c ) const
│ │ │ │ +
512 {
│ │ │ │ +
513 assert( (c >= 0) && (c <= dim) );
│ │ │ │ +
514 return baryCenters_[ c ][ i ];
│ │ │ │ +
515 }
│ │ │ │ +
516
│ │ │ │ +
524 bool checkInside ( const Coordinate &local ) const
│ │ │ │ +
525 {
│ │ │ │ +
526 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon();
│ │ │ │ +
527 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, tolerance );
│ │ │ │ +
528 }
│ │ │ │ +
529
│ │ │ │ +
541 template< int codim >
│ │ │ │ +
542 typename Codim< codim >::Geometry geometry ( int i ) const
│ │ │ │ +
543 {
│ │ │ │ +
544 return std::get< codim >( geometries_ )[ i ];
│ │ │ │ +
545 }
│ │ │ │ +
546
│ │ │ │ +
548 Volume volume () const
│ │ │ │ +
549 {
│ │ │ │ +
550 return volume_;
│ │ │ │ +
551 }
│ │ │ │ +
552
│ │ │ │ +
560 const Coordinate &integrationOuterNormal ( int face ) const
│ │ │ │ +
561 {
│ │ │ │ +
562 assert( (face >= 0) && (face < int( integrationNormals_.size() )) );
│ │ │ │ +
563 return integrationNormals_[ face ];
│ │ │ │ +
564 }
│ │ │ │ +
565
│ │ │ │ +
566 private:
│ │ │ │ +
567 void initialize ( unsigned int topologyId )
│ │ │ │ +
568 {
│ │ │ │ +
569 assert( topologyId < Impl::numTopologies( dim ) );
│ │ │ │ +
570
│ │ │ │ +
571 // set up subentities
│ │ │ │ +
572 for( int codim = 0; codim <= dim; ++codim )
│ │ │ │ +
573 {
│ │ │ │ +
574 const unsigned int size = Impl::size( topologyId, dim, codim );
│ │ │ │ +
575 info_[ codim ].resize( size );
│ │ │ │ +
576 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ +
577 info_[ codim ][ i ].initialize( topologyId, codim, i );
│ │ │ │ +
578 }
│ │ │ │ +
579
│ │ │ │ +
580 // compute corners
│ │ │ │ +
581 const unsigned int numVertices = size( dim );
│ │ │ │ +
582 baryCenters_[ dim ].resize( numVertices );
│ │ │ │ +
583 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) );
│ │ │ │ +
584
│ │ │ │ +
585 // compute barycenters
│ │ │ │ +
586 for( int codim = 0; codim < dim; ++codim )
│ │ │ │ +
587 {
│ │ │ │ +
588 baryCenters_[ codim ].resize( size(codim) );
│ │ │ │ +
589 for( int i = 0; i < size( codim ); ++i )
│ │ │ │ +
590 {
│ │ │ │ +
591 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) );
│ │ │ │ +
592 const unsigned int numCorners = size( i, codim, dim );
│ │ │ │ +
593 for( unsigned int j = 0; j < numCorners; ++j )
│ │ │ │ +
594 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, dim ) ];
│ │ │ │ +
595 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners );
│ │ │ │ +
596 }
│ │ │ │ +
597 }
│ │ │ │ +
598
│ │ │ │ +
599 // compute reference element volume
│ │ │ │ +
600 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim );
│ │ │ │ +
601
│ │ │ │ +
602 // compute integration outer normals
│ │ │ │ +
603 if( dim > 0 )
│ │ │ │ +
604 {
│ │ │ │ +
605 integrationNormals_.resize( size( 1 ) );
│ │ │ │ +
606 Impl::referenceIntegrationOuterNormals( topologyId, dim, &(integrationNormals_[ 0 ]) );
│ │ │ │ +
607 }
│ │ │ │ +
608
│ │ │ │ +
609 // set up geometries
│ │ │ │ +
610 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CreateGeometries< i >::apply( *this, geometries_ ); } );
│ │ │ │ +
611 }
│ │ │ │ +
612
│ │ │ │ +
613 template< int... codim >
│ │ │ │ +
614 static std::tuple< std::vector< typename Codim< codim >::Geometry >... >
│ │ │ │ +
615 makeGeometryTable ( std::integer_sequence< int, codim... > );
│ │ │ │ +
616
│ │ │ │ +
618 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 >() ) ) GeometryTable;
│ │ │ │ +
619
│ │ │ │ +
621 ctype volume_;
│ │ │ │ +
622
│ │ │ │ +
623 std::vector< Coordinate > baryCenters_[ dim+1 ];
│ │ │ │ +
624 std::vector< Coordinate > integrationNormals_;
│ │ │ │ +
625
│ │ │ │ +
627 GeometryTable geometries_;
│ │ │ │ +
628
│ │ │ │ +
629 std::vector< SubEntityInfo > info_[ dim+1 ];
│ │ │ │ +
630 };
│ │ │ │ +
631
│ │ │ │ +
633 template< class ctype, int dim >
│ │ │ │ +
634 struct ReferenceElementImplementation< ctype, dim >::SubEntityInfo
│ │ │ │ +
635 {
│ │ │ │ +
636 // Compute upper bound for the number of subsentities.
│ │ │ │ +
637 // If someone knows an explicit formal feel free to
│ │ │ │ +
638 // implement it here.
│ │ │ │ +
639 static constexpr std::size_t maxSubEntityCount()
│ │ │ │ +
640 {
│ │ │ │ +
641 std::size_t maxCount=0;
│ │ │ │ +
642 for(std::size_t codim=0; codim<=dim; ++codim)
│ │ │ │ +
643 maxCount = std::max(maxCount, binomial(std::size_t(dim),codim)*(1 << codim));
│ │ │ │ +
644 return maxCount;
│ │ │ │ +
645 }
│ │ │ │ +
646
│ │ │ │ +
647 using SubEntityFlags = std::bitset<maxSubEntityCount()>;
│ │ │ │ +
648
│ │ │ │ +
649 class SubEntityRange
│ │ │ │ +
650 : public Dune::IteratorRange<const unsigned int*>
│ │ │ │ +
651 {
│ │ │ │ +
652 using Base = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ │ +
653
│ │ │ │ +
654 public:
│ │ │ │ +
655
│ │ │ │ +
656 using iterator = Base::iterator;
│ │ │ │ +
657 using const_iterator = Base::const_iterator;
│ │ │ │ +
658
│ │ │ │ +
659 SubEntityRange(const iterator& begin, const iterator& end, const SubEntityFlags& contains) :
│ │ │ │ +
660 Base(begin, end),
│ │ │ │ +
661 containsPtr_(&contains),
│ │ │ │ +
662 size_(end-begin)
│ │ │ │ +
663 {}
│ │ │ │ +
664
│ │ │ │ +
665 SubEntityRange() :
│ │ │ │ +
666 Base(),
│ │ │ │ +
667 containsPtr_(nullptr),
│ │ │ │ +
668 size_(0)
│ │ │ │ +
669 {}
│ │ │ │ +
670
│ │ │ │ +
671 std::size_t size() const
│ │ │ │ +
672 {
│ │ │ │ +
673 return size_;
│ │ │ │ +
674 }
│ │ │ │ +
675
│ │ │ │ +
676 bool contains(std::size_t i) const
│ │ │ │ +
677 {
│ │ │ │ +
678 return (*containsPtr_)[i];
│ │ │ │ +
679 }
│ │ │ │ +
680
│ │ │ │ +
681 private:
│ │ │ │ +
682 const SubEntityFlags* containsPtr_;
│ │ │ │ +
683 std::size_t size_;
│ │ │ │ +
684 std::size_t offset_;
│ │ │ │ +
685 };
│ │ │ │ +
686
│ │ │ │ +
687 using NumberRange = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ │ +
688
│ │ │ │ +
689 SubEntityInfo ()
│ │ │ │ +
690 : numbering_( nullptr )
│ │ │ │ +
691 {
│ │ │ │ +
692 std::fill( offset_.begin(), offset_.end(), 0 );
│ │ │ │ +
693 }
│ │ │ │ +
694
│ │ │ │ +
695 SubEntityInfo ( const SubEntityInfo &other )
│ │ │ │ +
696 : offset_( other.offset_ ),
│ │ │ │ +
697 type_( other.type_ ),
│ │ │ │ +
698 containsSubentity_( other.containsSubentity_ )
│ │ │ │ +
699 {
│ │ │ │ +
700 numbering_ = allocate();
│ │ │ │ +
701 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ │ +
702 }
│ │ │ │ +
703
│ │ │ │ +
704 ~SubEntityInfo () { deallocate( numbering_ ); }
│ │ │ │ +
705
│ │ │ │ +
706 const SubEntityInfo &operator= ( const SubEntityInfo &other )
│ │ │ │ +
707 {
│ │ │ │ +
708 type_ = other.type_;
│ │ │ │ +
709 offset_ = other.offset_;
│ │ │ │ +
710
│ │ │ │ +
711 deallocate( numbering_ );
│ │ │ │ +
712 numbering_ = allocate();
│ │ │ │ +
713 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ │ +
714
│ │ │ │ +
715 containsSubentity_ = other.containsSubentity_;
│ │ │ │ +
716
│ │ │ │ +
717 return *this;
│ │ │ │ +
718 }
│ │ │ │ +
719
│ │ │ │ +
720 int size ( int cc ) const
│ │ │ │ +
721 {
│ │ │ │ +
722 assert( (cc >= 0) && (cc <= dim) );
│ │ │ │ +
723 return (offset_[ cc+1 ] - offset_[ cc ]);
│ │ │ │ +
724 }
│ │ │ │ +
725
│ │ │ │ +
726 int number ( int ii, int cc ) const
│ │ │ │ +
727 {
│ │ │ │ +
728 assert( (ii >= 0) && (ii < size( cc )) );
│ │ │ │ +
729 return numbering_[ offset_[ cc ] + ii ];
│ │ │ │ +
730 }
│ │ │ │ +
731
│ │ │ │ +
732 auto numbers ( int cc ) const
│ │ │ │ +
733 {
│ │ │ │ +
734 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_[ cc+1 ], containsSubentity_[cc]);
│ │ │ │ +
735 }
│ │ │ │ +
736
│ │ │ │ +
737 const GeometryType &type () const { return type_; }
│ │ │ │ +
738
│ │ │ │ +
739 void initialize ( unsigned int topologyId, int codim, unsigned int i )
│ │ │ │ +
740 {
│ │ │ │ +
741 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i );
│ │ │ │ +
742 type_ = GeometryType( subId, dim-codim );
│ │ │ │ +
743
│ │ │ │ +
744 // compute offsets
│ │ │ │ +
745 for( int cc = 0; cc <= codim; ++cc )
│ │ │ │ +
746 offset_[ cc ] = 0;
│ │ │ │ +
747 for( int cc = codim; cc <= dim; ++cc )
│ │ │ │ +
748 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim );
│ │ │ │ +
749
│ │ │ │ +
750 // compute subnumbering
│ │ │ │ +
751 deallocate( numbering_ );
│ │ │ │ +
752 numbering_ = allocate();
│ │ │ │ +
753 for( int cc = codim; cc <= dim; ++cc )
│ │ │ │ +
754 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] );
│ │ │ │ +
755
│ │ │ │ +
756 // initialize containsSubentity lookup-table
│ │ │ │ +
757 for(std::size_t cc=0; cc<= dim; ++cc)
│ │ │ │ +
758 {
│ │ │ │ +
759 containsSubentity_[cc].reset();
│ │ │ │ +
760 for(std::size_t idx=0; idx<std::size_t(size(cc)); ++idx)
│ │ │ │ +
761 containsSubentity_[cc][number(idx,cc)] = true;
│ │ │ │ +
762 }
│ │ │ │ +
763 }
│ │ │ │ +
764
│ │ │ │ +
765 protected:
│ │ │ │ +
766 int codim () const { return dim - type().dim(); }
│ │ │ │ +
767
│ │ │ │ +
768 unsigned int *allocate () { return (capacity() != 0 ? new unsigned int[ capacity() ] : nullptr); }
│ │ │ │ +
769 void deallocate ( unsigned int *ptr ) { delete[] ptr; }
│ │ │ │ +
770 unsigned int capacity () const { return offset_[ dim+1 ]; }
│ │ │ │ +
771
│ │ │ │ +
772 private:
│ │ │ │ +
773 unsigned int *numbering_;
│ │ │ │ +
774 std::array< unsigned int, dim+2 > offset_;
│ │ │ │ +
775 GeometryType type_;
│ │ │ │ +
776 std::array< SubEntityFlags, dim+1> containsSubentity_;
│ │ │ │ +
777 };
│ │ │ │ +
778
│ │ │ │ +
779
│ │ │ │ +
780 template< class ctype, int dim >
│ │ │ │ +
781 template< int codim >
│ │ │ │ +
782 struct ReferenceElementImplementation< ctype, dim >::CreateGeometries
│ │ │ │ +
783 {
│ │ │ │ +
784 template< int cc >
│ │ │ │ +
785 static typename ReferenceElements< ctype, dim-cc >::ReferenceElement
│ │ │ │ +
786 subRefElement( const ReferenceElementImplementation< ctype, dim > &refElement, int i, std::integral_constant< int, cc > )
│ │ │ │ +
787 {
│ │ │ │ +
788 return ReferenceElements< ctype, dim-cc >::general( refElement.type( i, cc ) );
│ │ │ │ +
789 }
│ │ │ │ +
790
│ │ │ │ + │ │ │ │ +
792 subRefElement(const ReferenceElementImplementation< ctype, dim > &refElement,
│ │ │ │ +
793 [[maybe_unused]] int i, std::integral_constant<int, 0>)
│ │ │ │ +
794 {
│ │ │ │ +
795 return refElement;
│ │ │ │ +
796 }
│ │ │ │ +
797
│ │ │ │ +
798 static void apply ( const ReferenceElementImplementation< ctype, dim > &refElement, GeometryTable &geometries )
│ │ │ │ +
799 {
│ │ │ │ +
800 const int size = refElement.size( codim );
│ │ │ │ +
801 std::vector< FieldVector< ctype, dim > > origins( size );
│ │ │ │ +
802 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds( size );
│ │ │ │ +
803 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 ]), &(jacobianTransposeds[ 0 ]) );
│ │ │ │ +
804
│ │ │ │ +
805 std::get< codim >( geometries ).reserve( size );
│ │ │ │ +
806 for( int i = 0; i < size; ++i )
│ │ │ │ +
807 {
│ │ │ │ +
808 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i ] );
│ │ │ │ +
809 std::get< codim >( geometries ).push_back( geometry );
│ │ │ │ +
810 }
│ │ │ │ +
811 }
│ │ │ │ +
812 };
│ │ │ │ +
813
│ │ │ │ +
814#endif // DOXYGEN
│ │ │ │ +
815
│ │ │ │ +
816 } // namespace Geo
│ │ │ │ +
817
│ │ │ │ +
818} // namespace Dune
│ │ │ │ +
819
│ │ │ │ +
820#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ │ +
An implementation of the Geometry interface for affine geometries.
│ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
Definition affinegeometry.hh:21
│ │ │ │ +
@ size
Definition quadraturerules.hh:145
│ │ │ │ +
int binomial(int upper, int lower)
calculate
Definition simplex.cc:305
│ │ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ +
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:198
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,188 +1,767 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -deprecated_topology.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 (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DEPRECATED_TOPOLOGY_HH │ │ │ │ │ -6#define DUNE_DEPRECATED_TOPOLOGY_HH │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8 namespace Impl │ │ │ │ │ -9 { │ │ │ │ │ -10 │ │ │ │ │ -11 // Basic Topology Types │ │ │ │ │ -12 // -------------------- │ │ │ │ │ -13 │ │ │ │ │ -14 // PointDeprecationHelper can be used to prevent a deprecation warning for │ │ │ │ │ -Point │ │ │ │ │ -15 struct PointDeprecationHelper │ │ │ │ │ -16 { │ │ │ │ │ -17 static const unsigned int dimension = 0; │ │ │ │ │ -18 static const unsigned int numCorners = 1; │ │ │ │ │ -19 │ │ │ │ │ -20 static const unsigned int id = 0; │ │ │ │ │ -21 │ │ │ │ │ -22 static std::string name () { return "p"; } │ │ │ │ │ -23 }; │ │ │ │ │ +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 using Point [[deprecated("Use GeometryTypes::vertex instead.")]] = │ │ │ │ │ -PointDeprecationHelper; │ │ │ │ │ -26 │ │ │ │ │ -27 │ │ │ │ │ -28 template< class BaseTopology > │ │ │ │ │ -29 struct [[deprecated("Use GeometryTypes::prismaticExtension(GeometryType gt) │ │ │ │ │ -instead.")]] Prism │ │ │ │ │ -30 { │ │ │ │ │ -31 static const unsigned int dimension = BaseTopology::dimension + 1; │ │ │ │ │ -32 static const unsigned int numCorners = 2 * BaseTopology::numCorners; │ │ │ │ │ -33 │ │ │ │ │ -34 static const unsigned int id = BaseTopology::id | ((unsigned │ │ │ │ │ -int)prismConstruction << (dimension-1)); │ │ │ │ │ -35 │ │ │ │ │ -36 static std::string name () { return BaseTopology::name() + "l"; } │ │ │ │ │ -37 }; │ │ │ │ │ -38 │ │ │ │ │ +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{ │ │ │ │ │ +31 │ │ │ │ │ +32 namespace Geo │ │ │ │ │ +33 { │ │ │ │ │ +34 │ │ │ │ │ +35#ifndef DOXYGEN │ │ │ │ │ +36 │ │ │ │ │ +37 // Internal Forward Declarations │ │ │ │ │ +38 // ----------------------------- │ │ │ │ │ 39 │ │ │ │ │ -40 template< class BaseTopology > │ │ │ │ │ -41 struct [[deprecated("Use GeometryTypes::conicalExtension(GeometryType gt) │ │ │ │ │ -instead.")]] Pyramid │ │ │ │ │ -42 { │ │ │ │ │ -43 static const unsigned int dimension = BaseTopology::dimension + 1; │ │ │ │ │ -44 static const unsigned int numCorners = BaseTopology::numCorners + 1; │ │ │ │ │ +40 namespace Impl │ │ │ │ │ +41 { │ │ │ │ │ +42 template< class ctype, int dim > │ │ │ │ │ +43 class ReferenceElementContainer; │ │ │ │ │ +44 } │ │ │ │ │ 45 │ │ │ │ │ -46 static const unsigned int id = BaseTopology::id | ((unsigned │ │ │ │ │ -int)pyramidConstruction << (dimension-1)); │ │ │ │ │ -47 │ │ │ │ │ -48 static std::string name () { return BaseTopology::name() + "o"; } │ │ │ │ │ -49 }; │ │ │ │ │ +46 template< class ctype, int dim > │ │ │ │ │ +47 struct ReferenceElements; │ │ │ │ │ +48 │ │ │ │ │ +49 │ │ │ │ │ 50 │ │ │ │ │ -51 │ │ │ │ │ -52 │ │ │ │ │ -53 // Properties of Topologies │ │ │ │ │ -54 // ------------------------ │ │ │ │ │ -55 │ │ │ │ │ -56 template< class Topology > │ │ │ │ │ -57 struct [[deprecated("Use GeometryType::isSimplex() instead.")]] IsSimplex │ │ │ │ │ -58 : public std::integral_constant< bool, (Topology::id >> 1) == 0 > │ │ │ │ │ -59 {}; │ │ │ │ │ +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 │ │ │ │ │ -61 template< class Topology > │ │ │ │ │ -62 struct [[deprecated("Use GeometryType::isCube() instead.")]] IsCube │ │ │ │ │ -63 : public std::integral_constant< bool, (Topology::id | 1) == (1 << │ │ │ │ │ -Topology::dimension) - 1 > │ │ │ │ │ -64 {}; │ │ │ │ │ +62 unsigned int _s_i_z_e ( unsigned int topologyId, int dim, int codim ); │ │ │ │ │ +63 │ │ │ │ │ +64 │ │ │ │ │ 65 │ │ │ │ │ -78 [[deprecated("Use GeometryType::isPrismatic() or GeometryType::isConical() │ │ │ │ │ -instead.")]] │ │ │ │ │ -79 inline static bool isTopology ( TopologyConstruction construction, unsigned │ │ │ │ │ -int topologyId, int dim, int codim = 0 ) noexcept │ │ │ │ │ -80 { │ │ │ │ │ -81 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ -82 assert( (0 <= codim) && (codim <= dim) ); │ │ │ │ │ -83 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == │ │ │ │ │ -(unsigned int)construction); │ │ │ │ │ -84 } │ │ │ │ │ +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 │ │ │ │ │ -87 // SimplexTopology │ │ │ │ │ -88 // --------------- │ │ │ │ │ -89 │ │ │ │ │ -90 template< unsigned int dim > │ │ │ │ │ -91 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] │ │ │ │ │ -SimplexTopology │ │ │ │ │ +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 typedef Pyramid< typename SimplexTopology< dim-1 >::type > type; │ │ │ │ │ -94 }; │ │ │ │ │ +93 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ │ +94 assert( topologyId < numTopologies( dim ) ); │ │ │ │ │ 95 │ │ │ │ │ -96 template<> │ │ │ │ │ -97 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] │ │ │ │ │ -SimplexTopology< 0 > │ │ │ │ │ -98 { │ │ │ │ │ -99 typedef Point type; │ │ │ │ │ -100 }; │ │ │ │ │ -101 │ │ │ │ │ -102 │ │ │ │ │ -103 │ │ │ │ │ -104 // CubeTopology │ │ │ │ │ -105 // ------------ │ │ │ │ │ -106 │ │ │ │ │ -107 template< unsigned int dim > │ │ │ │ │ -108 struct [[deprecated("Use GeometryTypes::cube(dim) instead.")]] CubeTopology │ │ │ │ │ -109 { │ │ │ │ │ -110 typedef Prism< typename CubeTopology< dim-1 >::type > type; │ │ │ │ │ -111 }; │ │ │ │ │ +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<> │ │ │ │ │ -114 struct [[deprecated("Use GeometryTypes::simplex(dim) instead.")]] │ │ │ │ │ -CubeTopology< 0 > │ │ │ │ │ -115 { │ │ │ │ │ -116 typedef Point type; │ │ │ │ │ -117 }; │ │ │ │ │ -118 │ │ │ │ │ +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 │ │ │ │ │ -121 // PyramidTopology │ │ │ │ │ -122 // --------------- │ │ │ │ │ -123 │ │ │ │ │ -124 template< unsigned int dim > │ │ │ │ │ -125 struct [[deprecated]] PyramidTopology │ │ │ │ │ +120 if( dim > 0 ) │ │ │ │ │ +121 { │ │ │ │ │ +122 const unsigned int nBaseCorners │ │ │ │ │ +123 = referenceCorners( baseTopologyId( topologyId, dim ), dim-1, corners ); │ │ │ │ │ +124 assert( nBaseCorners == _s_i_z_e( baseTopologyId( topologyId, dim ), dim-1, │ │ │ │ │ +dim-1 ) ); │ │ │ │ │ +125 if( isPrism( topologyId, dim ) ) │ │ │ │ │ 126 { │ │ │ │ │ -127 typedef Pyramid< typename CubeTopology< dim-1 >::type > type; │ │ │ │ │ -128 }; │ │ │ │ │ -129 │ │ │ │ │ -130 │ │ │ │ │ -131 │ │ │ │ │ -132 // PrismTopology │ │ │ │ │ -133 // ------------- │ │ │ │ │ -134 │ │ │ │ │ -135 template< unsigned int dim > │ │ │ │ │ -136 struct [[deprecated]] PrismTopology │ │ │ │ │ -137 { │ │ │ │ │ -138 typedef Prism< typename SimplexTopology< dim-1 >::type > type; │ │ │ │ │ -139 }; │ │ │ │ │ -140 │ │ │ │ │ -141 │ │ │ │ │ -142 │ │ │ │ │ -143 │ │ │ │ │ -144 // IfTopology │ │ │ │ │ -145 // ---------- │ │ │ │ │ +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 template< template< class > class Operation, int dim, class Topology = │ │ │ │ │ -PointDeprecationHelper > │ │ │ │ │ -148 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology │ │ │ │ │ -149 { │ │ │ │ │ -150 template< class... Args > │ │ │ │ │ -151 static auto apply ( unsigned int topologyId, Args &&... args ) │ │ │ │ │ -152 { │ │ │ │ │ -153 if( topologyId & 1 ) │ │ │ │ │ -154 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId │ │ │ │ │ ->> 1, std::forward< Args >( args )... ); │ │ │ │ │ -155 else │ │ │ │ │ -156 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply │ │ │ │ │ -( topologyId >> 1, std::forward< Args >( args )... ); │ │ │ │ │ +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 }; │ │ │ │ │ +158 │ │ │ │ │ 159 │ │ │ │ │ -160 template< template< class > class Operation, class Topology > │ │ │ │ │ -161 struct [[deprecated("Use IfGeometryType instead.")]] IfTopology< Operation, │ │ │ │ │ -0, Topology > │ │ │ │ │ -162 { │ │ │ │ │ -163 template< class... Args > │ │ │ │ │ -164 static auto apply ([[maybe_unused]] unsigned int topologyId, Args &&... │ │ │ │ │ -args) │ │ │ │ │ -165 { │ │ │ │ │ -166 return Operation< Topology >::apply( std::forward< Args >( args )... ); │ │ │ │ │ -167 } │ │ │ │ │ -168 }; │ │ │ │ │ -169 │ │ │ │ │ -170 } // namespace Impl │ │ │ │ │ -171#endif │ │ │ │ │ +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 │ │ │ │ │ +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( codim > 0 ) │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +271 │ │ │ │ │ +272 │ │ │ │ │ +273 // referenceIntegrationOuterNormals │ │ │ │ │ +274 // -------------------------------- │ │ │ │ │ +275 │ │ │ │ │ +276 template< class ct, int cdim > │ │ │ │ │ +277 inline unsigned int │ │ │ │ │ +278 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ │ +279 const FieldVector< ct, cdim > *origins, │ │ │ │ │ +280 FieldVector< ct, cdim > *normals ) │ │ │ │ │ +281 { │ │ │ │ │ +282 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ │ +283 assert( topologyId < numTopologies( dim ) ); │ │ │ │ │ +284 │ │ │ │ │ +285 if( dim > 1 ) │ │ │ │ │ +286 { │ │ │ │ │ +287 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ │ +288 if( isPrism( topologyId, dim ) ) │ │ │ │ │ +289 { │ │ │ │ │ +290 const unsigned int numBaseFaces │ │ │ │ │ +291 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals ); │ │ │ │ │ +292 │ │ │ │ │ +293 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ │ +294 { │ │ │ │ │ +295 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ │ +296 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 ); │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +299 return numBaseFaces+2; │ │ │ │ │ +300 } │ │ │ │ │ +301 else │ │ │ │ │ +302 { │ │ │ │ │ +303 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ │ +304 normals[ 0 ][ dim-1 ] = ct( -1 ); │ │ │ │ │ +305 │ │ │ │ │ +306 const unsigned int numBaseFaces │ │ │ │ │ +307 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 ); │ │ │ │ │ +308 for( unsigned int i = 1; i <= numBaseFaces; ++i ) │ │ │ │ │ +309 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ]; │ │ │ │ │ +310 │ │ │ │ │ +311 return numBaseFaces+1; │ │ │ │ │ +312 } │ │ │ │ │ +313 } │ │ │ │ │ +314 else │ │ │ │ │ +315 { │ │ │ │ │ +316 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ │ +317 { │ │ │ │ │ +318 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ │ +319 normals[ i ][ 0 ] = ct( 2*int( i )-1 ); │ │ │ │ │ +320 } │ │ │ │ │ +321 │ │ │ │ │ +322 return 2; │ │ │ │ │ +323 } │ │ │ │ │ +324 } │ │ │ │ │ +325 │ │ │ │ │ +326 template< class ct, int cdim > │ │ │ │ │ +327 inline unsigned int │ │ │ │ │ +328 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ │ +329 FieldVector< ct, cdim > *normals ) │ │ │ │ │ +330 { │ │ │ │ │ +331 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ │ +332 │ │ │ │ │ +333 FieldVector< ct, cdim > *origins │ │ │ │ │ +334 = new FieldVector< ct, cdim >[ _s_i_z_e( topologyId, dim, 1 ) ]; │ │ │ │ │ +335 referenceOrigins( topologyId, dim, 1, origins ); │ │ │ │ │ +336 │ │ │ │ │ +337 const unsigned int numFaces │ │ │ │ │ +338 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals ); │ │ │ │ │ +339 assert( numFaces == _s_i_z_e( topologyId, dim, 1 ) ); │ │ │ │ │ +340 │ │ │ │ │ +341 delete[] origins; │ │ │ │ │ +342 │ │ │ │ │ +343 return numFaces; │ │ │ │ │ +344 } │ │ │ │ │ +345 │ │ │ │ │ +346 } // namespace Impl │ │ │ │ │ +347 │ │ │ │ │ +348 │ │ │ │ │ +349 │ │ │ │ │ +350 // ReferenceElement │ │ │ │ │ +351 // ---------------- │ │ │ │ │ +352 │ │ │ │ │ +371 template< class ctype_, int dim > │ │ │ │ │ +372 class ReferenceElementImplementation │ │ │ │ │ +373 { │ │ │ │ │ +374 │ │ │ │ │ +375 public: │ │ │ │ │ +376 │ │ │ │ │ +378 using ctype = ctype_; │ │ │ │ │ +379 │ │ │ │ │ +381 using CoordinateField = ctype; │ │ │ │ │ +382 │ │ │ │ │ +384 using Coordinate = Dune::FieldVector; │ │ │ │ │ +385 │ │ │ │ │ +387 static constexpr int dimension = dim; │ │ │ │ │ +388 │ │ │ │ │ +390 typedef ctype Volume; │ │ │ │ │ +391 │ │ │ │ │ +392 private: │ │ │ │ │ +393 │ │ │ │ │ +394 friend class Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ │ +395 │ │ │ │ │ +396 struct SubEntityInfo; │ │ │ │ │ +397 │ │ │ │ │ +398 template< int codim > struct CreateGeometries; │ │ │ │ │ +399 │ │ │ │ │ +400 public: │ │ │ │ │ +402 template< int codim > │ │ │ │ │ +403 struct Codim │ │ │ │ │ +404 { │ │ │ │ │ +406 typedef AffineGeometry< ctype, dim-codim, dim > Geometry; │ │ │ │ │ +407 }; │ │ │ │ │ +408 │ │ │ │ │ +409 // ReferenceElement cannot be copied. │ │ │ │ │ +410 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = │ │ │ │ │ +delete; │ │ │ │ │ +411 │ │ │ │ │ +412 // ReferenceElementImplementation cannot be copied. │ │ │ │ │ +413 ReferenceElementImplementation& operator= ( const │ │ │ │ │ +ReferenceElementImplementation& ) = delete; │ │ │ │ │ +414 │ │ │ │ │ +415 // ReferenceElementImplementation is default-constructible (required for │ │ │ │ │ +storage in std::array) │ │ │ │ │ +416 ReferenceElementImplementation () = default; │ │ │ │ │ +417 │ │ │ │ │ +422 int _s_i_z_e ( int c ) const │ │ │ │ │ +423 { │ │ │ │ │ +424 assert( (c >= 0) && (c <= dim) ); │ │ │ │ │ +425 return info_[ c ].size(); │ │ │ │ │ +426 } │ │ │ │ │ +427 │ │ │ │ │ +439 int _s_i_z_e ( int i, int c, int cc ) const │ │ │ │ │ +440 { │ │ │ │ │ +441 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ +442 return info_[ c ][ i ].size( cc ); │ │ │ │ │ +443 } │ │ │ │ │ +444 │ │ │ │ │ +458 int subEntity ( int i, int c, int ii, int cc ) const │ │ │ │ │ +459 { │ │ │ │ │ +460 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ +461 return info_[ c ][ i ].number( ii, cc ); │ │ │ │ │ +462 } │ │ │ │ │ +463 │ │ │ │ │ +479 auto subEntities ( int i, int c, int cc ) const │ │ │ │ │ +480 { │ │ │ │ │ +481 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ +482 return info_[ c ][ i ].numbers( cc ); │ │ │ │ │ +483 } │ │ │ │ │ +484 │ │ │ │ │ +493 const GeometryType &type ( int i, int c ) const │ │ │ │ │ +494 { │ │ │ │ │ +495 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ │ +496 return info_[ c ][ i ].type(); │ │ │ │ │ +497 } │ │ │ │ │ +498 │ │ │ │ │ +500 const GeometryType &type () const { return type( 0, 0 ); } │ │ │ │ │ +501 │ │ │ │ │ +511 const Coordinate &position( int i, int c ) const │ │ │ │ │ +512 { │ │ │ │ │ +513 assert( (c >= 0) && (c <= dim) ); │ │ │ │ │ +514 return baryCenters_[ c ][ i ]; │ │ │ │ │ +515 } │ │ │ │ │ +516 │ │ │ │ │ +524 bool checkInside ( const Coordinate &local ) const │ │ │ │ │ +525 { │ │ │ │ │ +526 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon │ │ │ │ │ +(); │ │ │ │ │ +527 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, │ │ │ │ │ +tolerance ); │ │ │ │ │ +528 } │ │ │ │ │ +529 │ │ │ │ │ +541 template< int codim > │ │ │ │ │ +542 typename Codim< codim >::Geometry geometry ( int i ) const │ │ │ │ │ +543 { │ │ │ │ │ +544 return std::get< codim >( geometries_ )[ i ]; │ │ │ │ │ +545 } │ │ │ │ │ +546 │ │ │ │ │ +548 Volume volume () const │ │ │ │ │ +549 { │ │ │ │ │ +550 return volume_; │ │ │ │ │ +551 } │ │ │ │ │ +552 │ │ │ │ │ +560 const Coordinate &integrationOuterNormal ( int face ) const │ │ │ │ │ +561 { │ │ │ │ │ +562 assert( (face >= 0) && (face < int( integrationNormals_.size() )) ); │ │ │ │ │ +563 return integrationNormals_[ face ]; │ │ │ │ │ +564 } │ │ │ │ │ +565 │ │ │ │ │ +566 private: │ │ │ │ │ +567 void initialize ( unsigned int topologyId ) │ │ │ │ │ +568 { │ │ │ │ │ +569 assert( topologyId < Impl::numTopologies( dim ) ); │ │ │ │ │ +570 │ │ │ │ │ +571 // set up subentities │ │ │ │ │ +572 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ │ +573 { │ │ │ │ │ +574 const unsigned int _s_i_z_e = Impl::size( topologyId, dim, codim ); │ │ │ │ │ +575 info_[ codim ].resize( size ); │ │ │ │ │ +576 for( unsigned int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ │ +577 info_[ codim ][ i ].initialize( topologyId, codim, i ); │ │ │ │ │ +578 } │ │ │ │ │ +579 │ │ │ │ │ +580 // compute corners │ │ │ │ │ +581 const unsigned int numVertices = _s_i_z_e( dim ); │ │ │ │ │ +582 baryCenters_[ dim ].resize( numVertices ); │ │ │ │ │ +583 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) ); │ │ │ │ │ +584 │ │ │ │ │ +585 // compute barycenters │ │ │ │ │ +586 for( int codim = 0; codim < dim; ++codim ) │ │ │ │ │ +587 { │ │ │ │ │ +588 baryCenters_[ codim ].resize( _s_i_z_e(codim) ); │ │ │ │ │ +589 for( int i = 0; i < _s_i_z_e( codim ); ++i ) │ │ │ │ │ +590 { │ │ │ │ │ +591 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) ); │ │ │ │ │ +592 const unsigned int numCorners = _s_i_z_e( i, codim, dim ); │ │ │ │ │ +593 for( unsigned int j = 0; j < numCorners; ++j ) │ │ │ │ │ +594 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, │ │ │ │ │ +dim ) ]; │ │ │ │ │ +595 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners ); │ │ │ │ │ +596 } │ │ │ │ │ +597 } │ │ │ │ │ +598 │ │ │ │ │ +599 // compute reference element volume │ │ │ │ │ +600 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim ); │ │ │ │ │ +601 │ │ │ │ │ +602 // compute integration outer normals │ │ │ │ │ +603 if( dim > 0 ) │ │ │ │ │ +604 { │ │ │ │ │ +605 integrationNormals_.resize( _s_i_z_e( 1 ) ); │ │ │ │ │ +606 Impl::referenceIntegrationOuterNormals( topologyId, dim, & │ │ │ │ │ +(integrationNormals_[ 0 ]) ); │ │ │ │ │ +607 } │ │ │ │ │ +608 │ │ │ │ │ +609 // set up geometries │ │ │ │ │ +610 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CreateGeometries< i >::apply( *this, geometries_ ); } ); │ │ │ │ │ +611 } │ │ │ │ │ +612 │ │ │ │ │ +613 template< int... codim > │ │ │ │ │ +614 static std::tuple< std::vector< typename Codim< codim >::Geometry >... > │ │ │ │ │ +615 makeGeometryTable ( std::integer_sequence< int, codim... > ); │ │ │ │ │ +616 │ │ │ │ │ +618 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 │ │ │ │ │ +>() ) ) GeometryTable; │ │ │ │ │ +619 │ │ │ │ │ +621 ctype volume_; │ │ │ │ │ +622 │ │ │ │ │ +623 std::vector< Coordinate > baryCenters_[ dim+1 ]; │ │ │ │ │ +624 std::vector< Coordinate > integrationNormals_; │ │ │ │ │ +625 │ │ │ │ │ +627 GeometryTable geometries_; │ │ │ │ │ +628 │ │ │ │ │ +629 std::vector< SubEntityInfo > info_[ dim+1 ]; │ │ │ │ │ +630 }; │ │ │ │ │ +631 │ │ │ │ │ +633 template< class ctype, int dim > │ │ │ │ │ +634 struct ReferenceElementImplementation< ctype, dim >::SubEntityInfo │ │ │ │ │ +635 { │ │ │ │ │ +636 // Compute upper bound for the number of subsentities. │ │ │ │ │ +637 // If someone knows an explicit formal feel free to │ │ │ │ │ +638 // implement it here. │ │ │ │ │ +639 static constexpr std::size_t maxSubEntityCount() │ │ │ │ │ +640 { │ │ │ │ │ +641 std::size_t maxCount=0; │ │ │ │ │ +642 for(std::size_t codim=0; codim<=dim; ++codim) │ │ │ │ │ +643 maxCount = std::max(maxCount, _b_i_n_o_m_i_a_l(std::size_t(dim),codim)*(1 << │ │ │ │ │ +codim)); │ │ │ │ │ +644 return maxCount; │ │ │ │ │ +645 } │ │ │ │ │ +646 │ │ │ │ │ +647 using SubEntityFlags = std::bitset; │ │ │ │ │ +648 │ │ │ │ │ +649 class SubEntityRange │ │ │ │ │ +650 : public Dune::IteratorRange │ │ │ │ │ +651 { │ │ │ │ │ +652 using Base = typename Dune::IteratorRange; │ │ │ │ │ +653 │ │ │ │ │ +654 public: │ │ │ │ │ +655 │ │ │ │ │ +656 using iterator = Base::iterator; │ │ │ │ │ +657 using const_iterator = Base::const_iterator; │ │ │ │ │ +658 │ │ │ │ │ +659 SubEntityRange(const iterator& begin, const iterator& end, const │ │ │ │ │ +SubEntityFlags& contains) : │ │ │ │ │ +660 Base(begin, end), │ │ │ │ │ +661 containsPtr_(&contains), │ │ │ │ │ +662 size_(end-begin) │ │ │ │ │ +663 {} │ │ │ │ │ +664 │ │ │ │ │ +665 SubEntityRange() : │ │ │ │ │ +666 Base(), │ │ │ │ │ +667 containsPtr_(nullptr), │ │ │ │ │ +668 size_(0) │ │ │ │ │ +669 {} │ │ │ │ │ +670 │ │ │ │ │ +671 std::size_t _s_i_z_e() const │ │ │ │ │ +672 { │ │ │ │ │ +673 return size_; │ │ │ │ │ +674 } │ │ │ │ │ +675 │ │ │ │ │ +676 bool contains(std::size_t i) const │ │ │ │ │ +677 { │ │ │ │ │ +678 return (*containsPtr_)[i]; │ │ │ │ │ +679 } │ │ │ │ │ +680 │ │ │ │ │ +681 private: │ │ │ │ │ +682 const SubEntityFlags* containsPtr_; │ │ │ │ │ +683 std::size_t size_; │ │ │ │ │ +684 std::size_t offset_; │ │ │ │ │ +685 }; │ │ │ │ │ +686 │ │ │ │ │ +687 using NumberRange = typename Dune::IteratorRange; │ │ │ │ │ +688 │ │ │ │ │ +689 SubEntityInfo () │ │ │ │ │ +690 : numbering_( nullptr ) │ │ │ │ │ +691 { │ │ │ │ │ +692 std::fill( offset_.begin(), offset_.end(), 0 ); │ │ │ │ │ +693 } │ │ │ │ │ +694 │ │ │ │ │ +695 SubEntityInfo ( const SubEntityInfo &other ) │ │ │ │ │ +696 : offset_( other.offset_ ), │ │ │ │ │ +697 type_( other.type_ ), │ │ │ │ │ +698 containsSubentity_( other.containsSubentity_ ) │ │ │ │ │ +699 { │ │ │ │ │ +700 numbering_ = allocate(); │ │ │ │ │ +701 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ │ +702 } │ │ │ │ │ +703 │ │ │ │ │ +704 ~SubEntityInfo () { deallocate( numbering_ ); } │ │ │ │ │ +705 │ │ │ │ │ +706 const SubEntityInfo &operator= ( const SubEntityInfo &other ) │ │ │ │ │ +707 { │ │ │ │ │ +708 type_ = other.type_; │ │ │ │ │ +709 offset_ = other.offset_; │ │ │ │ │ +710 │ │ │ │ │ +711 deallocate( numbering_ ); │ │ │ │ │ +712 numbering_ = allocate(); │ │ │ │ │ +713 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ │ +714 │ │ │ │ │ +715 containsSubentity_ = other.containsSubentity_; │ │ │ │ │ +716 │ │ │ │ │ +717 return *this; │ │ │ │ │ +718 } │ │ │ │ │ +719 │ │ │ │ │ +720 int _s_i_z_e ( int cc ) const │ │ │ │ │ +721 { │ │ │ │ │ +722 assert( (cc >= 0) && (cc <= dim) ); │ │ │ │ │ +723 return (offset_[ cc+1 ] - offset_[ cc ]); │ │ │ │ │ +724 } │ │ │ │ │ +725 │ │ │ │ │ +726 int number ( int ii, int cc ) const │ │ │ │ │ +727 { │ │ │ │ │ +728 assert( (ii >= 0) && (ii < _s_i_z_e( cc )) ); │ │ │ │ │ +729 return numbering_[ offset_[ cc ] + ii ]; │ │ │ │ │ +730 } │ │ │ │ │ +731 │ │ │ │ │ +732 auto numbers ( int cc ) const │ │ │ │ │ +733 { │ │ │ │ │ +734 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_ │ │ │ │ │ +[ cc+1 ], containsSubentity_[cc]); │ │ │ │ │ +735 } │ │ │ │ │ +736 │ │ │ │ │ +737 const GeometryType &type () const { return type_; } │ │ │ │ │ +738 │ │ │ │ │ +739 void initialize ( unsigned int topologyId, int codim, unsigned int i ) │ │ │ │ │ +740 { │ │ │ │ │ +741 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i │ │ │ │ │ +); │ │ │ │ │ +742 type_ = GeometryType( subId, dim-codim ); │ │ │ │ │ +743 │ │ │ │ │ +744 // compute offsets │ │ │ │ │ +745 for( int cc = 0; cc <= codim; ++cc ) │ │ │ │ │ +746 offset_[ cc ] = 0; │ │ │ │ │ +747 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ │ +748 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim ); │ │ │ │ │ +749 │ │ │ │ │ +750 // compute subnumbering │ │ │ │ │ +751 deallocate( numbering_ ); │ │ │ │ │ +752 numbering_ = allocate(); │ │ │ │ │ +753 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ │ +754 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, │ │ │ │ │ +numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] ); │ │ │ │ │ +755 │ │ │ │ │ +756 // initialize containsSubentity lookup-table │ │ │ │ │ +757 for(std::size_t cc=0; cc<= dim; ++cc) │ │ │ │ │ +758 { │ │ │ │ │ +759 containsSubentity_[cc].reset(); │ │ │ │ │ +760 for(std::size_t idx=0; idx offset_; │ │ │ │ │ +775 GeometryType type_; │ │ │ │ │ +776 std::array< SubEntityFlags, dim+1> containsSubentity_; │ │ │ │ │ +777 }; │ │ │ │ │ +778 │ │ │ │ │ +779 │ │ │ │ │ +780 template< class ctype, int dim > │ │ │ │ │ +781 template< int codim > │ │ │ │ │ +782 struct ReferenceElementImplementation< ctype, dim >::CreateGeometries │ │ │ │ │ +783 { │ │ │ │ │ +784 template< int cc > │ │ │ │ │ +785 static typename ReferenceElements< ctype, dim-cc >::ReferenceElement │ │ │ │ │ +786 subRefElement( const ReferenceElementImplementation< ctype, dim > │ │ │ │ │ +&refElement, int i, std::integral_constant< int, cc > ) │ │ │ │ │ +787 { │ │ │ │ │ +788 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 │ │ │ │ │ +) ); │ │ │ │ │ +789 } │ │ │ │ │ +790 │ │ │ │ │ +791 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 │ │ │ │ │ +792 subRefElement(const ReferenceElementImplementation< ctype, dim > │ │ │ │ │ +&refElement, │ │ │ │ │ +793 [[maybe_unused]] int i, std::integral_constant) │ │ │ │ │ +794 { │ │ │ │ │ +795 return refElement; │ │ │ │ │ +796 } │ │ │ │ │ +797 │ │ │ │ │ +798 static void apply ( const ReferenceElementImplementation< ctype, dim > │ │ │ │ │ +&refElement, GeometryTable &geometries ) │ │ │ │ │ +799 { │ │ │ │ │ +800 const int _s_i_z_e = refElement.size( codim ); │ │ │ │ │ +801 std::vector< FieldVector< ctype, dim > > origins( size ); │ │ │ │ │ +802 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds │ │ │ │ │ +( size ); │ │ │ │ │ +803 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 │ │ │ │ │ +]), &(jacobianTransposeds[ 0 ]) ); │ │ │ │ │ +804 │ │ │ │ │ +805 std::get< codim >( geometries ).reserve( size ); │ │ │ │ │ +806 for( int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ │ +807 { │ │ │ │ │ +808 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, │ │ │ │ │ +std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i │ │ │ │ │ +] ); │ │ │ │ │ +809 std::get< codim >( geometries ).push_back( geometry ); │ │ │ │ │ +810 } │ │ │ │ │ +811 } │ │ │ │ │ +812 }; │ │ │ │ │ +813 │ │ │ │ │ +814#endif // DOXYGEN │ │ │ │ │ +815 │ │ │ │ │ +816 } // namespace Geo │ │ │ │ │ +817 │ │ │ │ │ +818} // namespace Dune │ │ │ │ │ +819 │ │ │ │ │ +820#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ │ +_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. │ │ │ │ │ +_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. │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ +_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:145 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_b_i_n_o_m_i_a_l │ │ │ │ │ +int binomial(int upper, int lower) │ │ │ │ │ +calculate │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:305 │ │ │ │ │ +_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:188 │ │ │ │ │ +_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:198 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: axisalignedcubegeometry.hh File Reference │ │ │ │ +dune-geometry: generalvertexorder.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,43 +71,51 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
axisalignedcubegeometry.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
generalvertexorder.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 <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::AxisAlignedCubeGeometry< CoordType, dim, coorddim >
 A geometry implementation for axis-aligned hypercubes. 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

│ │ │ │ -

A geometry implementation for axis-aligned hypercubes.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,35 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +_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 "_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> │ │ │ │ │ -#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_:_:_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_._._. │ │ │ │ │ +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 ********** │ │ │ │ │ -A geometry implementation for axis-aligned hypercubes. │ │ │ │ │ +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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: axisalignedcubegeometry.hh Source File │ │ │ │ +dune-geometry: generalvertexorder.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,355 +74,186 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
axisalignedcubegeometry.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 (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
5
│ │ │ │ -
6#ifndef DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ │ -
7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ │ +
6#ifndef DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ │ +
7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ │
8
│ │ │ │ -
13#include <bitset>
│ │ │ │ +
9#include <algorithm>
│ │ │ │ +
10#include <cassert>
│ │ │ │ +
11#include <cstddef>
│ │ │ │ +
12#include <iterator>
│ │ │ │ +
13#include <vector>
│ │ │ │
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>
│ │ │ │ +
15#include <dune/common/iteratorfacades.hh>
│ │ │ │ +
16
│ │ │ │ +
17#include "type.hh"
│ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
20namespace Dune {
│ │ │ │
21
│ │ │ │ -
22
│ │ │ │ -
23namespace Dune {
│ │ │ │ -
24
│ │ │ │ -
48 template <class CoordType, unsigned int dim, unsigned int coorddim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 {
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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); }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │
│ │ │ │ -
115 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ │ -
116 const Dune::FieldVector<ctype,coorddim> upper)
│ │ │ │ -
117 : lower_(lower),
│ │ │ │ -
118 upper_(upper),
│ │ │ │ -
119 axes_()
│ │ │ │ -
120 {
│ │ │ │ -
121 static_assert(dim==coorddim, "Use this constructor only if dim==coorddim!");
│ │ │ │ -
122 // all 'true', but is never actually used
│ │ │ │ -
123 axes_ = (1<<coorddim)-1;
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ -
133 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ │ -
134 const Dune::FieldVector<ctype,coorddim> upper,
│ │ │ │ -
135 const std::bitset<coorddim>& axes)
│ │ │ │ -
136 : lower_(lower),
│ │ │ │ -
137 upper_(upper),
│ │ │ │ -
138 axes_(axes)
│ │ │ │ -
139 {
│ │ │ │ -
140 assert(axes.count()==dim);
│ │ │ │ -
141 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
142 if (not axes_[i])
│ │ │ │ -
143 upper_[i] = lower_[i];
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
│ │ │ │ -
150 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower)
│ │ │ │ -
151 : lower_(lower)
│ │ │ │ -
152 {}
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
156 {
│ │ │ │ -
157 return GeometryTypes::cube(dim);
│ │ │ │ -
158 }
│ │ │ │ -
│ │ │ │ -
159
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
162 {
│ │ │ │ -
163 GlobalCoordinate result;
│ │ │ │ -
164 if (dim == coorddim) { // fast case
│ │ │ │ -
165 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
166 result[i] = lower_[i] + local[i]*(upper_[i] - lower_[i]);
│ │ │ │ -
167 } else if (dim == 0) { // a vertex -- the other fast case
│ │ │ │ -
168 result = lower_; // hope for named-return-type-optimization
│ │ │ │ -
169 } else { // slow case
│ │ │ │ -
170 size_t lc=0;
│ │ │ │ -
171 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
172 result[i] = (axes_[i])
│ │ │ │ -
173 ? lower_[i] + local[lc++]*(upper_[i] - lower_[i])
│ │ │ │ -
174 : lower_[i];
│ │ │ │ -
175 }
│ │ │ │ -
176 return result;
│ │ │ │ +
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 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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
181 {
│ │ │ │ -
182 LocalCoordinate result;
│ │ │ │ -
183 if (dim == coorddim) { // fast case
│ │ │ │ -
184 for (size_t i=0; i<dim; i++)
│ │ │ │ -
185 result[i] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ │ -
186 } else if (dim != 0) { // slow case
│ │ │ │ -
187 size_t lc=0;
│ │ │ │ -
188 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
189 if (axes_[i])
│ │ │ │ -
190 result[lc++] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ │ -
191 }
│ │ │ │ -
192 return result;
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
197 {
│ │ │ │ -
198 JacobianTransposed result;
│ │ │ │ -
199
│ │ │ │ -
200 // Actually compute the result. Uses different methods depending
│ │ │ │ -
201 // on what kind of matrix JacobianTransposed is.
│ │ │ │ -
202 jacobianTransposed(result);
│ │ │ │ -
203
│ │ │ │ -
204 return result;
│ │ │ │ -
205 }
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
209 {
│ │ │ │ - │ │ │ │ -
211
│ │ │ │ -
212 // Actually compute the result. Uses different methods depending
│ │ │ │ -
213 // on what kind of matrix JacobianTransposed is.
│ │ │ │ - │ │ │ │ -
215
│ │ │ │ -
216 return result;
│ │ │ │ -
217 }
│ │ │ │ -
│ │ │ │ -
218
│ │ │ │ -
│ │ │ │ -
220 Jacobian jacobian([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ │ -
221 {
│ │ │ │ -
222 return jacobianTransposed(local).transposed();
│ │ │ │ -
223 }
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
227 {
│ │ │ │ -
228 return jacobianInverseTransposed(local).transposed();
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230
│ │ │ │ -
│ │ │ │ -
234 Volume integrationElement([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ │ -
235 {
│ │ │ │ -
236 return volume();
│ │ │ │ -
237 }
│ │ │ │ -
│ │ │ │ -
238
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
241 {
│ │ │ │ -
242 GlobalCoordinate result;
│ │ │ │ -
243 if (dim==0)
│ │ │ │ -
244 result = lower_;
│ │ │ │ -
245 else {
│ │ │ │ -
246 // Since lower_==upper_ for unused coordinates, this always does the right thing
│ │ │ │ -
247 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
248 result[i] = CoordType(0.5) * (lower_[i] + upper_[i]);
│ │ │ │ -
249 }
│ │ │ │ -
250 return result;
│ │ │ │ -
251 }
│ │ │ │ -
│ │ │ │ -
252
│ │ │ │ -
│ │ │ │ -
254 int corners() const
│ │ │ │ -
255 {
│ │ │ │ -
256 return 1<<dim;
│ │ │ │ -
257 }
│ │ │ │ -
│ │ │ │ -
258
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
261 {
│ │ │ │ -
262 GlobalCoordinate result;
│ │ │ │ -
263 if (dim == coorddim) { // fast case
│ │ │ │ -
264 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
265 result[i] = (k & (1<<i)) ? upper_[i] : lower_[i];
│ │ │ │ -
266 } else if (dim == 0) { // vertex
│ │ │ │ -
267 result = lower_; // rely on named return-type optimization
│ │ │ │ -
268 } else { // slow case
│ │ │ │ -
269 unsigned int mask = 1;
│ │ │ │ -
270
│ │ │ │ -
271 for (size_t i=0; i<coorddim; i++) {
│ │ │ │ -
272 if (not axes_[i])
│ │ │ │ -
273 result[i] = lower_[i];
│ │ │ │ -
274 else {
│ │ │ │ -
275 result[i] = (k & mask) ? upper_[i] : lower_[i];
│ │ │ │ -
276 mask = (mask<<1);
│ │ │ │ -
277 }
│ │ │ │ -
278 }
│ │ │ │ -
279 }
│ │ │ │ -
280
│ │ │ │ -
281
│ │ │ │ -
282 return result;
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
284
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
287 {
│ │ │ │ -
288 ctype vol = 1;
│ │ │ │ -
289 if (dim == coorddim) { // fast case
│ │ │ │ -
290 for (size_t i=0; i<dim; i++)
│ │ │ │ -
291 vol *= upper_[i] - lower_[i];
│ │ │ │ -
292 // do nothing if dim == 0
│ │ │ │ -
293 } else if (dim != 0) { // slow case
│ │ │ │ -
294 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
295 if (axes_[i])
│ │ │ │ -
296 vol *= upper_[i] - lower_[i];
│ │ │ │ -
297 }
│ │ │ │ -
298 return vol;
│ │ │ │ -
299 }
│ │ │ │ -
│ │ │ │ -
300
│ │ │ │ -
│ │ │ │ -
302 bool affine() const
│ │ │ │ -
303 {
│ │ │ │ -
304 return true;
│ │ │ │ -
305 }
│ │ │ │ -
│ │ │ │ -
306
│ │ │ │ -
│ │ │ │ -
307 friend Dune::Transitional::ReferenceElement< ctype, Dim<dim> > referenceElement ( const AxisAlignedCubeGeometry & /* geometry */ )
│ │ │ │ -
308 {
│ │ │ │ - │ │ │ │ -
310 }
│ │ │ │ -
│ │ │ │ -
311
│ │ │ │ -
312 private:
│ │ │ │ -
313 // jacobianTransposed: fast case --> diagonal matrix
│ │ │ │ -
314 void jacobianTransposed ( DiagonalMatrix<ctype,dim> &jacobianTransposed ) const
│ │ │ │ -
315 {
│ │ │ │ -
316 for (size_t i=0; i<dim; i++)
│ │ │ │ -
317 jacobianTransposed.diagonal()[i] = upper_[i] - lower_[i];
│ │ │ │ -
318 }
│ │ │ │ -
319
│ │ │ │ -
320 // jacobianTransposed: slow case --> dense matrix
│ │ │ │ -
321 void jacobianTransposed ( FieldMatrix<ctype,dim,coorddim> &jacobianTransposed ) const
│ │ │ │ -
322 {
│ │ │ │ -
323 if (dim==0)
│ │ │ │ -
324 return;
│ │ │ │ -
325
│ │ │ │ -
326 size_t lc = 0;
│ │ │ │ -
327 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
328 if (axes_[i])
│ │ │ │ -
329 jacobianTransposed[lc++][i] = upper_[i] - lower_[i];
│ │ │ │ -
330 }
│ │ │ │ -
331
│ │ │ │ -
332 // jacobianInverseTransposed: fast case --> diagonal matrix
│ │ │ │ -
333 void jacobianInverseTransposed ( DiagonalMatrix<ctype,dim> &jacobianInverseTransposed ) const
│ │ │ │ -
334 {
│ │ │ │ -
335 for (size_t i=0; i<dim; i++)
│ │ │ │ -
336 jacobianInverseTransposed.diagonal()[i] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ │ -
337 }
│ │ │ │ -
338
│ │ │ │ -
339 // jacobianInverseTransposed: slow case --> dense matrix
│ │ │ │ -
340 void jacobianInverseTransposed ( FieldMatrix<ctype,coorddim,dim> &jacobianInverseTransposed ) const
│ │ │ │ -
341 {
│ │ │ │ -
342 if (dim==0)
│ │ │ │ -
343 return;
│ │ │ │ -
344
│ │ │ │ -
345 size_t lc = 0;
│ │ │ │ -
346 for (size_t i=0; i<coorddim; i++)
│ │ │ │ -
347 if (axes_[i])
│ │ │ │ -
348 jacobianInverseTransposed[i][lc++] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ │ -
349 }
│ │ │ │ -
350
│ │ │ │ -
351 Dune::FieldVector<ctype,coorddim> lower_;
│ │ │ │ -
352
│ │ │ │ -
353 Dune::FieldVector<ctype,coorddim> upper_;
│ │ │ │ -
354
│ │ │ │ -
355 std::bitset<coorddim> axes_;
│ │ │ │ -
356 };
│ │ │ │ -
│ │ │ │ -
357
│ │ │ │ -
358} // namespace Dune
│ │ │ │ -
359#endif
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
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:21
│ │ │ │ -
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:210
│ │ │ │ -
A geometry implementation for axis-aligned hypercubes.
Definition axisalignedcubegeometry.hh:50
│ │ │ │ -
Volume volume() const
Return the element volume.
Definition axisalignedcubegeometry.hh:286
│ │ │ │ -
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:133
│ │ │ │ -
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:115
│ │ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Inverse Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:226
│ │ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Inverse Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:208
│ │ │ │ -
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:150
│ │ │ │ -
static constexpr int mydimension
Dimension of the cube element.
Definition axisalignedcubegeometry.hh:56
│ │ │ │ -
static constexpr int coorddimension
Dimension of the world space that the cube element is embedded in.
Definition axisalignedcubegeometry.hh:59
│ │ │ │ -
GlobalCoordinate corner(int k) const
Return world coordinates of the k-th corner of the element.
Definition axisalignedcubegeometry.hh:260
│ │ │ │ -
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
│ │ │ │ -
friend Dune::Transitional::ReferenceElement< ctype, Dim< dim > > referenceElement(const AxisAlignedCubeGeometry &)
Definition axisalignedcubegeometry.hh:307
│ │ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:196
│ │ │ │ -
FieldVector< ctype, coorddim > GlobalCoordinate
Type used for a vector of world coordinates.
Definition axisalignedcubegeometry.hh:68
│ │ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Map a point in global (world) coordinates to element coordinates.
Definition axisalignedcubegeometry.hh:180
│ │ │ │ -
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:155
│ │ │ │ -
int corners() const
Return the number of corners of the element.
Definition axisalignedcubegeometry.hh:254
│ │ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:220
│ │ │ │ -
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:234
│ │ │ │ -
GlobalCoordinate center() const
Return center of mass of the element.
Definition axisalignedcubegeometry.hh:240
│ │ │ │ -
bool affine() const
Return if the element is affine. Here: yes.
Definition axisalignedcubegeometry.hh:302
│ │ │ │ -
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:161
│ │ │ │ +
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:170
│ │ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ +
Class providing information on the ordering of vertices.
Definition generalvertexorder.hh:67
│ │ │ │ +
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:126
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,429 +1,216 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -axisalignedcubegeometry.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 (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 5 │ │ │ │ │ -6#ifndef DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ │ -7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ │ +6#ifndef DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ │ +7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ │ 8 │ │ │ │ │ -13#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +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> │ │ │ │ │ +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 │ │ │ │ │ -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 { │ │ │ │ │ +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 │ │ │ │ │ -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_5 _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, │ │ │ │ │ -116 const Dune::FieldVector upper) │ │ │ │ │ -117 : lower_(lower), │ │ │ │ │ -118 upper_(upper), │ │ │ │ │ -119 axes_() │ │ │ │ │ -120 { │ │ │ │ │ -121 static_assert(dim==coorddim, "Use this constructor only if │ │ │ │ │ -dim==coorddim!"); │ │ │ │ │ -122 // all 'true', but is never actually used │ │ │ │ │ -123 axes_ = (1< lower, │ │ │ │ │ -134 const Dune::FieldVector upper, │ │ │ │ │ -135 const std::bitset& axes) │ │ │ │ │ -136 : lower_(lower), │ │ │ │ │ -137 upper_(upper), │ │ │ │ │ -138 axes_(axes) │ │ │ │ │ -139 { │ │ │ │ │ -140 assert(axes.count()==dim); │ │ │ │ │ -141 for (size_t i=0; i lower) │ │ │ │ │ -151 : lower_(lower) │ │ │ │ │ -152 {} │ │ │ │ │ -153 │ │ │ │ │ -_1_5_5 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e() const │ │ │ │ │ -156 { │ │ │ │ │ -157 return GeometryTypes::cube(dim); │ │ │ │ │ -158 } │ │ │ │ │ -159 │ │ │ │ │ -_1_6_1 _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 │ │ │ │ │ -162 { │ │ │ │ │ -163 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ │ -164 if (dim == coorddim) { // fast case │ │ │ │ │ -165 for (size_t i=0; i │ │ │ │ │ +_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); } │ │ │ │ │ +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::_i_t_e_r_a_t_o_r : │ │ │ │ │ +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 _i_t_e_r_a_t_o_r(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 _i_t_e_r_a_t_o_r &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 _i_t_e_r_a_t_o_r &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 │ │ │ │ │ -_1_8_0 _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 │ │ │ │ │ -181 { │ │ │ │ │ -182 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ │ -183 if (dim == coorddim) { // fast case │ │ │ │ │ -184 for (size_t i=0; i > │ │ │ │ │ -_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 */ ) │ │ │ │ │ -308 { │ │ │ │ │ -309 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(); │ │ │ │ │ -310 } │ │ │ │ │ -311 │ │ │ │ │ -312 private: │ │ │ │ │ -313 // jacobianTransposed: fast case --> diagonal matrix │ │ │ │ │ -314 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 │ │ │ │ │ -315 { │ │ │ │ │ -316 for (size_t i=0; i dense matrix │ │ │ │ │ -321 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 │ │ │ │ │ -322 { │ │ │ │ │ -323 if (dim==0) │ │ │ │ │ -324 return; │ │ │ │ │ -325 │ │ │ │ │ -326 size_t lc = 0; │ │ │ │ │ -327 for (size_t i=0; i diagonal matrix │ │ │ │ │ -333 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 │ │ │ │ │ -334 { │ │ │ │ │ -335 for (size_t i=0; i dense matrix │ │ │ │ │ -340 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 │ │ │ │ │ -341 { │ │ │ │ │ -342 if (dim==0) │ │ │ │ │ -343 return; │ │ │ │ │ -344 │ │ │ │ │ -345 size_t lc = 0; │ │ │ │ │ -346 for (size_t i=0; i lower_; │ │ │ │ │ -352 │ │ │ │ │ -353 Dune::FieldVector upper_; │ │ │ │ │ -354 │ │ │ │ │ -355 std::bitset axes_; │ │ │ │ │ -356 }; │ │ │ │ │ -357 │ │ │ │ │ -358} // namespace Dune │ │ │ │ │ -359#endif │ │ │ │ │ +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 │ │ │ │ │ _r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ _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:21 │ │ │ │ │ -_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:210 │ │ │ │ │ -_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 geometry implementation for axis-aligned hypercubes. │ │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:50 │ │ │ │ │ -_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:286 │ │ │ │ │ -_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:133 │ │ │ │ │ -_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:115 │ │ │ │ │ -_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:226 │ │ │ │ │ -_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:208 │ │ │ │ │ -_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:150 │ │ │ │ │ -_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_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int mydimension │ │ │ │ │ -Dimension of the cube element. │ │ │ │ │ -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_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int coorddimension │ │ │ │ │ -Dimension of the world space that the cube element is embedded in. │ │ │ │ │ -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:260 │ │ │ │ │ -_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_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ -friend Dune::Transitional::ReferenceElement< ctype, Dim< dim > > │ │ │ │ │ -referenceElement(const AxisAlignedCubeGeometry &) │ │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:307 │ │ │ │ │ -_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:196 │ │ │ │ │ -_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_:_:_l_o_c_a_l │ │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ -Map a point in global (world) coordinates to element coordinates. │ │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:180 │ │ │ │ │ -_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:155 │ │ │ │ │ -_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:254 │ │ │ │ │ -_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:220 │ │ │ │ │ -_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:234 │ │ │ │ │ -_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:240 │ │ │ │ │ -_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:302 │ │ │ │ │ -_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:161 │ │ │ │ │ +_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:170 │ │ │ │ │ +_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:188 │ │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r │ │ │ │ │ +Class providing information on the ordering of vertices. │ │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:67 │ │ │ │ │ +_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:126 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: quadraturerules.hh File Reference │ │ │ │ +dune-geometry: pyramidtriangulation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,119 +65,80 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ Macros | │ │ │ │ -Enumerations
│ │ │ │ -
quadraturerules.hh File Reference
│ │ │ │ +Functions
│ │ │ │ +
pyramidtriangulation.cc 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"
│ │ │ │ +
#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::QuadratureOrderOutOfRange
 Exception thrown if a desired QuadratureRule is not available, because the requested order is to high. More...
class  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >
 Implementation of the refinement of a pyramid into simplices. More...
 
class  Dune::QuadraturePoint< ct, dim >
 Single evaluation point in a quadrature rule. More...
struct  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
 
class  Dune::QuadratureRule< ct, dim >
 Abstract base class for quadrature rules. More...
class  Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
 
class  Dune::QuadratureRules< ctype, dim >
 A container for all quadrature rules of dimension dim More...
class  Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
 
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::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::QuadratureType
 Defines an enum for currently available quadrature rules.
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)
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Macros

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

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

│ │ │ │ +Functions

template<int dimension, class CoordType >
FieldVector< CoordType, dimension > Dune::RefinementImp::PyramidTriangulation::transformCoordinate (FieldVector< CoordType, dimension > point)
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Interface for quadrature points and rules

│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_INCLUDING_IMPLEMENTATION

│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
#define DUNE_INCLUDING_IMPLEMENTATION#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,85 +1,59 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ + * _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 │ │ │ │ │ #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_/_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 "_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_:_:_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_:_:_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_._._. │ │ │ │ │   │ │ │ │ │ -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_._._. │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e │ │ │ │ │ -  Defines an enum for currently available quadrature rules. │ │ │ │ │ +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) │ │ │ │ │   │ │ │ │ │ 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 │ │ │ │ │ +#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 │ │ │ │ │   │ │ │ │ │ -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 │ │ │ │ │ - } │ │ │ │ │ +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) │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Interface for quadrature points and rules │ │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__IINNCCLLUUDDIINNGG__IIMMPPLLEEMMEENNTTAATTIIOONN ********** │ │ │ │ │ -#define DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPYYRRAAMMIIDDTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: quadraturerules.hh Source File │ │ │ │ +dune-geometry: pyramidtriangulation.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,478 +70,523 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
quadraturerules.hh
│ │ │ │ +
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 (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_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
│ │ │ │ -
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
│ │ │ │ -
30namespace Dune {
│ │ │ │ -
31
│ │ │ │ -
36 class QuadratureOrderOutOfRange : public NotImplemented {};
│ │ │ │ -
37
│ │ │ │ -
43 template<typename ct, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 public:
│ │ │ │ -
47 constexpr static int dimension = dim;
│ │ │ │ -
48
│ │ │ │ -
50 typedef ct Field;
│ │ │ │ -
51
│ │ │ │ -
53 typedef Dune::FieldVector<ct,dim> Vector;
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
56 QuadraturePoint (const Vector& x, ct w) : local(x)
│ │ │ │ -
57 {
│ │ │ │ -
58 weight_ = w;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
62 const Vector& position () const
│ │ │ │ -
63 {
│ │ │ │ -
64 return local;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ -
68 const ct &weight () const
│ │ │ │ -
69 {
│ │ │ │ -
70 return weight_;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 protected:
│ │ │ │ -
74 FieldVector<ct, dim> local;
│ │ │ │ - │ │ │ │ -
76 };
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
│ │ │ │ -
81 namespace QuadratureType {
│ │ │ │ -
│ │ │ │ -
82 enum Enum {
│ │ │ │ - │ │ │ │ -
93
│ │ │ │ - │ │ │ │ -
100
│ │ │ │ - │ │ │ │ -
107
│ │ │ │ - │ │ │ │ -
120
│ │ │ │ - │ │ │ │ -
128
│ │ │ │ - │ │ │ │ -
136
│ │ │ │ - │ │ │ │ -
145 size
│ │ │ │ -
146 };
│ │ │ │ -
│ │ │ │ -
147 }
│ │ │ │ -
│ │ │ │ -
148
│ │ │ │ -
152 template<typename ct, int dim>
│ │ │ │ -
│ │ │ │ -
153 class QuadratureRule : public std::vector<QuadraturePoint<ct,dim> >
│ │ │ │ -
154 {
│ │ │ │ -
155 public:
│ │ │ │ - │ │ │ │ -
162
│ │ │ │ -
163 protected:
│ │ │ │ - │ │ │ │ -
166
│ │ │ │ - │ │ │ │ -
169 public:
│ │ │ │ -
171 constexpr static int d = dim;
│ │ │ │ -
172
│ │ │ │ -
174 typedef ct CoordType;
│ │ │ │ +
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 {
│ │ │ │ +
│ │ │ │ +
26 namespace PyramidTriangulation
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
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:
│ │ │ │ + │ │ │ │ +
165 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
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
│ │ │ │ -
177 virtual int order () const { return delivered_order; }
│ │ │ │ -
178
│ │ │ │ -
180 virtual GeometryType type () const { return geometry_type; }
│ │ │ │ -
181 virtual ~QuadratureRule(){}
│ │ │ │ -
182
│ │ │ │ -
185 typedef typename std::vector<QuadraturePoint<ct,dim> >::const_iterator iterator;
│ │ │ │ -
186
│ │ │ │ -
187 protected:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
190 };
│ │ │ │ -
│ │ │ │ -
191
│ │ │ │ -
192 // Forward declaration of the factory class,
│ │ │ │ -
193 // needed internally by the QuadratureRules container class.
│ │ │ │ -
194 template<typename ctype, int dim> class QuadratureRuleFactory;
│ │ │ │ -
195
│ │ │ │ -
199 template<typename ctype, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
201
│ │ │ │ - │ │ │ │ -
204
│ │ │ │ -
205 // indexed by quadrature order
│ │ │ │ -
206 using QuadratureOrderVector = std::vector<std::pair<std::once_flag, QuadratureRule> >;
│ │ │ │ -
207
│ │ │ │ -
208 // indexed by geometry type
│ │ │ │ -
209 using GeometryTypeVector = std::vector<std::pair<std::once_flag, QuadratureOrderVector> >;
│ │ │ │ -
210
│ │ │ │ -
211 // indexed by quadrature type enum
│ │ │ │ -
212 using QuadratureCacheVector = std::vector<std::pair<std::once_flag, GeometryTypeVector> >;
│ │ │ │ -
213
│ │ │ │ -
215 DUNE_EXPORT const QuadratureRule& _rule(const GeometryType& t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre) const
│ │ │ │ -
216 {
│ │ │ │ -
217 assert(t.dim()==dim);
│ │ │ │ -
218
│ │ │ │ -
219 DUNE_ASSERT_CALL_ONCE();
│ │ │ │ -
220
│ │ │ │ -
221 static QuadratureCacheVector quadratureCache(QuadratureType::size);
│ │ │ │ -
222
│ │ │ │ -
223 auto& [ onceFlagQuadratureType, geometryTypes ] = quadratureCache[qt];
│ │ │ │ -
224 // initialize geometry types for this quadrature type once
│ │ │ │ -
225 std::call_once(onceFlagQuadratureType, [&types = geometryTypes]{
│ │ │ │ -
226 types = GeometryTypeVector(LocalGeometryTypeIndex::size(dim));
│ │ │ │ -
227 });
│ │ │ │ -
228
│ │ │ │ -
229 auto& [ onceFlagGeometryType, quadratureOrders ] = geometryTypes[LocalGeometryTypeIndex::index(t)];
│ │ │ │ -
230 // initialize quadrature orders for this geometry type and quadrature type once
│ │ │ │ -
231 std::call_once(onceFlagGeometryType, [&, &orders = quadratureOrders]{
│ │ │ │ -
232 // we only need one quadrature rule for points, not maxint
│ │ │ │ -
233 const auto numRules = dim == 0 ? 1 : QuadratureRuleFactory<ctype,dim>::maxOrder(t, qt)+1;
│ │ │ │ -
234 orders = QuadratureOrderVector(numRules);
│ │ │ │ -
235 });
│ │ │ │ -
236
│ │ │ │ -
237 // we only have one quadrature rule for points
│ │ │ │ -
238 auto& [ onceFlagQuadratureOrder, quadratureRule ] = quadratureOrders[dim == 0 ? 0 : p];
│ │ │ │ -
239 // initialize quadrature rule once
│ │ │ │ -
240 std::call_once(onceFlagQuadratureOrder, [&, &rule = quadratureRule]{
│ │ │ │ - │ │ │ │ -
242 });
│ │ │ │ -
243
│ │ │ │ -
244 return quadratureRule;
│ │ │ │ -
245 }
│ │ │ │ -
246
│ │ │ │ -
248 DUNE_EXPORT static QuadratureRules& instance()
│ │ │ │ -
249 {
│ │ │ │ -
250 static QuadratureRules instance;
│ │ │ │ -
251 return instance;
│ │ │ │ -
252 }
│ │ │ │ -
253
│ │ │ │ -
255 QuadratureRules () = default;
│ │ │ │ -
256 public:
│ │ │ │ -
258 static unsigned
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
261 {
│ │ │ │ - │ │ │ │ -
263 }
│ │ │ │ -
│ │ │ │ -
264
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
267 {
│ │ │ │ -
268 return instance()._rule(t,p,qt);
│ │ │ │ -
269 }
│ │ │ │ -
│ │ │ │ -
270
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
273 {
│ │ │ │ -
274 GeometryType gt(t,dim);
│ │ │ │ -
275 return instance()._rule(gt,p,qt);
│ │ │ │ -
276 }
│ │ │ │ -
│ │ │ │ -
277 };
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
279} // end namespace Dune
│ │ │ │ -
280
│ │ │ │ -
281#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ │ -
282
│ │ │ │ -
283// 0d rules
│ │ │ │ -
284#include "quadraturerules/pointquadrature.hh"
│ │ │ │ -
285// 1d rules
│ │ │ │ -
286#include "quadraturerules/gausslobattoquadrature.hh"
│ │ │ │ -
287#include "quadraturerules/gaussquadrature.hh"
│ │ │ │ -
288#include "quadraturerules/gaussradauleftquadrature.hh"
│ │ │ │ -
289#include "quadraturerules/gaussradaurightquadrature.hh"
│ │ │ │ -
290#include "quadraturerules/jacobi1quadrature.hh"
│ │ │ │ -
291#include "quadraturerules/jacobi2quadrature.hh"
│ │ │ │ -
292#include "quadraturerules/jacobiNquadrature.hh"
│ │ │ │ -
293// 3d rules
│ │ │ │ -
294#include "quadraturerules/prismquadrature.hh"
│ │ │ │ -
295// general rules
│ │ │ │ -
296#include "quadraturerules/simplexquadrature.hh"
│ │ │ │ -
297#include "quadraturerules/tensorproductquadrature.hh"
│ │ │ │ -
298
│ │ │ │ -
299#undef DUNE_INCLUDING_IMPLEMENTATION
│ │ │ │ -
300
│ │ │ │ -
301namespace Dune {
│ │ │ │ -
302
│ │ │ │ -
309 template<typename ctype, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
311 private:
│ │ │ │ -
312 friend class QuadratureRules<ctype, dim>;
│ │ │ │ -
313 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ -
314 {
│ │ │ │ -
315 return TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ │ -
316 }
│ │ │ │ -
317 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ -
318 {
│ │ │ │ -
319 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ │ -
320 }
│ │ │ │ -
321 };
│ │ │ │ -
│ │ │ │ -
322
│ │ │ │ -
323 template<typename ctype>
│ │ │ │ -
│ │ │ │ -
324 class QuadratureRuleFactory<ctype, 0> {
│ │ │ │ -
325 private:
│ │ │ │ -
326 constexpr static int dim = 0;
│ │ │ │ -
327 friend class QuadratureRules<ctype, dim>;
│ │ │ │ -
328 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum)
│ │ │ │ -
329 {
│ │ │ │ -
330 if (t.isVertex())
│ │ │ │ -
331 {
│ │ │ │ -
332 return std::numeric_limits<int>::max();
│ │ │ │ -
333 }
│ │ │ │ -
334 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ -
335 }
│ │ │ │ -
336 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int , QuadratureType::Enum)
│ │ │ │ -
337 {
│ │ │ │ -
338 if (t.isVertex())
│ │ │ │ -
339 {
│ │ │ │ -
340 return PointQuadratureRule<ctype>();
│ │ │ │ -
341 }
│ │ │ │ -
342 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ -
343 }
│ │ │ │ -
344 };
│ │ │ │ -
│ │ │ │ -
345
│ │ │ │ -
346 template<typename ctype>
│ │ │ │ -
│ │ │ │ -
347 class QuadratureRuleFactory<ctype, 1> {
│ │ │ │ -
348 private:
│ │ │ │ -
349 constexpr static int dim = 1;
│ │ │ │ -
350 friend class QuadratureRules<ctype, dim>;
│ │ │ │ -
351 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ -
352 {
│ │ │ │ -
353 if (t.isLine())
│ │ │ │ -
354 {
│ │ │ │ -
355 switch (qt) {
│ │ │ │ - │ │ │ │ -
357 return GaussQuadratureRule1D<ctype>::highest_order;
│ │ │ │ - │ │ │ │ -
359 return Jacobi1QuadratureRule1D<ctype>::highest_order;
│ │ │ │ - │ │ │ │ -
361 return Jacobi2QuadratureRule1D<ctype>::highest_order;
│ │ │ │ - │ │ │ │ -
363 return GaussLobattoQuadratureRule1D<ctype>::highest_order;
│ │ │ │ - │ │ │ │ -
365 return JacobiNQuadratureRule1D<ctype>::maxOrder();
│ │ │ │ - │ │ │ │ -
367 return GaussRadauLeftQuadratureRule1D<ctype>::highest_order;
│ │ │ │ - │ │ │ │ -
369 return GaussRadauRightQuadratureRule1D<ctype>::highest_order;
│ │ │ │ -
370 default :
│ │ │ │ -
371 DUNE_THROW(Exception, "Unknown QuadratureType");
│ │ │ │ -
372 }
│ │ │ │ -
373 }
│ │ │ │ -
374 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ -
375 }
│ │ │ │ -
376 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ -
377 {
│ │ │ │ -
378 if (t.isLine())
│ │ │ │ -
379 {
│ │ │ │ -
380 switch (qt) {
│ │ │ │ - │ │ │ │ -
382 return GaussQuadratureRule1D<ctype>(p);
│ │ │ │ - │ │ │ │ -
384 return Jacobi1QuadratureRule1D<ctype>(p);
│ │ │ │ - │ │ │ │ -
386 return Jacobi2QuadratureRule1D<ctype>(p);
│ │ │ │ - │ │ │ │ -
388 return GaussLobattoQuadratureRule1D<ctype>(p);
│ │ │ │ - │ │ │ │ -
390 return JacobiNQuadratureRule1D<ctype>(p);
│ │ │ │ - │ │ │ │ -
392 return GaussRadauLeftQuadratureRule1D<ctype>(p);
│ │ │ │ - │ │ │ │ -
394 return GaussRadauRightQuadratureRule1D<ctype>(p);
│ │ │ │ -
395 default :
│ │ │ │ -
396 DUNE_THROW(Exception, "Unknown QuadratureType");
│ │ │ │ -
397 }
│ │ │ │ -
398 }
│ │ │ │ -
399 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ │ -
400 }
│ │ │ │ -
401 };
│ │ │ │ -
│ │ │ │ -
402
│ │ │ │ -
403 template<typename ctype>
│ │ │ │ -
│ │ │ │ -
404 class QuadratureRuleFactory<ctype, 2> {
│ │ │ │ -
405 private:
│ │ │ │ -
406 constexpr static int dim = 2;
│ │ │ │ -
407 friend class QuadratureRules<ctype, dim>;
│ │ │ │ -
408 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ -
409 {
│ │ │ │ -
410 unsigned order =
│ │ │ │ -
411 TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ │ -
412 if (t.isSimplex())
│ │ │ │ -
413 order = std::max
│ │ │ │ -
414 (order, unsigned(SimplexQuadratureRule<ctype,dim>::highest_order));
│ │ │ │ -
415 return order;
│ │ │ │ -
416 }
│ │ │ │ -
417 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ -
418 {
│ │ │ │ -
419 if (t.isSimplex()
│ │ │ │ - │ │ │ │ -
421 && p <= SimplexQuadratureRule<ctype,dim>::highest_order)
│ │ │ │ -
422 {
│ │ │ │ -
423 return SimplexQuadratureRule<ctype,dim>(p);
│ │ │ │ -
424 }
│ │ │ │ -
425 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ │ -
426 }
│ │ │ │ -
427 };
│ │ │ │ -
│ │ │ │ -
428
│ │ │ │ -
429 template<typename ctype>
│ │ │ │ -
│ │ │ │ -
430 class QuadratureRuleFactory<ctype, 3> {
│ │ │ │ -
431 private:
│ │ │ │ -
432 constexpr static int dim = 3;
│ │ │ │ -
433 friend class QuadratureRules<ctype, dim>;
│ │ │ │ -
434 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ │ -
435 {
│ │ │ │ -
436 unsigned order =
│ │ │ │ -
437 TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ │ -
438 if (t.isSimplex())
│ │ │ │ -
439 order = std::max
│ │ │ │ -
440 (order, unsigned(SimplexQuadratureRule<ctype,dim>::highest_order));
│ │ │ │ -
441 if (t.isPrism())
│ │ │ │ -
442 order = std::max
│ │ │ │ -
443 (order, unsigned(PrismQuadratureRule<ctype,dim>::highest_order));
│ │ │ │ -
444 return order;
│ │ │ │ -
445 }
│ │ │ │ -
446 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ │ -
447 {
│ │ │ │ -
448
│ │ │ │ -
449 if (t.isSimplex()
│ │ │ │ - │ │ │ │ -
451 && p <= SimplexQuadratureRule<ctype,dim>::highest_order)
│ │ │ │ -
452 {
│ │ │ │ -
453 return SimplexQuadratureRule<ctype,dim>(p);
│ │ │ │ -
454 }
│ │ │ │ -
455 if (t.isPrism()
│ │ │ │ - │ │ │ │ -
457 && p <= PrismQuadratureRule<ctype,dim>::highest_order)
│ │ │ │ -
458 {
│ │ │ │ -
459 return PrismQuadratureRule<ctype,dim>(p);
│ │ │ │ -
460 }
│ │ │ │ -
461 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ │ -
462 }
│ │ │ │ -
463 };
│ │ │ │ -
│ │ │ │ -
464
│ │ │ │ -
465#ifndef DUNE_NO_EXTERN_QUADRATURERULES
│ │ │ │ -
466 extern template class GaussLobattoQuadratureRule<double, 1>;
│ │ │ │ -
467 extern template class GaussQuadratureRule<double, 1>;
│ │ │ │ -
468 extern template class GaussRadauLeftQuadratureRule<double, 1>;
│ │ │ │ -
469 extern template class GaussRadauRightQuadratureRule<double, 1>;
│ │ │ │ -
470 extern template class Jacobi1QuadratureRule<double, 1>;
│ │ │ │ -
471 extern template class Jacobi2QuadratureRule<double, 1>;
│ │ │ │ -
472 extern template class JacobiNQuadratureRule<double, 1>;
│ │ │ │ -
473 extern template class PrismQuadratureRule<double, 3>;
│ │ │ │ -
474 extern template class SimplexQuadratureRule<double, 2>;
│ │ │ │ -
475 extern template class SimplexQuadratureRule<double, 3>;
│ │ │ │ -
476#endif // !DUNE_NO_EXTERN_QUADRATURERULES
│ │ │ │ -
477
│ │ │ │ -
478} // end namespace
│ │ │ │ -
479
│ │ │ │ -
480#endif // DUNE_GEOMETRY_QUADRATURERULES_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.
│ │ │ │ +
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),
│ │ │ │ +
193 backend(BackendRefinement::vBegin(nIntervals_)),
│ │ │ │ +
194 backendEnd(BackendRefinement::vEnd(nIntervals_))
│ │ │ │ +
195 {
│ │ │ │ +
196 if (end)
│ │ │ │ +
197 kuhnIndex = nKuhnSimplices;
│ │ │ │ +
198 }
│ │ │ │ +
│ │ │ │ +
199
│ │ │ │ +
200 template<int dimension, class CoordType>
│ │ │ │ +
201 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
204 {
│ │ │ │ +
205 ++backend;
│ │ │ │ +
206 if(backend == backendEnd)
│ │ │ │ +
207 {
│ │ │ │ +
208 backend = BackendRefinement::vBegin(nIntervals_);
│ │ │ │ +
209 ++kuhnIndex;
│ │ │ │ +
210 }
│ │ │ │ +
211 }
│ │ │ │ +
│ │ │ │ +
212
│ │ │ │ +
213 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
216 coords() const
│ │ │ │ +
217 {
│ │ │ │ +
218 return transformCoordinate(referenceToKuhn(backend.coords(),
│ │ │ │ +
219 getPermutation<dimension>(kuhnIndex)));
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221
│ │ │ │ +
222 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
225 {
│ │ │ │ +
226 std::vector<CoordVector> corners(1);
│ │ │ │ +
227 corners[0] = referenceToKuhn(backend.coords(), getPermutation<dimension>(kuhnIndex));
│ │ │ │ +
228 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ +
229 }
│ │ │ │ +
│ │ │ │ +
230
│ │ │ │ +
231 template<int dimension, class CoordType>
│ │ │ │ +
232 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
234 index() const
│ │ │ │ +
235 {
│ │ │ │ +
236 return kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.index();
│ │ │ │ +
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
│ │ │ │ +
253 IndexVector vertexIndices() const;
│ │ │ │ +
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:
│ │ │ │ + │ │ │ │ +
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),
│ │ │ │ +
278 backend(BackendRefinement::eBegin(nIntervals_)),
│ │ │ │ +
279 backendEnd(BackendRefinement::eEnd(nIntervals_))
│ │ │ │ +
280 {
│ │ │ │ +
281 if (end)
│ │ │ │ +
282 kuhnIndex = nKuhnSimplices;
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
284
│ │ │ │ +
285 template<int dimension, class CoordType>
│ │ │ │ +
286 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
289 {
│ │ │ │ +
290 ++backend;
│ │ │ │ +
291 if (backend == backendEnd)
│ │ │ │ +
292 {
│ │ │ │ +
293 backend = BackendRefinement::eBegin(nIntervals_);
│ │ │ │ +
294 ++kuhnIndex;
│ │ │ │ +
295 }
│ │ │ │ +
296 }
│ │ │ │ +
│ │ │ │ +
297
│ │ │ │ +
298 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
301 vertexIndices() const
│ │ │ │ +
302 {
│ │ │ │ +
303 IndexVector indices = backend.vertexIndices();
│ │ │ │ +
304
│ │ │ │ +
305 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_);
│ │ │ │ +
306 indices += base;
│ │ │ │ +
307
│ │ │ │ +
308 return indices;
│ │ │ │ +
309 }
│ │ │ │ +
│ │ │ │ +
310
│ │ │ │ +
311 template<int dimension, class CoordType>
│ │ │ │ +
312 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
314 index() const
│ │ │ │ +
315 {
│ │ │ │ +
316 return kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.index();
│ │ │ │ +
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 {
│ │ │ │ +
347 return transformCoordinate(referenceToKuhn(local,
│ │ │ │ +
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
│ │ │ │ +
355 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ +
356 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ +
357 {
│ │ │ │ +
358 public:
│ │ │ │ + │ │ │ │ +
360 typedef SubEntityIterator This;
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
414
│ │ │ │ +
415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
Enum
Definition quadraturerules.hh:82
│ │ │ │ -
@ GaussJacobi_n_0
Gauss-Legendre rules with .
Definition quadraturerules.hh:119
│ │ │ │ -
@ GaussJacobi_2_0
Gauss-Legendre rules with .
Definition quadraturerules.hh:106
│ │ │ │ -
@ GaussRadauRight
Gauss-Radau rules including the right endpoint.
Definition quadraturerules.hh:144
│ │ │ │ -
@ GaussJacobi_1_0
Gauss-Jacobi rules with .
Definition quadraturerules.hh:99
│ │ │ │ -
@ size
Definition quadraturerules.hh:145
│ │ │ │ -
@ GaussLobatto
Gauss-Lobatto rules.
Definition quadraturerules.hh:127
│ │ │ │ -
@ GaussRadauLeft
Gauss-Radau rules including the left endpoint.
Definition quadraturerules.hh:135
│ │ │ │ -
@ GaussLegendre
Gauss-Legendre rules (default)
Definition quadraturerules.hh:92
│ │ │ │ -
Exception thrown if a desired QuadratureRule is not available, because the requested order is to high...
Definition quadraturerules.hh:36
│ │ │ │ -
Single evaluation point in a quadrature rule.
Definition quadraturerules.hh:44
│ │ │ │ -
const Vector & position() const
return local coordinates of integration point i
Definition quadraturerules.hh:62
│ │ │ │ -
Dune::FieldVector< ct, dim > Vector
Type used for the position of a quadrature point.
Definition quadraturerules.hh:53
│ │ │ │ -
ct Field
Number type used for coordinates and quadrature weights.
Definition quadraturerules.hh:50
│ │ │ │ -
const ct & weight() const
return weight associated with integration point i
Definition quadraturerules.hh:68
│ │ │ │ -
ct weight_
Definition quadraturerules.hh:75
│ │ │ │ -
static constexpr int dimension
Dimension of the integration domain.
Definition quadraturerules.hh:47
│ │ │ │ -
QuadraturePoint(const Vector &x, ct w)
set up quadrature of given order in d dimensions
Definition quadraturerules.hh:56
│ │ │ │ -
FieldVector< ct, dim > local
Definition quadraturerules.hh:74
│ │ │ │ -
Abstract base class for quadrature rules.
Definition quadraturerules.hh:154
│ │ │ │ -
virtual ~QuadratureRule()
Definition quadraturerules.hh:181
│ │ │ │ -
static constexpr int d
The space dimension.
Definition quadraturerules.hh:171
│ │ │ │ -
virtual GeometryType type() const
return type of element
Definition quadraturerules.hh:180
│ │ │ │ -
int delivered_order
Definition quadraturerules.hh:189
│ │ │ │ -
QuadratureRule(GeometryType t, int order)
Constructor for a given geometry type and a given quadrature order.
Definition quadraturerules.hh:168
│ │ │ │ -
GeometryType geometry_type
Definition quadraturerules.hh:188
│ │ │ │ -
ct CoordType
The type used for coordinates.
Definition quadraturerules.hh:174
│ │ │ │ -
QuadratureRule()
Default constructor.
Definition quadraturerules.hh:161
│ │ │ │ -
virtual int order() const
return order
Definition quadraturerules.hh:177
│ │ │ │ -
QuadratureRule(GeometryType t)
Constructor for a given geometry type. Leaves the quadrature order invalid
Definition quadraturerules.hh:165
│ │ │ │ -
std::vector< QuadraturePoint< ct, dim > >::const_iterator iterator
Definition quadraturerules.hh:185
│ │ │ │ -
Factory class for creation of quadrature rules, depending on GeometryType, order and QuadratureType.
Definition quadraturerules.hh:310
│ │ │ │ -
A container for all quadrature rules of dimension dim
Definition quadraturerules.hh:200
│ │ │ │ -
static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
maximum quadrature order for given geometry type and quadrature type
Definition quadraturerules.hh:259
│ │ │ │ -
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:272
│ │ │ │ -
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:266
│ │ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ -
constexpr bool isPrism() const
Return true if entity is a prism.
Definition type.hh:321
│ │ │ │ -
constexpr bool isVertex() const
Return true if entity is a vertex.
Definition type.hh:291
│ │ │ │ -
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ -
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition type.hh:132
│ │ │ │ -
constexpr bool isLine() const
Return true if entity is a line segment.
Definition type.hh:296
│ │ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ -
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition type.hh:331
│ │ │ │ -
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
│ │ │ │ +
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition pyramidtriangulation.cc:51
│ │ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:336
│ │ │ │ +
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:394
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Refinement::CoordVector CoordVector
Definition pyramidtriangulation.cc:246
│ │ │ │ + │ │ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition pyramidtriangulation.cc:247
│ │ │ │ +
Refinement::IndexVector IndexVector
Definition pyramidtriangulation.cc:245
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
SubEntityIterator This
Definition pyramidtriangulation.cc:360
│ │ │ │ + │ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:359
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,587 +1,604 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -quadraturerules.hh │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ │ +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 (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ │ -7#define DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -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 │ │ │ │ │ -30namespace _D_u_n_e { │ │ │ │ │ -31 │ │ │ │ │ -_3_6 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 {}; │ │ │ │ │ -37 │ │ │ │ │ -43 template │ │ │ │ │ -_4_4 class _Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t { │ │ │ │ │ -45 public: │ │ │ │ │ -_4_7 constexpr static int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -48 │ │ │ │ │ -_5_0 typedef ct _F_i_e_l_d; │ │ │ │ │ -51 │ │ │ │ │ -_5_3 typedef Dune::FieldVector _V_e_c_t_o_r; │ │ │ │ │ -54 │ │ │ │ │ -_5_6 _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) │ │ │ │ │ -57 { │ │ │ │ │ -58 _w_e_i_g_h_t__ = w; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_2 const _V_e_c_t_o_r& _p_o_s_i_t_i_o_n () const │ │ │ │ │ -63 { │ │ │ │ │ -64 return _l_o_c_a_l; │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_8 const ct &_w_e_i_g_h_t () const │ │ │ │ │ -69 { │ │ │ │ │ -70 return _w_e_i_g_h_t__; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 protected: │ │ │ │ │ -_7_4 FieldVector _l_o_c_a_l; │ │ │ │ │ -_7_5 ct _w_e_i_g_h_t__; │ │ │ │ │ -76 }; │ │ │ │ │ -77 │ │ │ │ │ -_8_1 namespace QuadratureType { │ │ │ │ │ -_8_2 enum _E_n_u_m { │ │ │ │ │ -_9_2 _G_a_u_s_s_L_e_g_e_n_d_r_e = 0, │ │ │ │ │ -93 │ │ │ │ │ -_9_9 _G_a_u_s_s_J_a_c_o_b_i___1___0 = 1, │ │ │ │ │ -100 │ │ │ │ │ -_1_0_6 _G_a_u_s_s_J_a_c_o_b_i___2___0 = 2, │ │ │ │ │ -107 │ │ │ │ │ -_1_1_9 _G_a_u_s_s_J_a_c_o_b_i___n___0 = 3, │ │ │ │ │ -120 │ │ │ │ │ -_1_2_7 _G_a_u_s_s_L_o_b_a_t_t_o = 4, │ │ │ │ │ -128 │ │ │ │ │ -_1_3_5 _G_a_u_s_s_R_a_d_a_u_L_e_f_t = 5, │ │ │ │ │ -136 │ │ │ │ │ -_1_4_4 _G_a_u_s_s_R_a_d_a_u_R_i_g_h_t = 6, │ │ │ │ │ -145 _s_i_z_e │ │ │ │ │ -_1_4_6 }; │ │ │ │ │ -147 } │ │ │ │ │ -148 │ │ │ │ │ -152 template │ │ │ │ │ -_1_5_3 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e : public std::vector > │ │ │ │ │ -154 { │ │ │ │ │ -155 public: │ │ │ │ │ -_1_6_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) {} │ │ │ │ │ -162 │ │ │ │ │ -163 protected: │ │ │ │ │ -_1_6_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) {} │ │ │ │ │ -166 │ │ │ │ │ -_1_6_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) {} │ │ │ │ │ -169 public: │ │ │ │ │ -_1_7_1 constexpr static int _d = dim; │ │ │ │ │ -172 │ │ │ │ │ -_1_7_4 typedef ct _C_o_o_r_d_T_y_p_e; │ │ │ │ │ +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 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 namespace RefinementImp │ │ │ │ │ +20 { │ │ │ │ │ +_2_6 namespace PyramidTriangulation │ │ │ │ │ +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 │ │ │ │ │ +81 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ +82 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ +83 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ +84 │ │ │ │ │ +85 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ +86 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_> _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ +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::_C_o_d_i_m │ │ │ │ │ +101 { │ │ │ │ │ +102 class SubEntityIterator; │ │ │ │ │ +_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 BackendRefinement::nVertices(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 BackendRefinement::nElements(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 Refinement::CoordVector _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 increment(); │ │ │ │ │ +171 │ │ │ │ │ +172 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +173 │ │ │ │ │ +174 _G_e_o_m_e_t_r_y geometry() const; │ │ │ │ │ 175 │ │ │ │ │ -_1_7_7 virtual int _o_r_d_e_r () const { return _d_e_l_i_v_e_r_e_d___o_r_d_e_r; } │ │ │ │ │ -178 │ │ │ │ │ -_1_8_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; } │ │ │ │ │ -_1_8_1 virtual _~_Q_u_a_d_r_a_t_u_r_e_R_u_l_e(){} │ │ │ │ │ -182 │ │ │ │ │ -_1_8_5 typedef typename std::vector >::const_iterator │ │ │ │ │ -_i_t_e_r_a_t_o_r; │ │ │ │ │ -186 │ │ │ │ │ -187 protected: │ │ │ │ │ -_1_8_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; │ │ │ │ │ -_1_8_9 int _d_e_l_i_v_e_r_e_d___o_r_d_e_r; │ │ │ │ │ -190 }; │ │ │ │ │ -191 │ │ │ │ │ -192 // Forward declaration of the factory class, │ │ │ │ │ -193 // needed internally by the QuadratureRules container class. │ │ │ │ │ -194 template class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y; │ │ │ │ │ -195 │ │ │ │ │ -199 template │ │ │ │ │ -_2_0_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s { │ │ │ │ │ -201 │ │ │ │ │ -203 using _Q_u_a_d_r_a_t_u_r_e_R_u_l_e = _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_>; │ │ │ │ │ -204 │ │ │ │ │ -205 // indexed by quadrature order │ │ │ │ │ -206 using QuadratureOrderVector = std::vector >; │ │ │ │ │ -207 │ │ │ │ │ -208 // indexed by geometry type │ │ │ │ │ -209 using GeometryTypeVector = std::vector >; │ │ │ │ │ -210 │ │ │ │ │ -211 // indexed by quadrature type enum │ │ │ │ │ -212 using QuadratureCacheVector = std::vector >; │ │ │ │ │ -213 │ │ │ │ │ -215 DUNE_EXPORT const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e& _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 │ │ │ │ │ -216 { │ │ │ │ │ -217 assert(t._d_i_m()==dim); │ │ │ │ │ -218 │ │ │ │ │ -219 DUNE_ASSERT_CALL_ONCE(); │ │ │ │ │ -220 │ │ │ │ │ -221 static QuadratureCacheVector quadratureCache(_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e); │ │ │ │ │ -222 │ │ │ │ │ -223 auto& [ onceFlagQuadratureType, geometryTypes ] = quadratureCache[qt]; │ │ │ │ │ -224 // initialize geometry types for this quadrature type once │ │ │ │ │ -225 std::call_once(onceFlagQuadratureType, [&types = geometryTypes]{ │ │ │ │ │ -226 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)); │ │ │ │ │ -227 }); │ │ │ │ │ -228 │ │ │ │ │ -229 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)]; │ │ │ │ │ -230 // initialize quadrature orders for this geometry type and quadrature type │ │ │ │ │ -once │ │ │ │ │ -231 std::call_once(onceFlagGeometryType, [&, &orders = quadratureOrders]{ │ │ │ │ │ -232 // we only need one quadrature rule for points, not maxint │ │ │ │ │ -233 const auto numRules = dim == 0 ? 1 : _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_>_:_: │ │ │ │ │ -_m_a_x_O_r_d_e_r(t, qt)+1; │ │ │ │ │ -234 orders = QuadratureOrderVector(numRules); │ │ │ │ │ -235 }); │ │ │ │ │ -236 │ │ │ │ │ -237 // we only have one quadrature rule for points │ │ │ │ │ -238 auto& [ onceFlagQuadratureOrder, quadratureRule ] = quadratureOrders[dim == │ │ │ │ │ -0 ? 0 : p]; │ │ │ │ │ -239 // initialize quadrature rule once │ │ │ │ │ -240 std::call_once(onceFlagQuadratureOrder, [&, &_r_u_l_e = quadratureRule]{ │ │ │ │ │ -241 _r_u_l_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_>_:_:_r_u_l_e(t, p, qt); │ │ │ │ │ -242 }); │ │ │ │ │ -243 │ │ │ │ │ -244 return quadratureRule; │ │ │ │ │ -245 } │ │ │ │ │ -246 │ │ │ │ │ -248 DUNE_EXPORT static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s& instance() │ │ │ │ │ -249 { │ │ │ │ │ -250 static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s instance; │ │ │ │ │ -251 return instance; │ │ │ │ │ -252 } │ │ │ │ │ -253 │ │ │ │ │ -255 _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s () = default; │ │ │ │ │ -256 public: │ │ │ │ │ -258 static unsigned │ │ │ │ │ -_2_5_9 _m_a_x_O_r_d_e_r(const _G_e_o_m_e_t_r_y_T_y_p_e& t, │ │ │ │ │ -260 _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) │ │ │ │ │ -261 { │ │ │ │ │ -262 return _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_>_:_:_m_a_x_O_r_d_e_r(t,qt); │ │ │ │ │ -263 } │ │ │ │ │ -264 │ │ │ │ │ -_2_6_6 static const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e& _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) │ │ │ │ │ -267 { │ │ │ │ │ -268 return instance()._rule(t,p,qt); │ │ │ │ │ -269 } │ │ │ │ │ -270 │ │ │ │ │ -_2_7_2 static const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e& _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) │ │ │ │ │ -273 { │ │ │ │ │ -274 _G_e_o_m_e_t_r_y_T_y_p_e gt(t,dim); │ │ │ │ │ -275 return instance()._rule(gt,p,qt); │ │ │ │ │ -276 } │ │ │ │ │ -277 }; │ │ │ │ │ -278 │ │ │ │ │ -279} // end namespace Dune │ │ │ │ │ -280 │ │ │ │ │ -_2_8_1#define DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ -282 │ │ │ │ │ -283// 0d rules │ │ │ │ │ -284#include "quadraturerules/pointquadrature.hh" │ │ │ │ │ -285// 1d rules │ │ │ │ │ -286#include "quadraturerules/gausslobattoquadrature.hh" │ │ │ │ │ -287#include "quadraturerules/gaussquadrature.hh" │ │ │ │ │ -288#include "quadraturerules/gaussradauleftquadrature.hh" │ │ │ │ │ -289#include "quadraturerules/gaussradaurightquadrature.hh" │ │ │ │ │ -290#include "quadraturerules/jacobi1quadrature.hh" │ │ │ │ │ -291#include "quadraturerules/jacobi2quadrature.hh" │ │ │ │ │ -292#include "quadraturerules/jacobiNquadrature.hh" │ │ │ │ │ -293// 3d rules │ │ │ │ │ -294#include "quadraturerules/prismquadrature.hh" │ │ │ │ │ -295// general rules │ │ │ │ │ -296#include "quadraturerules/simplexquadrature.hh" │ │ │ │ │ -297#include "quadraturerules/tensorproductquadrature.hh" │ │ │ │ │ -298 │ │ │ │ │ -299#undef DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ -300 │ │ │ │ │ -301namespace _D_u_n_e { │ │ │ │ │ -302 │ │ │ │ │ -309 template │ │ │ │ │ -_3_1_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ -311 private: │ │ │ │ │ -312 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ -313 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) │ │ │ │ │ -314 { │ │ │ │ │ -315 return TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ │ -316 } │ │ │ │ │ -317 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) │ │ │ │ │ -318 { │ │ │ │ │ -319 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ │ -320 } │ │ │ │ │ -321 }; │ │ │ │ │ -322 │ │ │ │ │ -323 template │ │ │ │ │ -_3_2_4 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ -325 private: │ │ │ │ │ -_3_2_6 constexpr static int dim = 0; │ │ │ │ │ -327 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ -328 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) │ │ │ │ │ -329 { │ │ │ │ │ -330 if (t._i_s_V_e_r_t_e_x()) │ │ │ │ │ +176 int index() 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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ +193 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(nIntervals_)), │ │ │ │ │ +194 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(nIntervals_)) │ │ │ │ │ +195 { │ │ │ │ │ +196 if (end) │ │ │ │ │ +197 kuhnIndex = nKuhnSimplices; │ │ │ │ │ +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 ++backend; │ │ │ │ │ +206 if(backend == backendEnd) │ │ │ │ │ +207 { │ │ │ │ │ +208 backend = BackendRefinement::vBegin(nIntervals_); │ │ │ │ │ +209 ++kuhnIndex; │ │ │ │ │ +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_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(referenceToKuhn(backend.coords(), │ │ │ │ │ +219 getPermutation(kuhnIndex))); │ │ │ │ │ +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_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 │ │ │ │ │ +225 { │ │ │ │ │ +226 std::vector corners(1); │ │ │ │ │ +227 corners[0] = referenceToKuhn(backend.coords(), getPermutation │ │ │ │ │ +(kuhnIndex)); │ │ │ │ │ +228 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, 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 kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.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 increment(); │ │ │ │ │ +252 │ │ │ │ │ +253 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ +254 int index() const; │ │ │ │ │ +255 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +256 │ │ │ │ │ +257 _G_e_o_m_e_t_r_y geometry() 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 _R_e_f_i_n_e_m_e_n_t_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t _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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ +278 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(nIntervals_)), │ │ │ │ │ +279 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(nIntervals_)) │ │ │ │ │ +280 { │ │ │ │ │ +281 if (end) │ │ │ │ │ +282 kuhnIndex = nKuhnSimplices; │ │ │ │ │ +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 ++backend; │ │ │ │ │ +291 if (backend == backendEnd) │ │ │ │ │ +292 { │ │ │ │ │ +293 backend = BackendRefinement::eBegin(nIntervals_); │ │ │ │ │ +294 ++kuhnIndex; │ │ │ │ │ +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 = backend.vertexIndices(); │ │ │ │ │ +304 │ │ │ │ │ +305 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_); │ │ │ │ │ +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 kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.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(backend.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 return std::numeric_limits::max(); │ │ │ │ │ -333 } │ │ │ │ │ -334 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ -335 } │ │ │ │ │ -336 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) │ │ │ │ │ -337 { │ │ │ │ │ -338 if (t.isVertex()) │ │ │ │ │ -339 { │ │ │ │ │ -340 return PointQuadratureRule(); │ │ │ │ │ -341 } │ │ │ │ │ -342 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ -343 } │ │ │ │ │ -344 }; │ │ │ │ │ -345 │ │ │ │ │ -346 template │ │ │ │ │ -_3_4_7 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ -348 private: │ │ │ │ │ -_3_4_9 constexpr static int dim = 1; │ │ │ │ │ -350 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ -351 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) │ │ │ │ │ -352 { │ │ │ │ │ -353 if (t._i_s_L_i_n_e()) │ │ │ │ │ -354 { │ │ │ │ │ -355 switch (qt) { │ │ │ │ │ -356 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 : │ │ │ │ │ -357 return GaussQuadratureRule1D::highest_order; │ │ │ │ │ -358 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 : │ │ │ │ │ -359 return Jacobi1QuadratureRule1D::highest_order; │ │ │ │ │ -360 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 : │ │ │ │ │ -361 return Jacobi2QuadratureRule1D::highest_order; │ │ │ │ │ -362 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 : │ │ │ │ │ -363 return GaussLobattoQuadratureRule1D::highest_order; │ │ │ │ │ -364 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 : │ │ │ │ │ -365 return JacobiNQuadratureRule1D::maxOrder(); │ │ │ │ │ -366 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 : │ │ │ │ │ -367 return GaussRadauLeftQuadratureRule1D::highest_order; │ │ │ │ │ -368 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 : │ │ │ │ │ -369 return GaussRadauRightQuadratureRule1D::highest_order; │ │ │ │ │ -370 default : │ │ │ │ │ -371 DUNE_THROW(Exception, "Unknown QuadratureType"); │ │ │ │ │ -372 } │ │ │ │ │ -373 } │ │ │ │ │ -374 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ -375 } │ │ │ │ │ -376 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) │ │ │ │ │ -377 { │ │ │ │ │ -378 if (t.isLine()) │ │ │ │ │ -379 { │ │ │ │ │ -380 switch (qt) { │ │ │ │ │ -381 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 : │ │ │ │ │ -382 return GaussQuadratureRule1D(p); │ │ │ │ │ -383 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 : │ │ │ │ │ -384 return Jacobi1QuadratureRule1D(p); │ │ │ │ │ -385 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 : │ │ │ │ │ -386 return Jacobi2QuadratureRule1D(p); │ │ │ │ │ -387 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 : │ │ │ │ │ -388 return GaussLobattoQuadratureRule1D(p); │ │ │ │ │ -389 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 : │ │ │ │ │ -390 return JacobiNQuadratureRule1D(p); │ │ │ │ │ -391 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 : │ │ │ │ │ -392 return GaussRadauLeftQuadratureRule1D(p); │ │ │ │ │ -393 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 : │ │ │ │ │ -394 return GaussRadauRightQuadratureRule1D(p); │ │ │ │ │ -395 default : │ │ │ │ │ -396 DUNE_THROW(Exception, "Unknown QuadratureType"); │ │ │ │ │ -397 } │ │ │ │ │ -398 } │ │ │ │ │ -399 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ │ -400 } │ │ │ │ │ -401 }; │ │ │ │ │ -402 │ │ │ │ │ -403 template │ │ │ │ │ -_4_0_4 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ -405 private: │ │ │ │ │ -_4_0_6 constexpr static int dim = 2; │ │ │ │ │ -407 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ -408 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) │ │ │ │ │ -409 { │ │ │ │ │ -410 unsigned order = │ │ │ │ │ -411 TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ │ -412 if (t._i_s_S_i_m_p_l_e_x()) │ │ │ │ │ -413 order = std::max │ │ │ │ │ -414 (order, unsigned(SimplexQuadratureRule::highest_order)); │ │ │ │ │ -415 return order; │ │ │ │ │ -416 } │ │ │ │ │ -417 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) │ │ │ │ │ -418 { │ │ │ │ │ -419 if (t._i_s_S_i_m_p_l_e_x() │ │ │ │ │ -420 && ( 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 ) │ │ │ │ │ -421 && p <= SimplexQuadratureRule::highest_order) │ │ │ │ │ -422 { │ │ │ │ │ -423 return SimplexQuadratureRule(p); │ │ │ │ │ -424 } │ │ │ │ │ -425 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ │ -426 } │ │ │ │ │ -427 }; │ │ │ │ │ -428 │ │ │ │ │ -429 template │ │ │ │ │ -_4_3_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ │ -431 private: │ │ │ │ │ -_4_3_2 constexpr static int dim = 3; │ │ │ │ │ -433 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ │ -434 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) │ │ │ │ │ -435 { │ │ │ │ │ -436 unsigned order = │ │ │ │ │ -437 TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ │ -438 if (t._i_s_S_i_m_p_l_e_x()) │ │ │ │ │ -439 order = std::max │ │ │ │ │ -440 (order, unsigned(SimplexQuadratureRule::highest_order)); │ │ │ │ │ -441 if (t._i_s_P_r_i_s_m()) │ │ │ │ │ -442 order = std::max │ │ │ │ │ -443 (order, unsigned(PrismQuadratureRule::highest_order)); │ │ │ │ │ -444 return order; │ │ │ │ │ -445 } │ │ │ │ │ -446 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) │ │ │ │ │ -447 { │ │ │ │ │ -448 │ │ │ │ │ -449 if (t._i_s_S_i_m_p_l_e_x() │ │ │ │ │ -450 && ( 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 ) │ │ │ │ │ -451 && p <= SimplexQuadratureRule::highest_order) │ │ │ │ │ -452 { │ │ │ │ │ -453 return SimplexQuadratureRule(p); │ │ │ │ │ -454 } │ │ │ │ │ -455 if (t._i_s_P_r_i_s_m() │ │ │ │ │ -456 && 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 │ │ │ │ │ -457 && p <= PrismQuadratureRule::highest_order) │ │ │ │ │ -458 { │ │ │ │ │ -459 return PrismQuadratureRule(p); │ │ │ │ │ -460 } │ │ │ │ │ -461 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ │ -462 } │ │ │ │ │ -463 }; │ │ │ │ │ -464 │ │ │ │ │ -465#ifndef DUNE_NO_EXTERN_QUADRATURERULES │ │ │ │ │ -466 extern template class GaussLobattoQuadratureRule; │ │ │ │ │ -467 extern template class GaussQuadratureRule; │ │ │ │ │ -468 extern template class GaussRadauLeftQuadratureRule; │ │ │ │ │ -469 extern template class GaussRadauRightQuadratureRule; │ │ │ │ │ -470 extern template class Jacobi1QuadratureRule; │ │ │ │ │ -471 extern template class Jacobi2QuadratureRule; │ │ │ │ │ -472 extern template class JacobiNQuadratureRule; │ │ │ │ │ -473 extern template class PrismQuadratureRule; │ │ │ │ │ -474 extern template class SimplexQuadratureRule; │ │ │ │ │ -_4_7_5 extern template class SimplexQuadratureRule; │ │ │ │ │ -476#endif // !DUNE_NO_EXTERN_QUADRATURERULES │ │ │ │ │ -477 │ │ │ │ │ -478} // end namespace │ │ │ │ │ -479 │ │ │ │ │ -480#endif // DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ │ +332 const typename BackendIterator::Geometry & │ │ │ │ │ +333 bgeo = backend.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(referenceToKuhn(local, │ │ │ │ │ +348 getPermutation(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::_C_o_d_i_m:: │ │ │ │ │ +SubEntityIterator │ │ │ │ │ +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 SubEntityIterator _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_>_:_: │ │ │ │ │ +_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(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 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#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ │ +_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.... │ │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ _t_y_p_e_._h_h │ │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ │ -_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:21 │ │ │ │ │ -_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:82 │ │ │ │ │ -_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:119 │ │ │ │ │ -_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:106 │ │ │ │ │ -_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:144 │ │ │ │ │ -_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:99 │ │ │ │ │ -_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:145 │ │ │ │ │ -_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:127 │ │ │ │ │ -_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:135 │ │ │ │ │ -_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:92 │ │ │ │ │ -_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:36 │ │ │ │ │ -_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:44 │ │ │ │ │ -_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:62 │ │ │ │ │ -_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:53 │ │ │ │ │ -_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:50 │ │ │ │ │ -_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:68 │ │ │ │ │ -_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:75 │ │ │ │ │ -_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 │ │ │ │ │ +_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_:_:_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:336 │ │ │ │ │ +_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:394 │ │ │ │ │ +_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 │ │ │ │ │ +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 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_:_:_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 │ │ │ │ │ static constexpr int dimension │ │ │ │ │ -Dimension of the integration domain. │ │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:47 │ │ │ │ │ -_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:56 │ │ │ │ │ -_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:74 │ │ │ │ │ -_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:154 │ │ │ │ │ -_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:181 │ │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_d │ │ │ │ │ -static constexpr int d │ │ │ │ │ -The space dimension. │ │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:171 │ │ │ │ │ -_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:180 │ │ │ │ │ -_D_u_n_e_:_:_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 │ │ │ │ │ -int delivered_order │ │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:189 │ │ │ │ │ -_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:168 │ │ │ │ │ -_D_u_n_e_:_:_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 │ │ │ │ │ -GeometryType geometry_type │ │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:188 │ │ │ │ │ -_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:174 │ │ │ │ │ -_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:161 │ │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_o_r_d_e_r │ │ │ │ │ -virtual int order() const │ │ │ │ │ -return order │ │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:177 │ │ │ │ │ -_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:165 │ │ │ │ │ -_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:185 │ │ │ │ │ -_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:310 │ │ │ │ │ -_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:200 │ │ │ │ │ -_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:259 │ │ │ │ │ -_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:272 │ │ │ │ │ -_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:266 │ │ │ │ │ -_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:126 │ │ │ │ │ -_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:321 │ │ │ │ │ -_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:291 │ │ │ │ │ -_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:372 │ │ │ │ │ -_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:132 │ │ │ │ │ -_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:296 │ │ │ │ │ -_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:377 │ │ │ │ │ -_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:331 │ │ │ │ │ -_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 │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_:_:_C_o_d_i_m_:_:_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_ _>_:_:_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 │ │ │ │ │ +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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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 │ │ │ │ │ +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_ _>_:_:_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_ _>_:_:_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_ _>_:_:_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_:_:_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_<_ _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_:_:_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_:_:_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_:_:_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_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:433 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00209.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: multilineargeometry.hh File Reference │ │ │ │ +dune-geometry: base.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,63 +65,87 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
multilineargeometry.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Functions
│ │ │ │ +
base.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#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/affinegeometry.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ +
#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...
struct  Dune::RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension, Dummy >
 Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation. More...
 
class  Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >
 generic geometry implementation based on corner coordinates More...
class  Dune::RefinementIntervals
 Holds the number of refined intervals per axis needed for virtual and static refinement. More...
 
class  Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
class  Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension_ >
 Wrap each Refinement implementation to get a consistent interface. More...
 
class  Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >
 Implement a MultiLinearGeometry with additional caching. 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,44 +1,56 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#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_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ │ + * _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> │ │ │ │ │ _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_._._. │ │ │ │ │ +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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00209_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: multilineargeometry.hh Source File │ │ │ │ +dune-geometry: base.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,844 +70,199 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
multilineargeometry.hh
│ │ │ │ +
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 (C) DUNE 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
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ │
7
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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 >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ -
179 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
181 {
│ │ │ │ - │ │ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ -
205
│ │ │ │ -
207 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ │ -
208
│ │ │ │ -
210 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ │ +
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
│ │ │ │ -
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 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::template xTRightInvA< mydimension, coorddimension >( 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::template sqrtDetAAT< mydimension, coorddimension >( 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::template rightInvA< mydimension, coorddimension >( jt, static_cast< Base & >( *this ) );
│ │ │ │ -
495 }
│ │ │ │ -
│ │ │ │ -
496
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
498 {
│ │ │ │ -
499 detInv_ = MatrixHelper::template sqrtDetAAT< mydimension, coorddimension >( 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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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::template xTRightInvA< mydimension, coorddimension >( 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
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
An implementation of the Geometry interface for affine geometries.
│ │ │ │ - │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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:21
│ │ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ -
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
│ │ │ │ -
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ │ -
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
geometry dimension
Definition multilineargeometry.hh:189
│ │ │ │ -
Dune::GeometryType type() const
obtain the name of the reference element
Definition multilineargeometry.hh:269
│ │ │ │ -
Traits::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:225
│ │ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
type of global coordinates
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
coordinate type
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
coordinate dimension
Definition multilineargeometry.hh:191
│ │ │ │ -
int corners() const
obtain number of corners of the corresponding reference element
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
evaluate the inverse mapping
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
type of local coordinates
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
type of 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
type of jacobian transposed
Definition multilineargeometry.hh:201
│ │ │ │ -
ReferenceElements::ReferenceElement ReferenceElement
type of reference element
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
Type for the Jacobian matrix.
Definition multilineargeometry.hh:207
│ │ │ │ -
bool affine() const
is this mapping affine?
Definition multilineargeometry.hh:262
│ │ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
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
│ │ │ │ -
void setup(const JacobianTransposed &jt)
Definition multilineargeometry.hh:492
│ │ │ │ -
ctype det() const
Definition multilineargeometry.hh:502
│ │ │ │ -
ctype detInv() const
Definition multilineargeometry.hh:503
│ │ │ │ -
void setupDeterminant(const JacobianTransposed &jt)
Definition multilineargeometry.hh:497
│ │ │ │ -
Implement a MultiLinearGeometry with additional caching.
Definition multilineargeometry.hh:526
│ │ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:580
│ │ │ │ -
Base::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:534
│ │ │ │ -
bool affine() const
is this mapping affine?
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
evaluate the inverse mapping
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:126
│ │ │ │ +
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
│ │ │ │ +
typedef CoordVector
The CoordVector of the Refinement.
Definition base.cc:170
│ │ │ │ +
typedef IndexVector
The IndexVector of the Refinement.
Definition base.cc:177
│ │ │ │ +
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
The SubEntityIterator for each codim.
Definition base.cc:157
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1022 +1,223 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -multilineargeometry.hh │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ │ +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 (C) DUNE 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 │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ │ 7 │ │ │ │ │ -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_/_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ -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{ │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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; │ │ │ │ │ +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{ │ │ │ │ │ +_2_8 namespace RefinementImp │ │ │ │ │ +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 } │ │ │ │ │ +_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 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 _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; │ │ │ │ │ -205 │ │ │ │ │ -_2_0_7 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ │ -208 │ │ │ │ │ -_2_1_0 typedef FieldMatrix< ctype, mydimension, coorddimension > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ │ +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 │ │ │ │ │ -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 _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 _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 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 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 global< false >( _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::template xTRightInvA< mydimension, coorddimension > │ │ │ │ │ -( _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::template sqrtDetAAT< mydimension, coorddimension > │ │ │ │ │ -( _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 jacobianTransposed< false >( _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: │ │ │ │ │ -_4_9_2 void _s_e_t_u_p ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ -493 { │ │ │ │ │ -494 detInv_ = MatrixHelper::template rightInvA< mydimension, coorddimension > │ │ │ │ │ -( jt, static_cast< Base & >( *this ) ); │ │ │ │ │ -495 } │ │ │ │ │ -496 │ │ │ │ │ -_4_9_7 void _s_e_t_u_p_D_e_t_e_r_m_i_n_a_n_t ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ -498 { │ │ │ │ │ -499 detInv_ = MatrixHelper::template sqrtDetAAT< mydimension, coorddimension > │ │ │ │ │ -( jt ); │ │ │ │ │ -500 } │ │ │ │ │ -501 │ │ │ │ │ -_5_0_2 _c_t_y_p_e _d_e_t () const { return _c_t_y_p_e( 1 ) / detInv_; } │ │ │ │ │ -_5_0_3 _c_t_y_p_e _d_e_t_I_n_v () 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_ _> _B_a_s_e; │ │ │ │ │ -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 _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 _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 : _B_a_s_e( _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t, cornerStorage ), │ │ │ │ │ -553 affine_( _B_a_s_e::_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 : _B_a_s_e( gt, cornerStorage ), │ │ │ │ │ -561 affine_( _B_a_s_e::_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::template xTRightInvA< mydimension, coorddimension > │ │ │ │ │ -( 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_._s_e_t_u_p_D_e_t_e_r_m_i_n_a_n_t( jacobianTransposed_ ); │ │ │ │ │ -640 integrationElementComputed_ = true; │ │ │ │ │ -641 } │ │ │ │ │ -642 return jacobianInverseTransposed_._d_e_t_I_n_v(); │ │ │ │ │ -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_._s_e_t_u_p( 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 &local ) 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._s_e_t_u_p( 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 > │ │ │ │ │ -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 topologyId, 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(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, _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 < 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 > │ │ │ │ │ -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 topologyId, 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(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 _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 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< _c_t_y_p_e, 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 > │ │ │ │ │ -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 topologyId, 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( !affine( topologyId, 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(topologyId), mydimension, mydimension-dim │ │ │ │ │ -) ) │ │ │ │ │ -916 { │ │ │ │ │ -917 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d 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 _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 │ │ │ │ │ -_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. │ │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ +_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:21 │ │ │ │ │ -_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:170 │ │ │ │ │ -_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:188 │ │ │ │ │ -_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 │ │ │ │ │ -generic geometry implementation based on corner coordinates │ │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:181 │ │ │ │ │ -_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_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int mydimension │ │ │ │ │ -geometry dimension │ │ │ │ │ -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_:_:_t_y_p_e │ │ │ │ │ -Dune::GeometryType type() const │ │ │ │ │ -obtain the name of the reference element │ │ │ │ │ -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_:_:_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_:_:_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 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_:_:_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_:_:_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_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -coordinate type │ │ │ │ │ -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_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int coorddimension │ │ │ │ │ -coordinate dimension │ │ │ │ │ -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_o_r_n_e_r_s │ │ │ │ │ -int corners() const │ │ │ │ │ -obtain number of corners of the corresponding reference element │ │ │ │ │ -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_:_:_l_o_c_a_l │ │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &globalCoord) const │ │ │ │ │ -evaluate the inverse mapping │ │ │ │ │ -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_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ │ -type of local coordinates │ │ │ │ │ -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_:_:_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_:_:_V_o_l_u_m_e │ │ │ │ │ -ctype Volume │ │ │ │ │ -type of 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_:_:_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 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_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ -ReferenceElements::ReferenceElement ReferenceElement │ │ │ │ │ -type of reference element │ │ │ │ │ -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_:_:_J_a_c_o_b_i_a_n │ │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ │ -Type for the Jacobian matrix. │ │ │ │ │ -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_:_:_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 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_:_:_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_:_:_s_e_t_u_p │ │ │ │ │ -void setup(const JacobianTransposed &jt) │ │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:492 │ │ │ │ │ -_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_:_:_d_e_t │ │ │ │ │ -ctype det() const │ │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:502 │ │ │ │ │ -_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_:_:_d_e_t_I_n_v │ │ │ │ │ -ctype detInv() const │ │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:503 │ │ │ │ │ -_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_:_:_s_e_t_u_p_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -void setupDeterminant(const JacobianTransposed &jt) │ │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:497 │ │ │ │ │ -_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_:_:_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_:_:_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_:_:_a_f_f_i_n_e │ │ │ │ │ -bool affine() const │ │ │ │ │ -is this mapping affine? │ │ │ │ │ -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_:_:_l_o_c_a_l │ │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ -evaluate the inverse mapping │ │ │ │ │ -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_:_:_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_:_:_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_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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:126 │ │ │ │ │ +_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_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +typedef CoordVector │ │ │ │ │ +The CoordVector of the Refinement. │ │ │ │ │ +DDeeffiinniittiioonn base.cc:170 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +typedef IndexVector │ │ │ │ │ +The IndexVector of the Refinement. │ │ │ │ │ +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_:_:_C_o_d_i_m_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ │ +typedef SubEntityIterator │ │ │ │ │ +The SubEntityIterator for each codim. │ │ │ │ │ +DDeeffiinniittiioonn base.cc:157 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelementimplementation.cc File Reference │ │ │ │ +dune-geometry: prismtriangulation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,86 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
referenceelementimplementation.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Functions
│ │ │ │ +
prismtriangulation.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/geometry/referenceelementimplementation.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

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

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,17 +1,57 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -#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> │ │ │ │ │ + * _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 "_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___, │ │ │ │ │ + _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_:_:_G_e_o │ │ │ │ │ +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) │ │ │ │ │   │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPRRIISSMMTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typefromvertexcount.hh File Reference │ │ │ │ +dune-geometry: simplex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,111 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces | │ │ │ │ -Functions
│ │ │ │ -
typefromvertexcount.hh File Reference
│ │ │ │ +Macros
│ │ │ │ +
simplex.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │ +

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::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::Simplex
 This namespace contains the Refinement implementation for simplices (triangles, tetrahedrons...)
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Macros

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

│ │ │ │ Functions

GeometryType Dune::geometryTypeFromVertexCount (unsigned int dim, unsigned int vertices)
 Utitlity function to construct the correct geometry type given the dimension and the number of vertices.
 
Utilities
int Dune::RefinementImp::Simplex::factorial (int n)
 Calculate n!
 
int Dune::RefinementImp::Simplex::binomial (int upper, int lower)
 calculate $\left({upper}\atop{lower}\right)$
 
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.
 
│ │ │ │ +

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_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,95 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ + * _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> │ │ │ │ │ #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_ _> │ │ │ │ │ +  │ │ │ │ │ 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 │ │ │ │ │ +  │ │ │ │ │ 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) │ │ │ │ │ -  Utitlity function to construct the correct geometry type given │ │ │ │ │ - the dimension and the number of vertices. │ │ │ │ │ +Utilities │ │ │ │ │ + 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_:_:_f_a_c_t_o_r_i_a_l │ │ │ │ │ + (int n) │ │ │ │ │ +  Calculate n! │ │ │ │ │ +  │ │ │ │ │ + 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_:_:_b_i_n_o_m_i_a_l │ │ │ │ │ + (int upper, int lower) │ │ │ │ │ +  calculate[$\left({upper}\atop │ │ │ │ │ + {lower}\right)$] │ │ │ │ │ +  │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ +********** 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__GGRRIIDD__CCOOMMMMOONN__RREEFFIINNEEMMEENNTT__SSIIMMPPLLEEXX__CCCC ********** │ │ │ │ │ +#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typefromvertexcount.hh Source File │ │ │ │ +dune-geometry: simplex.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,77 +70,676 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
typefromvertexcount.hh
│ │ │ │ +
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 (C) DUNE 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_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │ +
6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10namespace Dune {
│ │ │ │ -
11
│ │ │ │ -
16 inline
│ │ │ │ -
│ │ │ │ -
17 GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
│ │ │ │ -
18 {
│ │ │ │ -
19 switch (dim)
│ │ │ │ -
20 {
│ │ │ │ -
21 case 0 :
│ │ │ │ -
22 return GeometryTypes::vertex;
│ │ │ │ -
23 case 1 :
│ │ │ │ -
24 return GeometryTypes::line;
│ │ │ │ -
25 case 2 :
│ │ │ │ -
26 switch (vertices) {
│ │ │ │ -
27 case 3 :
│ │ │ │ -
28 return GeometryTypes::triangle;
│ │ │ │ -
29 case 4 :
│ │ │ │ -
30 return GeometryTypes::quadrilateral;
│ │ │ │ -
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 GeometryTypes::tetrahedron;
│ │ │ │ -
38 case 5 :
│ │ │ │ -
39 return GeometryTypes::pyramid;
│ │ │ │ -
40 case 6 :
│ │ │ │ -
41 return GeometryTypes::prism;
│ │ │ │ -
42 case 8 :
│ │ │ │ -
43 return GeometryTypes::hexahedron;
│ │ │ │ -
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.
│ │ │ │ +
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
│ │ │ │ +
251#include <algorithm>
│ │ │ │ +
252
│ │ │ │ +
253#include <dune/common/fvector.hh>
│ │ │ │ +
254#include <dune/common/math.hh>
│ │ │ │ +
255
│ │ │ │ + │ │ │ │ + │ │ │ │ +
258#include <dune/geometry/type.hh>
│ │ │ │ +
259
│ │ │ │ +
260#include "base.cc"
│ │ │ │ +
261
│ │ │ │ +
262namespace Dune {
│ │ │ │ +
263
│ │ │ │ +
264 namespace RefinementImp {
│ │ │ │ +
265
│ │ │ │ +
│ │ │ │ +
272 namespace Simplex {
│ │ │ │ +
273
│ │ │ │ +
274 // //////////////////
│ │ │ │ +
275 //
│ │ │ │ +
277 //
│ │ │ │ +
278
│ │ │ │ +
280
│ │ │ │ +
288 [[deprecated("Use factorial from dune-common's math.hh")]]
│ │ │ │ +
│ │ │ │ +
289 inline int factorial(int n)
│ │ │ │ +
290 {
│ │ │ │ +
291 int prod = 1;
│ │ │ │ +
292 for(int i = 1; i <= n; ++i)
│ │ │ │ +
293 prod *= i;
│ │ │ │ +
294 return prod;
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
296
│ │ │ │ +
304 [[deprecated("Use binomial from dune-common's math.hh")]]
│ │ │ │ +
│ │ │ │ +
305 inline int binomial(int upper, int lower)
│ │ │ │ +
306 {
│ │ │ │ +
307 lower = std::min( lower, upper - lower );
│ │ │ │ +
308 if(lower < 0)
│ │ │ │ +
309 return 0;
│ │ │ │ +
310 int prod = 1;
│ │ │ │ +
311 for(int i = upper - lower; i < upper; ++i)
│ │ │ │ +
312 prod *= (i+1);
│ │ │ │ +
313 return prod / Dune::factorial(lower);
│ │ │ │ +
314 }
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
322 template<int dimension>
│ │ │ │ +
│ │ │ │ +
323 int pointIndex(const FieldVector<int, dimension> &point)
│ │ │ │ +
324 {
│ │ │ │ +
325 int index = 0;
│ │ │ │ +
326 for(int i = 0; i < dimension; ++i)
│ │ │ │ +
327 index += Dune::binomial(dimension-i + point[i]-1, dimension-i);
│ │ │ │ +
328 return index;
│ │ │ │ +
329 }
│ │ │ │ +
│ │ │ │ +
330
│ │ │ │ +
335 template<int n>
│ │ │ │ +
│ │ │ │ +
336 FieldVector<int, n> getPermutation(int m)
│ │ │ │ +
337 {
│ │ │ │ +
338 FieldVector<int, n> perm;
│ │ │ │ +
339 for(int i = 0; i < n; ++i)
│ │ │ │ +
340 perm[i] = i;
│ │ │ │ +
341
│ │ │ │ +
342 int base = 1;
│ │ │ │ +
343 for(int i = 1; i <= n; ++i)
│ │ │ │ +
344 base *= i;
│ │ │ │ +
345
│ │ │ │ +
346 for(int i = n; i > 0; --i) {
│ │ │ │ +
347 base /= i;
│ │ │ │ +
348 int d = m / base;
│ │ │ │ +
349 m %= base;
│ │ │ │ +
350 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t;
│ │ │ │ +
351 }
│ │ │ │ +
352 return perm;
│ │ │ │ +
353 }
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
355#if 0
│ │ │ │ +
356 Has to be checked
│ │ │ │ +
357 // calculate the index of a permutation
│ │ │ │ +
358 template<int n>
│ │ │ │ +
359 int getPermIndex(const FieldVector<int, n>& test) // O(n^2)
│ │ │ │ +
360 {
│ │ │ │ +
361 int m = 0;
│ │ │ │ +
362 FieldVector<int, n> perm;
│ │ │ │ +
363 for(int i = 0; i < n; ++i)
│ │ │ │ +
364 perm[i] = i;
│ │ │ │ +
365
│ │ │ │ +
366 int base = 1;
│ │ │ │ +
367 for(int i = 1; i <= n; ++i)
│ │ │ │ +
368 base *= i;
│ │ │ │ +
369
│ │ │ │ +
370 for(int i = n; i > 0; --i) {
│ │ │ │ +
371 base /= i;
│ │ │ │ +
372 int d;
│ │ │ │ +
373 for(d = 0; d < i; ++d)
│ │ │ │ +
374 if(test[i-1] == perm[i-1-d])
│ │ │ │ +
375 break;
│ │ │ │ +
376 m += d * base;
│ │ │ │ +
377 int d = m / base;
│ │ │ │ +
378 m %= base;
│ │ │ │ +
379 perm[i-1-d] = perm[i-1];
│ │ │ │ +
380 }
│ │ │ │ +
381 }
│ │ │ │ +
382#endif
│ │ │ │ +
383
│ │ │ │ +
384 // map between the reference simplex and some arbitrary kuhn simplex (denoted by it's permutation)
│ │ │ │ +
392 template<int dimension, class CoordType>
│ │ │ │ +
393 FieldVector<CoordType, dimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
395 FieldVector<CoordType, dimension> point,
│ │ │ │ +
397 const FieldVector<int, dimension> &kuhn)
│ │ │ │ +
398 {
│ │ │ │ +
399 for(int i = dimension - 1; i > 0; --i)
│ │ │ │ +
400 point[kuhn[i-1]] += point[kuhn[i]];
│ │ │ │ +
401 return point;
│ │ │ │ +
402 }
│ │ │ │ +
│ │ │ │ +
403
│ │ │ │ +
411 template<int dimension, class CoordType>
│ │ │ │ +
412 FieldVector<CoordType, dimension>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
414 FieldVector<CoordType, dimension> point,
│ │ │ │ +
416 const FieldVector<int, dimension> &kuhn)
│ │ │ │ +
417 {
│ │ │ │ +
418 for(int i = 0; i < dimension - 1; ++i)
│ │ │ │ +
419 point[kuhn[i]] -= point[kuhn[i+1]];
│ │ │ │ +
420 return point;
│ │ │ │ +
421 }
│ │ │ │ +
│ │ │ │ +
422
│ │ │ │ +
423
│ │ │ │ +
425
│ │ │ │ +
426 // /////////////////////////////////////////
│ │ │ │ +
427 //
│ │ │ │ +
428 // refinement implementation for simplices
│ │ │ │ +
429 //
│ │ │ │ +
430
│ │ │ │ +
431 template<int dimension_, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
433 {
│ │ │ │ +
434 public:
│ │ │ │ +
435 constexpr static int dimension = dimension_;
│ │ │ │ +
436 typedef CoordType ctype;
│ │ │ │ +
437
│ │ │ │ +
438 template<int codimension>
│ │ │ │ +
439 struct Codim;
│ │ │ │ + │ │ │ │ +
441 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ │ + │ │ │ │ +
443 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ │ +
444
│ │ │ │ +
445 static int nVertices(int nIntervals);
│ │ │ │ +
446 static VertexIterator vBegin(int nIntervals);
│ │ │ │ +
447 static VertexIterator vEnd(int nIntervals);
│ │ │ │ +
448
│ │ │ │ +
449 static int nElements(int nIntervals);
│ │ │ │ +
450 static ElementIterator eBegin(int nIntervals);
│ │ │ │ +
451 static ElementIterator eEnd(int nIntervals);
│ │ │ │ +
452 };
│ │ │ │ +
│ │ │ │ +
453
│ │ │ │ +
454 template<int dimension, class CoordType>
│ │ │ │ +
455 template<int codimension>
│ │ │ │ +
│ │ │ │ +
456 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ │ +
457 {
│ │ │ │ +
458 class SubEntityIterator;
│ │ │ │ +
459 // We don't need the caching, but the uncached MultiLinearGeometry has bug FS#1209
│ │ │ │ + │ │ │ │ +
461 };
│ │ │ │ +
│ │ │ │ +
462
│ │ │ │ +
463 template<int dimension, class CoordType>
│ │ │ │ +
464 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
466 nVertices(int nIntervals)
│ │ │ │ +
467 {
│ │ │ │ +
468 return Dune::binomial(dimension + nIntervals, (int)dimension);
│ │ │ │ +
469 }
│ │ │ │ +
│ │ │ │ +
470
│ │ │ │ +
471 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
474 vBegin(int nIntervals)
│ │ │ │ +
475 {
│ │ │ │ +
476 return VertexIterator(nIntervals);
│ │ │ │ +
477 }
│ │ │ │ +
│ │ │ │ +
478
│ │ │ │ +
479 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
482 vEnd(int nIntervals)
│ │ │ │ +
483 {
│ │ │ │ +
484 return VertexIterator(nIntervals, true);
│ │ │ │ +
485 }
│ │ │ │ +
│ │ │ │ +
486
│ │ │ │ +
487 template<int dimension, class CoordType>
│ │ │ │ +
488 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
490 nElements(int nIntervals)
│ │ │ │ +
491 {
│ │ │ │ +
492 return Dune::power(nIntervals, int(dimension));
│ │ │ │ +
493 }
│ │ │ │ +
│ │ │ │ +
494
│ │ │ │ +
495 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
498 eBegin(int nIntervals)
│ │ │ │ +
499 {
│ │ │ │ +
500 return ElementIterator(nIntervals);
│ │ │ │ +
501 }
│ │ │ │ +
│ │ │ │ +
502
│ │ │ │ +
503 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
506 eEnd(int nIntervals)
│ │ │ │ +
507 {
│ │ │ │ +
508 return ElementIterator(nIntervals, true);
│ │ │ │ +
509 }
│ │ │ │ +
│ │ │ │ +
510
│ │ │ │ +
511 // //////////////
│ │ │ │ +
512 //
│ │ │ │ +
513 // The iterator
│ │ │ │ +
514 //
│ │ │ │ +
515
│ │ │ │ +
516 template<int dimension, class CoordType, int codimension>
│ │ │ │ + │ │ │ │ +
518
│ │ │ │ +
519 // vertices
│ │ │ │ +
520
│ │ │ │ +
521 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
522 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ │ +
523 {
│ │ │ │ +
524 public:
│ │ │ │ + │ │ │ │ +
526 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
527 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ │ + │ │ │ │ +
529
│ │ │ │ +
530 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ │ +
531
│ │ │ │ +
532 void increment();
│ │ │ │ +
533 bool equals(const This &other) const;
│ │ │ │ +
534
│ │ │ │ +
535 CoordVector coords() const;
│ │ │ │ +
536 Geometry geometry () const;
│ │ │ │ +
537
│ │ │ │ +
538 int index() const;
│ │ │ │ +
539 protected:
│ │ │ │ +
540 typedef FieldVector<int, dimension> Vertex;
│ │ │ │ +
541
│ │ │ │ +
542 int size;
│ │ │ │ + │ │ │ │ +
544 };
│ │ │ │ +
│ │ │ │ +
545
│ │ │ │ +
546 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
548 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ │ +
549 : size(nIntervals)
│ │ │ │ +
550 {
│ │ │ │ +
551 vertex[0] = (end) ? size + 1 : 0;
│ │ │ │ +
552 for(int i = 1; i < dimension; ++ i)
│ │ │ │ +
553 vertex[i] = 0;
│ │ │ │ +
554 }
│ │ │ │ +
│ │ │ │ +
555
│ │ │ │ +
556 template<int dimension, class CoordType>
│ │ │ │ +
557 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
560 {
│ │ │ │ +
561 assert(vertex[0] <= size);
│ │ │ │ +
562 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ │ +
563 ++vertex[i];
│ │ │ │ +
564 if(i == 0 || vertex[i] <= vertex[i-1])
│ │ │ │ +
565 break;
│ │ │ │ +
566 else
│ │ │ │ +
567 vertex[i] = 0;
│ │ │ │ +
568 }
│ │ │ │ +
569 }
│ │ │ │ +
│ │ │ │ +
570
│ │ │ │ +
571 template<int dimension, class CoordType>
│ │ │ │ +
572 bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
574 equals(const This &other) const
│ │ │ │ +
575 {
│ │ │ │ +
576 return size == other.size && vertex == other.vertex;
│ │ │ │ +
577 }
│ │ │ │ +
│ │ │ │ +
578
│ │ │ │ +
579 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
582 coords() const
│ │ │ │ +
583 {
│ │ │ │ +
584 Vertex ref = kuhnToReference(vertex, getPermutation<dimension>(0));
│ │ │ │ +
585
│ │ │ │ +
586 CoordVector coords;
│ │ │ │ +
587 for(int i = 0; i < dimension; ++i)
│ │ │ │ +
588 coords[i] = CoordType(ref[i]) / size;
│ │ │ │ +
589 return coords;
│ │ │ │ +
590 }
│ │ │ │ +
│ │ │ │ +
591
│ │ │ │ +
592 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
595 {
│ │ │ │ +
596 std::vector<CoordVector> corners(1);
│ │ │ │ +
597 corners[0] = (CoordVector)vertex;
│ │ │ │ +
598 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ +
599 }
│ │ │ │ +
│ │ │ │ +
600
│ │ │ │ +
601 template<int dimension, class CoordType>
│ │ │ │ +
602 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
604 index() const
│ │ │ │ +
605 {
│ │ │ │ +
606 return pointIndex(vertex);
│ │ │ │ +
607 }
│ │ │ │ +
│ │ │ │ +
608
│ │ │ │ +
609 // elements
│ │ │ │ +
610
│ │ │ │ +
611 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
612 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ │ +
613 {
│ │ │ │ +
614 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
618 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ │ + │ │ │ │ +
620
│ │ │ │ +
621 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ │ +
622
│ │ │ │ +
623 void increment();
│ │ │ │ +
624 bool equals(const This &other) const;
│ │ │ │ +
625
│ │ │ │ +
626 IndexVector vertexIndices() const;
│ │ │ │ +
627 int index() const;
│ │ │ │ +
628 CoordVector coords() const;
│ │ │ │ +
629
│ │ │ │ +
630 Geometry geometry () const;
│ │ │ │ +
631
│ │ │ │ +
632 private:
│ │ │ │ +
633 CoordVector global(const CoordVector &local) const;
│ │ │ │ +
634
│ │ │ │ +
635 protected:
│ │ │ │ +
636 typedef FieldVector<int, dimension> Vertex;
│ │ │ │ +
637 constexpr static int nKuhnIntervals = Dune::factorial(dimension);
│ │ │ │ +
638
│ │ │ │ + │ │ │ │ + │ │ │ │ +
641 int size;
│ │ │ │ + │ │ │ │ +
643 };
│ │ │ │ +
│ │ │ │ +
644
│ │ │ │ +
645 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
647 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ │ +
648 : kuhnIndex(0), size(nIntervals), index_(0)
│ │ │ │ +
649 {
│ │ │ │ +
650 for(int i = 0; i < dimension; ++i)
│ │ │ │ +
651 origin[i] = 0;
│ │ │ │ +
652 if(end) {
│ │ │ │ +
653 index_ = Refinement::nElements(nIntervals);
│ │ │ │ +
654 origin[0] = size;
│ │ │ │ +
655 }
│ │ │ │ +
656 }
│ │ │ │ +
│ │ │ │ +
657
│ │ │ │ +
658 template<int dimension, class CoordType>
│ │ │ │ +
659 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
662 {
│ │ │ │ +
663 assert(origin[0] < size);
│ │ │ │ +
664
│ │ │ │ +
665 ++index_;
│ │ │ │ +
666
│ │ │ │ +
667 while(1) {
│ │ │ │ +
668 ++kuhnIndex;
│ │ │ │ +
669 if(kuhnIndex == nKuhnIntervals) {
│ │ │ │ +
670 kuhnIndex = 0;
│ │ │ │ +
671 // increment origin
│ │ │ │ +
672 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ │ +
673 ++origin[i];
│ │ │ │ +
674 if(i == 0 || origin[i] <= origin[i-1])
│ │ │ │ +
675 break;
│ │ │ │ +
676 else
│ │ │ │ +
677 origin[i] = 0;
│ │ │ │ +
678 }
│ │ │ │ +
679 }
│ │ │ │ +
680
│ │ │ │ +
681 // test whether the current simplex has any corner outside the kuhn0 simplex
│ │ │ │ +
682 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ │ +
683 Vertex corner = origin;
│ │ │ │ +
684 bool outside = false;
│ │ │ │ +
685 for(int i = 0; i < dimension; ++i) {
│ │ │ │ +
686 // next corner
│ │ │ │ +
687 ++corner[perm[i]];
│ │ │ │ +
688 if(perm[i] > 0)
│ │ │ │ +
689 if(corner[perm[i]] > corner[perm[i]-1]) {
│ │ │ │ +
690 outside = true;
│ │ │ │ +
691 break;
│ │ │ │ +
692 }
│ │ │ │ +
693 }
│ │ │ │ +
694 if(!outside)
│ │ │ │ +
695 return;
│ │ │ │ +
696 }
│ │ │ │ +
697 }
│ │ │ │ +
│ │ │ │ +
698
│ │ │ │ +
699 template<int dimension, class CoordType>
│ │ │ │ +
700 bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
702 equals(const This &other) const
│ │ │ │ +
703 {
│ │ │ │ +
704 return size == other.size && index_ == other.index_;
│ │ │ │ +
705 }
│ │ │ │ +
│ │ │ │ +
706
│ │ │ │ +
707 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
710 vertexIndices() const
│ │ │ │ +
711 {
│ │ │ │ +
712 IndexVector indices;
│ │ │ │ +
713 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ │ +
714 Vertex vertex = origin;
│ │ │ │ +
715 indices[0] = pointIndex(vertex);
│ │ │ │ +
716 for(int i = 0; i < dimension; ++i) {
│ │ │ │ +
717 ++vertex[perm[i]];
│ │ │ │ +
718 indices[i+1] = pointIndex(vertex);
│ │ │ │ +
719 }
│ │ │ │ +
720 if (kuhnIndex%2 == 1)
│ │ │ │ +
721 for(int i = 0; i < (dimension+1)/2; ++i) {
│ │ │ │ +
722 int t = indices[i];
│ │ │ │ +
723 indices[i] = indices[dimension-i];
│ │ │ │ +
724 indices[dimension-i] = t;
│ │ │ │ +
725 }
│ │ │ │ +
726 return indices;
│ │ │ │ +
727 }
│ │ │ │ +
│ │ │ │ +
728
│ │ │ │ +
729 template<int dimension, class CoordType>
│ │ │ │ +
730 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
732 index() const
│ │ │ │ +
733 {
│ │ │ │ +
734 return index_;
│ │ │ │ +
735 }
│ │ │ │ +
│ │ │ │ +
736
│ │ │ │ +
737 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
740 coords() const
│ │ │ │ +
741 {
│ │ │ │ + │ │ │ │ +
743 ::simplex().position(0,0));
│ │ │ │ +
744 }
│ │ │ │ +
│ │ │ │ +
745
│ │ │ │ +
746 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
749 {
│ │ │ │ +
750 std::vector<CoordVector> corners(dimension+1);
│ │ │ │ + │ │ │ │ +
752 for(int i = 0; i <= dimension; ++i)
│ │ │ │ +
753 corners[i] = global(refelem.position(i, dimension));
│ │ │ │ +
754 return Geometry(refelem.type(), corners);
│ │ │ │ +
755 }
│ │ │ │ +
│ │ │ │ +
756
│ │ │ │ +
757 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
760 global(const CoordVector &local) const {
│ │ │ │ +
761 CoordVector v =
│ │ │ │ +
762 referenceToKuhn(local, getPermutation<dimension>(kuhnIndex));
│ │ │ │ +
763 v += origin;
│ │ │ │ +
764 v /= (typename CoordVector::value_type)size;
│ │ │ │ +
765 return kuhnToReference(v, getPermutation<dimension>(0));
│ │ │ │ +
766 }
│ │ │ │ +
767
│ │ │ │ +
768 // common
│ │ │ │ +
769
│ │ │ │ +
770 template<int dimension, class CoordType>
│ │ │ │ +
771 template<int codimension>
│ │ │ │ +
│ │ │ │ +
772 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ │ +
773 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ +
774 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ +
775 {
│ │ │ │ +
776 public:
│ │ │ │ + │ │ │ │ +
778
│ │ │ │ +
779 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ │ +
780 };
│ │ │ │ +
│ │ │ │ +
781
│ │ │ │ +
782#ifndef DOXYGEN
│ │ │ │ +
783
│ │ │ │ +
784 template<int dimension, class CoordType>
│ │ │ │ +
785 template<int codimension>
│ │ │ │ + │ │ │ │ +
787 SubEntityIterator(int nIntervals, bool end)
│ │ │ │ +
788 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ │ +
789 {}
│ │ │ │ +
790
│ │ │ │ +
791#endif
│ │ │ │ +
792
│ │ │ │ +
793 } // namespace Simplex
│ │ │ │ +
│ │ │ │ +
794
│ │ │ │ +
795 } // namespace RefinementImp
│ │ │ │ +
796
│ │ │ │ +
797
│ │ │ │ +
798 namespace RefinementImp {
│ │ │ │ +
799
│ │ │ │ +
800 // ///////////////////////
│ │ │ │ +
801 //
│ │ │ │ +
802 // The refinement traits
│ │ │ │ +
803 //
│ │ │ │ +
804
│ │ │ │ +
805#ifndef DOXYGEN
│ │ │ │ +
806 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ │ +
807 int dim>
│ │ │ │ +
808 struct Traits<
│ │ │ │ +
809 topologyId, CoordType, coerceToId, dim,
│ │ │ │ +
810 typename std::enable_if<
│ │ │ │ +
811 ((GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ │ +
812 (topologyId >> 1) &&
│ │ │ │ +
813 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ │ +
814 (coerceToId >> 1)
│ │ │ │ +
815 )>::type
│ │ │ │ +
816 >
│ │ │ │ +
817 {
│ │ │ │ +
818 typedef Simplex::RefinementImp<dim, CoordType> Imp;
│ │ │ │ +
819 };
│ │ │ │ +
820#endif
│ │ │ │ +
821
│ │ │ │ +
822
│ │ │ │ +
823 } // namespace RefinementImp
│ │ │ │ +
824
│ │ │ │ +
825} // namespace Dune
│ │ │ │ +
826
│ │ │ │ +
827#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
Utitlity function to construct the correct geometry type given the dimension and the number of vertic...
Definition typefromvertexcount.hh:17
│ │ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ +
int pointIndex(const FieldVector< int, dimension > &point)
calculate the index of a given gridpoint within a Kuhn0 simplex
Definition simplex.cc:323
│ │ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:336
│ │ │ │ +
int factorial(int n)
Calculate n!
Definition simplex.cc:289
│ │ │ │ +
int binomial(int upper, int lower)
calculate
Definition simplex.cc:305
│ │ │ │ +
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:394
│ │ │ │ +
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:413
│ │ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ +
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:204
│ │ │ │ +
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:440
│ │ │ │ +
FieldVector< int, dimension+1 > IndexVector
Definition simplex.cc:443
│ │ │ │ +
CoordType ctype
Definition simplex.cc:436
│ │ │ │ +
static int nVertices(int nIntervals)
Definition simplex.cc:466
│ │ │ │ +
static int nElements(int nIntervals)
Definition simplex.cc:490
│ │ │ │ +
static ElementIterator eEnd(int nIntervals)
Definition simplex.cc:506
│ │ │ │ +
static VertexIterator vEnd(int nIntervals)
Definition simplex.cc:482
│ │ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition simplex.cc:442
│ │ │ │ +
static VertexIterator vBegin(int nIntervals)
Definition simplex.cc:474
│ │ │ │ +
static ElementIterator eBegin(int nIntervals)
Definition simplex.cc:498
│ │ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition simplex.cc:441
│ │ │ │ +
static constexpr int dimension
Definition simplex.cc:435
│ │ │ │ + │ │ │ │ +
Dune::CachedMultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition simplex.cc:460
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:525
│ │ │ │ + │ │ │ │ +
Refinement::template Codim< dimension >::Geometry Geometry
Definition simplex.cc:527
│ │ │ │ +
RefinementIteratorSpecial< dimension, CoordType, dimension > This
Definition simplex.cc:528
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
FieldVector< int, dimension > Vertex
Definition simplex.cc:636
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition simplex.cc:618
│ │ │ │ + │ │ │ │ + │ │ │ │ +
RefinementIteratorSpecial< dimension, CoordType, 0 > This
Definition simplex.cc:619
│ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:615
│ │ │ │ + │ │ │ │ + │ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:777
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,79 +1,738 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ │ +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 (C) DUNE 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_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ +_6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ 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 │ │ │ │ │ -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 GeometryTypes::vertex; │ │ │ │ │ -23 case 1 : │ │ │ │ │ -24 return GeometryTypes::line; │ │ │ │ │ -25 case 2 : │ │ │ │ │ -26 switch (vertices) { │ │ │ │ │ -27 case 3 : │ │ │ │ │ -28 return GeometryTypes::triangle; │ │ │ │ │ -29 case 4 : │ │ │ │ │ -30 return GeometryTypes::quadrilateral; │ │ │ │ │ -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 GeometryTypes::tetrahedron; │ │ │ │ │ -38 case 5 : │ │ │ │ │ -39 return GeometryTypes::pyramid; │ │ │ │ │ -40 case 6 : │ │ │ │ │ -41 return GeometryTypes::prism; │ │ │ │ │ -42 case 8 : │ │ │ │ │ -43 return GeometryTypes::hexahedron; │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ +251#include │ │ │ │ │ +252 │ │ │ │ │ +253#include │ │ │ │ │ +254#include │ │ │ │ │ +255 │ │ │ │ │ +256#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> │ │ │ │ │ +257#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> │ │ │ │ │ +258#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ │ +259 │ │ │ │ │ +260#include "_b_a_s_e_._c_c" │ │ │ │ │ +261 │ │ │ │ │ +262namespace _D_u_n_e { │ │ │ │ │ +263 │ │ │ │ │ +264 namespace RefinementImp { │ │ │ │ │ +265 │ │ │ │ │ +_2_7_2 namespace Simplex { │ │ │ │ │ +273 │ │ │ │ │ +274 // ////////////////// │ │ │ │ │ +275 // │ │ │ │ │ +277 // │ │ │ │ │ +278 │ │ │ │ │ +280 │ │ │ │ │ +288 [[deprecated("Use factorial from dune-common's math.hh")]] │ │ │ │ │ +_2_8_9 inline int _f_a_c_t_o_r_i_a_l(int n) │ │ │ │ │ +290 { │ │ │ │ │ +291 int prod = 1; │ │ │ │ │ +292 for(int i = 1; i <= n; ++i) │ │ │ │ │ +293 prod *= i; │ │ │ │ │ +294 return prod; │ │ │ │ │ +295 } │ │ │ │ │ +296 │ │ │ │ │ +304 [[deprecated("Use binomial from dune-common's math.hh")]] │ │ │ │ │ +_3_0_5 inline int _b_i_n_o_m_i_a_l(int upper, int lower) │ │ │ │ │ +306 { │ │ │ │ │ +307 lower = std::min( lower, upper - lower ); │ │ │ │ │ +308 if(lower < 0) │ │ │ │ │ +309 return 0; │ │ │ │ │ +310 int prod = 1; │ │ │ │ │ +311 for(int i = upper - lower; i < upper; ++i) │ │ │ │ │ +312 prod *= (i+1); │ │ │ │ │ +313 return prod / Dune::factorial(lower); │ │ │ │ │ +314 } │ │ │ │ │ +315 │ │ │ │ │ +322 template │ │ │ │ │ +_3_2_3 int _p_o_i_n_t_I_n_d_e_x(const FieldVector &point) │ │ │ │ │ +324 { │ │ │ │ │ +325 int index = 0; │ │ │ │ │ +326 for(int i = 0; i < dimension; ++i) │ │ │ │ │ +327 index += Dune::binomial(dimension-i + point[i]-1, dimension-i); │ │ │ │ │ +328 return index; │ │ │ │ │ +329 } │ │ │ │ │ +330 │ │ │ │ │ +335 template │ │ │ │ │ +_3_3_6 FieldVector _g_e_t_P_e_r_m_u_t_a_t_i_o_n(int m) │ │ │ │ │ +337 { │ │ │ │ │ +338 FieldVector perm; │ │ │ │ │ +339 for(int i = 0; i < n; ++i) │ │ │ │ │ +340 perm[i] = i; │ │ │ │ │ +341 │ │ │ │ │ +342 int base = 1; │ │ │ │ │ +343 for(int i = 1; i <= n; ++i) │ │ │ │ │ +344 base *= i; │ │ │ │ │ +345 │ │ │ │ │ +346 for(int i = n; i > 0; --i) { │ │ │ │ │ +347 base /= i; │ │ │ │ │ +348 int d = m / base; │ │ │ │ │ +349 m %= base; │ │ │ │ │ +350 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t; │ │ │ │ │ +351 } │ │ │ │ │ +352 return perm; │ │ │ │ │ +353 } │ │ │ │ │ +354 │ │ │ │ │ +355#if 0 │ │ │ │ │ +356 Has to be checked │ │ │ │ │ +357 // calculate the index of a permutation │ │ │ │ │ +358 template │ │ │ │ │ +359 int getPermIndex(const FieldVector& test) // O(n^2) │ │ │ │ │ +360 { │ │ │ │ │ +361 int m = 0; │ │ │ │ │ +362 FieldVector perm; │ │ │ │ │ +363 for(int i = 0; i < n; ++i) │ │ │ │ │ +364 perm[i] = i; │ │ │ │ │ +365 │ │ │ │ │ +366 int base = 1; │ │ │ │ │ +367 for(int i = 1; i <= n; ++i) │ │ │ │ │ +368 base *= i; │ │ │ │ │ +369 │ │ │ │ │ +370 for(int i = n; i > 0; --i) { │ │ │ │ │ +371 base /= i; │ │ │ │ │ +372 int d; │ │ │ │ │ +373 for(d = 0; d < i; ++d) │ │ │ │ │ +374 if(test[i-1] == perm[i-1-d]) │ │ │ │ │ +375 break; │ │ │ │ │ +376 m += d * base; │ │ │ │ │ +377 int d = m / base; │ │ │ │ │ +378 m %= base; │ │ │ │ │ +379 perm[i-1-d] = perm[i-1]; │ │ │ │ │ +380 } │ │ │ │ │ +381 } │ │ │ │ │ +382#endif │ │ │ │ │ +383 │ │ │ │ │ +384 // map between the reference simplex and some arbitrary kuhn simplex │ │ │ │ │ +(denoted by it's permutation) │ │ │ │ │ +392 template │ │ │ │ │ +393 FieldVector │ │ │ │ │ +_3_9_4 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n( │ │ │ │ │ +395 FieldVector point, │ │ │ │ │ +397 const FieldVector &kuhn) │ │ │ │ │ +398 { │ │ │ │ │ +399 for(int i = dimension - 1; i > 0; --i) │ │ │ │ │ +400 point[kuhn[i-1]] += point[kuhn[i]]; │ │ │ │ │ +401 return point; │ │ │ │ │ +402 } │ │ │ │ │ +403 │ │ │ │ │ +411 template │ │ │ │ │ +412 FieldVector │ │ │ │ │ +_4_1_3 _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e( │ │ │ │ │ +414 FieldVector point, │ │ │ │ │ +416 const FieldVector &kuhn) │ │ │ │ │ +417 { │ │ │ │ │ +418 for(int i = 0; i < dimension - 1; ++i) │ │ │ │ │ +419 point[kuhn[i]] -= point[kuhn[i+1]]; │ │ │ │ │ +420 return point; │ │ │ │ │ +421 } │ │ │ │ │ +422 │ │ │ │ │ +423 │ │ │ │ │ +425 │ │ │ │ │ +426 // ///////////////////////////////////////// │ │ │ │ │ +427 // │ │ │ │ │ +428 // refinement implementation for simplices │ │ │ │ │ +429 // │ │ │ │ │ +430 │ │ │ │ │ +431 template │ │ │ │ │ +_4_3_2 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +433 { │ │ │ │ │ +434 public: │ │ │ │ │ +_4_3_5 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ │ +_4_3_6 typedef CoordType _c_t_y_p_e; │ │ │ │ │ +437 │ │ │ │ │ +438 template │ │ │ │ │ +439 struct _C_o_d_i_m; │ │ │ │ │ +_4_4_0 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; │ │ │ │ │ +_4_4_1 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +_4_4_2 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; │ │ │ │ │ +_4_4_3 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +444 │ │ │ │ │ +445 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ +446 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ +447 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ +448 │ │ │ │ │ +449 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ +450 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ │ +451 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ │ +452 }; │ │ │ │ │ +453 │ │ │ │ │ +454 template │ │ │ │ │ +455 template │ │ │ │ │ +_4_5_6 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ +457 { │ │ │ │ │ +458 class SubEntityIterator; │ │ │ │ │ +459 // We don't need the caching, but the uncached MultiLinearGeometry has bug │ │ │ │ │ +FS#1209 │ │ │ │ │ +_4_6_0 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 _G_e_o_m_e_t_r_y; │ │ │ │ │ +461 }; │ │ │ │ │ +462 │ │ │ │ │ +463 template │ │ │ │ │ +464 int │ │ │ │ │ +_4_6_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_>_:_: │ │ │ │ │ +466_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ │ +467 { │ │ │ │ │ +468 return Dune::binomial(dimension + nIntervals, (int)dimension); │ │ │ │ │ +469 } │ │ │ │ │ +470 │ │ │ │ │ +471 template │ │ │ │ │ +472 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_7_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_>_:_: │ │ │ │ │ +474_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ │ +475 { │ │ │ │ │ +476 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ │ +477 } │ │ │ │ │ +478 │ │ │ │ │ +479 template │ │ │ │ │ +480 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_8_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_>_:_: │ │ │ │ │ +482_ _v_E_n_d(int nIntervals) │ │ │ │ │ +483 { │ │ │ │ │ +484 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ │ +485 } │ │ │ │ │ +486 │ │ │ │ │ +487 template │ │ │ │ │ +488 int │ │ │ │ │ +_4_8_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_>_:_: │ │ │ │ │ +490_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ │ +491 { │ │ │ │ │ +492 return Dune::power(nIntervals, int(dimension)); │ │ │ │ │ +493 } │ │ │ │ │ +494 │ │ │ │ │ +495 template │ │ │ │ │ +496 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_9_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_>_:_: │ │ │ │ │ +498_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ │ +499 { │ │ │ │ │ +500 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ │ +501 } │ │ │ │ │ +502 │ │ │ │ │ +503 template │ │ │ │ │ +504 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 │ │ │ │ │ +_5_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_>_:_: │ │ │ │ │ +506_ _e_E_n_d(int nIntervals) │ │ │ │ │ +507 { │ │ │ │ │ +508 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ │ +509 } │ │ │ │ │ +510 │ │ │ │ │ +511 // ////////////// │ │ │ │ │ +512 // │ │ │ │ │ +513 // The iterator │ │ │ │ │ +514 // │ │ │ │ │ +515 │ │ │ │ │ +516 template │ │ │ │ │ +_5_1_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; │ │ │ │ │ +518 │ │ │ │ │ +519 // vertices │ │ │ │ │ +520 │ │ │ │ │ +521 template │ │ │ │ │ +_5_2_2 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 │ │ │ │ │ +523 { │ │ │ │ │ +524 public: │ │ │ │ │ +_5_2_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; │ │ │ │ │ +_5_2_6 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +_5_2_7 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; │ │ │ │ │ +_5_2_8 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; │ │ │ │ │ +529 │ │ │ │ │ +530 _R_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); │ │ │ │ │ +531 │ │ │ │ │ +532 void increment(); │ │ │ │ │ +533 bool equals(const _T_h_i_s &other) const; │ │ │ │ │ +534 │ │ │ │ │ +535 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +536 _G_e_o_m_e_t_r_y geometry () const; │ │ │ │ │ +537 │ │ │ │ │ +538 int index() const; │ │ │ │ │ +539 protected: │ │ │ │ │ +_5_4_0 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ │ +541 │ │ │ │ │ +_5_4_2 int _s_i_z_e; │ │ │ │ │ +_5_4_3 _V_e_r_t_e_x _v_e_r_t_e_x; │ │ │ │ │ +544 }; │ │ │ │ │ +545 │ │ │ │ │ +546 template │ │ │ │ │ +_5_4_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +548_ _R_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) │ │ │ │ │ +549 : size(nIntervals) │ │ │ │ │ +550 { │ │ │ │ │ +551 vertex[0] = (end) ? size + 1 : 0; │ │ │ │ │ +552 for(int i = 1; i < dimension; ++ i) │ │ │ │ │ +553 vertex[i] = 0; │ │ │ │ │ +554 } │ │ │ │ │ +555 │ │ │ │ │ +556 template │ │ │ │ │ +557 void │ │ │ │ │ +_5_5_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_>_:_: │ │ │ │ │ +559_ _i_n_c_r_e_m_e_n_t() │ │ │ │ │ +560 { │ │ │ │ │ +561 assert(vertex[0] <= size); │ │ │ │ │ +562 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ │ +563 ++vertex[i]; │ │ │ │ │ +564 if(i == 0 || vertex[i] <= vertex[i-1]) │ │ │ │ │ +565 break; │ │ │ │ │ +566 else │ │ │ │ │ +567 vertex[i] = 0; │ │ │ │ │ +568 } │ │ │ │ │ +569 } │ │ │ │ │ +570 │ │ │ │ │ +571 template │ │ │ │ │ +572 bool │ │ │ │ │ +_5_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +574_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ │ +575 { │ │ │ │ │ +576 return size == other._s_i_z_e && vertex == other._v_e_r_t_e_x; │ │ │ │ │ +577 } │ │ │ │ │ +578 │ │ │ │ │ +579 template │ │ │ │ │ +580 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_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +582_ _c_o_o_r_d_s() const │ │ │ │ │ +583 { │ │ │ │ │ +584 _V_e_r_t_e_x ref = _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(vertex, getPermutation(0)); │ │ │ │ │ +585 │ │ │ │ │ +586 _C_o_o_r_d_V_e_c_t_o_r coords; │ │ │ │ │ +587 for(int i = 0; i < dimension; ++i) │ │ │ │ │ +588 coords[i] = CoordType(ref[i]) / size; │ │ │ │ │ +589 return coords; │ │ │ │ │ +590 } │ │ │ │ │ +591 │ │ │ │ │ +592 template │ │ │ │ │ +593 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_9_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 │ │ │ │ │ +595 { │ │ │ │ │ +596 std::vector corners(1); │ │ │ │ │ +597 corners[0] = (_C_o_o_r_d_V_e_c_t_o_r)vertex; │ │ │ │ │ +598 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, corners); │ │ │ │ │ +599 } │ │ │ │ │ +600 │ │ │ │ │ +601 template │ │ │ │ │ +602 int │ │ │ │ │ +_6_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_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ +604_ _i_n_d_e_x() const │ │ │ │ │ +605 { │ │ │ │ │ +606 return _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ │ +607 } │ │ │ │ │ +608 │ │ │ │ │ +609 // elements │ │ │ │ │ +610 │ │ │ │ │ +611 template │ │ │ │ │ +_6_1_2 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 │ │ │ │ │ +613 { │ │ │ │ │ +614 public: │ │ │ │ │ +_6_1_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; │ │ │ │ │ +_6_1_6 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; │ │ │ │ │ +_6_1_7 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; │ │ │ │ │ +_6_1_8 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; │ │ │ │ │ +_6_1_9 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; │ │ │ │ │ +620 │ │ │ │ │ +621 _R_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); │ │ │ │ │ +622 │ │ │ │ │ +623 void increment(); │ │ │ │ │ +624 bool equals(const _T_h_i_s &other) const; │ │ │ │ │ +625 │ │ │ │ │ +626 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ +627 int index() const; │ │ │ │ │ +628 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +629 │ │ │ │ │ +630 _G_e_o_m_e_t_r_y geometry () const; │ │ │ │ │ +631 │ │ │ │ │ +632 private: │ │ │ │ │ +633 _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; │ │ │ │ │ +634 │ │ │ │ │ +635 protected: │ │ │ │ │ +_6_3_6 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ │ +_6_3_7 constexpr static int nKuhnIntervals = Dune::factorial(dimension); │ │ │ │ │ +638 │ │ │ │ │ +_6_3_9 _V_e_r_t_e_x _o_r_i_g_i_n; │ │ │ │ │ +_6_4_0 int _k_u_h_n_I_n_d_e_x; │ │ │ │ │ +_6_4_1 int _s_i_z_e; │ │ │ │ │ +_6_4_2 int _i_n_d_e_x__; │ │ │ │ │ +643 }; │ │ │ │ │ +644 │ │ │ │ │ +645 template │ │ │ │ │ +_6_4_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_>_:_: │ │ │ │ │ +647_ _R_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) │ │ │ │ │ +648 : kuhnIndex(0), size(nIntervals), index_(0) │ │ │ │ │ +649 { │ │ │ │ │ +650 for(int i = 0; i < dimension; ++i) │ │ │ │ │ +651 origin[i] = 0; │ │ │ │ │ +652 if(end) { │ │ │ │ │ +653 index_ = Refinement::nElements(nIntervals); │ │ │ │ │ +654 origin[0] = size; │ │ │ │ │ +655 } │ │ │ │ │ +656 } │ │ │ │ │ +657 │ │ │ │ │ +658 template │ │ │ │ │ +659 void │ │ │ │ │ +_6_6_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_>_:_: │ │ │ │ │ +661_ _i_n_c_r_e_m_e_n_t() │ │ │ │ │ +662 { │ │ │ │ │ +663 assert(origin[0] < size); │ │ │ │ │ +664 │ │ │ │ │ +665 ++index_; │ │ │ │ │ +666 │ │ │ │ │ +667 while(1) { │ │ │ │ │ +668 ++kuhnIndex; │ │ │ │ │ +669 if(kuhnIndex == nKuhnIntervals) { │ │ │ │ │ +670 kuhnIndex = 0; │ │ │ │ │ +671 // increment origin │ │ │ │ │ +672 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ │ +673 ++origin[i]; │ │ │ │ │ +674 if(i == 0 || origin[i] <= origin[i-1]) │ │ │ │ │ +675 break; │ │ │ │ │ +676 else │ │ │ │ │ +677 origin[i] = 0; │ │ │ │ │ +678 } │ │ │ │ │ +679 } │ │ │ │ │ +680 │ │ │ │ │ +681 // test whether the current simplex has any corner outside the kuhn0 │ │ │ │ │ +simplex │ │ │ │ │ +682 FieldVector perm = getPermutation(kuhnIndex); │ │ │ │ │ +683 _V_e_r_t_e_x corner = origin; │ │ │ │ │ +684 bool outside = false; │ │ │ │ │ +685 for(int i = 0; i < dimension; ++i) { │ │ │ │ │ +686 // next corner │ │ │ │ │ +687 ++corner[perm[i]]; │ │ │ │ │ +688 if(perm[i] > 0) │ │ │ │ │ +689 if(corner[perm[i]] > corner[perm[i]-1]) { │ │ │ │ │ +690 outside = true; │ │ │ │ │ +691 break; │ │ │ │ │ +692 } │ │ │ │ │ +693 } │ │ │ │ │ +694 if(!outside) │ │ │ │ │ +695 return; │ │ │ │ │ +696 } │ │ │ │ │ +697 } │ │ │ │ │ +698 │ │ │ │ │ +699 template │ │ │ │ │ +700 bool │ │ │ │ │ +_7_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_,_ _0_>_:_: │ │ │ │ │ +702_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ │ +703 { │ │ │ │ │ +704 return size == other._s_i_z_e && index_ == other._i_n_d_e_x__; │ │ │ │ │ +705 } │ │ │ │ │ +706 │ │ │ │ │ +707 template │ │ │ │ │ +708 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 │ │ │ │ │ +_7_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_,_ _0_>_:_: │ │ │ │ │ +710_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ +711 { │ │ │ │ │ +712 _I_n_d_e_x_V_e_c_t_o_r indices; │ │ │ │ │ +713 FieldVector perm = getPermutation(kuhnIndex); │ │ │ │ │ +714 _V_e_r_t_e_x vertex = origin; │ │ │ │ │ +715 indices[0] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ │ +716 for(int i = 0; i < dimension; ++i) { │ │ │ │ │ +717 ++vertex[perm[i]]; │ │ │ │ │ +718 indices[i+1] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ │ +719 } │ │ │ │ │ +720 if (kuhnIndex%2 == 1) │ │ │ │ │ +721 for(int i = 0; i < (dimension+1)/2; ++i) { │ │ │ │ │ +722 int t = indices[i]; │ │ │ │ │ +723 indices[i] = indices[dimension-i]; │ │ │ │ │ +724 indices[dimension-i] = t; │ │ │ │ │ +725 } │ │ │ │ │ +726 return indices; │ │ │ │ │ +727 } │ │ │ │ │ +728 │ │ │ │ │ +729 template │ │ │ │ │ +730 int │ │ │ │ │ +_7_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_,_ _0_>_:_: │ │ │ │ │ +732_ _i_n_d_e_x() const │ │ │ │ │ +733 { │ │ │ │ │ +734 return index_; │ │ │ │ │ +735 } │ │ │ │ │ +736 │ │ │ │ │ +737 template │ │ │ │ │ +738 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 │ │ │ │ │ +_7_3_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_>_:_: │ │ │ │ │ +740_ _c_o_o_r_d_s() const │ │ │ │ │ +741 { │ │ │ │ │ +742 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_> │ │ │ │ │ +743 ::simplex().position(0,0)); │ │ │ │ │ +744 } │ │ │ │ │ +745 │ │ │ │ │ +746 template │ │ │ │ │ +747 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 │ │ │ │ │ +_7_4_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_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ +749 { │ │ │ │ │ +750 std::vector corners(dimension+1); │ │ │ │ │ +751 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(); │ │ │ │ │ +752 for(int i = 0; i <= dimension; ++i) │ │ │ │ │ +753 corners[i] = global(refelem.position(i, dimension)); │ │ │ │ │ +754 return _G_e_o_m_e_t_r_y(refelem.type(), corners); │ │ │ │ │ +755 } │ │ │ │ │ +756 │ │ │ │ │ +757 template │ │ │ │ │ +758 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 │ │ │ │ │ +759 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_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_>_:_: │ │ │ │ │ +760_ _g_l_o_b_a_l(const CoordVector &local) const { │ │ │ │ │ +761 CoordVector v = │ │ │ │ │ +762 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, getPermutation(kuhnIndex)); │ │ │ │ │ +763 v += origin; │ │ │ │ │ +764 v /= (typename CoordVector::value_type)size; │ │ │ │ │ +765 return _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(v, getPermutation(0)); │ │ │ │ │ +766 } │ │ │ │ │ +767 │ │ │ │ │ +768 // common │ │ │ │ │ +769 │ │ │ │ │ +770 template │ │ │ │ │ +771 template │ │ │ │ │ +_7_7_2 class _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m:: │ │ │ │ │ +SubEntityIterator │ │ │ │ │ +773 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ │ +774 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 │ │ │ │ │ +775 { │ │ │ │ │ +776 public: │ │ │ │ │ +_7_7_7 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; │ │ │ │ │ +778 │ │ │ │ │ +_7_7_9 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ │ +780 }; │ │ │ │ │ +781 │ │ │ │ │ +782#ifndef DOXYGEN │ │ │ │ │ +783 │ │ │ │ │ +784 template │ │ │ │ │ +785 template │ │ │ │ │ +786 _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_:_: │ │ │ │ │ +787_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ │ +788 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(nIntervals, │ │ │ │ │ +end) │ │ │ │ │ +789 {} │ │ │ │ │ +790 │ │ │ │ │ +791#endif │ │ │ │ │ +792 │ │ │ │ │ +793 } // namespace Simplex │ │ │ │ │ +794 │ │ │ │ │ +795 } // namespace RefinementImp │ │ │ │ │ +796 │ │ │ │ │ +797 │ │ │ │ │ +798 namespace RefinementImp { │ │ │ │ │ +799 │ │ │ │ │ +800 // /////////////////////// │ │ │ │ │ +801 // │ │ │ │ │ +802 // The refinement traits │ │ │ │ │ +803 // │ │ │ │ │ +804 │ │ │ │ │ +805#ifndef DOXYGEN │ │ │ │ │ +806 template │ │ │ │ │ +808 struct Traits< │ │ │ │ │ +809 topologyId, CoordType, coerceToId, dim, │ │ │ │ │ +810 typename std::enable_if< │ │ │ │ │ +811 ((GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ │ +812 (topologyId >> 1) && │ │ │ │ │ +813 (GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ │ +814 (coerceToId >> 1) │ │ │ │ │ +815 )>::type │ │ │ │ │ +816 > │ │ │ │ │ +817 { │ │ │ │ │ +818 typedef Simplex::RefinementImp Imp; │ │ │ │ │ +819 }; │ │ │ │ │ +820#endif │ │ │ │ │ +821 │ │ │ │ │ +822 │ │ │ │ │ +823 } // namespace RefinementImp │ │ │ │ │ +824 │ │ │ │ │ +825} // namespace Dune │ │ │ │ │ +826 │ │ │ │ │ +827#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ +_b_a_s_e_._c_c │ │ │ │ │ +This file contains the parts independent of a particular Refinement │ │ │ │ │ +implementation. │ │ │ │ │ +_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ _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:21 │ │ │ │ │ -_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) │ │ │ │ │ -Utitlity function to construct the correct geometry type given the dimension │ │ │ │ │ -and the number of vertic... │ │ │ │ │ -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:126 │ │ │ │ │ +_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:323 │ │ │ │ │ +_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:336 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_f_a_c_t_o_r_i_a_l │ │ │ │ │ +int factorial(int n) │ │ │ │ │ +Calculate n! │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:289 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_b_i_n_o_m_i_a_l │ │ │ │ │ +int binomial(int upper, int lower) │ │ │ │ │ +calculate │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:305 │ │ │ │ │ +_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: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_:_:_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:413 │ │ │ │ │ +_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:170 │ │ │ │ │ +_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:204 │ │ │ │ │ +_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:433 │ │ │ │ │ +_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_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ │ +Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:440 │ │ │ │ │ +_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_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +FieldVector< int, dimension+1 > IndexVector │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:443 │ │ │ │ │ +_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_t_y_p_e │ │ │ │ │ +CoordType ctype │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:436 │ │ │ │ │ +_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:466 │ │ │ │ │ +_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:490 │ │ │ │ │ +_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:506 │ │ │ │ │ +_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:482 │ │ │ │ │ +_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_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:442 │ │ │ │ │ +_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:474 │ │ │ │ │ +_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:498 │ │ │ │ │ +_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_o_r_d_V_e_c_t_o_r │ │ │ │ │ +FieldVector< CoordType, dimension > CoordVector │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:441 │ │ │ │ │ +_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 │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:435 │ │ │ │ │ +_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:457 │ │ │ │ │ +_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_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Dune::CachedMultiLinearGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ │ +Geometry │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:460 │ │ │ │ │ +_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:517 │ │ │ │ │ +_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_ _> │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:523 │ │ │ │ │ +_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: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_t_e_r_a_t_o_r_S_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:525 │ │ │ │ │ +_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: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_, │ │ │ │ │ +_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:527 │ │ │ │ │ +_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:528 │ │ │ │ │ +_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:540 │ │ │ │ │ +_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:542 │ │ │ │ │ +_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_ _> │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:613 │ │ │ │ │ +_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:640 │ │ │ │ │ +_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:636 │ │ │ │ │ +_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:639 │ │ │ │ │ +_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:642 │ │ │ │ │ +_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:618 │ │ │ │ │ +_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:616 │ │ │ │ │ +_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:617 │ │ │ │ │ +_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:619 │ │ │ │ │ +_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:615 │ │ │ │ │ +_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:641 │ │ │ │ │ +_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_<_ _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_:_:_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:777 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: dimension.hh File Reference │ │ │ │ +dune-geometry: hcubetriangulation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,82 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
dimension.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
hcubetriangulation.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <type_traits>
│ │ │ │ + │ │ │ │ +

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

struct  Dune::Dim< dim >
 Static tag representing a dimension. More...
class  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >
 
struct  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
 
class  Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
 
struct  Dune::Codim< codim >
 Static tag representing a codimension. More...
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::HCubeTriangulation
 This namespace contains the Refinement implementation for triangulating hypercubes (GeometryType::cube -> GeometryType::simplex)
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Macros

#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_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_HCUBETRIANGULATION_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,55 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -#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 │ │ │ │ │ +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 │ │ │ │ │ -struct   _D_u_n_e_:_:_D_i_m_<_ _d_i_m_ _> │ │ │ │ │ -  Static tag representing a dimension. _M_o_r_e_._._. │ │ │ │ │ + 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_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ -  Static tag representing a codimension. _M_o_r_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___, │ │ │ │ │ + _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_< │ │ │ │ │ + _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_< │ │ │ │ │ + _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___, │ │ │ │ │ + _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 │ │ │ │ │ + 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_:_: │ │ │ │ │ + _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 │ │ │ │ │ +  │ │ │ │ │ +********** 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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: dimension.hh Source File │ │ │ │ +dune-geometry: hcubetriangulation.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,58 +70,508 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dimension.hh
│ │ │ │ +
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 (C) DUNE 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_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ │
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
│ │ │ │ + │ │ │ │ +
30#include <dune/geometry/type.hh>
│ │ │ │ +
31
│ │ │ │ +
32#include "base.cc"
│ │ │ │ +
33#include "simplex.cc"
│ │ │ │ +
34
│ │ │ │ +
35namespace Dune
│ │ │ │ +
36{
│ │ │ │ +
37 namespace RefinementImp
│ │ │ │ +
38 {
│ │ │ │ +
│ │ │ │ +
46 namespace HCubeTriangulation {
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
92 };
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
94 template<int dimension, class CoordType>
│ │ │ │ +
95 template<int codimension>
│ │ │ │ +
│ │ │ │ +
96 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ │ +
97 {
│ │ │ │ +
98 class SubEntityIterator;
│ │ │ │ +
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:
│ │ │ │ + │ │ │ │ +
161 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
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;
│ │ │ │ +
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),
│ │ │ │ +
189 backend(BackendRefinement::vBegin(nIntervals_)),
│ │ │ │ +
190 backendEnd(BackendRefinement::vEnd(nIntervals_))
│ │ │ │ +
191 {
│ │ │ │ +
192 if (end)
│ │ │ │ +
193 kuhnIndex = nKuhnSimplices;
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
196 template<int dimension, class CoordType>
│ │ │ │ +
197 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
200 {
│ │ │ │ +
201 ++backend;
│ │ │ │ +
202 if (backend == backendEnd)
│ │ │ │ +
203 {
│ │ │ │ +
204 backend = BackendRefinement::vBegin(nIntervals_);
│ │ │ │ +
205 ++kuhnIndex;
│ │ │ │ +
206 }
│ │ │ │ +
207 }
│ │ │ │ +
│ │ │ │ +
208
│ │ │ │ +
209 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
212 coords() const
│ │ │ │ +
213 {
│ │ │ │ +
214 return referenceToKuhn(backend.coords(), getPermutation<dimension>(kuhnIndex));
│ │ │ │ +
215 }
│ │ │ │ +
│ │ │ │ +
216
│ │ │ │ +
217 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
220 {
│ │ │ │ +
221 std::vector<CoordVector> corners(1);
│ │ │ │ +
222 corners[0] = referenceToKuhn(backend.coords(), getPermutation<dimension>(kuhnIndex));
│ │ │ │ +
223 return Geometry(GeometryTypes::vertex, corners);
│ │ │ │ +
224 }
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
226 template<int dimension, class CoordType>
│ │ │ │ +
227 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
229 index() const
│ │ │ │ +
230 {
│ │ │ │ +
231 return kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.index();
│ │ │ │ +
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();
│ │ │ │ +
248
│ │ │ │ +
249 IndexVector vertexIndices() const;
│ │ │ │ +
250 int index() const;
│ │ │ │ +
251 CoordVector coords() const;
│ │ │ │ +
252
│ │ │ │ +
253 Geometry geometry() const;
│ │ │ │ +
254
│ │ │ │ +
255 private:
│ │ │ │ +
256 CoordVector global(const CoordVector &local) const;
│ │ │ │ +
257
│ │ │ │ +
258 protected:
│ │ │ │ + │ │ │ │ +
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),
│ │ │ │ +
274 backend(BackendRefinement::eBegin(nIntervals_)),
│ │ │ │ +
275 backendEnd(BackendRefinement::eEnd(nIntervals_))
│ │ │ │ +
276 {
│ │ │ │ +
277 if (end)
│ │ │ │ +
278 kuhnIndex = nKuhnSimplices;
│ │ │ │ +
279 }
│ │ │ │ +
│ │ │ │ +
280 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
283 : nIntervals_(other.nIntervals_), kuhnIndex(other.kuhnIndex),
│ │ │ │ +
284 backend(other.backend),
│ │ │ │ +
285 backendEnd(other.backendEnd)
│ │ │ │ +
286 {}
│ │ │ │ +
│ │ │ │ +
287
│ │ │ │ +
288 template<int dimension, class CoordType>
│ │ │ │ +
289 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
292 {
│ │ │ │ +
293 ++backend;
│ │ │ │ +
294 if (backend == backendEnd)
│ │ │ │ +
295 {
│ │ │ │ +
296 backend = BackendRefinement::eBegin(nIntervals_);
│ │ │ │ +
297 ++kuhnIndex;
│ │ │ │ +
298 }
│ │ │ │ +
299 }
│ │ │ │ +
│ │ │ │ +
300
│ │ │ │ +
301 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
304 vertexIndices() const
│ │ │ │ +
305 {
│ │ │ │ +
306 IndexVector indices = backend.vertexIndices();
│ │ │ │ +
307
│ │ │ │ +
308 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_);
│ │ │ │ +
309 indices += base;
│ │ │ │ +
310
│ │ │ │ +
311 return indices;
│ │ │ │ +
312 }
│ │ │ │ +
│ │ │ │ +
313
│ │ │ │ +
314 template<int dimension, class CoordType>
│ │ │ │ +
315 int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
317 index() const
│ │ │ │ +
318 {
│ │ │ │ +
319 return kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.index();
│ │ │ │ +
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:
│ │ │ │ + │ │ │ │ +
360 typedef SubEntityIterator This;
│ │ │ │ +
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 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
│ │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
Static tag representing a dimension.
Definition dimension.hh:16
│ │ │ │ -
Dim type
Definition dimension.hh:17
│ │ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:336
│ │ │ │ +
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:394
│ │ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ │ -
Codim type
Definition dimension.hh:25
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition hcubetriangulation.cc:260
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:359
│ │ │ │ +
SubEntityIterator This
Definition hcubetriangulation.cc:360
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,53 +1,588 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -dimension.hh │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ │ +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 (C) DUNE 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_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ │ 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 │ │ │ │ │ +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 HCubeTriangulation { │ │ │ │ │ +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 │ │ │ │ │ +80 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ │ +81 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ │ +82 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ │ +83 │ │ │ │ │ +84 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ │ +85 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_> _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ +92 }; │ │ │ │ │ +93 │ │ │ │ │ +94 template │ │ │ │ │ +95 template │ │ │ │ │ +_9_6 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ +97 { │ │ │ │ │ +98 class SubEntityIterator; │ │ │ │ │ +_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 BackendRefinement::nVertices(nIntervals) * factorial(int │ │ │ │ │ +(dimension)); │ │ │ │ │ +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 BackendRefinement::nElements(nIntervals) * factorial(int │ │ │ │ │ +(dimension)); │ │ │ │ │ +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 Refinement::CoordVector _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 increment(); │ │ │ │ │ +167 │ │ │ │ │ +168 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +169 │ │ │ │ │ +170 _G_e_o_m_e_t_r_y geometry() const; │ │ │ │ │ +171 │ │ │ │ │ +172 int index() 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 nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ +189 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(nIntervals_)), │ │ │ │ │ +190 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(nIntervals_)) │ │ │ │ │ +191 { │ │ │ │ │ +192 if (end) │ │ │ │ │ +193 kuhnIndex = nKuhnSimplices; │ │ │ │ │ +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 ++backend; │ │ │ │ │ +202 if (backend == backendEnd) │ │ │ │ │ +203 { │ │ │ │ │ +204 backend = BackendRefinement::vBegin(nIntervals_); │ │ │ │ │ +205 ++kuhnIndex; │ │ │ │ │ +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 return referenceToKuhn(backend.coords(), getPermutation │ │ │ │ │ +(kuhnIndex)); │ │ │ │ │ +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_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 │ │ │ │ │ +220 { │ │ │ │ │ +221 std::vector corners(1); │ │ │ │ │ +222 corners[0] = referenceToKuhn(backend.coords(), getPermutation │ │ │ │ │ +(kuhnIndex)); │ │ │ │ │ +223 return _G_e_o_m_e_t_r_y(GeometryTypes::vertex, 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 kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.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 nIntervals_, 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 increment(); │ │ │ │ │ +248 │ │ │ │ │ +249 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ +250 int index() const; │ │ │ │ │ +251 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +252 │ │ │ │ │ +253 _G_e_o_m_e_t_r_y geometry() 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 _R_e_f_i_n_e_m_e_n_t_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t _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_1 constexpr static int nKuhnSimplices = 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 : nIntervals_(nIntervals), kuhnIndex(0), │ │ │ │ │ +274 backend(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(nIntervals_)), │ │ │ │ │ +275 backendEnd(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(nIntervals_)) │ │ │ │ │ +276 { │ │ │ │ │ +277 if (end) │ │ │ │ │ +278 kuhnIndex = nKuhnSimplices; │ │ │ │ │ +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 : nIntervals_(other.nIntervals_), kuhnIndex(other.kuhnIndex), │ │ │ │ │ +284 backend(other.backend), │ │ │ │ │ +285 backendEnd(other.backendEnd) │ │ │ │ │ +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 ++backend; │ │ │ │ │ +294 if (backend == backendEnd) │ │ │ │ │ +295 { │ │ │ │ │ +296 backend = BackendRefinement::eBegin(nIntervals_); │ │ │ │ │ +297 ++kuhnIndex; │ │ │ │ │ +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 = backend.vertexIndices(); │ │ │ │ │ +307 │ │ │ │ │ +308 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_); │ │ │ │ │ +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 kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.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(backend.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 backend.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 referenceToKuhn(local, getPermutation(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::_C_o_d_i_m:: │ │ │ │ │ +SubEntityIterator │ │ │ │ │ +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 SubEntityIterator _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_>_:_: │ │ │ │ │ +_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(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 { 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 │ │ │ │ │ +397#ifndef DOXYGEN │ │ │ │ │ +398 template │ │ │ │ │ +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 Imp; │ │ │ │ │ +412 }; │ │ │ │ │ +413#endif │ │ │ │ │ +414 │ │ │ │ │ +415 } // namespace RefinementImp │ │ │ │ │ +416} // namespace Dune │ │ │ │ │ +417 │ │ │ │ │ +418#endif // DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ │ +_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.... │ │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ +_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:21 │ │ │ │ │ -_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_:_:_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:336 │ │ │ │ │ +_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:394 │ │ │ │ │ _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_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_:_:_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_:_:_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 │ │ │ │ │ +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_:_:_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_:_:_C_o_d_i_m_:_:_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_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_ _>_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ +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 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_ _>_:_:_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_,_ _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_ _>_:_:_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_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 │ │ │ │ │ +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_ _>_:_:_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__ │ │ │ │ │ +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 │ │ │ │ │ +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_:_:_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_<_ _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_:_:_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_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_<_ _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_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:433 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: virtualrefinement.cc File Reference │ │ │ │ +dune-geometry: hcube.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,96 +65,82 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ -Macros | │ │ │ │ -Functions
│ │ │ │ -
virtualrefinement.cc File Reference
│ │ │ │ +Macros
│ │ │ │ +
hcube.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

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

This file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons, etc.). │ │ │ │ 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 <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/axisalignedcubegeometry.hh>
│ │ │ │ +#include "base.cc"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::HCube::RefinementImp< dimension_, CoordType >
 Refinement implementation for hypercubes More...
 
class  Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, 0 >
struct  Dune::RefinementImp::HCube::RefinementImp< dimension_, CoordType >::Codim< codimension >
 
class  Dune::VirtualRefinement< dimension, CoordType >::Codim< codimension >
class  Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, codimension >
 SubEntityIterator base class for hypercube refinement. More...
 
class  Dune::VirtualRefinementSubEntityIteratorBackSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, dimension >
 
class  Dune::VirtualRefinementSubEntityIteratorBackSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, 0 >
 
class  Dune::VirtualRefinement< dimension, CoordType >::SubEntityIteratorBack< dimension, CoordType >
 
class  Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >
 
class  Dune::VirtualRefinementImpSubEntityIteratorBackSpecial< topologyId, CoordType, coerceToId, dimension, dimension >
 
class  Dune::VirtualRefinementImpSubEntityIteratorBackSpecial< topologyId, CoordType, coerceToId, dimension, 0 >
 
class  Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::SubEntityIteratorBack< codimension >
 
class  Dune::RefinementBuilder< dimension, CoordType >
 
class  Dune::RefinementBuilder< 1, CoordType >
 
class  Dune::RefinementBuilder< 3, CoordType >
class  Dune::RefinementImp::HCube::RefinementImp< dimension_, CoordType >::Codim< codimension >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
 
namespace  Dune::RefinementImp::HCube
 This namespace contains the Refinement implementation for hypercubes (GeometryType::cube).
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Macros

#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Functions

template<int dimension, class CoordType >
VirtualRefinement< dimension, CoordType > & Dune::buildRefinement (GeometryType geometryType, GeometryType coerceTo)
 return a reference to the VirtualRefinement according to the parameters
 
#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
 
│ │ │ │

Detailed Description

│ │ │ │ -

This file contains the virtual wrapper around refinement.

│ │ │ │ +

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

│ │ │ │ +

See Refinement implementation for hypercubes.

│ │ │ │

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_GEOMETRY_VIRTUALREFINEMENT_CC

│ │ │ │ + │ │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_HCUBE_CC

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,74 +1,60 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -virtualrefinement.cc File Reference │ │ │ │ │ -This file contains the virtual wrapper around refinement. _M_o_r_e_._._. │ │ │ │ │ + * _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 │ │ │ │ │ +hcube.cc File Reference │ │ │ │ │ +This file contains the _R_e_f_i_n_e_m_e_n_t implementation for hypercubes │ │ │ │ │ +(quadrilaterals, hexahedrons, etc.). _M_o_r_e_._._. │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include "_t_y_p_e_._h_h" │ │ │ │ │ -#include "_r_e_f_i_n_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_s_._h_h> │ │ │ │ │ +#include <_d_u_n_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_._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_:_:_V_i_r_t_u_a_l_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_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_:_:_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 implementation for hypercubes _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_V_i_r_t_u_a_l_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_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_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _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_:_:_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_p_e_c_i_a_l_< │ │ │ │ │ + _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +  SubEntityIterator base class for hypercube refinement. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_:_:_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_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_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_:_:_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_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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_< │ │ │ │ │ - _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _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_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _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_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_ _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_B_u_i_l_d_e_r_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _1_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _3_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 │ │ │ │ │   │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_U_N_E___G_E_O_M_E_T_R_Y___V_I_R_T_U_A_L_R_E_F_I_N_E_M_E_N_T___C_C │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t< dimension, CoordType > _D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t (_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ - &  geometryType, _G_e_o_m_e_t_r_y_T_y_p_e coerceTo) │ │ │ │ │ - return a reference to the │ │ │ │ │ -  _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t according to the │ │ │ │ │ - parameters │ │ │ │ │ +namespace   _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 _R_e_f_i_n_e_m_e_n_t implementation for │ │ │ │ │ + hypercubes (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_c_u_b_e). │ │ │ │ │ +  │ │ │ │ │ +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___C_C │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file contains the virtual wrapper around refinement. │ │ │ │ │ +This file contains the _R_e_f_i_n_e_m_e_n_t implementation for hypercubes │ │ │ │ │ +(quadrilaterals, hexahedrons, etc.). │ │ │ │ │ +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_ _h_y_p_e_r_c_u_b_e_s. │ │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__VVIIRRTTUUAALLRREEFFIINNEEMMEENNTT__CCCC ********** │ │ │ │ │ -#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__HHCCUUBBEE__CCCC ********** │ │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: virtualrefinement.cc Source File │ │ │ │ +dune-geometry: hcube.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,821 +70,477 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
virtualrefinement.cc
│ │ │ │ +
hcube.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 (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ -
7#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ -
8
│ │ │ │ -
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"
│ │ │ │ -
23
│ │ │ │ -
24namespace Dune
│ │ │ │ -
25{
│ │ │ │ -
26 // //////////////////////////////////////////
│ │ │ │ -
27 //
│ │ │ │ -
28 // The virtual base class and its iterators
│ │ │ │ -
29 //
│ │ │ │ -
30
│ │ │ │ -
31 //
│ │ │ │ -
32 // Refinement
│ │ │ │ -
33 //
│ │ │ │ -
34
│ │ │ │ -
35 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
40 return VertexIterator(vBeginBack(tag));
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
43 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 return VertexIterator(vEndBack(tag));
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
55 {
│ │ │ │ -
56 return ElementIterator(eBeginBack(tag));
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
63 {
│ │ │ │ -
64 return ElementIterator(eEndBack(tag));
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 //
│ │ │ │ -
68 // The iterators
│ │ │ │ -
69 //
│ │ │ │ -
70
│ │ │ │ -
71 template<int dimension, class CoordType, int codimension>
│ │ │ │ - │ │ │ │ -
73
│ │ │ │ -
74 // The iterator for vertices
│ │ │ │ -
75 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
76 class VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, dimension>
│ │ │ │ -
77 {};
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79 // The iterator for elements
│ │ │ │ -
80 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
81 class VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, 0>
│ │ │ │ -
82 {
│ │ │ │ -
83 public:
│ │ │ │ - │ │ │ │ -
85 typedef typename Refinement::template Codim<0>::SubEntityIterator Common;
│ │ │ │ -
86 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ -
87
│ │ │ │ -
88 IndexVector vertexIndices() const;
│ │ │ │ -
89 };
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
91 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
94 vertexIndices() const
│ │ │ │ -
95 {
│ │ │ │ -
96 return static_cast<const Common *>(this)->backend->vertexIndices();
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
99 // The iterator common stuff
│ │ │ │ -
100 template<int dimension, class CoordType>
│ │ │ │ -
101 template<int codimension>
│ │ │ │ -
│ │ │ │ -
102 class VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ │ -
103 : public ForwardIteratorFacade<typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ -
104 public VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ -
105 {
│ │ │ │ -
106 public:
│ │ │ │ - │ │ │ │ -
108 typedef typename Refinement::template Codim<codimension>::SubEntityIterator This;
│ │ │ │ -
109 typedef typename Refinement::template SubEntityIteratorBack<codimension> IteratorBack;
│ │ │ │ -
110 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
111
│ │ │ │ - │ │ │ │ -
113 SubEntityIterator(const This &other);
│ │ │ │ - │ │ │ │ -
115
│ │ │ │ -
116 This &operator=(const This &other);
│ │ │ │ -
117
│ │ │ │ -
118 bool equals(const This &other) const;
│ │ │ │ -
119 void increment();
│ │ │ │ -
120
│ │ │ │ -
121 int index() const;
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │ +
7
│ │ │ │ +
42#include <cassert>
│ │ │ │ +
43
│ │ │ │ +
44#include <dune/common/fvector.hh>
│ │ │ │ +
45#include <dune/common/iteratorfacades.hh>
│ │ │ │ +
46
│ │ │ │ + │ │ │ │ + │ │ │ │ +
49
│ │ │ │ +
50#include "base.cc" // for RefinementTraits
│ │ │ │ +
51
│ │ │ │ +
52namespace Dune
│ │ │ │ +
53{
│ │ │ │ +
54 namespace RefinementImp
│ │ │ │ +
55 {
│ │ │ │ +
│ │ │ │ +
62 namespace HCube
│ │ │ │ +
63 {
│ │ │ │ +
73 template<int dimension_, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 {
│ │ │ │ +
76 public:
│ │ │ │ +
78 constexpr static int dimension = dimension_;
│ │ │ │ +
79 //- Know yourself
│ │ │ │ + │ │ │ │ +
81
│ │ │ │ +
82 template<int codimension>
│ │ │ │ +
83 struct Codim;
│ │ │ │ + │ │ │ │ +
85 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ │ + │ │ │ │ +
87 typedef FieldVector<int, (1<<dimension)> IndexVector;
│ │ │ │ +
88
│ │ │ │ +
89 static unsigned nVertices(unsigned nIntervals);
│ │ │ │ +
90 static VertexIterator vBegin(unsigned nIntervals);
│ │ │ │ +
91 static VertexIterator vEnd(unsigned nIntervals);
│ │ │ │ +
92
│ │ │ │ +
93 static unsigned nElements(unsigned nIntervals);
│ │ │ │ +
94 static ElementIterator eBegin(unsigned nIntervals);
│ │ │ │ +
95 static ElementIterator eEnd(unsigned nIntervals);
│ │ │ │ +
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 unsigned
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
109 nVertices(unsigned nIntervals)
│ │ │ │ +
110 {
│ │ │ │ +
111 // return (nIntervals + 1)^dim
│ │ │ │ +
112 return Dune::power(nIntervals+1u, unsigned(dimension));
│ │ │ │ +
113 }
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
115 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
118 vBegin(unsigned nIntervals)
│ │ │ │ +
119 {
│ │ │ │ +
120 return VertexIterator(0,nIntervals);
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │
122
│ │ │ │ -
123 // If you simply use an unqualified CoordVector here g++-4.2 chokes
│ │ │ │ - │ │ │ │ -
125 CoordVector coords() const;
│ │ │ │ -
126 private:
│ │ │ │ -
127 friend class VirtualRefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>;
│ │ │ │ -
128 IteratorBack *backend;
│ │ │ │ -
129 };
│ │ │ │ +
123 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
126 vEnd(unsigned nIntervals)
│ │ │ │ +
127 {
│ │ │ │ +
128 return VertexIterator(nVertices(nIntervals),nIntervals);
│ │ │ │ +
129 }
│ │ │ │
│ │ │ │
130
│ │ │ │ -
131#ifndef DOXYGEN
│ │ │ │ -
132 template<int dimension, class CoordType>
│ │ │ │ -
133 template<int codimension>
│ │ │ │ - │ │ │ │ -
135 SubEntityIterator(IteratorBack *backend_)
│ │ │ │ -
136 : backend(backend_)
│ │ │ │ -
137 {}
│ │ │ │ -
138
│ │ │ │ -
139 template<int dimension, class CoordType>
│ │ │ │ -
140 template<int codimension>
│ │ │ │ - │ │ │ │ -
142 SubEntityIterator(const This &other)
│ │ │ │ -
143 : backend(other.backend->clone())
│ │ │ │ -
144 {}
│ │ │ │ -
145
│ │ │ │ -
146 template<int dimension, class CoordType>
│ │ │ │ -
147 template<int codimension>
│ │ │ │ -
148 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
149 ~SubEntityIterator()
│ │ │ │ -
150 {
│ │ │ │ -
151 delete backend;
│ │ │ │ -
152 }
│ │ │ │ -
153
│ │ │ │ -
154 template<int dimension, class CoordType>
│ │ │ │ -
155 template<int codimension>
│ │ │ │ -
156 typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator &
│ │ │ │ -
157 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
158 operator=(const This &other)
│ │ │ │ -
159 {
│ │ │ │ -
160 delete backend;
│ │ │ │ -
161 backend = other.backend->clone();
│ │ │ │ -
162 }
│ │ │ │ -
163
│ │ │ │ -
164 template<int dimension, class CoordType>
│ │ │ │ -
165 template<int codimension>
│ │ │ │ -
166 bool
│ │ │ │ -
167 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
168 equals(const This &other) const
│ │ │ │ -
169 { return *backend == *(other.backend); }
│ │ │ │ -
170
│ │ │ │ -
171 template<int dimension, class CoordType>
│ │ │ │ -
172 template<int codimension>
│ │ │ │ -
173 void
│ │ │ │ -
174 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
175 increment()
│ │ │ │ -
176 {
│ │ │ │ -
177 ++*backend;
│ │ │ │ -
178 }
│ │ │ │ -
179
│ │ │ │ -
180 template<int dimension, class CoordType>
│ │ │ │ -
181 template<int codimension>
│ │ │ │ -
182 int
│ │ │ │ -
183 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
184 index() const
│ │ │ │ -
185 { return backend->index(); }
│ │ │ │ -
186
│ │ │ │ -
187 template<int dimension, class CoordType>
│ │ │ │ -
188 template<int codimension>
│ │ │ │ -
189 typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator::CoordVector
│ │ │ │ -
190 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ -
191 coords() const
│ │ │ │ -
192 { return backend->coords(); }
│ │ │ │ -
193#endif // DOXYGEN
│ │ │ │ -
194
│ │ │ │ -
195 //
│ │ │ │ -
196 // The iterator backend
│ │ │ │ -
197 //
│ │ │ │ -
198
│ │ │ │ -
199 template<int dimension, class CoordType, int codimension>
│ │ │ │ - │ │ │ │ -
201
│ │ │ │ -
202 // The iterator backend for vertices
│ │ │ │ -
203 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ -
204 class VirtualRefinementSubEntityIteratorBackSpecial<dimension, CoordType, dimension>
│ │ │ │ -
205 {
│ │ │ │ -
206 public:
│ │ │ │ -
207
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
209 {}
│ │ │ │ -
│ │ │ │ -
210 };
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
212 // The iterator backend for elements
│ │ │ │ -
213 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
215 {
│ │ │ │ -
216 public:
│ │ │ │ - │ │ │ │ -
218 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ -
219
│ │ │ │ -
220 virtual IndexVector vertexIndices() const = 0;
│ │ │ │ -
221
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
223 {}
│ │ │ │ -
│ │ │ │ -
224 };
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
226 // The iterator backend common stuff
│ │ │ │ -
227 template<int dimension, class CoordType>
│ │ │ │ -
228 template<int codimension>
│ │ │ │ -
│ │ │ │ -
229 class VirtualRefinement<dimension, CoordType>::SubEntityIteratorBack
│ │ │ │ -
230 : public VirtualRefinementSubEntityIteratorBackSpecial<dimension, CoordType, codimension>
│ │ │ │ -
231 {
│ │ │ │ -
232 public:
│ │ │ │ - │ │ │ │ -
234 typedef typename Refinement::template SubEntityIteratorBack<codimension> This;
│ │ │ │ -
235 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ -
236
│ │ │ │ - │ │ │ │ -
238
│ │ │ │ -
239 virtual This *clone() const = 0;
│ │ │ │ -
240
│ │ │ │ -
241 virtual bool operator==(const This &other) const = 0;
│ │ │ │ -
242 virtual This &operator++() = 0;
│ │ │ │ -
243
│ │ │ │ -
244 virtual int index() const = 0;
│ │ │ │ -
245 virtual CoordVector coords() const = 0;
│ │ │ │ -
246 };
│ │ │ │ -
│ │ │ │ -
247
│ │ │ │ -
248 // /////////////////////////////////////////////////
│ │ │ │ -
249 //
│ │ │ │ -
250 // The derived classes and their iterator backends
│ │ │ │ -
251 //
│ │ │ │ -
252
│ │ │ │ -
253 //
│ │ │ │ -
254 // The refinement implementation
│ │ │ │ -
255 //
│ │ │ │ -
256
│ │ │ │ -
257 template<unsigned topologyId, class CoordType,
│ │ │ │ -
258 unsigned coerceToId, int dimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
260 : public Dune::VirtualRefinement<dimension, CoordType>
│ │ │ │ -
261 {
│ │ │ │ -
262 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
265
│ │ │ │ -
266 template<int codimension>
│ │ │ │ - │ │ │ │ -
268
│ │ │ │ -
269 int nVertices(Dune::RefinementIntervals tag) const;
│ │ │ │ -
270
│ │ │ │ -
271 int nElements(Dune::RefinementIntervals tag) const;
│ │ │ │ +
131 template<int dimension, class CoordType>
│ │ │ │ +
132 unsigned
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
134 nElements(unsigned nIntervals)
│ │ │ │ +
135 {
│ │ │ │ +
136 static_assert(dimension >= 0,
│ │ │ │ +
137 "Negative dimension given, what the heck is that supposed to mean?");
│ │ │ │ +
138 // return nIntervals^dim
│ │ │ │ +
139 return Dune::power(nIntervals, unsigned(dimension));
│ │ │ │ +
140 }
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
142 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
145 eBegin(unsigned nIntervals)
│ │ │ │ +
146 {
│ │ │ │ +
147 return ElementIterator(0,nIntervals);
│ │ │ │ +
148 }
│ │ │ │ +
│ │ │ │ +
149
│ │ │ │ +
150 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
153 eEnd(unsigned nIntervals)
│ │ │ │ +
154 {
│ │ │ │ +
155 return ElementIterator(nElements(nIntervals),nIntervals);
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
158 //
│ │ │ │ +
159 // The iterators
│ │ │ │ +
160 //
│ │ │ │ +
161
│ │ │ │ +
162#ifdef DOXYGEN
│ │ │ │ +
174 template<int dimension, class CoordType, int codimension>
│ │ │ │ + │ │ │ │ +
176#else
│ │ │ │ +
177 template<int dimension, class CoordType, int codimension>
│ │ │ │ + │ │ │ │ +
179#endif //DOXYGEN
│ │ │ │ +
180
│ │ │ │ +
181 // for vertices
│ │ │ │ +
182
│ │ │ │ +
183 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
184 class RefinementSubEntityIteratorSpecial<dimension, CoordType, dimension>
│ │ │ │ +
185 {
│ │ │ │ +
186 public:
│ │ │ │ + │ │ │ │ +
188 typedef typename Refinement::template Codim<dimension>::SubEntityIterator Common;
│ │ │ │ +
189 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
190
│ │ │ │ +
191 CoordVector coords() const;
│ │ │ │ +
192
│ │ │ │ +
193 private:
│ │ │ │ +
194 const Common & asCommon() const
│ │ │ │ +
195 {
│ │ │ │ +
196 return *static_cast<const Common*>(this);
│ │ │ │ +
197 }
│ │ │ │ +
198 };
│ │ │ │ +
│ │ │ │ +
199
│ │ │ │ +
200 template<int dimension, class CoordType>
│ │ │ │ +
201 typename RefinementSubEntityIteratorSpecial<dimension, CoordType, dimension>::CoordVector
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
203 coords() const
│ │ │ │ +
204 {
│ │ │ │ +
205 std::array<unsigned int, dimension> v(asCommon().vertexCoord());
│ │ │ │ +
206 CoordVector c;
│ │ │ │ +
207 for (int d = 0; d < dimension; d++)
│ │ │ │ +
208 {
│ │ │ │ +
209 c[d] = v[d]*1.0 / asCommon()._nIntervals;
│ │ │ │ +
210 }
│ │ │ │ +
211 return c;
│ │ │ │ +
212 }
│ │ │ │ +
│ │ │ │ +
213
│ │ │ │ +
214 // for elements
│ │ │ │ +
215
│ │ │ │ +
216 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ +
217 class RefinementSubEntityIteratorSpecial<dimension, CoordType, 0>
│ │ │ │ +
218 {
│ │ │ │ +
219 public:
│ │ │ │ + │ │ │ │ +
221 typedef typename Refinement::template Codim<0>::SubEntityIterator Common;
│ │ │ │ +
222 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ +
223 typedef typename Refinement::CoordVector CoordVector;
│ │ │ │ +
224
│ │ │ │ +
225 IndexVector vertexIndices() const;
│ │ │ │ +
226 CoordVector coords() const;
│ │ │ │ +
227
│ │ │ │ +
228 private:
│ │ │ │ +
229 const Common & asCommon() const
│ │ │ │ +
230 {
│ │ │ │ +
231 return *static_cast<const Common*>(this);
│ │ │ │ +
232 }
│ │ │ │ +
233 };
│ │ │ │ +
│ │ │ │ +
234
│ │ │ │ +
235 template<int dimension, class CoordType>
│ │ │ │ +
236 typename RefinementSubEntityIteratorSpecial<dimension, CoordType, 0>::IndexVector
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
238 vertexIndices() const
│ │ │ │ +
239 {
│ │ │ │ +
240 constexpr static int nIndices = 1 << dimension;
│ │ │ │ +
241
│ │ │ │ +
242 // cell index tuple
│ │ │ │ +
243 std::array<unsigned int, dimension> e(asCommon().cellCoord());
│ │ │ │ +
244
│ │ │ │ +
245 // vertices
│ │ │ │ +
246 IndexVector vec;
│ │ │ │ +
247 for(int i = 0; i < nIndices; ++i)
│ │ │ │ +
248 {
│ │ │ │ +
249 int base = 1;
│ │ │ │ +
250 std::array<unsigned int, dimension> alpha(asCommon().idx2multiidx(i));
│ │ │ │ +
251 for (int d = 0; d < dimension; d++) {
│ │ │ │ +
252 vec[i] += (alpha[d] + e[d]) * base;
│ │ │ │ +
253 base *= asCommon()._nIntervals+1;
│ │ │ │ +
254 }
│ │ │ │ +
255 }
│ │ │ │ +
256 return vec;
│ │ │ │ +
257 }
│ │ │ │ +
│ │ │ │ +
258
│ │ │ │ +
259 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
262 coords() const
│ │ │ │ +
263 {
│ │ │ │ +
264 std::array<unsigned int, dimension> v(asCommon().cellCoord());
│ │ │ │ +
265 CoordVector c;
│ │ │ │ +
266 for (int d=0; d<dimension; d++)
│ │ │ │ +
267 {
│ │ │ │ +
268 c[d] = (v[d]*1.0 + 0.5) / asCommon()._nIntervals;
│ │ │ │ +
269 }
│ │ │ │ +
270 return c;
│ │ │ │ +
271 }
│ │ │ │ +
│ │ │ │
272
│ │ │ │ - │ │ │ │ -
274 private:
│ │ │ │ - │ │ │ │ -
276
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
281 };
│ │ │ │ -
│ │ │ │ -
282
│ │ │ │ -
283 template<unsigned topologyId, class CoordType,
│ │ │ │ -
284 unsigned coerceToId, int dimension>
│ │ │ │ -
285 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension> &
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
287 {
│ │ │ │ -
288 static VirtualRefinementImp instance_{};
│ │ │ │ -
289 return instance_;
│ │ │ │ -
290 }
│ │ │ │ -
│ │ │ │ -
291
│ │ │ │ -
292 template<unsigned topologyId, class CoordType,
│ │ │ │ -
293 unsigned coerceToId, int dimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
296 {
│ │ │ │ -
297 return StaticRefinement::nVertices(tag);
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
300 template<unsigned topologyId, class CoordType,
│ │ │ │ -
301 unsigned coerceToId, int dimension>
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
305 {
│ │ │ │ -
306 return new SubEntityIteratorBack<dimension>(StaticRefinement::vBegin(tag));
│ │ │ │ -
307 }
│ │ │ │ +
273 // common
│ │ │ │ +
274 template<int dimension, class CoordType>
│ │ │ │ +
275 template<int codimension>
│ │ │ │ +
│ │ │ │ +
276 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ │ +
277 : public ForwardIteratorFacade<typename RefinementImp<dimension,
│ │ │ │ +
278 CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ │ +
279 public RefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>
│ │ │ │ +
280 {
│ │ │ │ +
281 public:
│ │ │ │ + │ │ │ │ +
283 typedef typename Refinement::template Codim<codimension>::SubEntityIterator This;
│ │ │ │ +
284
│ │ │ │ +
285 SubEntityIterator(unsigned int index, unsigned int nIntervals);
│ │ │ │ +
286
│ │ │ │ +
287 bool equals(const This &other) const;
│ │ │ │ +
288 void increment();
│ │ │ │ +
289
│ │ │ │ +
290 int index() const;
│ │ │ │ +
291 Geometry geometry () const;
│ │ │ │ +
292 private:
│ │ │ │ +
293 friend class RefinementSubEntityIteratorSpecial<dimension, CoordType, codimension>;
│ │ │ │ +
294 unsigned int _index;
│ │ │ │ +
295 unsigned int _nIntervals;
│ │ │ │ +
296
│ │ │ │ +
297 std::array<unsigned int, dimension>
│ │ │ │ +
298 cellCoord(unsigned int idx) const
│ │ │ │ +
299 {
│ │ │ │ +
300 return idx2coord(idx, _nIntervals);
│ │ │ │ +
301 }
│ │ │ │ +
302
│ │ │ │ +
303 std::array<unsigned int, dimension>
│ │ │ │ +
304 vertexCoord(unsigned int idx) const
│ │ │ │ +
305 {
│ │ │ │ +
306 return idx2coord(idx, _nIntervals+1u);
│ │ │ │ +
307 }
│ │ │ │
308
│ │ │ │ -
309 template<unsigned topologyId, class CoordType,
│ │ │ │ -
310 unsigned coerceToId, int dimension>
│ │ │ │ - │ │ │ │ -
312 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::
│ │ │ │ -
313 vEndBack(Dune::RefinementIntervals tag) const
│ │ │ │ -
314 {
│ │ │ │ -
315 return new SubEntityIteratorBack<dimension>(StaticRefinement::vEnd(tag));
│ │ │ │ -
316 }
│ │ │ │ -
317
│ │ │ │ -
318 template<unsigned topologyId, class CoordType,
│ │ │ │ -
319 unsigned coerceToId, int dimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
321 {
│ │ │ │ -
322 return StaticRefinement::nElements(tag);
│ │ │ │ -
323 }
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ -
325 template<unsigned topologyId, class CoordType,
│ │ │ │ -
326 unsigned coerceToId, int dimension>
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
330 {
│ │ │ │ -
331 return new SubEntityIteratorBack<0>(StaticRefinement::eBegin(tag));
│ │ │ │ -
332 }
│ │ │ │ -
333
│ │ │ │ -
334 template<unsigned topologyId, class CoordType,
│ │ │ │ -
335 unsigned coerceToId, int dimension>
│ │ │ │ - │ │ │ │ -
337 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::
│ │ │ │ -
338 eEndBack(Dune::RefinementIntervals tag) const
│ │ │ │ -
339 {
│ │ │ │ -
340 return new SubEntityIteratorBack<0>(StaticRefinement::eEnd(tag));
│ │ │ │ -
341 }
│ │ │ │ -
342
│ │ │ │ -
343 //
│ │ │ │ -
344 // The iterator backend implementation
│ │ │ │ -
345 //
│ │ │ │ -
346
│ │ │ │ -
347 // The iterator backend implementation specialties
│ │ │ │ -
348 template<unsigned topologyId, class CoordType,
│ │ │ │ -
349 unsigned coerceToId, int dimension, int codimension>
│ │ │ │ - │ │ │ │ -
351
│ │ │ │ -
352 // The iterator backend implementation specialties for vertices
│ │ │ │ -
353 template<unsigned topologyId, class CoordType,
│ │ │ │ -
354 unsigned coerceToId, int dimension>
│ │ │ │ -
│ │ │ │ -
355 class VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, dimension>
│ │ │ │ -
356 : public VirtualRefinement<dimension, CoordType>::template SubEntityIteratorBack<dimension>
│ │ │ │ -
357 {};
│ │ │ │ -
│ │ │ │ -
358
│ │ │ │ -
359 // The iterator backend implementation specialties for elements
│ │ │ │ -
360
│ │ │ │ -
361 template<unsigned topologyId, class CoordType,
│ │ │ │ -
362 unsigned coerceToId, int dimension>
│ │ │ │ -
│ │ │ │ -
363 class VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, 0>
│ │ │ │ -
364 : public VirtualRefinement<dimension, CoordType>::template SubEntityIteratorBack<0>
│ │ │ │ -
365 {
│ │ │ │ -
366 public:
│ │ │ │ - │ │ │ │ -
368 typedef typename VirtualRefinementImp::template SubEntityIteratorBack<0> Common;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
371 typedef typename RefinementBase::IndexVector IndexVector;
│ │ │ │ -
372
│ │ │ │ -
373 IndexVector vertexIndices() const;
│ │ │ │ -
374 };
│ │ │ │ -
│ │ │ │ -
375
│ │ │ │ -
376 template<unsigned topologyId, class CoordType,
│ │ │ │ -
377 unsigned coerceToId, int dimension>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
380 vertexIndices() const
│ │ │ │ -
381 {
│ │ │ │ -
382 IndexVector vIndices;
│ │ │ │ -
383 vIndices.reserve(StaticRefinement::IndexVector::dimension);
│ │ │ │ -
384
│ │ │ │ -
385 typename StaticRefinement::IndexVector sIndices = static_cast<const Common *>(this)->backend.vertexIndices();
│ │ │ │ -
386 for(int i = 0; i < StaticRefinement::IndexVector::dimension; ++i)
│ │ │ │ -
387 vIndices.push_back(sIndices[i]);
│ │ │ │ -
388 return vIndices;
│ │ │ │ -
389 }
│ │ │ │ -
│ │ │ │ -
390
│ │ │ │ -
391 // The shared iterator backend implementation
│ │ │ │ -
392 template<unsigned topologyId, class CoordType,
│ │ │ │ -
393 unsigned coerceToId, int dimension>
│ │ │ │ -
394 template<int codimension>
│ │ │ │ -
│ │ │ │ -
395 class VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack
│ │ │ │ -
396 : public VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, codimension>
│ │ │ │ -
397 {
│ │ │ │ -
398 public:
│ │ │ │ -
399 typedef typename StaticRefinement::template Codim<codimension>::SubEntityIterator BackendIterator;
│ │ │ │ - │ │ │ │ -
401 typedef typename VirtualRefinement::template SubEntityIteratorBack<codimension> Base;
│ │ │ │ - │ │ │ │ -
403
│ │ │ │ - │ │ │ │ -
405 SubEntityIteratorBack(const This &other);
│ │ │ │ -
406
│ │ │ │ -
407 Base *clone() const;
│ │ │ │ +
309 std::array<unsigned int, dimension>
│ │ │ │ +
310 cellCoord() const
│ │ │ │ +
311 {
│ │ │ │ +
312 return cellCoord(_index);
│ │ │ │ +
313 }
│ │ │ │ +
314
│ │ │ │ +
315 std::array<unsigned int, dimension>
│ │ │ │ +
316 vertexCoord() const
│ │ │ │ +
317 {
│ │ │ │ +
318 return vertexCoord(_index);
│ │ │ │ +
319 }
│ │ │ │ +
320
│ │ │ │ +
321 std::array<unsigned int, dimension>
│ │ │ │ +
322 idx2coord(unsigned int idx, unsigned int w) const
│ │ │ │ +
323 {
│ │ │ │ +
324 std::array<unsigned int, dimension> c;
│ │ │ │ +
325 for (unsigned int d = 0; d < dimension; d++)
│ │ │ │ +
326 {
│ │ │ │ +
327 c[d] = idx%w;
│ │ │ │ +
328 idx = idx/w;
│ │ │ │ +
329 }
│ │ │ │ +
330 return c;
│ │ │ │ +
331 }
│ │ │ │ +
332
│ │ │ │ +
333 unsigned int
│ │ │ │ +
334 coord2idx(std::array<unsigned int, dimension> c, unsigned int w) const
│ │ │ │ +
335 {
│ │ │ │ +
336 unsigned int i = 0;
│ │ │ │ +
337 for (unsigned int d = dimension; d > 0; d--)
│ │ │ │ +
338 {
│ │ │ │ +
339 i *= w;
│ │ │ │ +
340 i += c[d-1];
│ │ │ │ +
341 }
│ │ │ │ +
342 return i;
│ │ │ │ +
343 }
│ │ │ │ +
344
│ │ │ │ +
345 std::array<unsigned int, dimension>
│ │ │ │ +
346 idx2multiidx(unsigned int idx) const
│ │ │ │ +
347 {
│ │ │ │ +
348 std::array<unsigned int, dimension> alpha;
│ │ │ │ +
349 for (unsigned int i = 0; i < dimension; ++i)
│ │ │ │ +
350 alpha[i] = (idx >> i) & 1u;
│ │ │ │ +
351 return alpha;
│ │ │ │ +
352 }
│ │ │ │ +
353 };
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
355#ifndef DOXYGEN
│ │ │ │ +
356 template<int dimension, class CoordType>
│ │ │ │ +
357 template<int codimension>
│ │ │ │ +
358 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
359 SubEntityIterator(unsigned int index, unsigned int nIntervals)
│ │ │ │ +
360 : _index(index), _nIntervals(nIntervals)
│ │ │ │ +
361 {}
│ │ │ │ +
362
│ │ │ │ +
363 template<int dimension, class CoordType>
│ │ │ │ +
364 template<int codimension>
│ │ │ │ +
365 bool
│ │ │ │ +
366 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
367 equals(const This &other) const
│ │ │ │ +
368 {
│ │ │ │ +
369 return ((_index == other._index) && (_nIntervals == other._nIntervals));
│ │ │ │ +
370 }
│ │ │ │ +
371
│ │ │ │ +
372 template<int dimension, class CoordType>
│ │ │ │ +
373 template<int codimension>
│ │ │ │ +
374 void
│ │ │ │ +
375 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
376 increment()
│ │ │ │ +
377 {
│ │ │ │ +
378 ++_index;
│ │ │ │ +
379 }
│ │ │ │ +
380
│ │ │ │ +
381 template<int dimension, class CoordType>
│ │ │ │ +
382 template<int codimension>
│ │ │ │ +
383 int
│ │ │ │ +
384 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ │ +
385 index() const
│ │ │ │ +
386 {
│ │ │ │ +
387 return _index;
│ │ │ │ +
388 }
│ │ │ │ +
389
│ │ │ │ +
390 template<int dimension, class CoordType>
│ │ │ │ +
391 template<int codimension>
│ │ │ │ +
392 typename RefinementImp<dimension, CoordType>::template Codim<codimension>::Geometry
│ │ │ │ +
393 RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator::geometry () const
│ │ │ │ +
394 {
│ │ │ │ +
395 std::array<unsigned int,dimension> intCoords = idx2coord(_index,_nIntervals);
│ │ │ │ +
396
│ │ │ │ +
397 Dune::FieldVector<CoordType,dimension> lower;
│ │ │ │ +
398 Dune::FieldVector<CoordType,dimension> upper;
│ │ │ │ +
399
│ │ │ │ +
400 assert(codimension == 0 or codimension == dimension);
│ │ │ │ +
401
│ │ │ │ +
402 if constexpr (codimension == 0) {
│ │ │ │ +
403 for (size_t j = 0; j < dimension; j++)
│ │ │ │ +
404 {
│ │ │ │ +
405 lower[j] = double(intCoords[j]) / double(_nIntervals);
│ │ │ │ +
406 upper[j] = double(intCoords[j] + 1) / double(_nIntervals);
│ │ │ │ +
407 }
│ │ │ │
408
│ │ │ │ -
409 bool operator==(const Base &other) const;
│ │ │ │ -
410 Base &operator++();
│ │ │ │ -
411
│ │ │ │ -
412 int index() const;
│ │ │ │ -
413 CoordVector coords() const;
│ │ │ │ +
409 return typename RefinementImp<dimension,
│ │ │ │ +
410 CoordType>::template Codim<codimension>::Geometry(lower,upper);
│ │ │ │ +
411 } else {
│ │ │ │ +
412 for (size_t j = 0; j < dimension; j++)
│ │ │ │ +
413 lower[j] = upper[j] = double(intCoords[j]) / double(_nIntervals);
│ │ │ │
414
│ │ │ │ -
415 private:
│ │ │ │ -
416 friend class VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, codimension>;
│ │ │ │ -
417 BackendIterator backend;
│ │ │ │ -
418 };
│ │ │ │ -
│ │ │ │ +
415 return typename RefinementImp<dimension,
│ │ │ │ +
416 CoordType>::template Codim<codimension>::Geometry(lower,upper,std::bitset<dimension>(0));
│ │ │ │ +
417 }
│ │ │ │ +
418 }
│ │ │ │
419
│ │ │ │ -
420 template<unsigned topologyId, class CoordType,
│ │ │ │ -
421 unsigned coerceToId, int dimension>
│ │ │ │ -
422 template<int codimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
425 : backend(backend_)
│ │ │ │ -
426 {}
│ │ │ │ -
│ │ │ │ -
427
│ │ │ │ -
428 template<unsigned topologyId, class CoordType,
│ │ │ │ -
429 unsigned coerceToId, int dimension>
│ │ │ │ -
430 template<int codimension>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
432 SubEntityIteratorBack(const This &other)
│ │ │ │ -
433 : VirtualRefinementImpSubEntityIteratorBackSpecial<topologyId, CoordType, coerceToId, dimension, codimension>(other),
│ │ │ │ -
434 backend(other.backend)
│ │ │ │ -
435 {}
│ │ │ │ -
│ │ │ │ -
436
│ │ │ │ -
437 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ -
438 template<int codimension>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
441 clone() const
│ │ │ │ -
442 { return new This(*this); }
│ │ │ │ -
│ │ │ │ -
443
│ │ │ │ -
444 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ -
445 template<int codimension>
│ │ │ │ -
446 bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
448 operator==(const Base &other) const
│ │ │ │ -
449 {
│ │ │ │ -
450 try {
│ │ │ │ -
451 return backend == dynamic_cast<const This &>(other).backend;
│ │ │ │ -
452 }
│ │ │ │ -
453 catch(const std::bad_cast&)
│ │ │ │ -
454 {
│ │ │ │ -
455 return false;
│ │ │ │ -
456 }
│ │ │ │ -
457 }
│ │ │ │ -
│ │ │ │ -
458
│ │ │ │ -
459 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ -
460 template<int codimension>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
464 {
│ │ │ │ -
465 ++backend;
│ │ │ │ -
466 return *this;
│ │ │ │ -
467 }
│ │ │ │ -
│ │ │ │ -
468
│ │ │ │ -
469 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ -
470 template<int codimension>
│ │ │ │ -
471 int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
473 index() const
│ │ │ │ -
474 { return backend.index(); }
│ │ │ │ -
│ │ │ │ -
475
│ │ │ │ -
476 template<unsigned topologyId, class CoordType, unsigned coerceToId, int dimension>
│ │ │ │ -
477 template<int codimension>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
480 coords() const
│ │ │ │ -
481 { return backend.coords(); }
│ │ │ │ -
│ │ │ │ -
482
│ │ │ │ -
483 // ////////////////////////
│ │ │ │ -
484 //
│ │ │ │ -
485 // The refinement builder
│ │ │ │ -
486 //
│ │ │ │ -
487
│ │ │ │ -
488 template<int dimension, class CoordType>
│ │ │ │ -
489 class RefinementBuilder;
│ │ │ │ -
490
│ │ │ │ -
501 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
504 GeometryType geometryType,
│ │ │ │ -
506 GeometryType coerceTo)
│ │ │ │ -
507 {
│ │ │ │ -
508 // Check that the user used valid geometry types
│ │ │ │ -
509 assert(geometryType.dim() == dimension && coerceTo.dim() == dimension);
│ │ │ │ -
510 return RefinementBuilder<dimension, CoordType>::build( geometryType.id(), coerceTo.id() );
│ │ │ │ -
511 }
│ │ │ │ -
│ │ │ │ -
512
│ │ │ │ -
513 // In principle the trick with the class is no longer necessary,
│ │ │ │ -
514 // but I'm keeping it in here so it will be easier to specialize
│ │ │ │ -
515 // buildRefinement when someone implements pyramids and prisms
│ │ │ │ -
516 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
518 {
│ │ │ │ -
519 public:
│ │ │ │ -
520 static
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
522 build(unsigned topologyId, unsigned coerceToId)
│ │ │ │ -
523 {
│ │ │ │ -
524 topologyId &= ~1;
│ │ │ │ -
525 coerceToId &= ~1;
│ │ │ │ -
526
│ │ │ │ -
527 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
│ │ │ │ -
528 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
│ │ │ │ -
529
│ │ │ │ -
530 switch( topologyId )
│ │ │ │ -
531 {
│ │ │ │ -
532 //case GeometryType::simplex:
│ │ │ │ -
533 case idSimplex :
│ │ │ │ -
534 //switch( coerceTo )
│ │ │ │ -
535 switch( coerceToId )
│ │ │ │ -
536 {
│ │ │ │ -
537 //case GeometryType::simplex:
│ │ │ │ -
538 case idSimplex :
│ │ │ │ - │ │ │ │ -
540 default :
│ │ │ │ -
541 break;
│ │ │ │ -
542 }
│ │ │ │ -
543 break;
│ │ │ │ -
544
│ │ │ │ -
545 //case GeometryType::cube:
│ │ │ │ -
546 case idCube :
│ │ │ │ -
547 switch( coerceToId )
│ │ │ │ -
548 {
│ │ │ │ -
549 case idSimplex :
│ │ │ │ - │ │ │ │ -
551 case idCube :
│ │ │ │ - │ │ │ │ -
553 default :
│ │ │ │ -
554 break;
│ │ │ │ -
555 }
│ │ │ │ -
556 break;
│ │ │ │ -
557
│ │ │ │ -
558 default :
│ │ │ │ -
559 break;
│ │ │ │ -
560 }
│ │ │ │ -
561 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, "
│ │ │ │ -
562 << coerceToId << " >.");
│ │ │ │ -
563 }
│ │ │ │ -
│ │ │ │ -
564 };
│ │ │ │ -
│ │ │ │ -
565
│ │ │ │ -
566 template<class CoordType>
│ │ │ │ -
│ │ │ │ -
567 class RefinementBuilder<1, CoordType>
│ │ │ │ -
568 {
│ │ │ │ -
569 static const std::size_t dimension = 1;
│ │ │ │ -
570 public:
│ │ │ │ -
571 static
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
573 build(unsigned topologyId, unsigned coerceToId)
│ │ │ │ -
574 {
│ │ │ │ -
575 topologyId &= ~1;
│ │ │ │ -
576 coerceToId &= ~1;
│ │ │ │ -
577
│ │ │ │ -
578 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
│ │ │ │ -
579
│ │ │ │ -
580 if (topologyId == 0 && coerceToId == 0)
│ │ │ │ - │ │ │ │ -
582
│ │ │ │ -
583 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, "
│ │ │ │ -
584 << coerceToId << " >.");
│ │ │ │ -
585 }
│ │ │ │ -
│ │ │ │ -
586 };
│ │ │ │ -
│ │ │ │ -
587
│ │ │ │ -
588 template<class CoordType>
│ │ │ │ -
│ │ │ │ -
589 class RefinementBuilder<3, CoordType>
│ │ │ │ -
590 {
│ │ │ │ -
591 static const std::size_t dimension = 3;
│ │ │ │ -
592 public:
│ │ │ │ -
593 static
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
595 build(unsigned topologyId, unsigned coerceToId)
│ │ │ │ -
596 {
│ │ │ │ -
597 topologyId &= ~1;
│ │ │ │ -
598 coerceToId &= ~1;
│ │ │ │ -
599
│ │ │ │ -
600 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
│ │ │ │ -
601 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
│ │ │ │ -
602 constexpr unsigned idPrism = GeometryTypes::prism.id() & ~1;
│ │ │ │ -
603 constexpr unsigned idPyramid = GeometryTypes::pyramid.id() & ~1;
│ │ │ │ -
604
│ │ │ │ -
605 switch( topologyId )
│ │ │ │ -
606 {
│ │ │ │ -
607 //case GeometryType::simplex:
│ │ │ │ -
608 case idSimplex :
│ │ │ │ -
609 //switch( coerceTo )
│ │ │ │ -
610 switch( coerceToId )
│ │ │ │ -
611 {
│ │ │ │ -
612 //case GeometryType::simplex:
│ │ │ │ -
613 case idSimplex :
│ │ │ │ - │ │ │ │ -
615 default :
│ │ │ │ -
616 break;
│ │ │ │ -
617 }
│ │ │ │ -
618 break;
│ │ │ │ -
619
│ │ │ │ -
620 //case GeometryType::cube:
│ │ │ │ -
621 case idCube :
│ │ │ │ -
622 switch( coerceToId )
│ │ │ │ -
623 {
│ │ │ │ -
624 case idSimplex :
│ │ │ │ - │ │ │ │ -
626 case idCube :
│ │ │ │ - │ │ │ │ -
628 default :
│ │ │ │ -
629 break;
│ │ │ │ -
630 }
│ │ │ │ -
631 break;
│ │ │ │ -
632
│ │ │ │ -
633 //case GeometryType::prism:
│ │ │ │ -
634 case idPrism :
│ │ │ │ -
635 switch( coerceToId )
│ │ │ │ -
636 {
│ │ │ │ -
637 case idSimplex :
│ │ │ │ - │ │ │ │ -
639 default :
│ │ │ │ -
640 break;
│ │ │ │ -
641 }
│ │ │ │ -
642 break;
│ │ │ │ -
643
│ │ │ │ -
644 //case GeometryType::pyramid:
│ │ │ │ -
645 case idPyramid :
│ │ │ │ -
646 switch( coerceToId )
│ │ │ │ -
647 {
│ │ │ │ -
648 case idSimplex :
│ │ │ │ - │ │ │ │ -
650 default :
│ │ │ │ -
651 break;
│ │ │ │ -
652 }
│ │ │ │ -
653 break;
│ │ │ │ -
654
│ │ │ │ -
655 default :
│ │ │ │ -
656 break;
│ │ │ │ -
657 }
│ │ │ │ -
658 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, "
│ │ │ │ -
659 << coerceToId << " >.");
│ │ │ │ -
660 }
│ │ │ │ -
│ │ │ │ -
661 };
│ │ │ │ -
│ │ │ │ -
662
│ │ │ │ -
663} // namespace Dune
│ │ │ │ -
664
│ │ │ │ -
665#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_CC
│ │ │ │ -
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.
│ │ │ │ +
420#endif // DOXYGEN
│ │ │ │ +
421
│ │ │ │ +
422 } // namespace HCube
│ │ │ │ +
│ │ │ │ +
423
│ │ │ │ +
424 // ///////////////////////
│ │ │ │ +
425 //
│ │ │ │ +
426 // The refinement traits
│ │ │ │ +
427 //
│ │ │ │ +
428
│ │ │ │ +
429#ifndef DOXYGEN
│ │ │ │ +
430 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ │ +
431 int dim>
│ │ │ │ +
432 struct Traits<
│ │ │ │ +
433 topologyId, CoordType, coerceToId, dim,
│ │ │ │ +
434 typename std::enable_if<
│ │ │ │ +
435 (dim >= 2 &&
│ │ │ │ +
436 (GeometryTypes::cube(dim).id() >> 1) ==
│ │ │ │ +
437 (topologyId >> 1) &&
│ │ │ │ +
438 (GeometryTypes::cube(dim).id() >> 1) ==
│ │ │ │ +
439 (coerceToId >> 1)
│ │ │ │ +
440 )>::type
│ │ │ │ +
441 >
│ │ │ │ +
442 {
│ │ │ │ +
443 typedef HCube::RefinementImp<dim, CoordType> Imp;
│ │ │ │ +
444 };
│ │ │ │ +
445#endif
│ │ │ │ +
446
│ │ │ │ +
447 } // namespace RefinementImp
│ │ │ │ +
448
│ │ │ │ +
449} // namespace Dune
│ │ │ │ +
450
│ │ │ │ +
451#endif // DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ │ +
A geometry implementation for axis-aligned hypercubes.
│ │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ + │ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:503
│ │ │ │ +
A geometry implementation for axis-aligned hypercubes.
Definition axisalignedcubegeometry.hh:50
│ │ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ │ -
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ -
typedef IndexVector
The IndexVector of the Refinement.
Definition base.cc:177
│ │ │ │ -
static VertexIterator vEnd(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:217
│ │ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ -
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ -
Definition virtualrefinement.cc:72
│ │ │ │ -
Refinement::template Codim< 0 >::SubEntityIterator Common
Definition virtualrefinement.cc:85
│ │ │ │ -
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:84
│ │ │ │ -
Refinement::IndexVector IndexVector
Definition virtualrefinement.cc:86
│ │ │ │ -
VirtualRefinement< dimension, CoordType >::template Codim< codimension >::SubEntityIterator::CoordVector coords() const
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Refinement::template SubEntityIteratorBack< codimension > IteratorBack
Definition virtualrefinement.cc:109
│ │ │ │ -
Refinement::CoordVector CoordVector
Definition virtualrefinement.cc:110
│ │ │ │ -
Refinement::template Codim< codimension >::SubEntityIterator This
Definition virtualrefinement.cc:108
│ │ │ │ -
bool equals(const This &other) const
│ │ │ │ -
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:107
│ │ │ │ - │ │ │ │ -
Definition virtualrefinement.cc:200
│ │ │ │ -
virtual ~VirtualRefinementSubEntityIteratorBackSpecial()
Definition virtualrefinement.cc:208
│ │ │ │ - │ │ │ │ -
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:217
│ │ │ │ -
Refinement::IndexVector IndexVector
Definition virtualrefinement.cc:218
│ │ │ │ -
virtual ~VirtualRefinementSubEntityIteratorBackSpecial()
Definition virtualrefinement.cc:222
│ │ │ │ -
Definition virtualrefinement.cc:231
│ │ │ │ - │ │ │ │ -
Refinement::template SubEntityIteratorBack< codimension > This
Definition virtualrefinement.cc:234
│ │ │ │ - │ │ │ │ -
Refinement::CoordVector CoordVector
Definition virtualrefinement.cc:235
│ │ │ │ -
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:233
│ │ │ │ -
virtual bool operator==(const This &other) const =0
│ │ │ │ -
virtual CoordVector coords() const =0
│ │ │ │ -
virtual ~SubEntityIteratorBack()
Definition virtualrefinement.cc:237
│ │ │ │ - │ │ │ │ -
Definition virtualrefinement.cc:261
│ │ │ │ -
int nVertices(Dune::RefinementIntervals tag) const
Get the number of Vertices.
Definition virtualrefinement.cc:295
│ │ │ │ -
Dune::VirtualRefinement< dimension, CoordType > VirtualRefinement
Definition virtualrefinement.cc:264
│ │ │ │ -
int nElements(Dune::RefinementIntervals tag) const
Get the number of Elements.
Definition virtualrefinement.cc:320
│ │ │ │ -
static VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > & instance()
Definition virtualrefinement.cc:286
│ │ │ │ -
Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension > StaticRefinement
Definition virtualrefinement.cc:263
│ │ │ │ -
Definition virtualrefinement.cc:397
│ │ │ │ -
VirtualRefinement::template SubEntityIteratorBack< codimension > Base
Definition virtualrefinement.cc:401
│ │ │ │ -
VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::template SubEntityIteratorBack< codimension > This
Definition virtualrefinement.cc:400
│ │ │ │ -
StaticRefinement::template Codim< codimension >::SubEntityIterator BackendIterator
Definition virtualrefinement.cc:399
│ │ │ │ -
VirtualRefinement::CoordVector CoordVector
Definition virtualrefinement.cc:402
│ │ │ │ - │ │ │ │ -
VirtualRefinementImp::template SubEntityIteratorBack< 0 > Common
Definition virtualrefinement.cc:368
│ │ │ │ - │ │ │ │ -
VirtualRefinement< dimension, CoordType > RefinementBase
Definition virtualrefinement.cc:370
│ │ │ │ -
Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > VirtualRefinementImp
Definition virtualrefinement.cc:367
│ │ │ │ -
VirtualRefinementImp::StaticRefinement StaticRefinement
Definition virtualrefinement.cc:369
│ │ │ │ -
Definition virtualrefinement.cc:518
│ │ │ │ -
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:522
│ │ │ │ -
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:573
│ │ │ │ -
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:595
│ │ │ │ -
VirtualRefinement base class.
Definition virtualrefinement.hh:294
│ │ │ │ -
SubEntityIteratorBack< dimension > VertexIteratorBack
Definition virtualrefinement.hh:318
│ │ │ │ -
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:38
│ │ │ │ -
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:54
│ │ │ │ -
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:62
│ │ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition virtualrefinement.hh:301
│ │ │ │ -
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:46
│ │ │ │ -
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition virtualrefinement.hh:308
│ │ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition virtualrefinement.hh:299
│ │ │ │ -
SubEntityIteratorBack< 0 > ElementIteratorBack
Definition virtualrefinement.hh:319
│ │ │ │ -
codim database of VirtualRefinement
Definition virtualrefinement.hh:378
│ │ │ │ +
Refinement implementation for hypercubes
Definition hcube.cc:75
│ │ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition hcube.cc:86
│ │ │ │ +
static ElementIterator eEnd(unsigned nIntervals)
Definition hcube.cc:153
│ │ │ │ +
static unsigned nVertices(unsigned nIntervals)
Definition hcube.cc:109
│ │ │ │ +
static VertexIterator vEnd(unsigned nIntervals)
Definition hcube.cc:126
│ │ │ │ +
FieldVector< int,(1<< dimension)> IndexVector
Definition hcube.cc:87
│ │ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
Definition hcube.cc:84
│ │ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition hcube.cc:85
│ │ │ │ +
static unsigned nElements(unsigned nIntervals)
Definition hcube.cc:134
│ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcube.cc:80
│ │ │ │ +
static ElementIterator eBegin(unsigned nIntervals)
Definition hcube.cc:145
│ │ │ │ +
static constexpr int dimension
Know your own dimension.
Definition hcube.cc:78
│ │ │ │ +
static VertexIterator vBegin(unsigned nIntervals)
Definition hcube.cc:118
│ │ │ │ + │ │ │ │ +
Dune::AxisAlignedCubeGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition hcube.cc:103
│ │ │ │ +
SubEntityIterator base class for hypercube refinement.
Definition hcube.cc:175
│ │ │ │ + │ │ │ │ +
Refinement::template Codim< dimension >::SubEntityIterator Common
Definition hcube.cc:188
│ │ │ │ + │ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcube.cc:220
│ │ │ │ +
Refinement::template Codim< 0 >::SubEntityIterator Common
Definition hcube.cc:221
│ │ │ │ + │ │ │ │ + │ │ │ │ +
SubEntityIterator(unsigned int index, unsigned int nIntervals)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcube.cc:282
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Refinement::template Codim< codimension >::SubEntityIterator This
Definition hcube.cc:283
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1002 +1,527 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -virtualrefinement.cc │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ │ +hcube.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 (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ -_7#define DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ -8 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include │ │ │ │ │ -18#include │ │ │ │ │ -19#include │ │ │ │ │ -20 │ │ │ │ │ -21#include "_t_y_p_e_._h_h" │ │ │ │ │ -22#include "_r_e_f_i_n_e_m_e_n_t_._h_h" │ │ │ │ │ -23 │ │ │ │ │ -24namespace _D_u_n_e │ │ │ │ │ -25{ │ │ │ │ │ -26 // ////////////////////////////////////////// │ │ │ │ │ -27 // │ │ │ │ │ -28 // The virtual base class and its iterators │ │ │ │ │ -29 // │ │ │ │ │ -30 │ │ │ │ │ -31 // │ │ │ │ │ -32 // Refinement │ │ │ │ │ -33 // │ │ │ │ │ -34 │ │ │ │ │ -35 template │ │ │ │ │ -36 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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 │ │ │ │ │ -_3_7 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ -38_ _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) const │ │ │ │ │ -39 { │ │ │ │ │ -40 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(vBeginBack(tag)); │ │ │ │ │ -41 } │ │ │ │ │ -42 │ │ │ │ │ -43 template │ │ │ │ │ -44 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_5 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ -46_ _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) const │ │ │ │ │ -47 { │ │ │ │ │ -48 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(vEndBack(tag)); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -51 template │ │ │ │ │ -52 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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 │ │ │ │ │ -_5_3 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ -54_ _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) const │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ +7 │ │ │ │ │ +42#include │ │ │ │ │ +43 │ │ │ │ │ +44#include │ │ │ │ │ +45#include │ │ │ │ │ +46 │ │ │ │ │ +47#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> │ │ │ │ │ +48#include <_d_u_n_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_._h_h> │ │ │ │ │ +49 │ │ │ │ │ +50#include "_b_a_s_e_._c_c" // for RefinementTraits │ │ │ │ │ +51 │ │ │ │ │ +52namespace _D_u_n_e │ │ │ │ │ +53{ │ │ │ │ │ +54 namespace RefinementImp │ │ │ │ │ 55 { │ │ │ │ │ -56 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(eBeginBack(tag)); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -59 template │ │ │ │ │ -60 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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 │ │ │ │ │ -_6_1 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ │ -62_ _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) const │ │ │ │ │ +_6_2 namespace HCube │ │ │ │ │ 63 { │ │ │ │ │ -64 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(eEndBack(tag)); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 // │ │ │ │ │ -68 // The iterators │ │ │ │ │ -69 // │ │ │ │ │ -70 │ │ │ │ │ -71 template │ │ │ │ │ -_7_2 class _V_i_r_t_u_a_l_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_p_e_c_i_a_l; │ │ │ │ │ -73 │ │ │ │ │ -74 // The iterator for vertices │ │ │ │ │ -75 template │ │ │ │ │ -_7_6 class _V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ -77 {}; │ │ │ │ │ -78 │ │ │ │ │ -79 // The iterator for elements │ │ │ │ │ -80 template │ │ │ │ │ -_8_1 class _V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ -82 { │ │ │ │ │ -83 public: │ │ │ │ │ -_8_4 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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; │ │ │ │ │ -_8_5 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _C_o_m_m_o_n; │ │ │ │ │ -_8_6 typedef typename Refinement::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -87 │ │ │ │ │ -88 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -89 }; │ │ │ │ │ -90 │ │ │ │ │ -91 template │ │ │ │ │ -92 typename _V_i_r_t_u_a_l_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_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 │ │ │ │ │ -_9_3 _V_i_r_t_u_a_l_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_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_>_:_: │ │ │ │ │ -94_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ -95 { │ │ │ │ │ -96 return static_cast(this)->backend->vertexIndices(); │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -99 // The iterator common stuff │ │ │ │ │ -100 template │ │ │ │ │ -101 template │ │ │ │ │ -_1_0_2 class _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::_C_o_d_i_m:: │ │ │ │ │ -SubEntityIterator │ │ │ │ │ -103 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ │ -104 public _V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ -105 { │ │ │ │ │ -106 public: │ │ │ │ │ -_1_0_7 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_0_8 typedef typename Refinement::template _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 │ │ │ │ │ -_T_h_i_s; │ │ │ │ │ -_1_0_9 typedef typename Refinement::template _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> │ │ │ │ │ -_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ -_1_1_0 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -111 │ │ │ │ │ -_1_1_2 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(_I_t_e_r_a_t_o_r_B_a_c_k *backend); │ │ │ │ │ -_1_1_3 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(const _T_h_i_s &other); │ │ │ │ │ -_1_1_4 _~_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(); │ │ │ │ │ -115 │ │ │ │ │ -_1_1_6 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _T_h_i_s &other); │ │ │ │ │ -117 │ │ │ │ │ -_1_1_8 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ │ -_1_1_9 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ -120 │ │ │ │ │ -_1_2_1 int _i_n_d_e_x() const; │ │ │ │ │ +73 template │ │ │ │ │ +_7_4 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +75 { │ │ │ │ │ +76 public: │ │ │ │ │ +_7_8 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ │ +79 //- Know yourself │ │ │ │ │ +_8_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; │ │ │ │ │ +81 │ │ │ │ │ +82 template │ │ │ │ │ +83 struct _C_o_d_i_m; │ │ │ │ │ +_8_4 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; │ │ │ │ │ +_8_5 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +_8_6 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; │ │ │ │ │ +_8_7 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +88 │ │ │ │ │ +89 static unsigned _n_V_e_r_t_i_c_e_s(unsigned nIntervals); │ │ │ │ │ +90 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(unsigned nIntervals); │ │ │ │ │ +91 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(unsigned nIntervals); │ │ │ │ │ +92 │ │ │ │ │ +93 static unsigned _n_E_l_e_m_e_n_t_s(unsigned nIntervals); │ │ │ │ │ +94 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(unsigned nIntervals); │ │ │ │ │ +95 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(unsigned nIntervals); │ │ │ │ │ +96 }; │ │ │ │ │ +97 │ │ │ │ │ +98 template │ │ │ │ │ +99 template │ │ │ │ │ +_1_0_0 struct _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m │ │ │ │ │ +101 { │ │ │ │ │ +102 class SubEntityIterator; │ │ │ │ │ +_1_0_3 typedef _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_e_o_m_e_t_r_y; │ │ │ │ │ +104 }; │ │ │ │ │ +105 │ │ │ │ │ +106 template │ │ │ │ │ +107 unsigned │ │ │ │ │ +_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(unsigned nIntervals) │ │ │ │ │ +110 { │ │ │ │ │ +111 // return (nIntervals + 1)^dim │ │ │ │ │ +112 return Dune::power(nIntervals+1u, unsigned(dimension)); │ │ │ │ │ +113 } │ │ │ │ │ +114 │ │ │ │ │ +115 template │ │ │ │ │ +116 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_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_>_:_: │ │ │ │ │ +118_ _v_B_e_g_i_n(unsigned nIntervals) │ │ │ │ │ +119 { │ │ │ │ │ +120 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(0,nIntervals); │ │ │ │ │ +121 } │ │ │ │ │ 122 │ │ │ │ │ -123 // If you simply use an unqualified CoordVector here g++-4.2 chokes │ │ │ │ │ -124 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_t_e_m_p_l_a_t_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:: │ │ │ │ │ -_1_2_5 CoordVector _c_o_o_r_d_s() const; │ │ │ │ │ -126 private: │ │ │ │ │ -127 friend class _V_i_r_t_u_a_l_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_p_e_c_i_a_l; │ │ │ │ │ -128 _I_t_e_r_a_t_o_r_B_a_c_k *backend; │ │ │ │ │ -129 }; │ │ │ │ │ +123 template │ │ │ │ │ +124 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_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_>_:_: │ │ │ │ │ +126_ _v_E_n_d(unsigned nIntervals) │ │ │ │ │ +127 { │ │ │ │ │ +128 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nVertices(nIntervals),nIntervals); │ │ │ │ │ +129 } │ │ │ │ │ 130 │ │ │ │ │ -131#ifndef DOXYGEN │ │ │ │ │ -132 template │ │ │ │ │ -133 template │ │ │ │ │ -134 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_:_: │ │ │ │ │ -135_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(IteratorBack *backend_) │ │ │ │ │ -136 : backend(backend_) │ │ │ │ │ -137 {} │ │ │ │ │ -138 │ │ │ │ │ -139 template │ │ │ │ │ -140 template │ │ │ │ │ -141 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_:_: │ │ │ │ │ -142_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(const This &other) │ │ │ │ │ -143 : backend(other.backend->clone()) │ │ │ │ │ -144 {} │ │ │ │ │ -145 │ │ │ │ │ -146 template │ │ │ │ │ -147 template │ │ │ │ │ -148 VirtualRefinement::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -149 ~SubEntityIterator() │ │ │ │ │ -150 { │ │ │ │ │ -151 delete backend; │ │ │ │ │ -152 } │ │ │ │ │ -153 │ │ │ │ │ -154 template │ │ │ │ │ -155 template │ │ │ │ │ -156 typename VirtualRefinement::template │ │ │ │ │ -Codim::SubEntityIterator & │ │ │ │ │ -157 VirtualRefinement::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -158 operator=(const This &other) │ │ │ │ │ -159 { │ │ │ │ │ -160 delete backend; │ │ │ │ │ -161 backend = other.backend->clone(); │ │ │ │ │ -162 } │ │ │ │ │ -163 │ │ │ │ │ -164 template │ │ │ │ │ -165 template │ │ │ │ │ -166 bool │ │ │ │ │ -167 VirtualRefinement::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -168 equals(const This &other) const │ │ │ │ │ -169 { return *backend == *(other.backend); } │ │ │ │ │ -170 │ │ │ │ │ -171 template │ │ │ │ │ -172 template │ │ │ │ │ -173 void │ │ │ │ │ -174 VirtualRefinement::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -175 increment() │ │ │ │ │ -176 { │ │ │ │ │ -177 ++*backend; │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -180 template │ │ │ │ │ -181 template │ │ │ │ │ -182 int │ │ │ │ │ -183 VirtualRefinement::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -184 index() const │ │ │ │ │ -185 { return backend->index(); } │ │ │ │ │ -186 │ │ │ │ │ -187 template │ │ │ │ │ -188 template │ │ │ │ │ -189 typename VirtualRefinement::template │ │ │ │ │ -Codim::SubEntityIterator::CoordVector │ │ │ │ │ -190 VirtualRefinement::Codim:: │ │ │ │ │ -SubEntityIterator:: │ │ │ │ │ -191 coords() const │ │ │ │ │ -192 { return backend->coords(); } │ │ │ │ │ -193#endif // DOXYGEN │ │ │ │ │ -194 │ │ │ │ │ -195 // │ │ │ │ │ -196 // The iterator backend │ │ │ │ │ -197 // │ │ │ │ │ -198 │ │ │ │ │ -199 template │ │ │ │ │ -_2_0_0 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l; │ │ │ │ │ -201 │ │ │ │ │ -202 // The iterator backend for vertices │ │ │ │ │ -203 template │ │ │ │ │ -_2_0_4 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -205 { │ │ │ │ │ -206 public: │ │ │ │ │ -207 │ │ │ │ │ -_2_0_8 virtual _~_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l() │ │ │ │ │ -209 {} │ │ │ │ │ -210 }; │ │ │ │ │ -211 │ │ │ │ │ -212 // The iterator backend for elements │ │ │ │ │ -213 template │ │ │ │ │ -_2_1_4 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -215 { │ │ │ │ │ -216 public: │ │ │ │ │ -_2_1_7 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_1_8 typedef typename Refinement::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -219 │ │ │ │ │ -_2_2_0 virtual _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 = 0; │ │ │ │ │ -221 │ │ │ │ │ -_2_2_2 virtual _~_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l() │ │ │ │ │ -223 {} │ │ │ │ │ -224 }; │ │ │ │ │ -225 │ │ │ │ │ -226 // The iterator backend common stuff │ │ │ │ │ -227 template │ │ │ │ │ -228 template │ │ │ │ │ -_2_2_9 class _V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -230 : public _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -231 { │ │ │ │ │ -232 public: │ │ │ │ │ -_2_3_3 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_3_4 typedef typename Refinement::template _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> │ │ │ │ │ -_T_h_i_s; │ │ │ │ │ -_2_3_5 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -236 │ │ │ │ │ -_2_3_7 virtual _~_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k() {} │ │ │ │ │ -238 │ │ │ │ │ -_2_3_9 virtual _T_h_i_s *_c_l_o_n_e() const = 0; │ │ │ │ │ -240 │ │ │ │ │ -_2_4_1 virtual bool _o_p_e_r_a_t_o_r_=_=(const _T_h_i_s &other) const = 0; │ │ │ │ │ -_2_4_2 virtual _T_h_i_s &_o_p_e_r_a_t_o_r_+_+() = 0; │ │ │ │ │ -243 │ │ │ │ │ -_2_4_4 virtual int _i_n_d_e_x() const = 0; │ │ │ │ │ -_2_4_5 virtual _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const = 0; │ │ │ │ │ -246 }; │ │ │ │ │ -247 │ │ │ │ │ -248 // ///////////////////////////////////////////////// │ │ │ │ │ -249 // │ │ │ │ │ -250 // The derived classes and their iterator backends │ │ │ │ │ -251 // │ │ │ │ │ -252 │ │ │ │ │ -253 // │ │ │ │ │ -254 // The refinement implementation │ │ │ │ │ -255 // │ │ │ │ │ -256 │ │ │ │ │ -257 template │ │ │ │ │ -_2_5_9 class _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -260 : public _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -261 { │ │ │ │ │ -262 public: │ │ │ │ │ -_2_6_3 typedef _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_> _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ -_2_6_4 typedef _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ -265 │ │ │ │ │ -266 template │ │ │ │ │ -267 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ -268 │ │ │ │ │ -269 int nVertices(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ -270 │ │ │ │ │ -271 int nElements(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ +131 template │ │ │ │ │ +132 unsigned │ │ │ │ │ +_1_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_>_:_: │ │ │ │ │ +134_ _n_E_l_e_m_e_n_t_s(unsigned nIntervals) │ │ │ │ │ +135 { │ │ │ │ │ +136 static_assert(dimension >= 0, │ │ │ │ │ +137 "Negative dimension given, what the heck is that supposed to mean?"); │ │ │ │ │ +138 // return nIntervals^dim │ │ │ │ │ +139 return Dune::power(nIntervals, unsigned(dimension)); │ │ │ │ │ +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_B_e_g_i_n(unsigned nIntervals) │ │ │ │ │ +146 { │ │ │ │ │ +147 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(0,nIntervals); │ │ │ │ │ +148 } │ │ │ │ │ +149 │ │ │ │ │ +150 template │ │ │ │ │ +151 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_5_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_>_:_: │ │ │ │ │ +153_ _e_E_n_d(unsigned nIntervals) │ │ │ │ │ +154 { │ │ │ │ │ +155 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nElements(nIntervals),nIntervals); │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +158 // │ │ │ │ │ +159 // The iterators │ │ │ │ │ +160 // │ │ │ │ │ +161 │ │ │ │ │ +162#ifdef DOXYGEN │ │ │ │ │ +174 template │ │ │ │ │ +_1_7_5 class _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_p_e_c_i_a_l {}; │ │ │ │ │ +176#else │ │ │ │ │ +177 template │ │ │ │ │ +178 class _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_p_e_c_i_a_l; │ │ │ │ │ +179#endif //DOXYGEN │ │ │ │ │ +180 │ │ │ │ │ +181 // for vertices │ │ │ │ │ +182 │ │ │ │ │ +183 template │ │ │ │ │ +_1_8_4 class _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_p_e_c_i_a_l │ │ │ │ │ +185 { │ │ │ │ │ +186 public: │ │ │ │ │ +_1_8_7 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_8_8 typedef typename Refinement::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 │ │ │ │ │ +_C_o_m_m_o_n; │ │ │ │ │ +_1_8_9 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +190 │ │ │ │ │ +191 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +192 │ │ │ │ │ +193 private: │ │ │ │ │ +194 const _C_o_m_m_o_n & asCommon() const │ │ │ │ │ +195 { │ │ │ │ │ +196 return *static_cast(this); │ │ │ │ │ +197 } │ │ │ │ │ +198 }; │ │ │ │ │ +199 │ │ │ │ │ +200 template │ │ │ │ │ +201 typename RefinementSubEntityIteratorSpecial::CoordVector │ │ │ │ │ +_2_0_2 _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_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_ _c_o_o_r_d_s() const │ │ │ │ │ +204 { │ │ │ │ │ +205 std::array v(asCommon().vertexCoord()); │ │ │ │ │ +206 _C_o_o_r_d_V_e_c_t_o_r c; │ │ │ │ │ +207 for (int d = 0; d < dimension; d++) │ │ │ │ │ +208 { │ │ │ │ │ +209 c[d] = v[d]*1.0 / asCommon()._nIntervals; │ │ │ │ │ +210 } │ │ │ │ │ +211 return c; │ │ │ │ │ +212 } │ │ │ │ │ +213 │ │ │ │ │ +214 // for elements │ │ │ │ │ +215 │ │ │ │ │ +216 template │ │ │ │ │ +_2_1_7 class _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_p_e_c_i_a_l │ │ │ │ │ +218 { │ │ │ │ │ +219 public: │ │ │ │ │ +_2_2_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; │ │ │ │ │ +_2_2_1 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _C_o_m_m_o_n; │ │ │ │ │ +_2_2_2 typedef typename Refinement::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +_2_2_3 typedef typename Refinement::CoordVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +224 │ │ │ │ │ +225 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ +226 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +227 │ │ │ │ │ +228 private: │ │ │ │ │ +229 const _C_o_m_m_o_n & asCommon() const │ │ │ │ │ +230 { │ │ │ │ │ +231 return *static_cast(this); │ │ │ │ │ +232 } │ │ │ │ │ +233 }; │ │ │ │ │ +234 │ │ │ │ │ +235 template │ │ │ │ │ +236 typename RefinementSubEntityIteratorSpecial:: │ │ │ │ │ +IndexVector │ │ │ │ │ +_2_3_7 _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_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_>_:_: │ │ │ │ │ +238_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ +239 { │ │ │ │ │ +240 constexpr static int nIndices = 1 << dimension; │ │ │ │ │ +241 │ │ │ │ │ +242 // cell index tuple │ │ │ │ │ +243 std::array e(asCommon().cellCoord()); │ │ │ │ │ +244 │ │ │ │ │ +245 // vertices │ │ │ │ │ +246 _I_n_d_e_x_V_e_c_t_o_r vec; │ │ │ │ │ +247 for(int i = 0; i < nIndices; ++i) │ │ │ │ │ +248 { │ │ │ │ │ +249 int base = 1; │ │ │ │ │ +250 std::array alpha(asCommon().idx2multiidx(i)); │ │ │ │ │ +251 for (int d = 0; d < dimension; d++) { │ │ │ │ │ +252 vec[i] += (alpha[d] + e[d]) * base; │ │ │ │ │ +253 base *= asCommon()._nIntervals+1; │ │ │ │ │ +254 } │ │ │ │ │ +255 } │ │ │ │ │ +256 return vec; │ │ │ │ │ +257 } │ │ │ │ │ +258 │ │ │ │ │ +259 template │ │ │ │ │ +260 typename _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_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 │ │ │ │ │ +_2_6_1 _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_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_>_:_: │ │ │ │ │ +262_ _c_o_o_r_d_s() const │ │ │ │ │ +263 { │ │ │ │ │ +264 std::array v(asCommon().cellCoord()); │ │ │ │ │ +265 _C_o_o_r_d_V_e_c_t_o_r c; │ │ │ │ │ +266 for (int d=0; d │ │ │ │ │ -&instance(); │ │ │ │ │ -274 private: │ │ │ │ │ -275 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p() {} │ │ │ │ │ -276 │ │ │ │ │ -277 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *vBeginBack(_D_u_n_e_:_: │ │ │ │ │ -_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ -278 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *vEndBack(_D_u_n_e_:_: │ │ │ │ │ -_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ -279 typename _V_i_r_t_u_a_l_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_B_a_c_k *eBeginBack(_D_u_n_e_:_: │ │ │ │ │ -_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ -280 typename _V_i_r_t_u_a_l_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_B_a_c_k *eEndBack(_D_u_n_e_:_: │ │ │ │ │ -_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const; │ │ │ │ │ -281 }; │ │ │ │ │ -282 │ │ │ │ │ -283 template │ │ │ │ │ -285 VirtualRefinementImp & │ │ │ │ │ -_2_8_6 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_s_t_a_n_c_e() │ │ │ │ │ -287 { │ │ │ │ │ -288 static _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p instance_{}; │ │ │ │ │ -289 return instance_; │ │ │ │ │ -290 } │ │ │ │ │ -291 │ │ │ │ │ -292 template │ │ │ │ │ -_2_9_4 int _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -295_ _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) const │ │ │ │ │ -296 { │ │ │ │ │ -297 return _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(tag); │ │ │ │ │ -298 } │ │ │ │ │ -299 │ │ │ │ │ -300 template │ │ │ │ │ -302 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k * │ │ │ │ │ -303 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -304_ _v_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ +273 // common │ │ │ │ │ +274 template │ │ │ │ │ +275 template │ │ │ │ │ +_2_7_6 class _R_e_f_i_n_e_m_e_n_t_I_m_p::_C_o_d_i_m:: │ │ │ │ │ +SubEntityIterator │ │ │ │ │ +277 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ │ +279 public _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_p_e_c_i_a_l │ │ │ │ │ +280 { │ │ │ │ │ +281 public: │ │ │ │ │ +_2_8_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_8_3 typedef typename Refinement::template _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 │ │ │ │ │ +_T_h_i_s; │ │ │ │ │ +284 │ │ │ │ │ +_2_8_5 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(unsigned int index, unsigned int nIntervals); │ │ │ │ │ +286 │ │ │ │ │ +_2_8_7 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ │ +_2_8_8 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ +289 │ │ │ │ │ +_2_9_0 int _i_n_d_e_x() const; │ │ │ │ │ +_2_9_1 Geometry _g_e_o_m_e_t_r_y () const; │ │ │ │ │ +292 private: │ │ │ │ │ +293 friend class _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_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, │ │ │ │ │ +codimension>; │ │ │ │ │ +294 unsigned int _index; │ │ │ │ │ +295 unsigned int _nIntervals; │ │ │ │ │ +296 │ │ │ │ │ +297 std::array │ │ │ │ │ +298 cellCoord(unsigned int idx) const │ │ │ │ │ +299 { │ │ │ │ │ +300 return idx2coord(idx, _nIntervals); │ │ │ │ │ +301 } │ │ │ │ │ +302 │ │ │ │ │ +303 std::array │ │ │ │ │ +304 vertexCoord(unsigned int idx) const │ │ │ │ │ 305 { │ │ │ │ │ -306 return new SubEntityIteratorBack(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n(tag)); │ │ │ │ │ +306 return idx2coord(idx, _nIntervals+1u); │ │ │ │ │ 307 } │ │ │ │ │ 308 │ │ │ │ │ -309 template │ │ │ │ │ -311 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k * │ │ │ │ │ -312 VirtualRefinementImp:: │ │ │ │ │ -313 vEndBack(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ -314 { │ │ │ │ │ -315 return new SubEntityIteratorBack(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d(tag)); │ │ │ │ │ -316 } │ │ │ │ │ -317 │ │ │ │ │ -318 template │ │ │ │ │ -_3_2_0 int _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_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) const │ │ │ │ │ -321 { │ │ │ │ │ -322 return _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(tag); │ │ │ │ │ -323 } │ │ │ │ │ -324 │ │ │ │ │ -325 template │ │ │ │ │ -327 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_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_B_a_c_k * │ │ │ │ │ -328 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -329_ _e_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ -330 { │ │ │ │ │ -331 return new SubEntityIteratorBack<0>(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(tag)); │ │ │ │ │ -332 } │ │ │ │ │ -333 │ │ │ │ │ -334 template │ │ │ │ │ -336 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_V_i_r_t_u_a_l_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_B_a_c_k * │ │ │ │ │ -337 VirtualRefinementImp:: │ │ │ │ │ -338 eEndBack(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ -339 { │ │ │ │ │ -340 return new SubEntityIteratorBack<0>(_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d(tag)); │ │ │ │ │ +309 std::array │ │ │ │ │ +310 cellCoord() const │ │ │ │ │ +311 { │ │ │ │ │ +312 return cellCoord(_index); │ │ │ │ │ +313 } │ │ │ │ │ +314 │ │ │ │ │ +315 std::array │ │ │ │ │ +316 vertexCoord() const │ │ │ │ │ +317 { │ │ │ │ │ +318 return vertexCoord(_index); │ │ │ │ │ +319 } │ │ │ │ │ +320 │ │ │ │ │ +321 std::array │ │ │ │ │ +322 idx2coord(unsigned int idx, unsigned int w) const │ │ │ │ │ +323 { │ │ │ │ │ +324 std::array c; │ │ │ │ │ +325 for (unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; d++) │ │ │ │ │ +326 { │ │ │ │ │ +327 c[d] = idx%w; │ │ │ │ │ +328 idx = idx/w; │ │ │ │ │ +329 } │ │ │ │ │ +330 return c; │ │ │ │ │ +331 } │ │ │ │ │ +332 │ │ │ │ │ +333 unsigned int │ │ │ │ │ +334 coord2idx(std::array c, unsigned int w) const │ │ │ │ │ +335 { │ │ │ │ │ +336 unsigned int i = 0; │ │ │ │ │ +337 for (unsigned int d = _d_i_m_e_n_s_i_o_n; d > 0; d--) │ │ │ │ │ +338 { │ │ │ │ │ +339 i *= w; │ │ │ │ │ +340 i += c[d-1]; │ │ │ │ │ 341 } │ │ │ │ │ -342 │ │ │ │ │ -343 // │ │ │ │ │ -344 // The iterator backend implementation │ │ │ │ │ -345 // │ │ │ │ │ -346 │ │ │ │ │ -347 // The iterator backend implementation specialties │ │ │ │ │ -348 template │ │ │ │ │ -_3_5_0 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l; │ │ │ │ │ -351 │ │ │ │ │ -352 // The iterator backend implementation specialties for vertices │ │ │ │ │ -353 template │ │ │ │ │ -_3_5_5 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -356 : public _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::template │ │ │ │ │ -SubEntityIteratorBack │ │ │ │ │ -357 {}; │ │ │ │ │ -358 │ │ │ │ │ -359 // The iterator backend implementation specialties for elements │ │ │ │ │ -360 │ │ │ │ │ -361 template │ │ │ │ │ -_3_6_3 class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -364 : public _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::template │ │ │ │ │ -SubEntityIteratorBack<0> │ │ │ │ │ -365 { │ │ │ │ │ -366 public: │ │ │ │ │ -_3_6_7 typedef _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_> _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p; │ │ │ │ │ -_3_6_8 typedef typename VirtualRefinementImp::template SubEntityIteratorBack<0> │ │ │ │ │ -_C_o_m_m_o_n; │ │ │ │ │ -_3_6_9 typedef typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t; │ │ │ │ │ -_3_7_0 typedef _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_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_B_a_s_e; │ │ │ │ │ -_3_7_1 typedef typename RefinementBase::IndexVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -372 │ │ │ │ │ -373 _I_n_d_e_x_V_e_c_t_o_r vertexIndices() const; │ │ │ │ │ -374 }; │ │ │ │ │ -375 │ │ │ │ │ -376 template │ │ │ │ │ -378 typename _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_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_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ -_3_7_9 _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_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_,_ _0_>_:_: │ │ │ │ │ -380_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ │ -381 { │ │ │ │ │ -382 _I_n_d_e_x_V_e_c_t_o_r vIndices; │ │ │ │ │ -383 vIndices.reserve(StaticRefinement::IndexVector::dimension); │ │ │ │ │ -384 │ │ │ │ │ -385 typename _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r sIndices = static_cast(this)->backend.vertexIndices(); │ │ │ │ │ -386 for(int i = 0; i < StaticRefinement::IndexVector::dimension; ++i) │ │ │ │ │ -387 vIndices.push_back(sIndices[i]); │ │ │ │ │ -388 return vIndices; │ │ │ │ │ -389 } │ │ │ │ │ -390 │ │ │ │ │ -391 // The shared iterator backend implementation │ │ │ │ │ -392 template │ │ │ │ │ -394 template │ │ │ │ │ -_3_9_5 class _V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -396 : public _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -397 { │ │ │ │ │ -398 public: │ │ │ │ │ -_3_9_9 typedef typename StaticRefinement::template _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 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ │ -_4_0_0 typedef typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> _T_h_i_s; │ │ │ │ │ -_4_0_1 typedef typename VirtualRefinement::template │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_> _B_a_s_e; │ │ │ │ │ -_4_0_2 typedef typename _V_i_r_t_u_a_l_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; │ │ │ │ │ -403 │ │ │ │ │ -404 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r &backend); │ │ │ │ │ -405 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _T_h_i_s &other); │ │ │ │ │ -406 │ │ │ │ │ -407 _B_a_s_e *clone() const; │ │ │ │ │ +342 return i; │ │ │ │ │ +343 } │ │ │ │ │ +344 │ │ │ │ │ +345 std::array │ │ │ │ │ +346 idx2multiidx(unsigned int idx) const │ │ │ │ │ +347 { │ │ │ │ │ +348 std::array alpha; │ │ │ │ │ +349 for (unsigned int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i) │ │ │ │ │ +350 alpha[i] = (idx >> i) & 1u; │ │ │ │ │ +351 return alpha; │ │ │ │ │ +352 } │ │ │ │ │ +353 }; │ │ │ │ │ +354 │ │ │ │ │ +355#ifndef DOXYGEN │ │ │ │ │ +356 template │ │ │ │ │ +357 template │ │ │ │ │ +358 RefinementImp::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +359 SubEntityIterator(unsigned int index, unsigned int nIntervals) │ │ │ │ │ +360 : _index(index), _nIntervals(nIntervals) │ │ │ │ │ +361 {} │ │ │ │ │ +362 │ │ │ │ │ +363 template │ │ │ │ │ +364 template │ │ │ │ │ +365 bool │ │ │ │ │ +366 RefinementImp::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +367 equals(const This &other) const │ │ │ │ │ +368 { │ │ │ │ │ +369 return ((_index == other._index) && (_nIntervals == other._nIntervals)); │ │ │ │ │ +370 } │ │ │ │ │ +371 │ │ │ │ │ +372 template │ │ │ │ │ +373 template │ │ │ │ │ +374 void │ │ │ │ │ +375 RefinementImp::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +376 increment() │ │ │ │ │ +377 { │ │ │ │ │ +378 ++_index; │ │ │ │ │ +379 } │ │ │ │ │ +380 │ │ │ │ │ +381 template │ │ │ │ │ +382 template │ │ │ │ │ +383 int │ │ │ │ │ +384 RefinementImp::Codim:: │ │ │ │ │ +SubEntityIterator:: │ │ │ │ │ +385 index() const │ │ │ │ │ +386 { │ │ │ │ │ +387 return _index; │ │ │ │ │ +388 } │ │ │ │ │ +389 │ │ │ │ │ +390 template │ │ │ │ │ +391 template │ │ │ │ │ +392 typename RefinementImp::template Codim:: │ │ │ │ │ +Geometry │ │ │ │ │ +393 RefinementImp::Codim:: │ │ │ │ │ +SubEntityIterator::geometry () const │ │ │ │ │ +394 { │ │ │ │ │ +395 std::array intCoords = idx2coord │ │ │ │ │ +(_index,_nIntervals); │ │ │ │ │ +396 │ │ │ │ │ +397 Dune::FieldVector lower; │ │ │ │ │ +398 Dune::FieldVector upper; │ │ │ │ │ +399 │ │ │ │ │ +400 assert(codimension == 0 or codimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +401 │ │ │ │ │ +402 if constexpr (codimension == 0) { │ │ │ │ │ +403 for (size_t j = 0; j < _d_i_m_e_n_s_i_o_n; j++) │ │ │ │ │ +404 { │ │ │ │ │ +405 lower[j] = double(intCoords[j]) / double(_nIntervals); │ │ │ │ │ +406 upper[j] = double(intCoords[j] + 1) / double(_nIntervals); │ │ │ │ │ +407 } │ │ │ │ │ 408 │ │ │ │ │ -409 bool operator==(const _B_a_s_e &other) const; │ │ │ │ │ -410 _B_a_s_e &operator++(); │ │ │ │ │ -411 │ │ │ │ │ -412 int index() const; │ │ │ │ │ -_4_1_3 _C_o_o_r_d_V_e_c_t_o_r coords() const; │ │ │ │ │ +409 return typename RefinementImp<_d_i_m_e_n_s_i_o_n, │ │ │ │ │ +410 CoordType>::template _C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y(lower,upper); │ │ │ │ │ +411 } else { │ │ │ │ │ +412 for (size_t j = 0; j < _d_i_m_e_n_s_i_o_n; j++) │ │ │ │ │ +413 lower[j] = upper[j] = double(intCoords[j]) / double(_nIntervals); │ │ │ │ │ 414 │ │ │ │ │ -415 private: │ │ │ │ │ -416 friend class _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l; │ │ │ │ │ -417 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r backend; │ │ │ │ │ -418 }; │ │ │ │ │ +415 return typename RefinementImp<_d_i_m_e_n_s_i_o_n, │ │ │ │ │ +416 CoordType>::template _C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y(lower,upper,std:: │ │ │ │ │ +bitset(0)); │ │ │ │ │ +417 } │ │ │ │ │ +418 } │ │ │ │ │ 419 │ │ │ │ │ -420 template │ │ │ │ │ -422 template │ │ │ │ │ -_4_2_3 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -424_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r &backend_) │ │ │ │ │ -425 : backend(backend_) │ │ │ │ │ -426 {} │ │ │ │ │ -427 │ │ │ │ │ -428 template │ │ │ │ │ -430 template │ │ │ │ │ -_4_3_1 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -432_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k(const _T_h_i_s &other) │ │ │ │ │ -433 : _V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l(other), │ │ │ │ │ -434 backend(other.backend) │ │ │ │ │ -435 {} │ │ │ │ │ -436 │ │ │ │ │ -437 template │ │ │ │ │ -438 template │ │ │ │ │ -439 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_B_a_s_e * │ │ │ │ │ -_4_4_0 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -441_ _c_l_o_n_e() const │ │ │ │ │ -442 { return new _T_h_i_s(*this); } │ │ │ │ │ -443 │ │ │ │ │ -444 template │ │ │ │ │ -445 template │ │ │ │ │ -446 bool │ │ │ │ │ -_4_4_7 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -448_ _o_p_e_r_a_t_o_r_=_=(const _B_a_s_e &other) const │ │ │ │ │ -449 { │ │ │ │ │ -450 try { │ │ │ │ │ -451 return backend == dynamic_cast(other).backend; │ │ │ │ │ -452 } │ │ │ │ │ -453 catch(const std::bad_cast&) │ │ │ │ │ -454 { │ │ │ │ │ -455 return false; │ │ │ │ │ -456 } │ │ │ │ │ -457 } │ │ │ │ │ -458 │ │ │ │ │ -459 template │ │ │ │ │ -460 template │ │ │ │ │ -461 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_B_a_s_e & │ │ │ │ │ -_4_6_2 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -463_ _o_p_e_r_a_t_o_r_+_+() │ │ │ │ │ -464 { │ │ │ │ │ -465 ++backend; │ │ │ │ │ -466 return *this; │ │ │ │ │ -467 } │ │ │ │ │ -468 │ │ │ │ │ -469 template │ │ │ │ │ -470 template │ │ │ │ │ -471 int │ │ │ │ │ -_4_7_2 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -473_ _i_n_d_e_x() const │ │ │ │ │ -474 { return backend.index(); } │ │ │ │ │ -475 │ │ │ │ │ -476 template │ │ │ │ │ -477 template │ │ │ │ │ -478 typename _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_:_t_e_m_p_l_a_t_e _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -_4_7_9 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_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_>_:_: │ │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -480_ _c_o_o_r_d_s() const │ │ │ │ │ -481 { return backend.coords(); } │ │ │ │ │ -482 │ │ │ │ │ -483 // //////////////////////// │ │ │ │ │ -484 // │ │ │ │ │ -485 // The refinement builder │ │ │ │ │ -486 // │ │ │ │ │ -487 │ │ │ │ │ -488 template │ │ │ │ │ -489 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r; │ │ │ │ │ -490 │ │ │ │ │ -501 template │ │ │ │ │ -502 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ -_5_0_3 _b_u_i_l_d_R_e_f_i_n_e_m_e_n_t( │ │ │ │ │ -504 _G_e_o_m_e_t_r_y_T_y_p_e geometryType, │ │ │ │ │ -506 _G_e_o_m_e_t_r_y_T_y_p_e coerceTo) │ │ │ │ │ -507 { │ │ │ │ │ -508 // Check that the user used valid geometry types │ │ │ │ │ -509 assert(geometryType._d_i_m() == dimension && coerceTo._d_i_m() == dimension); │ │ │ │ │ -510 return _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_b_u_i_l_d( geometryType._i_d(), │ │ │ │ │ -coerceTo._i_d() ); │ │ │ │ │ -511 } │ │ │ │ │ -512 │ │ │ │ │ -513 // In principle the trick with the class is no longer necessary, │ │ │ │ │ -514 // but I'm keeping it in here so it will be easier to specialize │ │ │ │ │ -515 // buildRefinement when someone implements pyramids and prisms │ │ │ │ │ -516 template │ │ │ │ │ -_5_1_7 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r │ │ │ │ │ -518 { │ │ │ │ │ -519 public: │ │ │ │ │ -520 static │ │ │ │ │ -521 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ -_5_2_2 _b_u_i_l_d(unsigned topologyId, unsigned coerceToId) │ │ │ │ │ -523 { │ │ │ │ │ -524 topologyId &= ~1; │ │ │ │ │ -525 coerceToId &= ~1; │ │ │ │ │ -526 │ │ │ │ │ -527 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1; │ │ │ │ │ -528 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1; │ │ │ │ │ -529 │ │ │ │ │ -530 switch( topologyId ) │ │ │ │ │ -531 { │ │ │ │ │ -532 //case GeometryType::simplex: │ │ │ │ │ -533 case idSimplex : │ │ │ │ │ -534 //switch( coerceTo ) │ │ │ │ │ -535 switch( coerceToId ) │ │ │ │ │ -536 { │ │ │ │ │ -537 //case GeometryType::simplex: │ │ │ │ │ -538 case idSimplex : │ │ │ │ │ -539 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_S_i_m_p_l_e_x_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -540 default : │ │ │ │ │ -541 break; │ │ │ │ │ -542 } │ │ │ │ │ -543 break; │ │ │ │ │ -544 │ │ │ │ │ -545 //case GeometryType::cube: │ │ │ │ │ -546 case idCube : │ │ │ │ │ -547 switch( coerceToId ) │ │ │ │ │ -548 { │ │ │ │ │ -549 case idSimplex : │ │ │ │ │ -550 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -551 case idCube : │ │ │ │ │ -552 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_C_u_b_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -553 default : │ │ │ │ │ -554 break; │ │ │ │ │ -555 } │ │ │ │ │ -556 break; │ │ │ │ │ -557 │ │ │ │ │ -558 default : │ │ │ │ │ -559 break; │ │ │ │ │ -560 } │ │ │ │ │ -561 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, │ │ │ │ │ -" │ │ │ │ │ -562 << coerceToId << " >."); │ │ │ │ │ -563 } │ │ │ │ │ -564 }; │ │ │ │ │ -565 │ │ │ │ │ -566 template │ │ │ │ │ -_5_6_7 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r<1, CoordType> │ │ │ │ │ -568 { │ │ │ │ │ -569 static const std::size_t dimension = 1; │ │ │ │ │ -570 public: │ │ │ │ │ -571 static │ │ │ │ │ -572 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ -_5_7_3 _b_u_i_l_d(unsigned topologyId, unsigned coerceToId) │ │ │ │ │ -574 { │ │ │ │ │ -575 topologyId &= ~1; │ │ │ │ │ -576 coerceToId &= ~1; │ │ │ │ │ -577 │ │ │ │ │ -578 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1; │ │ │ │ │ -579 │ │ │ │ │ -580 if (topologyId == 0 && coerceToId == 0) │ │ │ │ │ -581 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_S_i_m_p_l_e_x_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -582 │ │ │ │ │ -583 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, │ │ │ │ │ -" │ │ │ │ │ -584 << coerceToId << " >."); │ │ │ │ │ -585 } │ │ │ │ │ -586 }; │ │ │ │ │ -587 │ │ │ │ │ -588 template │ │ │ │ │ -_5_8_9 class _R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r<3, CoordType> │ │ │ │ │ -590 { │ │ │ │ │ -591 static const std::size_t dimension = 3; │ │ │ │ │ -592 public: │ │ │ │ │ -593 static │ │ │ │ │ -594 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ -_5_9_5 _b_u_i_l_d(unsigned topologyId, unsigned coerceToId) │ │ │ │ │ -596 { │ │ │ │ │ -597 topologyId &= ~1; │ │ │ │ │ -598 coerceToId &= ~1; │ │ │ │ │ -599 │ │ │ │ │ -600 constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1; │ │ │ │ │ -601 constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1; │ │ │ │ │ -602 constexpr unsigned idPrism = GeometryTypes::prism.id() & ~1; │ │ │ │ │ -603 constexpr unsigned idPyramid = GeometryTypes::pyramid.id() & ~1; │ │ │ │ │ -604 │ │ │ │ │ -605 switch( topologyId ) │ │ │ │ │ -606 { │ │ │ │ │ -607 //case GeometryType::simplex: │ │ │ │ │ -608 case idSimplex : │ │ │ │ │ -609 //switch( coerceTo ) │ │ │ │ │ -610 switch( coerceToId ) │ │ │ │ │ -611 { │ │ │ │ │ -612 //case GeometryType::simplex: │ │ │ │ │ -613 case idSimplex : │ │ │ │ │ -614 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_S_i_m_p_l_e_x_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -615 default : │ │ │ │ │ -616 break; │ │ │ │ │ -617 } │ │ │ │ │ -618 break; │ │ │ │ │ -619 │ │ │ │ │ -620 //case GeometryType::cube: │ │ │ │ │ -621 case idCube : │ │ │ │ │ -622 switch( coerceToId ) │ │ │ │ │ -623 { │ │ │ │ │ -624 case idSimplex : │ │ │ │ │ -625 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -626 case idCube : │ │ │ │ │ -627 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_C_u_b_e_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_C_u_b_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -628 default : │ │ │ │ │ -629 break; │ │ │ │ │ -630 } │ │ │ │ │ -631 break; │ │ │ │ │ -632 │ │ │ │ │ -633 //case GeometryType::prism: │ │ │ │ │ -634 case idPrism : │ │ │ │ │ -635 switch( coerceToId ) │ │ │ │ │ -636 { │ │ │ │ │ -637 case idSimplex : │ │ │ │ │ -638 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_P_r_i_s_m_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -639 default : │ │ │ │ │ -640 break; │ │ │ │ │ -641 } │ │ │ │ │ -642 break; │ │ │ │ │ -643 │ │ │ │ │ -644 //case GeometryType::pyramid: │ │ │ │ │ -645 case idPyramid : │ │ │ │ │ -646 switch( coerceToId ) │ │ │ │ │ -647 { │ │ │ │ │ -648 case idSimplex : │ │ │ │ │ -649 return _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _i_d_P_y_r_a_m_i_d_,_ _C_o_o_r_d_T_y_p_e_,_ _i_d_S_i_m_p_l_e_x_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ │ -_i_n_s_t_a_n_c_e(); │ │ │ │ │ -650 default : │ │ │ │ │ -651 break; │ │ │ │ │ -652 } │ │ │ │ │ -653 break; │ │ │ │ │ -654 │ │ │ │ │ -655 default : │ │ │ │ │ -656 break; │ │ │ │ │ -657 } │ │ │ │ │ -658 DUNE_THROW( NotImplemented, "No Refinement<" << topologyId << ", CoordType, │ │ │ │ │ -" │ │ │ │ │ -659 << coerceToId << " >."); │ │ │ │ │ -660 } │ │ │ │ │ -661 }; │ │ │ │ │ -662 │ │ │ │ │ -663} // namespace Dune │ │ │ │ │ -664 │ │ │ │ │ -665#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ │ -_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ -This file simply includes all Refinement implementations so you don't have to │ │ │ │ │ -do them separately. │ │ │ │ │ +420#endif // DOXYGEN │ │ │ │ │ +421 │ │ │ │ │ +422 } // namespace HCube │ │ │ │ │ +423 │ │ │ │ │ +424 // /////////////////////// │ │ │ │ │ +425 // │ │ │ │ │ +426 // The refinement traits │ │ │ │ │ +427 // │ │ │ │ │ +428 │ │ │ │ │ +429#ifndef DOXYGEN │ │ │ │ │ +430 template │ │ │ │ │ +432 struct Traits< │ │ │ │ │ +433 topologyId, CoordType, coerceToId, dim, │ │ │ │ │ +434 typename std::enable_if< │ │ │ │ │ +435 (dim >= 2 && │ │ │ │ │ +436 (GeometryTypes::cube(dim).id() >> 1) == │ │ │ │ │ +437 (topologyId >> 1) && │ │ │ │ │ +438 (GeometryTypes::cube(dim).id() >> 1) == │ │ │ │ │ +439 (coerceToId >> 1) │ │ │ │ │ +440 )>::type │ │ │ │ │ +441 > │ │ │ │ │ +442 { │ │ │ │ │ +443 typedef HCube::RefinementImp Imp; │ │ │ │ │ +444 }; │ │ │ │ │ +445#endif │ │ │ │ │ +446 │ │ │ │ │ +447 } // namespace RefinementImp │ │ │ │ │ +448 │ │ │ │ │ +449} // namespace Dune │ │ │ │ │ +450 │ │ │ │ │ +451#endif // DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ +_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. │ │ │ │ │ +_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 │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType │ │ │ │ │ -geometryType, GeometryType coerceTo) │ │ │ │ │ -return a reference to the VirtualRefinement according to the parameters │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:503 │ │ │ │ │ +_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 geometry implementation for axis-aligned hypercubes. │ │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:50 │ │ │ │ │ _D_u_n_e_:_:_C_o_d_i_m │ │ │ │ │ Static tag representing a codimension. │ │ │ │ │ DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ │ -_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_:_:_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_:_:_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_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ -typedef IndexVector │ │ │ │ │ -The IndexVector of the Refinement. │ │ │ │ │ -DDeeffiinniittiioonn base.cc:177 │ │ │ │ │ -_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_:_:_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:126 │ │ │ │ │ -_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:372 │ │ │ │ │ -_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:377 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_p_e_c_i_a_l │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:72 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_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_m_m_o_n │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ +Refinement implementation for hypercubes │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:75 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 hcube.cc:86 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ │ +static ElementIterator eEnd(unsigned nIntervals) │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:153 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ │ +static unsigned nVertices(unsigned nIntervals) │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:109 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ │ +static VertexIterator vEnd(unsigned nIntervals) │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:126 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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,(1<< dimension)> IndexVector │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:87 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 hcube.cc:84 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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 hcube.cc:85 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ │ +static unsigned nElements(unsigned nIntervals) │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:134 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:80 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ │ +static ElementIterator eBegin(unsigned nIntervals) │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:145 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +Know your own dimension. │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:78 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ │ +static VertexIterator vBegin(unsigned nIntervals) │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:118 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:101 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Dune::AxisAlignedCubeGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ │ +Geometry │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:103 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_p_e_c_i_a_l │ │ │ │ │ +SubEntityIterator base class for hypercube refinement. │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:175 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:189 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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_m_m_o_n │ │ │ │ │ +Refinement::template Codim< dimension >::SubEntityIterator Common │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:188 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:187 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:220 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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_m_m_o_n │ │ │ │ │ Refinement::template Codim< 0 >::SubEntityIterator Common │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:85 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_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 │ │ │ │ │ -VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:84 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_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 virtualrefinement.cc:86 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ │ -VirtualRefinement< dimension, CoordType >::template Codim< codimension >:: │ │ │ │ │ -SubEntityIterator::CoordVector coords() const │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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(const This &other) │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const This &other) │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ │ -int index() const │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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() │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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(IteratorBack *backend) │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ -Refinement::template SubEntityIteratorBack< codimension > IteratorBack │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:109 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:221 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 virtualrefinement.cc:110 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ │ -Refinement::template Codim< codimension >::SubEntityIterator This │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:108 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:223 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_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_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 hcube.cc:222 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_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(unsigned int index, unsigned int nIntervals) │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_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 │ │ │ │ │ -VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:107 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_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 hcube.cc:282 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ │ +int index() const │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ void increment() │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:200 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -virtual ~VirtualRefinementSubEntityIteratorBackSpecial() │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:208 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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 │ │ │ │ │ -virtual IndexVector vertexIndices() const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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 │ │ │ │ │ -VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:217 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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 virtualrefinement.cc:218 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_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_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -virtual ~VirtualRefinementSubEntityIteratorBackSpecial() │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:222 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:231 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_i_n_d_e_x │ │ │ │ │ -virtual int index() const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_T_h_i_s │ │ │ │ │ -Refinement::template SubEntityIteratorBack< codimension > This │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:234 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_c_l_o_n_e │ │ │ │ │ -virtual This * clone() const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:235 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -VirtualRefinement< dimension, CoordType > Refinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:233 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -virtual bool operator==(const This &other) const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_c_o_o_r_d_s │ │ │ │ │ -virtual CoordVector coords() const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_~_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ -virtual ~SubEntityIteratorBack() │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:237 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ -virtual This & operator++()=0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:261 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ │ -int nVertices(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get the number of Vertices. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:295 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -Dune::VirtualRefinement< dimension, CoordType > VirtualRefinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:264 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ │ -int nElements(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get the number of Elements. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:320 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_i_n_s_t_a_n_c_e │ │ │ │ │ -static VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > & │ │ │ │ │ -instance() │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:286 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension > │ │ │ │ │ -StaticRefinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:263 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:397 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_B_a_s_e │ │ │ │ │ -VirtualRefinement::template SubEntityIteratorBack< codimension > Base │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:401 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_T_h_i_s │ │ │ │ │ -VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::template │ │ │ │ │ -SubEntityIteratorBack< codimension > This │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:400 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ │ -StaticRefinement::template Codim< codimension >::SubEntityIterator │ │ │ │ │ -BackendIterator │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:399 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -VirtualRefinement::CoordVector CoordVector │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:402 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:350 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_C_o_m_m_o_n │ │ │ │ │ -VirtualRefinementImp::template SubEntityIteratorBack< 0 > Common │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:368 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ -RefinementBase::IndexVector IndexVector │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:371 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_B_a_s_e │ │ │ │ │ -VirtualRefinement< dimension, CoordType > RefinementBase │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:370 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ │ -Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > │ │ │ │ │ -VirtualRefinementImp │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:367 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k_S_p_e_c_i_a_l_<_ _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_,_ _0_ _>_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -VirtualRefinementImp::StaticRefinement StaticRefinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:369 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:518 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_:_:_b_u_i_l_d │ │ │ │ │ -static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, │ │ │ │ │ -unsigned coerceToId) │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:522 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _1_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_b_u_i_l_d │ │ │ │ │ -static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, │ │ │ │ │ -unsigned coerceToId) │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:573 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_B_u_i_l_d_e_r_<_ _3_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_b_u_i_l_d │ │ │ │ │ -static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, │ │ │ │ │ -unsigned coerceToId) │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:595 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -VirtualRefinement base class. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:294 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ -SubEntityIteratorBack< dimension > VertexIteratorBack │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:318 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n │ │ │ │ │ -VertexIterator vBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an VertexIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:38 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n │ │ │ │ │ -ElementIterator eBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an ElementIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:54 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d │ │ │ │ │ -ElementIterator eEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an ElementIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:62 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:301 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d │ │ │ │ │ -VertexIterator vEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an VertexIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:46 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -FieldVector< CoordType, dimension > CoordVector │ │ │ │ │ -The CoordVector of the VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:308 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -SubEntityIteratorBack< 0 > ElementIteratorBack │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ │ -codim database of VirtualRefinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:378 │ │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ │ +Refinement::template Codim< codimension >::SubEntityIterator This │ │ │ │ │ +DDeeffiinniittiioonn hcube.cc:283 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typeindex.hh File Reference │ │ │ │ +dune-geometry: topologyfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,43 +72,42 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
typeindex.hh File Reference
│ │ │ │ +
topologyfactory.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 <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::LocalGeometryTypeIndex
 Compute per-dimension indices for geometry types. More...
struct  Dune::TopologyFactory< Traits >
 Provide a factory over the generic topologies. More...
 
class  Dune::GlobalGeometryTypeIndex
 Compute indices for geometry types, taking the dimension into account. 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
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

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

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,31 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "_t_y_p_e_._h_h" │ │ │ │ │ +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 │ │ │ │ │ -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_._._. │ │ │ │ │ +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_._._. │ │ │ │ │   │ │ │ │ │ -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_._._. │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00224_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typeindex.hh Source File │ │ │ │ +dune-geometry: topologyfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,161 +74,194 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
typeindex.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 (C) DUNE 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
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ │
7
│ │ │ │ -
14#include <cstddef>
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9
│ │ │ │ +
10#include <array>
│ │ │ │ +
11#include <map>
│ │ │ │ +
12#include <memory>
│ │ │ │ +
13#include <type_traits>
│ │ │ │ +
14#include <vector>
│ │ │ │
15
│ │ │ │ -
16#include <dune/common/indices.hh>
│ │ │ │ -
17#include <dune/common/hybridutilities.hh>
│ │ │ │ +
16#include <dune/geometry/type.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)) ?
│ │ │ │ -
81 GeometryTypes::none(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 }
│ │ │ │ -
│ │ │ │ +
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) {
│ │ │ │ +
53 return create<decltype(id)::value>(key);
│ │ │ │ +
54 });
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
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>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
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 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
│ │ │ │ -
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.
│ │ │ │ +
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.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ +
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
│ │ │ │ +
A wrapper for a TopologyFactory providing singleton storage. Same usage as TopologyFactory but with e...
Definition topologyfactory.hh:82
│ │ │ │ +
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:126
│ │ │ │ -
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:222
│ │ │ │ -
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ -
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:367
│ │ │ │ -
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,183 +1,220 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -typeindex.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 (C) DUNE 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 │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ │ 7 │ │ │ │ │ -14#include │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ 15 │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ +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 │ │ │ │ │ -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 GeometryTypes::none(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 } │ │ │ │ │ +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 create(key); │ │ │ │ │ +54 }); │ │ │ │ │ +55 } │ │ │ │ │ +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 _T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y │ │ │ │ │ +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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 }; │ │ │ │ │ +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 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, 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 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 │ │ │ │ │ -161 } // namespace Impl │ │ │ │ │ -162} // namespace Dune │ │ │ │ │ -163 │ │ │ │ │ -164#endif // DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ │ +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 create< geometry >( 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 create< Topology >( 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. │ │ │ │ │ _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:21 │ │ │ │ │ +_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 │ │ │ │ │ +A wrapper for a TopologyFactory providing singleton storage. Same usage as │ │ │ │ │ +TopologyFactory but with e... │ │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:82 │ │ │ │ │ +_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:126 │ │ │ │ │ -_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:222 │ │ │ │ │ -_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:372 │ │ │ │ │ _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:377 │ │ │ │ │ -_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:367 │ │ │ │ │ -_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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: virtualrefinement.hh File Reference │ │ │ │ +dune-geometry: multilineargeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,53 +71,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
virtualrefinement.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
multilineargeometry.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <vector>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <functional>
│ │ │ │ +#include <iterator>
│ │ │ │ +#include <limits>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ -#include "refinement.hh"
│ │ │ │ -#include "type.hh"
│ │ │ │ -#include "virtualrefinement.cc"
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/geometry/affinegeometry.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VirtualRefinement< dimension, CoordType >
 VirtualRefinement base class. 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...
 
struct  Dune::VirtualRefinement< dimension, CoordType >::Codim< codimension >
 codim database of VirtualRefinement 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
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<int dimension, class CoordType >
VirtualRefinement< dimension, CoordType > & Dune::buildRefinement (GeometryType geometryType, GeometryType coerceTo)
 return a reference to the VirtualRefinement according to the parameters
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

This file contains the virtual wrapper around refinement.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,37 +1,44 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ -virtualrefinement.hh File Reference │ │ │ │ │ -This file contains the virtual wrapper around refinement. _M_o_r_e_._._. │ │ │ │ │ +_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 │ │ │ │ │ #include │ │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_._h_h" │ │ │ │ │ -#include "_t_y_p_e_._h_h" │ │ │ │ │ -#include "_v_i_r_t_u_a_l_r_e_f_i_n_e_m_e_n_t_._c_c" │ │ │ │ │ +#include │ │ │ │ │ +#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_/_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> │ │ │ │ │ _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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ -  _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t base class. _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_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _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_ _> │ │ │ │ │ -  codim database of _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t _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 │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t< dimension, CoordType > _D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t (_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ - &  geometryType, _G_e_o_m_e_t_r_y_T_y_p_e coerceTo) │ │ │ │ │ - return a reference to the │ │ │ │ │ -  _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t according to the │ │ │ │ │ - parameters │ │ │ │ │ -  │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file contains the virtual wrapper around refinement. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: virtualrefinement.hh Source File │ │ │ │ +dune-geometry: multilineargeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,135 +74,840 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
virtualrefinement.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 (C) DUNE 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_VIRTUALREFINEMENT_HH
│ │ │ │ -
6#define DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ │
7
│ │ │ │ -
268#include <vector>
│ │ │ │ -
269
│ │ │ │ -
270#include <dune/common/fvector.hh>
│ │ │ │ -
271
│ │ │ │ -
272#include "refinement.hh"
│ │ │ │ -
273#include "type.hh"
│ │ │ │ -
274
│ │ │ │ -
275namespace Dune
│ │ │ │ -
276{
│ │ │ │ -
277 // //////////////////////////////////////////
│ │ │ │ -
278 //
│ │ │ │ -
279 // The virtual base class and its iterators
│ │ │ │ -
280 //
│ │ │ │ -
281
│ │ │ │ -
282 //
│ │ │ │ -
283 // Refinement
│ │ │ │ -
284 //
│ │ │ │ -
285
│ │ │ │ -
292 template<int dimension, class CoordType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
294 {
│ │ │ │ -
295 public:
│ │ │ │ -
296 template<int codimension>
│ │ │ │ -
297 struct Codim;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
302
│ │ │ │ -
308 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ │ -
314 typedef std::vector<int> IndexVector;
│ │ │ │ -
315
│ │ │ │ -
316 template<int codimension>
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
320
│ │ │ │ -
326 virtual int nVertices(Dune::RefinementIntervals tag) const = 0;
│ │ │ │ -
327
│ │ │ │ - │ │ │ │ -
334
│ │ │ │ - │ │ │ │ -
341
│ │ │ │ -
347 virtual int nElements(Dune::RefinementIntervals tag) const = 0;
│ │ │ │ -
348
│ │ │ │ - │ │ │ │ -
355
│ │ │ │ - │ │ │ │ -
362
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
365 {}
│ │ │ │ -
│ │ │ │ -
366
│ │ │ │ -
367 protected:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
372 };
│ │ │ │ -
│ │ │ │ -
373
│ │ │ │ -
375 template<int dimension, class CoordType>
│ │ │ │ -
376 template<int codimension>
│ │ │ │ -
│ │ │ │ -
377 struct VirtualRefinement<dimension, CoordType>::Codim
│ │ │ │ -
378 {
│ │ │ │ -
379 class SubEntityIterator;
│ │ │ │ -
380 };
│ │ │ │ -
│ │ │ │ -
381
│ │ │ │ -
382 // ////////////////////////
│ │ │ │ -
383 //
│ │ │ │ -
384 // The refinement builder
│ │ │ │ -
385 //
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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 >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
205
│ │ │ │ +
207 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ │ +
208
│ │ │ │ +
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 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::template xTRightInvA< mydimension, coorddimension >( 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::template sqrtDetAAT< mydimension, coorddimension >( 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
│ │ │ │ -
387 template<int dimension, class CoordType>
│ │ │ │ - │ │ │ │ -
389 buildRefinement(GeometryType geometryType, GeometryType coerceTo);
│ │ │ │ -
390
│ │ │ │ -
391} // namespace Dune
│ │ │ │ -
392
│ │ │ │ -
393#include "virtualrefinement.cc"
│ │ │ │ +
│ │ │ │ +
393 JacobianInverseTransposed jacobianInverseTransposed ( const LocalCoordinate &local ) const;
│ │ │ │
394
│ │ │ │ -
395#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
│ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ -
This file contains the virtual wrapper around refinement.
│ │ │ │ -
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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::template rightInvA< mydimension, coorddimension >( jt, static_cast< Base & >( *this ) );
│ │ │ │ +
495 }
│ │ │ │ +
│ │ │ │ +
496
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
498 {
│ │ │ │ +
499 detInv_ = MatrixHelper::template sqrtDetAAT< mydimension, coorddimension >( 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
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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::template xTRightInvA< mydimension, coorddimension >( 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
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
An implementation of the Geometry interface for affine geometries.
│ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:503
│ │ │ │ -
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ +
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
│ │ │ │ +
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ │ +
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
geometry dimension
Definition multilineargeometry.hh:189
│ │ │ │ +
Dune::GeometryType type() const
obtain the name of the reference element
Definition multilineargeometry.hh:269
│ │ │ │ +
Traits::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:225
│ │ │ │ +
FieldVector< ctype, coorddimension > GlobalCoordinate
type of global coordinates
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
coordinate type
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
coordinate dimension
Definition multilineargeometry.hh:191
│ │ │ │ +
int corners() const
obtain number of corners of the corresponding reference element
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
evaluate the inverse mapping
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
type of local coordinates
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
type of 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
type of jacobian transposed
Definition multilineargeometry.hh:201
│ │ │ │ +
ReferenceElements::ReferenceElement ReferenceElement
type of reference element
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
Type for the Jacobian matrix.
Definition multilineargeometry.hh:207
│ │ │ │ +
bool affine() const
is this mapping affine?
Definition multilineargeometry.hh:262
│ │ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
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
│ │ │ │ +
void setup(const JacobianTransposed &jt)
Definition multilineargeometry.hh:492
│ │ │ │ +
ctype det() const
Definition multilineargeometry.hh:502
│ │ │ │ +
ctype detInv() const
Definition multilineargeometry.hh:503
│ │ │ │ +
void setupDeterminant(const JacobianTransposed &jt)
Definition multilineargeometry.hh:497
│ │ │ │ +
Implement a MultiLinearGeometry with additional caching.
Definition multilineargeometry.hh:526
│ │ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:580
│ │ │ │ +
Base::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:534
│ │ │ │ +
bool affine() const
is this mapping affine?
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
evaluate the inverse mapping
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:126
│ │ │ │ -
Definition virtualrefinement.cc:231
│ │ │ │ -
VirtualRefinement base class.
Definition virtualrefinement.hh:294
│ │ │ │ -
SubEntityIteratorBack< dimension > VertexIteratorBack
Definition virtualrefinement.hh:318
│ │ │ │ -
virtual ElementIteratorBack * eEndBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ -
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:38
│ │ │ │ -
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:54
│ │ │ │ -
virtual int nElements(Dune::RefinementIntervals tag) const =0
Get the number of Elements.
│ │ │ │ -
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:62
│ │ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition virtualrefinement.hh:301
│ │ │ │ -
virtual ~VirtualRefinement()
Destructor.
Definition virtualrefinement.hh:364
│ │ │ │ -
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:46
│ │ │ │ -
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition virtualrefinement.hh:308
│ │ │ │ -
virtual int nVertices(Dune::RefinementIntervals tag) const =0
Get the number of Vertices.
│ │ │ │ -
std::vector< int > IndexVector
The IndexVector of the VirtualRefinement.
Definition virtualrefinement.hh:314
│ │ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition virtualrefinement.hh:299
│ │ │ │ -
virtual VertexIteratorBack * vEndBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ -
SubEntityIteratorBack< 0 > ElementIteratorBack
Definition virtualrefinement.hh:319
│ │ │ │ -
virtual ElementIteratorBack * eBeginBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ -
virtual VertexIteratorBack * vBeginBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ -
codim database of VirtualRefinement
Definition virtualrefinement.hh:378
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,186 +1,1022 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -virtualrefinement.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 (C) DUNE 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_VIRTUALREFINEMENT_HH │ │ │ │ │ -6#define DUNE_GEOMETRY_VIRTUALREFINEMENT_HH │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ │ 7 │ │ │ │ │ -268#include │ │ │ │ │ -269 │ │ │ │ │ -270#include │ │ │ │ │ -271 │ │ │ │ │ -272#include "_r_e_f_i_n_e_m_e_n_t_._h_h" │ │ │ │ │ -273#include "_t_y_p_e_._h_h" │ │ │ │ │ -274 │ │ │ │ │ -275namespace _D_u_n_e │ │ │ │ │ -276{ │ │ │ │ │ -277 // ////////////////////////////////////////// │ │ │ │ │ -278 // │ │ │ │ │ -279 // The virtual base class and its iterators │ │ │ │ │ -280 // │ │ │ │ │ -281 │ │ │ │ │ -282 // │ │ │ │ │ -283 // Refinement │ │ │ │ │ -284 // │ │ │ │ │ -285 │ │ │ │ │ -292 template │ │ │ │ │ -_2_9_3 class _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -294 { │ │ │ │ │ -295 public: │ │ │ │ │ -296 template │ │ │ │ │ -297 struct _C_o_d_i_m; │ │ │ │ │ -_2_9_9 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; │ │ │ │ │ -_3_0_1 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; │ │ │ │ │ -302 │ │ │ │ │ -_3_0_8 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -_3_1_4 typedef std::vector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ -315 │ │ │ │ │ -316 template │ │ │ │ │ -317 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ -_3_1_8 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_d_i_m_e_n_s_i_o_n_> _V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ -_3_1_9 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_0_> _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ -320 │ │ │ │ │ -_3_2_6 virtual 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) const = 0; │ │ │ │ │ -327 │ │ │ │ │ -333 _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) const; │ │ │ │ │ -334 │ │ │ │ │ -340 _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) const; │ │ │ │ │ -341 │ │ │ │ │ -_3_4_7 virtual 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) const = 0; │ │ │ │ │ -348 │ │ │ │ │ -354 _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) const; │ │ │ │ │ -355 │ │ │ │ │ -361 _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) const; │ │ │ │ │ -362 │ │ │ │ │ -_3_6_4 virtual _~_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t() │ │ │ │ │ -365 {} │ │ │ │ │ -366 │ │ │ │ │ -367 protected: │ │ │ │ │ -_3_6_8 virtual _V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *_v_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ -= 0; │ │ │ │ │ -_3_6_9 virtual _V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *_v_E_n_d_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const = │ │ │ │ │ -0; │ │ │ │ │ -_3_7_0 virtual _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r_B_a_c_k *_e_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ │ -const = 0; │ │ │ │ │ -_3_7_1 virtual _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r_B_a_c_k *_e_E_n_d_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ -= 0; │ │ │ │ │ -372 }; │ │ │ │ │ -373 │ │ │ │ │ -375 template │ │ │ │ │ -376 template │ │ │ │ │ -_3_7_7 struct _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::_C_o_d_i_m │ │ │ │ │ +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_/_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ +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{ │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 _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; │ │ │ │ │ +205 │ │ │ │ │ +_2_0_7 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ │ +208 │ │ │ │ │ +_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 _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 _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 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 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 global< false >( _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::template xTRightInvA< mydimension, coorddimension > │ │ │ │ │ +( _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::template sqrtDetAAT< mydimension, coorddimension > │ │ │ │ │ +( _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 class SubEntityIterator; │ │ │ │ │ -380 }; │ │ │ │ │ -381 │ │ │ │ │ -382 // //////////////////////// │ │ │ │ │ -383 // │ │ │ │ │ -384 // The refinement builder │ │ │ │ │ -385 // │ │ │ │ │ +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 jacobianTransposed< false >( _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 │ │ │ │ │ -387 template │ │ │ │ │ -388 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ -389 _b_u_i_l_d_R_e_f_i_n_e_m_e_n_t(_G_e_o_m_e_t_r_y_T_y_p_e geometryType, _G_e_o_m_e_t_r_y_T_y_p_e coerceTo); │ │ │ │ │ -390 │ │ │ │ │ -391} // namespace Dune │ │ │ │ │ -392 │ │ │ │ │ -393#include "_v_i_r_t_u_a_l_r_e_f_i_n_e_m_e_n_t_._c_c" │ │ │ │ │ +_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 │ │ │ │ │ -395#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH │ │ │ │ │ +_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: │ │ │ │ │ +_4_9_2 void _s_e_t_u_p ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ +493 { │ │ │ │ │ +494 detInv_ = MatrixHelper::template rightInvA< mydimension, coorddimension > │ │ │ │ │ +( jt, static_cast< Base & >( *this ) ); │ │ │ │ │ +495 } │ │ │ │ │ +496 │ │ │ │ │ +_4_9_7 void _s_e_t_u_p_D_e_t_e_r_m_i_n_a_n_t ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ │ +498 { │ │ │ │ │ +499 detInv_ = MatrixHelper::template sqrtDetAAT< mydimension, coorddimension > │ │ │ │ │ +( jt ); │ │ │ │ │ +500 } │ │ │ │ │ +501 │ │ │ │ │ +_5_0_2 _c_t_y_p_e _d_e_t () const { return _c_t_y_p_e( 1 ) / detInv_; } │ │ │ │ │ +_5_0_3 _c_t_y_p_e _d_e_t_I_n_v () 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_ _> _B_a_s_e; │ │ │ │ │ +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 _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 _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 : _B_a_s_e( _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t, cornerStorage ), │ │ │ │ │ +553 affine_( _B_a_s_e::_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 : _B_a_s_e( gt, cornerStorage ), │ │ │ │ │ +561 affine_( _B_a_s_e::_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::template xTRightInvA< mydimension, coorddimension > │ │ │ │ │ +( 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_._s_e_t_u_p_D_e_t_e_r_m_i_n_a_n_t( jacobianTransposed_ ); │ │ │ │ │ +640 integrationElementComputed_ = true; │ │ │ │ │ +641 } │ │ │ │ │ +642 return jacobianInverseTransposed_._d_e_t_I_n_v(); │ │ │ │ │ +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_._s_e_t_u_p( 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 &local ) 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._s_e_t_u_p( 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 > │ │ │ │ │ +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 topologyId, 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(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, _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 < 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 > │ │ │ │ │ +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 topologyId, 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(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 _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 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< _c_t_y_p_e, 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 > │ │ │ │ │ +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 topologyId, 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( !affine( topologyId, 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(topologyId), mydimension, mydimension-dim │ │ │ │ │ +) ) │ │ │ │ │ +916 { │ │ │ │ │ +917 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d 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 _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 │ │ │ │ │ +_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. │ │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ _t_y_p_e_._h_h │ │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ │ -_v_i_r_t_u_a_l_r_e_f_i_n_e_m_e_n_t_._c_c │ │ │ │ │ -This file contains the virtual wrapper around refinement. │ │ │ │ │ -_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ -This file simply includes all Refinement implementations so you don't have to │ │ │ │ │ -do them separately. │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType │ │ │ │ │ -geometryType, GeometryType coerceTo) │ │ │ │ │ -return a reference to the VirtualRefinement according to the parameters │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:503 │ │ │ │ │ -_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_:_:_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:170 │ │ │ │ │ +_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:188 │ │ │ │ │ +_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 │ │ │ │ │ +generic geometry implementation based on corner coordinates │ │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:181 │ │ │ │ │ +_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_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int mydimension │ │ │ │ │ +geometry dimension │ │ │ │ │ +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_:_:_t_y_p_e │ │ │ │ │ +Dune::GeometryType type() const │ │ │ │ │ +obtain the name of the reference element │ │ │ │ │ +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_:_:_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_:_:_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 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_:_:_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_:_:_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_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +coordinate type │ │ │ │ │ +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_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int coorddimension │ │ │ │ │ +coordinate dimension │ │ │ │ │ +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_o_r_n_e_r_s │ │ │ │ │ +int corners() const │ │ │ │ │ +obtain number of corners of the corresponding reference element │ │ │ │ │ +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_:_:_l_o_c_a_l │ │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &globalCoord) const │ │ │ │ │ +evaluate the inverse mapping │ │ │ │ │ +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_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ │ +type of local coordinates │ │ │ │ │ +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_:_:_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_:_:_V_o_l_u_m_e │ │ │ │ │ +ctype Volume │ │ │ │ │ +type of 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_:_:_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 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_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ +ReferenceElements::ReferenceElement ReferenceElement │ │ │ │ │ +type of reference element │ │ │ │ │ +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_:_:_J_a_c_o_b_i_a_n │ │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ │ +Type for the Jacobian matrix. │ │ │ │ │ +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_:_:_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 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_:_:_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_:_:_s_e_t_u_p │ │ │ │ │ +void setup(const JacobianTransposed &jt) │ │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:492 │ │ │ │ │ +_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_:_:_d_e_t │ │ │ │ │ +ctype det() const │ │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:502 │ │ │ │ │ +_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_:_:_d_e_t_I_n_v │ │ │ │ │ +ctype detInv() const │ │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:503 │ │ │ │ │ +_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_:_:_s_e_t_u_p_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +void setupDeterminant(const JacobianTransposed &jt) │ │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:497 │ │ │ │ │ +_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_:_:_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_:_:_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_:_:_a_f_f_i_n_e │ │ │ │ │ +bool affine() const │ │ │ │ │ +is this mapping affine? │ │ │ │ │ +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_:_:_l_o_c_a_l │ │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ +evaluate the inverse mapping │ │ │ │ │ +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_:_:_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_:_:_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_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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:126 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:231 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -VirtualRefinement base class. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:294 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ -SubEntityIteratorBack< dimension > VertexIteratorBack │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:318 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d_B_a_c_k │ │ │ │ │ -virtual ElementIteratorBack * eEndBack(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n │ │ │ │ │ -VertexIterator vBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an VertexIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:38 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n │ │ │ │ │ -ElementIterator eBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an ElementIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:54 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ │ -virtual int nElements(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ -Get the number of Elements. │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d │ │ │ │ │ -ElementIterator eEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an ElementIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:62 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:301 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_~_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -virtual ~VirtualRefinement() │ │ │ │ │ -Destructor. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:364 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d │ │ │ │ │ -VertexIterator vEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ -Get an VertexIterator. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.cc:46 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -FieldVector< CoordType, dimension > CoordVector │ │ │ │ │ -The CoordVector of the VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:308 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ │ -virtual int nVertices(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ -Get the number of Vertices. │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ -std::vector< int > IndexVector │ │ │ │ │ -The IndexVector of the VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d_B_a_c_k │ │ │ │ │ -virtual VertexIteratorBack * vEndBack(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ -SubEntityIteratorBack< 0 > ElementIteratorBack │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n_B_a_c_k │ │ │ │ │ -virtual ElementIteratorBack * eBeginBack(Dune::RefinementIntervals tag) const │ │ │ │ │ -=0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n_B_a_c_k │ │ │ │ │ -virtual VertexIteratorBack * vBeginBack(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ │ -codim database of VirtualRefinement │ │ │ │ │ -DDeeffiinniittiioonn virtualrefinement.hh:378 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: refinement.hh File Reference │ │ │ │ +dune-geometry: dimension.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,30 +69,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinement.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
dimension.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 <type_traits>
│ │ │ │
│ │ │ │

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.

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

│ │ │ │ +Classes

struct  Dune::Dim< dim >
 Static tag representing a dimension. More...
 
struct  Dune::Codim< codim >
 Static tag representing a codimension. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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" │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +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_. │ │ │ │ │ -********** 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. │ │ │ │ │ +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_._._. │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: refinement.hh Source File │ │ │ │ +dune-geometry: dimension.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,42 +74,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinement.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 (C) DUNE 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_DIMENSION_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_DIMENSION_HH
│ │ │ │
7
│ │ │ │ -
250// The interface (template<...> class StaticRefinement) is not included here
│ │ │ │ -
251// since it derives from parts which I consider implementation. Look
│ │ │ │ -
252// into refinement/base.cc if the documentation is above is not enough.
│ │ │ │ -
253#include "refinement/base.cc"
│ │ │ │ -
254
│ │ │ │ -
255#include "refinement/hcube.cc"
│ │ │ │ -
256#include "refinement/simplex.cc"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
260
│ │ │ │ -
261#endif // DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> trian...
│ │ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ │ -
This file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons,...
│ │ │ │ +
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:21
│ │ │ │ +
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,44 +1,53 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -refinement.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 (C) DUNE 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_DIMENSION_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ │ 7 │ │ │ │ │ -250// The interface (template<...> class StaticRefinement) is not included here │ │ │ │ │ -251// since it derives from parts which I consider implementation. Look │ │ │ │ │ -252// into refinement/base.cc if the documentation is above is not enough. │ │ │ │ │ -253#include "_r_e_f_i_n_e_m_e_n_t_/_b_a_s_e_._c_c" │ │ │ │ │ -254 │ │ │ │ │ -255#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_._c_c" │ │ │ │ │ -256#include "_r_e_f_i_n_e_m_e_n_t_/_s_i_m_p_l_e_x_._c_c" │ │ │ │ │ -257#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" │ │ │ │ │ -258#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" │ │ │ │ │ -259#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" │ │ │ │ │ -260 │ │ │ │ │ -261#endif // DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ │ -_b_a_s_e_._c_c │ │ │ │ │ -This file contains the parts independent of a particular Refinement │ │ │ │ │ -implementation. │ │ │ │ │ -_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... │ │ │ │ │ -_s_i_m_p_l_e_x_._c_c │ │ │ │ │ -This file contains the Refinement implementation for simplices (triangles, │ │ │ │ │ -tetrahedrons.... │ │ │ │ │ -_h_c_u_b_e_._c_c │ │ │ │ │ -This file contains the Refinement implementation for hypercubes │ │ │ │ │ -(quadrilaterals, hexahedrons,... │ │ │ │ │ +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:21 │ │ │ │ │ +_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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: topologyfactory.hh File Reference │ │ │ │ +dune-geometry: virtualrefinement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,43 +71,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
topologyfactory.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
virtualrefinement.hh 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>
│ │ │ │ + │ │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::TopologyFactory< Traits >
 Provide a factory over the generic topologies. More...
class  Dune::VirtualRefinement< dimension, CoordType >
 VirtualRefinement base class. 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...
struct  Dune::VirtualRefinement< dimension, CoordType >::Codim< codimension >
 codim database of VirtualRefinement More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Functions

template<int dimension, class CoordType >
VirtualRefinement< dimension, CoordType > & Dune::buildRefinement (GeometryType geometryType, GeometryType coerceTo)
 return a reference to the VirtualRefinement according to the parameters
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

This file contains the virtual wrapper around refinement.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,31 +1,37 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +_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 │ │ │ │ │ +virtualrefinement.hh File Reference │ │ │ │ │ +This file contains the virtual wrapper around refinement. _M_o_r_e_._._. │ │ │ │ │ #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 │ │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_._h_h" │ │ │ │ │ +#include "_t_y_p_e_._h_h" │ │ │ │ │ +#include "_v_i_r_t_u_a_l_r_e_f_i_n_e_m_e_n_t_._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_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ │ +  _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t base class. _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_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_ _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_ _> │ │ │ │ │ +  codim database of _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t< dimension, CoordType > _D_u_n_e_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t (_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ + &  geometryType, _G_e_o_m_e_t_r_y_T_y_p_e coerceTo) │ │ │ │ │ + return a reference to the │ │ │ │ │ +  _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t according to the │ │ │ │ │ + parameters │ │ │ │ │ +  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +This file contains the virtual wrapper around refinement. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: topologyfactory.hh Source File │ │ │ │ +dune-geometry: virtualrefinement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,194 +74,135 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
topologyfactory.hh
│ │ │ │ +
virtualrefinement.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE 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_VIRTUALREFINEMENT_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
│ │ │ │
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
│ │ │ │ -
│ │ │ │ -
50 static Object *create ( const Dune::GeometryType &gt, const Key &key )
│ │ │ │ -
51 {
│ │ │ │ -
52 return Impl::toGeometryTypeIdConstant<dimension>(gt, [&](auto id) {
│ │ │ │ -
53 return create<decltype(id)::value>(key);
│ │ │ │ -
54 });
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
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>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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.
│ │ │ │ +
268#include <vector>
│ │ │ │ +
269
│ │ │ │ +
270#include <dune/common/fvector.hh>
│ │ │ │ +
271
│ │ │ │ +
272#include "refinement.hh"
│ │ │ │ +
273#include "type.hh"
│ │ │ │ +
274
│ │ │ │ +
275namespace Dune
│ │ │ │ +
276{
│ │ │ │ +
277 // //////////////////////////////////////////
│ │ │ │ +
278 //
│ │ │ │ +
279 // The virtual base class and its iterators
│ │ │ │ +
280 //
│ │ │ │ +
281
│ │ │ │ +
282 //
│ │ │ │ +
283 // Refinement
│ │ │ │ +
284 //
│ │ │ │ +
285
│ │ │ │ +
292 template<int dimension, class CoordType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
294 {
│ │ │ │ +
295 public:
│ │ │ │ +
296 template<int codimension>
│ │ │ │ +
297 struct Codim;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
302
│ │ │ │ +
308 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ │ +
314 typedef std::vector<int> IndexVector;
│ │ │ │ +
315
│ │ │ │ +
316 template<int codimension>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
320
│ │ │ │ +
326 virtual int nVertices(Dune::RefinementIntervals tag) const = 0;
│ │ │ │ +
327
│ │ │ │ + │ │ │ │ +
334
│ │ │ │ + │ │ │ │ +
341
│ │ │ │ +
347 virtual int nElements(Dune::RefinementIntervals tag) const = 0;
│ │ │ │ +
348
│ │ │ │ + │ │ │ │ +
355
│ │ │ │ + │ │ │ │ +
362
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
365 {}
│ │ │ │ +
│ │ │ │ +
366
│ │ │ │ +
367 protected:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
372 };
│ │ │ │ +
│ │ │ │ +
373
│ │ │ │ +
375 template<int dimension, class CoordType>
│ │ │ │ +
376 template<int codimension>
│ │ │ │ +
│ │ │ │ +
377 struct VirtualRefinement<dimension, CoordType>::Codim
│ │ │ │ +
378 {
│ │ │ │ +
379 class SubEntityIterator;
│ │ │ │ +
380 };
│ │ │ │ +
│ │ │ │ +
381
│ │ │ │ +
382 // ////////////////////////
│ │ │ │ +
383 //
│ │ │ │ +
384 // The refinement builder
│ │ │ │ +
385 //
│ │ │ │ +
386
│ │ │ │ +
387 template<int dimension, class CoordType>
│ │ │ │ + │ │ │ │ +
389 buildRefinement(GeometryType geometryType, GeometryType coerceTo);
│ │ │ │ +
390
│ │ │ │ +
391} // namespace Dune
│ │ │ │ +
392
│ │ │ │ +
393#include "virtualrefinement.cc"
│ │ │ │ +
394
│ │ │ │ +
395#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
│ │ │ │ +
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │ │ +
This file contains the virtual wrapper around refinement.
│ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
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
│ │ │ │ -
A wrapper for a TopologyFactory providing singleton storage. Same usage as TopologyFactory but with e...
Definition topologyfactory.hh:82
│ │ │ │ -
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
│ │ │ │ +
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:503
│ │ │ │ +
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:126
│ │ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ +
Definition virtualrefinement.cc:231
│ │ │ │ +
VirtualRefinement base class.
Definition virtualrefinement.hh:294
│ │ │ │ +
SubEntityIteratorBack< dimension > VertexIteratorBack
Definition virtualrefinement.hh:318
│ │ │ │ +
virtual ElementIteratorBack * eEndBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ +
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:38
│ │ │ │ +
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:54
│ │ │ │ +
virtual int nElements(Dune::RefinementIntervals tag) const =0
Get the number of Elements.
│ │ │ │ +
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:62
│ │ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition virtualrefinement.hh:301
│ │ │ │ +
virtual ~VirtualRefinement()
Destructor.
Definition virtualrefinement.hh:364
│ │ │ │ +
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:46
│ │ │ │ +
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition virtualrefinement.hh:308
│ │ │ │ +
virtual int nVertices(Dune::RefinementIntervals tag) const =0
Get the number of Vertices.
│ │ │ │ +
std::vector< int > IndexVector
The IndexVector of the VirtualRefinement.
Definition virtualrefinement.hh:314
│ │ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition virtualrefinement.hh:299
│ │ │ │ +
virtual VertexIteratorBack * vEndBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ +
SubEntityIteratorBack< 0 > ElementIteratorBack
Definition virtualrefinement.hh:319
│ │ │ │ +
virtual ElementIteratorBack * eBeginBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ +
virtual VertexIteratorBack * vBeginBack(Dune::RefinementIntervals tag) const =0
│ │ │ │ +
codim database of VirtualRefinement
Definition virtualrefinement.hh:378
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,220 +1,186 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -topologyfactory.hh │ │ │ │ │ +virtualrefinement.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ │ -6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_VIRTUALREFINEMENT_HH │ │ │ │ │ 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 ) │ │ │ │ │ -51 { │ │ │ │ │ -52 return Impl::toGeometryTypeIdConstant(gt, [&](auto id) { │ │ │ │ │ -53 return create(key); │ │ │ │ │ -54 }); │ │ │ │ │ -55 } │ │ │ │ │ -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 _T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y │ │ │ │ │ -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 } │ │ │ │ │ -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 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, 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 create< geometry >( 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 create< Topology >( key ) ); │ │ │ │ │ -160 return object.get(); │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -163 Storage storage_; │ │ │ │ │ -164 }; │ │ │ │ │ -165 │ │ │ │ │ -166} │ │ │ │ │ -167 │ │ │ │ │ -168#endif // #ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ │ +268#include │ │ │ │ │ +269 │ │ │ │ │ +270#include │ │ │ │ │ +271 │ │ │ │ │ +272#include "_r_e_f_i_n_e_m_e_n_t_._h_h" │ │ │ │ │ +273#include "_t_y_p_e_._h_h" │ │ │ │ │ +274 │ │ │ │ │ +275namespace _D_u_n_e │ │ │ │ │ +276{ │ │ │ │ │ +277 // ////////////////////////////////////////// │ │ │ │ │ +278 // │ │ │ │ │ +279 // The virtual base class and its iterators │ │ │ │ │ +280 // │ │ │ │ │ +281 │ │ │ │ │ +282 // │ │ │ │ │ +283 // Refinement │ │ │ │ │ +284 // │ │ │ │ │ +285 │ │ │ │ │ +292 template │ │ │ │ │ +_2_9_3 class _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +294 { │ │ │ │ │ +295 public: │ │ │ │ │ +296 template │ │ │ │ │ +297 struct _C_o_d_i_m; │ │ │ │ │ +_2_9_9 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; │ │ │ │ │ +_3_0_1 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; │ │ │ │ │ +302 │ │ │ │ │ +_3_0_8 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +_3_1_4 typedef std::vector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ │ +315 │ │ │ │ │ +316 template │ │ │ │ │ +317 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ +_3_1_8 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_d_i_m_e_n_s_i_o_n_> _V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ +_3_1_9 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_B_a_c_k_<_0_> _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r_B_a_c_k; │ │ │ │ │ +320 │ │ │ │ │ +_3_2_6 virtual 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) const = 0; │ │ │ │ │ +327 │ │ │ │ │ +333 _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) const; │ │ │ │ │ +334 │ │ │ │ │ +340 _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) const; │ │ │ │ │ +341 │ │ │ │ │ +_3_4_7 virtual 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) const = 0; │ │ │ │ │ +348 │ │ │ │ │ +354 _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) const; │ │ │ │ │ +355 │ │ │ │ │ +361 _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) const; │ │ │ │ │ +362 │ │ │ │ │ +_3_6_4 virtual _~_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t() │ │ │ │ │ +365 {} │ │ │ │ │ +366 │ │ │ │ │ +367 protected: │ │ │ │ │ +_3_6_8 virtual _V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *_v_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ += 0; │ │ │ │ │ +_3_6_9 virtual _V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k *_v_E_n_d_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const = │ │ │ │ │ +0; │ │ │ │ │ +_3_7_0 virtual _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r_B_a_c_k *_e_B_e_g_i_n_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ │ +const = 0; │ │ │ │ │ +_3_7_1 virtual _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r_B_a_c_k *_e_E_n_d_B_a_c_k(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) const │ │ │ │ │ += 0; │ │ │ │ │ +372 }; │ │ │ │ │ +373 │ │ │ │ │ +375 template │ │ │ │ │ +376 template │ │ │ │ │ +_3_7_7 struct _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t::_C_o_d_i_m │ │ │ │ │ +378 { │ │ │ │ │ +379 class SubEntityIterator; │ │ │ │ │ +380 }; │ │ │ │ │ +381 │ │ │ │ │ +382 // //////////////////////// │ │ │ │ │ +383 // │ │ │ │ │ +384 // The refinement builder │ │ │ │ │ +385 // │ │ │ │ │ +386 │ │ │ │ │ +387 template │ │ │ │ │ +388 _V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> & │ │ │ │ │ +389 _b_u_i_l_d_R_e_f_i_n_e_m_e_n_t(_G_e_o_m_e_t_r_y_T_y_p_e geometryType, _G_e_o_m_e_t_r_y_T_y_p_e coerceTo); │ │ │ │ │ +390 │ │ │ │ │ +391} // namespace Dune │ │ │ │ │ +392 │ │ │ │ │ +393#include "_v_i_r_t_u_a_l_r_e_f_i_n_e_m_e_n_t_._c_c" │ │ │ │ │ +394 │ │ │ │ │ +395#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH │ │ │ │ │ +_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ +This file simply includes all Refinement implementations so you don't have to │ │ │ │ │ +do them separately. │ │ │ │ │ +_v_i_r_t_u_a_l_r_e_f_i_n_e_m_e_n_t_._c_c │ │ │ │ │ +This file contains the virtual wrapper around refinement. │ │ │ │ │ _t_y_p_e_._h_h │ │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ │ -_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:21 │ │ │ │ │ -_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 │ │ │ │ │ -A wrapper for a TopologyFactory providing singleton storage. Same usage as │ │ │ │ │ -TopologyFactory but with e... │ │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:82 │ │ │ │ │ -_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_:_:_b_u_i_l_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType │ │ │ │ │ +geometryType, GeometryType coerceTo) │ │ │ │ │ +return a reference to the VirtualRefinement according to the parameters │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:503 │ │ │ │ │ +_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_:_:_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:126 │ │ │ │ │ -_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:377 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:231 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +VirtualRefinement base class. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:294 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_B_a_c_k │ │ │ │ │ +SubEntityIteratorBack< dimension > VertexIteratorBack │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:318 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d_B_a_c_k │ │ │ │ │ +virtual ElementIteratorBack * eEndBack(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n │ │ │ │ │ +VertexIterator vBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an VertexIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:38 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n │ │ │ │ │ +ElementIterator eBegin(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an ElementIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:54 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ │ +virtual int nElements(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ +Get the number of Elements. │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d │ │ │ │ │ +ElementIterator eEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an ElementIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:62 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:301 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_~_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +virtual ~VirtualRefinement() │ │ │ │ │ +Destructor. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:364 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d │ │ │ │ │ +VertexIterator vEnd(Dune::RefinementIntervals tag) const │ │ │ │ │ +Get an VertexIterator. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.cc:46 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +FieldVector< CoordType, dimension > CoordVector │ │ │ │ │ +The CoordVector of the VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:308 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ │ +virtual int nVertices(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ +Get the number of Vertices. │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +std::vector< int > IndexVector │ │ │ │ │ +The IndexVector of the VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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 VirtualRefinement. │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d_B_a_c_k │ │ │ │ │ +virtual VertexIteratorBack * vEndBack(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_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_B_a_c_k │ │ │ │ │ +SubEntityIteratorBack< 0 > ElementIteratorBack │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n_B_a_c_k │ │ │ │ │ +virtual ElementIteratorBack * eBeginBack(Dune::RefinementIntervals tag) const │ │ │ │ │ +=0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n_B_a_c_k │ │ │ │ │ +virtual VertexIteratorBack * vBeginBack(Dune::RefinementIntervals tag) const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ │ +codim database of VirtualRefinement │ │ │ │ │ +DDeeffiinniittiioonn virtualrefinement.hh:378 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00236.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelement.hh File Reference │ │ │ │ +dune-geometry: referenceelements.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,37 +71,73 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
referenceelement.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs | │ │ │ │ +Functions
│ │ │ │ +
referenceelements.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <algorithm>
│ │ │ │ +#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>
│ │ │ │
│ │ │ │

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::Geo::ReferenceElements< ctype_, dim >
 Class providing access to the singletons of the reference elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Typedefs

template<typename T , int dim>
using Dune::ReferenceElement = unspecified-type
 Returns the type of reference element for the argument type 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,25 +1,60 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +_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_/_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 │ │ │ │ │ - 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_:_:_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_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_T_r_a_n_s_i_t_i_o_n_a_l │ │ │ │ │ +  │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = unspecified-type │ │ │ │ │ +  Returns the type of reference element for the argument type T. │ │ │ │ │ +  │ │ │ │ │ +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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00236_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelement.hh Source File │ │ │ │ +dune-geometry: referenceelements.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,260 +74,421 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
referenceelement.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 (C) DUNE 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_REFERENCEELEMENTS_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <cassert>
│ │ │ │
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 }
│ │ │ │ +
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
│ │ │ │ -
21 // forward declaration for constructing default reference element type
│ │ │ │ -
22 template<typename ctype, int dim>
│ │ │ │ -
23 class ReferenceElementImplementation;
│ │ │ │ -
24
│ │ │ │ -
25 // forward declaration for backwards compatibility conversion
│ │ │ │ -
26 template<typename ctype, int dim>
│ │ │ │ -
27 struct ReferenceElements;
│ │ │ │ + │ │ │ │ +
22#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
25
│ │ │ │ +
26namespace Dune
│ │ │ │ +
27{
│ │ │ │
28
│ │ │ │ -
29 // ReferenceElement
│ │ │ │ -
30 // ----------------
│ │ │ │ +
29 namespace Geo
│ │ │ │ +
30 {
│ │ │ │
31
│ │ │ │ -
50 template<typename Implementation>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {
│ │ │ │ -
53
│ │ │ │ -
54 public:
│ │ │ │ +
32#ifndef DOXYGEN
│ │ │ │ +
33
│ │ │ │ +
34
│ │ │ │ +
35 template<typename ctype, int dim>
│ │ │ │ +
36 class DeprecatedReferenceElement
│ │ │ │ +
37 : public ReferenceElement<ReferenceElementImplementation<ctype,dim>>
│ │ │ │ +
38 {
│ │ │ │ +
39
│ │ │ │ +
40 protected:
│ │ │ │ +
41
│ │ │ │ +
42 DeprecatedReferenceElement() = default;
│ │ │ │ +
43
│ │ │ │ +
44 public:
│ │ │ │ +
45
│ │ │ │ +
46 DeprecatedReferenceElement(const DeprecatedReferenceElement&) = delete;
│ │ │ │ +
47 DeprecatedReferenceElement& operator=(const DeprecatedReferenceElement&) = delete;
│ │ │ │ +
48
│ │ │ │ +
49 DeprecatedReferenceElement(const ReferenceElementImplementation<ctype,dim>& impl)
│ │ │ │ +
50 : ReferenceElement<ReferenceElementImplementation<ctype,dim>>(impl)
│ │ │ │ +
51 {}
│ │ │ │ +
52
│ │ │ │ +
53 };
│ │ │ │ +
54
│ │ │ │
55
│ │ │ │ -
56#ifndef DOXYGEN
│ │ │ │ -
57
│ │ │ │ -
59 template<int codim>
│ │ │ │ -
60 using Codim = typename Implementation::template Codim<codim>;
│ │ │ │ -
61
│ │ │ │ -
62#else
│ │ │ │ +
56 template<typename ctype, int dim>
│ │ │ │ +
57 class ConstructibleDeprecatedReferenceElement
│ │ │ │ +
58 : public DeprecatedReferenceElement<ctype,dim>
│ │ │ │ +
59 {
│ │ │ │ +
60 public:
│ │ │ │ +
61 ConstructibleDeprecatedReferenceElement() = default;
│ │ │ │ +
62 };
│ │ │ │
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;
│ │ │ │ +
64
│ │ │ │ +
65 namespace Impl
│ │ │ │ +
66 {
│ │ │ │ +
67
│ │ │ │ +
68 // ReferenceElementContainer
│ │ │ │ +
69 // -------------------------
│ │ │ │ +
70
│ │ │ │ +
71 template< class ctype, int dim >
│ │ │ │ +
72 class ReferenceElementContainer
│ │ │ │ +
73 {
│ │ │ │ +
74 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0;
│ │ │ │ +
75
│ │ │ │ +
76 using Implementation = ReferenceElementImplementation< ctype, dim >;
│ │ │ │ +
77 using ConstructibleDeprecatedReferenceElement = Dune::Geo::ConstructibleDeprecatedReferenceElement<ctype,dim>;
│ │ │ │ +
78
│ │ │ │ +
79 public:
│ │ │ │ +
80
│ │ │ │ +
81 using DeprecatedReferenceElement = Dune::Geo::DeprecatedReferenceElement<ctype,dim>;
│ │ │ │
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
│ │ │ │ +
83 using ReferenceElement = Dune::Geo::ReferenceElement< Implementation >;
│ │ │ │ +
84 using value_type = ReferenceElement;
│ │ │ │ +
85 using const_iterator = const value_type*;
│ │ │ │ +
86
│ │ │ │ +
87 ReferenceElementContainer ()
│ │ │ │ +
88 {
│ │ │ │ +
89 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId )
│ │ │ │ +
90 {
│ │ │ │ +
91 implementations_[ topologyId ].initialize( topologyId );
│ │ │ │ +
92 reference_elements_[ topologyId ].setImplementation( implementations_[ topologyId ] );
│ │ │ │ +
93 }
│ │ │ │ +
94 }
│ │ │ │ +
95
│ │ │ │ +
96 const ReferenceElement& operator() ( const GeometryType &type ) const
│ │ │ │ +
97 {
│ │ │ │ +
98 assert( type.dim() == dim );
│ │ │ │ +
99 return reference_elements_[ type.id() ];
│ │ │ │ +
100 }
│ │ │ │ +
101
│ │ │ │ +
102 const ReferenceElement& simplex () const
│ │ │ │ +
103 {
│ │ │ │ +
104 return reference_elements_[ Dune::GeometryTypes::simplex(dim).id() ];
│ │ │ │ +
105 }
│ │ │ │ +
106
│ │ │ │ +
107 const ReferenceElement& cube () const
│ │ │ │ +
108 {
│ │ │ │ +
109 return reference_elements_[ Dune::GeometryTypes::cube(dim).id() ];
│ │ │ │ +
110 }
│ │ │ │ +
111
│ │ │ │ +
112 const ReferenceElement& pyramid () const
│ │ │ │ +
113 {
│ │ │ │ +
114 return reference_elements_[ Dune::GeometryTypes::pyramid.id() ];
│ │ │ │ +
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 }
│ │ │ │ -
│ │ │ │ +
117 const ReferenceElement& prism () const
│ │ │ │ +
118 {
│ │ │ │ +
119 return reference_elements_[ Dune::GeometryTypes::prism.id() ];
│ │ │ │ +
120 }
│ │ │ │ +
121
│ │ │ │ +
122 const_iterator begin () const
│ │ │ │ +
123 {
│ │ │ │ +
124 return reference_elements_.data();
│ │ │ │ +
125 }
│ │ │ │ +
126
│ │ │ │ +
127 const_iterator end () const
│ │ │ │ +
128 {
│ │ │ │ +
129 return reference_elements_.data() + numTopologies;
│ │ │ │ +
130 }
│ │ │ │ +
131
│ │ │ │ +
132 // here, we make sure to actually return a const reference to something
│ │ │ │ +
133 // that is guaranteed not to become invalid, as otherwise, we might run
│ │ │ │ +
134 // straight into debugging hell when a user binds the return value to a
│ │ │ │ +
135 // const ref and the temporary goes out of scope.
│ │ │ │ +
136 const DeprecatedReferenceElement& deprecated(const ReferenceElement& v) const
│ │ │ │ +
137 {
│ │ │ │ +
138 return reference_elements_[v.impl().type(0,0).id()];
│ │ │ │ +
139 }
│ │ │ │ +
140
│ │ │ │ +
141 private:
│ │ │ │ +
142
│ │ │ │ +
143 std::array<Implementation,numTopologies> implementations_;
│ │ │ │ +
144 std::array<ConstructibleDeprecatedReferenceElement,numTopologies> reference_elements_;
│ │ │ │ +
145
│ │ │ │ +
146 };
│ │ │ │ +
147
│ │ │ │ +
148
│ │ │ │ +
149 } // namespace Impl
│ │ │ │ +
150
│ │ │ │ +
151
│ │ │ │ +
152#endif // DOXYGEN
│ │ │ │ +
153
│ │ │ │ +
154
│ │ │ │ +
155 // ReferenceElements
│ │ │ │ +
156 // ------------------------
│ │ │ │
157
│ │ │ │ -
158
│ │ │ │ -
│ │ │ │ -
171 decltype(auto) type(int i, int c) const
│ │ │ │ -
172 {
│ │ │ │ -
173 return _impl->type(i,c);
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
176
│ │ │ │ -
│ │ │ │ -
184 decltype(auto) type() const
│ │ │ │ -
185 {
│ │ │ │ -
186 return _impl->type();
│ │ │ │ -
187 }
│ │ │ │ -
│ │ │ │ -
188
│ │ │ │ +
168 template< class ctype_, int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
170 {
│ │ │ │ +
171
│ │ │ │ +
173 using ctype = ctype_;
│ │ │ │ +
174
│ │ │ │ + │ │ │ │ +
177
│ │ │ │ +
179 static constexpr int dimension = dim;
│ │ │ │ +
180
│ │ │ │ +
181 private:
│ │ │ │ +
182
│ │ │ │ +
183 using Container = Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ │ +
184
│ │ │ │ +
185 public:
│ │ │ │ +
186
│ │ │ │ +
188 using ReferenceElement = typename Container::ReferenceElement;
│ │ │ │
189
│ │ │ │ -
│ │ │ │ -
203 decltype(auto) position(int i, int c) const
│ │ │ │ -
204 {
│ │ │ │ -
205 return _impl->position(i,c);
│ │ │ │ -
206 }
│ │ │ │ +
191 using Iterator = typename Container::const_iterator;
│ │ │ │ +
192
│ │ │ │ + │ │ │ │ +
195
│ │ │ │ +
197 static const ReferenceElement&
│ │ │ │ +
│ │ │ │ +
198 general ( const GeometryType& type )
│ │ │ │ +
199 {
│ │ │ │ +
200 return container() ( type );
│ │ │ │ +
201 }
│ │ │ │ +
│ │ │ │ +
202
│ │ │ │ +
│ │ │ │ +
204 static const ReferenceElement& simplex ()
│ │ │ │ +
205 {
│ │ │ │ +
206 return container().simplex();
│ │ │ │ +
207 }
│ │ │ │
│ │ │ │ -
207
│ │ │ │
208
│ │ │ │ -
│ │ │ │ -
216 bool checkInside(const Coordinate& local) const
│ │ │ │ -
217 {
│ │ │ │ -
218 return _impl->checkInside(local);
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ -
220
│ │ │ │ -
221
│ │ │ │ -
233 template<int codim>
│ │ │ │ -
│ │ │ │ -
234 typename Codim<codim>::Geometry geometry(int i) const
│ │ │ │ -
235 {
│ │ │ │ -
236 return _impl->template geometry<codim>(i);
│ │ │ │ -
237 }
│ │ │ │ -
│ │ │ │ -
238
│ │ │ │ -
239
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
242 {
│ │ │ │ -
243 return _impl->volume();
│ │ │ │ -
244 }
│ │ │ │ -
│ │ │ │ -
245
│ │ │ │ +
│ │ │ │ +
210 static const ReferenceElement& cube ()
│ │ │ │ +
211 {
│ │ │ │ +
212 return container().cube();
│ │ │ │ +
213 }
│ │ │ │ +
│ │ │ │ +
214
│ │ │ │ +
│ │ │ │ +
215 static Iterator begin ()
│ │ │ │ +
216 {
│ │ │ │ +
217 return container().begin();
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219
│ │ │ │ +
│ │ │ │ +
220 static Iterator end ()
│ │ │ │ +
221 {
│ │ │ │ +
222 return container().end();
│ │ │ │ +
223 }
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
225#ifndef DOXYGEN
│ │ │ │ +
226 static const typename Container::DeprecatedReferenceElement&
│ │ │ │ +
227 deprecated(const ReferenceElement& v)
│ │ │ │ +
228 {
│ │ │ │ +
229 return container().deprecated(v);
│ │ │ │ +
230 }
│ │ │ │ +
231#endif // DOXYGEN
│ │ │ │ +
232
│ │ │ │ +
233 private:
│ │ │ │ +
234
│ │ │ │ +
235 DUNE_EXPORT static const Container& container ()
│ │ │ │ +
236 {
│ │ │ │ +
237 static Container container;
│ │ │ │ +
238 return container;
│ │ │ │ +
239 }
│ │ │ │ +
240 };
│ │ │ │ +
│ │ │ │ +
241
│ │ │ │ +
242 } // namespace Geo
│ │ │ │ +
243
│ │ │ │ +
245 using Geo::ReferenceElements;
│ │ │ │
246
│ │ │ │ -
│ │ │ │ -
258 decltype(auto) integrationOuterNormal(int face) const
│ │ │ │ -
259 {
│ │ │ │ -
260 return _impl->integrationOuterNormal(face);
│ │ │ │ -
261 }
│ │ │ │ -
│ │ │ │ -
262
│ │ │ │ -
263
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
272 : _impl(nullptr)
│ │ │ │ -
273 {}
│ │ │ │ -
│ │ │ │ -
274
│ │ │ │ -
│ │ │ │ -
280 const Implementation& impl() const
│ │ │ │ -
281 {
│ │ │ │ -
282 return *_impl;
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
284
│ │ │ │ -
│ │ │ │ -
286 bool operator==(const ReferenceElement& r) const
│ │ │ │ -
287 {
│ │ │ │ -
288 return _impl == r._impl;
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
290
│ │ │ │ -
│ │ │ │ -
292 bool operator!=(const ReferenceElement& r) const
│ │ │ │ -
293 {
│ │ │ │ -
294 return not (*this == r);
│ │ │ │ -
295 }
│ │ │ │ -
│ │ │ │ +
247
│ │ │ │ +
248#ifdef DOXYGEN
│ │ │ │ +
249
│ │ │ │ +
251
│ │ │ │ +
294 template<typename... T>
│ │ │ │ +
295 unspecified-value-type referenceElement(T&&... t);
│ │ │ │
296
│ │ │ │ -
│ │ │ │ -
298 friend std::size_t hash_value(const ReferenceElement& r)
│ │ │ │ -
299 {
│ │ │ │ -
300 return reinterpret_cast<std::size_t>(r._impl);
│ │ │ │ -
301 }
│ │ │ │ -
│ │ │ │ -
302
│ │ │ │ -
303 private:
│ │ │ │ -
304
│ │ │ │ -
305 // The implementation must be a friend to construct a wrapper around itself.
│ │ │ │ -
306 friend Implementation;
│ │ │ │ -
307
│ │ │ │ -
308 // The reference container is a friend to be able to call setImplementation.
│ │ │ │ -
309 friend class Impl::ReferenceElementContainer<ctype,dimension>;
│ │ │ │ -
310
│ │ │ │ -
311 // Constructor for wrapping an implementation reference (required internally by the default implementation)
│ │ │ │ -
312 ReferenceElement(const Implementation& impl)
│ │ │ │ -
313 : _impl(&impl)
│ │ │ │ -
314 {}
│ │ │ │ -
315
│ │ │ │ -
316 void setImplementation(const Implementation& impl)
│ │ │ │ -
317 {
│ │ │ │ -
318 _impl = &impl;
│ │ │ │ -
319 }
│ │ │ │ +
297#endif
│ │ │ │ +
298
│ │ │ │ +
299
│ │ │ │ +
301
│ │ │ │ +
314 template<typename T, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
316 {
│ │ │ │ + │ │ │ │ +
318 }
│ │ │ │ +
│ │ │ │ +
319
│ │ │ │
320
│ │ │ │ -
321 const Implementation* _impl;
│ │ │ │
322
│ │ │ │ -
323 };
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ -
325 }
│ │ │ │ -
326
│ │ │ │ -
327}
│ │ │ │ -
328
│ │ │ │ -
329
│ │ │ │ -
330#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
334 template<typename T, int dim, std::enable_if_t<IsNumber<std::decay_t<T>>::value, int> = 0>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
336 {
│ │ │ │ + │ │ │ │ +
338 }
│ │ │ │ +
│ │ │ │ +
339
│ │ │ │ +
340
│ │ │ │ +
341#ifndef DOXYGEN
│ │ │ │ +
342
│ │ │ │ +
343 // helpers for the ReferenceElement<> meta function
│ │ │ │ +
344
│ │ │ │ +
345 namespace Impl {
│ │ │ │ +
346
│ │ │ │ +
347 // Evaluates to the correct reference element iff <T...> matches the pattern <number_type,Dim<int>>
│ │ │ │ +
348 // otherwise, it's ill-formed. Should be used with detected_or and friends.
│ │ │ │ +
349
│ │ │ │ +
350 template<typename... T>
│ │ │ │ +
351 struct DefaultReferenceElementExtractor;
│ │ │ │ +
352
│ │ │ │ +
353 template<typename T, typename std::enable_if<IsNumber<T>::value,int>::type dim>
│ │ │ │ +
354 struct DefaultReferenceElementExtractor<T,Dim<dim>>
│ │ │ │ +
355 {
│ │ │ │ + │ │ │ │ +
357 };
│ │ │ │ +
358
│ │ │ │ +
359 template<typename... T>
│ │ │ │ +
360 using DefaultReferenceElement = typename DefaultReferenceElementExtractor<T...>::type;
│ │ │ │ +
361
│ │ │ │ +
362 }
│ │ │ │ +
363
│ │ │ │ +
364 // looks up the type of a reference element by trying to instantiate the correct overload
│ │ │ │ +
365 // of referenceElement() for the given arguments. This will fail if there is no valid
│ │ │ │ +
366 // overload and should be used with detected_or or some other utility that places the
│ │ │ │ +
367 // instantiation in SFINAE context.
│ │ │ │ +
368 //
│ │ │ │ +
369 // this is placed directly in namespace Dune to avoid any weird surprises
│ │ │ │ +
370
│ │ │ │ +
371 template<typename... T>
│ │ │ │ +
372 using LookupReferenceElement = decltype(referenceElement(std::declval<T>()...));
│ │ │ │ +
373
│ │ │ │ +
374#endif // DOXYGEN
│ │ │ │ +
375
│ │ │ │ +
│ │ │ │ +
376 namespace Transitional {
│ │ │ │ +
377
│ │ │ │ +
378#ifndef DOXYGEN
│ │ │ │ +
379
│ │ │ │ +
380 // this abomination checks whether the template signature matches the special case
│ │ │ │ +
381 // ReferenceElement<number_type,Dune::Dim<int>> and otherwise defers the type lookup
│ │ │ │ +
382 // to a decltype on a call to referenceElement(std::declval<T>())
│ │ │ │ +
383
│ │ │ │ +
384 template<typename... T>
│ │ │ │ +
385 using ReferenceElement = Std::detected_or_t<
│ │ │ │ +
386 Std::detected_t<LookupReferenceElement,T...>,
│ │ │ │ +
387 Impl::DefaultReferenceElement,
│ │ │ │ +
388 T...
│ │ │ │ +
389 >;
│ │ │ │ +
390
│ │ │ │ +
391#else // DOXYGEN
│ │ │ │ +
392
│ │ │ │ +
394
│ │ │ │ +
416 template<typename... T>
│ │ │ │ +
417 using ReferenceElement = unspecified-type;
│ │ │ │ +
418
│ │ │ │ +
419#endif //DOXYGEN
│ │ │ │ +
420
│ │ │ │ +
421 }
│ │ │ │ +
│ │ │ │ +
422
│ │ │ │ +
423#ifndef DOXYGEN
│ │ │ │ +
424
│ │ │ │ +
425 namespace Impl {
│ │ │ │ +
426
│ │ │ │ +
427 // helpers for triggering a deprecation warning for occurrences of the old
│ │ │ │ +
428 // ReferenceElement syntax (Dune::ReferenceElement<T,int>)
│ │ │ │ +
429
│ │ │ │ +
430 // this looks a little weird, encoding the type in the return type of a nested function,
│ │ │ │ +
431 // but it was the only reliable way to trigger the warning iff the compiler encounters
│ │ │ │ +
432 // an invalid use. Other solutions either miss some (or all) uses or trigger false alarms.
│ │ │ │ +
433
│ │ │ │ +
434 template<typename T>
│ │ │ │ +
435 struct ValidReferenceElementTypeSignature
│ │ │ │ +
436 {
│ │ │ │ +
437 Transitional::ReferenceElement<T> check();
│ │ │ │ +
438 };
│ │ │ │ +
439
│ │ │ │ +
440 template<typename T>
│ │ │ │ +
441 struct DeprecatedReferenceElementTypeSignature
│ │ │ │ +
442 {
│ │ │ │ +
443 [[deprecated("Dune::ReferenceElement<T,int> is deprecated, please use Dune::ReferenceElement<Geometry> (if you have a geometry), Dune::ReferenceElements<T,int>::ReferenceElement or Dune::Transitional::ReferenceElement<T,Dune::Dim<int>> instead. After Dune 2.6, you will be able to use Dune::ReferenceElement<T,Dune::Dim<int>>.")]] T check();
│ │ │ │ +
444 };
│ │ │ │ +
445
│ │ │ │ +
446 } // namespace Impl
│ │ │ │ +
447
│ │ │ │ +
448 // This just makes sure the user doesn't use invalid syntax (by checking against the -1 default for
│ │ │ │ +
449 // the dimension, and then either hands back the old-style type along with a deprecation warning or
│ │ │ │ +
450 // forwards to the transitional version
│ │ │ │ +
451 template<typename T, int dim = -1>
│ │ │ │ +
452 using ReferenceElement = decltype(
│ │ │ │ +
453 std::declval<
│ │ │ │ +
454 typename std::conditional<
│ │ │ │ +
455 dim == -1,
│ │ │ │ +
456 Impl::ValidReferenceElementTypeSignature<T>,
│ │ │ │ +
457 Impl::DeprecatedReferenceElementTypeSignature<Geo::DeprecatedReferenceElement<T,dim>>
│ │ │ │ +
458 >::type
│ │ │ │ +
459 >().check());
│ │ │ │ +
460
│ │ │ │ +
461#else // DOXYGEN
│ │ │ │ +
462
│ │ │ │ +
464
│ │ │ │ +
496 template<typename T, int dim>
│ │ │ │ +
497 using ReferenceElement = unspecified-type;
│ │ │ │ +
498
│ │ │ │ +
499#endif // DOXYGEN
│ │ │ │ +
500
│ │ │ │ +
501
│ │ │ │ +
502
│ │ │ │ +
503} // namespace Dune
│ │ │ │ +
504
│ │ │ │ +
505#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
│ │ │ │ +
unspecified-type ReferenceElement
Returns the type of reference element for the argument type T.
Definition referenceelements.hh:497
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ │ -
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:241
│ │ │ │ -
ReferenceElement()
Constructs an empty reference element.
Definition referenceelement.hh:271
│ │ │ │ -
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition referenceelement.hh:292
│ │ │ │ -
decltype(auto) type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:171
│ │ │ │ -
typename Implementation::Coordinate Coordinate
The coordinate type.
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:234
│ │ │ │ -
static constexpr int dimension
The dimension of the reference element.
Definition referenceelement.hh:87
│ │ │ │ -
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 Implementation::ctype ctype
The coordinate field type.
Definition referenceelement.hh:75
│ │ │ │ -
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ │ -
decltype(auto) type() const
obtain the type of this reference element
Definition referenceelement.hh:184
│ │ │ │ -
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition referenceelement.hh:280
│ │ │ │ -
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition referenceelement.hh:216
│ │ │ │ -
ctype CoordinateField
The coordinate field type.
Definition referenceelement.hh:78
│ │ │ │ -
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition referenceelement.hh:286
│ │ │ │ -
decltype(auto) position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:203
│ │ │ │ -
decltype(auto) integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition referenceelement.hh:258
│ │ │ │ -
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:298
│ │ │ │ -
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
│ │ │ │ -
ctype Volume
Type used for volume.
Definition referenceelement.hh:84
│ │ │ │ -
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
│ │ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:170
│ │ │ │ +
static Iterator begin()
Definition referenceelements.hh:215
│ │ │ │ +
Iterator iterator
Iterator over available reference elements.
Definition referenceelements.hh:194
│ │ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ +
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:210
│ │ │ │ +
static Iterator end()
Definition referenceelements.hh:220
│ │ │ │ +
ctype_ ctype
The coordinate field type of the contained reference elements.
Definition referenceelements.hh:173
│ │ │ │ +
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:198
│ │ │ │ +
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:204
│ │ │ │ +
typename Container::const_iterator Iterator
Iterator over available reference elements.
Definition referenceelements.hh:191
│ │ │ │ +
static constexpr int dimension
The dimension of the contained reference elements.
Definition referenceelements.hh:179
│ │ │ │ +
ctype CoordinateField
The coordinate field type of the contained reference elements.
Definition referenceelements.hh:176
│ │ │ │ +
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:126
│ │ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,294 +1,476 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -referenceelement.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 (C) DUNE 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_REFERENCEELEMENTS_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_REFERENCEELEMENTS_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 namespace Geo { │ │ │ │ │ -12 │ │ │ │ │ -13 namespace Impl { │ │ │ │ │ -14 │ │ │ │ │ -15 // forward declaration for friend declaration │ │ │ │ │ -16 template │ │ │ │ │ -17 class ReferenceElementContainer; │ │ │ │ │ -18 │ │ │ │ │ -19 } │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ 20 │ │ │ │ │ -21 // forward declaration for constructing default reference element type │ │ │ │ │ -22 template │ │ │ │ │ -23 class ReferenceElementImplementation; │ │ │ │ │ -24 │ │ │ │ │ -25 // forward declaration for backwards compatibility conversion │ │ │ │ │ -26 template │ │ │ │ │ -27 struct ReferenceElements; │ │ │ │ │ +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 │ │ │ │ │ -29 // ReferenceElement │ │ │ │ │ -30 // ---------------- │ │ │ │ │ +29 namespace Geo │ │ │ │ │ +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: │ │ │ │ │ +32#ifndef DOXYGEN │ │ │ │ │ +33 │ │ │ │ │ +34 │ │ │ │ │ +35 template │ │ │ │ │ +36 class DeprecatedReferenceElement │ │ │ │ │ +37 : public ReferenceElement> │ │ │ │ │ +38 { │ │ │ │ │ +39 │ │ │ │ │ +40 protected: │ │ │ │ │ +41 │ │ │ │ │ +42 DeprecatedReferenceElement() = default; │ │ │ │ │ +43 │ │ │ │ │ +44 public: │ │ │ │ │ +45 │ │ │ │ │ +46 DeprecatedReferenceElement(const DeprecatedReferenceElement&) = delete; │ │ │ │ │ +47 DeprecatedReferenceElement& operator=(const DeprecatedReferenceElement&) = │ │ │ │ │ +delete; │ │ │ │ │ +48 │ │ │ │ │ +49 DeprecatedReferenceElement(const ReferenceElementImplementation& │ │ │ │ │ +impl) │ │ │ │ │ +50 : ReferenceElement>(impl) │ │ │ │ │ +51 {} │ │ │ │ │ +52 │ │ │ │ │ +53 }; │ │ │ │ │ +54 │ │ │ │ │ 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 │ │ │ │ │ +56 template │ │ │ │ │ +57 class ConstructibleDeprecatedReferenceElement │ │ │ │ │ +58 : public DeprecatedReferenceElement │ │ │ │ │ +59 { │ │ │ │ │ +60 public: │ │ │ │ │ +61 ConstructibleDeprecatedReferenceElement() = default; │ │ │ │ │ +62 }; │ │ │ │ │ 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; │ │ │ │ │ +64 │ │ │ │ │ +65 namespace Impl │ │ │ │ │ +66 { │ │ │ │ │ +67 │ │ │ │ │ +68 // ReferenceElementContainer │ │ │ │ │ +69 // ------------------------- │ │ │ │ │ +70 │ │ │ │ │ +71 template< class ctype, int dim > │ │ │ │ │ +72 class ReferenceElementContainer │ │ │ │ │ +73 { │ │ │ │ │ +74 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0; │ │ │ │ │ +75 │ │ │ │ │ +76 using Implementation = ReferenceElementImplementation< ctype, dim >; │ │ │ │ │ +77 using ConstructibleDeprecatedReferenceElement = Dune::Geo:: │ │ │ │ │ +ConstructibleDeprecatedReferenceElement; │ │ │ │ │ +78 │ │ │ │ │ +79 public: │ │ │ │ │ +80 │ │ │ │ │ +81 using DeprecatedReferenceElement = Dune::Geo:: │ │ │ │ │ +DeprecatedReferenceElement; │ │ │ │ │ 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 │ │ │ │ │ +83 using ReferenceElement = _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_ _>; │ │ │ │ │ +84 using value_type = ReferenceElement; │ │ │ │ │ +85 using const_iterator = const value_type*; │ │ │ │ │ +86 │ │ │ │ │ +87 ReferenceElementContainer () │ │ │ │ │ +88 { │ │ │ │ │ +89 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId ) │ │ │ │ │ +90 { │ │ │ │ │ +91 implementations_[ topologyId ].initialize( topologyId ); │ │ │ │ │ +92 reference_elements_[ topologyId ].setImplementation( implementations_ │ │ │ │ │ +[ topologyId ] ); │ │ │ │ │ +93 } │ │ │ │ │ +94 } │ │ │ │ │ +95 │ │ │ │ │ +96 const ReferenceElement& operator() ( const GeometryType &type ) const │ │ │ │ │ +97 { │ │ │ │ │ +98 assert( type.dim() == dim ); │ │ │ │ │ +99 return reference_elements_[ type.id() ]; │ │ │ │ │ +100 } │ │ │ │ │ +101 │ │ │ │ │ +102 const ReferenceElement& simplex () const │ │ │ │ │ +103 { │ │ │ │ │ +104 return reference_elements_[ Dune::GeometryTypes::simplex(dim)._i_d() ]; │ │ │ │ │ +105 } │ │ │ │ │ +106 │ │ │ │ │ +107 const ReferenceElement& cube () const │ │ │ │ │ +108 { │ │ │ │ │ +109 return reference_elements_[ Dune::GeometryTypes::cube(dim)._i_d() ]; │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +112 const ReferenceElement& pyramid () const │ │ │ │ │ +113 { │ │ │ │ │ +114 return reference_elements_[ Dune::GeometryTypes::pyramid._i_d() ]; │ │ │ │ │ +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 } │ │ │ │ │ +117 const ReferenceElement& prism () const │ │ │ │ │ +118 { │ │ │ │ │ +119 return reference_elements_[ Dune::GeometryTypes::prism._i_d() ]; │ │ │ │ │ +120 } │ │ │ │ │ +121 │ │ │ │ │ +122 const_iterator begin () const │ │ │ │ │ +123 { │ │ │ │ │ +124 return reference_elements_.data(); │ │ │ │ │ +125 } │ │ │ │ │ +126 │ │ │ │ │ +127 const_iterator end () const │ │ │ │ │ +128 { │ │ │ │ │ +129 return reference_elements_.data() + numTopologies; │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +132 // here, we make sure to actually return a const reference to something │ │ │ │ │ +133 // that is guaranteed not to become invalid, as otherwise, we might run │ │ │ │ │ +134 // straight into debugging hell when a user binds the return value to a │ │ │ │ │ +135 // const ref and the temporary goes out of scope. │ │ │ │ │ +136 const DeprecatedReferenceElement& deprecated(const ReferenceElement& v) │ │ │ │ │ +const │ │ │ │ │ +137 { │ │ │ │ │ +138 return reference_elements_[v.impl().type(0,0).id()]; │ │ │ │ │ +139 } │ │ │ │ │ +140 │ │ │ │ │ +141 private: │ │ │ │ │ +142 │ │ │ │ │ +143 std::array implementations_; │ │ │ │ │ +144 std::array │ │ │ │ │ +reference_elements_; │ │ │ │ │ +145 │ │ │ │ │ +146 }; │ │ │ │ │ +147 │ │ │ │ │ +148 │ │ │ │ │ +149 } // namespace Impl │ │ │ │ │ +150 │ │ │ │ │ +151 │ │ │ │ │ +152#endif // DOXYGEN │ │ │ │ │ +153 │ │ │ │ │ +154 │ │ │ │ │ +155 // ReferenceElements │ │ │ │ │ +156 // ------------------------ │ │ │ │ │ 157 │ │ │ │ │ -158 │ │ │ │ │ -_1_7_1 decltype(auto) _t_y_p_e(int i, int c) const │ │ │ │ │ -172 { │ │ │ │ │ -173 return _impl->type(i,c); │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 │ │ │ │ │ -_1_8_4 decltype(auto) _t_y_p_e() const │ │ │ │ │ -185 { │ │ │ │ │ -186 return _impl->type(); │ │ │ │ │ -187 } │ │ │ │ │ -188 │ │ │ │ │ +168 template< class ctype_, int dim > │ │ │ │ │ +_1_6_9 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ │ +170 { │ │ │ │ │ +171 │ │ │ │ │ +_1_7_3 using _c_t_y_p_e = ctype_; │ │ │ │ │ +174 │ │ │ │ │ +_1_7_6 using _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d = _c_t_y_p_e; │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 static constexpr int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +180 │ │ │ │ │ +181 private: │ │ │ │ │ +182 │ │ │ │ │ +183 using Container = Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ │ +184 │ │ │ │ │ +185 public: │ │ │ │ │ +186 │ │ │ │ │ +_1_8_8 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = typename Container::ReferenceElement; │ │ │ │ │ 189 │ │ │ │ │ -_2_0_3 decltype(auto) _p_o_s_i_t_i_o_n(int i, int c) const │ │ │ │ │ -204 { │ │ │ │ │ -205 return _impl->position(i,c); │ │ │ │ │ -206 } │ │ │ │ │ -207 │ │ │ │ │ +_1_9_1 using _I_t_e_r_a_t_o_r = typename Container::const_iterator; │ │ │ │ │ +192 │ │ │ │ │ +_1_9_4 using _i_t_e_r_a_t_o_r = _I_t_e_r_a_t_o_r; │ │ │ │ │ +195 │ │ │ │ │ +197 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& │ │ │ │ │ +_1_9_8 _g_e_n_e_r_a_l ( const _G_e_o_m_e_t_r_y_T_y_p_e& type ) │ │ │ │ │ +199 { │ │ │ │ │ +200 return container() ( type ); │ │ │ │ │ +201 } │ │ │ │ │ +202 │ │ │ │ │ +_2_0_4 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 () │ │ │ │ │ +205 { │ │ │ │ │ +206 return container().simplex(); │ │ │ │ │ +207 } │ │ │ │ │ 208 │ │ │ │ │ -_2_1_6 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 │ │ │ │ │ -217 { │ │ │ │ │ -218 return _impl->checkInside(local); │ │ │ │ │ -219 } │ │ │ │ │ -220 │ │ │ │ │ -221 │ │ │ │ │ -233 template │ │ │ │ │ -_2_3_4 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 │ │ │ │ │ -235 { │ │ │ │ │ -236 return _impl->template geometry(i); │ │ │ │ │ -237 } │ │ │ │ │ -238 │ │ │ │ │ -239 │ │ │ │ │ -_2_4_1 _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d _v_o_l_u_m_e() const │ │ │ │ │ -242 { │ │ │ │ │ -243 return _impl->volume(); │ │ │ │ │ -244 } │ │ │ │ │ -245 │ │ │ │ │ +_2_1_0 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _c_u_b_e () │ │ │ │ │ +211 { │ │ │ │ │ +212 return container().cube(); │ │ │ │ │ +213 } │ │ │ │ │ +214 │ │ │ │ │ +_2_1_5 static _I_t_e_r_a_t_o_r _b_e_g_i_n () │ │ │ │ │ +216 { │ │ │ │ │ +217 return container().begin(); │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +_2_2_0 static _I_t_e_r_a_t_o_r _e_n_d () │ │ │ │ │ +221 { │ │ │ │ │ +222 return container().end(); │ │ │ │ │ +223 } │ │ │ │ │ +224 │ │ │ │ │ +225#ifndef DOXYGEN │ │ │ │ │ +226 static const typename Container::DeprecatedReferenceElement& │ │ │ │ │ +227 deprecated(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& v) │ │ │ │ │ +228 { │ │ │ │ │ +229 return container().deprecated(v); │ │ │ │ │ +230 } │ │ │ │ │ +231#endif // DOXYGEN │ │ │ │ │ +232 │ │ │ │ │ +233 private: │ │ │ │ │ +234 │ │ │ │ │ +235 DUNE_EXPORT static const Container& container () │ │ │ │ │ +236 { │ │ │ │ │ +237 static Container container; │ │ │ │ │ +238 return container; │ │ │ │ │ +239 } │ │ │ │ │ +240 }; │ │ │ │ │ +241 │ │ │ │ │ +242 } // namespace Geo │ │ │ │ │ +243 │ │ │ │ │ +245 using Geo::ReferenceElements; │ │ │ │ │ 246 │ │ │ │ │ -_2_5_8 decltype(auto) _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 │ │ │ │ │ -259 { │ │ │ │ │ -260 return _impl->integrationOuterNormal(face); │ │ │ │ │ -261 } │ │ │ │ │ -262 │ │ │ │ │ -263 │ │ │ │ │ -_2_7_1 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t() │ │ │ │ │ -272 : _impl(nullptr) │ │ │ │ │ -273 {} │ │ │ │ │ -274 │ │ │ │ │ -_2_8_0 const Implementation& _i_m_p_l() const │ │ │ │ │ -281 { │ │ │ │ │ -282 return *_impl; │ │ │ │ │ -283 } │ │ │ │ │ -284 │ │ │ │ │ -_2_8_6 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 │ │ │ │ │ -287 { │ │ │ │ │ -288 return _impl == r._impl; │ │ │ │ │ -289 } │ │ │ │ │ -290 │ │ │ │ │ -_2_9_2 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 │ │ │ │ │ -293 { │ │ │ │ │ -294 return not (*this == r); │ │ │ │ │ -295 } │ │ │ │ │ +247 │ │ │ │ │ +248#ifdef DOXYGEN │ │ │ │ │ +249 │ │ │ │ │ +251 │ │ │ │ │ +294 template │ │ │ │ │ +_2_9_5 unspecified-value-type _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(T&&... t); │ │ │ │ │ 296 │ │ │ │ │ -_2_9_8 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) │ │ │ │ │ -299 { │ │ │ │ │ -300 return reinterpret_cast(r._impl); │ │ │ │ │ -301 } │ │ │ │ │ -302 │ │ │ │ │ -303 private: │ │ │ │ │ -304 │ │ │ │ │ -305 // The implementation must be a friend to construct a wrapper around │ │ │ │ │ -itself. │ │ │ │ │ -306 friend Implementation; │ │ │ │ │ -307 │ │ │ │ │ -308 // The reference container is a friend to be able to call │ │ │ │ │ -setImplementation. │ │ │ │ │ -309 friend class Impl::ReferenceElementContainer<_c_t_y_p_e,_d_i_m_e_n_s_i_o_n>; │ │ │ │ │ -310 │ │ │ │ │ -311 // Constructor for wrapping an implementation reference (required │ │ │ │ │ -internally by the default implementation) │ │ │ │ │ -312 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const Implementation& _i_m_p_l) │ │ │ │ │ -313 : _impl(&_i_m_p_l) │ │ │ │ │ -314 {} │ │ │ │ │ -315 │ │ │ │ │ -316 void setImplementation(const Implementation& _i_m_p_l) │ │ │ │ │ -317 { │ │ │ │ │ -318 _impl = &_i_m_p_l; │ │ │ │ │ -319 } │ │ │ │ │ +297#endif │ │ │ │ │ +298 │ │ │ │ │ +299 │ │ │ │ │ +301 │ │ │ │ │ +314 template │ │ │ │ │ +_3_1_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_> = {}) │ │ │ │ │ +316 { │ │ │ │ │ +317 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); │ │ │ │ │ +318 } │ │ │ │ │ +319 │ │ │ │ │ 320 │ │ │ │ │ -321 const Implementation* _impl; │ │ │ │ │ 322 │ │ │ │ │ -323 }; │ │ │ │ │ -324 │ │ │ │ │ -325 } │ │ │ │ │ -326 │ │ │ │ │ -327} │ │ │ │ │ -328 │ │ │ │ │ -329 │ │ │ │ │ -330#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ │ +334 template>:: │ │ │ │ │ +value, int> = 0> │ │ │ │ │ +_3_3_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_>) │ │ │ │ │ +336 { │ │ │ │ │ +337 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); │ │ │ │ │ +338 } │ │ │ │ │ +339 │ │ │ │ │ +340 │ │ │ │ │ +341#ifndef DOXYGEN │ │ │ │ │ +342 │ │ │ │ │ +343 // helpers for the ReferenceElement<> meta function │ │ │ │ │ +344 │ │ │ │ │ +345 namespace Impl { │ │ │ │ │ +346 │ │ │ │ │ +347 // Evaluates to the correct reference element iff matches the │ │ │ │ │ +pattern > │ │ │ │ │ +348 // otherwise, it's ill-formed. Should be used with detected_or and friends. │ │ │ │ │ +349 │ │ │ │ │ +350 template │ │ │ │ │ +351 struct DefaultReferenceElementExtractor; │ │ │ │ │ +352 │ │ │ │ │ +353 template::value,int>::type │ │ │ │ │ +dim> │ │ │ │ │ +354 struct DefaultReferenceElementExtractor> │ │ │ │ │ +355 { │ │ │ │ │ +356 using type = typename _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_T_,_d_i_m_>_:_: │ │ │ │ │ +_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ │ +357 }; │ │ │ │ │ +358 │ │ │ │ │ +359 template │ │ │ │ │ +360 using DefaultReferenceElement = typename │ │ │ │ │ +DefaultReferenceElementExtractor::type; │ │ │ │ │ +361 │ │ │ │ │ +362 } │ │ │ │ │ +363 │ │ │ │ │ +364 // looks up the type of a reference element by trying to instantiate the │ │ │ │ │ +correct overload │ │ │ │ │ +365 // of referenceElement() for the given arguments. This will fail if there │ │ │ │ │ +is no valid │ │ │ │ │ +366 // overload and should be used with detected_or or some other utility that │ │ │ │ │ +places the │ │ │ │ │ +367 // instantiation in SFINAE context. │ │ │ │ │ +368 // │ │ │ │ │ +369 // this is placed directly in namespace Dune to avoid any weird surprises │ │ │ │ │ +370 │ │ │ │ │ +371 template │ │ │ │ │ +372 using LookupReferenceElement = decltype(_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(std::declval │ │ │ │ │ +()...)); │ │ │ │ │ +373 │ │ │ │ │ +374#endif // DOXYGEN │ │ │ │ │ +375 │ │ │ │ │ +_3_7_6 namespace Transitional { │ │ │ │ │ +377 │ │ │ │ │ +378#ifndef DOXYGEN │ │ │ │ │ +379 │ │ │ │ │ +380 // this abomination checks whether the template signature matches the │ │ │ │ │ +special case │ │ │ │ │ +381 // ReferenceElement> and otherwise defers the │ │ │ │ │ +type lookup │ │ │ │ │ +382 // to a decltype on a call to referenceElement(std::declval()) │ │ │ │ │ +383 │ │ │ │ │ +384 template │ │ │ │ │ +385 using ReferenceElement = Std::detected_or_t< │ │ │ │ │ +386 Std::detected_t, │ │ │ │ │ +387 Impl::DefaultReferenceElement, │ │ │ │ │ +388 T... │ │ │ │ │ +389 >; │ │ │ │ │ +390 │ │ │ │ │ +391#else // DOXYGEN │ │ │ │ │ +392 │ │ │ │ │ +394 │ │ │ │ │ +416 template │ │ │ │ │ +417 using ReferenceElement = unspecified-type; │ │ │ │ │ +418 │ │ │ │ │ +419#endif //DOXYGEN │ │ │ │ │ +420 │ │ │ │ │ +421 } │ │ │ │ │ +422 │ │ │ │ │ +423#ifndef DOXYGEN │ │ │ │ │ +424 │ │ │ │ │ +425 namespace Impl { │ │ │ │ │ +426 │ │ │ │ │ +427 // helpers for triggering a deprecation warning for occurrences of the old │ │ │ │ │ +428 // ReferenceElement syntax (Dune::ReferenceElement) │ │ │ │ │ +429 │ │ │ │ │ +430 // this looks a little weird, encoding the type in the return type of a │ │ │ │ │ +nested function, │ │ │ │ │ +431 // but it was the only reliable way to trigger the warning iff the compiler │ │ │ │ │ +encounters │ │ │ │ │ +432 // an invalid use. Other solutions either miss some (or all) uses or │ │ │ │ │ +trigger false alarms. │ │ │ │ │ +433 │ │ │ │ │ +434 template │ │ │ │ │ +435 struct ValidReferenceElementTypeSignature │ │ │ │ │ +436 { │ │ │ │ │ +437 Transitional::ReferenceElement check(); │ │ │ │ │ +438 }; │ │ │ │ │ +439 │ │ │ │ │ +440 template │ │ │ │ │ +441 struct DeprecatedReferenceElementTypeSignature │ │ │ │ │ +442 { │ │ │ │ │ +443 [[deprecated("Dune::ReferenceElement is deprecated, please use │ │ │ │ │ +Dune::ReferenceElement (if you have a geometry), Dune:: │ │ │ │ │ +ReferenceElements::ReferenceElement or Dune::Transitional:: │ │ │ │ │ +ReferenceElement> instead. After Dune 2.6, you will be able to │ │ │ │ │ +use Dune::ReferenceElement>.")]] T check(); │ │ │ │ │ +444 }; │ │ │ │ │ +445 │ │ │ │ │ +446 } // namespace Impl │ │ │ │ │ +447 │ │ │ │ │ +448 // This just makes sure the user doesn't use invalid syntax (by checking │ │ │ │ │ +against the -1 default for │ │ │ │ │ +449 // the dimension, and then either hands back the old-style type along with │ │ │ │ │ +a deprecation warning or │ │ │ │ │ +450 // forwards to the transitional version │ │ │ │ │ +451 template │ │ │ │ │ +452 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = decltype( │ │ │ │ │ +453 std::declval< │ │ │ │ │ +454 typename std::conditional< │ │ │ │ │ +455 dim == -1, │ │ │ │ │ +456 Impl::ValidReferenceElementTypeSignature, │ │ │ │ │ +457 Impl::DeprecatedReferenceElementTypeSignature> │ │ │ │ │ +458 >::type │ │ │ │ │ +459 >().check()); │ │ │ │ │ +460 │ │ │ │ │ +461#else // DOXYGEN │ │ │ │ │ +462 │ │ │ │ │ +464 │ │ │ │ │ +496 template │ │ │ │ │ +_4_9_7 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = unspecified-type; │ │ │ │ │ +498 │ │ │ │ │ +499#endif // DOXYGEN │ │ │ │ │ +500 │ │ │ │ │ +501 │ │ │ │ │ +502 │ │ │ │ │ +503} // namespace Dune │ │ │ │ │ +504 │ │ │ │ │ +505#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h │ │ │ │ │ +_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 │ │ │ │ │ _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_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_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ +unspecified-type ReferenceElement │ │ │ │ │ +Returns the type of reference element for the argument type T. │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:497 │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ _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_:_:_v_o_l_u_m_e │ │ │ │ │ -CoordinateField volume() const │ │ │ │ │ -obtain the volume 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_:_:_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:271 │ │ │ │ │ -_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:292 │ │ │ │ │ -_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 │ │ │ │ │ -decltype(auto) type(int i, int c) const │ │ │ │ │ -obtain the type of subentity (i,c) │ │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:171 │ │ │ │ │ -_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_o_r_d_i_n_a_t_e │ │ │ │ │ -typename Implementation::Coordinate Coordinate │ │ │ │ │ -The coordinate type. │ │ │ │ │ -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:234 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +_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:170 │ │ │ │ │ +_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:215 │ │ │ │ │ +_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_t_e_r_a_t_o_r │ │ │ │ │ +Iterator iterator │ │ │ │ │ +Iterator over available reference elements. │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.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_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:188 │ │ │ │ │ +_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:210 │ │ │ │ │ +_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:220 │ │ │ │ │ +_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 │ │ │ │ │ +ctype_ ctype │ │ │ │ │ +The coordinate field type of the contained reference elements. │ │ │ │ │ +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_:_:_g_e_n_e_r_a_l │ │ │ │ │ +static const ReferenceElement & general(const GeometryType &type) │ │ │ │ │ +get general reference elements │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:198 │ │ │ │ │ +_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:204 │ │ │ │ │ +_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_t_e_r_a_t_o_r │ │ │ │ │ +typename Container::const_iterator Iterator │ │ │ │ │ +Iterator over available reference elements. │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ static constexpr int dimension │ │ │ │ │ -The dimension of the reference element. │ │ │ │ │ -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_:_:_c_t_y_p_e │ │ │ │ │ -typename Implementation::ctype ctype │ │ │ │ │ -The coordinate field type. │ │ │ │ │ -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 │ │ │ │ │ -decltype(auto) type() const │ │ │ │ │ -obtain the type of this reference element │ │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:184 │ │ │ │ │ -_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:280 │ │ │ │ │ -_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:216 │ │ │ │ │ -_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_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ │ +The dimension of the contained reference elements. │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:179 │ │ │ │ │ +_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_o_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ │ ctype CoordinateField │ │ │ │ │ -The coordinate field type. │ │ │ │ │ -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:286 │ │ │ │ │ -_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 │ │ │ │ │ -decltype(auto) position(int i, int c) const │ │ │ │ │ -position of the barycenter of entity (i,c) │ │ │ │ │ -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 │ │ │ │ │ -decltype(auto) integrationOuterNormal(int face) const │ │ │ │ │ -obtain the integration outer normal of the reference element │ │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:258 │ │ │ │ │ -_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:298 │ │ │ │ │ -_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_:_:_V_o_l_u_m_e │ │ │ │ │ -ctype Volume │ │ │ │ │ -Type used for 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_:_:_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 │ │ │ │ │ +The coordinate field type of the contained reference elements. │ │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:176 │ │ │ │ │ +_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:126 │ │ │ │ │ +_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:377 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00239.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: generalvertexorder.hh File Reference │ │ │ │ +dune-geometry: type.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,49 +73,54 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ Functions
│ │ │ │ -
generalvertexorder.hh File Reference
│ │ │ │ +
type.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <iterator>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/iteratorfacades.hh>
│ │ │ │ -#include "type.hh"
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ +

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/keywords.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/common/unused.hh>
│ │ │ │ +#include <dune/geometry/deprecated_topology.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::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

template<class InIterator , class OutIterator >
void Dune::reduceOrder (const InIterator &inBegin, const InIterator &inEnd, OutIterator outIt)
 Algorithm to reduce vertex order information.
 
std::ostream & Dune::operator<< (std::ostream &s, const GeometryType &a)
 Prints the type to an output stream.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,35 +1,38 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ 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 │ │ │ │ │ +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 "_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> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_e_p_r_e_c_a_t_e_d___t_o_p_o_l_o_g_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_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_:_:_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 │ │ │ │ │ -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. │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ +********** 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.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00239_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: generalvertexorder.hh Source File │ │ │ │ +dune-geometry: type.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,187 +74,496 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
generalvertexorder.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 (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_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>
│ │ │ │ +
5#ifndef DUNE_GEOMETRY_TYPE_HH
│ │ │ │ +
6#define DUNE_GEOMETRY_TYPE_HH
│ │ │ │ +
7
│ │ │ │ +
12#include <cassert>
│ │ │ │ +
13#include <cstdint>
│ │ │ │
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); }
│ │ │ │ -
│ │ │ │ -
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 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.
│ │ │ │ +
15#include <string>
│ │ │ │ +
16#include <type_traits>
│ │ │ │ +
17
│ │ │ │ +
18#include <dune/common/exceptions.hh>
│ │ │ │ +
19#include <dune/common/keywords.hh>
│ │ │ │ +
20#include <dune/common/typetraits.hh>
│ │ │ │ +
21#include <dune/common/unused.hh>
│ │ │ │ +
22
│ │ │ │ +
23namespace Dune
│ │ │ │ +
24{
│ │ │ │ +
25
│ │ │ │ +
26 namespace Impl
│ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
29 enum TopologyConstruction { pyramidConstruction = 0, prismConstruction = 1 };
│ │ │ │ +
30
│ │ │ │ +
31 // Dynamic Topology Properties
│ │ │ │ +
32 // ---------------------------
│ │ │ │ +
33
│ │ │ │ +
42 inline static unsigned int numTopologies ( int dim ) noexcept
│ │ │ │ +
43 {
│ │ │ │ +
44 return (1u << dim);
│ │ │ │ +
45 }
│ │ │ │ +
46
│ │ │ │ +
58 inline bool static isPyramid ( unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ │ +
59 {
│ │ │ │ +
60 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ +
61 assert( (0 <= codim) && (codim < dim) );
│ │ │ │ +
62 return (((topologyId & ~1) & (1u << (dim-codim-1))) == 0);
│ │ │ │ +
63 }
│ │ │ │ +
64
│ │ │ │ +
76 inline static bool isPrism ( unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ │ +
77 {
│ │ │ │ +
78 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ +
79 assert( (0 <= codim) && (codim < dim) );
│ │ │ │ +
80 return (( (topologyId | 1) & (1u << (dim-codim-1))) != 0);
│ │ │ │ +
81 }
│ │ │ │ +
82
│ │ │ │ +
90 inline static unsigned int baseTopologyId ( unsigned int topologyId, int dim, int codim = 1 ) noexcept
│ │ │ │ +
91 {
│ │ │ │ +
92 assert( (dim >= 0) && (topologyId < numTopologies( dim )) );
│ │ │ │ +
93 assert( (0 <= codim) && (codim <= dim) );
│ │ │ │ +
94 return topologyId & ((1u << (dim-codim)) - 1);
│ │ │ │ +
95 }
│ │ │ │ +
96
│ │ │ │ +
97 } // namespace Impl
│ │ │ │ +
98
│ │ │ │ +
99// the Topology classes are deprecated and will be removed for the 2.8.
│ │ │ │ +
100// Temporarily a header 'deprecated_topology.hh' is provided which will be removed after the 2.9 release.
│ │ │ │ +
101#if __GNUC__ >= 7
│ │ │ │ +
102# pragma GCC diagnostic push
│ │ │ │ +
103# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ │ +
104#endif
│ │ │ │ + │ │ │ │ +
106#if __GNUC__ >= 7
│ │ │ │ +
107# pragma GCC diagnostic pop
│ │ │ │ +
108#endif
│ │ │ │ +
109
│ │ │ │ +
110 // GeometryType
│ │ │ │ +
111 // -------------
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
126 {
│ │ │ │ +
127 public:
│ │ │ │ +
128
│ │ │ │ +
│ │ │ │ +
131 enum
│ │ │ │ +
132 BasicType {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
138 none
│ │ │ │ +
139 };
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │ +
141 private:
│ │ │ │ +
142
│ │ │ │ +
144 unsigned char dim_;
│ │ │ │ +
145
│ │ │ │ +
147 bool none_;
│ │ │ │ +
148
│ │ │ │ +
150 unsigned int topologyId_;
│ │ │ │ +
151
│ │ │ │ +
152 // Internal type used for the Id. The exact nature of this type is kept
│ │ │ │ +
153 // as an implementation detail on purpose. We use a scoped enum here because scoped enums
│ │ │ │ +
154 // can be used as template parameters, but are not implicitly converted to other integral
│ │ │ │ +
155 // types by the compiler. That way, we avoid unfortunate implicit conversion chains, e.g.
│ │ │ │ +
156 // people trying to work with GlobalGeometryTypeIndex, but forgetting to actually call
│ │ │ │ +
157 // GlobalGeometryTypeIndex::index(gt) and just using gt directly.
│ │ │ │ +
158 enum class IdType : std::uint64_t
│ │ │ │ +
159 {};
│ │ │ │ +
160
│ │ │ │ +
161 public:
│ │ │ │ +
162
│ │ │ │ +
193 using Id = IdType;
│ │ │ │ +
194
│ │ │ │ +
│ │ │ │ +
202 constexpr operator Id() const
│ │ │ │ +
203 {
│ │ │ │ +
204 // recreate the exact storage layout that this class is using, making conversion
│ │ │ │ +
205 // extremely cheap
│ │ │ │ +
206 std::uint64_t id = dim_ | (std::uint64_t(none_) << 8) | (std::uint64_t(topologyId_) << 32);
│ │ │ │ +
207 return static_cast<Id>(id);
│ │ │ │ +
208 }
│ │ │ │ +
│ │ │ │ +
209
│ │ │ │ +
│ │ │ │ +
222 constexpr Id toId() const
│ │ │ │ +
223 {
│ │ │ │ +
224 return static_cast<Id>(*this);
│ │ │ │ +
225 }
│ │ │ │ +
│ │ │ │ +
226
│ │ │ │ +
│ │ │ │ +
234 constexpr GeometryType(Id id)
│ │ │ │ +
235 : dim_(static_cast<std::uint64_t>(id) & 0xFF)
│ │ │ │ +
236 , none_(static_cast<std::uint64_t>(id) & 0x100)
│ │ │ │ +
237 , topologyId_(static_cast<std::uint64_t>(id) >> 32)
│ │ │ │ +
238 {}
│ │ │ │ +
│ │ │ │ +
239
│ │ │ │ +
242
│ │ │ │ +
│ │ │ │ +
244 constexpr GeometryType ()
│ │ │ │ +
245 : dim_(0), none_(true), topologyId_(0)
│ │ │ │ +
246 {}
│ │ │ │ +
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ +
254 constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool isNone)
│ │ │ │ +
255 : dim_(dim), none_(isNone), topologyId_(topologyId)
│ │ │ │ +
256 {}
│ │ │ │ +
│ │ │ │ +
257
│ │ │ │ +
│ │ │ │ +
263 constexpr GeometryType(unsigned int topologyId, unsigned int dim)
│ │ │ │ +
264 : dim_(dim), none_(false), topologyId_(topologyId)
│ │ │ │ +
265 {}
│ │ │ │ +
│ │ │ │ +
266
│ │ │ │ +
277 template<class TopologyType,
│ │ │ │ +
278 class = std::void_t<decltype(TopologyType::dimension), decltype(TopologyType::id)>>
│ │ │ │ +
│ │ │ │ +
279 explicit GeometryType(TopologyType t)
│ │ │ │ +
280 : dim_(TopologyType::dimension), none_(false), topologyId_(TopologyType::id)
│ │ │ │ +
281 {
│ │ │ │ +
282 DUNE_UNUSED_PARAMETER(t);
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
284
│ │ │ │ +
│ │ │ │ +
291 constexpr bool isVertex() const {
│ │ │ │ +
292 return dim_==0;
│ │ │ │ +
293 }
│ │ │ │ +
│ │ │ │ +
294
│ │ │ │ +
│ │ │ │ +
296 constexpr bool isLine() const {
│ │ │ │ +
297 return dim_==1;
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299
│ │ │ │ +
│ │ │ │ +
301 constexpr bool isTriangle() const {
│ │ │ │ +
302 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0001;
│ │ │ │ +
303 }
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
│ │ │ │ +
306 constexpr bool isQuadrilateral() const {
│ │ │ │ +
307 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0011;
│ │ │ │ +
308 }
│ │ │ │ +
│ │ │ │ +
309
│ │ │ │ +
│ │ │ │ +
311 constexpr bool isTetrahedron() const {
│ │ │ │ +
312 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0001;
│ │ │ │ +
313 }
│ │ │ │ +
│ │ │ │ +
314
│ │ │ │ +
│ │ │ │ +
316 constexpr bool isPyramid() const {
│ │ │ │ +
317 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0011;
│ │ │ │ +
318 }
│ │ │ │ +
│ │ │ │ +
319
│ │ │ │ +
│ │ │ │ +
321 constexpr bool isPrism() const {
│ │ │ │ +
322 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0101;
│ │ │ │ +
323 }
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
│ │ │ │ +
326 constexpr bool isHexahedron() const {
│ │ │ │ +
327 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0111;
│ │ │ │ +
328 }
│ │ │ │ +
│ │ │ │ +
329
│ │ │ │ +
│ │ │ │ +
331 constexpr bool isSimplex() const {
│ │ │ │ +
332 return ! none_ && (topologyId_ | 1) == 1;
│ │ │ │ +
333 }
│ │ │ │ +
│ │ │ │ +
334
│ │ │ │ +
│ │ │ │ +
336 constexpr bool isCube() const {
│ │ │ │ +
337 return ! none_ && ((topologyId_ ^ ((1 << dim_)-1)) >> 1 == 0);
│ │ │ │ +
338 }
│ │ │ │ +
│ │ │ │ +
339
│ │ │ │ +
│ │ │ │ +
341 constexpr bool isConical() const {
│ │ │ │ +
342 return ! none_ && (((topologyId_ & ~1) & (1u << (dim_-1))) == 0);
│ │ │ │ +
343 }
│ │ │ │ +
│ │ │ │ +
344
│ │ │ │ +
│ │ │ │ +
349 constexpr bool isConical(const int& step) const {
│ │ │ │ +
350 return ! none_ && (((topologyId_ & ~1) & (1u << step)) == 0);
│ │ │ │ +
351 }
│ │ │ │ +
│ │ │ │ +
352
│ │ │ │ +
│ │ │ │ +
354 constexpr bool isPrismatic() const {
│ │ │ │ +
355 return ! none_ && (( (topologyId_ | 1) & (1u << (dim_-1))) != 0);
│ │ │ │ +
356 }
│ │ │ │ +
│ │ │ │ +
357
│ │ │ │ +
│ │ │ │ +
362 constexpr bool isPrismatic(const int& step) const {
│ │ │ │ +
363 return ! none_ && (( (topologyId_ | 1) & (1u << step)) != 0);
│ │ │ │ +
364 }
│ │ │ │ +
│ │ │ │ +
365
│ │ │ │ +
│ │ │ │ +
367 constexpr bool isNone() const {
│ │ │ │ +
368 return none_;
│ │ │ │ +
369 }
│ │ │ │ +
│ │ │ │ +
370
│ │ │ │ +
│ │ │ │ +
372 constexpr unsigned int dim() const {
│ │ │ │ +
373 return dim_;
│ │ │ │ +
374 }
│ │ │ │ +
│ │ │ │ +
375
│ │ │ │ +
│ │ │ │ +
377 constexpr unsigned int id() const {
│ │ │ │ +
378 return topologyId_;
│ │ │ │ +
379 }
│ │ │ │ +
│ │ │ │ +
380
│ │ │ │ +
│ │ │ │ +
388 constexpr bool operator==(const GeometryType& other) const {
│ │ │ │ +
389 return ( ( none_ == other.none_ )
│ │ │ │ +
390 && ( ( none_ == true )
│ │ │ │ +
391 || ( ( dim_ == other.dim_ )
│ │ │ │ +
392 && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) )
│ │ │ │ +
393 )
│ │ │ │ +
394 )
│ │ │ │ +
395 );
│ │ │ │ +
396 }
│ │ │ │ +
│ │ │ │ +
397
│ │ │ │ +
│ │ │ │ +
399 constexpr bool operator!=(const GeometryType& other) const {
│ │ │ │ +
400 return ! ((*this)==other);
│ │ │ │ +
401 }
│ │ │ │ +
│ │ │ │ +
402
│ │ │ │ +
│ │ │ │ +
404 constexpr bool operator < (const GeometryType& other) const {
│ │ │ │ +
405 return ( ( none_ < other.none_ )
│ │ │ │ +
406 || ( !( other.none_ < none_ )
│ │ │ │ +
407 && ( ( dim_ < other.dim_ )
│ │ │ │ +
408 || ( (other.dim_ == dim_)
│ │ │ │ +
409 && ((topologyId_ >> 1) < (other.topologyId_ >> 1) )
│ │ │ │ +
410 )
│ │ │ │ +
411 )
│ │ │ │ +
412 )
│ │ │ │ +
413 );
│ │ │ │ +
414 }
│ │ │ │ +
│ │ │ │ +
415
│ │ │ │ +
418 };
│ │ │ │ +
│ │ │ │ +
419
│ │ │ │ +
│ │ │ │ +
421 inline std::ostream& operator<< (std::ostream& s, const GeometryType& a)
│ │ │ │ +
422 {
│ │ │ │ +
423 if (a.isSimplex())
│ │ │ │ +
424 {
│ │ │ │ +
425 s << "(simplex, " << a.dim() << ")";
│ │ │ │ +
426 return s;
│ │ │ │ +
427 }
│ │ │ │ +
428 if (a.isCube())
│ │ │ │ +
429 {
│ │ │ │ +
430 s << "(cube, " << a.dim() << ")";
│ │ │ │ +
431 return s;
│ │ │ │ +
432 }
│ │ │ │ +
433 if (a.isPyramid())
│ │ │ │ +
434 {
│ │ │ │ +
435 s << "(pyramid, 3)";
│ │ │ │ +
436 return s;
│ │ │ │ +
437 }
│ │ │ │ +
438 if (a.isPrism())
│ │ │ │ +
439 {
│ │ │ │ +
440 s << "(prism, 3)";
│ │ │ │ +
441 return s;
│ │ │ │ +
442 }
│ │ │ │ +
443 if (a.isNone())
│ │ │ │ +
444 {
│ │ │ │ +
445 s << "(none, " << a.dim() << ")";
│ │ │ │ +
446 return s;
│ │ │ │ +
447 }
│ │ │ │ +
448 s << "(other [" << a.id() << "], " << a.dim() << ")";
│ │ │ │ +
449 return s;
│ │ │ │ +
450 }
│ │ │ │ +
│ │ │ │ +
451
│ │ │ │ +
452
│ │ │ │ +
454
│ │ │ │ +
│ │ │ │ +
458 namespace GeometryTypes {
│ │ │ │ +
459
│ │ │ │ +
461
│ │ │ │ +
464 inline constexpr GeometryType simplex(unsigned int dim)
│ │ │ │ +
465 {
│ │ │ │ +
466 return GeometryType(0,dim,false);
│ │ │ │ +
467 }
│ │ │ │ +
468
│ │ │ │ +
470
│ │ │ │ +
473 inline constexpr GeometryType cube(unsigned int dim)
│ │ │ │ +
474 {
│ │ │ │ +
475 return GeometryType(((dim>1) ? ((1 << dim) - 1) : 0),dim,false);
│ │ │ │ +
476 }
│ │ │ │ +
477
│ │ │ │ +
479
│ │ │ │ +
482 inline constexpr GeometryType none(unsigned int dim)
│ │ │ │ +
483 {
│ │ │ │ +
484 return GeometryType(0,dim,true);
│ │ │ │ +
485 }
│ │ │ │ +
486
│ │ │ │ +
488 inline constexpr GeometryType conicalExtension(const GeometryType& gt)
│ │ │ │ +
489 {
│ │ │ │ +
490 return GeometryType(gt.id(), gt.dim()+1, gt.isNone());
│ │ │ │ +
491 }
│ │ │ │ +
492
│ │ │ │ +
494 inline constexpr GeometryType prismaticExtension(const GeometryType& gt)
│ │ │ │ +
495 {
│ │ │ │ +
496 return GeometryType(gt.id() | ((1 << gt.dim())), gt.dim()+1, gt.isNone());
│ │ │ │ +
497 }
│ │ │ │ +
498
│ │ │ │ +
499#ifndef __cpp_inline_variables
│ │ │ │ +
500 namespace {
│ │ │ │ +
501#endif
│ │ │ │ +
502
│ │ │ │ +
504
│ │ │ │ +
507 DUNE_INLINE_VARIABLE constexpr GeometryType vertex = GeometryType(0,0,false);
│ │ │ │ +
508
│ │ │ │ +
510
│ │ │ │ +
513 DUNE_INLINE_VARIABLE constexpr GeometryType line = GeometryType(0,1,false);
│ │ │ │ +
514
│ │ │ │ +
516
│ │ │ │ +
519 DUNE_INLINE_VARIABLE constexpr GeometryType triangle = simplex(2);
│ │ │ │ +
520
│ │ │ │ +
522
│ │ │ │ +
525 DUNE_INLINE_VARIABLE constexpr GeometryType quadrilateral = cube(2);
│ │ │ │ +
526
│ │ │ │ +
528
│ │ │ │ +
531 DUNE_INLINE_VARIABLE constexpr GeometryType tetrahedron = simplex(3);
│ │ │ │ +
532
│ │ │ │ +
534
│ │ │ │ +
537 DUNE_INLINE_VARIABLE constexpr GeometryType pyramid = GeometryType(0b0011,3,false);
│ │ │ │ +
538
│ │ │ │ +
540
│ │ │ │ +
543 DUNE_INLINE_VARIABLE constexpr GeometryType prism = GeometryType(0b0101,3,false);
│ │ │ │ +
544
│ │ │ │ +
546
│ │ │ │ +
549 DUNE_INLINE_VARIABLE constexpr GeometryType hexahedron = cube(3);
│ │ │ │ +
550
│ │ │ │ +
551#ifndef __cpp_inline_variables
│ │ │ │ +
552 }
│ │ │ │ +
553#endif
│ │ │ │ +
554
│ │ │ │ +
555 }
│ │ │ │ +
│ │ │ │ +
556
│ │ │ │ +
557 namespace Impl
│ │ │ │ +
558 {
│ │ │ │ +
559
│ │ │ │ +
561 inline constexpr GeometryType getBase(const GeometryType& gt) {
│ │ │ │ +
562 return GeometryType(gt.id() & ((1 << (gt.dim()-1))-1), gt.dim()-1, gt.isNone());
│ │ │ │ +
563 }
│ │ │ │ +
564
│ │ │ │ +
565
│ │ │ │ +
566 // IfGeometryType
│ │ │ │ +
567 // ----------
│ │ │ │ +
568
│ │ │ │ +
569 template< template< GeometryType::Id > class Operation, int dim, GeometryType::Id geometryId = GeometryTypes::vertex >
│ │ │ │ +
570 struct IfGeometryType
│ │ │ │ +
571 {
│ │ │ │ +
572 static constexpr GeometryType geometry = geometryId;
│ │ │ │ +
573 template< class... Args >
│ │ │ │ +
574 static auto apply ( GeometryType gt, Args &&... args )
│ │ │ │ +
575 {
│ │ │ │ +
576 GeometryType lowerGeometry(gt.id() >>1 , gt.dim()-1, gt.isNone());
│ │ │ │ +
577
│ │ │ │ +
578 if( gt.id() & 1 )
│ │ │ │ +
579 return IfGeometryType< Operation, dim-1, GeometryTypes::prismaticExtension(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... );
│ │ │ │ +
580 else
│ │ │ │ +
581 return IfGeometryType< Operation, dim-1, GeometryTypes::conicalExtension(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... );
│ │ │ │ +
582 }
│ │ │ │ +
583 };
│ │ │ │ +
584
│ │ │ │ +
585 template< template< GeometryType::Id > class Operation, GeometryType::Id geometryId >
│ │ │ │ +
586 struct IfGeometryType< Operation, 0, geometryId>
│ │ │ │ +
587 {
│ │ │ │ +
588 template< class... Args >
│ │ │ │ +
589 static auto apply ([[maybe_unused]] GeometryType gt, Args &&... args )
│ │ │ │ +
590 {
│ │ │ │ +
591 return Operation< geometryId >::apply( std::forward< Args >( args )... );
│ │ │ │ +
592 }
│ │ │ │ +
593 };
│ │ │ │ +
594 } // namespace Impl
│ │ │ │ +
595} // namespace Dune
│ │ │ │ +
596
│ │ │ │ +
597#endif // DUNE_GEOMETRY_TYPE_HH
│ │ │ │ + │ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
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:170
│ │ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:188
│ │ │ │ -
Class providing information on the ordering of vertices.
Definition generalvertexorder.hh:67
│ │ │ │ -
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
│ │ │ │ +
std::ostream & operator<<(std::ostream &s, const GeometryType &a)
Prints the type to an output stream.
Definition type.hh:421
│ │ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
│ │ │ │ +
constexpr GeometryType(unsigned int topologyId, unsigned int dim)
Constructor, using the topologyId (integer) and the dimension.
Definition type.hh:263
│ │ │ │ +
constexpr bool operator<(const GeometryType &other) const
less-than operation for use with maps
Definition type.hh:404
│ │ │ │ +
constexpr bool operator!=(const GeometryType &other) const
Check for inequality.
Definition type.hh:399
│ │ │ │ +
constexpr bool isPyramid() const
Return true if entity is a pyramid.
Definition type.hh:316
│ │ │ │ +
constexpr bool isTetrahedron() const
Return true if entity is a tetrahedron.
Definition type.hh:311
│ │ │ │ +
constexpr bool isPrism() const
Return true if entity is a prism.
Definition type.hh:321
│ │ │ │ +
constexpr bool isVertex() const
Return true if entity is a vertex.
Definition type.hh:291
│ │ │ │ +
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:388
│ │ │ │ +
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:222
│ │ │ │ +
constexpr bool isConical(const int &step) const
Return true if entity was constructed with a conical product in the chosen step.
Definition type.hh:349
│ │ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:372
│ │ │ │ +
constexpr bool isPrismatic(const int &step) const
Return true if entity was constructed with a prismatic product in the chosen step.
Definition type.hh:362
│ │ │ │ +
constexpr bool isTriangle() const
Return true if entity is a triangle.
Definition type.hh:301
│ │ │ │ +
GeometryType(TopologyType t)
Constructor from static TopologyType class.
Definition type.hh:279
│ │ │ │ +
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:254
│ │ │ │ +
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition type.hh:132
│ │ │ │ +
@ cube
Cube element in any nonnegative dimension.
Definition type.hh:134
│ │ │ │ +
@ simplex
Simplicial element in any nonnegative dimension.
Definition type.hh:133
│ │ │ │ +
@ pyramid
Four sided pyramid in three dimensions.
Definition type.hh:135
│ │ │ │ +
@ extended
Other, more general topology, representable as topologyId.
Definition type.hh:137
│ │ │ │ +
@ none
Even more general topology, cannot be specified by a topologyId. Two GeometryTypes with 'none' type a...
Definition type.hh:138
│ │ │ │ +
@ prism
Prism element in three dimensions.
Definition type.hh:136
│ │ │ │ +
constexpr GeometryType(Id id)
Reconstruct a Geometry type from a GeometryType::Id.
Definition type.hh:234
│ │ │ │ +
constexpr bool isCube() const
Return true if entity is a cube of any dimension.
Definition type.hh:336
│ │ │ │ +
constexpr GeometryType()
Default constructor, not initializing anything.
Definition type.hh:244
│ │ │ │ +
constexpr bool isConical() const
Return true if entity was constructed with a conical product in the last step.
Definition type.hh:341
│ │ │ │ +
constexpr bool isLine() const
Return true if entity is a line segment.
Definition type.hh:296
│ │ │ │ +
constexpr bool isQuadrilateral() const
Return true if entity is a quadrilateral.
Definition type.hh:306
│ │ │ │ +
constexpr bool isPrismatic() const
Return true if entity was constructed with a prismatic product in the last step.
Definition type.hh:354
│ │ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:377
│ │ │ │ +
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:367
│ │ │ │ +
constexpr bool isHexahedron() const
Return true if entity is a hexahedron.
Definition type.hh:326
│ │ │ │ +
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition type.hh:331
│ │ │ │ +
IdType Id
An integral id representing a GeometryType.
Definition type.hh:193
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,216 +1,564 @@ │ │ │ │ │ dune-geometry 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ │ -generalvertexorder.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 (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ │ -7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +5#ifndef DUNE_GEOMETRY_TYPE_HH │ │ │ │ │ +6#define DUNE_GEOMETRY_TYPE_HH │ │ │ │ │ +7 │ │ │ │ │ +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); } │ │ │ │ │ -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::_i_t_e_r_a_t_o_r : │ │ │ │ │ -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 _i_t_e_r_a_t_o_r(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 _i_t_e_r_a_t_o_r &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 _i_t_e_r_a_t_o_r &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 │ │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ +22 │ │ │ │ │ +23namespace _D_u_n_e │ │ │ │ │ +24{ │ │ │ │ │ +25 │ │ │ │ │ +26 namespace Impl │ │ │ │ │ +27 { │ │ │ │ │ +28 │ │ │ │ │ +29 enum TopologyConstruction { pyramidConstruction = 0, prismConstruction = 1 │ │ │ │ │ +}; │ │ │ │ │ +30 │ │ │ │ │ +31 // Dynamic Topology Properties │ │ │ │ │ +32 // --------------------------- │ │ │ │ │ +33 │ │ │ │ │ +42 inline static unsigned int numTopologies ( int dim ) noexcept │ │ │ │ │ +43 { │ │ │ │ │ +44 return (1u << dim); │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +58 inline bool static isPyramid ( unsigned int topologyId, int dim, int codim = │ │ │ │ │ +0 ) noexcept │ │ │ │ │ +59 { │ │ │ │ │ +60 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ +61 assert( (0 <= codim) && (codim < dim) ); │ │ │ │ │ +62 return (((topologyId & ~1) & (1u << (dim-codim-1))) == 0); │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +76 inline static bool isPrism ( unsigned int topologyId, int dim, int codim = 0 │ │ │ │ │ +) noexcept │ │ │ │ │ +77 { │ │ │ │ │ +78 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ +79 assert( (0 <= codim) && (codim < dim) ); │ │ │ │ │ +80 return (( (topologyId | 1) & (1u << (dim-codim-1))) != 0); │ │ │ │ │ +81 } │ │ │ │ │ +82 │ │ │ │ │ +90 inline static unsigned int baseTopologyId ( unsigned int topologyId, int │ │ │ │ │ +dim, int codim = 1 ) noexcept │ │ │ │ │ +91 { │ │ │ │ │ +92 assert( (dim >= 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ │ +93 assert( (0 <= codim) && (codim <= dim) ); │ │ │ │ │ +94 return topologyId & ((1u << (dim-codim)) - 1); │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97 } // namespace Impl │ │ │ │ │ +98 │ │ │ │ │ +99// the Topology classes are deprecated and will be removed for the 2.8. │ │ │ │ │ +100// Temporarily a header 'deprecated_topology.hh' is provided which will be │ │ │ │ │ +removed after the 2.9 release. │ │ │ │ │ +101#if __GNUC__ >= 7 │ │ │ │ │ +102# pragma GCC diagnostic push │ │ │ │ │ +103# pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ │ +104#endif │ │ │ │ │ +105#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_e_p_r_e_c_a_t_e_d___t_o_p_o_l_o_g_y_._h_h> │ │ │ │ │ +106#if __GNUC__ >= 7 │ │ │ │ │ +107# pragma GCC diagnostic pop │ │ │ │ │ +108#endif │ │ │ │ │ +109 │ │ │ │ │ +110 // GeometryType │ │ │ │ │ +111 // ------------- │ │ │ │ │ +112 │ │ │ │ │ +_1_2_5 class _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +126 { │ │ │ │ │ +127 public: │ │ │ │ │ +128 │ │ │ │ │ +_1_3_1 enum │ │ │ │ │ +132 _B_a_s_i_c_T_y_p_e { │ │ │ │ │ +_1_3_3 _s_i_m_p_l_e_x, │ │ │ │ │ +_1_3_4 _c_u_b_e, │ │ │ │ │ +_1_3_5 _p_y_r_a_m_i_d, │ │ │ │ │ +_1_3_6 _p_r_i_s_m, │ │ │ │ │ +_1_3_7 _e_x_t_e_n_d_e_d, │ │ │ │ │ +138 _n_o_n_e │ │ │ │ │ +_1_3_9 }; │ │ │ │ │ +140 │ │ │ │ │ +141 private: │ │ │ │ │ +142 │ │ │ │ │ +144 unsigned char dim_; │ │ │ │ │ +145 │ │ │ │ │ +147 bool none_; │ │ │ │ │ +148 │ │ │ │ │ +150 unsigned int topologyId_; │ │ │ │ │ +151 │ │ │ │ │ +152 // Internal type used for the Id. The exact nature of this type is kept │ │ │ │ │ +153 // as an implementation detail on purpose. We use a scoped enum here │ │ │ │ │ +because scoped enums │ │ │ │ │ +154 // can be used as template parameters, but are not implicitly converted to │ │ │ │ │ +other integral │ │ │ │ │ +155 // types by the compiler. That way, we avoid unfortunate implicit │ │ │ │ │ +conversion chains, e.g. │ │ │ │ │ +156 // people trying to work with GlobalGeometryTypeIndex, but forgetting to │ │ │ │ │ +actually call │ │ │ │ │ +157 // GlobalGeometryTypeIndex::index(gt) and just using gt directly. │ │ │ │ │ +158 enum class IdType : std::uint64_t │ │ │ │ │ +159 {}; │ │ │ │ │ +160 │ │ │ │ │ +161 public: │ │ │ │ │ +162 │ │ │ │ │ +_1_9_3 using Id = IdType; │ │ │ │ │ +194 │ │ │ │ │ +_2_0_2 constexpr operator _I_d() const │ │ │ │ │ +203 { │ │ │ │ │ +204 // recreate the exact storage layout that this class is using, making │ │ │ │ │ +conversion │ │ │ │ │ +205 // extremely cheap │ │ │ │ │ +206 std::uint64_t id = dim_ | (std::uint64_t(none_) << 8) | (std::uint64_t │ │ │ │ │ +(topologyId_) << 32); │ │ │ │ │ +207 return static_cast(_i_d); │ │ │ │ │ +208 } │ │ │ │ │ +209 │ │ │ │ │ +_2_2_2 constexpr Id _t_o_I_d() const │ │ │ │ │ +223 { │ │ │ │ │ +224 return static_cast(*this); │ │ │ │ │ +225 } │ │ │ │ │ +226 │ │ │ │ │ +_2_3_4 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(Id id) │ │ │ │ │ +235 : dim_(static_cast(_i_d) & 0xFF) │ │ │ │ │ +236 , none_(static_cast(_i_d) & 0x100) │ │ │ │ │ +237 , topologyId_(static_cast(_i_d) >> 32) │ │ │ │ │ +238 {} │ │ │ │ │ +239 │ │ │ │ │ +242 │ │ │ │ │ +_2_4_4 constexpr _G_e_o_m_e_t_r_y_T_y_p_e () │ │ │ │ │ +245 : dim_(0), none_(true), topologyId_(0) │ │ │ │ │ +246 {} │ │ │ │ │ +247 │ │ │ │ │ +_2_5_4 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) │ │ │ │ │ +255 : dim_(_d_i_m), none_(_i_s_N_o_n_e), topologyId_(topologyId) │ │ │ │ │ +256 {} │ │ │ │ │ +257 │ │ │ │ │ +_2_6_3 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(unsigned int topologyId, unsigned int _d_i_m) │ │ │ │ │ +264 : dim_(_d_i_m), none_(false), topologyId_(topologyId) │ │ │ │ │ +265 {} │ │ │ │ │ +266 │ │ │ │ │ +277 template> │ │ │ │ │ +_2_7_9 explicit _G_e_o_m_e_t_r_y_T_y_p_e(TopologyType t) │ │ │ │ │ +280 : dim_(TopologyType::dimension), none_(false), topologyId_(TopologyType:: │ │ │ │ │ +_i_d) │ │ │ │ │ +281 { │ │ │ │ │ +282 DUNE_UNUSED_PARAMETER(t); │ │ │ │ │ +283 } │ │ │ │ │ +284 │ │ │ │ │ +_2_9_1 constexpr bool _i_s_V_e_r_t_e_x() const { │ │ │ │ │ +292 return dim_==0; │ │ │ │ │ +293 } │ │ │ │ │ +294 │ │ │ │ │ +_2_9_6 constexpr bool _i_s_L_i_n_e() const { │ │ │ │ │ +297 return dim_==1; │ │ │ │ │ +298 } │ │ │ │ │ +299 │ │ │ │ │ +_3_0_1 constexpr bool _i_s_T_r_i_a_n_g_l_e() const { │ │ │ │ │ +302 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0001; │ │ │ │ │ +303 } │ │ │ │ │ +304 │ │ │ │ │ +_3_0_6 constexpr bool _i_s_Q_u_a_d_r_i_l_a_t_e_r_a_l() const { │ │ │ │ │ +307 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0011; │ │ │ │ │ +308 } │ │ │ │ │ +309 │ │ │ │ │ +_3_1_1 constexpr bool _i_s_T_e_t_r_a_h_e_d_r_o_n() const { │ │ │ │ │ +312 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0001; │ │ │ │ │ +313 } │ │ │ │ │ +314 │ │ │ │ │ +_3_1_6 constexpr bool _i_s_P_y_r_a_m_i_d() const { │ │ │ │ │ +317 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0011; │ │ │ │ │ +318 } │ │ │ │ │ +319 │ │ │ │ │ +_3_2_1 constexpr bool _i_s_P_r_i_s_m() const { │ │ │ │ │ +322 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0101; │ │ │ │ │ +323 } │ │ │ │ │ +324 │ │ │ │ │ +_3_2_6 constexpr bool _i_s_H_e_x_a_h_e_d_r_o_n() const { │ │ │ │ │ +327 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0111; │ │ │ │ │ +328 } │ │ │ │ │ +329 │ │ │ │ │ +_3_3_1 constexpr bool _i_s_S_i_m_p_l_e_x() const { │ │ │ │ │ +332 return ! none_ && (topologyId_ | 1) == 1; │ │ │ │ │ +333 } │ │ │ │ │ +334 │ │ │ │ │ +_3_3_6 constexpr bool _i_s_C_u_b_e() const { │ │ │ │ │ +337 return ! none_ && ((topologyId_ ^ ((1 << dim_)-1)) >> 1 == 0); │ │ │ │ │ +338 } │ │ │ │ │ +339 │ │ │ │ │ +_3_4_1 constexpr bool _i_s_C_o_n_i_c_a_l() const { │ │ │ │ │ +342 return ! none_ && (((topologyId_ & ~1) & (1u << (dim_-1))) == 0); │ │ │ │ │ +343 } │ │ │ │ │ +344 │ │ │ │ │ +_3_4_9 constexpr bool _i_s_C_o_n_i_c_a_l(const int& step) const { │ │ │ │ │ +350 return ! none_ && (((topologyId_ & ~1) & (1u << step)) == 0); │ │ │ │ │ +351 } │ │ │ │ │ +352 │ │ │ │ │ +_3_5_4 constexpr bool _i_s_P_r_i_s_m_a_t_i_c() const { │ │ │ │ │ +355 return ! none_ && (( (topologyId_ | 1) & (1u << (dim_-1))) != 0); │ │ │ │ │ +356 } │ │ │ │ │ +357 │ │ │ │ │ +_3_6_2 constexpr bool _i_s_P_r_i_s_m_a_t_i_c(const int& step) const { │ │ │ │ │ +363 return ! none_ && (( (topologyId_ | 1) & (1u << step)) != 0); │ │ │ │ │ +364 } │ │ │ │ │ +365 │ │ │ │ │ +_3_6_7 constexpr bool _i_s_N_o_n_e() const { │ │ │ │ │ +368 return none_; │ │ │ │ │ +369 } │ │ │ │ │ +370 │ │ │ │ │ +_3_7_2 constexpr unsigned int _d_i_m() const { │ │ │ │ │ +373 return dim_; │ │ │ │ │ +374 } │ │ │ │ │ +375 │ │ │ │ │ +_3_7_7 constexpr unsigned int _i_d() const { │ │ │ │ │ +378 return topologyId_; │ │ │ │ │ +379 } │ │ │ │ │ +380 │ │ │ │ │ +_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 ( ( none_ == other.none_ ) │ │ │ │ │ +390 && ( ( none_ == true ) │ │ │ │ │ +391 || ( ( dim_ == other.dim_ ) │ │ │ │ │ +392 && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) ) │ │ │ │ │ +393 ) │ │ │ │ │ +394 ) │ │ │ │ │ +395 ); │ │ │ │ │ +396 } │ │ │ │ │ +397 │ │ │ │ │ +_3_9_9 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 { │ │ │ │ │ +400 return ! ((*this)==other); │ │ │ │ │ +401 } │ │ │ │ │ +402 │ │ │ │ │ +_4_0_4 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 { │ │ │ │ │ +405 return ( ( none_ < other.none_ ) │ │ │ │ │ +406 || ( !( other.none_ < none_ ) │ │ │ │ │ +407 && ( ( dim_ < other.dim_ ) │ │ │ │ │ +408 || ( (other.dim_ == dim_) │ │ │ │ │ +409 && ((topologyId_ >> 1) < (other.topologyId_ >> 1) ) │ │ │ │ │ +410 ) │ │ │ │ │ +411 ) │ │ │ │ │ +412 ) │ │ │ │ │ +413 ); │ │ │ │ │ +414 } │ │ │ │ │ +415 │ │ │ │ │ +418 }; │ │ │ │ │ +419 │ │ │ │ │ +_4_2_1 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) │ │ │ │ │ +422 { │ │ │ │ │ +423 if (a._i_s_S_i_m_p_l_e_x()) │ │ │ │ │ +424 { │ │ │ │ │ +425 s << "(simplex, " << a._d_i_m() << ")"; │ │ │ │ │ +426 return s; │ │ │ │ │ +427 } │ │ │ │ │ +428 if (a._i_s_C_u_b_e()) │ │ │ │ │ +429 { │ │ │ │ │ +430 s << "(cube, " << a._d_i_m() << ")"; │ │ │ │ │ +431 return s; │ │ │ │ │ +432 } │ │ │ │ │ +433 if (a._i_s_P_y_r_a_m_i_d()) │ │ │ │ │ +434 { │ │ │ │ │ +435 s << "(pyramid, 3)"; │ │ │ │ │ +436 return s; │ │ │ │ │ +437 } │ │ │ │ │ +438 if (a._i_s_P_r_i_s_m()) │ │ │ │ │ +439 { │ │ │ │ │ +440 s << "(prism, 3)"; │ │ │ │ │ +441 return s; │ │ │ │ │ +442 } │ │ │ │ │ +443 if (a._i_s_N_o_n_e()) │ │ │ │ │ +444 { │ │ │ │ │ +445 s << "(none, " << a._d_i_m() << ")"; │ │ │ │ │ +446 return s; │ │ │ │ │ +447 } │ │ │ │ │ +448 s << "(other [" << a._i_d() << "], " << a._d_i_m() << ")"; │ │ │ │ │ +449 return s; │ │ │ │ │ +450 } │ │ │ │ │ +451 │ │ │ │ │ +452 │ │ │ │ │ +454 │ │ │ │ │ +_4_5_8 namespace GeometryTypes { │ │ │ │ │ +459 │ │ │ │ │ +461 │ │ │ │ │ +464 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e simplex(unsigned int dim) │ │ │ │ │ +465 { │ │ │ │ │ +466 return _G_e_o_m_e_t_r_y_T_y_p_e(0,dim,false); │ │ │ │ │ +467 } │ │ │ │ │ +468 │ │ │ │ │ +470 │ │ │ │ │ +473 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e cube(unsigned int dim) │ │ │ │ │ +474 { │ │ │ │ │ +475 return _G_e_o_m_e_t_r_y_T_y_p_e(((dim>1) ? ((1 << dim) - 1) : 0),dim,false); │ │ │ │ │ +476 } │ │ │ │ │ +477 │ │ │ │ │ +479 │ │ │ │ │ +482 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e none(unsigned int dim) │ │ │ │ │ +483 { │ │ │ │ │ +484 return _G_e_o_m_e_t_r_y_T_y_p_e(0,dim,true); │ │ │ │ │ +485 } │ │ │ │ │ +486 │ │ │ │ │ +488 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e conicalExtension(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) │ │ │ │ │ +489 { │ │ │ │ │ +490 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()); │ │ │ │ │ +491 } │ │ │ │ │ +492 │ │ │ │ │ +494 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e prismaticExtension(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) │ │ │ │ │ +495 { │ │ │ │ │ +496 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()); │ │ │ │ │ +497 } │ │ │ │ │ +498 │ │ │ │ │ +499#ifndef __cpp_inline_variables │ │ │ │ │ +500 namespace { │ │ │ │ │ +501#endif │ │ │ │ │ +502 │ │ │ │ │ +504 │ │ │ │ │ +507 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e vertex = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +(0,0,false); │ │ │ │ │ +508 │ │ │ │ │ +510 │ │ │ │ │ +513 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e line = _G_e_o_m_e_t_r_y_T_y_p_e(0,1,false); │ │ │ │ │ +514 │ │ │ │ │ +516 │ │ │ │ │ +519 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e triangle = simplex(2); │ │ │ │ │ +520 │ │ │ │ │ +522 │ │ │ │ │ +525 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e quadrilateral = cube(2); │ │ │ │ │ +526 │ │ │ │ │ +528 │ │ │ │ │ +531 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e tetrahedron = simplex(3); │ │ │ │ │ +532 │ │ │ │ │ +534 │ │ │ │ │ +537 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e pyramid = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +(0b0011,3,false); │ │ │ │ │ +538 │ │ │ │ │ +540 │ │ │ │ │ +543 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e prism = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +(0b0101,3,false); │ │ │ │ │ +544 │ │ │ │ │ +546 │ │ │ │ │ +549 DUNE_INLINE_VARIABLE constexpr _G_e_o_m_e_t_r_y_T_y_p_e hexahedron = cube(3); │ │ │ │ │ +550 │ │ │ │ │ +551#ifndef __cpp_inline_variables │ │ │ │ │ +552 } │ │ │ │ │ +553#endif │ │ │ │ │ +554 │ │ │ │ │ +555 } │ │ │ │ │ +556 │ │ │ │ │ +557 namespace Impl │ │ │ │ │ +558 { │ │ │ │ │ +559 │ │ │ │ │ +561 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) { │ │ │ │ │ +562 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()); │ │ │ │ │ +563 } │ │ │ │ │ +564 │ │ │ │ │ +565 │ │ │ │ │ +566 // IfGeometryType │ │ │ │ │ +567 // ---------- │ │ │ │ │ +568 │ │ │ │ │ +569 template< template< GeometryType::Id > class Operation, int dim, │ │ │ │ │ +_G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d geometryId = GeometryTypes::vertex > │ │ │ │ │ +570 struct IfGeometryType │ │ │ │ │ +571 { │ │ │ │ │ +572 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ +573 template< class... Args > │ │ │ │ │ +574 static auto apply ( GeometryType gt, Args &&... args ) │ │ │ │ │ +575 { │ │ │ │ │ +576 GeometryType lowerGeometry(gt.id() >>1 , gt.dim()-1, gt.isNone()); │ │ │ │ │ +577 │ │ │ │ │ +578 if( gt.id() & 1 ) │ │ │ │ │ +579 return IfGeometryType< Operation, dim-1, GeometryTypes::prismaticExtension │ │ │ │ │ +(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... ); │ │ │ │ │ +580 else │ │ │ │ │ +581 return IfGeometryType< Operation, dim-1, GeometryTypes::conicalExtension │ │ │ │ │ +(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... ); │ │ │ │ │ +582 } │ │ │ │ │ +583 }; │ │ │ │ │ +584 │ │ │ │ │ +585 template< template< GeometryType::Id > class Operation, _G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d │ │ │ │ │ +geometryId > │ │ │ │ │ +586 struct IfGeometryType< Operation, 0, geometryId> │ │ │ │ │ +587 { │ │ │ │ │ +588 template< class... Args > │ │ │ │ │ +589 static auto apply ([[maybe_unused]] GeometryType gt, Args &&... args ) │ │ │ │ │ +590 { │ │ │ │ │ +591 return Operation< geometryId >::apply( std::forward< Args >( args )... ); │ │ │ │ │ +592 } │ │ │ │ │ +593 }; │ │ │ │ │ +594 } // namespace Impl │ │ │ │ │ +595} // namespace Dune │ │ │ │ │ +596 │ │ │ │ │ +597#endif // DUNE_GEOMETRY_TYPE_HH │ │ │ │ │ +_d_e_p_r_e_c_a_t_e_d___t_o_p_o_l_o_g_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:21 │ │ │ │ │ -_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:170 │ │ │ │ │ -_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:188 │ │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r │ │ │ │ │ -Class providing information on the ordering of vertices. │ │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:67 │ │ │ │ │ -_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_:_:_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:421 │ │ │ │ │ _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:126 │ │ │ │ │ +_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:263 │ │ │ │ │ +_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:404 │ │ │ │ │ +_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:399 │ │ │ │ │ +_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:316 │ │ │ │ │ +_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:311 │ │ │ │ │ +_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:321 │ │ │ │ │ +_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:291 │ │ │ │ │ +_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:388 │ │ │ │ │ +_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:222 │ │ │ │ │ +_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:349 │ │ │ │ │ +_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:372 │ │ │ │ │ +_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:362 │ │ │ │ │ +_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:301 │ │ │ │ │ +_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:279 │ │ │ │ │ +_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:254 │ │ │ │ │ +_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:132 │ │ │ │ │ +_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:134 │ │ │ │ │ +_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:133 │ │ │ │ │ +_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:135 │ │ │ │ │ +_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:137 │ │ │ │ │ +_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:138 │ │ │ │ │ +_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:136 │ │ │ │ │ +_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:234 │ │ │ │ │ +_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:336 │ │ │ │ │ +_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:244 │ │ │ │ │ +_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:341 │ │ │ │ │ +_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:296 │ │ │ │ │ +_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:306 │ │ │ │ │ +_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:354 │ │ │ │ │ +_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:377 │ │ │ │ │ +_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:367 │ │ │ │ │ +_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:326 │ │ │ │ │ +_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:331 │ │ │ │ │ +_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:193 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00251.html │ │ │ │ @@ -204,15 +204,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

    │ │ │ │

    Function Documentation

    │ │ │ │ │ │ │ │

    ◆ refinementIntervals()

    │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00254.html │ │ │ │ @@ -397,16 +397,16 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    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/a01083.html │ │ │ │ @@ -82,15 +82,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -887,16 +887,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/a01087.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01091.html │ │ │ │ @@ -81,15 +81,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>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -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/a01099.html │ │ │ │ @@ -81,15 +81,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>

    │ │ │ │

    │ │ │ │ Public Types

    using ctype = ctype_
     The coordinate field type of the contained reference elements.
     
    using CoordinateField = ctype
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -995,15 +995,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    Dimension of the geometry.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01103.html │ │ │ │ @@ -81,15 +81,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>

    │ │ │ │

    │ │ │ │ Public Types

    typedef ct ctype
     Type used for coordinates.
     
    typedef FieldVector< ctype, mydimensionLocalCoordinate
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -900,15 +900,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    Dimension of the cube element.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01159.html │ │ │ │ @@ -79,15 +79,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -117,15 +117,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Types

    typedef CoordType ctype
     Type used for single coordinate coefficients.
     
    typedef FieldVector< ctype, dim > LocalCoordinate
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01163.html │ │ │ │ @@ -79,15 +79,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01167.html │ │ │ │ @@ -82,15 +82,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...
     
    │ │ │ │ @@ -417,15 +417,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/a01171.html │ │ │ │ @@ -79,15 +79,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01175.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
    Dune::MultiLinearGeometryTraits< ct > Struct Template Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

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

    │ │ │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -176,15 +176,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    tolerance to numerical algorithms

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01179.html │ │ │ │ @@ -79,15 +79,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Public Types

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

    Detailed Description

    │ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01183.html │ │ │ │ @@ -79,15 +79,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>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -149,15 +149,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Static Public Attributes

    static const bool v = false
     
    static const unsigned int topologyId = ~0u
     
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01187.html │ │ │ │ @@ -85,15 +85,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1521,15 +1521,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    geometry dimension

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01191.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
    │ │ │ │ Public Member Functions | │ │ │ │ List of all members
    │ │ │ │
    Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed Class Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ │
    │ │ │ │ Inheritance diagram for Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed:
    │ │ │ │
    │ │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -211,15 +211,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01195.html │ │ │ │ @@ -84,15 +84,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1479,15 +1479,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    geometry dimension

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01199.html │ │ │ │ @@ -76,29 +76,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/a01203.html │ │ │ │ @@ -82,15 +82,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>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Types

    typedef ct Field
     Number type used for coordinates and quadrature weights.
     
    typedef Dune::FieldVector< ct, dim > Vector
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01207.html │ │ │ │ @@ -84,15 +84,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
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -474,15 +474,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01211.html │ │ │ │ @@ -78,21 +78,21 @@ │ │ │ │
    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>

    │ │ │ │

    Detailed Description

    │ │ │ │
    template<typename ctype, int dim>
    │ │ │ │ class Dune::QuadratureRuleFactory< ctype, dim >

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

    │ │ │ │

    The whole class is private and can only be accessed by the singleton container class QuadratureRules.

    │ │ │ │

    The documentation for this class was generated from the following file: │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01215.html │ │ │ │ @@ -79,15 +79,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>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -230,15 +230,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/a01219.html │ │ │ │ @@ -75,17 +75,17 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ List of all members
    │ │ │ │
    Dune::QuadratureRuleFactory< ctype, 0 > Class Template Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

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

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

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

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

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

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01239.html │ │ │ │ @@ -79,15 +79,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>

    │ │ │ │

    │ │ │ │ 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 QuadratureRulerule (const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Public Types

    using Geometry = implementation-defined
     type of geometry embedding a subentity into the reference element
     
    │ │ │ │ @@ -113,15 +113,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/a01243.html │ │ │ │ @@ -96,15 +96,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/a01247.html │ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01251.html │ │ │ │ @@ -461,15 +461,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/a01255.html │ │ │ │ @@ -118,15 +118,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/a01259.html │ │ │ │ @@ -412,15 +412,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    Know your own dimension.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01263.html │ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01267.html │ │ │ │ @@ -98,15 +98,15 @@ │ │ │ │ CoordTypeCoordinate type of the refined element │ │ │ │ codimensionCodimension of the iterator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    This is the base class for SubEntityIterators. We have to use this construct because RefinementImp<...>::codim<...> cannot be specialized without first specializing RefinementImp.

    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01271.html │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01275.html │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01279.html │ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01283.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01287.html │ │ │ │ @@ -395,15 +395,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01291.html │ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01295.html │ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01299.html │ │ │ │ @@ -513,15 +513,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01303.html │ │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01307.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01311.html │ │ │ │ @@ -402,15 +402,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01315.html │ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01319.html │ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01323.html │ │ │ │ @@ -491,15 +491,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01327.html │ │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01331.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01335.html │ │ │ │ @@ -402,15 +402,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01339.html │ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01343.html │ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01347.html │ │ │ │ @@ -491,15 +491,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01351.html │ │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01355.html │ │ │ │ @@ -395,15 +395,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01359.html │ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01363.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01367.html │ │ │ │ @@ -384,15 +384,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01371.html │ │ │ │ @@ -503,15 +503,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01375.html │ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01379.html │ │ │ │ @@ -81,15 +81,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>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -328,15 +328,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Types

    typedef Traits::Key Key
     
    typedef Traits::Object Object
     
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01383.html │ │ │ │ @@ -82,15 +82,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>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -309,15 +309,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Types

    typedef Factory::Key Key
     
    typedef const Factory::Object Object
     
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01391.html │ │ │ │ @@ -80,15 +80,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 │ │ │ │ @@ -1059,15 +1059,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/a01403.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
    Dune::LocalGeometryTypeIndex Class Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

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

    │ │ │ │ │ │ │ │ -

    #include <dune/geometry/typeindex.hh>

    │ │ │ │ +

    #include <dune/geometry/typeindex.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -193,15 +193,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/a01407.html │ │ │ │ @@ -79,15 +79,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)
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -183,15 +183,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/a01411.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01415.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, dimension > Class Template Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01419.html │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ 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)
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01423.html │ │ │ │ @@ -367,15 +367,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01427.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01431.html │ │ │ │ @@ -110,15 +110,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01435.html │ │ │ │ @@ -181,15 +181,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01439.html │ │ │ │ @@ -344,15 +344,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01443.html │ │ │ │ @@ -579,15 +579,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01447.html │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01451.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01455.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01459.html │ │ │ │ @@ -207,15 +207,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01463.html │ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01467.html │ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01471.html │ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01475.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
    Dune::VirtualRefinement< dimension, CoordType > Class Template Referenceabstract
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    VirtualRefinement base class. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <dune/geometry/virtualrefinement.hh>

    │ │ │ │ +

    #include <dune/geometry/virtualrefinement.hh>

    │ │ │ │
    │ │ │ │ Inheritance diagram for Dune::VirtualRefinement< dimension, CoordType >:
    │ │ │ │
    │ │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -607,16 +607,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01479.html │ │ │ │ @@ -76,21 +76,21 @@ │ │ │ │
    Dune::VirtualRefinement< dimension, CoordType >::Codim< codimension > Struct Template Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    codim database of VirtualRefinement │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <dune/geometry/virtualrefinement.hh>

    │ │ │ │ +

    #include <dune/geometry/virtualrefinement.hh>

    │ │ │ │

    Detailed Description

    │ │ │ │
    template<int dimension, class CoordType>
    │ │ │ │ template<int codimension>
    │ │ │ │ struct Dune::VirtualRefinement< dimension, CoordType >::Codim< codimension >

    codim database of VirtualRefinement

    │ │ │ │

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

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

    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_18620fa9f137864b479f21357cfac10d.html │ │ │ │ @@ -95,54 +95,54 @@ │ │ │ │  refinement │ │ │ │   │ │ │ │  utility │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Files

     affinegeometry.hh
     An implementation of the Geometry interface for affine geometries.
     affinegeometry.hh
     An implementation of the Geometry interface for affine geometries.
     
     axisalignedcubegeometry.hh
     A geometry implementation for axis-aligned hypercubes.
     axisalignedcubegeometry.hh
     A geometry implementation for axis-aligned hypercubes.
     
     deprecated_topology.hh
     deprecated_topology.hh
     
     dimension.hh
     dimension.hh
     
     generalvertexorder.hh
     generalvertexorder.hh
     
     multilineargeometry.hh
     multilineargeometry.hh
     
     quadraturerules.hh
     quadraturerules.hh
     
     referenceelement.hh
     referenceelement.hh
     
     referenceelementimplementation.cc
     referenceelementimplementation.cc
     
     referenceelementimplementation.hh
     referenceelementimplementation.hh
     
     referenceelements.hh
     referenceelements.hh
     
     refinement.hh
     This file simply includes all Refinement implementations so you don't have to do them separately.
     refinement.hh
     This file simply includes all Refinement implementations so you don't have to do them separately.
     
     topologyfactory.hh
     topologyfactory.hh
     
     type.hh
     A unique label for each type of element that can occur in a grid.
     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.
     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.cc
     This file contains the virtual wrapper around refinement.
     
     virtualrefinement.hh
     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 │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Files

     typefromvertexcount.hh
     typefromvertexcount.hh
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dir_b609f53bbb5e26b8e9292001c59476a3.html │ │ │ │ @@ -84,29 +84,29 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ 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.).
     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)
     hcubetriangulation.cc
     This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron)
     
     prismtriangulation.cc
     prismtriangulation.cc
     
     pyramidtriangulation.cc
     pyramidtriangulation.cc
     
     simplex.cc
     This file contains the Refinement implementation for simplices (triangles, tetrahedrons...)
     simplex.cc
     This file contains the Refinement implementation for simplices (triangles, tetrahedrons...)
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dune-geometry.tag.gz │ │ │ │ ├── dune-geometry.tag │ │ │ │ │ ├── dune-geometry.tag │ │ │ │ │ │ @@ -14,279 +14,279 @@ │ │ │ │ │ │ modules.txt │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/doc/doxygen/ │ │ │ │ │ │ a00167.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ affinegeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00170.html │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ + a00176.html │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ Dune::AffineGeometry │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ axisalignedcubegeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00203.html │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ + a00197.html │ │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ Dune::AxisAlignedCubeGeometry │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ deprecated_topology.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00200.html │ │ │ │ │ │ + a00170.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dimension.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00218.html │ │ │ │ │ │ + a00230.html │ │ │ │ │ │ Dune::Dim │ │ │ │ │ │ Dune::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ generalvertexorder.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00239.html │ │ │ │ │ │ - type.hh │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ + a00203.html │ │ │ │ │ │ + type.hh │ │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ │ Dune::GeneralVertexOrder │ │ │ │ │ │ Dune::GeneralVertexOrder::iterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ multilineargeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00209.html │ │ │ │ │ │ - dune/geometry/affinegeometry.hh │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ + a00227.html │ │ │ │ │ │ + dune/geometry/affinegeometry.hh │ │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ │ + dune/geometry/type.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.9.0/dune/geometry/ │ │ │ │ │ │ - a00206.html │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ - dune/geometry/typeindex.hh │ │ │ │ │ │ + a00194.html │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ + dune/geometry/typeindex.hh │ │ │ │ │ │ Dune::QuadratureOrderOutOfRange │ │ │ │ │ │ Dune::QuadraturePoint │ │ │ │ │ │ Dune::QuadratureRule │ │ │ │ │ │ Dune::QuadratureRules │ │ │ │ │ │ Dune::QuadratureRuleFactory │ │ │ │ │ │ Dune::QuadratureRuleFactory< ctype, 0 > │ │ │ │ │ │ Dune::QuadratureRuleFactory< ctype, 1 > │ │ │ │ │ │ Dune::QuadratureRuleFactory< ctype, 2 > │ │ │ │ │ │ Dune::QuadratureRuleFactory< ctype, 3 > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::QuadratureType │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ │ - a00206.html │ │ │ │ │ │ + a00194.html │ │ │ │ │ │ a0aeda817d7161b7c1afd8dd15ff12f17 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelement.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00236.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.9.0/dune/geometry/ │ │ │ │ │ │ - a00212.html │ │ │ │ │ │ - dune/geometry/referenceelementimplementation.hh │ │ │ │ │ │ + a00173.html │ │ │ │ │ │ + dune/geometry/referenceelementimplementation.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelementimplementation.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00191.html │ │ │ │ │ │ - dune/geometry/referenceelement.hh │ │ │ │ │ │ - dune/geometry/affinegeometry.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ + a00200.html │ │ │ │ │ │ + dune/geometry/referenceelement.hh │ │ │ │ │ │ + dune/geometry/affinegeometry.hh │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelements.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00194.html │ │ │ │ │ │ - dune/geometry/dimension.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ - dune/geometry/referenceelement.hh │ │ │ │ │ │ - dune/geometry/referenceelementimplementation.hh │ │ │ │ │ │ + a00236.html │ │ │ │ │ │ + dune/geometry/dimension.hh │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ + dune/geometry/referenceelement.hh │ │ │ │ │ │ + dune/geometry/referenceelementimplementation.hh │ │ │ │ │ │ Dune::Geo::ReferenceElements │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Geo │ │ │ │ │ │ Dune::Transitional │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ refinement.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00230.html │ │ │ │ │ │ - refinement/base.cc │ │ │ │ │ │ - refinement/hcube.cc │ │ │ │ │ │ - refinement/simplex.cc │ │ │ │ │ │ - refinement/hcubetriangulation.cc │ │ │ │ │ │ - refinement/prismtriangulation.cc │ │ │ │ │ │ - refinement/pyramidtriangulation.cc │ │ │ │ │ │ + a00182.html │ │ │ │ │ │ + refinement/base.cc │ │ │ │ │ │ + refinement/hcube.cc │ │ │ │ │ │ + refinement/simplex.cc │ │ │ │ │ │ + refinement/hcubetriangulation.cc │ │ │ │ │ │ + refinement/prismtriangulation.cc │ │ │ │ │ │ + refinement/pyramidtriangulation.cc │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ base.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/refinement/ │ │ │ │ │ │ - a00173.html │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ + a00209.html │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ Dune::RefinementImp::Traits │ │ │ │ │ │ Dune::RefinementIntervals │ │ │ │ │ │ Dune::StaticRefinement │ │ │ │ │ │ Dune::StaticRefinement::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ │ │ - a00173.html │ │ │ │ │ │ + a00209.html │ │ │ │ │ │ ab8232ef779e57c3676c54a73bd759f72 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hcube.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/refinement/ │ │ │ │ │ │ - a00188.html │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ - dune/geometry/axisalignedcubegeometry.hh │ │ │ │ │ │ - base.cc │ │ │ │ │ │ + a00221.html │ │ │ │ │ │ + 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 │ │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ │ Dune::RefinementImp::HCube │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ │ │ - a00188.html │ │ │ │ │ │ + a00221.html │ │ │ │ │ │ a2be7a03e64dedaaa1cf5c7c8e2a9cf60 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hcubetriangulation.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/refinement/ │ │ │ │ │ │ - a00182.html │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ - base.cc │ │ │ │ │ │ - simplex.cc │ │ │ │ │ │ + a00218.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 │ │ │ │ │ │ - a00182.html │ │ │ │ │ │ + a00218.html │ │ │ │ │ │ a3fe24de9b756cd18f014979a41cb0843 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ prismtriangulation.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/refinement/ │ │ │ │ │ │ - a00179.html │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ - base.cc │ │ │ │ │ │ - simplex.cc │ │ │ │ │ │ + a00212.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 │ │ │ │ │ │ - a00179.html │ │ │ │ │ │ + a00212.html │ │ │ │ │ │ ae56eb72b98f97f57cc224eb9b4394ef8 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ pyramidtriangulation.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/refinement/ │ │ │ │ │ │ - a00176.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 │ │ │ │ │ │ - a00176.html │ │ │ │ │ │ + a00206.html │ │ │ │ │ │ a5f431ee98541c17b3d9aea2dbc726941 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplex.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/refinement/ │ │ │ │ │ │ - a00185.html │ │ │ │ │ │ - dune/geometry/multilineargeometry.hh │ │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ - base.cc │ │ │ │ │ │ + a00215.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 │ │ │ │ │ │ - a00185.html │ │ │ │ │ │ + a00215.html │ │ │ │ │ │ a944407dc4f6f9a372b10b69bbb5a0792 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ factorial │ │ │ │ │ │ a00266.html │ │ │ │ │ │ @@ -370,52 +370,52 @@ │ │ │ │ │ │ afd47205aa1691498b073d9681fb23f6d │ │ │ │ │ │ (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ topologyfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00233.html │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ - dune/geometry/typeindex.hh │ │ │ │ │ │ + a00224.html │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ + dune/geometry/typeindex.hh │ │ │ │ │ │ Dune::TopologyFactory │ │ │ │ │ │ Dune::TopologySingletonFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ type.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00197.html │ │ │ │ │ │ - dune/geometry/deprecated_topology.hh │ │ │ │ │ │ + a00239.html │ │ │ │ │ │ + dune/geometry/deprecated_topology.hh │ │ │ │ │ │ Dune::GeometryType │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeometryTypes │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ typeindex.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00224.html │ │ │ │ │ │ - type.hh │ │ │ │ │ │ + a00188.html │ │ │ │ │ │ + type.hh │ │ │ │ │ │ Dune::LocalGeometryTypeIndex │ │ │ │ │ │ Dune::GlobalGeometryTypeIndex │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ typefromvertexcount.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/utility/ │ │ │ │ │ │ - a00215.html │ │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ │ + a00185.html │ │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ virtualrefinement.cc │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00221.html │ │ │ │ │ │ - type.hh │ │ │ │ │ │ - refinement.hh │ │ │ │ │ │ + a00191.html │ │ │ │ │ │ + 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 │ │ │ │ │ │ @@ -425,26 +425,26 @@ │ │ │ │ │ │ Dune::RefinementBuilder │ │ │ │ │ │ Dune::RefinementBuilder< 1, CoordType > │ │ │ │ │ │ Dune::RefinementBuilder< 3, CoordType > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_GEOMETRY_VIRTUALREFINEMENT_CC │ │ │ │ │ │ - a00221.html │ │ │ │ │ │ + a00191.html │ │ │ │ │ │ ac82d420bff6cce87d06ad71b4f1cb0c8 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ virtualrefinement.hh │ │ │ │ │ │ /build/reproducible-path/dune-geometry-2.9.0/dune/geometry/ │ │ │ │ │ │ - a00227.html │ │ │ │ │ │ - refinement.hh │ │ │ │ │ │ - type.hh │ │ │ │ │ │ - virtualrefinement.cc │ │ │ │ │ │ + a00233.html │ │ │ │ │ │ + refinement.hh │ │ │ │ │ │ + type.hh │ │ │ │ │ │ + virtualrefinement.cc │ │ │ │ │ │ Dune::VirtualRefinement │ │ │ │ │ │ Dune::VirtualRefinement::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Dune::AffineGeometry │ │ │ │ │ │ a01099.html │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/files.html │ │ │ │ @@ -77,39 +77,39 @@ │ │ │ │   doc │ │ │ │   appl │ │ │ │  refelements │ │ │ │  doxygen │ │ │ │   dune │ │ │ │   geometry │ │ │ │   refinement │ │ │ │ - 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...) │ │ │ │ + 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...) │ │ │ │   utility │ │ │ │ - typefromvertexcount.hh │ │ │ │ - affinegeometry.hhAn implementation of the Geometry interface for affine geometries │ │ │ │ - axisalignedcubegeometry.hhA geometry implementation for axis-aligned hypercubes │ │ │ │ - deprecated_topology.hh │ │ │ │ - dimension.hh │ │ │ │ - generalvertexorder.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 │ │ │ │ + typefromvertexcount.hh │ │ │ │ + affinegeometry.hhAn implementation of the Geometry interface for affine geometries │ │ │ │ + axisalignedcubegeometry.hhA geometry implementation for axis-aligned hypercubes │ │ │ │ + deprecated_topology.hh │ │ │ │ + dimension.hh │ │ │ │ + generalvertexorder.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 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/globals.html │ │ │ │ @@ -66,22 +66,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    Here is a list of all file members with links to the files they belong to:
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/globals_defs.html │ │ │ │ @@ -66,22 +66,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    Here is a list of all macros with links to the files they belong to:
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │