--- /srv/reproducible-results/rbuild-debian/r-b-build.V78lDEDJ/b1/dune-grid_2.9.0-4_armhf.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.V78lDEDJ/b2/dune-grid_2.9.0-4_armhf.changes ├── Files │ @@ -1,4 +1,4 @@ │ │ 9a80e01bf46bdea7a15a51be599f0c5e 8146052 debug optional libdune-grid-dev-dbgsym_2.9.0-4_armhf.deb │ 58d6b0b923a1dbf0653dd6e2a930ab1b 1019064 libdevel optional libdune-grid-dev_2.9.0-4_armhf.deb │ - face5d160f66e7cf3ea1cb4608507bb9 8287112 doc optional libdune-grid-doc_2.9.0-4_all.deb │ + 048cdcaba2e7245b6a75f82d516204ab 8288276 doc optional libdune-grid-doc_2.9.0-4_all.deb ├── libdune-grid-doc_2.9.0-4_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-04-30 15:22:38.000000 debian-binary │ │ --rw-r--r-- 0 0 0 41260 2024-04-30 15:22:38.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 8245660 2024-04-30 15:22:38.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 41336 2024-04-30 15:22:38.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 8246748 2024-04-30 15:22:38.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -1,92 +1,91 @@ │ │ │ │ │ usr/share/doc/libdune-grid-doc/changelog.Debian.gz │ │ │ │ │ usr/share/doc/libdune-grid-doc/changelog.gz │ │ │ │ │ usr/share/doc/libdune-grid-doc/copyright │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00143.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00146.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00149.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00158.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00161.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00161_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00191.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00194.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00203.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00206.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00212.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00224.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00227.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00227_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00230.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00236.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00236_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00251.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00260.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00260_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00263.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00263_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00239.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00239_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00257.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00257_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00266.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00266_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00269.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00269_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00281.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00281_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00287.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00287_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00290.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00290_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00293.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00296.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00299.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00317.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00302.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00302_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00323.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00329.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00335.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00341.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00341_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00353.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00353_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00344.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00344_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00362.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00362_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00572.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00572_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00581.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00596.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00596_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00587.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00593.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00593_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00605.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ │ @@ -95,56 +94,57 @@ │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00641.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00701.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00701_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00698.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00722.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00725.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00725_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00728.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00731.html │ │ │ │ │ @@ -168,15 +168,17 @@ │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ │ │ @@ -186,93 +188,91 @@ │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00854_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00866_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00902_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00908_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00926_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -3,338 +3,338 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-04-30 15:22:38.000000 ./usr/share/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-04-30 15:22:38.000000 ./usr/share/doc/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1119 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5359 2022-10-20 19:04:08.000000 ./usr/share/doc/libdune-grid-doc/changelog.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3525 2023-01-12 15:07:29.000000 ./usr/share/doc/libdune-grid-doc/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5805 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00143.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5418 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00146.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5805 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00149.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5199 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25461 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5385 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00161.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 20167 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00161_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4799 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16219 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6609 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18593 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9565 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63478 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6300 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23517 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5120 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17469 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13228 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 196700 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6091 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30251 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6661 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00194.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 214461 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5309 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00203.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 68410 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5196 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31839 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5199 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25461 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7013 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 103976 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9780 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00227.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51805 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00227_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5063 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17474 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6320 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00236.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31789 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00236_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4951 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00251.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7312 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6482 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00260.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37355 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00260_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8742 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00263.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110591 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00263_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6590 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00266.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34707 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00266_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6340 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00269.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65891 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00269_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11053 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00281.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00281_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12860 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00287.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36325 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00287_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5373 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00290.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21853 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00290_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4572 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56514 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7585 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00317.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61183 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5886 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00329.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61147 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5196 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31839 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6091 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30251 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13228 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 196700 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9780 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51805 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6609 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18593 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7013 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 103976 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4799 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16219 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9565 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63478 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6661 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 214461 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5063 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17474 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6300 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23517 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5309 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 68410 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5120 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17469 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12860 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00239.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36325 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00239_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5689 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00257.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34593 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00257_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6482 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00266.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37355 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00266_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5886 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00287.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61147 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00287_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8742 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00290.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110591 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00290_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4951 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7312 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7585 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00296.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61183 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6590 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34707 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4572 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00302.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56514 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00302_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5746 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24813 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5373 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00329.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21853 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6340 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65891 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 19517 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 49951 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5689 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00341.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34593 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00341_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5746 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00353.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24813 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00353_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6320 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00344.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31789 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00344_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11053 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00362.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00362_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6163 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 44588 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5298 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22762 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8579 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70890 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8409 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 117489 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4939 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20260 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4784 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00596.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12571 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00596_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5365 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14557 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6305 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45978 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4124 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6412 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6134 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 105403 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6541 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60303 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5246 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28785 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5326 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40679 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6328 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 109815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5066 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18611 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5483 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33204 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5490 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 47805 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5242 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28809 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4823 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22391 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3890 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67786 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6020 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55374 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13662 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30515 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5365 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14557 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4124 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6412 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5298 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22762 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6305 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45978 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4784 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00593.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12571 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00593_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8579 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70890 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8409 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 117489 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4939 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20260 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4529 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5911 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41408 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6541 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60303 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5593 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65602 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4823 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22391 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27809 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 144963 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8632 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 91922 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7362 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 124772 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5260 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 84757 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6328 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 109815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4919 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35859 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5490 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 47805 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3890 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 128353 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7362 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 124772 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6562 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 206945 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4919 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35859 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5593 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65602 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5953 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 107307 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4529 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8066 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75019 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5048 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27137 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8632 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 91922 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5060 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27809 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 144963 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9099 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14880 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6062 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86688 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5911 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41408 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9467 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 156238 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5260 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 84757 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4342 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4981 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6020 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55374 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5246 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28785 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5326 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40679 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5242 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28809 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6062 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86688 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6134 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 105403 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5048 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27137 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4981 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3890 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67786 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9099 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14880 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5066 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18611 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4342 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5483 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33204 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5953 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 107307 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9467 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 156238 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5060 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6562 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 206945 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8066 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75019 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13662 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30515 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3857 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00722.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6308 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3640 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00725.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5092 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00725_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7065 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00728.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 110161 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5267 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17735 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6398 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30303 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5262 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17911 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6250 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75966 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5314 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15637 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5366 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17749 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5777 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 97545 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6010 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70782 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5205 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32992 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4773 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21274 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5561 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44060 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5075 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7074 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6698 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6427 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5609 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46924 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6511 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38497 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5419 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14734 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5409 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22813 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5679 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20083 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6878 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31190 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16725 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5392 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18253 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4806 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15611 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5671 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25335 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4824 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4842 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5367 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12766 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4842 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4830 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5457 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15223 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4812 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6379 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27389 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5485 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16907 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4812 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4824 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6145 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67658 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4800 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4803 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4809 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10435 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6507 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56749 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5727 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49716 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4782 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5428 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35449 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7292 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63574 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7174 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 181940 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5053 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19595 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5596 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32470 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6207 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 83430 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4588 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33396 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8073 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 109305 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5876 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50355 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4392 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7042 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10479 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 202684 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5926 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75093 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5405 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16806 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5576 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20605 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6046 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49272 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7112 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 52837 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5653 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25024 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5461 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19623 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5681 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31399 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11343 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 294404 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9039 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 93746 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6101 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 90923 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7167 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37022 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6276 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22625 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9681 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 93783 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18468 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70984 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5595 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20374 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5775 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5610 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34861 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5728 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 59110 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6971 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53204 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5630 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35213 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5776 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39431 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5205 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32992 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5366 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17749 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5314 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15637 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5777 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 97545 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6010 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70782 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5262 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17911 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5267 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17735 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6398 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30303 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6250 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75966 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5776 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39431 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5610 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34861 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5595 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20374 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5681 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31399 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5576 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20605 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9039 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 93746 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11343 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 294404 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6971 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53204 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9681 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 93783 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5775 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5926 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75093 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5728 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 59110 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5653 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25024 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7167 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37022 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5630 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35213 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6276 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22625 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7112 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 52837 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6046 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49272 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5461 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19623 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5405 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16806 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18468 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70984 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6101 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 90923 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5596 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32470 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5053 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19595 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7174 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 181940 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6379 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27389 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6145 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67658 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4830 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5419 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14734 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4842 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15611 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4824 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5457 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15223 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16725 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4812 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10435 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4815 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5485 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16907 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4803 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4806 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4800 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5367 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12766 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6511 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38497 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5679 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20083 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5671 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25335 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5409 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22813 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4812 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4842 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5392 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18253 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6878 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31190 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4809 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4824 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8073 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 109305 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4588 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33396 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5075 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7074 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6427 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6698 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5428 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35449 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6207 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 83430 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4782 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6507 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56749 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7292 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63574 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5727 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49716 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5609 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46924 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5876 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 50355 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5561 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44060 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4392 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7042 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10479 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 202684 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4773 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21274 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6755 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 24441 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5282 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 29538 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11084 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 85247 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 20497 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00974.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 131930 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6267 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00977.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 34603 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6976 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 72069 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4930 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35765 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8466 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 89922 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4586 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36100 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3901 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7474 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5913 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 35730 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5084 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41563 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5797 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15177 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6274 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45892 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5748 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75408 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3901 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7474 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6057 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31609 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4860 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28013 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5394 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13066 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4930 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35765 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6737 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4586 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36100 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5748 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75408 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6737 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5797 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15177 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5394 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13066 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6274 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45892 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6976 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 72069 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5084 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41563 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4860 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28013 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6057 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31609 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12012 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 426919 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13644 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01025.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11824 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01026.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3567 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01027.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12041 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01028.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12838 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01028.png │ │ │ │ @@ -1913,15 +1913,15 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10279 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e5ae0335e78259a61f16e105bf289391.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 19649 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e5ae0335e78259a61f16e105bf289391_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15164 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3025 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4976 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4837 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 45631 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/doxygen.css │ │ │ │ --rw-r--r-- 0 root (0) root (0) 220227 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 220228 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7704 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dynsections.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1265 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1c.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1949 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1cs.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2042 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1gen.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2422 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1genangle.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2247 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1s.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5575 2024-04-30 15:22:38.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid2a.png │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgrididset.hh File Reference │ │ │ │ +dune-grid: yaspgridhierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgrididset.hh File Reference
│ │ │ │ +
yaspgridhierarchiciterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspGlobalIdSet< GridImp >
 persistent, globally unique Ids More...
class  Dune::YaspHierarchicIterator< GridImp >
 YaspHierarchicIterator enables iteration over son entities of codim 0. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

The YaspHierarchicIterator class

│ │ │ │ +

Enables iteration over son entities of codim 0

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,19 +2,23 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgrididset.hh File Reference │ │ │ │ │ +yaspgridhierarchiciterator.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_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  persistent, globally unique Ids _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r enables iteration over son entities of codim 0. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +The YaspHierarchicIterator class │ │ │ │ │ +Enables iteration over son entities of codim 0 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgrididset.hh Source File │ │ │ │ +dune-grid: yaspgridhierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,88 +74,181 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
yaspgrididset.hh
│ │ │ │ +
yaspgridhierarchiciterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │
7
│ │ │ │ -
8
│ │ │ │ -
9namespace Dune {
│ │ │ │ -
10
│ │ │ │ -
11 //========================================================================
│ │ │ │ -
16 //========================================================================
│ │ │ │ -
17
│ │ │ │ +
14namespace Dune {
│ │ │ │ +
15
│ │ │ │
18 template<class GridImp>
│ │ │ │
│ │ │ │ -
19 class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
│ │ │ │ -
20 typename std::remove_const<GridImp>::type::PersistentIndexType >
│ │ │ │ -
21 /*
│ │ │ │ -
22 We used the remove_const to extract the Type from the mutable class,
│ │ │ │ -
23 because the const class is not instantiated yet.
│ │ │ │ -
24 */
│ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
30 typedef typename std::remove_const<GridImp>::type::PersistentIndexType IdType;
│ │ │ │ -
31
│ │ │ │ -
32 using IdSet<GridImp, This, IdType>::subId;
│ │ │ │ + │ │ │ │ +
20 {
│ │ │ │ +
21 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
22
│ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
26 // types used from grids
│ │ │ │ +
27 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
28 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
29 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
30
│ │ │ │ +
32 YaspHierarchicIterator () : _entity(), _maxlevel(-1), stack() {}
│ │ │ │
33
│ │ │ │
│ │ │ │ - │ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
39 /*
│ │ │ │ -
40 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
41 because the const class is not instantiated yet.
│ │ │ │ -
42 */
│ │ │ │ -
43 template<int cd>
│ │ │ │ -
│ │ │ │ -
44 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ -
45 {
│ │ │ │ -
46 return e.impl().persistentIndex();
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
50 /*
│ │ │ │ -
51 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
52 because the const class is not instantiated yet.
│ │ │ │ -
53 */
│ │ │ │ -
│ │ │ │ -
54 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
│ │ │ │ -
55 int i, unsigned int codim ) const
│ │ │ │ -
56 {
│ │ │ │ -
57 return e.impl().subPersistentIndex(i,codim);
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
60 };
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62} // namespace Dune
│ │ │ │ -
63
│ │ │ │ -
64#endif // DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ │ +
35 YaspHierarchicIterator (const YGLI& g, const I& it, int maxlevel) :
│ │ │ │ +
36 _entity(YaspEntity<0, dim, GridImp>(g,it))
│ │ │ │ +
37 {
│ │ │ │ +
38 // store reference to entity implementation for better readability
│ │ │ │ +
39 YaspEntityImp& entity = _entity.impl();
│ │ │ │ +
40 // now iterator points to current cell
│ │ │ │ +
41 StackElem se(entity._g);
│ │ │ │ +
42 std::copy(entity._it.coord().begin(), entity._it.coord().end(), se.coord.begin());
│ │ │ │ +
43 stack.push(se);
│ │ │ │ +
44
│ │ │ │ +
45 // determine maximum level
│ │ │ │ +
46 _maxlevel = std::min(maxlevel,entity._g->mg->maxLevel());
│ │ │ │ +
47
│ │ │ │ +
48 // if maxlevel not reached then push yourself and sons
│ │ │ │ +
49 if (entity._g->level()<_maxlevel)
│ │ │ │ +
50 {
│ │ │ │ +
51 push_sons();
│ │ │ │ +
52 }
│ │ │ │ +
53
│ │ │ │ +
54 // and make iterator point to first son if stack is not empty
│ │ │ │ +
55 if (!stack.empty())
│ │ │ │ +
56 pop_tos();
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 void increment ()
│ │ │ │ +
61 {
│ │ │ │ +
62 // sanity check: do nothing when stack is empty
│ │ │ │ +
63 if (stack.empty()) return;
│ │ │ │ +
64
│ │ │ │ +
65 // if maxlevel not reached then push sons
│ │ │ │ +
66 if (_entity.impl()._g->level()<_maxlevel)
│ │ │ │ +
67 push_sons();
│ │ │ │ +
68
│ │ │ │ +
69 // in any case pop one element
│ │ │ │ +
70 pop_tos();
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
74 bool equals (const YaspHierarchicIterator& rhs) const
│ │ │ │ +
75 {
│ │ │ │ +
76 return (_entity == rhs._entity);
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ +
80 const Entity& dereference() const
│ │ │ │ +
81 {
│ │ │ │ +
82 return _entity;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
85 void print (std::ostream& s) const
│ │ │ │ +
86 {
│ │ │ │ +
87 // store reference to entity implementation for better readability
│ │ │ │ +
88 YaspEntityImp& entity = _entity.impl();
│ │ │ │ +
89 s << "HIER: " << "level=" << entity._g.level()
│ │ │ │ +
90 << " position=" << entity._it.coord()
│ │ │ │ +
91 << " superindex=" << entity._it.superindex()
│ │ │ │ +
92 << " maxlevel=" << entity._maxlevel
│ │ │ │ +
93 << " stacksize=" << stack.size()
│ │ │ │ +
94 << std::endl;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
97 private:
│ │ │ │ +
98 Entity _entity;
│ │ │ │ +
99
│ │ │ │ +
100 int _maxlevel;
│ │ │ │ +
101
│ │ │ │ +
102 struct StackElem {
│ │ │ │ +
103 YGLI g; // grid level of the element
│ │ │ │ +
104 std::array<int,dim> coord; // and the coordinates
│ │ │ │ +
105 StackElem(YGLI gg) : g(gg) {}
│ │ │ │ +
106 };
│ │ │ │ +
107 std::stack<StackElem> stack;
│ │ │ │ +
108
│ │ │ │ +
109 // push sons of current element on the stack
│ │ │ │ +
110 void push_sons ()
│ │ │ │ +
111 {
│ │ │ │ +
112 // store reference to entity implementation for better readability
│ │ │ │ +
113 YaspEntityImp& entity = _entity.impl();
│ │ │ │ +
114
│ │ │ │ +
115 // yes, process all 1<<dim sons
│ │ │ │ +
116 YGLI finer = entity._g;
│ │ │ │ +
117 ++finer;
│ │ │ │ +
118 StackElem se(finer);
│ │ │ │ +
119 for (int i=0; i<(1<<dim); i++)
│ │ │ │ +
120 {
│ │ │ │ +
121 for (int k=0; k<dim; k++)
│ │ │ │ +
122 if (i&(1<<k))
│ │ │ │ +
123 se.coord[k] = entity._it.coord(k)*2+1;
│ │ │ │ +
124 else
│ │ │ │ +
125 se.coord[k] = entity._it.coord(k)*2;
│ │ │ │ +
126 // not all entities have 2^d subentities due to refineOptions with keep_ovlp==false
│ │ │ │ +
127 bool exists = true;
│ │ │ │ +
128 for (int k=0; k<dim; k++)
│ │ │ │ +
129 if ((se.coord[k] < finer->overlap[0].dataBegin()->origin(k)) || (se.coord[k] >= finer->overlap[0].dataBegin()->origin(k)+finer->overlap[0].dataBegin()->size(k)))
│ │ │ │ +
130 exists = false;
│ │ │ │ +
131 if (exists)
│ │ │ │ +
132 stack.push(se);
│ │ │ │ +
133 }
│ │ │ │ +
134 }
│ │ │ │ +
135
│ │ │ │ +
136 // make TOS the current element
│ │ │ │ +
137 void pop_tos ()
│ │ │ │ +
138 {
│ │ │ │ +
139 StackElem se = stack.top();
│ │ │ │ +
140 stack.pop();
│ │ │ │ +
141 YaspEntityImp& entity = _entity.impl();
│ │ │ │ +
142 entity._g = se.g;
│ │ │ │ +
143 entity._it.reinit(entity._g->overlap[0],se.coord);
│ │ │ │ +
144 }
│ │ │ │ +
145 };
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147} // namespace Dune
│ │ │ │ +
148
│ │ │ │ +
149#endif // DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │
Dune
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Dune::IdSet
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ -
Dune::YaspGlobalIdSet
persistent, globally unique Ids
Definition yaspgrididset.hh:25
│ │ │ │ -
Dune::YaspGlobalIdSet::subId
IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
get id of subentity
Definition yaspgrididset.hh:54
│ │ │ │ -
Dune::YaspGlobalIdSet::IdType
std::remove_const< GridImp >::type::PersistentIndexType IdType
define the type used for persistent indices
Definition yaspgrididset.hh:30
│ │ │ │ -
Dune::YaspGlobalIdSet::YaspGlobalIdSet
YaspGlobalIdSet()
Only default-constructible.
Definition yaspgrididset.hh:35
│ │ │ │ -
Dune::YaspGlobalIdSet::id
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition yaspgrididset.hh:44
│ │ │ │ +
Dune::Entity
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Dune::Entity::impl
Implementation & impl()
access to the underlying implementation
Definition common/entity.hh:80
│ │ │ │ +
Dune::YaspEntity
Definition yaspgridentity.hh:268
│ │ │ │ +
Dune::YaspEntity::_g
YGLI _g
Definition yaspgridentity.hh:426
│ │ │ │ +
Dune::YaspEntity::_it
I _it
Definition yaspgridentity.hh:425
│ │ │ │ +
Dune::YaspHierarchicIterator
YaspHierarchicIterator enables iteration over son entities of codim 0.
Definition yaspgridhierarchiciterator.hh:20
│ │ │ │ +
Dune::YaspHierarchicIterator::YaspHierarchicIterator
YaspHierarchicIterator()
default constructor creating empty iterator
Definition yaspgridhierarchiciterator.hh:32
│ │ │ │ +
Dune::YaspHierarchicIterator::Entity
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridhierarchiciterator.hh:29
│ │ │ │ +
Dune::YaspHierarchicIterator::print
void print(std::ostream &s) const
Definition yaspgridhierarchiciterator.hh:85
│ │ │ │ +
Dune::YaspHierarchicIterator::I
GridImp::YGrid::Iterator I
Definition yaspgridhierarchiciterator.hh:28
│ │ │ │ +
Dune::YaspHierarchicIterator::dereference
const Entity & dereference() const
dereferencing
Definition yaspgridhierarchiciterator.hh:80
│ │ │ │ +
Dune::YaspHierarchicIterator::YGLI
GridImp::YGridLevelIterator YGLI
Definition yaspgridhierarchiciterator.hh:27
│ │ │ │ +
Dune::YaspHierarchicIterator::increment
void increment()
increment
Definition yaspgridhierarchiciterator.hh:60
│ │ │ │ +
Dune::YaspHierarchicIterator::equals
bool equals(const YaspHierarchicIterator &rhs) const
equality
Definition yaspgridhierarchiciterator.hh:74
│ │ │ │ +
Dune::YaspHierarchicIterator::YaspHierarchicIterator
YaspHierarchicIterator(const YGLI &g, const I &it, int maxlevel)
constructor
Definition yaspgridhierarchiciterator.hh:35
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,98 +1,205 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgrididset.hh │ │ │ │ │ +yaspgridhierarchiciterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8 │ │ │ │ │ -9namespace _D_u_n_e { │ │ │ │ │ -10 │ │ │ │ │ -11 //======================================================================== │ │ │ │ │ -16 //======================================================================== │ │ │ │ │ -17 │ │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ │ +15 │ │ │ │ │ 18 template │ │ │ │ │ -_1_9 class _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t : public _I_d_S_e_t, │ │ │ │ │ -20 typename std::remove_const::type::PersistentIndexType > │ │ │ │ │ -21 /* │ │ │ │ │ -22 We used the remove_const to extract the Type from the mutable class, │ │ │ │ │ -23 because the const class is not instantiated yet. │ │ │ │ │ -24 */ │ │ │ │ │ -25 { │ │ │ │ │ -26 typedef _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ -27 │ │ │ │ │ -28 public: │ │ │ │ │ -_3_0 typedef typename std::remove_const::type::PersistentIndexType │ │ │ │ │ -_I_d_T_y_p_e; │ │ │ │ │ -31 │ │ │ │ │ -32 using _I_d_S_e_t_:_:_s_u_b_I_d; │ │ │ │ │ +_1_9 class _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +20 { │ │ │ │ │ +21 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +22 │ │ │ │ │ +23 typedef _Y_a_s_p_E_n_t_i_t_y_<_0_,_G_r_i_d_I_m_p_:_:_d_i_m_e_n_s_i_o_n_,_G_r_i_d_I_m_p_> _Y_a_s_p_E_n_t_i_t_y_I_m_p; │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +26 // types used from grids │ │ │ │ │ +_2_7 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_2_8 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +_2_9 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ +30 │ │ │ │ │ +_3_2 _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () : _entity(), _maxlevel(-1), stack() {} │ │ │ │ │ 33 │ │ │ │ │ -_3_5 _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t() │ │ │ │ │ -36 {} │ │ │ │ │ -37 │ │ │ │ │ -39 /* │ │ │ │ │ -40 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -41 because the const class is not instantiated yet. │ │ │ │ │ -42 */ │ │ │ │ │ -43 template │ │ │ │ │ -_4_4 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits::template │ │ │ │ │ -Codim::Entity& e) const │ │ │ │ │ -45 { │ │ │ │ │ -46 return e.impl().persistentIndex(); │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -50 /* │ │ │ │ │ -51 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -52 because the const class is not instantiated yet. │ │ │ │ │ -53 */ │ │ │ │ │ -_5_4 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim< 0 >::Entity &e, │ │ │ │ │ -55 int i, unsigned int codim ) const │ │ │ │ │ -56 { │ │ │ │ │ -57 return e.impl().subPersistentIndex(i,codim); │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 }; │ │ │ │ │ -61 │ │ │ │ │ -62} // namespace Dune │ │ │ │ │ -63 │ │ │ │ │ -64#endif // DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ │ +_3_5 _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r (const _Y_G_L_I& g, const _I& it, int maxlevel) : │ │ │ │ │ +36 _entity(_Y_a_s_p_E_n_t_i_t_y<0, dim, GridImp>(g,it)) │ │ │ │ │ +37 { │ │ │ │ │ +38 // store reference to entity implementation for better readability │ │ │ │ │ +39 _Y_a_s_p_E_n_t_i_t_y_I_m_p& entity = _entity.impl(); │ │ │ │ │ +40 // now iterator points to current cell │ │ │ │ │ +41 StackElem se(entity.___g); │ │ │ │ │ +42 std::copy(entity.___i_t.coord().begin(), entity.___i_t.coord().end(), │ │ │ │ │ +se.coord.begin()); │ │ │ │ │ +43 stack.push(se); │ │ │ │ │ +44 │ │ │ │ │ +45 // determine maximum level │ │ │ │ │ +46 _maxlevel = std::min(maxlevel,entity.___g->mg->maxLevel()); │ │ │ │ │ +47 │ │ │ │ │ +48 // if maxlevel not reached then push yourself and sons │ │ │ │ │ +49 if (entity.___g->level()<_maxlevel) │ │ │ │ │ +50 { │ │ │ │ │ +51 push_sons(); │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +54 // and make iterator point to first son if stack is not empty │ │ │ │ │ +55 if (!stack.empty()) │ │ │ │ │ +56 pop_tos(); │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_0 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +61 { │ │ │ │ │ +62 // sanity check: do nothing when stack is empty │ │ │ │ │ +63 if (stack.empty()) return; │ │ │ │ │ +64 │ │ │ │ │ +65 // if maxlevel not reached then push sons │ │ │ │ │ +66 if (_entity.impl()._g->level()<_maxlevel) │ │ │ │ │ +67 push_sons(); │ │ │ │ │ +68 │ │ │ │ │ +69 // in any case pop one element │ │ │ │ │ +70 pop_tos(); │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +_7_4 bool _e_q_u_a_l_s (const _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r& rhs) const │ │ │ │ │ +75 { │ │ │ │ │ +76 return (_entity == rhs._entity); │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +_8_0 const _E_n_t_i_t_y& _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ +81 { │ │ │ │ │ +82 return _entity; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_8_5 void _p_r_i_n_t (std::ostream& s) const │ │ │ │ │ +86 { │ │ │ │ │ +87 // store reference to entity implementation for better readability │ │ │ │ │ +88 _Y_a_s_p_E_n_t_i_t_y_I_m_p& entity = _entity.impl(); │ │ │ │ │ +89 s << "HIER: " << "level=" << entity.___g.level() │ │ │ │ │ +90 << " position=" << entity.___i_t.coord() │ │ │ │ │ +91 << " superindex=" << entity.___i_t.superindex() │ │ │ │ │ +92 << " maxlevel=" << entity._maxlevel │ │ │ │ │ +93 << " stacksize=" << stack.size() │ │ │ │ │ +94 << std::endl; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97 private: │ │ │ │ │ +98 _E_n_t_i_t_y _entity; │ │ │ │ │ +99 │ │ │ │ │ +100 int _maxlevel; │ │ │ │ │ +101 │ │ │ │ │ +102 struct StackElem { │ │ │ │ │ +103 _Y_G_L_I g; // grid level of the element │ │ │ │ │ +104 std::array coord; // and the coordinates │ │ │ │ │ +105 StackElem(_Y_G_L_I gg) : g(gg) {} │ │ │ │ │ +106 }; │ │ │ │ │ +107 std::stack stack; │ │ │ │ │ +108 │ │ │ │ │ +109 // push sons of current element on the stack │ │ │ │ │ +110 void push_sons () │ │ │ │ │ +111 { │ │ │ │ │ +112 // store reference to entity implementation for better readability │ │ │ │ │ +113 YaspEntityImp& entity = _entity._i_m_p_l(); │ │ │ │ │ +114 │ │ │ │ │ +115 // yes, process all 1<overlap[0].dataBegin()->origin(k)) || (se.coord │ │ │ │ │ +[k] >= finer->overlap[0].dataBegin()->origin(k)+finer->overlap[0].dataBegin()- │ │ │ │ │ +>size(k))) │ │ │ │ │ +130 exists = false; │ │ │ │ │ +131 if (exists) │ │ │ │ │ +132 stack.push(se); │ │ │ │ │ +133 } │ │ │ │ │ +134 } │ │ │ │ │ +135 │ │ │ │ │ +136 // make TOS the current element │ │ │ │ │ +137 void pop_tos () │ │ │ │ │ +138 { │ │ │ │ │ +139 StackElem se = stack.top(); │ │ │ │ │ +140 stack.pop(); │ │ │ │ │ +141 YaspEntityImp& entity = _entity._i_m_p_l(); │ │ │ │ │ +142 entity._g = se.g; │ │ │ │ │ +143 entity._it.reinit(entity._g->overlap[0],se.coord); │ │ │ │ │ +144 } │ │ │ │ │ +145 }; │ │ │ │ │ +146 │ │ │ │ │ +147} // namespace Dune │ │ │ │ │ +148 │ │ │ │ │ +149#endif // DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ -Id Set Interface. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ -persistent, globally unique Ids │ │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ -IdType subId(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ -template Codim< 0 >::Entity &e, int i, unsigned int codim) const │ │ │ │ │ -get id of subentity │ │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ -std::remove_const< GridImp >::type::PersistentIndexType IdType │ │ │ │ │ -define the type used for persistent indices │ │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ -YaspGlobalIdSet() │ │ │ │ │ -Only default-constructible. │ │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ │ -IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ │ -Codim< cd >::Entity &e) const │ │ │ │ │ -get id of an entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_i_m_p_l │ │ │ │ │ +Implementation & impl() │ │ │ │ │ +access to the underlying implementation │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:268 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___g │ │ │ │ │ +YGLI _g │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:426 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___i_t │ │ │ │ │ +I _it │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:425 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +YaspHierarchicIterator enables iteration over son entities of codim 0. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +YaspHierarchicIterator() │ │ │ │ │ +default constructor creating empty iterator │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &s) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +const Entity & dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_Y_G_L_I │ │ │ │ │ +GridImp::YGridLevelIterator YGLI │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspHierarchicIterator &rhs) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +YaspHierarchicIterator(const YGLI &g, const I &it, int maxlevel) │ │ │ │ │ +constructor │ │ │ │ │ +DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:35 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordinates.hh File Reference │ │ │ │ +dune-grid: ygrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,61 +73,79 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ Functions
│ │ │ │ -
coordinates.hh File Reference
│ │ │ │ +
ygrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the tensorproduct feature, the coordinate information has been encapsulated to keep performance for the equidistant grid. Containers for equidistant and tensorproduct grids are provided here. │ │ │ │ +

This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ More...

│ │ │ │
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ #include <vector>
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <deque>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/math.hh>
│ │ │ │ +#include <dune/common/streamoperators.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::EquidistantCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid. More...
class  Dune::YGridComponent< Coordinates >
 
class  Dune::YGridComponent< Coordinates >::Iterator
 
class  Dune::YGrid< Coordinates >
 implements a collection of YGridComponents which form a codimension Entities of given codimension c need to be represented by d choose c YgridComponents. All entities in one such component share the same set of spanning unit vectors. A YGrid is used to iterate over the entire set of components the codimension consists of. It doesn't hold any data, but instead holds an iterator range into an array of components (which is owned by YGridLevel). More...
 
class  Dune::YGrid< Coordinates >::Iterator
 Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. More...
 
class  Dune::YGridList< Coordinates >
 implements a collection of multiple std::deque<Intersection> Intersections with neighboring processors are stored as std::deque<Intersection>. Eachsuch intersection only holds one YGridComponent. To do all communication associated with one codimension, multiple such deques have to be concatenated. YGridList manges this concatenation. As for YGrids, YGridList doesn't hold any data, but an iterator range into a data array owned by YGridLevel. More...
 
class  Dune::EquidistantOffsetCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid with non-trivial origin. More...
struct  Dune::YGridList< Coordinates >::Intersection
 type describing an intersection with a neighboring processor More...
 
class  Dune::TensorProductCoordinates< ct, dim >
 Coordinate container for a tensor product YaspGrid. More...
class  Dune::YGridList< Coordinates >::Iterator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Yasp
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

template<class ct , int dim>
std::ostream & Dune::operator<< (std::ostream &s, EquidistantCoordinates< ct, dim > &c)
 
template<class ct , int dim>
std::ostream & Dune::operator<< (std::ostream &s, EquidistantOffsetCoordinates< ct, dim > &c)
 
template<class ct , int dim>
std::ostream & Dune::operator<< (std::ostream &s, TensorProductCoordinates< ct, dim > &c)
 
template<int d, typename ct >
std::array< int, d > Dune::Yasp::sizeArray (const std::array< std::vector< ct >, d > &v)
 
template<class Coordinates >
std::ostream & Dune::operator<< (std::ostream &s, YGridComponent< Coordinates > e)
 Output operator for ygrids.
 
template<class Coordinates >
std::ostream & Dune::operator<< (std::ostream &s, typename YGridComponent< Coordinates >::Iterator &e)
 Output operator for ygrids.
 
template<class Coordinates >
std::ostream & Dune::operator<< (std::ostream &s, const YGrid< Coordinates > &e)
 Output operator for ygrids.
 
│ │ │ │

Detailed Description

│ │ │ │ -

This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the tensorproduct feature, the coordinate information has been encapsulated to keep performance for the equidistant grid. Containers for equidistant and tensorproduct grids are provided here.

│ │ │ │ +

This provides a YGrid, the elemental component of the yaspgrid implementation.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,54 +2,81 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _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 │ │ │ │ │ -coordinates.hh File Reference │ │ │ │ │ -This provides container classes for the coordinates to be used in YaspGrid Upon │ │ │ │ │ -implementation of the tensorproduct feature, the coordinate information has │ │ │ │ │ -been encapsulated to keep performance for the equidistant grid. Containers for │ │ │ │ │ -equidistant and tensorproduct grids are provided here. _M_o_r_e_._._. │ │ │ │ │ +ygrid.hh File Reference │ │ │ │ │ +This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ +_M_o_r_e_._._. │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ │ -  Container for equidistant coordinates in a _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_Y_G_r_i_d_<_ _C_o_o_r_d_i_n_a_t_e_s_ _> │ │ │ │ │ + implements a collection of YGridComponents which form a codimension │ │ │ │ │ + Entities of given codimension c need to be represented by d choose c │ │ │ │ │ + YgridComponents. All entities in one such component share the same set │ │ │ │ │ +  of spanning unit vectors. A _Y_G_r_i_d is used to iterate over the entire │ │ │ │ │ + set of components the codimension consists of. It doesn't hold any │ │ │ │ │ + data, but instead holds an iterator range into an array of components │ │ │ │ │ + (which is owned by YGridLevel). _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_Y_G_r_i_d_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +  _I_t_e_r_a_t_o_r over a collection o YGrids A _Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r is the heart of │ │ │ │ │ + an entity in _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_Y_G_r_i_d_L_i_s_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _> │ │ │ │ │ + implements a collection of multiple std::deque │ │ │ │ │ + Intersections with neighboring processors are stored as std:: │ │ │ │ │ + deque. Eachsuch intersection only holds one │ │ │ │ │ +  _Y_G_r_i_d_C_o_m_p_o_n_e_n_t. To do all communication associated with one │ │ │ │ │ + codimension, multiple such deques have to be concatenated. _Y_G_r_i_d_L_i_s_t │ │ │ │ │ + manges this concatenation. As for YGrids, _Y_G_r_i_d_L_i_s_t doesn't hold any │ │ │ │ │ + data, but an iterator range into a data array owned by YGridLevel. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ │ -  Container for equidistant coordinates in a _Y_a_s_p_G_r_i_d with non-trivial │ │ │ │ │ - origin. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_Y_G_r_i_d_L_i_s_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +  type describing an intersection with a neighboring processor _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ │ -  Coordinate container for a tensor product _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_Y_G_r_i_d_L_i_s_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │   │ │ │ │ │ FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s< ct, │ │ │ │ │ - dim > &c) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, │ │ │ │ │ - _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s< ct, dim > &c) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s< │ │ │ │ │ - ct, dim > &c) │ │ │ │ │ +template │ │ │ │ │ +std::array< int, d >  _D_u_n_e_:_:_Y_a_s_p_:_:_s_i_z_e_A_r_r_a_y (const std::array< std::vector< ct │ │ │ │ │ + >, d > &v) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, _Y_G_r_i_d_C_o_m_p_o_n_e_n_t< │ │ │ │ │ + Coordinates > e) │ │ │ │ │ +  Output operator for ygrids. │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, typename │ │ │ │ │ + _Y_G_r_i_d_C_o_m_p_o_n_e_n_t< Coordinates >::Iterator &e) │ │ │ │ │ +  Output operator for ygrids. │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, const _Y_G_r_i_d< │ │ │ │ │ + Coordinates > &e) │ │ │ │ │ +  Output operator for ygrids. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This provides container classes for the coordinates to be used in YaspGrid Upon │ │ │ │ │ -implementation of the tensorproduct feature, the coordinate information has │ │ │ │ │ -been encapsulated to keep performance for the equidistant grid. Containers for │ │ │ │ │ -equidistant and tensorproduct grids are provided here. │ │ │ │ │ +This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordinates.hh Source File │ │ │ │ +dune-grid: ygrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,384 +74,1171 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
coordinates.hh
│ │ │ │ +
ygrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRID_COORDINATES_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ │
7
│ │ │ │
8#include <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ -
13
│ │ │ │ -
21namespace Dune
│ │ │ │ -
22{
│ │ │ │ -
27 template<class ct, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 public:
│ │ │ │ -
32 typedef ct ctype;
│ │ │ │ -
34 static const int dimension = dim;
│ │ │ │ -
35
│ │ │ │ - │ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
45 EquidistantCoordinates(const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
│ │ │ │ -
46 : _s(s)
│ │ │ │ -
47 {
│ │ │ │ -
48 for (int i=0; i<dim; i++)
│ │ │ │ -
49 _h[i] = upperRight[i] / _s[i];
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ -
56 inline ct meshsize(int d, [[maybe_unused]] int i) const
│ │ │ │ -
57 {
│ │ │ │ -
58 return _h[d];
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
65 inline ct coordinate(int d, int i) const
│ │ │ │ -
66 {
│ │ │ │ -
67 return i*_h[d];
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
│ │ │ │ -
73 inline int size(int d) const
│ │ │ │ -
74 {
│ │ │ │ -
75 return _s[d];
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
│ │ │ │ -
84 EquidistantCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ │ -
85 {
│ │ │ │ -
86 //determine new size and meshsize
│ │ │ │ -
87 std::array<int,dim> news;
│ │ │ │ -
88 Dune::FieldVector<ct,dim> newUpperRight;
│ │ │ │ -
89
│ │ │ │ -
90 for (int i=0; i<dim; i++)
│ │ │ │ -
91 {
│ │ │ │ -
92 news[i] = 2 * _s[i];
│ │ │ │ -
93 if (!keep_ovlp)
│ │ │ │ -
94 {
│ │ │ │ -
95 if (ovlp_low[i])
│ │ │ │ -
96 news[i] -= overlap;
│ │ │ │ -
97 if (ovlp_up[i])
│ │ │ │ -
98 news[i] -= overlap;
│ │ │ │ -
99 }
│ │ │ │ -
100
│ │ │ │ -
101 newUpperRight[i] = (_h[i] / ct(2.)) * news[i];
│ │ │ │ -
102 }
│ │ │ │ -
103 return EquidistantCoordinates<ct,dim>(newUpperRight,news);
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ -
107 void print(std::ostream& s) const
│ │ │ │ -
108 {
│ │ │ │ -
109 s << "Printing equidistant coordinate information:" << std::endl;
│ │ │ │ -
110 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
113 private:
│ │ │ │ -
114 Dune::FieldVector<ct,dim> _h;
│ │ │ │ -
115 std::array<int,dim> _s;
│ │ │ │ -
116 };
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
118 template<class ct, int dim>
│ │ │ │ -
│ │ │ │ -
119 inline std::ostream& operator<< (std::ostream& s, EquidistantCoordinates<ct,dim>& c)
│ │ │ │ -
120 {
│ │ │ │ -
121 c.print(s);
│ │ │ │ -
122 return s;
│ │ │ │ -
123 }
│ │ │ │ -
│ │ │ │ -
124
│ │ │ │ -
129 template<class ct, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
131 {
│ │ │ │ -
132 public:
│ │ │ │ -
134 typedef ct ctype;
│ │ │ │ -
136 static const int dimension = dim;
│ │ │ │ -
137
│ │ │ │ - │ │ │ │ -
140
│ │ │ │ -
│ │ │ │ -
149 EquidistantOffsetCoordinates(const Dune::FieldVector<ct,dim>& lowerLeft, const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
│ │ │ │ -
150 : _origin(lowerLeft), _s(s)
│ │ │ │ -
151 {
│ │ │ │ -
152 for (int i=0; i<dim; i++)
│ │ │ │ -
153 _h[i] = (upperRight[i] - lowerLeft[i]) / s[i];
│ │ │ │ -
154 }
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
│ │ │ │ -
160 inline ct meshsize(int d, [[maybe_unused]] int i) const
│ │ │ │ -
161 {
│ │ │ │ -
162 return _h[d];
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
│ │ │ │ -
169 inline ct coordinate(int d, int i) const
│ │ │ │ -
170 {
│ │ │ │ -
171 return _origin[d] + i*_h[d];
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
│ │ │ │ -
177 inline int size(int d) const
│ │ │ │ -
178 {
│ │ │ │ -
179 return _s[d];
│ │ │ │ -
180 }
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10#include <bitset>
│ │ │ │ +
11#include <deque>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │ +
14#include <dune/common/math.hh>
│ │ │ │ +
15#include <dune/common/streamoperators.hh>
│ │ │ │ +
16
│ │ │ │ +
21namespace Dune {
│ │ │ │ +
22
│ │ │ │ +
23 namespace Yasp {
│ │ │ │ +
28 template<int d, typename ct>
│ │ │ │ +
│ │ │ │ +
29 std::array<int,d> sizeArray(const std::array<std::vector<ct>,d>& v)
│ │ │ │ +
30 {
│ │ │ │ +
31 std::array<int,d> tmp;
│ │ │ │ +
32 for (int i=0; i<d; ++i)
│ │ │ │ +
33 tmp[i] = v[i].size() - 1;
│ │ │ │ +
34 return tmp;
│ │ │ │ +
35 }
│ │ │ │ +
│ │ │ │ +
36 } //namespace Yasp
│ │ │ │ +
37
│ │ │ │ +
73 template<class Coordinates>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 {
│ │ │ │ +
76 public:
│ │ │ │ +
77 //extract coordinate type and dimension from the coordinate container
│ │ │ │ +
78 typedef typename Coordinates::ctype ct;
│ │ │ │ +
79 static const int d = Coordinates::dimension;
│ │ │ │ +
80
│ │ │ │ +
81 typedef std::array<int, d> iTupel;
│ │ │ │ +
82 typedef FieldVector<ct,d> fTupel;
│ │ │ │ +
83
│ │ │ │ +
│ │ │ │ +
85 YGridComponent () : _shift(0ULL)
│ │ │ │ +
86 {
│ │ │ │ +
87 std::fill(_origin.begin(), _origin.end(), 0);
│ │ │ │ +
88 std::fill(_offset.begin(), _offset.end(), 0);
│ │ │ │ +
89 std::fill(_size.begin(), _size.end(), 0);
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
100 : _origin(origin), _size(size)
│ │ │ │ +
101 {}
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
109 : _origin(origin), _shift(enclosing.shift()), _coords(enclosing.getCoords()), _size(size), _supersize(enclosing.supersize())
│ │ │ │ +
110 {
│ │ │ │ +
111 for (int i=0; i<d; i++)
│ │ │ │ +
112 _offset[i] = origin[i] - enclosing.origin(i) + enclosing.offset(i);
│ │ │ │ +
113
│ │ │ │ +
114 // compute superincrements
│ │ │ │ +
115 int inc = 1;
│ │ │ │ +
116 for (int i=0; i<d; ++i)
│ │ │ │ +
117 {
│ │ │ │ +
118 _superincrement[i] = inc;
│ │ │ │ +
119 inc *= _supersize[i];
│ │ │ │ +
120 }
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122
│ │ │ │ +
│ │ │ │ +
131 YGridComponent (iTupel origin, std::bitset<d> shift, Coordinates* coords, iTupel size, iTupel offset, iTupel supersize)
│ │ │ │ +
132 : _origin(origin), _shift(shift), _coords(coords), _size(size), _offset(offset), _supersize(supersize)
│ │ │ │ +
133 {
│ │ │ │ +
134 // compute superincrements
│ │ │ │ +
135 int inc = 1;
│ │ │ │ +
136 for (int i=0; i<d; ++i)
│ │ │ │ +
137 {
│ │ │ │ +
138 _superincrement[i] = inc;
│ │ │ │ +
139 inc *= _supersize[i];
│ │ │ │ +
140 }
│ │ │ │ +
141 }
│ │ │ │ +
│ │ │ │ +
142
│ │ │ │ +
│ │ │ │ +
144 int origin (int i) const
│ │ │ │ +
145 {
│ │ │ │ +
146 return _origin[i];
│ │ │ │ +
147 }
│ │ │ │ +
│ │ │ │ +
148
│ │ │ │ +
│ │ │ │ +
150 const iTupel& origin () const
│ │ │ │ +
151 {
│ │ │ │ +
152 return _origin;
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154
│ │ │ │ +
│ │ │ │ +
156 bool shift (int i) const
│ │ │ │ +
157 {
│ │ │ │ +
158 return _shift[i];
│ │ │ │ +
159 }
│ │ │ │ +
│ │ │ │ +
160
│ │ │ │ +
│ │ │ │ +
162 const std::bitset<d>& shift () const
│ │ │ │ +
163 {
│ │ │ │ +
164 return _shift;
│ │ │ │ +
165 }
│ │ │ │ +
│ │ │ │ +
166
│ │ │ │ +
│ │ │ │ +
167 Coordinates* getCoords() const
│ │ │ │ +
168 {
│ │ │ │ +
169 return _coords;
│ │ │ │ +
170 }
│ │ │ │ +
│ │ │ │ +
171
│ │ │ │ +
│ │ │ │ +
173 int offset (int i) const
│ │ │ │ +
174 {
│ │ │ │ +
175 return _offset[i];
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
│ │ │ │ +
179 const iTupel & offset () const
│ │ │ │ +
180 {
│ │ │ │ +
181 return _offset;
│ │ │ │ +
182 }
│ │ │ │
│ │ │ │ -
181
│ │ │ │ +
183
│ │ │ │
│ │ │ │ -
185 inline ct origin(int d) const
│ │ │ │ -
186 {
│ │ │ │ -
187 return _origin[d];
│ │ │ │ -
188 }
│ │ │ │ +
185 int supersize (int i) const
│ │ │ │ +
186 {
│ │ │ │ +
187 return _supersize[i];
│ │ │ │ +
188 }
│ │ │ │
│ │ │ │
189
│ │ │ │ -
│ │ │ │ -
196 EquidistantOffsetCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ │ -
197 {
│ │ │ │ -
198 //determine new size and meshsize
│ │ │ │ -
199 std::array<int,dim> news;
│ │ │ │ -
200 Dune::FieldVector<ct,dim> newUpperRight;
│ │ │ │ +
│ │ │ │ +
191 const iTupel & supersize () const
│ │ │ │ +
192 {
│ │ │ │ +
193 return _supersize;
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
│ │ │ │ +
197 int size (int i) const
│ │ │ │ +
198 {
│ │ │ │ +
199 return _size[i];
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │
201
│ │ │ │ -
202 for (int i=0; i<dim; i++)
│ │ │ │ -
203 {
│ │ │ │ -
204 news[i] = 2 * _s[i];
│ │ │ │ -
205 if (!keep_ovlp)
│ │ │ │ -
206 {
│ │ │ │ -
207 if (ovlp_low[i])
│ │ │ │ -
208 news[i] -= overlap;
│ │ │ │ -
209 if (ovlp_up[i])
│ │ │ │ -
210 news[i] -= overlap;
│ │ │ │ -
211 }
│ │ │ │ -
212
│ │ │ │ -
213 newUpperRight[i] = _origin[i] + (_h[i] / ct(2.)) * news[i];
│ │ │ │ -
214 }
│ │ │ │ -
215 return EquidistantOffsetCoordinates<ct,dim>(_origin,newUpperRight,news);
│ │ │ │ -
216 }
│ │ │ │ -
│ │ │ │ -
217
│ │ │ │ -
│ │ │ │ -
219 void print(std::ostream& s) const
│ │ │ │ -
220 {
│ │ │ │ -
221 s << "Printing equidistant coordinate information:" << std::endl;
│ │ │ │ -
222 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
│ │ │ │ -
223 s << "Offset to origin: " << _origin << std::endl;
│ │ │ │ -
224 }
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
226 private:
│ │ │ │ -
227 Dune::FieldVector<ct,dim> _origin;
│ │ │ │ -
228 Dune::FieldVector<ct,dim> _h;
│ │ │ │ -
229 std::array<int,dim> _s;
│ │ │ │ -
230 };
│ │ │ │ -
│ │ │ │ -
231
│ │ │ │ -
232 template<class ct, int dim>
│ │ │ │ -
│ │ │ │ -
233 inline std::ostream& operator<< (std::ostream& s, EquidistantOffsetCoordinates<ct,dim>& c)
│ │ │ │ -
234 {
│ │ │ │ -
235 c.print(s);
│ │ │ │ -
236 return s;
│ │ │ │ -
237 }
│ │ │ │ -
│ │ │ │ -
238
│ │ │ │ -
243 template<class ct, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
245 {
│ │ │ │ -
246 public:
│ │ │ │ -
248 typedef ct ctype;
│ │ │ │ -
250 static const int dimension = dim;
│ │ │ │ -
251
│ │ │ │ - │ │ │ │ -
254
│ │ │ │ -
│ │ │ │ -
261 TensorProductCoordinates(const std::array<std::vector<ct>,dim>& c, const std::array<int,dim>& offset)
│ │ │ │ -
262 : _c(c),_offset(offset)
│ │ │ │ -
263 {}
│ │ │ │ -
│ │ │ │ -
264
│ │ │ │ -
│ │ │ │ -
269 inline ct meshsize(int d, int i) const
│ │ │ │ -
270 {
│ │ │ │ -
271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]];
│ │ │ │ -
272 }
│ │ │ │ -
│ │ │ │ -
273
│ │ │ │ -
│ │ │ │ -
278 inline ct coordinate(int d, int i) const
│ │ │ │ -
279 {
│ │ │ │ -
280 return _c[d][i-_offset[d]];
│ │ │ │ -
281 }
│ │ │ │ -
│ │ │ │ -
282
│ │ │ │ -
│ │ │ │ -
286 inline int size(int d) const
│ │ │ │ -
287 {
│ │ │ │ -
288 return _c[d].size() - 1;
│ │ │ │ +
│ │ │ │ +
203 iTupel size () const
│ │ │ │ +
204 {
│ │ │ │ +
205 return _size;
│ │ │ │ +
206 }
│ │ │ │ +
│ │ │ │ +
207
│ │ │ │ +
│ │ │ │ +
209 int totalsize () const
│ │ │ │ +
210 {
│ │ │ │ +
211 int s=1;
│ │ │ │ +
212 for (int i=0; i<d; ++i)
│ │ │ │ +
213 s *= size(i);
│ │ │ │ +
214 return s;
│ │ │ │ +
215 }
│ │ │ │ +
│ │ │ │ +
216
│ │ │ │ +
│ │ │ │ +
218 int min (int i) const
│ │ │ │ +
219 {
│ │ │ │ +
220 return _origin[i];
│ │ │ │ +
221 }
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
│ │ │ │ +
224 int max (int i) const
│ │ │ │ +
225 {
│ │ │ │ +
226 return _origin[i] + size(i) - 1;
│ │ │ │ +
227 }
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
│ │ │ │ +
230 bool empty () const
│ │ │ │ +
231 {
│ │ │ │ +
232 for (int i=0; i<d; ++i)
│ │ │ │ +
233 {
│ │ │ │ +
234 if (size(i) == 0)
│ │ │ │ +
235 return true;
│ │ │ │ +
236 }
│ │ │ │ +
237 return false;
│ │ │ │ +
238 }
│ │ │ │ +
│ │ │ │ +
239
│ │ │ │ +
│ │ │ │ +
241 bool inside (const iTupel& coord) const
│ │ │ │ +
242 {
│ │ │ │ +
243 for (int i=0; i<d; i++)
│ │ │ │ +
244 {
│ │ │ │ +
245 if ((coord[i]<_origin[i]) || (coord[i]>=_origin[i]+_size[i]))
│ │ │ │ +
246 return false;
│ │ │ │ +
247 }
│ │ │ │ +
248 return true;
│ │ │ │ +
249 }
│ │ │ │ +
│ │ │ │ +
250
│ │ │ │ +
│ │ │ │ +
252 int index (const iTupel& coord) const
│ │ │ │ +
253 {
│ │ │ │ +
254 int index = (coord[d-1]-_origin[d-1]);
│ │ │ │ +
255
│ │ │ │ +
256 for (int i=d-2; i>=0; i--)
│ │ │ │ +
257 index = index*_size[i] + (coord[i]-_origin[i]);
│ │ │ │ +
258
│ │ │ │ +
259 return index;
│ │ │ │ +
260 }
│ │ │ │ +
│ │ │ │ +
261
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
264 {
│ │ │ │ +
265 for (int i=0; i<d; i++)
│ │ │ │ +
266 v[i] += _origin[i];
│ │ │ │ +
267 return YGridComponent<Coordinates>(v,_size,*this);
│ │ │ │ +
268 }
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
272 {
│ │ │ │ +
273 for (int i=0; i<d; i++)
│ │ │ │ +
274 {
│ │ │ │ +
275 //empty coordinate vectors result in empty intersections
│ │ │ │ +
276 if (empty() || r.empty())
│ │ │ │ + │ │ │ │ +
278 }
│ │ │ │ +
279
│ │ │ │ +
280 iTupel neworigin;
│ │ │ │ +
281 iTupel newsize;
│ │ │ │ +
282 for (int i=0; i<d; ++i)
│ │ │ │ +
283 {
│ │ │ │ +
284 neworigin[i] = std::max(origin(i),r.origin(i));
│ │ │ │ +
285 newsize[i] = std::min(max(i),r.max(i)) - neworigin[i] + 1;
│ │ │ │ +
286 }
│ │ │ │ +
287
│ │ │ │ +
288 return YGridComponent<Coordinates>(neworigin,newsize,*this);
│ │ │ │
289 }
│ │ │ │
│ │ │ │
290
│ │ │ │ -
│ │ │ │ -
297 TensorProductCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ │ -
298 {
│ │ │ │ -
299 std::array<std::vector<ct>,dim> newcoords;
│ │ │ │ -
300 std::array<int,dim> newoffset(_offset);
│ │ │ │ -
301 for (int i=0; i<dim; i++)
│ │ │ │ -
302 {
│ │ │ │ -
303 newoffset[i] *= 2;
│ │ │ │ -
304
│ │ │ │ -
305 //determine new size
│ │ │ │ -
306 int newsize = 2 * _c[i].size() - 1;
│ │ │ │ -
307 if (!keep_ovlp)
│ │ │ │ -
308 {
│ │ │ │ -
309 if (ovlp_low[i])
│ │ │ │ -
310 {
│ │ │ │ -
311 newoffset[i] += overlap;
│ │ │ │ -
312 newsize -= overlap;
│ │ │ │ -
313 }
│ │ │ │ -
314 if (ovlp_up[i])
│ │ │ │ -
315 newsize -= overlap;
│ │ │ │ -
316 }
│ │ │ │ -
317 newcoords[i].resize(newsize);
│ │ │ │ -
318
│ │ │ │ -
319 typename std::vector<ct>::const_iterator it = _c[i].begin();
│ │ │ │ -
320 typename std::vector<ct>::const_iterator end = _c[i].end()-1;
│ │ │ │ -
321 typename std::vector<ct>::iterator iit = newcoords[i].begin() - 1;
│ │ │ │ -
322 if (!keep_ovlp)
│ │ │ │ -
323 {
│ │ │ │ -
324 if (ovlp_low[i])
│ │ │ │ -
325 {
│ │ │ │ -
326 it += overlap/2;
│ │ │ │ -
327 if (overlap%2)
│ │ │ │ -
328 *(++iit) = (*it + *(++it)) / ct(2.);
│ │ │ │ -
329 }
│ │ │ │ -
330 if (ovlp_up[i])
│ │ │ │ -
331 end -= overlap/2;
│ │ │ │ -
332 }
│ │ │ │ -
333
│ │ │ │ -
334 for (;it!=end;)
│ │ │ │ -
335 {
│ │ │ │ -
336 *(++iit) = *it;
│ │ │ │ -
337 *(++iit) = (*it + *(++it)) / ct(2.);
│ │ │ │ -
338 }
│ │ │ │ -
339
│ │ │ │ -
340 if (++iit != newcoords[i].end())
│ │ │ │ -
341 *iit = *it;
│ │ │ │ -
342 }
│ │ │ │ -
343 return TensorProductCoordinates<ct,dim>(newcoords, newoffset);
│ │ │ │ -
344 }
│ │ │ │ -
│ │ │ │ -
345
│ │ │ │ -
│ │ │ │ -
347 void print(std::ostream& s) const
│ │ │ │ -
348 {
│ │ │ │ -
349 s << "Printing TensorProduct Coordinate information:" << std::endl;
│ │ │ │ -
350 for (int i=0; i<dim; i++)
│ │ │ │ -
351 {
│ │ │ │ -
352 s << "Direction " << i << ": " << _c[i].size() << " coordinates" << std::endl;
│ │ │ │ -
353 for (std::size_t j=0; j<_c[i].size(); j++)
│ │ │ │ -
354 s << _c[i][j] << std::endl;
│ │ │ │ -
355 }
│ │ │ │ -
356 }
│ │ │ │ -
│ │ │ │ -
357
│ │ │ │ -
358 private:
│ │ │ │ -
359 std::array<std::vector<ct>,dim> _c;
│ │ │ │ -
360 std::array<int,dim> _offset;
│ │ │ │ -
361 };
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
363 template<class ct, int dim>
│ │ │ │ -
│ │ │ │ -
364 inline std::ostream& operator<< (std::ostream& s, TensorProductCoordinates<ct,dim>& c)
│ │ │ │ -
365 {
│ │ │ │ -
366 c.print(s);
│ │ │ │ -
367 return s;
│ │ │ │ -
368 }
│ │ │ │ -
│ │ │ │ -
369
│ │ │ │ -
│ │ │ │ -
370 namespace Yasp {
│ │ │ │ -
371 template<class ctype, std::size_t dim>
│ │ │ │ -
372 bool checkIfMonotonous(const std::array<std::vector<ctype>, dim>& coords)
│ │ │ │ -
373 {
│ │ │ │ -
374 for (std::size_t i=0; i<dim; i++)
│ │ │ │ -
375 {
│ │ │ │ -
376 if (coords[i].size() <= 1)
│ │ │ │ -
377 return false;
│ │ │ │ -
378 for (std::size_t j=1; j<coords[i].size(); j++)
│ │ │ │ -
379 if (coords[i][j] < coords[i][j-1])
│ │ │ │ -
380 return false;
│ │ │ │ -
381 }
│ │ │ │ -
382 return true;
│ │ │ │ -
383 }
│ │ │ │ -
384 } // namespace Yasp
│ │ │ │ -
│ │ │ │ -
385} // namespace Dune
│ │ │ │ -
386
│ │ │ │ -
387#endif
│ │ │ │ +
291
│ │ │ │ +
│ │ │ │ +
298 class Iterator {
│ │ │ │ +
299 public:
│ │ │ │ +
300 // default constructor
│ │ │ │ +
301 Iterator () = default;
│ │ │ │ +
302
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
305 {
│ │ │ │ +
306 iTupel coord(r.origin());
│ │ │ │ +
307 reinit(r,coord);
│ │ │ │ +
308 }
│ │ │ │ +
│ │ │ │ +
309
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
312 {
│ │ │ │ +
313 reinit(r,coord);
│ │ │ │ +
314 }
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
318 {
│ │ │ │ +
319 // initialize to given position in index set
│ │ │ │ +
320 for (int i=0; i<d; ++i)
│ │ │ │ +
321 _coord[i] = coord[i];
│ │ │ │ +
322
│ │ │ │ +
323 // move superindex to first cell in subgrid
│ │ │ │ +
324 _superindex = 0;
│ │ │ │ +
325 for (int i=0; i<d; ++i)
│ │ │ │ +
326 _superindex += (r.offset(i)+coord[i]-r.origin(i))*r.superincrement(i);
│ │ │ │ +
327
│ │ │ │ +
328 _grid = &r;
│ │ │ │ +
329 }
│ │ │ │ +
│ │ │ │ +
330
│ │ │ │ +
│ │ │ │ +
332 bool operator== (const Iterator& i) const
│ │ │ │ +
333 {
│ │ │ │ +
334 return _superindex == i._superindex;
│ │ │ │ +
335 }
│ │ │ │ +
│ │ │ │ +
336
│ │ │ │ +
│ │ │ │ +
338 bool operator!= (const Iterator& i) const
│ │ │ │ +
339 {
│ │ │ │ +
340 return _superindex != i._superindex;
│ │ │ │ +
341 }
│ │ │ │ +
│ │ │ │ +
342
│ │ │ │ +
│ │ │ │ +
344 int superindex () const
│ │ │ │ +
345 {
│ │ │ │ +
346 return _superindex;
│ │ │ │ +
347 }
│ │ │ │ +
│ │ │ │ +
348
│ │ │ │ +
│ │ │ │ +
350 int coord (int i) const
│ │ │ │ +
351 {
│ │ │ │ +
352 return _coord[i];
│ │ │ │ +
353 }
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
│ │ │ │ +
356 const iTupel& coord () const
│ │ │ │ +
357 {
│ │ │ │ +
358 return _coord;
│ │ │ │ +
359 }
│ │ │ │ +
│ │ │ │ +
360
│ │ │ │ +
│ │ │ │ +
362 void move (int i, int dist)
│ │ │ │ +
363 {
│ │ │ │ +
364 _coord[i] += dist;
│ │ │ │ +
365 _superindex += dist*_grid->superincrement(i);
│ │ │ │ +
366 }
│ │ │ │ +
│ │ │ │ +
367
│ │ │ │ +
│ │ │ │ +
369 void move (const iTupel& dist)
│ │ │ │ +
370 {
│ │ │ │ +
371 for (int i = 0; i < d; ++i)
│ │ │ │ +
372 {
│ │ │ │ +
373 _coord[i] += dist[i];
│ │ │ │ +
374 _superindex += dist[i]*_grid->superincrement(i);
│ │ │ │ +
375 }
│ │ │ │ +
376 }
│ │ │ │ +
│ │ │ │ +
377
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
380 {
│ │ │ │ +
381 for (int i=0; i<d; i++) // check for wrap around
│ │ │ │ +
382 {
│ │ │ │ +
383 _superindex += _grid->superincrement(i); // move on cell in direction i
│ │ │ │ +
384 if (++_coord[i] <= _grid->max(i))
│ │ │ │ +
385 return *this;
│ │ │ │ +
386 else
│ │ │ │ +
387 {
│ │ │ │ +
388 _coord[i] = _grid->origin(i); // move back to origin in direction i
│ │ │ │ +
389 _superindex -= _grid->size(i) * _grid->superincrement(i);
│ │ │ │ +
390 }
│ │ │ │ +
391 }
│ │ │ │ +
392 // if we wrapped around, back to to begin(), we must put the iterator to end()
│ │ │ │ +
393 if (_coord == _grid->origin())
│ │ │ │ +
394 {
│ │ │ │ +
395 for (int i=0; i<d; i++)
│ │ │ │ +
396 _superindex += (_grid->size(i)-1) * _grid->superincrement(i);
│ │ │ │ +
397 _superindex += _grid->superincrement(0);
│ │ │ │ +
398 }
│ │ │ │ +
399 return *this;
│ │ │ │ +
400 }
│ │ │ │ +
│ │ │ │ +
401
│ │ │ │ +
│ │ │ │ +
403 ct lowerleft(int i) const
│ │ │ │ +
404 {
│ │ │ │ +
405 return _grid->getCoords()->coordinate(i,_coord[i]);
│ │ │ │ +
406 }
│ │ │ │ +
│ │ │ │ +
407
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
410 {
│ │ │ │ +
411 fTupel ll;
│ │ │ │ +
412 for (int i=0; i<d; i++)
│ │ │ │ +
413 ll[i] = lowerleft(i);
│ │ │ │ +
414 return ll;
│ │ │ │ +
415 }
│ │ │ │ +
│ │ │ │ +
416
│ │ │ │ +
│ │ │ │ +
418 ct upperright(int i) const
│ │ │ │ +
419 {
│ │ │ │ +
420 int coord = _coord[i];
│ │ │ │ +
421 if (shift(i))
│ │ │ │ +
422 coord++;
│ │ │ │ +
423 return _grid->getCoords()->coordinate(i,coord);
│ │ │ │ +
424 }
│ │ │ │ +
│ │ │ │ +
425
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
428 {
│ │ │ │ +
429 fTupel ur;
│ │ │ │ +
430 for (int i=0; i<d; i++)
│ │ │ │ +
431 ur[i] = upperright(i);
│ │ │ │ +
432 return ur;
│ │ │ │ +
433 }
│ │ │ │ +
│ │ │ │ +
434
│ │ │ │ +
│ │ │ │ +
436 ct meshsize (int i) const
│ │ │ │ +
437 {
│ │ │ │ +
438 return _grid->getCoords()->meshsize(i,_coord[i]);
│ │ │ │ +
439 }
│ │ │ │ +
│ │ │ │ +
440
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
443 {
│ │ │ │ +
444 fTupel h;
│ │ │ │ +
445 for (int i=0; i<d; i++)
│ │ │ │ +
446 h[i] = meshsize(i);
│ │ │ │ +
447 return h;
│ │ │ │ +
448 }
│ │ │ │ +
│ │ │ │ +
449
│ │ │ │ +
│ │ │ │ +
450 bool shift (int i) const
│ │ │ │ +
451 {
│ │ │ │ +
452 return _grid->shift(i);
│ │ │ │ +
453 }
│ │ │ │ +
│ │ │ │ +
454
│ │ │ │ +
│ │ │ │ +
455 std::bitset<d> shift() const
│ │ │ │ +
456 {
│ │ │ │ +
457 return _grid->shift();
│ │ │ │ +
458 }
│ │ │ │ +
│ │ │ │ +
459
│ │ │ │ +
│ │ │ │ +
460 Coordinates* coordCont() const
│ │ │ │ +
461 {
│ │ │ │ +
462 return _grid->getCoords();
│ │ │ │ +
463 }
│ │ │ │ +
│ │ │ │ +
464
│ │ │ │ +
465 protected:
│ │ │ │ + │ │ │ │ +
467 int _superindex = 0;
│ │ │ │ + │ │ │ │ +
469 };
│ │ │ │ +
│ │ │ │ +
470
│ │ │ │ +
471
│ │ │ │ +
│ │ │ │ +
472 int superindex(iTupel coord) const
│ │ │ │ +
473 {
│ │ │ │ +
474 // move superindex to first cell in subgrid
│ │ │ │ +
475 int si = 0;
│ │ │ │ +
476 for (int i=0; i<d; ++i)
│ │ │ │ +
477 si += (offset(i)+coord[i]-origin(i))*_superincrement[i];
│ │ │ │ +
478 return si;
│ │ │ │ +
479 }
│ │ │ │ +
│ │ │ │ +
480
│ │ │ │ +
│ │ │ │ +
481 int superincrement(int i) const
│ │ │ │ +
482 {
│ │ │ │ +
483 return _superincrement[i];
│ │ │ │ +
484 }
│ │ │ │ +
│ │ │ │ +
485
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
488 {
│ │ │ │ +
489 return Iterator(*this);
│ │ │ │ +
490 }
│ │ │ │ +
│ │ │ │ +
491
│ │ │ │ +
│ │ │ │ +
493 Iterator begin (const iTupel& co) const
│ │ │ │ +
494 {
│ │ │ │ +
495 return Iterator(*this,co);
│ │ │ │ +
496 }
│ │ │ │ +
│ │ │ │ +
497
│ │ │ │ +
│ │ │ │ +
499 Iterator end () const
│ │ │ │ +
500 {
│ │ │ │ +
501 iTupel last;
│ │ │ │ +
502 for (int i=0; i<d; i++)
│ │ │ │ +
503 last[i] = max(i);
│ │ │ │ +
504 last[0] += 1;
│ │ │ │ +
505 return Iterator(*this,last);
│ │ │ │ +
506 }
│ │ │ │ +
│ │ │ │ +
507
│ │ │ │ +
508 private:
│ │ │ │ +
509 iTupel _origin;
│ │ │ │ +
510 std::bitset<d> _shift;
│ │ │ │ +
511 Coordinates* _coords;
│ │ │ │ +
512 iTupel _size;
│ │ │ │ +
513 iTupel _offset;
│ │ │ │ +
514 iTupel _supersize;
│ │ │ │ +
515 iTupel _superincrement;
│ │ │ │ +
516
│ │ │ │ +
517 };
│ │ │ │ +
│ │ │ │ +
518
│ │ │ │ +
519
│ │ │ │ +
521 template <class Coordinates>
│ │ │ │ +
│ │ │ │ +
522 inline std::ostream& operator<< (std::ostream& s, YGridComponent<Coordinates> e)
│ │ │ │ +
523 {
│ │ │ │ +
524 s << "Printing YGridComponent structure:" << std::endl;
│ │ │ │ +
525 s << "Origin: " << e.origin() << std::endl;
│ │ │ │ +
526 s << "Shift: " << e.shift() << std::endl;
│ │ │ │ +
527 s << "Size: " << e.size() << std::endl;
│ │ │ │ +
528 s << "Offset: " << e.offset() << std::endl;
│ │ │ │ +
529 s << "Supersize: " << e.supersize() << std::endl;
│ │ │ │ +
530 return s;
│ │ │ │ +
531 }
│ │ │ │ +
│ │ │ │ +
532
│ │ │ │ +
534 template <class Coordinates>
│ │ │ │ +
│ │ │ │ +
535 inline std::ostream& operator<< (std::ostream& s, typename YGridComponent<Coordinates>::Iterator& e)
│ │ │ │ +
536 {
│ │ │ │ +
537 s << "Printing YGridComponent Iterator:" << std::endl << "Iterator at " << e.coord() << " (index ";
│ │ │ │ +
538 s << e.index() << "), position " << e.position();
│ │ │ │ +
539 return s;
│ │ │ │ +
540 }
│ │ │ │ +
│ │ │ │ +
541
│ │ │ │ +
549 template<class Coordinates>
│ │ │ │ +
│ │ │ │ +
550 class YGrid
│ │ │ │ +
551 {
│ │ │ │ +
552 public:
│ │ │ │ +
553 static const int dim = Coordinates::dimension;
│ │ │ │ +
554
│ │ │ │ +
555 // define data array iterator
│ │ │ │ + │ │ │ │ +
557
│ │ │ │ +
558 typedef typename std::array<int, dim> iTupel;
│ │ │ │ +
559
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
562 {
│ │ │ │ +
563 _begin = begin;
│ │ │ │ +
564 }
│ │ │ │ +
│ │ │ │ +
565
│ │ │ │ +
│ │ │ │ +
567 int shiftmapping(const std::bitset<dim>& shift) const
│ │ │ │ +
568 {
│ │ │ │ +
569 return _shiftmapping[shift.to_ulong()];
│ │ │ │ +
570 }
│ │ │ │ +
│ │ │ │ +
571
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
574 {
│ │ │ │ +
575 return _begin;
│ │ │ │ +
576 }
│ │ │ │ +
│ │ │ │ +
577
│ │ │ │ +
│ │ │ │ +
579 DAI dataEnd() const
│ │ │ │ +
580 {
│ │ │ │ +
581 return _end;
│ │ │ │ +
582 }
│ │ │ │ +
│ │ │ │ +
583
│ │ │ │ +
│ │ │ │ +
585 bool inside(const iTupel& coord, const std::bitset<dim>& shift = std::bitset<dim>()) const
│ │ │ │ +
586 {
│ │ │ │ +
587 return (_begin+_shiftmapping[shift.to_ulong()])->inside(coord);
│ │ │ │ +
588 }
│ │ │ │ +
│ │ │ │ +
589
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
594 {
│ │ │ │ +
595 public:
│ │ │ │ +
596
│ │ │ │ +
598 Iterator () = default;
│ │ │ │ +
599
│ │ │ │ +
│ │ │ │ +
601 Iterator (const YGrid<Coordinates>& yg, const std::array<int,dim>& coords, int which = 0)
│ │ │ │ +
602 : _which(which), _yg(&yg)
│ │ │ │ +
603 {
│ │ │ │ +
604 _it = typename YGridComponent<Coordinates>::Iterator(*(_yg->dataBegin()+which),coords);
│ │ │ │ +
605 }
│ │ │ │ +
│ │ │ │ +
606
│ │ │ │ +
│ │ │ │ +
608 Iterator (const YGrid<Coordinates>& yg, bool end=false) : _yg(&yg)
│ │ │ │ +
609 {
│ │ │ │ +
610 if (end)
│ │ │ │ +
611 {
│ │ │ │ +
612 _it = _yg->_itends.back();
│ │ │ │ +
613 _which = _yg->_itends.size() - 1;
│ │ │ │ +
614 }
│ │ │ │ +
615 else
│ │ │ │ +
616 {
│ │ │ │ +
617 _it = _yg->_itbegins[0];
│ │ │ │ +
618 _which = 0;
│ │ │ │ +
619 }
│ │ │ │ +
620 }
│ │ │ │ +
│ │ │ │ +
621
│ │ │ │ +
│ │ │ │ +
623 void reinit(const YGrid<Coordinates>& yg, const std::array<int,dim>& coords, int which = 0)
│ │ │ │ +
624 {
│ │ │ │ +
625 _yg = &yg;
│ │ │ │ +
626 _which = which;
│ │ │ │ +
627 _it = typename YGridComponent<Coordinates>::Iterator(*(_yg->dataBegin()+which),coords);
│ │ │ │ +
628 }
│ │ │ │ +
│ │ │ │ +
629
│ │ │ │ +
│ │ │ │ +
631 int coord (int i) const
│ │ │ │ +
632 {
│ │ │ │ +
633 return _it.coord(i);
│ │ │ │ +
634 }
│ │ │ │ +
│ │ │ │ +
635
│ │ │ │ +
│ │ │ │ +
637 const std::array<int, dim>& coord () const
│ │ │ │ +
638 {
│ │ │ │ +
639 return _it.coord();
│ │ │ │ +
640 }
│ │ │ │ +
│ │ │ │ +
641
│ │ │ │ +
│ │ │ │ +
642 typename Coordinates::ctype lowerleft(int i) const
│ │ │ │ +
643 {
│ │ │ │ +
644 return _it.lowerleft(i);
│ │ │ │ +
645 }
│ │ │ │ +
│ │ │ │ +
646
│ │ │ │ +
│ │ │ │ +
647 Dune::FieldVector<typename Coordinates::ctype,dim> lowerleft() const
│ │ │ │ +
648 {
│ │ │ │ +
649 return _it.lowerleft();
│ │ │ │ +
650 }
│ │ │ │ +
│ │ │ │ +
651
│ │ │ │ +
│ │ │ │ +
652 typename Coordinates::ctype upperright(int i) const
│ │ │ │ +
653 {
│ │ │ │ +
654 return _it.upperright(i);
│ │ │ │ +
655 }
│ │ │ │ +
│ │ │ │ +
656
│ │ │ │ +
│ │ │ │ +
657 Dune::FieldVector<typename Coordinates::ctype,dim> upperright() const
│ │ │ │ +
658 {
│ │ │ │ +
659 return _it.upperright();
│ │ │ │ +
660 }
│ │ │ │ +
│ │ │ │ +
661
│ │ │ │ +
│ │ │ │ +
663 typename Coordinates::ctype meshsize (int i) const
│ │ │ │ +
664 {
│ │ │ │ +
665 return _it.meshsize(i);
│ │ │ │ +
666 }
│ │ │ │ +
│ │ │ │ +
667
│ │ │ │ +
│ │ │ │ +
669 Dune::FieldVector<typename Coordinates::ctype,dim> meshsize() const
│ │ │ │ +
670 {
│ │ │ │ +
671 return _it.meshsize();
│ │ │ │ +
672 }
│ │ │ │ +
│ │ │ │ +
673
│ │ │ │ +
│ │ │ │ +
675 bool shift (int i) const
│ │ │ │ +
676 {
│ │ │ │ +
677 return _it.shift(i);
│ │ │ │ +
678 }
│ │ │ │ +
│ │ │ │ +
679
│ │ │ │ +
│ │ │ │ +
681 std::bitset<dim> shift () const
│ │ │ │ +
682 {
│ │ │ │ +
683 return _it.shift();
│ │ │ │ +
684 }
│ │ │ │ +
│ │ │ │ +
685
│ │ │ │ +
│ │ │ │ +
687 int superindex() const
│ │ │ │ +
688 {
│ │ │ │ +
689 // the offset of the current component has to be taken into account
│ │ │ │ +
690 return _yg->_indexOffset[_which] + _it.superindex();
│ │ │ │ +
691 }
│ │ │ │ +
│ │ │ │ +
692
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
695 {
│ │ │ │ +
696 if ((++_it == _yg->_itends[_which]) && (_which < _yg->_itends.size()-1))
│ │ │ │ +
697 _it = _yg->_itbegins[++_which];
│ │ │ │ +
698 return *this;
│ │ │ │ +
699 }
│ │ │ │ +
│ │ │ │ +
700
│ │ │ │ +
│ │ │ │ +
702 bool operator==(const Iterator& i) const
│ │ │ │ +
703 {
│ │ │ │ +
704 if (_which != i._which)
│ │ │ │ +
705 return false;
│ │ │ │ +
706 return _it == i._it;
│ │ │ │ +
707 }
│ │ │ │ +
│ │ │ │ +
708
│ │ │ │ +
│ │ │ │ +
710 bool operator!=(const Iterator& i) const
│ │ │ │ +
711 {
│ │ │ │ +
712 if (_it != i._it)
│ │ │ │ +
713 return true;
│ │ │ │ +
714 return _which != i._which;
│ │ │ │ +
715 }
│ │ │ │ +
│ │ │ │ +
716
│ │ │ │ +
│ │ │ │ +
718 int which() const
│ │ │ │ +
719 {
│ │ │ │ +
720 return _which;
│ │ │ │ +
721 }
│ │ │ │ +
│ │ │ │ +
722
│ │ │ │ +
│ │ │ │ +
724 void move(int i, int dist)
│ │ │ │ +
725 {
│ │ │ │ +
726 _it.move(i,dist);
│ │ │ │ +
727 }
│ │ │ │ +
│ │ │ │ +
728
│ │ │ │ +
│ │ │ │ +
729 void move(const iTupel& dist)
│ │ │ │ +
730 {
│ │ │ │ +
731 _it.move(dist);
│ │ │ │ +
732 }
│ │ │ │ +
│ │ │ │ +
733
│ │ │ │ +
│ │ │ │ +
734 Coordinates* coordCont() const
│ │ │ │ +
735 {
│ │ │ │ +
736 return _it.coordCont();
│ │ │ │ +
737 }
│ │ │ │ +
│ │ │ │ +
738
│ │ │ │ +
739
│ │ │ │ +
740 private:
│ │ │ │ +
741 unsigned int _which = 0;
│ │ │ │ +
742 const YGrid<Coordinates>* _yg = nullptr;
│ │ │ │ + │ │ │ │ +
744 };
│ │ │ │ +
│ │ │ │ +
745
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
748 {
│ │ │ │ +
749 return Iterator(*this);
│ │ │ │ +
750 }
│ │ │ │ +
│ │ │ │ +
751
│ │ │ │ +
│ │ │ │ +
753 Iterator begin(const std::array<int, dim>& coord, int which = 0) const
│ │ │ │ +
754 {
│ │ │ │ +
755 return Iterator(*this, coord, which);
│ │ │ │ +
756 }
│ │ │ │ +
│ │ │ │ +
757
│ │ │ │ +
│ │ │ │ +
759 Iterator end() const
│ │ │ │ +
760 {
│ │ │ │ +
761 return Iterator(*this,true);
│ │ │ │ +
762 }
│ │ │ │ +
│ │ │ │ +
763
│ │ │ │ +
│ │ │ │ +
764 int superindex(const iTupel& coord, int which) const
│ │ │ │ +
765 {
│ │ │ │ +
766 return _indexOffset[which] + (dataBegin()+which)->superindex(coord);
│ │ │ │ +
767 }
│ │ │ │ +
│ │ │ │ +
768
│ │ │ │ +
769
│ │ │ │ +
770 // finalize the ygrid construction by storing component iterators
│ │ │ │ +
│ │ │ │ +
771 void finalize(const DAI& end, int artificialOffset = 0)
│ │ │ │ +
772 {
│ │ │ │ +
773 // set the end iterator in the ygrid component array
│ │ │ │ +
774 _end = end;
│ │ │ │ +
775
│ │ │ │ +
776 _indexOffset.push_back(artificialOffset);
│ │ │ │ +
777 int k = 0;
│ │ │ │ +
778 for (DAI i=_begin; i != _end; ++i, ++k)
│ │ │ │ +
779 {
│ │ │ │ +
780 //store begin and end iterators
│ │ │ │ +
781 _itbegins.push_back(i->begin());
│ │ │ │ +
782 _itends.push_back(i->end());
│ │ │ │ +
783
│ │ │ │ +
784 // store index offset
│ │ │ │ +
785 _indexOffset.push_back(_indexOffset.back() + i->totalsize());
│ │ │ │ +
786
│ │ │ │ +
787 // store shift to component mapping
│ │ │ │ +
788 _shiftmapping[i->shift().to_ulong()] = k;
│ │ │ │ +
789 }
│ │ │ │ +
790 _indexOffset.resize(_itends.size());
│ │ │ │ +
791 }
│ │ │ │ +
│ │ │ │ +
792
│ │ │ │ +
793 private:
│ │ │ │ +
794
│ │ │ │ +
795 friend class YGrid<Coordinates>::Iterator;
│ │ │ │ +
796 DAI _begin;
│ │ │ │ +
797 DAI _end;
│ │ │ │ +
798 std::array<int,Dune::power(2,dim)> _shiftmapping;
│ │ │ │ +
799 std::vector<typename YGridComponent<Coordinates>::Iterator> _itbegins;
│ │ │ │ +
800 std::vector<typename YGridComponent<Coordinates>::Iterator> _itends;
│ │ │ │ +
801 std::vector<int> _indexOffset;
│ │ │ │ +
802 };
│ │ │ │ +
│ │ │ │ +
803
│ │ │ │ +
805 template <class Coordinates>
│ │ │ │ +
│ │ │ │ +
806 inline std::ostream& operator<< (std::ostream& s, const YGrid<Coordinates>& e)
│ │ │ │ +
807 {
│ │ │ │ +
808 s << "Printing YGrid structure:" << std::endl;
│ │ │ │ +
809 for (auto it = e.dataBegin(); it != e.dataEnd(); ++it)
│ │ │ │ +
810 s << *it << std::endl;
│ │ │ │ +
811 return s;
│ │ │ │ +
812 }
│ │ │ │ +
│ │ │ │ +
813
│ │ │ │ +
821 template<class Coordinates>
│ │ │ │ +
│ │ │ │ +
822 class YGridList
│ │ │ │ +
823 {
│ │ │ │ +
824 public:
│ │ │ │ +
825 static const int dim = Coordinates::dimension;
│ │ │ │ +
826
│ │ │ │ +
│ │ │ │ +
828 struct Intersection
│ │ │ │ +
829 {
│ │ │ │ +
831 YGridComponent<Coordinates> grid;
│ │ │ │ +
833 int rank;
│ │ │ │ +
835 int distance;
│ │ │ │ +
837 YGrid<Coordinates> yg;
│ │ │ │ +
838 };
│ │ │ │ +
│ │ │ │ +
839
│ │ │ │ +
840 // define data array iterator type
│ │ │ │ +
841 typedef typename std::array<std::deque<Intersection>, Dune::power(2,dim)>::iterator DAI;
│ │ │ │ +
842
│ │ │ │ +
843 // iterator that allows to iterate over a concatenation of deques. namely those
│ │ │ │ +
844 // that belong to the same codimension.
│ │ │ │ +
│ │ │ │ +
845 class Iterator
│ │ │ │ +
846 {
│ │ │ │ +
847 public:
│ │ │ │ +
848
│ │ │ │ +
│ │ │ │ +
850 Iterator(const YGridList<Coordinates>& ygl, bool end=false) : _end(ygl.dataEnd()), _which(ygl.dataBegin())
│ │ │ │ +
851 {
│ │ │ │ +
852 _it = _which->begin();
│ │ │ │ +
853
│ │ │ │ +
854 // advance the iterator to the first element that exists.
│ │ │ │ +
855 // some deques might be empty and should be skipped
│ │ │ │ +
856 while ((_which != _end) && (_it == _which->end()))
│ │ │ │ +
857 {
│ │ │ │ +
858 ++_which;
│ │ │ │ +
859 if (_which != _end)
│ │ │ │ +
860 _it = _which->begin();
│ │ │ │ +
861 }
│ │ │ │ +
862 // the iterator is at the end if and only if _which==_end
│ │ │ │ +
863 if (end)
│ │ │ │ +
864 {
│ │ │ │ +
865 _which = _end;
│ │ │ │ +
866 }
│ │ │ │ +
867 }
│ │ │ │ +
│ │ │ │ +
868
│ │ │ │ +
│ │ │ │ +
870 Iterator& operator++ ()
│ │ │ │ +
871 {
│ │ │ │ +
872 ++_it;
│ │ │ │ +
873 // advance the iterator to the next element that exists.
│ │ │ │ +
874 // some deques might be empty and should be skipped
│ │ │ │ +
875 while ((_which != _end) && (_it == _which->end()))
│ │ │ │ +
876 {
│ │ │ │ +
877 ++_which;
│ │ │ │ +
878 if (_which != _end)
│ │ │ │ +
879 _it = _which->begin();
│ │ │ │ +
880 }
│ │ │ │ +
881 return *this;
│ │ │ │ +
882 }
│ │ │ │ +
│ │ │ │ +
883
│ │ │ │ +
│ │ │ │ +
885 typename std::deque<Intersection>::iterator operator->() const
│ │ │ │ +
886 {
│ │ │ │ +
887 return _it;
│ │ │ │ +
888 }
│ │ │ │ +
│ │ │ │ +
889
│ │ │ │ +
│ │ │ │ +
891 typename std::deque<Intersection>::iterator operator*() const
│ │ │ │ +
892 {
│ │ │ │ +
893 return _it;
│ │ │ │ +
894 }
│ │ │ │ +
│ │ │ │ +
895
│ │ │ │ +
│ │ │ │ +
897 bool operator== (const Iterator& i) const
│ │ │ │ +
898 {
│ │ │ │ +
899 if (_which != i._which)
│ │ │ │ +
900 return false;
│ │ │ │ +
901 if (_which == _end)
│ │ │ │ +
902 return true;
│ │ │ │ +
903 return _it == i._it;
│ │ │ │ +
904 }
│ │ │ │ +
│ │ │ │ +
905
│ │ │ │ +
│ │ │ │ +
907 bool operator!= (const Iterator& i) const
│ │ │ │ +
908 {
│ │ │ │ +
909 if (_which != i._which)
│ │ │ │ +
910 return true;
│ │ │ │ +
911 if (_which == _end)
│ │ │ │ +
912 return false;
│ │ │ │ +
913 return _it != i._it;
│ │ │ │ +
914 }
│ │ │ │ +
│ │ │ │ +
915
│ │ │ │ +
916 private:
│ │ │ │ +
917 typename std::deque<Intersection>::iterator _it;
│ │ │ │ +
918 DAI _end;
│ │ │ │ +
919 DAI _which;
│ │ │ │ +
920 };
│ │ │ │ +
│ │ │ │ +
921
│ │ │ │ +
│ │ │ │ +
923 Iterator begin() const
│ │ │ │ +
924 {
│ │ │ │ +
925 return Iterator(*this);
│ │ │ │ +
926 }
│ │ │ │ +
│ │ │ │ +
927
│ │ │ │ +
│ │ │ │ +
929 Iterator end() const
│ │ │ │ +
930 {
│ │ │ │ +
931 return Iterator(*this,true);
│ │ │ │ +
932 }
│ │ │ │ +
│ │ │ │ +
933
│ │ │ │ +
│ │ │ │ +
935 void setBegin(typename std::array<std::deque<Intersection>, Dune::power(2,dim)>::iterator begin)
│ │ │ │ +
936 {
│ │ │ │ +
937 _begin = begin;
│ │ │ │ +
938 }
│ │ │ │ +
│ │ │ │ +
939
│ │ │ │ +
│ │ │ │ +
941 DAI dataBegin() const
│ │ │ │ +
942 {
│ │ │ │ +
943 return _begin;
│ │ │ │ +
944 }
│ │ │ │ +
│ │ │ │ +
945
│ │ │ │ +
│ │ │ │ +
947 DAI dataEnd() const
│ │ │ │ +
948 {
│ │ │ │ +
949 return _end;
│ │ │ │ +
950 }
│ │ │ │ +
│ │ │ │ +
951
│ │ │ │ +
│ │ │ │ +
953 int size() const
│ │ │ │ +
954 {
│ │ │ │ +
955 int count = 0;
│ │ │ │ +
956 for (DAI it = _begin; it != _end; ++it)
│ │ │ │ +
957 count += it->size();
│ │ │ │ +
958 return count;
│ │ │ │ +
959 }
│ │ │ │ +
│ │ │ │ +
960
│ │ │ │ +
│ │ │ │ +
962 void finalize(DAI end, const YGrid<Coordinates>& ygrid)
│ │ │ │ +
963 {
│ │ │ │ +
964 // Instead of directly iterating over the intersection deques, this code
│ │ │ │ +
965 // iterates over the components of an associated ygrid and works its way
│ │ │ │ +
966 // through the list of intersection deques in parallel.
│ │ │ │ +
967 // The reason for this convoluted iteration technique is that there are not
│ │ │ │ +
968 // necessarily intersections for all possible shifts, but we have to make
│ │ │ │ +
969 // sure that we stop at each shift to update the per-component index shift.
│ │ │ │ +
970 // This is ensured by iterating over the ygrid, which is guaranteed to have
│ │ │ │ +
971 // a component for each shift vector.
│ │ │ │ +
972
│ │ │ │ +
973 // set end iterator in the data array
│ │ │ │ +
974 _end = end;
│ │ │ │ +
975
│ │ │ │ +
977 int offset = 0;
│ │ │ │ +
978
│ │ │ │ +
979 DAI i = _begin;
│ │ │ │ +
980
│ │ │ │ +
981 // make sure that we have a valid deque (i.e. a non-empty one)
│ │ │ │ +
982 while (i != _end && i->begin() == i->end())
│ │ │ │ +
983 ++i;
│ │ │ │ +
984
│ │ │ │ +
985 for (auto yit = ygrid.dataBegin(); yit != ygrid.dataEnd(); ++yit)
│ │ │ │ +
986 {
│ │ │ │ +
987 if (i == _end)
│ │ │ │ +
988 break;
│ │ │ │ +
989 auto it = i->begin();
│ │ │ │ +
990 if (it->grid.shift() == yit->shift())
│ │ │ │ +
991 {
│ │ │ │ +
992 // iterate over the intersections in the deque and set the offset
│ │ │ │ +
993 for (; it != i->end(); ++it)
│ │ │ │ +
994 {
│ │ │ │ +
995 it->yg.setBegin(&(it->grid));
│ │ │ │ +
996 it->yg.finalize(&(it->grid)+1, offset);
│ │ │ │ +
997 }
│ │ │ │ +
998
│ │ │ │ +
999 // advance to next non-empty deque
│ │ │ │ +
1000 ++i;
│ │ │ │ +
1001 while (i != _end && i->begin() == i->end())
│ │ │ │ +
1002 ++i;
│ │ │ │ +
1003 }
│ │ │ │ +
1004
│ │ │ │ +
1005 // update the offset from the ygrid component
│ │ │ │ +
1006 int add = 1;
│ │ │ │ +
1007 for (int j=0; j<dim; j++)
│ │ │ │ +
1008 add *= yit->supersize(j);
│ │ │ │ +
1009 offset += add;
│ │ │ │ +
1010 }
│ │ │ │ +
1011 assert (i == end);
│ │ │ │ +
1012 }
│ │ │ │ +
│ │ │ │ +
1013
│ │ │ │ +
1014 private:
│ │ │ │ +
1015 DAI _begin;
│ │ │ │ +
1016 DAI _end;
│ │ │ │ +
1017 };
│ │ │ │ +
│ │ │ │ +
1018
│ │ │ │ +
1019} // namespace Dune
│ │ │ │ +
1020
│ │ │ │ +
1021#endif
│ │ │ │
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Container for equidistant coordinates in a YaspGrid.
Definition coordinates.hh:29
│ │ │ │ -
ct coordinate(int d, int i) const
Definition coordinates.hh:65
│ │ │ │ -
int size(int d) const
Definition coordinates.hh:73
│ │ │ │ -
static const int dimension
export dimension
Definition coordinates.hh:34
│ │ │ │ -
void print(std::ostream &s) const
print information on this container
Definition coordinates.hh:107
│ │ │ │ -
EquidistantCoordinates()
default constructor
Definition coordinates.hh:37
│ │ │ │ -
EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
Definition coordinates.hh:84
│ │ │ │ -
ct ctype
export the coordinate type
Definition coordinates.hh:32
│ │ │ │ -
EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > &s)
construct a container with all necessary information
Definition coordinates.hh:45
│ │ │ │ -
ct meshsize(int d, int i) const
Definition coordinates.hh:56
│ │ │ │ -
Container for equidistant coordinates in a YaspGrid with non-trivial origin.
Definition coordinates.hh:131
│ │ │ │ -
EquidistantOffsetCoordinates()
default constructor
Definition coordinates.hh:139
│ │ │ │ -
EquidistantOffsetCoordinates(const Dune::FieldVector< ct, dim > &lowerLeft, const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > &s)
construct a container with all necessary information
Definition coordinates.hh:149
│ │ │ │ -
EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
Definition coordinates.hh:196
│ │ │ │ -
void print(std::ostream &s) const
print information on this container
Definition coordinates.hh:219
│ │ │ │ -
ct meshsize(int d, int i) const
Definition coordinates.hh:160
│ │ │ │ -
ct origin(int d) const
Definition coordinates.hh:185
│ │ │ │ -
int size(int d) const
Definition coordinates.hh:177
│ │ │ │ -
ct ctype
export the coordinate type
Definition coordinates.hh:134
│ │ │ │ -
static const int dimension
export dimension
Definition coordinates.hh:136
│ │ │ │ -
ct coordinate(int d, int i) const
Definition coordinates.hh:169
│ │ │ │ -
Coordinate container for a tensor product YaspGrid.
Definition coordinates.hh:245
│ │ │ │ -
void print(std::ostream &s) const
print information on this container
Definition coordinates.hh:347
│ │ │ │ -
ct meshsize(int d, int i) const
Definition coordinates.hh:269
│ │ │ │ -
ct coordinate(int d, int i) const
Definition coordinates.hh:278
│ │ │ │ -
static const int dimension
export dimension
Definition coordinates.hh:250
│ │ │ │ -
TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
Definition coordinates.hh:297
│ │ │ │ -
TensorProductCoordinates(const std::array< std::vector< ct >, dim > &c, const std::array< int, dim > &offset)
construct a container with all necessary information
Definition coordinates.hh:261
│ │ │ │ -
TensorProductCoordinates()
the default constructor
Definition coordinates.hh:253
│ │ │ │ -
ct ctype
export the coordinate type
Definition coordinates.hh:248
│ │ │ │ -
int size(int d) const
Definition coordinates.hh:286
│ │ │ │ +
std::array< int, d > sizeArray(const std::array< std::vector< ct >, d > &v)
Definition ygrid.hh:29
│ │ │ │ +
Definition ygrid.hh:75
│ │ │ │ +
int index(const iTupel &coord) const
given a tupel compute its index in the lexicographic numbering
Definition ygrid.hh:252
│ │ │ │ +
int offset(int i) const
Return offset to origin of enclosing grid.
Definition ygrid.hh:173
│ │ │ │ +
std::array< int, d > iTupel
Definition ygrid.hh:81
│ │ │ │ +
YGridComponent< Coordinates > move(iTupel v) const
return grid moved by the vector v
Definition ygrid.hh:263
│ │ │ │ +
iTupel size() const
retrun size
Definition ygrid.hh:203
│ │ │ │ +
static const int d
Definition ygrid.hh:79
│ │ │ │ +
YGridComponent< Coordinates > intersection(const YGridComponent< Coordinates > &r) const
Return YGridComponent of supergrid of self which is the intersection of self and another YGridCompone...
Definition ygrid.hh:271
│ │ │ │ +
Coordinates::ctype ct
Definition ygrid.hh:78
│ │ │ │ +
Coordinates * getCoords() const
Definition ygrid.hh:167
│ │ │ │ +
int min(int i) const
Return minimum index in direction i.
Definition ygrid.hh:218
│ │ │ │ +
YGridComponent(iTupel origin, iTupel size)
make ygrid without coordinate information
Definition ygrid.hh:99
│ │ │ │ +
int totalsize() const
Return total size of index set which is the product of all size per direction.
Definition ygrid.hh:209
│ │ │ │ +
YGridComponent(iTupel origin, iTupel size, const YGridComponent< Coordinates > &enclosing)
make a subgrid by taking coordinates from a larger grid
Definition ygrid.hh:108
│ │ │ │ +
const iTupel & supersize() const
return size of enclosing grid
Definition ygrid.hh:191
│ │ │ │ +
YGridComponent(iTupel origin, std::bitset< d > shift, Coordinates *coords, iTupel size, iTupel offset, iTupel supersize)
Make YGridComponent by giving all parameters.
Definition ygrid.hh:131
│ │ │ │ +
int superindex(iTupel coord) const
Definition ygrid.hh:472
│ │ │ │ +
Iterator begin() const
return iterator to first element of index set
Definition ygrid.hh:487
│ │ │ │ +
FieldVector< ct, d > fTupel
Definition ygrid.hh:82
│ │ │ │ +
Iterator begin(const iTupel &co) const
return iterator to given element of index set
Definition ygrid.hh:493
│ │ │ │ +
YGridComponent()
make uninitialized ygrid
Definition ygrid.hh:85
│ │ │ │ +
int origin(int i) const
Return origin in direction i.
Definition ygrid.hh:144
│ │ │ │ +
int supersize(int i) const
return size of enclosing grid
Definition ygrid.hh:185
│ │ │ │ +
int size(int i) const
return size in direction i
Definition ygrid.hh:197
│ │ │ │ +
int max(int i) const
Return maximum index in direction i.
Definition ygrid.hh:224
│ │ │ │ +
const std::bitset< d > & shift() const
Return shift tupel.
Definition ygrid.hh:162
│ │ │ │ +
int superincrement(int i) const
Definition ygrid.hh:481
│ │ │ │ +
bool shift(int i) const
Return shift in direction i.
Definition ygrid.hh:156
│ │ │ │ +
Iterator end() const
return subiterator to last element of index set
Definition ygrid.hh:499
│ │ │ │ +
bool inside(const iTupel &coord) const
given a coordinate, return true if it is in the grid
Definition ygrid.hh:241
│ │ │ │ +
bool empty() const
Return true if YGrid is empty, i.e. has size 0 in all directions.
Definition ygrid.hh:230
│ │ │ │ +
const iTupel & offset() const
Return offset to origin of enclosing grid.
Definition ygrid.hh:179
│ │ │ │ +
const iTupel & origin() const
return reference to origin
Definition ygrid.hh:150
│ │ │ │ +
Definition ygrid.hh:298
│ │ │ │ +
Iterator & operator++()
Increment iterator to next cell with position.
Definition ygrid.hh:379
│ │ │ │ +
int superindex() const
Return consecutive index in enclosing grid.
Definition ygrid.hh:344
│ │ │ │ +
bool operator!=(const Iterator &i) const
Return true when two iterators over the same grid are not equal (!).
Definition ygrid.hh:338
│ │ │ │ +
ct lowerleft(int i) const
Return ith component of lower left corner of the entity associated with the current coordinates and s...
Definition ygrid.hh:403
│ │ │ │ +
std::bitset< d > shift() const
Definition ygrid.hh:455
│ │ │ │ + │ │ │ │ +
ct meshsize(int i) const
Return meshsize in direction i.
Definition ygrid.hh:436
│ │ │ │ +
bool shift(int i) const
Definition ygrid.hh:450
│ │ │ │ +
const YGridComponent< Coordinates > * _grid
Definition ygrid.hh:468
│ │ │ │ +
void reinit(const YGridComponent< Coordinates > &r, const iTupel &coord)
reinitialize iterator to given position
Definition ygrid.hh:317
│ │ │ │ +
void move(const iTupel &dist)
move this iterator dist cells in direction i
Definition ygrid.hh:369
│ │ │ │ +
fTupel meshsize() const
Return meshsize of current cell as reference.
Definition ygrid.hh:442
│ │ │ │ +
fTupel lowerleft() const
Return lower left corner of the entity associated with the current coordinates and shift.
Definition ygrid.hh:409
│ │ │ │ +
Coordinates * coordCont() const
Definition ygrid.hh:460
│ │ │ │ +
iTupel _coord
current position in index set
Definition ygrid.hh:466
│ │ │ │ +
const iTupel & coord() const
Return coordinate of the cell as reference (do not modify).
Definition ygrid.hh:356
│ │ │ │ +
void move(int i, int dist)
move this iterator dist cells in direction i
Definition ygrid.hh:362
│ │ │ │ +
Iterator(const YGridComponent< Coordinates > &r)
Make iterator pointing to first cell in a grid.
Definition ygrid.hh:304
│ │ │ │ +
ct upperright(int i) const
Return ith component of upper right corder of the entity associated with the current coordinates and ...
Definition ygrid.hh:418
│ │ │ │ +
int coord(int i) const
Return coordinate of the cell in direction i.
Definition ygrid.hh:350
│ │ │ │ +
fTupel upperright() const
Return upper right corder of the entity associated with the current coordinates and shift.
Definition ygrid.hh:427
│ │ │ │ +
bool operator==(const Iterator &i) const
Return true when two iterators over the same grid are equal (!).
Definition ygrid.hh:332
│ │ │ │ +
Iterator(const YGridComponent< Coordinates > &r, const iTupel &coord)
Make iterator pointing to given cell in a grid.
Definition ygrid.hh:311
│ │ │ │ +
int _superindex
consecutive index in enclosing grid
Definition ygrid.hh:467
│ │ │ │ +
implements a collection of YGridComponents which form a codimension Entities of given codimension c n...
Definition ygrid.hh:551
│ │ │ │ +
int shiftmapping(const std::bitset< dim > &shift) const
get which component belongs to a given shift vector
Definition ygrid.hh:567
│ │ │ │ +
DAI dataBegin() const
get start iterator in the data array
Definition ygrid.hh:573
│ │ │ │ +
Iterator begin() const
return begin iterator for the codimension and partition the ygrid represents
Definition ygrid.hh:747
│ │ │ │ +
DAI dataEnd() const
get end iterator in the data array
Definition ygrid.hh:579
│ │ │ │ +
std::array< int, dim > iTupel
Definition ygrid.hh:558
│ │ │ │ +
static const int dim
Definition ygrid.hh:553
│ │ │ │ +
void setBegin(DAI begin)
set start iterator in the data array
Definition ygrid.hh:561
│ │ │ │ +
bool inside(const iTupel &coord, const std::bitset< dim > &shift=std::bitset< dim >()) const
decide whether a coordinate is in the grid (depending on the component)
Definition ygrid.hh:585
│ │ │ │ +
int superindex(const iTupel &coord, int which) const
Definition ygrid.hh:764
│ │ │ │ +
Iterator begin(const std::array< int, dim > &coord, int which=0) const
return iterator pointint to a specified position
Definition ygrid.hh:753
│ │ │ │ +
YGridComponent< Coordinates > * DAI
Definition ygrid.hh:556
│ │ │ │ +
void finalize(const DAI &end, int artificialOffset=0)
Definition ygrid.hh:771
│ │ │ │ +
Iterator end() const
return end iterator for the codimension and partition the ygrid represents
Definition ygrid.hh:759
│ │ │ │ +
Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid.
Definition ygrid.hh:594
│ │ │ │ +
Iterator()=default
default constructor
│ │ │ │ +
int which() const
return the current component number
Definition ygrid.hh:718
│ │ │ │ +
void move(int i, int dist)
move the grid, this is only done and needed for codim 0
Definition ygrid.hh:724
│ │ │ │ +
bool operator==(const Iterator &i) const
compare two iterators: component has to match
Definition ygrid.hh:702
│ │ │ │ +
Coordinates::ctype lowerleft(int i) const
Definition ygrid.hh:642
│ │ │ │ +
Dune::FieldVector< typename Coordinates::ctype, dim > meshsize() const
return the current meshsize vector
Definition ygrid.hh:669
│ │ │ │ +
Iterator(const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, int which=0)
construct an iterator from coordinates and component
Definition ygrid.hh:601
│ │ │ │ +
Coordinates * coordCont() const
Definition ygrid.hh:734
│ │ │ │ +
Coordinates::ctype upperright(int i) const
Definition ygrid.hh:652
│ │ │ │ +
std::bitset< dim > shift() const
return the shift vector
Definition ygrid.hh:681
│ │ │ │ +
bool shift(int i) const
return the shift in direction i
Definition ygrid.hh:675
│ │ │ │ +
bool operator!=(const Iterator &i) const
compare two iterators: component has to match
Definition ygrid.hh:710
│ │ │ │ +
void move(const iTupel &dist)
Definition ygrid.hh:729
│ │ │ │ +
Dune::FieldVector< typename Coordinates::ctype, dim > upperright() const
Definition ygrid.hh:657
│ │ │ │ +
const std::array< int, dim > & coord() const
return coordinate array at the current position
Definition ygrid.hh:637
│ │ │ │ +
Iterator & operator++()
increment to the next entity jumping to next component if necessary
Definition ygrid.hh:694
│ │ │ │ +
Coordinates::ctype meshsize(int i) const
return the current meshsize in direction i
Definition ygrid.hh:663
│ │ │ │ +
int coord(int i) const
return coordinate at the current position (direction i)
Definition ygrid.hh:631
│ │ │ │ +
Iterator(const YGrid< Coordinates > &yg, bool end=false)
create an iterator to start or end of the codimension
Definition ygrid.hh:608
│ │ │ │ +
Dune::FieldVector< typename Coordinates::ctype, dim > lowerleft() const
Definition ygrid.hh:647
│ │ │ │ +
int superindex() const
return the superindex
Definition ygrid.hh:687
│ │ │ │ +
void reinit(const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, int which=0)
reinitializes an iterator, as if it was just constructed.
Definition ygrid.hh:623
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,426 +1,1253 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -coordinates.hh │ │ │ │ │ +ygrid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRID_COORDINATES_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -21namespace _D_u_n_e │ │ │ │ │ -22{ │ │ │ │ │ -27 template │ │ │ │ │ -_2_8 class _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -29 { │ │ │ │ │ -30 public: │ │ │ │ │ -_3_2 typedef ct _c_t_y_p_e; │ │ │ │ │ -_3_4 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -35 │ │ │ │ │ -_3_7 _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ │ -38 │ │ │ │ │ -_4_5 _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s(const Dune::FieldVector& upperRight, const │ │ │ │ │ -std::array& s) │ │ │ │ │ -46 : _s(s) │ │ │ │ │ -47 { │ │ │ │ │ -48 for (int i=0; i _r_e_f_i_n_e(std::bitset ovlp_low, std:: │ │ │ │ │ -bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ -85 { │ │ │ │ │ -86 //determine new size and meshsize │ │ │ │ │ -87 std::array news; │ │ │ │ │ -88 Dune::FieldVector newUpperRight; │ │ │ │ │ -89 │ │ │ │ │ -90 for (int i=0; i(newUpperRight,news); │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_7 void _p_r_i_n_t(std::ostream& s) const │ │ │ │ │ -108 { │ │ │ │ │ -109 s << "Printing equidistant coordinate information:" << std::endl; │ │ │ │ │ -110 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl; │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -113 private: │ │ │ │ │ -114 Dune::FieldVector _h; │ │ │ │ │ -115 std::array _s; │ │ │ │ │ -116 }; │ │ │ │ │ -117 │ │ │ │ │ -118 template │ │ │ │ │ -_1_1_9 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ -_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>& c) │ │ │ │ │ -120 { │ │ │ │ │ -121 c._p_r_i_n_t(s); │ │ │ │ │ -122 return s; │ │ │ │ │ -123 } │ │ │ │ │ -124 │ │ │ │ │ -129 template │ │ │ │ │ -_1_3_0 class _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -131 { │ │ │ │ │ -132 public: │ │ │ │ │ -_1_3_4 typedef ct _c_t_y_p_e; │ │ │ │ │ -_1_3_6 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -137 │ │ │ │ │ -_1_3_9 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ │ -140 │ │ │ │ │ -_1_4_9 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s(const Dune::FieldVector& lowerLeft, │ │ │ │ │ -const Dune::FieldVector& upperRight, const std::array& s) │ │ │ │ │ -150 : _origin(lowerLeft), _s(s) │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +21namespace _D_u_n_e { │ │ │ │ │ +22 │ │ │ │ │ +23 namespace Yasp { │ │ │ │ │ +28 template │ │ │ │ │ +_2_9 std::array _s_i_z_e_A_r_r_a_y(const std::array,d>& v) │ │ │ │ │ +30 { │ │ │ │ │ +31 std::array tmp; │ │ │ │ │ +32 for (int i=0; i │ │ │ │ │ +_7_4 class _Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ +75 { │ │ │ │ │ +76 public: │ │ │ │ │ +77 //extract coordinate type and dimension from the coordinate container │ │ │ │ │ +_7_8 typedef typename Coordinates::ctype _c_t; │ │ │ │ │ +_7_9 static const int _d = Coordinates::dimension; │ │ │ │ │ +80 │ │ │ │ │ +_8_1 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +_8_2 typedef FieldVector _f_T_u_p_e_l; │ │ │ │ │ +83 │ │ │ │ │ +_8_5 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t () : _shift(0ULL) │ │ │ │ │ +86 { │ │ │ │ │ +87 std::fill(_origin.begin(), _origin.end(), 0); │ │ │ │ │ +88 std::fill(_offset.begin(), _offset.end(), 0); │ │ │ │ │ +89 std::fill(_size.begin(), _size.end(), 0); │ │ │ │ │ +90 } │ │ │ │ │ +91 │ │ │ │ │ +_9_9 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t(_i_T_u_p_e_l _o_r_i_g_i_n, _i_T_u_p_e_l _s_i_z_e) │ │ │ │ │ +100 : _origin(_o_r_i_g_i_n), _size(_s_i_z_e) │ │ │ │ │ +101 {} │ │ │ │ │ +102 │ │ │ │ │ +_1_0_8 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t (_i_T_u_p_e_l _o_r_i_g_i_n, _i_T_u_p_e_l _s_i_z_e, const │ │ │ │ │ +_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& enclosing) │ │ │ │ │ +109 : _origin(_o_r_i_g_i_n), _shift(enclosing._s_h_i_f_t()), _coords(enclosing._g_e_t_C_o_o_r_d_s │ │ │ │ │ +()), _size(_s_i_z_e), _supersize(enclosing._s_u_p_e_r_s_i_z_e()) │ │ │ │ │ +110 { │ │ │ │ │ +111 for (int i=0; i<_d; i++) │ │ │ │ │ +112 _offset[i] = _o_r_i_g_i_n[i] - enclosing._o_r_i_g_i_n(i) + enclosing._o_f_f_s_e_t(i); │ │ │ │ │ +113 │ │ │ │ │ +114 // compute superincrements │ │ │ │ │ +115 int inc = 1; │ │ │ │ │ +116 for (int i=0; i<_d; ++i) │ │ │ │ │ +117 { │ │ │ │ │ +118 _superincrement[i] = inc; │ │ │ │ │ +119 inc *= _supersize[i]; │ │ │ │ │ +120 } │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +_1_3_1 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t (_i_T_u_p_e_l _o_r_i_g_i_n, std::bitset _s_h_i_f_t, Coordinates* coords, │ │ │ │ │ +_i_T_u_p_e_l _s_i_z_e, _i_T_u_p_e_l _o_f_f_s_e_t, _i_T_u_p_e_l _s_u_p_e_r_s_i_z_e) │ │ │ │ │ +132 : _origin(_o_r_i_g_i_n), _shift(_s_h_i_f_t), _coords(coords), _size(_s_i_z_e), _offset │ │ │ │ │ +(_o_f_f_s_e_t), _supersize(_s_u_p_e_r_s_i_z_e) │ │ │ │ │ +133 { │ │ │ │ │ +134 // compute superincrements │ │ │ │ │ +135 int inc = 1; │ │ │ │ │ +136 for (int i=0; i<_d; ++i) │ │ │ │ │ +137 { │ │ │ │ │ +138 _superincrement[i] = inc; │ │ │ │ │ +139 inc *= _supersize[i]; │ │ │ │ │ +140 } │ │ │ │ │ +141 } │ │ │ │ │ +142 │ │ │ │ │ +_1_4_4 int _o_r_i_g_i_n (int i) const │ │ │ │ │ +145 { │ │ │ │ │ +146 return _origin[i]; │ │ │ │ │ +147 } │ │ │ │ │ +148 │ │ │ │ │ +_1_5_0 const _i_T_u_p_e_l& _o_r_i_g_i_n () const │ │ │ │ │ 151 { │ │ │ │ │ -152 for (int i=0; i& _s_h_i_f_t () const │ │ │ │ │ +163 { │ │ │ │ │ +164 return _shift; │ │ │ │ │ +165 } │ │ │ │ │ +166 │ │ │ │ │ +_1_6_7 Coordinates* _g_e_t_C_o_o_r_d_s() const │ │ │ │ │ +168 { │ │ │ │ │ +169 return _coords; │ │ │ │ │ +170 } │ │ │ │ │ +171 │ │ │ │ │ +_1_7_3 int _o_f_f_s_e_t (int i) const │ │ │ │ │ +174 { │ │ │ │ │ +175 return _offset[i]; │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 const _i_T_u_p_e_l & _o_f_f_s_e_t () const │ │ │ │ │ +180 { │ │ │ │ │ +181 return _offset; │ │ │ │ │ +182 } │ │ │ │ │ +183 │ │ │ │ │ +_1_8_5 int _s_u_p_e_r_s_i_z_e (int i) const │ │ │ │ │ 186 { │ │ │ │ │ -187 return _origin[d]; │ │ │ │ │ +187 return _supersize[i]; │ │ │ │ │ 188 } │ │ │ │ │ 189 │ │ │ │ │ -_1_9_6 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_> _r_e_f_i_n_e(std::bitset ovlp_low, │ │ │ │ │ -std::bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ -197 { │ │ │ │ │ -198 //determine new size and meshsize │ │ │ │ │ -199 std::array news; │ │ │ │ │ -200 Dune::FieldVector newUpperRight; │ │ │ │ │ +_1_9_1 const _i_T_u_p_e_l & _s_u_p_e_r_s_i_z_e () const │ │ │ │ │ +192 { │ │ │ │ │ +193 return _supersize; │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +_1_9_7 int _s_i_z_e (int i) const │ │ │ │ │ +198 { │ │ │ │ │ +199 return _size[i]; │ │ │ │ │ +200 } │ │ │ │ │ 201 │ │ │ │ │ -202 for (int i=0; i(_origin,newUpperRight,news); │ │ │ │ │ -216 } │ │ │ │ │ -217 │ │ │ │ │ -_2_1_9 void _p_r_i_n_t(std::ostream& s) const │ │ │ │ │ -220 { │ │ │ │ │ -221 s << "Printing equidistant coordinate information:" << std::endl; │ │ │ │ │ -222 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl; │ │ │ │ │ -223 s << "Offset to origin: " << _origin << std::endl; │ │ │ │ │ -224 } │ │ │ │ │ -225 │ │ │ │ │ -226 private: │ │ │ │ │ -227 Dune::FieldVector _origin; │ │ │ │ │ -228 Dune::FieldVector _h; │ │ │ │ │ -229 std::array _s; │ │ │ │ │ -230 }; │ │ │ │ │ -231 │ │ │ │ │ -232 template │ │ │ │ │ -_2_3_3 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ -_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>& c) │ │ │ │ │ -234 { │ │ │ │ │ -235 c._p_r_i_n_t(s); │ │ │ │ │ -236 return s; │ │ │ │ │ -237 } │ │ │ │ │ -238 │ │ │ │ │ -243 template │ │ │ │ │ -_2_4_4 class _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -245 { │ │ │ │ │ -246 public: │ │ │ │ │ -_2_4_8 typedef ct _c_t_y_p_e; │ │ │ │ │ -_2_5_0 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -251 │ │ │ │ │ -_2_5_3 _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ │ -254 │ │ │ │ │ -_2_6_1 _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s(const std::array,dim>& c, const │ │ │ │ │ -std::array& offset) │ │ │ │ │ -262 : _c(c),_offset(offset) │ │ │ │ │ -263 {} │ │ │ │ │ -264 │ │ │ │ │ -_2_6_9 inline ct _m_e_s_h_s_i_z_e(int d, int i) const │ │ │ │ │ -270 { │ │ │ │ │ -271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]]; │ │ │ │ │ -272 } │ │ │ │ │ -273 │ │ │ │ │ -_2_7_8 inline ct _c_o_o_r_d_i_n_a_t_e(int d, int i) const │ │ │ │ │ -279 { │ │ │ │ │ -280 return _c[d][i-_offset[d]]; │ │ │ │ │ -281 } │ │ │ │ │ -282 │ │ │ │ │ -_2_8_6 inline int _s_i_z_e(int d) const │ │ │ │ │ -287 { │ │ │ │ │ -288 return _c[d].size() - 1; │ │ │ │ │ +_2_0_3 _i_T_u_p_e_l _s_i_z_e () const │ │ │ │ │ +204 { │ │ │ │ │ +205 return _size; │ │ │ │ │ +206 } │ │ │ │ │ +207 │ │ │ │ │ +_2_0_9 int _t_o_t_a_l_s_i_z_e () const │ │ │ │ │ +210 { │ │ │ │ │ +211 int s=1; │ │ │ │ │ +212 for (int i=0; i<_d; ++i) │ │ │ │ │ +213 s *= _s_i_z_e(i); │ │ │ │ │ +214 return s; │ │ │ │ │ +215 } │ │ │ │ │ +216 │ │ │ │ │ +_2_1_8 int _m_i_n (int i) const │ │ │ │ │ +219 { │ │ │ │ │ +220 return _origin[i]; │ │ │ │ │ +221 } │ │ │ │ │ +222 │ │ │ │ │ +_2_2_4 int _m_a_x (int i) const │ │ │ │ │ +225 { │ │ │ │ │ +226 return _origin[i] + _s_i_z_e(i) - 1; │ │ │ │ │ +227 } │ │ │ │ │ +228 │ │ │ │ │ +_2_3_0 bool _e_m_p_t_y () const │ │ │ │ │ +231 { │ │ │ │ │ +232 for (int i=0; i<_d; ++i) │ │ │ │ │ +233 { │ │ │ │ │ +234 if (_s_i_z_e(i) == 0) │ │ │ │ │ +235 return true; │ │ │ │ │ +236 } │ │ │ │ │ +237 return false; │ │ │ │ │ +238 } │ │ │ │ │ +239 │ │ │ │ │ +_2_4_1 bool _i_n_s_i_d_e (const _i_T_u_p_e_l& coord) const │ │ │ │ │ +242 { │ │ │ │ │ +243 for (int i=0; i<_d; i++) │ │ │ │ │ +244 { │ │ │ │ │ +245 if ((coord[i]<_origin[i]) || (coord[i]>=_origin[i]+_size[i])) │ │ │ │ │ +246 return false; │ │ │ │ │ +247 } │ │ │ │ │ +248 return true; │ │ │ │ │ +249 } │ │ │ │ │ +250 │ │ │ │ │ +_2_5_2 int _i_n_d_e_x (const _i_T_u_p_e_l& coord) const │ │ │ │ │ +253 { │ │ │ │ │ +254 int _i_n_d_e_x = (coord[_d-1]-_origin[_d-1]); │ │ │ │ │ +255 │ │ │ │ │ +256 for (int i=_d-2; i>=0; i--) │ │ │ │ │ +257 _i_n_d_e_x = _i_n_d_e_x*_size[i] + (coord[i]-_origin[i]); │ │ │ │ │ +258 │ │ │ │ │ +259 return _i_n_d_e_x; │ │ │ │ │ +260 } │ │ │ │ │ +261 │ │ │ │ │ +_2_6_3 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> _m_o_v_e (_i_T_u_p_e_l v) const │ │ │ │ │ +264 { │ │ │ │ │ +265 for (int i=0; i<_d; i++) │ │ │ │ │ +266 v[i] += _origin[i]; │ │ │ │ │ +267 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(v,_size,*this); │ │ │ │ │ +268 } │ │ │ │ │ +269 │ │ │ │ │ +_2_7_1 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> _i_n_t_e_r_s_e_c_t_i_o_n (const │ │ │ │ │ +_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r) const │ │ │ │ │ +272 { │ │ │ │ │ +273 for (int i=0; i<_d; i++) │ │ │ │ │ +274 { │ │ │ │ │ +275 //empty coordinate vectors result in empty intersections │ │ │ │ │ +276 if (_e_m_p_t_y() || r._e_m_p_t_y()) │ │ │ │ │ +277 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(); │ │ │ │ │ +278 } │ │ │ │ │ +279 │ │ │ │ │ +280 _i_T_u_p_e_l neworigin; │ │ │ │ │ +281 _i_T_u_p_e_l newsize; │ │ │ │ │ +282 for (int i=0; i<_d; ++i) │ │ │ │ │ +283 { │ │ │ │ │ +284 neworigin[i] = std::max(_o_r_i_g_i_n(i),r._o_r_i_g_i_n(i)); │ │ │ │ │ +285 newsize[i] = std::min(_m_a_x(i),r._m_a_x(i)) - neworigin[i] + 1; │ │ │ │ │ +286 } │ │ │ │ │ +287 │ │ │ │ │ +288 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(neworigin,newsize,*this); │ │ │ │ │ 289 } │ │ │ │ │ 290 │ │ │ │ │ -_2_9_7 _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_> _r_e_f_i_n_e(std::bitset ovlp_low, std:: │ │ │ │ │ -bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ -298 { │ │ │ │ │ -299 std::array,dim> newcoords; │ │ │ │ │ -300 std::array newoffset(_offset); │ │ │ │ │ -301 for (int i=0; i::const_iterator it = _c[i].begin(); │ │ │ │ │ -320 typename std::vector::const_iterator end = _c[i].end()-1; │ │ │ │ │ -321 typename std::vector::iterator iit = newcoords[i].begin() - 1; │ │ │ │ │ -322 if (!keep_ovlp) │ │ │ │ │ -323 { │ │ │ │ │ -324 if (ovlp_low[i]) │ │ │ │ │ -325 { │ │ │ │ │ -326 it += overlap/2; │ │ │ │ │ -327 if (overlap%2) │ │ │ │ │ -328 *(++iit) = (*it + *(++it)) / ct(2.); │ │ │ │ │ +291 │ │ │ │ │ +_2_9_8 class _I_t_e_r_a_t_o_r { │ │ │ │ │ +299 public: │ │ │ │ │ +300 // default constructor │ │ │ │ │ +_3_0_1 _I_t_e_r_a_t_o_r () = default; │ │ │ │ │ +302 │ │ │ │ │ +_3_0_4 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r) : ___g_r_i_d(&r) │ │ │ │ │ +305 { │ │ │ │ │ +306 _i_T_u_p_e_l _c_o_o_r_d(r._o_r_i_g_i_n()); │ │ │ │ │ +307 _r_e_i_n_i_t(r,_c_o_o_r_d); │ │ │ │ │ +308 } │ │ │ │ │ +309 │ │ │ │ │ +_3_1_1 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r, const _i_T_u_p_e_l& _c_o_o_r_d) │ │ │ │ │ +312 { │ │ │ │ │ +313 _r_e_i_n_i_t(r,_c_o_o_r_d); │ │ │ │ │ +314 } │ │ │ │ │ +315 │ │ │ │ │ +_3_1_7 void _r_e_i_n_i_t (const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r, const _i_T_u_p_e_l& _c_o_o_r_d) │ │ │ │ │ +318 { │ │ │ │ │ +319 // initialize to given position in index set │ │ │ │ │ +320 for (int i=0; i<_d; ++i) │ │ │ │ │ +321 ___c_o_o_r_d[i] = _c_o_o_r_d[i]; │ │ │ │ │ +322 │ │ │ │ │ +323 // move superindex to first cell in subgrid │ │ │ │ │ +324 ___s_u_p_e_r_i_n_d_e_x = 0; │ │ │ │ │ +325 for (int i=0; i<_d; ++i) │ │ │ │ │ +326 ___s_u_p_e_r_i_n_d_e_x += (r._o_f_f_s_e_t(i)+_c_o_o_r_d[i]-r._o_r_i_g_i_n(i))*r._s_u_p_e_r_i_n_c_r_e_m_e_n_t(i); │ │ │ │ │ +327 │ │ │ │ │ +328 ___g_r_i_d = &r; │ │ │ │ │ 329 } │ │ │ │ │ -330 if (ovlp_up[i]) │ │ │ │ │ -331 end -= overlap/2; │ │ │ │ │ -332 } │ │ │ │ │ -333 │ │ │ │ │ -334 for (;it!=end;) │ │ │ │ │ -335 { │ │ │ │ │ -336 *(++iit) = *it; │ │ │ │ │ -337 *(++iit) = (*it + *(++it)) / ct(2.); │ │ │ │ │ -338 } │ │ │ │ │ -339 │ │ │ │ │ -340 if (++iit != newcoords[i].end()) │ │ │ │ │ -341 *iit = *it; │ │ │ │ │ -342 } │ │ │ │ │ -343 return _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>(newcoords, newoffset); │ │ │ │ │ -344 } │ │ │ │ │ -345 │ │ │ │ │ -_3_4_7 void _p_r_i_n_t(std::ostream& s) const │ │ │ │ │ -348 { │ │ │ │ │ -349 s << "Printing TensorProduct Coordinate information:" << std::endl; │ │ │ │ │ -350 for (int i=0; i,dim> _c; │ │ │ │ │ -360 std::array _offset; │ │ │ │ │ -361 }; │ │ │ │ │ -362 │ │ │ │ │ -363 template │ │ │ │ │ -_3_6_4 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ -_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>& c) │ │ │ │ │ -365 { │ │ │ │ │ -366 c._p_r_i_n_t(s); │ │ │ │ │ -367 return s; │ │ │ │ │ -368 } │ │ │ │ │ -369 │ │ │ │ │ -_3_7_0 namespace Yasp { │ │ │ │ │ -371 template │ │ │ │ │ -372 bool checkIfMonotonous(const std::array, dim>& coords) │ │ │ │ │ -373 { │ │ │ │ │ -374 for (std::size_t i=0; isuperincrement(i); │ │ │ │ │ +366 } │ │ │ │ │ +367 │ │ │ │ │ +_3_6_9 void _m_o_v_e (const _i_T_u_p_e_l& dist) │ │ │ │ │ +370 { │ │ │ │ │ +371 for (int i = 0; i < _d; ++i) │ │ │ │ │ +372 { │ │ │ │ │ +373 ___c_o_o_r_d[i] += dist[i]; │ │ │ │ │ +374 ___s_u_p_e_r_i_n_d_e_x += dist[i]*___g_r_i_d->superincrement(i); │ │ │ │ │ +375 } │ │ │ │ │ +376 } │ │ │ │ │ +377 │ │ │ │ │ +_3_7_9 _I_t_e_r_a_t_o_r& _o_p_e_r_a_t_o_r_+_+_ () │ │ │ │ │ +380 { │ │ │ │ │ +381 for (int i=0; i<_d; i++) // check for wrap around │ │ │ │ │ +382 { │ │ │ │ │ +383 ___s_u_p_e_r_i_n_d_e_x += ___g_r_i_d->superincrement(i); // move on cell in direction i │ │ │ │ │ +384 if (++___c_o_o_r_d[i] <= ___g_r_i_d->max(i)) │ │ │ │ │ +385 return *this; │ │ │ │ │ +386 else │ │ │ │ │ +387 { │ │ │ │ │ +388 ___c_o_o_r_d[i] = ___g_r_i_d->origin(i); // move back to origin in direction i │ │ │ │ │ +389 ___s_u_p_e_r_i_n_d_e_x -= ___g_r_i_d->size(i) * ___g_r_i_d->superincrement(i); │ │ │ │ │ +390 } │ │ │ │ │ +391 } │ │ │ │ │ +392 // if we wrapped around, back to to begin(), we must put the iterator to │ │ │ │ │ +end() │ │ │ │ │ +393 if (___c_o_o_r_d == ___g_r_i_d->origin()) │ │ │ │ │ +394 { │ │ │ │ │ +395 for (int i=0; i<_d; i++) │ │ │ │ │ +396 ___s_u_p_e_r_i_n_d_e_x += (___g_r_i_d->size(i)-1) * ___g_r_i_d->superincrement(i); │ │ │ │ │ +397 ___s_u_p_e_r_i_n_d_e_x += ___g_r_i_d->superincrement(0); │ │ │ │ │ +398 } │ │ │ │ │ +399 return *this; │ │ │ │ │ +400 } │ │ │ │ │ +401 │ │ │ │ │ +_4_0_3 _c_t _l_o_w_e_r_l_e_f_t(int i) const │ │ │ │ │ +404 { │ │ │ │ │ +405 return ___g_r_i_d->getCoords()->coordinate(i,___c_o_o_r_d[i]); │ │ │ │ │ +406 } │ │ │ │ │ +407 │ │ │ │ │ +_4_0_9 _f_T_u_p_e_l _l_o_w_e_r_l_e_f_t() const │ │ │ │ │ +410 { │ │ │ │ │ +411 _f_T_u_p_e_l ll; │ │ │ │ │ +412 for (int i=0; i<_d; i++) │ │ │ │ │ +413 ll[i] = _l_o_w_e_r_l_e_f_t(i); │ │ │ │ │ +414 return ll; │ │ │ │ │ +415 } │ │ │ │ │ +416 │ │ │ │ │ +_4_1_8 _c_t _u_p_p_e_r_r_i_g_h_t(int i) const │ │ │ │ │ +419 { │ │ │ │ │ +420 int _c_o_o_r_d = ___c_o_o_r_d[i]; │ │ │ │ │ +421 if (_s_h_i_f_t(i)) │ │ │ │ │ +422 _c_o_o_r_d++; │ │ │ │ │ +423 return ___g_r_i_d->getCoords()->coordinate(i,_c_o_o_r_d); │ │ │ │ │ +424 } │ │ │ │ │ +425 │ │ │ │ │ +_4_2_7 _f_T_u_p_e_l _u_p_p_e_r_r_i_g_h_t() const │ │ │ │ │ +428 { │ │ │ │ │ +429 _f_T_u_p_e_l ur; │ │ │ │ │ +430 for (int i=0; i<_d; i++) │ │ │ │ │ +431 ur[i] = _u_p_p_e_r_r_i_g_h_t(i); │ │ │ │ │ +432 return ur; │ │ │ │ │ +433 } │ │ │ │ │ +434 │ │ │ │ │ +_4_3_6 _c_t _m_e_s_h_s_i_z_e (int i) const │ │ │ │ │ +437 { │ │ │ │ │ +438 return ___g_r_i_d->getCoords()->meshsize(i,___c_o_o_r_d[i]); │ │ │ │ │ +439 } │ │ │ │ │ +440 │ │ │ │ │ +_4_4_2 _f_T_u_p_e_l _m_e_s_h_s_i_z_e () const │ │ │ │ │ +443 { │ │ │ │ │ +444 _f_T_u_p_e_l h; │ │ │ │ │ +445 for (int i=0; i<_d; i++) │ │ │ │ │ +446 h[i] = _m_e_s_h_s_i_z_e(i); │ │ │ │ │ +447 return h; │ │ │ │ │ +448 } │ │ │ │ │ +449 │ │ │ │ │ +_4_5_0 bool _s_h_i_f_t (int i) const │ │ │ │ │ +451 { │ │ │ │ │ +452 return ___g_r_i_d->shift(i); │ │ │ │ │ +453 } │ │ │ │ │ +454 │ │ │ │ │ +_4_5_5 std::bitset _s_h_i_f_t() const │ │ │ │ │ +456 { │ │ │ │ │ +457 return ___g_r_i_d->shift(); │ │ │ │ │ +458 } │ │ │ │ │ +459 │ │ │ │ │ +_4_6_0 Coordinates* _c_o_o_r_d_C_o_n_t() const │ │ │ │ │ +461 { │ │ │ │ │ +462 return ___g_r_i_d->getCoords(); │ │ │ │ │ +463 } │ │ │ │ │ +464 │ │ │ │ │ +465 protected: │ │ │ │ │ +_4_6_6 _i_T_u_p_e_l ___c_o_o_r_d; │ │ │ │ │ +_4_6_7 int ___s_u_p_e_r_i_n_d_e_x = 0; │ │ │ │ │ +_4_6_8 const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>* ___g_r_i_d = nullptr; │ │ │ │ │ +469 }; │ │ │ │ │ +470 │ │ │ │ │ +471 │ │ │ │ │ +_4_7_2 int _s_u_p_e_r_i_n_d_e_x(_i_T_u_p_e_l coord) const │ │ │ │ │ +473 { │ │ │ │ │ +474 // move superindex to first cell in subgrid │ │ │ │ │ +475 int si = 0; │ │ │ │ │ +476 for (int i=0; i<_d; ++i) │ │ │ │ │ +477 si += (_o_f_f_s_e_t(i)+coord[i]-_o_r_i_g_i_n(i))*_superincrement[i]; │ │ │ │ │ +478 return si; │ │ │ │ │ +479 } │ │ │ │ │ +480 │ │ │ │ │ +_4_8_1 int _s_u_p_e_r_i_n_c_r_e_m_e_n_t(int i) const │ │ │ │ │ +482 { │ │ │ │ │ +483 return _superincrement[i]; │ │ │ │ │ +484 } │ │ │ │ │ +485 │ │ │ │ │ +_4_8_7 _I_t_e_r_a_t_o_r _b_e_g_i_n () const │ │ │ │ │ +488 { │ │ │ │ │ +489 return _I_t_e_r_a_t_o_r(*this); │ │ │ │ │ +490 } │ │ │ │ │ +491 │ │ │ │ │ +_4_9_3 _I_t_e_r_a_t_o_r _b_e_g_i_n (const _i_T_u_p_e_l& co) const │ │ │ │ │ +494 { │ │ │ │ │ +495 return _I_t_e_r_a_t_o_r(*this,co); │ │ │ │ │ +496 } │ │ │ │ │ +497 │ │ │ │ │ +_4_9_9 _I_t_e_r_a_t_o_r _e_n_d () const │ │ │ │ │ +500 { │ │ │ │ │ +501 _i_T_u_p_e_l last; │ │ │ │ │ +502 for (int i=0; i<_d; i++) │ │ │ │ │ +503 last[i] = _m_a_x(i); │ │ │ │ │ +504 last[0] += 1; │ │ │ │ │ +505 return _I_t_e_r_a_t_o_r(*this,last); │ │ │ │ │ +506 } │ │ │ │ │ +507 │ │ │ │ │ +508 private: │ │ │ │ │ +509 _i_T_u_p_e_l _origin; │ │ │ │ │ +510 std::bitset _shift; │ │ │ │ │ +511 Coordinates* _coords; │ │ │ │ │ +512 _i_T_u_p_e_l _size; │ │ │ │ │ +513 _i_T_u_p_e_l _offset; │ │ │ │ │ +514 _i_T_u_p_e_l _supersize; │ │ │ │ │ +515 _i_T_u_p_e_l _superincrement; │ │ │ │ │ +516 │ │ │ │ │ +517 }; │ │ │ │ │ +518 │ │ │ │ │ +519 │ │ │ │ │ +521 template │ │ │ │ │ +_5_2_2 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ +_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> e) │ │ │ │ │ +523 { │ │ │ │ │ +524 s << "Printing YGridComponent structure:" << std::endl; │ │ │ │ │ +525 s << "Origin: " << e._o_r_i_g_i_n() << std::endl; │ │ │ │ │ +526 s << "Shift: " << e._s_h_i_f_t() << std::endl; │ │ │ │ │ +527 s << "Size: " << e._s_i_z_e() << std::endl; │ │ │ │ │ +528 s << "Offset: " << e._o_f_f_s_e_t() << std::endl; │ │ │ │ │ +529 s << "Supersize: " << e._s_u_p_e_r_s_i_z_e() << std::endl; │ │ │ │ │ +530 return s; │ │ │ │ │ +531 } │ │ │ │ │ +532 │ │ │ │ │ +534 template │ │ │ │ │ +_5_3_5 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, typename │ │ │ │ │ +_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r& e) │ │ │ │ │ +536 { │ │ │ │ │ +537 s << "Printing YGridComponent Iterator:" << std::endl << "Iterator at " << │ │ │ │ │ +e._c_o_o_r_d() << " (index "; │ │ │ │ │ +538 s << e.index() << "), position " << e.position(); │ │ │ │ │ +539 return s; │ │ │ │ │ +540 } │ │ │ │ │ +541 │ │ │ │ │ +549 template │ │ │ │ │ +_5_5_0 class _Y_G_r_i_d │ │ │ │ │ +551 { │ │ │ │ │ +552 public: │ │ │ │ │ +_5_5_3 static const int _d_i_m = Coordinates::dimension; │ │ │ │ │ +554 │ │ │ │ │ +555 // define data array iterator │ │ │ │ │ +_5_5_6 typedef _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>* _D_A_I; │ │ │ │ │ +557 │ │ │ │ │ +_5_5_8 typedef typename std::array _i_T_u_p_e_l; │ │ │ │ │ +559 │ │ │ │ │ +_5_6_1 void _s_e_t_B_e_g_i_n(_D_A_I _b_e_g_i_n) │ │ │ │ │ +562 { │ │ │ │ │ +563 _begin = _b_e_g_i_n; │ │ │ │ │ +564 } │ │ │ │ │ +565 │ │ │ │ │ +_5_6_7 int _s_h_i_f_t_m_a_p_p_i_n_g(const std::bitset& shift) const │ │ │ │ │ +568 { │ │ │ │ │ +569 return _shiftmapping[shift.to_ulong()]; │ │ │ │ │ +570 } │ │ │ │ │ +571 │ │ │ │ │ +_5_7_3 _D_A_I _d_a_t_a_B_e_g_i_n() const │ │ │ │ │ +574 { │ │ │ │ │ +575 return _begin; │ │ │ │ │ +576 } │ │ │ │ │ +577 │ │ │ │ │ +_5_7_9 _D_A_I _d_a_t_a_E_n_d() const │ │ │ │ │ +580 { │ │ │ │ │ +581 return _end; │ │ │ │ │ +582 } │ │ │ │ │ +583 │ │ │ │ │ +_5_8_5 bool _i_n_s_i_d_e(const _i_T_u_p_e_l& coord, const std::bitset& shift = std:: │ │ │ │ │ +bitset()) const │ │ │ │ │ +586 { │ │ │ │ │ +587 return (_begin+_shiftmapping[shift.to_ulong()])->inside(coord); │ │ │ │ │ +588 } │ │ │ │ │ +589 │ │ │ │ │ +_5_9_3 class _I_t_e_r_a_t_o_r │ │ │ │ │ +594 { │ │ │ │ │ +595 public: │ │ │ │ │ +596 │ │ │ │ │ +_5_9_8 _I_t_e_r_a_t_o_r () = default; │ │ │ │ │ +599 │ │ │ │ │ +_6_0_1 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>& yg, const std::array& coords, │ │ │ │ │ +int _w_h_i_c_h = 0) │ │ │ │ │ +602 : _which(_w_h_i_c_h), _yg(&yg) │ │ │ │ │ +603 { │ │ │ │ │ +604 _it = typename _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r(*(_yg->dataBegin │ │ │ │ │ +()+_w_h_i_c_h),coords); │ │ │ │ │ +605 } │ │ │ │ │ +606 │ │ │ │ │ +_6_0_8 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>& yg, bool _e_n_d=false) : _yg(&yg) │ │ │ │ │ +609 { │ │ │ │ │ +610 if (_e_n_d) │ │ │ │ │ +611 { │ │ │ │ │ +612 _it = _yg->_itends.back(); │ │ │ │ │ +613 _which = _yg->_itends.size() - 1; │ │ │ │ │ +614 } │ │ │ │ │ +615 else │ │ │ │ │ +616 { │ │ │ │ │ +617 _it = _yg->_itbegins[0]; │ │ │ │ │ +618 _which = 0; │ │ │ │ │ +619 } │ │ │ │ │ +620 } │ │ │ │ │ +621 │ │ │ │ │ +_6_2_3 void _r_e_i_n_i_t(const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>& yg, const std::array& │ │ │ │ │ +coords, int _w_h_i_c_h = 0) │ │ │ │ │ +624 { │ │ │ │ │ +625 _yg = &yg; │ │ │ │ │ +626 _which = _w_h_i_c_h; │ │ │ │ │ +627 _it = typename _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r(*(_yg->dataBegin │ │ │ │ │ +()+_w_h_i_c_h),coords); │ │ │ │ │ +628 } │ │ │ │ │ +629 │ │ │ │ │ +_6_3_1 int _c_o_o_r_d (int i) const │ │ │ │ │ +632 { │ │ │ │ │ +633 return _it._c_o_o_r_d(i); │ │ │ │ │ +634 } │ │ │ │ │ +635 │ │ │ │ │ +_6_3_7 const std::array& _c_o_o_r_d () const │ │ │ │ │ +638 { │ │ │ │ │ +639 return _it._c_o_o_r_d(); │ │ │ │ │ +640 } │ │ │ │ │ +641 │ │ │ │ │ +_6_4_2 typename Coordinates::ctype _l_o_w_e_r_l_e_f_t(int i) const │ │ │ │ │ +643 { │ │ │ │ │ +644 return _it._l_o_w_e_r_l_e_f_t(i); │ │ │ │ │ +645 } │ │ │ │ │ +646 │ │ │ │ │ +_6_4_7 Dune::FieldVector _l_o_w_e_r_l_e_f_t() const │ │ │ │ │ +648 { │ │ │ │ │ +649 return _it._l_o_w_e_r_l_e_f_t(); │ │ │ │ │ +650 } │ │ │ │ │ +651 │ │ │ │ │ +_6_5_2 typename Coordinates::ctype _u_p_p_e_r_r_i_g_h_t(int i) const │ │ │ │ │ +653 { │ │ │ │ │ +654 return _it._u_p_p_e_r_r_i_g_h_t(i); │ │ │ │ │ +655 } │ │ │ │ │ +656 │ │ │ │ │ +_6_5_7 Dune::FieldVector _u_p_p_e_r_r_i_g_h_t() const │ │ │ │ │ +658 { │ │ │ │ │ +659 return _it._u_p_p_e_r_r_i_g_h_t(); │ │ │ │ │ +660 } │ │ │ │ │ +661 │ │ │ │ │ +_6_6_3 typename Coordinates::ctype _m_e_s_h_s_i_z_e (int i) const │ │ │ │ │ +664 { │ │ │ │ │ +665 return _it._m_e_s_h_s_i_z_e(i); │ │ │ │ │ +666 } │ │ │ │ │ +667 │ │ │ │ │ +_6_6_9 Dune::FieldVector _m_e_s_h_s_i_z_e() const │ │ │ │ │ +670 { │ │ │ │ │ +671 return _it._m_e_s_h_s_i_z_e(); │ │ │ │ │ +672 } │ │ │ │ │ +673 │ │ │ │ │ +_6_7_5 bool _s_h_i_f_t (int i) const │ │ │ │ │ +676 { │ │ │ │ │ +677 return _it._s_h_i_f_t(i); │ │ │ │ │ +678 } │ │ │ │ │ +679 │ │ │ │ │ +_6_8_1 std::bitset _s_h_i_f_t () const │ │ │ │ │ +682 { │ │ │ │ │ +683 return _it._s_h_i_f_t(); │ │ │ │ │ +684 } │ │ │ │ │ +685 │ │ │ │ │ +_6_8_7 int _s_u_p_e_r_i_n_d_e_x() const │ │ │ │ │ +688 { │ │ │ │ │ +689 // the offset of the current component has to be taken into account │ │ │ │ │ +690 return _yg->_indexOffset[_which] + _it._s_u_p_e_r_i_n_d_e_x(); │ │ │ │ │ +691 } │ │ │ │ │ +692 │ │ │ │ │ +_6_9_4 _I_t_e_r_a_t_o_r& _o_p_e_r_a_t_o_r_+_+_ () │ │ │ │ │ +695 { │ │ │ │ │ +696 if ((++_it == _yg->_itends[_which]) && (_which < _yg->_itends.size()-1)) │ │ │ │ │ +697 _it = _yg->_itbegins[++_which]; │ │ │ │ │ +698 return *this; │ │ │ │ │ +699 } │ │ │ │ │ +700 │ │ │ │ │ +_7_0_2 bool _o_p_e_r_a_t_o_r_=_=(const _I_t_e_r_a_t_o_r& i) const │ │ │ │ │ +703 { │ │ │ │ │ +704 if (_which != i._which) │ │ │ │ │ +705 return false; │ │ │ │ │ +706 return _it == i._it; │ │ │ │ │ +707 } │ │ │ │ │ +708 │ │ │ │ │ +_7_1_0 bool _o_p_e_r_a_t_o_r_!_=(const _I_t_e_r_a_t_o_r& i) const │ │ │ │ │ +711 { │ │ │ │ │ +712 if (_it != i._it) │ │ │ │ │ +713 return true; │ │ │ │ │ +714 return _which != i._which; │ │ │ │ │ +715 } │ │ │ │ │ +716 │ │ │ │ │ +_7_1_8 int _w_h_i_c_h() const │ │ │ │ │ +719 { │ │ │ │ │ +720 return _which; │ │ │ │ │ +721 } │ │ │ │ │ +722 │ │ │ │ │ +_7_2_4 void _m_o_v_e(int i, int dist) │ │ │ │ │ +725 { │ │ │ │ │ +726 _it._m_o_v_e(i,dist); │ │ │ │ │ +727 } │ │ │ │ │ +728 │ │ │ │ │ +_7_2_9 void _m_o_v_e(const _i_T_u_p_e_l& dist) │ │ │ │ │ +730 { │ │ │ │ │ +731 _it._m_o_v_e(dist); │ │ │ │ │ +732 } │ │ │ │ │ +733 │ │ │ │ │ +_7_3_4 Coordinates* _c_o_o_r_d_C_o_n_t() const │ │ │ │ │ +735 { │ │ │ │ │ +736 return _it._c_o_o_r_d_C_o_n_t(); │ │ │ │ │ +737 } │ │ │ │ │ +738 │ │ │ │ │ +739 │ │ │ │ │ +740 private: │ │ │ │ │ +741 unsigned int _which = 0; │ │ │ │ │ +742 const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>* _yg = nullptr; │ │ │ │ │ +743 typename _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r _it; │ │ │ │ │ +744 }; │ │ │ │ │ +745 │ │ │ │ │ +_7_4_7 _I_t_e_r_a_t_o_r _b_e_g_i_n() const │ │ │ │ │ +748 { │ │ │ │ │ +749 return _I_t_e_r_a_t_o_r(*this); │ │ │ │ │ +750 } │ │ │ │ │ +751 │ │ │ │ │ +_7_5_3 _I_t_e_r_a_t_o_r _b_e_g_i_n(const std::array& coord, int which = 0) const │ │ │ │ │ +754 { │ │ │ │ │ +755 return _I_t_e_r_a_t_o_r(*this, coord, which); │ │ │ │ │ +756 } │ │ │ │ │ +757 │ │ │ │ │ +_7_5_9 _I_t_e_r_a_t_o_r _e_n_d() const │ │ │ │ │ +760 { │ │ │ │ │ +761 return _I_t_e_r_a_t_o_r(*this,true); │ │ │ │ │ +762 } │ │ │ │ │ +763 │ │ │ │ │ +_7_6_4 int _s_u_p_e_r_i_n_d_e_x(const _i_T_u_p_e_l& coord, int which) const │ │ │ │ │ +765 { │ │ │ │ │ +766 return _indexOffset[which] + (_d_a_t_a_B_e_g_i_n()+which)->_s_u_p_e_r_i_n_d_e_x(coord); │ │ │ │ │ +767 } │ │ │ │ │ +768 │ │ │ │ │ +769 │ │ │ │ │ +770 // finalize the ygrid construction by storing component iterators │ │ │ │ │ +_7_7_1 void _f_i_n_a_l_i_z_e(const _D_A_I& _e_n_d, int artificialOffset = 0) │ │ │ │ │ +772 { │ │ │ │ │ +773 // set the end iterator in the ygrid component array │ │ │ │ │ +774 _end = _e_n_d; │ │ │ │ │ +775 │ │ │ │ │ +776 _indexOffset.push_back(artificialOffset); │ │ │ │ │ +777 int k = 0; │ │ │ │ │ +778 for (_D_A_I i=_begin; i != _end; ++i, ++k) │ │ │ │ │ +779 { │ │ │ │ │ +780 //store begin and end iterators │ │ │ │ │ +781 _itbegins.push_back(i->begin()); │ │ │ │ │ +782 _itends.push_back(i->end()); │ │ │ │ │ +783 │ │ │ │ │ +784 // store index offset │ │ │ │ │ +785 _indexOffset.push_back(_indexOffset.back() + i->totalsize()); │ │ │ │ │ +786 │ │ │ │ │ +787 // store shift to component mapping │ │ │ │ │ +788 _shiftmapping[i->shift().to_ulong()] = k; │ │ │ │ │ +789 } │ │ │ │ │ +790 _indexOffset.resize(_itends.size()); │ │ │ │ │ +791 } │ │ │ │ │ +792 │ │ │ │ │ +793 private: │ │ │ │ │ +794 │ │ │ │ │ +_7_9_5 friend class _Y_G_r_i_d::_I_t_e_r_a_t_o_r; │ │ │ │ │ +796 _D_A_I _begin; │ │ │ │ │ +797 _D_A_I _end; │ │ │ │ │ +798 std::array _shiftmapping; │ │ │ │ │ +799 std::vector::Iterator> _itbegins; │ │ │ │ │ +800 std::vector::Iterator> _itends; │ │ │ │ │ +801 std::vector _indexOffset; │ │ │ │ │ +802 }; │ │ │ │ │ +803 │ │ │ │ │ +805 template │ │ │ │ │ +_8_0_6 inline std::ostream& operator<< (std::ostream& s, const YGrid& │ │ │ │ │ +e) │ │ │ │ │ +807 { │ │ │ │ │ +808 s << "Printing YGrid structure:" << std::endl; │ │ │ │ │ +809 for (auto it = e.dataBegin(); it != e.dataEnd(); ++it) │ │ │ │ │ +810 s << *it << std::endl; │ │ │ │ │ +811 return s; │ │ │ │ │ +812 } │ │ │ │ │ +813 │ │ │ │ │ +821 template │ │ │ │ │ +_8_2_2 class YGridList │ │ │ │ │ +823 { │ │ │ │ │ +824 public: │ │ │ │ │ +_8_2_5 static const int dim = Coordinates::dimension; │ │ │ │ │ +826 │ │ │ │ │ +_8_2_8 struct Intersection │ │ │ │ │ +829 { │ │ │ │ │ +_8_3_1 YGridComponent grid; │ │ │ │ │ +_8_3_3 int rank; │ │ │ │ │ +_8_3_5 int distance; │ │ │ │ │ +_8_3_7 YGrid yg; │ │ │ │ │ +838 }; │ │ │ │ │ +839 │ │ │ │ │ +840 // define data array iterator type │ │ │ │ │ +_8_4_1 typedef typename std::array, Dune::power(2,dim)>:: │ │ │ │ │ +iterator DAI; │ │ │ │ │ +842 │ │ │ │ │ +843 // iterator that allows to iterate over a concatenation of deques. namely │ │ │ │ │ +those │ │ │ │ │ +844 // that belong to the same codimension. │ │ │ │ │ +_8_4_5 class Iterator │ │ │ │ │ +846 { │ │ │ │ │ +847 public: │ │ │ │ │ +848 │ │ │ │ │ +_8_5_0 Iterator(const YGridList& ygl, bool end=false) : _end │ │ │ │ │ +(ygl.dataEnd()), _which(ygl.dataBegin()) │ │ │ │ │ +851 { │ │ │ │ │ +852 _it = _which->begin(); │ │ │ │ │ +853 │ │ │ │ │ +854 // advance the iterator to the first element that exists. │ │ │ │ │ +855 // some deques might be empty and should be skipped │ │ │ │ │ +856 while ((_which != _end) && (_it == _which->end())) │ │ │ │ │ +857 { │ │ │ │ │ +858 ++_which; │ │ │ │ │ +859 if (_which != _end) │ │ │ │ │ +860 _it = _which->begin(); │ │ │ │ │ +861 } │ │ │ │ │ +862 // the iterator is at the end if and only if _which==_end │ │ │ │ │ +863 if (end) │ │ │ │ │ +864 { │ │ │ │ │ +865 _which = _end; │ │ │ │ │ +866 } │ │ │ │ │ +867 } │ │ │ │ │ +868 │ │ │ │ │ +_8_7_0 Iterator& operator++ () │ │ │ │ │ +871 { │ │ │ │ │ +872 ++_it; │ │ │ │ │ +873 // advance the iterator to the next element that exists. │ │ │ │ │ +874 // some deques might be empty and should be skipped │ │ │ │ │ +875 while ((_which != _end) && (_it == _which->end())) │ │ │ │ │ +876 { │ │ │ │ │ +877 ++_which; │ │ │ │ │ +878 if (_which != _end) │ │ │ │ │ +879 _it = _which->begin(); │ │ │ │ │ +880 } │ │ │ │ │ +881 return *this; │ │ │ │ │ +882 } │ │ │ │ │ +883 │ │ │ │ │ +_8_8_5 typename std::deque::iterator operator->() const │ │ │ │ │ +886 { │ │ │ │ │ +887 return _it; │ │ │ │ │ +888 } │ │ │ │ │ +889 │ │ │ │ │ +_8_9_1 typename std::deque::iterator operator*() const │ │ │ │ │ +892 { │ │ │ │ │ +893 return _it; │ │ │ │ │ +894 } │ │ │ │ │ +895 │ │ │ │ │ +_8_9_7 bool operator== (const Iterator& i) const │ │ │ │ │ +898 { │ │ │ │ │ +899 if (_which != i._which) │ │ │ │ │ +900 return false; │ │ │ │ │ +901 if (_which == _end) │ │ │ │ │ +902 return true; │ │ │ │ │ +903 return _it == i._it; │ │ │ │ │ +904 } │ │ │ │ │ +905 │ │ │ │ │ +_9_0_7 bool operator!= (const Iterator& i) const │ │ │ │ │ +908 { │ │ │ │ │ +909 if (_which != i._which) │ │ │ │ │ +910 return true; │ │ │ │ │ +911 if (_which == _end) │ │ │ │ │ +912 return false; │ │ │ │ │ +913 return _it != i._it; │ │ │ │ │ +914 } │ │ │ │ │ +915 │ │ │ │ │ +916 private: │ │ │ │ │ +917 typename std::deque::iterator _it; │ │ │ │ │ +918 DAI _end; │ │ │ │ │ +919 DAI _which; │ │ │ │ │ +920 }; │ │ │ │ │ +921 │ │ │ │ │ +_9_2_3 Iterator begin() const │ │ │ │ │ +924 { │ │ │ │ │ +925 return Iterator(*this); │ │ │ │ │ +926 } │ │ │ │ │ +927 │ │ │ │ │ +_9_2_9 Iterator end() const │ │ │ │ │ +930 { │ │ │ │ │ +931 return Iterator(*this,true); │ │ │ │ │ +932 } │ │ │ │ │ +933 │ │ │ │ │ +_9_3_5 void setBegin(typename std::array, Dune::power │ │ │ │ │ +(2,dim)>::iterator begin) │ │ │ │ │ +936 { │ │ │ │ │ +937 _begin = begin; │ │ │ │ │ +938 } │ │ │ │ │ +939 │ │ │ │ │ +_9_4_1 DAI dataBegin() const │ │ │ │ │ +942 { │ │ │ │ │ +943 return _begin; │ │ │ │ │ +944 } │ │ │ │ │ +945 │ │ │ │ │ +_9_4_7 DAI dataEnd() const │ │ │ │ │ +948 { │ │ │ │ │ +949 return _end; │ │ │ │ │ +950 } │ │ │ │ │ +951 │ │ │ │ │ +_9_5_3 int size() const │ │ │ │ │ +954 { │ │ │ │ │ +955 int count = 0; │ │ │ │ │ +956 for (DAI it = _begin; it != _end; ++it) │ │ │ │ │ +957 count += it->size(); │ │ │ │ │ +958 return count; │ │ │ │ │ +959 } │ │ │ │ │ +960 │ │ │ │ │ +_9_6_2 void finalize(DAI end, const YGrid& ygrid) │ │ │ │ │ +963 { │ │ │ │ │ +964 // Instead of directly iterating over the intersection deques, this code │ │ │ │ │ +965 // iterates over the components of an associated ygrid and works its way │ │ │ │ │ +966 // through the list of intersection deques in parallel. │ │ │ │ │ +967 // The reason for this convoluted iteration technique is that there are not │ │ │ │ │ +968 // necessarily intersections for all possible shifts, but we have to make │ │ │ │ │ +969 // sure that we stop at each shift to update the per-component index shift. │ │ │ │ │ +970 // This is ensured by iterating over the ygrid, which is guaranteed to have │ │ │ │ │ +971 // a component for each shift vector. │ │ │ │ │ +972 │ │ │ │ │ +973 // set end iterator in the data array │ │ │ │ │ +974 _end = end; │ │ │ │ │ +975 │ │ │ │ │ +977 int offset = 0; │ │ │ │ │ +978 │ │ │ │ │ +979 DAI i = _begin; │ │ │ │ │ +980 │ │ │ │ │ +981 // make sure that we have a valid deque (i.e. a non-empty one) │ │ │ │ │ +982 while (i != _end && i->begin() == i->end()) │ │ │ │ │ +983 ++i; │ │ │ │ │ +984 │ │ │ │ │ +985 for (auto yit = ygrid.dataBegin(); yit != ygrid.dataEnd(); ++yit) │ │ │ │ │ +986 { │ │ │ │ │ +987 if (i == _end) │ │ │ │ │ +988 break; │ │ │ │ │ +989 auto it = i->_b_e_g_i_n(); │ │ │ │ │ +990 if (it->grid.shift() == yit->shift()) │ │ │ │ │ +991 { │ │ │ │ │ +992 // iterate over the intersections in the deque and set the offset │ │ │ │ │ +993 for (; it != i->end(); ++it) │ │ │ │ │ +994 { │ │ │ │ │ +995 it->yg.setBegin(&(it->grid)); │ │ │ │ │ +996 it->yg.finalize(&(it->grid)+1, offset); │ │ │ │ │ +997 } │ │ │ │ │ +998 │ │ │ │ │ +999 // advance to next non-empty deque │ │ │ │ │ +1000 ++i; │ │ │ │ │ +1001 while (i != _end && i->begin() == i->end()) │ │ │ │ │ +1002 ++i; │ │ │ │ │ +1003 } │ │ │ │ │ +1004 │ │ │ │ │ +1005 // update the offset from the ygrid component │ │ │ │ │ +1006 int add = 1; │ │ │ │ │ +1007 for (int j=0; j<_d_i_m; j++) │ │ │ │ │ +1008 add *= yit->supersize(j); │ │ │ │ │ +1009 offset += add; │ │ │ │ │ +1010 } │ │ │ │ │ +1011 assert (i == end); │ │ │ │ │ +1012 } │ │ │ │ │ +1013 │ │ │ │ │ +1014 private: │ │ │ │ │ +1015 DAI _begin; │ │ │ │ │ +1016 DAI _end; │ │ │ │ │ +1017 }; │ │ │ │ │ +1018 │ │ │ │ │ +1019} // namespace Dune │ │ │ │ │ +1020 │ │ │ │ │ +1021#endif │ │ │ │ │ _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ │ write a PartitionType to a stream │ │ │ │ │ DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Container for equidistant coordinates in a YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -ct coordinate(int d, int i) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_s_i_z_e │ │ │ │ │ -int size(int d) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -export dimension │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &s) const │ │ │ │ │ -print information on this container │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -EquidistantCoordinates() │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_s_i_z_e_A_r_r_a_y │ │ │ │ │ +std::array< int, d > sizeArray(const std::array< std::vector< ct >, d > &v) │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_n_d_e_x │ │ │ │ │ +int index(const iTupel &coord) const │ │ │ │ │ +given a tupel compute its index in the lexicographic numbering │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_f_f_s_e_t │ │ │ │ │ +int offset(int i) const │ │ │ │ │ +Return offset to origin of enclosing grid. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:173 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_m_o_v_e │ │ │ │ │ +YGridComponent< Coordinates > move(iTupel v) const │ │ │ │ │ +return grid moved by the vector v │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:263 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_i_z_e │ │ │ │ │ +iTupel size() const │ │ │ │ │ +retrun size │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_d │ │ │ │ │ +static const int d │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +YGridComponent< Coordinates > intersection(const YGridComponent< Coordinates > │ │ │ │ │ +&r) const │ │ │ │ │ +Return YGridComponent of supergrid of self which is the intersection of self │ │ │ │ │ +and another YGridCompone... │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_c_t │ │ │ │ │ +Coordinates::ctype ct │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_g_e_t_C_o_o_r_d_s │ │ │ │ │ +Coordinates * getCoords() const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_m_i_n │ │ │ │ │ +int min(int i) const │ │ │ │ │ +Return minimum index in direction i. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ +YGridComponent(iTupel origin, iTupel size) │ │ │ │ │ +make ygrid without coordinate information │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_t_o_t_a_l_s_i_z_e │ │ │ │ │ +int totalsize() const │ │ │ │ │ +Return total size of index set which is the product of all size per direction. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:209 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ +YGridComponent(iTupel origin, iTupel size, const YGridComponent< Coordinates > │ │ │ │ │ +&enclosing) │ │ │ │ │ +make a subgrid by taking coordinates from a larger grid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_s_i_z_e │ │ │ │ │ +const iTupel & supersize() const │ │ │ │ │ +return size of enclosing grid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ +YGridComponent(iTupel origin, std::bitset< d > shift, Coordinates *coords, │ │ │ │ │ +iTupel size, iTupel offset, iTupel supersize) │ │ │ │ │ +Make YGridComponent by giving all parameters. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ +int superindex(iTupel coord) const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:472 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin() const │ │ │ │ │ +return iterator to first element of index set │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:487 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_f_T_u_p_e_l │ │ │ │ │ +FieldVector< ct, d > fTupel │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin(const iTupel &co) const │ │ │ │ │ +return iterator to given element of index set │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:493 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ +YGridComponent() │ │ │ │ │ +make uninitialized ygrid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_r_i_g_i_n │ │ │ │ │ +int origin(int i) const │ │ │ │ │ +Return origin in direction i. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_s_i_z_e │ │ │ │ │ +int supersize(int i) const │ │ │ │ │ +return size of enclosing grid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_i_z_e │ │ │ │ │ +int size(int i) const │ │ │ │ │ +return size in direction i │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_m_a_x │ │ │ │ │ +int max(int i) const │ │ │ │ │ +Return maximum index in direction i. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:224 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_h_i_f_t │ │ │ │ │ +const std::bitset< d > & shift() const │ │ │ │ │ +Return shift tupel. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:162 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_i_n_c_r_e_m_e_n_t │ │ │ │ │ +int superincrement(int i) const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:481 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_h_i_f_t │ │ │ │ │ +bool shift(int i) const │ │ │ │ │ +Return shift in direction i. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:156 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_e_n_d │ │ │ │ │ +Iterator end() const │ │ │ │ │ +return subiterator to last element of index set │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:499 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_n_s_i_d_e │ │ │ │ │ +bool inside(const iTupel &coord) const │ │ │ │ │ +given a coordinate, return true if it is in the grid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:241 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_e_m_p_t_y │ │ │ │ │ +bool empty() const │ │ │ │ │ +Return true if YGrid is empty, i.e. has size 0 in all directions. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:230 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_f_f_s_e_t │ │ │ │ │ +const iTupel & offset() const │ │ │ │ │ +Return offset to origin of enclosing grid. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_r_i_g_i_n │ │ │ │ │ +const iTupel & origin() const │ │ │ │ │ +return reference to origin │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:298 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ +Iterator & operator++() │ │ │ │ │ +Increment iterator to next cell with position. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:379 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ +int superindex() const │ │ │ │ │ +Return consecutive index in enclosing grid. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:344 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ +bool operator!=(const Iterator &i) const │ │ │ │ │ +Return true when two iterators over the same grid are not equal (!). │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:338 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ +ct lowerleft(int i) const │ │ │ │ │ +Return ith component of lower left corner of the entity associated with the │ │ │ │ │ +current coordinates and s... │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:403 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ +std::bitset< d > shift() const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:455 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator()=default │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +ct meshsize(int i) const │ │ │ │ │ +Return meshsize in direction i. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:436 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ +bool shift(int i) const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:450 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:___g_r_i_d │ │ │ │ │ +const YGridComponent< Coordinates > * _grid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:468 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_r_e_i_n_i_t │ │ │ │ │ +void reinit(const YGridComponent< Coordinates > &r, const iTupel &coord) │ │ │ │ │ +reinitialize iterator to given position │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:317 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ +void move(const iTupel &dist) │ │ │ │ │ +move this iterator dist cells in direction i │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:369 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +fTupel meshsize() const │ │ │ │ │ +Return meshsize of current cell as reference. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:442 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ +fTupel lowerleft() const │ │ │ │ │ +Return lower left corner of the entity associated with the current coordinates │ │ │ │ │ +and shift. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:409 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d_C_o_n_t │ │ │ │ │ +Coordinates * coordCont() const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:460 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:___c_o_o_r_d │ │ │ │ │ +iTupel _coord │ │ │ │ │ +current position in index set │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:466 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ +const iTupel & coord() const │ │ │ │ │ +Return coordinate of the cell as reference (do not modify). │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:356 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ +void move(int i, int dist) │ │ │ │ │ +move this iterator dist cells in direction i │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:362 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator(const YGridComponent< Coordinates > &r) │ │ │ │ │ +Make iterator pointing to first cell in a grid. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:304 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ +ct upperright(int i) const │ │ │ │ │ +Return ith component of upper right corder of the entity associated with the │ │ │ │ │ +current coordinates and ... │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:418 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ +int coord(int i) const │ │ │ │ │ +Return coordinate of the cell in direction i. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:350 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ +fTupel upperright() const │ │ │ │ │ +Return upper right corder of the entity associated with the current coordinates │ │ │ │ │ +and shift. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:427 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(const Iterator &i) const │ │ │ │ │ +Return true when two iterators over the same grid are equal (!). │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:332 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator(const YGridComponent< Coordinates > &r, const iTupel &coord) │ │ │ │ │ +Make iterator pointing to given cell in a grid. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:311 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:___s_u_p_e_r_i_n_d_e_x │ │ │ │ │ +int _superindex │ │ │ │ │ +consecutive index in enclosing grid │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:467 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d │ │ │ │ │ +implements a collection of YGridComponents which form a codimension Entities of │ │ │ │ │ +given codimension c n... │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:551 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_s_h_i_f_t_m_a_p_p_i_n_g │ │ │ │ │ +int shiftmapping(const std::bitset< dim > &shift) const │ │ │ │ │ +get which component belongs to a given shift vector │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:567 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_d_a_t_a_B_e_g_i_n │ │ │ │ │ +DAI dataBegin() const │ │ │ │ │ +get start iterator in the data array │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:573 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin() const │ │ │ │ │ +return begin iterator for the codimension and partition the ygrid represents │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:747 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_d_a_t_a_E_n_d │ │ │ │ │ +DAI dataEnd() const │ │ │ │ │ +get end iterator in the data array │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:579 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, dim > iTupel │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:558 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_d_i_m │ │ │ │ │ +static const int dim │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:553 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_s_e_t_B_e_g_i_n │ │ │ │ │ +void setBegin(DAI begin) │ │ │ │ │ +set start iterator in the data array │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:561 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_i_n_s_i_d_e │ │ │ │ │ +bool inside(const iTupel &coord, const std::bitset< dim > &shift=std::bitset< │ │ │ │ │ +dim >()) const │ │ │ │ │ +decide whether a coordinate is in the grid (depending on the component) │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:585 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ +int superindex(const iTupel &coord, int which) const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:764 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin(const std::array< int, dim > &coord, int which=0) const │ │ │ │ │ +return iterator pointint to a specified position │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:753 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_D_A_I │ │ │ │ │ +YGridComponent< Coordinates > * DAI │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:556 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_f_i_n_a_l_i_z_e │ │ │ │ │ +void finalize(const DAI &end, int artificialOffset=0) │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:771 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_e_n_d │ │ │ │ │ +Iterator end() const │ │ │ │ │ +return end iterator for the codimension and partition the ygrid represents │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:759 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity │ │ │ │ │ +in YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:594 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator()=default │ │ │ │ │ default constructor │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_r_e_f_i_n_e │ │ │ │ │ -EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std:: │ │ │ │ │ -bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -export the coordinate type │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const │ │ │ │ │ -std::array< int, dim > &s) │ │ │ │ │ -construct a container with all necessary information │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -ct meshsize(int d, int i) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -EquidistantOffsetCoordinates() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -EquidistantOffsetCoordinates(const Dune::FieldVector< ct, dim > &lowerLeft, │ │ │ │ │ -const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > │ │ │ │ │ -&s) │ │ │ │ │ -construct a container with all necessary information │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_r_e_f_i_n_e │ │ │ │ │ -EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, │ │ │ │ │ -std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &s) const │ │ │ │ │ -print information on this container │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:219 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -ct meshsize(int d, int i) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_o_r_i_g_i_n │ │ │ │ │ -ct origin(int d) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_s_i_z_e │ │ │ │ │ -int size(int d) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -export the coordinate type │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -export dimension │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -ct coordinate(int d, int i) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Coordinate container for a tensor product YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:245 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &s) const │ │ │ │ │ -print information on this container │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:347 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -ct meshsize(int d, int i) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:269 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -ct coordinate(int d, int i) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:278 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -export dimension │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:250 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_r_e_f_i_n_e │ │ │ │ │ -TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std:: │ │ │ │ │ -bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:297 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -TensorProductCoordinates(const std::array< std::vector< ct >, dim > &c, const │ │ │ │ │ -std::array< int, dim > &offset) │ │ │ │ │ -construct a container with all necessary information │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:261 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -TensorProductCoordinates() │ │ │ │ │ -the default constructor │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -export the coordinate type │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:248 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_s_i_z_e │ │ │ │ │ -int size(int d) const │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:286 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_w_h_i_c_h │ │ │ │ │ +int which() const │ │ │ │ │ +return the current component number │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:718 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ +void move(int i, int dist) │ │ │ │ │ +move the grid, this is only done and needed for codim 0 │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:724 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(const Iterator &i) const │ │ │ │ │ +compare two iterators: component has to match │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:702 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ +Coordinates::ctype lowerleft(int i) const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:642 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +Dune::FieldVector< typename Coordinates::ctype, dim > meshsize() const │ │ │ │ │ +return the current meshsize vector │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:669 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator(const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, │ │ │ │ │ +int which=0) │ │ │ │ │ +construct an iterator from coordinates and component │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:601 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d_C_o_n_t │ │ │ │ │ +Coordinates * coordCont() const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:734 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ +Coordinates::ctype upperright(int i) const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:652 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ +std::bitset< dim > shift() const │ │ │ │ │ +return the shift vector │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:681 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ +bool shift(int i) const │ │ │ │ │ +return the shift in direction i │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:675 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ +bool operator!=(const Iterator &i) const │ │ │ │ │ +compare two iterators: component has to match │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:710 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ +void move(const iTupel &dist) │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:729 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ +Dune::FieldVector< typename Coordinates::ctype, dim > upperright() const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:657 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ +const std::array< int, dim > & coord() const │ │ │ │ │ +return coordinate array at the current position │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:637 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ +Iterator & operator++() │ │ │ │ │ +increment to the next entity jumping to next component if necessary │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:694 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +Coordinates::ctype meshsize(int i) const │ │ │ │ │ +return the current meshsize in direction i │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:663 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ +int coord(int i) const │ │ │ │ │ +return coordinate at the current position (direction i) │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:631 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator(const YGrid< Coordinates > &yg, bool end=false) │ │ │ │ │ +create an iterator to start or end of the codimension │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:608 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ +Dune::FieldVector< typename Coordinates::ctype, dim > lowerleft() const │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:647 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ +int superindex() const │ │ │ │ │ +return the superindex │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:687 │ │ │ │ │ +_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_r_e_i_n_i_t │ │ │ │ │ +void reinit(const YGrid< Coordinates > &yg, const std::array< int, dim > │ │ │ │ │ +&coords, int which=0) │ │ │ │ │ +reinitializes an iterator, as if it was just constructed. │ │ │ │ │ +DDeeffiinniittiioonn ygrid.hh:623 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: structuredyaspgridfactory.hh File Reference │ │ │ │ +dune-grid: partitioning.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,64 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
structuredyaspgridfactory.hh File Reference
│ │ │ │ +
partitioning.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ +

This file provides tools to partition YaspGrids. If you want to write your own partitioner, inherit from Yasp::Partitioning and implement the partition() method. You can also browse this file for already available useful partitioners, like Yasp::FixedSizePartitioning. │ │ │ │ More...

│ │ │ │ -
#include <memory>
│ │ │ │ -#include <dune/grid/utility/structuredgridfactory.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <dune/common/math.hh>
│ │ │ │ +#include <dune/common/deprecated.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid. More...
class  Dune::Yasp::Partitioning< d >
 a base class for the yaspgrid partitioning strategy More...
 
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
class  Dune::Yasp::DefaultPartitioning< d >
 
class  Dune::Yasp::PowerDPartitioning< d >
 Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
 
class  Dune::Yasp::FixedSizePartitioning< d >
 Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
 
class  Dune::YLoadBalance< d >
 a base class for the yaspgrid partitioning strategy More...
 
class  Dune::YLoadBalanceForward< d >
 
class  Dune::YLoadBalanceDefault< d >
 Implement the default load balance strategy of yaspgrid. More...
 
class  Dune::YLoadBalancePowerD< d >
 Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
 
class  Dune::YaspFixedSizePartitioner< d >
 Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Yasp
 
│ │ │ │

Detailed Description

│ │ │ │ -

Specialization of the StructuredGridFactory class for YaspGrid.

│ │ │ │ +

This file provides tools to partition YaspGrids. If you want to write your own partitioner, inherit from Yasp::Partitioning and implement the partition() method. You can also browse this file for already available useful partitioners, like Yasp::FixedSizePartitioning.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +2,61 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -structuredyaspgridfactory.hh File Reference │ │ │ │ │ -Specialization of the StructuredGridFactory class for YaspGrid. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_s_t_r_u_c_t_u_r_e_d_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +partitioning.hh File Reference │ │ │ │ │ +This file provides tools to partition YaspGrids. If you want to write your own │ │ │ │ │ +partitioner, inherit from Yasp::Partitioning and implement the partition() │ │ │ │ │ +method. You can also browse this file for already available useful │ │ │ │ │ +partitioners, like Yasp::FixedSizePartitioning. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ - _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ -  Specialization of the _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_, │ │ │ │ │ - _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ -  Specialization of the _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y for │ │ │ │ │ - YaspGrid _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ +  a base class for the yaspgrid partitioning strategy _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ +  Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ + Implement partitioner that gets a fixed partitioning from an array If │ │ │ │ │ +  the given partitioning doesn't match the number of processors, the grid │ │ │ │ │ + should be distributed to, an exception is thrown. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_<_ _d_ _> │ │ │ │ │ +  a base class for the yaspgrid partitioning strategy _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_<_ _d_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t_<_ _d_ _> │ │ │ │ │ +  Implement the default load balance strategy of yaspgrid. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D_<_ _d_ _> │ │ │ │ │ +  Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r_<_ _d_ _> │ │ │ │ │ + Implement partitioner that gets a fixed partitioning from an array If │ │ │ │ │ +  the given partitioning doesn't match the number of processors, the grid │ │ │ │ │ + should be distributed to, an exception is thrown. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ +  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ │ +This file provides tools to partition YaspGrids. If you want to write your own │ │ │ │ │ +partitioner, inherit from Yasp::Partitioning and implement the partition() │ │ │ │ │ +method. You can also browse this file for already available useful │ │ │ │ │ +partitioners, like Yasp::FixedSizePartitioning. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: structuredyaspgridfactory.hh Source File │ │ │ │ +dune-grid: partitioning.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,126 +74,285 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
structuredyaspgridfactory.hh
│ │ │ │ +
partitioning.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <memory>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
27 template<class ctype, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ - │ │ │ │ -
31 static const int dimworld = GridType::dimensionworld;
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ -
44 static std::unique_ptr<GridType>
│ │ │ │ -
│ │ │ │ -
45 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ -
46 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ -
47 const std::array<unsigned int,dim>& elements)
│ │ │ │ +
3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH
│ │ │ │ +
4#define DUNE_GRID_YASPGRID_PARTITIONING_HH
│ │ │ │ +
5
│ │ │ │ +
13#include<array>
│ │ │ │ +
14
│ │ │ │ +
15#include<dune/common/math.hh>
│ │ │ │ +
16#include <dune/common/deprecated.hh>
│ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
20
│ │ │ │ +
21 namespace Yasp
│ │ │ │ +
22 {
│ │ │ │ +
23
│ │ │ │ +
37 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {
│ │ │ │ +
40 public:
│ │ │ │ +
41 using iTupel = std::array<int, d>;
│ │ │ │ +
42 virtual ~Partitioning() = default;
│ │ │ │ +
43 virtual void partition(const iTupel&, int, iTupel&, int) const = 0;
│ │ │ │ +
44 };
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │
48 {
│ │ │ │ -
49 using std::abs;
│ │ │ │ -
50 for(int d = 0; d < dimworld; ++d)
│ │ │ │ -
51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10)
│ │ │ │ -
52 DUNE_THROW(GridError, className<StructuredGridFactory>()
│ │ │ │ -
53 << "::createCubeGrid(): You have to use Yaspgrid<dim"
│ │ │ │ -
54 ", EquidistantOffsetCoordinates<ctype,dim> > as your"
│ │ │ │ -
55 "grid type for non-trivial origin." );
│ │ │ │ -
56
│ │ │ │ -
57 // construct array of ints instead of unsigned ints
│ │ │ │ -
58 std::array<int, dim> elem;
│ │ │ │ -
59 std::copy(elements.begin(), elements.end(), elem.begin());
│ │ │ │ -
60
│ │ │ │ -
61 return std::make_unique<GridType>(upperRight, elem,
│ │ │ │ -
62 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ +
49 public:
│ │ │ │ +
50 using iTupel = std::array<int, d>;
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ +
57 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ +
58 {
│ │ │ │ +
59 double opt=1E100;
│ │ │ │ +
60 iTupel trydims;
│ │ │ │ +
61
│ │ │ │ +
62 trydims.fill(-1);
│ │ │ │ +
63 dims.fill(-1);
│ │ │ │
64
│ │ │ │ -
70 static std::unique_ptr<GridType>
│ │ │ │ -
│ │ │ │ -
71 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ -
72 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ -
73 const std::array<unsigned int,dim>& elements)
│ │ │ │ -
74 {
│ │ │ │ -
75 DUNE_THROW(GridError, className<StructuredGridFactory>()
│ │ │ │ -
76 << "::createSimplexGrid(): Simplices are not supported "
│ │ │ │ -
77 "by YaspGrid.");
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
80 };
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
89 template<class ctype, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
92 static const int dimworld = GridType::dimensionworld;
│ │ │ │ -
93
│ │ │ │ -
94 public:
│ │ │ │ -
101 static std::unique_ptr<GridType>
│ │ │ │ -
│ │ │ │ -
102 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ -
103 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ -
104 const std::array<unsigned int,dim>& elements)
│ │ │ │ -
105 {
│ │ │ │ -
106 // construct array of ints instead of unsigned ints
│ │ │ │ -
107 std::array<int, dim> elem;
│ │ │ │ -
108 std::copy(elements.begin(), elements.end(), elem.begin());
│ │ │ │ -
109
│ │ │ │ -
110 return std::make_unique<GridType>(lowerLeft, upperRight, elem,
│ │ │ │ -
111 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
│ │ │ │ -
112 }
│ │ │ │ -
│ │ │ │ -
113
│ │ │ │ -
119 static std::unique_ptr<GridType>
│ │ │ │ -
│ │ │ │ -
120 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ -
121 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ -
122 const std::array<unsigned int,dim>& elements)
│ │ │ │ -
123 {
│ │ │ │ -
124 DUNE_THROW(GridError, className<StructuredGridFactory>()
│ │ │ │ -
125 << "::createSimplexGrid(): Simplices are not supported "
│ │ │ │ -
126 "by YaspGrid.");
│ │ │ │ -
127 }
│ │ │ │ -
│ │ │ │ -
128
│ │ │ │ -
129 };
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131} // namespace Dune
│ │ │ │ -
132#endif
│ │ │ │ +
65 optimize_dims(d-1,size,P,dims,trydims,opt,overlap);
│ │ │ │ +
66 if (dims[0] == -1)
│ │ │ │ +
67 DUNE_THROW(Dune::GridError, "Failed to find a suitable partition");
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
70 private:
│ │ │ │ +
71 void optimize_dims (int i, const iTupel& size, int P, iTupel& dims, iTupel& trydims, double &opt, int overlap ) const
│ │ │ │ +
72 {
│ │ │ │ +
73 if (i>0) // test all subdivisions recursively
│ │ │ │ +
74 {
│ │ │ │ +
75 for (int k=1; k<=P; k++)
│ │ │ │ +
76 if (
│ │ │ │ +
77 P%k==0 // k devides P
│ │ │ │ +
78 and (
│ │ │ │ +
79 k == 1 // no neighbors
│ │ │ │ +
80 or
│ │ │ │ +
81 size[i] / k >= 2*overlap // size sufficient for overlap
│ │ │ │ +
82 )
│ │ │ │ +
83 )
│ │ │ │ +
84 {
│ │ │ │ +
85 // P divisible by k
│ │ │ │ +
86 trydims[i] = k;
│ │ │ │ +
87 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap);
│ │ │ │ +
88 }
│ │ │ │ +
89 }
│ │ │ │ +
90 else
│ │ │ │ +
91 {
│ │ │ │ +
92 // found a possible combination
│ │ │ │ +
93 if (
│ │ │ │ +
94 P == 1 // no neighbors
│ │ │ │ +
95 or
│ │ │ │ +
96 size[0] / P >= 2*overlap // size sufficient for overlap
│ │ │ │ +
97 )
│ │ │ │ +
98 trydims[0] = P;
│ │ │ │ +
99 else
│ │ │ │ +
100 return;
│ │ │ │ +
101
│ │ │ │ +
102 // check for optimality
│ │ │ │ +
103 double m = -1.0;
│ │ │ │ +
104
│ │ │ │ +
105 for (int k=0; k<d; k++)
│ │ │ │ +
106 {
│ │ │ │ +
107 double mm=((double)size[k])/((double)trydims[k]);
│ │ │ │ +
108 if (fmod((double)size[k],(double)trydims[k])>0.0001) mm*=3;
│ │ │ │ +
109 if ( mm > m ) m = mm;
│ │ │ │ +
110 }
│ │ │ │ +
111 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims << " norm=" << m << std::endl;
│ │ │ │ +
112 if (m<opt)
│ │ │ │ +
113 {
│ │ │ │ +
114 opt = m;
│ │ │ │ +
115 dims = trydims;
│ │ │ │ +
116 }
│ │ │ │ +
117 }
│ │ │ │ +
118 }
│ │ │ │ +
119 };
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
123 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
125 {
│ │ │ │ +
126 public:
│ │ │ │ +
127 typedef std::array<int, d> iTupel;
│ │ │ │ + │ │ │ │ +
129
│ │ │ │ +
│ │ │ │ +
130 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ +
131 {
│ │ │ │ +
132 for (int i=1; i<=P; ++i)
│ │ │ │ +
133 if (Dune::power(i, d) == P) {
│ │ │ │ +
134 std::fill(dims.begin(), dims.end(),i);
│ │ │ │ +
135 return;
│ │ │ │ +
136 }
│ │ │ │ +
137
│ │ │ │ +
138 DUNE_THROW(GridError, "Power partitioning failed: your number of processes needs to be a " << d << "-th power.");
│ │ │ │ +
139 }
│ │ │ │ +
│ │ │ │ +
140 };
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
146 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
148 {
│ │ │ │ +
149 public:
│ │ │ │ +
150 FixedSizePartitioning(const std::array<int,d>& dims) : _dims(dims) {}
│ │ │ │ +
151
│ │ │ │ + │ │ │ │ +
153
│ │ │ │ +
│ │ │ │ +
154 void partition(const std::array<int,d>&, int P, std::array<int,d>& dims, int overlap) const final
│ │ │ │ +
155 {
│ │ │ │ +
156 int prod = 1;
│ │ │ │ +
157 for (int i=0; i<d; i++)
│ │ │ │ +
158 prod *= _dims[i];
│ │ │ │ +
159 if (P != prod)
│ │ │ │ +
160 DUNE_THROW(Dune::Exception,"Your processor number doesn't match your partitioning information");
│ │ │ │ +
161 dims = _dims;
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163
│ │ │ │ +
164 private:
│ │ │ │ +
165 std::array<int,d> _dims;
│ │ │ │ +
166 };
│ │ │ │ +
│ │ │ │ +
167
│ │ │ │ +
169 }
│ │ │ │ +
170
│ │ │ │ +
174 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
176 {
│ │ │ │ +
177 public:
│ │ │ │ +
178 typedef std::array<int, d> iTupel;
│ │ │ │ +
179 [[deprecated("use the new interface of Yasp::Partitioning")]]
│ │ │ │ +
180 virtual ~YLoadBalance() {}
│ │ │ │ +
│ │ │ │ +
181 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final {
│ │ │ │ +
182 this->loadbalance(size,P,dims);
│ │ │ │ +
183 }
│ │ │ │ +
│ │ │ │ +
184 virtual void loadbalance(const iTupel&, int, iTupel&) const = 0;
│ │ │ │ +
185 };
│ │ │ │ +
│ │ │ │ +
186
│ │ │ │ +
187DUNE_NO_DEPRECATED_BEGIN
│ │ │ │ +
188 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
190 {
│ │ │ │ +
191 std::unique_ptr<Yasp::Partitioning<d>> p_;
│ │ │ │ +
192 public:
│ │ │ │ +
193 typedef std::array<int, d> iTupel;
│ │ │ │ +
194 YLoadBalanceForward(std::unique_ptr<Yasp::Partitioning<d>> && p) : p_(std::move(p)) {}
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
196 void loadbalance(const iTupel& size, int P, iTupel& dims) const final {
│ │ │ │ +
197 return p_->partition(size,P,dims,1); // assuming the usual overlap of 1
│ │ │ │ +
198 }
│ │ │ │ +
│ │ │ │ +
199 };
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
204 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
206 {
│ │ │ │ +
207 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
209 YLoadBalanceForward<d>(std::make_unique<Yasp::DefaultPartitioning<d>>())
│ │ │ │ +
210 {}
│ │ │ │ +
│ │ │ │ +
211 };
│ │ │ │ +
│ │ │ │ +
212
│ │ │ │ +
216 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
218 {
│ │ │ │ +
219 public:
│ │ │ │ +
220 typedef std::array<int, d> iTupel;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
222 YLoadBalanceForward<d>(std::make_unique<Yasp::PowerDPartitioning<d>>())
│ │ │ │ +
223 {}
│ │ │ │ +
│ │ │ │ +
224 };
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
231 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
233 {
│ │ │ │ +
234 public:
│ │ │ │ +
235 typedef std::array<int, d> iTupel;
│ │ │ │ +
│ │ │ │ +
236 YaspFixedSizePartitioner(const std::array<int,d>& dims) :
│ │ │ │ +
237 YLoadBalanceForward<d>(std::make_unique<Yasp::FixedSizePartitioning<d>>(dims))
│ │ │ │ +
238 {}
│ │ │ │ +
│ │ │ │ +
239 };
│ │ │ │ +
│ │ │ │ +
240
│ │ │ │ +
241DUNE_NO_DEPRECATED_END
│ │ │ │ +
242}
│ │ │ │ +
243
│ │ │ │ +
244#endif
│ │ │ │ +
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Construct structured cube and simplex grids in unstructured grid managers.
Definition utility/structuredgridfactory.hh:31
│ │ │ │
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ -
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ -
Container for equidistant coordinates in a YaspGrid.
Definition coordinates.hh:29
│ │ │ │ -
Container for equidistant coordinates in a YaspGrid with non-trivial origin.
Definition coordinates.hh:131
│ │ │ │ -
static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured cube grid.
Definition structuredyaspgridfactory.hh:45
│ │ │ │ -
static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured simplex grid.
Definition structuredyaspgridfactory.hh:71
│ │ │ │ -
static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured cube grid.
Definition structuredyaspgridfactory.hh:102
│ │ │ │ -
static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured simplex grid.
Definition structuredyaspgridfactory.hh:120
│ │ │ │ -
A class to construct structured cube and simplex grids using the grid factory.
│ │ │ │ +
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:39
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:41
│ │ │ │ +
virtual ~Partitioning()=default
│ │ │ │ +
virtual void partition(const iTupel &, int, iTupel &, int) const =0
│ │ │ │ +
Definition partitioning.hh:48
│ │ │ │ +
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Distribute a structured grid across a set of processors.
Definition partitioning.hh:57
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:50
│ │ │ │ +
Implement yaspgrid load balance strategy for P=x^{dim} processors.
Definition partitioning.hh:125
│ │ │ │ +
virtual ~PowerDPartitioning()
Definition partitioning.hh:128
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:127
│ │ │ │ +
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Definition partitioning.hh:130
│ │ │ │ +
Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
Definition partitioning.hh:148
│ │ │ │ +
void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, int overlap) const final
Definition partitioning.hh:154
│ │ │ │ +
FixedSizePartitioning(const std::array< int, d > &dims)
Definition partitioning.hh:150
│ │ │ │ +
virtual ~FixedSizePartitioning()
Definition partitioning.hh:152
│ │ │ │ +
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:176
│ │ │ │ +
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Definition partitioning.hh:181
│ │ │ │ +
virtual void loadbalance(const iTupel &, int, iTupel &) const =0
│ │ │ │ +
virtual ~YLoadBalance()
Definition partitioning.hh:180
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:178
│ │ │ │ +
Definition partitioning.hh:190
│ │ │ │ +
void loadbalance(const iTupel &size, int P, iTupel &dims) const final
Definition partitioning.hh:196
│ │ │ │ +
YLoadBalanceForward(std::unique_ptr< Yasp::Partitioning< d > > &&p)
Definition partitioning.hh:194
│ │ │ │ +
virtual ~YLoadBalanceForward()
Definition partitioning.hh:195
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:193
│ │ │ │ +
Implement the default load balance strategy of yaspgrid.
Definition partitioning.hh:206
│ │ │ │ +
YLoadBalanceDefault()
Definition partitioning.hh:208
│ │ │ │ +
Implement yaspgrid load balance strategy for P=x^{dim} processors.
Definition partitioning.hh:218
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:220
│ │ │ │ +
YLoadBalancePowerD()
Definition partitioning.hh:221
│ │ │ │ +
Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
Definition partitioning.hh:233
│ │ │ │ +
YaspFixedSizePartitioner(const std::array< int, d > &dims)
Definition partitioning.hh:236
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:235
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,148 +1,329 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -structuredyaspgridfactory.hh │ │ │ │ │ +partitioning.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_s_t_r_u_c_t_u_r_e_d_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -27 template │ │ │ │ │ -_2_8 class _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y<_Y_a_s_p_G_r_i_d │ │ │ │ │ -> > │ │ │ │ │ -29 { │ │ │ │ │ -30 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_d_i_m_> > _G_r_i_d_T_y_p_e; │ │ │ │ │ -31 static const int dimworld = GridType::dimensionworld; │ │ │ │ │ -32 │ │ │ │ │ -33 public: │ │ │ │ │ -44 static std::unique_ptr │ │ │ │ │ -_4_5 _c_r_e_a_t_e_C_u_b_e_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ -46 const FieldVector& upperRight, │ │ │ │ │ -47 const std::array& elements) │ │ │ │ │ +3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH │ │ │ │ │ +4#define DUNE_GRID_YASPGRID_PARTITIONING_HH │ │ │ │ │ +5 │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +20 │ │ │ │ │ +21 namespace Yasp │ │ │ │ │ +22 { │ │ │ │ │ +23 │ │ │ │ │ +37 template │ │ │ │ │ +_3_8 class _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +39 { │ │ │ │ │ +40 public: │ │ │ │ │ +_4_1 using _i_T_u_p_e_l = std::array; │ │ │ │ │ +_4_2 virtual _~_P_a_r_t_i_t_i_o_n_i_n_g() = default; │ │ │ │ │ +_4_3 virtual void _p_a_r_t_i_t_i_o_n(const _i_T_u_p_e_l&, int, _i_T_u_p_e_l&, int) const = 0; │ │ │ │ │ +44 }; │ │ │ │ │ +45 │ │ │ │ │ +46 template │ │ │ │ │ +_4_7 class _D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g : public _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ 48 { │ │ │ │ │ -49 using std::abs; │ │ │ │ │ -50 for(int d = 0; d < dimworld; ++d) │ │ │ │ │ -51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10) │ │ │ │ │ -52 DUNE_THROW(_G_r_i_d_E_r_r_o_r, className() │ │ │ │ │ -53 << "::createCubeGrid(): You have to use Yaspgrid > as your" │ │ │ │ │ -55 "grid type for non-trivial origin." ); │ │ │ │ │ -56 │ │ │ │ │ -57 // construct array of ints instead of unsigned ints │ │ │ │ │ -58 std::array elem; │ │ │ │ │ -59 std::copy(elements.begin(), elements.end(), elem.begin()); │ │ │ │ │ -60 │ │ │ │ │ -61 return std::make_unique(upperRight, elem, │ │ │ │ │ -62 std::bitset(), 1); // default constructor of bitset sets to zero │ │ │ │ │ -63 } │ │ │ │ │ +49 public: │ │ │ │ │ +_5_0 using _i_T_u_p_e_l = std::array; │ │ │ │ │ +51 │ │ │ │ │ +_5_7 void _p_a_r_t_i_t_i_o_n (const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, int overlap) const │ │ │ │ │ +final │ │ │ │ │ +58 { │ │ │ │ │ +59 double opt=1E100; │ │ │ │ │ +60 _i_T_u_p_e_l trydims; │ │ │ │ │ +61 │ │ │ │ │ +62 trydims.fill(-1); │ │ │ │ │ +63 dims.fill(-1); │ │ │ │ │ 64 │ │ │ │ │ -70 static std::unique_ptr │ │ │ │ │ -_7_1 _c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ -72 const FieldVector& upperRight, │ │ │ │ │ -73 const std::array& elements) │ │ │ │ │ +65 optimize_dims(d-1,size,P,dims,trydims,opt,overlap); │ │ │ │ │ +66 if (dims[0] == -1) │ │ │ │ │ +67 DUNE_THROW(_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r, "Failed to find a suitable partition"); │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +70 private: │ │ │ │ │ +71 void optimize_dims (int i, const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, _i_T_u_p_e_l& │ │ │ │ │ +trydims, double &opt, int overlap ) const │ │ │ │ │ +72 { │ │ │ │ │ +73 if (i>0) // test all subdivisions recursively │ │ │ │ │ 74 { │ │ │ │ │ -75 DUNE_THROW(_G_r_i_d_E_r_r_o_r, className() │ │ │ │ │ -76 << "::createSimplexGrid(): Simplices are not supported " │ │ │ │ │ -77 "by YaspGrid."); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -80 }; │ │ │ │ │ -81 │ │ │ │ │ -89 template │ │ │ │ │ -_9_0 class _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y<_Y_a_s_p_G_r_i_d > > { │ │ │ │ │ -91 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_d_i_m_> > _G_r_i_d_T_y_p_e; │ │ │ │ │ -92 static const int dimworld = GridType::dimensionworld; │ │ │ │ │ -93 │ │ │ │ │ -94 public: │ │ │ │ │ -101 static std::unique_ptr │ │ │ │ │ -_1_0_2 _c_r_e_a_t_e_C_u_b_e_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ -103 const FieldVector& upperRight, │ │ │ │ │ -104 const std::array& elements) │ │ │ │ │ -105 { │ │ │ │ │ -106 // construct array of ints instead of unsigned ints │ │ │ │ │ -107 std::array elem; │ │ │ │ │ -108 std::copy(elements.begin(), elements.end(), elem.begin()); │ │ │ │ │ -109 │ │ │ │ │ -110 return std::make_unique(lowerLeft, upperRight, elem, │ │ │ │ │ -111 std::bitset(), 1); // default constructor of bitset sets to zero │ │ │ │ │ -112 } │ │ │ │ │ -113 │ │ │ │ │ -119 static std::unique_ptr │ │ │ │ │ -_1_2_0 _c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ -121 const FieldVector& upperRight, │ │ │ │ │ -122 const std::array& elements) │ │ │ │ │ -123 { │ │ │ │ │ -124 DUNE_THROW(_G_r_i_d_E_r_r_o_r, className() │ │ │ │ │ -125 << "::createSimplexGrid(): Simplices are not supported " │ │ │ │ │ -126 "by YaspGrid."); │ │ │ │ │ -127 } │ │ │ │ │ -128 │ │ │ │ │ -129 }; │ │ │ │ │ -130 │ │ │ │ │ -131} // namespace Dune │ │ │ │ │ -132#endif │ │ │ │ │ +75 for (int k=1; k<=P; k++) │ │ │ │ │ +76 if ( │ │ │ │ │ +77 P%k==0 // k devides P │ │ │ │ │ +78 and ( │ │ │ │ │ +79 k == 1 // no neighbors │ │ │ │ │ +80 or │ │ │ │ │ +81 size[i] / k >= 2*overlap // size sufficient for overlap │ │ │ │ │ +82 ) │ │ │ │ │ +83 ) │ │ │ │ │ +84 { │ │ │ │ │ +85 // P divisible by k │ │ │ │ │ +86 trydims[i] = k; │ │ │ │ │ +87 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap); │ │ │ │ │ +88 } │ │ │ │ │ +89 } │ │ │ │ │ +90 else │ │ │ │ │ +91 { │ │ │ │ │ +92 // found a possible combination │ │ │ │ │ +93 if ( │ │ │ │ │ +94 P == 1 // no neighbors │ │ │ │ │ +95 or │ │ │ │ │ +96 size[0] / P >= 2*overlap // size sufficient for overlap │ │ │ │ │ +97 ) │ │ │ │ │ +98 trydims[0] = P; │ │ │ │ │ +99 else │ │ │ │ │ +100 return; │ │ │ │ │ +101 │ │ │ │ │ +102 // check for optimality │ │ │ │ │ +103 double m = -1.0; │ │ │ │ │ +104 │ │ │ │ │ +105 for (int k=0; k0.0001) mm*=3; │ │ │ │ │ +109 if ( mm > m ) m = mm; │ │ │ │ │ +110 } │ │ │ │ │ +111 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims │ │ │ │ │ +<< " norm=" << m << std::endl; │ │ │ │ │ +112 if (m │ │ │ │ │ +_1_2_4 class _P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g : public _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +125 { │ │ │ │ │ +126 public: │ │ │ │ │ +_1_2_7 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +_1_2_8 virtual _~_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ +129 │ │ │ │ │ +_1_3_0 void _p_a_r_t_i_t_i_o_n (const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, int overlap) const │ │ │ │ │ +final │ │ │ │ │ +131 { │ │ │ │ │ +132 for (int i=1; i<=P; ++i) │ │ │ │ │ +133 if (Dune::power(i, d) == P) { │ │ │ │ │ +134 std::fill(dims.begin(), dims.end(),i); │ │ │ │ │ +135 return; │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Power partitioning failed: your number of processes │ │ │ │ │ +needs to be a " << d << "-th power."); │ │ │ │ │ +139 } │ │ │ │ │ +140 }; │ │ │ │ │ +141 │ │ │ │ │ +146 template │ │ │ │ │ +_1_4_7 class _F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g : public _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +148 { │ │ │ │ │ +149 public: │ │ │ │ │ +_1_5_0 _F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g(const std::array& dims) : _dims(dims) {} │ │ │ │ │ +151 │ │ │ │ │ +_1_5_2 virtual _~_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ +153 │ │ │ │ │ +_1_5_4 void _p_a_r_t_i_t_i_o_n(const std::array&, int P, std::array& dims, │ │ │ │ │ +int overlap) const final │ │ │ │ │ +155 { │ │ │ │ │ +156 int prod = 1; │ │ │ │ │ +157 for (int i=0; i _dims; │ │ │ │ │ +166 }; │ │ │ │ │ +167 │ │ │ │ │ +169 } │ │ │ │ │ +170 │ │ │ │ │ +174 template │ │ │ │ │ +_1_7_5 class _Y_L_o_a_d_B_a_l_a_n_c_e : public _Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +176 { │ │ │ │ │ +177 public: │ │ │ │ │ +_1_7_8 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +179 [[deprecated("use the new interface of Yasp::Partitioning")]] │ │ │ │ │ +_1_8_0 virtual _~_Y_L_o_a_d_B_a_l_a_n_c_e() {} │ │ │ │ │ +_1_8_1 void _p_a_r_t_i_t_i_o_n (const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, int overlap) const │ │ │ │ │ +final { │ │ │ │ │ +182 this->_l_o_a_d_b_a_l_a_n_c_e(size,P,dims); │ │ │ │ │ +183 } │ │ │ │ │ +_1_8_4 virtual void _l_o_a_d_b_a_l_a_n_c_e(const _i_T_u_p_e_l&, int, _i_T_u_p_e_l&) const = 0; │ │ │ │ │ +185 }; │ │ │ │ │ +186 │ │ │ │ │ +187DUNE_NO_DEPRECATED_BEGIN │ │ │ │ │ +188 template │ │ │ │ │ +_1_8_9 class _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d : public _Y_L_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ +190 { │ │ │ │ │ +191 std::unique_ptr> p_; │ │ │ │ │ +192 public: │ │ │ │ │ +_1_9_3 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +_1_9_4 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(std::unique_ptr<_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_<_d_>> && p) : p_(_s_t_d:: │ │ │ │ │ +move(p)) {} │ │ │ │ │ +_1_9_5 virtual _~_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d() {} │ │ │ │ │ +_1_9_6 void _l_o_a_d_b_a_l_a_n_c_e(const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims) const final { │ │ │ │ │ +197 return p_->partition(size,P,dims,1); // assuming the usual overlap of 1 │ │ │ │ │ +198 } │ │ │ │ │ +199 }; │ │ │ │ │ +200 │ │ │ │ │ +204 template │ │ │ │ │ +_2_0_5 class _Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t : public _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ +206 { │ │ │ │ │ +207 public: │ │ │ │ │ +_2_0_8 _Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t() : │ │ │ │ │ +209 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(_s_t_d::make_unique>()) │ │ │ │ │ +210 {} │ │ │ │ │ +211 }; │ │ │ │ │ +212 │ │ │ │ │ +216 template │ │ │ │ │ +_2_1_7 class _Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D : public _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ +218 { │ │ │ │ │ +219 public: │ │ │ │ │ +_2_2_0 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +_2_2_1 _Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D() : │ │ │ │ │ +222 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(_s_t_d::make_unique>()) │ │ │ │ │ +223 {} │ │ │ │ │ +224 }; │ │ │ │ │ +225 │ │ │ │ │ +231 template │ │ │ │ │ +_2_3_2 class _Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r : public _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ +233 { │ │ │ │ │ +234 public: │ │ │ │ │ +_2_3_5 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +_2_3_6 _Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r(const std::array& dims) : │ │ │ │ │ +237 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(_s_t_d::make_unique> │ │ │ │ │ +(dims)) │ │ │ │ │ +238 {} │ │ │ │ │ +239 }; │ │ │ │ │ +240 │ │ │ │ │ +241DUNE_NO_DEPRECATED_END │ │ │ │ │ +242} │ │ │ │ │ +243 │ │ │ │ │ +244#endif │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -Construct structured cube and simplex grids in unstructured grid managers. │ │ │ │ │ -DDeeffiinniittiioonn utility/structuredgridfactory.hh:31 │ │ │ │ │ _D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ Base class for exceptions in Dune grid modules. │ │ │ │ │ DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ -[ provides Dune::Grid ] │ │ │ │ │ -DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Container for equidistant coordinates in a YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m │ │ │ │ │ -_>_ _>_ _>_:_:_c_r_e_a_t_e_C_u_b_e_G_r_i_d │ │ │ │ │ -static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, │ │ │ │ │ -dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ -std::array< unsigned int, dim > &elements) │ │ │ │ │ -Create a structured cube grid. │ │ │ │ │ -DDeeffiinniittiioonn structuredyaspgridfactory.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m │ │ │ │ │ -_>_ _>_ _>_:_:_c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d │ │ │ │ │ -static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, │ │ │ │ │ -dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ -std::array< unsigned int, dim > &elements) │ │ │ │ │ -Create a structured simplex grid. │ │ │ │ │ -DDeeffiinniittiioonn structuredyaspgridfactory.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ -_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_c_r_e_a_t_e_C_u_b_e_G_r_i_d │ │ │ │ │ -static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, │ │ │ │ │ -dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ -std::array< unsigned int, dim > &elements) │ │ │ │ │ -Create a structured cube grid. │ │ │ │ │ -DDeeffiinniittiioonn structuredyaspgridfactory.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ -_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d │ │ │ │ │ -static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, │ │ │ │ │ -dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ -std::array< unsigned int, dim > &elements) │ │ │ │ │ -Create a structured simplex grid. │ │ │ │ │ -DDeeffiinniittiioonn structuredyaspgridfactory.hh:120 │ │ │ │ │ -_s_t_r_u_c_t_u_r_e_d_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ -A class to construct structured cube and simplex grids using the grid factory. │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +a base class for the yaspgrid partitioning strategy │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_~_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +virtual ~Partitioning()=default │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +virtual void partition(const iTupel &, int, iTupel &, int) const =0 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +void partition(const iTupel &size, int P, iTupel &dims, int overlap) const │ │ │ │ │ +final │ │ │ │ │ +Distribute a structured grid across a set of processors. │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_:_:_~_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +virtual ~PowerDPartitioning() │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +void partition(const iTupel &size, int P, iTupel &dims, int overlap) const │ │ │ │ │ +final │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +Implement partitioner that gets a fixed partitioning from an array If the given │ │ │ │ │ +partitioning doesn't ... │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, │ │ │ │ │ +int overlap) const final │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +FixedSizePartitioning(const std::array< int, d > &dims) │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_:_:_~_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +virtual ~FixedSizePartitioning() │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ +a base class for the yaspgrid partitioning strategy │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:176 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +void partition(const iTupel &size, int P, iTupel &dims, int overlap) const │ │ │ │ │ +final │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:181 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_l_o_a_d_b_a_l_a_n_c_e │ │ │ │ │ +virtual void loadbalance(const iTupel &, int, iTupel &) const =0 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_~_Y_L_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ +virtual ~YLoadBalance() │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:180 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:178 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:190 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_l_o_a_d_b_a_l_a_n_c_e │ │ │ │ │ +void loadbalance(const iTupel &size, int P, iTupel &dims) const final │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ +YLoadBalanceForward(std::unique_ptr< Yasp::Partitioning< d > > &&p) │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:194 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_~_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ +virtual ~YLoadBalanceForward() │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:193 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t │ │ │ │ │ +Implement the default load balance strategy of yaspgrid. │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:206 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t │ │ │ │ │ +YLoadBalanceDefault() │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:208 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D │ │ │ │ │ +Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D │ │ │ │ │ +YLoadBalancePowerD() │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:221 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r │ │ │ │ │ +Implement partitioner that gets a fixed partitioning from an array If the given │ │ │ │ │ +partitioning doesn't ... │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:233 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r │ │ │ │ │ +YaspFixedSizePartitioner(const std::array< int, d > &dims) │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:235 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentityseed.hh File Reference │ │ │ │ +dune-grid: yaspgridgeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,46 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridentityseed.hh File Reference
│ │ │ │ +
yaspgridgeometry.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The YaspEntitySeed class. │ │ │ │ +

The YaspGeometry class and its specializations. │ │ │ │ More...

│ │ │ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspEntitySeed< codim, GridImp >
 Describes the minimal information necessary to create a fully functional YaspEntity. More...
class  Dune::YaspGeometry< mydim, cdim, GridImp >
 The general version that handles all codimensions but 0 and dim. More...
 
class  Dune::YaspGeometry< mydim, mydim, GridImp >
 specialize for dim=dimworld, i.e. a volume element More...
 
class  Dune::YaspGeometry< 0, cdim, GridImp >
 specialization for dim=0, this is a vertex More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The YaspEntitySeed class.

│ │ │ │ +

The YaspGeometry class and its specializations.

│ │ │ │ +

YaspGeometry realizes the concept of the geometric part of a mesh entity.

│ │ │ │ +

We have specializations for dim == dimworld (elements) and dim == 0 (vertices). The general version implements all other codimensions.

│ │ │ │ +

As of September 2014, the functionality of YaspGeometry is identical to that of AxisAlignedCubeGeometry. The latter cannot be used directly due to the grid interface facade construction (it isn't templated to the GridImp). As soon as template aliases are available, this header boils down to one line.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,23 +2,36 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridentityseed.hh File Reference │ │ │ │ │ -The YaspEntitySeed class. _M_o_r_e_._._. │ │ │ │ │ +yaspgridgeometry.hh File Reference │ │ │ │ │ +The YaspGeometry class and its specializations. _M_o_r_e_._._. │ │ │ │ │ _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_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  Describes the minimal information necessary to create a fully │ │ │ │ │ - functional _Y_a_s_p_E_n_t_i_t_y. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  The general version that handles all codimensions but 0 and dim. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  specialize for dim=dimworld, i.e. a volume element _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  specialization for dim=0, this is a vertex _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspEntitySeed class. │ │ │ │ │ +The YaspGeometry class and its specializations. │ │ │ │ │ +YaspGeometry realizes the concept of the geometric part of a mesh entity. │ │ │ │ │ +We have specializations for dim == dimworld (elements) and dim == 0 (vertices). │ │ │ │ │ +The general version implements all other codimensions. │ │ │ │ │ +As of September 2014, the functionality of YaspGeometry is identical to that of │ │ │ │ │ +AxisAlignedCubeGeometry. The latter cannot be used directly due to the grid │ │ │ │ │ +interface facade construction (it isn't templated to the GridImp). As soon as │ │ │ │ │ +template aliases are available, this header boils down to one line. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentityseed.hh Source File │ │ │ │ +dune-grid: yaspgridgeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,82 +74,97 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridentityseed.hh
│ │ │ │ +
yaspgridgeometry.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ │
7
│ │ │ │ -
12namespace Dune {
│ │ │ │ -
13
│ │ │ │ -
16 template<int codim, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ -
20 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
21
│ │ │ │ -
22 public:
│ │ │ │ -
24 constexpr static int codimension = codim;
│ │ │ │ -
25
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
28 : _l(-1), _o(0)
│ │ │ │ -
29 {
│ │ │ │ -
30 std::fill(_c.begin(),_c.end(),0);
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ -
34 YaspEntitySeed (int level, std::array<int, dim> coord, int o = 0)
│ │ │ │ -
35 : _l(level), _c(coord), _o(o)
│ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 bool isValid() const
│ │ │ │ -
40 {
│ │ │ │ -
41 return _l != -1;
│ │ │ │ -
42 }
│ │ │ │ +
23namespace Dune {
│ │ │ │ +
24
│ │ │ │ +
29 template<int mydim,int cdim, class GridImp>
│ │ │ │ +
│ │ │ │ +
30 class YaspGeometry : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,cdim>
│ │ │ │ +
31 {
│ │ │ │ +
32 public:
│ │ │ │ +
34 typedef typename GridImp::ctype ctype;
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ +
37 YaspGeometry (const FieldVector<ctype, cdim>& ll, const FieldVector<ctype, cdim>& ur, const std::bitset<cdim>& shift)
│ │ │ │ +
38 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(ll,ur,shift)
│ │ │ │ +
39 {
│ │ │ │ +
40 assert(mydim == shift.count());
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42 };
│ │ │ │
│ │ │ │
43
│ │ │ │ -
44 int level () const { return _l; }
│ │ │ │ -
45 const std::array<int, dim> & coord() const { return _c; }
│ │ │ │ -
46 int offset () const { return _o; }
│ │ │ │ -
47
│ │ │ │ -
48 protected:
│ │ │ │ -
49 int _l; // grid level
│ │ │ │ -
50 std::array<int, dim> _c; // coord in the global grid
│ │ │ │ -
51 int _o; // the offset: which YGridComponent, does the entity belong to
│ │ │ │ -
52 };
│ │ │ │ +
45 template<int mydim, class GridImp>
│ │ │ │ +
│ │ │ │ +
46 class YaspGeometry<mydim,mydim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,mydim>
│ │ │ │ +
47 {
│ │ │ │ +
48 public:
│ │ │ │ +
49 typedef typename GridImp::ctype ctype;
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
52 YaspGeometry (const FieldVector<ctype, mydim>& ll, const FieldVector<ctype, mydim>& ur)
│ │ │ │ +
53 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
│ │ │ │ +
54 {}
│ │ │ │
│ │ │ │ -
53
│ │ │ │ -
54} // namespace Dune
│ │ │ │
55
│ │ │ │ -
56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
58 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
│ │ │ │ +
59 {}
│ │ │ │ +
│ │ │ │ +
60 };
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
63 template<int cdim, class GridImp>
│ │ │ │ +
│ │ │ │ +
64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>
│ │ │ │ +
65 {
│ │ │ │ +
66 public:
│ │ │ │ +
67 typedef typename GridImp::ctype ctype;
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ +
70 explicit YaspGeometry ( const FieldVector< ctype, cdim > &p )
│ │ │ │ +
71 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
│ │ │ │ +
72 {}
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset<cdim> &)
│ │ │ │ +
75 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
│ │ │ │ +
76 {}
│ │ │ │ +
│ │ │ │ +
77 };
│ │ │ │ +
│ │ │ │ +
78} // namespace Dune
│ │ │ │ +
79
│ │ │ │ +
80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Describes the minimal information necessary to create a fully functional YaspEntity.
Definition yaspgridentityseed.hh:18
│ │ │ │ -
int _o
Definition yaspgridentityseed.hh:51
│ │ │ │ -
std::array< int, dim > _c
Definition yaspgridentityseed.hh:50
│ │ │ │ -
int _l
Definition yaspgridentityseed.hh:49
│ │ │ │ -
int level() const
Definition yaspgridentityseed.hh:44
│ │ │ │ -
YaspEntitySeed()
default construct an invalid entity seed
Definition yaspgridentityseed.hh:27
│ │ │ │ -
YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)
constructor
Definition yaspgridentityseed.hh:34
│ │ │ │ -
int offset() const
Definition yaspgridentityseed.hh:46
│ │ │ │ -
static constexpr int codimension
codimension of entity
Definition yaspgridentityseed.hh:24
│ │ │ │ -
const std::array< int, dim > & coord() const
Definition yaspgridentityseed.hh:45
│ │ │ │ -
bool isValid() const
check whether the EntitySeed refers to a valid Entity
Definition yaspgridentityseed.hh:39
│ │ │ │ +
The general version that handles all codimensions but 0 and dim.
Definition yaspgridgeometry.hh:31
│ │ │ │ +
YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype, cdim > &ur, const std::bitset< cdim > &shift)
constructor from midpoint and extension and a bitset defining which unit vectors span the entity
Definition yaspgridgeometry.hh:37
│ │ │ │ +
GridImp::ctype ctype
define type used for coordinates in grid module
Definition yaspgridgeometry.hh:34
│ │ │ │ +
YaspGeometry(const YaspGeometry &other)
copy constructor (skipping temporary variables)
Definition yaspgridgeometry.hh:57
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridgeometry.hh:49
│ │ │ │ +
YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, mydim > &ur)
constructor from midpoint and extension
Definition yaspgridgeometry.hh:52
│ │ │ │ +
YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset< cdim > &)
Definition yaspgridgeometry.hh:74
│ │ │ │ +
YaspGeometry(const FieldVector< ctype, cdim > &p)
constructor
Definition yaspgridgeometry.hh:70
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridgeometry.hh:67
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,98 +1,111 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridentityseed.hh │ │ │ │ │ +yaspgridgeometry.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ │ 7 │ │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ │ -13 │ │ │ │ │ -16 template │ │ │ │ │ -_1_7 class _Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -18 { │ │ │ │ │ -20 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -21 │ │ │ │ │ -22 public: │ │ │ │ │ -_2_4 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ -25 │ │ │ │ │ -_2_7 _Y_a_s_p_E_n_t_i_t_y_S_e_e_d () │ │ │ │ │ -28 : ___l(-1), ___o(0) │ │ │ │ │ -29 { │ │ │ │ │ -30 std::fill(___c.begin(),___c.end(),0); │ │ │ │ │ -31 } │ │ │ │ │ -32 │ │ │ │ │ -_3_4 _Y_a_s_p_E_n_t_i_t_y_S_e_e_d (int _l_e_v_e_l, std::array _c_o_o_r_d, int o = 0) │ │ │ │ │ -35 : ___l(_l_e_v_e_l), ___c(_c_o_o_r_d), ___o(o) │ │ │ │ │ -36 {} │ │ │ │ │ -37 │ │ │ │ │ -_3_9 bool _i_s_V_a_l_i_d() const │ │ │ │ │ -40 { │ │ │ │ │ -41 return ___l != -1; │ │ │ │ │ -42 } │ │ │ │ │ +23namespace _D_u_n_e { │ │ │ │ │ +24 │ │ │ │ │ +29 template │ │ │ │ │ +_3_0 class _Y_a_s_p_G_e_o_m_e_t_r_y : public AxisAlignedCubeGeometry │ │ │ │ │ +31 { │ │ │ │ │ +32 public: │ │ │ │ │ +_3_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +35 │ │ │ │ │ +_3_7 _Y_a_s_p_G_e_o_m_e_t_r_y (const FieldVector& ll, const FieldVector& ur, const std::bitset& shift) │ │ │ │ │ +38 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,cdim>(ll,ur,shift) │ │ │ │ │ +39 { │ │ │ │ │ +40 assert(mydim == shift.count()); │ │ │ │ │ +41 } │ │ │ │ │ +42 }; │ │ │ │ │ 43 │ │ │ │ │ -_4_4 int _l_e_v_e_l () const { return ___l; } │ │ │ │ │ -_4_5 const std::array & _c_o_o_r_d() const { return ___c; } │ │ │ │ │ -_4_6 int _o_f_f_s_e_t () const { return ___o; } │ │ │ │ │ -47 │ │ │ │ │ -48 protected: │ │ │ │ │ -_4_9 int ___l; // grid level │ │ │ │ │ -_5_0 std::array ___c; // coord in the global grid │ │ │ │ │ -_5_1 int ___o; // the offset: which YGridComponent, does the entity belong to │ │ │ │ │ -52 }; │ │ │ │ │ -53 │ │ │ │ │ -54} // namespace Dune │ │ │ │ │ +45 template │ │ │ │ │ +_4_6 class _Y_a_s_p_G_e_o_m_e_t_r_y : public │ │ │ │ │ +AxisAlignedCubeGeometry │ │ │ │ │ +47 { │ │ │ │ │ +48 public: │ │ │ │ │ +_4_9 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +50 │ │ │ │ │ +_5_2 _Y_a_s_p_G_e_o_m_e_t_r_y (const FieldVector& ll, const FieldVector& ur) │ │ │ │ │ +53 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,mydim>(ll,ur) │ │ │ │ │ +54 {} │ │ │ │ │ 55 │ │ │ │ │ -56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ +_5_7 _Y_a_s_p_G_e_o_m_e_t_r_y (const _Y_a_s_p_G_e_o_m_e_t_r_y& other) │ │ │ │ │ +58 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,mydim>(other) │ │ │ │ │ +59 {} │ │ │ │ │ +60 }; │ │ │ │ │ +61 │ │ │ │ │ +63 template │ │ │ │ │ +_6_4 class _Y_a_s_p_G_e_o_m_e_t_r_y<0,cdim,GridImp> : public AxisAlignedCubeGeometry │ │ │ │ │ +65 { │ │ │ │ │ +66 public: │ │ │ │ │ +_6_7 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +68 │ │ │ │ │ +_7_0 explicit _Y_a_s_p_G_e_o_m_e_t_r_y ( const FieldVector< ctype, cdim > &p ) │ │ │ │ │ +71 : AxisAlignedCubeGeometry( p ) │ │ │ │ │ +72 {} │ │ │ │ │ +73 │ │ │ │ │ +_7_4 _Y_a_s_p_G_e_o_m_e_t_r_y ( const FieldVector< ctype, cdim > &p, const FieldVector< │ │ │ │ │ +ctype, cdim > &, const std::bitset &) │ │ │ │ │ +75 : AxisAlignedCubeGeometry( p ) │ │ │ │ │ +76 {} │ │ │ │ │ +77 }; │ │ │ │ │ +78} // namespace Dune │ │ │ │ │ +79 │ │ │ │ │ +80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -Describes the minimal information necessary to create a fully functional │ │ │ │ │ -YaspEntity. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:___o │ │ │ │ │ -int _o │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:___c │ │ │ │ │ -std::array< int, dim > _c │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:___l │ │ │ │ │ -int _l │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -YaspEntitySeed() │ │ │ │ │ -default construct an invalid entity seed │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -YaspEntitySeed(int level, std::array< int, dim > coord, int o=0) │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +The general version that handles all codimensions but 0 and dim. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype, │ │ │ │ │ +cdim > &ur, const std::bitset< cdim > &shift) │ │ │ │ │ +constructor from midpoint and extension and a bitset defining which unit │ │ │ │ │ +vectors span the entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +define type used for coordinates in grid module │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +YaspGeometry(const YaspGeometry &other) │ │ │ │ │ +copy constructor (skipping temporary variables) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, │ │ │ │ │ +mydim > &ur) │ │ │ │ │ +constructor from midpoint and extension │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype, │ │ │ │ │ +cdim > &, const std::bitset< cdim > &) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +YaspGeometry(const FieldVector< ctype, cdim > &p) │ │ │ │ │ constructor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_o_f_f_s_e_t │ │ │ │ │ -int offset() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -codimension of entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_c_o_o_r_d │ │ │ │ │ -const std::array< int, dim > & coord() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ │ -bool isValid() const │ │ │ │ │ -check whether the EntitySeed refers to a valid Entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentityseed.hh:39 │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:67 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: ygrid.hh File Reference │ │ │ │ +dune-grid: torus.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,79 +73,56 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ Functions
│ │ │ │ -
ygrid.hh File Reference
│ │ │ │ +
torus.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ +

This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ More...

│ │ │ │
#include <array>
│ │ │ │ -#include <vector>
│ │ │ │ #include <bitset>
│ │ │ │ +#include <cmath>
│ │ │ │ #include <deque>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <mpi.h>
│ │ │ │ +#include <dune/common/binaryfunctions.hh>
│ │ │ │ #include <dune/common/streamoperators.hh>
│ │ │ │ +#include <dune/grid/common/exceptions.hh>
│ │ │ │ +#include "partitioning.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YGridComponent< Coordinates >
 
class  Dune::YGridComponent< Coordinates >::Iterator
 
class  Dune::YGrid< Coordinates >
 implements a collection of YGridComponents which form a codimension Entities of given codimension c need to be represented by d choose c YgridComponents. All entities in one such component share the same set of spanning unit vectors. A YGrid is used to iterate over the entire set of components the codimension consists of. It doesn't hold any data, but instead holds an iterator range into an array of components (which is owned by YGridLevel). More...
class  Dune::Torus< Communication, d >
 
class  Dune::YGrid< Coordinates >::Iterator
 Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. More...
 
class  Dune::YGridList< Coordinates >
 implements a collection of multiple std::deque<Intersection> Intersections with neighboring processors are stored as std::deque<Intersection>. Eachsuch intersection only holds one YGridComponent. To do all communication associated with one codimension, multiple such deques have to be concatenated. YGridList manges this concatenation. As for YGrids, YGridList doesn't hold any data, but an iterator range into a data array owned by YGridLevel. More...
 
struct  Dune::YGridList< Coordinates >::Intersection
 type describing an intersection with a neighboring processor More...
 
class  Dune::YGridList< Coordinates >::Iterator
class  Dune::Torus< Communication, d >::ProcListIterator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Yasp
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

template<int d, typename ct >
std::array< int, d > Dune::Yasp::sizeArray (const std::array< std::vector< ct >, d > &v)
 
template<class Coordinates >
std::ostream & Dune::operator<< (std::ostream &s, YGridComponent< Coordinates > e)
 Output operator for ygrids.
 
template<class Coordinates >
std::ostream & Dune::operator<< (std::ostream &s, typename YGridComponent< Coordinates >::Iterator &e)
 Output operator for ygrids.
 
template<class Coordinates >
std::ostream & Dune::operator<< (std::ostream &s, const YGrid< Coordinates > &e)
 Output operator for ygrids.
 
template<class Communication , int d>
std::ostream & Dune::operator<< (std::ostream &s, const Torus< Communication, d > &t)
 Output operator for Torus.
 
│ │ │ │

Detailed Description

│ │ │ │ -

This provides a YGrid, the elemental component of the yaspgrid implementation.

│ │ │ │ +

This file provides the infrastructure for toroidal communication in YaspGrid.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,81 +2,41 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _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 │ │ │ │ │ -ygrid.hh File Reference │ │ │ │ │ -This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ +torus.hh File Reference │ │ │ │ │ +This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ │ _M_o_r_e_._._. │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ │ +#include "_p_a_r_t_i_t_i_o_n_i_n_g_._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_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_Y_G_r_i_d_<_ _C_o_o_r_d_i_n_a_t_e_s_ _> │ │ │ │ │ - implements a collection of YGridComponents which form a codimension │ │ │ │ │ - Entities of given codimension c need to be represented by d choose c │ │ │ │ │ - YgridComponents. All entities in one such component share the same set │ │ │ │ │ -  of spanning unit vectors. A _Y_G_r_i_d is used to iterate over the entire │ │ │ │ │ - set of components the codimension consists of. It doesn't hold any │ │ │ │ │ - data, but instead holds an iterator range into an array of components │ │ │ │ │ - (which is owned by YGridLevel). _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_Y_G_r_i_d_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -  _I_t_e_r_a_t_o_r over a collection o YGrids A _Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r is the heart of │ │ │ │ │ - an entity in _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_Y_G_r_i_d_L_i_s_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _> │ │ │ │ │ - implements a collection of multiple std::deque │ │ │ │ │ - Intersections with neighboring processors are stored as std:: │ │ │ │ │ - deque. Eachsuch intersection only holds one │ │ │ │ │ -  _Y_G_r_i_d_C_o_m_p_o_n_e_n_t. To do all communication associated with one │ │ │ │ │ - codimension, multiple such deques have to be concatenated. _Y_G_r_i_d_L_i_s_t │ │ │ │ │ - manges this concatenation. As for YGrids, _Y_G_r_i_d_L_i_s_t doesn't hold any │ │ │ │ │ - data, but an iterator range into a data array owned by YGridLevel. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_T_o_r_u_s_<_ _C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_Y_G_r_i_d_L_i_s_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -  type describing an intersection with a neighboring processor _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_Y_G_r_i_d_L_i_s_t_<_ _C_o_o_r_d_i_n_a_t_e_s_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +class   _D_u_n_e_:_:_T_o_r_u_s_<_ _C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_ _>_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ -  │ │ │ │ │ FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -std::array< int, d >  _D_u_n_e_:_:_Y_a_s_p_:_:_s_i_z_e_A_r_r_a_y (const std::array< std::vector< ct │ │ │ │ │ - >, d > &v) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, _Y_G_r_i_d_C_o_m_p_o_n_e_n_t< │ │ │ │ │ - Coordinates > e) │ │ │ │ │ -  Output operator for ygrids. │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, typename │ │ │ │ │ - _Y_G_r_i_d_C_o_m_p_o_n_e_n_t< Coordinates >::Iterator &e) │ │ │ │ │ -  Output operator for ygrids. │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, const _Y_G_r_i_d< │ │ │ │ │ - Coordinates > &e) │ │ │ │ │ -  Output operator for ygrids. │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, const _T_o_r_u_s< Communication, │ │ │ │ │ + d > &t) │ │ │ │ │ +  Output operator for _T_o_r_u_s. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ +This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: ygrid.hh Source File │ │ │ │ +dune-grid: torus.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1171 +74,619 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
ygrid.hh
│ │ │ │ +
torus.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRID_TORUS_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_TORUS_HH
│ │ │ │
7
│ │ │ │
8#include <array>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <bitset>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <cmath>
│ │ │ │
11#include <deque>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14#include <dune/common/math.hh>
│ │ │ │ -
15#include <dune/common/streamoperators.hh>
│ │ │ │ -
16
│ │ │ │ -
21namespace Dune {
│ │ │ │ +
12#include <iostream>
│ │ │ │ +
13#include <vector>
│ │ │ │ +
14
│ │ │ │ +
15#if HAVE_MPI
│ │ │ │ +
16#include <mpi.h>
│ │ │ │ +
17#endif
│ │ │ │ +
18
│ │ │ │ +
19#include <dune/common/binaryfunctions.hh>
│ │ │ │ +
20#include <dune/common/streamoperators.hh>
│ │ │ │ + │ │ │ │
22
│ │ │ │ -
23 namespace Yasp {
│ │ │ │ -
28 template<int d, typename ct>
│ │ │ │ -
│ │ │ │ -
29 std::array<int,d> sizeArray(const std::array<std::vector<ct>,d>& v)
│ │ │ │ -
30 {
│ │ │ │ -
31 std::array<int,d> tmp;
│ │ │ │ -
32 for (int i=0; i<d; ++i)
│ │ │ │ -
33 tmp[i] = v[i].size() - 1;
│ │ │ │ -
34 return tmp;
│ │ │ │ -
35 }
│ │ │ │ -
│ │ │ │ -
36 } //namespace Yasp
│ │ │ │ -
37
│ │ │ │ -
73 template<class Coordinates>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 {
│ │ │ │ -
76 public:
│ │ │ │ -
77 //extract coordinate type and dimension from the coordinate container
│ │ │ │ -
78 typedef typename Coordinates::ctype ct;
│ │ │ │ -
79 static const int d = Coordinates::dimension;
│ │ │ │ -
80
│ │ │ │ -
81 typedef std::array<int, d> iTupel;
│ │ │ │ -
82 typedef FieldVector<ct,d> fTupel;
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ -
85 YGridComponent () : _shift(0ULL)
│ │ │ │ -
86 {
│ │ │ │ -
87 std::fill(_origin.begin(), _origin.end(), 0);
│ │ │ │ -
88 std::fill(_offset.begin(), _offset.end(), 0);
│ │ │ │ -
89 std::fill(_size.begin(), _size.end(), 0);
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
100 : _origin(origin), _size(size)
│ │ │ │ -
101 {}
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
109 : _origin(origin), _shift(enclosing.shift()), _coords(enclosing.getCoords()), _size(size), _supersize(enclosing.supersize())
│ │ │ │ -
110 {
│ │ │ │ -
111 for (int i=0; i<d; i++)
│ │ │ │ -
112 _offset[i] = origin[i] - enclosing.origin(i) + enclosing.offset(i);
│ │ │ │ -
113
│ │ │ │ -
114 // compute superincrements
│ │ │ │ -
115 int inc = 1;
│ │ │ │ -
116 for (int i=0; i<d; ++i)
│ │ │ │ -
117 {
│ │ │ │ -
118 _superincrement[i] = inc;
│ │ │ │ -
119 inc *= _supersize[i];
│ │ │ │ -
120 }
│ │ │ │ +
23#include "partitioning.hh"
│ │ │ │ +
24
│ │ │ │ +
29namespace Dune
│ │ │ │ +
30{
│ │ │ │ +
31
│ │ │ │ +
45 template<class Communication, int d>
│ │ │ │ +
│ │ │ │ +
46 class Torus {
│ │ │ │ +
47 public:
│ │ │ │ +
49 typedef std::array<int, d> iTupel;
│ │ │ │ +
50
│ │ │ │ +
51
│ │ │ │ +
52 private:
│ │ │ │ +
53 struct CommPartner {
│ │ │ │ +
54 int rank;
│ │ │ │ +
55 iTupel delta;
│ │ │ │ +
56 int index;
│ │ │ │ +
57 };
│ │ │ │ +
58
│ │ │ │ +
59 struct CommTask {
│ │ │ │ +
60 int rank; // process to send to / receive from
│ │ │ │ +
61 int size; // size of buffer
│ │ │ │ +
62 void *buffer; // buffer to send / receive
│ │ │ │ +
63 };
│ │ │ │ +
64
│ │ │ │ +
65 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
68 {}
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning<d>* partitioner)
│ │ │ │ +
72 : _comm(comm), _tag(tag)
│ │ │ │ +
73 {
│ │ │ │ +
74 // determine dimensions
│ │ │ │ +
75 partitioner->partition(size, _comm.size(), _dims, overlap);
│ │ │ │ +
76
│ │ │ │ +
77 // compute increments for lexicographic ordering
│ │ │ │ +
78 int inc = 1;
│ │ │ │ +
79 for (int i=0; i<d; i++)
│ │ │ │ +
80 {
│ │ │ │ +
81 _increment[i] = inc;
│ │ │ │ +
82 inc *= _dims[i];
│ │ │ │ +
83 }
│ │ │ │ +
84
│ │ │ │ +
85 // check whether the load balancing matches the size of the communicator
│ │ │ │ +
86 if (inc != _comm.size())
│ │ │ │ +
87 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
│ │ │ │ +
88
│ │ │ │ +
89 // make full schedule
│ │ │ │ +
90 proclists();
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
│ │ │ │ +
94 int rank () const
│ │ │ │ +
95 {
│ │ │ │ +
96 return _comm.rank();
│ │ │ │ +
97 }
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
│ │ │ │ +
100 iTupel coord () const
│ │ │ │ +
101 {
│ │ │ │ +
102 return rank_to_coord(_comm.rank());
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
│ │ │ │ +
106 int procs () const
│ │ │ │ +
107 {
│ │ │ │ +
108 return _comm.size();
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
112 const iTupel & dims () const
│ │ │ │ +
113 {
│ │ │ │ +
114 return _dims;
│ │ │ │ +
115 }
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
│ │ │ │ +
118 int dims (int i) const
│ │ │ │ +
119 {
│ │ │ │ +
120 return _dims[i];
│ │ │ │
121 }
│ │ │ │
│ │ │ │
122
│ │ │ │ -
│ │ │ │ -
131 YGridComponent (iTupel origin, std::bitset<d> shift, Coordinates* coords, iTupel size, iTupel offset, iTupel supersize)
│ │ │ │ -
132 : _origin(origin), _shift(shift), _coords(coords), _size(size), _offset(offset), _supersize(supersize)
│ │ │ │ -
133 {
│ │ │ │ -
134 // compute superincrements
│ │ │ │ -
135 int inc = 1;
│ │ │ │ -
136 for (int i=0; i<d; ++i)
│ │ │ │ -
137 {
│ │ │ │ -
138 _superincrement[i] = inc;
│ │ │ │ -
139 inc *= _supersize[i];
│ │ │ │ -
140 }
│ │ │ │ +
│ │ │ │ +
124 Communication comm () const
│ │ │ │ +
125 {
│ │ │ │ +
126 return _comm;
│ │ │ │ +
127 }
│ │ │ │ +
│ │ │ │ +
128
│ │ │ │ +
│ │ │ │ +
130 int tag () const
│ │ │ │ +
131 {
│ │ │ │ +
132 return _tag;
│ │ │ │ +
133 }
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
│ │ │ │ +
136 bool inside (iTupel c) const
│ │ │ │ +
137 {
│ │ │ │ +
138 for (int i=d-1; i>=0; i--)
│ │ │ │ +
139 if (c[i]<0 || c[i]>=_dims[i]) return false;
│ │ │ │ +
140 return true;
│ │ │ │
141 }
│ │ │ │
│ │ │ │
142
│ │ │ │
│ │ │ │ -
144 int origin (int i) const
│ │ │ │ + │ │ │ │
145 {
│ │ │ │ -
146 return _origin[i];
│ │ │ │ -
147 }
│ │ │ │ -
│ │ │ │ -
148
│ │ │ │ -
│ │ │ │ -
150 const iTupel& origin () const
│ │ │ │ -
151 {
│ │ │ │ -
152 return _origin;
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154
│ │ │ │ -
│ │ │ │ -
156 bool shift (int i) const
│ │ │ │ -
157 {
│ │ │ │ -
158 return _shift[i];
│ │ │ │ -
159 }
│ │ │ │ -
│ │ │ │ -
160
│ │ │ │ -
│ │ │ │ -
162 const std::bitset<d>& shift () const
│ │ │ │ -
163 {
│ │ │ │ -
164 return _shift;
│ │ │ │ -
165 }
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
│ │ │ │ -
167 Coordinates* getCoords() const
│ │ │ │ -
168 {
│ │ │ │ -
169 return _coords;
│ │ │ │ -
170 }
│ │ │ │ -
│ │ │ │ -
171
│ │ │ │ -
│ │ │ │ -
173 int offset (int i) const
│ │ │ │ -
174 {
│ │ │ │ -
175 return _offset[i];
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
│ │ │ │ -
179 const iTupel & offset () const
│ │ │ │ -
180 {
│ │ │ │ -
181 return _offset;
│ │ │ │ -
182 }
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
│ │ │ │ -
185 int supersize (int i) const
│ │ │ │ -
186 {
│ │ │ │ -
187 return _supersize[i];
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189
│ │ │ │ -
│ │ │ │ -
191 const iTupel & supersize () const
│ │ │ │ -
192 {
│ │ │ │ -
193 return _supersize;
│ │ │ │ + │ │ │ │ +
147 rank = rank%_comm.size();
│ │ │ │ +
148 for (int i=d-1; i>=0; i--)
│ │ │ │ +
149 {
│ │ │ │ +
150 coord[i] = rank/_increment[i];
│ │ │ │ +
151 rank = rank%_increment[i];
│ │ │ │ +
152 }
│ │ │ │ +
153 return coord;
│ │ │ │ +
154 }
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
158 {
│ │ │ │ +
159 for (int i=0; i<d; i++) coord[i] = coord[i]%_dims[i];
│ │ │ │ +
160 int rank = 0;
│ │ │ │ +
161 for (int i=0; i<d; i++) rank += coord[i]*_increment[i];
│ │ │ │ +
162 return rank;
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │ +
164
│ │ │ │ +
│ │ │ │ +
166 int rank_relative (int rank, int dir, int cnt) const
│ │ │ │ +
167 {
│ │ │ │ + │ │ │ │ +
169 coord[dir] = (coord[dir]+_dims[dir]+cnt)%_dims[dir];
│ │ │ │ +
170 return coord_to_rank(coord);
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
│ │ │ │ +
174 int color (const iTupel & coord) const
│ │ │ │ +
175 {
│ │ │ │ +
176 int c = 0;
│ │ │ │ +
177 int power = 1;
│ │ │ │ +
178
│ │ │ │ +
179 // interior coloring
│ │ │ │ +
180 for (int i=0; i<d; i++)
│ │ │ │ +
181 {
│ │ │ │ +
182 if (coord[i]%2==1) c += power;
│ │ │ │ +
183 power *= 2;
│ │ │ │ +
184 }
│ │ │ │ +
185
│ │ │ │ +
186 // extra colors for boundary processes
│ │ │ │ +
187 for (int i=0; i<d; i++)
│ │ │ │ +
188 {
│ │ │ │ +
189 if (_dims[i]>1 && coord[i]==_dims[i]-1) c += power;
│ │ │ │ +
190 power *= 2;
│ │ │ │ +
191 }
│ │ │ │ +
192
│ │ │ │ +
193 return c;
│ │ │ │
194 }
│ │ │ │
│ │ │ │
195
│ │ │ │
│ │ │ │ -
197 int size (int i) const
│ │ │ │ +
197 int color (int rank) const
│ │ │ │
198 {
│ │ │ │ -
199 return _size[i];
│ │ │ │ +
199 return color(rank_to_coord(rank));
│ │ │ │
200 }
│ │ │ │
│ │ │ │
201
│ │ │ │
│ │ │ │ -
203 iTupel size () const
│ │ │ │ +
203 int neighbors () const
│ │ │ │
204 {
│ │ │ │ -
205 return _size;
│ │ │ │ -
206 }
│ │ │ │ -
│ │ │ │ -
207
│ │ │ │ -
│ │ │ │ -
209 int totalsize () const
│ │ │ │ -
210 {
│ │ │ │ -
211 int s=1;
│ │ │ │ -
212 for (int i=0; i<d; ++i)
│ │ │ │ -
213 s *= size(i);
│ │ │ │ -
214 return s;
│ │ │ │ -
215 }
│ │ │ │ -
│ │ │ │ -
216
│ │ │ │ -
│ │ │ │ -
218 int min (int i) const
│ │ │ │ -
219 {
│ │ │ │ -
220 return _origin[i];
│ │ │ │ -
221 }
│ │ │ │ -
│ │ │ │ -
222
│ │ │ │ -
│ │ │ │ -
224 int max (int i) const
│ │ │ │ -
225 {
│ │ │ │ -
226 return _origin[i] + size(i) - 1;
│ │ │ │ -
227 }
│ │ │ │ -
│ │ │ │ -
228
│ │ │ │ -
│ │ │ │ -
230 bool empty () const
│ │ │ │ -
231 {
│ │ │ │ -
232 for (int i=0; i<d; ++i)
│ │ │ │ -
233 {
│ │ │ │ -
234 if (size(i) == 0)
│ │ │ │ -
235 return true;
│ │ │ │ -
236 }
│ │ │ │ -
237 return false;
│ │ │ │ -
238 }
│ │ │ │ -
│ │ │ │ -
239
│ │ │ │ -
│ │ │ │ -
241 bool inside (const iTupel& coord) const
│ │ │ │ -
242 {
│ │ │ │ -
243 for (int i=0; i<d; i++)
│ │ │ │ -
244 {
│ │ │ │ -
245 if ((coord[i]<_origin[i]) || (coord[i]>=_origin[i]+_size[i]))
│ │ │ │ -
246 return false;
│ │ │ │ -
247 }
│ │ │ │ -
248 return true;
│ │ │ │ -
249 }
│ │ │ │ -
│ │ │ │ -
250
│ │ │ │ -
│ │ │ │ -
252 int index (const iTupel& coord) const
│ │ │ │ -
253 {
│ │ │ │ -
254 int index = (coord[d-1]-_origin[d-1]);
│ │ │ │ -
255
│ │ │ │ -
256 for (int i=d-2; i>=0; i--)
│ │ │ │ -
257 index = index*_size[i] + (coord[i]-_origin[i]);
│ │ │ │ -
258
│ │ │ │ -
259 return index;
│ │ │ │ -
260 }
│ │ │ │ -
│ │ │ │ -
261
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
264 {
│ │ │ │ -
265 for (int i=0; i<d; i++)
│ │ │ │ -
266 v[i] += _origin[i];
│ │ │ │ -
267 return YGridComponent<Coordinates>(v,_size,*this);
│ │ │ │ +
205 int n=1;
│ │ │ │ +
206 for (int i=0; i<d; ++i)
│ │ │ │ +
207 n *= 3;
│ │ │ │ +
208 return n-1;
│ │ │ │ +
209 }
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
│ │ │ │ +
212 bool is_neighbor (iTupel delta, std::bitset<d> periodic) const
│ │ │ │ +
213 {
│ │ │ │ +
214 iTupel coord = rank_to_coord(_comm.rank()); // my own coordinate with 0 <= c_i < dims_i
│ │ │ │ +
215
│ │ │ │ +
216 for (int i=0; i<d; i++)
│ │ │ │ +
217 {
│ │ │ │ +
218 if (delta[i]<0)
│ │ │ │ +
219 {
│ │ │ │ +
220 // if I am on the boundary and domain is not periodic => no neighbor
│ │ │ │ +
221 if (coord[i]==0 && periodic[i]==false) return false;
│ │ │ │ +
222 }
│ │ │ │ +
223 if (delta[i]>0)
│ │ │ │ +
224 {
│ │ │ │ +
225 // if I am on the boundary and domain is not periodic => no neighbor
│ │ │ │ +
226 if (coord[i]==_dims[i]-1 && periodic[i]==false) return false;
│ │ │ │ +
227 }
│ │ │ │ +
228 }
│ │ │ │ +
229 return true;
│ │ │ │ +
230 }
│ │ │ │ +
│ │ │ │ +
231
│ │ │ │ +
│ │ │ │ +
239 double partition (int rank, iTupel origin_in, iTupel size_in, iTupel& origin_out, iTupel& size_out) const
│ │ │ │ +
240 {
│ │ │ │ + │ │ │ │ +
242 double maxsize = 1;
│ │ │ │ +
243 double sz = 1;
│ │ │ │ +
244
│ │ │ │ +
245 // make a tensor product partition
│ │ │ │ +
246 for (int i=0; i<d; i++)
│ │ │ │ +
247 {
│ │ │ │ +
248 // determine
│ │ │ │ +
249 int m = size_in[i]/_dims[i];
│ │ │ │ +
250 int r = size_in[i]%_dims[i];
│ │ │ │ +
251
│ │ │ │ +
252 sz *= size_in[i];
│ │ │ │ +
253
│ │ │ │ +
254 if (coord[i]<_dims[i]-r)
│ │ │ │ +
255 {
│ │ │ │ +
256 origin_out[i] = origin_in[i] + coord[i]*m;
│ │ │ │ +
257 size_out[i] = m;
│ │ │ │ +
258 maxsize *= m;
│ │ │ │ +
259 }
│ │ │ │ +
260 else
│ │ │ │ +
261 {
│ │ │ │ +
262 origin_out[i] = origin_in[i] + (_dims[i]-r)*m + (coord[i]-(_dims[i]-r))*(m+1);
│ │ │ │ +
263 size_out[i] = m+1;
│ │ │ │ +
264 maxsize *= m+1;
│ │ │ │ +
265 }
│ │ │ │ +
266 }
│ │ │ │ +
267 return maxsize/(sz/_comm.size());
│ │ │ │
268 }
│ │ │ │
│ │ │ │
269
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
272 {
│ │ │ │ -
273 for (int i=0; i<d; i++)
│ │ │ │ -
274 {
│ │ │ │ -
275 //empty coordinate vectors result in empty intersections
│ │ │ │ -
276 if (empty() || r.empty())
│ │ │ │ - │ │ │ │ -
278 }
│ │ │ │ -
279
│ │ │ │ -
280 iTupel neworigin;
│ │ │ │ -
281 iTupel newsize;
│ │ │ │ -
282 for (int i=0; i<d; ++i)
│ │ │ │ -
283 {
│ │ │ │ -
284 neworigin[i] = std::max(origin(i),r.origin(i));
│ │ │ │ -
285 newsize[i] = std::min(max(i),r.max(i)) - neworigin[i] + 1;
│ │ │ │ -
286 }
│ │ │ │ -
287
│ │ │ │ -
288 return YGridComponent<Coordinates>(neworigin,newsize,*this);
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
290
│ │ │ │ -
291
│ │ │ │ -
│ │ │ │ -
298 class Iterator {
│ │ │ │ -
299 public:
│ │ │ │ -
300 // default constructor
│ │ │ │ -
301 Iterator () = default;
│ │ │ │ -
302
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
305 {
│ │ │ │ -
306 iTupel coord(r.origin());
│ │ │ │ -
307 reinit(r,coord);
│ │ │ │ -
308 }
│ │ │ │ -
│ │ │ │ -
309
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
312 {
│ │ │ │ -
313 reinit(r,coord);
│ │ │ │ -
314 }
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
318 {
│ │ │ │ -
319 // initialize to given position in index set
│ │ │ │ -
320 for (int i=0; i<d; ++i)
│ │ │ │ -
321 _coord[i] = coord[i];
│ │ │ │ -
322
│ │ │ │ -
323 // move superindex to first cell in subgrid
│ │ │ │ -
324 _superindex = 0;
│ │ │ │ -
325 for (int i=0; i<d; ++i)
│ │ │ │ -
326 _superindex += (r.offset(i)+coord[i]-r.origin(i))*r.superincrement(i);
│ │ │ │ -
327
│ │ │ │ -
328 _grid = &r;
│ │ │ │ -
329 }
│ │ │ │ -
│ │ │ │ -
330
│ │ │ │ -
│ │ │ │ -
332 bool operator== (const Iterator& i) const
│ │ │ │ -
333 {
│ │ │ │ -
334 return _superindex == i._superindex;
│ │ │ │ -
335 }
│ │ │ │ -
│ │ │ │ -
336
│ │ │ │ -
│ │ │ │ -
338 bool operator!= (const Iterator& i) const
│ │ │ │ -
339 {
│ │ │ │ -
340 return _superindex != i._superindex;
│ │ │ │ -
341 }
│ │ │ │ -
│ │ │ │ -
342
│ │ │ │ -
│ │ │ │ -
344 int superindex () const
│ │ │ │ -
345 {
│ │ │ │ -
346 return _superindex;
│ │ │ │ -
347 }
│ │ │ │ -
│ │ │ │ -
348
│ │ │ │ -
│ │ │ │ -
350 int coord (int i) const
│ │ │ │ -
351 {
│ │ │ │ -
352 return _coord[i];
│ │ │ │ -
353 }
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
│ │ │ │ -
356 const iTupel& coord () const
│ │ │ │ -
357 {
│ │ │ │ -
358 return _coord;
│ │ │ │ -
359 }
│ │ │ │ -
│ │ │ │ -
360
│ │ │ │ -
│ │ │ │ -
362 void move (int i, int dist)
│ │ │ │ -
363 {
│ │ │ │ -
364 _coord[i] += dist;
│ │ │ │ -
365 _superindex += dist*_grid->superincrement(i);
│ │ │ │ -
366 }
│ │ │ │ -
│ │ │ │ -
367
│ │ │ │ -
│ │ │ │ -
369 void move (const iTupel& dist)
│ │ │ │ -
370 {
│ │ │ │ -
371 for (int i = 0; i < d; ++i)
│ │ │ │ -
372 {
│ │ │ │ -
373 _coord[i] += dist[i];
│ │ │ │ -
374 _superindex += dist[i]*_grid->superincrement(i);
│ │ │ │ -
375 }
│ │ │ │ -
376 }
│ │ │ │ -
│ │ │ │ -
377
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
380 {
│ │ │ │ -
381 for (int i=0; i<d; i++) // check for wrap around
│ │ │ │ -
382 {
│ │ │ │ -
383 _superindex += _grid->superincrement(i); // move on cell in direction i
│ │ │ │ -
384 if (++_coord[i] <= _grid->max(i))
│ │ │ │ -
385 return *this;
│ │ │ │ -
386 else
│ │ │ │ -
387 {
│ │ │ │ -
388 _coord[i] = _grid->origin(i); // move back to origin in direction i
│ │ │ │ -
389 _superindex -= _grid->size(i) * _grid->superincrement(i);
│ │ │ │ -
390 }
│ │ │ │ -
391 }
│ │ │ │ -
392 // if we wrapped around, back to to begin(), we must put the iterator to end()
│ │ │ │ -
393 if (_coord == _grid->origin())
│ │ │ │ -
394 {
│ │ │ │ -
395 for (int i=0; i<d; i++)
│ │ │ │ -
396 _superindex += (_grid->size(i)-1) * _grid->superincrement(i);
│ │ │ │ -
397 _superindex += _grid->superincrement(0);
│ │ │ │ -
398 }
│ │ │ │ -
399 return *this;
│ │ │ │ -
400 }
│ │ │ │ -
│ │ │ │ -
401
│ │ │ │ -
│ │ │ │ -
403 ct lowerleft(int i) const
│ │ │ │ -
404 {
│ │ │ │ -
405 return _grid->getCoords()->coordinate(i,_coord[i]);
│ │ │ │ -
406 }
│ │ │ │ -
│ │ │ │ -
407
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
410 {
│ │ │ │ -
411 fTupel ll;
│ │ │ │ -
412 for (int i=0; i<d; i++)
│ │ │ │ -
413 ll[i] = lowerleft(i);
│ │ │ │ -
414 return ll;
│ │ │ │ -
415 }
│ │ │ │ -
│ │ │ │ -
416
│ │ │ │ -
│ │ │ │ -
418 ct upperright(int i) const
│ │ │ │ -
419 {
│ │ │ │ -
420 int coord = _coord[i];
│ │ │ │ -
421 if (shift(i))
│ │ │ │ -
422 coord++;
│ │ │ │ -
423 return _grid->getCoords()->coordinate(i,coord);
│ │ │ │ -
424 }
│ │ │ │ -
│ │ │ │ -
425
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
428 {
│ │ │ │ -
429 fTupel ur;
│ │ │ │ -
430 for (int i=0; i<d; i++)
│ │ │ │ -
431 ur[i] = upperright(i);
│ │ │ │ -
432 return ur;
│ │ │ │ -
433 }
│ │ │ │ -
│ │ │ │ -
434
│ │ │ │ -
│ │ │ │ -
436 ct meshsize (int i) const
│ │ │ │ -
437 {
│ │ │ │ -
438 return _grid->getCoords()->meshsize(i,_coord[i]);
│ │ │ │ -
439 }
│ │ │ │ -
│ │ │ │ -
440
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
443 {
│ │ │ │ -
444 fTupel h;
│ │ │ │ -
445 for (int i=0; i<d; i++)
│ │ │ │ -
446 h[i] = meshsize(i);
│ │ │ │ -
447 return h;
│ │ │ │ -
448 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
277 public:
│ │ │ │ +
│ │ │ │ +
279 ProcListIterator (typename std::deque<CommPartner>::const_iterator iter)
│ │ │ │ +
280 {
│ │ │ │ +
281 i = iter;
│ │ │ │ +
282 }
│ │ │ │ +
│ │ │ │ +
283
│ │ │ │ +
│ │ │ │ +
285 int rank () const
│ │ │ │ +
286 {
│ │ │ │ +
287 return i->rank;
│ │ │ │ +
288 }
│ │ │ │ +
│ │ │ │ +
289
│ │ │ │ +
│ │ │ │ +
291 iTupel delta () const
│ │ │ │ +
292 {
│ │ │ │ +
293 return i->delta;
│ │ │ │ +
294 }
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
│ │ │ │ +
297 int index () const
│ │ │ │ +
298 {
│ │ │ │ +
299 return i->index;
│ │ │ │ +
300 }
│ │ │ │ +
│ │ │ │ +
301
│ │ │ │ +
│ │ │ │ +
303 int distance () const
│ │ │ │ +
304 {
│ │ │ │ +
305 int dist = 0;
│ │ │ │ +
306 iTupel delta=i->delta;
│ │ │ │ +
307 for (int j=0; j<d; ++j)
│ │ │ │ +
308 dist += std::abs(delta[j]);
│ │ │ │ +
309 return dist;
│ │ │ │ +
310 }
│ │ │ │ +
│ │ │ │ +
311
│ │ │ │ +
│ │ │ │ +
313 bool operator== (const ProcListIterator& iter) const
│ │ │ │ +
314 {
│ │ │ │ +
315 return i == iter.i;
│ │ │ │ +
316 }
│ │ │ │ +
│ │ │ │ +
317
│ │ │ │ +
318
│ │ │ │ +
│ │ │ │ +
320 bool operator!= (const ProcListIterator& iter) const
│ │ │ │ +
321 {
│ │ │ │ +
322 return i != iter.i;
│ │ │ │ +
323 }
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
327 {
│ │ │ │ +
328 ++i;
│ │ │ │ +
329 return *this;
│ │ │ │ +
330 }
│ │ │ │ +
│ │ │ │ +
331
│ │ │ │ +
332 private:
│ │ │ │ +
333 typename std::deque<CommPartner>::const_iterator i;
│ │ │ │ +
334 };
│ │ │ │ +
│ │ │ │ +
335
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
338 {
│ │ │ │ +
339 return ProcListIterator(_sendlist.begin());
│ │ │ │ +
340 }
│ │ │ │ +
│ │ │ │ +
341
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
344 {
│ │ │ │ +
345 return ProcListIterator(_sendlist.end());
│ │ │ │ +
346 }
│ │ │ │ +
│ │ │ │ +
347
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
350 {
│ │ │ │ +
351 return ProcListIterator(_recvlist.begin());
│ │ │ │ +
352 }
│ │ │ │ +
│ │ │ │ +
353
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
356 {
│ │ │ │ +
357 return ProcListIterator(_recvlist.end());
│ │ │ │ +
358 }
│ │ │ │ +
│ │ │ │ +
359
│ │ │ │ +
│ │ │ │ +
361 void send (int rank, void* buffer, int size) const
│ │ │ │ +
362 {
│ │ │ │ +
363 CommTask task;
│ │ │ │ +
364 task.rank = rank;
│ │ │ │ +
365 task.buffer = buffer;
│ │ │ │ +
366 task.size = size;
│ │ │ │ +
367 if (rank!=_comm.rank())
│ │ │ │ +
368 _sendrequests.push_back(task);
│ │ │ │ +
369 else
│ │ │ │ +
370 _localsendrequests.push_back(task);
│ │ │ │ +
371 }
│ │ │ │ +
│ │ │ │ +
372
│ │ │ │ +
│ │ │ │ +
374 void recv (int rank, void* buffer, int size) const
│ │ │ │ +
375 {
│ │ │ │ +
376 CommTask task;
│ │ │ │ +
377 task.rank = rank;
│ │ │ │ +
378 task.buffer = buffer;
│ │ │ │ +
379 task.size = size;
│ │ │ │ +
380 if (rank!=_comm.rank())
│ │ │ │ +
381 _recvrequests.push_back(task);
│ │ │ │ +
382 else
│ │ │ │ +
383 _localrecvrequests.push_back(task);
│ │ │ │ +
384 }
│ │ │ │ +
│ │ │ │ +
385
│ │ │ │ +
│ │ │ │ +
387 void exchange () const
│ │ │ │ +
388 {
│ │ │ │ +
389 // handle local requests first
│ │ │ │ +
390 if (_localsendrequests.size()!=_localrecvrequests.size())
│ │ │ │ +
391 {
│ │ │ │ +
392 std::cout << "[" << rank() << "]: ERROR: local sends/receives do not match in exchange!" << std::endl;
│ │ │ │ +
393 return;
│ │ │ │ +
394 }
│ │ │ │ +
395 for (unsigned int i=0; i<_localsendrequests.size(); i++)
│ │ │ │ +
396 {
│ │ │ │ +
397 if (_localsendrequests[i].size!=_localrecvrequests[i].size)
│ │ │ │ +
398 {
│ │ │ │ +
399 std::cout << "[" << rank() << "]: ERROR: size in local sends/receive does not match in exchange!" << std::endl;
│ │ │ │ +
400 return;
│ │ │ │ +
401 }
│ │ │ │ +
402 memcpy(_localrecvrequests[i].buffer,_localsendrequests[i].buffer,_localsendrequests[i].size);
│ │ │ │ +
403 }
│ │ │ │ +
404 _localsendrequests.clear();
│ │ │ │ +
405 _localrecvrequests.clear();
│ │ │ │ +
406
│ │ │ │ +
407#if HAVE_MPI
│ │ │ │ +
408 // handle foreign requests
│ │ │ │ +
409
│ │ │ │ +
410 std::vector<MPI_Request> requests(_sendrequests.size() + _recvrequests.size());
│ │ │ │ +
411 MPI_Request* req = requests.data();
│ │ │ │ +
412
│ │ │ │ +
413 // issue sends to foreign processes
│ │ │ │ +
414 for (unsigned int i=0; i<_sendrequests.size(); i++)
│ │ │ │ +
415 if (_sendrequests[i].rank!=rank())
│ │ │ │ +
416 {
│ │ │ │ +
417 // std::cout << "[" << rank() << "]" << " send " << _sendrequests[i].size << " bytes "
│ │ │ │ +
418 // << "to " << _sendrequests[i].rank << " p=" << _sendrequests[i].buffer << std::endl;
│ │ │ │ +
419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE,
│ │ │ │ +
420 _sendrequests[i].rank, _tag, _comm, req++);
│ │ │ │ +
421 }
│ │ │ │ +
422
│ │ │ │ +
423 // issue receives from foreign processes
│ │ │ │ +
424 for (unsigned int i=0; i<_recvrequests.size(); i++)
│ │ │ │ +
425 if (_recvrequests[i].rank!=rank())
│ │ │ │ +
426 {
│ │ │ │ +
427 // std::cout << "[" << rank() << "]" << " recv " << _recvrequests[i].size << " bytes "
│ │ │ │ +
428 // << "fm " << _recvrequests[i].rank << " p=" << _recvrequests[i].buffer << std::endl;
│ │ │ │ +
429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE,
│ │ │ │ +
430 _recvrequests[i].rank, _tag, _comm, req++);
│ │ │ │ +
431 }
│ │ │ │ +
432
│ │ │ │ +
433 // Wait for communication to complete
│ │ │ │ +
434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
│ │ │ │ +
435
│ │ │ │ +
436 // clear request buffers
│ │ │ │ +
437 _sendrequests.clear();
│ │ │ │ +
438 _recvrequests.clear();
│ │ │ │ +
439#endif
│ │ │ │ +
440 }
│ │ │ │ +
│ │ │ │ +
441
│ │ │ │ +
│ │ │ │ +
443 double global_max (double x) const
│ │ │ │ +
444 {
│ │ │ │ +
445 double res = 0.0;
│ │ │ │ +
446 _comm.template allreduce<Dune::Max<double>,double>(&x, &res, 1);
│ │ │ │ +
447 return res;
│ │ │ │ +
448 }
│ │ │ │
│ │ │ │
449
│ │ │ │ -
│ │ │ │ -
450 bool shift (int i) const
│ │ │ │ -
451 {
│ │ │ │ -
452 return _grid->shift(i);
│ │ │ │ -
453 }
│ │ │ │ -
│ │ │ │ -
454
│ │ │ │ -
│ │ │ │ -
455 std::bitset<d> shift() const
│ │ │ │ -
456 {
│ │ │ │ -
457 return _grid->shift();
│ │ │ │ -
458 }
│ │ │ │ -
│ │ │ │ -
459
│ │ │ │ -
│ │ │ │ -
460 Coordinates* coordCont() const
│ │ │ │ -
461 {
│ │ │ │ -
462 return _grid->getCoords();
│ │ │ │ -
463 }
│ │ │ │ -
│ │ │ │ -
464
│ │ │ │ -
465 protected:
│ │ │ │ - │ │ │ │ -
467 int _superindex = 0;
│ │ │ │ - │ │ │ │ -
469 };
│ │ │ │ +
│ │ │ │ +
451 void print (std::ostream& s) const
│ │ │ │ +
452 {
│ │ │ │ +
453 s << "[" << rank() << "]: Torus " << procs() << " processor(s) arranged as " << dims() << std::endl;
│ │ │ │ +
454 for (ProcListIterator i=sendbegin(); i!=sendend(); ++i)
│ │ │ │ +
455 {
│ │ │ │ +
456 s << "[" << rank() << "]: send to "
│ │ │ │ +
457 << "rank=" << i.rank()
│ │ │ │ +
458 << " index=" << i.index()
│ │ │ │ +
459 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
│ │ │ │ +
460 }
│ │ │ │ +
461 for (ProcListIterator i=recvbegin(); i!=recvend(); ++i)
│ │ │ │ +
462 {
│ │ │ │ +
463 s << "[" << rank() << "]: recv from "
│ │ │ │ +
464 << "rank=" << i.rank()
│ │ │ │ +
465 << " index=" << i.index()
│ │ │ │ +
466 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
│ │ │ │ +
467 }
│ │ │ │ +
468 }
│ │ │ │
│ │ │ │ -
470
│ │ │ │ +
469
│ │ │ │ +
470 private:
│ │ │ │
471
│ │ │ │ -
│ │ │ │ -
472 int superindex(iTupel coord) const
│ │ │ │ -
473 {
│ │ │ │ -
474 // move superindex to first cell in subgrid
│ │ │ │ -
475 int si = 0;
│ │ │ │ -
476 for (int i=0; i<d; ++i)
│ │ │ │ -
477 si += (offset(i)+coord[i]-origin(i))*_superincrement[i];
│ │ │ │ -
478 return si;
│ │ │ │ -
479 }
│ │ │ │ -
│ │ │ │ -
480
│ │ │ │ -
│ │ │ │ -
481 int superincrement(int i) const
│ │ │ │ -
482 {
│ │ │ │ -
483 return _superincrement[i];
│ │ │ │ -
484 }
│ │ │ │ -
│ │ │ │ -
485
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
488 {
│ │ │ │ -
489 return Iterator(*this);
│ │ │ │ -
490 }
│ │ │ │ -
│ │ │ │ -
491
│ │ │ │ -
│ │ │ │ -
493 Iterator begin (const iTupel& co) const
│ │ │ │ -
494 {
│ │ │ │ -
495 return Iterator(*this,co);
│ │ │ │ -
496 }
│ │ │ │ -
│ │ │ │ -
497
│ │ │ │ -
│ │ │ │ -
499 Iterator end () const
│ │ │ │ -
500 {
│ │ │ │ -
501 iTupel last;
│ │ │ │ -
502 for (int i=0; i<d; i++)
│ │ │ │ -
503 last[i] = max(i);
│ │ │ │ -
504 last[0] += 1;
│ │ │ │ -
505 return Iterator(*this,last);
│ │ │ │ -
506 }
│ │ │ │ -
│ │ │ │ -
507
│ │ │ │ -
508 private:
│ │ │ │ -
509 iTupel _origin;
│ │ │ │ -
510 std::bitset<d> _shift;
│ │ │ │ -
511 Coordinates* _coords;
│ │ │ │ -
512 iTupel _size;
│ │ │ │ -
513 iTupel _offset;
│ │ │ │ -
514 iTupel _supersize;
│ │ │ │ -
515 iTupel _superincrement;
│ │ │ │ -
516
│ │ │ │ -
517 };
│ │ │ │ -
│ │ │ │ -
518
│ │ │ │ -
519
│ │ │ │ -
521 template <class Coordinates>
│ │ │ │ -
│ │ │ │ -
522 inline std::ostream& operator<< (std::ostream& s, YGridComponent<Coordinates> e)
│ │ │ │ -
523 {
│ │ │ │ -
524 s << "Printing YGridComponent structure:" << std::endl;
│ │ │ │ -
525 s << "Origin: " << e.origin() << std::endl;
│ │ │ │ -
526 s << "Shift: " << e.shift() << std::endl;
│ │ │ │ -
527 s << "Size: " << e.size() << std::endl;
│ │ │ │ -
528 s << "Offset: " << e.offset() << std::endl;
│ │ │ │ -
529 s << "Supersize: " << e.supersize() << std::endl;
│ │ │ │ -
530 return s;
│ │ │ │ -
531 }
│ │ │ │ -
│ │ │ │ -
532
│ │ │ │ -
534 template <class Coordinates>
│ │ │ │ -
│ │ │ │ -
535 inline std::ostream& operator<< (std::ostream& s, typename YGridComponent<Coordinates>::Iterator& e)
│ │ │ │ -
536 {
│ │ │ │ -
537 s << "Printing YGridComponent Iterator:" << std::endl << "Iterator at " << e.coord() << " (index ";
│ │ │ │ -
538 s << e.index() << "), position " << e.position();
│ │ │ │ -
539 return s;
│ │ │ │ -
540 }
│ │ │ │ -
│ │ │ │ -
541
│ │ │ │ -
549 template<class Coordinates>
│ │ │ │ -
│ │ │ │ -
550 class YGrid
│ │ │ │ -
551 {
│ │ │ │ -
552 public:
│ │ │ │ -
553 static const int dim = Coordinates::dimension;
│ │ │ │ -
554
│ │ │ │ -
555 // define data array iterator
│ │ │ │ - │ │ │ │ -
557
│ │ │ │ -
558 typedef typename std::array<int, dim> iTupel;
│ │ │ │ -
559
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
562 {
│ │ │ │ -
563 _begin = begin;
│ │ │ │ -
564 }
│ │ │ │ -
│ │ │ │ -
565
│ │ │ │ -
│ │ │ │ -
567 int shiftmapping(const std::bitset<dim>& shift) const
│ │ │ │ -
568 {
│ │ │ │ -
569 return _shiftmapping[shift.to_ulong()];
│ │ │ │ -
570 }
│ │ │ │ -
│ │ │ │ -
571
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
574 {
│ │ │ │ -
575 return _begin;
│ │ │ │ -
576 }
│ │ │ │ -
│ │ │ │ -
577
│ │ │ │ -
│ │ │ │ -
579 DAI dataEnd() const
│ │ │ │ -
580 {
│ │ │ │ -
581 return _end;
│ │ │ │ -
582 }
│ │ │ │ -
│ │ │ │ -
583
│ │ │ │ -
│ │ │ │ -
585 bool inside(const iTupel& coord, const std::bitset<dim>& shift = std::bitset<dim>()) const
│ │ │ │ -
586 {
│ │ │ │ -
587 return (_begin+_shiftmapping[shift.to_ulong()])->inside(coord);
│ │ │ │ -
588 }
│ │ │ │ -
│ │ │ │ -
589
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
594 {
│ │ │ │ -
595 public:
│ │ │ │ -
596
│ │ │ │ -
598 Iterator () = default;
│ │ │ │ -
599
│ │ │ │ -
│ │ │ │ -
601 Iterator (const YGrid<Coordinates>& yg, const std::array<int,dim>& coords, int which = 0)
│ │ │ │ -
602 : _which(which), _yg(&yg)
│ │ │ │ -
603 {
│ │ │ │ -
604 _it = typename YGridComponent<Coordinates>::Iterator(*(_yg->dataBegin()+which),coords);
│ │ │ │ -
605 }
│ │ │ │ -
│ │ │ │ -
606
│ │ │ │ -
│ │ │ │ -
608 Iterator (const YGrid<Coordinates>& yg, bool end=false) : _yg(&yg)
│ │ │ │ -
609 {
│ │ │ │ -
610 if (end)
│ │ │ │ -
611 {
│ │ │ │ -
612 _it = _yg->_itends.back();
│ │ │ │ -
613 _which = _yg->_itends.size() - 1;
│ │ │ │ -
614 }
│ │ │ │ -
615 else
│ │ │ │ -
616 {
│ │ │ │ -
617 _it = _yg->_itbegins[0];
│ │ │ │ -
618 _which = 0;
│ │ │ │ -
619 }
│ │ │ │ -
620 }
│ │ │ │ -
│ │ │ │ -
621
│ │ │ │ -
│ │ │ │ -
623 void reinit(const YGrid<Coordinates>& yg, const std::array<int,dim>& coords, int which = 0)
│ │ │ │ -
624 {
│ │ │ │ -
625 _yg = &yg;
│ │ │ │ -
626 _which = which;
│ │ │ │ -
627 _it = typename YGridComponent<Coordinates>::Iterator(*(_yg->dataBegin()+which),coords);
│ │ │ │ -
628 }
│ │ │ │ -
│ │ │ │ -
629
│ │ │ │ -
│ │ │ │ -
631 int coord (int i) const
│ │ │ │ -
632 {
│ │ │ │ -
633 return _it.coord(i);
│ │ │ │ -
634 }
│ │ │ │ -
│ │ │ │ -
635
│ │ │ │ -
│ │ │ │ -
637 const std::array<int, dim>& coord () const
│ │ │ │ -
638 {
│ │ │ │ -
639 return _it.coord();
│ │ │ │ -
640 }
│ │ │ │ -
│ │ │ │ -
641
│ │ │ │ -
│ │ │ │ -
642 typename Coordinates::ctype lowerleft(int i) const
│ │ │ │ -
643 {
│ │ │ │ -
644 return _it.lowerleft(i);
│ │ │ │ -
645 }
│ │ │ │ -
│ │ │ │ -
646
│ │ │ │ -
│ │ │ │ -
647 Dune::FieldVector<typename Coordinates::ctype,dim> lowerleft() const
│ │ │ │ -
648 {
│ │ │ │ -
649 return _it.lowerleft();
│ │ │ │ -
650 }
│ │ │ │ -
│ │ │ │ -
651
│ │ │ │ -
│ │ │ │ -
652 typename Coordinates::ctype upperright(int i) const
│ │ │ │ -
653 {
│ │ │ │ -
654 return _it.upperright(i);
│ │ │ │ -
655 }
│ │ │ │ -
│ │ │ │ -
656
│ │ │ │ -
│ │ │ │ -
657 Dune::FieldVector<typename Coordinates::ctype,dim> upperright() const
│ │ │ │ -
658 {
│ │ │ │ -
659 return _it.upperright();
│ │ │ │ -
660 }
│ │ │ │ -
│ │ │ │ -
661
│ │ │ │ -
│ │ │ │ -
663 typename Coordinates::ctype meshsize (int i) const
│ │ │ │ -
664 {
│ │ │ │ -
665 return _it.meshsize(i);
│ │ │ │ -
666 }
│ │ │ │ -
│ │ │ │ -
667
│ │ │ │ -
│ │ │ │ -
669 Dune::FieldVector<typename Coordinates::ctype,dim> meshsize() const
│ │ │ │ -
670 {
│ │ │ │ -
671 return _it.meshsize();
│ │ │ │ -
672 }
│ │ │ │ -
│ │ │ │ -
673
│ │ │ │ -
│ │ │ │ -
675 bool shift (int i) const
│ │ │ │ -
676 {
│ │ │ │ -
677 return _it.shift(i);
│ │ │ │ -
678 }
│ │ │ │ -
│ │ │ │ -
679
│ │ │ │ -
│ │ │ │ -
681 std::bitset<dim> shift () const
│ │ │ │ -
682 {
│ │ │ │ -
683 return _it.shift();
│ │ │ │ -
684 }
│ │ │ │ -
│ │ │ │ -
685
│ │ │ │ -
│ │ │ │ -
687 int superindex() const
│ │ │ │ -
688 {
│ │ │ │ -
689 // the offset of the current component has to be taken into account
│ │ │ │ -
690 return _yg->_indexOffset[_which] + _it.superindex();
│ │ │ │ -
691 }
│ │ │ │ -
│ │ │ │ -
692
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
695 {
│ │ │ │ -
696 if ((++_it == _yg->_itends[_which]) && (_which < _yg->_itends.size()-1))
│ │ │ │ -
697 _it = _yg->_itbegins[++_which];
│ │ │ │ -
698 return *this;
│ │ │ │ -
699 }
│ │ │ │ -
│ │ │ │ -
700
│ │ │ │ -
│ │ │ │ -
702 bool operator==(const Iterator& i) const
│ │ │ │ -
703 {
│ │ │ │ -
704 if (_which != i._which)
│ │ │ │ -
705 return false;
│ │ │ │ -
706 return _it == i._it;
│ │ │ │ -
707 }
│ │ │ │ -
│ │ │ │ -
708
│ │ │ │ -
│ │ │ │ -
710 bool operator!=(const Iterator& i) const
│ │ │ │ -
711 {
│ │ │ │ -
712 if (_it != i._it)
│ │ │ │ -
713 return true;
│ │ │ │ -
714 return _which != i._which;
│ │ │ │ -
715 }
│ │ │ │ -
│ │ │ │ -
716
│ │ │ │ -
│ │ │ │ -
718 int which() const
│ │ │ │ -
719 {
│ │ │ │ -
720 return _which;
│ │ │ │ -
721 }
│ │ │ │ -
│ │ │ │ -
722
│ │ │ │ -
│ │ │ │ -
724 void move(int i, int dist)
│ │ │ │ -
725 {
│ │ │ │ -
726 _it.move(i,dist);
│ │ │ │ -
727 }
│ │ │ │ -
│ │ │ │ -
728
│ │ │ │ -
│ │ │ │ -
729 void move(const iTupel& dist)
│ │ │ │ -
730 {
│ │ │ │ -
731 _it.move(dist);
│ │ │ │ -
732 }
│ │ │ │ -
│ │ │ │ -
733
│ │ │ │ -
│ │ │ │ -
734 Coordinates* coordCont() const
│ │ │ │ -
735 {
│ │ │ │ -
736 return _it.coordCont();
│ │ │ │ -
737 }
│ │ │ │ -
│ │ │ │ -
738
│ │ │ │ -
739
│ │ │ │ -
740 private:
│ │ │ │ -
741 unsigned int _which = 0;
│ │ │ │ -
742 const YGrid<Coordinates>* _yg = nullptr;
│ │ │ │ - │ │ │ │ -
744 };
│ │ │ │ -
│ │ │ │ -
745
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
748 {
│ │ │ │ -
749 return Iterator(*this);
│ │ │ │ -
750 }
│ │ │ │ -
│ │ │ │ -
751
│ │ │ │ -
│ │ │ │ -
753 Iterator begin(const std::array<int, dim>& coord, int which = 0) const
│ │ │ │ -
754 {
│ │ │ │ -
755 return Iterator(*this, coord, which);
│ │ │ │ -
756 }
│ │ │ │ -
│ │ │ │ -
757
│ │ │ │ -
│ │ │ │ -
759 Iterator end() const
│ │ │ │ -
760 {
│ │ │ │ -
761 return Iterator(*this,true);
│ │ │ │ -
762 }
│ │ │ │ -
│ │ │ │ -
763
│ │ │ │ -
│ │ │ │ -
764 int superindex(const iTupel& coord, int which) const
│ │ │ │ -
765 {
│ │ │ │ -
766 return _indexOffset[which] + (dataBegin()+which)->superindex(coord);
│ │ │ │ -
767 }
│ │ │ │ -
│ │ │ │ -
768
│ │ │ │ -
769
│ │ │ │ -
770 // finalize the ygrid construction by storing component iterators
│ │ │ │ -
│ │ │ │ -
771 void finalize(const DAI& end, int artificialOffset = 0)
│ │ │ │ -
772 {
│ │ │ │ -
773 // set the end iterator in the ygrid component array
│ │ │ │ -
774 _end = end;
│ │ │ │ -
775
│ │ │ │ -
776 _indexOffset.push_back(artificialOffset);
│ │ │ │ -
777 int k = 0;
│ │ │ │ -
778 for (DAI i=_begin; i != _end; ++i, ++k)
│ │ │ │ -
779 {
│ │ │ │ -
780 //store begin and end iterators
│ │ │ │ -
781 _itbegins.push_back(i->begin());
│ │ │ │ -
782 _itends.push_back(i->end());
│ │ │ │ -
783
│ │ │ │ -
784 // store index offset
│ │ │ │ -
785 _indexOffset.push_back(_indexOffset.back() + i->totalsize());
│ │ │ │ -
786
│ │ │ │ -
787 // store shift to component mapping
│ │ │ │ -
788 _shiftmapping[i->shift().to_ulong()] = k;
│ │ │ │ -
789 }
│ │ │ │ -
790 _indexOffset.resize(_itends.size());
│ │ │ │ -
791 }
│ │ │ │ -
│ │ │ │ -
792
│ │ │ │ -
793 private:
│ │ │ │ -
794
│ │ │ │ -
795 friend class YGrid<Coordinates>::Iterator;
│ │ │ │ -
796 DAI _begin;
│ │ │ │ -
797 DAI _end;
│ │ │ │ -
798 std::array<int,Dune::power(2,dim)> _shiftmapping;
│ │ │ │ -
799 std::vector<typename YGridComponent<Coordinates>::Iterator> _itbegins;
│ │ │ │ -
800 std::vector<typename YGridComponent<Coordinates>::Iterator> _itends;
│ │ │ │ -
801 std::vector<int> _indexOffset;
│ │ │ │ -
802 };
│ │ │ │ -
│ │ │ │ -
803
│ │ │ │ -
805 template <class Coordinates>
│ │ │ │ -
│ │ │ │ -
806 inline std::ostream& operator<< (std::ostream& s, const YGrid<Coordinates>& e)
│ │ │ │ -
807 {
│ │ │ │ -
808 s << "Printing YGrid structure:" << std::endl;
│ │ │ │ -
809 for (auto it = e.dataBegin(); it != e.dataEnd(); ++it)
│ │ │ │ -
810 s << *it << std::endl;
│ │ │ │ -
811 return s;
│ │ │ │ -
812 }
│ │ │ │ -
│ │ │ │ -
813
│ │ │ │ -
821 template<class Coordinates>
│ │ │ │ -
│ │ │ │ -
822 class YGridList
│ │ │ │ -
823 {
│ │ │ │ -
824 public:
│ │ │ │ -
825 static const int dim = Coordinates::dimension;
│ │ │ │ -
826
│ │ │ │ -
│ │ │ │ -
828 struct Intersection
│ │ │ │ -
829 {
│ │ │ │ -
831 YGridComponent<Coordinates> grid;
│ │ │ │ -
833 int rank;
│ │ │ │ -
835 int distance;
│ │ │ │ -
837 YGrid<Coordinates> yg;
│ │ │ │ -
838 };
│ │ │ │ -
│ │ │ │ -
839
│ │ │ │ -
840 // define data array iterator type
│ │ │ │ -
841 typedef typename std::array<std::deque<Intersection>, Dune::power(2,dim)>::iterator DAI;
│ │ │ │ -
842
│ │ │ │ -
843 // iterator that allows to iterate over a concatenation of deques. namely those
│ │ │ │ -
844 // that belong to the same codimension.
│ │ │ │ -
│ │ │ │ -
845 class Iterator
│ │ │ │ -
846 {
│ │ │ │ -
847 public:
│ │ │ │ -
848
│ │ │ │ -
│ │ │ │ -
850 Iterator(const YGridList<Coordinates>& ygl, bool end=false) : _end(ygl.dataEnd()), _which(ygl.dataBegin())
│ │ │ │ -
851 {
│ │ │ │ -
852 _it = _which->begin();
│ │ │ │ -
853
│ │ │ │ -
854 // advance the iterator to the first element that exists.
│ │ │ │ -
855 // some deques might be empty and should be skipped
│ │ │ │ -
856 while ((_which != _end) && (_it == _which->end()))
│ │ │ │ -
857 {
│ │ │ │ -
858 ++_which;
│ │ │ │ -
859 if (_which != _end)
│ │ │ │ -
860 _it = _which->begin();
│ │ │ │ -
861 }
│ │ │ │ -
862 // the iterator is at the end if and only if _which==_end
│ │ │ │ -
863 if (end)
│ │ │ │ -
864 {
│ │ │ │ -
865 _which = _end;
│ │ │ │ -
866 }
│ │ │ │ -
867 }
│ │ │ │ -
│ │ │ │ -
868
│ │ │ │ -
│ │ │ │ -
870 Iterator& operator++ ()
│ │ │ │ -
871 {
│ │ │ │ -
872 ++_it;
│ │ │ │ -
873 // advance the iterator to the next element that exists.
│ │ │ │ -
874 // some deques might be empty and should be skipped
│ │ │ │ -
875 while ((_which != _end) && (_it == _which->end()))
│ │ │ │ -
876 {
│ │ │ │ -
877 ++_which;
│ │ │ │ -
878 if (_which != _end)
│ │ │ │ -
879 _it = _which->begin();
│ │ │ │ -
880 }
│ │ │ │ -
881 return *this;
│ │ │ │ -
882 }
│ │ │ │ -
│ │ │ │ -
883
│ │ │ │ -
│ │ │ │ -
885 typename std::deque<Intersection>::iterator operator->() const
│ │ │ │ -
886 {
│ │ │ │ -
887 return _it;
│ │ │ │ -
888 }
│ │ │ │ -
│ │ │ │ -
889
│ │ │ │ -
│ │ │ │ -
891 typename std::deque<Intersection>::iterator operator*() const
│ │ │ │ -
892 {
│ │ │ │ -
893 return _it;
│ │ │ │ -
894 }
│ │ │ │ -
│ │ │ │ -
895
│ │ │ │ -
│ │ │ │ -
897 bool operator== (const Iterator& i) const
│ │ │ │ -
898 {
│ │ │ │ -
899 if (_which != i._which)
│ │ │ │ -
900 return false;
│ │ │ │ -
901 if (_which == _end)
│ │ │ │ -
902 return true;
│ │ │ │ -
903 return _it == i._it;
│ │ │ │ -
904 }
│ │ │ │ -
│ │ │ │ -
905
│ │ │ │ -
│ │ │ │ -
907 bool operator!= (const Iterator& i) const
│ │ │ │ -
908 {
│ │ │ │ -
909 if (_which != i._which)
│ │ │ │ -
910 return true;
│ │ │ │ -
911 if (_which == _end)
│ │ │ │ -
912 return false;
│ │ │ │ -
913 return _it != i._it;
│ │ │ │ -
914 }
│ │ │ │ -
│ │ │ │ -
915
│ │ │ │ -
916 private:
│ │ │ │ -
917 typename std::deque<Intersection>::iterator _it;
│ │ │ │ -
918 DAI _end;
│ │ │ │ -
919 DAI _which;
│ │ │ │ -
920 };
│ │ │ │ -
│ │ │ │ -
921
│ │ │ │ -
│ │ │ │ -
923 Iterator begin() const
│ │ │ │ -
924 {
│ │ │ │ -
925 return Iterator(*this);
│ │ │ │ -
926 }
│ │ │ │ -
│ │ │ │ -
927
│ │ │ │ -
│ │ │ │ -
929 Iterator end() const
│ │ │ │ -
930 {
│ │ │ │ -
931 return Iterator(*this,true);
│ │ │ │ -
932 }
│ │ │ │ -
│ │ │ │ -
933
│ │ │ │ -
│ │ │ │ -
935 void setBegin(typename std::array<std::deque<Intersection>, Dune::power(2,dim)>::iterator begin)
│ │ │ │ -
936 {
│ │ │ │ -
937 _begin = begin;
│ │ │ │ -
938 }
│ │ │ │ -
│ │ │ │ -
939
│ │ │ │ -
│ │ │ │ -
941 DAI dataBegin() const
│ │ │ │ -
942 {
│ │ │ │ -
943 return _begin;
│ │ │ │ -
944 }
│ │ │ │ -
│ │ │ │ -
945
│ │ │ │ -
│ │ │ │ -
947 DAI dataEnd() const
│ │ │ │ -
948 {
│ │ │ │ -
949 return _end;
│ │ │ │ -
950 }
│ │ │ │ -
│ │ │ │ -
951
│ │ │ │ -
│ │ │ │ -
953 int size() const
│ │ │ │ -
954 {
│ │ │ │ -
955 int count = 0;
│ │ │ │ -
956 for (DAI it = _begin; it != _end; ++it)
│ │ │ │ -
957 count += it->size();
│ │ │ │ -
958 return count;
│ │ │ │ -
959 }
│ │ │ │ -
│ │ │ │ -
960
│ │ │ │ -
│ │ │ │ -
962 void finalize(DAI end, const YGrid<Coordinates>& ygrid)
│ │ │ │ -
963 {
│ │ │ │ -
964 // Instead of directly iterating over the intersection deques, this code
│ │ │ │ -
965 // iterates over the components of an associated ygrid and works its way
│ │ │ │ -
966 // through the list of intersection deques in parallel.
│ │ │ │ -
967 // The reason for this convoluted iteration technique is that there are not
│ │ │ │ -
968 // necessarily intersections for all possible shifts, but we have to make
│ │ │ │ -
969 // sure that we stop at each shift to update the per-component index shift.
│ │ │ │ -
970 // This is ensured by iterating over the ygrid, which is guaranteed to have
│ │ │ │ -
971 // a component for each shift vector.
│ │ │ │ -
972
│ │ │ │ -
973 // set end iterator in the data array
│ │ │ │ -
974 _end = end;
│ │ │ │ -
975
│ │ │ │ -
977 int offset = 0;
│ │ │ │ -
978
│ │ │ │ -
979 DAI i = _begin;
│ │ │ │ -
980
│ │ │ │ -
981 // make sure that we have a valid deque (i.e. a non-empty one)
│ │ │ │ -
982 while (i != _end && i->begin() == i->end())
│ │ │ │ -
983 ++i;
│ │ │ │ -
984
│ │ │ │ -
985 for (auto yit = ygrid.dataBegin(); yit != ygrid.dataEnd(); ++yit)
│ │ │ │ -
986 {
│ │ │ │ -
987 if (i == _end)
│ │ │ │ -
988 break;
│ │ │ │ -
989 auto it = i->begin();
│ │ │ │ -
990 if (it->grid.shift() == yit->shift())
│ │ │ │ -
991 {
│ │ │ │ -
992 // iterate over the intersections in the deque and set the offset
│ │ │ │ -
993 for (; it != i->end(); ++it)
│ │ │ │ -
994 {
│ │ │ │ -
995 it->yg.setBegin(&(it->grid));
│ │ │ │ -
996 it->yg.finalize(&(it->grid)+1, offset);
│ │ │ │ -
997 }
│ │ │ │ -
998
│ │ │ │ -
999 // advance to next non-empty deque
│ │ │ │ -
1000 ++i;
│ │ │ │ -
1001 while (i != _end && i->begin() == i->end())
│ │ │ │ -
1002 ++i;
│ │ │ │ -
1003 }
│ │ │ │ -
1004
│ │ │ │ -
1005 // update the offset from the ygrid component
│ │ │ │ -
1006 int add = 1;
│ │ │ │ -
1007 for (int j=0; j<dim; j++)
│ │ │ │ -
1008 add *= yit->supersize(j);
│ │ │ │ -
1009 offset += add;
│ │ │ │ -
1010 }
│ │ │ │ -
1011 assert (i == end);
│ │ │ │ -
1012 }
│ │ │ │ -
│ │ │ │ -
1013
│ │ │ │ -
1014 private:
│ │ │ │ -
1015 DAI _begin;
│ │ │ │ -
1016 DAI _end;
│ │ │ │ -
1017 };
│ │ │ │ -
│ │ │ │ -
1018
│ │ │ │ -
1019} // namespace Dune
│ │ │ │ -
1020
│ │ │ │ -
1021#endif
│ │ │ │ +
472 void proclists ()
│ │ │ │ +
473 {
│ │ │ │ +
474 // compile the full neighbor list
│ │ │ │ +
475 CommPartner cp;
│ │ │ │ +
476 iTupel delta;
│ │ │ │ +
477
│ │ │ │ +
478 std::fill(delta.begin(), delta.end(), -1);
│ │ │ │ +
479 bool ready = false;
│ │ │ │ +
480 iTupel me, nb;
│ │ │ │ +
481 me = rank_to_coord(_comm.rank());
│ │ │ │ +
482 int index = 0;
│ │ │ │ +
483 int last = neighbors()-1;
│ │ │ │ +
484 while (!ready)
│ │ │ │ +
485 {
│ │ │ │ +
486 // find neighbors coordinates
│ │ │ │ +
487 for (int i=0; i<d; i++)
│ │ │ │ +
488 nb[i] = ( me[i]+_dims[i]+delta[i] ) % _dims[i];
│ │ │ │ +
489
│ │ │ │ +
490 // find neighbors rank
│ │ │ │ +
491 int nbrank = coord_to_rank(nb);
│ │ │ │ +
492
│ │ │ │ +
493 // check if delta is not zero
│ │ │ │ +
494 for (int i=0; i<d; i++)
│ │ │ │ +
495 if (delta[i]!=0)
│ │ │ │ +
496 {
│ │ │ │ +
497 cp.rank = nbrank;
│ │ │ │ +
498 cp.delta = delta;
│ │ │ │ +
499 cp.index = index;
│ │ │ │ +
500 _recvlist.push_back(cp);
│ │ │ │ +
501 cp.index = last-index;
│ │ │ │ +
502 _sendlist.push_front(cp);
│ │ │ │ +
503 index++;
│ │ │ │ +
504 break;
│ │ │ │ +
505 }
│ │ │ │ +
506
│ │ │ │ +
507 // next neighbor
│ │ │ │ +
508 ready = true;
│ │ │ │ +
509 for (int i=0; i<d; i++)
│ │ │ │ +
510 if (delta[i]<1)
│ │ │ │ +
511 {
│ │ │ │ +
512 (delta[i])++;
│ │ │ │ +
513 ready=false;
│ │ │ │ +
514 break;
│ │ │ │ +
515 }
│ │ │ │ +
516 else
│ │ │ │ +
517 {
│ │ │ │ +
518 delta[i] = -1;
│ │ │ │ +
519 }
│ │ │ │ +
520 }
│ │ │ │ +
521
│ │ │ │ +
522 }
│ │ │ │ +
523
│ │ │ │ +
524 Communication _comm;
│ │ │ │ +
525
│ │ │ │ +
526 iTupel _dims;
│ │ │ │ +
527 iTupel _increment;
│ │ │ │ +
528 int _tag;
│ │ │ │ +
529 std::deque<CommPartner> _sendlist;
│ │ │ │ +
530 std::deque<CommPartner> _recvlist;
│ │ │ │ +
531
│ │ │ │ +
532 mutable std::vector<CommTask> _sendrequests;
│ │ │ │ +
533 mutable std::vector<CommTask> _recvrequests;
│ │ │ │ +
534 mutable std::vector<CommTask> _localsendrequests;
│ │ │ │ +
535 mutable std::vector<CommTask> _localrecvrequests;
│ │ │ │ +
536
│ │ │ │ +
537 };
│ │ │ │ +
│ │ │ │ +
538
│ │ │ │ +
540 template <class Communication, int d>
│ │ │ │ +
│ │ │ │ +
541 inline std::ostream& operator<< (std::ostream& s, const Torus<Communication, d> & t)
│ │ │ │ +
542 {
│ │ │ │ +
543 t.print(s);
│ │ │ │ +
544 return s;
│ │ │ │ +
545 }
│ │ │ │ +
│ │ │ │ +
546}
│ │ │ │ +
547
│ │ │ │ +
548#endif
│ │ │ │ +
This file provides tools to partition YaspGrids. If you want to write your own partitioner,...
│ │ │ │ + │ │ │ │
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
std::array< int, d > sizeArray(const std::array< std::vector< ct >, d > &v)
Definition ygrid.hh:29
│ │ │ │ -
Definition ygrid.hh:75
│ │ │ │ -
int index(const iTupel &coord) const
given a tupel compute its index in the lexicographic numbering
Definition ygrid.hh:252
│ │ │ │ -
int offset(int i) const
Return offset to origin of enclosing grid.
Definition ygrid.hh:173
│ │ │ │ -
std::array< int, d > iTupel
Definition ygrid.hh:81
│ │ │ │ -
YGridComponent< Coordinates > move(iTupel v) const
return grid moved by the vector v
Definition ygrid.hh:263
│ │ │ │ -
iTupel size() const
retrun size
Definition ygrid.hh:203
│ │ │ │ -
static const int d
Definition ygrid.hh:79
│ │ │ │ -
YGridComponent< Coordinates > intersection(const YGridComponent< Coordinates > &r) const
Return YGridComponent of supergrid of self which is the intersection of self and another YGridCompone...
Definition ygrid.hh:271
│ │ │ │ -
Coordinates::ctype ct
Definition ygrid.hh:78
│ │ │ │ -
Coordinates * getCoords() const
Definition ygrid.hh:167
│ │ │ │ -
int min(int i) const
Return minimum index in direction i.
Definition ygrid.hh:218
│ │ │ │ -
YGridComponent(iTupel origin, iTupel size)
make ygrid without coordinate information
Definition ygrid.hh:99
│ │ │ │ -
int totalsize() const
Return total size of index set which is the product of all size per direction.
Definition ygrid.hh:209
│ │ │ │ -
YGridComponent(iTupel origin, iTupel size, const YGridComponent< Coordinates > &enclosing)
make a subgrid by taking coordinates from a larger grid
Definition ygrid.hh:108
│ │ │ │ -
const iTupel & supersize() const
return size of enclosing grid
Definition ygrid.hh:191
│ │ │ │ -
YGridComponent(iTupel origin, std::bitset< d > shift, Coordinates *coords, iTupel size, iTupel offset, iTupel supersize)
Make YGridComponent by giving all parameters.
Definition ygrid.hh:131
│ │ │ │ -
int superindex(iTupel coord) const
Definition ygrid.hh:472
│ │ │ │ -
Iterator begin() const
return iterator to first element of index set
Definition ygrid.hh:487
│ │ │ │ -
FieldVector< ct, d > fTupel
Definition ygrid.hh:82
│ │ │ │ -
Iterator begin(const iTupel &co) const
return iterator to given element of index set
Definition ygrid.hh:493
│ │ │ │ -
YGridComponent()
make uninitialized ygrid
Definition ygrid.hh:85
│ │ │ │ -
int origin(int i) const
Return origin in direction i.
Definition ygrid.hh:144
│ │ │ │ -
int supersize(int i) const
return size of enclosing grid
Definition ygrid.hh:185
│ │ │ │ -
int size(int i) const
return size in direction i
Definition ygrid.hh:197
│ │ │ │ -
int max(int i) const
Return maximum index in direction i.
Definition ygrid.hh:224
│ │ │ │ -
const std::bitset< d > & shift() const
Return shift tupel.
Definition ygrid.hh:162
│ │ │ │ -
int superincrement(int i) const
Definition ygrid.hh:481
│ │ │ │ -
bool shift(int i) const
Return shift in direction i.
Definition ygrid.hh:156
│ │ │ │ -
Iterator end() const
return subiterator to last element of index set
Definition ygrid.hh:499
│ │ │ │ -
bool inside(const iTupel &coord) const
given a coordinate, return true if it is in the grid
Definition ygrid.hh:241
│ │ │ │ -
bool empty() const
Return true if YGrid is empty, i.e. has size 0 in all directions.
Definition ygrid.hh:230
│ │ │ │ -
const iTupel & offset() const
Return offset to origin of enclosing grid.
Definition ygrid.hh:179
│ │ │ │ -
const iTupel & origin() const
return reference to origin
Definition ygrid.hh:150
│ │ │ │ -
Definition ygrid.hh:298
│ │ │ │ -
Iterator & operator++()
Increment iterator to next cell with position.
Definition ygrid.hh:379
│ │ │ │ -
int superindex() const
Return consecutive index in enclosing grid.
Definition ygrid.hh:344
│ │ │ │ -
bool operator!=(const Iterator &i) const
Return true when two iterators over the same grid are not equal (!).
Definition ygrid.hh:338
│ │ │ │ -
ct lowerleft(int i) const
Return ith component of lower left corner of the entity associated with the current coordinates and s...
Definition ygrid.hh:403
│ │ │ │ -
std::bitset< d > shift() const
Definition ygrid.hh:455
│ │ │ │ - │ │ │ │ -
ct meshsize(int i) const
Return meshsize in direction i.
Definition ygrid.hh:436
│ │ │ │ -
bool shift(int i) const
Definition ygrid.hh:450
│ │ │ │ -
const YGridComponent< Coordinates > * _grid
Definition ygrid.hh:468
│ │ │ │ -
void reinit(const YGridComponent< Coordinates > &r, const iTupel &coord)
reinitialize iterator to given position
Definition ygrid.hh:317
│ │ │ │ -
void move(const iTupel &dist)
move this iterator dist cells in direction i
Definition ygrid.hh:369
│ │ │ │ -
fTupel meshsize() const
Return meshsize of current cell as reference.
Definition ygrid.hh:442
│ │ │ │ -
fTupel lowerleft() const
Return lower left corner of the entity associated with the current coordinates and shift.
Definition ygrid.hh:409
│ │ │ │ -
Coordinates * coordCont() const
Definition ygrid.hh:460
│ │ │ │ -
iTupel _coord
current position in index set
Definition ygrid.hh:466
│ │ │ │ -
const iTupel & coord() const
Return coordinate of the cell as reference (do not modify).
Definition ygrid.hh:356
│ │ │ │ -
void move(int i, int dist)
move this iterator dist cells in direction i
Definition ygrid.hh:362
│ │ │ │ -
Iterator(const YGridComponent< Coordinates > &r)
Make iterator pointing to first cell in a grid.
Definition ygrid.hh:304
│ │ │ │ -
ct upperright(int i) const
Return ith component of upper right corder of the entity associated with the current coordinates and ...
Definition ygrid.hh:418
│ │ │ │ -
int coord(int i) const
Return coordinate of the cell in direction i.
Definition ygrid.hh:350
│ │ │ │ -
fTupel upperright() const
Return upper right corder of the entity associated with the current coordinates and shift.
Definition ygrid.hh:427
│ │ │ │ -
bool operator==(const Iterator &i) const
Return true when two iterators over the same grid are equal (!).
Definition ygrid.hh:332
│ │ │ │ -
Iterator(const YGridComponent< Coordinates > &r, const iTupel &coord)
Make iterator pointing to given cell in a grid.
Definition ygrid.hh:311
│ │ │ │ -
int _superindex
consecutive index in enclosing grid
Definition ygrid.hh:467
│ │ │ │ -
implements a collection of YGridComponents which form a codimension Entities of given codimension c n...
Definition ygrid.hh:551
│ │ │ │ -
int shiftmapping(const std::bitset< dim > &shift) const
get which component belongs to a given shift vector
Definition ygrid.hh:567
│ │ │ │ -
DAI dataBegin() const
get start iterator in the data array
Definition ygrid.hh:573
│ │ │ │ -
Iterator begin() const
return begin iterator for the codimension and partition the ygrid represents
Definition ygrid.hh:747
│ │ │ │ -
DAI dataEnd() const
get end iterator in the data array
Definition ygrid.hh:579
│ │ │ │ -
std::array< int, dim > iTupel
Definition ygrid.hh:558
│ │ │ │ -
static const int dim
Definition ygrid.hh:553
│ │ │ │ -
void setBegin(DAI begin)
set start iterator in the data array
Definition ygrid.hh:561
│ │ │ │ -
bool inside(const iTupel &coord, const std::bitset< dim > &shift=std::bitset< dim >()) const
decide whether a coordinate is in the grid (depending on the component)
Definition ygrid.hh:585
│ │ │ │ -
int superindex(const iTupel &coord, int which) const
Definition ygrid.hh:764
│ │ │ │ -
Iterator begin(const std::array< int, dim > &coord, int which=0) const
return iterator pointint to a specified position
Definition ygrid.hh:753
│ │ │ │ -
YGridComponent< Coordinates > * DAI
Definition ygrid.hh:556
│ │ │ │ -
void finalize(const DAI &end, int artificialOffset=0)
Definition ygrid.hh:771
│ │ │ │ -
Iterator end() const
return end iterator for the codimension and partition the ygrid represents
Definition ygrid.hh:759
│ │ │ │ -
Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid.
Definition ygrid.hh:594
│ │ │ │ -
Iterator()=default
default constructor
│ │ │ │ -
int which() const
return the current component number
Definition ygrid.hh:718
│ │ │ │ -
void move(int i, int dist)
move the grid, this is only done and needed for codim 0
Definition ygrid.hh:724
│ │ │ │ -
bool operator==(const Iterator &i) const
compare two iterators: component has to match
Definition ygrid.hh:702
│ │ │ │ -
Coordinates::ctype lowerleft(int i) const
Definition ygrid.hh:642
│ │ │ │ -
Dune::FieldVector< typename Coordinates::ctype, dim > meshsize() const
return the current meshsize vector
Definition ygrid.hh:669
│ │ │ │ -
Iterator(const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, int which=0)
construct an iterator from coordinates and component
Definition ygrid.hh:601
│ │ │ │ -
Coordinates * coordCont() const
Definition ygrid.hh:734
│ │ │ │ -
Coordinates::ctype upperright(int i) const
Definition ygrid.hh:652
│ │ │ │ -
std::bitset< dim > shift() const
return the shift vector
Definition ygrid.hh:681
│ │ │ │ -
bool shift(int i) const
return the shift in direction i
Definition ygrid.hh:675
│ │ │ │ -
bool operator!=(const Iterator &i) const
compare two iterators: component has to match
Definition ygrid.hh:710
│ │ │ │ -
void move(const iTupel &dist)
Definition ygrid.hh:729
│ │ │ │ -
Dune::FieldVector< typename Coordinates::ctype, dim > upperright() const
Definition ygrid.hh:657
│ │ │ │ -
const std::array< int, dim > & coord() const
return coordinate array at the current position
Definition ygrid.hh:637
│ │ │ │ -
Iterator & operator++()
increment to the next entity jumping to next component if necessary
Definition ygrid.hh:694
│ │ │ │ -
Coordinates::ctype meshsize(int i) const
return the current meshsize in direction i
Definition ygrid.hh:663
│ │ │ │ -
int coord(int i) const
return coordinate at the current position (direction i)
Definition ygrid.hh:631
│ │ │ │ -
Iterator(const YGrid< Coordinates > &yg, bool end=false)
create an iterator to start or end of the codimension
Definition ygrid.hh:608
│ │ │ │ -
Dune::FieldVector< typename Coordinates::ctype, dim > lowerleft() const
Definition ygrid.hh:647
│ │ │ │ -
int superindex() const
return the superindex
Definition ygrid.hh:687
│ │ │ │ -
void reinit(const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, int which=0)
reinitializes an iterator, as if it was just constructed.
Definition ygrid.hh:623
│ │ │ │ +
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:39
│ │ │ │ +
virtual void partition(const iTupel &, int, iTupel &, int) const =0
│ │ │ │ +
Definition torus.hh:46
│ │ │ │ +
Torus()
constructor making uninitialized object
Definition torus.hh:67
│ │ │ │ +
int color(int rank) const
assign color to given rank
Definition torus.hh:197
│ │ │ │ +
double partition(int rank, iTupel origin_in, iTupel size_in, iTupel &origin_out, iTupel &size_out) const
partition the given grid onto the torus and return the piece of the process with given rank; returns ...
Definition torus.hh:239
│ │ │ │ +
int dims(int i) const
return dimensions of torus in direction i
Definition torus.hh:118
│ │ │ │ +
iTupel coord() const
return own coordinates
Definition torus.hh:100
│ │ │ │ +
int rank() const
return own rank
Definition torus.hh:94
│ │ │ │ +
const iTupel & dims() const
return dimensions of torus
Definition torus.hh:112
│ │ │ │ +
int rank_relative(int rank, int dir, int cnt) const
return rank of process where its coordinate in direction dir has offset cnt (handles periodic case)
Definition torus.hh:166
│ │ │ │ +
void recv(int rank, void *buffer, int size) const
store a receive request; buffers are received in order; handles also local requests with memcpy
Definition torus.hh:374
│ │ │ │ +
void send(int rank, void *buffer, int size) const
store a send request; buffers are sent in order; handles also local requests with memcpy
Definition torus.hh:361
│ │ │ │ +
Torus(Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning< d > *partitioner)
make partitioner from communicator and coarse mesh size
Definition torus.hh:71
│ │ │ │ +
int neighbors() const
return the number of neighbors, which is
Definition torus.hh:203
│ │ │ │ +
void print(std::ostream &s) const
print contents of torus object
Definition torus.hh:451
│ │ │ │ +
double global_max(double x) const
global max
Definition torus.hh:443
│ │ │ │ +
Communication comm() const
return communicator
Definition torus.hh:124
│ │ │ │ +
int color(const iTupel &coord) const
assign color to given coordinate
Definition torus.hh:174
│ │ │ │ +
ProcListIterator recvend() const
last process in receive list
Definition torus.hh:355
│ │ │ │ +
bool is_neighbor(iTupel delta, std::bitset< d > periodic) const
return true if neighbor with given delta is a neighbor under the given periodicity
Definition torus.hh:212
│ │ │ │ +
ProcListIterator sendend() const
end of send list
Definition torus.hh:343
│ │ │ │ +
int procs() const
return number of processes
Definition torus.hh:106
│ │ │ │ +
iTupel rank_to_coord(int rank) const
map rank to coordinate in torus using lexicographic ordering
Definition torus.hh:144
│ │ │ │ +
std::array< int, d > iTupel
type used to pass tupels in and out
Definition torus.hh:49
│ │ │ │ +
ProcListIterator sendbegin() const
first process in send list
Definition torus.hh:337
│ │ │ │ +
void exchange() const
exchange messages stored in request buffers; clear request buffers afterwards
Definition torus.hh:387
│ │ │ │ +
ProcListIterator recvbegin() const
first process in receive list
Definition torus.hh:349
│ │ │ │ +
int coord_to_rank(iTupel coord) const
map coordinate in torus to rank using lexicographic ordering
Definition torus.hh:157
│ │ │ │ +
bool inside(iTupel c) const
return true if coordinate is inside torus
Definition torus.hh:136
│ │ │ │ +
int tag() const
return tag used by torus
Definition torus.hh:130
│ │ │ │ +
Definition torus.hh:276
│ │ │ │ +
iTupel delta() const
return distance vector
Definition torus.hh:291
│ │ │ │ +
bool operator==(const ProcListIterator &iter) const
Return true when two iterators point to same member.
Definition torus.hh:313
│ │ │ │ +
bool operator!=(const ProcListIterator &iter) const
Return true when two iterators do not point to same member.
Definition torus.hh:320
│ │ │ │ +
int rank() const
return rank of neighboring process
Definition torus.hh:285
│ │ │ │ +
ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)
make an iterator
Definition torus.hh:279
│ │ │ │ +
ProcListIterator & operator++()
Increment iterator to next cell.
Definition torus.hh:326
│ │ │ │ +
int index() const
return index in proclist
Definition torus.hh:297
│ │ │ │ +
int distance() const
return 1-norm of distance vector
Definition torus.hh:303
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1253 +1,680 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -ygrid.hh │ │ │ │ │ +torus.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_TORUS_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_TORUS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -21namespace _D_u_n_e { │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#if HAVE_MPI │ │ │ │ │ +16#include │ │ │ │ │ +17#endif │ │ │ │ │ +18 │ │ │ │ │ +19#include │ │ │ │ │ +20#include │ │ │ │ │ +21#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ │ 22 │ │ │ │ │ -23 namespace Yasp { │ │ │ │ │ -28 template │ │ │ │ │ -_2_9 std::array _s_i_z_e_A_r_r_a_y(const std::array,d>& v) │ │ │ │ │ -30 { │ │ │ │ │ -31 std::array tmp; │ │ │ │ │ -32 for (int i=0; i │ │ │ │ │ -_7_4 class _Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ -75 { │ │ │ │ │ -76 public: │ │ │ │ │ -77 //extract coordinate type and dimension from the coordinate container │ │ │ │ │ -_7_8 typedef typename Coordinates::ctype _c_t; │ │ │ │ │ -_7_9 static const int _d = Coordinates::dimension; │ │ │ │ │ -80 │ │ │ │ │ -_8_1 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -_8_2 typedef FieldVector _f_T_u_p_e_l; │ │ │ │ │ -83 │ │ │ │ │ -_8_5 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t () : _shift(0ULL) │ │ │ │ │ -86 { │ │ │ │ │ -87 std::fill(_origin.begin(), _origin.end(), 0); │ │ │ │ │ -88 std::fill(_offset.begin(), _offset.end(), 0); │ │ │ │ │ -89 std::fill(_size.begin(), _size.end(), 0); │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -_9_9 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t(_i_T_u_p_e_l _o_r_i_g_i_n, _i_T_u_p_e_l _s_i_z_e) │ │ │ │ │ -100 : _origin(_o_r_i_g_i_n), _size(_s_i_z_e) │ │ │ │ │ -101 {} │ │ │ │ │ -102 │ │ │ │ │ -_1_0_8 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t (_i_T_u_p_e_l _o_r_i_g_i_n, _i_T_u_p_e_l _s_i_z_e, const │ │ │ │ │ -_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& enclosing) │ │ │ │ │ -109 : _origin(_o_r_i_g_i_n), _shift(enclosing._s_h_i_f_t()), _coords(enclosing._g_e_t_C_o_o_r_d_s │ │ │ │ │ -()), _size(_s_i_z_e), _supersize(enclosing._s_u_p_e_r_s_i_z_e()) │ │ │ │ │ -110 { │ │ │ │ │ -111 for (int i=0; i<_d; i++) │ │ │ │ │ -112 _offset[i] = _o_r_i_g_i_n[i] - enclosing._o_r_i_g_i_n(i) + enclosing._o_f_f_s_e_t(i); │ │ │ │ │ -113 │ │ │ │ │ -114 // compute superincrements │ │ │ │ │ -115 int inc = 1; │ │ │ │ │ -116 for (int i=0; i<_d; ++i) │ │ │ │ │ -117 { │ │ │ │ │ -118 _superincrement[i] = inc; │ │ │ │ │ -119 inc *= _supersize[i]; │ │ │ │ │ -120 } │ │ │ │ │ +23#include "_p_a_r_t_i_t_i_o_n_i_n_g_._h_h" │ │ │ │ │ +24 │ │ │ │ │ +29namespace _D_u_n_e │ │ │ │ │ +30{ │ │ │ │ │ +31 │ │ │ │ │ +45 template │ │ │ │ │ +_4_6 class _T_o_r_u_s { │ │ │ │ │ +47 public: │ │ │ │ │ +_4_9 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +50 │ │ │ │ │ +51 │ │ │ │ │ +52 private: │ │ │ │ │ +53 struct CommPartner { │ │ │ │ │ +54 int rank; │ │ │ │ │ +55 _i_T_u_p_e_l delta; │ │ │ │ │ +56 int index; │ │ │ │ │ +57 }; │ │ │ │ │ +58 │ │ │ │ │ +59 struct CommTask { │ │ │ │ │ +60 int rank; // process to send to / receive from │ │ │ │ │ +61 int size; // size of buffer │ │ │ │ │ +62 void *buffer; // buffer to send / receive │ │ │ │ │ +63 }; │ │ │ │ │ +64 │ │ │ │ │ +65 public: │ │ │ │ │ +_6_7 _T_o_r_u_s () │ │ │ │ │ +68 {} │ │ │ │ │ +69 │ │ │ │ │ +_7_1 _T_o_r_u_s (Communication _c_o_m_m, int _t_a_g, _i_T_u_p_e_l size, int overlap, const _Y_a_s_p_:_: │ │ │ │ │ +_P_a_r_t_i_t_i_o_n_i_n_g_<_d_>* partitioner) │ │ │ │ │ +72 : _comm(_c_o_m_m), _tag(_t_a_g) │ │ │ │ │ +73 { │ │ │ │ │ +74 // determine dimensions │ │ │ │ │ +75 partitioner->_p_a_r_t_i_t_i_o_n(size, _comm.size(), _dims, overlap); │ │ │ │ │ +76 │ │ │ │ │ +77 // compute increments for lexicographic ordering │ │ │ │ │ +78 int inc = 1; │ │ │ │ │ +79 for (int i=0; i _s_h_i_f_t, Coordinates* coords, │ │ │ │ │ -_i_T_u_p_e_l _s_i_z_e, _i_T_u_p_e_l _o_f_f_s_e_t, _i_T_u_p_e_l _s_u_p_e_r_s_i_z_e) │ │ │ │ │ -132 : _origin(_o_r_i_g_i_n), _shift(_s_h_i_f_t), _coords(coords), _size(_s_i_z_e), _offset │ │ │ │ │ -(_o_f_f_s_e_t), _supersize(_s_u_p_e_r_s_i_z_e) │ │ │ │ │ -133 { │ │ │ │ │ -134 // compute superincrements │ │ │ │ │ -135 int inc = 1; │ │ │ │ │ -136 for (int i=0; i<_d; ++i) │ │ │ │ │ +_1_2_4 Communication _c_o_m_m () const │ │ │ │ │ +125 { │ │ │ │ │ +126 return _comm; │ │ │ │ │ +127 } │ │ │ │ │ +128 │ │ │ │ │ +_1_3_0 int _t_a_g () const │ │ │ │ │ +131 { │ │ │ │ │ +132 return _tag; │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +_1_3_6 bool _i_n_s_i_d_e (_i_T_u_p_e_l c) const │ │ │ │ │ 137 { │ │ │ │ │ -138 _superincrement[i] = inc; │ │ │ │ │ -139 inc *= _supersize[i]; │ │ │ │ │ -140 } │ │ │ │ │ +138 for (int i=d-1; i>=0; i--) │ │ │ │ │ +139 if (c[i]<0 || c[i]>=_dims[i]) return false; │ │ │ │ │ +140 return true; │ │ │ │ │ 141 } │ │ │ │ │ 142 │ │ │ │ │ -_1_4_4 int _o_r_i_g_i_n (int i) const │ │ │ │ │ +_1_4_4 _i_T_u_p_e_l _r_a_n_k___t_o___c_o_o_r_d (int _r_a_n_k) const │ │ │ │ │ 145 { │ │ │ │ │ -146 return _origin[i]; │ │ │ │ │ -147 } │ │ │ │ │ -148 │ │ │ │ │ -_1_5_0 const _i_T_u_p_e_l& _o_r_i_g_i_n () const │ │ │ │ │ -151 { │ │ │ │ │ -152 return _origin; │ │ │ │ │ -153 } │ │ │ │ │ -154 │ │ │ │ │ -_1_5_6 bool _s_h_i_f_t (int i) const │ │ │ │ │ -157 { │ │ │ │ │ -158 return _shift[i]; │ │ │ │ │ -159 } │ │ │ │ │ -160 │ │ │ │ │ -_1_6_2 const std::bitset& _s_h_i_f_t () const │ │ │ │ │ -163 { │ │ │ │ │ -164 return _shift; │ │ │ │ │ -165 } │ │ │ │ │ -166 │ │ │ │ │ -_1_6_7 Coordinates* _g_e_t_C_o_o_r_d_s() const │ │ │ │ │ -168 { │ │ │ │ │ -169 return _coords; │ │ │ │ │ -170 } │ │ │ │ │ -171 │ │ │ │ │ -_1_7_3 int _o_f_f_s_e_t (int i) const │ │ │ │ │ -174 { │ │ │ │ │ -175 return _offset[i]; │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 const _i_T_u_p_e_l & _o_f_f_s_e_t () const │ │ │ │ │ -180 { │ │ │ │ │ -181 return _offset; │ │ │ │ │ -182 } │ │ │ │ │ -183 │ │ │ │ │ -_1_8_5 int _s_u_p_e_r_s_i_z_e (int i) const │ │ │ │ │ -186 { │ │ │ │ │ -187 return _supersize[i]; │ │ │ │ │ -188 } │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 const _i_T_u_p_e_l & _s_u_p_e_r_s_i_z_e () const │ │ │ │ │ -192 { │ │ │ │ │ -193 return _supersize; │ │ │ │ │ +146 _i_T_u_p_e_l _c_o_o_r_d; │ │ │ │ │ +147 _r_a_n_k = _r_a_n_k%_comm.size(); │ │ │ │ │ +148 for (int i=d-1; i>=0; i--) │ │ │ │ │ +149 { │ │ │ │ │ +150 _c_o_o_r_d[i] = _r_a_n_k/_increment[i]; │ │ │ │ │ +151 _r_a_n_k = _r_a_n_k%_increment[i]; │ │ │ │ │ +152 } │ │ │ │ │ +153 return _c_o_o_r_d; │ │ │ │ │ +154 } │ │ │ │ │ +155 │ │ │ │ │ +_1_5_7 int _c_o_o_r_d___t_o___r_a_n_k (_i_T_u_p_e_l _c_o_o_r_d) const │ │ │ │ │ +158 { │ │ │ │ │ +159 for (int i=0; i1 && _c_o_o_r_d[i]==_dims[i]-1) c += power; │ │ │ │ │ +190 power *= 2; │ │ │ │ │ +191 } │ │ │ │ │ +192 │ │ │ │ │ +193 return c; │ │ │ │ │ 194 } │ │ │ │ │ 195 │ │ │ │ │ -_1_9_7 int _s_i_z_e (int i) const │ │ │ │ │ +_1_9_7 int _c_o_l_o_r (int _r_a_n_k) const │ │ │ │ │ 198 { │ │ │ │ │ -199 return _size[i]; │ │ │ │ │ +199 return _c_o_l_o_r(_r_a_n_k___t_o___c_o_o_r_d(_r_a_n_k)); │ │ │ │ │ 200 } │ │ │ │ │ 201 │ │ │ │ │ -_2_0_3 _i_T_u_p_e_l _s_i_z_e () const │ │ │ │ │ +_2_0_3 int _n_e_i_g_h_b_o_r_s () const │ │ │ │ │ 204 { │ │ │ │ │ -205 return _size; │ │ │ │ │ -206 } │ │ │ │ │ -207 │ │ │ │ │ -_2_0_9 int _t_o_t_a_l_s_i_z_e () const │ │ │ │ │ -210 { │ │ │ │ │ -211 int s=1; │ │ │ │ │ -212 for (int i=0; i<_d; ++i) │ │ │ │ │ -213 s *= _s_i_z_e(i); │ │ │ │ │ -214 return s; │ │ │ │ │ -215 } │ │ │ │ │ -216 │ │ │ │ │ -_2_1_8 int _m_i_n (int i) const │ │ │ │ │ +205 int n=1; │ │ │ │ │ +206 for (int i=0; i periodic) const │ │ │ │ │ +213 { │ │ │ │ │ +214 _i_T_u_p_e_l _c_o_o_r_d = _r_a_n_k___t_o___c_o_o_r_d(_comm.rank()); // my own coordinate with 0 <= │ │ │ │ │ +c_i < dims_i │ │ │ │ │ +215 │ │ │ │ │ +216 for (int i=0; i no neighbor │ │ │ │ │ +221 if (_c_o_o_r_d[i]==0 && periodic[i]==false) return false; │ │ │ │ │ +222 } │ │ │ │ │ +223 if (delta[i]>0) │ │ │ │ │ +224 { │ │ │ │ │ +225 // if I am on the boundary and domain is not periodic => no neighbor │ │ │ │ │ +226 if (_c_o_o_r_d[i]==_dims[i]-1 && periodic[i]==false) return false; │ │ │ │ │ 227 } │ │ │ │ │ -228 │ │ │ │ │ -_2_3_0 bool _e_m_p_t_y () const │ │ │ │ │ -231 { │ │ │ │ │ -232 for (int i=0; i<_d; ++i) │ │ │ │ │ -233 { │ │ │ │ │ -234 if (_s_i_z_e(i) == 0) │ │ │ │ │ -235 return true; │ │ │ │ │ -236 } │ │ │ │ │ -237 return false; │ │ │ │ │ -238 } │ │ │ │ │ -239 │ │ │ │ │ -_2_4_1 bool _i_n_s_i_d_e (const _i_T_u_p_e_l& coord) const │ │ │ │ │ -242 { │ │ │ │ │ -243 for (int i=0; i<_d; i++) │ │ │ │ │ -244 { │ │ │ │ │ -245 if ((coord[i]<_origin[i]) || (coord[i]>=_origin[i]+_size[i])) │ │ │ │ │ -246 return false; │ │ │ │ │ -247 } │ │ │ │ │ -248 return true; │ │ │ │ │ -249 } │ │ │ │ │ -250 │ │ │ │ │ -_2_5_2 int _i_n_d_e_x (const _i_T_u_p_e_l& coord) const │ │ │ │ │ -253 { │ │ │ │ │ -254 int _i_n_d_e_x = (coord[_d-1]-_origin[_d-1]); │ │ │ │ │ -255 │ │ │ │ │ -256 for (int i=_d-2; i>=0; i--) │ │ │ │ │ -257 _i_n_d_e_x = _i_n_d_e_x*_size[i] + (coord[i]-_origin[i]); │ │ │ │ │ -258 │ │ │ │ │ -259 return _i_n_d_e_x; │ │ │ │ │ -260 } │ │ │ │ │ -261 │ │ │ │ │ -_2_6_3 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> _m_o_v_e (_i_T_u_p_e_l v) const │ │ │ │ │ -264 { │ │ │ │ │ -265 for (int i=0; i<_d; i++) │ │ │ │ │ -266 v[i] += _origin[i]; │ │ │ │ │ -267 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(v,_size,*this); │ │ │ │ │ +228 } │ │ │ │ │ +229 return true; │ │ │ │ │ +230 } │ │ │ │ │ +231 │ │ │ │ │ +_2_3_9 double _p_a_r_t_i_t_i_o_n (int _r_a_n_k, _i_T_u_p_e_l origin_in, _i_T_u_p_e_l size_in, _i_T_u_p_e_l& │ │ │ │ │ +origin_out, _i_T_u_p_e_l& size_out) const │ │ │ │ │ +240 { │ │ │ │ │ +241 _i_T_u_p_e_l _c_o_o_r_d = _r_a_n_k___t_o___c_o_o_r_d(_r_a_n_k); │ │ │ │ │ +242 double maxsize = 1; │ │ │ │ │ +243 double sz = 1; │ │ │ │ │ +244 │ │ │ │ │ +245 // make a tensor product partition │ │ │ │ │ +246 for (int i=0; i _i_n_t_e_r_s_e_c_t_i_o_n (const │ │ │ │ │ -_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r) const │ │ │ │ │ -272 { │ │ │ │ │ -273 for (int i=0; i<_d; i++) │ │ │ │ │ -274 { │ │ │ │ │ -275 //empty coordinate vectors result in empty intersections │ │ │ │ │ -276 if (_e_m_p_t_y() || r._e_m_p_t_y()) │ │ │ │ │ -277 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(); │ │ │ │ │ -278 } │ │ │ │ │ -279 │ │ │ │ │ -280 _i_T_u_p_e_l neworigin; │ │ │ │ │ -281 _i_T_u_p_e_l newsize; │ │ │ │ │ -282 for (int i=0; i<_d; ++i) │ │ │ │ │ -283 { │ │ │ │ │ -284 neworigin[i] = std::max(_o_r_i_g_i_n(i),r._o_r_i_g_i_n(i)); │ │ │ │ │ -285 newsize[i] = std::min(_m_a_x(i),r._m_a_x(i)) - neworigin[i] + 1; │ │ │ │ │ -286 } │ │ │ │ │ -287 │ │ │ │ │ -288 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(neworigin,newsize,*this); │ │ │ │ │ -289 } │ │ │ │ │ -290 │ │ │ │ │ -291 │ │ │ │ │ -_2_9_8 class _I_t_e_r_a_t_o_r { │ │ │ │ │ -299 public: │ │ │ │ │ -300 // default constructor │ │ │ │ │ -_3_0_1 _I_t_e_r_a_t_o_r () = default; │ │ │ │ │ -302 │ │ │ │ │ -_3_0_4 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r) : ___g_r_i_d(&r) │ │ │ │ │ -305 { │ │ │ │ │ -306 _i_T_u_p_e_l _c_o_o_r_d(r._o_r_i_g_i_n()); │ │ │ │ │ -307 _r_e_i_n_i_t(r,_c_o_o_r_d); │ │ │ │ │ -308 } │ │ │ │ │ -309 │ │ │ │ │ -_3_1_1 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r, const _i_T_u_p_e_l& _c_o_o_r_d) │ │ │ │ │ -312 { │ │ │ │ │ -313 _r_e_i_n_i_t(r,_c_o_o_r_d); │ │ │ │ │ -314 } │ │ │ │ │ -315 │ │ │ │ │ -_3_1_7 void _r_e_i_n_i_t (const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r, const _i_T_u_p_e_l& _c_o_o_r_d) │ │ │ │ │ -318 { │ │ │ │ │ -319 // initialize to given position in index set │ │ │ │ │ -320 for (int i=0; i<_d; ++i) │ │ │ │ │ -321 ___c_o_o_r_d[i] = _c_o_o_r_d[i]; │ │ │ │ │ -322 │ │ │ │ │ -323 // move superindex to first cell in subgrid │ │ │ │ │ -324 ___s_u_p_e_r_i_n_d_e_x = 0; │ │ │ │ │ -325 for (int i=0; i<_d; ++i) │ │ │ │ │ -326 ___s_u_p_e_r_i_n_d_e_x += (r._o_f_f_s_e_t(i)+_c_o_o_r_d[i]-r._o_r_i_g_i_n(i))*r._s_u_p_e_r_i_n_c_r_e_m_e_n_t(i); │ │ │ │ │ -327 │ │ │ │ │ -328 ___g_r_i_d = &r; │ │ │ │ │ -329 } │ │ │ │ │ -330 │ │ │ │ │ -_3_3_2 bool _o_p_e_r_a_t_o_r_=_=_ (const _I_t_e_r_a_t_o_r& i) const │ │ │ │ │ -333 { │ │ │ │ │ -334 return ___s_u_p_e_r_i_n_d_e_x == i.___s_u_p_e_r_i_n_d_e_x; │ │ │ │ │ -335 } │ │ │ │ │ -336 │ │ │ │ │ -_3_3_8 bool _o_p_e_r_a_t_o_r_!_=_ (const _I_t_e_r_a_t_o_r& i) const │ │ │ │ │ -339 { │ │ │ │ │ -340 return ___s_u_p_e_r_i_n_d_e_x != i.___s_u_p_e_r_i_n_d_e_x; │ │ │ │ │ -341 } │ │ │ │ │ -342 │ │ │ │ │ -_3_4_4 int _s_u_p_e_r_i_n_d_e_x () const │ │ │ │ │ -345 { │ │ │ │ │ -346 return ___s_u_p_e_r_i_n_d_e_x; │ │ │ │ │ -347 } │ │ │ │ │ -348 │ │ │ │ │ -_3_5_0 int _c_o_o_r_d (int i) const │ │ │ │ │ -351 { │ │ │ │ │ -352 return ___c_o_o_r_d[i]; │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -_3_5_6 const _i_T_u_p_e_l& _c_o_o_r_d () const │ │ │ │ │ -357 { │ │ │ │ │ -358 return ___c_o_o_r_d; │ │ │ │ │ -359 } │ │ │ │ │ -360 │ │ │ │ │ -_3_6_2 void _m_o_v_e (int i, int dist) │ │ │ │ │ -363 { │ │ │ │ │ -364 ___c_o_o_r_d[i] += dist; │ │ │ │ │ -365 ___s_u_p_e_r_i_n_d_e_x += dist*___g_r_i_d->superincrement(i); │ │ │ │ │ -366 } │ │ │ │ │ -367 │ │ │ │ │ -_3_6_9 void _m_o_v_e (const _i_T_u_p_e_l& dist) │ │ │ │ │ -370 { │ │ │ │ │ -371 for (int i = 0; i < _d; ++i) │ │ │ │ │ -372 { │ │ │ │ │ -373 ___c_o_o_r_d[i] += dist[i]; │ │ │ │ │ -374 ___s_u_p_e_r_i_n_d_e_x += dist[i]*___g_r_i_d->superincrement(i); │ │ │ │ │ -375 } │ │ │ │ │ -376 } │ │ │ │ │ -377 │ │ │ │ │ -_3_7_9 _I_t_e_r_a_t_o_r& _o_p_e_r_a_t_o_r_+_+_ () │ │ │ │ │ -380 { │ │ │ │ │ -381 for (int i=0; i<_d; i++) // check for wrap around │ │ │ │ │ -382 { │ │ │ │ │ -383 ___s_u_p_e_r_i_n_d_e_x += ___g_r_i_d->superincrement(i); // move on cell in direction i │ │ │ │ │ -384 if (++___c_o_o_r_d[i] <= ___g_r_i_d->max(i)) │ │ │ │ │ -385 return *this; │ │ │ │ │ -386 else │ │ │ │ │ -387 { │ │ │ │ │ -388 ___c_o_o_r_d[i] = ___g_r_i_d->origin(i); // move back to origin in direction i │ │ │ │ │ -389 ___s_u_p_e_r_i_n_d_e_x -= ___g_r_i_d->size(i) * ___g_r_i_d->superincrement(i); │ │ │ │ │ -390 } │ │ │ │ │ -391 } │ │ │ │ │ -392 // if we wrapped around, back to to begin(), we must put the iterator to │ │ │ │ │ -end() │ │ │ │ │ -393 if (___c_o_o_r_d == ___g_r_i_d->origin()) │ │ │ │ │ -394 { │ │ │ │ │ -395 for (int i=0; i<_d; i++) │ │ │ │ │ -396 ___s_u_p_e_r_i_n_d_e_x += (___g_r_i_d->size(i)-1) * ___g_r_i_d->superincrement(i); │ │ │ │ │ -397 ___s_u_p_e_r_i_n_d_e_x += ___g_r_i_d->superincrement(0); │ │ │ │ │ -398 } │ │ │ │ │ -399 return *this; │ │ │ │ │ -400 } │ │ │ │ │ -401 │ │ │ │ │ -_4_0_3 _c_t _l_o_w_e_r_l_e_f_t(int i) const │ │ │ │ │ -404 { │ │ │ │ │ -405 return ___g_r_i_d->getCoords()->coordinate(i,___c_o_o_r_d[i]); │ │ │ │ │ -406 } │ │ │ │ │ -407 │ │ │ │ │ -_4_0_9 _f_T_u_p_e_l _l_o_w_e_r_l_e_f_t() const │ │ │ │ │ -410 { │ │ │ │ │ -411 _f_T_u_p_e_l ll; │ │ │ │ │ -412 for (int i=0; i<_d; i++) │ │ │ │ │ -413 ll[i] = _l_o_w_e_r_l_e_f_t(i); │ │ │ │ │ -414 return ll; │ │ │ │ │ -415 } │ │ │ │ │ -416 │ │ │ │ │ -_4_1_8 _c_t _u_p_p_e_r_r_i_g_h_t(int i) const │ │ │ │ │ -419 { │ │ │ │ │ -420 int _c_o_o_r_d = ___c_o_o_r_d[i]; │ │ │ │ │ -421 if (_s_h_i_f_t(i)) │ │ │ │ │ -422 _c_o_o_r_d++; │ │ │ │ │ -423 return ___g_r_i_d->getCoords()->coordinate(i,_c_o_o_r_d); │ │ │ │ │ -424 } │ │ │ │ │ -425 │ │ │ │ │ -_4_2_7 _f_T_u_p_e_l _u_p_p_e_r_r_i_g_h_t() const │ │ │ │ │ -428 { │ │ │ │ │ -429 _f_T_u_p_e_l ur; │ │ │ │ │ -430 for (int i=0; i<_d; i++) │ │ │ │ │ -431 ur[i] = _u_p_p_e_r_r_i_g_h_t(i); │ │ │ │ │ -432 return ur; │ │ │ │ │ -433 } │ │ │ │ │ -434 │ │ │ │ │ -_4_3_6 _c_t _m_e_s_h_s_i_z_e (int i) const │ │ │ │ │ -437 { │ │ │ │ │ -438 return ___g_r_i_d->getCoords()->meshsize(i,___c_o_o_r_d[i]); │ │ │ │ │ -439 } │ │ │ │ │ -440 │ │ │ │ │ -_4_4_2 _f_T_u_p_e_l _m_e_s_h_s_i_z_e () const │ │ │ │ │ -443 { │ │ │ │ │ -444 _f_T_u_p_e_l h; │ │ │ │ │ -445 for (int i=0; i<_d; i++) │ │ │ │ │ -446 h[i] = _m_e_s_h_s_i_z_e(i); │ │ │ │ │ -447 return h; │ │ │ │ │ +_2_7_6 class _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r { │ │ │ │ │ +277 public: │ │ │ │ │ +_2_7_9 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r (typename std::deque::const_iterator iter) │ │ │ │ │ +280 { │ │ │ │ │ +281 i = iter; │ │ │ │ │ +282 } │ │ │ │ │ +283 │ │ │ │ │ +_2_8_5 int _r_a_n_k () const │ │ │ │ │ +286 { │ │ │ │ │ +287 return i->rank; │ │ │ │ │ +288 } │ │ │ │ │ +289 │ │ │ │ │ +_2_9_1 _i_T_u_p_e_l _d_e_l_t_a () const │ │ │ │ │ +292 { │ │ │ │ │ +293 return i->delta; │ │ │ │ │ +294 } │ │ │ │ │ +295 │ │ │ │ │ +_2_9_7 int _i_n_d_e_x () const │ │ │ │ │ +298 { │ │ │ │ │ +299 return i->index; │ │ │ │ │ +300 } │ │ │ │ │ +301 │ │ │ │ │ +_3_0_3 int _d_i_s_t_a_n_c_e () const │ │ │ │ │ +304 { │ │ │ │ │ +305 int dist = 0; │ │ │ │ │ +306 _i_T_u_p_e_l _d_e_l_t_a=i->delta; │ │ │ │ │ +307 for (int j=0; j::const_iterator i; │ │ │ │ │ +334 }; │ │ │ │ │ +335 │ │ │ │ │ +_3_3_7 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _s_e_n_d_b_e_g_i_n () const │ │ │ │ │ +338 { │ │ │ │ │ +339 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_sendlist.begin()); │ │ │ │ │ +340 } │ │ │ │ │ +341 │ │ │ │ │ +_3_4_3 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _s_e_n_d_e_n_d () const │ │ │ │ │ +344 { │ │ │ │ │ +345 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_sendlist.end()); │ │ │ │ │ +346 } │ │ │ │ │ +347 │ │ │ │ │ +_3_4_9 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _r_e_c_v_b_e_g_i_n () const │ │ │ │ │ +350 { │ │ │ │ │ +351 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_recvlist.begin()); │ │ │ │ │ +352 } │ │ │ │ │ +353 │ │ │ │ │ +_3_5_5 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _r_e_c_v_e_n_d () const │ │ │ │ │ +356 { │ │ │ │ │ +357 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_recvlist.end()); │ │ │ │ │ +358 } │ │ │ │ │ +359 │ │ │ │ │ +_3_6_1 void _s_e_n_d (int _r_a_n_k, void* buffer, int size) const │ │ │ │ │ +362 { │ │ │ │ │ +363 CommTask task; │ │ │ │ │ +364 task.rank = _r_a_n_k; │ │ │ │ │ +365 task.buffer = buffer; │ │ │ │ │ +366 task.size = size; │ │ │ │ │ +367 if (_r_a_n_k!=_comm.rank()) │ │ │ │ │ +368 _sendrequests.push_back(task); │ │ │ │ │ +369 else │ │ │ │ │ +370 _localsendrequests.push_back(task); │ │ │ │ │ +371 } │ │ │ │ │ +372 │ │ │ │ │ +_3_7_4 void _r_e_c_v (int _r_a_n_k, void* buffer, int size) const │ │ │ │ │ +375 { │ │ │ │ │ +376 CommTask task; │ │ │ │ │ +377 task.rank = _r_a_n_k; │ │ │ │ │ +378 task.buffer = buffer; │ │ │ │ │ +379 task.size = size; │ │ │ │ │ +380 if (_r_a_n_k!=_comm.rank()) │ │ │ │ │ +381 _recvrequests.push_back(task); │ │ │ │ │ +382 else │ │ │ │ │ +383 _localrecvrequests.push_back(task); │ │ │ │ │ +384 } │ │ │ │ │ +385 │ │ │ │ │ +_3_8_7 void _e_x_c_h_a_n_g_e () const │ │ │ │ │ +388 { │ │ │ │ │ +389 // handle local requests first │ │ │ │ │ +390 if (_localsendrequests.size()!=_localrecvrequests.size()) │ │ │ │ │ +391 { │ │ │ │ │ +392 std::cout << "[" << _r_a_n_k() << "]: ERROR: local sends/receives do not match │ │ │ │ │ +in exchange!" << std::endl; │ │ │ │ │ +393 return; │ │ │ │ │ +394 } │ │ │ │ │ +395 for (unsigned int i=0; i<_localsendrequests.size(); i++) │ │ │ │ │ +396 { │ │ │ │ │ +397 if (_localsendrequests[i].size!=_localrecvrequests[i].size) │ │ │ │ │ +398 { │ │ │ │ │ +399 std::cout << "[" << _r_a_n_k() << "]: ERROR: size in local sends/receive does │ │ │ │ │ +not match in exchange!" << std::endl; │ │ │ │ │ +400 return; │ │ │ │ │ +401 } │ │ │ │ │ +402 memcpy(_localrecvrequests[i].buffer,_localsendrequests │ │ │ │ │ +[i].buffer,_localsendrequests[i].size); │ │ │ │ │ +403 } │ │ │ │ │ +404 _localsendrequests.clear(); │ │ │ │ │ +405 _localrecvrequests.clear(); │ │ │ │ │ +406 │ │ │ │ │ +407#if HAVE_MPI │ │ │ │ │ +408 // handle foreign requests │ │ │ │ │ +409 │ │ │ │ │ +410 std::vector requests(_sendrequests.size() + _recvrequests.size │ │ │ │ │ +()); │ │ │ │ │ +411 MPI_Request* req = requests.data(); │ │ │ │ │ +412 │ │ │ │ │ +413 // issue sends to foreign processes │ │ │ │ │ +414 for (unsigned int i=0; i<_sendrequests.size(); i++) │ │ │ │ │ +415 if (_sendrequests[i]._r_a_n_k!=_r_a_n_k()) │ │ │ │ │ +416 { │ │ │ │ │ +417 // std::cout << "[" << rank() << "]" << " send " << _sendrequests[i].size │ │ │ │ │ +<< " bytes " │ │ │ │ │ +418 // << "to " << _sendrequests[i].rank << " p=" << _sendrequests[i].buffer << │ │ │ │ │ +std::endl; │ │ │ │ │ +419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE, │ │ │ │ │ +420 _sendrequests[i]._r_a_n_k, _tag, _comm, req++); │ │ │ │ │ +421 } │ │ │ │ │ +422 │ │ │ │ │ +423 // issue receives from foreign processes │ │ │ │ │ +424 for (unsigned int i=0; i<_recvrequests.size(); i++) │ │ │ │ │ +425 if (_recvrequests[i]._r_a_n_k!=_r_a_n_k()) │ │ │ │ │ +426 { │ │ │ │ │ +427 // std::cout << "[" << rank() << "]" << " recv " << _recvrequests[i].size │ │ │ │ │ +<< " bytes " │ │ │ │ │ +428 // << "fm " << _recvrequests[i].rank << " p=" << _recvrequests[i].buffer << │ │ │ │ │ +std::endl; │ │ │ │ │ +429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE, │ │ │ │ │ +430 _recvrequests[i]._r_a_n_k, _tag, _comm, req++); │ │ │ │ │ +431 } │ │ │ │ │ +432 │ │ │ │ │ +433 // Wait for communication to complete │ │ │ │ │ +434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE); │ │ │ │ │ +435 │ │ │ │ │ +436 // clear request buffers │ │ │ │ │ +437 _sendrequests.clear(); │ │ │ │ │ +438 _recvrequests.clear(); │ │ │ │ │ +439#endif │ │ │ │ │ +440 } │ │ │ │ │ +441 │ │ │ │ │ +_4_4_3 double _g_l_o_b_a_l___m_a_x (double x) const │ │ │ │ │ +444 { │ │ │ │ │ +445 double res = 0.0; │ │ │ │ │ +446 _comm.template allreduce,double>(&x, &res, 1); │ │ │ │ │ +447 return res; │ │ │ │ │ 448 } │ │ │ │ │ 449 │ │ │ │ │ -_4_5_0 bool _s_h_i_f_t (int i) const │ │ │ │ │ -451 { │ │ │ │ │ -452 return ___g_r_i_d->shift(i); │ │ │ │ │ -453 } │ │ │ │ │ -454 │ │ │ │ │ -_4_5_5 std::bitset _s_h_i_f_t() const │ │ │ │ │ -456 { │ │ │ │ │ -457 return ___g_r_i_d->shift(); │ │ │ │ │ -458 } │ │ │ │ │ -459 │ │ │ │ │ -_4_6_0 Coordinates* _c_o_o_r_d_C_o_n_t() const │ │ │ │ │ -461 { │ │ │ │ │ -462 return ___g_r_i_d->getCoords(); │ │ │ │ │ -463 } │ │ │ │ │ -464 │ │ │ │ │ -465 protected: │ │ │ │ │ -_4_6_6 _i_T_u_p_e_l ___c_o_o_r_d; │ │ │ │ │ -_4_6_7 int ___s_u_p_e_r_i_n_d_e_x = 0; │ │ │ │ │ -_4_6_8 const _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>* ___g_r_i_d = nullptr; │ │ │ │ │ -469 }; │ │ │ │ │ -470 │ │ │ │ │ +_4_5_1 void _p_r_i_n_t (std::ostream& s) const │ │ │ │ │ +452 { │ │ │ │ │ +453 s << "[" << _r_a_n_k() << "]: Torus " << _p_r_o_c_s() << " processor(s) arranged as │ │ │ │ │ +" << _d_i_m_s() << std::endl; │ │ │ │ │ +454 for (_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r i=_s_e_n_d_b_e_g_i_n(); i!=_s_e_n_d_e_n_d(); ++i) │ │ │ │ │ +455 { │ │ │ │ │ +456 s << "[" << _r_a_n_k() << "]: send to " │ │ │ │ │ +457 << "rank=" << i.rank() │ │ │ │ │ +458 << " index=" << i.index() │ │ │ │ │ +459 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl; │ │ │ │ │ +460 } │ │ │ │ │ +461 for (_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r i=_r_e_c_v_b_e_g_i_n(); i!=_r_e_c_v_e_n_d(); ++i) │ │ │ │ │ +462 { │ │ │ │ │ +463 s << "[" << _r_a_n_k() << "]: recv from " │ │ │ │ │ +464 << "rank=" << i.rank() │ │ │ │ │ +465 << " index=" << i.index() │ │ │ │ │ +466 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl; │ │ │ │ │ +467 } │ │ │ │ │ +468 } │ │ │ │ │ +469 │ │ │ │ │ +470 private: │ │ │ │ │ 471 │ │ │ │ │ -_4_7_2 int _s_u_p_e_r_i_n_d_e_x(_i_T_u_p_e_l coord) const │ │ │ │ │ +472 void proclists () │ │ │ │ │ 473 { │ │ │ │ │ -474 // move superindex to first cell in subgrid │ │ │ │ │ -475 int si = 0; │ │ │ │ │ -476 for (int i=0; i<_d; ++i) │ │ │ │ │ -477 si += (_o_f_f_s_e_t(i)+coord[i]-_o_r_i_g_i_n(i))*_superincrement[i]; │ │ │ │ │ -478 return si; │ │ │ │ │ -479 } │ │ │ │ │ -480 │ │ │ │ │ -_4_8_1 int _s_u_p_e_r_i_n_c_r_e_m_e_n_t(int i) const │ │ │ │ │ -482 { │ │ │ │ │ -483 return _superincrement[i]; │ │ │ │ │ -484 } │ │ │ │ │ -485 │ │ │ │ │ -_4_8_7 _I_t_e_r_a_t_o_r _b_e_g_i_n () const │ │ │ │ │ -488 { │ │ │ │ │ -489 return _I_t_e_r_a_t_o_r(*this); │ │ │ │ │ -490 } │ │ │ │ │ -491 │ │ │ │ │ -_4_9_3 _I_t_e_r_a_t_o_r _b_e_g_i_n (const _i_T_u_p_e_l& co) const │ │ │ │ │ -494 { │ │ │ │ │ -495 return _I_t_e_r_a_t_o_r(*this,co); │ │ │ │ │ -496 } │ │ │ │ │ -497 │ │ │ │ │ -_4_9_9 _I_t_e_r_a_t_o_r _e_n_d () const │ │ │ │ │ -500 { │ │ │ │ │ -501 _i_T_u_p_e_l last; │ │ │ │ │ -502 for (int i=0; i<_d; i++) │ │ │ │ │ -503 last[i] = _m_a_x(i); │ │ │ │ │ -504 last[0] += 1; │ │ │ │ │ -505 return _I_t_e_r_a_t_o_r(*this,last); │ │ │ │ │ -506 } │ │ │ │ │ -507 │ │ │ │ │ -508 private: │ │ │ │ │ -509 _i_T_u_p_e_l _origin; │ │ │ │ │ -510 std::bitset _shift; │ │ │ │ │ -511 Coordinates* _coords; │ │ │ │ │ -512 _i_T_u_p_e_l _size; │ │ │ │ │ -513 _i_T_u_p_e_l _offset; │ │ │ │ │ -514 _i_T_u_p_e_l _supersize; │ │ │ │ │ -515 _i_T_u_p_e_l _superincrement; │ │ │ │ │ -516 │ │ │ │ │ -517 }; │ │ │ │ │ -518 │ │ │ │ │ -519 │ │ │ │ │ -521 template │ │ │ │ │ -_5_2_2 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ -_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> e) │ │ │ │ │ -523 { │ │ │ │ │ -524 s << "Printing YGridComponent structure:" << std::endl; │ │ │ │ │ -525 s << "Origin: " << e._o_r_i_g_i_n() << std::endl; │ │ │ │ │ -526 s << "Shift: " << e._s_h_i_f_t() << std::endl; │ │ │ │ │ -527 s << "Size: " << e._s_i_z_e() << std::endl; │ │ │ │ │ -528 s << "Offset: " << e._o_f_f_s_e_t() << std::endl; │ │ │ │ │ -529 s << "Supersize: " << e._s_u_p_e_r_s_i_z_e() << std::endl; │ │ │ │ │ -530 return s; │ │ │ │ │ -531 } │ │ │ │ │ -532 │ │ │ │ │ -534 template │ │ │ │ │ -_5_3_5 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, typename │ │ │ │ │ -_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r& e) │ │ │ │ │ -536 { │ │ │ │ │ -537 s << "Printing YGridComponent Iterator:" << std::endl << "Iterator at " << │ │ │ │ │ -e._c_o_o_r_d() << " (index "; │ │ │ │ │ -538 s << e.index() << "), position " << e.position(); │ │ │ │ │ -539 return s; │ │ │ │ │ -540 } │ │ │ │ │ -541 │ │ │ │ │ -549 template │ │ │ │ │ -_5_5_0 class _Y_G_r_i_d │ │ │ │ │ -551 { │ │ │ │ │ -552 public: │ │ │ │ │ -_5_5_3 static const int _d_i_m = Coordinates::dimension; │ │ │ │ │ -554 │ │ │ │ │ -555 // define data array iterator │ │ │ │ │ -_5_5_6 typedef _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>* _D_A_I; │ │ │ │ │ -557 │ │ │ │ │ -_5_5_8 typedef typename std::array _i_T_u_p_e_l; │ │ │ │ │ -559 │ │ │ │ │ -_5_6_1 void _s_e_t_B_e_g_i_n(_D_A_I _b_e_g_i_n) │ │ │ │ │ -562 { │ │ │ │ │ -563 _begin = _b_e_g_i_n; │ │ │ │ │ -564 } │ │ │ │ │ -565 │ │ │ │ │ -_5_6_7 int _s_h_i_f_t_m_a_p_p_i_n_g(const std::bitset& shift) const │ │ │ │ │ -568 { │ │ │ │ │ -569 return _shiftmapping[shift.to_ulong()]; │ │ │ │ │ -570 } │ │ │ │ │ -571 │ │ │ │ │ -_5_7_3 _D_A_I _d_a_t_a_B_e_g_i_n() const │ │ │ │ │ -574 { │ │ │ │ │ -575 return _begin; │ │ │ │ │ -576 } │ │ │ │ │ -577 │ │ │ │ │ -_5_7_9 _D_A_I _d_a_t_a_E_n_d() const │ │ │ │ │ -580 { │ │ │ │ │ -581 return _end; │ │ │ │ │ -582 } │ │ │ │ │ -583 │ │ │ │ │ -_5_8_5 bool _i_n_s_i_d_e(const _i_T_u_p_e_l& coord, const std::bitset& shift = std:: │ │ │ │ │ -bitset()) const │ │ │ │ │ -586 { │ │ │ │ │ -587 return (_begin+_shiftmapping[shift.to_ulong()])->inside(coord); │ │ │ │ │ -588 } │ │ │ │ │ -589 │ │ │ │ │ -_5_9_3 class _I_t_e_r_a_t_o_r │ │ │ │ │ -594 { │ │ │ │ │ -595 public: │ │ │ │ │ -596 │ │ │ │ │ -_5_9_8 _I_t_e_r_a_t_o_r () = default; │ │ │ │ │ -599 │ │ │ │ │ -_6_0_1 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>& yg, const std::array& coords, │ │ │ │ │ -int _w_h_i_c_h = 0) │ │ │ │ │ -602 : _which(_w_h_i_c_h), _yg(&yg) │ │ │ │ │ -603 { │ │ │ │ │ -604 _it = typename _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r(*(_yg->dataBegin │ │ │ │ │ -()+_w_h_i_c_h),coords); │ │ │ │ │ -605 } │ │ │ │ │ -606 │ │ │ │ │ -_6_0_8 _I_t_e_r_a_t_o_r (const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>& yg, bool _e_n_d=false) : _yg(&yg) │ │ │ │ │ -609 { │ │ │ │ │ -610 if (_e_n_d) │ │ │ │ │ -611 { │ │ │ │ │ -612 _it = _yg->_itends.back(); │ │ │ │ │ -613 _which = _yg->_itends.size() - 1; │ │ │ │ │ -614 } │ │ │ │ │ -615 else │ │ │ │ │ -616 { │ │ │ │ │ -617 _it = _yg->_itbegins[0]; │ │ │ │ │ -618 _which = 0; │ │ │ │ │ -619 } │ │ │ │ │ -620 } │ │ │ │ │ -621 │ │ │ │ │ -_6_2_3 void _r_e_i_n_i_t(const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>& yg, const std::array& │ │ │ │ │ -coords, int _w_h_i_c_h = 0) │ │ │ │ │ -624 { │ │ │ │ │ -625 _yg = &yg; │ │ │ │ │ -626 _which = _w_h_i_c_h; │ │ │ │ │ -627 _it = typename _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r(*(_yg->dataBegin │ │ │ │ │ -()+_w_h_i_c_h),coords); │ │ │ │ │ -628 } │ │ │ │ │ -629 │ │ │ │ │ -_6_3_1 int _c_o_o_r_d (int i) const │ │ │ │ │ -632 { │ │ │ │ │ -633 return _it._c_o_o_r_d(i); │ │ │ │ │ -634 } │ │ │ │ │ -635 │ │ │ │ │ -_6_3_7 const std::array& _c_o_o_r_d () const │ │ │ │ │ -638 { │ │ │ │ │ -639 return _it._c_o_o_r_d(); │ │ │ │ │ -640 } │ │ │ │ │ -641 │ │ │ │ │ -_6_4_2 typename Coordinates::ctype _l_o_w_e_r_l_e_f_t(int i) const │ │ │ │ │ -643 { │ │ │ │ │ -644 return _it._l_o_w_e_r_l_e_f_t(i); │ │ │ │ │ -645 } │ │ │ │ │ -646 │ │ │ │ │ -_6_4_7 Dune::FieldVector _l_o_w_e_r_l_e_f_t() const │ │ │ │ │ -648 { │ │ │ │ │ -649 return _it._l_o_w_e_r_l_e_f_t(); │ │ │ │ │ -650 } │ │ │ │ │ -651 │ │ │ │ │ -_6_5_2 typename Coordinates::ctype _u_p_p_e_r_r_i_g_h_t(int i) const │ │ │ │ │ -653 { │ │ │ │ │ -654 return _it._u_p_p_e_r_r_i_g_h_t(i); │ │ │ │ │ -655 } │ │ │ │ │ -656 │ │ │ │ │ -_6_5_7 Dune::FieldVector _u_p_p_e_r_r_i_g_h_t() const │ │ │ │ │ -658 { │ │ │ │ │ -659 return _it._u_p_p_e_r_r_i_g_h_t(); │ │ │ │ │ -660 } │ │ │ │ │ -661 │ │ │ │ │ -_6_6_3 typename Coordinates::ctype _m_e_s_h_s_i_z_e (int i) const │ │ │ │ │ -664 { │ │ │ │ │ -665 return _it._m_e_s_h_s_i_z_e(i); │ │ │ │ │ -666 } │ │ │ │ │ -667 │ │ │ │ │ -_6_6_9 Dune::FieldVector _m_e_s_h_s_i_z_e() const │ │ │ │ │ -670 { │ │ │ │ │ -671 return _it._m_e_s_h_s_i_z_e(); │ │ │ │ │ -672 } │ │ │ │ │ -673 │ │ │ │ │ -_6_7_5 bool _s_h_i_f_t (int i) const │ │ │ │ │ -676 { │ │ │ │ │ -677 return _it._s_h_i_f_t(i); │ │ │ │ │ -678 } │ │ │ │ │ -679 │ │ │ │ │ -_6_8_1 std::bitset _s_h_i_f_t () const │ │ │ │ │ -682 { │ │ │ │ │ -683 return _it._s_h_i_f_t(); │ │ │ │ │ -684 } │ │ │ │ │ -685 │ │ │ │ │ -_6_8_7 int _s_u_p_e_r_i_n_d_e_x() const │ │ │ │ │ -688 { │ │ │ │ │ -689 // the offset of the current component has to be taken into account │ │ │ │ │ -690 return _yg->_indexOffset[_which] + _it._s_u_p_e_r_i_n_d_e_x(); │ │ │ │ │ -691 } │ │ │ │ │ -692 │ │ │ │ │ -_6_9_4 _I_t_e_r_a_t_o_r& _o_p_e_r_a_t_o_r_+_+_ () │ │ │ │ │ -695 { │ │ │ │ │ -696 if ((++_it == _yg->_itends[_which]) && (_which < _yg->_itends.size()-1)) │ │ │ │ │ -697 _it = _yg->_itbegins[++_which]; │ │ │ │ │ -698 return *this; │ │ │ │ │ -699 } │ │ │ │ │ -700 │ │ │ │ │ -_7_0_2 bool _o_p_e_r_a_t_o_r_=_=(const _I_t_e_r_a_t_o_r& i) const │ │ │ │ │ -703 { │ │ │ │ │ -704 if (_which != i._which) │ │ │ │ │ -705 return false; │ │ │ │ │ -706 return _it == i._it; │ │ │ │ │ -707 } │ │ │ │ │ -708 │ │ │ │ │ -_7_1_0 bool _o_p_e_r_a_t_o_r_!_=(const _I_t_e_r_a_t_o_r& i) const │ │ │ │ │ -711 { │ │ │ │ │ -712 if (_it != i._it) │ │ │ │ │ -713 return true; │ │ │ │ │ -714 return _which != i._which; │ │ │ │ │ -715 } │ │ │ │ │ -716 │ │ │ │ │ -_7_1_8 int _w_h_i_c_h() const │ │ │ │ │ -719 { │ │ │ │ │ -720 return _which; │ │ │ │ │ -721 } │ │ │ │ │ -722 │ │ │ │ │ -_7_2_4 void _m_o_v_e(int i, int dist) │ │ │ │ │ -725 { │ │ │ │ │ -726 _it._m_o_v_e(i,dist); │ │ │ │ │ -727 } │ │ │ │ │ -728 │ │ │ │ │ -_7_2_9 void _m_o_v_e(const _i_T_u_p_e_l& dist) │ │ │ │ │ -730 { │ │ │ │ │ -731 _it._m_o_v_e(dist); │ │ │ │ │ -732 } │ │ │ │ │ -733 │ │ │ │ │ -_7_3_4 Coordinates* _c_o_o_r_d_C_o_n_t() const │ │ │ │ │ -735 { │ │ │ │ │ -736 return _it._c_o_o_r_d_C_o_n_t(); │ │ │ │ │ -737 } │ │ │ │ │ -738 │ │ │ │ │ -739 │ │ │ │ │ -740 private: │ │ │ │ │ -741 unsigned int _which = 0; │ │ │ │ │ -742 const _Y_G_r_i_d_<_C_o_o_r_d_i_n_a_t_e_s_>* _yg = nullptr; │ │ │ │ │ -743 typename _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>_:_:_I_t_e_r_a_t_o_r _it; │ │ │ │ │ -744 }; │ │ │ │ │ -745 │ │ │ │ │ -_7_4_7 _I_t_e_r_a_t_o_r _b_e_g_i_n() const │ │ │ │ │ -748 { │ │ │ │ │ -749 return _I_t_e_r_a_t_o_r(*this); │ │ │ │ │ -750 } │ │ │ │ │ -751 │ │ │ │ │ -_7_5_3 _I_t_e_r_a_t_o_r _b_e_g_i_n(const std::array& coord, int which = 0) const │ │ │ │ │ -754 { │ │ │ │ │ -755 return _I_t_e_r_a_t_o_r(*this, coord, which); │ │ │ │ │ -756 } │ │ │ │ │ -757 │ │ │ │ │ -_7_5_9 _I_t_e_r_a_t_o_r _e_n_d() const │ │ │ │ │ -760 { │ │ │ │ │ -761 return _I_t_e_r_a_t_o_r(*this,true); │ │ │ │ │ -762 } │ │ │ │ │ -763 │ │ │ │ │ -_7_6_4 int _s_u_p_e_r_i_n_d_e_x(const _i_T_u_p_e_l& coord, int which) const │ │ │ │ │ -765 { │ │ │ │ │ -766 return _indexOffset[which] + (_d_a_t_a_B_e_g_i_n()+which)->_s_u_p_e_r_i_n_d_e_x(coord); │ │ │ │ │ -767 } │ │ │ │ │ -768 │ │ │ │ │ -769 │ │ │ │ │ -770 // finalize the ygrid construction by storing component iterators │ │ │ │ │ -_7_7_1 void _f_i_n_a_l_i_z_e(const _D_A_I& _e_n_d, int artificialOffset = 0) │ │ │ │ │ -772 { │ │ │ │ │ -773 // set the end iterator in the ygrid component array │ │ │ │ │ -774 _end = _e_n_d; │ │ │ │ │ -775 │ │ │ │ │ -776 _indexOffset.push_back(artificialOffset); │ │ │ │ │ -777 int k = 0; │ │ │ │ │ -778 for (_D_A_I i=_begin; i != _end; ++i, ++k) │ │ │ │ │ -779 { │ │ │ │ │ -780 //store begin and end iterators │ │ │ │ │ -781 _itbegins.push_back(i->begin()); │ │ │ │ │ -782 _itends.push_back(i->end()); │ │ │ │ │ -783 │ │ │ │ │ -784 // store index offset │ │ │ │ │ -785 _indexOffset.push_back(_indexOffset.back() + i->totalsize()); │ │ │ │ │ -786 │ │ │ │ │ -787 // store shift to component mapping │ │ │ │ │ -788 _shiftmapping[i->shift().to_ulong()] = k; │ │ │ │ │ -789 } │ │ │ │ │ -790 _indexOffset.resize(_itends.size()); │ │ │ │ │ -791 } │ │ │ │ │ -792 │ │ │ │ │ -793 private: │ │ │ │ │ -794 │ │ │ │ │ -_7_9_5 friend class _Y_G_r_i_d::_I_t_e_r_a_t_o_r; │ │ │ │ │ -796 _D_A_I _begin; │ │ │ │ │ -797 _D_A_I _end; │ │ │ │ │ -798 std::array _shiftmapping; │ │ │ │ │ -799 std::vector::Iterator> _itbegins; │ │ │ │ │ -800 std::vector::Iterator> _itends; │ │ │ │ │ -801 std::vector _indexOffset; │ │ │ │ │ -802 }; │ │ │ │ │ -803 │ │ │ │ │ -805 template │ │ │ │ │ -_8_0_6 inline std::ostream& operator<< (std::ostream& s, const YGrid& │ │ │ │ │ -e) │ │ │ │ │ -807 { │ │ │ │ │ -808 s << "Printing YGrid structure:" << std::endl; │ │ │ │ │ -809 for (auto it = e.dataBegin(); it != e.dataEnd(); ++it) │ │ │ │ │ -810 s << *it << std::endl; │ │ │ │ │ -811 return s; │ │ │ │ │ -812 } │ │ │ │ │ -813 │ │ │ │ │ -821 template │ │ │ │ │ -_8_2_2 class YGridList │ │ │ │ │ -823 { │ │ │ │ │ -824 public: │ │ │ │ │ -_8_2_5 static const int dim = Coordinates::dimension; │ │ │ │ │ -826 │ │ │ │ │ -_8_2_8 struct Intersection │ │ │ │ │ -829 { │ │ │ │ │ -_8_3_1 YGridComponent grid; │ │ │ │ │ -_8_3_3 int rank; │ │ │ │ │ -_8_3_5 int distance; │ │ │ │ │ -_8_3_7 YGrid yg; │ │ │ │ │ -838 }; │ │ │ │ │ -839 │ │ │ │ │ -840 // define data array iterator type │ │ │ │ │ -_8_4_1 typedef typename std::array, Dune::power(2,dim)>:: │ │ │ │ │ -iterator DAI; │ │ │ │ │ -842 │ │ │ │ │ -843 // iterator that allows to iterate over a concatenation of deques. namely │ │ │ │ │ -those │ │ │ │ │ -844 // that belong to the same codimension. │ │ │ │ │ -_8_4_5 class Iterator │ │ │ │ │ -846 { │ │ │ │ │ -847 public: │ │ │ │ │ -848 │ │ │ │ │ -_8_5_0 Iterator(const YGridList& ygl, bool end=false) : _end │ │ │ │ │ -(ygl.dataEnd()), _which(ygl.dataBegin()) │ │ │ │ │ -851 { │ │ │ │ │ -852 _it = _which->begin(); │ │ │ │ │ -853 │ │ │ │ │ -854 // advance the iterator to the first element that exists. │ │ │ │ │ -855 // some deques might be empty and should be skipped │ │ │ │ │ -856 while ((_which != _end) && (_it == _which->end())) │ │ │ │ │ -857 { │ │ │ │ │ -858 ++_which; │ │ │ │ │ -859 if (_which != _end) │ │ │ │ │ -860 _it = _which->begin(); │ │ │ │ │ -861 } │ │ │ │ │ -862 // the iterator is at the end if and only if _which==_end │ │ │ │ │ -863 if (end) │ │ │ │ │ -864 { │ │ │ │ │ -865 _which = _end; │ │ │ │ │ -866 } │ │ │ │ │ -867 } │ │ │ │ │ -868 │ │ │ │ │ -_8_7_0 Iterator& operator++ () │ │ │ │ │ -871 { │ │ │ │ │ -872 ++_it; │ │ │ │ │ -873 // advance the iterator to the next element that exists. │ │ │ │ │ -874 // some deques might be empty and should be skipped │ │ │ │ │ -875 while ((_which != _end) && (_it == _which->end())) │ │ │ │ │ -876 { │ │ │ │ │ -877 ++_which; │ │ │ │ │ -878 if (_which != _end) │ │ │ │ │ -879 _it = _which->begin(); │ │ │ │ │ -880 } │ │ │ │ │ -881 return *this; │ │ │ │ │ -882 } │ │ │ │ │ -883 │ │ │ │ │ -_8_8_5 typename std::deque::iterator operator->() const │ │ │ │ │ -886 { │ │ │ │ │ -887 return _it; │ │ │ │ │ -888 } │ │ │ │ │ -889 │ │ │ │ │ -_8_9_1 typename std::deque::iterator operator*() const │ │ │ │ │ -892 { │ │ │ │ │ -893 return _it; │ │ │ │ │ -894 } │ │ │ │ │ -895 │ │ │ │ │ -_8_9_7 bool operator== (const Iterator& i) const │ │ │ │ │ -898 { │ │ │ │ │ -899 if (_which != i._which) │ │ │ │ │ -900 return false; │ │ │ │ │ -901 if (_which == _end) │ │ │ │ │ -902 return true; │ │ │ │ │ -903 return _it == i._it; │ │ │ │ │ -904 } │ │ │ │ │ -905 │ │ │ │ │ -_9_0_7 bool operator!= (const Iterator& i) const │ │ │ │ │ -908 { │ │ │ │ │ -909 if (_which != i._which) │ │ │ │ │ -910 return true; │ │ │ │ │ -911 if (_which == _end) │ │ │ │ │ -912 return false; │ │ │ │ │ -913 return _it != i._it; │ │ │ │ │ -914 } │ │ │ │ │ -915 │ │ │ │ │ -916 private: │ │ │ │ │ -917 typename std::deque::iterator _it; │ │ │ │ │ -918 DAI _end; │ │ │ │ │ -919 DAI _which; │ │ │ │ │ -920 }; │ │ │ │ │ -921 │ │ │ │ │ -_9_2_3 Iterator begin() const │ │ │ │ │ -924 { │ │ │ │ │ -925 return Iterator(*this); │ │ │ │ │ -926 } │ │ │ │ │ -927 │ │ │ │ │ -_9_2_9 Iterator end() const │ │ │ │ │ -930 { │ │ │ │ │ -931 return Iterator(*this,true); │ │ │ │ │ -932 } │ │ │ │ │ -933 │ │ │ │ │ -_9_3_5 void setBegin(typename std::array, Dune::power │ │ │ │ │ -(2,dim)>::iterator begin) │ │ │ │ │ -936 { │ │ │ │ │ -937 _begin = begin; │ │ │ │ │ -938 } │ │ │ │ │ -939 │ │ │ │ │ -_9_4_1 DAI dataBegin() const │ │ │ │ │ -942 { │ │ │ │ │ -943 return _begin; │ │ │ │ │ -944 } │ │ │ │ │ -945 │ │ │ │ │ -_9_4_7 DAI dataEnd() const │ │ │ │ │ -948 { │ │ │ │ │ -949 return _end; │ │ │ │ │ -950 } │ │ │ │ │ -951 │ │ │ │ │ -_9_5_3 int size() const │ │ │ │ │ -954 { │ │ │ │ │ -955 int count = 0; │ │ │ │ │ -956 for (DAI it = _begin; it != _end; ++it) │ │ │ │ │ -957 count += it->size(); │ │ │ │ │ -958 return count; │ │ │ │ │ -959 } │ │ │ │ │ -960 │ │ │ │ │ -_9_6_2 void finalize(DAI end, const YGrid& ygrid) │ │ │ │ │ -963 { │ │ │ │ │ -964 // Instead of directly iterating over the intersection deques, this code │ │ │ │ │ -965 // iterates over the components of an associated ygrid and works its way │ │ │ │ │ -966 // through the list of intersection deques in parallel. │ │ │ │ │ -967 // The reason for this convoluted iteration technique is that there are not │ │ │ │ │ -968 // necessarily intersections for all possible shifts, but we have to make │ │ │ │ │ -969 // sure that we stop at each shift to update the per-component index shift. │ │ │ │ │ -970 // This is ensured by iterating over the ygrid, which is guaranteed to have │ │ │ │ │ -971 // a component for each shift vector. │ │ │ │ │ -972 │ │ │ │ │ -973 // set end iterator in the data array │ │ │ │ │ -974 _end = end; │ │ │ │ │ -975 │ │ │ │ │ -977 int offset = 0; │ │ │ │ │ -978 │ │ │ │ │ -979 DAI i = _begin; │ │ │ │ │ -980 │ │ │ │ │ -981 // make sure that we have a valid deque (i.e. a non-empty one) │ │ │ │ │ -982 while (i != _end && i->begin() == i->end()) │ │ │ │ │ -983 ++i; │ │ │ │ │ -984 │ │ │ │ │ -985 for (auto yit = ygrid.dataBegin(); yit != ygrid.dataEnd(); ++yit) │ │ │ │ │ -986 { │ │ │ │ │ -987 if (i == _end) │ │ │ │ │ -988 break; │ │ │ │ │ -989 auto it = i->_b_e_g_i_n(); │ │ │ │ │ -990 if (it->grid.shift() == yit->shift()) │ │ │ │ │ -991 { │ │ │ │ │ -992 // iterate over the intersections in the deque and set the offset │ │ │ │ │ -993 for (; it != i->end(); ++it) │ │ │ │ │ -994 { │ │ │ │ │ -995 it->yg.setBegin(&(it->grid)); │ │ │ │ │ -996 it->yg.finalize(&(it->grid)+1, offset); │ │ │ │ │ -997 } │ │ │ │ │ -998 │ │ │ │ │ -999 // advance to next non-empty deque │ │ │ │ │ -1000 ++i; │ │ │ │ │ -1001 while (i != _end && i->begin() == i->end()) │ │ │ │ │ -1002 ++i; │ │ │ │ │ -1003 } │ │ │ │ │ -1004 │ │ │ │ │ -1005 // update the offset from the ygrid component │ │ │ │ │ -1006 int add = 1; │ │ │ │ │ -1007 for (int j=0; j<_d_i_m; j++) │ │ │ │ │ -1008 add *= yit->supersize(j); │ │ │ │ │ -1009 offset += add; │ │ │ │ │ -1010 } │ │ │ │ │ -1011 assert (i == end); │ │ │ │ │ -1012 } │ │ │ │ │ -1013 │ │ │ │ │ -1014 private: │ │ │ │ │ -1015 DAI _begin; │ │ │ │ │ -1016 DAI _end; │ │ │ │ │ -1017 }; │ │ │ │ │ -1018 │ │ │ │ │ -1019} // namespace Dune │ │ │ │ │ -1020 │ │ │ │ │ -1021#endif │ │ │ │ │ +474 // compile the full neighbor list │ │ │ │ │ +475 CommPartner cp; │ │ │ │ │ +476 _i_T_u_p_e_l delta; │ │ │ │ │ +477 │ │ │ │ │ +478 std::fill(delta.begin(), delta.end(), -1); │ │ │ │ │ +479 bool ready = false; │ │ │ │ │ +480 _i_T_u_p_e_l me, nb; │ │ │ │ │ +481 me = _r_a_n_k___t_o___c_o_o_r_d(_comm.rank()); │ │ │ │ │ +482 int index = 0; │ │ │ │ │ +483 int last = _n_e_i_g_h_b_o_r_s()-1; │ │ │ │ │ +484 while (!ready) │ │ │ │ │ +485 { │ │ │ │ │ +486 // find neighbors coordinates │ │ │ │ │ +487 for (int i=0; i _sendlist; │ │ │ │ │ +530 std::deque _recvlist; │ │ │ │ │ +531 │ │ │ │ │ +532 mutable std::vector _sendrequests; │ │ │ │ │ +533 mutable std::vector _recvrequests; │ │ │ │ │ +534 mutable std::vector _localsendrequests; │ │ │ │ │ +535 mutable std::vector _localrecvrequests; │ │ │ │ │ +536 │ │ │ │ │ +537 }; │ │ │ │ │ +538 │ │ │ │ │ +540 template │ │ │ │ │ +_5_4_1 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, const │ │ │ │ │ +_T_o_r_u_s_<_C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_> & t) │ │ │ │ │ +542 { │ │ │ │ │ +543 t._p_r_i_n_t(s); │ │ │ │ │ +544 return s; │ │ │ │ │ +545 } │ │ │ │ │ +546} │ │ │ │ │ +547 │ │ │ │ │ +548#endif │ │ │ │ │ +_p_a_r_t_i_t_i_o_n_i_n_g_._h_h │ │ │ │ │ +This file provides tools to partition YaspGrids. If you want to write your own │ │ │ │ │ +partitioner,... │ │ │ │ │ +_e_x_c_e_p_t_i_o_n_s_._h_h │ │ │ │ │ _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ │ write a PartitionType to a stream │ │ │ │ │ DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_s_i_z_e_A_r_r_a_y │ │ │ │ │ -std::array< int, d > sizeArray(const std::array< std::vector< ct >, d > &v) │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_n_d_e_x │ │ │ │ │ -int index(const iTupel &coord) const │ │ │ │ │ -given a tupel compute its index in the lexicographic numbering │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_f_f_s_e_t │ │ │ │ │ -int offset(int i) const │ │ │ │ │ -Return offset to origin of enclosing grid. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:173 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_T_u_p_e_l │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +a base class for the yaspgrid partitioning strategy │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +virtual void partition(const iTupel &, int, iTupel &, int) const =0 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_T_o_r_u_s │ │ │ │ │ +Torus() │ │ │ │ │ +constructor making uninitialized object │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_l_o_r │ │ │ │ │ +int color(int rank) const │ │ │ │ │ +assign color to given rank │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ +double partition(int rank, iTupel origin_in, iTupel size_in, iTupel │ │ │ │ │ +&origin_out, iTupel &size_out) const │ │ │ │ │ +partition the given grid onto the torus and return the piece of the process │ │ │ │ │ +with given rank; returns ... │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:239 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_d_i_m_s │ │ │ │ │ +int dims(int i) const │ │ │ │ │ +return dimensions of torus in direction i │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_o_r_d │ │ │ │ │ +iTupel coord() const │ │ │ │ │ +return own coordinates │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_r_a_n_k │ │ │ │ │ +int rank() const │ │ │ │ │ +return own rank │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_d_i_m_s │ │ │ │ │ +const iTupel & dims() const │ │ │ │ │ +return dimensions of torus │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_r_a_n_k___r_e_l_a_t_i_v_e │ │ │ │ │ +int rank_relative(int rank, int dir, int cnt) const │ │ │ │ │ +return rank of process where its coordinate in direction dir has offset cnt │ │ │ │ │ +(handles periodic case) │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_r_e_c_v │ │ │ │ │ +void recv(int rank, void *buffer, int size) const │ │ │ │ │ +store a receive request; buffers are received in order; handles also local │ │ │ │ │ +requests with memcpy │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:374 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_s_e_n_d │ │ │ │ │ +void send(int rank, void *buffer, int size) const │ │ │ │ │ +store a send request; buffers are sent in order; handles also local requests │ │ │ │ │ +with memcpy │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:361 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_T_o_r_u_s │ │ │ │ │ +Torus(Communication comm, int tag, iTupel size, int overlap, const Yasp:: │ │ │ │ │ +Partitioning< d > *partitioner) │ │ │ │ │ +make partitioner from communicator and coarse mesh size │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_n_e_i_g_h_b_o_r_s │ │ │ │ │ +int neighbors() const │ │ │ │ │ +return the number of neighbors, which is │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &s) const │ │ │ │ │ +print contents of torus object │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:451 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_g_l_o_b_a_l___m_a_x │ │ │ │ │ +double global_max(double x) const │ │ │ │ │ +global max │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:443 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_m_m │ │ │ │ │ +Communication comm() const │ │ │ │ │ +return communicator │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_l_o_r │ │ │ │ │ +int color(const iTupel &coord) const │ │ │ │ │ +assign color to given coordinate │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_r_e_c_v_e_n_d │ │ │ │ │ +ProcListIterator recvend() const │ │ │ │ │ +last process in receive list │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:355 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_i_s___n_e_i_g_h_b_o_r │ │ │ │ │ +bool is_neighbor(iTupel delta, std::bitset< d > periodic) const │ │ │ │ │ +return true if neighbor with given delta is a neighbor under the given │ │ │ │ │ +periodicity │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:212 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_s_e_n_d_e_n_d │ │ │ │ │ +ProcListIterator sendend() const │ │ │ │ │ +end of send list │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:343 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_p_r_o_c_s │ │ │ │ │ +int procs() const │ │ │ │ │ +return number of processes │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_r_a_n_k___t_o___c_o_o_r_d │ │ │ │ │ +iTupel rank_to_coord(int rank) const │ │ │ │ │ +map rank to coordinate in torus using lexicographic ordering │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_i_T_u_p_e_l │ │ │ │ │ std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_m_o_v_e │ │ │ │ │ -YGridComponent< Coordinates > move(iTupel v) const │ │ │ │ │ -return grid moved by the vector v │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:263 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_i_z_e │ │ │ │ │ -iTupel size() const │ │ │ │ │ -retrun size │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_d │ │ │ │ │ -static const int d │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -YGridComponent< Coordinates > intersection(const YGridComponent< Coordinates > │ │ │ │ │ -&r) const │ │ │ │ │ -Return YGridComponent of supergrid of self which is the intersection of self │ │ │ │ │ -and another YGridCompone... │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_c_t │ │ │ │ │ -Coordinates::ctype ct │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_g_e_t_C_o_o_r_d_s │ │ │ │ │ -Coordinates * getCoords() const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_m_i_n │ │ │ │ │ -int min(int i) const │ │ │ │ │ -Return minimum index in direction i. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:218 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ -YGridComponent(iTupel origin, iTupel size) │ │ │ │ │ -make ygrid without coordinate information │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_t_o_t_a_l_s_i_z_e │ │ │ │ │ -int totalsize() const │ │ │ │ │ -Return total size of index set which is the product of all size per direction. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:209 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ -YGridComponent(iTupel origin, iTupel size, const YGridComponent< Coordinates > │ │ │ │ │ -&enclosing) │ │ │ │ │ -make a subgrid by taking coordinates from a larger grid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_s_i_z_e │ │ │ │ │ -const iTupel & supersize() const │ │ │ │ │ -return size of enclosing grid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ -YGridComponent(iTupel origin, std::bitset< d > shift, Coordinates *coords, │ │ │ │ │ -iTupel size, iTupel offset, iTupel supersize) │ │ │ │ │ -Make YGridComponent by giving all parameters. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ -int superindex(iTupel coord) const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:472 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin() const │ │ │ │ │ -return iterator to first element of index set │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:487 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_f_T_u_p_e_l │ │ │ │ │ -FieldVector< ct, d > fTupel │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin(const iTupel &co) const │ │ │ │ │ -return iterator to given element of index set │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:493 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t │ │ │ │ │ -YGridComponent() │ │ │ │ │ -make uninitialized ygrid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_r_i_g_i_n │ │ │ │ │ -int origin(int i) const │ │ │ │ │ -Return origin in direction i. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_s_i_z_e │ │ │ │ │ -int supersize(int i) const │ │ │ │ │ -return size of enclosing grid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_i_z_e │ │ │ │ │ -int size(int i) const │ │ │ │ │ -return size in direction i │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_m_a_x │ │ │ │ │ -int max(int i) const │ │ │ │ │ -Return maximum index in direction i. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:224 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_h_i_f_t │ │ │ │ │ -const std::bitset< d > & shift() const │ │ │ │ │ -Return shift tupel. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:162 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_u_p_e_r_i_n_c_r_e_m_e_n_t │ │ │ │ │ -int superincrement(int i) const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:481 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_s_h_i_f_t │ │ │ │ │ -bool shift(int i) const │ │ │ │ │ -Return shift in direction i. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:156 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_e_n_d │ │ │ │ │ -Iterator end() const │ │ │ │ │ -return subiterator to last element of index set │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:499 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_i_n_s_i_d_e │ │ │ │ │ -bool inside(const iTupel &coord) const │ │ │ │ │ -given a coordinate, return true if it is in the grid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:241 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_e_m_p_t_y │ │ │ │ │ -bool empty() const │ │ │ │ │ -Return true if YGrid is empty, i.e. has size 0 in all directions. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:230 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_f_f_s_e_t │ │ │ │ │ -const iTupel & offset() const │ │ │ │ │ -Return offset to origin of enclosing grid. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_o_r_i_g_i_n │ │ │ │ │ -const iTupel & origin() const │ │ │ │ │ -return reference to origin │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:298 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ -Iterator & operator++() │ │ │ │ │ -Increment iterator to next cell with position. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:379 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ -int superindex() const │ │ │ │ │ -Return consecutive index in enclosing grid. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:344 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ -bool operator!=(const Iterator &i) const │ │ │ │ │ -Return true when two iterators over the same grid are not equal (!). │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:338 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ -ct lowerleft(int i) const │ │ │ │ │ -Return ith component of lower left corner of the entity associated with the │ │ │ │ │ -current coordinates and s... │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:403 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ -std::bitset< d > shift() const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:455 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator()=default │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -ct meshsize(int i) const │ │ │ │ │ -Return meshsize in direction i. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:436 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ -bool shift(int i) const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:450 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:___g_r_i_d │ │ │ │ │ -const YGridComponent< Coordinates > * _grid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:468 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_r_e_i_n_i_t │ │ │ │ │ -void reinit(const YGridComponent< Coordinates > &r, const iTupel &coord) │ │ │ │ │ -reinitialize iterator to given position │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:317 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ -void move(const iTupel &dist) │ │ │ │ │ -move this iterator dist cells in direction i │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:369 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -fTupel meshsize() const │ │ │ │ │ -Return meshsize of current cell as reference. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:442 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ -fTupel lowerleft() const │ │ │ │ │ -Return lower left corner of the entity associated with the current coordinates │ │ │ │ │ -and shift. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:409 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d_C_o_n_t │ │ │ │ │ -Coordinates * coordCont() const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:460 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:___c_o_o_r_d │ │ │ │ │ -iTupel _coord │ │ │ │ │ -current position in index set │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:466 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ -const iTupel & coord() const │ │ │ │ │ -Return coordinate of the cell as reference (do not modify). │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:356 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ -void move(int i, int dist) │ │ │ │ │ -move this iterator dist cells in direction i │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:362 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator(const YGridComponent< Coordinates > &r) │ │ │ │ │ -Make iterator pointing to first cell in a grid. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:304 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ -ct upperright(int i) const │ │ │ │ │ -Return ith component of upper right corder of the entity associated with the │ │ │ │ │ -current coordinates and ... │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:418 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ -int coord(int i) const │ │ │ │ │ -Return coordinate of the cell in direction i. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:350 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ -fTupel upperright() const │ │ │ │ │ -Return upper right corder of the entity associated with the current coordinates │ │ │ │ │ -and shift. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:427 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(const Iterator &i) const │ │ │ │ │ -Return true when two iterators over the same grid are equal (!). │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:332 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator(const YGridComponent< Coordinates > &r, const iTupel &coord) │ │ │ │ │ -Make iterator pointing to given cell in a grid. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:311 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_:_:_I_t_e_r_a_t_o_r_:_:___s_u_p_e_r_i_n_d_e_x │ │ │ │ │ -int _superindex │ │ │ │ │ -consecutive index in enclosing grid │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:467 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d │ │ │ │ │ -implements a collection of YGridComponents which form a codimension Entities of │ │ │ │ │ -given codimension c n... │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:551 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_s_h_i_f_t_m_a_p_p_i_n_g │ │ │ │ │ -int shiftmapping(const std::bitset< dim > &shift) const │ │ │ │ │ -get which component belongs to a given shift vector │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:567 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_d_a_t_a_B_e_g_i_n │ │ │ │ │ -DAI dataBegin() const │ │ │ │ │ -get start iterator in the data array │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:573 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin() const │ │ │ │ │ -return begin iterator for the codimension and partition the ygrid represents │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:747 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_d_a_t_a_E_n_d │ │ │ │ │ -DAI dataEnd() const │ │ │ │ │ -get end iterator in the data array │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:579 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, dim > iTupel │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:558 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_d_i_m │ │ │ │ │ -static const int dim │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:553 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_s_e_t_B_e_g_i_n │ │ │ │ │ -void setBegin(DAI begin) │ │ │ │ │ -set start iterator in the data array │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:561 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_i_n_s_i_d_e │ │ │ │ │ -bool inside(const iTupel &coord, const std::bitset< dim > &shift=std::bitset< │ │ │ │ │ -dim >()) const │ │ │ │ │ -decide whether a coordinate is in the grid (depending on the component) │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:585 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ -int superindex(const iTupel &coord, int which) const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:764 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin(const std::array< int, dim > &coord, int which=0) const │ │ │ │ │ -return iterator pointint to a specified position │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:753 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_D_A_I │ │ │ │ │ -YGridComponent< Coordinates > * DAI │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:556 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_f_i_n_a_l_i_z_e │ │ │ │ │ -void finalize(const DAI &end, int artificialOffset=0) │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:771 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_e_n_d │ │ │ │ │ -Iterator end() const │ │ │ │ │ -return end iterator for the codimension and partition the ygrid represents │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:759 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity │ │ │ │ │ -in YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:594 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator()=default │ │ │ │ │ -default constructor │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_w_h_i_c_h │ │ │ │ │ -int which() const │ │ │ │ │ -return the current component number │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:718 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ -void move(int i, int dist) │ │ │ │ │ -move the grid, this is only done and needed for codim 0 │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:724 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(const Iterator &i) const │ │ │ │ │ -compare two iterators: component has to match │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:702 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ -Coordinates::ctype lowerleft(int i) const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:642 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -Dune::FieldVector< typename Coordinates::ctype, dim > meshsize() const │ │ │ │ │ -return the current meshsize vector │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:669 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator(const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, │ │ │ │ │ -int which=0) │ │ │ │ │ -construct an iterator from coordinates and component │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:601 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d_C_o_n_t │ │ │ │ │ -Coordinates * coordCont() const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:734 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ -Coordinates::ctype upperright(int i) const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:652 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ -std::bitset< dim > shift() const │ │ │ │ │ -return the shift vector │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:681 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_s_h_i_f_t │ │ │ │ │ -bool shift(int i) const │ │ │ │ │ -return the shift in direction i │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:675 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ -bool operator!=(const Iterator &i) const │ │ │ │ │ -compare two iterators: component has to match │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:710 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_o_v_e │ │ │ │ │ -void move(const iTupel &dist) │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:729 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_u_p_p_e_r_r_i_g_h_t │ │ │ │ │ -Dune::FieldVector< typename Coordinates::ctype, dim > upperright() const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:657 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ -const std::array< int, dim > & coord() const │ │ │ │ │ -return coordinate array at the current position │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:637 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ -Iterator & operator++() │ │ │ │ │ -increment to the next entity jumping to next component if necessary │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:694 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ -Coordinates::ctype meshsize(int i) const │ │ │ │ │ -return the current meshsize in direction i │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:663 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_c_o_o_r_d │ │ │ │ │ -int coord(int i) const │ │ │ │ │ -return coordinate at the current position (direction i) │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:631 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator(const YGrid< Coordinates > &yg, bool end=false) │ │ │ │ │ -create an iterator to start or end of the codimension │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:608 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_l_o_w_e_r_l_e_f_t │ │ │ │ │ -Dune::FieldVector< typename Coordinates::ctype, dim > lowerleft() const │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:647 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_s_u_p_e_r_i_n_d_e_x │ │ │ │ │ -int superindex() const │ │ │ │ │ -return the superindex │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:687 │ │ │ │ │ -_D_u_n_e_:_:_Y_G_r_i_d_:_:_I_t_e_r_a_t_o_r_:_:_r_e_i_n_i_t │ │ │ │ │ -void reinit(const YGrid< Coordinates > &yg, const std::array< int, dim > │ │ │ │ │ -&coords, int which=0) │ │ │ │ │ -reinitializes an iterator, as if it was just constructed. │ │ │ │ │ -DDeeffiinniittiioonn ygrid.hh:623 │ │ │ │ │ +type used to pass tupels in and out │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_s_e_n_d_b_e_g_i_n │ │ │ │ │ +ProcListIterator sendbegin() const │ │ │ │ │ +first process in send list │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:337 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_e_x_c_h_a_n_g_e │ │ │ │ │ +void exchange() const │ │ │ │ │ +exchange messages stored in request buffers; clear request buffers afterwards │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_r_e_c_v_b_e_g_i_n │ │ │ │ │ +ProcListIterator recvbegin() const │ │ │ │ │ +first process in receive list │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:349 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_o_r_d___t_o___r_a_n_k │ │ │ │ │ +int coord_to_rank(iTupel coord) const │ │ │ │ │ +map coordinate in torus to rank using lexicographic ordering │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_i_n_s_i_d_e │ │ │ │ │ +bool inside(iTupel c) const │ │ │ │ │ +return true if coordinate is inside torus │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_t_a_g │ │ │ │ │ +int tag() const │ │ │ │ │ +return tag used by torus │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:276 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_d_e_l_t_a │ │ │ │ │ +iTupel delta() const │ │ │ │ │ +return distance vector │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:291 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(const ProcListIterator &iter) const │ │ │ │ │ +Return true when two iterators point to same member. │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:313 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ +bool operator!=(const ProcListIterator &iter) const │ │ │ │ │ +Return true when two iterators do not point to same member. │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:320 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_r_a_n_k │ │ │ │ │ +int rank() const │ │ │ │ │ +return rank of neighboring process │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +ProcListIterator(typename std::deque< CommPartner >::const_iterator iter) │ │ │ │ │ +make an iterator │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:279 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ +ProcListIterator & operator++() │ │ │ │ │ +Increment iterator to next cell. │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:326 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_i_n_d_e_x │ │ │ │ │ +int index() const │ │ │ │ │ +return index in proclist │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:297 │ │ │ │ │ +_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_d_i_s_t_a_n_c_e │ │ │ │ │ +int distance() const │ │ │ │ │ +return 1-norm of distance vector │ │ │ │ │ +DDeeffiinniittiioonn torus.hh:303 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00191.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridpersistentcontainer.hh File Reference │ │ │ │ +dune-grid: yaspgrididset.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,44 +72,32 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridpersistentcontainer.hh File Reference
│ │ │ │ +
yaspgrididset.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Specialization of the PersistentContainer for YaspGrid. │ │ │ │ -More...

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │ -#include <dune/grid/utility/persistentcontainervector.hh>
│ │ │ │ -#include "../yaspgrid.hh"
│ │ │ │ -
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspPersistentContainerIndex< Grid >
 
class  Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >
 Specialization of the PersistentContainer for YaspGrid. More...
class  Dune::YaspGlobalIdSet< GridImp >
 persistent, globally unique Ids More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Specialization of the PersistentContainer for YaspGrid.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,19 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridpersistentcontainer.hh File Reference │ │ │ │ │ -Specialization of the PersistentContainer for YaspGrid. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_v_e_c_t_o_r_._h_h> │ │ │ │ │ -#include "_._._/_y_a_s_p_g_r_i_d_._h_h" │ │ │ │ │ +yaspgrididset.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_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_<_ _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _> │ │ │ │ │ -  Specialization of the _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  persistent, globally unique Ids _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Specialization of the PersistentContainer for YaspGrid. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridpersistentcontainer.hh Source File │ │ │ │ +dune-grid: yaspgrididset.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,153 +74,88 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridpersistentcontainer.hh
│ │ │ │ +
yaspgrididset.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ │
7
│ │ │ │ -
12#include <cassert>
│ │ │ │ -
13#include <vector>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ -
17#include "../yaspgrid.hh"
│ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21
│ │ │ │ -
33 template<typename Grid>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {
│ │ │ │ -
36
│ │ │ │ -
37 public:
│ │ │ │ -
│ │ │ │ -
38 YaspPersistentContainerIndex(const Grid & grid, int codim)
│ │ │ │ -
39 : _grid(grid), _codim(codim)
│ │ │ │ -
40 {
│ │ │ │ -
41 recomputeOffsets();
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
45 typedef std::size_t IndexType;
│ │ │ │ -
46
│ │ │ │ -
48 template<class Entity>
│ │ │ │ -
│ │ │ │ -
49 IndexType index (const Entity& e) const
│ │ │ │ -
50 {
│ │ │ │ -
51 static const int cc = Entity::codimension;
│ │ │ │ -
52 std::size_t level = e.level();
│ │ │ │ -
53 return _grid.indexsets[level]->template index<cc>(e) + _offsets[level];
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
57 template< class Entity >
│ │ │ │ -
│ │ │ │ -
58 IndexType subIndex ( const Entity &e, int i, unsigned int codim ) const
│ │ │ │ -
59 {
│ │ │ │ -
60
│ │ │ │ -
61 static const int cc = Entity::codimension;
│ │ │ │ -
62 std::size_t level = e.level();
│ │ │ │ -
63 return _grid.indexsets[level]->template subIndex<cc>(e,i,codim) + _offsets[level];
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
67 std::size_t size (int /* codim */) const
│ │ │ │ -
68 {
│ │ │ │ -
69 if (_grid.indexsets.size()+1 != _offsets.size())
│ │ │ │ -
70 recomputeOffsets();
│ │ │ │ -
71 return _offsets.back();
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74 private:
│ │ │ │ -
75 void recomputeOffsets() const
│ │ │ │ -
76 {
│ │ │ │ -
77 _offsets.resize(_grid.indexsets.size()+1,0);
│ │ │ │ -
78 _offsets[0] = 0;
│ │ │ │ -
79 for (std::size_t i=0; i<_grid.indexsets.size(); i++)
│ │ │ │ -
80 _offsets[i+1] = _offsets[i] + _grid.indexsets[i]->size(_codim);
│ │ │ │ -
81 }
│ │ │ │ -
82
│ │ │ │ -
83 const Grid& _grid;
│ │ │ │ -
84 int _codim;
│ │ │ │ -
85 mutable std::vector<std::size_t> _offsets;
│ │ │ │ -
86 };
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
94 template<int dim, class CoordCont, class T>
│ │ │ │ -
│ │ │ │ -
95 class PersistentContainer< YaspGrid<dim, CoordCont>, T >
│ │ │ │ -
96 /* We have to pass the reference to the IndexSet to the constructor
│ │ │ │ -
97 of the PersistentContainerVector. In order to have a valid
│ │ │ │ -
98 indexset available, we inherit from a private indexset
│ │ │ │ -
99 */
│ │ │ │ -
100 : private YaspPersistentContainerIndex< const YaspGrid<dim, CoordCont> >,
│ │ │ │ -
101 public PersistentContainerVector< YaspGrid<dim, CoordCont>,
│ │ │ │ -
102 YaspPersistentContainerIndex< const YaspGrid<dim, CoordCont> >,
│ │ │ │ -
103 std::vector<T> >
│ │ │ │ -
104 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
107
│ │ │ │ -
108 public:
│ │ │ │ -
109 typedef typename Base::Grid Grid;
│ │ │ │ -
110 typedef typename Base::Value Value;
│ │ │ │ -
111
│ │ │ │ -
112 using Base::size;
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
114 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
│ │ │ │ -
115 : IndexSet(grid, codim),
│ │ │ │ -
116 Base(*this, codim, value)
│ │ │ │ -
117 {}
│ │ │ │ -
│ │ │ │ -
118 };
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120} // end namespace Dune
│ │ │ │ -
121
│ │ │ │ -
122#endif // end DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ - │ │ │ │ +
8
│ │ │ │ +
9namespace Dune {
│ │ │ │ +
10
│ │ │ │ +
11 //========================================================================
│ │ │ │ +
16 //========================================================================
│ │ │ │ +
17
│ │ │ │ +
18 template<class GridImp>
│ │ │ │ +
│ │ │ │ +
19 class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
│ │ │ │ +
20 typename std::remove_const<GridImp>::type::PersistentIndexType >
│ │ │ │ +
21 /*
│ │ │ │ +
22 We used the remove_const to extract the Type from the mutable class,
│ │ │ │ +
23 because the const class is not instantiated yet.
│ │ │ │ +
24 */
│ │ │ │ +
25 {
│ │ │ │ + │ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
30 typedef typename std::remove_const<GridImp>::type::PersistentIndexType IdType;
│ │ │ │ +
31
│ │ │ │ +
32 using IdSet<GridImp, This, IdType>::subId;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
39 /*
│ │ │ │ +
40 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
41 because the const class is not instantiated yet.
│ │ │ │ +
42 */
│ │ │ │ +
43 template<int cd>
│ │ │ │ +
│ │ │ │ +
44 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ +
45 {
│ │ │ │ +
46 return e.impl().persistentIndex();
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
50 /*
│ │ │ │ +
51 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
52 because the const class is not instantiated yet.
│ │ │ │ +
53 */
│ │ │ │ +
│ │ │ │ +
54 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
│ │ │ │ +
55 int i, unsigned int codim ) const
│ │ │ │ +
56 {
│ │ │ │ +
57 return e.impl().subPersistentIndex(i,codim);
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
60 };
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
62} // namespace Dune
│ │ │ │ +
63
│ │ │ │ +
64#endif // DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
int level() const
The level of this entity.
Definition common/entity.hh:124
│ │ │ │ -
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
int size(int level, int codim) const
Return number of grid entities of a given codim on a given level in this process.
Definition common/grid.hh:552
│ │ │ │ -
A class for storing data during an adaptation cycle.
Definition utility/persistentcontainer.hh:22
│ │ │ │ -
Base::Value Value
Definition utility/persistentcontainer.hh:27
│ │ │ │ -
const Grid & grid() const
Definition persistentcontainermap.hh:114
│ │ │ │ -
Size size() const
Definition persistentcontainermap.hh:85
│ │ │ │ -
vector-based implementation of the PersistentContainer
Definition persistentcontainervector.hh:51
│ │ │ │ -
Vector::value_type Value
Definition persistentcontainervector.hh:57
│ │ │ │ -
G Grid
Definition persistentcontainervector.hh:55
│ │ │ │ -
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ -
Definition yaspgridpersistentcontainer.hh:35
│ │ │ │ -
IndexType index(const Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition yaspgridpersistentcontainer.hh:49
│ │ │ │ -
std::size_t size(int) const
Return total number of entities of given geometry type in entity set .
Definition yaspgridpersistentcontainer.hh:67
│ │ │ │ -
IndexType subIndex(const Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition yaspgridpersistentcontainer.hh:58
│ │ │ │ -
YaspPersistentContainerIndex(const Grid &grid, int codim)
Definition yaspgridpersistentcontainer.hh:38
│ │ │ │ -
std::size_t IndexType
The type used for the indices.
Definition yaspgridpersistentcontainer.hh:45
│ │ │ │ -
Base::Grid Grid
Definition yaspgridpersistentcontainer.hh:109
│ │ │ │ -
Base::Value Value
Definition yaspgridpersistentcontainer.hh:110
│ │ │ │ -
PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
Definition yaspgridpersistentcontainer.hh:114
│ │ │ │ - │ │ │ │ +
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ +
persistent, globally unique Ids
Definition yaspgrididset.hh:25
│ │ │ │ +
IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
get id of subentity
Definition yaspgrididset.hh:54
│ │ │ │ +
std::remove_const< GridImp >::type::PersistentIndexType IdType
define the type used for persistent indices
Definition yaspgrididset.hh:30
│ │ │ │ +
YaspGlobalIdSet()
Only default-constructible.
Definition yaspgrididset.hh:35
│ │ │ │ +
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition yaspgrididset.hh:44
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,193 +1,98 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridpersistentcontainer.hh │ │ │ │ │ +yaspgrididset.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_v_e_c_t_o_r_._h_h> │ │ │ │ │ -17#include "../yaspgrid.hh" │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 │ │ │ │ │ -33 template │ │ │ │ │ -_3_4 class _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x │ │ │ │ │ -35 { │ │ │ │ │ -36 │ │ │ │ │ -37 public: │ │ │ │ │ -_3_8 _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x(const _G_r_i_d & grid, int codim) │ │ │ │ │ -39 : _grid(grid), _codim(codim) │ │ │ │ │ -40 { │ │ │ │ │ -41 recomputeOffsets(); │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_5 typedef std::size_t _I_n_d_e_x_T_y_p_e; │ │ │ │ │ -46 │ │ │ │ │ -48 template │ │ │ │ │ -_4_9 _I_n_d_e_x_T_y_p_e _i_n_d_e_x (const _E_n_t_i_t_y& e) const │ │ │ │ │ -50 { │ │ │ │ │ -51 static const int cc = _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -52 std::size_t level = e._l_e_v_e_l(); │ │ │ │ │ -53 return _grid.indexsets[level]->template index(e) + _offsets[level]; │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -57 template< class Entity > │ │ │ │ │ -_5_8 _I_n_d_e_x_T_y_p_e _s_u_b_I_n_d_e_x ( const _E_n_t_i_t_y &e, int i, unsigned int codim ) const │ │ │ │ │ -59 { │ │ │ │ │ -60 │ │ │ │ │ -61 static const int cc = _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -62 std::size_t level = e._l_e_v_e_l(); │ │ │ │ │ -63 return _grid.indexsets[level]->template subIndex(e,i,codim) + _offsets │ │ │ │ │ -[level]; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_7 std::size_t _s_i_z_e (int /* codim */) const │ │ │ │ │ -68 { │ │ │ │ │ -69 if (_grid.indexsets._s_i_z_e()+1 != _offsets.size()) │ │ │ │ │ -70 recomputeOffsets(); │ │ │ │ │ -71 return _offsets.back(); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -74 private: │ │ │ │ │ -75 void recomputeOffsets() const │ │ │ │ │ -76 { │ │ │ │ │ -77 _offsets.resize(_grid.indexsets._s_i_z_e()+1,0); │ │ │ │ │ -78 _offsets[0] = 0; │ │ │ │ │ -79 for (std::size_t i=0; i<_grid.indexsets._s_i_z_e(); i++) │ │ │ │ │ -80 _offsets[i+1] = _offsets[i] + _grid.indexsets[i]->_s_i_z_e(_codim); │ │ │ │ │ -81 } │ │ │ │ │ -82 │ │ │ │ │ -83 const Grid& _grid; │ │ │ │ │ -84 int _codim; │ │ │ │ │ -85 mutable std::vector _offsets; │ │ │ │ │ -86 }; │ │ │ │ │ -87 │ │ │ │ │ -94 template │ │ │ │ │ -_9_5 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r< _Y_a_s_p_G_r_i_d, T > │ │ │ │ │ -96 /* We have to pass the reference to the IndexSet to the constructor │ │ │ │ │ -97 of the PersistentContainerVector. In order to have a valid │ │ │ │ │ -98 indexset available, we inherit from a private indexset │ │ │ │ │ -99 */ │ │ │ │ │ -100 : private _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x< const YaspGrid >, │ │ │ │ │ -101 public _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r< YaspGrid, │ │ │ │ │ -102 YaspPersistentContainerIndex< const YaspGrid >, │ │ │ │ │ -103 std::vector > │ │ │ │ │ -104 { │ │ │ │ │ -105 typedef _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_<_ _c_o_n_s_t_ _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _C_o_o_r_d_C_o_n_t_> > │ │ │ │ │ -_I_n_d_e_x_S_e_t; │ │ │ │ │ -106 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _C_o_o_r_d_C_o_n_t_>, _I_n_d_e_x_S_e_t, │ │ │ │ │ -std::vector > _B_a_s_e; │ │ │ │ │ -107 │ │ │ │ │ -108 public: │ │ │ │ │ -_1_0_9 typedef typename _B_a_s_e_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ -_1_1_0 typedef typename _B_a_s_e_:_:_V_a_l_u_e _V_a_l_u_e; │ │ │ │ │ -111 │ │ │ │ │ -112 using _B_a_s_e_:_:_s_i_z_e; │ │ │ │ │ -113 │ │ │ │ │ -_1_1_4 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r ( const _G_r_i_d &_g_r_i_d, int codim, const _V_a_l_u_e &value = │ │ │ │ │ -_V_a_l_u_e() ) │ │ │ │ │ -115 : _I_n_d_e_x_S_e_t(_g_r_i_d, codim), │ │ │ │ │ -116 _B_a_s_e(*this, codim, value) │ │ │ │ │ -117 {} │ │ │ │ │ -118 }; │ │ │ │ │ -119 │ │ │ │ │ -120} // end namespace Dune │ │ │ │ │ -121 │ │ │ │ │ -122#endif // end DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH │ │ │ │ │ -_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_v_e_c_t_o_r_._h_h │ │ │ │ │ +8 │ │ │ │ │ +9namespace _D_u_n_e { │ │ │ │ │ +10 │ │ │ │ │ +11 //======================================================================== │ │ │ │ │ +16 //======================================================================== │ │ │ │ │ +17 │ │ │ │ │ +18 template │ │ │ │ │ +_1_9 class _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t : public _I_d_S_e_t, │ │ │ │ │ +20 typename std::remove_const::type::PersistentIndexType > │ │ │ │ │ +21 /* │ │ │ │ │ +22 We used the remove_const to extract the Type from the mutable class, │ │ │ │ │ +23 because the const class is not instantiated yet. │ │ │ │ │ +24 */ │ │ │ │ │ +25 { │ │ │ │ │ +26 typedef _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +_3_0 typedef typename std::remove_const::type::PersistentIndexType │ │ │ │ │ +_I_d_T_y_p_e; │ │ │ │ │ +31 │ │ │ │ │ +32 using _I_d_S_e_t_:_:_s_u_b_I_d; │ │ │ │ │ +33 │ │ │ │ │ +_3_5 _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t() │ │ │ │ │ +36 {} │ │ │ │ │ +37 │ │ │ │ │ +39 /* │ │ │ │ │ +40 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +41 because the const class is not instantiated yet. │ │ │ │ │ +42 */ │ │ │ │ │ +43 template │ │ │ │ │ +_4_4 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits::template │ │ │ │ │ +Codim::Entity& e) const │ │ │ │ │ +45 { │ │ │ │ │ +46 return e.impl().persistentIndex(); │ │ │ │ │ +47 } │ │ │ │ │ +48 │ │ │ │ │ +50 /* │ │ │ │ │ +51 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +52 because the const class is not instantiated yet. │ │ │ │ │ +53 */ │ │ │ │ │ +_5_4 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim< 0 >::Entity &e, │ │ │ │ │ +55 int i, unsigned int codim ) const │ │ │ │ │ +56 { │ │ │ │ │ +57 return e.impl().subPersistentIndex(i,codim); │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +60 }; │ │ │ │ │ +61 │ │ │ │ │ +62} // namespace Dune │ │ │ │ │ +63 │ │ │ │ │ +64#endif // DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -The level of this entity. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -Know your own codimension. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_s_i_z_e │ │ │ │ │ -int size(int level, int codim) const │ │ │ │ │ -Return number of grid entities of a given codim on a given level in this │ │ │ │ │ -process. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:552 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r │ │ │ │ │ -A class for storing data during an adaptation cycle. │ │ │ │ │ -DDeeffiinniittiioonn utility/persistentcontainer.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_:_:_V_a_l_u_e │ │ │ │ │ -Base::Value Value │ │ │ │ │ -DDeeffiinniittiioonn utility/persistentcontainer.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _G_:_:_L_o_c_a_l_I_d_S_e_t_,_ _s_t_d_:_:_m_a_p_<_ _G_:_:_L_o_c_a_l_I_d_S_e_t_:_: │ │ │ │ │ -_I_d_T_y_p_e_,_ _T_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_i_z_e │ │ │ │ │ -Size size() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ -vector-based implementation of the PersistentContainer │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ -Vector::value_type Value │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ -[ provides Dune::Grid ] │ │ │ │ │ -DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ │ -IndexType index(const Entity &e) const │ │ │ │ │ -Map entity to index. The result of calling this method with an entity that is │ │ │ │ │ -not in the index set is... │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(int) const │ │ │ │ │ -Return total number of entities of given geometry type in entity set . │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -IndexType subIndex(const Entity &e, int i, unsigned int codim) const │ │ │ │ │ -Map a subentity to an index. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x │ │ │ │ │ -YaspPersistentContainerIndex(const Grid &grid, int codim) │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_I_n_d_e_x_T_y_p_e │ │ │ │ │ -std::size_t IndexType │ │ │ │ │ -The type used for the indices. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _>_:_:_G_r_i_d │ │ │ │ │ -Base::Grid Grid │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _>_:_:_V_a_l_u_e │ │ │ │ │ -Base::Value Value │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _>_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r │ │ │ │ │ -PersistentContainer(const Grid &grid, int codim, const Value &value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:114 │ │ │ │ │ -_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ +Id Set Interface. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +persistent, globally unique Ids │ │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ +IdType subId(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ +template Codim< 0 >::Entity &e, int i, unsigned int codim) const │ │ │ │ │ +get id of subentity │ │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ +std::remove_const< GridImp >::type::PersistentIndexType IdType │ │ │ │ │ +define the type used for persistent indices │ │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +YaspGlobalIdSet() │ │ │ │ │ +Only default-constructible. │ │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ │ +IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ │ +Codim< cd >::Entity &e) const │ │ │ │ │ +get id of an entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:44 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridhierarchiciterator.hh File Reference │ │ │ │ +dune-grid: yaspgridentity.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,35 +72,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridhierarchiciterator.hh File Reference
│ │ │ │ +
yaspgridentity.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ +

the YaspEntity class and its specializations │ │ │ │ +More...

│ │ │ │ +
#include <dune/common/math.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspHierarchicIterator< GridImp >
 YaspHierarchicIterator enables iteration over son entities of codim 0. More...
class  Dune::YaspEntity< codim, dim, GridImp >
 
class  Dune::YaspEntity< 0, dim, GridImp >
 
struct  Dune::YaspEntity< 0, dim, GridImp >::Codim< cd >
 
class  Dune::YaspEntity< dim, dim, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Yasp
 
│ │ │ │

Detailed Description

│ │ │ │ -

The YaspHierarchicIterator class

│ │ │ │ -

Enables iteration over son entities of codim 0

│ │ │ │ +

the YaspEntity class and its specializations

│ │ │ │ +

YaspEntity realizes the concept a mesh entity.

│ │ │ │ +

We have specializations for

    │ │ │ │ +
  • codim==0 (elements), because they have an extended interface
  • │ │ │ │ +
  • codim==dim (vertices), because they use a special constructor of the AxisAlignedCubeGeometry and are the only entities in a globally refined grid, that may also exist on another level.
  • │ │ │ │ +
│ │ │ │ +

The general version implements all other codimensions.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,23 +2,38 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridhierarchiciterator.hh File Reference │ │ │ │ │ +yaspgridentity.hh File Reference │ │ │ │ │ +the YaspEntity class and its specializations _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r enables iteration over son entities of codim 0. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ +  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspHierarchicIterator class │ │ │ │ │ -Enables iteration over son entities of codim 0 │ │ │ │ │ +the YaspEntity class and its specializations │ │ │ │ │ +YaspEntity realizes the concept a mesh entity. │ │ │ │ │ +We have specializations for │ │ │ │ │ + * codim==0 (elements), because they have an extended interface │ │ │ │ │ + * codim==dim (vertices), because they use a special constructor of the │ │ │ │ │ + AxisAlignedCubeGeometry and are the only entities in a globally refined │ │ │ │ │ + grid, that may also exist on another level. │ │ │ │ │ +The general version implements all other codimensions. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridhierarchiciterator.hh Source File │ │ │ │ +dune-grid: yaspgridentity.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,181 +74,1090 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridhierarchiciterator.hh
│ │ │ │ +
yaspgridentity.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDENTITY_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDENTITY_HH
│ │ │ │
7
│ │ │ │ -
14namespace Dune {
│ │ │ │ -
15
│ │ │ │ -
18 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
20 {
│ │ │ │ -
21 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
22
│ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
25 public:
│ │ │ │ -
26 // types used from grids
│ │ │ │ -
27 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ -
28 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ -
29 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
8#include <dune/common/math.hh>
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │ +
10
│ │ │ │ +
24//========================================================================
│ │ │ │ +
25
│ │ │ │ +
26
│ │ │ │ +
27
│ │ │ │ +
28
│ │ │ │ +
29namespace Dune {
│ │ │ │
30
│ │ │ │ -
32 YaspHierarchicIterator () : _entity(), _maxlevel(-1), stack() {}
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 YaspHierarchicIterator (const YGLI& g, const I& it, int maxlevel) :
│ │ │ │ -
36 _entity(YaspEntity<0, dim, GridImp>(g,it))
│ │ │ │ -
37 {
│ │ │ │ -
38 // store reference to entity implementation for better readability
│ │ │ │ -
39 YaspEntityImp& entity = _entity.impl();
│ │ │ │ -
40 // now iterator points to current cell
│ │ │ │ -
41 StackElem se(entity._g);
│ │ │ │ -
42 std::copy(entity._it.coord().begin(), entity._it.coord().end(), se.coord.begin());
│ │ │ │ -
43 stack.push(se);
│ │ │ │ -
44
│ │ │ │ -
45 // determine maximum level
│ │ │ │ -
46 _maxlevel = std::min(maxlevel,entity._g->mg->maxLevel());
│ │ │ │ -
47
│ │ │ │ -
48 // if maxlevel not reached then push yourself and sons
│ │ │ │ -
49 if (entity._g->level()<_maxlevel)
│ │ │ │ -
50 {
│ │ │ │ -
51 push_sons();
│ │ │ │ -
52 }
│ │ │ │ -
53
│ │ │ │ -
54 // and make iterator point to first son if stack is not empty
│ │ │ │ -
55 if (!stack.empty())
│ │ │ │ -
56 pop_tos();
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 void increment ()
│ │ │ │ -
61 {
│ │ │ │ -
62 // sanity check: do nothing when stack is empty
│ │ │ │ -
63 if (stack.empty()) return;
│ │ │ │ -
64
│ │ │ │ -
65 // if maxlevel not reached then push sons
│ │ │ │ -
66 if (_entity.impl()._g->level()<_maxlevel)
│ │ │ │ -
67 push_sons();
│ │ │ │ -
68
│ │ │ │ -
69 // in any case pop one element
│ │ │ │ -
70 pop_tos();
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ +
31 namespace Yasp {
│ │ │ │ +
32
│ │ │ │ +
33#ifndef DOXYGEN
│ │ │ │ +
34
│ │ │ │ +
35 // table for quick evaluation of binomial coefficients
│ │ │ │ +
36 template<int n>
│ │ │ │ +
37 struct BinomialTable
│ │ │ │ +
38 {
│ │ │ │ +
39 // evaluation - note that in general d!=n, n is only the
│ │ │ │ +
40 // maximum value of d (in our case dimworld)
│ │ │ │ +
41 static constexpr int evaluate(int d, int c)
│ │ │ │ +
42 {
│ │ │ │ +
43 return _values[_offsets[d] + c];
│ │ │ │ +
44 }
│ │ │ │ +
45
│ │ │ │ +
46 // the actual implementation
│ │ │ │ +
47 [[deprecated("Use binomial from dune-common's math.hh")]]
│ │ │ │ +
48 static constexpr int binomial(int d, int c)
│ │ │ │ +
49 {
│ │ │ │ +
50 long binomial=1;
│ │ │ │ +
51 for (int i=d-c+1; i<=d; i++)
│ │ │ │ +
52 binomial *= i;
│ │ │ │ +
53 for (long i=2; i<=c; i++)
│ │ │ │ +
54 binomial /= i;
│ │ │ │ +
55 return binomial;
│ │ │ │ +
56 }
│ │ │ │ +
57
│ │ │ │ +
58 private:
│ │ │ │ +
59 // prevent construction
│ │ │ │ +
60 BinomialTable() = delete;
│ │ │ │ +
61
│ │ │ │ +
62 // compute binomial(r, c) and advance row `r` and column `c`
│ │ │ │ +
63 static constexpr int nextValue(int& r, int& c)
│ │ │ │ +
64 {
│ │ │ │ +
65 const auto result = Dune::binomial(r, c);
│ │ │ │ +
66
│ │ │ │ +
67 c += 1;
│ │ │ │ +
68 if (c > r) {
│ │ │ │ +
69 r += 1;
│ │ │ │ +
70 c = 0;
│ │ │ │ +
71 }
│ │ │ │
72
│ │ │ │ -
│ │ │ │ -
74 bool equals (const YaspHierarchicIterator& rhs) const
│ │ │ │ -
75 {
│ │ │ │ -
76 return (_entity == rhs._entity);
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ -
80 const Entity& dereference() const
│ │ │ │ -
81 {
│ │ │ │ -
82 return _entity;
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
85 void print (std::ostream& s) const
│ │ │ │ -
86 {
│ │ │ │ -
87 // store reference to entity implementation for better readability
│ │ │ │ -
88 YaspEntityImp& entity = _entity.impl();
│ │ │ │ -
89 s << "HIER: " << "level=" << entity._g.level()
│ │ │ │ -
90 << " position=" << entity._it.coord()
│ │ │ │ -
91 << " superindex=" << entity._it.superindex()
│ │ │ │ -
92 << " maxlevel=" << entity._maxlevel
│ │ │ │ -
93 << " stacksize=" << stack.size()
│ │ │ │ -
94 << std::endl;
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97 private:
│ │ │ │ -
98 Entity _entity;
│ │ │ │ -
99
│ │ │ │ -
100 int _maxlevel;
│ │ │ │ -
101
│ │ │ │ -
102 struct StackElem {
│ │ │ │ -
103 YGLI g; // grid level of the element
│ │ │ │ -
104 std::array<int,dim> coord; // and the coordinates
│ │ │ │ -
105 StackElem(YGLI gg) : g(gg) {}
│ │ │ │ -
106 };
│ │ │ │ -
107 std::stack<StackElem> stack;
│ │ │ │ -
108
│ │ │ │ -
109 // push sons of current element on the stack
│ │ │ │ -
110 void push_sons ()
│ │ │ │ -
111 {
│ │ │ │ -
112 // store reference to entity implementation for better readability
│ │ │ │ -
113 YaspEntityImp& entity = _entity.impl();
│ │ │ │ -
114
│ │ │ │ -
115 // yes, process all 1<<dim sons
│ │ │ │ -
116 YGLI finer = entity._g;
│ │ │ │ -
117 ++finer;
│ │ │ │ -
118 StackElem se(finer);
│ │ │ │ -
119 for (int i=0; i<(1<<dim); i++)
│ │ │ │ -
120 {
│ │ │ │ -
121 for (int k=0; k<dim; k++)
│ │ │ │ -
122 if (i&(1<<k))
│ │ │ │ -
123 se.coord[k] = entity._it.coord(k)*2+1;
│ │ │ │ -
124 else
│ │ │ │ -
125 se.coord[k] = entity._it.coord(k)*2;
│ │ │ │ -
126 // not all entities have 2^d subentities due to refineOptions with keep_ovlp==false
│ │ │ │ -
127 bool exists = true;
│ │ │ │ -
128 for (int k=0; k<dim; k++)
│ │ │ │ -
129 if ((se.coord[k] < finer->overlap[0].dataBegin()->origin(k)) || (se.coord[k] >= finer->overlap[0].dataBegin()->origin(k)+finer->overlap[0].dataBegin()->size(k)))
│ │ │ │ -
130 exists = false;
│ │ │ │ -
131 if (exists)
│ │ │ │ -
132 stack.push(se);
│ │ │ │ -
133 }
│ │ │ │ -
134 }
│ │ │ │ -
135
│ │ │ │ -
136 // make TOS the current element
│ │ │ │ -
137 void pop_tos ()
│ │ │ │ -
138 {
│ │ │ │ -
139 StackElem se = stack.top();
│ │ │ │ -
140 stack.pop();
│ │ │ │ -
141 YaspEntityImp& entity = _entity.impl();
│ │ │ │ -
142 entity._g = se.g;
│ │ │ │ -
143 entity._it.reinit(entity._g->overlap[0],se.coord);
│ │ │ │ -
144 }
│ │ │ │ -
145 };
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
147} // namespace Dune
│ │ │ │ -
148
│ │ │ │ -
149#endif // DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │ +
73 return result;
│ │ │ │ +
74 }
│ │ │ │ +
75
│ │ │ │ +
76 template<std::size_t... I>
│ │ │ │ +
77 static constexpr std::array<int, sizeof...(I)> computeValues(std::index_sequence<I...>)
│ │ │ │ +
78 {
│ │ │ │ +
79 int r = 0, c = 0;
│ │ │ │ +
80 return {{ ((void)I, nextValue(r, c))... }};
│ │ │ │ +
81 }
│ │ │ │ +
82
│ │ │ │ +
83 template<std::size_t... I>
│ │ │ │ +
84 static constexpr std::array<int, sizeof...(I)> computeOffsets(std::index_sequence<I...>)
│ │ │ │ +
85 { return {{ (I*(I+1)/2)... }}; }
│ │ │ │ +
86
│ │ │ │ +
87 static constexpr std::array<int,(n+1)*(n+2)/2> _values = computeValues(std::make_index_sequence<(n+1)*(n+2)/2>{});
│ │ │ │ +
88 static constexpr std::array<int,n+1> _offsets = computeOffsets(std::make_index_sequence<n+1>{});
│ │ │ │ +
89 };
│ │ │ │ +
90
│ │ │ │ +
91#if __cplusplus < 201703L
│ │ │ │ +
92 template<int n>
│ │ │ │ +
93 constexpr std::array<int,(n+1)*(n+2)/2> BinomialTable<n>::_values;
│ │ │ │ +
94 template<int n>
│ │ │ │ +
95 constexpr std::array<int,n+1> BinomialTable<n>::_offsets;
│ │ │ │ +
96#endif
│ │ │ │ +
97
│ │ │ │ +
104 template<int dimworld>
│ │ │ │ +
105 constexpr int subEnt(int d, int c)
│ │ │ │ +
106 {
│ │ │ │ +
107 return (d < c ? 0 : BinomialTable<dimworld>::evaluate(d,c) << c);
│ │ │ │ +
108 }
│ │ │ │ +
109
│ │ │ │ +
110 // Make a table mapping all subentities of a codim 0 entity to a value.
│ │ │ │ +
111 // F is the functor to be evaluated.
│ │ │ │ +
112 template<typename F, int dim>
│ │ │ │ +
113 struct EntityShiftTable
│ │ │ │ +
114 {
│ │ │ │ +
115 typedef std::bitset<dim> value_type;
│ │ │ │ +
116
│ │ │ │ +
117 static value_type evaluate(int i, int codim)
│ │ │ │ +
118 {
│ │ │ │ +
119 return {_values[_offsets[codim] + i]};
│ │ │ │ +
120 }
│ │ │ │ +
121
│ │ │ │ +
122 private:
│ │ │ │ +
123
│ │ │ │ +
124 // prevent construction
│ │ │ │ +
125 EntityShiftTable() = delete;
│ │ │ │ +
126
│ │ │ │ +
127 // compute offset of codimension `codim` entities and advance `offset`
│ │ │ │ +
128 static constexpr int nextOffset(int& offset, int codim)
│ │ │ │ +
129 {
│ │ │ │ +
130 if (codim == 0) {
│ │ │ │ +
131 offset = 0;
│ │ │ │ +
132 return 0;
│ │ │ │ +
133 }
│ │ │ │ +
134
│ │ │ │ +
135 offset += subEnt<dim>(dim, codim-1);
│ │ │ │ +
136 return offset;
│ │ │ │ +
137 }
│ │ │ │ +
138
│ │ │ │ +
139 template<std::size_t... I>
│ │ │ │ +
140 static constexpr std::array<int, sizeof...(I)> computeOffsets(std::index_sequence<I...>)
│ │ │ │ +
141 {
│ │ │ │ +
142 int offset = 0;
│ │ │ │ +
143 return {{ (nextOffset(offset, I))... }};
│ │ │ │ +
144 }
│ │ │ │ +
145
│ │ │ │ +
146 // compute shift table entry for (`codim`, `i`) and advance `codim`, `i`
│ │ │ │ +
147 static constexpr unsigned char nextValue(int& codim, int& i)
│ │ │ │ +
148 {
│ │ │ │ +
149 const auto result = F::evaluate(i, codim);
│ │ │ │ +
150
│ │ │ │ +
151 i += 1;
│ │ │ │ +
152 if (i >= subEnt<dim>(dim, codim)) {
│ │ │ │ +
153 codim += 1;
│ │ │ │ +
154 i = 0;
│ │ │ │ +
155 }
│ │ │ │ +
156
│ │ │ │ +
157 return result;
│ │ │ │ +
158 }
│ │ │ │ +
159
│ │ │ │ +
160 template<std::size_t... I>
│ │ │ │ +
161 static constexpr std::array<unsigned char, sizeof...(I)> computeValues(std::index_sequence<I...>)
│ │ │ │ +
162 {
│ │ │ │ +
163 int codim = 0, i = 0;
│ │ │ │ +
164 return {{ ((void)I, nextValue(codim, i))... }};
│ │ │ │ +
165 }
│ │ │ │ +
166
│ │ │ │ +
167 static constexpr std::array<int,dim+1> _offsets = computeOffsets(std::make_index_sequence<dim+1>{});
│ │ │ │ +
168 static constexpr std::array<unsigned char,Dune::power(3,dim)> _values = computeValues(std::make_index_sequence<Dune::power(3,dim)>{});
│ │ │ │ +
169
│ │ │ │ +
170 };
│ │ │ │ +
171
│ │ │ │ +
172#if __cplusplus < 201703L
│ │ │ │ +
173 template<typename F, int dim>
│ │ │ │ +
174 constexpr std::array<int,dim+1> EntityShiftTable<F, dim>::_offsets;
│ │ │ │ +
175 template<typename F, int dim>
│ │ │ │ +
176 constexpr std::array<unsigned char,Dune::power(3,dim)> EntityShiftTable<F, dim>::_values;
│ │ │ │ +
177#endif
│ │ │ │ +
178
│ │ │ │ +
179 // functor for doing the actual entity shift calculation
│ │ │ │ +
180 template<int dim>
│ │ │ │ +
181 struct calculate_entity_shift
│ │ │ │ +
182 {
│ │ │ │ +
183 static constexpr unsigned long long evaluate(int index, int cc)
│ │ │ │ +
184 {
│ │ │ │ +
185 auto result = 0ull;
│ │ │ │ +
186 for (int d = dim; d>0; d--)
│ │ │ │ +
187 {
│ │ │ │ +
188 if (cc == d)
│ │ │ │ +
189 return result;
│ │ │ │ +
190 if (index < subEnt<dim>(d-1,cc))
│ │ │ │ +
191 result |= 1ull << (d-1);
│ │ │ │ +
192 else
│ │ │ │ +
193 {
│ │ │ │ +
194 index = (index - subEnt<dim>(d-1, cc)) % subEnt<dim>(d-1,cc-1);
│ │ │ │ +
195 cc--;
│ │ │ │ +
196 }
│ │ │ │ +
197 }
│ │ │ │ +
198 return result;
│ │ │ │ +
199 }
│ │ │ │ +
200 };
│ │ │ │ +
201
│ │ │ │ +
210 template<int dim>
│ │ │ │ +
211 std::bitset<dim> entityShift(int index, int cc)
│ │ │ │ +
212 {
│ │ │ │ +
213 return EntityShiftTable<calculate_entity_shift<dim>,dim>::evaluate(index,cc);
│ │ │ │ +
214 }
│ │ │ │ +
215
│ │ │ │ +
216 // functor for doing the actual entity move calculation
│ │ │ │ +
217 template<int dim>
│ │ │ │ +
218 struct calculate_entity_move
│ │ │ │ +
219 {
│ │ │ │ +
220 static constexpr unsigned long long evaluate(int index, int cc)
│ │ │ │ +
221 {
│ │ │ │ +
222 auto result = 0ull;
│ │ │ │ +
223 for (int d = dim; d>0; d--)
│ │ │ │ +
224 {
│ │ │ │ +
225 if (d == cc)
│ │ │ │ +
226 {
│ │ │ │ +
227 // result[d-1] = index & (1<<(d-1));
│ │ │ │ +
228 result &= ~(1ull << (d-1));
│ │ │ │ +
229 result |= index & (1ull << (d-1));
│ │ │ │ +
230
│ │ │ │ +
231 index &= ~(1<<(d-1));
│ │ │ │ +
232 }
│ │ │ │ +
233 if (index >= subEnt<dim>(d-1,cc))
│ │ │ │ +
234 {
│ │ │ │ +
235 if ((index - subEnt<dim>(d-1,cc)) / subEnt<dim>(d-1,cc-1) == 1)
│ │ │ │ +
236 {
│ │ │ │ +
237 result |= 1ull << (d-1);
│ │ │ │ +
238 }
│ │ │ │ +
239 index = (index - subEnt<dim>(d-1, cc)) % subEnt<dim>(d-1,cc-1);
│ │ │ │ +
240 cc--;
│ │ │ │ +
241 }
│ │ │ │ +
242 }
│ │ │ │ +
243 return result;
│ │ │ │ +
244 }
│ │ │ │ +
245
│ │ │ │ +
246 };
│ │ │ │ +
247
│ │ │ │ +
255 template<int dim>
│ │ │ │ +
256 std::bitset<dim> entityMove(int index, int cc)
│ │ │ │ +
257 {
│ │ │ │ +
258 return EntityShiftTable<calculate_entity_move<dim>,dim>::evaluate(index,cc);
│ │ │ │ +
259 }
│ │ │ │ +
260
│ │ │ │ +
261#endif //DOXYGEN
│ │ │ │ +
262
│ │ │ │ +
263 } // namespace Yasp.
│ │ │ │ +
264
│ │ │ │ +
265 template<int codim, int dim, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
267 : public EntityDefaultImplementation <codim,dim,GridImp,YaspEntity>
│ │ │ │ +
268 {
│ │ │ │ +
269
│ │ │ │ +
270 template<int, PartitionIteratorType, typename>
│ │ │ │ +
271 friend class YaspLevelIterator;
│ │ │ │ +
272
│ │ │ │ +
273 public:
│ │ │ │ +
274 typedef typename GridImp::ctype ctype;
│ │ │ │ +
275
│ │ │ │ +
276 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
│ │ │ │ +
277 typedef typename GridImp::Traits::template Codim<codim>::GeometryImpl GeometryImpl;
│ │ │ │ +
278
│ │ │ │ +
279 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
│ │ │ │ +
280
│ │ │ │ +
│ │ │ │ +
282 int level () const
│ │ │ │ +
283 {
│ │ │ │ +
284 return _g->level();
│ │ │ │ +
285 }
│ │ │ │ +
│ │ │ │ +
286
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
291 {
│ │ │ │ +
292 return EntitySeed(YaspEntitySeed<codim,GridImp>(_g->level(), _it.coord(), _it.which()));
│ │ │ │ +
293 }
│ │ │ │ +
│ │ │ │ +
294
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
297 {
│ │ │ │ +
298 GeometryImpl _geometry(_it.lowerleft(),_it.upperright(),_it.shift());
│ │ │ │ +
299 return Geometry(_geometry);
│ │ │ │ +
300 }
│ │ │ │ +
│ │ │ │ +
301
│ │ │ │ +
│ │ │ │ +
305 constexpr GeometryType type () const
│ │ │ │ +
306 {
│ │ │ │ +
307 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ +
308 }
│ │ │ │ +
│ │ │ │ +
309
│ │ │ │ +
│ │ │ │ +
314 unsigned int subEntities (unsigned int cc) const
│ │ │ │ +
315 {
│ │ │ │ +
316 return Dune::Yasp::subEnt<dim>(dim-codim,cc-codim);
│ │ │ │ +
317 }
│ │ │ │ +
│ │ │ │ +
318
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
321 {
│ │ │ │ +
322 if (_g->interior[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
323 return InteriorEntity;
│ │ │ │ +
324 if (_g->interiorborder[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
325 return BorderEntity;
│ │ │ │ +
326 if (_g->overlap[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
327 return OverlapEntity;
│ │ │ │ +
328 if (_g->overlapfront[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
329 return FrontEntity;
│ │ │ │ +
330 return GhostEntity;
│ │ │ │ +
331 }
│ │ │ │ +
│ │ │ │ +
332
│ │ │ │ +
333 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
334 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
336 {}
│ │ │ │ +
│ │ │ │ +
337
│ │ │ │ +
│ │ │ │ +
338 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ +
339 : _it(it), _g(g)
│ │ │ │ +
340 {}
│ │ │ │ +
│ │ │ │ +
341
│ │ │ │ +
│ │ │ │ +
342 YaspEntity (YGLI&& g, const I&& it)
│ │ │ │ +
343 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ +
344 {}
│ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
347 bool equals (const YaspEntity& e) const
│ │ │ │ +
348 {
│ │ │ │ +
349 return _it == e._it && _g == e._g;
│ │ │ │ +
350 }
│ │ │ │ +
351
│ │ │ │ +
352 // IndexSets needs access to the private index methods
│ │ │ │ +
353 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ +
354 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ +
355 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ +
356 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ +
357
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
360 {
│ │ │ │ +
361 // get size of global grid (in elements)
│ │ │ │ +
362 std::array<int,dim> size;
│ │ │ │ +
363
│ │ │ │ +
364 for (int i=0; i<dim; i++)
│ │ │ │ +
365 {
│ │ │ │ +
366 // correct size according to shift
│ │ │ │ +
367 size[i] = _g->mg->levelSize(_g->level(), i);
│ │ │ │ +
368 if (!_it.shift(i))
│ │ │ │ +
369 size[i]++;
│ │ │ │ +
370 }
│ │ │ │ +
371
│ │ │ │ +
372 // encode codim
│ │ │ │ +
373 PersistentIndexType id(_it.shift().to_ulong());
│ │ │ │ +
374
│ │ │ │ +
375 // encode level
│ │ │ │ +
376 id = id << yaspgrid_level_bits;
│ │ │ │ +
377 id = id+PersistentIndexType(_g->level());
│ │ │ │ +
378
│ │ │ │ +
379 // encode coordinates
│ │ │ │ +
380 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
381 {
│ │ │ │ +
382 id = id << yaspgrid_dim_bits;
│ │ │ │ +
383 id = id+PersistentIndexType(_it.coord(i));
│ │ │ │ +
384 }
│ │ │ │ +
385
│ │ │ │ +
386 return id;
│ │ │ │ +
387 }
│ │ │ │ +
│ │ │ │ +
388
│ │ │ │ +
│ │ │ │ +
390 int compressedIndex () const
│ │ │ │ +
391 {
│ │ │ │ +
392 return _it.superindex();
│ │ │ │ +
393 }
│ │ │ │ +
│ │ │ │ +
394
│ │ │ │ +
│ │ │ │ +
396 int subCompressedIndex (int i, unsigned int cc) const
│ │ │ │ +
397 {
│ │ │ │ +
398 // get the shift of the entity and the subentity
│ │ │ │ +
399 // the subentity shift is only available in the space spanned by the entity
│ │ │ │ +
400 std::bitset<dim-codim> subent_shift = Dune::Yasp::entityShift<dim-codim>(i,cc-codim);
│ │ │ │ +
401 std::bitset<dim-codim> subent_move = Dune::Yasp::entityMove<dim-codim>(i,cc-codim);
│ │ │ │ +
402
│ │ │ │ +
403 std::bitset<dim> shift = _it.shift();
│ │ │ │ +
404 std::array<int, dim> coord = _it.coord();
│ │ │ │ +
405 for (int j=0, k=0; j<dim; j++)
│ │ │ │ +
406 {
│ │ │ │ +
407 if (!shift[j])
│ │ │ │ +
408 continue;
│ │ │ │ +
409
│ │ │ │ +
410 coord[j] += subent_move[k];
│ │ │ │ +
411 shift[j] = subent_shift[k];
│ │ │ │ +
412 k++;
│ │ │ │ +
413 }
│ │ │ │ +
414
│ │ │ │ +
415 int which = _g->overlapfront[cc].shiftmapping(shift);
│ │ │ │ +
416 return _g->overlapfront[cc].superindex(coord,which);
│ │ │ │ +
417 }
│ │ │ │ +
│ │ │ │ +
418 public:
│ │ │ │ +
419 const I& transformingsubiterator() const { return _it; }
│ │ │ │ +
420 const YGLI& gridlevel() const { return _g; }
│ │ │ │ + │ │ │ │ +
422 YGLI& gridlevel() { return _g; }
│ │ │ │ +
423 const GridImp * yaspgrid() const { return _g->mg; }
│ │ │ │ +
424 protected:
│ │ │ │ +
425 I _it = {}; // position in the grid level
│ │ │ │ +
426 YGLI _g = {}; // access to grid level
│ │ │ │ +
427 };
│ │ │ │ +
│ │ │ │ +
428
│ │ │ │ +
429
│ │ │ │ +
430 // specialization for codim=0
│ │ │ │ +
431 template<int dim, class GridImp>
│ │ │ │ +
│ │ │ │ +
432 class YaspEntity<0,dim,GridImp>
│ │ │ │ +
433 : public EntityDefaultImplementation <0,dim,GridImp,YaspEntity>
│ │ │ │ +
434 {
│ │ │ │ +
435 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
436
│ │ │ │ +
437 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl GeometryImpl;
│ │ │ │ +
438
│ │ │ │ +
439 template<int, PartitionIteratorType, typename>
│ │ │ │ +
440 friend class YaspLevelIterator;
│ │ │ │ +
441
│ │ │ │ +
442 template<typename>
│ │ │ │ + │ │ │ │ +
444
│ │ │ │ +
445 public:
│ │ │ │ +
446 typedef typename GridImp::ctype ctype;
│ │ │ │ +
447
│ │ │ │ +
448 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
449 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
450
│ │ │ │ +
451 typedef typename GridImp::template Codim< 0 >::Geometry Geometry;
│ │ │ │ +
452 typedef typename GridImp::template Codim< 0 >::LocalGeometry LocalGeometry;
│ │ │ │ +
453
│ │ │ │ +
454 template <int cd>
│ │ │ │ +
│ │ │ │ +
455 struct Codim
│ │ │ │ +
456 {
│ │ │ │ +
457 typedef typename GridImp::template Codim<cd>::Entity Entity;
│ │ │ │ +
458 };
│ │ │ │ +
│ │ │ │ +
459
│ │ │ │ +
460 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
461 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
│ │ │ │ +
462 typedef typename GridImp::LevelIntersectionIterator IntersectionIterator;
│ │ │ │ +
463 typedef typename GridImp::LevelIntersectionIterator LevelIntersectionIterator;
│ │ │ │ +
464 typedef typename GridImp::LeafIntersectionIterator LeafIntersectionIterator;
│ │ │ │ +
465 typedef typename GridImp::HierarchicIterator HierarchicIterator;
│ │ │ │ +
466
│ │ │ │ +
468 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ +
469
│ │ │ │ +
471 typedef typename GridImp::YGrid::iTupel iTupel;
│ │ │ │ +
472
│ │ │ │ +
473 // constructor
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
475 {}
│ │ │ │ +
│ │ │ │ +
476
│ │ │ │ +
│ │ │ │ +
477 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ +
478 : _it(it), _g(g)
│ │ │ │ +
479 {}
│ │ │ │ +
│ │ │ │ +
480
│ │ │ │ +
│ │ │ │ +
481 YaspEntity (const YGLI& g, I&& it)
│ │ │ │ +
482 : _it(std::move(it)), _g(g)
│ │ │ │ +
483 {}
│ │ │ │ +
│ │ │ │ +
484
│ │ │ │ +
│ │ │ │ +
485 YaspEntity (YGLI&& g, I&& it)
│ │ │ │ +
486 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ +
487 {}
│ │ │ │ +
│ │ │ │ +
488
│ │ │ │ +
│ │ │ │ +
490 bool equals (const YaspEntity& e) const
│ │ │ │ +
491 {
│ │ │ │ +
492 return _it == e._it && _g == e._g;
│ │ │ │ +
493 }
│ │ │ │ +
│ │ │ │ +
494
│ │ │ │ +
496 int level () const { return _g->level(); }
│ │ │ │ +
497
│ │ │ │ +
│ │ │ │ +
501 EntitySeed seed () const {
│ │ │ │ +
502 return EntitySeed(YaspEntitySeed<0,GridImp>(_g->level(), _it.coord()));
│ │ │ │ +
503 }
│ │ │ │ +
│ │ │ │ +
504
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
507 {
│ │ │ │ +
508 if (_g->interior[0].inside(_it.coord(),_it.shift()))
│ │ │ │ +
509 return InteriorEntity;
│ │ │ │ +
510 if (_g->overlap[0].inside(_it.coord(),_it.shift()))
│ │ │ │ +
511 return OverlapEntity;
│ │ │ │ +
512 DUNE_THROW(GridError, "Impossible GhostEntity");
│ │ │ │ +
513 return GhostEntity;
│ │ │ │ +
514 }
│ │ │ │ +
│ │ │ │ +
515
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
518 // the element geometry
│ │ │ │ +
519 auto ll = _it.lowerleft();
│ │ │ │ +
520 auto ur = _it.upperright();
│ │ │ │ +
521
│ │ │ │ +
522 // If on periodic overlap, transform coordinates by domain size
│ │ │ │ +
523 for (int i=0; i<dimworld; i++) {
│ │ │ │ +
524 if (gridlevel()->mg->isPeriodic(i)) {
│ │ │ │ +
525 int coord = transformingsubiterator().coord(i);
│ │ │ │ +
526 if (coord < 0) {
│ │ │ │ +
527 auto size = _g->mg->domainSize()[i];
│ │ │ │ +
528 ll[i] += size;
│ │ │ │ +
529 ur[i] += size;
│ │ │ │ +
530 } else if (coord + 1 > gridlevel()->mg->levelSize(gridlevel()->level(),i)) {
│ │ │ │ +
531 auto size = _g->mg->domainSize()[i];
│ │ │ │ +
532 ll[i] -= size;
│ │ │ │ +
533 ur[i] -= size;
│ │ │ │ +
534 }
│ │ │ │ +
535 }
│ │ │ │ +
536 }
│ │ │ │ +
537
│ │ │ │ +
538 GeometryImpl _geometry(ll,ur);
│ │ │ │ +
539 return Geometry( _geometry );
│ │ │ │ +
540 }
│ │ │ │ +
│ │ │ │ +
541
│ │ │ │ +
│ │ │ │ +
545 constexpr GeometryType type () const
│ │ │ │ +
546 {
│ │ │ │ +
547 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ +
548 }
│ │ │ │ +
│ │ │ │ +
549
│ │ │ │ +
│ │ │ │ +
554 template<int cc> int count () const
│ │ │ │ +
555 {
│ │ │ │ +
556 return Dune::Yasp::subEnt<dim>(dim,cc);
│ │ │ │ +
557 }
│ │ │ │ +
│ │ │ │ +
558
│ │ │ │ +
│ │ │ │ +
563 unsigned int subEntities (unsigned int codim) const
│ │ │ │ +
564 {
│ │ │ │ +
565 return Dune::Yasp::subEnt<dim>(dim,codim);
│ │ │ │ +
566 }
│ │ │ │ +
│ │ │ │ +
567
│ │ │ │ +
570 template<int cc>
│ │ │ │ +
│ │ │ │ +
571 typename Codim<cc>::Entity subEntity (int i) const
│ │ │ │ +
572 {
│ │ │ │ +
573 // calculate move bitset
│ │ │ │ +
574 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
575
│ │ │ │ +
576 // get the coordinate and modify it
│ │ │ │ +
577 iTupel coord = _it.coord();
│ │ │ │ +
578 for (int j=0; j<dim; j++)
│ │ │ │ +
579 if (move[j])
│ │ │ │ +
580 coord[j]++;
│ │ │ │ +
581
│ │ │ │ +
582 int which = _g->overlapfront[cc].shiftmapping(Dune::Yasp::entityShift<dim>(i,cc));
│ │ │ │ +
583 return typename Codim<cc>::Entity(YaspEntity<cc,GridImp::dimension,GridImp>(_g,_g->overlapfront[cc].begin(coord, which)));
│ │ │ │ +
584 }
│ │ │ │ +
│ │ │ │ +
585
│ │ │ │ +
│ │ │ │ +
587 Entity father () const
│ │ │ │ +
588 {
│ │ │ │ +
589 // check if coarse level exists
│ │ │ │ +
590 if (_g->level()<=0)
│ │ │ │ +
591 DUNE_THROW(GridError, "tried to call father on level 0");
│ │ │ │ +
592
│ │ │ │ +
593 // yes, get iterator to it
│ │ │ │ +
594 YGLI cg(_g);
│ │ │ │ +
595 --cg;
│ │ │ │ +
596
│ │ │ │ +
597 // coordinates of the cell
│ │ │ │ +
598 iTupel coord = _it.coord();
│ │ │ │ +
599
│ │ │ │ +
600 // get coordinates on next coarser level
│ │ │ │ +
601 for (int k=0; k<dim; k++) coord[k] = coord[k]/2;
│ │ │ │ +
602
│ │ │ │ +
603 return Entity(YaspEntity<0,GridImp::dimension,GridImp>(cg,cg->overlap[0].begin(coord)));
│ │ │ │ +
604 }
│ │ │ │ +
│ │ │ │ +
605
│ │ │ │ +
│ │ │ │ +
607 bool hasFather () const
│ │ │ │ +
608 {
│ │ │ │ +
609 return (_g->level()>0);
│ │ │ │ +
610 }
│ │ │ │ +
│ │ │ │ +
611
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
615 {
│ │ │ │ +
616 // configure one of the 2^dim transformations
│ │ │ │ +
617 FieldVector<ctype,dim> ll(0.0),ur(0.5);
│ │ │ │ +
618
│ │ │ │ +
619 for (int k=0; k<dim; k++)
│ │ │ │ +
620 {
│ │ │ │ +
621 if (_it.coord(k)%2)
│ │ │ │ +
622 {
│ │ │ │ +
623 ll[k] = 0.5;
│ │ │ │ +
624 ur[k] = 1.0;
│ │ │ │ +
625 }
│ │ │ │ +
626 }
│ │ │ │ +
627
│ │ │ │ + │ │ │ │ +
629 }
│ │ │ │ +
│ │ │ │ +
630
│ │ │ │ +
631 const I& transformingsubiterator () const { return _it; }
│ │ │ │ +
632 const YGLI& gridlevel () const { return _g; }
│ │ │ │ + │ │ │ │ +
634 YGLI& gridlevel() { return _g; }
│ │ │ │ +
635 const GridImp* yaspgrid () const { return _g->mg; }
│ │ │ │ +
636
│ │ │ │ +
│ │ │ │ +
637 bool isLeaf() const
│ │ │ │ +
638 {
│ │ │ │ +
639 return (_g->level() == yaspgrid()->maxLevel());
│ │ │ │ +
640 }
│ │ │ │ +
│ │ │ │ +
641
│ │ │ │ +
644 bool isNew () const { return yaspgrid()->adaptRefCount > 0 && yaspgrid()->maxLevel() < _g->level() + yaspgrid()->adaptRefCount; }
│ │ │ │ +
645
│ │ │ │ +
648 bool mightVanish () const { return false; }
│ │ │ │ +
649
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
652 {
│ │ │ │ +
653 return YaspIntersectionIterator<GridImp>(*this,false);
│ │ │ │ +
654 }
│ │ │ │ +
│ │ │ │ +
655
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
658 {
│ │ │ │ +
659 // only if entity is leaf this iterator delivers intersections
│ │ │ │ +
660 return YaspIntersectionIterator<GridImp>(*this, ! isLeaf() );
│ │ │ │ +
661 }
│ │ │ │ +
│ │ │ │ +
662
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
665 {
│ │ │ │ +
666 return ibegin();
│ │ │ │ +
667 }
│ │ │ │ +
│ │ │ │ +
668
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
671 {
│ │ │ │ +
672 return YaspIntersectionIterator<GridImp>(*this,true);
│ │ │ │ +
673 }
│ │ │ │ +
│ │ │ │ +
674
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
677 {
│ │ │ │ +
678 return iend();
│ │ │ │ +
679 }
│ │ │ │ +
│ │ │ │ +
680
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
683 {
│ │ │ │ +
684 return iend();
│ │ │ │ +
685 }
│ │ │ │ +
│ │ │ │ +
686
│ │ │ │ +
│ │ │ │ +
691 HierarchicIterator hbegin (int maxlevel) const
│ │ │ │ +
692 {
│ │ │ │ +
693 return YaspHierarchicIterator<GridImp>(_g,_it,maxlevel);
│ │ │ │ +
694 }
│ │ │ │ +
│ │ │ │ +
695
│ │ │ │ +
697 HierarchicIterator hend (int /* maxlevel */) const
│ │ │ │ +
698 {
│ │ │ │ +
699 return YaspHierarchicIterator<GridImp>(_g,_it,_g->level());
│ │ │ │ +
700 }
│ │ │ │ +
701
│ │ │ │ +
702 private:
│ │ │ │ +
703 // IndexSets needs access to the private index methods
│ │ │ │ +
704 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ +
705 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ +
706 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ +
707
│ │ │ │ + │ │ │ │ +
710 {
│ │ │ │ +
711 // encode codim
│ │ │ │ +
712 PersistentIndexType id(_it.shift().to_ulong());
│ │ │ │ +
713
│ │ │ │ +
714 // encode level
│ │ │ │ +
715 id = id << yaspgrid_level_bits;
│ │ │ │ +
716 id = id+PersistentIndexType(_g->level());
│ │ │ │ +
717
│ │ │ │ +
718
│ │ │ │ +
719 // encode coordinates
│ │ │ │ +
720 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
721 {
│ │ │ │ +
722 id = id << yaspgrid_dim_bits;
│ │ │ │ +
723 id = id+PersistentIndexType(_it.coord(i));
│ │ │ │ +
724 }
│ │ │ │ +
725
│ │ │ │ +
726 return id;
│ │ │ │ +
727 }
│ │ │ │ +
728
│ │ │ │ +
730 int compressedIndex () const
│ │ │ │ +
731 {
│ │ │ │ +
732 return _it.superindex();
│ │ │ │ +
733 }
│ │ │ │ +
734
│ │ │ │ +
736 PersistentIndexType subPersistentIndex (int i, int cc) const
│ │ │ │ +
737 {
│ │ │ │ +
738 // calculate shift and move bitsets
│ │ │ │ +
739 std::bitset<dim> shift = Dune::Yasp::entityShift<dim>(i,cc);
│ │ │ │ +
740 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
741
│ │ │ │ +
742 int trailing = (cc == dim) ? 1000 : 0;
│ │ │ │ +
743
│ │ │ │ +
744 std::array<int,dim> size = _g->mg->levelSize(_g->level());
│ │ │ │ +
745 std::array<int, dim> coord = _it.coord();
│ │ │ │ +
746 for (int j=0; j<dim; j++)
│ │ │ │ +
747 {
│ │ │ │ +
748 // correct size according to shift
│ │ │ │ +
749 if (!shift[j])
│ │ │ │ +
750 size[j]++;
│ │ │ │ +
751
│ │ │ │ +
752 // move the coordinates to the cell on which the entity lives
│ │ │ │ +
753 if (move[j])
│ │ │ │ +
754 coord[j]++;
│ │ │ │ +
755 }
│ │ │ │ +
756
│ │ │ │ +
757 for (int j=0; j<dim; j++)
│ │ │ │ +
758 {
│ │ │ │ +
759 // in the codim==dim case, count trailing zeroes.
│ │ │ │ +
760 if (cc == dim)
│ │ │ │ +
761 {
│ │ │ │ +
762 int zeroes = 0;
│ │ │ │ +
763 for (int k=0; k<_g->level(); k++)
│ │ │ │ +
764 if (coord[j] & (1<<k))
│ │ │ │ +
765 break;
│ │ │ │ +
766 else
│ │ │ │ +
767 zeroes++;
│ │ │ │ +
768 trailing = std::min(trailing,zeroes);
│ │ │ │ +
769 }
│ │ │ │ +
770 }
│ │ │ │ +
771
│ │ │ │ +
772 // encode codim
│ │ │ │ +
773 PersistentIndexType id(shift.to_ulong());
│ │ │ │ +
774
│ │ │ │ +
775 // encode level
│ │ │ │ +
776 id = id << yaspgrid_level_bits;
│ │ │ │ +
777 id = id+PersistentIndexType(_g->level()-trailing);
│ │ │ │ +
778
│ │ │ │ +
779 // encode coordinates
│ │ │ │ +
780 for (int j=dim-1; j>=0; j--)
│ │ │ │ +
781 {
│ │ │ │ +
782 id = id << yaspgrid_dim_bits;
│ │ │ │ +
783 id = id+PersistentIndexType(coord[j]>>trailing);
│ │ │ │ +
784 }
│ │ │ │ +
785
│ │ │ │ +
786 return id;
│ │ │ │ +
787 }
│ │ │ │ +
788
│ │ │ │ +
790 int subCompressedIndex (int i, int cc) const
│ │ │ │ +
791 {
│ │ │ │ +
792 // get shift and move of the subentity in question
│ │ │ │ +
793 std::bitset<dim> shift = Dune::Yasp::entityShift<dim>(i,cc);
│ │ │ │ +
794 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
795
│ │ │ │ +
796 std::array<int, dim> coord = _it.coord();
│ │ │ │ +
797 for (int j=0; j<dim; j++)
│ │ │ │ +
798 coord[j] += move[j];
│ │ │ │ +
799
│ │ │ │ +
800 int which = _g->overlapfront[cc].shiftmapping(shift);
│ │ │ │ +
801 return _g->overlapfront[cc].superindex(coord,which);
│ │ │ │ +
802 }
│ │ │ │ +
803
│ │ │ │ +
804 I _it = {}; // position in the grid level
│ │ │ │ +
805 YGLI _g = {}; // access to grid level
│ │ │ │ +
806 };
│ │ │ │ +
│ │ │ │ +
807
│ │ │ │ +
808
│ │ │ │ +
809 // specialization for codim=dim (vertex)
│ │ │ │ +
810 template<int dim, class GridImp>
│ │ │ │ +
│ │ │ │ +
811 class YaspEntity<dim,dim,GridImp>
│ │ │ │ +
812 : public EntityDefaultImplementation <dim,dim,GridImp,YaspEntity>
│ │ │ │ +
813 {
│ │ │ │ +
814 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
815
│ │ │ │ +
816 template<int, PartitionIteratorType, typename>
│ │ │ │ +
817 friend class YaspLevelIterator;
│ │ │ │ +
818
│ │ │ │ +
819 typedef typename GridImp::Traits::template Codim<dim>::GeometryImpl GeometryImpl;
│ │ │ │ +
820
│ │ │ │ +
821 public:
│ │ │ │ +
822 typedef typename GridImp::ctype ctype;
│ │ │ │ +
823
│ │ │ │ +
824 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
825 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
826
│ │ │ │ +
827 typedef typename GridImp::template Codim<dim>::Geometry Geometry;
│ │ │ │ +
828
│ │ │ │ +
829 typedef typename GridImp::template Codim<dim>::EntitySeed EntitySeed;
│ │ │ │ +
830
│ │ │ │ +
832 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ +
833
│ │ │ │ +
835 typedef typename GridImp::YGrid::iTupel iTupel;
│ │ │ │ +
836
│ │ │ │ +
837 // constructor
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
839 {}
│ │ │ │ +
│ │ │ │ +
840
│ │ │ │ +
│ │ │ │ +
841 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ +
842 : _it(it), _g(g)
│ │ │ │ +
843 {}
│ │ │ │ +
│ │ │ │ +
844
│ │ │ │ +
│ │ │ │ +
845 YaspEntity (YGLI&& g, I&& it)
│ │ │ │ +
846 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ +
847 {}
│ │ │ │ +
│ │ │ │ +
848
│ │ │ │ +
│ │ │ │ +
850 bool equals (const YaspEntity& e) const
│ │ │ │ +
851 {
│ │ │ │ +
852 return _it == e._it && _g == e._g;
│ │ │ │ +
853 }
│ │ │ │ +
│ │ │ │ +
854
│ │ │ │ +
856 int level () const {return _g->level();}
│ │ │ │ +
857
│ │ │ │ +
│ │ │ │ +
861 EntitySeed seed () const {
│ │ │ │ +
862 return EntitySeed(YaspEntitySeed<dim,GridImp>(_g->level(), _it.coord(), _it.which()));
│ │ │ │ +
863 }
│ │ │ │ +
│ │ │ │ +
864
│ │ │ │ +
│ │ │ │ +
869 unsigned int subEntities (unsigned int cc) const
│ │ │ │ +
870 {
│ │ │ │ +
871 return Dune::Yasp::subEnt<dim>(dim-dim,cc-dim);
│ │ │ │ +
872 }
│ │ │ │ +
│ │ │ │ +
873
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
876 GeometryImpl _geometry((_it).lowerleft());
│ │ │ │ +
877 return Geometry( _geometry );
│ │ │ │ +
878 }
│ │ │ │ +
│ │ │ │ +
879
│ │ │ │ +
│ │ │ │ +
883 constexpr GeometryType type () const
│ │ │ │ +
884 {
│ │ │ │ +
885 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ +
886 }
│ │ │ │ +
│ │ │ │ +
887
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
890 {
│ │ │ │ +
891 if (_g->interior[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
892 return InteriorEntity;
│ │ │ │ +
893 if (_g->interiorborder[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
894 return BorderEntity;
│ │ │ │ +
895 if (_g->overlap[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
896 return OverlapEntity;
│ │ │ │ +
897 if (_g->overlapfront[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
898 return FrontEntity;
│ │ │ │ +
899 return GhostEntity;
│ │ │ │ +
900 }
│ │ │ │ +
│ │ │ │ +
901
│ │ │ │ +
903 int subCompressedIndex (int, unsigned int ) const
│ │ │ │ +
904 {
│ │ │ │ +
905 return compressedIndex();
│ │ │ │ +
906 }
│ │ │ │ +
907
│ │ │ │ +
908 private:
│ │ │ │ +
909 // IndexSets needs access to the private index methods
│ │ │ │ +
910 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ +
911 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ +
912 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ +
913
│ │ │ │ + │ │ │ │ +
916 {
│ │ │ │ +
917 // get coordinate and size of global grid
│ │ │ │ +
918 iTupel size = _g->mg->levelSize(_g->level());
│ │ │ │ +
919
│ │ │ │ +
920 for (int i=0; i<dim; i++)
│ │ │ │ +
921 {
│ │ │ │ +
922 // we have vertices, add 1 size to all directions
│ │ │ │ +
923 size[i]++;
│ │ │ │ +
924 }
│ │ │ │ +
925
│ │ │ │ +
926 // determine min number of trailing zeroes
│ │ │ │ +
927 int trailing = 1000;
│ │ │ │ +
928 for (int i=0; i<dim; i++)
│ │ │ │ +
929 {
│ │ │ │ +
930 // count trailing zeros
│ │ │ │ +
931 int zeros = 0;
│ │ │ │ +
932 for (int j=0; j<_g->level(); j++)
│ │ │ │ +
933 if (_it.coord(i)&(1<<j))
│ │ │ │ +
934 break;
│ │ │ │ +
935 else
│ │ │ │ +
936 zeros++;
│ │ │ │ +
937 trailing = std::min(trailing,zeros);
│ │ │ │ +
938 }
│ │ │ │ +
939
│ │ │ │ +
940 // determine the level of this vertex
│ │ │ │ +
941 int level = _g->level()-trailing;
│ │ │ │ +
942
│ │ │ │ +
943 // encode codim: shift vector of vertices is 0.
│ │ │ │ + │ │ │ │ +
945
│ │ │ │ +
946 // encode level
│ │ │ │ +
947 id = id << yaspgrid_level_bits;
│ │ │ │ +
948 id = id+PersistentIndexType(level);
│ │ │ │ +
949
│ │ │ │ +
950 // encode coordinates
│ │ │ │ +
951 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
952 {
│ │ │ │ +
953 id = id << yaspgrid_dim_bits;
│ │ │ │ +
954 id = id+PersistentIndexType(_it.coord(i)>>trailing);
│ │ │ │ +
955 }
│ │ │ │ +
956
│ │ │ │ +
957 return id;
│ │ │ │ +
958 }
│ │ │ │ +
959
│ │ │ │ +
961 int compressedIndex () const { return _it.superindex();}
│ │ │ │ +
962
│ │ │ │ +
963 public:
│ │ │ │ +
964 const I& transformingsubiterator() const { return _it; }
│ │ │ │ +
965 const YGLI& gridlevel() const { return _g; }
│ │ │ │ + │ │ │ │ +
967 YGLI& gridlevel() { return _g; }
│ │ │ │ +
968
│ │ │ │ +
969 const GridImp * yaspgrid() const { return _g->mg; }
│ │ │ │ +
970 protected:
│ │ │ │ +
971 I _it = {}; // position in the grid level
│ │ │ │ +
972 YGLI _g = {}; // access to grid level
│ │ │ │ +
973 };
│ │ │ │ +
│ │ │ │ +
974
│ │ │ │ +
975} // namespace Dune
│ │ │ │ +
976
│ │ │ │ +
977#endif // DUNE_GRID_YASPGRIDENTITY_HH
│ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ +
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │ +
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ +
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ +
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ +
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │ +
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Implementation & impl()
access to the underlying implementation
Definition common/entity.hh:80
│ │ │ │ +
const int yaspgrid_level_bits
Definition yaspgrid.hh:48
│ │ │ │ +
const int yaspgrid_dim_bits
Definition yaspgrid.hh:47
│ │ │ │ +
Default Implementations for EntityImp.
Definition common/entity.hh:542
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
static constexpr int mydimension
geometry dimension
Definition common/geometry.hh:94
│ │ │ │ +
The general version that handles all codimensions but 0 and dim.
Definition yaspgridgeometry.hh:31
│ │ │ │
Definition yaspgridentity.hh:268
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:282
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:296
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridentity.hh:274
│ │ │ │ +
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:305
│ │ │ │ +
PersistentIndexType persistentIndex() const
globally unique, persistent index
Definition yaspgridentity.hh:359
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:420
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:419
│ │ │ │
YGLI _g
Definition yaspgridentity.hh:426
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:347
│ │ │ │ +
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:320
│ │ │ │ +
GridImp::Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition yaspgridentity.hh:277
│ │ │ │ +
YGLI & gridlevel()
Definition yaspgridentity.hh:422
│ │ │ │ +
int subCompressedIndex(int i, unsigned int cc) const
subentity compressed index
Definition yaspgridentity.hh:396
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:333
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:334
│ │ │ │ +
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:423
│ │ │ │ +
GridImp::template Codim< codim >::EntitySeed EntitySeed
Definition yaspgridentity.hh:279
│ │ │ │ +
YaspEntity(YGLI &&g, const I &&it)
Definition yaspgridentity.hh:342
│ │ │ │ +
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:290
│ │ │ │ +
int compressedIndex() const
consecutive, codim-wise, level-wise index
Definition yaspgridentity.hh:390
│ │ │ │ +
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:338
│ │ │ │
I _it
Definition yaspgridentity.hh:425
│ │ │ │ +
YaspEntity()
Definition yaspgridentity.hh:335
│ │ │ │ +
GridImp::template Codim< codim >::Geometry Geometry
Definition yaspgridentity.hh:276
│ │ │ │ +
GridImp::PersistentIndexType PersistentIndexType
Definition yaspgridentity.hh:356
│ │ │ │ +
unsigned int subEntities(unsigned int cc) const
Definition yaspgridentity.hh:314
│ │ │ │ +
I & transformingsubiterator()
Definition yaspgridentity.hh:421
│ │ │ │ +
Describes the minimal information necessary to create a fully functional YaspEntity.
Definition yaspgridentityseed.hh:18
│ │ │ │ +
Iterates over entities of one grid level.
Definition yaspgridleveliterator.hh:19
│ │ │ │ +
YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
Definition yaspgridintersectioniterator.hh:22
│ │ │ │
YaspHierarchicIterator enables iteration over son entities of codim 0.
Definition yaspgridhierarchiciterator.hh:20
│ │ │ │ -
YaspHierarchicIterator()
default constructor creating empty iterator
Definition yaspgridhierarchiciterator.hh:32
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridhierarchiciterator.hh:29
│ │ │ │ -
void print(std::ostream &s) const
Definition yaspgridhierarchiciterator.hh:85
│ │ │ │ -
GridImp::YGrid::Iterator I
Definition yaspgridhierarchiciterator.hh:28
│ │ │ │ -
const Entity & dereference() const
dereferencing
Definition yaspgridhierarchiciterator.hh:80
│ │ │ │ -
GridImp::YGridLevelIterator YGLI
Definition yaspgridhierarchiciterator.hh:27
│ │ │ │ -
void increment()
increment
Definition yaspgridhierarchiciterator.hh:60
│ │ │ │ -
bool equals(const YaspHierarchicIterator &rhs) const
equality
Definition yaspgridhierarchiciterator.hh:74
│ │ │ │ -
YaspHierarchicIterator(const YGLI &g, const I &it, int maxlevel)
constructor
Definition yaspgridhierarchiciterator.hh:35
│ │ │ │ +
Implementation of Level- and LeafIndexSets for YaspGrid.
Definition yaspgridindexsets.hh:25
│ │ │ │ +
persistent, globally unique Ids
Definition yaspgrididset.hh:25
│ │ │ │ +
LeafIntersectionIterator ileafbegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:657
│ │ │ │ +
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition yaspgridentity.hh:452
│ │ │ │ +
Codim< cc >::Entity subEntity(int i) const
Definition yaspgridentity.hh:571
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:490
│ │ │ │ +
YaspEntity(const YGLI &g, I &&it)
Definition yaspgridentity.hh:481
│ │ │ │ +
int count() const
Definition yaspgridentity.hh:554
│ │ │ │ +
GridImp::template Codim< 0 >::EntitySeed EntitySeed
Definition yaspgridentity.hh:461
│ │ │ │ +
GridImp::PersistentIndexType PersistentIndexType
define the type used for persistent indices
Definition yaspgridentity.hh:468
│ │ │ │ +
GridImp::YGrid::iTupel iTupel
define type used for coordinates in grid module
Definition yaspgridentity.hh:471
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:632
│ │ │ │ +
IntersectionIterator iend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:670
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:631
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridentity.hh:446
│ │ │ │ +
YGLI & gridlevel()
Definition yaspgridentity.hh:634
│ │ │ │ +
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:477
│ │ │ │ +
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:635
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:496
│ │ │ │ +
GridImp::LeafIntersectionIterator LeafIntersectionIterator
Definition yaspgridentity.hh:464
│ │ │ │ +
YaspEntity(YGLI &&g, I &&it)
Definition yaspgridentity.hh:485
│ │ │ │ +
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:506
│ │ │ │ +
LevelIntersectionIterator ilevelend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:682
│ │ │ │ +
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt()
Definition yaspgridentity.hh:648
│ │ │ │ +
GridImp::HierarchicIterator HierarchicIterator
Definition yaspgridentity.hh:465
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridentity.hh:460
│ │ │ │ +
LevelIntersectionIterator ilevelbegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:664
│ │ │ │ +
LeafIntersectionIterator ileafend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:676
│ │ │ │ +
YaspEntity()
Definition yaspgridentity.hh:474
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:449
│ │ │ │ +
GridImp::template Codim< 0 >::Geometry Geometry
Definition yaspgridentity.hh:451
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:517
│ │ │ │ +
Entity father() const
Inter-level access to father element on coarser grid. Assumes that meshes are nested.
Definition yaspgridentity.hh:587
│ │ │ │ +
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition yaspgridentity.hh:644
│ │ │ │ +
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:545
│ │ │ │ +
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:501
│ │ │ │ +
HierarchicIterator hbegin(int maxlevel) const
Definition yaspgridentity.hh:691
│ │ │ │ +
IntersectionIterator ibegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:651
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:448
│ │ │ │ +
unsigned int subEntities(unsigned int codim) const
Definition yaspgridentity.hh:563
│ │ │ │ +
LocalGeometry geometryInFather() const
Definition yaspgridentity.hh:614
│ │ │ │ +
GridImp::LevelIntersectionIterator IntersectionIterator
Definition yaspgridentity.hh:462
│ │ │ │ +
GridImp::LevelIntersectionIterator LevelIntersectionIterator
Definition yaspgridentity.hh:463
│ │ │ │ +
I & transformingsubiterator()
Definition yaspgridentity.hh:633
│ │ │ │ +
bool isLeaf() const
Definition yaspgridentity.hh:637
│ │ │ │ +
bool hasFather() const
returns true if father entity exists
Definition yaspgridentity.hh:607
│ │ │ │ +
GridImp::template Codim< cd >::Entity Entity
Definition yaspgridentity.hh:457
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:856
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:850
│ │ │ │ +
YGLI & gridlevel()
Definition yaspgridentity.hh:967
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:875
│ │ │ │ +
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:841
│ │ │ │ +
unsigned int subEntities(unsigned int cc) const
Definition yaspgridentity.hh:869
│ │ │ │ +
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:889
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridentity.hh:822
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:824
│ │ │ │ +
GridImp::PersistentIndexType PersistentIndexType
define the type used for persistent indices
Definition yaspgridentity.hh:832
│ │ │ │ +
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:861
│ │ │ │ +
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:969
│ │ │ │ +
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:883
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:825
│ │ │ │ +
I & transformingsubiterator()
Definition yaspgridentity.hh:966
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:964
│ │ │ │ +
GridImp::YGrid::iTupel iTupel
define type used for coordinates in grid module
Definition yaspgridentity.hh:835
│ │ │ │ +
GridImp::template Codim< dim >::Geometry Geometry
Definition yaspgridentity.hh:827
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:965
│ │ │ │ +
YaspEntity(YGLI &&g, I &&it)
Definition yaspgridentity.hh:845
│ │ │ │ +
YaspEntity()
Definition yaspgridentity.hh:838
│ │ │ │ +
GridImp::template Codim< dim >::EntitySeed EntitySeed
Definition yaspgridentity.hh:829
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,205 +1,1293 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridhierarchiciterator.hh │ │ │ │ │ +yaspgridentity.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDENTITY_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDENTITY_HH │ │ │ │ │ 7 │ │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ │ -15 │ │ │ │ │ -18 template │ │ │ │ │ -_1_9 class _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -20 { │ │ │ │ │ -21 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -22 │ │ │ │ │ -23 typedef _Y_a_s_p_E_n_t_i_t_y_<_0_,_G_r_i_d_I_m_p_:_:_d_i_m_e_n_s_i_o_n_,_G_r_i_d_I_m_p_> _Y_a_s_p_E_n_t_i_t_y_I_m_p; │ │ │ │ │ -24 │ │ │ │ │ -25 public: │ │ │ │ │ -26 // types used from grids │ │ │ │ │ -_2_7 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ -_2_8 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ -_2_9 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +24//======================================================================== │ │ │ │ │ +25 │ │ │ │ │ +26 │ │ │ │ │ +27 │ │ │ │ │ +28 │ │ │ │ │ +29namespace _D_u_n_e { │ │ │ │ │ 30 │ │ │ │ │ -_3_2 _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () : _entity(), _maxlevel(-1), stack() {} │ │ │ │ │ -33 │ │ │ │ │ -_3_5 _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r (const _Y_G_L_I& g, const _I& it, int maxlevel) : │ │ │ │ │ -36 _entity(_Y_a_s_p_E_n_t_i_t_y<0, dim, GridImp>(g,it)) │ │ │ │ │ -37 { │ │ │ │ │ -38 // store reference to entity implementation for better readability │ │ │ │ │ -39 _Y_a_s_p_E_n_t_i_t_y_I_m_p& entity = _entity.impl(); │ │ │ │ │ -40 // now iterator points to current cell │ │ │ │ │ -41 StackElem se(entity.___g); │ │ │ │ │ -42 std::copy(entity.___i_t.coord().begin(), entity.___i_t.coord().end(), │ │ │ │ │ -se.coord.begin()); │ │ │ │ │ -43 stack.push(se); │ │ │ │ │ -44 │ │ │ │ │ -45 // determine maximum level │ │ │ │ │ -46 _maxlevel = std::min(maxlevel,entity.___g->mg->maxLevel()); │ │ │ │ │ -47 │ │ │ │ │ -48 // if maxlevel not reached then push yourself and sons │ │ │ │ │ -49 if (entity.___g->level()<_maxlevel) │ │ │ │ │ -50 { │ │ │ │ │ -51 push_sons(); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -54 // and make iterator point to first son if stack is not empty │ │ │ │ │ -55 if (!stack.empty()) │ │ │ │ │ -56 pop_tos(); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_0 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -61 { │ │ │ │ │ -62 // sanity check: do nothing when stack is empty │ │ │ │ │ -63 if (stack.empty()) return; │ │ │ │ │ -64 │ │ │ │ │ -65 // if maxlevel not reached then push sons │ │ │ │ │ -66 if (_entity.impl()._g->level()<_maxlevel) │ │ │ │ │ -67 push_sons(); │ │ │ │ │ -68 │ │ │ │ │ -69 // in any case pop one element │ │ │ │ │ -70 pop_tos(); │ │ │ │ │ +31 namespace Yasp { │ │ │ │ │ +32 │ │ │ │ │ +33#ifndef DOXYGEN │ │ │ │ │ +34 │ │ │ │ │ +35 // table for quick evaluation of binomial coefficients │ │ │ │ │ +36 template │ │ │ │ │ +37 struct BinomialTable │ │ │ │ │ +38 { │ │ │ │ │ +39 // evaluation - note that in general d!=n, n is only the │ │ │ │ │ +40 // maximum value of d (in our case dimworld) │ │ │ │ │ +41 static constexpr int evaluate(int d, int c) │ │ │ │ │ +42 { │ │ │ │ │ +43 return _values[_offsets[d] + c]; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +46 // the actual implementation │ │ │ │ │ +47 [[deprecated("Use binomial from dune-common's math.hh")]] │ │ │ │ │ +48 static constexpr int binomial(int d, int c) │ │ │ │ │ +49 { │ │ │ │ │ +50 long binomial=1; │ │ │ │ │ +51 for (int i=d-c+1; i<=d; i++) │ │ │ │ │ +52 binomial *= i; │ │ │ │ │ +53 for (long i=2; i<=c; i++) │ │ │ │ │ +54 binomial /= i; │ │ │ │ │ +55 return binomial; │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +58 private: │ │ │ │ │ +59 // prevent construction │ │ │ │ │ +60 BinomialTable() = delete; │ │ │ │ │ +61 │ │ │ │ │ +62 // compute binomial(r, c) and advance row `r` and column `c` │ │ │ │ │ +63 static constexpr int nextValue(int& r, int& c) │ │ │ │ │ +64 { │ │ │ │ │ +65 const auto result = Dune::binomial(r, c); │ │ │ │ │ +66 │ │ │ │ │ +67 c += 1; │ │ │ │ │ +68 if (c > r) { │ │ │ │ │ +69 r += 1; │ │ │ │ │ +70 c = 0; │ │ │ │ │ 71 } │ │ │ │ │ 72 │ │ │ │ │ -_7_4 bool _e_q_u_a_l_s (const _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r& rhs) const │ │ │ │ │ -75 { │ │ │ │ │ -76 return (_entity == rhs._entity); │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -_8_0 const _E_n_t_i_t_y& _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ -81 { │ │ │ │ │ -82 return _entity; │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_5 void _p_r_i_n_t (std::ostream& s) const │ │ │ │ │ -86 { │ │ │ │ │ -87 // store reference to entity implementation for better readability │ │ │ │ │ -88 _Y_a_s_p_E_n_t_i_t_y_I_m_p& entity = _entity.impl(); │ │ │ │ │ -89 s << "HIER: " << "level=" << entity.___g.level() │ │ │ │ │ -90 << " position=" << entity.___i_t.coord() │ │ │ │ │ -91 << " superindex=" << entity.___i_t.superindex() │ │ │ │ │ -92 << " maxlevel=" << entity._maxlevel │ │ │ │ │ -93 << " stacksize=" << stack.size() │ │ │ │ │ -94 << std::endl; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97 private: │ │ │ │ │ -98 _E_n_t_i_t_y _entity; │ │ │ │ │ -99 │ │ │ │ │ -100 int _maxlevel; │ │ │ │ │ -101 │ │ │ │ │ -102 struct StackElem { │ │ │ │ │ -103 _Y_G_L_I g; // grid level of the element │ │ │ │ │ -104 std::array coord; // and the coordinates │ │ │ │ │ -105 StackElem(_Y_G_L_I gg) : g(gg) {} │ │ │ │ │ -106 }; │ │ │ │ │ -107 std::stack stack; │ │ │ │ │ -108 │ │ │ │ │ -109 // push sons of current element on the stack │ │ │ │ │ -110 void push_sons () │ │ │ │ │ -111 { │ │ │ │ │ -112 // store reference to entity implementation for better readability │ │ │ │ │ -113 YaspEntityImp& entity = _entity._i_m_p_l(); │ │ │ │ │ -114 │ │ │ │ │ -115 // yes, process all 1<overlap[0].dataBegin()->origin(k)) || (se.coord │ │ │ │ │ -[k] >= finer->overlap[0].dataBegin()->origin(k)+finer->overlap[0].dataBegin()- │ │ │ │ │ ->size(k))) │ │ │ │ │ -130 exists = false; │ │ │ │ │ -131 if (exists) │ │ │ │ │ -132 stack.push(se); │ │ │ │ │ +73 return result; │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +76 template │ │ │ │ │ +77 static constexpr std::array computeValues(std:: │ │ │ │ │ +index_sequence) │ │ │ │ │ +78 { │ │ │ │ │ +79 int r = 0, c = 0; │ │ │ │ │ +80 return {{ ((void)I, nextValue(r, c))... }}; │ │ │ │ │ +81 } │ │ │ │ │ +82 │ │ │ │ │ +83 template │ │ │ │ │ +84 static constexpr std::array computeOffsets(std:: │ │ │ │ │ +index_sequence) │ │ │ │ │ +85 { return {{ (I*(I+1)/2)... }}; } │ │ │ │ │ +86 │ │ │ │ │ +87 static constexpr std::array _values = computeValues(std:: │ │ │ │ │ +make_index_sequence<(n+1)*(n+2)/2>{}); │ │ │ │ │ +88 static constexpr std::array _offsets = computeOffsets(std:: │ │ │ │ │ +make_index_sequence{}); │ │ │ │ │ +89 }; │ │ │ │ │ +90 │ │ │ │ │ +91#if __cplusplus < 201703L │ │ │ │ │ +92 template │ │ │ │ │ +93 constexpr std::array BinomialTable::_values; │ │ │ │ │ +94 template │ │ │ │ │ +95 constexpr std::array BinomialTable::_offsets; │ │ │ │ │ +96#endif │ │ │ │ │ +97 │ │ │ │ │ +104 template │ │ │ │ │ +105 constexpr int subEnt(int d, int c) │ │ │ │ │ +106 { │ │ │ │ │ +107 return (d < c ? 0 : BinomialTable::evaluate(d,c) << c); │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +110 // Make a table mapping all subentities of a codim 0 entity to a value. │ │ │ │ │ +111 // F is the functor to be evaluated. │ │ │ │ │ +112 template │ │ │ │ │ +113 struct EntityShiftTable │ │ │ │ │ +114 { │ │ │ │ │ +115 typedef std::bitset value_type; │ │ │ │ │ +116 │ │ │ │ │ +117 static value_type evaluate(int i, int codim) │ │ │ │ │ +118 { │ │ │ │ │ +119 return {_values[_offsets[codim] + i]}; │ │ │ │ │ +120 } │ │ │ │ │ +121 │ │ │ │ │ +122 private: │ │ │ │ │ +123 │ │ │ │ │ +124 // prevent construction │ │ │ │ │ +125 EntityShiftTable() = delete; │ │ │ │ │ +126 │ │ │ │ │ +127 // compute offset of codimension `codim` entities and advance `offset` │ │ │ │ │ +128 static constexpr int nextOffset(int& offset, int codim) │ │ │ │ │ +129 { │ │ │ │ │ +130 if (codim == 0) { │ │ │ │ │ +131 offset = 0; │ │ │ │ │ +132 return 0; │ │ │ │ │ 133 } │ │ │ │ │ -134 } │ │ │ │ │ -135 │ │ │ │ │ -136 // make TOS the current element │ │ │ │ │ -137 void pop_tos () │ │ │ │ │ -138 { │ │ │ │ │ -139 StackElem se = stack.top(); │ │ │ │ │ -140 stack.pop(); │ │ │ │ │ -141 YaspEntityImp& entity = _entity._i_m_p_l(); │ │ │ │ │ -142 entity._g = se.g; │ │ │ │ │ -143 entity._it.reinit(entity._g->overlap[0],se.coord); │ │ │ │ │ +134 │ │ │ │ │ +135 offset += subEnt(dim, codim-1); │ │ │ │ │ +136 return offset; │ │ │ │ │ +137 } │ │ │ │ │ +138 │ │ │ │ │ +139 template │ │ │ │ │ +140 static constexpr std::array computeOffsets(std:: │ │ │ │ │ +index_sequence) │ │ │ │ │ +141 { │ │ │ │ │ +142 int offset = 0; │ │ │ │ │ +143 return {{ (nextOffset(offset, I))... }}; │ │ │ │ │ 144 } │ │ │ │ │ -145 }; │ │ │ │ │ -146 │ │ │ │ │ -147} // namespace Dune │ │ │ │ │ -148 │ │ │ │ │ -149#endif // DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ +145 │ │ │ │ │ +146 // compute shift table entry for (`codim`, `i`) and advance `codim`, `i` │ │ │ │ │ +147 static constexpr unsigned char nextValue(int& codim, int& i) │ │ │ │ │ +148 { │ │ │ │ │ +149 const auto result = F::evaluate(i, codim); │ │ │ │ │ +150 │ │ │ │ │ +151 i += 1; │ │ │ │ │ +152 if (i >= subEnt(dim, codim)) { │ │ │ │ │ +153 codim += 1; │ │ │ │ │ +154 i = 0; │ │ │ │ │ +155 } │ │ │ │ │ +156 │ │ │ │ │ +157 return result; │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +160 template │ │ │ │ │ +161 static constexpr std::array computeValues │ │ │ │ │ +(std::index_sequence) │ │ │ │ │ +162 { │ │ │ │ │ +163 int codim = 0, i = 0; │ │ │ │ │ +164 return {{ ((void)I, nextValue(codim, i))... }}; │ │ │ │ │ +165 } │ │ │ │ │ +166 │ │ │ │ │ +167 static constexpr std::array _offsets = computeOffsets(std:: │ │ │ │ │ +make_index_sequence{}); │ │ │ │ │ +168 static constexpr std::array _values = │ │ │ │ │ +computeValues(std::make_index_sequence{}); │ │ │ │ │ +169 │ │ │ │ │ +170 }; │ │ │ │ │ +171 │ │ │ │ │ +172#if __cplusplus < 201703L │ │ │ │ │ +173 template │ │ │ │ │ +174 constexpr std::array EntityShiftTable::_offsets; │ │ │ │ │ +175 template │ │ │ │ │ +176 constexpr std::array EntityShiftTable::_values; │ │ │ │ │ +177#endif │ │ │ │ │ +178 │ │ │ │ │ +179 // functor for doing the actual entity shift calculation │ │ │ │ │ +180 template │ │ │ │ │ +181 struct calculate_entity_shift │ │ │ │ │ +182 { │ │ │ │ │ +183 static constexpr unsigned long long evaluate(int index, int cc) │ │ │ │ │ +184 { │ │ │ │ │ +185 auto result = 0ull; │ │ │ │ │ +186 for (int d = dim; d>0; d--) │ │ │ │ │ +187 { │ │ │ │ │ +188 if (cc == d) │ │ │ │ │ +189 return result; │ │ │ │ │ +190 if (index < subEnt(d-1,cc)) │ │ │ │ │ +191 result |= 1ull << (d-1); │ │ │ │ │ +192 else │ │ │ │ │ +193 { │ │ │ │ │ +194 index = (index - subEnt(d-1, cc)) % subEnt(d-1,cc-1); │ │ │ │ │ +195 cc--; │ │ │ │ │ +196 } │ │ │ │ │ +197 } │ │ │ │ │ +198 return result; │ │ │ │ │ +199 } │ │ │ │ │ +200 }; │ │ │ │ │ +201 │ │ │ │ │ +210 template │ │ │ │ │ +211 std::bitset entityShift(int index, int cc) │ │ │ │ │ +212 { │ │ │ │ │ +213 return EntityShiftTable,dim>::evaluate │ │ │ │ │ +(index,cc); │ │ │ │ │ +214 } │ │ │ │ │ +215 │ │ │ │ │ +216 // functor for doing the actual entity move calculation │ │ │ │ │ +217 template │ │ │ │ │ +218 struct calculate_entity_move │ │ │ │ │ +219 { │ │ │ │ │ +220 static constexpr unsigned long long evaluate(int index, int cc) │ │ │ │ │ +221 { │ │ │ │ │ +222 auto result = 0ull; │ │ │ │ │ +223 for (int d = dim; d>0; d--) │ │ │ │ │ +224 { │ │ │ │ │ +225 if (d == cc) │ │ │ │ │ +226 { │ │ │ │ │ +227 // result[d-1] = index & (1<<(d-1)); │ │ │ │ │ +228 result &= ~(1ull << (d-1)); │ │ │ │ │ +229 result |= index & (1ull << (d-1)); │ │ │ │ │ +230 │ │ │ │ │ +231 index &= ~(1<<(d-1)); │ │ │ │ │ +232 } │ │ │ │ │ +233 if (index >= subEnt(d-1,cc)) │ │ │ │ │ +234 { │ │ │ │ │ +235 if ((index - subEnt(d-1,cc)) / subEnt(d-1,cc-1) == 1) │ │ │ │ │ +236 { │ │ │ │ │ +237 result |= 1ull << (d-1); │ │ │ │ │ +238 } │ │ │ │ │ +239 index = (index - subEnt(d-1, cc)) % subEnt(d-1,cc-1); │ │ │ │ │ +240 cc--; │ │ │ │ │ +241 } │ │ │ │ │ +242 } │ │ │ │ │ +243 return result; │ │ │ │ │ +244 } │ │ │ │ │ +245 │ │ │ │ │ +246 }; │ │ │ │ │ +247 │ │ │ │ │ +255 template │ │ │ │ │ +256 std::bitset entityMove(int index, int cc) │ │ │ │ │ +257 { │ │ │ │ │ +258 return EntityShiftTable,dim>::evaluate │ │ │ │ │ +(index,cc); │ │ │ │ │ +259 } │ │ │ │ │ +260 │ │ │ │ │ +261#endif //DOXYGEN │ │ │ │ │ +262 │ │ │ │ │ +263 } // namespace Yasp. │ │ │ │ │ +264 │ │ │ │ │ +265 template │ │ │ │ │ +_2_6_6 class _Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +267 : public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +268 { │ │ │ │ │ +269 │ │ │ │ │ +270 template │ │ │ │ │ +_2_7_1 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +272 │ │ │ │ │ +273 public: │ │ │ │ │ +_2_7_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +275 │ │ │ │ │ +_2_7_6 typedef typename GridImp::template Codim::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +_2_7_7 typedef typename GridImp::Traits::template Codim::GeometryImpl │ │ │ │ │ +_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +278 │ │ │ │ │ +_2_7_9 typedef typename GridImp::template Codim::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +280 │ │ │ │ │ +_2_8_2 int _l_e_v_e_l () const │ │ │ │ │ +283 { │ │ │ │ │ +284 return ___g->level(); │ │ │ │ │ +285 } │ │ │ │ │ +286 │ │ │ │ │ +_2_9_0 _E_n_t_i_t_y_S_e_e_d _s_e_e_d() const │ │ │ │ │ +291 { │ │ │ │ │ +292 return _E_n_t_i_t_y_S_e_e_d(_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_<_c_o_d_i_m_,_G_r_i_d_I_m_p_>(___g->level(), ___i_t.coord(), │ │ │ │ │ +___i_t.which())); │ │ │ │ │ +293 } │ │ │ │ │ +294 │ │ │ │ │ +_2_9_6 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ +297 { │ │ │ │ │ +298 _G_e_o_m_e_t_r_y_I_m_p_l _geometry(___i_t.lowerleft(),___i_t.upperright(),___i_t.shift()); │ │ │ │ │ +299 return _G_e_o_m_e_t_r_y(_geometry); │ │ │ │ │ +300 } │ │ │ │ │ +301 │ │ │ │ │ +_3_0_5 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ +306 { │ │ │ │ │ +307 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ +308 } │ │ │ │ │ +309 │ │ │ │ │ +_3_1_4 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ +315 { │ │ │ │ │ +316 return Dune::Yasp::subEnt(dim-codim,cc-codim); │ │ │ │ │ +317 } │ │ │ │ │ +318 │ │ │ │ │ +_3_2_0 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ +321 { │ │ │ │ │ +322 if (___g->interior[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +323 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +324 if (___g->interiorborder[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +325 return _B_o_r_d_e_r_E_n_t_i_t_y; │ │ │ │ │ +326 if (___g->overlap[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +327 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ +328 if (___g->overlapfront[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +329 return _F_r_o_n_t_E_n_t_i_t_y; │ │ │ │ │ +330 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +331 } │ │ │ │ │ +332 │ │ │ │ │ +_3_3_3 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_3_3_4 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +_3_3_5 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ +336 {} │ │ │ │ │ +337 │ │ │ │ │ +_3_3_8 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ +339 : ___i_t(it), ___g(g) │ │ │ │ │ +340 {} │ │ │ │ │ +341 │ │ │ │ │ +_3_4_2 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, const _I&& it) │ │ │ │ │ +343 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ +344 {} │ │ │ │ │ +345 │ │ │ │ │ +_3_4_7 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ +348 { │ │ │ │ │ +349 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ +350 } │ │ │ │ │ +351 │ │ │ │ │ +352 // IndexSets needs access to the private index methods │ │ │ │ │ +353 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +354 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +355 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +_3_5_6 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ +357 │ │ │ │ │ +_3_5_9 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e _p_e_r_s_i_s_t_e_n_t_I_n_d_e_x () const │ │ │ │ │ +360 { │ │ │ │ │ +361 // get size of global grid (in elements) │ │ │ │ │ +362 std::array size; │ │ │ │ │ +363 │ │ │ │ │ +364 for (int i=0; img->levelSize(___g->level(), i); │ │ │ │ │ +368 if (!___i_t.shift(i)) │ │ │ │ │ +369 size[i]++; │ │ │ │ │ +370 } │ │ │ │ │ +371 │ │ │ │ │ +372 // encode codim │ │ │ │ │ +373 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e id(___i_t.shift().to_ulong()); │ │ │ │ │ +374 │ │ │ │ │ +375 // encode level │ │ │ │ │ +376 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ +377 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()); │ │ │ │ │ +378 │ │ │ │ │ +379 // encode coordinates │ │ │ │ │ +380 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +381 { │ │ │ │ │ +382 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +383 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___i_t.coord(i)); │ │ │ │ │ +384 } │ │ │ │ │ +385 │ │ │ │ │ +386 return id; │ │ │ │ │ +387 } │ │ │ │ │ +388 │ │ │ │ │ +_3_9_0 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const │ │ │ │ │ +391 { │ │ │ │ │ +392 return ___i_t.superindex(); │ │ │ │ │ +393 } │ │ │ │ │ +394 │ │ │ │ │ +_3_9_6 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int i, unsigned int cc) const │ │ │ │ │ +397 { │ │ │ │ │ +398 // get the shift of the entity and the subentity │ │ │ │ │ +399 // the subentity shift is only available in the space spanned by the entity │ │ │ │ │ +400 std::bitset subent_shift = Dune::Yasp::entityShift │ │ │ │ │ +(i,cc-codim); │ │ │ │ │ +401 std::bitset subent_move = Dune::Yasp::entityMove │ │ │ │ │ +(i,cc-codim); │ │ │ │ │ +402 │ │ │ │ │ +403 std::bitset shift = ___i_t.shift(); │ │ │ │ │ +404 std::array coord = ___i_t.coord(); │ │ │ │ │ +405 for (int j=0, k=0; joverlapfront[cc].shiftmapping(shift); │ │ │ │ │ +416 return ___g->overlapfront[cc].superindex(coord,which); │ │ │ │ │ +417 } │ │ │ │ │ +418 public: │ │ │ │ │ +_4_1_9 const _I& _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r() const { return ___i_t; } │ │ │ │ │ +_4_2_0 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l() const { return ___g; } │ │ │ │ │ +_4_2_1 _I& _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r() { return ___i_t; } │ │ │ │ │ +_4_2_2 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ +_4_2_3 const GridImp * _y_a_s_p_g_r_i_d() const { return ___g->mg; } │ │ │ │ │ +424 protected: │ │ │ │ │ +_4_2_5 _I ___i_t = {}; // position in the grid level │ │ │ │ │ +_4_2_6 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ +427 }; │ │ │ │ │ +428 │ │ │ │ │ +429 │ │ │ │ │ +430 // specialization for codim=0 │ │ │ │ │ +431 template │ │ │ │ │ +_4_3_2 class _Y_a_s_p_E_n_t_i_t_y<0,dim,GridImp> │ │ │ │ │ +433 : public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n <0,dim,GridImp,YaspEntity> │ │ │ │ │ +434 { │ │ │ │ │ +435 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +436 │ │ │ │ │ +437 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl │ │ │ │ │ +_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +438 │ │ │ │ │ +439 template │ │ │ │ │ +_4_4_0 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +441 │ │ │ │ │ +442 template │ │ │ │ │ +_4_4_3 friend class _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +444 │ │ │ │ │ +445 public: │ │ │ │ │ +_4_4_6 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +447 │ │ │ │ │ +_4_4_8 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_4_4_9 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +450 │ │ │ │ │ +_4_5_1 typedef typename GridImp::template Codim< 0 >::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +_4_5_2 typedef typename GridImp::template Codim< 0 >::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +453 │ │ │ │ │ +454 template │ │ │ │ │ +_4_5_5 struct Codim │ │ │ │ │ +456 { │ │ │ │ │ +_4_5_7 typedef typename GridImp::template _C_o_d_i_m_<_c_d_>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +458 }; │ │ │ │ │ +459 │ │ │ │ │ +_4_6_0 typedef typename GridImp::template _C_o_d_i_m_<_0_>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_4_6_1 typedef typename GridImp::template Codim<0>::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +_4_6_2 typedef typename GridImp::LevelIntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +_4_6_3 typedef typename GridImp::LevelIntersectionIterator │ │ │ │ │ +_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +_4_6_4 typedef typename GridImp::LeafIntersectionIterator │ │ │ │ │ +_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +_4_6_5 typedef typename GridImp::HierarchicIterator _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +466 │ │ │ │ │ +_4_6_8 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ +469 │ │ │ │ │ +_4_7_1 typedef typename GridImp::YGrid::iTupel _i_T_u_p_e_l; │ │ │ │ │ +472 │ │ │ │ │ +473 // constructor │ │ │ │ │ +_4_7_4 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ +475 {} │ │ │ │ │ +476 │ │ │ │ │ +_4_7_7 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ +478 : ___i_t(it), ___g(g) │ │ │ │ │ +479 {} │ │ │ │ │ +480 │ │ │ │ │ +_4_8_1 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, _I&& it) │ │ │ │ │ +482 : ___i_t(_s_t_d::move(it)), ___g(g) │ │ │ │ │ +483 {} │ │ │ │ │ +484 │ │ │ │ │ +_4_8_5 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, _I&& it) │ │ │ │ │ +486 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ +487 {} │ │ │ │ │ +488 │ │ │ │ │ +_4_9_0 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ +491 { │ │ │ │ │ +492 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ +493 } │ │ │ │ │ +494 │ │ │ │ │ +_4_9_6 int _l_e_v_e_l () const { return ___g->level(); } │ │ │ │ │ +497 │ │ │ │ │ +_5_0_1 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const { │ │ │ │ │ +502 return _E_n_t_i_t_y_S_e_e_d(_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_<_0_,_G_r_i_d_I_m_p_>(___g->level(), ___i_t.coord())); │ │ │ │ │ +503 } │ │ │ │ │ +504 │ │ │ │ │ +_5_0_6 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ +507 { │ │ │ │ │ +508 if (___g->interior[0].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +509 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +510 if (___g->overlap[0].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +511 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ +512 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Impossible GhostEntity"); │ │ │ │ │ +513 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +514 } │ │ │ │ │ +515 │ │ │ │ │ +_5_1_7 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const { │ │ │ │ │ +518 // the element geometry │ │ │ │ │ +519 auto ll = ___i_t.lowerleft(); │ │ │ │ │ +520 auto ur = ___i_t.upperright(); │ │ │ │ │ +521 │ │ │ │ │ +522 // If on periodic overlap, transform coordinates by domain size │ │ │ │ │ +523 for (int i=0; img->isPeriodic(i)) { │ │ │ │ │ +525 int coord = _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(i); │ │ │ │ │ +526 if (coord < 0) { │ │ │ │ │ +527 auto size = ___g->mg->domainSize()[i]; │ │ │ │ │ +528 ll[i] += size; │ │ │ │ │ +529 ur[i] += size; │ │ │ │ │ +530 } else if (coord + 1 > _g_r_i_d_l_e_v_e_l()->mg->levelSize(_g_r_i_d_l_e_v_e_l()->_l_e_v_e_l(),i)) │ │ │ │ │ +{ │ │ │ │ │ +531 auto size = ___g->mg->domainSize()[i]; │ │ │ │ │ +532 ll[i] -= size; │ │ │ │ │ +533 ur[i] -= size; │ │ │ │ │ +534 } │ │ │ │ │ +535 } │ │ │ │ │ +536 } │ │ │ │ │ +537 │ │ │ │ │ +538 GeometryImpl _geometry(ll,ur); │ │ │ │ │ +539 return _G_e_o_m_e_t_r_y( _geometry ); │ │ │ │ │ +540 } │ │ │ │ │ +541 │ │ │ │ │ +_5_4_5 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ +546 { │ │ │ │ │ +547 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ +548 } │ │ │ │ │ +549 │ │ │ │ │ +_5_5_4 template int _c_o_u_n_t () const │ │ │ │ │ +555 { │ │ │ │ │ +556 return Dune::Yasp::subEnt(dim,cc); │ │ │ │ │ +557 } │ │ │ │ │ +558 │ │ │ │ │ +_5_6_3 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int codim) const │ │ │ │ │ +564 { │ │ │ │ │ +565 return Dune::Yasp::subEnt(dim,codim); │ │ │ │ │ +566 } │ │ │ │ │ +567 │ │ │ │ │ +570 template │ │ │ │ │ +_5_7_1 typename _C_o_d_i_m_<_c_c_>_:_:_E_n_t_i_t_y _s_u_b_E_n_t_i_t_y (int i) const │ │ │ │ │ +572 { │ │ │ │ │ +573 // calculate move bitset │ │ │ │ │ +574 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +575 │ │ │ │ │ +576 // get the coordinate and modify it │ │ │ │ │ +577 _i_T_u_p_e_l coord = ___i_t.coord(); │ │ │ │ │ +578 for (int j=0; joverlapfront[cc].shiftmapping(Dune::Yasp::entityShift │ │ │ │ │ +(i,cc)); │ │ │ │ │ +583 return typename _C_o_d_i_m_<_c_c_>_:_:_E_n_t_i_t_y(_Y_a_s_p_E_n_t_i_t_y_<_c_c_,_G_r_i_d_I_m_p_:_:_d_i_m_e_n_s_i_o_n_,_G_r_i_d_I_m_p_> │ │ │ │ │ +(___g,___g->overlapfront[cc].begin(coord, which))); │ │ │ │ │ +584 } │ │ │ │ │ +585 │ │ │ │ │ +_5_8_7 _E_n_t_i_t_y _f_a_t_h_e_r () const │ │ │ │ │ +588 { │ │ │ │ │ +589 // check if coarse level exists │ │ │ │ │ +590 if (___g->level()<=0) │ │ │ │ │ +591 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "tried to call father on level 0"); │ │ │ │ │ +592 │ │ │ │ │ +593 // yes, get iterator to it │ │ │ │ │ +594 _Y_G_L_I cg(___g); │ │ │ │ │ +595 --cg; │ │ │ │ │ +596 │ │ │ │ │ +597 // coordinates of the cell │ │ │ │ │ +598 _i_T_u_p_e_l coord = ___i_t.coord(); │ │ │ │ │ +599 │ │ │ │ │ +600 // get coordinates on next coarser level │ │ │ │ │ +601 for (int k=0; k(cg,cg->overlap │ │ │ │ │ +[0].begin(coord))); │ │ │ │ │ +604 } │ │ │ │ │ +605 │ │ │ │ │ +_6_0_7 bool _h_a_s_F_a_t_h_e_r () const │ │ │ │ │ +608 { │ │ │ │ │ +609 return (___g->level()>0); │ │ │ │ │ +610 } │ │ │ │ │ +611 │ │ │ │ │ +_6_1_4 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r () const │ │ │ │ │ +615 { │ │ │ │ │ +616 // configure one of the 2^dim transformations │ │ │ │ │ +617 FieldVector ll(0.0),ur(0.5); │ │ │ │ │ +618 │ │ │ │ │ +619 for (int k=0; k(ll,ur) ); │ │ │ │ │ +629 } │ │ │ │ │ +630 │ │ │ │ │ +_6_3_1 const _I& _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r () const { return ___i_t; } │ │ │ │ │ +_6_3_2 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l () const { return ___g; } │ │ │ │ │ +_6_3_3 _I& _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r() { return ___i_t; } │ │ │ │ │ +_6_3_4 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ +_6_3_5 const GridImp* _y_a_s_p_g_r_i_d () const { return ___g->mg; } │ │ │ │ │ +636 │ │ │ │ │ +_6_3_7 bool _i_s_L_e_a_f() const │ │ │ │ │ +638 { │ │ │ │ │ +639 return (___g->level() == _y_a_s_p_g_r_i_d()->maxLevel()); │ │ │ │ │ +640 } │ │ │ │ │ +641 │ │ │ │ │ +_6_4_4 bool _i_s_N_e_w () const { return _y_a_s_p_g_r_i_d()->adaptRefCount > 0 && _y_a_s_p_g_r_i_d()- │ │ │ │ │ +>maxLevel() < ___g->level() + _y_a_s_p_g_r_i_d()->adaptRefCount; } │ │ │ │ │ +645 │ │ │ │ │ +_6_4_8 bool _m_i_g_h_t_V_a_n_i_s_h () const { return false; } │ │ │ │ │ +649 │ │ │ │ │ +_6_5_1 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r _i_b_e_g_i_n () const │ │ │ │ │ +652 { │ │ │ │ │ +653 return _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>(*this,false); │ │ │ │ │ +654 } │ │ │ │ │ +655 │ │ │ │ │ +_6_5_7 _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r _i_l_e_a_f_b_e_g_i_n () const │ │ │ │ │ +658 { │ │ │ │ │ +659 // only if entity is leaf this iterator delivers intersections │ │ │ │ │ +660 return _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>(*this, ! isLeaf() ); │ │ │ │ │ +661 } │ │ │ │ │ +662 │ │ │ │ │ +_6_6_4 _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r _i_l_e_v_e_l_b_e_g_i_n () const │ │ │ │ │ +665 { │ │ │ │ │ +666 return ibegin(); │ │ │ │ │ +667 } │ │ │ │ │ +668 │ │ │ │ │ +_6_7_0 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r _i_e_n_d () const │ │ │ │ │ +671 { │ │ │ │ │ +672 return _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>(*this,true); │ │ │ │ │ +673 } │ │ │ │ │ +674 │ │ │ │ │ +_6_7_6 _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r _i_l_e_a_f_e_n_d () const │ │ │ │ │ +677 { │ │ │ │ │ +678 return iend(); │ │ │ │ │ +679 } │ │ │ │ │ +680 │ │ │ │ │ +_6_8_2 _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r _i_l_e_v_e_l_e_n_d () const │ │ │ │ │ +683 { │ │ │ │ │ +684 return iend(); │ │ │ │ │ +685 } │ │ │ │ │ +686 │ │ │ │ │ +_6_9_1 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r _h_b_e_g_i_n (int maxlevel) const │ │ │ │ │ +692 { │ │ │ │ │ +693 return _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>(___g,___i_t,maxlevel); │ │ │ │ │ +694 } │ │ │ │ │ +695 │ │ │ │ │ +_6_9_7 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r hend (int /* maxlevel */) const │ │ │ │ │ +698 { │ │ │ │ │ +699 return _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>(___g,___i_t,___g->level()); │ │ │ │ │ +700 } │ │ │ │ │ +701 │ │ │ │ │ +702 private: │ │ │ │ │ +703 // IndexSets needs access to the private index methods │ │ │ │ │ +704 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +705 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +706 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +707 │ │ │ │ │ +709 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e _p_e_r_s_i_s_t_e_n_t_I_n_d_e_x () const │ │ │ │ │ +710 { │ │ │ │ │ +711 // encode codim │ │ │ │ │ +712 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e id(___i_t.shift().to_ulong()); │ │ │ │ │ +713 │ │ │ │ │ +714 // encode level │ │ │ │ │ +715 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ +716 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()); │ │ │ │ │ +717 │ │ │ │ │ +718 │ │ │ │ │ +719 // encode coordinates │ │ │ │ │ +720 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +721 { │ │ │ │ │ +722 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +723 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___i_t.coord(i)); │ │ │ │ │ +724 } │ │ │ │ │ +725 │ │ │ │ │ +726 return id; │ │ │ │ │ +727 } │ │ │ │ │ +728 │ │ │ │ │ +730 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const │ │ │ │ │ +731 { │ │ │ │ │ +732 return ___i_t.superindex(); │ │ │ │ │ +733 } │ │ │ │ │ +734 │ │ │ │ │ +736 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e subPersistentIndex (int i, int cc) const │ │ │ │ │ +737 { │ │ │ │ │ +738 // calculate shift and move bitsets │ │ │ │ │ +739 std::bitset shift = Dune::Yasp::entityShift(i,cc); │ │ │ │ │ +740 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +741 │ │ │ │ │ +742 int trailing = (cc == dim) ? 1000 : 0; │ │ │ │ │ +743 │ │ │ │ │ +744 std::array size = ___g->mg->levelSize(___g->level()); │ │ │ │ │ +745 std::array coord = ___i_t.coord(); │ │ │ │ │ +746 for (int j=0; jlevel(); k++) │ │ │ │ │ +764 if (coord[j] & (1<level()-trailing); │ │ │ │ │ +778 │ │ │ │ │ +779 // encode coordinates │ │ │ │ │ +780 for (int j=dim-1; j>=0; j--) │ │ │ │ │ +781 { │ │ │ │ │ +782 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +783 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(coord[j]>>trailing); │ │ │ │ │ +784 } │ │ │ │ │ +785 │ │ │ │ │ +786 return id; │ │ │ │ │ +787 } │ │ │ │ │ +788 │ │ │ │ │ +790 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int i, int cc) const │ │ │ │ │ +791 { │ │ │ │ │ +792 // get shift and move of the subentity in question │ │ │ │ │ +793 std::bitset shift = Dune::Yasp::entityShift(i,cc); │ │ │ │ │ +794 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +795 │ │ │ │ │ +796 std::array coord = ___i_t.coord(); │ │ │ │ │ +797 for (int j=0; joverlapfront[cc].shiftmapping(shift); │ │ │ │ │ +801 return ___g->overlapfront[cc].superindex(coord,which); │ │ │ │ │ +802 } │ │ │ │ │ +803 │ │ │ │ │ +804 _I ___i_t = {}; // position in the grid level │ │ │ │ │ +805 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ +806 }; │ │ │ │ │ +807 │ │ │ │ │ +808 │ │ │ │ │ +809 // specialization for codim=dim (vertex) │ │ │ │ │ +810 template │ │ │ │ │ +_8_1_1 class _Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +812 : public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +813 { │ │ │ │ │ +814 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +815 │ │ │ │ │ +816 template │ │ │ │ │ +_8_1_7 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +818 │ │ │ │ │ +819 typedef typename GridImp::Traits::template Codim::GeometryImpl │ │ │ │ │ +_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +820 │ │ │ │ │ +821 public: │ │ │ │ │ +_8_2_2 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +823 │ │ │ │ │ +_8_2_4 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_8_2_5 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +826 │ │ │ │ │ +_8_2_7 typedef typename GridImp::template Codim::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +828 │ │ │ │ │ +_8_2_9 typedef typename GridImp::template Codim::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +830 │ │ │ │ │ +_8_3_2 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ +833 │ │ │ │ │ +_8_3_5 typedef typename GridImp::YGrid::iTupel _i_T_u_p_e_l; │ │ │ │ │ +836 │ │ │ │ │ +837 // constructor │ │ │ │ │ +_8_3_8 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ +839 {} │ │ │ │ │ +840 │ │ │ │ │ +_8_4_1 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ +842 : ___i_t(it), ___g(g) │ │ │ │ │ +843 {} │ │ │ │ │ +844 │ │ │ │ │ +_8_4_5 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, _I&& it) │ │ │ │ │ +846 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ +847 {} │ │ │ │ │ +848 │ │ │ │ │ +_8_5_0 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ +851 { │ │ │ │ │ +852 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ +853 } │ │ │ │ │ +854 │ │ │ │ │ +_8_5_6 int _l_e_v_e_l () const {return ___g->level();} │ │ │ │ │ +857 │ │ │ │ │ +_8_6_1 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const { │ │ │ │ │ +862 return _E_n_t_i_t_y_S_e_e_d(_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_<_d_i_m_,_G_r_i_d_I_m_p_>(___g->level(), ___i_t.coord(), │ │ │ │ │ +___i_t.which())); │ │ │ │ │ +863 } │ │ │ │ │ +864 │ │ │ │ │ +_8_6_9 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ +870 { │ │ │ │ │ +871 return Dune::Yasp::subEnt(dim-dim,cc-dim); │ │ │ │ │ +872 } │ │ │ │ │ +873 │ │ │ │ │ +_8_7_5 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const { │ │ │ │ │ +876 GeometryImpl _geometry((___i_t).lowerleft()); │ │ │ │ │ +877 return _G_e_o_m_e_t_r_y( _geometry ); │ │ │ │ │ +878 } │ │ │ │ │ +879 │ │ │ │ │ +_8_8_3 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ +884 { │ │ │ │ │ +885 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ +886 } │ │ │ │ │ +887 │ │ │ │ │ +_8_8_9 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ +890 { │ │ │ │ │ +891 if (___g->interior[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +892 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +893 if (___g->interiorborder[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +894 return _B_o_r_d_e_r_E_n_t_i_t_y; │ │ │ │ │ +895 if (___g->overlap[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +896 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ +897 if (___g->overlapfront[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +898 return _F_r_o_n_t_E_n_t_i_t_y; │ │ │ │ │ +899 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +900 } │ │ │ │ │ +901 │ │ │ │ │ +_9_0_3 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int, unsigned int ) const │ │ │ │ │ +904 { │ │ │ │ │ +905 return _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x(); │ │ │ │ │ +906 } │ │ │ │ │ +907 │ │ │ │ │ +908 private: │ │ │ │ │ +909 // IndexSets needs access to the private index methods │ │ │ │ │ +910 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +911 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +912 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +913 │ │ │ │ │ +915 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e _p_e_r_s_i_s_t_e_n_t_I_n_d_e_x () const │ │ │ │ │ +916 { │ │ │ │ │ +917 // get coordinate and size of global grid │ │ │ │ │ +918 iTupel size = ___g->mg->levelSize(___g->level()); │ │ │ │ │ +919 │ │ │ │ │ +920 for (int i=0; ilevel(); j++) │ │ │ │ │ +933 if (___i_t.coord(i)&(1<level()-trailing; │ │ │ │ │ +942 │ │ │ │ │ +943 // encode codim: shift vector of vertices is 0. │ │ │ │ │ +944 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e id(0); │ │ │ │ │ +945 │ │ │ │ │ +946 // encode level │ │ │ │ │ +947 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ +948 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(_l_e_v_e_l); │ │ │ │ │ +949 │ │ │ │ │ +950 // encode coordinates │ │ │ │ │ +951 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +952 { │ │ │ │ │ +953 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +954 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___i_t.coord(i)>>trailing); │ │ │ │ │ +955 } │ │ │ │ │ +956 │ │ │ │ │ +957 return id; │ │ │ │ │ +958 } │ │ │ │ │ +959 │ │ │ │ │ +961 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const { return ___i_t.superindex();} │ │ │ │ │ +962 │ │ │ │ │ +963 public: │ │ │ │ │ +_9_6_4 const _I& _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r() const { return ___i_t; } │ │ │ │ │ +_9_6_5 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l() const { return ___g; } │ │ │ │ │ +_9_6_6 _I& _t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r() { return ___i_t; } │ │ │ │ │ +_9_6_7 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ +968 │ │ │ │ │ +_9_6_9 const GridImp * _y_a_s_p_g_r_i_d() const { return ___g->mg; } │ │ │ │ │ +970 protected: │ │ │ │ │ +_9_7_1 _I ___i_t = {}; // position in the grid level │ │ │ │ │ +_9_7_2 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ +973 }; │ │ │ │ │ +974 │ │ │ │ │ +975} // namespace Dune │ │ │ │ │ +976 │ │ │ │ │ +977#endif // DUNE_GRID_YASPGRIDENTITY_HH │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y │ │ │ │ │ +@ FrontEntity │ │ │ │ │ +on boundary between overlap and ghost │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ +@ InteriorEntity │ │ │ │ │ +all interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +@ GhostEntity │ │ │ │ │ +ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ +@ BorderEntity │ │ │ │ │ +on boundary between interior and overlap │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ │ +@ OverlapEntity │ │ │ │ │ +all entities lying in the overlap zone │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:33 │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_i_m_p_l │ │ │ │ │ -Implementation & impl() │ │ │ │ │ -access to the underlying implementation │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s │ │ │ │ │ +const int yaspgrid_level_bits │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_y_a_s_p_g_r_i_d___d_i_m___b_i_t_s │ │ │ │ │ +const int yaspgrid_dim_bits │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +Default Implementations for EntityImp. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:542 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ +Base class for exceptions in Dune grid modules. │ │ │ │ │ +DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int mydimension │ │ │ │ │ +geometry dimension │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ +The general version that handles all codimensions but 0 and dim. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridgeometry.hh:31 │ │ │ │ │ _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ DDeeffiinniittiioonn yaspgridentity.hh:268 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +level of this element │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:282 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +geometry of this entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:296 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ │ +constexpr GeometryType type() const │ │ │ │ │ +Return the name of the reference element. The type can be used to access the │ │ │ │ │ +Dune::ReferenceElement. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:305 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_p_e_r_s_i_s_t_e_n_t_I_n_d_e_x │ │ │ │ │ +PersistentIndexType persistentIndex() const │ │ │ │ │ +globally unique, persistent index │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +const YGLI & gridlevel() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:420 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r │ │ │ │ │ +const I & transformingsubiterator() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:419 │ │ │ │ │ _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___g │ │ │ │ │ YGLI _g │ │ │ │ │ DDeeffiinniittiioonn yaspgridentity.hh:426 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspEntity &e) const │ │ │ │ │ +Return true when two iterators over the same grid are equal (!). │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:347 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType partitionType() const │ │ │ │ │ +return partition type attribute │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:320 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y_I_m_p_l │ │ │ │ │ +GridImp::Traits::template Codim< codim >::GeometryImpl GeometryImpl │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:277 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +YGLI & gridlevel() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:422 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x │ │ │ │ │ +int subCompressedIndex(int i, unsigned int cc) const │ │ │ │ │ +subentity compressed index │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:396 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_Y_G_L_I │ │ │ │ │ +GridImp::YGridLevelIterator YGLI │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:333 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:334 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ +const GridImp * yaspgrid() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:423 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +GridImp::template Codim< codim >::EntitySeed EntitySeed │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:279 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(YGLI &&g, const I &&it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:342 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_s_e_e_d │ │ │ │ │ +EntitySeed seed() const │ │ │ │ │ +Return the entity seed which contains sufficient information to generate the │ │ │ │ │ +entity again and uses as... │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:290 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_c_o_m_p_r_e_s_s_e_d_I_n_d_e_x │ │ │ │ │ +int compressedIndex() const │ │ │ │ │ +consecutive, codim-wise, level-wise index │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(const YGLI &g, const I &it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:338 │ │ │ │ │ _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___i_t │ │ │ │ │ I _it │ │ │ │ │ DDeeffiinniittiioonn yaspgridentity.hh:425 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< codim >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:276 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e │ │ │ │ │ +GridImp::PersistentIndexType PersistentIndexType │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:356 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +unsigned int subEntities(unsigned int cc) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r │ │ │ │ │ +I & transformingsubiterator() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:421 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +Describes the minimal information necessary to create a fully functional │ │ │ │ │ +YaspEntity. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterates over entities of one grid level. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +YaspIntersectionIterator enables iteration over intersections with neighboring │ │ │ │ │ +codim 0 entities. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:22 │ │ │ │ │ _D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ YaspHierarchicIterator enables iteration over son entities of codim 0. │ │ │ │ │ DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -YaspHierarchicIterator() │ │ │ │ │ -default constructor creating empty iterator │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ +Implementation of Level- and LeafIndexSets for YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +persistent, globally unique Ids │ │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_a_f_b_e_g_i_n │ │ │ │ │ +LeafIntersectionIterator ileafbegin() const │ │ │ │ │ +returns intersection iterator for first intersection │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:657 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:452 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ +Codim< cc >::Entity subEntity(int i) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:571 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspEntity &e) const │ │ │ │ │ +Return true when two iterators over the same grid are equal (!). │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:490 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(const YGLI &g, I &&it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:481 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_o_u_n_t │ │ │ │ │ +int count() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:554 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +GridImp::template Codim< 0 >::EntitySeed EntitySeed │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:461 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e │ │ │ │ │ +GridImp::PersistentIndexType PersistentIndexType │ │ │ │ │ +define the type used for persistent indices │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:468 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_T_u_p_e_l │ │ │ │ │ +GridImp::YGrid::iTupel iTupel │ │ │ │ │ +define type used for coordinates in grid module │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:471 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +const YGLI & gridlevel() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:632 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_e_n_d │ │ │ │ │ +IntersectionIterator iend() const │ │ │ │ │ +Reference to one past the last neighbor. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:670 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r │ │ │ │ │ +const I & transformingsubiterator() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:631 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:446 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +YGLI & gridlevel() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:634 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(const YGLI &g, const I &it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:477 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ +const GridImp * yaspgrid() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:635 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +level of this element │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:496 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +GridImp::LeafIntersectionIterator LeafIntersectionIterator │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:464 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(YGLI &&g, I &&it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:485 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType partitionType() const │ │ │ │ │ +return partition type attribute │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:506 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_v_e_l_e_n_d │ │ │ │ │ +LevelIntersectionIterator ilevelend() const │ │ │ │ │ +Reference to one past the last neighbor. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:682 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h │ │ │ │ │ +bool mightVanish() const │ │ │ │ │ +Returns true, if entity might disappear during the next call to adapt() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:648 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +GridImp::HierarchicIterator HierarchicIterator │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:465 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &s) const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:460 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_v_e_l_b_e_g_i_n │ │ │ │ │ +LevelIntersectionIterator ilevelbegin() const │ │ │ │ │ +returns intersection iterator for first intersection │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:664 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_a_f_e_n_d │ │ │ │ │ +LeafIntersectionIterator ileafend() const │ │ │ │ │ +Reference to one past the last neighbor. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:676 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:474 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I │ │ │ │ │ GridImp::YGrid::Iterator I │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -const Entity & dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_Y_G_L_I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:449 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 0 >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:451 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +geometry of this entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:517 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_f_a_t_h_e_r │ │ │ │ │ +Entity father() const │ │ │ │ │ +Inter-level access to father element on coarser grid. Assumes that meshes are │ │ │ │ │ +nested. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:587 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_s_N_e_w │ │ │ │ │ +bool isNew() const │ │ │ │ │ +Returns true, if the entity has been created during the last call to adapt() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:644 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_t_y_p_e │ │ │ │ │ +constexpr GeometryType type() const │ │ │ │ │ +Return the name of the reference element. The type can be used to access the │ │ │ │ │ +Dune::ReferenceElement. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:545 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_e_e_d │ │ │ │ │ +EntitySeed seed() const │ │ │ │ │ +Return the entity seed which contains sufficient information to generate the │ │ │ │ │ +entity again and uses as... │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:501 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_b_e_g_i_n │ │ │ │ │ +HierarchicIterator hbegin(int maxlevel) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:691 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_b_e_g_i_n │ │ │ │ │ +IntersectionIterator ibegin() const │ │ │ │ │ +returns intersection iterator for first intersection │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:651 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_G_L_I │ │ │ │ │ GridImp::YGridLevelIterator YGLI │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const YaspHierarchicIterator &rhs) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -YaspHierarchicIterator(const YGLI &g, const I &it, int maxlevel) │ │ │ │ │ -constructor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridhierarchiciterator.hh:35 │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:448 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +unsigned int subEntities(unsigned int codim) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:563 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ +LocalGeometry geometryInFather() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:614 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +GridImp::LevelIntersectionIterator IntersectionIterator │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:462 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +GridImp::LevelIntersectionIterator LevelIntersectionIterator │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:463 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r │ │ │ │ │ +I & transformingsubiterator() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:633 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_s_L_e_a_f │ │ │ │ │ +bool isLeaf() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:637 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_a_s_F_a_t_h_e_r │ │ │ │ │ +bool hasFather() const │ │ │ │ │ +returns true if father entity exists │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:607 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< cd >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:457 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +level of this element │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:856 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspEntity &e) const │ │ │ │ │ +Return true when two iterators over the same grid are equal (!). │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:850 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +YGLI & gridlevel() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:967 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +geometry of this entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:875 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(const YGLI &g, const I &it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:841 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +unsigned int subEntities(unsigned int cc) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:869 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType partitionType() const │ │ │ │ │ +return partition type attribute │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:889 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:822 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_G_L_I │ │ │ │ │ +GridImp::YGridLevelIterator YGLI │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:824 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e │ │ │ │ │ +GridImp::PersistentIndexType PersistentIndexType │ │ │ │ │ +define the type used for persistent indices │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:832 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_e_e_d │ │ │ │ │ +EntitySeed seed() const │ │ │ │ │ +Return the entity seed which contains sufficient information to generate the │ │ │ │ │ +entity again and uses as... │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:861 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ +const GridImp * yaspgrid() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:969 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_t_y_p_e │ │ │ │ │ +constexpr GeometryType type() const │ │ │ │ │ +Return the name of the reference element. The type can be used to access the │ │ │ │ │ +Dune::ReferenceElement. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:883 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:825 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r │ │ │ │ │ +I & transformingsubiterator() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:966 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r │ │ │ │ │ +const I & transformingsubiterator() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:964 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_T_u_p_e_l │ │ │ │ │ +GridImp::YGrid::iTupel iTupel │ │ │ │ │ +define type used for coordinates in grid module │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:835 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< dim >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:827 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +const YGLI & gridlevel() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:965 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity(YGLI &&g, I &&it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:845 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +YaspEntity() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +GridImp::template Codim< dim >::EntitySeed EntitySeed │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:829 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00212.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridindexsets.hh File Reference │ │ │ │ +dune-grid: yaspgridleveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridindexsets.hh File Reference
│ │ │ │ +
yaspgridleveliterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ │ +

The YaspLevelIterator class. │ │ │ │ More...

│ │ │ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspIndexSet< GridImp, isLeafIndexSet >
 Implementation of Level- and LeafIndexSets for YaspGrid. More...
class  Dune::YaspLevelIterator< codim, pitype, GridImp >
 Iterates over entities of one grid level. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

level-wise, non-persistent, consecutive indices for YaspGrid

│ │ │ │ +

The YaspLevelIterator class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,22 +2,22 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridindexsets.hh File Reference │ │ │ │ │ -level-wise, non-persistent, consecutive indices for YaspGrid _M_o_r_e_._._. │ │ │ │ │ +yaspgridleveliterator.hh File Reference │ │ │ │ │ +The YaspLevelIterator class. _M_o_r_e_._._. │ │ │ │ │ _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_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _i_s_L_e_a_f_I_n_d_e_x_S_e_t_ _> │ │ │ │ │ -  Implementation of Level- and LeafIndexSets for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  Iterates over entities of one grid level. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ │ │ +The YaspLevelIterator class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridindexsets.hh Source File │ │ │ │ +dune-grid: yaspgridleveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,143 +74,91 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridindexsets.hh
│ │ │ │ +
yaspgridleveliterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ │
7
│ │ │ │ -
14namespace Dune {
│ │ │ │ -
15
│ │ │ │ -
22 template<class GridImp, bool isLeafIndexSet>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, unsigned int >
│ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ -
30 typedef typename Base::IndexType IndexType;
│ │ │ │ -
31
│ │ │ │ -
32 using Base::subIndex;
│ │ │ │ +
12namespace Dune {
│ │ │ │ +
13
│ │ │ │ +
14
│ │ │ │ +
17 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
19 {
│ │ │ │ +
21 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
23 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
24 typedef typename GridImp::ctype ctype;
│ │ │ │ +
25 public:
│ │ │ │ +
26 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │ +
27 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
28 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
32 {}
│ │ │ │ +
│ │ │ │
33
│ │ │ │
│ │ │ │ -
35 YaspIndexSet ( const GridImp &g, int l )
│ │ │ │ -
36 : grid( g ),
│ │ │ │ -
37 level( l )
│ │ │ │ -
38 {
│ │ │ │ -
39 assert(not isLeafIndexSet);
│ │ │ │ -
40
│ │ │ │ -
41 // contains a single element type;
│ │ │ │ -
42 for (int codim=0; codim<=GridImp::dimension; codim++)
│ │ │ │ -
43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
47 YaspIndexSet ( const GridImp &g )
│ │ │ │ -
48 : grid( g )
│ │ │ │ -
49 {
│ │ │ │ -
50 assert(isLeafIndexSet);
│ │ │ │ -
51
│ │ │ │ -
52 // contains a single element type;
│ │ │ │ -
53 for (int codim=0; codim<=GridImp::dimension; codim++)
│ │ │ │ -
54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
│ │ │ │ +
35 YaspLevelIterator (const YGLI & g, const I& it)
│ │ │ │ +
36 : _entity(YaspEntity<codim, dim, GridImp>(g,it))
│ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
40 void increment()
│ │ │ │ +
41 {
│ │ │ │ +
42 ++(_entity.impl()._it);
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
46 bool equals (const YaspLevelIterator& rhs) const
│ │ │ │ +
47 {
│ │ │ │ +
48 return (_entity == rhs._entity);
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
52 const Entity& dereference() const
│ │ │ │ +
53 {
│ │ │ │ +
54 return _entity;
│ │ │ │
55 }
│ │ │ │
│ │ │ │
56
│ │ │ │ -
58 template<int cc>
│ │ │ │ -
│ │ │ │ -
59 IndexType index (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e) const
│ │ │ │ -
60 {
│ │ │ │ -
61 return e.impl().compressedIndex();
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
65 template< int cc >
│ │ │ │ -
│ │ │ │ -
66 IndexType subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
│ │ │ │ -
67 int i, unsigned int codim ) const
│ │ │ │ -
68 {
│ │ │ │ -
69 return e.impl().subCompressedIndex(i, codim);
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ -
73 std::size_t size (GeometryType type) const
│ │ │ │ -
74 {
│ │ │ │ -
75 return (isLeafIndexSet)
│ │ │ │ -
76 ? grid.size( type )
│ │ │ │ -
77 : grid.size( level, type );
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 std::size_t size (int codim) const
│ │ │ │ -
82 {
│ │ │ │ -
83 return (isLeafIndexSet)
│ │ │ │ -
84 ? grid.size( codim )
│ │ │ │ -
85 : grid.size( level, codim );
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
89 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
90 bool contains (const EntityType& e) const
│ │ │ │ -
91 {
│ │ │ │ -
92 return (isLeafIndexSet)
│ │ │ │ -
93 ? e.level() == grid.maxLevel()
│ │ │ │ -
94 : e.level() == level;
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97 std::vector< GeometryType > types ( int codim ) const { return mytypes[ codim ]; }
│ │ │ │ -
98
│ │ │ │ -
│ │ │ │ -
100 const std::vector<GeometryType>& geomTypes (int codim) const
│ │ │ │ -
101 {
│ │ │ │ -
102 return mytypes[codim];
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105 private:
│ │ │ │ -
106 const GridImp& grid;
│ │ │ │ -
107 int level;
│ │ │ │ -
108 std::vector<GeometryType> mytypes[std::remove_const<GridImp>::type::dimension+1];
│ │ │ │ -
109 };
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111} // namespace Dune
│ │ │ │ -
112
│ │ │ │ -
113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │ +
57 protected:
│ │ │ │ + │ │ │ │ +
59 };
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
61}
│ │ │ │ +
62
│ │ │ │ +
63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │ -
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition indexidset.hh:153
│ │ │ │ -
Export the type of the entity used as parameter in the index(...) method.
Definition indexidset.hh:87
│ │ │ │ -
Implementation of Level- and LeafIndexSets for YaspGrid.
Definition yaspgridindexsets.hh:25
│ │ │ │ -
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition yaspgridindexsets.hh:100
│ │ │ │ -
YaspIndexSet(const GridImp &g)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:47
│ │ │ │ -
YaspIndexSet(const GridImp &g, int l)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:35
│ │ │ │ -
IndexType index(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e) const
get index of an entity
Definition yaspgridindexsets.hh:59
│ │ │ │ -
bool contains(const EntityType &e) const
return true if the given entity is contained in .
Definition yaspgridindexsets.hh:90
│ │ │ │ -
std::size_t size(GeometryType type) const
get number of entities of given type and level (the level is known to the object)
Definition yaspgridindexsets.hh:73
│ │ │ │ -
IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
get index of subentity of an entity
Definition yaspgridindexsets.hh:66
│ │ │ │ -
std::vector< GeometryType > types(int codim) const
Definition yaspgridindexsets.hh:97
│ │ │ │ -
std::size_t size(int codim) const
return size of set for a given codim
Definition yaspgridindexsets.hh:81
│ │ │ │ -
Base::IndexType IndexType
Definition yaspgridindexsets.hh:30
│ │ │ │ +
Definition yaspgridentity.hh:268
│ │ │ │ +
Iterates over entities of one grid level.
Definition yaspgridleveliterator.hh:19
│ │ │ │ +
Entity _entity
entity
Definition yaspgridleveliterator.hh:58
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridleveliterator.hh:27
│ │ │ │ +
GridImp::template Codim< codim >::Entity Entity
Definition yaspgridleveliterator.hh:26
│ │ │ │ +
void increment()
increment
Definition yaspgridleveliterator.hh:40
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridleveliterator.hh:28
│ │ │ │ +
YaspLevelIterator(const YGLI &g, const I &it)
constructor
Definition yaspgridleveliterator.hh:35
│ │ │ │ +
bool equals(const YaspLevelIterator &rhs) const
equality
Definition yaspgridleveliterator.hh:46
│ │ │ │ +
YaspLevelIterator()
default constructor
Definition yaspgridleveliterator.hh:31
│ │ │ │ +
const Entity & dereference() const
dereferencing
Definition yaspgridleveliterator.hh:52
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,168 +1,103 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridindexsets.hh │ │ │ │ │ +yaspgridleveliterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ │ -15 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 class _Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ -24 : public _I_n_d_e_x_S_e_t< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, │ │ │ │ │ -unsigned int > │ │ │ │ │ -25 { │ │ │ │ │ -26 typedef _Y_a_s_p_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _i_s_L_e_a_f_I_n_d_e_x_S_e_t_ _> _T_h_i_s; │ │ │ │ │ -27 typedef _I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _T_h_i_s_,_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> _B_a_s_e; │ │ │ │ │ -28 │ │ │ │ │ -29 public: │ │ │ │ │ -_3_0 typedef typename _B_a_s_e_:_:_I_n_d_e_x_T_y_p_e _I_n_d_e_x_T_y_p_e; │ │ │ │ │ -31 │ │ │ │ │ -32 using _B_a_s_e_:_:_s_u_b_I_n_d_e_x; │ │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ │ +13 │ │ │ │ │ +14 │ │ │ │ │ +17 template │ │ │ │ │ +_1_8 class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +19 { │ │ │ │ │ +21 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +23 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +24 typedef typename GridImp::ctype ctype; │ │ │ │ │ +25 public: │ │ │ │ │ +_2_6 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ +_2_7 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_2_8 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +29 │ │ │ │ │ +_3_1 _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r () │ │ │ │ │ +32 {} │ │ │ │ │ 33 │ │ │ │ │ -_3_5 _Y_a_s_p_I_n_d_e_x_S_e_t ( const GridImp &g, int l ) │ │ │ │ │ -36 : grid( g ), │ │ │ │ │ -37 level( l ) │ │ │ │ │ -38 { │ │ │ │ │ -39 assert(not isLeafIndexSet); │ │ │ │ │ -40 │ │ │ │ │ -41 // contains a single element type; │ │ │ │ │ -42 for (int codim=0; codim<=GridImp::dimension; codim++) │ │ │ │ │ -43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim)); │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -_4_7 _Y_a_s_p_I_n_d_e_x_S_e_t ( const GridImp &g ) │ │ │ │ │ -48 : grid( g ) │ │ │ │ │ -49 { │ │ │ │ │ -50 assert(isLeafIndexSet); │ │ │ │ │ -51 │ │ │ │ │ -52 // contains a single element type; │ │ │ │ │ -53 for (int codim=0; codim<=GridImp::dimension; codim++) │ │ │ │ │ -54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim)); │ │ │ │ │ +_3_5 _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r (const _Y_G_L_I & g, const _I& it) │ │ │ │ │ +36 : ___e_n_t_i_t_y(_Y_a_s_p_E_n_t_i_t_y(g,it)) │ │ │ │ │ +37 {} │ │ │ │ │ +38 │ │ │ │ │ +_4_0 void _i_n_c_r_e_m_e_n_t() │ │ │ │ │ +41 { │ │ │ │ │ +42 ++(___e_n_t_i_t_y.impl()._it); │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_6 bool _e_q_u_a_l_s (const _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r& rhs) const │ │ │ │ │ +47 { │ │ │ │ │ +48 return (___e_n_t_i_t_y == rhs.___e_n_t_i_t_y); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_2 const _E_n_t_i_t_y& _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ +53 { │ │ │ │ │ +54 return ___e_n_t_i_t_y; │ │ │ │ │ 55 } │ │ │ │ │ 56 │ │ │ │ │ -58 template │ │ │ │ │ -_5_9 _I_n_d_e_x_T_y_p_e _i_n_d_e_x (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim::Entity& e) const │ │ │ │ │ -60 { │ │ │ │ │ -61 return e.impl().compressedIndex(); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -65 template< int cc > │ │ │ │ │ -_6_6 _I_n_d_e_x_T_y_p_e _s_u_b_I_n_d_e_x ( const typename std::remove_const< GridImp >::type:: │ │ │ │ │ -Traits::template Codim< cc >::Entity &e, │ │ │ │ │ -67 int i, unsigned int codim ) const │ │ │ │ │ -68 { │ │ │ │ │ -69 return e.impl().subCompressedIndex(i, codim); │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -_7_3 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ -74 { │ │ │ │ │ -75 return (isLeafIndexSet) │ │ │ │ │ -76 ? grid.size( type ) │ │ │ │ │ -77 : grid.size( level, type ); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -_8_1 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ -82 { │ │ │ │ │ -83 return (isLeafIndexSet) │ │ │ │ │ -84 ? grid.size( codim ) │ │ │ │ │ -85 : grid.size( level, codim ); │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -89 template │ │ │ │ │ -_9_0 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ -91 { │ │ │ │ │ -92 return (isLeafIndexSet) │ │ │ │ │ -93 ? e.level() == grid.maxLevel() │ │ │ │ │ -94 : e.level() == level; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -_9_7 std::vector< GeometryType > _t_y_p_e_s ( int codim ) const { return mytypes │ │ │ │ │ -[ codim ]; } │ │ │ │ │ -98 │ │ │ │ │ -_1_0_0 const std::vector& _g_e_o_m_T_y_p_e_s (int codim) const │ │ │ │ │ -101 { │ │ │ │ │ -102 return mytypes[codim]; │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -105 private: │ │ │ │ │ -106 const GridImp& grid; │ │ │ │ │ -107 int level; │ │ │ │ │ -108 std::vector mytypes[std::remove_const::type:: │ │ │ │ │ -dimension+1]; │ │ │ │ │ -109 }; │ │ │ │ │ -110 │ │ │ │ │ -111} // namespace Dune │ │ │ │ │ -112 │ │ │ │ │ -113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ +57 protected: │ │ │ │ │ +_5_8 _E_n_t_i_t_y ___e_n_t_i_t_y; │ │ │ │ │ +59 }; │ │ │ │ │ +60 │ │ │ │ │ +61} │ │ │ │ │ +62 │ │ │ │ │ +63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Index Set Interface base class. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int │ │ │ │ │ -i, unsigned int codim) const │ │ │ │ │ -Map a subentity to an index. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_C_o_d_i_m │ │ │ │ │ -Export the type of the entity used as parameter in the index(...) method. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ -Implementation of Level- and LeafIndexSets for YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_g_e_o_m_T_y_p_e_s │ │ │ │ │ -const std::vector< GeometryType > & geomTypes(int codim) const │ │ │ │ │ -deliver all geometry types used in this grid │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ -YaspIndexSet(const GridImp &g) │ │ │ │ │ -Level grid view constructor stores reference to a grid and level. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ -YaspIndexSet(const GridImp &g, int l) │ │ │ │ │ -Level grid view constructor stores reference to a grid and level. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ -IndexType index(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ -template Codim< cc >::Entity &e) const │ │ │ │ │ -get index of an entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const EntityType &e) const │ │ │ │ │ -return true if the given entity is contained in . │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(GeometryType type) const │ │ │ │ │ -get number of entities of given type and level (the level is known to the │ │ │ │ │ -object) │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ -template Codim< cc >::Entity &e, int i, unsigned int codim) const │ │ │ │ │ -get index of subentity of an entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ -std::vector< GeometryType > types(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(int codim) const │ │ │ │ │ -return size of set for a given codim │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_I_n_d_e_x_T_y_p_e │ │ │ │ │ -Base::IndexType IndexType │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:268 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterates over entities of one grid level. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:___e_n_t_i_t_y │ │ │ │ │ +Entity _entity │ │ │ │ │ +entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_Y_G_L_I │ │ │ │ │ +GridImp::YGridLevelIterator YGLI │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +YaspLevelIterator(const YGLI &g, const I &it) │ │ │ │ │ +constructor │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspLevelIterator &rhs) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +YaspLevelIterator() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +const Entity & dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn yaspgridleveliterator.hh:52 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00224.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: torus.hh File Reference │ │ │ │ +dune-grid: structuredyaspgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,58 +71,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
torus.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
structuredyaspgridfactory.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ +

Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ More...

│ │ │ │ -
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <cmath>
│ │ │ │ -#include <deque>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <mpi.h>
│ │ │ │ -#include <dune/common/binaryfunctions.hh>
│ │ │ │ -#include <dune/common/streamoperators.hh>
│ │ │ │ -#include <dune/grid/common/exceptions.hh>
│ │ │ │ -#include "partitioning.hh"
│ │ │ │ +
#include <memory>
│ │ │ │ +#include <dune/grid/utility/structuredgridfactory.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Torus< Communication, d >
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid. More...
 
class  Dune::Torus< Communication, d >::ProcListIterator
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<class Communication , int d>
std::ostream & Dune::operator<< (std::ostream &s, const Torus< Communication, d > &t)
 Output operator for Torus.
 
│ │ │ │

Detailed Description

│ │ │ │ -

This file provides the infrastructure for toroidal communication in YaspGrid.

│ │ │ │ +

Specialization of the StructuredGridFactory class for YaspGrid.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,42 +1,31 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -_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 │ │ │ │ │ -torus.hh File Reference │ │ │ │ │ -This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ │ -_M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ │ -#include "_p_a_r_t_i_t_i_o_n_i_n_g_._h_h" │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +structuredyaspgridfactory.hh File Reference │ │ │ │ │ +Specialization of the StructuredGridFactory class for YaspGrid. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_s_t_r_u_c_t_u_r_e_d_g_r_i_d_f_a_c_t_o_r_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_:_:_T_o_r_u_s_<_ _C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ + _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ +  Specialization of the _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_T_o_r_u_s_<_ _C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_ _>_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +class   _D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_, │ │ │ │ │ + _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ +  Specialization of the _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y for │ │ │ │ │ + YaspGrid _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, const _T_o_r_u_s< Communication, │ │ │ │ │ - d > &t) │ │ │ │ │ -  Output operator for _T_o_r_u_s. │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ │ +Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: torus.hh Source File │ │ │ │ +dune-grid: structuredyaspgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,619 +74,126 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
torus.hh
│ │ │ │ +
structuredyaspgridfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRID_TORUS_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRID_TORUS_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <cmath>
│ │ │ │ -
11#include <deque>
│ │ │ │ -
12#include <iostream>
│ │ │ │ -
13#include <vector>
│ │ │ │ -
14
│ │ │ │ -
15#if HAVE_MPI
│ │ │ │ -
16#include <mpi.h>
│ │ │ │ -
17#endif
│ │ │ │ -
18
│ │ │ │ -
19#include <dune/common/binaryfunctions.hh>
│ │ │ │ -
20#include <dune/common/streamoperators.hh>
│ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23#include "partitioning.hh"
│ │ │ │ -
24
│ │ │ │ -
29namespace Dune
│ │ │ │ -
30{
│ │ │ │ -
31
│ │ │ │ -
45 template<class Communication, int d>
│ │ │ │ -
│ │ │ │ -
46 class Torus {
│ │ │ │ -
47 public:
│ │ │ │ -
49 typedef std::array<int, d> iTupel;
│ │ │ │ -
50
│ │ │ │ -
51
│ │ │ │ -
52 private:
│ │ │ │ -
53 struct CommPartner {
│ │ │ │ -
54 int rank;
│ │ │ │ -
55 iTupel delta;
│ │ │ │ -
56 int index;
│ │ │ │ -
57 };
│ │ │ │ -
58
│ │ │ │ -
59 struct CommTask {
│ │ │ │ -
60 int rank; // process to send to / receive from
│ │ │ │ -
61 int size; // size of buffer
│ │ │ │ -
62 void *buffer; // buffer to send / receive
│ │ │ │ -
63 };
│ │ │ │ -
64
│ │ │ │ -
65 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
68 {}
│ │ │ │ +
8#include <memory>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
27 template<class ctype, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ + │ │ │ │ +
31 static const int dimworld = GridType::dimensionworld;
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ +
44 static std::unique_ptr<GridType>
│ │ │ │ +
│ │ │ │ +
45 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ +
46 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ +
47 const std::array<unsigned int,dim>& elements)
│ │ │ │ +
48 {
│ │ │ │ +
49 using std::abs;
│ │ │ │ +
50 for(int d = 0; d < dimworld; ++d)
│ │ │ │ +
51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10)
│ │ │ │ +
52 DUNE_THROW(GridError, className<StructuredGridFactory>()
│ │ │ │ +
53 << "::createCubeGrid(): You have to use Yaspgrid<dim"
│ │ │ │ +
54 ", EquidistantOffsetCoordinates<ctype,dim> > as your"
│ │ │ │ +
55 "grid type for non-trivial origin." );
│ │ │ │ +
56
│ │ │ │ +
57 // construct array of ints instead of unsigned ints
│ │ │ │ +
58 std::array<int, dim> elem;
│ │ │ │ +
59 std::copy(elements.begin(), elements.end(), elem.begin());
│ │ │ │ +
60
│ │ │ │ +
61 return std::make_unique<GridType>(upperRight, elem,
│ │ │ │ +
62 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
│ │ │ │ +
63 }
│ │ │ │
│ │ │ │ -
69
│ │ │ │ +
64
│ │ │ │ +
70 static std::unique_ptr<GridType>
│ │ │ │
│ │ │ │ -
71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning<d>* partitioner)
│ │ │ │ -
72 : _comm(comm), _tag(tag)
│ │ │ │ -
73 {
│ │ │ │ -
74 // determine dimensions
│ │ │ │ -
75 partitioner->partition(size, _comm.size(), _dims, overlap);
│ │ │ │ -
76
│ │ │ │ -
77 // compute increments for lexicographic ordering
│ │ │ │ -
78 int inc = 1;
│ │ │ │ -
79 for (int i=0; i<d; i++)
│ │ │ │ -
80 {
│ │ │ │ -
81 _increment[i] = inc;
│ │ │ │ -
82 inc *= _dims[i];
│ │ │ │ -
83 }
│ │ │ │ -
84
│ │ │ │ -
85 // check whether the load balancing matches the size of the communicator
│ │ │ │ -
86 if (inc != _comm.size())
│ │ │ │ -
87 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
│ │ │ │ -
88
│ │ │ │ -
89 // make full schedule
│ │ │ │ -
90 proclists();
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
│ │ │ │ -
94 int rank () const
│ │ │ │ -
95 {
│ │ │ │ -
96 return _comm.rank();
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
│ │ │ │ -
100 iTupel coord () const
│ │ │ │ -
101 {
│ │ │ │ -
102 return rank_to_coord(_comm.rank());
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
│ │ │ │ -
106 int procs () const
│ │ │ │ -
107 {
│ │ │ │ -
108 return _comm.size();
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
│ │ │ │ -
112 const iTupel & dims () const
│ │ │ │ -
113 {
│ │ │ │ -
114 return _dims;
│ │ │ │ -
115 }
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
│ │ │ │ -
118 int dims (int i) const
│ │ │ │ -
119 {
│ │ │ │ -
120 return _dims[i];
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
│ │ │ │ -
124 Communication comm () const
│ │ │ │ -
125 {
│ │ │ │ -
126 return _comm;
│ │ │ │ +
71 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ +
72 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ +
73 const std::array<unsigned int,dim>& elements)
│ │ │ │ +
74 {
│ │ │ │ +
75 DUNE_THROW(GridError, className<StructuredGridFactory>()
│ │ │ │ +
76 << "::createSimplexGrid(): Simplices are not supported "
│ │ │ │ +
77 "by YaspGrid.");
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
89 template<class ctype, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
92 static const int dimworld = GridType::dimensionworld;
│ │ │ │ +
93
│ │ │ │ +
94 public:
│ │ │ │ +
101 static std::unique_ptr<GridType>
│ │ │ │ +
│ │ │ │ +
102 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ +
103 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ +
104 const std::array<unsigned int,dim>& elements)
│ │ │ │ +
105 {
│ │ │ │ +
106 // construct array of ints instead of unsigned ints
│ │ │ │ +
107 std::array<int, dim> elem;
│ │ │ │ +
108 std::copy(elements.begin(), elements.end(), elem.begin());
│ │ │ │ +
109
│ │ │ │ +
110 return std::make_unique<GridType>(lowerLeft, upperRight, elem,
│ │ │ │ +
111 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
│ │ │ │ +
112 }
│ │ │ │ +
│ │ │ │ +
113
│ │ │ │ +
119 static std::unique_ptr<GridType>
│ │ │ │ +
│ │ │ │ +
120 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
│ │ │ │ +
121 const FieldVector<ctype,dimworld>& upperRight,
│ │ │ │ +
122 const std::array<unsigned int,dim>& elements)
│ │ │ │ +
123 {
│ │ │ │ +
124 DUNE_THROW(GridError, className<StructuredGridFactory>()
│ │ │ │ +
125 << "::createSimplexGrid(): Simplices are not supported "
│ │ │ │ +
126 "by YaspGrid.");
│ │ │ │
127 }
│ │ │ │
│ │ │ │
128
│ │ │ │ -
│ │ │ │ -
130 int tag () const
│ │ │ │ -
131 {
│ │ │ │ -
132 return _tag;
│ │ │ │ -
133 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
│ │ │ │ -
136 bool inside (iTupel c) const
│ │ │ │ -
137 {
│ │ │ │ -
138 for (int i=d-1; i>=0; i--)
│ │ │ │ -
139 if (c[i]<0 || c[i]>=_dims[i]) return false;
│ │ │ │ -
140 return true;
│ │ │ │ -
141 }
│ │ │ │ -
│ │ │ │ -
142
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
145 {
│ │ │ │ - │ │ │ │ -
147 rank = rank%_comm.size();
│ │ │ │ -
148 for (int i=d-1; i>=0; i--)
│ │ │ │ -
149 {
│ │ │ │ -
150 coord[i] = rank/_increment[i];
│ │ │ │ -
151 rank = rank%_increment[i];
│ │ │ │ -
152 }
│ │ │ │ -
153 return coord;
│ │ │ │ -
154 }
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
158 {
│ │ │ │ -
159 for (int i=0; i<d; i++) coord[i] = coord[i]%_dims[i];
│ │ │ │ -
160 int rank = 0;
│ │ │ │ -
161 for (int i=0; i<d; i++) rank += coord[i]*_increment[i];
│ │ │ │ -
162 return rank;
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
│ │ │ │ -
166 int rank_relative (int rank, int dir, int cnt) const
│ │ │ │ -
167 {
│ │ │ │ - │ │ │ │ -
169 coord[dir] = (coord[dir]+_dims[dir]+cnt)%_dims[dir];
│ │ │ │ -
170 return coord_to_rank(coord);
│ │ │ │ -
171 }
│ │ │ │ -
│ │ │ │ -
172
│ │ │ │ -
│ │ │ │ -
174 int color (const iTupel & coord) const
│ │ │ │ -
175 {
│ │ │ │ -
176 int c = 0;
│ │ │ │ -
177 int power = 1;
│ │ │ │ -
178
│ │ │ │ -
179 // interior coloring
│ │ │ │ -
180 for (int i=0; i<d; i++)
│ │ │ │ -
181 {
│ │ │ │ -
182 if (coord[i]%2==1) c += power;
│ │ │ │ -
183 power *= 2;
│ │ │ │ -
184 }
│ │ │ │ -
185
│ │ │ │ -
186 // extra colors for boundary processes
│ │ │ │ -
187 for (int i=0; i<d; i++)
│ │ │ │ -
188 {
│ │ │ │ -
189 if (_dims[i]>1 && coord[i]==_dims[i]-1) c += power;
│ │ │ │ -
190 power *= 2;
│ │ │ │ -
191 }
│ │ │ │ -
192
│ │ │ │ -
193 return c;
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
│ │ │ │ -
197 int color (int rank) const
│ │ │ │ -
198 {
│ │ │ │ -
199 return color(rank_to_coord(rank));
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
│ │ │ │ -
203 int neighbors () const
│ │ │ │ -
204 {
│ │ │ │ -
205 int n=1;
│ │ │ │ -
206 for (int i=0; i<d; ++i)
│ │ │ │ -
207 n *= 3;
│ │ │ │ -
208 return n-1;
│ │ │ │ -
209 }
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
│ │ │ │ -
212 bool is_neighbor (iTupel delta, std::bitset<d> periodic) const
│ │ │ │ -
213 {
│ │ │ │ -
214 iTupel coord = rank_to_coord(_comm.rank()); // my own coordinate with 0 <= c_i < dims_i
│ │ │ │ -
215
│ │ │ │ -
216 for (int i=0; i<d; i++)
│ │ │ │ -
217 {
│ │ │ │ -
218 if (delta[i]<0)
│ │ │ │ -
219 {
│ │ │ │ -
220 // if I am on the boundary and domain is not periodic => no neighbor
│ │ │ │ -
221 if (coord[i]==0 && periodic[i]==false) return false;
│ │ │ │ -
222 }
│ │ │ │ -
223 if (delta[i]>0)
│ │ │ │ -
224 {
│ │ │ │ -
225 // if I am on the boundary and domain is not periodic => no neighbor
│ │ │ │ -
226 if (coord[i]==_dims[i]-1 && periodic[i]==false) return false;
│ │ │ │ -
227 }
│ │ │ │ -
228 }
│ │ │ │ -
229 return true;
│ │ │ │ -
230 }
│ │ │ │ -
│ │ │ │ -
231
│ │ │ │ -
│ │ │ │ -
239 double partition (int rank, iTupel origin_in, iTupel size_in, iTupel& origin_out, iTupel& size_out) const
│ │ │ │ -
240 {
│ │ │ │ - │ │ │ │ -
242 double maxsize = 1;
│ │ │ │ -
243 double sz = 1;
│ │ │ │ -
244
│ │ │ │ -
245 // make a tensor product partition
│ │ │ │ -
246 for (int i=0; i<d; i++)
│ │ │ │ -
247 {
│ │ │ │ -
248 // determine
│ │ │ │ -
249 int m = size_in[i]/_dims[i];
│ │ │ │ -
250 int r = size_in[i]%_dims[i];
│ │ │ │ -
251
│ │ │ │ -
252 sz *= size_in[i];
│ │ │ │ -
253
│ │ │ │ -
254 if (coord[i]<_dims[i]-r)
│ │ │ │ -
255 {
│ │ │ │ -
256 origin_out[i] = origin_in[i] + coord[i]*m;
│ │ │ │ -
257 size_out[i] = m;
│ │ │ │ -
258 maxsize *= m;
│ │ │ │ -
259 }
│ │ │ │ -
260 else
│ │ │ │ -
261 {
│ │ │ │ -
262 origin_out[i] = origin_in[i] + (_dims[i]-r)*m + (coord[i]-(_dims[i]-r))*(m+1);
│ │ │ │ -
263 size_out[i] = m+1;
│ │ │ │ -
264 maxsize *= m+1;
│ │ │ │ -
265 }
│ │ │ │ -
266 }
│ │ │ │ -
267 return maxsize/(sz/_comm.size());
│ │ │ │ -
268 }
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
277 public:
│ │ │ │ -
│ │ │ │ -
279 ProcListIterator (typename std::deque<CommPartner>::const_iterator iter)
│ │ │ │ -
280 {
│ │ │ │ -
281 i = iter;
│ │ │ │ -
282 }
│ │ │ │ -
│ │ │ │ -
283
│ │ │ │ -
│ │ │ │ -
285 int rank () const
│ │ │ │ -
286 {
│ │ │ │ -
287 return i->rank;
│ │ │ │ -
288 }
│ │ │ │ -
│ │ │ │ -
289
│ │ │ │ -
│ │ │ │ -
291 iTupel delta () const
│ │ │ │ -
292 {
│ │ │ │ -
293 return i->delta;
│ │ │ │ -
294 }
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
│ │ │ │ -
297 int index () const
│ │ │ │ -
298 {
│ │ │ │ -
299 return i->index;
│ │ │ │ -
300 }
│ │ │ │ -
│ │ │ │ -
301
│ │ │ │ -
│ │ │ │ -
303 int distance () const
│ │ │ │ -
304 {
│ │ │ │ -
305 int dist = 0;
│ │ │ │ -
306 iTupel delta=i->delta;
│ │ │ │ -
307 for (int j=0; j<d; ++j)
│ │ │ │ -
308 dist += std::abs(delta[j]);
│ │ │ │ -
309 return dist;
│ │ │ │ -
310 }
│ │ │ │ -
│ │ │ │ -
311
│ │ │ │ -
│ │ │ │ -
313 bool operator== (const ProcListIterator& iter) const
│ │ │ │ -
314 {
│ │ │ │ -
315 return i == iter.i;
│ │ │ │ -
316 }
│ │ │ │ -
│ │ │ │ -
317
│ │ │ │ -
318
│ │ │ │ -
│ │ │ │ -
320 bool operator!= (const ProcListIterator& iter) const
│ │ │ │ -
321 {
│ │ │ │ -
322 return i != iter.i;
│ │ │ │ -
323 }
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
327 {
│ │ │ │ -
328 ++i;
│ │ │ │ -
329 return *this;
│ │ │ │ -
330 }
│ │ │ │ -
│ │ │ │ -
331
│ │ │ │ -
332 private:
│ │ │ │ -
333 typename std::deque<CommPartner>::const_iterator i;
│ │ │ │ -
334 };
│ │ │ │ -
│ │ │ │ -
335
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
338 {
│ │ │ │ -
339 return ProcListIterator(_sendlist.begin());
│ │ │ │ -
340 }
│ │ │ │ -
│ │ │ │ -
341
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
344 {
│ │ │ │ -
345 return ProcListIterator(_sendlist.end());
│ │ │ │ -
346 }
│ │ │ │ -
│ │ │ │ -
347
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
350 {
│ │ │ │ -
351 return ProcListIterator(_recvlist.begin());
│ │ │ │ -
352 }
│ │ │ │ -
│ │ │ │ -
353
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
356 {
│ │ │ │ -
357 return ProcListIterator(_recvlist.end());
│ │ │ │ -
358 }
│ │ │ │ -
│ │ │ │ -
359
│ │ │ │ -
│ │ │ │ -
361 void send (int rank, void* buffer, int size) const
│ │ │ │ -
362 {
│ │ │ │ -
363 CommTask task;
│ │ │ │ -
364 task.rank = rank;
│ │ │ │ -
365 task.buffer = buffer;
│ │ │ │ -
366 task.size = size;
│ │ │ │ -
367 if (rank!=_comm.rank())
│ │ │ │ -
368 _sendrequests.push_back(task);
│ │ │ │ -
369 else
│ │ │ │ -
370 _localsendrequests.push_back(task);
│ │ │ │ -
371 }
│ │ │ │ -
│ │ │ │ -
372
│ │ │ │ -
│ │ │ │ -
374 void recv (int rank, void* buffer, int size) const
│ │ │ │ -
375 {
│ │ │ │ -
376 CommTask task;
│ │ │ │ -
377 task.rank = rank;
│ │ │ │ -
378 task.buffer = buffer;
│ │ │ │ -
379 task.size = size;
│ │ │ │ -
380 if (rank!=_comm.rank())
│ │ │ │ -
381 _recvrequests.push_back(task);
│ │ │ │ -
382 else
│ │ │ │ -
383 _localrecvrequests.push_back(task);
│ │ │ │ -
384 }
│ │ │ │ -
│ │ │ │ -
385
│ │ │ │ -
│ │ │ │ -
387 void exchange () const
│ │ │ │ -
388 {
│ │ │ │ -
389 // handle local requests first
│ │ │ │ -
390 if (_localsendrequests.size()!=_localrecvrequests.size())
│ │ │ │ -
391 {
│ │ │ │ -
392 std::cout << "[" << rank() << "]: ERROR: local sends/receives do not match in exchange!" << std::endl;
│ │ │ │ -
393 return;
│ │ │ │ -
394 }
│ │ │ │ -
395 for (unsigned int i=0; i<_localsendrequests.size(); i++)
│ │ │ │ -
396 {
│ │ │ │ -
397 if (_localsendrequests[i].size!=_localrecvrequests[i].size)
│ │ │ │ -
398 {
│ │ │ │ -
399 std::cout << "[" << rank() << "]: ERROR: size in local sends/receive does not match in exchange!" << std::endl;
│ │ │ │ -
400 return;
│ │ │ │ -
401 }
│ │ │ │ -
402 memcpy(_localrecvrequests[i].buffer,_localsendrequests[i].buffer,_localsendrequests[i].size);
│ │ │ │ -
403 }
│ │ │ │ -
404 _localsendrequests.clear();
│ │ │ │ -
405 _localrecvrequests.clear();
│ │ │ │ -
406
│ │ │ │ -
407#if HAVE_MPI
│ │ │ │ -
408 // handle foreign requests
│ │ │ │ -
409
│ │ │ │ -
410 std::vector<MPI_Request> requests(_sendrequests.size() + _recvrequests.size());
│ │ │ │ -
411 MPI_Request* req = requests.data();
│ │ │ │ -
412
│ │ │ │ -
413 // issue sends to foreign processes
│ │ │ │ -
414 for (unsigned int i=0; i<_sendrequests.size(); i++)
│ │ │ │ -
415 if (_sendrequests[i].rank!=rank())
│ │ │ │ -
416 {
│ │ │ │ -
417 // std::cout << "[" << rank() << "]" << " send " << _sendrequests[i].size << " bytes "
│ │ │ │ -
418 // << "to " << _sendrequests[i].rank << " p=" << _sendrequests[i].buffer << std::endl;
│ │ │ │ -
419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE,
│ │ │ │ -
420 _sendrequests[i].rank, _tag, _comm, req++);
│ │ │ │ -
421 }
│ │ │ │ -
422
│ │ │ │ -
423 // issue receives from foreign processes
│ │ │ │ -
424 for (unsigned int i=0; i<_recvrequests.size(); i++)
│ │ │ │ -
425 if (_recvrequests[i].rank!=rank())
│ │ │ │ -
426 {
│ │ │ │ -
427 // std::cout << "[" << rank() << "]" << " recv " << _recvrequests[i].size << " bytes "
│ │ │ │ -
428 // << "fm " << _recvrequests[i].rank << " p=" << _recvrequests[i].buffer << std::endl;
│ │ │ │ -
429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE,
│ │ │ │ -
430 _recvrequests[i].rank, _tag, _comm, req++);
│ │ │ │ -
431 }
│ │ │ │ -
432
│ │ │ │ -
433 // Wait for communication to complete
│ │ │ │ -
434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
│ │ │ │ -
435
│ │ │ │ -
436 // clear request buffers
│ │ │ │ -
437 _sendrequests.clear();
│ │ │ │ -
438 _recvrequests.clear();
│ │ │ │ -
439#endif
│ │ │ │ -
440 }
│ │ │ │ -
│ │ │ │ -
441
│ │ │ │ -
│ │ │ │ -
443 double global_max (double x) const
│ │ │ │ -
444 {
│ │ │ │ -
445 double res = 0.0;
│ │ │ │ -
446 _comm.template allreduce<Dune::Max<double>,double>(&x, &res, 1);
│ │ │ │ -
447 return res;
│ │ │ │ -
448 }
│ │ │ │ -
│ │ │ │ -
449
│ │ │ │ -
│ │ │ │ -
451 void print (std::ostream& s) const
│ │ │ │ -
452 {
│ │ │ │ -
453 s << "[" << rank() << "]: Torus " << procs() << " processor(s) arranged as " << dims() << std::endl;
│ │ │ │ -
454 for (ProcListIterator i=sendbegin(); i!=sendend(); ++i)
│ │ │ │ -
455 {
│ │ │ │ -
456 s << "[" << rank() << "]: send to "
│ │ │ │ -
457 << "rank=" << i.rank()
│ │ │ │ -
458 << " index=" << i.index()
│ │ │ │ -
459 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
│ │ │ │ -
460 }
│ │ │ │ -
461 for (ProcListIterator i=recvbegin(); i!=recvend(); ++i)
│ │ │ │ -
462 {
│ │ │ │ -
463 s << "[" << rank() << "]: recv from "
│ │ │ │ -
464 << "rank=" << i.rank()
│ │ │ │ -
465 << " index=" << i.index()
│ │ │ │ -
466 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
│ │ │ │ -
467 }
│ │ │ │ -
468 }
│ │ │ │ -
│ │ │ │ -
469
│ │ │ │ -
470 private:
│ │ │ │ -
471
│ │ │ │ -
472 void proclists ()
│ │ │ │ -
473 {
│ │ │ │ -
474 // compile the full neighbor list
│ │ │ │ -
475 CommPartner cp;
│ │ │ │ -
476 iTupel delta;
│ │ │ │ -
477
│ │ │ │ -
478 std::fill(delta.begin(), delta.end(), -1);
│ │ │ │ -
479 bool ready = false;
│ │ │ │ -
480 iTupel me, nb;
│ │ │ │ -
481 me = rank_to_coord(_comm.rank());
│ │ │ │ -
482 int index = 0;
│ │ │ │ -
483 int last = neighbors()-1;
│ │ │ │ -
484 while (!ready)
│ │ │ │ -
485 {
│ │ │ │ -
486 // find neighbors coordinates
│ │ │ │ -
487 for (int i=0; i<d; i++)
│ │ │ │ -
488 nb[i] = ( me[i]+_dims[i]+delta[i] ) % _dims[i];
│ │ │ │ -
489
│ │ │ │ -
490 // find neighbors rank
│ │ │ │ -
491 int nbrank = coord_to_rank(nb);
│ │ │ │ -
492
│ │ │ │ -
493 // check if delta is not zero
│ │ │ │ -
494 for (int i=0; i<d; i++)
│ │ │ │ -
495 if (delta[i]!=0)
│ │ │ │ -
496 {
│ │ │ │ -
497 cp.rank = nbrank;
│ │ │ │ -
498 cp.delta = delta;
│ │ │ │ -
499 cp.index = index;
│ │ │ │ -
500 _recvlist.push_back(cp);
│ │ │ │ -
501 cp.index = last-index;
│ │ │ │ -
502 _sendlist.push_front(cp);
│ │ │ │ -
503 index++;
│ │ │ │ -
504 break;
│ │ │ │ -
505 }
│ │ │ │ -
506
│ │ │ │ -
507 // next neighbor
│ │ │ │ -
508 ready = true;
│ │ │ │ -
509 for (int i=0; i<d; i++)
│ │ │ │ -
510 if (delta[i]<1)
│ │ │ │ -
511 {
│ │ │ │ -
512 (delta[i])++;
│ │ │ │ -
513 ready=false;
│ │ │ │ -
514 break;
│ │ │ │ -
515 }
│ │ │ │ -
516 else
│ │ │ │ -
517 {
│ │ │ │ -
518 delta[i] = -1;
│ │ │ │ -
519 }
│ │ │ │ -
520 }
│ │ │ │ -
521
│ │ │ │ -
522 }
│ │ │ │ -
523
│ │ │ │ -
524 Communication _comm;
│ │ │ │ -
525
│ │ │ │ -
526 iTupel _dims;
│ │ │ │ -
527 iTupel _increment;
│ │ │ │ -
528 int _tag;
│ │ │ │ -
529 std::deque<CommPartner> _sendlist;
│ │ │ │ -
530 std::deque<CommPartner> _recvlist;
│ │ │ │ -
531
│ │ │ │ -
532 mutable std::vector<CommTask> _sendrequests;
│ │ │ │ -
533 mutable std::vector<CommTask> _recvrequests;
│ │ │ │ -
534 mutable std::vector<CommTask> _localsendrequests;
│ │ │ │ -
535 mutable std::vector<CommTask> _localrecvrequests;
│ │ │ │ -
536
│ │ │ │ -
537 };
│ │ │ │ -
│ │ │ │ -
538
│ │ │ │ -
540 template <class Communication, int d>
│ │ │ │ -
│ │ │ │ -
541 inline std::ostream& operator<< (std::ostream& s, const Torus<Communication, d> & t)
│ │ │ │ -
542 {
│ │ │ │ -
543 t.print(s);
│ │ │ │ -
544 return s;
│ │ │ │ -
545 }
│ │ │ │ -
│ │ │ │ -
546}
│ │ │ │ -
547
│ │ │ │ -
548#endif
│ │ │ │ -
This file provides tools to partition YaspGrids. If you want to write your own partitioner,...
│ │ │ │ - │ │ │ │ -
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │ +
129 };
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
131} // namespace Dune
│ │ │ │ +
132#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:39
│ │ │ │ -
virtual void partition(const iTupel &, int, iTupel &, int) const =0
│ │ │ │ -
Definition torus.hh:46
│ │ │ │ -
Torus()
constructor making uninitialized object
Definition torus.hh:67
│ │ │ │ -
int color(int rank) const
assign color to given rank
Definition torus.hh:197
│ │ │ │ -
double partition(int rank, iTupel origin_in, iTupel size_in, iTupel &origin_out, iTupel &size_out) const
partition the given grid onto the torus and return the piece of the process with given rank; returns ...
Definition torus.hh:239
│ │ │ │ -
int dims(int i) const
return dimensions of torus in direction i
Definition torus.hh:118
│ │ │ │ -
iTupel coord() const
return own coordinates
Definition torus.hh:100
│ │ │ │ -
int rank() const
return own rank
Definition torus.hh:94
│ │ │ │ -
const iTupel & dims() const
return dimensions of torus
Definition torus.hh:112
│ │ │ │ -
int rank_relative(int rank, int dir, int cnt) const
return rank of process where its coordinate in direction dir has offset cnt (handles periodic case)
Definition torus.hh:166
│ │ │ │ -
void recv(int rank, void *buffer, int size) const
store a receive request; buffers are received in order; handles also local requests with memcpy
Definition torus.hh:374
│ │ │ │ -
void send(int rank, void *buffer, int size) const
store a send request; buffers are sent in order; handles also local requests with memcpy
Definition torus.hh:361
│ │ │ │ -
Torus(Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning< d > *partitioner)
make partitioner from communicator and coarse mesh size
Definition torus.hh:71
│ │ │ │ -
int neighbors() const
return the number of neighbors, which is
Definition torus.hh:203
│ │ │ │ -
void print(std::ostream &s) const
print contents of torus object
Definition torus.hh:451
│ │ │ │ -
double global_max(double x) const
global max
Definition torus.hh:443
│ │ │ │ -
Communication comm() const
return communicator
Definition torus.hh:124
│ │ │ │ -
int color(const iTupel &coord) const
assign color to given coordinate
Definition torus.hh:174
│ │ │ │ -
ProcListIterator recvend() const
last process in receive list
Definition torus.hh:355
│ │ │ │ -
bool is_neighbor(iTupel delta, std::bitset< d > periodic) const
return true if neighbor with given delta is a neighbor under the given periodicity
Definition torus.hh:212
│ │ │ │ -
ProcListIterator sendend() const
end of send list
Definition torus.hh:343
│ │ │ │ -
int procs() const
return number of processes
Definition torus.hh:106
│ │ │ │ -
iTupel rank_to_coord(int rank) const
map rank to coordinate in torus using lexicographic ordering
Definition torus.hh:144
│ │ │ │ -
std::array< int, d > iTupel
type used to pass tupels in and out
Definition torus.hh:49
│ │ │ │ -
ProcListIterator sendbegin() const
first process in send list
Definition torus.hh:337
│ │ │ │ -
void exchange() const
exchange messages stored in request buffers; clear request buffers afterwards
Definition torus.hh:387
│ │ │ │ -
ProcListIterator recvbegin() const
first process in receive list
Definition torus.hh:349
│ │ │ │ -
int coord_to_rank(iTupel coord) const
map coordinate in torus to rank using lexicographic ordering
Definition torus.hh:157
│ │ │ │ -
bool inside(iTupel c) const
return true if coordinate is inside torus
Definition torus.hh:136
│ │ │ │ -
int tag() const
return tag used by torus
Definition torus.hh:130
│ │ │ │ -
Definition torus.hh:276
│ │ │ │ -
iTupel delta() const
return distance vector
Definition torus.hh:291
│ │ │ │ -
bool operator==(const ProcListIterator &iter) const
Return true when two iterators point to same member.
Definition torus.hh:313
│ │ │ │ -
bool operator!=(const ProcListIterator &iter) const
Return true when two iterators do not point to same member.
Definition torus.hh:320
│ │ │ │ -
int rank() const
return rank of neighboring process
Definition torus.hh:285
│ │ │ │ -
ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)
make an iterator
Definition torus.hh:279
│ │ │ │ -
ProcListIterator & operator++()
Increment iterator to next cell.
Definition torus.hh:326
│ │ │ │ -
int index() const
return index in proclist
Definition torus.hh:297
│ │ │ │ -
int distance() const
return 1-norm of distance vector
Definition torus.hh:303
│ │ │ │ +
Construct structured cube and simplex grids in unstructured grid managers.
Definition utility/structuredgridfactory.hh:31
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ +
Container for equidistant coordinates in a YaspGrid.
Definition coordinates.hh:29
│ │ │ │ +
Container for equidistant coordinates in a YaspGrid with non-trivial origin.
Definition coordinates.hh:131
│ │ │ │ +
static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured cube grid.
Definition structuredyaspgridfactory.hh:45
│ │ │ │ +
static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured simplex grid.
Definition structuredyaspgridfactory.hh:71
│ │ │ │ +
static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured cube grid.
Definition structuredyaspgridfactory.hh:102
│ │ │ │ +
static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured simplex grid.
Definition structuredyaspgridfactory.hh:120
│ │ │ │ +
A class to construct structured cube and simplex grids using the grid factory.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,680 +1,148 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -torus.hh │ │ │ │ │ +structuredyaspgridfactory.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRID_TORUS_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRID_TORUS_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#if HAVE_MPI │ │ │ │ │ -16#include │ │ │ │ │ -17#endif │ │ │ │ │ -18 │ │ │ │ │ -19#include │ │ │ │ │ -20#include │ │ │ │ │ -21#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ │ -22 │ │ │ │ │ -23#include "_p_a_r_t_i_t_i_o_n_i_n_g_._h_h" │ │ │ │ │ -24 │ │ │ │ │ -29namespace _D_u_n_e │ │ │ │ │ -30{ │ │ │ │ │ -31 │ │ │ │ │ -45 template │ │ │ │ │ -_4_6 class _T_o_r_u_s { │ │ │ │ │ -47 public: │ │ │ │ │ -_4_9 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -50 │ │ │ │ │ -51 │ │ │ │ │ -52 private: │ │ │ │ │ -53 struct CommPartner { │ │ │ │ │ -54 int rank; │ │ │ │ │ -55 _i_T_u_p_e_l delta; │ │ │ │ │ -56 int index; │ │ │ │ │ -57 }; │ │ │ │ │ -58 │ │ │ │ │ -59 struct CommTask { │ │ │ │ │ -60 int rank; // process to send to / receive from │ │ │ │ │ -61 int size; // size of buffer │ │ │ │ │ -62 void *buffer; // buffer to send / receive │ │ │ │ │ -63 }; │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_s_t_r_u_c_t_u_r_e_d_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y<_Y_a_s_p_G_r_i_d │ │ │ │ │ +> > │ │ │ │ │ +29 { │ │ │ │ │ +30 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_d_i_m_> > _G_r_i_d_T_y_p_e; │ │ │ │ │ +31 static const int dimworld = GridType::dimensionworld; │ │ │ │ │ +32 │ │ │ │ │ +33 public: │ │ │ │ │ +44 static std::unique_ptr │ │ │ │ │ +_4_5 _c_r_e_a_t_e_C_u_b_e_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ +46 const FieldVector& upperRight, │ │ │ │ │ +47 const std::array& elements) │ │ │ │ │ +48 { │ │ │ │ │ +49 using std::abs; │ │ │ │ │ +50 for(int d = 0; d < dimworld; ++d) │ │ │ │ │ +51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10) │ │ │ │ │ +52 DUNE_THROW(_G_r_i_d_E_r_r_o_r, className() │ │ │ │ │ +53 << "::createCubeGrid(): You have to use Yaspgrid > as your" │ │ │ │ │ +55 "grid type for non-trivial origin." ); │ │ │ │ │ +56 │ │ │ │ │ +57 // construct array of ints instead of unsigned ints │ │ │ │ │ +58 std::array elem; │ │ │ │ │ +59 std::copy(elements.begin(), elements.end(), elem.begin()); │ │ │ │ │ +60 │ │ │ │ │ +61 return std::make_unique(upperRight, elem, │ │ │ │ │ +62 std::bitset(), 1); // default constructor of bitset sets to zero │ │ │ │ │ +63 } │ │ │ │ │ 64 │ │ │ │ │ -65 public: │ │ │ │ │ -_6_7 _T_o_r_u_s () │ │ │ │ │ -68 {} │ │ │ │ │ -69 │ │ │ │ │ -_7_1 _T_o_r_u_s (Communication _c_o_m_m, int _t_a_g, _i_T_u_p_e_l size, int overlap, const _Y_a_s_p_:_: │ │ │ │ │ -_P_a_r_t_i_t_i_o_n_i_n_g_<_d_>* partitioner) │ │ │ │ │ -72 : _comm(_c_o_m_m), _tag(_t_a_g) │ │ │ │ │ -73 { │ │ │ │ │ -74 // determine dimensions │ │ │ │ │ -75 partitioner->_p_a_r_t_i_t_i_o_n(size, _comm.size(), _dims, overlap); │ │ │ │ │ -76 │ │ │ │ │ -77 // compute increments for lexicographic ordering │ │ │ │ │ -78 int inc = 1; │ │ │ │ │ -79 for (int i=0; i │ │ │ │ │ +_7_1 _c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ +72 const FieldVector& upperRight, │ │ │ │ │ +73 const std::array& elements) │ │ │ │ │ +74 { │ │ │ │ │ +75 DUNE_THROW(_G_r_i_d_E_r_r_o_r, className() │ │ │ │ │ +76 << "::createSimplexGrid(): Simplices are not supported " │ │ │ │ │ +77 "by YaspGrid."); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +80 }; │ │ │ │ │ +81 │ │ │ │ │ +89 template │ │ │ │ │ +_9_0 class _S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y<_Y_a_s_p_G_r_i_d > > { │ │ │ │ │ +91 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_d_i_m_> > _G_r_i_d_T_y_p_e; │ │ │ │ │ +92 static const int dimworld = GridType::dimensionworld; │ │ │ │ │ +93 │ │ │ │ │ +94 public: │ │ │ │ │ +101 static std::unique_ptr │ │ │ │ │ +_1_0_2 _c_r_e_a_t_e_C_u_b_e_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ +103 const FieldVector& upperRight, │ │ │ │ │ +104 const std::array& elements) │ │ │ │ │ +105 { │ │ │ │ │ +106 // construct array of ints instead of unsigned ints │ │ │ │ │ +107 std::array elem; │ │ │ │ │ +108 std::copy(elements.begin(), elements.end(), elem.begin()); │ │ │ │ │ +109 │ │ │ │ │ +110 return std::make_unique(lowerLeft, upperRight, elem, │ │ │ │ │ +111 std::bitset(), 1); // default constructor of bitset sets to zero │ │ │ │ │ +112 } │ │ │ │ │ +113 │ │ │ │ │ +119 static std::unique_ptr │ │ │ │ │ +_1_2_0 _c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d(const FieldVector& lowerLeft, │ │ │ │ │ +121 const FieldVector& upperRight, │ │ │ │ │ +122 const std::array& elements) │ │ │ │ │ +123 { │ │ │ │ │ +124 DUNE_THROW(_G_r_i_d_E_r_r_o_r, className() │ │ │ │ │ +125 << "::createSimplexGrid(): Simplices are not supported " │ │ │ │ │ +126 "by YaspGrid."); │ │ │ │ │ 127 } │ │ │ │ │ 128 │ │ │ │ │ -_1_3_0 int _t_a_g () const │ │ │ │ │ -131 { │ │ │ │ │ -132 return _tag; │ │ │ │ │ -133 } │ │ │ │ │ -134 │ │ │ │ │ -_1_3_6 bool _i_n_s_i_d_e (_i_T_u_p_e_l c) const │ │ │ │ │ -137 { │ │ │ │ │ -138 for (int i=d-1; i>=0; i--) │ │ │ │ │ -139 if (c[i]<0 || c[i]>=_dims[i]) return false; │ │ │ │ │ -140 return true; │ │ │ │ │ -141 } │ │ │ │ │ -142 │ │ │ │ │ -_1_4_4 _i_T_u_p_e_l _r_a_n_k___t_o___c_o_o_r_d (int _r_a_n_k) const │ │ │ │ │ -145 { │ │ │ │ │ -146 _i_T_u_p_e_l _c_o_o_r_d; │ │ │ │ │ -147 _r_a_n_k = _r_a_n_k%_comm.size(); │ │ │ │ │ -148 for (int i=d-1; i>=0; i--) │ │ │ │ │ -149 { │ │ │ │ │ -150 _c_o_o_r_d[i] = _r_a_n_k/_increment[i]; │ │ │ │ │ -151 _r_a_n_k = _r_a_n_k%_increment[i]; │ │ │ │ │ -152 } │ │ │ │ │ -153 return _c_o_o_r_d; │ │ │ │ │ -154 } │ │ │ │ │ -155 │ │ │ │ │ -_1_5_7 int _c_o_o_r_d___t_o___r_a_n_k (_i_T_u_p_e_l _c_o_o_r_d) const │ │ │ │ │ -158 { │ │ │ │ │ -159 for (int i=0; i1 && _c_o_o_r_d[i]==_dims[i]-1) c += power; │ │ │ │ │ -190 power *= 2; │ │ │ │ │ -191 } │ │ │ │ │ -192 │ │ │ │ │ -193 return c; │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -_1_9_7 int _c_o_l_o_r (int _r_a_n_k) const │ │ │ │ │ -198 { │ │ │ │ │ -199 return _c_o_l_o_r(_r_a_n_k___t_o___c_o_o_r_d(_r_a_n_k)); │ │ │ │ │ -200 } │ │ │ │ │ -201 │ │ │ │ │ -_2_0_3 int _n_e_i_g_h_b_o_r_s () const │ │ │ │ │ -204 { │ │ │ │ │ -205 int n=1; │ │ │ │ │ -206 for (int i=0; i periodic) const │ │ │ │ │ -213 { │ │ │ │ │ -214 _i_T_u_p_e_l _c_o_o_r_d = _r_a_n_k___t_o___c_o_o_r_d(_comm.rank()); // my own coordinate with 0 <= │ │ │ │ │ -c_i < dims_i │ │ │ │ │ -215 │ │ │ │ │ -216 for (int i=0; i no neighbor │ │ │ │ │ -221 if (_c_o_o_r_d[i]==0 && periodic[i]==false) return false; │ │ │ │ │ -222 } │ │ │ │ │ -223 if (delta[i]>0) │ │ │ │ │ -224 { │ │ │ │ │ -225 // if I am on the boundary and domain is not periodic => no neighbor │ │ │ │ │ -226 if (_c_o_o_r_d[i]==_dims[i]-1 && periodic[i]==false) return false; │ │ │ │ │ -227 } │ │ │ │ │ -228 } │ │ │ │ │ -229 return true; │ │ │ │ │ -230 } │ │ │ │ │ -231 │ │ │ │ │ -_2_3_9 double _p_a_r_t_i_t_i_o_n (int _r_a_n_k, _i_T_u_p_e_l origin_in, _i_T_u_p_e_l size_in, _i_T_u_p_e_l& │ │ │ │ │ -origin_out, _i_T_u_p_e_l& size_out) const │ │ │ │ │ -240 { │ │ │ │ │ -241 _i_T_u_p_e_l _c_o_o_r_d = _r_a_n_k___t_o___c_o_o_r_d(_r_a_n_k); │ │ │ │ │ -242 double maxsize = 1; │ │ │ │ │ -243 double sz = 1; │ │ │ │ │ -244 │ │ │ │ │ -245 // make a tensor product partition │ │ │ │ │ -246 for (int i=0; i::const_iterator iter) │ │ │ │ │ -280 { │ │ │ │ │ -281 i = iter; │ │ │ │ │ -282 } │ │ │ │ │ -283 │ │ │ │ │ -_2_8_5 int _r_a_n_k () const │ │ │ │ │ -286 { │ │ │ │ │ -287 return i->rank; │ │ │ │ │ -288 } │ │ │ │ │ -289 │ │ │ │ │ -_2_9_1 _i_T_u_p_e_l _d_e_l_t_a () const │ │ │ │ │ -292 { │ │ │ │ │ -293 return i->delta; │ │ │ │ │ -294 } │ │ │ │ │ -295 │ │ │ │ │ -_2_9_7 int _i_n_d_e_x () const │ │ │ │ │ -298 { │ │ │ │ │ -299 return i->index; │ │ │ │ │ -300 } │ │ │ │ │ -301 │ │ │ │ │ -_3_0_3 int _d_i_s_t_a_n_c_e () const │ │ │ │ │ -304 { │ │ │ │ │ -305 int dist = 0; │ │ │ │ │ -306 _i_T_u_p_e_l _d_e_l_t_a=i->delta; │ │ │ │ │ -307 for (int j=0; j::const_iterator i; │ │ │ │ │ -334 }; │ │ │ │ │ -335 │ │ │ │ │ -_3_3_7 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _s_e_n_d_b_e_g_i_n () const │ │ │ │ │ -338 { │ │ │ │ │ -339 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_sendlist.begin()); │ │ │ │ │ -340 } │ │ │ │ │ -341 │ │ │ │ │ -_3_4_3 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _s_e_n_d_e_n_d () const │ │ │ │ │ -344 { │ │ │ │ │ -345 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_sendlist.end()); │ │ │ │ │ -346 } │ │ │ │ │ -347 │ │ │ │ │ -_3_4_9 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _r_e_c_v_b_e_g_i_n () const │ │ │ │ │ -350 { │ │ │ │ │ -351 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_recvlist.begin()); │ │ │ │ │ -352 } │ │ │ │ │ -353 │ │ │ │ │ -_3_5_5 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r _r_e_c_v_e_n_d () const │ │ │ │ │ -356 { │ │ │ │ │ -357 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_recvlist.end()); │ │ │ │ │ -358 } │ │ │ │ │ -359 │ │ │ │ │ -_3_6_1 void _s_e_n_d (int _r_a_n_k, void* buffer, int size) const │ │ │ │ │ -362 { │ │ │ │ │ -363 CommTask task; │ │ │ │ │ -364 task.rank = _r_a_n_k; │ │ │ │ │ -365 task.buffer = buffer; │ │ │ │ │ -366 task.size = size; │ │ │ │ │ -367 if (_r_a_n_k!=_comm.rank()) │ │ │ │ │ -368 _sendrequests.push_back(task); │ │ │ │ │ -369 else │ │ │ │ │ -370 _localsendrequests.push_back(task); │ │ │ │ │ -371 } │ │ │ │ │ -372 │ │ │ │ │ -_3_7_4 void _r_e_c_v (int _r_a_n_k, void* buffer, int size) const │ │ │ │ │ -375 { │ │ │ │ │ -376 CommTask task; │ │ │ │ │ -377 task.rank = _r_a_n_k; │ │ │ │ │ -378 task.buffer = buffer; │ │ │ │ │ -379 task.size = size; │ │ │ │ │ -380 if (_r_a_n_k!=_comm.rank()) │ │ │ │ │ -381 _recvrequests.push_back(task); │ │ │ │ │ -382 else │ │ │ │ │ -383 _localrecvrequests.push_back(task); │ │ │ │ │ -384 } │ │ │ │ │ -385 │ │ │ │ │ -_3_8_7 void _e_x_c_h_a_n_g_e () const │ │ │ │ │ -388 { │ │ │ │ │ -389 // handle local requests first │ │ │ │ │ -390 if (_localsendrequests.size()!=_localrecvrequests.size()) │ │ │ │ │ -391 { │ │ │ │ │ -392 std::cout << "[" << _r_a_n_k() << "]: ERROR: local sends/receives do not match │ │ │ │ │ -in exchange!" << std::endl; │ │ │ │ │ -393 return; │ │ │ │ │ -394 } │ │ │ │ │ -395 for (unsigned int i=0; i<_localsendrequests.size(); i++) │ │ │ │ │ -396 { │ │ │ │ │ -397 if (_localsendrequests[i].size!=_localrecvrequests[i].size) │ │ │ │ │ -398 { │ │ │ │ │ -399 std::cout << "[" << _r_a_n_k() << "]: ERROR: size in local sends/receive does │ │ │ │ │ -not match in exchange!" << std::endl; │ │ │ │ │ -400 return; │ │ │ │ │ -401 } │ │ │ │ │ -402 memcpy(_localrecvrequests[i].buffer,_localsendrequests │ │ │ │ │ -[i].buffer,_localsendrequests[i].size); │ │ │ │ │ -403 } │ │ │ │ │ -404 _localsendrequests.clear(); │ │ │ │ │ -405 _localrecvrequests.clear(); │ │ │ │ │ -406 │ │ │ │ │ -407#if HAVE_MPI │ │ │ │ │ -408 // handle foreign requests │ │ │ │ │ -409 │ │ │ │ │ -410 std::vector requests(_sendrequests.size() + _recvrequests.size │ │ │ │ │ -()); │ │ │ │ │ -411 MPI_Request* req = requests.data(); │ │ │ │ │ -412 │ │ │ │ │ -413 // issue sends to foreign processes │ │ │ │ │ -414 for (unsigned int i=0; i<_sendrequests.size(); i++) │ │ │ │ │ -415 if (_sendrequests[i]._r_a_n_k!=_r_a_n_k()) │ │ │ │ │ -416 { │ │ │ │ │ -417 // std::cout << "[" << rank() << "]" << " send " << _sendrequests[i].size │ │ │ │ │ -<< " bytes " │ │ │ │ │ -418 // << "to " << _sendrequests[i].rank << " p=" << _sendrequests[i].buffer << │ │ │ │ │ -std::endl; │ │ │ │ │ -419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE, │ │ │ │ │ -420 _sendrequests[i]._r_a_n_k, _tag, _comm, req++); │ │ │ │ │ -421 } │ │ │ │ │ -422 │ │ │ │ │ -423 // issue receives from foreign processes │ │ │ │ │ -424 for (unsigned int i=0; i<_recvrequests.size(); i++) │ │ │ │ │ -425 if (_recvrequests[i]._r_a_n_k!=_r_a_n_k()) │ │ │ │ │ -426 { │ │ │ │ │ -427 // std::cout << "[" << rank() << "]" << " recv " << _recvrequests[i].size │ │ │ │ │ -<< " bytes " │ │ │ │ │ -428 // << "fm " << _recvrequests[i].rank << " p=" << _recvrequests[i].buffer << │ │ │ │ │ -std::endl; │ │ │ │ │ -429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE, │ │ │ │ │ -430 _recvrequests[i]._r_a_n_k, _tag, _comm, req++); │ │ │ │ │ -431 } │ │ │ │ │ -432 │ │ │ │ │ -433 // Wait for communication to complete │ │ │ │ │ -434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE); │ │ │ │ │ -435 │ │ │ │ │ -436 // clear request buffers │ │ │ │ │ -437 _sendrequests.clear(); │ │ │ │ │ -438 _recvrequests.clear(); │ │ │ │ │ -439#endif │ │ │ │ │ -440 } │ │ │ │ │ -441 │ │ │ │ │ -_4_4_3 double _g_l_o_b_a_l___m_a_x (double x) const │ │ │ │ │ -444 { │ │ │ │ │ -445 double res = 0.0; │ │ │ │ │ -446 _comm.template allreduce,double>(&x, &res, 1); │ │ │ │ │ -447 return res; │ │ │ │ │ -448 } │ │ │ │ │ -449 │ │ │ │ │ -_4_5_1 void _p_r_i_n_t (std::ostream& s) const │ │ │ │ │ -452 { │ │ │ │ │ -453 s << "[" << _r_a_n_k() << "]: Torus " << _p_r_o_c_s() << " processor(s) arranged as │ │ │ │ │ -" << _d_i_m_s() << std::endl; │ │ │ │ │ -454 for (_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r i=_s_e_n_d_b_e_g_i_n(); i!=_s_e_n_d_e_n_d(); ++i) │ │ │ │ │ -455 { │ │ │ │ │ -456 s << "[" << _r_a_n_k() << "]: send to " │ │ │ │ │ -457 << "rank=" << i.rank() │ │ │ │ │ -458 << " index=" << i.index() │ │ │ │ │ -459 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl; │ │ │ │ │ -460 } │ │ │ │ │ -461 for (_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r i=_r_e_c_v_b_e_g_i_n(); i!=_r_e_c_v_e_n_d(); ++i) │ │ │ │ │ -462 { │ │ │ │ │ -463 s << "[" << _r_a_n_k() << "]: recv from " │ │ │ │ │ -464 << "rank=" << i.rank() │ │ │ │ │ -465 << " index=" << i.index() │ │ │ │ │ -466 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl; │ │ │ │ │ -467 } │ │ │ │ │ -468 } │ │ │ │ │ -469 │ │ │ │ │ -470 private: │ │ │ │ │ -471 │ │ │ │ │ -472 void proclists () │ │ │ │ │ -473 { │ │ │ │ │ -474 // compile the full neighbor list │ │ │ │ │ -475 CommPartner cp; │ │ │ │ │ -476 _i_T_u_p_e_l delta; │ │ │ │ │ -477 │ │ │ │ │ -478 std::fill(delta.begin(), delta.end(), -1); │ │ │ │ │ -479 bool ready = false; │ │ │ │ │ -480 _i_T_u_p_e_l me, nb; │ │ │ │ │ -481 me = _r_a_n_k___t_o___c_o_o_r_d(_comm.rank()); │ │ │ │ │ -482 int index = 0; │ │ │ │ │ -483 int last = _n_e_i_g_h_b_o_r_s()-1; │ │ │ │ │ -484 while (!ready) │ │ │ │ │ -485 { │ │ │ │ │ -486 // find neighbors coordinates │ │ │ │ │ -487 for (int i=0; i _sendlist; │ │ │ │ │ -530 std::deque _recvlist; │ │ │ │ │ -531 │ │ │ │ │ -532 mutable std::vector _sendrequests; │ │ │ │ │ -533 mutable std::vector _recvrequests; │ │ │ │ │ -534 mutable std::vector _localsendrequests; │ │ │ │ │ -535 mutable std::vector _localrecvrequests; │ │ │ │ │ -536 │ │ │ │ │ -537 }; │ │ │ │ │ -538 │ │ │ │ │ -540 template │ │ │ │ │ -_5_4_1 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, const │ │ │ │ │ -_T_o_r_u_s_<_C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_> & t) │ │ │ │ │ -542 { │ │ │ │ │ -543 t._p_r_i_n_t(s); │ │ │ │ │ -544 return s; │ │ │ │ │ -545 } │ │ │ │ │ -546} │ │ │ │ │ -547 │ │ │ │ │ -548#endif │ │ │ │ │ -_p_a_r_t_i_t_i_o_n_i_n_g_._h_h │ │ │ │ │ -This file provides tools to partition YaspGrids. If you want to write your own │ │ │ │ │ -partitioner,... │ │ │ │ │ -_e_x_c_e_p_t_i_o_n_s_._h_h │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ │ -write a PartitionType to a stream │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ │ +129 }; │ │ │ │ │ +130 │ │ │ │ │ +131} // namespace Dune │ │ │ │ │ +132#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -a base class for the yaspgrid partitioning strategy │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -virtual void partition(const iTupel &, int, iTupel &, int) const =0 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_T_o_r_u_s │ │ │ │ │ -Torus() │ │ │ │ │ -constructor making uninitialized object │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_l_o_r │ │ │ │ │ -int color(int rank) const │ │ │ │ │ -assign color to given rank │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -double partition(int rank, iTupel origin_in, iTupel size_in, iTupel │ │ │ │ │ -&origin_out, iTupel &size_out) const │ │ │ │ │ -partition the given grid onto the torus and return the piece of the process │ │ │ │ │ -with given rank; returns ... │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:239 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_d_i_m_s │ │ │ │ │ -int dims(int i) const │ │ │ │ │ -return dimensions of torus in direction i │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_o_r_d │ │ │ │ │ -iTupel coord() const │ │ │ │ │ -return own coordinates │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_r_a_n_k │ │ │ │ │ -int rank() const │ │ │ │ │ -return own rank │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_d_i_m_s │ │ │ │ │ -const iTupel & dims() const │ │ │ │ │ -return dimensions of torus │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_r_a_n_k___r_e_l_a_t_i_v_e │ │ │ │ │ -int rank_relative(int rank, int dir, int cnt) const │ │ │ │ │ -return rank of process where its coordinate in direction dir has offset cnt │ │ │ │ │ -(handles periodic case) │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_r_e_c_v │ │ │ │ │ -void recv(int rank, void *buffer, int size) const │ │ │ │ │ -store a receive request; buffers are received in order; handles also local │ │ │ │ │ -requests with memcpy │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:374 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_s_e_n_d │ │ │ │ │ -void send(int rank, void *buffer, int size) const │ │ │ │ │ -store a send request; buffers are sent in order; handles also local requests │ │ │ │ │ -with memcpy │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:361 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_T_o_r_u_s │ │ │ │ │ -Torus(Communication comm, int tag, iTupel size, int overlap, const Yasp:: │ │ │ │ │ -Partitioning< d > *partitioner) │ │ │ │ │ -make partitioner from communicator and coarse mesh size │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_n_e_i_g_h_b_o_r_s │ │ │ │ │ -int neighbors() const │ │ │ │ │ -return the number of neighbors, which is │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &s) const │ │ │ │ │ -print contents of torus object │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:451 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_g_l_o_b_a_l___m_a_x │ │ │ │ │ -double global_max(double x) const │ │ │ │ │ -global max │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:443 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_m_m │ │ │ │ │ -Communication comm() const │ │ │ │ │ -return communicator │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_l_o_r │ │ │ │ │ -int color(const iTupel &coord) const │ │ │ │ │ -assign color to given coordinate │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:174 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_r_e_c_v_e_n_d │ │ │ │ │ -ProcListIterator recvend() const │ │ │ │ │ -last process in receive list │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:355 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_i_s___n_e_i_g_h_b_o_r │ │ │ │ │ -bool is_neighbor(iTupel delta, std::bitset< d > periodic) const │ │ │ │ │ -return true if neighbor with given delta is a neighbor under the given │ │ │ │ │ -periodicity │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:212 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_s_e_n_d_e_n_d │ │ │ │ │ -ProcListIterator sendend() const │ │ │ │ │ -end of send list │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:343 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_p_r_o_c_s │ │ │ │ │ -int procs() const │ │ │ │ │ -return number of processes │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_r_a_n_k___t_o___c_o_o_r_d │ │ │ │ │ -iTupel rank_to_coord(int rank) const │ │ │ │ │ -map rank to coordinate in torus using lexicographic ordering │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -type used to pass tupels in and out │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_s_e_n_d_b_e_g_i_n │ │ │ │ │ -ProcListIterator sendbegin() const │ │ │ │ │ -first process in send list │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:337 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_e_x_c_h_a_n_g_e │ │ │ │ │ -void exchange() const │ │ │ │ │ -exchange messages stored in request buffers; clear request buffers afterwards │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_r_e_c_v_b_e_g_i_n │ │ │ │ │ -ProcListIterator recvbegin() const │ │ │ │ │ -first process in receive list │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:349 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_c_o_o_r_d___t_o___r_a_n_k │ │ │ │ │ -int coord_to_rank(iTupel coord) const │ │ │ │ │ -map coordinate in torus to rank using lexicographic ordering │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_i_n_s_i_d_e │ │ │ │ │ -bool inside(iTupel c) const │ │ │ │ │ -return true if coordinate is inside torus │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_t_a_g │ │ │ │ │ -int tag() const │ │ │ │ │ -return tag used by torus │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:276 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_d_e_l_t_a │ │ │ │ │ -iTupel delta() const │ │ │ │ │ -return distance vector │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:291 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(const ProcListIterator &iter) const │ │ │ │ │ -Return true when two iterators point to same member. │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:313 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ -bool operator!=(const ProcListIterator &iter) const │ │ │ │ │ -Return true when two iterators do not point to same member. │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:320 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_r_a_n_k │ │ │ │ │ -int rank() const │ │ │ │ │ -return rank of neighboring process │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -ProcListIterator(typename std::deque< CommPartner >::const_iterator iter) │ │ │ │ │ -make an iterator │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:279 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ -ProcListIterator & operator++() │ │ │ │ │ -Increment iterator to next cell. │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:326 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_i_n_d_e_x │ │ │ │ │ -int index() const │ │ │ │ │ -return index in proclist │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:297 │ │ │ │ │ -_D_u_n_e_:_:_T_o_r_u_s_:_:_P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r_:_:_d_i_s_t_a_n_c_e │ │ │ │ │ -int distance() const │ │ │ │ │ -return 1-norm of distance vector │ │ │ │ │ -DDeeffiinniittiioonn torus.hh:303 │ │ │ │ │ +_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Construct structured cube and simplex grids in unstructured grid managers. │ │ │ │ │ +DDeeffiinniittiioonn utility/structuredgridfactory.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ +Base class for exceptions in Dune grid modules. │ │ │ │ │ +DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ +[ provides Dune::Grid ] │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Container for equidistant coordinates in a YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m │ │ │ │ │ +_>_ _>_ _>_:_:_c_r_e_a_t_e_C_u_b_e_G_r_i_d │ │ │ │ │ +static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, │ │ │ │ │ +dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ +std::array< unsigned int, dim > &elements) │ │ │ │ │ +Create a structured cube grid. │ │ │ │ │ +DDeeffiinniittiioonn structuredyaspgridfactory.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m │ │ │ │ │ +_>_ _>_ _>_:_:_c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d │ │ │ │ │ +static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, │ │ │ │ │ +dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ +std::array< unsigned int, dim > &elements) │ │ │ │ │ +Create a structured simplex grid. │ │ │ │ │ +DDeeffiinniittiioonn structuredyaspgridfactory.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ +_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_c_r_e_a_t_e_C_u_b_e_G_r_i_d │ │ │ │ │ +static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, │ │ │ │ │ +dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ +std::array< unsigned int, dim > &elements) │ │ │ │ │ +Create a structured cube grid. │ │ │ │ │ +DDeeffiinniittiioonn structuredyaspgridfactory.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_S_t_r_u_c_t_u_r_e_d_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ +_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_c_r_e_a_t_e_S_i_m_p_l_e_x_G_r_i_d │ │ │ │ │ +static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, │ │ │ │ │ +dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const │ │ │ │ │ +std::array< unsigned int, dim > &elements) │ │ │ │ │ +Create a structured simplex grid. │ │ │ │ │ +DDeeffiinniittiioonn structuredyaspgridfactory.hh:120 │ │ │ │ │ +_s_t_r_u_c_t_u_r_e_d_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +A class to construct structured cube and simplex grids using the grid factory. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridleveliterator.hh File Reference │ │ │ │ +dune-grid: yaspgridentityseed.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,37 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridleveliterator.hh File Reference
│ │ │ │ +
yaspgridentityseed.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The YaspLevelIterator class. │ │ │ │ +

The YaspEntitySeed class. │ │ │ │ More...

│ │ │ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspLevelIterator< codim, pitype, GridImp >
 Iterates over entities of one grid level. More...
class  Dune::YaspEntitySeed< codim, GridImp >
 Describes the minimal information necessary to create a fully functional YaspEntity. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The YaspLevelIterator class.

│ │ │ │ +

The YaspEntitySeed class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,22 +2,23 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridleveliterator.hh File Reference │ │ │ │ │ -The YaspLevelIterator class. _M_o_r_e_._._. │ │ │ │ │ +yaspgridentityseed.hh File Reference │ │ │ │ │ +The YaspEntitySeed class. _M_o_r_e_._._. │ │ │ │ │ _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_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  Iterates over entities of one grid level. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  Describes the minimal information necessary to create a fully │ │ │ │ │ + functional _Y_a_s_p_E_n_t_i_t_y. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspLevelIterator class. │ │ │ │ │ +The YaspEntitySeed class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridleveliterator.hh Source File │ │ │ │ +dune-grid: yaspgridentityseed.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,91 +74,82 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridleveliterator.hh
│ │ │ │ +
yaspgridentityseed.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │
7
│ │ │ │
12namespace Dune {
│ │ │ │
13
│ │ │ │ -
14
│ │ │ │ -
17 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 {
│ │ │ │ -
21 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
23 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
24 typedef typename GridImp::ctype ctype;
│ │ │ │ -
25 public:
│ │ │ │ -
26 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │ -
27 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ -
28 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ -
29
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 {}
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 YaspLevelIterator (const YGLI & g, const I& it)
│ │ │ │ -
36 : _entity(YaspEntity<codim, dim, GridImp>(g,it))
│ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
40 void increment()
│ │ │ │ -
41 {
│ │ │ │ -
42 ++(_entity.impl()._it);
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ -
46 bool equals (const YaspLevelIterator& rhs) const
│ │ │ │ -
47 {
│ │ │ │ -
48 return (_entity == rhs._entity);
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
52 const Entity& dereference() const
│ │ │ │ -
53 {
│ │ │ │ -
54 return _entity;
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 protected:
│ │ │ │ - │ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
61}
│ │ │ │ -
62
│ │ │ │ -
63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ │ +
16 template<int codim, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ +
20 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
21
│ │ │ │ +
22 public:
│ │ │ │ +
24 constexpr static int codimension = codim;
│ │ │ │ +
25
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 : _l(-1), _o(0)
│ │ │ │ +
29 {
│ │ │ │ +
30 std::fill(_c.begin(),_c.end(),0);
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32
│ │ │ │ +
│ │ │ │ +
34 YaspEntitySeed (int level, std::array<int, dim> coord, int o = 0)
│ │ │ │ +
35 : _l(level), _c(coord), _o(o)
│ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
39 bool isValid() const
│ │ │ │ +
40 {
│ │ │ │ +
41 return _l != -1;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
44 int level () const { return _l; }
│ │ │ │ +
45 const std::array<int, dim> & coord() const { return _c; }
│ │ │ │ +
46 int offset () const { return _o; }
│ │ │ │ +
47
│ │ │ │ +
48 protected:
│ │ │ │ +
49 int _l; // grid level
│ │ │ │ +
50 std::array<int, dim> _c; // coord in the global grid
│ │ │ │ +
51 int _o; // the offset: which YGridComponent, does the entity belong to
│ │ │ │ +
52 };
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54} // namespace Dune
│ │ │ │ +
55
│ │ │ │ +
56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition yaspgridentity.hh:268
│ │ │ │ -
Iterates over entities of one grid level.
Definition yaspgridleveliterator.hh:19
│ │ │ │ -
Entity _entity
entity
Definition yaspgridleveliterator.hh:58
│ │ │ │ -
GridImp::YGridLevelIterator YGLI
Definition yaspgridleveliterator.hh:27
│ │ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition yaspgridleveliterator.hh:26
│ │ │ │ -
void increment()
increment
Definition yaspgridleveliterator.hh:40
│ │ │ │ -
GridImp::YGrid::Iterator I
Definition yaspgridleveliterator.hh:28
│ │ │ │ -
YaspLevelIterator(const YGLI &g, const I &it)
constructor
Definition yaspgridleveliterator.hh:35
│ │ │ │ -
bool equals(const YaspLevelIterator &rhs) const
equality
Definition yaspgridleveliterator.hh:46
│ │ │ │ -
YaspLevelIterator()
default constructor
Definition yaspgridleveliterator.hh:31
│ │ │ │ -
const Entity & dereference() const
dereferencing
Definition yaspgridleveliterator.hh:52
│ │ │ │ +
Describes the minimal information necessary to create a fully functional YaspEntity.
Definition yaspgridentityseed.hh:18
│ │ │ │ +
int _o
Definition yaspgridentityseed.hh:51
│ │ │ │ +
std::array< int, dim > _c
Definition yaspgridentityseed.hh:50
│ │ │ │ +
int _l
Definition yaspgridentityseed.hh:49
│ │ │ │ +
int level() const
Definition yaspgridentityseed.hh:44
│ │ │ │ +
YaspEntitySeed()
default construct an invalid entity seed
Definition yaspgridentityseed.hh:27
│ │ │ │ +
YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)
constructor
Definition yaspgridentityseed.hh:34
│ │ │ │ +
int offset() const
Definition yaspgridentityseed.hh:46
│ │ │ │ +
static constexpr int codimension
codimension of entity
Definition yaspgridentityseed.hh:24
│ │ │ │ +
const std::array< int, dim > & coord() const
Definition yaspgridentityseed.hh:45
│ │ │ │ +
bool isValid() const
check whether the EntitySeed refers to a valid Entity
Definition yaspgridentityseed.hh:39
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,103 +1,98 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridleveliterator.hh │ │ │ │ │ +yaspgridentityseed.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ 7 │ │ │ │ │ 12namespace _D_u_n_e { │ │ │ │ │ 13 │ │ │ │ │ -14 │ │ │ │ │ -17 template │ │ │ │ │ -_1_8 class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -19 { │ │ │ │ │ -21 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -23 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -24 typedef typename GridImp::ctype ctype; │ │ │ │ │ -25 public: │ │ │ │ │ -_2_6 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ -_2_7 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ -_2_8 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ -29 │ │ │ │ │ -_3_1 _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r () │ │ │ │ │ -32 {} │ │ │ │ │ -33 │ │ │ │ │ -_3_5 _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r (const _Y_G_L_I & g, const _I& it) │ │ │ │ │ -36 : ___e_n_t_i_t_y(_Y_a_s_p_E_n_t_i_t_y(g,it)) │ │ │ │ │ -37 {} │ │ │ │ │ -38 │ │ │ │ │ -_4_0 void _i_n_c_r_e_m_e_n_t() │ │ │ │ │ -41 { │ │ │ │ │ -42 ++(___e_n_t_i_t_y.impl()._it); │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -_4_6 bool _e_q_u_a_l_s (const _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r& rhs) const │ │ │ │ │ -47 { │ │ │ │ │ -48 return (___e_n_t_i_t_y == rhs.___e_n_t_i_t_y); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -_5_2 const _E_n_t_i_t_y& _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ -53 { │ │ │ │ │ -54 return ___e_n_t_i_t_y; │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 protected: │ │ │ │ │ -_5_8 _E_n_t_i_t_y ___e_n_t_i_t_y; │ │ │ │ │ -59 }; │ │ │ │ │ -60 │ │ │ │ │ -61} │ │ │ │ │ -62 │ │ │ │ │ -63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ │ +16 template │ │ │ │ │ +_1_7 class _Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +18 { │ │ │ │ │ +20 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +21 │ │ │ │ │ +22 public: │ │ │ │ │ +_2_4 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +25 │ │ │ │ │ +_2_7 _Y_a_s_p_E_n_t_i_t_y_S_e_e_d () │ │ │ │ │ +28 : ___l(-1), ___o(0) │ │ │ │ │ +29 { │ │ │ │ │ +30 std::fill(___c.begin(),___c.end(),0); │ │ │ │ │ +31 } │ │ │ │ │ +32 │ │ │ │ │ +_3_4 _Y_a_s_p_E_n_t_i_t_y_S_e_e_d (int _l_e_v_e_l, std::array _c_o_o_r_d, int o = 0) │ │ │ │ │ +35 : ___l(_l_e_v_e_l), ___c(_c_o_o_r_d), ___o(o) │ │ │ │ │ +36 {} │ │ │ │ │ +37 │ │ │ │ │ +_3_9 bool _i_s_V_a_l_i_d() const │ │ │ │ │ +40 { │ │ │ │ │ +41 return ___l != -1; │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_4 int _l_e_v_e_l () const { return ___l; } │ │ │ │ │ +_4_5 const std::array & _c_o_o_r_d() const { return ___c; } │ │ │ │ │ +_4_6 int _o_f_f_s_e_t () const { return ___o; } │ │ │ │ │ +47 │ │ │ │ │ +48 protected: │ │ │ │ │ +_4_9 int ___l; // grid level │ │ │ │ │ +_5_0 std::array ___c; // coord in the global grid │ │ │ │ │ +_5_1 int ___o; // the offset: which YGridComponent, does the entity belong to │ │ │ │ │ +52 }; │ │ │ │ │ +53 │ │ │ │ │ +54} // namespace Dune │ │ │ │ │ +55 │ │ │ │ │ +56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:268 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterates over entities of one grid level. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:___e_n_t_i_t_y │ │ │ │ │ -Entity _entity │ │ │ │ │ -entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_Y_G_L_I │ │ │ │ │ -GridImp::YGridLevelIterator YGLI │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I │ │ │ │ │ -GridImp::YGrid::Iterator I │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -YaspLevelIterator(const YGLI &g, const I &it) │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +Describes the minimal information necessary to create a fully functional │ │ │ │ │ +YaspEntity. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:___o │ │ │ │ │ +int _o │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:___c │ │ │ │ │ +std::array< int, dim > _c │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:___l │ │ │ │ │ +int _l │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +YaspEntitySeed() │ │ │ │ │ +default construct an invalid entity seed │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +YaspEntitySeed(int level, std::array< int, dim > coord, int o=0) │ │ │ │ │ constructor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const YaspLevelIterator &rhs) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -YaspLevelIterator() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -const Entity & dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn yaspgridleveliterator.hh:52 │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_o_f_f_s_e_t │ │ │ │ │ +int offset() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +codimension of entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_c_o_o_r_d │ │ │ │ │ +const std::array< int, dim > & coord() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ │ +bool isValid() const │ │ │ │ │ +check whether the EntitySeed refers to a valid Entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentityseed.hh:39 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00266.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: datahandleif.hh File Reference │ │ │ │ +dune-grid: scsgmapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
datahandleif.hh File Reference
│ │ │ │ +
scsgmapper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Describes the parallel communication interface class for MessageBuffers and DataHandles. │ │ │ │ +

Mapper classes are used to attach data to a grid. │ │ │ │ More...

│ │ │ │ -
#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include "mapper.hh"
│ │ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::MessageBufferIF< MessageBufferImp >
 Communication message buffer interface. This class describes the interface for reading and writing data to the communication message buffer. As message buffers might be deeply implemented in various packages the message buffers implementations cannot be derived from this interface class. Therefore we just apply the engine concept to wrap the message buffer call and make sure that the interface is fulfilled. More...
class  Dune::SingleCodimSingleGeomTypeMapper< GV, c >
 Implementation class for a single codim and single geometry type mapper. More...
 
class  Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >
 CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class. More...
class  Dune::LeafSingleCodimSingleGeomTypeMapper< G, c >
 Single codim and single geometry type mapper for leaf entities. More...
 
class  Dune::LevelSingleCodimSingleGeomTypeMapper< G, c >
 Single codim and single geometry type mapper for entities of one level. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Describes the parallel communication interface class for MessageBuffers and DataHandles.

│ │ │ │ -
Author
Robert Kloefkorn
│ │ │ │ +

Mapper classes are used to attach data to a grid.

│ │ │ │ +
Author
Peter Bastian
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,40 +2,35 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -datahandleif.hh File Reference │ │ │ │ │ -Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ -DataHandles. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ +scsgmapper.hh File Reference │ │ │ │ │ +Mapper classes are used to attach data to a grid. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include "_m_a_p_p_e_r_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_ _M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_ _> │ │ │ │ │ - Communication message buffer interface. This class describes the │ │ │ │ │ - interface for reading and writing data to the communication message │ │ │ │ │ - buffer. As message buffers might be deeply implemented in various │ │ │ │ │ -  packages the message buffers implementations cannot be derived from │ │ │ │ │ - this interface class. Therefore we just apply the engine concept to │ │ │ │ │ - wrap the message buffer call and make sure that the interface is │ │ │ │ │ - fulfilled. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_V_,_ _c_ _> │ │ │ │ │ +  Implementation class for a single codim and single geometry type │ │ │ │ │ + mapper. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_I_m_p_ _> │ │ │ │ │ - _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F describes the features of a data handle for │ │ │ │ │ - communication in parallel runs using the Grid::communicate methods. │ │ │ │ │ -  Here the Barton-Nackman trick is used to interprete data handle objects │ │ │ │ │ - as its interface. Therefore usable data handle classes need to be │ │ │ │ │ - derived from this class. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_,_ _c_ _> │ │ │ │ │ +  Single codim and single geometry type mapper for leaf entities. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_,_ _c_ _> │ │ │ │ │ +  Single codim and single geometry type mapper for entities of one level. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ -DataHandles. │ │ │ │ │ +Mapper classes are used to attach data to a grid. │ │ │ │ │ Author │ │ │ │ │ - Robert Kloefkorn │ │ │ │ │ + Peter Bastian │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00266_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: datahandleif.hh Source File │ │ │ │ +dune-grid: scsgmapper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,199 +74,208 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
datahandleif.hh
│ │ │ │ +
scsgmapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_SCSGMAPPER_HH
│ │ │ │
7
│ │ │ │ -
14#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
31 template <class MessageBufferImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ -
34 MessageBufferImp & buff_;
│ │ │ │ -
35 public:
│ │ │ │ -
37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}
│ │ │ │ -
38
│ │ │ │ -
44 template <class T>
│ │ │ │ -
│ │ │ │ -
45 void write(const T & val)
│ │ │ │ -
46 {
│ │ │ │ -
47 buff_.write(val);
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
58 template <class T>
│ │ │ │ -
│ │ │ │ -
59 void read(T & val)
│ │ │ │ -
60 {
│ │ │ │ -
61 buff_.read(val);
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63 }; // end class MessageBufferIF
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include "mapper.hh"
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
37 template <typename GV, int c>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 public Mapper<typename GV::Grid,SingleCodimSingleGeomTypeMapper<GV,c>, typename GV::IndexSet::IndexType >
│ │ │ │ +
40 {
│ │ │ │ +
41 public:
│ │ │ │ +
42
│ │ │ │ +
44 typedef typename GV::IndexSet::IndexType Index;
│ │ │ │ +
45
│ │ │ │ +
50 using size_type = decltype(std::declval<typename GV::IndexSet>().size(0));
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 : gridView_(gridView)
│ │ │ │ +
58 , indexSet_(&gridView_.indexSet())
│ │ │ │ +
59 {
│ │ │ │ +
60 // check that grid has only a single geometry type
│ │ │ │ +
61 if (indexSet_->types(c).size() != 1)
│ │ │ │ +
62 DUNE_THROW(GridError, "mapper treats only a single codim and a single geometry type");
│ │ │ │ +
63 }
│ │ │ │
│ │ │ │
64
│ │ │ │ -
65
│ │ │ │ -
76 template <class DataHandleImp, class DataTypeImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
78 {
│ │ │ │ -
79 template <class M>
│ │ │ │ -
80 class CheckFixedSizeMethod
│ │ │ │ -
81 {
│ │ │ │ -
82 // check for old signature of deprecated fixedsize method.
│ │ │ │ -
83 template <class T>
│ │ │ │ -
84 static std::true_type testSignature(bool (T::*)(int, int) const);
│ │ │ │ -
85
│ │ │ │ -
86 template <class T>
│ │ │ │ -
87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t);
│ │ │ │ -
88
│ │ │ │ -
89 template <class T>
│ │ │ │ -
90 static std::false_type test(...);
│ │ │ │ +
70 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
71 Index index (const EntityType& e) const
│ │ │ │ +
72 {
│ │ │ │ +
73 static_assert(EntityType::codimension == c, "Entity of wrong codim passed to SingleCodimSingleGeomTypeMapper");
│ │ │ │ +
74 return indexSet_->index(e);
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
│ │ │ │ +
84 Index subIndex (const typename GV::template Codim<0>::Entity& e,
│ │ │ │ +
85 int i, unsigned int codim) const
│ │ │ │ +
86 {
│ │ │ │ +
87 if (codim != c)
│ │ │ │ +
88 DUNE_THROW(GridError, "Id of wrong codim requested from SingleCodimSingleGeomTypeMapper");
│ │ │ │ +
89 return indexSet_->subIndex(e,i,codim);
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │
91
│ │ │ │ -
92 using type = decltype(test<M>(nullptr));
│ │ │ │ -
93 public:
│ │ │ │ -
94 static const bool value = type::value;
│ │ │ │ -
95 };
│ │ │ │ -
96
│ │ │ │ -
97
│ │ │ │ -
98 template <class DH, bool>
│ │ │ │ -
99 struct CallFixedSize
│ │ │ │ -
100 {
│ │ │ │ -
101 static bool fixedSize( const DH& dh, int dim, int codim )
│ │ │ │ -
102 {
│ │ │ │ -
103 return dh.fixedSize( dim, codim );
│ │ │ │ -
104 }
│ │ │ │ -
105 };
│ │ │ │ -
106
│ │ │ │ -
107 // old, deprecated implementation
│ │ │ │ -
108 template <class DH>
│ │ │ │ -
109 struct CallFixedSize< DH, true >
│ │ │ │ -
110 {
│ │ │ │ -
111 static bool fixedSize( const DH& dh, int dim, int codim )
│ │ │ │ -
112 {
│ │ │ │ -
113 return dh.overloaded_deprecated_fixedsize( dim, codim );
│ │ │ │ -
114 }
│ │ │ │ -
115 };
│ │ │ │ -
116
│ │ │ │ -
117 public:
│ │ │ │ -
119 typedef DataTypeImp DataType;
│ │ │ │ -
120
│ │ │ │ -
121 protected:
│ │ │ │ -
122 // one should not create an explicit instance of this interface object
│ │ │ │ - │ │ │ │ -
124
│ │ │ │ -
125 public:
│ │ │ │ -
│ │ │ │ -
131 bool contains (int dim, int codim) const
│ │ │ │ -
132 {
│ │ │ │ -
133 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));
│ │ │ │ -
134 return asImp().contains(dim,codim);
│ │ │ │ -
135 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
101 {
│ │ │ │ +
102 return indexSet_->size(c);
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
111 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
112 bool contains (const EntityType& e, Index& result) const
│ │ │ │ +
113 {
│ │ │ │ +
114 result = index(e);
│ │ │ │ +
115 return true;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ +
126 bool contains (const typename GV::template Codim<0>::Entity& e, int i, int cc, Index& result) const
│ │ │ │ +
127 {
│ │ │ │ +
128 result = subIndex(e,i,cc);
│ │ │ │ +
129 return true;
│ │ │ │ +
130 }
│ │ │ │ +
│ │ │ │ +
131
│ │ │ │ +
│ │ │ │ +
137 void update (const GV& gridView)
│ │ │ │ +
138 {
│ │ │ │ +
139 gridView_ = gridView;
│ │ │ │ +
140 indexSet_ = &gridView_.indexSet();
│ │ │ │ +
141 }
│ │ │ │
│ │ │ │ -
136
│ │ │ │ -
147 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
│ │ │ │ +
142
│ │ │ │
│ │ │ │ -
148 int fixedsize (int dim, int codim) const
│ │ │ │ -
149 {
│ │ │ │ -
150 return int(fixedSize( dim, codim ));
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
153 // if this deprecation appears then the DataHandle implementation
│ │ │ │ -
154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize'
│ │ │ │ -
155 // method.
│ │ │ │ -
156 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
│ │ │ │ +
148 void update (GV&& gridView)
│ │ │ │ +
149 {
│ │ │ │ +
150 gridView_ = std::move(gridView);
│ │ │ │ +
151 indexSet_ = &gridView_.indexSet();
│ │ │ │ +
152 }
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
156 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8.")]]
│ │ │ │
│ │ │ │ -
157 bool overloaded_deprecated_fixedsize( int dim, int codim ) const
│ │ │ │ -
158 {
│ │ │ │ -
159 return asImp().fixedsize( dim, codim );
│ │ │ │ -
160 }
│ │ │ │ -
│ │ │ │ -
161
│ │ │ │ -
│ │ │ │ -
169 bool fixedSize (int dim, int codim) const
│ │ │ │ -
170 {
│ │ │ │ -
171 // this should be enabled once the old fixedsize is removed
│ │ │ │ -
172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim)));
│ │ │ │ -
173 return CallFixedSize< DataHandleImp,
│ │ │ │ -
174 CheckFixedSizeMethod< DataHandleImp >::value >::fixedSize( asImp(), dim, codim );
│ │ │ │ -
175 }
│ │ │ │ -
│ │ │ │ -
176
│ │ │ │ -
181 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
182 size_t size (const EntityType& e) const
│ │ │ │ -
183 {
│ │ │ │ -
184 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));
│ │ │ │ -
185 return asImp().size(e);
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
192 template<class MessageBufferImp, class EntityType>
│ │ │ │ -
│ │ │ │ -
193 void gather (MessageBufferImp& buff, const EntityType& e) const
│ │ │ │ -
194 {
│ │ │ │ - │ │ │ │ -
196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));
│ │ │ │ -
197 }
│ │ │ │ -
│ │ │ │ -
198
│ │ │ │ -
206 template<class MessageBufferImp, class EntityType>
│ │ │ │ -
│ │ │ │ -
207 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)
│ │ │ │ -
208 {
│ │ │ │ - │ │ │ │ -
210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));
│ │ │ │ -
211 }
│ │ │ │ -
│ │ │ │ -
212
│ │ │ │ -
213 private:
│ │ │ │ -
215 DataHandleImp& asImp () {return static_cast<DataHandleImp &> (*this);}
│ │ │ │ -
217 const DataHandleImp& asImp () const
│ │ │ │ -
218 {
│ │ │ │ -
219 return static_cast<const DataHandleImp &>(*this);
│ │ │ │ -
220 }
│ │ │ │ -
221 }; // end class CommDataHandleIF
│ │ │ │ -
│ │ │ │ -
222
│ │ │ │ -
223#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ │ -
224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ │ -
225
│ │ │ │ -
226} // end namespace Dune
│ │ │ │ -
227#endif
│ │ │ │ +
157 void update ()
│ │ │ │ +
158 { // nothing to do here
│ │ │ │ +
159 }
│ │ │ │ +
│ │ │ │ +
160
│ │ │ │ +
161 private:
│ │ │ │ +
162 GV gridView_;
│ │ │ │ +
163 const typename GV::IndexSet* indexSet_;
│ │ │ │ +
164 };
│ │ │ │ +
│ │ │ │ +
165
│ │ │ │ +
184 template <typename G, int c>
│ │ │ │ +
│ │ │ │ +
185 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
│ │ │ │ +
186 LeafSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LeafGridView,c> {
│ │ │ │ + │ │ │ │ +
188 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
193 : Base(grid.leafGridView())
│ │ │ │ +
194 , gridPtr_(&grid)
│ │ │ │ +
195 {}
│ │ │ │ +
│ │ │ │ +
196
│ │ │ │ +
│ │ │ │ +
202 void update ()
│ │ │ │ +
203 {
│ │ │ │ +
204 Base::update(gridPtr_->leafGridView());
│ │ │ │ +
205 }
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
207 private:
│ │ │ │ +
208 const G* gridPtr_;
│ │ │ │ +
209 };
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
222 template <typename G, int c>
│ │ │ │ +
│ │ │ │ +
223 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
│ │ │ │ +
224 LevelSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LevelGridView,c> {
│ │ │ │ + │ │ │ │ +
226 public:
│ │ │ │ +
227 /* @brief The constructor
│ │ │ │ +
228 @param grid A reference to a grid.
│ │ │ │ +
229 @param level A valid level of the grid.
│ │ │ │ +
230 */
│ │ │ │ +
│ │ │ │ +
231 LevelSingleCodimSingleGeomTypeMapper (const G& grid, int level)
│ │ │ │ +
232 : Base(grid.levelGridView(level))
│ │ │ │ +
233 , gridPtr_(&grid)
│ │ │ │ +
234 , level_(level)
│ │ │ │ +
235 {}
│ │ │ │ +
│ │ │ │ +
236
│ │ │ │ +
│ │ │ │ +
242 void update ()
│ │ │ │ +
243 {
│ │ │ │ +
244 Base::update(gridPtr_->levelGridView(level_));
│ │ │ │ +
245 }
│ │ │ │ +
│ │ │ │ +
246
│ │ │ │ +
247 private:
│ │ │ │ +
248 const G* gridPtr_;
│ │ │ │ +
249 int level_;
│ │ │ │ +
250 };
│ │ │ │ +
│ │ │ │ +
251
│ │ │ │ +
253}
│ │ │ │ +
254#endif
│ │ │ │ +
Provides classes with basic mappers which are used to attach data to a grid.
│ │ │ │ +
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │ +
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Communication message buffer interface. This class describes the interface for reading and writing da...
Definition datahandleif.hh:33
│ │ │ │ -
MessageBufferIF(MessageBufferImp &buff)
stores reference to original buffer buff
Definition datahandleif.hh:37
│ │ │ │ -
void write(const T &val)
just wraps the call of the internal buffer method write which writes the data of type T from the buff...
Definition datahandleif.hh:45
│ │ │ │ -
void read(T &val)
just wraps the call of the internal buffer method read which reads the data of type T from the buffer...
Definition datahandleif.hh:59
│ │ │ │ -
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ │ -
CommDataHandleIF()
Definition datahandleif.hh:123
│ │ │ │ -
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
unpack data from message buffer to user.
Definition datahandleif.hh:207
│ │ │ │ -
int fixedsize(int dim, int codim) const
returns true if size of data per entity of given dim and codim is a constant
Definition datahandleif.hh:148
│ │ │ │ -
bool contains(int dim, int codim) const
returns true if data for given valid codim should be communicated
Definition datahandleif.hh:131
│ │ │ │ -
size_t size(const EntityType &e) const
how many objects of type DataType have to be sent for a given entity
Definition datahandleif.hh:182
│ │ │ │ -
void gather(MessageBufferImp &buff, const EntityType &e) const
pack data from user to message buffer
Definition datahandleif.hh:193
│ │ │ │ -
bool fixedSize(int dim, int codim) const
returns true if size of data per entity of given dim and codim is a constant
Definition datahandleif.hh:169
│ │ │ │ -
DataTypeImp DataType
data type of data to communicate
Definition datahandleif.hh:119
│ │ │ │ -
bool overloaded_deprecated_fixedsize(int dim, int codim) const
Definition datahandleif.hh:157
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
Mapper interface.
Definition mapper.hh:110
│ │ │ │ +
Implementation class for a single codim and single geometry type mapper.
Definition scsgmapper.hh:40
│ │ │ │ +
bool contains(const EntityType &e, Index &result) const
Returns true if the entity is contained in the index set.
Definition scsgmapper.hh:112
│ │ │ │ +
GV::IndexSet::IndexType Index
Number type used for indices.
Definition scsgmapper.hh:44
│ │ │ │ +
bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc, Index &result) const
Returns true if the entity is contained in the index set.
Definition scsgmapper.hh:126
│ │ │ │ +
decltype(std::declval< typename GV::IndexSet >().size(0)) size_type
Number type used for the overall size (the return value of the 'size' method)
Definition scsgmapper.hh:50
│ │ │ │ +
Index index(const EntityType &e) const
Map entity to array index.
Definition scsgmapper.hh:71
│ │ │ │ +
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to array index.
Definition scsgmapper.hh:84
│ │ │ │ +
SingleCodimSingleGeomTypeMapper(const GV &gridView)
Construct mapper from grid and one of its index sets.
Definition scsgmapper.hh:56
│ │ │ │ +
void update(GV &&gridView)
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:148
│ │ │ │ +
size_type size() const
Return total number of entities in the entity set managed by the mapper.
Definition scsgmapper.hh:100
│ │ │ │ +
void update()
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:157
│ │ │ │ +
void update(const GV &gridView)
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:137
│ │ │ │ +
Single codim and single geometry type mapper for leaf entities.
Definition scsgmapper.hh:186
│ │ │ │ +
LeafSingleCodimSingleGeomTypeMapper(const G &grid)
The constructor.
Definition scsgmapper.hh:192
│ │ │ │ +
void update()
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:202
│ │ │ │ +
Single codim and single geometry type mapper for entities of one level.
Definition scsgmapper.hh:224
│ │ │ │ +
LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)
Definition scsgmapper.hh:231
│ │ │ │ +
void update()
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:242
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,219 +1,250 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -datahandleif.hh │ │ │ │ │ +scsgmapper.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_SCSGMAPPER_HH │ │ │ │ │ 7 │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 class _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ │ -33 { │ │ │ │ │ -34 MessageBufferImp & buff_; │ │ │ │ │ -35 public: │ │ │ │ │ -_3_7 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F(MessageBufferImp & buff) : buff_(buff) {} │ │ │ │ │ -38 │ │ │ │ │ -44 template │ │ │ │ │ -_4_5 void _w_r_i_t_e(const T & val) │ │ │ │ │ -46 { │ │ │ │ │ -47 buff_.write(val); │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -58 template │ │ │ │ │ -_5_9 void _r_e_a_d(T & val) │ │ │ │ │ -60 { │ │ │ │ │ -61 buff_.read(val); │ │ │ │ │ -62 } │ │ │ │ │ -63 }; // end class MessageBufferIF │ │ │ │ │ +8#include │ │ │ │ │ +9#include "_m_a_p_p_e_r_._h_h" │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +37 template │ │ │ │ │ +_3_8 class _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r : │ │ │ │ │ +39 public _M_a_p_p_e_r, │ │ │ │ │ +typename GV::IndexSet::IndexType > │ │ │ │ │ +40 { │ │ │ │ │ +41 public: │ │ │ │ │ +42 │ │ │ │ │ +_4_4 typedef typename GV::IndexSet::IndexType _I_n_d_e_x; │ │ │ │ │ +45 │ │ │ │ │ +_5_0 using _s_i_z_e___t_y_p_e = decltype(std::declval().size(0)); │ │ │ │ │ +51 │ │ │ │ │ +_5_6 _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r (const GV& gridView) │ │ │ │ │ +57 : gridView_(gridView) │ │ │ │ │ +58 , indexSet_(&gridView_.indexSet()) │ │ │ │ │ +59 { │ │ │ │ │ +60 // check that grid has only a single geometry type │ │ │ │ │ +61 if (indexSet_->types(c).size() != 1) │ │ │ │ │ +62 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "mapper treats only a single codim and a single │ │ │ │ │ +geometry type"); │ │ │ │ │ +63 } │ │ │ │ │ 64 │ │ │ │ │ -65 │ │ │ │ │ -76 template │ │ │ │ │ -_7_7 class _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ -78 { │ │ │ │ │ -79 template │ │ │ │ │ -80 class CheckFixedSizeMethod │ │ │ │ │ -81 { │ │ │ │ │ -82 // check for old signature of deprecated fixedsize method. │ │ │ │ │ -83 template │ │ │ │ │ -84 static std::true_type testSignature(bool (T::*)(int, int) const); │ │ │ │ │ -85 │ │ │ │ │ -86 template │ │ │ │ │ -87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t); │ │ │ │ │ -88 │ │ │ │ │ -89 template │ │ │ │ │ -90 static std::false_type test(...); │ │ │ │ │ +70 template │ │ │ │ │ +_7_1 _I_n_d_e_x _i_n_d_e_x (const EntityType& e) const │ │ │ │ │ +72 { │ │ │ │ │ +73 static_assert(EntityType::codimension == c, "Entity of wrong codim passed to │ │ │ │ │ +SingleCodimSingleGeomTypeMapper"); │ │ │ │ │ +74 return indexSet_->index(e); │ │ │ │ │ +75 } │ │ │ │ │ +76 │ │ │ │ │ +_8_4 _I_n_d_e_x _s_u_b_I_n_d_e_x (const typename GV::template Codim<0>::Entity& e, │ │ │ │ │ +85 int i, unsigned int codim) const │ │ │ │ │ +86 { │ │ │ │ │ +87 if (codim != c) │ │ │ │ │ +88 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Id of wrong codim requested from │ │ │ │ │ +SingleCodimSingleGeomTypeMapper"); │ │ │ │ │ +89 return indexSet_->subIndex(e,i,codim); │ │ │ │ │ +90 } │ │ │ │ │ 91 │ │ │ │ │ -92 using type = decltype(test(nullptr)); │ │ │ │ │ -93 public: │ │ │ │ │ -94 static const bool value = type::value; │ │ │ │ │ -95 }; │ │ │ │ │ -96 │ │ │ │ │ -97 │ │ │ │ │ -98 template │ │ │ │ │ -99 struct CallFixedSize │ │ │ │ │ -100 { │ │ │ │ │ -101 static bool fixedSize( const DH& dh, int dim, int codim ) │ │ │ │ │ -102 { │ │ │ │ │ -103 return dh.fixedSize( dim, codim ); │ │ │ │ │ -104 } │ │ │ │ │ -105 }; │ │ │ │ │ -106 │ │ │ │ │ -107 // old, deprecated implementation │ │ │ │ │ -108 template │ │ │ │ │ -109 struct CallFixedSize< DH, true > │ │ │ │ │ -110 { │ │ │ │ │ -111 static bool fixedSize( const DH& dh, int dim, int codim ) │ │ │ │ │ -112 { │ │ │ │ │ -113 return dh.overloaded_deprecated_fixedsize( dim, codim ); │ │ │ │ │ -114 } │ │ │ │ │ -115 }; │ │ │ │ │ -116 │ │ │ │ │ -117 public: │ │ │ │ │ -_1_1_9 typedef DataTypeImp _D_a_t_a_T_y_p_e; │ │ │ │ │ -120 │ │ │ │ │ -121 protected: │ │ │ │ │ -122 // one should not create an explicit instance of this interface object │ │ │ │ │ -_1_2_3 _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F() {} │ │ │ │ │ -124 │ │ │ │ │ -125 public: │ │ │ │ │ -_1_3_1 bool _c_o_n_t_a_i_n_s (int dim, int codim) const │ │ │ │ │ -132 { │ │ │ │ │ -133 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(dim,codim))); │ │ │ │ │ -134 return asImp().contains(dim,codim); │ │ │ │ │ -135 } │ │ │ │ │ -136 │ │ │ │ │ -147 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. │ │ │ │ │ -Implement and call fixedSize (camelCase) instead!")]] │ │ │ │ │ -_1_4_8 int _f_i_x_e_d_s_i_z_e (int dim, int codim) const │ │ │ │ │ +_1_0_0 _s_i_z_e___t_y_p_e _s_i_z_e () const │ │ │ │ │ +101 { │ │ │ │ │ +102 return indexSet_->size(c); │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +111 template │ │ │ │ │ +_1_1_2 bool _c_o_n_t_a_i_n_s (const EntityType& e, _I_n_d_e_x& result) const │ │ │ │ │ +113 { │ │ │ │ │ +114 result = _i_n_d_e_x(e); │ │ │ │ │ +115 return true; │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_2_6 bool _c_o_n_t_a_i_n_s (const typename GV::template Codim<0>::Entity& e, int i, int │ │ │ │ │ +cc, _I_n_d_e_x& result) const │ │ │ │ │ +127 { │ │ │ │ │ +128 result = _s_u_b_I_n_d_e_x(e,i,cc); │ │ │ │ │ +129 return true; │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +_1_3_7 void _u_p_d_a_t_e (const GV& gridView) │ │ │ │ │ +138 { │ │ │ │ │ +139 gridView_ = gridView; │ │ │ │ │ +140 indexSet_ = &gridView_.indexSet(); │ │ │ │ │ +141 } │ │ │ │ │ +142 │ │ │ │ │ +_1_4_8 void _u_p_d_a_t_e (GV&& gridView) │ │ │ │ │ 149 { │ │ │ │ │ -150 return int(_f_i_x_e_d_S_i_z_e( dim, codim )); │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -153 // if this deprecation appears then the DataHandle implementation │ │ │ │ │ -154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize' │ │ │ │ │ -155 // method. │ │ │ │ │ -156 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. │ │ │ │ │ -Implement and call fixedSize (camelCase) instead!")]] │ │ │ │ │ -_1_5_7 bool _o_v_e_r_l_o_a_d_e_d___d_e_p_r_e_c_a_t_e_d___f_i_x_e_d_s_i_z_e( int dim, int codim ) const │ │ │ │ │ -158 { │ │ │ │ │ -159 return asImp().fixedsize( dim, codim ); │ │ │ │ │ -160 } │ │ │ │ │ -161 │ │ │ │ │ -_1_6_9 bool _f_i_x_e_d_S_i_z_e (int dim, int codim) const │ │ │ │ │ -170 { │ │ │ │ │ -171 // this should be enabled once the old fixedsize is removed │ │ │ │ │ -172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim))); │ │ │ │ │ -173 return CallFixedSize< DataHandleImp, │ │ │ │ │ -174 CheckFixedSizeMethod< DataHandleImp >::value >_:_:_f_i_x_e_d_S_i_z_e( asImp(), dim, │ │ │ │ │ -codim ); │ │ │ │ │ -175 } │ │ │ │ │ -176 │ │ │ │ │ -181 template │ │ │ │ │ -_1_8_2 size_t _s_i_z_e (const EntityType& e) const │ │ │ │ │ -183 { │ │ │ │ │ -184 CHECK_INTERFACE_IMPLEMENTATION((asImp()._s_i_z_e(e))); │ │ │ │ │ -185 return asImp().size(e); │ │ │ │ │ -186 } │ │ │ │ │ -187 │ │ │ │ │ -192 template │ │ │ │ │ -_1_9_3 void _g_a_t_h_e_r (MessageBufferImp& buff, const EntityType& e) const │ │ │ │ │ -194 { │ │ │ │ │ -195 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ │ -196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._g_a_t_h_e_r(buffIF,e))); │ │ │ │ │ -197 } │ │ │ │ │ -198 │ │ │ │ │ -206 template │ │ │ │ │ -_2_0_7 void _s_c_a_t_t_e_r (MessageBufferImp& buff, const EntityType& e, size_t n) │ │ │ │ │ -208 { │ │ │ │ │ -209 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ │ -210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._s_c_a_t_t_e_r(buffIF,e,n))); │ │ │ │ │ -211 } │ │ │ │ │ -212 │ │ │ │ │ -213 private: │ │ │ │ │ -215 DataHandleImp& asImp () {return static_cast (*this);} │ │ │ │ │ -217 const DataHandleImp& asImp () const │ │ │ │ │ -218 { │ │ │ │ │ -219 return static_cast(*this); │ │ │ │ │ -220 } │ │ │ │ │ -221 }; // end class CommDataHandleIF │ │ │ │ │ -222 │ │ │ │ │ -223#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ │ -224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ │ -225 │ │ │ │ │ -226} // end namespace Dune │ │ │ │ │ -227#endif │ │ │ │ │ +150 gridView_ = std::move(gridView); │ │ │ │ │ +151 indexSet_ = &gridView_.indexSet(); │ │ │ │ │ +152 } │ │ │ │ │ +153 │ │ │ │ │ +156 [[deprecated("Use update(gridView) instead! Will be removed after release │ │ │ │ │ +2.8.")]] │ │ │ │ │ +_1_5_7 void _u_p_d_a_t_e () │ │ │ │ │ +158 { // nothing to do here │ │ │ │ │ +159 } │ │ │ │ │ +160 │ │ │ │ │ +161 private: │ │ │ │ │ +162 GV gridView_; │ │ │ │ │ +163 const typename GV::IndexSet* indexSet_; │ │ │ │ │ +164 }; │ │ │ │ │ +165 │ │ │ │ │ +184 template │ │ │ │ │ +_1_8_5 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be │ │ │ │ │ +removed after release 2.8.")]] │ │ │ │ │ +186 _L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r : public │ │ │ │ │ +_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r { │ │ │ │ │ +187 using _B_a_s_e = _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_t_y_p_e_n_a_m_e_ _G_:_:_L_e_a_f_G_r_i_d_V_i_e_w_,_c_>; │ │ │ │ │ +188 public: │ │ │ │ │ +_1_9_2 _L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r (const G& grid) │ │ │ │ │ +193 : _B_a_s_e(grid._l_e_a_f_G_r_i_d_V_i_e_w()) │ │ │ │ │ +194 , gridPtr_(&grid) │ │ │ │ │ +195 {} │ │ │ │ │ +196 │ │ │ │ │ +_2_0_2 void _u_p_d_a_t_e () │ │ │ │ │ +203 { │ │ │ │ │ +204 Base::update(gridPtr_->leafGridView()); │ │ │ │ │ +205 } │ │ │ │ │ +206 │ │ │ │ │ +207 private: │ │ │ │ │ +208 const G* gridPtr_; │ │ │ │ │ +209 }; │ │ │ │ │ +210 │ │ │ │ │ +222 template │ │ │ │ │ +_2_2_3 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be │ │ │ │ │ +removed after release 2.8.")]] │ │ │ │ │ +224 _L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r : public │ │ │ │ │ +_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r { │ │ │ │ │ +225 using _B_a_s_e = _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_t_y_p_e_n_a_m_e_ _G_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w_,_c_>; │ │ │ │ │ +226 public: │ │ │ │ │ +227 /* @brief The constructor │ │ │ │ │ +228 @param grid A reference to a grid. │ │ │ │ │ +229 @param level A valid level of the grid. │ │ │ │ │ +230 */ │ │ │ │ │ +_2_3_1 _L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r (const G& grid, int level) │ │ │ │ │ +232 : _B_a_s_e(grid._l_e_v_e_l_G_r_i_d_V_i_e_w(level)) │ │ │ │ │ +233 , gridPtr_(&grid) │ │ │ │ │ +234 , level_(level) │ │ │ │ │ +235 {} │ │ │ │ │ +236 │ │ │ │ │ +_2_4_2 void _u_p_d_a_t_e () │ │ │ │ │ +243 { │ │ │ │ │ +244 Base::update(gridPtr_->levelGridView(level_)); │ │ │ │ │ +245 } │ │ │ │ │ +246 │ │ │ │ │ +247 private: │ │ │ │ │ +248 const G* gridPtr_; │ │ │ │ │ +249 int level_; │ │ │ │ │ +250 }; │ │ │ │ │ +251 │ │ │ │ │ +253} │ │ │ │ │ +254#endif │ │ │ │ │ +_m_a_p_p_e_r_._h_h │ │ │ │ │ +Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ +_D_u_n_e_:_:_l_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< │ │ │ │ │ +dim, dimworld, ct, GridFamily > &grid) │ │ │ │ │ +leaf grid view for the given grid │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:819 │ │ │ │ │ +_D_u_n_e_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< │ │ │ │ │ +dim, dimworld, ct, GridFamily > &grid, int level) │ │ │ │ │ +level grid view for the given grid and level. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:802 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ │ -Communication message buffer interface. This class describes the interface for │ │ │ │ │ -reading and writing da... │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ │ -MessageBufferIF(MessageBufferImp &buff) │ │ │ │ │ -stores reference to original buffer buff │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_w_r_i_t_e │ │ │ │ │ -void write(const T &val) │ │ │ │ │ -just wraps the call of the internal buffer method write which writes the data │ │ │ │ │ -of type T from the buff... │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_r_e_a_d │ │ │ │ │ -void read(T &val) │ │ │ │ │ -just wraps the call of the internal buffer method read which reads the data of │ │ │ │ │ -type T from the buffer... │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ -CommDataHandleIF describes the features of a data handle for communication in │ │ │ │ │ -parallel runs using the... │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ -CommDataHandleIF() │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_c_a_t_t_e_r │ │ │ │ │ -void scatter(MessageBufferImp &buff, const EntityType &e, size_t n) │ │ │ │ │ -unpack data from message buffer to user. │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_f_i_x_e_d_s_i_z_e │ │ │ │ │ -int fixedsize(int dim, int codim) const │ │ │ │ │ -returns true if size of data per entity of given dim and codim is a constant │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(int dim, int codim) const │ │ │ │ │ -returns true if data for given valid codim should be communicated │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_i_z_e │ │ │ │ │ -size_t size(const EntityType &e) const │ │ │ │ │ -how many objects of type DataType have to be sent for a given entity │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_g_a_t_h_e_r │ │ │ │ │ -void gather(MessageBufferImp &buff, const EntityType &e) const │ │ │ │ │ -pack data from user to message buffer │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:193 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_f_i_x_e_d_S_i_z_e │ │ │ │ │ -bool fixedSize(int dim, int codim) const │ │ │ │ │ -returns true if size of data per entity of given dim and codim is a constant │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_D_a_t_a_T_y_p_e │ │ │ │ │ -DataTypeImp DataType │ │ │ │ │ -data type of data to communicate │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_o_v_e_r_l_o_a_d_e_d___d_e_p_r_e_c_a_t_e_d___f_i_x_e_d_s_i_z_e │ │ │ │ │ -bool overloaded_deprecated_fixedsize(int dim, int codim) const │ │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ +Base class for exceptions in Dune grid modules. │ │ │ │ │ +DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_r │ │ │ │ │ +Mapper interface. │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Implementation class for a single codim and single geometry type mapper. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const EntityType &e, Index &result) const │ │ │ │ │ +Returns true if the entity is contained in the index set. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_I_n_d_e_x │ │ │ │ │ +GV::IndexSet::IndexType Index │ │ │ │ │ +Number type used for indices. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc, │ │ │ │ │ +Index &result) const │ │ │ │ │ +Returns true if the entity is contained in the index set. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:126 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ +decltype(std::declval< typename GV::IndexSet >().size(0)) size_type │ │ │ │ │ +Number type used for the overall size (the return value of the 'size' method) │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ +Index index(const EntityType &e) const │ │ │ │ │ +Map entity to array index. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ +unsigned int codim) const │ │ │ │ │ +Map subentity of codim 0 entity to array index. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +SingleCodimSingleGeomTypeMapper(const GV &gridView) │ │ │ │ │ +Construct mapper from grid and one of its index sets. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(GV &&gridView) │ │ │ │ │ +Recalculates indices after grid adaptation. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ +size_type size() const │ │ │ │ │ +Return total number of entities in the entity set managed by the mapper. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ +void update() │ │ │ │ │ +Recalculates indices after grid adaptation. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(const GV &gridView) │ │ │ │ │ +Recalculates indices after grid adaptation. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Single codim and single geometry type mapper for leaf entities. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +LeafSingleCodimSingleGeomTypeMapper(const G &grid) │ │ │ │ │ +The constructor. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ +void update() │ │ │ │ │ +Recalculates indices after grid adaptation. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:202 │ │ │ │ │ +_D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Single codim and single geometry type mapper for entities of one level. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:224 │ │ │ │ │ +_D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_: │ │ │ │ │ +_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level) │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ +void update() │ │ │ │ │ +Recalculates indices after grid adaptation. │ │ │ │ │ +DDeeffiinniittiioonn scsgmapper.hh:242 │ │ │ │ │ +_g_r_i_d_._h_h │ │ │ │ │ +Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00287.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridenums.hh File Reference │ │ │ │ +dune-grid: sizecache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,88 +70,50 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Enumerations | │ │ │ │ -Functions
│ │ │ │ -
gridenums.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
sizecache.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ + │ │ │ │ +

Provides size cache classes to implement the grids size method efficiently. │ │ │ │ +More...

│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <set>
│ │ │ │ +#include <utility>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/capabilities.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::SizeCache< GridImp >
 organizes the caching of sizes for one grid and one GeometryType More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Enumerations

enum  Dune::PartitionType {
│ │ │ │ -  Dune::InteriorEntity =0 │ │ │ │ -, Dune::BorderEntity =1 │ │ │ │ -, Dune::OverlapEntity =2 │ │ │ │ -, Dune::FrontEntity =3 │ │ │ │ -,
│ │ │ │ -  Dune::GhostEntity =4 │ │ │ │ -
│ │ │ │ - }
 Attributes used in the generic overlap model. More...
 
enum  Dune::InterfaceType {
│ │ │ │ -  Dune::InteriorBorder_InteriorBorder_Interface =0 │ │ │ │ -, Dune::InteriorBorder_All_Interface =1 │ │ │ │ -, Dune::Overlap_OverlapFront_Interface =2 │ │ │ │ -, Dune::Overlap_All_Interface =3 │ │ │ │ -,
│ │ │ │ -  Dune::All_All_Interface =4 │ │ │ │ -
│ │ │ │ - }
 Parameter to be used for the communication functions. More...
 
enum  Dune::PartitionIteratorType {
│ │ │ │ -  Dune::Interior_Partition =0 │ │ │ │ -, Dune::InteriorBorder_Partition =1 │ │ │ │ -, Dune::Overlap_Partition =2 │ │ │ │ -, Dune::OverlapFront_Partition =3 │ │ │ │ -,
│ │ │ │ -  Dune::All_Partition =4 │ │ │ │ -, Dune::Ghost_Partition =5 │ │ │ │ -
│ │ │ │ - }
 Parameter to be used for the parallel level- and leaf iterators. More...
 
enum  Dune::CommunicationDirection { Dune::ForwardCommunication │ │ │ │ -, Dune::BackwardCommunication │ │ │ │ - }
 Define a type for communication direction parameter. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

std::string Dune::PartitionName (PartitionType type)
 Provide names for the partition types.
 
std::ostream & Dune::operator<< (std::ostream &out, const PartitionType &type)
 write a PartitionType to a stream
 
std::ostream & Dune::operator<< (std::ostream &out, const InterfaceType &type)
 write an InterfaceType to a stream
 
std::ostream & Dune::operator<< (std::ostream &out, const PartitionIteratorType &type)
 write a PartitionIteratorType to a stream
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Provides size cache classes to implement the grids size method efficiently.

│ │ │ │ +
Author
Robert Kloefkorn
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,59 +1,37 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -gridenums.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +sizecache.hh File Reference │ │ │ │ │ +Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ +_M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  organizes the caching of sizes for one grid and one GeometryType │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ │ -enum   _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e { │ │ │ │ │ -   _D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y =0 , _D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y =1 , _D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ │ - =2 , _D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y =3 , │ │ │ │ │ -   _D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y =4 │ │ │ │ │ - } │ │ │ │ │ -  Attributes used in the generic overlap model. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -enum   _D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e { │ │ │ │ │ -   _D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e =0 , _D_u_n_e_:_: │ │ │ │ │ - _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e =1 , _D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ │ - =2 , _D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e =3 , │ │ │ │ │ -   _D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e =4 │ │ │ │ │ - } │ │ │ │ │ -  Parameter to be used for the communication functions. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -enum   _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e { │ │ │ │ │ -   _D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n =0 , _D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n =1 , │ │ │ │ │ - _D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n =2 , _D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n =3 , │ │ │ │ │ -   _D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n =4 , _D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n =5 │ │ │ │ │ - } │ │ │ │ │ -  Parameter to be used for the parallel level- and leaf iterators. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -enum   _D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n { _D_u_n_e_:_:_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n , _D_u_n_e_:_: │ │ │ │ │ - _B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n } │ │ │ │ │ -  Define a type for communication direction parameter. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ - std::string  _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_N_a_m_e (_P_a_r_t_i_t_i_o_n_T_y_p_e type) │ │ │ │ │ -  Provide names for the partition types. │ │ │ │ │ -  │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _P_a_r_t_i_t_i_o_n_T_y_p_e &type) │ │ │ │ │ -  write a PartitionType to a stream │ │ │ │ │ -  │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _I_n_t_e_r_f_a_c_e_T_y_p_e &type) │ │ │ │ │ -  write an InterfaceType to a stream │ │ │ │ │ -  │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ - _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e &type) │ │ │ │ │ -  write a PartitionIteratorType to a stream │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ + Author │ │ │ │ │ + Robert Kloefkorn │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00287_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridenums.hh Source File │ │ │ │ +dune-grid: sizecache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,165 +74,385 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridenums.hh
│ │ │ │ +
sizecache.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_GRIDENUMS_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_GRIDENUMS_HH
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_SIZECACHE_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_SIZECACHE_HH
│ │ │ │
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/exceptions.hh>
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune {
│ │ │ │ -
13
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
36 };
│ │ │ │ -
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10#include <set>
│ │ │ │ +
11#include <utility>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/exceptions.hh>
│ │ │ │ +
14#include <dune/common/hybridutilities.hh>
│ │ │ │ +
15
│ │ │ │ +
16#include <dune/geometry/type.hh>
│ │ │ │ +
17#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
18
│ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
28namespace Dune {
│ │ │ │ +
29
│ │ │ │ +
31 template <class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {
│ │ │ │ + │ │ │ │ +
36 constexpr static int dim = GridImp::dimension;
│ │ │ │
37
│ │ │ │ -
│ │ │ │ -
46 inline std::string PartitionName(PartitionType type)
│ │ │ │ -
47 {
│ │ │ │ -
48 switch(type) {
│ │ │ │ -
49 case InteriorEntity :
│ │ │ │ -
50 return "interior";
│ │ │ │ -
51 case BorderEntity :
│ │ │ │ -
52 return "border";
│ │ │ │ -
53 case OverlapEntity :
│ │ │ │ -
54 return "overlap";
│ │ │ │ -
55 case FrontEntity :
│ │ │ │ -
56 return "front";
│ │ │ │ -
57 case GhostEntity :
│ │ │ │ -
58 return "ghost";
│ │ │ │ -
59 default :
│ │ │ │ -
60 DUNE_THROW(NotImplemented, "name of unknown partition type requested");
│ │ │ │ -
61 }
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
72 inline std::ostream &operator<< ( std::ostream &out, const PartitionType &type )
│ │ │ │ -
73 {
│ │ │ │ -
74 return out << PartitionName( type );
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
77
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
92 };
│ │ │ │ -
│ │ │ │ +
39 constexpr static int nCodim = GridImp::dimension + 1;
│ │ │ │ +
40
│ │ │ │ +
41 // type of grid
│ │ │ │ +
42 typedef GridImp GridType;
│ │ │ │ +
43
│ │ │ │ +
44 // coordinate type
│ │ │ │ +
45 typedef typename GridType :: ctype ctype ;
│ │ │ │ +
46
│ │ │ │ +
47 // stores all sizes of the levels
│ │ │ │ +
48 mutable std::vector< int > levelSizes_[nCodim];
│ │ │ │ +
49
│ │ │ │ +
50 // stores all sizes of the levels
│ │ │ │ +
51 mutable std::vector< std::vector< int > > levelTypeSizes_[nCodim];
│ │ │ │ +
52
│ │ │ │ +
53 // stores all sizes of leafs
│ │ │ │ +
54 mutable int leafSizes_[nCodim];
│ │ │ │ +
55
│ │ │ │ +
56 // stores all sizes of leafs
│ │ │ │ +
57 mutable std::vector< int > leafTypeSizes_[nCodim];
│ │ │ │ +
58
│ │ │ │ +
59 // the grid
│ │ │ │ +
60 const GridType & grid_;
│ │ │ │ +
61
│ │ │ │ +
62 // count elements of set by iterating the grid
│ │ │ │ +
63 template < int codim, bool gridHasCodim >
│ │ │ │ +
64 struct CountLevelEntitiesBase
│ │ │ │ +
65 {
│ │ │ │ +
66 template < class SzCacheType >
│ │ │ │ +
67 static void apply(const SzCacheType & sc, int level, int cd)
│ │ │ │ +
68 {
│ │ │ │ +
69 if( cd == codim )
│ │ │ │ +
70 {
│ │ │ │ +
71 sc.template countLevelEntities<All_Partition,codim> (level);
│ │ │ │ +
72 }
│ │ │ │ +
73 }
│ │ │ │ +
74 };
│ │ │ │ +
75
│ │ │ │ +
76 template < int codim >
│ │ │ │ +
77 struct CountLevelEntitiesBase< codim, false >
│ │ │ │ +
78 {
│ │ │ │ +
79 template < class SzCacheType >
│ │ │ │ +
80 static void apply(const SzCacheType & sc, int level, int cd)
│ │ │ │ +
81 {
│ │ │ │ +
82 if( cd == codim )
│ │ │ │ +
83 {
│ │ │ │ +
84 sc.template countLevelEntitiesNoCodim<All_Partition,codim> (level);
│ │ │ │ +
85 }
│ │ │ │ +
86 }
│ │ │ │ +
87 };
│ │ │ │ +
88
│ │ │ │ +
89 template < int codim >
│ │ │ │ +
90 struct CountLevelEntities
│ │ │ │ +
91 : public CountLevelEntitiesBase< codim, Capabilities :: hasEntity< GridType, codim > :: v >
│ │ │ │ +
92 {};
│ │ │ │
93
│ │ │ │ -
94
│ │ │ │ -
96
│ │ │ │ -
│ │ │ │ -
103 inline std::ostream &operator<< ( std::ostream &out, const InterfaceType &type )
│ │ │ │ -
104 {
│ │ │ │ -
105 switch( type )
│ │ │ │ -
106 {
│ │ │ │ - │ │ │ │ -
108 return out << "interior-border / interior-border interface";
│ │ │ │ -
109
│ │ │ │ - │ │ │ │ -
111 return out << "interior-border / all interface";
│ │ │ │ -
112
│ │ │ │ - │ │ │ │ -
114 return out << "overlap / overlap-front interface";
│ │ │ │ -
115
│ │ │ │ - │ │ │ │ -
117 return out << "overlap / all interface";
│ │ │ │ -
118
│ │ │ │ -
119 case All_All_Interface :
│ │ │ │ -
120 return out << "all / all interface";
│ │ │ │ +
94 // count elements of set by iterating the grid
│ │ │ │ +
95 template < int codim, bool gridHasCodim >
│ │ │ │ +
96 struct CountLeafEntitiesBase
│ │ │ │ +
97 {
│ │ │ │ +
98 template <class SzCacheType>
│ │ │ │ +
99 static void apply(const SzCacheType & sc, int cd)
│ │ │ │ +
100 {
│ │ │ │ +
101 if( cd == codim )
│ │ │ │ +
102 {
│ │ │ │ +
103 sc.template countLeafEntities<All_Partition,codim> ();
│ │ │ │ +
104 }
│ │ │ │ +
105 }
│ │ │ │ +
106 };
│ │ │ │ +
107
│ │ │ │ +
108 // count elements of set by iterating the grid
│ │ │ │ +
109 template < int codim >
│ │ │ │ +
110 struct CountLeafEntitiesBase< codim, false >
│ │ │ │ +
111 {
│ │ │ │ +
112 template <class SzCacheType>
│ │ │ │ +
113 static void apply(const SzCacheType & sc, int cd)
│ │ │ │ +
114 {
│ │ │ │ +
115 if( cd == codim )
│ │ │ │ +
116 {
│ │ │ │ +
117 sc.template countLeafEntitiesNoCodim<All_Partition,codim> ();
│ │ │ │ +
118 }
│ │ │ │ +
119 }
│ │ │ │ +
120 };
│ │ │ │
121
│ │ │ │ -
122 default :
│ │ │ │ -
123 return out << "unknown interface";
│ │ │ │ -
124 }
│ │ │ │ -
125 }
│ │ │ │ -
│ │ │ │ +
122 template < int codim >
│ │ │ │ +
123 struct CountLeafEntities
│ │ │ │ +
124 : public CountLeafEntitiesBase< codim, Capabilities :: hasEntity< GridType, codim > :: v >
│ │ │ │ +
125 {};
│ │ │ │
126
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
143 };
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
145
│ │ │ │ -
147
│ │ │ │ -
│ │ │ │ -
154 inline std::ostream &operator<< ( std::ostream &out, const PartitionIteratorType &type )
│ │ │ │ -
155 {
│ │ │ │ -
156 static std::string name[ 6 ] = { "interior partition", "interior-border partition", "overlap partition",
│ │ │ │ -
157 "overlap-front partition", "all partition", "ghost partition" };
│ │ │ │ -
158 return out << name[ type ];
│ │ │ │ -
159 }
│ │ │ │ -
│ │ │ │ -
160
│ │ │ │ -
161
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
173 };
│ │ │ │ -
│ │ │ │ -
174
│ │ │ │ -
180}
│ │ │ │ -
181#endif
│ │ │ │ -
std::string PartitionName(PartitionType type)
Provide names for the partition types.
Definition gridenums.hh:46
│ │ │ │ -
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ -
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │ -
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │ -
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ │ -
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition gridenums.hh:140
│ │ │ │ -
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ │ -
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ │ -
@ Overlap_Partition
interior, border, and overlap entities
Definition gridenums.hh:139
│ │ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │ -
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │ -
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ -
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ -
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ -
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │ -
@ BackwardCommunication
reverse communication direction
Definition gridenums.hh:172
│ │ │ │ -
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
│ │ │ │ -
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
│ │ │ │ -
@ All_All_Interface
send all and receive all entities
Definition gridenums.hh:91
│ │ │ │ -
@ Overlap_All_Interface
send overlap, receive all entities
Definition gridenums.hh:90
│ │ │ │ -
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition gridenums.hh:89
│ │ │ │ -
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition gridenums.hh:87
│ │ │ │ +
127 int gtIndex( const GeometryType& type ) const
│ │ │ │ +
128 {
│ │ │ │ +
129 return type.id() >> 1 ;
│ │ │ │ +
130 }
│ │ │ │ +
131
│ │ │ │ +
132 int sizeCodim( const int codim ) const
│ │ │ │ +
133 {
│ │ │ │ +
134 const int mydim = GridType :: dimension - codim;
│ │ │ │ +
135 return ((1 << mydim) + 1) / 2;
│ │ │ │ +
136 }
│ │ │ │ +
137
│ │ │ │ +
138 // private copy constructor
│ │ │ │ +
139 SizeCache (const SizeCache & );
│ │ │ │ +
140 public:
│ │ │ │ +
│ │ │ │ +
142 SizeCache (const GridType & grid) : grid_( grid )
│ │ │ │ +
143 {
│ │ │ │ +
144 reset();
│ │ │ │ +
145 }
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
│ │ │ │ +
148 void reset()
│ │ │ │ +
149 {
│ │ │ │ +
150 for(int codim=0; codim<nCodim; ++codim)
│ │ │ │ +
151 {
│ │ │ │ +
152 leafSizes_[ codim ] = -1;
│ │ │ │ +
153 leafTypeSizes_[ codim ].resize( sizeCodim( codim ), -1 );
│ │ │ │ +
154 }
│ │ │ │ +
155
│ │ │ │ +
156 const int numMxl = grid_.maxLevel()+1;
│ │ │ │ +
157 for(int codim=0; codim<nCodim; ++codim)
│ │ │ │ +
158 {
│ │ │ │ +
159 std::vector<int> & vec = levelSizes_[codim];
│ │ │ │ +
160 vec.resize(numMxl);
│ │ │ │ +
161 levelTypeSizes_[codim].resize( numMxl );
│ │ │ │ +
162 for(int level = 0; level<numMxl; ++level)
│ │ │ │ +
163 {
│ │ │ │ +
164 vec[level] = -1;
│ │ │ │ +
165 levelTypeSizes_[codim][level].resize( sizeCodim( codim ), -1 );
│ │ │ │ +
166 }
│ │ │ │ +
167 }
│ │ │ │ +
168 }
│ │ │ │ +
│ │ │ │ +
169
│ │ │ │ +
170 //********************************************************************
│ │ │ │ +
171 // level sizes
│ │ │ │ +
172 //********************************************************************
│ │ │ │ +
│ │ │ │ +
174 int size (int level, int codim) const
│ │ │ │ +
175 {
│ │ │ │ +
176 assert( codim >= 0 );
│ │ │ │ +
177 assert( codim < nCodim );
│ │ │ │ +
178 assert( level >= 0 );
│ │ │ │ +
179 if( level >= (int) levelSizes_[codim].size() ) return 0;
│ │ │ │ +
180
│ │ │ │ +
181 if( levelSizes_[codim][level] < 0)
│ │ │ │ +
182 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLevelEntities< i >::apply( *this, level, codim ); } );
│ │ │ │ +
183
│ │ │ │ +
184 // CountLevelEntities<ThisType,All_Partition,dim>::count(*this,level,codim);
│ │ │ │ +
185
│ │ │ │ +
186 assert( levelSizes_[codim][level] >= 0 );
│ │ │ │ +
187 return levelSizes_[codim][level];
│ │ │ │ +
188 }
│ │ │ │ +
│ │ │ │ +
189
│ │ │ │ +
│ │ │ │ +
191 int size (int level, GeometryType type) const
│ │ │ │ +
192 {
│ │ │ │ +
193 int codim = GridType ::dimension - type.dim();
│ │ │ │ +
194 if( levelSizes_[codim][level] < 0)
│ │ │ │ +
195 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLevelEntities< i >::apply( *this, level, codim ); } );
│ │ │ │ +
196
│ │ │ │ +
197 assert( levelTypeSizes_[codim][level][gtIndex( type )] >= 0 );
│ │ │ │ +
198 return levelTypeSizes_[codim][level][gtIndex( type )];
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
201 //********************************************************************
│ │ │ │ +
202 // leaf sizes
│ │ │ │ +
203 //********************************************************************
│ │ │ │ +
│ │ │ │ +
205 int size (int codim) const
│ │ │ │ +
206 {
│ │ │ │ +
207 assert( codim >= 0 );
│ │ │ │ +
208 assert( codim < nCodim );
│ │ │ │ +
209 if( leafSizes_[codim] < 0 )
│ │ │ │ +
210 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLeafEntities< i >::apply( *this, codim ); } );
│ │ │ │ +
211
│ │ │ │ +
212 assert( leafSizes_[codim] >= 0 );
│ │ │ │ +
213 return leafSizes_[codim];
│ │ │ │ +
214 };
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
│ │ │ │ +
217 int size ( const GeometryType type ) const
│ │ │ │ +
218 {
│ │ │ │ +
219 int codim = GridType :: dimension - type.dim();
│ │ │ │ +
220 if( leafSizes_[codim] < 0 )
│ │ │ │ +
221 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLeafEntities< i >::apply( *this, codim ); } );
│ │ │ │ +
222
│ │ │ │ +
223 assert( leafTypeSizes_[codim][ gtIndex( type )] >= 0 );
│ │ │ │ +
224 return leafTypeSizes_[codim][ gtIndex( type )];
│ │ │ │ +
225 }
│ │ │ │ +
│ │ │ │ +
226
│ │ │ │ +
227 private:
│ │ │ │ +
228 template <PartitionIteratorType pitype, int codim>
│ │ │ │ +
229 void countLevelEntities(int level) const
│ │ │ │ +
230 {
│ │ │ │ +
231 typedef typename GridType :: LevelGridView GridView ;
│ │ │ │ +
232 typedef typename GridView :: template Codim< codim > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ +
233 GridView gridView = grid_.levelGridView( level );
│ │ │ │ +
234 Iterator it = gridView.template begin<codim,pitype> ();
│ │ │ │ +
235 Iterator end = gridView.template end<codim,pitype> ();
│ │ │ │ +
236 levelSizes_[codim][level] = countElements(it,end, levelTypeSizes_[codim][level]);
│ │ │ │ +
237 }
│ │ │ │ +
238
│ │ │ │ +
239 template <PartitionIteratorType pitype, int codim>
│ │ │ │ +
240 void countLeafEntities() const
│ │ │ │ +
241 {
│ │ │ │ +
242 // count All_Partition entities
│ │ │ │ +
243 typedef typename GridType :: LeafGridView GridView ;
│ │ │ │ +
244 typedef typename GridView :: template Codim< codim > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ +
245 GridView gridView = grid_.leafGridView();
│ │ │ │ +
246 Iterator it = gridView.template begin<codim,pitype> ();
│ │ │ │ +
247 Iterator end = gridView.template end<codim,pitype> ();
│ │ │ │ +
248 leafSizes_[codim] = countElements(it,end, leafTypeSizes_[codim] );
│ │ │ │ +
249 }
│ │ │ │ +
250
│ │ │ │ +
251 // counts entities with given type for given iterator
│ │ │ │ +
252 template <class IteratorType>
│ │ │ │ +
253 int countElements(IteratorType & it, const IteratorType & end, std::vector<int>& typeSizes) const
│ │ │ │ +
254 {
│ │ │ │ +
255 int overall = 0;
│ │ │ │ +
256 const size_t types = typeSizes.size();
│ │ │ │ +
257 for(size_t i=0; i<types; ++i) typeSizes[i] = 0;
│ │ │ │ +
258 for( ; it != end; ++it )
│ │ │ │ +
259 {
│ │ │ │ +
260 const GeometryType type = it->type();
│ │ │ │ +
261 ++typeSizes[ gtIndex( type ) ];
│ │ │ │ +
262 ++overall;
│ │ │ │ +
263 }
│ │ │ │ +
264
│ │ │ │ +
265#ifndef NDEBUG
│ │ │ │ +
266 int sumtypes = 0;
│ │ │ │ +
267 for(size_t i=0; i<types; ++i)
│ │ │ │ +
268 sumtypes += typeSizes[i];
│ │ │ │ +
269
│ │ │ │ +
270 assert( overall == sumtypes );
│ │ │ │ +
271#endif
│ │ │ │ +
272
│ │ │ │ +
273 return overall;
│ │ │ │ +
274 }
│ │ │ │ +
275
│ │ │ │ +
276 template <PartitionIteratorType pitype, int codim>
│ │ │ │ +
277 void countLevelEntitiesNoCodim(int level) const
│ │ │ │ +
278 {
│ │ │ │ +
279 typedef typename GridType :: LevelGridView GridView ;
│ │ │ │ +
280 typedef typename GridView :: template Codim< 0 > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ +
281 GridView gridView = grid_.levelGridView( level );
│ │ │ │ +
282 Iterator it = gridView.template begin< 0, pitype> ();
│ │ │ │ +
283 Iterator end = gridView.template end< 0, pitype> ();
│ │ │ │ +
284 levelSizes_[codim][level] = countElementsNoCodim< codim >(it,end, levelTypeSizes_[codim][level]);
│ │ │ │ +
285 }
│ │ │ │ +
286
│ │ │ │ +
287 template <PartitionIteratorType pitype, int codim>
│ │ │ │ +
288 void countLeafEntitiesNoCodim() const
│ │ │ │ +
289 {
│ │ │ │ +
290 // count All_Partition entities
│ │ │ │ +
291 typedef typename GridType :: LeafGridView GridView ;
│ │ │ │ +
292 typedef typename GridView :: template Codim< 0 > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ +
293 GridView gridView = grid_.leafGridView();
│ │ │ │ +
294 Iterator it = gridView.template begin< 0, pitype > ();
│ │ │ │ +
295 Iterator end = gridView.template end< 0, pitype > ();
│ │ │ │ +
296 leafSizes_[codim] = countElementsNoCodim< codim >(it,end, leafTypeSizes_[codim] );
│ │ │ │ +
297 }
│ │ │ │ +
298
│ │ │ │ +
299 // counts entities with given type for given iterator
│ │ │ │ +
300 template < int codim, class IteratorType >
│ │ │ │ +
301 int countElementsNoCodim(IteratorType & it, const IteratorType & end, std::vector<int>& typeSizes) const
│ │ │ │ +
302 {
│ │ │ │ +
303 typedef typename GridType :: LocalIdSet LocalIdSet ;
│ │ │ │ +
304 typedef typename LocalIdSet :: IdType IdType ;
│ │ │ │ +
305
│ │ │ │ +
306 typedef ReferenceElements< ctype, dim > ReferenceElementContainerType;
│ │ │ │ +
307 typedef typename ReferenceElementContainerType::ReferenceElement ReferenceElementType;
│ │ │ │ +
308
│ │ │ │ +
309 typedef std::set< IdType > CodimIdSetType ;
│ │ │ │ +
310
│ │ │ │ +
311 typedef typename IteratorType :: Entity ElementType ;
│ │ │ │ +
312
│ │ │ │ +
313 // get id set
│ │ │ │ +
314 const LocalIdSet& idSet = grid_.localIdSet();
│ │ │ │ +
315
│ │ │ │ +
316 const size_t types = typeSizes.size();
│ │ │ │ +
317 for(size_t i=0; i<types; ++i) typeSizes[ i ] = 0;
│ │ │ │ +
318
│ │ │ │ +
319 std::vector< CodimIdSetType > typeCount( types );
│ │ │ │ +
320
│ │ │ │ +
321 // count all elements of codimension codim
│ │ │ │ +
322 for( ; it != end; ++it )
│ │ │ │ +
323 {
│ │ │ │ +
324 // get entity
│ │ │ │ +
325 const ElementType& element = *it ;
│ │ │ │ +
326 // get reference element
│ │ │ │ +
327 ReferenceElementType refElem =
│ │ │ │ +
328 ReferenceElementContainerType :: general( element.type() );
│ │ │ │ +
329
│ │ │ │ +
330 // count all sub entities of codimension codim
│ │ │ │ +
331 const int count = element.subEntities( codim );
│ │ │ │ +
332 for( int i=0; i< count; ++ i )
│ │ │ │ +
333 {
│ │ │ │ +
334 // get geometry type
│ │ │ │ +
335 const GeometryType geomType = refElem.type( i, codim );
│ │ │ │ +
336 // get id of sub entity
│ │ │ │ +
337 const IdType id = idSet.subId( element, i, codim );
│ │ │ │ +
338 // insert id into set
│ │ │ │ +
339 typeCount[ gtIndex( geomType ) ].insert( id );
│ │ │ │ +
340 }
│ │ │ │ +
341 }
│ │ │ │ +
342
│ │ │ │ +
343 // accumulate numbers
│ │ │ │ +
344 int overall = 0;
│ │ │ │ +
345 for(size_t i=0; i<types; ++i)
│ │ │ │ +
346 {
│ │ │ │ +
347 typeSizes[ i ] = typeCount[ i ].size();
│ │ │ │ +
348 overall += typeSizes[ i ];
│ │ │ │ +
349 }
│ │ │ │ +
350
│ │ │ │ +
351 return overall;
│ │ │ │ +
352 }
│ │ │ │ +
353 };
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
355} // end namespace Dune
│ │ │ │ +
356#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
U_CHAR ElementType
Definition misc.hh:63
│ │ │ │ +
GeometryType
Type representing VTK's entity geometry types.
Definition common.hh:132
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
organizes the caching of sizes for one grid and one GeometryType
Definition sizecache.hh:33
│ │ │ │ +
int size(int level, GeometryType type) const
Return number of entities per level and geometry type in this process.
Definition sizecache.hh:191
│ │ │ │ +
int size(int level, int codim) const
Return number of grid entities of a given codim on a given level in this process.
Definition sizecache.hh:174
│ │ │ │ +
int size(int codim) const
Return number of leaf entities of a given codim in this process.
Definition sizecache.hh:205
│ │ │ │ +
SizeCache(const GridType &grid)
constructor taking grid reference
Definition sizecache.hh:142
│ │ │ │ +
int size(const GeometryType type) const
Return number of leaf entities per geometry type in this process.
Definition sizecache.hh:217
│ │ │ │ +
void reset()
reset all cached sizes
Definition sizecache.hh:148
│ │ │ │ +
A set of traits classes to store static information about grid implementation.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,222 +1,414 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -gridenums.hh │ │ │ │ │ +sizecache.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_GRIDENUMS_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_GRIDENUMS_HH │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_SIZECACHE_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_SIZECACHE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ │ -13 │ │ │ │ │ -_3_0 enum _P_a_r_t_i_t_i_o_n_T_y_p_e { │ │ │ │ │ -_3_1 _I_n_t_e_r_i_o_r_E_n_t_i_t_y=0, │ │ │ │ │ -_3_2 _B_o_r_d_e_r_E_n_t_i_t_y=1 , │ │ │ │ │ -_3_3 _O_v_e_r_l_a_p_E_n_t_i_t_y=2 , │ │ │ │ │ -_3_4 _F_r_o_n_t_E_n_t_i_t_y=3 , │ │ │ │ │ -35 _G_h_o_s_t_E_n_t_i_t_y=4 │ │ │ │ │ -_3_6 }; │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18 │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +28namespace _D_u_n_e { │ │ │ │ │ +29 │ │ │ │ │ +31 template │ │ │ │ │ +_3_2 class _S_i_z_e_C_a_c_h_e │ │ │ │ │ +33 { │ │ │ │ │ +34 typedef _S_i_z_e_C_a_c_h_e_<_G_r_i_d_I_m_p_> _T_h_i_s_T_y_p_e; │ │ │ │ │ +36 constexpr static int dim = GridImp::dimension; │ │ │ │ │ 37 │ │ │ │ │ -_4_6 inline std::string _P_a_r_t_i_t_i_o_n_N_a_m_e(_P_a_r_t_i_t_i_o_n_T_y_p_e type) │ │ │ │ │ -47 { │ │ │ │ │ -48 switch(type) { │ │ │ │ │ -49 case _I_n_t_e_r_i_o_r_E_n_t_i_t_y : │ │ │ │ │ -50 return "interior"; │ │ │ │ │ -51 case _B_o_r_d_e_r_E_n_t_i_t_y : │ │ │ │ │ -52 return "border"; │ │ │ │ │ -53 case _O_v_e_r_l_a_p_E_n_t_i_t_y : │ │ │ │ │ -54 return "overlap"; │ │ │ │ │ -55 case _F_r_o_n_t_E_n_t_i_t_y : │ │ │ │ │ -56 return "front"; │ │ │ │ │ -57 case _G_h_o_s_t_E_n_t_i_t_y : │ │ │ │ │ -58 return "ghost"; │ │ │ │ │ -59 default : │ │ │ │ │ -60 DUNE_THROW(NotImplemented, "name of unknown partition type requested"); │ │ │ │ │ -61 } │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -65 │ │ │ │ │ -_7_2 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -&type ) │ │ │ │ │ -73 { │ │ │ │ │ -74 return out << _P_a_r_t_i_t_i_o_n_N_a_m_e( type ); │ │ │ │ │ -75 } │ │ │ │ │ -76 │ │ │ │ │ -77 │ │ │ │ │ -_8_6 enum _I_n_t_e_r_f_a_c_e_T_y_p_e { │ │ │ │ │ -_8_7 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e=0, │ │ │ │ │ -_8_8 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e=1, │ │ │ │ │ -_8_9 _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e=2, │ │ │ │ │ -_9_0 _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e=3, │ │ │ │ │ -91 _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e=4 │ │ │ │ │ -_9_2 }; │ │ │ │ │ +39 constexpr static int nCodim = GridImp::dimension + 1; │ │ │ │ │ +40 │ │ │ │ │ +41 // type of grid │ │ │ │ │ +42 typedef GridImp GridType; │ │ │ │ │ +43 │ │ │ │ │ +44 // coordinate type │ │ │ │ │ +45 typedef typename GridType :: ctype ctype ; │ │ │ │ │ +46 │ │ │ │ │ +47 // stores all sizes of the levels │ │ │ │ │ +48 mutable std::vector< int > levelSizes_[nCodim]; │ │ │ │ │ +49 │ │ │ │ │ +50 // stores all sizes of the levels │ │ │ │ │ +51 mutable std::vector< std::vector< int > > levelTypeSizes_[nCodim]; │ │ │ │ │ +52 │ │ │ │ │ +53 // stores all sizes of leafs │ │ │ │ │ +54 mutable int leafSizes_[nCodim]; │ │ │ │ │ +55 │ │ │ │ │ +56 // stores all sizes of leafs │ │ │ │ │ +57 mutable std::vector< int > leafTypeSizes_[nCodim]; │ │ │ │ │ +58 │ │ │ │ │ +59 // the grid │ │ │ │ │ +60 const GridType & grid_; │ │ │ │ │ +61 │ │ │ │ │ +62 // count elements of set by iterating the grid │ │ │ │ │ +63 template < int codim, bool gridHasCodim > │ │ │ │ │ +64 struct CountLevelEntitiesBase │ │ │ │ │ +65 { │ │ │ │ │ +66 template < class SzCacheType > │ │ │ │ │ +67 static void apply(const SzCacheType & sc, int level, int cd) │ │ │ │ │ +68 { │ │ │ │ │ +69 if( cd == codim ) │ │ │ │ │ +70 { │ │ │ │ │ +71 sc.template countLevelEntities (level); │ │ │ │ │ +72 } │ │ │ │ │ +73 } │ │ │ │ │ +74 }; │ │ │ │ │ +75 │ │ │ │ │ +76 template < int codim > │ │ │ │ │ +77 struct CountLevelEntitiesBase< codim, false > │ │ │ │ │ +78 { │ │ │ │ │ +79 template < class SzCacheType > │ │ │ │ │ +80 static void apply(const SzCacheType & sc, int level, int cd) │ │ │ │ │ +81 { │ │ │ │ │ +82 if( cd == codim ) │ │ │ │ │ +83 { │ │ │ │ │ +84 sc.template countLevelEntitiesNoCodim (level); │ │ │ │ │ +85 } │ │ │ │ │ +86 } │ │ │ │ │ +87 }; │ │ │ │ │ +88 │ │ │ │ │ +89 template < int codim > │ │ │ │ │ +90 struct CountLevelEntities │ │ │ │ │ +91 : public CountLevelEntitiesBase< codim, Capabilities :: hasEntity< GridType, │ │ │ │ │ +codim > :: v > │ │ │ │ │ +92 {}; │ │ │ │ │ 93 │ │ │ │ │ -94 │ │ │ │ │ -96 │ │ │ │ │ -_1_0_3 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ -&type ) │ │ │ │ │ -104 { │ │ │ │ │ -105 switch( type ) │ │ │ │ │ -106 { │ │ │ │ │ -107 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e : │ │ │ │ │ -108 return out << "interior-border / interior-border interface"; │ │ │ │ │ -109 │ │ │ │ │ -110 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ │ -111 return out << "interior-border / all interface"; │ │ │ │ │ -112 │ │ │ │ │ -113 case _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e : │ │ │ │ │ -114 return out << "overlap / overlap-front interface"; │ │ │ │ │ -115 │ │ │ │ │ -116 case _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ │ -117 return out << "overlap / all interface"; │ │ │ │ │ -118 │ │ │ │ │ -119 case _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ │ -120 return out << "all / all interface"; │ │ │ │ │ +94 // count elements of set by iterating the grid │ │ │ │ │ +95 template < int codim, bool gridHasCodim > │ │ │ │ │ +96 struct CountLeafEntitiesBase │ │ │ │ │ +97 { │ │ │ │ │ +98 template │ │ │ │ │ +99 static void apply(const SzCacheType & sc, int cd) │ │ │ │ │ +100 { │ │ │ │ │ +101 if( cd == codim ) │ │ │ │ │ +102 { │ │ │ │ │ +103 sc.template countLeafEntities (); │ │ │ │ │ +104 } │ │ │ │ │ +105 } │ │ │ │ │ +106 }; │ │ │ │ │ +107 │ │ │ │ │ +108 // count elements of set by iterating the grid │ │ │ │ │ +109 template < int codim > │ │ │ │ │ +110 struct CountLeafEntitiesBase< codim, false > │ │ │ │ │ +111 { │ │ │ │ │ +112 template │ │ │ │ │ +113 static void apply(const SzCacheType & sc, int cd) │ │ │ │ │ +114 { │ │ │ │ │ +115 if( cd == codim ) │ │ │ │ │ +116 { │ │ │ │ │ +117 sc.template countLeafEntitiesNoCodim (); │ │ │ │ │ +118 } │ │ │ │ │ +119 } │ │ │ │ │ +120 }; │ │ │ │ │ 121 │ │ │ │ │ -122 default : │ │ │ │ │ -123 return out << "unknown interface"; │ │ │ │ │ -124 } │ │ │ │ │ -125 } │ │ │ │ │ +122 template < int codim > │ │ │ │ │ +123 struct CountLeafEntities │ │ │ │ │ +124 : public CountLeafEntitiesBase< codim, Capabilities :: hasEntity< GridType, │ │ │ │ │ +codim > :: v > │ │ │ │ │ +125 {}; │ │ │ │ │ 126 │ │ │ │ │ -127 │ │ │ │ │ -_1_3_6 enum _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e { │ │ │ │ │ -_1_3_7 _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n=0, │ │ │ │ │ -_1_3_8 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n=1, │ │ │ │ │ -_1_3_9 _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n=2, │ │ │ │ │ -_1_4_0 _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n=3, │ │ │ │ │ -_1_4_1 _A_l_l___P_a_r_t_i_t_i_o_n=4, │ │ │ │ │ -142 _G_h_o_s_t___P_a_r_t_i_t_i_o_n=5 │ │ │ │ │ -_1_4_3 }; │ │ │ │ │ -144 │ │ │ │ │ -145 │ │ │ │ │ -147 │ │ │ │ │ -_1_5_4 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const │ │ │ │ │ -_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e &type ) │ │ │ │ │ -155 { │ │ │ │ │ -156 static std::string name[ 6 ] = { "interior partition", "interior-border │ │ │ │ │ -partition", "overlap partition", │ │ │ │ │ -157 "overlap-front partition", "all partition", "ghost partition" }; │ │ │ │ │ -158 return out << name[ type ]; │ │ │ │ │ -159 } │ │ │ │ │ -160 │ │ │ │ │ -161 │ │ │ │ │ -_1_7_0 enum _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n { │ │ │ │ │ -_1_7_1 _F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n, │ │ │ │ │ -172 _B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -_1_7_3 }; │ │ │ │ │ -174 │ │ │ │ │ -180} │ │ │ │ │ -181#endif │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_N_a_m_e │ │ │ │ │ -std::string PartitionName(PartitionType type) │ │ │ │ │ -Provide names for the partition types. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ │ -PartitionIteratorType │ │ │ │ │ -Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ │ -write a PartitionType to a stream │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType │ │ │ │ │ -Attributes used in the generic overlap model. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n │ │ │ │ │ -CommunicationDirection │ │ │ │ │ -Define a type for communication direction parameter. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ -InterfaceType │ │ │ │ │ -Parameter to be used for the communication functions. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ All_Partition │ │ │ │ │ -all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ OverlapFront_Partition │ │ │ │ │ -interior, border, overlap and front entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Interior_Partition │ │ │ │ │ -only interior entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ InteriorBorder_Partition │ │ │ │ │ -interior and border entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Overlap_Partition │ │ │ │ │ -interior, border, and overlap entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Ghost_Partition │ │ │ │ │ -only ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y │ │ │ │ │ -@ FrontEntity │ │ │ │ │ -on boundary between overlap and ghost │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ -@ InteriorEntity │ │ │ │ │ -all interior entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -@ GhostEntity │ │ │ │ │ -ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ -@ BorderEntity │ │ │ │ │ -on boundary between interior and overlap │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ │ -@ OverlapEntity │ │ │ │ │ -all entities lying in the overlap zone │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -@ BackwardCommunication │ │ │ │ │ -reverse communication direction │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:172 │ │ │ │ │ -_D_u_n_e_:_:_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -@ ForwardCommunication │ │ │ │ │ -communicate as given in InterfaceType │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ InteriorBorder_All_Interface │ │ │ │ │ -send interior and border, receive all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ All_All_Interface │ │ │ │ │ -send all and receive all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ Overlap_All_Interface │ │ │ │ │ -send overlap, receive all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ Overlap_OverlapFront_Interface │ │ │ │ │ -send overlap, receive overlap and front entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ InteriorBorder_InteriorBorder_Interface │ │ │ │ │ -send/receive interior and border entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:87 │ │ │ │ │ +127 int gtIndex( const GeometryType& type ) const │ │ │ │ │ +128 { │ │ │ │ │ +129 return type.id() >> 1 ; │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +132 int sizeCodim( const int codim ) const │ │ │ │ │ +133 { │ │ │ │ │ +134 const int mydim = GridType :: dimension - codim; │ │ │ │ │ +135 return ((1 << mydim) + 1) / 2; │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 // private copy constructor │ │ │ │ │ +139 _S_i_z_e_C_a_c_h_e (const _S_i_z_e_C_a_c_h_e & ); │ │ │ │ │ +140 public: │ │ │ │ │ +_1_4_2 _S_i_z_e_C_a_c_h_e (const GridType & grid) : grid_( grid ) │ │ │ │ │ +143 { │ │ │ │ │ +144 _r_e_s_e_t(); │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +_1_4_8 void _r_e_s_e_t() │ │ │ │ │ +149 { │ │ │ │ │ +150 for(int codim=0; codim & vec = levelSizes_[codim]; │ │ │ │ │ +160 vec.resize(numMxl); │ │ │ │ │ +161 levelTypeSizes_[codim].resize( numMxl ); │ │ │ │ │ +162 for(int level = 0; level= 0 ); │ │ │ │ │ +177 assert( codim < nCodim ); │ │ │ │ │ +178 assert( level >= 0 ); │ │ │ │ │ +179 if( level >= (int) levelSizes_[codim]._s_i_z_e() ) return 0; │ │ │ │ │ +180 │ │ │ │ │ +181 if( levelSizes_[codim][level] < 0) │ │ │ │ │ +182 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CountLevelEntities< i >::apply( *this, level, codim ); } ); │ │ │ │ │ +183 │ │ │ │ │ +184 // CountLevelEntities::count │ │ │ │ │ +(*this,level,codim); │ │ │ │ │ +185 │ │ │ │ │ +186 assert( levelSizes_[codim][level] >= 0 ); │ │ │ │ │ +187 return levelSizes_[codim][level]; │ │ │ │ │ +188 } │ │ │ │ │ +189 │ │ │ │ │ +_1_9_1 int _s_i_z_e (int level, GeometryType type) const │ │ │ │ │ +192 { │ │ │ │ │ +193 int codim = GridType ::dimension - type.dim(); │ │ │ │ │ +194 if( levelSizes_[codim][level] < 0) │ │ │ │ │ +195 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CountLevelEntities< i >::apply( *this, level, codim ); } ); │ │ │ │ │ +196 │ │ │ │ │ +197 assert( levelTypeSizes_[codim][level][gtIndex( type )] >= 0 ); │ │ │ │ │ +198 return levelTypeSizes_[codim][level][gtIndex( type )]; │ │ │ │ │ +199 } │ │ │ │ │ +200 │ │ │ │ │ +201 //******************************************************************** │ │ │ │ │ +202 // leaf sizes │ │ │ │ │ +203 //******************************************************************** │ │ │ │ │ +_2_0_5 int _s_i_z_e (int codim) const │ │ │ │ │ +206 { │ │ │ │ │ +207 assert( codim >= 0 ); │ │ │ │ │ +208 assert( codim < nCodim ); │ │ │ │ │ +209 if( leafSizes_[codim] < 0 ) │ │ │ │ │ +210 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CountLeafEntities< i >::apply( *this, codim ); } ); │ │ │ │ │ +211 │ │ │ │ │ +212 assert( leafSizes_[codim] >= 0 ); │ │ │ │ │ +213 return leafSizes_[codim]; │ │ │ │ │ +214 }; │ │ │ │ │ +215 │ │ │ │ │ +_2_1_7 int _s_i_z_e ( const GeometryType type ) const │ │ │ │ │ +218 { │ │ │ │ │ +219 int codim = GridType :: dimension - type.dim(); │ │ │ │ │ +220 if( leafSizes_[codim] < 0 ) │ │ │ │ │ +221 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CountLeafEntities< i >::apply( *this, codim ); } ); │ │ │ │ │ +222 │ │ │ │ │ +223 assert( leafTypeSizes_[codim][ gtIndex( type )] >= 0 ); │ │ │ │ │ +224 return leafTypeSizes_[codim][ gtIndex( type )]; │ │ │ │ │ +225 } │ │ │ │ │ +226 │ │ │ │ │ +227 private: │ │ │ │ │ +228 template │ │ │ │ │ +229 void countLevelEntities(int level) const │ │ │ │ │ +230 { │ │ │ │ │ +231 typedef typename GridType :: LevelGridView _G_r_i_d_V_i_e_w ; │ │ │ │ │ +232 typedef typename GridView :: template Codim< codim > :: template │ │ │ │ │ +Partition :: Iterator Iterator ; │ │ │ │ │ +233 _G_r_i_d_V_i_e_w gridView = grid_.levelGridView( level ); │ │ │ │ │ +234 Iterator it = gridView.template begin (); │ │ │ │ │ +235 Iterator end = gridView.template end (); │ │ │ │ │ +236 levelSizes_[codim][level] = countElements(it,end, levelTypeSizes_[codim] │ │ │ │ │ +[level]); │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +239 template │ │ │ │ │ +240 void countLeafEntities() const │ │ │ │ │ +241 { │ │ │ │ │ +242 // count All_Partition entities │ │ │ │ │ +243 typedef typename GridType :: LeafGridView GridView ; │ │ │ │ │ +244 typedef typename GridView :: template Codim< codim > :: template │ │ │ │ │ +Partition :: Iterator Iterator ; │ │ │ │ │ +245 GridView gridView = grid_.leafGridView(); │ │ │ │ │ +246 Iterator it = gridView.template begin (); │ │ │ │ │ +247 Iterator end = gridView.template end (); │ │ │ │ │ +248 leafSizes_[codim] = countElements(it,end, leafTypeSizes_[codim] ); │ │ │ │ │ +249 } │ │ │ │ │ +250 │ │ │ │ │ +251 // counts entities with given type for given iterator │ │ │ │ │ +252 template │ │ │ │ │ +253 int countElements(IteratorType & it, const IteratorType & end, std:: │ │ │ │ │ +vector& typeSizes) const │ │ │ │ │ +254 { │ │ │ │ │ +255 int overall = 0; │ │ │ │ │ +256 const size_t types = typeSizes.size(); │ │ │ │ │ +257 for(size_t i=0; itype(); │ │ │ │ │ +261 ++typeSizes[ gtIndex( type ) ]; │ │ │ │ │ +262 ++overall; │ │ │ │ │ +263 } │ │ │ │ │ +264 │ │ │ │ │ +265#ifndef NDEBUG │ │ │ │ │ +266 int sumtypes = 0; │ │ │ │ │ +267 for(size_t i=0; i │ │ │ │ │ +277 void countLevelEntitiesNoCodim(int level) const │ │ │ │ │ +278 { │ │ │ │ │ +279 typedef typename GridType :: LevelGridView GridView ; │ │ │ │ │ +280 typedef typename GridView :: template Codim< 0 > :: template │ │ │ │ │ +Partition :: Iterator Iterator ; │ │ │ │ │ +281 GridView gridView = grid_.levelGridView( level ); │ │ │ │ │ +282 Iterator it = gridView.template begin< 0, pitype> (); │ │ │ │ │ +283 Iterator end = gridView.template end< 0, pitype> (); │ │ │ │ │ +284 levelSizes_[codim][level] = countElementsNoCodim< codim >(it,end, │ │ │ │ │ +levelTypeSizes_[codim][level]); │ │ │ │ │ +285 } │ │ │ │ │ +286 │ │ │ │ │ +287 template │ │ │ │ │ +288 void countLeafEntitiesNoCodim() const │ │ │ │ │ +289 { │ │ │ │ │ +290 // count All_Partition entities │ │ │ │ │ +291 typedef typename GridType :: LeafGridView GridView ; │ │ │ │ │ +292 typedef typename GridView :: template Codim< 0 > :: template │ │ │ │ │ +Partition :: Iterator Iterator ; │ │ │ │ │ +293 GridView gridView = grid_.leafGridView(); │ │ │ │ │ +294 Iterator it = gridView.template begin< 0, pitype > (); │ │ │ │ │ +295 Iterator end = gridView.template end< 0, pitype > (); │ │ │ │ │ +296 leafSizes_[codim] = countElementsNoCodim< codim >(it,end, leafTypeSizes_ │ │ │ │ │ +[codim] ); │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +299 // counts entities with given type for given iterator │ │ │ │ │ +300 template < int codim, class IteratorType > │ │ │ │ │ +301 int countElementsNoCodim(IteratorType & it, const IteratorType & end, std:: │ │ │ │ │ +vector& typeSizes) const │ │ │ │ │ +302 { │ │ │ │ │ +303 typedef typename GridType :: LocalIdSet LocalIdSet ; │ │ │ │ │ +304 typedef typename LocalIdSet :: IdType IdType ; │ │ │ │ │ +305 │ │ │ │ │ +306 typedef ReferenceElements< ctype, dim > ReferenceElementContainerType; │ │ │ │ │ +307 typedef typename ReferenceElementContainerType::ReferenceElement │ │ │ │ │ +ReferenceElementType; │ │ │ │ │ +308 │ │ │ │ │ +309 typedef std::set< IdType > CodimIdSetType ; │ │ │ │ │ +310 │ │ │ │ │ +311 typedef typename IteratorType :: Entity _E_l_e_m_e_n_t_T_y_p_e ; │ │ │ │ │ +312 │ │ │ │ │ +313 // get id set │ │ │ │ │ +314 const LocalIdSet& idSet = grid_.localIdSet(); │ │ │ │ │ +315 │ │ │ │ │ +316 const size_t types = typeSizes.size(); │ │ │ │ │ +317 for(size_t i=0; i typeCount( types ); │ │ │ │ │ +320 │ │ │ │ │ +321 // count all elements of codimension codim │ │ │ │ │ +322 for( ; it != end; ++it ) │ │ │ │ │ +323 { │ │ │ │ │ +324 // get entity │ │ │ │ │ +325 const _E_l_e_m_e_n_t_T_y_p_e& element = *it ; │ │ │ │ │ +326 // get reference element │ │ │ │ │ +327 ReferenceElementType refElem = │ │ │ │ │ +328 ReferenceElementContainerType :: general( element.type() ); │ │ │ │ │ +329 │ │ │ │ │ +330 // count all sub entities of codimension codim │ │ │ │ │ +331 const int count = element.subEntities( codim ); │ │ │ │ │ +332 for( int i=0; i< count; ++ i ) │ │ │ │ │ +333 { │ │ │ │ │ +334 // get geometry type │ │ │ │ │ +335 const _G_e_o_m_e_t_r_y_T_y_p_e geomType = refElem.type( i, codim ); │ │ │ │ │ +336 // get id of sub entity │ │ │ │ │ +337 const IdType id = idSet.subId( element, i, codim ); │ │ │ │ │ +338 // insert id into set │ │ │ │ │ +339 typeCount[ gtIndex( geomType ) ].insert( id ); │ │ │ │ │ +340 } │ │ │ │ │ +341 } │ │ │ │ │ +342 │ │ │ │ │ +343 // accumulate numbers │ │ │ │ │ +344 int overall = 0; │ │ │ │ │ +345 for(size_t i=0; i │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: mapper.hh File Reference │ │ │ │ +dune-grid: defaultgridview.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,40 +72,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mapper.hh File Reference
│ │ │ │ +
defaultgridview.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ -More...

│ │ │ │ -
#include <utility>
│ │ │ │ -#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ +
#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/grid/common/capabilities.hh>
│ │ │ │ +#include <dune/grid/common/gridview.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Mapper< G, MapperImp, IndexType >
 Mapper interface. More...
struct  Dune::DefaultLevelGridViewTraits< GridImp >
 
struct  Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >
 
struct  Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >::Partition< pit >
 Define types needed to iterate over entities of a given partition type. More...
 
class  Dune::DefaultLevelGridView< GridImp >
 
struct  Dune::DefaultLevelGridView< GridImp >::Codim< cd >
 Codim Structure. More...
 
struct  Dune::DefaultLeafGridViewTraits< GridImp >
 
struct  Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd >
 
struct  Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd >::Partition< pit >
 Define types needed to iterate over entities of a given partition type. More...
 
class  Dune::DefaultLeafGridView< GridImp >
 
struct  Dune::DefaultLeafGridView< GridImp >::Codim< cd >
 Codim Structure. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Provides classes with basic mappers which are used to attach data to a grid.

│ │ │ │ -
Author
Peter Bastian
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,48 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mapper.hh File Reference │ │ │ │ │ -Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ -_M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +defaultgridview.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_v_i_e_w_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_M_a_p_p_e_r_<_ _G_,_ _M_a_p_p_e_r_I_m_p_,_ _I_n_d_e_x_T_y_p_e_ _> │ │ │ │ │ -  _M_a_p_p_e_r interface. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _>_:_:_P_a_r_t_i_t_i_o_n_< │ │ │ │ │ + _p_i_t_ _> │ │ │ │ │ +  Define types needed to iterate over entities of a given partition │ │ │ │ │ + type. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +  _C_o_d_i_m Structure. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _>_:_:_P_a_r_t_i_t_i_o_n_< │ │ │ │ │ + _p_i_t_ _> │ │ │ │ │ +  Define types needed to iterate over entities of a given partition │ │ │ │ │ + type. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +  _C_o_d_i_m Structure. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ - Author │ │ │ │ │ - Peter Bastian │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00290_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: mapper.hh Source File │ │ │ │ +dune-grid: defaultgridview.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,123 +74,535 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mapper.hh
│ │ │ │ +
defaultgridview.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_MAPPER_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_MAPPER_HH
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
│ │ │ │
7
│ │ │ │ -
8#include <utility>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ -
11
│ │ │ │ -
89namespace Dune
│ │ │ │ -
90{
│ │ │ │ -
108 template <typename G, typename MapperImp, typename IndexType=int>
│ │ │ │ -
│ │ │ │ -
109 class Mapper
│ │ │ │ -
110 {
│ │ │ │ -
111 public:
│ │ │ │ -
112
│ │ │ │ -
114 using Index = IndexType;
│ │ │ │ -
115
│ │ │ │ -
121 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
122 Index index (const EntityType& e) const
│ │ │ │ -
123 {
│ │ │ │ -
124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e)));
│ │ │ │ -
125 return asImp().index(e);
│ │ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 template< class GridImp >
│ │ │ │ +
18 class DefaultLevelGridView;
│ │ │ │ +
19
│ │ │ │ +
20 template< class GridImp >
│ │ │ │ +
21 class DefaultLeafGridView;
│ │ │ │ +
22
│ │ │ │ +
23
│ │ │ │ +
24 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
30 typedef typename std::remove_const<GridImp>::type Grid;
│ │ │ │ +
31
│ │ │ │ +
33 typedef typename Grid :: Traits :: LevelIndexSet IndexSet;
│ │ │ │ +
34
│ │ │ │ +
36 typedef typename Grid :: Traits :: LevelIntersection Intersection;
│ │ │ │ +
37
│ │ │ │ +
39 typedef typename Grid :: Traits :: LevelIntersectionIterator
│ │ │ │ + │ │ │ │ +
41
│ │ │ │ +
43 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ +
44
│ │ │ │ +
46 [[deprecated("Use Communication instead!")]]
│ │ │ │ + │ │ │ │ +
48
│ │ │ │ +
49 template< int cd >
│ │ │ │ +
│ │ │ │ +
50 struct Codim
│ │ │ │ +
51 {
│ │ │ │ +
52 typedef typename Grid :: Traits
│ │ │ │ +
53 :: template Codim< cd > :: template Partition< All_Partition > :: LevelIterator
│ │ │ │ + │ │ │ │ +
55
│ │ │ │ +
56 typedef typename Grid :: Traits :: template Codim< cd > :: Entity Entity;
│ │ │ │ +
57
│ │ │ │ +
58 typedef typename Grid :: template Codim< cd > :: Geometry Geometry;
│ │ │ │ +
59 typedef typename Grid :: template Codim< cd > :: LocalGeometry
│ │ │ │ + │ │ │ │ +
61
│ │ │ │ +
63 template< PartitionIteratorType pit >
│ │ │ │ +
│ │ │ │ +
64 struct Partition
│ │ │ │ +
65 {
│ │ │ │ +
67 typedef typename Grid :: template Codim< cd >
│ │ │ │ +
68 :: template Partition< pit > :: LevelIterator
│ │ │ │ + │ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71 };
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 constexpr static bool conforming = Capabilities :: isLevelwiseConforming< Grid > :: v;
│ │ │ │ +
74 };
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76
│ │ │ │ +
77 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
79 {
│ │ │ │ + │ │ │ │ +
81
│ │ │ │ +
82 public:
│ │ │ │ + │ │ │ │ +
84
│ │ │ │ +
86 typedef typename Traits::Grid Grid;
│ │ │ │ +
87
│ │ │ │ +
89 typedef typename Traits :: IndexSet IndexSet;
│ │ │ │ +
90
│ │ │ │ +
92 typedef typename Traits :: Intersection Intersection;
│ │ │ │ +
93
│ │ │ │ +
95 typedef typename Traits :: IntersectionIterator IntersectionIterator;
│ │ │ │ +
96
│ │ │ │ +
98 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ +
99
│ │ │ │ +
101 [[deprecated("Use Communication instead!")]]
│ │ │ │ + │ │ │ │ +
103
│ │ │ │ +
105 template< int cd >
│ │ │ │ +
106 struct Codim : public Traits :: template Codim<cd> {};
│ │ │ │ +
107
│ │ │ │ +
108 constexpr static bool conforming = Traits :: conforming;
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ +
110 DefaultLevelGridView ( const Grid &grid, int level )
│ │ │ │ +
111 : grid_( &grid ),
│ │ │ │ +
112 level_( level )
│ │ │ │ +
113 {}
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
│ │ │ │ +
116 const Grid &grid () const
│ │ │ │ +
117 {
│ │ │ │ +
118 assert( grid_ );
│ │ │ │ +
119 return *grid_;
│ │ │ │ +
120 }
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ +
123 const IndexSet &indexSet () const
│ │ │ │ +
124 {
│ │ │ │ +
125 return grid().levelIndexSet( level_ );
│ │ │ │
126 }
│ │ │ │
│ │ │ │
127
│ │ │ │ -
128
│ │ │ │ -
│ │ │ │ -
136 Index subIndex (const typename G::Traits::template Codim<0>::Entity& e,
│ │ │ │ -
137 int i,
│ │ │ │ -
138 unsigned int codim) const
│ │ │ │ +
129 bool isConforming() const { return bool(Traits::conforming); }
│ │ │ │ +
130
│ │ │ │ +
│ │ │ │ +
132 int size ( int codim ) const
│ │ │ │ +
133 {
│ │ │ │ +
134 return grid().size( level_, codim );
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
138 int size ( const GeometryType &type ) const
│ │ │ │
139 {
│ │ │ │ -
140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim)));
│ │ │ │ -
141 return asImp().subIndex(e,i,codim);
│ │ │ │ -
142 }
│ │ │ │ +
140 return grid().size( level_, type );
│ │ │ │ +
141 }
│ │ │ │
│ │ │ │ -
143
│ │ │ │ +
142
│ │ │ │ +
144 template< int cd >
│ │ │ │ +
│ │ │ │ +
145 typename Codim< cd > :: Iterator begin () const
│ │ │ │ +
146 {
│ │ │ │ +
147 return grid().template lbegin< cd, All_Partition >( level_ );
│ │ │ │ +
148 }
│ │ │ │ +
│ │ │ │ +
149
│ │ │ │ +
151 template< int cd, PartitionIteratorType pit >
│ │ │ │
│ │ │ │ -
152 auto size () const
│ │ │ │ +
152 typename Codim< cd > :: template Partition< pit > :: Iterator begin () const
│ │ │ │
153 {
│ │ │ │ -
154 CHECK_INTERFACE_IMPLEMENTATION((asImp().size()));
│ │ │ │ -
155 return asImp().size();
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158
│ │ │ │ -
166 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
167 bool contains (const EntityType& e, IndexType& result) const
│ │ │ │ -
168 {
│ │ │ │ -
169 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,result )));
│ │ │ │ -
170 return asImp().contains(e,result );
│ │ │ │ -
171 }
│ │ │ │ -
│ │ │ │ -
172
│ │ │ │ -
173
│ │ │ │ -
│ │ │ │ -
183 bool contains (const typename G::Traits::template Codim<0>::Entity& e, int i, int cc, IndexType& result) const
│ │ │ │ -
184 {
│ │ │ │ -
185 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,i,cc,result)))
│ │ │ │ -
186 return asImp().contains(e,i,cc,result);
│ │ │ │ -
187 }
│ │ │ │ +
154 return grid().template lbegin< cd, pit >( level_ );
│ │ │ │ +
155 }
│ │ │ │ +
│ │ │ │ +
156
│ │ │ │ +
158 template< int cd >
│ │ │ │ +
│ │ │ │ +
159 typename Codim< cd > :: Iterator end () const
│ │ │ │ +
160 {
│ │ │ │ +
161 return grid().template lend< cd, All_Partition >( level_ );
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163
│ │ │ │ +
165 template< int cd, PartitionIteratorType pit >
│ │ │ │ +
│ │ │ │ +
166 typename Codim< cd > :: template Partition< pit > :: Iterator end () const
│ │ │ │ +
167 {
│ │ │ │ +
168 return grid().template lend< cd, pit >( level_ );
│ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │ +
170
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
173 ibegin ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ +
174 {
│ │ │ │ +
175 return entity.impl().ilevelbegin();
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
180 iend ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ +
181 {
│ │ │ │ +
182 return entity.impl().ilevelend();
│ │ │ │ +
183 }
│ │ │ │ +
│ │ │ │ +
184
│ │ │ │ +
│ │ │ │ +
186 const Communication &comm () const
│ │ │ │ +
187 {
│ │ │ │ +
188 return grid().comm();
│ │ │ │ +
189 }
│ │ │ │
│ │ │ │ -
188
│ │ │ │ -
191 template <class GridView>
│ │ │ │ +
190
│ │ │ │
│ │ │ │ -
192 void update (GridView&& gridView)
│ │ │ │ -
193 {
│ │ │ │ -
194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update(std::forward<GridView>(gridView))));
│ │ │ │ +
192 int overlapSize(int codim) const
│ │ │ │ +
193 {
│ │ │ │ +
194 return grid().overlapSize(level_, codim);
│ │ │ │
195 }
│ │ │ │
│ │ │ │
196
│ │ │ │ -
199 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8. Mappers have to implement update(gridView).")]]
│ │ │ │ -
│ │ │ │ -
200 void update ()
│ │ │ │ -
201 {
│ │ │ │ -
202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update()));
│ │ │ │ -
203 }
│ │ │ │ -
│ │ │ │ -
204
│ │ │ │ -
205 private:
│ │ │ │ -
207 MapperImp& asImp () {return static_cast<MapperImp &> (*this);}
│ │ │ │ -
209 const MapperImp& asImp () const {return static_cast<const MapperImp &>(*this);}
│ │ │ │ -
210 };
│ │ │ │ +
│ │ │ │ +
198 int ghostSize(int codim) const
│ │ │ │ +
199 {
│ │ │ │ +
200 return grid().ghostSize(level_, codim);
│ │ │ │ +
201 }
│ │ │ │ +
│ │ │ │ +
202
│ │ │ │ +
204 template< class DataHandleImp, class DataType >
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
208 {
│ │ │ │ +
209 return grid().communicate( data, iftype, dir, level_ );
│ │ │ │ +
210 }
│ │ │ │
│ │ │ │
211
│ │ │ │ -
214#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ │ -
215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ │ +
212 private:
│ │ │ │ +
213 const Grid *grid_;
│ │ │ │ +
214 int level_;
│ │ │ │ +
215 };
│ │ │ │ +
│ │ │ │
216
│ │ │ │ -
217}
│ │ │ │ -
218#endif
│ │ │ │ +
217
│ │ │ │ +
218 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
221
│ │ │ │ +
223 typedef typename std::remove_const<GridImp>::type Grid;
│ │ │ │ +
224
│ │ │ │ +
226 typedef typename Grid :: Traits :: LeafIndexSet IndexSet;
│ │ │ │ +
227
│ │ │ │ +
229 typedef typename Grid :: Traits :: LeafIntersection Intersection;
│ │ │ │ +
230
│ │ │ │ +
232 typedef typename Grid :: Traits :: LeafIntersectionIterator
│ │ │ │ + │ │ │ │ +
234
│ │ │ │ +
236 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ +
237
│ │ │ │ +
239 [[deprecated("Use Communication instead!")]]
│ │ │ │ + │ │ │ │ +
241
│ │ │ │ +
242 template< int cd >
│ │ │ │ +
│ │ │ │ +
243 struct Codim
│ │ │ │ +
244 {
│ │ │ │ +
245 typedef typename Grid :: Traits
│ │ │ │ +
246 :: template Codim< cd > :: template Partition< All_Partition > :: LeafIterator
│ │ │ │ + │ │ │ │ +
248
│ │ │ │ +
249 typedef typename Grid :: Traits :: template Codim< cd > :: Entity Entity;
│ │ │ │ +
250
│ │ │ │ +
251 typedef typename Grid :: template Codim< cd > :: Geometry Geometry;
│ │ │ │ +
252 typedef typename Grid :: template Codim< cd > :: LocalGeometry
│ │ │ │ + │ │ │ │ +
254
│ │ │ │ +
256 template <PartitionIteratorType pit >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
258 {
│ │ │ │ +
260 typedef typename Grid :: template Codim< cd >
│ │ │ │ +
261 :: template Partition< pit > :: LeafIterator
│ │ │ │ + │ │ │ │ +
263 };
│ │ │ │ +
│ │ │ │ +
264 };
│ │ │ │ +
│ │ │ │ +
265
│ │ │ │ +
266 constexpr static bool conforming = Capabilities :: isLeafwiseConforming< Grid > :: v;
│ │ │ │ +
267 };
│ │ │ │ +
│ │ │ │ +
268
│ │ │ │ +
269
│ │ │ │ +
270 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
272 {
│ │ │ │ + │ │ │ │ +
274
│ │ │ │ +
275 public:
│ │ │ │ + │ │ │ │ +
277
│ │ │ │ +
279 typedef typename Traits::Grid Grid;
│ │ │ │ +
280
│ │ │ │ +
282 typedef typename Traits :: IndexSet IndexSet;
│ │ │ │ +
283
│ │ │ │ +
285 typedef typename Traits :: Intersection Intersection;
│ │ │ │ +
286
│ │ │ │ +
288 typedef typename Traits :: IntersectionIterator IntersectionIterator;
│ │ │ │ +
289
│ │ │ │ +
291 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ +
292
│ │ │ │ +
294 [[deprecated("Use Communication instead!")]]
│ │ │ │ + │ │ │ │ +
296
│ │ │ │ +
298 template< int cd >
│ │ │ │ +
299 struct Codim : public Traits :: template Codim<cd> {};
│ │ │ │ +
300
│ │ │ │ +
301 constexpr static bool conforming = Traits :: conforming;
│ │ │ │ +
302
│ │ │ │ +
303 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
305 : grid_( &grid )
│ │ │ │ +
306 {}
│ │ │ │ +
│ │ │ │ +
307
│ │ │ │ +
│ │ │ │ +
309 const Grid &grid () const
│ │ │ │ +
310 {
│ │ │ │ +
311 assert( grid_ );
│ │ │ │ +
312 return *grid_;
│ │ │ │ +
313 }
│ │ │ │ +
│ │ │ │ +
314
│ │ │ │ +
│ │ │ │ +
316 const IndexSet &indexSet () const
│ │ │ │ +
317 {
│ │ │ │ +
318 return grid().leafIndexSet();
│ │ │ │ +
319 }
│ │ │ │ +
│ │ │ │ +
320
│ │ │ │ +
322 bool isConforming() const { return bool(Traits::conforming); }
│ │ │ │ +
323
│ │ │ │ +
│ │ │ │ +
325 int size ( int codim ) const
│ │ │ │ +
326 {
│ │ │ │ +
327 return grid().size( codim );
│ │ │ │ +
328 }
│ │ │ │ +
│ │ │ │ +
329
│ │ │ │ +
│ │ │ │ +
331 int size ( const GeometryType &type ) const
│ │ │ │ +
332 {
│ │ │ │ +
333 return grid().size( type );
│ │ │ │ +
334 }
│ │ │ │ +
│ │ │ │ +
335
│ │ │ │ +
337 template< int cd >
│ │ │ │ +
│ │ │ │ +
338 typename Codim< cd > :: Iterator begin () const
│ │ │ │ +
339 {
│ │ │ │ +
340 return grid().template leafbegin< cd, All_Partition >();
│ │ │ │ +
341 }
│ │ │ │ +
│ │ │ │ +
342
│ │ │ │ +
344 template< int cd, PartitionIteratorType pit >
│ │ │ │ +
│ │ │ │ +
345 typename Codim< cd > :: template Partition< pit > :: Iterator begin () const
│ │ │ │ +
346 {
│ │ │ │ +
347 return grid().template leafbegin< cd, pit >();
│ │ │ │ +
348 }
│ │ │ │ +
│ │ │ │ +
349
│ │ │ │ +
351 template< int cd >
│ │ │ │ +
│ │ │ │ +
352 typename Codim< cd > :: Iterator end () const
│ │ │ │ +
353 {
│ │ │ │ +
354 return grid().template leafend< cd, All_Partition >();
│ │ │ │ +
355 }
│ │ │ │ +
│ │ │ │ +
356
│ │ │ │ +
358 template< int cd, PartitionIteratorType pit >
│ │ │ │ +
│ │ │ │ +
359 typename Codim< cd > :: template Partition< pit > :: Iterator end () const
│ │ │ │ +
360 {
│ │ │ │ +
361 return grid().template leafend< cd, pit >();
│ │ │ │ +
362 }
│ │ │ │ +
│ │ │ │ +
363
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
366 ibegin ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ +
367 {
│ │ │ │ +
368 return entity.impl().ileafbegin();
│ │ │ │ +
369 }
│ │ │ │ +
│ │ │ │ +
370
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
373 iend ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ +
374 {
│ │ │ │ +
375 return entity.impl().ileafend();
│ │ │ │ +
376 }
│ │ │ │ +
│ │ │ │ +
377
│ │ │ │ +
│ │ │ │ +
379 const Communication &comm () const
│ │ │ │ +
380 {
│ │ │ │ +
381 return grid().comm();
│ │ │ │ +
382 }
│ │ │ │ +
│ │ │ │ +
383
│ │ │ │ +
│ │ │ │ +
385 int overlapSize(int codim) const
│ │ │ │ +
386 {
│ │ │ │ +
387 return grid().overlapSize(codim);
│ │ │ │ +
388 }
│ │ │ │ +
│ │ │ │ +
389
│ │ │ │ +
│ │ │ │ +
391 int ghostSize(int codim) const
│ │ │ │ +
392 {
│ │ │ │ +
393 return grid().ghostSize(codim);
│ │ │ │ +
394 }
│ │ │ │ +
│ │ │ │ +
395
│ │ │ │ +
397 template< class DataHandleImp, class DataType >
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
401 {
│ │ │ │ +
402 return grid().communicate( data, iftype, dir );
│ │ │ │ +
403 }
│ │ │ │ +
│ │ │ │ +
404
│ │ │ │ +
405 private:
│ │ │ │ +
406 const Grid *grid_;
│ │ │ │ +
407 };
│ │ │ │ +
│ │ │ │ +
408
│ │ │ │ +
409}
│ │ │ │ +
410
│ │ │ │ +
411#endif
│ │ │ │ +
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │ +
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ -
Mapper interface.
Definition mapper.hh:110
│ │ │ │ -
auto size() const
Return total number of entities in the entity set managed by the mapper.
Definition mapper.hh:152
│ │ │ │ -
void update(GridView &&gridView)
Reinitialize mapper after grid has been modified.
Definition mapper.hh:192
│ │ │ │ -
void update()
Reinitialize mapper after grid has been modified.
Definition mapper.hh:200
│ │ │ │ -
Index index(const EntityType &e) const
Map entity to array index.
Definition mapper.hh:122
│ │ │ │ -
IndexType Index
Number type used for indices.
Definition mapper.hh:114
│ │ │ │ -
Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity i of codim cc of a codim 0 entity to array index.
Definition mapper.hh:136
│ │ │ │ -
bool contains(const typename G::Traits::template Codim< 0 >::Entity &e, int i, int cc, IndexType &result) const
Returns true if the subentity is contained in the index set and at the same time the array index is r...
Definition mapper.hh:183
│ │ │ │ -
bool contains(const EntityType &e, IndexType &result) const
Returns true if the entity is contained in the index set and at the same time the array index is retu...
Definition mapper.hh:167
│ │ │ │ +
Definition defaultgridview.hh:79
│ │ │ │ +
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:152
│ │ │ │ +
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition defaultgridview.hh:138
│ │ │ │ +
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:145
│ │ │ │ +
Communication CollectiveCommunication
Definition defaultgridview.hh:102
│ │ │ │ +
IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition defaultgridview.hh:180
│ │ │ │ +
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:166
│ │ │ │ +
DefaultLevelGridViewTraits< GridImp > Traits
Definition defaultgridview.hh:83
│ │ │ │ +
const IndexSet & indexSet() const
obtain the index set
Definition defaultgridview.hh:123
│ │ │ │ +
const Communication & comm() const
obtain communication object
Definition defaultgridview.hh:186
│ │ │ │ +
static constexpr bool conforming
Definition defaultgridview.hh:108
│ │ │ │ +
Traits::IndexSet IndexSet
type of the index set
Definition defaultgridview.hh:89
│ │ │ │ +
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition defaultgridview.hh:205
│ │ │ │ +
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:95
│ │ │ │ +
int size(int codim) const
obtain number of entities in a given codimension
Definition defaultgridview.hh:132
│ │ │ │ +
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition defaultgridview.hh:192
│ │ │ │ +
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:159
│ │ │ │ +
IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition defaultgridview.hh:173
│ │ │ │ +
DefaultLevelGridView(const Grid &grid, int level)
Definition defaultgridview.hh:110
│ │ │ │ +
Traits::Intersection Intersection
type of the intersection
Definition defaultgridview.hh:92
│ │ │ │ +
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:98
│ │ │ │ +
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition defaultgridview.hh:129
│ │ │ │ +
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition defaultgridview.hh:198
│ │ │ │ +
Traits::Grid Grid
type of the grid
Definition defaultgridview.hh:86
│ │ │ │ +
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition defaultgridview.hh:116
│ │ │ │ +
Definition defaultgridview.hh:272
│ │ │ │ +
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition defaultgridview.hh:398
│ │ │ │ +
DefaultLeafGridViewTraits< GridImp > Traits
Definition defaultgridview.hh:276
│ │ │ │ +
Communication CollectiveCommunication
Definition defaultgridview.hh:295
│ │ │ │ +
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:359
│ │ │ │ +
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition defaultgridview.hh:309
│ │ │ │ +
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:345
│ │ │ │ +
IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition defaultgridview.hh:366
│ │ │ │ +
Traits::Intersection Intersection
type of the intersection
Definition defaultgridview.hh:285
│ │ │ │ +
IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition defaultgridview.hh:373
│ │ │ │ +
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:352
│ │ │ │ +
Traits::Grid Grid
type of the grid
Definition defaultgridview.hh:279
│ │ │ │ +
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition defaultgridview.hh:331
│ │ │ │ +
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition defaultgridview.hh:322
│ │ │ │ +
Traits::IndexSet IndexSet
type of the index set
Definition defaultgridview.hh:282
│ │ │ │ +
const Communication & comm() const
obtain communication object
Definition defaultgridview.hh:379
│ │ │ │ +
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:291
│ │ │ │ +
DefaultLeafGridView(const Grid &grid)
Definition defaultgridview.hh:304
│ │ │ │ +
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition defaultgridview.hh:385
│ │ │ │ +
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:338
│ │ │ │ +
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition defaultgridview.hh:391
│ │ │ │ +
int size(int codim) const
obtain number of entities in a given codimension
Definition defaultgridview.hh:325
│ │ │ │ +
const IndexSet & indexSet() const
obtain the index set
Definition defaultgridview.hh:316
│ │ │ │ +
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:288
│ │ │ │ +
static constexpr bool conforming
Definition defaultgridview.hh:301
│ │ │ │ +
Definition defaultgridview.hh:26
│ │ │ │ +
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:43
│ │ │ │ +
static constexpr bool conforming
Definition defaultgridview.hh:73
│ │ │ │ +
Grid::Traits::LevelIntersection Intersection
type of the intersection
Definition defaultgridview.hh:36
│ │ │ │ +
Grid::Traits::LevelIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:40
│ │ │ │ +
Grid::Traits::LevelIndexSet IndexSet
type of the index set
Definition defaultgridview.hh:33
│ │ │ │ +
Communication CollectiveCommunication
Definition defaultgridview.hh:47
│ │ │ │ +
std::remove_const< GridImp >::type Grid
type of the grid
Definition defaultgridview.hh:30
│ │ │ │ +
DefaultLevelGridView< GridImp > GridViewImp
Definition defaultgridview.hh:27
│ │ │ │ +
Definition defaultgridview.hh:51
│ │ │ │ +
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator Iterator
Definition defaultgridview.hh:54
│ │ │ │ +
Grid::Traits::template Codim< cd >::Entity Entity
Definition defaultgridview.hh:56
│ │ │ │ +
Grid::template Codim< cd >::Geometry Geometry
Definition defaultgridview.hh:58
│ │ │ │ +
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition defaultgridview.hh:60
│ │ │ │ +
Define types needed to iterate over entities of a given partition type.
Definition defaultgridview.hh:65
│ │ │ │ +
Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
iterator over a given codim and partition type
Definition defaultgridview.hh:69
│ │ │ │ +
Codim Structure.
Definition defaultgridview.hh:106
│ │ │ │ +
Definition defaultgridview.hh:219
│ │ │ │ +
std::remove_const< GridImp >::type Grid
type of the grid
Definition defaultgridview.hh:223
│ │ │ │ +
DefaultLeafGridView< GridImp > GridViewImp
Definition defaultgridview.hh:220
│ │ │ │ +
static constexpr bool conforming
Definition defaultgridview.hh:266
│ │ │ │ +
Communication CollectiveCommunication
Definition defaultgridview.hh:240
│ │ │ │ +
Grid::Traits::LeafIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:233
│ │ │ │ +
Grid::Traits::LeafIntersection Intersection
type of the intersection
Definition defaultgridview.hh:229
│ │ │ │ +
Grid::Traits::LeafIndexSet IndexSet
type of the index set
Definition defaultgridview.hh:226
│ │ │ │ +
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:236
│ │ │ │ +
Definition defaultgridview.hh:244
│ │ │ │ +
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LeafIterator Iterator
Definition defaultgridview.hh:247
│ │ │ │ +
Grid::Traits::template Codim< cd >::Entity Entity
Definition defaultgridview.hh:249
│ │ │ │ +
Grid::template Codim< cd >::Geometry Geometry
Definition defaultgridview.hh:251
│ │ │ │ +
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition defaultgridview.hh:253
│ │ │ │ +
Define types needed to iterate over entities of a given partition type.
Definition defaultgridview.hh:258
│ │ │ │ +
Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
iterator over a given codim and partition type
Definition defaultgridview.hh:262
│ │ │ │ +
Codim Structure.
Definition defaultgridview.hh:299
│ │ │ │ +
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
A set of traits classes to store static information about grid implementation.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,140 +1,690 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -mapper.hh │ │ │ │ │ +defaultgridview.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -89namespace _D_u_n_e │ │ │ │ │ -90{ │ │ │ │ │ -108 template │ │ │ │ │ -_1_0_9 class _M_a_p_p_e_r │ │ │ │ │ -110 { │ │ │ │ │ -111 public: │ │ │ │ │ -112 │ │ │ │ │ -_1_1_4 using _I_n_d_e_x = IndexType; │ │ │ │ │ -115 │ │ │ │ │ -121 template │ │ │ │ │ -_1_2_2 _I_n_d_e_x _i_n_d_e_x (const EntityType& e) const │ │ │ │ │ -123 { │ │ │ │ │ -124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e))); │ │ │ │ │ -125 return asImp().index(e); │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_v_i_e_w_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 template< class GridImp > │ │ │ │ │ +18 class DefaultLevelGridView; │ │ │ │ │ +19 │ │ │ │ │ +20 template< class GridImp > │ │ │ │ │ +21 class DefaultLeafGridView; │ │ │ │ │ +22 │ │ │ │ │ +23 │ │ │ │ │ +24 template< class GridImp > │ │ │ │ │ +_2_5 struct _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s │ │ │ │ │ +26 { │ │ │ │ │ +_2_7 typedef _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _G_r_i_d_V_i_e_w_I_m_p; │ │ │ │ │ +28 │ │ │ │ │ +_3_0 typedef typename std::remove_const::type _G_r_i_d; │ │ │ │ │ +31 │ │ │ │ │ +_3_3 typedef typename Grid :: Traits :: LevelIndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 typedef typename Grid :: Traits :: LevelIntersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +37 │ │ │ │ │ +39 typedef typename Grid :: Traits :: LevelIntersectionIterator │ │ │ │ │ +_4_0 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +41 │ │ │ │ │ +_4_3 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +44 │ │ │ │ │ +46 [[deprecated("Use Communication instead!")]] │ │ │ │ │ +_4_7 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +48 │ │ │ │ │ +49 template< int cd > │ │ │ │ │ +_5_0 struct _C_o_d_i_m │ │ │ │ │ +51 { │ │ │ │ │ +52 typedef typename Grid :: Traits │ │ │ │ │ +53 :: template _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _A_l_l___P_a_r_t_i_t_i_o_n_ _> :: │ │ │ │ │ +LevelIterator │ │ │ │ │ +_5_4 _I_t_e_r_a_t_o_r; │ │ │ │ │ +55 │ │ │ │ │ +_5_6 typedef typename Grid :: Traits :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +57 │ │ │ │ │ +_5_8 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +59 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +_6_0 _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +61 │ │ │ │ │ +63 template< PartitionIteratorType pit > │ │ │ │ │ +_6_4 struct _P_a_r_t_i_t_i_o_n │ │ │ │ │ +65 { │ │ │ │ │ +67 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +68 :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: LevelIterator │ │ │ │ │ +_6_9 _I_t_e_r_a_t_o_r; │ │ │ │ │ +70 }; │ │ │ │ │ +71 }; │ │ │ │ │ +72 │ │ │ │ │ +_7_3 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Capabilities :: isLevelwiseConforming< │ │ │ │ │ +Grid > :: v; │ │ │ │ │ +74 }; │ │ │ │ │ +75 │ │ │ │ │ +76 │ │ │ │ │ +77 template< class GridImp > │ │ │ │ │ +_7_8 class _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +79 { │ │ │ │ │ +80 typedef _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s_T_y_p_e; │ │ │ │ │ +81 │ │ │ │ │ +82 public: │ │ │ │ │ +_8_3 typedef _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_G_r_i_d_I_m_p_> _T_r_a_i_t_s; │ │ │ │ │ +84 │ │ │ │ │ +_8_6 typedef typename _T_r_a_i_t_s_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ +87 │ │ │ │ │ +_8_9 typedef typename Traits :: IndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ +90 │ │ │ │ │ +_9_2 typedef typename Traits :: Intersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +93 │ │ │ │ │ +_9_5 typedef typename Traits :: IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +96 │ │ │ │ │ +_9_8 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +99 │ │ │ │ │ +101 [[deprecated("Use Communication instead!")]] │ │ │ │ │ +_1_0_2 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +103 │ │ │ │ │ +105 template< int cd > │ │ │ │ │ +_1_0_6 struct _C_o_d_i_m : public _T_r_a_i_t_s :: _t_e_m_p_l_a_t_e _C_o_d_i_m {}; │ │ │ │ │ +107 │ │ │ │ │ +_1_0_8 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Traits :: conforming; │ │ │ │ │ +109 │ │ │ │ │ +_1_1_0 _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w ( const _G_r_i_d &_g_r_i_d, int level ) │ │ │ │ │ +111 : grid_( &_g_r_i_d ), │ │ │ │ │ +112 level_( level ) │ │ │ │ │ +113 {} │ │ │ │ │ +114 │ │ │ │ │ +_1_1_6 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ +117 { │ │ │ │ │ +118 _a_s_s_e_r_t( grid_ ); │ │ │ │ │ +119 return *grid_; │ │ │ │ │ +120 } │ │ │ │ │ +121 │ │ │ │ │ +_1_2_3 const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t () const │ │ │ │ │ +124 { │ │ │ │ │ +125 return _g_r_i_d().levelIndexSet( level_ ); │ │ │ │ │ 126 } │ │ │ │ │ 127 │ │ │ │ │ -128 │ │ │ │ │ -_1_3_6 _I_n_d_e_x _s_u_b_I_n_d_e_x (const typename G::Traits::template Codim<0>::Entity& e, │ │ │ │ │ -137 int i, │ │ │ │ │ -138 unsigned int codim) const │ │ │ │ │ +_1_2_9 bool _i_s_C_o_n_f_o_r_m_i_n_g() const { return _b_o_o_l(Traits::conforming); } │ │ │ │ │ +130 │ │ │ │ │ +_1_3_2 int _s_i_z_e ( int _c_o_d_i_m ) const │ │ │ │ │ +133 { │ │ │ │ │ +134 return _g_r_i_d().size( level_, _c_o_d_i_m ); │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +_1_3_8 int _s_i_z_e ( const GeometryType &type ) const │ │ │ │ │ 139 { │ │ │ │ │ -140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim))); │ │ │ │ │ -141 return asImp().subIndex(e,i,codim); │ │ │ │ │ -142 } │ │ │ │ │ -143 │ │ │ │ │ -_1_5_2 auto _s_i_z_e () const │ │ │ │ │ +140 return _g_r_i_d().size( level_, type ); │ │ │ │ │ +141 } │ │ │ │ │ +142 │ │ │ │ │ +144 template< int cd > │ │ │ │ │ +_1_4_5 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _b_e_g_i_n () const │ │ │ │ │ +146 { │ │ │ │ │ +147 return _g_r_i_d().template _l_b_e_g_i_n_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level_ ); │ │ │ │ │ +148 } │ │ │ │ │ +149 │ │ │ │ │ +151 template< int cd, PartitionIteratorType pit > │ │ │ │ │ +_1_5_2 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _b_e_g_i_n () │ │ │ │ │ +const │ │ │ │ │ 153 { │ │ │ │ │ -154 CHECK_INTERFACE_IMPLEMENTATION((asImp()._s_i_z_e())); │ │ │ │ │ -155 return asImp().size(); │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 │ │ │ │ │ -166 template │ │ │ │ │ -_1_6_7 bool _c_o_n_t_a_i_n_s (const EntityType& e, IndexType& result) const │ │ │ │ │ -168 { │ │ │ │ │ -169 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(e,result ))); │ │ │ │ │ -170 return asImp().contains(e,result ); │ │ │ │ │ -171 } │ │ │ │ │ -172 │ │ │ │ │ -173 │ │ │ │ │ -_1_8_3 bool _c_o_n_t_a_i_n_s (const typename G::Traits::template Codim<0>::Entity& e, int │ │ │ │ │ -i, int cc, IndexType& result) const │ │ │ │ │ -184 { │ │ │ │ │ -185 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(e,i,cc,result))) │ │ │ │ │ -186 return asImp().contains(e,i,cc,result); │ │ │ │ │ -187 } │ │ │ │ │ -188 │ │ │ │ │ -191 template │ │ │ │ │ -_1_9_2 void _u_p_d_a_t_e (_G_r_i_d_V_i_e_w&& gridView) │ │ │ │ │ +154 return _g_r_i_d().template _l_b_e_g_i_n_<_ _c_d_,_ _p_i_t_ _>( level_ ); │ │ │ │ │ +155 } │ │ │ │ │ +156 │ │ │ │ │ +158 template< int cd > │ │ │ │ │ +_1_5_9 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _e_n_d () const │ │ │ │ │ +160 { │ │ │ │ │ +161 return _g_r_i_d().template _l_e_n_d_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level_ ); │ │ │ │ │ +162 } │ │ │ │ │ +163 │ │ │ │ │ +165 template< int cd, PartitionIteratorType pit > │ │ │ │ │ +_1_6_6 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _e_n_d () const │ │ │ │ │ +167 { │ │ │ │ │ +168 return _g_r_i_d().template _l_e_n_d_<_ _c_d_,_ _p_i_t_ _>( level_ ); │ │ │ │ │ +169 } │ │ │ │ │ +170 │ │ │ │ │ +172 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_1_7_3 _i_b_e_g_i_n ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ +174 { │ │ │ │ │ +175 return entity.impl().ilevelbegin(); │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +179 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_1_8_0 _i_e_n_d ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ +181 { │ │ │ │ │ +182 return entity.impl().ilevelend(); │ │ │ │ │ +183 } │ │ │ │ │ +184 │ │ │ │ │ +_1_8_6 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ +187 { │ │ │ │ │ +188 return _g_r_i_d().comm(); │ │ │ │ │ +189 } │ │ │ │ │ +190 │ │ │ │ │ +_1_9_2 int _o_v_e_r_l_a_p_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ 193 { │ │ │ │ │ -194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._u_p_d_a_t_e(std:: │ │ │ │ │ -forward(gridView)))); │ │ │ │ │ +194 return _g_r_i_d().overlapSize(level_, _c_o_d_i_m); │ │ │ │ │ 195 } │ │ │ │ │ 196 │ │ │ │ │ -199 [[deprecated("Use update(gridView) instead! Will be removed after release │ │ │ │ │ -2.8. Mappers have to implement update(gridView).")]] │ │ │ │ │ -_2_0_0 void _u_p_d_a_t_e () │ │ │ │ │ -201 { │ │ │ │ │ -202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._u_p_d_a_t_e())); │ │ │ │ │ -203 } │ │ │ │ │ -204 │ │ │ │ │ -205 private: │ │ │ │ │ -207 MapperImp& asImp () {return static_cast (*this);} │ │ │ │ │ -209 const MapperImp& asImp () const {return static_cast │ │ │ │ │ -(*this);} │ │ │ │ │ -210 }; │ │ │ │ │ +_1_9_8 int _g_h_o_s_t_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ +199 { │ │ │ │ │ +200 return _g_r_i_d().ghostSize(level_, _c_o_d_i_m); │ │ │ │ │ +201 } │ │ │ │ │ +202 │ │ │ │ │ +204 template< class DataHandleImp, class DataType > │ │ │ │ │ +_2_0_5 void _c_o_m_m_u_n_i_c_a_t_e ( _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_ _> &data, │ │ │ │ │ +206 _I_n_t_e_r_f_a_c_e_T_y_p_e _i_f_t_y_p_e, │ │ │ │ │ +207 _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n _d_i_r ) const │ │ │ │ │ +208 { │ │ │ │ │ +209 return _g_r_i_d().communicate( data, _i_f_t_y_p_e, _d_i_r, level_ ); │ │ │ │ │ +210 } │ │ │ │ │ 211 │ │ │ │ │ -214#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ │ -215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ │ +212 private: │ │ │ │ │ +213 const _G_r_i_d *grid_; │ │ │ │ │ +214 int level_; │ │ │ │ │ +215 }; │ │ │ │ │ 216 │ │ │ │ │ -217} │ │ │ │ │ -218#endif │ │ │ │ │ +217 │ │ │ │ │ +218 template< class GridImp > │ │ │ │ │ +_2_1_9 struct _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s { │ │ │ │ │ +_2_2_0 typedef _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _G_r_i_d_V_i_e_w_I_m_p; │ │ │ │ │ +221 │ │ │ │ │ +_2_2_3 typedef typename std::remove_const::type _G_r_i_d; │ │ │ │ │ +224 │ │ │ │ │ +_2_2_6 typedef typename Grid :: Traits :: LeafIndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ +227 │ │ │ │ │ +_2_2_9 typedef typename Grid :: Traits :: LeafIntersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +230 │ │ │ │ │ +232 typedef typename Grid :: Traits :: LeafIntersectionIterator │ │ │ │ │ +_2_3_3 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +234 │ │ │ │ │ +_2_3_6 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +237 │ │ │ │ │ +239 [[deprecated("Use Communication instead!")]] │ │ │ │ │ +_2_4_0 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +241 │ │ │ │ │ +242 template< int cd > │ │ │ │ │ +_2_4_3 struct _C_o_d_i_m │ │ │ │ │ +244 { │ │ │ │ │ +245 typedef typename Grid :: Traits │ │ │ │ │ +246 :: template _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _A_l_l___P_a_r_t_i_t_i_o_n_ _> :: │ │ │ │ │ +LeafIterator │ │ │ │ │ +_2_4_7 _I_t_e_r_a_t_o_r; │ │ │ │ │ +248 │ │ │ │ │ +_2_4_9 typedef typename Grid :: Traits :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +250 │ │ │ │ │ +_2_5_1 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +252 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +_2_5_3 _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +254 │ │ │ │ │ +256 template │ │ │ │ │ +_2_5_7 struct _P_a_r_t_i_t_i_o_n │ │ │ │ │ +258 { │ │ │ │ │ +260 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +261 :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: LeafIterator │ │ │ │ │ +_2_6_2 _I_t_e_r_a_t_o_r; │ │ │ │ │ +263 }; │ │ │ │ │ +264 }; │ │ │ │ │ +265 │ │ │ │ │ +_2_6_6 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Capabilities :: isLeafwiseConforming< │ │ │ │ │ +Grid > :: v; │ │ │ │ │ +267 }; │ │ │ │ │ +268 │ │ │ │ │ +269 │ │ │ │ │ +270 template< class GridImp > │ │ │ │ │ +_2_7_1 class _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +272 { │ │ │ │ │ +273 typedef _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s_T_y_p_e; │ │ │ │ │ +274 │ │ │ │ │ +275 public: │ │ │ │ │ +_2_7_6 typedef _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_G_r_i_d_I_m_p_> _T_r_a_i_t_s; │ │ │ │ │ +277 │ │ │ │ │ +_2_7_9 typedef typename _T_r_a_i_t_s_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ +280 │ │ │ │ │ +_2_8_2 typedef typename Traits :: IndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ +283 │ │ │ │ │ +_2_8_5 typedef typename Traits :: Intersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +286 │ │ │ │ │ +_2_8_8 typedef typename Traits :: IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +289 │ │ │ │ │ +_2_9_1 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +292 │ │ │ │ │ +294 [[deprecated("Use Communication instead!")]] │ │ │ │ │ +_2_9_5 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +296 │ │ │ │ │ +298 template< int cd > │ │ │ │ │ +_2_9_9 struct _C_o_d_i_m : public _T_r_a_i_t_s :: _t_e_m_p_l_a_t_e _C_o_d_i_m {}; │ │ │ │ │ +300 │ │ │ │ │ +_3_0_1 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Traits :: conforming; │ │ │ │ │ +302 │ │ │ │ │ +303 public: │ │ │ │ │ +_3_0_4 _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w ( const _G_r_i_d &_g_r_i_d ) │ │ │ │ │ +305 : grid_( &_g_r_i_d ) │ │ │ │ │ +306 {} │ │ │ │ │ +307 │ │ │ │ │ +_3_0_9 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ +310 { │ │ │ │ │ +311 _a_s_s_e_r_t( grid_ ); │ │ │ │ │ +312 return *grid_; │ │ │ │ │ +313 } │ │ │ │ │ +314 │ │ │ │ │ +_3_1_6 const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t () const │ │ │ │ │ +317 { │ │ │ │ │ +318 return _g_r_i_d().leafIndexSet(); │ │ │ │ │ +319 } │ │ │ │ │ +320 │ │ │ │ │ +_3_2_2 bool _i_s_C_o_n_f_o_r_m_i_n_g() const { return _b_o_o_l(Traits::conforming); } │ │ │ │ │ +323 │ │ │ │ │ +_3_2_5 int _s_i_z_e ( int _c_o_d_i_m ) const │ │ │ │ │ +326 { │ │ │ │ │ +327 return _g_r_i_d().size( _c_o_d_i_m ); │ │ │ │ │ +328 } │ │ │ │ │ +329 │ │ │ │ │ +_3_3_1 int _s_i_z_e ( const GeometryType &type ) const │ │ │ │ │ +332 { │ │ │ │ │ +333 return _g_r_i_d().size( type ); │ │ │ │ │ +334 } │ │ │ │ │ +335 │ │ │ │ │ +337 template< int cd > │ │ │ │ │ +_3_3_8 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _b_e_g_i_n () const │ │ │ │ │ +339 { │ │ │ │ │ +340 return _g_r_i_d().template _l_e_a_f_b_e_g_i_n_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ +341 } │ │ │ │ │ +342 │ │ │ │ │ +344 template< int cd, PartitionIteratorType pit > │ │ │ │ │ +_3_4_5 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _b_e_g_i_n () │ │ │ │ │ +const │ │ │ │ │ +346 { │ │ │ │ │ +347 return _g_r_i_d().template _l_e_a_f_b_e_g_i_n_<_ _c_d_,_ _p_i_t_ _>(); │ │ │ │ │ +348 } │ │ │ │ │ +349 │ │ │ │ │ +351 template< int cd > │ │ │ │ │ +_3_5_2 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _e_n_d () const │ │ │ │ │ +353 { │ │ │ │ │ +354 return _g_r_i_d().template _l_e_a_f_e_n_d_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ +355 } │ │ │ │ │ +356 │ │ │ │ │ +358 template< int cd, PartitionIteratorType pit > │ │ │ │ │ +_3_5_9 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _e_n_d () const │ │ │ │ │ +360 { │ │ │ │ │ +361 return _g_r_i_d().template _l_e_a_f_e_n_d_<_ _c_d_,_ _p_i_t_ _>(); │ │ │ │ │ +362 } │ │ │ │ │ +363 │ │ │ │ │ +365 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_6_6 _i_b_e_g_i_n ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ +367 { │ │ │ │ │ +368 return entity.impl().ileafbegin(); │ │ │ │ │ +369 } │ │ │ │ │ +370 │ │ │ │ │ +372 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_7_3 _i_e_n_d ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ +374 { │ │ │ │ │ +375 return entity.impl().ileafend(); │ │ │ │ │ +376 } │ │ │ │ │ +377 │ │ │ │ │ +_3_7_9 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ +380 { │ │ │ │ │ +381 return _g_r_i_d().comm(); │ │ │ │ │ +382 } │ │ │ │ │ +383 │ │ │ │ │ +_3_8_5 int _o_v_e_r_l_a_p_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ +386 { │ │ │ │ │ +387 return _g_r_i_d().overlapSize(_c_o_d_i_m); │ │ │ │ │ +388 } │ │ │ │ │ +389 │ │ │ │ │ +_3_9_1 int _g_h_o_s_t_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ +392 { │ │ │ │ │ +393 return _g_r_i_d().ghostSize(_c_o_d_i_m); │ │ │ │ │ +394 } │ │ │ │ │ +395 │ │ │ │ │ +397 template< class DataHandleImp, class DataType > │ │ │ │ │ +_3_9_8 void _c_o_m_m_u_n_i_c_a_t_e ( _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_ _> &data, │ │ │ │ │ +399 _I_n_t_e_r_f_a_c_e_T_y_p_e _i_f_t_y_p_e, │ │ │ │ │ +400 _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n _d_i_r ) const │ │ │ │ │ +401 { │ │ │ │ │ +402 return _g_r_i_d().communicate( data, _i_f_t_y_p_e, _d_i_r ); │ │ │ │ │ +403 } │ │ │ │ │ +404 │ │ │ │ │ +405 private: │ │ │ │ │ +406 const _G_r_i_d *grid_; │ │ │ │ │ +407 }; │ │ │ │ │ +408 │ │ │ │ │ +409} │ │ │ │ │ +410 │ │ │ │ │ +411#endif │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n │ │ │ │ │ +CommunicationDirection │ │ │ │ │ +Define a type for communication direction parameter. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ +InterfaceType │ │ │ │ │ +Parameter to be used for the communication functions. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:86 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid view abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r │ │ │ │ │ -Mapper interface. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ -auto size() const │ │ │ │ │ -Return total number of entities in the entity set managed by the mapper. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(GridView &&gridView) │ │ │ │ │ -Reinitialize mapper after grid has been modified. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -Reinitialize mapper after grid has been modified. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:200 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ │ -Map entity to array index. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_I_n_d_e_x │ │ │ │ │ -IndexType Index │ │ │ │ │ -Number type used for indices. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ -unsigned int codim) const │ │ │ │ │ -Map subentity i of codim cc of a codim 0 entity to array index. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const typename G::Traits::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ -int cc, IndexType &result) const │ │ │ │ │ -Returns true if the subentity is contained in the index set and at the same │ │ │ │ │ -time the array index is r... │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:183 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const EntityType &e, IndexType &result) const │ │ │ │ │ -Returns true if the entity is contained in the index set and at the same time │ │ │ │ │ -the array index is retu... │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ +Codim< cd >::template Partition< pit >::Iterator begin() const │ │ │ │ │ +obtain begin iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ +int size(const GeometryType &type) const │ │ │ │ │ +obtain number of entities with a given geometry type │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ +Codim< cd >::Iterator begin() const │ │ │ │ │ +obtain begin iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Communication CollectiveCommunication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_e_n_d │ │ │ │ │ +IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ +obtain end intersection iterator with respect to this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:180 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ +Codim< cd >::template Partition< pit >::Iterator end() const │ │ │ │ │ +obtain end iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_T_r_a_i_t_s │ │ │ │ │ +DefaultLevelGridViewTraits< GridImp > Traits │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ +const IndexSet & indexSet() const │ │ │ │ │ +obtain the index set │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +obtain communication object │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +static constexpr bool conforming │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Traits::IndexSet IndexSet │ │ │ │ │ +type of the index set │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_c_o_m_m_u_n_i_c_a_t_e │ │ │ │ │ +void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, │ │ │ │ │ +InterfaceType iftype, CommunicationDirection dir) const │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Traits::IntersectionIterator IntersectionIterator │ │ │ │ │ +type of the intersection iterator │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ +int size(int codim) const │ │ │ │ │ +obtain number of entities in a given codimension │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_o_v_e_r_l_a_p_S_i_z_e │ │ │ │ │ +int overlapSize(int codim) const │ │ │ │ │ +Return size of the overlap region for a given codim on the grid view. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ +Codim< cd >::Iterator end() const │ │ │ │ │ +obtain end iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_b_e_g_i_n │ │ │ │ │ +IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ +obtain begin intersection iterator with respect to this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:173 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +DefaultLevelGridView(const Grid &grid, int level) │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Traits::Intersection Intersection │ │ │ │ │ +type of the intersection │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Grid::Traits::Communication Communication │ │ │ │ │ +type of the communication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_s_C_o_n_f_o_r_m_i_n_g │ │ │ │ │ +bool isConforming() const │ │ │ │ │ +return true if current state of grid view represents a conforming grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_g_h_o_s_t_S_i_z_e │ │ │ │ │ +int ghostSize(int codim) const │ │ │ │ │ +Return size of the ghost region for a given codim on the grid view. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:198 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +type of the grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +obtain a const reference to the underlying hierarchic grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:272 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_c_o_m_m_u_n_i_c_a_t_e │ │ │ │ │ +void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, │ │ │ │ │ +InterfaceType iftype, CommunicationDirection dir) const │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:398 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_T_r_a_i_t_s │ │ │ │ │ +DefaultLeafGridViewTraits< GridImp > Traits │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:276 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Communication CollectiveCommunication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:295 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ +Codim< cd >::template Partition< pit >::Iterator end() const │ │ │ │ │ +obtain end iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +obtain a const reference to the underlying hierarchic grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:309 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ +Codim< cd >::template Partition< pit >::Iterator begin() const │ │ │ │ │ +obtain begin iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:345 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_b_e_g_i_n │ │ │ │ │ +IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ +obtain begin intersection iterator with respect to this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:366 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Traits::Intersection Intersection │ │ │ │ │ +type of the intersection │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_e_n_d │ │ │ │ │ +IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ +obtain end intersection iterator with respect to this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:373 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ +Codim< cd >::Iterator end() const │ │ │ │ │ +obtain end iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:352 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +type of the grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:279 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ +int size(const GeometryType &type) const │ │ │ │ │ +obtain number of entities with a given geometry type │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:331 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_s_C_o_n_f_o_r_m_i_n_g │ │ │ │ │ +bool isConforming() const │ │ │ │ │ +return true if current state of grid view represents a conforming grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:322 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Traits::IndexSet IndexSet │ │ │ │ │ +type of the index set │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:282 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +obtain communication object │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:379 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Grid::Traits::Communication Communication │ │ │ │ │ +type of the communication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:291 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +DefaultLeafGridView(const Grid &grid) │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:304 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_o_v_e_r_l_a_p_S_i_z_e │ │ │ │ │ +int overlapSize(int codim) const │ │ │ │ │ +Return size of the overlap region for a given codim on the grid view. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:385 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ +Codim< cd >::Iterator begin() const │ │ │ │ │ +obtain begin iterator for this view │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:338 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_g_h_o_s_t_S_i_z_e │ │ │ │ │ +int ghostSize(int codim) const │ │ │ │ │ +Return size of the ghost region for a given codim on the grid view. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:391 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ +int size(int codim) const │ │ │ │ │ +obtain number of entities in a given codimension │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:325 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ +const IndexSet & indexSet() const │ │ │ │ │ +obtain the index set │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:316 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Traits::IntersectionIterator IntersectionIterator │ │ │ │ │ +type of the intersection iterator │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:288 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +static constexpr bool conforming │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:301 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Grid::Traits::Communication Communication │ │ │ │ │ +type of the communication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +static constexpr bool conforming │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Grid::Traits::LevelIntersection Intersection │ │ │ │ │ +type of the intersection │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Grid::Traits::LevelIntersectionIterator IntersectionIterator │ │ │ │ │ +type of the intersection iterator │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Grid::Traits::LevelIndexSet IndexSet │ │ │ │ │ +type of the index set │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Communication CollectiveCommunication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d │ │ │ │ │ +std::remove_const< GridImp >::type Grid │ │ │ │ │ +type of the grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d_V_i_e_w_I_m_p │ │ │ │ │ +DefaultLevelGridView< GridImp > GridViewImp │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Grid::Traits::template Codim< cd >::template Partition< All_Partition >:: │ │ │ │ │ +LevelIterator Iterator │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ +Grid::Traits::template Codim< cd >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< cd >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< cd >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n │ │ │ │ │ +Define types needed to iterate over entities of a given partition type. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator │ │ │ │ │ +iterator over a given codim and partition type │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +Codim Structure. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:219 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d │ │ │ │ │ +std::remove_const< GridImp >::type Grid │ │ │ │ │ +type of the grid │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d_V_i_e_w_I_m_p │ │ │ │ │ +DefaultLeafGridView< GridImp > GridViewImp │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +static constexpr bool conforming │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:266 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Communication CollectiveCommunication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Grid::Traits::LeafIntersectionIterator IntersectionIterator │ │ │ │ │ +type of the intersection iterator │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:233 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Grid::Traits::LeafIntersection Intersection │ │ │ │ │ +type of the intersection │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:229 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Grid::Traits::LeafIndexSet IndexSet │ │ │ │ │ +type of the index set │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:226 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Grid::Traits::Communication Communication │ │ │ │ │ +type of the communication │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:244 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Grid::Traits::template Codim< cd >::template Partition< All_Partition >:: │ │ │ │ │ +LeafIterator Iterator │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:247 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ +Grid::Traits::template Codim< cd >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< cd >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:251 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< cd >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n │ │ │ │ │ +Define types needed to iterate over entities of a given partition type. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:258 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator │ │ │ │ │ +iterator over a given codim and partition type │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:262 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +Codim Structure. │ │ │ │ │ +DDeeffiinniittiioonn defaultgridview.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Mesh entities of codimension 0 ("elements") allow to visit all intersections │ │ │ │ │ +with "neighboring" eleme... │ │ │ │ │ +DDeeffiinniittiioonn common/intersectioniterator.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ +A set of traits classes to store static information about grid implementation. │ │ │ │ │ +_g_r_i_d_v_i_e_w_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00299.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: rangegenerators.hh File Reference │ │ │ │ +dune-grid: datahandleif.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,32 +70,44 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
rangegenerators.hh File Reference
│ │ │ │ +
datahandleif.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/iteratorrange.hh>
│ │ │ │ -#include <dune/common/rangeutilities.hh>
│ │ │ │ -#include <dune/geometry/dimension.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/partitionset.hh>
│ │ │ │ + │ │ │ │ +

Describes the parallel communication interface class for MessageBuffers and DataHandles. │ │ │ │ +More...

│ │ │ │ +
#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::MessageBufferIF< MessageBufferImp >
 Communication message buffer interface. This class describes the interface for reading and writing data to the communication message buffer. As message buffers might be deeply implemented in various packages the message buffers implementations cannot be derived from this interface class. Therefore we just apply the engine concept to wrap the message buffer call and make sure that the interface is fulfilled. More...
 
class  Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >
 CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Describes the parallel communication interface class for MessageBuffers and DataHandles.

│ │ │ │ +
Author
Robert Kloefkorn
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,41 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -rangegenerators.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_p_a_r_t_i_t_i_o_n_s_e_t_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +datahandleif.hh File Reference │ │ │ │ │ +Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ +DataHandles. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_ _M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_ _> │ │ │ │ │ + Communication message buffer interface. This class describes the │ │ │ │ │ + interface for reading and writing data to the communication message │ │ │ │ │ + buffer. As message buffers might be deeply implemented in various │ │ │ │ │ +  packages the message buffers implementations cannot be derived from │ │ │ │ │ + this interface class. Therefore we just apply the engine concept to │ │ │ │ │ + wrap the message buffer call and make sure that the interface is │ │ │ │ │ + fulfilled. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_I_m_p_ _> │ │ │ │ │ + _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F describes the features of a data handle for │ │ │ │ │ + communication in parallel runs using the Grid::communicate methods. │ │ │ │ │ +  Here the Barton-Nackman trick is used to interprete data handle objects │ │ │ │ │ + as its interface. Therefore usable data handle classes need to be │ │ │ │ │ + derived from this class. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ +DataHandles. │ │ │ │ │ + Author │ │ │ │ │ + Robert Kloefkorn │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: rangegenerators.hh Source File │ │ │ │ +dune-grid: datahandleif.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,302 +74,199 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
rangegenerators.hh
│ │ │ │ +
datahandleif.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_RANGEGENERATORS_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_RANGEGENERATORS_HH
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/iteratorrange.hh>
│ │ │ │ -
9#include <dune/common/rangeutilities.hh>
│ │ │ │ -
10#include <dune/geometry/dimension.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17#ifdef DOXYGEN
│ │ │ │ +
14#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ +
15
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │
18
│ │ │ │ -
206 // *****************************************************************************************
│ │ │ │ -
207 // Doxygen documentation
│ │ │ │ -
208 // *****************************************************************************************
│ │ │ │ -
209 //
│ │ │ │ -
210 // In the following, the range generating functions are documented for Doxygen; the actual
│ │ │ │ -
211 // implementations are further down in this file and hidden from Doxygen.
│ │ │ │ -
212 // The main reason for this split are the return types of those functions, which either contain
│ │ │ │ -
213 // long type listings to obtain the iterator type or (in the case of the forwarded functions
│ │ │ │ -
214 // use the new-style function syntax and calculate the return type using decltype. In both cases,
│ │ │ │ -
215 // Doxygen generates function signatures that are very confusing to the average user.
│ │ │ │ -
216 //
│ │ │ │ -
217 // *****************************************************************************************
│ │ │ │ -
218
│ │ │ │ -
219
│ │ │ │ -
220
│ │ │ │ -
224
│ │ │ │ +
31 template <class MessageBufferImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {
│ │ │ │ +
34 MessageBufferImp & buff_;
│ │ │ │ +
35 public:
│ │ │ │ +
37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}
│ │ │ │ +
38
│ │ │ │ +
44 template <class T>
│ │ │ │ +
│ │ │ │ +
45 void write(const T & val)
│ │ │ │ +
46 {
│ │ │ │ +
47 buff_.write(val);
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
58 template <class T>
│ │ │ │ +
│ │ │ │ +
59 void read(T & val)
│ │ │ │ +
60 {
│ │ │ │ +
61 buff_.read(val);
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63 }; // end class MessageBufferIF
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
65
│ │ │ │ +
76 template <class DataHandleImp, class DataTypeImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
78 {
│ │ │ │ +
79 template <class M>
│ │ │ │ +
80 class CheckFixedSizeMethod
│ │ │ │ +
81 {
│ │ │ │ +
82 // check for old signature of deprecated fixedsize method.
│ │ │ │ +
83 template <class T>
│ │ │ │ +
84 static std::true_type testSignature(bool (T::*)(int, int) const);
│ │ │ │ +
85
│ │ │ │ +
86 template <class T>
│ │ │ │ +
87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t);
│ │ │ │ +
88
│ │ │ │ +
89 template <class T>
│ │ │ │ +
90 static std::false_type test(...);
│ │ │ │ +
91
│ │ │ │ +
92 using type = decltype(test<M>(nullptr));
│ │ │ │ +
93 public:
│ │ │ │ +
94 static const bool value = type::value;
│ │ │ │ +
95 };
│ │ │ │ +
96
│ │ │ │ +
97
│ │ │ │ +
98 template <class DH, bool>
│ │ │ │ +
99 struct CallFixedSize
│ │ │ │ +
100 {
│ │ │ │ +
101 static bool fixedSize( const DH& dh, int dim, int codim )
│ │ │ │ +
102 {
│ │ │ │ +
103 return dh.fixedSize( dim, codim );
│ │ │ │ +
104 }
│ │ │ │ +
105 };
│ │ │ │ +
106
│ │ │ │ +
107 // old, deprecated implementation
│ │ │ │ +
108 template <class DH>
│ │ │ │ +
109 struct CallFixedSize< DH, true >
│ │ │ │ +
110 {
│ │ │ │ +
111 static bool fixedSize( const DH& dh, int dim, int codim )
│ │ │ │ +
112 {
│ │ │ │ +
113 return dh.overloaded_deprecated_fixedsize( dim, codim );
│ │ │ │ +
114 }
│ │ │ │ +
115 };
│ │ │ │ +
116
│ │ │ │ +
117 public:
│ │ │ │ +
119 typedef DataTypeImp DataType;
│ │ │ │ +
120
│ │ │ │ +
121 protected:
│ │ │ │ +
122 // one should not create an explicit instance of this interface object
│ │ │ │ + │ │ │ │ +
124
│ │ │ │ +
125 public:
│ │ │ │ +
│ │ │ │ +
131 bool contains (int dim, int codim) const
│ │ │ │ +
132 {
│ │ │ │ +
133 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));
│ │ │ │ +
134 return asImp().contains(dim,codim);
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136
│ │ │ │ +
147 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
│ │ │ │ +
│ │ │ │ +
148 int fixedsize (int dim, int codim) const
│ │ │ │ +
149 {
│ │ │ │ +
150 return int(fixedSize( dim, codim ));
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │ +
152
│ │ │ │ +
153 // if this deprecation appears then the DataHandle implementation
│ │ │ │ +
154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize'
│ │ │ │ +
155 // method.
│ │ │ │ +
156 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
│ │ │ │ +
│ │ │ │ +
157 bool overloaded_deprecated_fixedsize( int dim, int codim ) const
│ │ │ │ +
158 {
│ │ │ │ +
159 return asImp().fixedsize( dim, codim );
│ │ │ │ +
160 }
│ │ │ │ +
│ │ │ │ +
161
│ │ │ │ +
│ │ │ │ +
169 bool fixedSize (int dim, int codim) const
│ │ │ │ +
170 {
│ │ │ │ +
171 // this should be enabled once the old fixedsize is removed
│ │ │ │ +
172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim)));
│ │ │ │ +
173 return CallFixedSize< DataHandleImp,
│ │ │ │ +
174 CheckFixedSizeMethod< DataHandleImp >::value >::fixedSize( asImp(), dim, codim );
│ │ │ │ +
175 }
│ │ │ │ +
│ │ │ │ +
176
│ │ │ │ +
181 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
182 size_t size (const EntityType& e) const
│ │ │ │ +
183 {
│ │ │ │ +
184 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));
│ │ │ │ +
185 return asImp().size(e);
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
192 template<class MessageBufferImp, class EntityType>
│ │ │ │ +
│ │ │ │ +
193 void gather (MessageBufferImp& buff, const EntityType& e) const
│ │ │ │ +
194 {
│ │ │ │ + │ │ │ │ +
196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));
│ │ │ │ +
197 }
│ │ │ │ +
│ │ │ │ +
198
│ │ │ │ +
206 template<class MessageBufferImp, class EntityType>
│ │ │ │ +
│ │ │ │ +
207 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)
│ │ │ │ +
208 {
│ │ │ │ + │ │ │ │ +
210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));
│ │ │ │ +
211 }
│ │ │ │ +
│ │ │ │ +
212
│ │ │ │ +
213 private:
│ │ │ │ +
215 DataHandleImp& asImp () {return static_cast<DataHandleImp &> (*this);}
│ │ │ │ +
217 const DataHandleImp& asImp () const
│ │ │ │ +
218 {
│ │ │ │ +
219 return static_cast<const DataHandleImp &>(*this);
│ │ │ │ +
220 }
│ │ │ │ +
221 }; // end class CommDataHandleIF
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
223#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ │ +
224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ │
225
│ │ │ │ -
227
│ │ │ │ -
256 template<typename GV>
│ │ │ │ -
257 inline IteratorRange<...> elements(const GV& gv);
│ │ │ │ -
258
│ │ │ │ -
259
│ │ │ │ -
261
│ │ │ │ -
290 template<typename GV>
│ │ │ │ -
291 inline IteratorRange<...> facets(const GV& gv);
│ │ │ │ -
292
│ │ │ │ -
293
│ │ │ │ -
295
│ │ │ │ -
324 template<typename GV>
│ │ │ │ -
325 inline IteratorRange<...> edges(const GV& gv);
│ │ │ │ -
326
│ │ │ │ -
327
│ │ │ │ -
329
│ │ │ │ -
358 template<typename GV>
│ │ │ │ -
359 inline IteratorRange<...> vertices(const GV& gv);
│ │ │ │ -
360
│ │ │ │ -
361
│ │ │ │ -
363
│ │ │ │ -
364
│ │ │ │ -
365
│ │ │ │ -
369
│ │ │ │ -
371
│ │ │ │ -
394 template<typename GV, typename Entity>
│ │ │ │ -
395 inline IteratorRange<...> intersections(const GV& gv, const Entity& e);
│ │ │ │ -
396
│ │ │ │ -
397
│ │ │ │ -
399
│ │ │ │ -
400
│ │ │ │ -
401
│ │ │ │ -
405
│ │ │ │ -
406
│ │ │ │ -
408
│ │ │ │ -
434 template<typename Entity>
│ │ │ │ -
435 inline IteratorRange<...> descendantElements(const Entity& e, int maxLevel);
│ │ │ │ -
436 // Entity<int dim, class GridImp, template<int,int,class> class EntityImp>
│ │ │ │ -
437
│ │ │ │ -
439
│ │ │ │ -
440
│ │ │ │ -
441
│ │ │ │ -
445
│ │ │ │ -
446
│ │ │ │ -
448
│ │ │ │ -
486 template<typename GV, int codim>
│ │ │ │ -
487 inline IteratorRange<...> entities(const GV& gv, Codim<codim> cd);
│ │ │ │ -
488
│ │ │ │ -
489
│ │ │ │ -
491
│ │ │ │ -
531 template<typename GV, int dim>
│ │ │ │ -
532 inline IteratorRange<...> entities(const GV& gv, Dim<dim> d);
│ │ │ │ -
533
│ │ │ │ -
535
│ │ │ │ -
536
│ │ │ │ -
537
│ │ │ │ -
541
│ │ │ │ -
542
│ │ │ │ -
544
│ │ │ │ -
570 template<typename GV, unsigned int partitions>
│ │ │ │ - │ │ │ │ -
572
│ │ │ │ -
573
│ │ │ │ -
575
│ │ │ │ -
604 template<typename GV, unsigned int partitions>
│ │ │ │ - │ │ │ │ -
606
│ │ │ │ -
607
│ │ │ │ -
609
│ │ │ │ -
635 template<typename GV, unsigned int partitions>
│ │ │ │ - │ │ │ │ -
637
│ │ │ │ -
638
│ │ │ │ -
640
│ │ │ │ -
666 template<typename GV, unsigned int partitions>
│ │ │ │ - │ │ │ │ -
668
│ │ │ │ -
670
│ │ │ │ -
671
│ │ │ │ -
672
│ │ │ │ -
676
│ │ │ │ -
677
│ │ │ │ -
679
│ │ │ │ -
715 template<typename GV, int codim, unsigned int partitions>
│ │ │ │ - │ │ │ │ -
717
│ │ │ │ -
718
│ │ │ │ -
720
│ │ │ │ -
756 template<typename GV, int dim, unsigned int partitions>
│ │ │ │ - │ │ │ │ -
758
│ │ │ │ -
759
│ │ │ │ -
761
│ │ │ │ -
782 template<typename E, int codim>
│ │ │ │ -
783 inline IteratorRange<...> subEntities(const E& e, Codim<codim> c);
│ │ │ │ -
784
│ │ │ │ -
785
│ │ │ │ -
787
│ │ │ │ -
788
│ │ │ │ -
789#else // DOXYGEN
│ │ │ │ -
790
│ │ │ │ -
791 // ******************************************************************************************
│ │ │ │ -
792 // Implementations
│ │ │ │ -
793 // ******************************************************************************************
│ │ │ │ -
794
│ │ │ │ -
795
│ │ │ │ -
805 template<typename GV, int codim, unsigned int partitions>
│ │ │ │ -
806 inline auto entities(const GV& gv, Codim<codim>, PartitionSet<partitions>)
│ │ │ │ -
807 -> IteratorRange<decltype(gv.template begin<codim,derive_partition_iterator_type<partitions>::value>())>
│ │ │ │ -
808 {
│ │ │ │ -
809 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension for given GridView");
│ │ │ │ -
810 const PartitionIteratorType pit = derive_partition_iterator_type<partitions>::value;
│ │ │ │ -
811 typedef IteratorRange<decltype(gv.template begin<codim,pit>())> return_type;
│ │ │ │ -
812 return return_type(gv.template begin<codim,pit>(),gv.template end<codim,pit>());
│ │ │ │ -
813 }
│ │ │ │ -
814
│ │ │ │ -
822 template<typename GV, int codim>
│ │ │ │ -
823 inline auto entities(const GV& gv, Codim<codim>)
│ │ │ │ -
824 -> IteratorRange<decltype(gv.template begin<codim>())>
│ │ │ │ -
825 {
│ │ │ │ -
826 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension for given GridView");
│ │ │ │ -
827 typedef IteratorRange<decltype(gv.template begin<codim>())> return_type;
│ │ │ │ -
828 return return_type(gv.template begin<codim>(),gv.template end<codim>());
│ │ │ │ -
829 }
│ │ │ │ -
830
│ │ │ │ -
834 template<typename Entity>
│ │ │ │ -
835 inline IteratorRange<typename Entity::HierarchicIterator> descendantElements(const Entity& e, int maxLevel)
│ │ │ │ -
836 {
│ │ │ │ -
837 typedef IteratorRange<typename Entity::HierarchicIterator> return_type;
│ │ │ │ -
838 return return_type(e.hbegin(maxLevel),e.hend(maxLevel));
│ │ │ │ -
839 }
│ │ │ │ -
840
│ │ │ │ -
844 template<typename GV, typename Entity>
│ │ │ │ -
845 inline auto intersections(const GV& gv, const Entity& e)
│ │ │ │ -
846 -> IteratorRange<decltype(gv.ibegin(e))>
│ │ │ │ -
847 {
│ │ │ │ -
848 return IteratorRange<decltype(gv.ibegin(e))>(gv.ibegin(e),gv.iend(e));
│ │ │ │ -
849 }
│ │ │ │ -
850
│ │ │ │ -
851
│ │ │ │ -
857 template<typename GV, int dim, unsigned int partitions>
│ │ │ │ -
858 inline auto entities(const GV& gv, Dim<dim>, PartitionSet<partitions>)
│ │ │ │ -
859 -> decltype(entities(gv,Codim<GV::dimension - dim>(),PartitionSet<partitions>()))
│ │ │ │ -
860 {
│ │ │ │ -
861 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for given GridView");
│ │ │ │ -
862 return entities(gv,Codim<GV::dimension - dim>(),PartitionSet<partitions>());
│ │ │ │ -
863 }
│ │ │ │ -
864
│ │ │ │ -
865 template<typename GV, int dim>
│ │ │ │ -
866 inline auto entities(const GV& gv, Dim<dim>)
│ │ │ │ -
867 -> decltype(entities(gv,Codim<GV::dimension - dim>()))
│ │ │ │ -
868 {
│ │ │ │ -
869 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for given GridView");
│ │ │ │ -
870 return entities(gv,Codim<GV::dimension - dim>());
│ │ │ │ -
871 }
│ │ │ │ -
872
│ │ │ │ -
873 template<typename GV, unsigned int partitions>
│ │ │ │ -
874 inline auto elements(const GV& gv, PartitionSet<partitions>)
│ │ │ │ -
875 -> decltype(entities(gv,Codim<0>(),PartitionSet<partitions>()))
│ │ │ │ -
876 {
│ │ │ │ -
877 return entities(gv,Codim<0>(),PartitionSet<partitions>());
│ │ │ │ -
878 }
│ │ │ │ -
879
│ │ │ │ -
880 template<typename GV>
│ │ │ │ -
881 inline auto elements(const GV& gv)
│ │ │ │ -
882 -> decltype(entities(gv,Codim<0>()))
│ │ │ │ -
883 {
│ │ │ │ -
884 return entities(gv,Codim<0>());
│ │ │ │ -
885 }
│ │ │ │ -
886
│ │ │ │ -
887 template<typename GV, unsigned int partitions>
│ │ │ │ -
888 inline auto facets(const GV& gv, PartitionSet<partitions>)
│ │ │ │ -
889 -> decltype(entities(gv,Codim<1>(),PartitionSet<partitions>()))
│ │ │ │ -
890 {
│ │ │ │ -
891 return entities(gv,Codim<1>(),PartitionSet<partitions>());
│ │ │ │ -
892 }
│ │ │ │ -
893
│ │ │ │ -
894 template<typename GV>
│ │ │ │ -
895 inline auto facets(const GV& gv)
│ │ │ │ -
896 -> decltype(entities(gv,Codim<1>()))
│ │ │ │ -
897 {
│ │ │ │ -
898 return entities(gv,Codim<1>());
│ │ │ │ -
899 }
│ │ │ │ -
900
│ │ │ │ -
901 template<typename GV, unsigned int partitions>
│ │ │ │ -
902 inline auto edges(const GV& gv, PartitionSet<partitions>)
│ │ │ │ -
903 -> decltype(entities(gv,Dim<1>(),PartitionSet<partitions>()))
│ │ │ │ -
904 {
│ │ │ │ -
905 return entities(gv,Dim<1>(),PartitionSet<partitions>());
│ │ │ │ -
906 }
│ │ │ │ -
907
│ │ │ │ -
908 template<typename GV>
│ │ │ │ -
909 inline auto edges(const GV& gv)
│ │ │ │ -
910 -> decltype(entities(gv,Dim<1>()))
│ │ │ │ -
911 {
│ │ │ │ -
912 return entities(gv,Dim<1>());
│ │ │ │ -
913 }
│ │ │ │ -
914
│ │ │ │ -
915 template<typename GV, unsigned int partitions>
│ │ │ │ -
916 inline auto vertices(const GV& gv, PartitionSet<partitions>)
│ │ │ │ -
917 -> decltype(entities(gv,Dim<0>(),PartitionSet<partitions>()))
│ │ │ │ -
918 {
│ │ │ │ -
919 return entities(gv,Dim<0>(),PartitionSet<partitions>());
│ │ │ │ -
920 }
│ │ │ │ -
921
│ │ │ │ -
922 template<typename GV>
│ │ │ │ -
923 inline auto vertices(const GV& gv)
│ │ │ │ -
924 -> decltype(entities(gv,Dim<0>()))
│ │ │ │ -
925 {
│ │ │ │ -
926 return entities(gv,Dim<0>());
│ │ │ │ -
927 }
│ │ │ │ -
928
│ │ │ │ -
929 template<typename E, int codim>
│ │ │ │ -
930 inline auto subEntities(const E& e, Codim<codim> c)
│ │ │ │ -
931 {
│ │ │ │ -
932 static_assert(E::codimension <= codim,
│ │ │ │ -
933 "Can only iterate over sub-entities with equal or larger codimension");
│ │ │ │ -
934 return transformedRangeView(
│ │ │ │ -
935 range(static_cast<int>(e.subEntities(c))),
│ │ │ │ -
936 [&](const int i){ return e.template subEntity<codim>(i); }
│ │ │ │ -
937 );
│ │ │ │ -
938 }
│ │ │ │ -
939
│ │ │ │ -
940#endif // DOXYGEN
│ │ │ │ -
941
│ │ │ │ -
946} // namespace Dune
│ │ │ │ -
947
│ │ │ │ -
948#endif // DUNE_GRID_COMMON_RANGEGENERATORS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ │ -
IteratorRange<... > intersections(const GV &gv, const Entity &e)
Iterates over all Intersections of an Entity with respect to the given GridView.
│ │ │ │ -
IteratorRange<... > vertices(const GV &gv)
Iterates over all vertices (entities with dimension 0) of a GridView.
│ │ │ │ -
IteratorRange<... > elements(const GV &gv, PartitionSet< partitions > ps)
Iterates over all elements / cells (entities with codimension 0) of a GridView that belong to the giv...
│ │ │ │ -
IteratorRange<... > entities(const GV &gv, Codim< codim > cd, PartitionSet< partitions > ps)
Iterates over all entities of a GridView with the given codimension that belong to the given Partitio...
│ │ │ │ -
IteratorRange<... > edges(const GV &gv, PartitionSet< partitions > ps)
Iterates over all edges (entities with dimension 1) of a GridView that belong to the given PartitionS...
│ │ │ │ -
IteratorRange<... > entities(const GV &gv, Dim< dim > d, PartitionSet< partitions > ps)
Iterates over all entities of a GridView with the given dimension that belong to the given PartitionS...
│ │ │ │ -
IteratorRange<... > entities(const GV &gv, Dim< dim > d)
Iterates over all entities of a GridView with the given dimension.
│ │ │ │ -
IteratorRange<... > subEntities(const E &e, Codim< codim > c)
Iterates over all sub-entities of an entity given the codimension of the sub-entities.
│ │ │ │ -
IteratorRange<... > vertices(const GV &gv, PartitionSet< partitions > ps)
Iterates over all vertices (entities with dimension 0) of a GridView that belong to the given Partiti...
│ │ │ │ -
IteratorRange<... > elements(const GV &gv)
Iterates over all elements / cells (entities with codimension 0) of a GridView.
│ │ │ │ -
IteratorRange<... > entities(const GV &gv, Codim< codim > cd)
Iterates over all entities of a GridView with the given codimension.
│ │ │ │ -
IteratorRange<... > facets(const GV &gv, PartitionSet< partitions > ps)
Iterates over all facets (entities with codimension 1) of a GridView that belong to the given Partiti...
│ │ │ │ -
IteratorRange<... > facets(const GV &gv)
Iterates over all facets (entities with codimension 1) of a GridView.
│ │ │ │ -
IteratorRange<... > edges(const GV &gv)
Iterates over all edges (entities with dimension 1) of a GridView.
│ │ │ │ -
IteratorRange<... > descendantElements(const Entity &e, int maxLevel)
Iterates over all descendant elements of the given element up to a maximum level.
│ │ │ │ +
226} // end namespace Dune
│ │ │ │ +
227#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ -
A set of PartitionType values.
Definition partitionset.hh:138
│ │ │ │ +
Communication message buffer interface. This class describes the interface for reading and writing da...
Definition datahandleif.hh:33
│ │ │ │ +
MessageBufferIF(MessageBufferImp &buff)
stores reference to original buffer buff
Definition datahandleif.hh:37
│ │ │ │ +
void write(const T &val)
just wraps the call of the internal buffer method write which writes the data of type T from the buff...
Definition datahandleif.hh:45
│ │ │ │ +
void read(T &val)
just wraps the call of the internal buffer method read which reads the data of type T from the buffer...
Definition datahandleif.hh:59
│ │ │ │ +
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ │ +
CommDataHandleIF()
Definition datahandleif.hh:123
│ │ │ │ +
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
unpack data from message buffer to user.
Definition datahandleif.hh:207
│ │ │ │ +
int fixedsize(int dim, int codim) const
returns true if size of data per entity of given dim and codim is a constant
Definition datahandleif.hh:148
│ │ │ │ +
bool contains(int dim, int codim) const
returns true if data for given valid codim should be communicated
Definition datahandleif.hh:131
│ │ │ │ +
size_t size(const EntityType &e) const
how many objects of type DataType have to be sent for a given entity
Definition datahandleif.hh:182
│ │ │ │ +
void gather(MessageBufferImp &buff, const EntityType &e) const
pack data from user to message buffer
Definition datahandleif.hh:193
│ │ │ │ +
bool fixedSize(int dim, int codim) const
returns true if size of data per entity of given dim and codim is a constant
Definition datahandleif.hh:169
│ │ │ │ +
DataTypeImp DataType
data type of data to communicate
Definition datahandleif.hh:119
│ │ │ │ +
bool overloaded_deprecated_fixedsize(int dim, int codim) const
Definition datahandleif.hh:157
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,382 +1,219 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -rangegenerators.hh │ │ │ │ │ +datahandleif.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_RANGEGENERATORS_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_RANGEGENERATORS_HH │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_p_a_r_t_i_t_i_o_n_s_e_t_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17#ifdef DOXYGEN │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ 18 │ │ │ │ │ -206 / │ │ │ │ │ -/ │ │ │ │ │ -***************************************************************************************** │ │ │ │ │ -207 // Doxygen documentation │ │ │ │ │ -208 / │ │ │ │ │ -/ │ │ │ │ │ -***************************************************************************************** │ │ │ │ │ -209 // │ │ │ │ │ -210 // In the following, the range generating functions are documented for │ │ │ │ │ -Doxygen; the actual │ │ │ │ │ -211 // implementations are further down in this file and hidden from Doxygen. │ │ │ │ │ -212 // The main reason for this split are the return types of those functions, │ │ │ │ │ -which either contain │ │ │ │ │ -213 // long type listings to obtain the iterator type or (in the case of the │ │ │ │ │ -forwarded functions │ │ │ │ │ -214 // use the new-style function syntax and calculate the return type using │ │ │ │ │ -decltype. In both cases, │ │ │ │ │ -215 // Doxygen generates function signatures that are very confusing to the │ │ │ │ │ -average user. │ │ │ │ │ -216 // │ │ │ │ │ -217 / │ │ │ │ │ -/ │ │ │ │ │ -***************************************************************************************** │ │ │ │ │ -218 │ │ │ │ │ -219 │ │ │ │ │ -220 │ │ │ │ │ -224 │ │ │ │ │ +31 template │ │ │ │ │ +_3_2 class _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ │ +33 { │ │ │ │ │ +34 MessageBufferImp & buff_; │ │ │ │ │ +35 public: │ │ │ │ │ +_3_7 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F(MessageBufferImp & buff) : buff_(buff) {} │ │ │ │ │ +38 │ │ │ │ │ +44 template │ │ │ │ │ +_4_5 void _w_r_i_t_e(const T & val) │ │ │ │ │ +46 { │ │ │ │ │ +47 buff_.write(val); │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +58 template │ │ │ │ │ +_5_9 void _r_e_a_d(T & val) │ │ │ │ │ +60 { │ │ │ │ │ +61 buff_.read(val); │ │ │ │ │ +62 } │ │ │ │ │ +63 }; // end class MessageBufferIF │ │ │ │ │ +64 │ │ │ │ │ +65 │ │ │ │ │ +76 template │ │ │ │ │ +_7_7 class _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ +78 { │ │ │ │ │ +79 template │ │ │ │ │ +80 class CheckFixedSizeMethod │ │ │ │ │ +81 { │ │ │ │ │ +82 // check for old signature of deprecated fixedsize method. │ │ │ │ │ +83 template │ │ │ │ │ +84 static std::true_type testSignature(bool (T::*)(int, int) const); │ │ │ │ │ +85 │ │ │ │ │ +86 template │ │ │ │ │ +87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t); │ │ │ │ │ +88 │ │ │ │ │ +89 template │ │ │ │ │ +90 static std::false_type test(...); │ │ │ │ │ +91 │ │ │ │ │ +92 using type = decltype(test(nullptr)); │ │ │ │ │ +93 public: │ │ │ │ │ +94 static const bool value = type::value; │ │ │ │ │ +95 }; │ │ │ │ │ +96 │ │ │ │ │ +97 │ │ │ │ │ +98 template │ │ │ │ │ +99 struct CallFixedSize │ │ │ │ │ +100 { │ │ │ │ │ +101 static bool fixedSize( const DH& dh, int dim, int codim ) │ │ │ │ │ +102 { │ │ │ │ │ +103 return dh.fixedSize( dim, codim ); │ │ │ │ │ +104 } │ │ │ │ │ +105 }; │ │ │ │ │ +106 │ │ │ │ │ +107 // old, deprecated implementation │ │ │ │ │ +108 template │ │ │ │ │ +109 struct CallFixedSize< DH, true > │ │ │ │ │ +110 { │ │ │ │ │ +111 static bool fixedSize( const DH& dh, int dim, int codim ) │ │ │ │ │ +112 { │ │ │ │ │ +113 return dh.overloaded_deprecated_fixedsize( dim, codim ); │ │ │ │ │ +114 } │ │ │ │ │ +115 }; │ │ │ │ │ +116 │ │ │ │ │ +117 public: │ │ │ │ │ +_1_1_9 typedef DataTypeImp _D_a_t_a_T_y_p_e; │ │ │ │ │ +120 │ │ │ │ │ +121 protected: │ │ │ │ │ +122 // one should not create an explicit instance of this interface object │ │ │ │ │ +_1_2_3 _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F() {} │ │ │ │ │ +124 │ │ │ │ │ +125 public: │ │ │ │ │ +_1_3_1 bool _c_o_n_t_a_i_n_s (int dim, int codim) const │ │ │ │ │ +132 { │ │ │ │ │ +133 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(dim,codim))); │ │ │ │ │ +134 return asImp().contains(dim,codim); │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +147 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. │ │ │ │ │ +Implement and call fixedSize (camelCase) instead!")]] │ │ │ │ │ +_1_4_8 int _f_i_x_e_d_s_i_z_e (int dim, int codim) const │ │ │ │ │ +149 { │ │ │ │ │ +150 return int(_f_i_x_e_d_S_i_z_e( dim, codim )); │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +153 // if this deprecation appears then the DataHandle implementation │ │ │ │ │ +154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize' │ │ │ │ │ +155 // method. │ │ │ │ │ +156 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. │ │ │ │ │ +Implement and call fixedSize (camelCase) instead!")]] │ │ │ │ │ +_1_5_7 bool _o_v_e_r_l_o_a_d_e_d___d_e_p_r_e_c_a_t_e_d___f_i_x_e_d_s_i_z_e( int dim, int codim ) const │ │ │ │ │ +158 { │ │ │ │ │ +159 return asImp().fixedsize( dim, codim ); │ │ │ │ │ +160 } │ │ │ │ │ +161 │ │ │ │ │ +_1_6_9 bool _f_i_x_e_d_S_i_z_e (int dim, int codim) const │ │ │ │ │ +170 { │ │ │ │ │ +171 // this should be enabled once the old fixedsize is removed │ │ │ │ │ +172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim))); │ │ │ │ │ +173 return CallFixedSize< DataHandleImp, │ │ │ │ │ +174 CheckFixedSizeMethod< DataHandleImp >::value >_:_:_f_i_x_e_d_S_i_z_e( asImp(), dim, │ │ │ │ │ +codim ); │ │ │ │ │ +175 } │ │ │ │ │ +176 │ │ │ │ │ +181 template │ │ │ │ │ +_1_8_2 size_t _s_i_z_e (const EntityType& e) const │ │ │ │ │ +183 { │ │ │ │ │ +184 CHECK_INTERFACE_IMPLEMENTATION((asImp()._s_i_z_e(e))); │ │ │ │ │ +185 return asImp().size(e); │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +192 template │ │ │ │ │ +_1_9_3 void _g_a_t_h_e_r (MessageBufferImp& buff, const EntityType& e) const │ │ │ │ │ +194 { │ │ │ │ │ +195 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ │ +196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._g_a_t_h_e_r(buffIF,e))); │ │ │ │ │ +197 } │ │ │ │ │ +198 │ │ │ │ │ +206 template │ │ │ │ │ +_2_0_7 void _s_c_a_t_t_e_r (MessageBufferImp& buff, const EntityType& e, size_t n) │ │ │ │ │ +208 { │ │ │ │ │ +209 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ │ +210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._s_c_a_t_t_e_r(buffIF,e,n))); │ │ │ │ │ +211 } │ │ │ │ │ +212 │ │ │ │ │ +213 private: │ │ │ │ │ +215 DataHandleImp& asImp () {return static_cast (*this);} │ │ │ │ │ +217 const DataHandleImp& asImp () const │ │ │ │ │ +218 { │ │ │ │ │ +219 return static_cast(*this); │ │ │ │ │ +220 } │ │ │ │ │ +221 }; // end class CommDataHandleIF │ │ │ │ │ +222 │ │ │ │ │ +223#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ │ +224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ │ 225 │ │ │ │ │ -227 │ │ │ │ │ -256 template │ │ │ │ │ -_2_5_7 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_l_e_m_e_n_t_s(const _G_V& gv); │ │ │ │ │ -258 │ │ │ │ │ -259 │ │ │ │ │ -261 │ │ │ │ │ -290 template │ │ │ │ │ -_2_9_1 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _f_a_c_e_t_s(const _G_V& gv); │ │ │ │ │ -292 │ │ │ │ │ -293 │ │ │ │ │ -295 │ │ │ │ │ -324 template │ │ │ │ │ -_3_2_5 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_d_g_e_s(const _G_V& gv); │ │ │ │ │ -326 │ │ │ │ │ -327 │ │ │ │ │ -329 │ │ │ │ │ -358 template │ │ │ │ │ -_3_5_9 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _v_e_r_t_i_c_e_s(const _G_V& gv); │ │ │ │ │ -360 │ │ │ │ │ -361 │ │ │ │ │ -363 │ │ │ │ │ -364 │ │ │ │ │ -365 │ │ │ │ │ -369 │ │ │ │ │ -371 │ │ │ │ │ -394 template │ │ │ │ │ -_3_9_5 inline IteratorRange<...> _i_n_t_e_r_s_e_c_t_i_o_n_s(const GV& gv, const _E_n_t_i_t_y& e); │ │ │ │ │ -396 │ │ │ │ │ -397 │ │ │ │ │ -399 │ │ │ │ │ -400 │ │ │ │ │ -401 │ │ │ │ │ -405 │ │ │ │ │ -406 │ │ │ │ │ -408 │ │ │ │ │ -434 template │ │ │ │ │ -_4_3_5 inline IteratorRange<...> _d_e_s_c_e_n_d_a_n_t_E_l_e_m_e_n_t_s(const _E_n_t_i_t_y& e, int │ │ │ │ │ -maxLevel); │ │ │ │ │ -436 // Entity class EntityImp> │ │ │ │ │ -437 │ │ │ │ │ -439 │ │ │ │ │ -440 │ │ │ │ │ -441 │ │ │ │ │ -445 │ │ │ │ │ -446 │ │ │ │ │ -448 │ │ │ │ │ -486 template │ │ │ │ │ -_4_8_7 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_n_t_i_t_i_e_s(const _G_V& gv, _C_o_d_i_m_<_c_o_d_i_m_> _c_d); │ │ │ │ │ -488 │ │ │ │ │ -489 │ │ │ │ │ -491 │ │ │ │ │ -531 template │ │ │ │ │ -_5_3_2 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_n_t_i_t_i_e_s(const _G_V& gv, _D_i_m_<_d_i_m_> d); │ │ │ │ │ -533 │ │ │ │ │ -535 │ │ │ │ │ -536 │ │ │ │ │ -537 │ │ │ │ │ -541 │ │ │ │ │ -542 │ │ │ │ │ -544 │ │ │ │ │ -570 template │ │ │ │ │ -_5_7_1 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_l_e_m_e_n_t_s(const _G_V& gv, _P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_> │ │ │ │ │ -_p_s); │ │ │ │ │ -572 │ │ │ │ │ -573 │ │ │ │ │ -575 │ │ │ │ │ -604 template │ │ │ │ │ -_6_0_5 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _f_a_c_e_t_s(const _G_V& gv, _P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_> │ │ │ │ │ -_p_s); │ │ │ │ │ -606 │ │ │ │ │ -607 │ │ │ │ │ -609 │ │ │ │ │ -635 template │ │ │ │ │ -_6_3_6 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_d_g_e_s(const _G_V& gv, _P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_> _p_s); │ │ │ │ │ -637 │ │ │ │ │ -638 │ │ │ │ │ -640 │ │ │ │ │ -666 template │ │ │ │ │ -_6_6_7 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _v_e_r_t_i_c_e_s(const _G_V& gv, _P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_> │ │ │ │ │ -_p_s); │ │ │ │ │ -668 │ │ │ │ │ -670 │ │ │ │ │ -671 │ │ │ │ │ -672 │ │ │ │ │ -676 │ │ │ │ │ -677 │ │ │ │ │ -679 │ │ │ │ │ -715 template │ │ │ │ │ -_7_1_6 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_n_t_i_t_i_e_s(const _G_V& gv, _C_o_d_i_m_<_c_o_d_i_m_> _c_d, │ │ │ │ │ -_P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_> _p_s); │ │ │ │ │ -717 │ │ │ │ │ -718 │ │ │ │ │ -720 │ │ │ │ │ -756 template │ │ │ │ │ -_7_5_7 inline _I_t_e_r_a_t_o_r_R_a_n_g_e<...> _e_n_t_i_t_i_e_s(const _G_V& gv, _D_i_m_<_d_i_m_> d, │ │ │ │ │ -_P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_> _p_s); │ │ │ │ │ -758 │ │ │ │ │ -759 │ │ │ │ │ -761 │ │ │ │ │ -782 template │ │ │ │ │ -_7_8_3 inline IteratorRange<...> _s_u_b_E_n_t_i_t_i_e_s(const E& e, Codim c); │ │ │ │ │ -784 │ │ │ │ │ -785 │ │ │ │ │ -787 │ │ │ │ │ -788 │ │ │ │ │ -789#else // DOXYGEN │ │ │ │ │ -790 │ │ │ │ │ -791 / │ │ │ │ │ -/ │ │ │ │ │ -****************************************************************************************** │ │ │ │ │ -792 // Implementations │ │ │ │ │ -793 / │ │ │ │ │ -/ │ │ │ │ │ -****************************************************************************************** │ │ │ │ │ -794 │ │ │ │ │ -795 │ │ │ │ │ -805 template │ │ │ │ │ -806 inline auto entities(const GV& gv, Codim, _P_a_r_t_i_t_i_o_n_S_e_t_<_p_a_r_t_i_t_i_o_n_s_>) │ │ │ │ │ -807 -> IteratorRange::value>())> │ │ │ │ │ -808 { │ │ │ │ │ -809 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension │ │ │ │ │ -for given GridView"); │ │ │ │ │ -810 const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e pit = │ │ │ │ │ -derive_partition_iterator_type::value; │ │ │ │ │ -811 typedef IteratorRange())> │ │ │ │ │ -return_type; │ │ │ │ │ -812 return return_type(gv.template begin(),gv.template │ │ │ │ │ -end()); │ │ │ │ │ -813 } │ │ │ │ │ -814 │ │ │ │ │ -822 template │ │ │ │ │ -823 inline auto entities(const GV& gv, Codim) │ │ │ │ │ -824 -> IteratorRange())> │ │ │ │ │ -825 { │ │ │ │ │ -826 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension │ │ │ │ │ -for given GridView"); │ │ │ │ │ -827 typedef IteratorRange())> return_type; │ │ │ │ │ -828 return return_type(gv.template begin(),gv.template end()); │ │ │ │ │ -829 } │ │ │ │ │ -830 │ │ │ │ │ -834 template │ │ │ │ │ -835 inline IteratorRange │ │ │ │ │ -descendantElements(const Entity& e, int maxLevel) │ │ │ │ │ -836 { │ │ │ │ │ -837 typedef IteratorRange return_type; │ │ │ │ │ -838 return return_type(e.hbegin(maxLevel),e.hend(maxLevel)); │ │ │ │ │ -839 } │ │ │ │ │ -840 │ │ │ │ │ -844 template │ │ │ │ │ -845 inline auto intersections(const GV& gv, const Entity& e) │ │ │ │ │ -846 -> IteratorRange │ │ │ │ │ -847 { │ │ │ │ │ -848 return IteratorRange(gv.ibegin(e),gv.iend(e)); │ │ │ │ │ -849 } │ │ │ │ │ -850 │ │ │ │ │ -851 │ │ │ │ │ -857 template │ │ │ │ │ -858 inline auto entities(const GV& gv, Dim, PartitionSet) │ │ │ │ │ -859 -> decltype(entities(gv,Codim │ │ │ │ │ -(),PartitionSet())) │ │ │ │ │ -860 { │ │ │ │ │ -861 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for │ │ │ │ │ -given GridView"); │ │ │ │ │ -862 return entities(gv,Codim(),PartitionSet │ │ │ │ │ -()); │ │ │ │ │ -863 } │ │ │ │ │ -864 │ │ │ │ │ -865 template │ │ │ │ │ -866 inline auto entities(const GV& gv, Dim) │ │ │ │ │ -867 -> decltype(entities(gv,Codim())) │ │ │ │ │ -868 { │ │ │ │ │ -869 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for │ │ │ │ │ -given GridView"); │ │ │ │ │ -870 return entities(gv,Codim()); │ │ │ │ │ -871 } │ │ │ │ │ -872 │ │ │ │ │ -873 template │ │ │ │ │ -874 inline auto elements(const GV& gv, PartitionSet) │ │ │ │ │ -875 -> decltype(entities(gv,Codim<0>(),PartitionSet())) │ │ │ │ │ -876 { │ │ │ │ │ -877 return entities(gv,Codim<0>(),PartitionSet()); │ │ │ │ │ -878 } │ │ │ │ │ -879 │ │ │ │ │ -880 template │ │ │ │ │ -881 inline auto elements(const GV& gv) │ │ │ │ │ -882 -> decltype(entities(gv,Codim<0>())) │ │ │ │ │ -883 { │ │ │ │ │ -884 return entities(gv,Codim<0>()); │ │ │ │ │ -885 } │ │ │ │ │ -886 │ │ │ │ │ -887 template │ │ │ │ │ -888 inline auto facets(const GV& gv, PartitionSet) │ │ │ │ │ -889 -> decltype(entities(gv,Codim<1>(),PartitionSet())) │ │ │ │ │ -890 { │ │ │ │ │ -891 return entities(gv,Codim<1>(),PartitionSet()); │ │ │ │ │ -892 } │ │ │ │ │ -893 │ │ │ │ │ -894 template │ │ │ │ │ -895 inline auto facets(const GV& gv) │ │ │ │ │ -896 -> decltype(entities(gv,Codim<1>())) │ │ │ │ │ -897 { │ │ │ │ │ -898 return entities(gv,Codim<1>()); │ │ │ │ │ -899 } │ │ │ │ │ -900 │ │ │ │ │ -901 template │ │ │ │ │ -902 inline auto edges(const GV& gv, PartitionSet) │ │ │ │ │ -903 -> decltype(entities(gv,Dim<1>(),PartitionSet())) │ │ │ │ │ -904 { │ │ │ │ │ -905 return entities(gv,Dim<1>(),PartitionSet()); │ │ │ │ │ -906 } │ │ │ │ │ -907 │ │ │ │ │ -908 template │ │ │ │ │ -909 inline auto edges(const GV& gv) │ │ │ │ │ -910 -> decltype(entities(gv,Dim<1>())) │ │ │ │ │ -911 { │ │ │ │ │ -912 return entities(gv,Dim<1>()); │ │ │ │ │ -913 } │ │ │ │ │ -914 │ │ │ │ │ -915 template │ │ │ │ │ -916 inline auto vertices(const GV& gv, PartitionSet) │ │ │ │ │ -917 -> decltype(entities(gv,Dim<0>(),PartitionSet())) │ │ │ │ │ -918 { │ │ │ │ │ -919 return entities(gv,Dim<0>(),PartitionSet()); │ │ │ │ │ -920 } │ │ │ │ │ -921 │ │ │ │ │ -922 template │ │ │ │ │ -923 inline auto vertices(const GV& gv) │ │ │ │ │ -924 -> decltype(entities(gv,Dim<0>())) │ │ │ │ │ -925 { │ │ │ │ │ -926 return entities(gv,Dim<0>()); │ │ │ │ │ -927 } │ │ │ │ │ -928 │ │ │ │ │ -929 template │ │ │ │ │ -930 inline auto subEntities(const E& e, Codim c) │ │ │ │ │ -931 { │ │ │ │ │ -932 static_assert(E::codimension <= codim, │ │ │ │ │ -933 "Can only iterate over sub-entities with equal or larger codimension"); │ │ │ │ │ -934 return transformedRangeView( │ │ │ │ │ -935 range(static_cast(e.subEntities(c))), │ │ │ │ │ -936 [&](const int i){ return e.template subEntity(i); } │ │ │ │ │ -937 ); │ │ │ │ │ -938 } │ │ │ │ │ -939 │ │ │ │ │ -940#endif // DOXYGEN │ │ │ │ │ -941 │ │ │ │ │ -946} // namespace Dune │ │ │ │ │ -947 │ │ │ │ │ -948#endif // DUNE_GRID_COMMON_RANGEGENERATORS_HH │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_p_a_r_t_i_t_i_o_n_s_e_t_._h_h │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ │ -PartitionIteratorType │ │ │ │ │ -Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_i_n_t_e_r_s_e_c_t_i_o_n_s │ │ │ │ │ -IteratorRange<... > intersections(const GV &gv, const Entity &e) │ │ │ │ │ -Iterates over all Intersections of an Entity with respect to the given │ │ │ │ │ -GridView. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_v_e_r_t_i_c_e_s │ │ │ │ │ -IteratorRange<... > vertices(const GV &gv) │ │ │ │ │ -Iterates over all vertices (entities with dimension 0) of a GridView. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_l_e_m_e_n_t_s │ │ │ │ │ -IteratorRange<... > elements(const GV &gv, PartitionSet< partitions > ps) │ │ │ │ │ -Iterates over all elements / cells (entities with codimension 0) of a GridView │ │ │ │ │ -that belong to the giv... │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_n_t_i_t_i_e_s │ │ │ │ │ -IteratorRange<... > entities(const GV &gv, Codim< codim > cd, PartitionSet< │ │ │ │ │ -partitions > ps) │ │ │ │ │ -Iterates over all entities of a GridView with the given codimension that belong │ │ │ │ │ -to the given Partitio... │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_d_g_e_s │ │ │ │ │ -IteratorRange<... > edges(const GV &gv, PartitionSet< partitions > ps) │ │ │ │ │ -Iterates over all edges (entities with dimension 1) of a GridView that belong │ │ │ │ │ -to the given PartitionS... │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_n_t_i_t_i_e_s │ │ │ │ │ -IteratorRange<... > entities(const GV &gv, Dim< dim > d, PartitionSet< │ │ │ │ │ -partitions > ps) │ │ │ │ │ -Iterates over all entities of a GridView with the given dimension that belong │ │ │ │ │ -to the given PartitionS... │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_n_t_i_t_i_e_s │ │ │ │ │ -IteratorRange<... > entities(const GV &gv, Dim< dim > d) │ │ │ │ │ -Iterates over all entities of a GridView with the given dimension. │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -IteratorRange<... > subEntities(const E &e, Codim< codim > c) │ │ │ │ │ -Iterates over all sub-entities of an entity given the codimension of the sub- │ │ │ │ │ -entities. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_v_e_r_t_i_c_e_s │ │ │ │ │ -IteratorRange<... > vertices(const GV &gv, PartitionSet< partitions > ps) │ │ │ │ │ -Iterates over all vertices (entities with dimension 0) of a GridView that │ │ │ │ │ -belong to the given Partiti... │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_l_e_m_e_n_t_s │ │ │ │ │ -IteratorRange<... > elements(const GV &gv) │ │ │ │ │ -Iterates over all elements / cells (entities with codimension 0) of a GridView. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_n_t_i_t_i_e_s │ │ │ │ │ -IteratorRange<... > entities(const GV &gv, Codim< codim > cd) │ │ │ │ │ -Iterates over all entities of a GridView with the given codimension. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_f_a_c_e_t_s │ │ │ │ │ -IteratorRange<... > facets(const GV &gv, PartitionSet< partitions > ps) │ │ │ │ │ -Iterates over all facets (entities with codimension 1) of a GridView that │ │ │ │ │ -belong to the given Partiti... │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_f_a_c_e_t_s │ │ │ │ │ -IteratorRange<... > facets(const GV &gv) │ │ │ │ │ -Iterates over all facets (entities with codimension 1) of a GridView. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_e_d_g_e_s │ │ │ │ │ -IteratorRange<... > edges(const GV &gv) │ │ │ │ │ -Iterates over all edges (entities with dimension 1) of a GridView. │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_d_e_s_c_e_n_d_a_n_t_E_l_e_m_e_n_t_s │ │ │ │ │ -IteratorRange<... > descendantElements(const Entity &e, int maxLevel) │ │ │ │ │ -Iterates over all descendant elements of the given element up to a maximum │ │ │ │ │ -level. │ │ │ │ │ +226} // end namespace Dune │ │ │ │ │ +227#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -A struct that collects all associated types of one implementation from the │ │ │ │ │ -Traits class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_S_e_t │ │ │ │ │ -A set of PartitionType values. │ │ │ │ │ -DDeeffiinniittiioonn partitionset.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ │ +Communication message buffer interface. This class describes the interface for │ │ │ │ │ +reading and writing da... │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ │ +MessageBufferIF(MessageBufferImp &buff) │ │ │ │ │ +stores reference to original buffer buff │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_w_r_i_t_e │ │ │ │ │ +void write(const T &val) │ │ │ │ │ +just wraps the call of the internal buffer method write which writes the data │ │ │ │ │ +of type T from the buff... │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_r_e_a_d │ │ │ │ │ +void read(T &val) │ │ │ │ │ +just wraps the call of the internal buffer method read which reads the data of │ │ │ │ │ +type T from the buffer... │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ +CommDataHandleIF describes the features of a data handle for communication in │ │ │ │ │ +parallel runs using the... │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ +CommDataHandleIF() │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_c_a_t_t_e_r │ │ │ │ │ +void scatter(MessageBufferImp &buff, const EntityType &e, size_t n) │ │ │ │ │ +unpack data from message buffer to user. │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_f_i_x_e_d_s_i_z_e │ │ │ │ │ +int fixedsize(int dim, int codim) const │ │ │ │ │ +returns true if size of data per entity of given dim and codim is a constant │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(int dim, int codim) const │ │ │ │ │ +returns true if data for given valid codim should be communicated │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_i_z_e │ │ │ │ │ +size_t size(const EntityType &e) const │ │ │ │ │ +how many objects of type DataType have to be sent for a given entity │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_g_a_t_h_e_r │ │ │ │ │ +void gather(MessageBufferImp &buff, const EntityType &e) const │ │ │ │ │ +pack data from user to message buffer │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:193 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_f_i_x_e_d_S_i_z_e │ │ │ │ │ +bool fixedSize(int dim, int codim) const │ │ │ │ │ +returns true if size of data per entity of given dim and codim is a constant │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:169 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_D_a_t_a_T_y_p_e │ │ │ │ │ +DataTypeImp DataType │ │ │ │ │ +data type of data to communicate │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_o_v_e_r_l_o_a_d_e_d___d_e_p_r_e_c_a_t_e_d___f_i_x_e_d_s_i_z_e │ │ │ │ │ +bool overloaded_deprecated_fixedsize(int dim, int codim) const │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:157 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00329.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: sizecache.hh File Reference │ │ │ │ +dune-grid: mapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,48 +72,40 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
sizecache.hh File Reference
│ │ │ │ +
mapper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Provides size cache classes to implement the grids size method efficiently. │ │ │ │ +

Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ More...

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <set>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/capabilities.hh>
│ │ │ │ +
#include <utility>
│ │ │ │ +#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::SizeCache< GridImp >
 organizes the caching of sizes for one grid and one GeometryType More...
class  Dune::Mapper< G, MapperImp, IndexType >
 Mapper interface. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Provides size cache classes to implement the grids size method efficiently.

│ │ │ │ -
Author
Robert Kloefkorn
│ │ │ │ +

Provides classes with basic mappers which are used to attach data to a grid.

│ │ │ │ +
Author
Peter Bastian
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,36 +2,27 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -sizecache.hh File Reference │ │ │ │ │ -Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ +mapper.hh File Reference │ │ │ │ │ +Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  organizes the caching of sizes for one grid and one GeometryType │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_M_a_p_p_e_r_<_ _G_,_ _M_a_p_p_e_r_I_m_p_,_ _I_n_d_e_x_T_y_p_e_ _> │ │ │ │ │ +  _M_a_p_p_e_r interface. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ +Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ Author │ │ │ │ │ - Robert Kloefkorn │ │ │ │ │ + Peter Bastian │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: sizecache.hh Source File │ │ │ │ +dune-grid: mapper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,385 +74,123 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
sizecache.hh
│ │ │ │ +
mapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_SIZECACHE_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_SIZECACHE_HH
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_MAPPER_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_MAPPER_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <set>
│ │ │ │ -
11#include <utility>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/exceptions.hh>
│ │ │ │ -
14#include <dune/common/hybridutilities.hh>
│ │ │ │ -
15
│ │ │ │ -
16#include <dune/geometry/type.hh>
│ │ │ │ -
17#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
18
│ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
28namespace Dune {
│ │ │ │ -
29
│ │ │ │ -
31 template <class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ - │ │ │ │ -
36 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
37
│ │ │ │ -
39 constexpr static int nCodim = GridImp::dimension + 1;
│ │ │ │ -
40
│ │ │ │ -
41 // type of grid
│ │ │ │ -
42 typedef GridImp GridType;
│ │ │ │ -
43
│ │ │ │ -
44 // coordinate type
│ │ │ │ -
45 typedef typename GridType :: ctype ctype ;
│ │ │ │ -
46
│ │ │ │ -
47 // stores all sizes of the levels
│ │ │ │ -
48 mutable std::vector< int > levelSizes_[nCodim];
│ │ │ │ -
49
│ │ │ │ -
50 // stores all sizes of the levels
│ │ │ │ -
51 mutable std::vector< std::vector< int > > levelTypeSizes_[nCodim];
│ │ │ │ -
52
│ │ │ │ -
53 // stores all sizes of leafs
│ │ │ │ -
54 mutable int leafSizes_[nCodim];
│ │ │ │ -
55
│ │ │ │ -
56 // stores all sizes of leafs
│ │ │ │ -
57 mutable std::vector< int > leafTypeSizes_[nCodim];
│ │ │ │ -
58
│ │ │ │ -
59 // the grid
│ │ │ │ -
60 const GridType & grid_;
│ │ │ │ -
61
│ │ │ │ -
62 // count elements of set by iterating the grid
│ │ │ │ -
63 template < int codim, bool gridHasCodim >
│ │ │ │ -
64 struct CountLevelEntitiesBase
│ │ │ │ -
65 {
│ │ │ │ -
66 template < class SzCacheType >
│ │ │ │ -
67 static void apply(const SzCacheType & sc, int level, int cd)
│ │ │ │ -
68 {
│ │ │ │ -
69 if( cd == codim )
│ │ │ │ -
70 {
│ │ │ │ -
71 sc.template countLevelEntities<All_Partition,codim> (level);
│ │ │ │ -
72 }
│ │ │ │ -
73 }
│ │ │ │ -
74 };
│ │ │ │ -
75
│ │ │ │ -
76 template < int codim >
│ │ │ │ -
77 struct CountLevelEntitiesBase< codim, false >
│ │ │ │ -
78 {
│ │ │ │ -
79 template < class SzCacheType >
│ │ │ │ -
80 static void apply(const SzCacheType & sc, int level, int cd)
│ │ │ │ -
81 {
│ │ │ │ -
82 if( cd == codim )
│ │ │ │ -
83 {
│ │ │ │ -
84 sc.template countLevelEntitiesNoCodim<All_Partition,codim> (level);
│ │ │ │ -
85 }
│ │ │ │ -
86 }
│ │ │ │ -
87 };
│ │ │ │ -
88
│ │ │ │ -
89 template < int codim >
│ │ │ │ -
90 struct CountLevelEntities
│ │ │ │ -
91 : public CountLevelEntitiesBase< codim, Capabilities :: hasEntity< GridType, codim > :: v >
│ │ │ │ -
92 {};
│ │ │ │ -
93
│ │ │ │ -
94 // count elements of set by iterating the grid
│ │ │ │ -
95 template < int codim, bool gridHasCodim >
│ │ │ │ -
96 struct CountLeafEntitiesBase
│ │ │ │ -
97 {
│ │ │ │ -
98 template <class SzCacheType>
│ │ │ │ -
99 static void apply(const SzCacheType & sc, int cd)
│ │ │ │ -
100 {
│ │ │ │ -
101 if( cd == codim )
│ │ │ │ -
102 {
│ │ │ │ -
103 sc.template countLeafEntities<All_Partition,codim> ();
│ │ │ │ -
104 }
│ │ │ │ -
105 }
│ │ │ │ -
106 };
│ │ │ │ -
107
│ │ │ │ -
108 // count elements of set by iterating the grid
│ │ │ │ -
109 template < int codim >
│ │ │ │ -
110 struct CountLeafEntitiesBase< codim, false >
│ │ │ │ -
111 {
│ │ │ │ -
112 template <class SzCacheType>
│ │ │ │ -
113 static void apply(const SzCacheType & sc, int cd)
│ │ │ │ -
114 {
│ │ │ │ -
115 if( cd == codim )
│ │ │ │ -
116 {
│ │ │ │ -
117 sc.template countLeafEntitiesNoCodim<All_Partition,codim> ();
│ │ │ │ -
118 }
│ │ │ │ -
119 }
│ │ │ │ -
120 };
│ │ │ │ -
121
│ │ │ │ -
122 template < int codim >
│ │ │ │ -
123 struct CountLeafEntities
│ │ │ │ -
124 : public CountLeafEntitiesBase< codim, Capabilities :: hasEntity< GridType, codim > :: v >
│ │ │ │ -
125 {};
│ │ │ │ -
126
│ │ │ │ -
127 int gtIndex( const GeometryType& type ) const
│ │ │ │ -
128 {
│ │ │ │ -
129 return type.id() >> 1 ;
│ │ │ │ -
130 }
│ │ │ │ -
131
│ │ │ │ -
132 int sizeCodim( const int codim ) const
│ │ │ │ -
133 {
│ │ │ │ -
134 const int mydim = GridType :: dimension - codim;
│ │ │ │ -
135 return ((1 << mydim) + 1) / 2;
│ │ │ │ -
136 }
│ │ │ │ -
137
│ │ │ │ -
138 // private copy constructor
│ │ │ │ -
139 SizeCache (const SizeCache & );
│ │ │ │ -
140 public:
│ │ │ │ -
│ │ │ │ -
142 SizeCache (const GridType & grid) : grid_( grid )
│ │ │ │ -
143 {
│ │ │ │ -
144 reset();
│ │ │ │ -
145 }
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
148 void reset()
│ │ │ │ -
149 {
│ │ │ │ -
150 for(int codim=0; codim<nCodim; ++codim)
│ │ │ │ -
151 {
│ │ │ │ -
152 leafSizes_[ codim ] = -1;
│ │ │ │ -
153 leafTypeSizes_[ codim ].resize( sizeCodim( codim ), -1 );
│ │ │ │ -
154 }
│ │ │ │ -
155
│ │ │ │ -
156 const int numMxl = grid_.maxLevel()+1;
│ │ │ │ -
157 for(int codim=0; codim<nCodim; ++codim)
│ │ │ │ -
158 {
│ │ │ │ -
159 std::vector<int> & vec = levelSizes_[codim];
│ │ │ │ -
160 vec.resize(numMxl);
│ │ │ │ -
161 levelTypeSizes_[codim].resize( numMxl );
│ │ │ │ -
162 for(int level = 0; level<numMxl; ++level)
│ │ │ │ -
163 {
│ │ │ │ -
164 vec[level] = -1;
│ │ │ │ -
165 levelTypeSizes_[codim][level].resize( sizeCodim( codim ), -1 );
│ │ │ │ -
166 }
│ │ │ │ -
167 }
│ │ │ │ -
168 }
│ │ │ │ -
│ │ │ │ -
169
│ │ │ │ -
170 //********************************************************************
│ │ │ │ -
171 // level sizes
│ │ │ │ -
172 //********************************************************************
│ │ │ │ -
│ │ │ │ -
174 int size (int level, int codim) const
│ │ │ │ -
175 {
│ │ │ │ -
176 assert( codim >= 0 );
│ │ │ │ -
177 assert( codim < nCodim );
│ │ │ │ -
178 assert( level >= 0 );
│ │ │ │ -
179 if( level >= (int) levelSizes_[codim].size() ) return 0;
│ │ │ │ -
180
│ │ │ │ -
181 if( levelSizes_[codim][level] < 0)
│ │ │ │ -
182 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLevelEntities< i >::apply( *this, level, codim ); } );
│ │ │ │ -
183
│ │ │ │ -
184 // CountLevelEntities<ThisType,All_Partition,dim>::count(*this,level,codim);
│ │ │ │ -
185
│ │ │ │ -
186 assert( levelSizes_[codim][level] >= 0 );
│ │ │ │ -
187 return levelSizes_[codim][level];
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189
│ │ │ │ -
│ │ │ │ -
191 int size (int level, GeometryType type) const
│ │ │ │ -
192 {
│ │ │ │ -
193 int codim = GridType ::dimension - type.dim();
│ │ │ │ -
194 if( levelSizes_[codim][level] < 0)
│ │ │ │ -
195 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLevelEntities< i >::apply( *this, level, codim ); } );
│ │ │ │ +
8#include <utility>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ +
11
│ │ │ │ +
89namespace Dune
│ │ │ │ +
90{
│ │ │ │ +
108 template <typename G, typename MapperImp, typename IndexType=int>
│ │ │ │ +
│ │ │ │ +
109 class Mapper
│ │ │ │ +
110 {
│ │ │ │ +
111 public:
│ │ │ │ +
112
│ │ │ │ +
114 using Index = IndexType;
│ │ │ │ +
115
│ │ │ │ +
121 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
122 Index index (const EntityType& e) const
│ │ │ │ +
123 {
│ │ │ │ +
124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e)));
│ │ │ │ +
125 return asImp().index(e);
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
128
│ │ │ │ +
│ │ │ │ +
136 Index subIndex (const typename G::Traits::template Codim<0>::Entity& e,
│ │ │ │ +
137 int i,
│ │ │ │ +
138 unsigned int codim) const
│ │ │ │ +
139 {
│ │ │ │ +
140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim)));
│ │ │ │ +
141 return asImp().subIndex(e,i,codim);
│ │ │ │ +
142 }
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │ +
│ │ │ │ +
152 auto size () const
│ │ │ │ +
153 {
│ │ │ │ +
154 CHECK_INTERFACE_IMPLEMENTATION((asImp().size()));
│ │ │ │ +
155 return asImp().size();
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
158
│ │ │ │ +
166 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
167 bool contains (const EntityType& e, IndexType& result) const
│ │ │ │ +
168 {
│ │ │ │ +
169 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,result )));
│ │ │ │ +
170 return asImp().contains(e,result );
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
173
│ │ │ │ +
│ │ │ │ +
183 bool contains (const typename G::Traits::template Codim<0>::Entity& e, int i, int cc, IndexType& result) const
│ │ │ │ +
184 {
│ │ │ │ +
185 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,i,cc,result)))
│ │ │ │ +
186 return asImp().contains(e,i,cc,result);
│ │ │ │ +
187 }
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
191 template <class GridView>
│ │ │ │ +
│ │ │ │ +
192 void update (GridView&& gridView)
│ │ │ │ +
193 {
│ │ │ │ +
194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update(std::forward<GridView>(gridView))));
│ │ │ │ +
195 }
│ │ │ │ +
│ │ │ │
196
│ │ │ │ -
197 assert( levelTypeSizes_[codim][level][gtIndex( type )] >= 0 );
│ │ │ │ -
198 return levelTypeSizes_[codim][level][gtIndex( type )];
│ │ │ │ -
199 }
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201 //********************************************************************
│ │ │ │ -
202 // leaf sizes
│ │ │ │ -
203 //********************************************************************
│ │ │ │ -
│ │ │ │ -
205 int size (int codim) const
│ │ │ │ -
206 {
│ │ │ │ -
207 assert( codim >= 0 );
│ │ │ │ -
208 assert( codim < nCodim );
│ │ │ │ -
209 if( leafSizes_[codim] < 0 )
│ │ │ │ -
210 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLeafEntities< i >::apply( *this, codim ); } );
│ │ │ │ +
199 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8. Mappers have to implement update(gridView).")]]
│ │ │ │ +
│ │ │ │ +
200 void update ()
│ │ │ │ +
201 {
│ │ │ │ +
202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update()));
│ │ │ │ +
203 }
│ │ │ │ +
│ │ │ │ +
204
│ │ │ │ +
205 private:
│ │ │ │ +
207 MapperImp& asImp () {return static_cast<MapperImp &> (*this);}
│ │ │ │ +
209 const MapperImp& asImp () const {return static_cast<const MapperImp &>(*this);}
│ │ │ │ +
210 };
│ │ │ │ +
│ │ │ │
211
│ │ │ │ -
212 assert( leafSizes_[codim] >= 0 );
│ │ │ │ -
213 return leafSizes_[codim];
│ │ │ │ -
214 };
│ │ │ │ -
│ │ │ │ -
215
│ │ │ │ -
│ │ │ │ -
217 int size ( const GeometryType type ) const
│ │ │ │ -
218 {
│ │ │ │ -
219 int codim = GridType :: dimension - type.dim();
│ │ │ │ -
220 if( leafSizes_[codim] < 0 )
│ │ │ │ -
221 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CountLeafEntities< i >::apply( *this, codim ); } );
│ │ │ │ -
222
│ │ │ │ -
223 assert( leafTypeSizes_[codim][ gtIndex( type )] >= 0 );
│ │ │ │ -
224 return leafTypeSizes_[codim][ gtIndex( type )];
│ │ │ │ -
225 }
│ │ │ │ -
│ │ │ │ -
226
│ │ │ │ -
227 private:
│ │ │ │ -
228 template <PartitionIteratorType pitype, int codim>
│ │ │ │ -
229 void countLevelEntities(int level) const
│ │ │ │ -
230 {
│ │ │ │ -
231 typedef typename GridType :: LevelGridView GridView ;
│ │ │ │ -
232 typedef typename GridView :: template Codim< codim > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ -
233 GridView gridView = grid_.levelGridView( level );
│ │ │ │ -
234 Iterator it = gridView.template begin<codim,pitype> ();
│ │ │ │ -
235 Iterator end = gridView.template end<codim,pitype> ();
│ │ │ │ -
236 levelSizes_[codim][level] = countElements(it,end, levelTypeSizes_[codim][level]);
│ │ │ │ -
237 }
│ │ │ │ -
238
│ │ │ │ -
239 template <PartitionIteratorType pitype, int codim>
│ │ │ │ -
240 void countLeafEntities() const
│ │ │ │ -
241 {
│ │ │ │ -
242 // count All_Partition entities
│ │ │ │ -
243 typedef typename GridType :: LeafGridView GridView ;
│ │ │ │ -
244 typedef typename GridView :: template Codim< codim > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ -
245 GridView gridView = grid_.leafGridView();
│ │ │ │ -
246 Iterator it = gridView.template begin<codim,pitype> ();
│ │ │ │ -
247 Iterator end = gridView.template end<codim,pitype> ();
│ │ │ │ -
248 leafSizes_[codim] = countElements(it,end, leafTypeSizes_[codim] );
│ │ │ │ -
249 }
│ │ │ │ -
250
│ │ │ │ -
251 // counts entities with given type for given iterator
│ │ │ │ -
252 template <class IteratorType>
│ │ │ │ -
253 int countElements(IteratorType & it, const IteratorType & end, std::vector<int>& typeSizes) const
│ │ │ │ -
254 {
│ │ │ │ -
255 int overall = 0;
│ │ │ │ -
256 const size_t types = typeSizes.size();
│ │ │ │ -
257 for(size_t i=0; i<types; ++i) typeSizes[i] = 0;
│ │ │ │ -
258 for( ; it != end; ++it )
│ │ │ │ -
259 {
│ │ │ │ -
260 const GeometryType type = it->type();
│ │ │ │ -
261 ++typeSizes[ gtIndex( type ) ];
│ │ │ │ -
262 ++overall;
│ │ │ │ -
263 }
│ │ │ │ -
264
│ │ │ │ -
265#ifndef NDEBUG
│ │ │ │ -
266 int sumtypes = 0;
│ │ │ │ -
267 for(size_t i=0; i<types; ++i)
│ │ │ │ -
268 sumtypes += typeSizes[i];
│ │ │ │ -
269
│ │ │ │ -
270 assert( overall == sumtypes );
│ │ │ │ -
271#endif
│ │ │ │ -
272
│ │ │ │ -
273 return overall;
│ │ │ │ -
274 }
│ │ │ │ -
275
│ │ │ │ -
276 template <PartitionIteratorType pitype, int codim>
│ │ │ │ -
277 void countLevelEntitiesNoCodim(int level) const
│ │ │ │ -
278 {
│ │ │ │ -
279 typedef typename GridType :: LevelGridView GridView ;
│ │ │ │ -
280 typedef typename GridView :: template Codim< 0 > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ -
281 GridView gridView = grid_.levelGridView( level );
│ │ │ │ -
282 Iterator it = gridView.template begin< 0, pitype> ();
│ │ │ │ -
283 Iterator end = gridView.template end< 0, pitype> ();
│ │ │ │ -
284 levelSizes_[codim][level] = countElementsNoCodim< codim >(it,end, levelTypeSizes_[codim][level]);
│ │ │ │ -
285 }
│ │ │ │ -
286
│ │ │ │ -
287 template <PartitionIteratorType pitype, int codim>
│ │ │ │ -
288 void countLeafEntitiesNoCodim() const
│ │ │ │ -
289 {
│ │ │ │ -
290 // count All_Partition entities
│ │ │ │ -
291 typedef typename GridType :: LeafGridView GridView ;
│ │ │ │ -
292 typedef typename GridView :: template Codim< 0 > :: template Partition<pitype> :: Iterator Iterator ;
│ │ │ │ -
293 GridView gridView = grid_.leafGridView();
│ │ │ │ -
294 Iterator it = gridView.template begin< 0, pitype > ();
│ │ │ │ -
295 Iterator end = gridView.template end< 0, pitype > ();
│ │ │ │ -
296 leafSizes_[codim] = countElementsNoCodim< codim >(it,end, leafTypeSizes_[codim] );
│ │ │ │ -
297 }
│ │ │ │ -
298
│ │ │ │ -
299 // counts entities with given type for given iterator
│ │ │ │ -
300 template < int codim, class IteratorType >
│ │ │ │ -
301 int countElementsNoCodim(IteratorType & it, const IteratorType & end, std::vector<int>& typeSizes) const
│ │ │ │ -
302 {
│ │ │ │ -
303 typedef typename GridType :: LocalIdSet LocalIdSet ;
│ │ │ │ -
304 typedef typename LocalIdSet :: IdType IdType ;
│ │ │ │ -
305
│ │ │ │ -
306 typedef ReferenceElements< ctype, dim > ReferenceElementContainerType;
│ │ │ │ -
307 typedef typename ReferenceElementContainerType::ReferenceElement ReferenceElementType;
│ │ │ │ -
308
│ │ │ │ -
309 typedef std::set< IdType > CodimIdSetType ;
│ │ │ │ -
310
│ │ │ │ -
311 typedef typename IteratorType :: Entity ElementType ;
│ │ │ │ -
312
│ │ │ │ -
313 // get id set
│ │ │ │ -
314 const LocalIdSet& idSet = grid_.localIdSet();
│ │ │ │ -
315
│ │ │ │ -
316 const size_t types = typeSizes.size();
│ │ │ │ -
317 for(size_t i=0; i<types; ++i) typeSizes[ i ] = 0;
│ │ │ │ -
318
│ │ │ │ -
319 std::vector< CodimIdSetType > typeCount( types );
│ │ │ │ -
320
│ │ │ │ -
321 // count all elements of codimension codim
│ │ │ │ -
322 for( ; it != end; ++it )
│ │ │ │ -
323 {
│ │ │ │ -
324 // get entity
│ │ │ │ -
325 const ElementType& element = *it ;
│ │ │ │ -
326 // get reference element
│ │ │ │ -
327 ReferenceElementType refElem =
│ │ │ │ -
328 ReferenceElementContainerType :: general( element.type() );
│ │ │ │ -
329
│ │ │ │ -
330 // count all sub entities of codimension codim
│ │ │ │ -
331 const int count = element.subEntities( codim );
│ │ │ │ -
332 for( int i=0; i< count; ++ i )
│ │ │ │ -
333 {
│ │ │ │ -
334 // get geometry type
│ │ │ │ -
335 const GeometryType geomType = refElem.type( i, codim );
│ │ │ │ -
336 // get id of sub entity
│ │ │ │ -
337 const IdType id = idSet.subId( element, i, codim );
│ │ │ │ -
338 // insert id into set
│ │ │ │ -
339 typeCount[ gtIndex( geomType ) ].insert( id );
│ │ │ │ -
340 }
│ │ │ │ -
341 }
│ │ │ │ -
342
│ │ │ │ -
343 // accumulate numbers
│ │ │ │ -
344 int overall = 0;
│ │ │ │ -
345 for(size_t i=0; i<types; ++i)
│ │ │ │ -
346 {
│ │ │ │ -
347 typeSizes[ i ] = typeCount[ i ].size();
│ │ │ │ -
348 overall += typeSizes[ i ];
│ │ │ │ -
349 }
│ │ │ │ -
350
│ │ │ │ -
351 return overall;
│ │ │ │ -
352 }
│ │ │ │ -
353 };
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
355} // end namespace Dune
│ │ │ │ -
356#endif
│ │ │ │ - │ │ │ │ +
214#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ │ +
215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ │ +
216
│ │ │ │ +
217}
│ │ │ │ +
218#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
U_CHAR ElementType
Definition misc.hh:63
│ │ │ │ -
GeometryType
Type representing VTK's entity geometry types.
Definition common.hh:132
│ │ │ │
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ -
organizes the caching of sizes for one grid and one GeometryType
Definition sizecache.hh:33
│ │ │ │ -
int size(int level, GeometryType type) const
Return number of entities per level and geometry type in this process.
Definition sizecache.hh:191
│ │ │ │ -
int size(int level, int codim) const
Return number of grid entities of a given codim on a given level in this process.
Definition sizecache.hh:174
│ │ │ │ -
int size(int codim) const
Return number of leaf entities of a given codim in this process.
Definition sizecache.hh:205
│ │ │ │ -
SizeCache(const GridType &grid)
constructor taking grid reference
Definition sizecache.hh:142
│ │ │ │ -
int size(const GeometryType type) const
Return number of leaf entities per geometry type in this process.
Definition sizecache.hh:217
│ │ │ │ -
void reset()
reset all cached sizes
Definition sizecache.hh:148
│ │ │ │ -
A set of traits classes to store static information about grid implementation.
│ │ │ │ +
Mapper interface.
Definition mapper.hh:110
│ │ │ │ +
auto size() const
Return total number of entities in the entity set managed by the mapper.
Definition mapper.hh:152
│ │ │ │ +
void update(GridView &&gridView)
Reinitialize mapper after grid has been modified.
Definition mapper.hh:192
│ │ │ │ +
void update()
Reinitialize mapper after grid has been modified.
Definition mapper.hh:200
│ │ │ │ +
Index index(const EntityType &e) const
Map entity to array index.
Definition mapper.hh:122
│ │ │ │ +
IndexType Index
Number type used for indices.
Definition mapper.hh:114
│ │ │ │ +
Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity i of codim cc of a codim 0 entity to array index.
Definition mapper.hh:136
│ │ │ │ +
bool contains(const typename G::Traits::template Codim< 0 >::Entity &e, int i, int cc, IndexType &result) const
Returns true if the subentity is contained in the index set and at the same time the array index is r...
Definition mapper.hh:183
│ │ │ │ +
bool contains(const EntityType &e, IndexType &result) const
Returns true if the entity is contained in the index set and at the same time the array index is retu...
Definition mapper.hh:167
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,414 +1,140 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -sizecache.hh │ │ │ │ │ +mapper.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_SIZECACHE_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_SIZECACHE_HH │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ -18 │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -28namespace _D_u_n_e { │ │ │ │ │ -29 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 class _S_i_z_e_C_a_c_h_e │ │ │ │ │ -33 { │ │ │ │ │ -34 typedef _S_i_z_e_C_a_c_h_e_<_G_r_i_d_I_m_p_> _T_h_i_s_T_y_p_e; │ │ │ │ │ -36 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -37 │ │ │ │ │ -39 constexpr static int nCodim = GridImp::dimension + 1; │ │ │ │ │ -40 │ │ │ │ │ -41 // type of grid │ │ │ │ │ -42 typedef GridImp GridType; │ │ │ │ │ -43 │ │ │ │ │ -44 // coordinate type │ │ │ │ │ -45 typedef typename GridType :: ctype ctype ; │ │ │ │ │ -46 │ │ │ │ │ -47 // stores all sizes of the levels │ │ │ │ │ -48 mutable std::vector< int > levelSizes_[nCodim]; │ │ │ │ │ -49 │ │ │ │ │ -50 // stores all sizes of the levels │ │ │ │ │ -51 mutable std::vector< std::vector< int > > levelTypeSizes_[nCodim]; │ │ │ │ │ -52 │ │ │ │ │ -53 // stores all sizes of leafs │ │ │ │ │ -54 mutable int leafSizes_[nCodim]; │ │ │ │ │ -55 │ │ │ │ │ -56 // stores all sizes of leafs │ │ │ │ │ -57 mutable std::vector< int > leafTypeSizes_[nCodim]; │ │ │ │ │ -58 │ │ │ │ │ -59 // the grid │ │ │ │ │ -60 const GridType & grid_; │ │ │ │ │ -61 │ │ │ │ │ -62 // count elements of set by iterating the grid │ │ │ │ │ -63 template < int codim, bool gridHasCodim > │ │ │ │ │ -64 struct CountLevelEntitiesBase │ │ │ │ │ -65 { │ │ │ │ │ -66 template < class SzCacheType > │ │ │ │ │ -67 static void apply(const SzCacheType & sc, int level, int cd) │ │ │ │ │ -68 { │ │ │ │ │ -69 if( cd == codim ) │ │ │ │ │ -70 { │ │ │ │ │ -71 sc.template countLevelEntities (level); │ │ │ │ │ -72 } │ │ │ │ │ -73 } │ │ │ │ │ -74 }; │ │ │ │ │ -75 │ │ │ │ │ -76 template < int codim > │ │ │ │ │ -77 struct CountLevelEntitiesBase< codim, false > │ │ │ │ │ -78 { │ │ │ │ │ -79 template < class SzCacheType > │ │ │ │ │ -80 static void apply(const SzCacheType & sc, int level, int cd) │ │ │ │ │ -81 { │ │ │ │ │ -82 if( cd == codim ) │ │ │ │ │ -83 { │ │ │ │ │ -84 sc.template countLevelEntitiesNoCodim (level); │ │ │ │ │ -85 } │ │ │ │ │ -86 } │ │ │ │ │ -87 }; │ │ │ │ │ -88 │ │ │ │ │ -89 template < int codim > │ │ │ │ │ -90 struct CountLevelEntities │ │ │ │ │ -91 : public CountLevelEntitiesBase< codim, Capabilities :: hasEntity< GridType, │ │ │ │ │ -codim > :: v > │ │ │ │ │ -92 {}; │ │ │ │ │ -93 │ │ │ │ │ -94 // count elements of set by iterating the grid │ │ │ │ │ -95 template < int codim, bool gridHasCodim > │ │ │ │ │ -96 struct CountLeafEntitiesBase │ │ │ │ │ -97 { │ │ │ │ │ -98 template │ │ │ │ │ -99 static void apply(const SzCacheType & sc, int cd) │ │ │ │ │ -100 { │ │ │ │ │ -101 if( cd == codim ) │ │ │ │ │ -102 { │ │ │ │ │ -103 sc.template countLeafEntities (); │ │ │ │ │ -104 } │ │ │ │ │ -105 } │ │ │ │ │ -106 }; │ │ │ │ │ -107 │ │ │ │ │ -108 // count elements of set by iterating the grid │ │ │ │ │ -109 template < int codim > │ │ │ │ │ -110 struct CountLeafEntitiesBase< codim, false > │ │ │ │ │ -111 { │ │ │ │ │ -112 template │ │ │ │ │ -113 static void apply(const SzCacheType & sc, int cd) │ │ │ │ │ -114 { │ │ │ │ │ -115 if( cd == codim ) │ │ │ │ │ -116 { │ │ │ │ │ -117 sc.template countLeafEntitiesNoCodim (); │ │ │ │ │ -118 } │ │ │ │ │ -119 } │ │ │ │ │ -120 }; │ │ │ │ │ -121 │ │ │ │ │ -122 template < int codim > │ │ │ │ │ -123 struct CountLeafEntities │ │ │ │ │ -124 : public CountLeafEntitiesBase< codim, Capabilities :: hasEntity< GridType, │ │ │ │ │ -codim > :: v > │ │ │ │ │ -125 {}; │ │ │ │ │ -126 │ │ │ │ │ -127 int gtIndex( const GeometryType& type ) const │ │ │ │ │ -128 { │ │ │ │ │ -129 return type.id() >> 1 ; │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -132 int sizeCodim( const int codim ) const │ │ │ │ │ -133 { │ │ │ │ │ -134 const int mydim = GridType :: dimension - codim; │ │ │ │ │ -135 return ((1 << mydim) + 1) / 2; │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 // private copy constructor │ │ │ │ │ -139 _S_i_z_e_C_a_c_h_e (const _S_i_z_e_C_a_c_h_e & ); │ │ │ │ │ -140 public: │ │ │ │ │ -_1_4_2 _S_i_z_e_C_a_c_h_e (const GridType & grid) : grid_( grid ) │ │ │ │ │ -143 { │ │ │ │ │ -144 _r_e_s_e_t(); │ │ │ │ │ -145 } │ │ │ │ │ -146 │ │ │ │ │ -_1_4_8 void _r_e_s_e_t() │ │ │ │ │ -149 { │ │ │ │ │ -150 for(int codim=0; codim & vec = levelSizes_[codim]; │ │ │ │ │ -160 vec.resize(numMxl); │ │ │ │ │ -161 levelTypeSizes_[codim].resize( numMxl ); │ │ │ │ │ -162 for(int level = 0; level= 0 ); │ │ │ │ │ -177 assert( codim < nCodim ); │ │ │ │ │ -178 assert( level >= 0 ); │ │ │ │ │ -179 if( level >= (int) levelSizes_[codim]._s_i_z_e() ) return 0; │ │ │ │ │ -180 │ │ │ │ │ -181 if( levelSizes_[codim][level] < 0) │ │ │ │ │ -182 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CountLevelEntities< i >::apply( *this, level, codim ); } ); │ │ │ │ │ -183 │ │ │ │ │ -184 // CountLevelEntities::count │ │ │ │ │ -(*this,level,codim); │ │ │ │ │ -185 │ │ │ │ │ -186 assert( levelSizes_[codim][level] >= 0 ); │ │ │ │ │ -187 return levelSizes_[codim][level]; │ │ │ │ │ -188 } │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 int _s_i_z_e (int level, GeometryType type) const │ │ │ │ │ -192 { │ │ │ │ │ -193 int codim = GridType ::dimension - type.dim(); │ │ │ │ │ -194 if( levelSizes_[codim][level] < 0) │ │ │ │ │ -195 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CountLevelEntities< i >::apply( *this, level, codim ); } ); │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +89namespace _D_u_n_e │ │ │ │ │ +90{ │ │ │ │ │ +108 template │ │ │ │ │ +_1_0_9 class _M_a_p_p_e_r │ │ │ │ │ +110 { │ │ │ │ │ +111 public: │ │ │ │ │ +112 │ │ │ │ │ +_1_1_4 using _I_n_d_e_x = IndexType; │ │ │ │ │ +115 │ │ │ │ │ +121 template │ │ │ │ │ +_1_2_2 _I_n_d_e_x _i_n_d_e_x (const EntityType& e) const │ │ │ │ │ +123 { │ │ │ │ │ +124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e))); │ │ │ │ │ +125 return asImp().index(e); │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +128 │ │ │ │ │ +_1_3_6 _I_n_d_e_x _s_u_b_I_n_d_e_x (const typename G::Traits::template Codim<0>::Entity& e, │ │ │ │ │ +137 int i, │ │ │ │ │ +138 unsigned int codim) const │ │ │ │ │ +139 { │ │ │ │ │ +140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim))); │ │ │ │ │ +141 return asImp().subIndex(e,i,codim); │ │ │ │ │ +142 } │ │ │ │ │ +143 │ │ │ │ │ +_1_5_2 auto _s_i_z_e () const │ │ │ │ │ +153 { │ │ │ │ │ +154 CHECK_INTERFACE_IMPLEMENTATION((asImp()._s_i_z_e())); │ │ │ │ │ +155 return asImp().size(); │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +158 │ │ │ │ │ +166 template │ │ │ │ │ +_1_6_7 bool _c_o_n_t_a_i_n_s (const EntityType& e, IndexType& result) const │ │ │ │ │ +168 { │ │ │ │ │ +169 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(e,result ))); │ │ │ │ │ +170 return asImp().contains(e,result ); │ │ │ │ │ +171 } │ │ │ │ │ +172 │ │ │ │ │ +173 │ │ │ │ │ +_1_8_3 bool _c_o_n_t_a_i_n_s (const typename G::Traits::template Codim<0>::Entity& e, int │ │ │ │ │ +i, int cc, IndexType& result) const │ │ │ │ │ +184 { │ │ │ │ │ +185 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(e,i,cc,result))) │ │ │ │ │ +186 return asImp().contains(e,i,cc,result); │ │ │ │ │ +187 } │ │ │ │ │ +188 │ │ │ │ │ +191 template │ │ │ │ │ +_1_9_2 void _u_p_d_a_t_e (_G_r_i_d_V_i_e_w&& gridView) │ │ │ │ │ +193 { │ │ │ │ │ +194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._u_p_d_a_t_e(std:: │ │ │ │ │ +forward(gridView)))); │ │ │ │ │ +195 } │ │ │ │ │ 196 │ │ │ │ │ -197 assert( levelTypeSizes_[codim][level][gtIndex( type )] >= 0 ); │ │ │ │ │ -198 return levelTypeSizes_[codim][level][gtIndex( type )]; │ │ │ │ │ -199 } │ │ │ │ │ -200 │ │ │ │ │ -201 //******************************************************************** │ │ │ │ │ -202 // leaf sizes │ │ │ │ │ -203 //******************************************************************** │ │ │ │ │ -_2_0_5 int _s_i_z_e (int codim) const │ │ │ │ │ -206 { │ │ │ │ │ -207 assert( codim >= 0 ); │ │ │ │ │ -208 assert( codim < nCodim ); │ │ │ │ │ -209 if( leafSizes_[codim] < 0 ) │ │ │ │ │ -210 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CountLeafEntities< i >::apply( *this, codim ); } ); │ │ │ │ │ +199 [[deprecated("Use update(gridView) instead! Will be removed after release │ │ │ │ │ +2.8. Mappers have to implement update(gridView).")]] │ │ │ │ │ +_2_0_0 void _u_p_d_a_t_e () │ │ │ │ │ +201 { │ │ │ │ │ +202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._u_p_d_a_t_e())); │ │ │ │ │ +203 } │ │ │ │ │ +204 │ │ │ │ │ +205 private: │ │ │ │ │ +207 MapperImp& asImp () {return static_cast (*this);} │ │ │ │ │ +209 const MapperImp& asImp () const {return static_cast │ │ │ │ │ +(*this);} │ │ │ │ │ +210 }; │ │ │ │ │ 211 │ │ │ │ │ -212 assert( leafSizes_[codim] >= 0 ); │ │ │ │ │ -213 return leafSizes_[codim]; │ │ │ │ │ -214 }; │ │ │ │ │ -215 │ │ │ │ │ -_2_1_7 int _s_i_z_e ( const GeometryType type ) const │ │ │ │ │ -218 { │ │ │ │ │ -219 int codim = GridType :: dimension - type.dim(); │ │ │ │ │ -220 if( leafSizes_[codim] < 0 ) │ │ │ │ │ -221 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CountLeafEntities< i >::apply( *this, codim ); } ); │ │ │ │ │ -222 │ │ │ │ │ -223 assert( leafTypeSizes_[codim][ gtIndex( type )] >= 0 ); │ │ │ │ │ -224 return leafTypeSizes_[codim][ gtIndex( type )]; │ │ │ │ │ -225 } │ │ │ │ │ -226 │ │ │ │ │ -227 private: │ │ │ │ │ -228 template │ │ │ │ │ -229 void countLevelEntities(int level) const │ │ │ │ │ -230 { │ │ │ │ │ -231 typedef typename GridType :: LevelGridView _G_r_i_d_V_i_e_w ; │ │ │ │ │ -232 typedef typename GridView :: template Codim< codim > :: template │ │ │ │ │ -Partition :: Iterator Iterator ; │ │ │ │ │ -233 _G_r_i_d_V_i_e_w gridView = grid_.levelGridView( level ); │ │ │ │ │ -234 Iterator it = gridView.template begin (); │ │ │ │ │ -235 Iterator end = gridView.template end (); │ │ │ │ │ -236 levelSizes_[codim][level] = countElements(it,end, levelTypeSizes_[codim] │ │ │ │ │ -[level]); │ │ │ │ │ -237 } │ │ │ │ │ -238 │ │ │ │ │ -239 template │ │ │ │ │ -240 void countLeafEntities() const │ │ │ │ │ -241 { │ │ │ │ │ -242 // count All_Partition entities │ │ │ │ │ -243 typedef typename GridType :: LeafGridView GridView ; │ │ │ │ │ -244 typedef typename GridView :: template Codim< codim > :: template │ │ │ │ │ -Partition :: Iterator Iterator ; │ │ │ │ │ -245 GridView gridView = grid_.leafGridView(); │ │ │ │ │ -246 Iterator it = gridView.template begin (); │ │ │ │ │ -247 Iterator end = gridView.template end (); │ │ │ │ │ -248 leafSizes_[codim] = countElements(it,end, leafTypeSizes_[codim] ); │ │ │ │ │ -249 } │ │ │ │ │ -250 │ │ │ │ │ -251 // counts entities with given type for given iterator │ │ │ │ │ -252 template │ │ │ │ │ -253 int countElements(IteratorType & it, const IteratorType & end, std:: │ │ │ │ │ -vector& typeSizes) const │ │ │ │ │ -254 { │ │ │ │ │ -255 int overall = 0; │ │ │ │ │ -256 const size_t types = typeSizes.size(); │ │ │ │ │ -257 for(size_t i=0; itype(); │ │ │ │ │ -261 ++typeSizes[ gtIndex( type ) ]; │ │ │ │ │ -262 ++overall; │ │ │ │ │ -263 } │ │ │ │ │ -264 │ │ │ │ │ -265#ifndef NDEBUG │ │ │ │ │ -266 int sumtypes = 0; │ │ │ │ │ -267 for(size_t i=0; i │ │ │ │ │ -277 void countLevelEntitiesNoCodim(int level) const │ │ │ │ │ -278 { │ │ │ │ │ -279 typedef typename GridType :: LevelGridView GridView ; │ │ │ │ │ -280 typedef typename GridView :: template Codim< 0 > :: template │ │ │ │ │ -Partition :: Iterator Iterator ; │ │ │ │ │ -281 GridView gridView = grid_.levelGridView( level ); │ │ │ │ │ -282 Iterator it = gridView.template begin< 0, pitype> (); │ │ │ │ │ -283 Iterator end = gridView.template end< 0, pitype> (); │ │ │ │ │ -284 levelSizes_[codim][level] = countElementsNoCodim< codim >(it,end, │ │ │ │ │ -levelTypeSizes_[codim][level]); │ │ │ │ │ -285 } │ │ │ │ │ -286 │ │ │ │ │ -287 template │ │ │ │ │ -288 void countLeafEntitiesNoCodim() const │ │ │ │ │ -289 { │ │ │ │ │ -290 // count All_Partition entities │ │ │ │ │ -291 typedef typename GridType :: LeafGridView GridView ; │ │ │ │ │ -292 typedef typename GridView :: template Codim< 0 > :: template │ │ │ │ │ -Partition :: Iterator Iterator ; │ │ │ │ │ -293 GridView gridView = grid_.leafGridView(); │ │ │ │ │ -294 Iterator it = gridView.template begin< 0, pitype > (); │ │ │ │ │ -295 Iterator end = gridView.template end< 0, pitype > (); │ │ │ │ │ -296 leafSizes_[codim] = countElementsNoCodim< codim >(it,end, leafTypeSizes_ │ │ │ │ │ -[codim] ); │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -299 // counts entities with given type for given iterator │ │ │ │ │ -300 template < int codim, class IteratorType > │ │ │ │ │ -301 int countElementsNoCodim(IteratorType & it, const IteratorType & end, std:: │ │ │ │ │ -vector& typeSizes) const │ │ │ │ │ -302 { │ │ │ │ │ -303 typedef typename GridType :: LocalIdSet LocalIdSet ; │ │ │ │ │ -304 typedef typename LocalIdSet :: IdType IdType ; │ │ │ │ │ -305 │ │ │ │ │ -306 typedef ReferenceElements< ctype, dim > ReferenceElementContainerType; │ │ │ │ │ -307 typedef typename ReferenceElementContainerType::ReferenceElement │ │ │ │ │ -ReferenceElementType; │ │ │ │ │ -308 │ │ │ │ │ -309 typedef std::set< IdType > CodimIdSetType ; │ │ │ │ │ -310 │ │ │ │ │ -311 typedef typename IteratorType :: Entity _E_l_e_m_e_n_t_T_y_p_e ; │ │ │ │ │ -312 │ │ │ │ │ -313 // get id set │ │ │ │ │ -314 const LocalIdSet& idSet = grid_.localIdSet(); │ │ │ │ │ -315 │ │ │ │ │ -316 const size_t types = typeSizes.size(); │ │ │ │ │ -317 for(size_t i=0; i typeCount( types ); │ │ │ │ │ -320 │ │ │ │ │ -321 // count all elements of codimension codim │ │ │ │ │ -322 for( ; it != end; ++it ) │ │ │ │ │ -323 { │ │ │ │ │ -324 // get entity │ │ │ │ │ -325 const _E_l_e_m_e_n_t_T_y_p_e& element = *it ; │ │ │ │ │ -326 // get reference element │ │ │ │ │ -327 ReferenceElementType refElem = │ │ │ │ │ -328 ReferenceElementContainerType :: general( element.type() ); │ │ │ │ │ -329 │ │ │ │ │ -330 // count all sub entities of codimension codim │ │ │ │ │ -331 const int count = element.subEntities( codim ); │ │ │ │ │ -332 for( int i=0; i< count; ++ i ) │ │ │ │ │ -333 { │ │ │ │ │ -334 // get geometry type │ │ │ │ │ -335 const _G_e_o_m_e_t_r_y_T_y_p_e geomType = refElem.type( i, codim ); │ │ │ │ │ -336 // get id of sub entity │ │ │ │ │ -337 const IdType id = idSet.subId( element, i, codim ); │ │ │ │ │ -338 // insert id into set │ │ │ │ │ -339 typeCount[ gtIndex( geomType ) ].insert( id ); │ │ │ │ │ -340 } │ │ │ │ │ -341 } │ │ │ │ │ -342 │ │ │ │ │ -343 // accumulate numbers │ │ │ │ │ -344 int overall = 0; │ │ │ │ │ -345 for(size_t i=0; i::Entity &e, int i, │ │ │ │ │ +unsigned int codim) const │ │ │ │ │ +Map subentity i of codim cc of a codim 0 entity to array index. │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const typename G::Traits::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ +int cc, IndexType &result) const │ │ │ │ │ +Returns true if the subentity is contained in the index set and at the same │ │ │ │ │ +time the array index is r... │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:183 │ │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const EntityType &e, IndexType &result) const │ │ │ │ │ +Returns true if the entity is contained in the index set and at the same time │ │ │ │ │ +the array index is retu... │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:167 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Typedefs | │ │ │ │ Variables
│ │ │ │
partitionset.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/common/keywords.hh>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_COMMON_PARTITIONSET_HH
│ │ │ │
6#define DUNE_GRID_COMMON_PARTITIONSET_HH
│ │ │ │
7
│ │ │ │
8#include <dune/common/keywords.hh>
│ │ │ │
9#include <dune/common/typetraits.hh>
│ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │
12namespace Dune {
│ │ │ │
13
│ │ │ │
19 namespace {
│ │ │ │
20
│ │ │ │
21 // Simple TMP to deduce partition iterator type from set of partitions.
│ │ │ │
22 template<unsigned int partitions>
│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │
349
│ │ │ │
350 } // namespace Partitions
│ │ │ │ │ │ │ │
351
│ │ │ │
356} // namespace Dune
│ │ │ │
357
│ │ │ │
358#endif // DUNE_GRID_COMMON_PARTITIONSET_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ │
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ │ @@ -78,17 +78,17 @@ │ │ │ │ Namespaces │ │ │ │
cachedcoordfunction.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <cassert>
│ │ │ │ #include <memory>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ #include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::PartitionSet< partitions >
 A set of PartitionType values. More...
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html │ │ │ │ @@ -89,18 +89,18 @@ │ │ │ │
6#define DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
│ │ │ │
7
│ │ │ │
8#include <cassert>
│ │ │ │
9#include <memory>
│ │ │ │
10
│ │ │ │
11#include <dune/common/typetraits.hh>
│ │ │ │
12
│ │ │ │ - │ │ │ │ + │ │ │ │
14
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
22 // Internal Forward Declarations
│ │ │ │
23 // -----------------------------
│ │ │ │ @@ -305,16 +305,16 @@ │ │ │ │
197 coordFunctionCaller.evaluate( i, cache_( hostEntity, i ) );
│ │ │ │
198 }
│ │ │ │ │ │ │ │
199
│ │ │ │
200} // namespace Dune
│ │ │ │
201
│ │ │ │
202#endif // #ifndef DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Definition cachedcoordfunction.hh:99
│ │ │ │
void adapt()
Definition cachedcoordfunction.hh:122
│ │ │ │
CachedCoordFunction(const HostGrid &hostGrid, const CoordFunction &coordFunction=CoordFunction())
Definition cachedcoordfunction.hh:113
│ │ │ │
void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector &y) const
Definition cachedcoordfunction.hh:134
│ │ │ │
Base::ctype ctype
Definition cachedcoordfunction.hh:104
│ │ │ │
Base::RangeVector RangeVector
Definition cachedcoordfunction.hh:106
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: idset.hh File Reference │ │ │ │ +dune-grid: declaration.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,36 +70,26 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
idset.hh File Reference
│ │ │ │ +
declaration.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/indexidset.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::CoordCache< HostGrid, Coordinate >
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,16 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -idset.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +declaration.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_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_<_ _G_r_i_d_,_ _H_o_s_t_I_d_S_e_t_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ -  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: idset.hh Source File │ │ │ │ +dune-grid: declaration.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,132 +74,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
idset.hh
│ │ │ │ +
declaration.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ │ -
6#define DUNE_GEOGRID_IDSET_HH
│ │ │ │ +
5#ifndef DUNE_GEOGRID_DECLARATION_HH
│ │ │ │ +
6#define DUNE_GEOGRID_DECLARATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ -
12
│ │ │ │ -
13 namespace GeoGrid
│ │ │ │ -
14 {
│ │ │ │ +
8namespace Dune
│ │ │ │ +
9{
│ │ │ │ +
10
│ │ │ │ +
11 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ +
12 class GeometryGrid;
│ │ │ │ +
13
│ │ │ │ +
14} // namespace Dune
│ │ │ │
15
│ │ │ │ -
16 // IdSet
│ │ │ │ -
17 // -----
│ │ │ │ -
18
│ │ │ │ -
19 template< class Grid, class HostIdSet >
│ │ │ │ -
│ │ │ │ -
20 class IdSet
│ │ │ │ -
21 : public Dune::IdSet< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet::IdType >
│ │ │ │ -
22 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
25
│ │ │ │ -
26 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
29 typedef typename HostIdSet::IdType IdType;
│ │ │ │ -
30
│ │ │ │ -
31 using Base::subId;
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 : hostIdSet_( 0 )
│ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ -
37 explicit IdSet ( const HostIdSet &hostIdSet )
│ │ │ │ -
38 : hostIdSet_( &hostIdSet )
│ │ │ │ -
39 {}
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
41 IdSet ( const This &other )
│ │ │ │ -
42 : hostIdSet_( other.hostIdSet_ )
│ │ │ │ -
43 {}
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ -
45 const This &operator= ( const This &other )
│ │ │ │ -
46 {
│ │ │ │ -
47 hostIdSet_ = other.hostIdSet_;
│ │ │ │ -
48 return *this;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51 template< int codim >
│ │ │ │ -
│ │ │ │ -
52 IdType id ( const typename Traits::template Codim< codim >::Entity &entity ) const
│ │ │ │ -
53 {
│ │ │ │ -
54 return entity.impl().id( hostIdSet() );
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 template< class Entity >
│ │ │ │ -
│ │ │ │ -
58 IdType id ( const Entity &entity ) const
│ │ │ │ -
59 {
│ │ │ │ -
60 return id< Entity::codimension >( entity );
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ -
63 IdType subId ( const typename Traits::template Codim< 0 >::Entity &entity, int i, unsigned int codim ) const
│ │ │ │ -
64 {
│ │ │ │ -
65 return hostIdSet().subId( Grid::template getHostEntity< 0 >( entity ), i, codim );
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68 explicit operator bool () const { return bool( hostIdSet_ ); }
│ │ │ │ -
69
│ │ │ │ -
70 private:
│ │ │ │ -
71 const HostIdSet &hostIdSet () const
│ │ │ │ -
72 {
│ │ │ │ -
73 assert( *this );
│ │ │ │ -
74 return *hostIdSet_;
│ │ │ │ -
75 }
│ │ │ │ -
76
│ │ │ │ -
77 const HostIdSet *hostIdSet_;
│ │ │ │ -
78 };
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
80 } // namespace GeoGrid
│ │ │ │ -
81
│ │ │ │ -
82} // namespace Dune
│ │ │ │ -
83
│ │ │ │ -
84#endif // #ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ +
16#endif // #ifndef DUNE_GEOGRID_DECLARATION_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ -
IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
Definition indexidset.hh:486
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:694
│ │ │ │ -
Definition idset.hh:22
│ │ │ │ -
IdSet()
Definition idset.hh:33
│ │ │ │ -
IdSet(const HostIdSet &hostIdSet)
Definition idset.hh:37
│ │ │ │ -
IdType id(const Entity &entity) const
Definition idset.hh:58
│ │ │ │ -
IdType subId(const typename Traits::template Codim< 0 >::Entity &entity, int i, unsigned int codim) const
Definition idset.hh:63
│ │ │ │ -
IdType id(const typename Traits::template Codim< codim >::Entity &entity) const
Definition idset.hh:52
│ │ │ │ -
IdSet(const This &other)
Definition idset.hh:41
│ │ │ │ -
const This & operator=(const This &other)
Definition idset.hh:45
│ │ │ │ -
HostIdSet::IdType IdType
Definition idset.hh:29
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,146 +1,31 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -idset.hh │ │ │ │ │ +declaration.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ │ -6#define DUNE_GEOGRID_IDSET_HH │ │ │ │ │ +5#ifndef DUNE_GEOGRID_DECLARATION_HH │ │ │ │ │ +6#define DUNE_GEOGRID_DECLARATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -10namespace _D_u_n_e │ │ │ │ │ -11{ │ │ │ │ │ -12 │ │ │ │ │ -13 namespace GeoGrid │ │ │ │ │ -14 { │ │ │ │ │ +8namespace _D_u_n_e │ │ │ │ │ +9{ │ │ │ │ │ +10 │ │ │ │ │ +11 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ +12 class GeometryGrid; │ │ │ │ │ +13 │ │ │ │ │ +14} // namespace Dune │ │ │ │ │ 15 │ │ │ │ │ -16 // IdSet │ │ │ │ │ -17 // ----- │ │ │ │ │ -18 │ │ │ │ │ -19 template< class Grid, class HostIdSet > │ │ │ │ │ -_2_0 class _I_d_S_e_t │ │ │ │ │ -21 : public _D_u_n_e_:_:_I_d_S_e_t< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet:: │ │ │ │ │ -IdType > │ │ │ │ │ -22 { │ │ │ │ │ -23 typedef _I_d_S_e_t_<_ _G_r_i_d_,_ _H_o_s_t_I_d_S_e_t_ _> _T_h_i_s; │ │ │ │ │ -24 typedef _D_u_n_e_:_:_I_d_S_e_t_<_ _G_r_i_d_,_ _T_h_i_s_,_ _t_y_p_e_n_a_m_e_ _H_o_s_t_I_d_S_e_t_:_:_I_d_T_y_p_e_ _> _B_a_s_e; │ │ │ │ │ -25 │ │ │ │ │ -26 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ -27 │ │ │ │ │ -28 public: │ │ │ │ │ -_2_9 typedef typename HostIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ -30 │ │ │ │ │ -31 using _B_a_s_e_:_:_s_u_b_I_d; │ │ │ │ │ -32 │ │ │ │ │ -_3_3 _I_d_S_e_t () │ │ │ │ │ -34 : hostIdSet_( 0 ) │ │ │ │ │ -35 {} │ │ │ │ │ -36 │ │ │ │ │ -_3_7 explicit _I_d_S_e_t ( const HostIdSet &hostIdSet ) │ │ │ │ │ -38 : hostIdSet_( &hostIdSet ) │ │ │ │ │ -39 {} │ │ │ │ │ -40 │ │ │ │ │ -_4_1 _I_d_S_e_t ( const _T_h_i_s &other ) │ │ │ │ │ -42 : hostIdSet_( other.hostIdSet_ ) │ │ │ │ │ -43 {} │ │ │ │ │ -44 │ │ │ │ │ -_4_5 const _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -46 { │ │ │ │ │ -47 hostIdSet_ = other.hostIdSet_; │ │ │ │ │ -48 return *this; │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -51 template< int codim > │ │ │ │ │ -_5_2 _I_d_T_y_p_e _i_d ( const typename Traits::template Codim< codim >::Entity &entity ) │ │ │ │ │ -const │ │ │ │ │ -53 { │ │ │ │ │ -54 return entity.impl().id( hostIdSet() ); │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 template< class Entity > │ │ │ │ │ -_5_8 _I_d_T_y_p_e _i_d ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ -59 { │ │ │ │ │ -60 return id< Entity::codimension >( entity ); │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -_6_3 _I_d_T_y_p_e _s_u_b_I_d ( const typename Traits::template Codim< 0 >::Entity &entity, │ │ │ │ │ -int i, unsigned int codim ) const │ │ │ │ │ -64 { │ │ │ │ │ -65 return hostIdSet().subId( _G_r_i_d_:_:_t_e_m_p_l_a_t_e getHostEntity< 0 >( entity ), i, │ │ │ │ │ -codim ); │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 explicit operator bool () const { return bool( hostIdSet_ ); } │ │ │ │ │ -69 │ │ │ │ │ -70 private: │ │ │ │ │ -71 const HostIdSet &hostIdSet () const │ │ │ │ │ -72 { │ │ │ │ │ -73 assert( *this ); │ │ │ │ │ -74 return *hostIdSet_; │ │ │ │ │ -75 } │ │ │ │ │ -76 │ │ │ │ │ -77 const HostIdSet *hostIdSet_; │ │ │ │ │ -78 }; │ │ │ │ │ -79 │ │ │ │ │ -80 } // namespace GeoGrid │ │ │ │ │ -81 │ │ │ │ │ -82} // namespace Dune │ │ │ │ │ -83 │ │ │ │ │ -84#endif // #ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ │ -_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ -Provides base classes for index and id sets. │ │ │ │ │ +16#endif // #ifndef DUNE_GEOGRID_DECLARATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ -Id Set Interface. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ -IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) │ │ │ │ │ -const │ │ │ │ │ -Get id of subentity i of co-dimension codim of a co-dimension 0 entity. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:486 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_E_n_t_i_t_y │ │ │ │ │ -DUNE-conform implementation of the entity. │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/entity.hh:694 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_S_e_t │ │ │ │ │ -IdSet() │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_S_e_t │ │ │ │ │ -IdSet(const HostIdSet &hostIdSet) │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_i_d │ │ │ │ │ -IdType id(const Entity &entity) const │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ -IdType subId(const typename Traits::template Codim< 0 >::Entity &entity, int i, │ │ │ │ │ -unsigned int codim) const │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_i_d │ │ │ │ │ -IdType id(const typename Traits::template Codim< codim >::Entity &entity) const │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_S_e_t │ │ │ │ │ -IdSet(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -const This & operator=(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ -HostIdSet::IdType IdType │ │ │ │ │ -DDeeffiinniittiioonn idset.hh:29 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00581.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunction.hh File Reference │ │ │ │ +dune-grid: idset.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,36 +72,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
coordfunction.hh File Reference
│ │ │ │ +
idset.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ │ +
#include <dune/grid/common/indexidset.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >
 Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::AnalyticalCoordFunction and the evaluate method mapping $ R^d\to R^r $ has to be supplied. More...
 
class  Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl >
 Derive an implementation of an analytical coordinate function from this class. More...
 
class  Dune::DiscreteCoordFunctionInterface< ct, dimR, Impl >
 Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::DiscreteCoordinateFunction and the evaluate method taking an entity of the host grid together with the number of a vertex returns the coordinate in $ R^r $ of that corner. The user must ensure continuity of this mapping. In addition an adapt method is provided which is called whenever adapt() is called on the Dune::GeometryGrid. More...
 
class  Dune::DiscreteCoordFunction< ct, dimR, Impl >
 Derive an implementation of a discrete coordinate function from this class. More...
class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,42 +2,19 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -coordfunction.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +idset.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_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_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ - Interface class for using an analytical function to define the geometry │ │ │ │ │ -  of a _D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d. An implementation should be derived from │ │ │ │ │ - _D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n and the evaluate method mapping [$ R^d\to │ │ │ │ │ - R^r $]has to be supplied. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ -  Derive an implementation of an analytical coordinate function from this │ │ │ │ │ - class. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ - Interface class for using a discrete function to define the geometry of │ │ │ │ │ - a _D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d. An implementation should be derived from Dune:: │ │ │ │ │ - DiscreteCoordinateFunction and the evaluate method taking an entity of │ │ │ │ │ -  the host grid together with the number of a vertex returns the │ │ │ │ │ - coordinate in [$ R^r $]of that corner. The user must ensure continuity │ │ │ │ │ - of this mapping. In addition an adapt method is provided which is │ │ │ │ │ - called whenever _a_d_a_p_t_(_) is called on the _D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ -  Derive an implementation of a discrete coordinate function from this │ │ │ │ │ - class. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_<_ _G_r_i_d_,_ _H_o_s_t_I_d_S_e_t_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │   namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunction.hh Source File │ │ │ │ +dune-grid: idset.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,370 +74,132 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
coordfunction.hh
│ │ │ │ +
idset.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GEOGRID_COORDFUNCTION_HH
│ │ │ │ -
6#define DUNE_GEOGRID_COORDFUNCTION_HH
│ │ │ │ +
5#ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ │ +
6#define DUNE_GEOGRID_IDSET_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/std/type_traits.hh>
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
13 namespace GeoGrid
│ │ │ │ +
14 {
│ │ │ │
15
│ │ │ │ -
16 // Internal Forward Declarations
│ │ │ │ -
17 // -----------------------------
│ │ │ │ +
16 // IdSet
│ │ │ │ +
17 // -----
│ │ │ │
18
│ │ │ │ -
19 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ -
20 class AnalyticalCoordFunction;
│ │ │ │ -
21
│ │ │ │ -
22 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ -
23 class DiscreteCoordFunction;
│ │ │ │ -
24
│ │ │ │ +
19 template< class Grid, class HostIdSet >
│ │ │ │ +
│ │ │ │ +
20 class IdSet
│ │ │ │ +
21 : public Dune::IdSet< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet::IdType >
│ │ │ │ +
22 {
│ │ │ │ + │ │ │ │ + │ │ │ │
25
│ │ │ │ -
26
│ │ │ │ -
27 // AnalyticalCoordFunctionInterface
│ │ │ │ -
28 // --------------------------------
│ │ │ │ -
29
│ │ │ │ -
42 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
44 {
│ │ │ │ - │ │ │ │ -
46
│ │ │ │ -
47 friend class AnalyticalCoordFunction< ct, dimD, dimR, Impl >;
│ │ │ │ -
48
│ │ │ │ -
49 public:
│ │ │ │ -
50 typedef This Interface;
│ │ │ │ -
51 typedef Impl Implementation;
│ │ │ │ -
52
│ │ │ │ -
54 typedef ct ctype;
│ │ │ │ -
55
│ │ │ │ -
57 static const unsigned int dimDomain = dimD;
│ │ │ │ -
59 static const unsigned int dimRange = dimR;
│ │ │ │ -
60
│ │ │ │ -
62 typedef FieldVector< ctype, dimDomain > DomainVector;
│ │ │ │ -
64 typedef FieldVector< ctype, dimRange > RangeVector;
│ │ │ │ -
65
│ │ │ │ -
66 private:
│ │ │ │ - │ │ │ │ -
68 AnalyticalCoordFunctionInterface ( const This & ) = default;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
71 This &operator= ( const This & ) = default;
│ │ │ │ -
72 This &operator= ( This && ) = default;
│ │ │ │ -
73
│ │ │ │ -
74 // helper for picking the correct version of evaluate further down
│ │ │ │ -
75 template<typename F, typename DV>
│ │ │ │ -
76 using has_operator_parentheses = decltype(std::declval<F>()(std::declval<DV>()));
│ │ │ │ -
77
│ │ │ │ -
78 public:
│ │ │ │ +
26 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
29 typedef typename HostIdSet::IdType IdType;
│ │ │ │ +
30
│ │ │ │ +
31 using Base::subId;
│ │ │ │ +
32
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
34 : hostIdSet_( 0 )
│ │ │ │ +
35 {}
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ +
37 explicit IdSet ( const HostIdSet &hostIdSet )
│ │ │ │ +
38 : hostIdSet_( &hostIdSet )
│ │ │ │ +
39 {}
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
41 IdSet ( const This &other )
│ │ │ │ +
42 : hostIdSet_( other.hostIdSet_ )
│ │ │ │ +
43 {}
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
45 const This &operator= ( const This &other )
│ │ │ │ +
46 {
│ │ │ │ +
47 hostIdSet_ = other.hostIdSet_;
│ │ │ │ +
48 return *this;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51 template< int codim >
│ │ │ │ +
│ │ │ │ +
52 IdType id ( const typename Traits::template Codim< codim >::Entity &entity ) const
│ │ │ │ +
53 {
│ │ │ │ +
54 return entity.impl().id( hostIdSet() );
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57 template< class Entity >
│ │ │ │ +
│ │ │ │ +
58 IdType id ( const Entity &entity ) const
│ │ │ │ +
59 {
│ │ │ │ +
60 return id< Entity::codimension >( entity );
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ +
63 IdType subId ( const typename Traits::template Codim< 0 >::Entity &entity, int i, unsigned int codim ) const
│ │ │ │ +
64 {
│ │ │ │ +
65 return hostIdSet().subId( Grid::template getHostEntity< 0 >( entity ), i, codim );
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
68 explicit operator bool () const { return bool( hostIdSet_ ); }
│ │ │ │ +
69
│ │ │ │ +
70 private:
│ │ │ │ +
71 const HostIdSet &hostIdSet () const
│ │ │ │ +
72 {
│ │ │ │ +
73 assert( *this );
│ │ │ │ +
74 return *hostIdSet_;
│ │ │ │ +
75 }
│ │ │ │ +
76
│ │ │ │ +
77 const HostIdSet *hostIdSet_;
│ │ │ │ +
78 };
│ │ │ │ +
│ │ │ │
79
│ │ │ │ -
80#ifdef DOXYGEN
│ │ │ │ +
80 } // namespace GeoGrid
│ │ │ │
81
│ │ │ │ -
83 void evaluate ( const DomainVector &x, RangeVector &y ) const;
│ │ │ │ -
84
│ │ │ │ -
85#else
│ │ │ │ -
86
│ │ │ │ -
87 template<typename DV>
│ │ │ │ -
88 std::enable_if_t<
│ │ │ │ -
89 Std::is_detected<has_operator_parentheses,Impl,DV>::value
│ │ │ │ -
90 >
│ │ │ │ -
91 evaluate ( const DV &x, RangeVector &y ) const
│ │ │ │ -
92 {
│ │ │ │ -
93 y = asImp()(x);
│ │ │ │ -
94 }
│ │ │ │ -
95
│ │ │ │ -
96 template<typename DV>
│ │ │ │ -
97 std::enable_if_t<
│ │ │ │ -
98 not Std::is_detected<has_operator_parentheses,Impl,DV>::value
│ │ │ │ -
99 >
│ │ │ │ -
100 evaluate ( const DV &x, RangeVector &y ) const
│ │ │ │ -
101 {
│ │ │ │ -
102 assert(
│ │ │ │ -
103 static_cast<void(This::*)(const DomainVector&, RangeVector&) const>(&This::evaluate) !=
│ │ │ │ -
104 static_cast<void(Impl::*)(const DomainVector&, RangeVector&) const>(&Impl::evaluate) &&
│ │ │ │ -
105 "You need to implement either operator() or evaluate() in your coordinate function!");
│ │ │ │ -
106 asImp().evaluate( x, y );
│ │ │ │ -
107 }
│ │ │ │ -
108
│ │ │ │ -
109#endif // DOXYGEN
│ │ │ │ -
110
│ │ │ │ -
111 protected:
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ -
113 const Implementation &asImp () const
│ │ │ │ -
114 {
│ │ │ │ -
115 return static_cast< const Implementation & >( *this );
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
119 {
│ │ │ │ -
120 return static_cast< Implementation & >( *this );
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122 };
│ │ │ │ -
│ │ │ │ -
123
│ │ │ │ -
124
│ │ │ │ -
125
│ │ │ │ -
126 // AnalyticalCoordFunction
│ │ │ │ -
127 // -----------------------
│ │ │ │ -
131 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
133 : public AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >
│ │ │ │ -
134 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
137
│ │ │ │ -
138 public:
│ │ │ │ -
139 typedef typename Base :: DomainVector DomainVector;
│ │ │ │ -
140 typedef typename Base :: RangeVector RangeVector;
│ │ │ │ -
141
│ │ │ │ -
142 protected:
│ │ │ │ - │ │ │ │ -
144 AnalyticalCoordFunction ( const This & ) = default;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
147 This &operator= ( const This & ) = default;
│ │ │ │ -
148 This &operator= ( This && ) = default;
│ │ │ │ -
149
│ │ │ │ -
150 private:
│ │ │ │ -
151
│ │ │ │ -
152 };
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
154
│ │ │ │ -
155
│ │ │ │ -
156 // DiscreteCoordFunctionInterface
│ │ │ │ -
157 // ------------------------------
│ │ │ │ -
158
│ │ │ │ -
173 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
175 {
│ │ │ │ - │ │ │ │ -
177
│ │ │ │ -
178 friend class DiscreteCoordFunction< ct, dimR, Impl >;
│ │ │ │ -
179
│ │ │ │ -
180 public:
│ │ │ │ - │ │ │ │ -
182 typedef Impl Implementation;
│ │ │ │ -
183
│ │ │ │ -
185 typedef ct ctype;
│ │ │ │ -
186
│ │ │ │ -
188 static const unsigned int dimRange = dimR;
│ │ │ │ -
189
│ │ │ │ -
191 typedef FieldVector< ctype, dimRange > RangeVector;
│ │ │ │ -
192
│ │ │ │ -
193 private:
│ │ │ │ - │ │ │ │ -
195 DiscreteCoordFunctionInterface ( const This & ) = default;
│ │ │ │ -
196 DiscreteCoordFunctionInterface ( This && ) = default;
│ │ │ │ - │ │ │ │ -
198 This &operator= ( const This & ) = default;
│ │ │ │ -
199 This &operator= ( This && ) = default;
│ │ │ │ -
200
│ │ │ │ -
201 public:
│ │ │ │ -
210 template< class HostEntity >
│ │ │ │ -
│ │ │ │ -
211 void evaluate ( const HostEntity &hostEntity, unsigned int corner,
│ │ │ │ -
212 RangeVector &y ) const
│ │ │ │ -
213 {
│ │ │ │ -
214 asImp().evaluate( hostEntity, corner, y );
│ │ │ │ -
215 }
│ │ │ │ -
│ │ │ │ -
216
│ │ │ │ -
│ │ │ │ -
220 void adapt ()
│ │ │ │ -
221 {
│ │ │ │ -
222 asImp().adapt();
│ │ │ │ -
223 }
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
225 protected:
│ │ │ │ -
│ │ │ │ -
226 const Implementation &asImp () const
│ │ │ │ -
227 {
│ │ │ │ -
228 return static_cast< const Implementation & >( *this );
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
232 {
│ │ │ │ -
233 return static_cast< Implementation & >( *this );
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ -
235 };
│ │ │ │ -
│ │ │ │ -
236
│ │ │ │ -
237
│ │ │ │ -
238
│ │ │ │ -
239 // DiscreteCoordFunction
│ │ │ │ -
240 // ---------------------
│ │ │ │ -
241 //
│ │ │ │ -
245 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
247 : public DiscreteCoordFunctionInterface< ct, dimR, Impl >
│ │ │ │ -
248 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
251
│ │ │ │ -
252 public:
│ │ │ │ -
253 typedef typename Base :: RangeVector RangeVector;
│ │ │ │ -
254
│ │ │ │ -
255 protected:
│ │ │ │ - │ │ │ │ -
257 DiscreteCoordFunction ( const This & ) = default;
│ │ │ │ -
258 DiscreteCoordFunction ( This && ) = default;
│ │ │ │ - │ │ │ │ -
260 This &operator= ( const This & ) = default;
│ │ │ │ -
261 This &operator= ( This && ) = default;
│ │ │ │ -
262
│ │ │ │ -
│ │ │ │ -
263 void adapt ()
│ │ │ │ -
264 {}
│ │ │ │ -
│ │ │ │ -
265
│ │ │ │ -
266 private:
│ │ │ │ -
267 template< class HostEntity >
│ │ │ │ -
268 void evaluate ( const HostEntity &hostEntity, unsigned int corner,
│ │ │ │ -
269 RangeVector &y ) const;
│ │ │ │ -
270 };
│ │ │ │ -
│ │ │ │ -
271
│ │ │ │ -
272
│ │ │ │ -
273
│ │ │ │ -
274 namespace GeoGrid
│ │ │ │ -
275 {
│ │ │ │ -
276
│ │ │ │ -
277 // isCoordFunctionInterface
│ │ │ │ -
278 // ------------------------
│ │ │ │ -
279
│ │ │ │ -
280 template< class CoordFunctionInterface >
│ │ │ │ -
281 struct isCoordFunctionInterface
│ │ │ │ -
282 {
│ │ │ │ -
283 static const bool value = false;
│ │ │ │ -
284 };
│ │ │ │ -
285
│ │ │ │ -
286 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ -
287 struct isCoordFunctionInterface
│ │ │ │ -
288 < AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
│ │ │ │ -
289 {
│ │ │ │ -
290 static const bool value = true;
│ │ │ │ -
291 };
│ │ │ │ -
292
│ │ │ │ -
293 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ -
294 struct isCoordFunctionInterface
│ │ │ │ -
295 < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ -
296 {
│ │ │ │ -
297 static const bool value = true;
│ │ │ │ -
298 };
│ │ │ │ -
299
│ │ │ │ -
300
│ │ │ │ -
301
│ │ │ │ -
302 // isDiscreteCoordFunctionInterface
│ │ │ │ -
303 // --------------------------------
│ │ │ │ -
304
│ │ │ │ -
305 template< class CoordFunctionInterface >
│ │ │ │ -
306 struct isDiscreteCoordFunctionInterface
│ │ │ │ -
307 {
│ │ │ │ -
308 static const bool value = false;
│ │ │ │ -
309 };
│ │ │ │ -
310
│ │ │ │ -
311 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ -
312 struct isDiscreteCoordFunctionInterface
│ │ │ │ -
313 < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ -
314 {
│ │ │ │ -
315 static const bool value = true;
│ │ │ │ -
316 };
│ │ │ │ -
317
│ │ │ │ -
318
│ │ │ │ -
319
│ │ │ │ -
320 // AdaptCoordFunction
│ │ │ │ -
321 // ------------------
│ │ │ │ -
322
│ │ │ │ -
323 template< class CoordFunctionInterface >
│ │ │ │ -
324 struct AdaptCoordFunction
│ │ │ │ -
325 {
│ │ │ │ -
326 static void adapt ( CoordFunctionInterface & )
│ │ │ │ -
327 {}
│ │ │ │ -
328 };
│ │ │ │ -
329
│ │ │ │ -
330 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ -
331 struct AdaptCoordFunction< DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ -
332 {
│ │ │ │ -
333 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
│ │ │ │ -
334
│ │ │ │ -
335 static void adapt ( CoordFunctionInterface &coordFunction )
│ │ │ │ -
336 {
│ │ │ │ -
337 coordFunction.adapt();
│ │ │ │ -
338 }
│ │ │ │ -
339 };
│ │ │ │ -
340
│ │ │ │ -
341 } // namespace GeoGrid
│ │ │ │ -
342
│ │ │ │ -
343} // namespace Dune
│ │ │ │ -
344
│ │ │ │ -
345#endif // #ifndef DUNE_GEOGRID_COORDFUNCTION_HH
│ │ │ │ +
82} // namespace Dune
│ │ │ │ +
83
│ │ │ │ +
84#endif // #ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Derive an implementation of an analytical coordinate function from this class.
Definition coordfunction.hh:134
│ │ │ │ -
Base::DomainVector DomainVector
Definition coordfunction.hh:139
│ │ │ │ - │ │ │ │ - │ │ │ │ -
AnalyticalCoordFunction(This &&)=default
│ │ │ │ -
Base::RangeVector RangeVector
Definition coordfunction.hh:140
│ │ │ │ -
This & operator=(const This &)=default
│ │ │ │ -
AnalyticalCoordFunction(const This &)=default
│ │ │ │ -
Derive an implementation of a discrete coordinate function from this class.
Definition coordfunction.hh:248
│ │ │ │ -
This & operator=(const This &)=default
│ │ │ │ -
void adapt()
Definition coordfunction.hh:263
│ │ │ │ - │ │ │ │ -
DiscreteCoordFunction(This &&)=default
│ │ │ │ - │ │ │ │ -
DiscreteCoordFunction(const This &)=default
│ │ │ │ -
Base::RangeVector RangeVector
Definition coordfunction.hh:253
│ │ │ │ -
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
Definition coordfunction.hh:44
│ │ │ │ -
Impl Implementation
Definition coordfunction.hh:51
│ │ │ │ -
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition coordfunction.hh:64
│ │ │ │ -
void evaluate(const DomainVector &x, RangeVector &y) const
evaluate method for global mapping
│ │ │ │ -
static const unsigned int dimRange
dimension of the range vector
Definition coordfunction.hh:59
│ │ │ │ -
ct ctype
field type of the coordinate vector
Definition coordfunction.hh:54
│ │ │ │ -
static const unsigned int dimDomain
dimension of the range vector (dimensionworld of host grid)
Definition coordfunction.hh:57
│ │ │ │ -
const Implementation & asImp() const
Definition coordfunction.hh:113
│ │ │ │ -
This Interface
Definition coordfunction.hh:50
│ │ │ │ -
Implementation & asImp()
Definition coordfunction.hh:118
│ │ │ │ -
FieldVector< ctype, dimDomain > DomainVector
domain vector for the evaluate method
Definition coordfunction.hh:62
│ │ │ │ -
Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid....
Definition coordfunction.hh:175
│ │ │ │ -
static const unsigned int dimRange
dimension of the range vector
Definition coordfunction.hh:188
│ │ │ │ -
void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector &y) const
evaluate method
Definition coordfunction.hh:211
│ │ │ │ -
Implementation & asImp()
Definition coordfunction.hh:231
│ │ │ │ -
ct ctype
field type of the coordinate vector
Definition coordfunction.hh:185
│ │ │ │ -
void adapt()
method called from grid.adapt() method to allow adaptation of the discrete coordinate function
Definition coordfunction.hh:220
│ │ │ │ -
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition coordfunction.hh:191
│ │ │ │ -
const Implementation & asImp() const
Definition coordfunction.hh:226
│ │ │ │ -
Impl Implementation
Definition coordfunction.hh:182
│ │ │ │ -
This Interface
Definition coordfunction.hh:181
│ │ │ │ +
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ +
IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
Definition indexidset.hh:486
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:694
│ │ │ │ +
Definition idset.hh:22
│ │ │ │ +
IdSet()
Definition idset.hh:33
│ │ │ │ +
IdSet(const HostIdSet &hostIdSet)
Definition idset.hh:37
│ │ │ │ +
IdType id(const Entity &entity) const
Definition idset.hh:58
│ │ │ │ +
IdType subId(const typename Traits::template Codim< 0 >::Entity &entity, int i, unsigned int codim) const
Definition idset.hh:63
│ │ │ │ +
IdType id(const typename Traits::template Codim< codim >::Entity &entity) const
Definition idset.hh:52
│ │ │ │ +
IdSet(const This &other)
Definition idset.hh:41
│ │ │ │ +
const This & operator=(const This &other)
Definition idset.hh:45
│ │ │ │ +
HostIdSet::IdType IdType
Definition idset.hh:29
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,429 +1,146 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -coordfunction.hh │ │ │ │ │ +idset.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GEOGRID_COORDFUNCTION_HH │ │ │ │ │ -6#define DUNE_GEOGRID_COORDFUNCTION_HH │ │ │ │ │ +5#ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ │ +6#define DUNE_GEOGRID_IDSET_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ 12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +13 namespace GeoGrid │ │ │ │ │ +14 { │ │ │ │ │ 15 │ │ │ │ │ -16 // Internal Forward Declarations │ │ │ │ │ -17 // ----------------------------- │ │ │ │ │ +16 // IdSet │ │ │ │ │ +17 // ----- │ │ │ │ │ 18 │ │ │ │ │ -19 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ -20 class AnalyticalCoordFunction; │ │ │ │ │ -21 │ │ │ │ │ -22 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ -23 class DiscreteCoordFunction; │ │ │ │ │ -24 │ │ │ │ │ +19 template< class Grid, class HostIdSet > │ │ │ │ │ +_2_0 class _I_d_S_e_t │ │ │ │ │ +21 : public _D_u_n_e_:_:_I_d_S_e_t< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet:: │ │ │ │ │ +IdType > │ │ │ │ │ +22 { │ │ │ │ │ +23 typedef _I_d_S_e_t_<_ _G_r_i_d_,_ _H_o_s_t_I_d_S_e_t_ _> _T_h_i_s; │ │ │ │ │ +24 typedef _D_u_n_e_:_:_I_d_S_e_t_<_ _G_r_i_d_,_ _T_h_i_s_,_ _t_y_p_e_n_a_m_e_ _H_o_s_t_I_d_S_e_t_:_:_I_d_T_y_p_e_ _> _B_a_s_e; │ │ │ │ │ 25 │ │ │ │ │ -26 │ │ │ │ │ -27 // AnalyticalCoordFunctionInterface │ │ │ │ │ -28 // -------------------------------- │ │ │ │ │ -29 │ │ │ │ │ -42 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ -_4_3 class _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ -44 { │ │ │ │ │ -45 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ -46 │ │ │ │ │ -47 friend class _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n< ct, dimD, dimR, Impl >; │ │ │ │ │ -48 │ │ │ │ │ -49 public: │ │ │ │ │ -_5_0 typedef _T_h_i_s _I_n_t_e_r_f_a_c_e; │ │ │ │ │ -_5_1 typedef Impl _I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ │ -52 │ │ │ │ │ -_5_4 typedef ct _c_t_y_p_e; │ │ │ │ │ -55 │ │ │ │ │ -_5_7 static const unsigned int _d_i_m_D_o_m_a_i_n = dimD; │ │ │ │ │ -_5_9 static const unsigned int _d_i_m_R_a_n_g_e = dimR; │ │ │ │ │ -60 │ │ │ │ │ -_6_2 typedef FieldVector< ctype, dimDomain > _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -_6_4 typedef FieldVector< ctype, dimRange > _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ -65 │ │ │ │ │ -66 private: │ │ │ │ │ -67 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ -68 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( const _T_h_i_s & ) = default; │ │ │ │ │ -69 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( _T_h_i_s && ) = default; │ │ │ │ │ -70 _~_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ -71 _T_h_i_s &operator= ( const _T_h_i_s & ) = default; │ │ │ │ │ -72 _T_h_i_s &operator= ( _T_h_i_s && ) = default; │ │ │ │ │ -73 │ │ │ │ │ -74 // helper for picking the correct version of evaluate further down │ │ │ │ │ -75 template │ │ │ │ │ -76 using has_operator_parentheses = decltype(std::declval()(std::declval │ │ │ │ │ -())); │ │ │ │ │ -77 │ │ │ │ │ -78 public: │ │ │ │ │ +26 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +_2_9 typedef typename HostIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ +30 │ │ │ │ │ +31 using _B_a_s_e_:_:_s_u_b_I_d; │ │ │ │ │ +32 │ │ │ │ │ +_3_3 _I_d_S_e_t () │ │ │ │ │ +34 : hostIdSet_( 0 ) │ │ │ │ │ +35 {} │ │ │ │ │ +36 │ │ │ │ │ +_3_7 explicit _I_d_S_e_t ( const HostIdSet &hostIdSet ) │ │ │ │ │ +38 : hostIdSet_( &hostIdSet ) │ │ │ │ │ +39 {} │ │ │ │ │ +40 │ │ │ │ │ +_4_1 _I_d_S_e_t ( const _T_h_i_s &other ) │ │ │ │ │ +42 : hostIdSet_( other.hostIdSet_ ) │ │ │ │ │ +43 {} │ │ │ │ │ +44 │ │ │ │ │ +_4_5 const _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +46 { │ │ │ │ │ +47 hostIdSet_ = other.hostIdSet_; │ │ │ │ │ +48 return *this; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +51 template< int codim > │ │ │ │ │ +_5_2 _I_d_T_y_p_e _i_d ( const typename Traits::template Codim< codim >::Entity &entity ) │ │ │ │ │ +const │ │ │ │ │ +53 { │ │ │ │ │ +54 return entity.impl().id( hostIdSet() ); │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +57 template< class Entity > │ │ │ │ │ +_5_8 _I_d_T_y_p_e _i_d ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ +59 { │ │ │ │ │ +60 return id< Entity::codimension >( entity ); │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +_6_3 _I_d_T_y_p_e _s_u_b_I_d ( const typename Traits::template Codim< 0 >::Entity &entity, │ │ │ │ │ +int i, unsigned int codim ) const │ │ │ │ │ +64 { │ │ │ │ │ +65 return hostIdSet().subId( _G_r_i_d_:_:_t_e_m_p_l_a_t_e getHostEntity< 0 >( entity ), i, │ │ │ │ │ +codim ); │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 explicit operator bool () const { return bool( hostIdSet_ ); } │ │ │ │ │ +69 │ │ │ │ │ +70 private: │ │ │ │ │ +71 const HostIdSet &hostIdSet () const │ │ │ │ │ +72 { │ │ │ │ │ +73 assert( *this ); │ │ │ │ │ +74 return *hostIdSet_; │ │ │ │ │ +75 } │ │ │ │ │ +76 │ │ │ │ │ +77 const HostIdSet *hostIdSet_; │ │ │ │ │ +78 }; │ │ │ │ │ 79 │ │ │ │ │ -80#ifdef DOXYGEN │ │ │ │ │ +80 } // namespace GeoGrid │ │ │ │ │ 81 │ │ │ │ │ -_8_3 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const; │ │ │ │ │ -84 │ │ │ │ │ -85#else │ │ │ │ │ -86 │ │ │ │ │ -87 template │ │ │ │ │ -88 std::enable_if_t< │ │ │ │ │ -89 Std::is_detected::value │ │ │ │ │ -90 > │ │ │ │ │ -91 _e_v_a_l_u_a_t_e ( const DV &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ -92 { │ │ │ │ │ -93 y = _a_s_I_m_p()(x); │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -96 template │ │ │ │ │ -97 std::enable_if_t< │ │ │ │ │ -98 not Std::is_detected::value │ │ │ │ │ -99 > │ │ │ │ │ -100 _e_v_a_l_u_a_t_e ( const DV &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ -101 { │ │ │ │ │ -102 assert( │ │ │ │ │ -103 static_cast(&_T_h_i_s_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e) != │ │ │ │ │ -104 static_cast(&Impl:: │ │ │ │ │ -evaluate) && │ │ │ │ │ -105 "You need to implement either operator() or evaluate() in your coordinate │ │ │ │ │ -function!"); │ │ │ │ │ -106 _a_s_I_m_p().evaluate( x, y ); │ │ │ │ │ -107 } │ │ │ │ │ -108 │ │ │ │ │ -109#endif // DOXYGEN │ │ │ │ │ -110 │ │ │ │ │ -111 protected: │ │ │ │ │ -112 │ │ │ │ │ -_1_1_3 const _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () const │ │ │ │ │ -114 { │ │ │ │ │ -115 return static_cast< const _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_1_8 _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () │ │ │ │ │ -119 { │ │ │ │ │ -120 return static_cast< _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ -121 } │ │ │ │ │ -122 }; │ │ │ │ │ -123 │ │ │ │ │ -124 │ │ │ │ │ -125 │ │ │ │ │ -126 // AnalyticalCoordFunction │ │ │ │ │ -127 // ----------------------- │ │ │ │ │ -131 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ -_1_3_2 class _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -133 : public _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e< ct, dimD, dimR, Impl > │ │ │ │ │ -134 { │ │ │ │ │ -135 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ -136 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> _B_a_s_e; │ │ │ │ │ -137 │ │ │ │ │ -138 public: │ │ │ │ │ -_1_3_9 typedef typename Base :: DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -_1_4_0 typedef typename Base :: RangeVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ -141 │ │ │ │ │ -142 protected: │ │ │ │ │ -_1_4_3 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ -_1_4_4 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n ( const _T_h_i_s & ) = default; │ │ │ │ │ -_1_4_5 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n ( _T_h_i_s && ) = default; │ │ │ │ │ -_1_4_6 _~_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ -_1_4_7 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = default; │ │ │ │ │ -_1_4_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( _T_h_i_s && ) = default; │ │ │ │ │ -149 │ │ │ │ │ -150 private: │ │ │ │ │ -151 │ │ │ │ │ -152 }; │ │ │ │ │ -153 │ │ │ │ │ -154 │ │ │ │ │ -155 │ │ │ │ │ -156 // DiscreteCoordFunctionInterface │ │ │ │ │ -157 // ------------------------------ │ │ │ │ │ -158 │ │ │ │ │ -173 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ -_1_7_4 class _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ -175 { │ │ │ │ │ -176 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ -177 │ │ │ │ │ -178 friend class _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n< ct, dimR, Impl >; │ │ │ │ │ -179 │ │ │ │ │ -180 public: │ │ │ │ │ -_1_8_1 typedef _T_h_i_s _I_n_t_e_r_f_a_c_e; │ │ │ │ │ -_1_8_2 typedef Impl _I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ │ -183 │ │ │ │ │ -_1_8_5 typedef ct _c_t_y_p_e; │ │ │ │ │ -186 │ │ │ │ │ -_1_8_8 static const unsigned int _d_i_m_R_a_n_g_e = dimR; │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 typedef FieldVector< ctype, dimRange > _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ -192 │ │ │ │ │ -193 private: │ │ │ │ │ -194 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ -195 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( const _T_h_i_s & ) = default; │ │ │ │ │ -196 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( _T_h_i_s && ) = default; │ │ │ │ │ -197 _~_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ -198 _T_h_i_s &operator= ( const _T_h_i_s & ) = default; │ │ │ │ │ -199 _T_h_i_s &operator= ( _T_h_i_s && ) = default; │ │ │ │ │ -200 │ │ │ │ │ -201 public: │ │ │ │ │ -210 template< class HostEntity > │ │ │ │ │ -_2_1_1 void _e_v_a_l_u_a_t_e ( const HostEntity &hostEntity, unsigned int corner, │ │ │ │ │ -212 _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ -213 { │ │ │ │ │ -214 _a_s_I_m_p().evaluate( hostEntity, corner, y ); │ │ │ │ │ -215 } │ │ │ │ │ -216 │ │ │ │ │ -_2_2_0 void _a_d_a_p_t () │ │ │ │ │ -221 { │ │ │ │ │ -222 _a_s_I_m_p().adapt(); │ │ │ │ │ -223 } │ │ │ │ │ -224 │ │ │ │ │ -225 protected: │ │ │ │ │ -_2_2_6 const _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () const │ │ │ │ │ -227 { │ │ │ │ │ -228 return static_cast< const _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ -229 } │ │ │ │ │ -230 │ │ │ │ │ -_2_3_1 _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () │ │ │ │ │ -232 { │ │ │ │ │ -233 return static_cast< _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ -234 } │ │ │ │ │ -235 }; │ │ │ │ │ -236 │ │ │ │ │ -237 │ │ │ │ │ -238 │ │ │ │ │ -239 // DiscreteCoordFunction │ │ │ │ │ -240 // --------------------- │ │ │ │ │ -241 // │ │ │ │ │ -245 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ -_2_4_6 class _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -247 : public _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e< ct, dimR, Impl > │ │ │ │ │ -248 { │ │ │ │ │ -249 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ -250 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> _B_a_s_e; │ │ │ │ │ -251 │ │ │ │ │ -252 public: │ │ │ │ │ -_2_5_3 typedef typename Base :: RangeVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ -254 │ │ │ │ │ -255 protected: │ │ │ │ │ -_2_5_6 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ -_2_5_7 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n ( const _T_h_i_s & ) = default; │ │ │ │ │ -_2_5_8 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n ( _T_h_i_s && ) = default; │ │ │ │ │ -_2_5_9 _~_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ -_2_6_0 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = default; │ │ │ │ │ -_2_6_1 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( _T_h_i_s && ) = default; │ │ │ │ │ -262 │ │ │ │ │ -_2_6_3 void _a_d_a_p_t () │ │ │ │ │ -264 {} │ │ │ │ │ -265 │ │ │ │ │ -266 private: │ │ │ │ │ -267 template< class HostEntity > │ │ │ │ │ -268 void evaluate ( const HostEntity &hostEntity, unsigned int corner, │ │ │ │ │ -269 _R_a_n_g_e_V_e_c_t_o_r &y ) const; │ │ │ │ │ -270 }; │ │ │ │ │ -271 │ │ │ │ │ -272 │ │ │ │ │ -273 │ │ │ │ │ -274 namespace GeoGrid │ │ │ │ │ -275 { │ │ │ │ │ -276 │ │ │ │ │ -277 // isCoordFunctionInterface │ │ │ │ │ -278 // ------------------------ │ │ │ │ │ -279 │ │ │ │ │ -280 template< class CoordFunctionInterface > │ │ │ │ │ -281 struct isCoordFunctionInterface │ │ │ │ │ -282 { │ │ │ │ │ -283 static const bool value = false; │ │ │ │ │ -284 }; │ │ │ │ │ -285 │ │ │ │ │ -286 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ -287 struct isCoordFunctionInterface │ │ │ │ │ -288 < AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > > │ │ │ │ │ -289 { │ │ │ │ │ -290 static const bool value = true; │ │ │ │ │ -291 }; │ │ │ │ │ -292 │ │ │ │ │ -293 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ -294 struct isCoordFunctionInterface │ │ │ │ │ -295 < DiscreteCoordFunctionInterface< ct, dimR, Impl > > │ │ │ │ │ -296 { │ │ │ │ │ -297 static const bool value = true; │ │ │ │ │ -298 }; │ │ │ │ │ -299 │ │ │ │ │ -300 │ │ │ │ │ -301 │ │ │ │ │ -302 // isDiscreteCoordFunctionInterface │ │ │ │ │ -303 // -------------------------------- │ │ │ │ │ -304 │ │ │ │ │ -305 template< class CoordFunctionInterface > │ │ │ │ │ -306 struct isDiscreteCoordFunctionInterface │ │ │ │ │ -307 { │ │ │ │ │ -308 static const bool value = false; │ │ │ │ │ -309 }; │ │ │ │ │ -310 │ │ │ │ │ -311 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ -312 struct isDiscreteCoordFunctionInterface │ │ │ │ │ -313 < DiscreteCoordFunctionInterface< ct, dimR, Impl > > │ │ │ │ │ -314 { │ │ │ │ │ -315 static const bool value = true; │ │ │ │ │ -316 }; │ │ │ │ │ -317 │ │ │ │ │ -318 │ │ │ │ │ -319 │ │ │ │ │ -320 // AdaptCoordFunction │ │ │ │ │ -321 // ------------------ │ │ │ │ │ -322 │ │ │ │ │ -323 template< class CoordFunctionInterface > │ │ │ │ │ -324 struct AdaptCoordFunction │ │ │ │ │ -325 { │ │ │ │ │ -326 static void adapt ( CoordFunctionInterface & ) │ │ │ │ │ -327 {} │ │ │ │ │ -328 }; │ │ │ │ │ -329 │ │ │ │ │ -330 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ -331 struct AdaptCoordFunction< DiscreteCoordFunctionInterface< ct, dimR, Impl > │ │ │ │ │ -> │ │ │ │ │ -332 { │ │ │ │ │ -333 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > │ │ │ │ │ -CoordFunctionInterface; │ │ │ │ │ -334 │ │ │ │ │ -335 static void adapt ( CoordFunctionInterface &coordFunction ) │ │ │ │ │ -336 { │ │ │ │ │ -337 coordFunction.adapt(); │ │ │ │ │ -338 } │ │ │ │ │ -339 }; │ │ │ │ │ -340 │ │ │ │ │ -341 } // namespace GeoGrid │ │ │ │ │ -342 │ │ │ │ │ -343} // namespace Dune │ │ │ │ │ -344 │ │ │ │ │ -345#endif // #ifndef DUNE_GEOGRID_COORDFUNCTION_HH │ │ │ │ │ +82} // namespace Dune │ │ │ │ │ +83 │ │ │ │ │ +84#endif // #ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ │ +_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ +Provides base classes for index and id sets. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -Derive an implementation of an analytical coordinate function from this class. │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -AnalyticalCoordFunction()=default │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_~_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -~AnalyticalCoordFunction()=default │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -AnalyticalCoordFunction(This &&)=default │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -Base::RangeVector RangeVector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const This &)=default │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -AnalyticalCoordFunction(const This &)=default │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -Derive an implementation of a discrete coordinate function from this class. │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:248 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const This &)=default │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_a_d_a_p_t │ │ │ │ │ -void adapt() │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:263 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DiscreteCoordFunction()=default │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DiscreteCoordFunction(This &&)=default │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_~_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -~DiscreteCoordFunction()=default │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DiscreteCoordFunction(const This &)=default │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -Base::RangeVector RangeVector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ -Interface class for using an analytical function to define the geometry of a │ │ │ │ │ -Dune::GeometryGrid.... │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -Impl Implementation │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimRange > RangeVector │ │ │ │ │ -range vector for the evaluate method │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, RangeVector &y) const │ │ │ │ │ -evaluate method for global mapping │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -dimension of the range vector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -field type of the coordinate vector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_D_o_m_a_i_n │ │ │ │ │ -static const unsigned int dimDomain │ │ │ │ │ -dimension of the range vector (dimensionworld of host grid) │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ -const Implementation & asImp() const │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_n_t_e_r_f_a_c_e │ │ │ │ │ -This Interface │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ -Implementation & asImp() │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimDomain > DomainVector │ │ │ │ │ -domain vector for the evaluate method │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ -Interface class for using a discrete function to define the geometry of a │ │ │ │ │ -Dune::GeometryGrid.... │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -dimension of the range vector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:188 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector │ │ │ │ │ -&y) const │ │ │ │ │ -evaluate method │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:211 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ -Implementation & asImp() │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -field type of the coordinate vector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_d_a_p_t │ │ │ │ │ -void adapt() │ │ │ │ │ -method called from grid.adapt() method to allow adaptation of the discrete │ │ │ │ │ -coordinate function │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimRange > RangeVector │ │ │ │ │ -range vector for the evaluate method │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ -const Implementation & asImp() const │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:226 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -Impl Implementation │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_n_t_e_r_f_a_c_e │ │ │ │ │ -This Interface │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:181 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ +Id Set Interface. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ +IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) │ │ │ │ │ +const │ │ │ │ │ +Get id of subentity i of co-dimension codim of a co-dimension 0 entity. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:486 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_E_n_t_i_t_y │ │ │ │ │ +DUNE-conform implementation of the entity. │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/entity.hh:694 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_S_e_t │ │ │ │ │ +IdSet() │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_S_e_t │ │ │ │ │ +IdSet(const HostIdSet &hostIdSet) │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_i_d │ │ │ │ │ +IdType id(const Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ +IdType subId(const typename Traits::template Codim< 0 >::Entity &entity, int i, │ │ │ │ │ +unsigned int codim) const │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_i_d │ │ │ │ │ +IdType id(const typename Traits::template Codim< codim >::Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_S_e_t │ │ │ │ │ +IdSet(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +const This & operator=(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ +HostIdSet::IdType IdType │ │ │ │ │ +DDeeffiinniittiioonn idset.hh:29 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hostcorners.hh File Reference │ │ │ │ +dune-grid: iterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,25 +72,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hostcorners.hh File Reference
│ │ │ │ +
iterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/entity.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/entity.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::HostCorners< HostEntity >
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid >
 
class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, false >
 
class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, true >
 
class  Dune::GeoGrid::HierarchicIterator< G >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +2,45 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hostcorners.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_._h_h> │ │ │ │ │ +iterator.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_d_e_c_l_a_r_a_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_e_n_t_i_t_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_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_<_ _H_o_s_t_E_n_t_i_t_y_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_, │ │ │ │ │ + _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_, │ │ │ │ │ + _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ + _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_, │ │ │ │ │ + _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │   namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hostcorners.hh Source File │ │ │ │ +dune-grid: iterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,90 +74,592 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hostcorners.hh
│ │ │ │ +
iterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GEOGRID_HOSTCORNERS_HH
│ │ │ │ -
6#define DUNE_GEOGRID_HOSTCORNERS_HH
│ │ │ │ +
5#ifndef DUNE_GEOGRID_ITERATOR_HH
│ │ │ │ +
6#define DUNE_GEOGRID_ITERATOR_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <cassert>
│ │ │ │
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14 namespace GeoGrid
│ │ │ │ -
15 {
│ │ │ │ -
16
│ │ │ │ -
17 // HostCorners
│ │ │ │ -
18 // -----------
│ │ │ │ -
19
│ │ │ │ -
20 template< class HostEntity >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ -
23 typedef typename HostEntity::Geometry HostGeometry;
│ │ │ │ +
10#include <type_traits>
│ │ │ │ +
11#include <utility>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
22 namespace GeoGrid
│ │ │ │ +
23 {
│ │ │ │
24
│ │ │ │ -
25 public:
│ │ │ │ -
26 typedef typename HostGeometry::GlobalCoordinate Coordinate;
│ │ │ │ +
25 // Internal Forward Declarations
│ │ │ │ +
26 // -----------------------------
│ │ │ │
27
│ │ │ │ -
│ │ │ │ -
28 explicit HostCorners ( const HostEntity &hostEntity )
│ │ │ │ -
29 : hostGeometry_( hostEntity.geometry() )
│ │ │ │ -
30 {}
│ │ │ │ -
│ │ │ │ +
28 template< class HostGridView, int codim, PartitionIteratorType pitype, class Grid,
│ │ │ │ +
29 bool fake = !Capabilities::hasHostEntity< Grid, codim >::v >
│ │ │ │ +
30 class Iterator;
│ │ │ │
31
│ │ │ │ -
│ │ │ │ -
32 GeometryType type () const
│ │ │ │ -
33 {
│ │ │ │ -
34 return hostGeometry_.type();
│ │ │ │ -
35 }
│ │ │ │ -
│ │ │ │ +
32 template< class Grid >
│ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
35
│ │ │ │
36
│ │ │ │ -
│ │ │ │ -
37 Coordinate operator[] ( int i ) const
│ │ │ │ -
38 {
│ │ │ │ -
39 return hostGeometry_.corner( i );
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
42 std::size_t size () const
│ │ │ │ -
43 {
│ │ │ │ -
44 return hostGeometry_.corners();
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
47 private:
│ │ │ │ -
48 HostGeometry hostGeometry_;
│ │ │ │ -
49 };
│ │ │ │ -
│ │ │ │ +
37 // PartitionIteratorFilter
│ │ │ │ +
38 // -----------------------
│ │ │ │ +
39
│ │ │ │ +
40 template< int codim, PartitionIteratorType pitype, class Grid >
│ │ │ │ + │ │ │ │ +
42
│ │ │ │ +
43 template< int codim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 {
│ │ │ │ +
46 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ +
47 static const int codimension = codim;
│ │ │ │ +
48
│ │ │ │ +
49 static const PartitionIteratorType Element_Partition = Interior_Partition;
│ │ │ │
50
│ │ │ │ -
51 } // namespace GeoGrid
│ │ │ │ -
52
│ │ │ │ -
53} // namespace Dune
│ │ │ │ +
51 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ +
52 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ +
53 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │
54
│ │ │ │ -
55#endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
│ │ │ │ +
│ │ │ │ +
55 static bool apply ( const RefElement &refElement,
│ │ │ │ +
56 const Element &element, int subEntity )
│ │ │ │ +
57 {
│ │ │ │ +
58 const int size = refElement.size( subEntity, codim, dimension );
│ │ │ │ +
59 for( int i = 0; i < size; ++i )
│ │ │ │ +
60 {
│ │ │ │ +
61 const int j = refElement.subEntity( subEntity, codim, i, dimension );
│ │ │ │ +
62 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
│ │ │ │ +
63 if( type == InteriorEntity )
│ │ │ │ +
64 return true;
│ │ │ │ +
65 }
│ │ │ │ +
66 return false;
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68 };
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
70 template< int codim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
72 {
│ │ │ │ +
73 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ +
74 static const int codimension = codim;
│ │ │ │ +
75
│ │ │ │ +
76 static const PartitionIteratorType Element_Partition = Interior_Partition;
│ │ │ │ +
77
│ │ │ │ +
78 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ +
79 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ +
80 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
82 static bool apply ( const RefElement &refElement,
│ │ │ │ +
83 const Element &element, int subEntity )
│ │ │ │ +
84 {
│ │ │ │ +
85 return true;
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87 };
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
89 template< int codim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
91 {
│ │ │ │ +
92 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ +
93 static const int codimension = codim;
│ │ │ │ +
94
│ │ │ │ +
95 static const PartitionIteratorType Element_Partition = Overlap_Partition;
│ │ │ │ +
96
│ │ │ │ +
97 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ +
98 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ +
99 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
101 static bool apply ( const RefElement &refElement,
│ │ │ │ +
102 const Element &element, int subEntity )
│ │ │ │ +
103 {
│ │ │ │ +
104 if( element.partitionType() == InteriorEntity )
│ │ │ │ +
105 return true;
│ │ │ │ +
106
│ │ │ │ +
107 const int size = refElement.size( subEntity, codim, dimension );
│ │ │ │ +
108 for( int i = 0; i < size; ++i )
│ │ │ │ +
109 {
│ │ │ │ +
110 const int j = refElement.subEntity( subEntity, codim, i, dimension );
│ │ │ │ +
111 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
│ │ │ │ +
112 if( (type == OverlapEntity) || (type == BorderEntity) )
│ │ │ │ +
113 return true;
│ │ │ │ +
114 }
│ │ │ │ +
115 return false;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117 };
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
119 template< int codim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
121 {
│ │ │ │ +
122 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ +
123 static const int codimension = codim;
│ │ │ │ +
124
│ │ │ │ +
125 static const PartitionIteratorType Element_Partition = Overlap_Partition;
│ │ │ │ +
126
│ │ │ │ +
127 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ +
128 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ +
129 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ +
130
│ │ │ │ +
│ │ │ │ +
131 static bool apply ( const RefElement &refElement,
│ │ │ │ +
132 const Element &element, int subEntity )
│ │ │ │ +
133 {
│ │ │ │ +
134 return true;
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136 };
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
138 template< int codim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
140 {
│ │ │ │ +
141 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ +
142 static const int codimension = codim;
│ │ │ │ +
143
│ │ │ │ +
144 static const PartitionIteratorType Element_Partition = All_Partition;
│ │ │ │ +
145
│ │ │ │ +
146 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ +
147 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ +
148 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ +
149
│ │ │ │ +
│ │ │ │ +
150 static bool apply ( const RefElement &refElement,
│ │ │ │ +
151 const Element &element, int subEntity )
│ │ │ │ +
152 {
│ │ │ │ +
153 return true;
│ │ │ │ +
154 }
│ │ │ │ +
│ │ │ │ +
155 };
│ │ │ │ +
│ │ │ │ +
156
│ │ │ │ +
157 template< int codim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
159 {
│ │ │ │ +
160 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ +
161 static const int codimension = codim;
│ │ │ │ +
162
│ │ │ │ +
163 static const PartitionIteratorType Element_Partition = Ghost_Partition;
│ │ │ │ +
164
│ │ │ │ +
165 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ +
166 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ +
167 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ +
168
│ │ │ │ +
│ │ │ │ +
169 static bool apply ( const RefElement &refElement,
│ │ │ │ +
170 const Element &element, int subEntity )
│ │ │ │ +
171 {
│ │ │ │ +
172 const int size = refElement.size( subEntity, codim, dimension );
│ │ │ │ +
173 for( int i = 0; i < size; ++i )
│ │ │ │ +
174 {
│ │ │ │ +
175 const int j = refElement.subEntity( subEntity, codim, i, dimension );
│ │ │ │ +
176 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
│ │ │ │ +
177 if( type == GhostEntity )
│ │ │ │ +
178 return true;
│ │ │ │ +
179 }
│ │ │ │ +
180 return false;
│ │ │ │ +
181 }
│ │ │ │ +
│ │ │ │ +
182 };
│ │ │ │ +
│ │ │ │ +
183
│ │ │ │ +
184
│ │ │ │ +
185
│ │ │ │ +
186 // Iterator (real)
│ │ │ │ +
187 // ---------------
│ │ │ │ +
188
│ │ │ │ +
189 template< class HostGridView, int codim, PartitionIteratorType pitype, class G >
│ │ │ │ +
│ │ │ │ +
190 class Iterator< HostGridView, codim, pitype, G, false >
│ │ │ │ +
191 {
│ │ │ │ +
192 typedef typename std::remove_const< G >::type::Traits Traits;
│ │ │ │ +
193
│ │ │ │ +
194 public:
│ │ │ │ +
195 typedef typename Traits::Grid Grid;
│ │ │ │ +
196
│ │ │ │ +
197 static const int codimension = codim;
│ │ │ │ +
198
│ │ │ │ +
199 typedef typename Traits::template Codim< codimension >::Entity Entity;
│ │ │ │ +
200
│ │ │ │ +
201 static const bool fake = false;
│ │ │ │ +
202
│ │ │ │ +
203 private:
│ │ │ │ + │ │ │ │ +
205
│ │ │ │ +
206 typedef typename HostGridView::template Codim< codim >::template Partition< pitype >::Iterator HostEntityIterator;
│ │ │ │ +
207
│ │ │ │ +
208 public:
│ │ │ │ +
209 Iterator () : grid_( nullptr ) {}
│ │ │ │ +
210
│ │ │ │ +
│ │ │ │ +
211 Iterator ( const Grid &grid, HostEntityIterator hostEntityIterator )
│ │ │ │ +
212 : grid_( &grid ),
│ │ │ │ +
213 hostEntityIterator_( std::move( hostEntityIterator ) )
│ │ │ │ +
214 {}
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
│ │ │ │ +
216 void increment ()
│ │ │ │ +
217 {
│ │ │ │ +
218 ++hostEntityIterator_;
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220
│ │ │ │ +
│ │ │ │ +
221 bool equals ( const Iterator &rhs ) const
│ │ │ │ +
222 {
│ │ │ │ +
223 return hostEntityIterator_ == rhs.hostEntityIterator_;
│ │ │ │ +
224 }
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
227 {
│ │ │ │ +
228 return EntityImpl( grid(), *hostEntityIterator_ );
│ │ │ │ +
229 }
│ │ │ │ +
│ │ │ │ +
230
│ │ │ │ +
231 int level () const { return hostEntityIterator_.level(); }
│ │ │ │ +
232
│ │ │ │ +
│ │ │ │ +
233 const Grid &grid () const
│ │ │ │ +
234 {
│ │ │ │ +
235 assert( grid_ );
│ │ │ │ +
236 return *grid_;
│ │ │ │ +
237 }
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
│ │ │ │ +
239 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ +
240 {
│ │ │ │ +
241 HostEntityIterator hostEntityIterator = hostGridView.template begin< codimension, pitype >();
│ │ │ │ +
242 return Iterator( grid, std::move( hostEntityIterator ) );
│ │ │ │ +
243 }
│ │ │ │ +
│ │ │ │ +
244
│ │ │ │ +
│ │ │ │ +
245 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ +
246 {
│ │ │ │ +
247 HostEntityIterator hostEntityIterator = hostGridView.template end< codimension, pitype >();
│ │ │ │ +
248 return Iterator( grid, std::move( hostEntityIterator ) );
│ │ │ │ +
249 }
│ │ │ │ +
│ │ │ │ +
250
│ │ │ │ +
251 private:
│ │ │ │ +
252 const Grid *grid_;
│ │ │ │ +
253 HostEntityIterator hostEntityIterator_;
│ │ │ │ +
254 };
│ │ │ │ +
│ │ │ │ +
255
│ │ │ │ +
256
│ │ │ │ +
257
│ │ │ │ +
258 // Iterator (fake)
│ │ │ │ +
259 // ---------------
│ │ │ │ +
260
│ │ │ │ +
261 template< class HostGridView, int codim, PartitionIteratorType pitype, class G >
│ │ │ │ +
│ │ │ │ +
262 class Iterator< HostGridView, codim, pitype, G, true >
│ │ │ │ +
263 {
│ │ │ │ +
264 typedef typename std::remove_const< G >::type::Traits Traits;
│ │ │ │ +
265
│ │ │ │ +
266 public:
│ │ │ │ +
267 typedef typename Traits::Grid Grid;
│ │ │ │ +
268
│ │ │ │ +
269 static const int codimension = codim;
│ │ │ │ +
270
│ │ │ │ +
271 typedef typename Traits::template Codim< codimension >::Entity Entity;
│ │ │ │ +
272
│ │ │ │ +
273 private:
│ │ │ │ + │ │ │ │ +
275
│ │ │ │ + │ │ │ │ +
277
│ │ │ │ +
278 typedef typename HostGridView::template Codim<0>::template Partition< Filter::Element_Partition >::Iterator HostElementIterator;
│ │ │ │ +
279 typedef typename HostElementIterator::Entity HostElement;
│ │ │ │ +
280 typedef typename HostGridView::IndexSet HostIndexSet;
│ │ │ │ +
281
│ │ │ │ +
282 public:
│ │ │ │ +
283 Iterator () : grid_( nullptr ), subEntity_( -1 ), hostIndexSet_( nullptr ) {}
│ │ │ │ +
284
│ │ │ │ +
│ │ │ │ +
285 Iterator ( const Grid &grid, HostElementIterator hostElementIterator, HostElementIterator hostEnd, const HostIndexSet &hostIndexSet )
│ │ │ │ +
286 : grid_( &grid ),
│ │ │ │ +
287 hostElementIterator_( hostElementIterator ),
│ │ │ │ +
288 hostEnd_( hostEnd ),
│ │ │ │ +
289 subEntity_( -1 ),
│ │ │ │ +
290 hostIndexSet_( &hostIndexSet )
│ │ │ │ +
291 {
│ │ │ │ +
292 if( hostElementIterator_ != hostEnd_ )
│ │ │ │ +
293 {
│ │ │ │ +
294 visited_.resize( hostIndexSet_->size( codimension ), false );
│ │ │ │ +
295 increment();
│ │ │ │ +
296 }
│ │ │ │ +
297 }
│ │ │ │ +
│ │ │ │ +
298
│ │ │ │ +
│ │ │ │ +
299 void increment ()
│ │ │ │ +
300 {
│ │ │ │ +
301 typedef typename Traits::ctype ctype;
│ │ │ │ +
302
│ │ │ │ +
303 while( hostElementIterator_ != hostEnd_ )
│ │ │ │ +
304 {
│ │ │ │ +
305 const HostElement &hostElement = *hostElementIterator_;
│ │ │ │ +
306
│ │ │ │ +
307 auto refElement = referenceElement< ctype, Traits::dimension >( hostElement.type() );
│ │ │ │ +
308
│ │ │ │ +
309 ++subEntity_;
│ │ │ │ +
310 const int count = refElement.size( codimension );
│ │ │ │ +
311 for( ; subEntity_ < count; ++subEntity_ )
│ │ │ │ +
312 {
│ │ │ │ +
313 if( !Filter::apply( refElement, hostElement, subEntity_ ) )
│ │ │ │ +
314 continue;
│ │ │ │ +
315
│ │ │ │ +
316 const size_t index = hostIndexSet_->subIndex( hostElement, subEntity_, codimension );
│ │ │ │ +
317 if( !visited_[ index ] )
│ │ │ │ +
318 {
│ │ │ │ +
319 visited_[ index ] = true;
│ │ │ │ +
320 return;
│ │ │ │ +
321 }
│ │ │ │ +
322 }
│ │ │ │ +
323 ++hostElementIterator_;
│ │ │ │ +
324 subEntity_ = -1;
│ │ │ │ +
325 }
│ │ │ │ +
326 }
│ │ │ │ +
│ │ │ │ +
327
│ │ │ │ +
│ │ │ │ +
328 bool equals ( const Iterator &rhs ) const
│ │ │ │ +
329 {
│ │ │ │ +
330 return hostElementIterator_ == rhs.hostElementIterator_ && ( hostElementIterator_ == hostEnd_ || subEntity_ == rhs.subEntity_ );
│ │ │ │ +
331 }
│ │ │ │ +
│ │ │ │ +
332
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
334 {
│ │ │ │ +
335 return EntityImpl( grid(), *hostElementIterator_, subEntity_ );
│ │ │ │ +
336 }
│ │ │ │ +
│ │ │ │ +
337
│ │ │ │ +
338 int level () const { return hostElementIterator_.level(); }
│ │ │ │ +
339
│ │ │ │ +
│ │ │ │ +
340 const Grid &grid () const
│ │ │ │ +
341 {
│ │ │ │ +
342 assert( grid_ );
│ │ │ │ +
343 return *grid_;
│ │ │ │ +
344 }
│ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
│ │ │ │ +
346 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ +
347 {
│ │ │ │ +
348 HostElementIterator first = hostGridView.template begin< 0, Filter::Element_Partition >();
│ │ │ │ +
349 HostElementIterator last = hostGridView.template end< 0, Filter::Element_Partition >();
│ │ │ │ +
350 return Iterator( grid, std::move( first ), std::move( last ), hostGridView.indexSet() );
│ │ │ │ +
351 }
│ │ │ │ +
│ │ │ │ +
352
│ │ │ │ +
│ │ │ │ +
353 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ +
354 {
│ │ │ │ +
355 HostElementIterator last = hostGridView.template end< 0, Filter::Element_Partition >();
│ │ │ │ +
356 return Iterator( grid, last, last, hostGridView.indexSet() );
│ │ │ │ +
357 }
│ │ │ │ +
│ │ │ │ +
358
│ │ │ │ +
359 private:
│ │ │ │ +
360 const Grid *grid_;
│ │ │ │ +
361 HostElementIterator hostElementIterator_, hostEnd_;
│ │ │ │ +
362 int subEntity_;
│ │ │ │ +
363 const HostIndexSet *hostIndexSet_;
│ │ │ │ +
364 std::vector< bool > visited_;
│ │ │ │ +
365 };
│ │ │ │ +
│ │ │ │ +
366
│ │ │ │ +
367
│ │ │ │ +
368
│ │ │ │ +
369 // HierarchicIterator
│ │ │ │ +
370 // ------------------
│ │ │ │ +
371
│ │ │ │ +
372 template< class G >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
374 {
│ │ │ │ +
375 typedef typename std::remove_const< G >::type::Traits Traits;
│ │ │ │ +
376
│ │ │ │ +
377 public:
│ │ │ │ +
378 typedef typename Traits::Grid Grid;
│ │ │ │ +
379
│ │ │ │ +
380 static const int codimension = 0;
│ │ │ │ +
381
│ │ │ │ +
382 typedef typename Traits::template Codim< codimension >::Entity Entity;
│ │ │ │ +
383
│ │ │ │ +
384 private:
│ │ │ │ + │ │ │ │ +
386
│ │ │ │ +
387 typedef typename Grid::HostGrid::HierarchicIterator HostEntityIterator;
│ │ │ │ +
388
│ │ │ │ +
389 public:
│ │ │ │ +
390 HierarchicIterator () : grid_( nullptr ) {}
│ │ │ │ +
391
│ │ │ │ +
│ │ │ │ +
392 HierarchicIterator ( const Grid &grid, HostEntityIterator hostEntityIterator )
│ │ │ │ +
393 : grid_( &grid ),
│ │ │ │ +
394 hostEntityIterator_( std::move( hostEntityIterator ) )
│ │ │ │ +
395 {}
│ │ │ │ +
│ │ │ │ +
396
│ │ │ │ +
│ │ │ │ +
397 void increment ()
│ │ │ │ +
398 {
│ │ │ │ +
399 ++hostEntityIterator_;
│ │ │ │ +
400 }
│ │ │ │ +
│ │ │ │ +
401
│ │ │ │ +
│ │ │ │ +
402 bool equals ( const HierarchicIterator &rhs ) const
│ │ │ │ +
403 {
│ │ │ │ +
404 return hostEntityIterator_ == rhs.hostEntityIterator_;
│ │ │ │ +
405 }
│ │ │ │ +
│ │ │ │ +
406
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
408 {
│ │ │ │ +
409 return EntityImpl( grid(), *hostEntityIterator_ );
│ │ │ │ +
410 }
│ │ │ │ +
│ │ │ │ +
411
│ │ │ │ +
412 int level () const { return hostEntityIterator_.level(); }
│ │ │ │ +
413
│ │ │ │ +
│ │ │ │ +
414 const Grid &grid () const
│ │ │ │ +
415 {
│ │ │ │ +
416 assert( grid_ );
│ │ │ │ +
417 return *grid_;
│ │ │ │ +
418 }
│ │ │ │ +
│ │ │ │ +
419
│ │ │ │ +
420 private:
│ │ │ │ +
421 const Grid *grid_;
│ │ │ │ +
422 HostEntityIterator hostEntityIterator_;
│ │ │ │ +
423 };
│ │ │ │ +
│ │ │ │ +
424
│ │ │ │ +
425 } // namespace GeoGrid
│ │ │ │ +
426
│ │ │ │ +
427} // namespace Dune
│ │ │ │ +
428
│ │ │ │ +
429#endif // #ifndef DUNE_GEOGRID_ITERATOR_HH
│ │ │ │ + │ │ │ │ +
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ +
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ │ +
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition gridenums.hh:140
│ │ │ │ +
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ │ +
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ │ +
@ Overlap_Partition
interior, border, and overlap entities
Definition gridenums.hh:139
│ │ │ │ +
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │ +
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ +
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ +
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ +
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │ +
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition hostcorners.hh:22
│ │ │ │ -
GeometryType type() const
Definition hostcorners.hh:32
│ │ │ │ -
Coordinate operator[](int i) const
Definition hostcorners.hh:37
│ │ │ │ -
HostCorners(const HostEntity &hostEntity)
Definition hostcorners.hh:28
│ │ │ │ -
HostGeometry::GlobalCoordinate Coordinate
Definition hostcorners.hh:26
│ │ │ │ -
std::size_t size() const
Definition hostcorners.hh:42
│ │ │ │ - │ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:694
│ │ │ │ +
Definition iterator.hh:374
│ │ │ │ +
static const int codimension
Definition iterator.hh:380
│ │ │ │ +
int level() const
Definition iterator.hh:412
│ │ │ │ +
void increment()
Definition iterator.hh:397
│ │ │ │ +
bool equals(const HierarchicIterator &rhs) const
Definition iterator.hh:402
│ │ │ │ +
Entity dereference() const
Definition iterator.hh:407
│ │ │ │ +
HierarchicIterator()
Definition iterator.hh:390
│ │ │ │ +
HierarchicIterator(const Grid &grid, HostEntityIterator hostEntityIterator)
Definition iterator.hh:392
│ │ │ │ +
Traits::Grid Grid
Definition iterator.hh:378
│ │ │ │ +
const Grid & grid() const
Definition iterator.hh:414
│ │ │ │ +
Traits::template Codim< codimension >::Entity Entity
Definition iterator.hh:382
│ │ │ │ +
Definition iterator.hh:30
│ │ │ │ + │ │ │ │ +
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:51
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:52
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:55
│ │ │ │ +
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:53
│ │ │ │ +
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:80
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:82
│ │ │ │ +
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:78
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:79
│ │ │ │ +
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:99
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:98
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:101
│ │ │ │ +
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:97
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:128
│ │ │ │ +
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:127
│ │ │ │ +
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:129
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:131
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:150
│ │ │ │ +
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:146
│ │ │ │ +
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:148
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:147
│ │ │ │ +
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:167
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:166
│ │ │ │ +
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:165
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:169
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Entity dereference() const
Definition iterator.hh:226
│ │ │ │ + │ │ │ │ + │ │ │ │ +
bool equals(const Iterator &rhs) const
Definition iterator.hh:221
│ │ │ │ +
static Iterator begin(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:239
│ │ │ │ +
Traits::template Codim< codimension >::Entity Entity
Definition iterator.hh:199
│ │ │ │ +
const Grid & grid() const
Definition iterator.hh:233
│ │ │ │ +
static Iterator end(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:245
│ │ │ │ +
Iterator(const Grid &grid, HostEntityIterator hostEntityIterator)
Definition iterator.hh:211
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
const Grid & grid() const
Definition iterator.hh:340
│ │ │ │ +
static Iterator end(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:353
│ │ │ │ +
static Iterator begin(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:346
│ │ │ │ +
bool equals(const Iterator &rhs) const
Definition iterator.hh:328
│ │ │ │ +
Entity dereference() const
Definition iterator.hh:333
│ │ │ │ +
Iterator(const Grid &grid, HostElementIterator hostElementIterator, HostElementIterator hostEnd, const HostIndexSet &hostIndexSet)
Definition iterator.hh:285
│ │ │ │ +
Traits::template Codim< codimension >::Entity Entity
Definition iterator.hh:271
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,88 +1,729 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -hostcorners.hh │ │ │ │ │ +iterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GEOGRID_HOSTCORNERS_HH │ │ │ │ │ -6#define DUNE_GEOGRID_HOSTCORNERS_HH │ │ │ │ │ +5#ifndef DUNE_GEOGRID_ITERATOR_HH │ │ │ │ │ +6#define DUNE_GEOGRID_ITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 namespace GeoGrid │ │ │ │ │ -15 { │ │ │ │ │ -16 │ │ │ │ │ -17 // HostCorners │ │ │ │ │ -18 // ----------- │ │ │ │ │ -19 │ │ │ │ │ -20 template< class HostEntity > │ │ │ │ │ -_2_1 class _H_o_s_t_C_o_r_n_e_r_s │ │ │ │ │ -22 { │ │ │ │ │ -23 typedef typename HostEntity::Geometry HostGeometry; │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_d_e_c_l_a_r_a_t_i_o_n_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_e_n_t_i_t_y_._h_h> │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 │ │ │ │ │ +22 namespace GeoGrid │ │ │ │ │ +23 { │ │ │ │ │ 24 │ │ │ │ │ -25 public: │ │ │ │ │ -_2_6 typedef typename HostGeometry::GlobalCoordinate _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +25 // Internal Forward Declarations │ │ │ │ │ +26 // ----------------------------- │ │ │ │ │ 27 │ │ │ │ │ -_2_8 explicit _H_o_s_t_C_o_r_n_e_r_s ( const HostEntity &hostEntity ) │ │ │ │ │ -29 : hostGeometry_( hostEntity.geometry() ) │ │ │ │ │ -30 {} │ │ │ │ │ +28 template< class HostGridView, int codim, _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e pitype, class │ │ │ │ │ +Grid, │ │ │ │ │ +29 bool fake = !Capabilities::hasHostEntity< Grid, codim >::v > │ │ │ │ │ +_3_0 class _I_t_e_r_a_t_o_r; │ │ │ │ │ 31 │ │ │ │ │ -_3_2 GeometryType _t_y_p_e () const │ │ │ │ │ -33 { │ │ │ │ │ -34 return hostGeometry_.type(); │ │ │ │ │ -35 } │ │ │ │ │ +32 template< class Grid > │ │ │ │ │ +33 class _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +34 │ │ │ │ │ +35 │ │ │ │ │ 36 │ │ │ │ │ -_3_7 _C_o_o_r_d_i_n_a_t_e _o_p_e_r_a_t_o_r_[_]_ ( int i ) const │ │ │ │ │ -38 { │ │ │ │ │ -39 return hostGeometry_.corner( i ); │ │ │ │ │ -40 } │ │ │ │ │ -41 │ │ │ │ │ -_4_2 std::size_t _s_i_z_e () const │ │ │ │ │ -43 { │ │ │ │ │ -44 return hostGeometry_.corners(); │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -47 private: │ │ │ │ │ -48 HostGeometry hostGeometry_; │ │ │ │ │ -49 }; │ │ │ │ │ +37 // PartitionIteratorFilter │ │ │ │ │ +38 // ----------------------- │ │ │ │ │ +39 │ │ │ │ │ +40 template< int codim, PartitionIteratorType pitype, class Grid > │ │ │ │ │ +_4_1 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r; │ │ │ │ │ +42 │ │ │ │ │ +43 template< int codim, class Grid > │ │ │ │ │ +_4_4 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ +45 { │ │ │ │ │ +_4_6 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ +_4_7 static const int codimension = codim; │ │ │ │ │ +48 │ │ │ │ │ +_4_9 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n; │ │ │ │ │ 50 │ │ │ │ │ -51 } // namespace GeoGrid │ │ │ │ │ -52 │ │ │ │ │ -53} // namespace Dune │ │ │ │ │ +_5_1 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ +_5_2 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ +>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_5_3 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ 54 │ │ │ │ │ -55#endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH │ │ │ │ │ +_5_5 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ +56 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ +57 { │ │ │ │ │ +58 const int size = refElement.size( subEntity, codim, dimension ); │ │ │ │ │ +59 for( int i = 0; i < size; ++i ) │ │ │ │ │ +60 { │ │ │ │ │ +61 const int j = refElement.subEntity( subEntity, codim, i, dimension ); │ │ │ │ │ +62 _P_a_r_t_i_t_i_o_n_T_y_p_e type = element.template subEntity< dimension >( j │ │ │ │ │ +).partitionType(); │ │ │ │ │ +63 if( type == _I_n_t_e_r_i_o_r_E_n_t_i_t_y ) │ │ │ │ │ +64 return true; │ │ │ │ │ +65 } │ │ │ │ │ +66 return false; │ │ │ │ │ +67 } │ │ │ │ │ +68 }; │ │ │ │ │ +69 │ │ │ │ │ +70 template< int codim, class Grid > │ │ │ │ │ +_7_1 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ +72 { │ │ │ │ │ +_7_3 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ +_7_4 static const int codimension = codim; │ │ │ │ │ +75 │ │ │ │ │ +_7_6 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +77 │ │ │ │ │ +_7_8 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ +_7_9 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ +>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_8_0 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ +81 │ │ │ │ │ +_8_2 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ +83 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ +84 { │ │ │ │ │ +85 return true; │ │ │ │ │ +86 } │ │ │ │ │ +87 }; │ │ │ │ │ +88 │ │ │ │ │ +89 template< int codim, class Grid > │ │ │ │ │ +_9_0 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ +91 { │ │ │ │ │ +_9_2 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ +_9_3 static const int codimension = codim; │ │ │ │ │ +94 │ │ │ │ │ +_9_5 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +96 │ │ │ │ │ +_9_7 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ +_9_8 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ +>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_9_9 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ +100 │ │ │ │ │ +_1_0_1 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ +102 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ +103 { │ │ │ │ │ +104 if( element.partitionType() == _I_n_t_e_r_i_o_r_E_n_t_i_t_y ) │ │ │ │ │ +105 return true; │ │ │ │ │ +106 │ │ │ │ │ +107 const int size = refElement.size( subEntity, codim, dimension ); │ │ │ │ │ +108 for( int i = 0; i < size; ++i ) │ │ │ │ │ +109 { │ │ │ │ │ +110 const int j = refElement.subEntity( subEntity, codim, i, dimension ); │ │ │ │ │ +111 _P_a_r_t_i_t_i_o_n_T_y_p_e type = element.template subEntity< dimension >( j │ │ │ │ │ +).partitionType(); │ │ │ │ │ +112 if( (type == _O_v_e_r_l_a_p_E_n_t_i_t_y) || (type == _B_o_r_d_e_r_E_n_t_i_t_y) ) │ │ │ │ │ +113 return true; │ │ │ │ │ +114 } │ │ │ │ │ +115 return false; │ │ │ │ │ +116 } │ │ │ │ │ +117 }; │ │ │ │ │ +118 │ │ │ │ │ +119 template< int codim, class Grid > │ │ │ │ │ +_1_2_0 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ +121 { │ │ │ │ │ +_1_2_2 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ +_1_2_3 static const int codimension = codim; │ │ │ │ │ +124 │ │ │ │ │ +_1_2_5 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +126 │ │ │ │ │ +_1_2_7 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ +_1_2_8 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ +>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_1_2_9 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ +130 │ │ │ │ │ +_1_3_1 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ +132 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ +133 { │ │ │ │ │ +134 return true; │ │ │ │ │ +135 } │ │ │ │ │ +136 }; │ │ │ │ │ +137 │ │ │ │ │ +138 template< int codim, class Grid > │ │ │ │ │ +_1_3_9 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _A_l_l___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ +140 { │ │ │ │ │ +_1_4_1 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ +_1_4_2 static const int codimension = codim; │ │ │ │ │ +143 │ │ │ │ │ +_1_4_4 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _A_l_l___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +145 │ │ │ │ │ +_1_4_6 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ +_1_4_7 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ +>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_1_4_8 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ +149 │ │ │ │ │ +_1_5_0 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ +151 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ +152 { │ │ │ │ │ +153 return true; │ │ │ │ │ +154 } │ │ │ │ │ +155 }; │ │ │ │ │ +156 │ │ │ │ │ +157 template< int codim, class Grid > │ │ │ │ │ +_1_5_8 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _G_h_o_s_t___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ +159 { │ │ │ │ │ +_1_6_0 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ +_1_6_1 static const int codimension = codim; │ │ │ │ │ +162 │ │ │ │ │ +_1_6_3 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _G_h_o_s_t___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +164 │ │ │ │ │ +_1_6_5 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ +_1_6_6 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ +>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_1_6_7 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ +168 │ │ │ │ │ +_1_6_9 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ +170 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ +171 { │ │ │ │ │ +172 const int size = refElement.size( subEntity, codim, dimension ); │ │ │ │ │ +173 for( int i = 0; i < size; ++i ) │ │ │ │ │ +174 { │ │ │ │ │ +175 const int j = refElement.subEntity( subEntity, codim, i, dimension ); │ │ │ │ │ +176 _P_a_r_t_i_t_i_o_n_T_y_p_e type = element.template subEntity< dimension >( j │ │ │ │ │ +).partitionType(); │ │ │ │ │ +177 if( type == _G_h_o_s_t_E_n_t_i_t_y ) │ │ │ │ │ +178 return true; │ │ │ │ │ +179 } │ │ │ │ │ +180 return false; │ │ │ │ │ +181 } │ │ │ │ │ +182 }; │ │ │ │ │ +183 │ │ │ │ │ +184 │ │ │ │ │ +185 │ │ │ │ │ +186 // Iterator (real) │ │ │ │ │ +187 // --------------- │ │ │ │ │ +188 │ │ │ │ │ +189 template< class HostGridView, int codim, PartitionIteratorType pitype, │ │ │ │ │ +class G > │ │ │ │ │ +_1_9_0 class _I_t_e_r_a_t_o_r< HostGridView, codim, pitype, G, false > │ │ │ │ │ +191 { │ │ │ │ │ +192 typedef typename std::remove_const< G >::type::Traits Traits; │ │ │ │ │ +193 │ │ │ │ │ +194 public: │ │ │ │ │ +_1_9_5 typedef typename Traits::Grid _G_r_i_d; │ │ │ │ │ +196 │ │ │ │ │ +_1_9_7 static const int codimension = codim; │ │ │ │ │ +198 │ │ │ │ │ +_1_9_9 typedef typename Traits::template Codim< codimension >::Entity _E_n_t_i_t_y; │ │ │ │ │ +200 │ │ │ │ │ +_2_0_1 static const bool fake = false; │ │ │ │ │ +202 │ │ │ │ │ +203 private: │ │ │ │ │ +204 typedef _G_e_o_G_r_i_d_:_:_E_n_t_i_t_y_<_ _c_o_d_i_m_e_n_s_i_o_n_,_ _T_r_a_i_t_s_:_:_d_i_m_e_n_s_i_o_n_,_ _G_ _> _E_n_t_i_t_y_I_m_p_l; │ │ │ │ │ +205 │ │ │ │ │ +206 typedef typename HostGridView::template Codim< codim >::template Partition< │ │ │ │ │ +pitype >::Iterator HostEntityIterator; │ │ │ │ │ +207 │ │ │ │ │ +208 public: │ │ │ │ │ +_2_0_9 _I_t_e_r_a_t_o_r () : grid_( nullptr ) {} │ │ │ │ │ +210 │ │ │ │ │ +_2_1_1 _I_t_e_r_a_t_o_r ( const _G_r_i_d &grid, HostEntityIterator hostEntityIterator ) │ │ │ │ │ +212 : grid_( &grid ), │ │ │ │ │ +213 hostEntityIterator_( _s_t_d::move( hostEntityIterator ) ) │ │ │ │ │ +214 {} │ │ │ │ │ +215 │ │ │ │ │ +_2_1_6 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +217 { │ │ │ │ │ +218 ++hostEntityIterator_; │ │ │ │ │ +219 } │ │ │ │ │ +220 │ │ │ │ │ +_2_2_1 bool _e_q_u_a_l_s ( const _I_t_e_r_a_t_o_r &rhs ) const │ │ │ │ │ +222 { │ │ │ │ │ +223 return hostEntityIterator_ == rhs.hostEntityIterator_; │ │ │ │ │ +224 } │ │ │ │ │ +225 │ │ │ │ │ +_2_2_6 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ +227 { │ │ │ │ │ +228 return _E_n_t_i_t_y_I_m_p_l( grid(), *hostEntityIterator_ ); │ │ │ │ │ +229 } │ │ │ │ │ +230 │ │ │ │ │ +_2_3_1 int _l_e_v_e_l () const { return hostEntityIterator_.level(); } │ │ │ │ │ +232 │ │ │ │ │ +_2_3_3 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ +234 { │ │ │ │ │ +235 assert( grid_ ); │ │ │ │ │ +236 return *grid_; │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +_2_3_9 static _I_t_e_r_a_t_o_r _b_e_g_i_n ( const _G_r_i_d &grid, const HostGridView &hostGridView │ │ │ │ │ +) │ │ │ │ │ +240 { │ │ │ │ │ +241 HostEntityIterator hostEntityIterator = hostGridView.template begin< │ │ │ │ │ +codimension, pitype >(); │ │ │ │ │ +242 return _I_t_e_r_a_t_o_r( grid, std::move( hostEntityIterator ) ); │ │ │ │ │ +243 } │ │ │ │ │ +244 │ │ │ │ │ +_2_4_5 static _I_t_e_r_a_t_o_r _e_n_d ( const _G_r_i_d &grid, const HostGridView &hostGridView ) │ │ │ │ │ +246 { │ │ │ │ │ +247 HostEntityIterator hostEntityIterator = hostGridView.template end< │ │ │ │ │ +codimension, pitype >(); │ │ │ │ │ +248 return _I_t_e_r_a_t_o_r( grid, std::move( hostEntityIterator ) ); │ │ │ │ │ +249 } │ │ │ │ │ +250 │ │ │ │ │ +251 private: │ │ │ │ │ +252 const _G_r_i_d *grid_; │ │ │ │ │ +253 HostEntityIterator hostEntityIterator_; │ │ │ │ │ +254 }; │ │ │ │ │ +255 │ │ │ │ │ +256 │ │ │ │ │ +257 │ │ │ │ │ +258 // Iterator (fake) │ │ │ │ │ +259 // --------------- │ │ │ │ │ +260 │ │ │ │ │ +261 template< class HostGridView, int codim, PartitionIteratorType pitype, │ │ │ │ │ +class G > │ │ │ │ │ +_2_6_2 class _I_t_e_r_a_t_o_r< HostGridView, codim, pitype, G, true > │ │ │ │ │ +263 { │ │ │ │ │ +264 typedef typename std::remove_const< G >::type::Traits Traits; │ │ │ │ │ +265 │ │ │ │ │ +266 public: │ │ │ │ │ +_2_6_7 typedef typename Traits::Grid _G_r_i_d; │ │ │ │ │ +268 │ │ │ │ │ +_2_6_9 static const int codimension = codim; │ │ │ │ │ +270 │ │ │ │ │ +_2_7_1 typedef typename Traits::template Codim< codimension >::Entity _E_n_t_i_t_y; │ │ │ │ │ +272 │ │ │ │ │ +273 private: │ │ │ │ │ +274 typedef _G_e_o_G_r_i_d_:_:_E_n_t_i_t_y_<_ _c_o_d_i_m_e_n_s_i_o_n_,_ _T_r_a_i_t_s_:_:_d_i_m_e_n_s_i_o_n_,_ _G_ _> _E_n_t_i_t_y_I_m_p_l; │ │ │ │ │ +275 │ │ │ │ │ +276 typedef _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _t_y_p_e_n_a_m_e_ _H_o_s_t_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ +_> _F_i_l_t_e_r; │ │ │ │ │ +277 │ │ │ │ │ +278 typedef typename HostGridView::template Codim<0>::template Partition< │ │ │ │ │ +Filter::Element_Partition >::Iterator HostElementIterator; │ │ │ │ │ +279 typedef typename HostElementIterator::Entity HostElement; │ │ │ │ │ +280 typedef typename HostGridView::IndexSet HostIndexSet; │ │ │ │ │ +281 │ │ │ │ │ +282 public: │ │ │ │ │ +_2_8_3 _I_t_e_r_a_t_o_r () : grid_( nullptr ), subEntity_( -1 ), hostIndexSet_( nullptr ) │ │ │ │ │ +{} │ │ │ │ │ +284 │ │ │ │ │ +_2_8_5 _I_t_e_r_a_t_o_r ( const _G_r_i_d &grid, HostElementIterator hostElementIterator, │ │ │ │ │ +HostElementIterator hostEnd, const HostIndexSet &hostIndexSet ) │ │ │ │ │ +286 : grid_( &grid ), │ │ │ │ │ +287 hostElementIterator_( hostElementIterator ), │ │ │ │ │ +288 hostEnd_( hostEnd ), │ │ │ │ │ +289 subEntity_( -1 ), │ │ │ │ │ +290 hostIndexSet_( &hostIndexSet ) │ │ │ │ │ +291 { │ │ │ │ │ +292 if( hostElementIterator_ != hostEnd_ ) │ │ │ │ │ +293 { │ │ │ │ │ +294 visited_.resize( hostIndexSet_->size( codimension ), false ); │ │ │ │ │ +295 increment(); │ │ │ │ │ +296 } │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +_2_9_9 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +300 { │ │ │ │ │ +301 typedef typename Traits::ctype ctype; │ │ │ │ │ +302 │ │ │ │ │ +303 while( hostElementIterator_ != hostEnd_ ) │ │ │ │ │ +304 { │ │ │ │ │ +305 const HostElement &hostElement = *hostElementIterator_; │ │ │ │ │ +306 │ │ │ │ │ +307 auto refElement = referenceElement< ctype, Traits::dimension > │ │ │ │ │ +( hostElement.type() ); │ │ │ │ │ +308 │ │ │ │ │ +309 ++subEntity_; │ │ │ │ │ +310 const int count = refElement.size( codimension ); │ │ │ │ │ +311 for( ; subEntity_ < count; ++subEntity_ ) │ │ │ │ │ +312 { │ │ │ │ │ +313 if( !Filter::apply( refElement, hostElement, subEntity_ ) ) │ │ │ │ │ +314 continue; │ │ │ │ │ +315 │ │ │ │ │ +316 const size_t index = hostIndexSet_->subIndex( hostElement, subEntity_, │ │ │ │ │ +codimension ); │ │ │ │ │ +317 if( !visited_[ index ] ) │ │ │ │ │ +318 { │ │ │ │ │ +319 visited_[ index ] = true; │ │ │ │ │ +320 return; │ │ │ │ │ +321 } │ │ │ │ │ +322 } │ │ │ │ │ +323 ++hostElementIterator_; │ │ │ │ │ +324 subEntity_ = -1; │ │ │ │ │ +325 } │ │ │ │ │ +326 } │ │ │ │ │ +327 │ │ │ │ │ +_3_2_8 bool _e_q_u_a_l_s ( const _I_t_e_r_a_t_o_r &rhs ) const │ │ │ │ │ +329 { │ │ │ │ │ +330 return hostElementIterator_ == rhs.hostElementIterator_ && │ │ │ │ │ +( hostElementIterator_ == hostEnd_ || subEntity_ == rhs.subEntity_ ); │ │ │ │ │ +331 } │ │ │ │ │ +332 │ │ │ │ │ +_3_3_3 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ +334 { │ │ │ │ │ +335 return _E_n_t_i_t_y_I_m_p_l( grid(), *hostElementIterator_, subEntity_ ); │ │ │ │ │ +336 } │ │ │ │ │ +337 │ │ │ │ │ +_3_3_8 int _l_e_v_e_l () const { return hostElementIterator_.level(); } │ │ │ │ │ +339 │ │ │ │ │ +_3_4_0 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ +341 { │ │ │ │ │ +342 assert( grid_ ); │ │ │ │ │ +343 return *grid_; │ │ │ │ │ +344 } │ │ │ │ │ +345 │ │ │ │ │ +_3_4_6 static _I_t_e_r_a_t_o_r _b_e_g_i_n ( const _G_r_i_d &grid, const HostGridView &hostGridView │ │ │ │ │ +) │ │ │ │ │ +347 { │ │ │ │ │ +348 HostElementIterator first = hostGridView.template begin< 0, Filter:: │ │ │ │ │ +Element_Partition >(); │ │ │ │ │ +349 HostElementIterator last = hostGridView.template end< 0, Filter:: │ │ │ │ │ +Element_Partition >(); │ │ │ │ │ +350 return _I_t_e_r_a_t_o_r( grid, std::move( first ), std::move( last ), │ │ │ │ │ +hostGridView.indexSet() ); │ │ │ │ │ +351 } │ │ │ │ │ +352 │ │ │ │ │ +_3_5_3 static _I_t_e_r_a_t_o_r _e_n_d ( const _G_r_i_d &grid, const HostGridView &hostGridView ) │ │ │ │ │ +354 { │ │ │ │ │ +355 HostElementIterator last = hostGridView.template end< 0, Filter:: │ │ │ │ │ +Element_Partition >(); │ │ │ │ │ +356 return _I_t_e_r_a_t_o_r( grid, last, last, hostGridView.indexSet() ); │ │ │ │ │ +357 } │ │ │ │ │ +358 │ │ │ │ │ +359 private: │ │ │ │ │ +360 const _G_r_i_d *grid_; │ │ │ │ │ +361 HostElementIterator hostElementIterator_, hostEnd_; │ │ │ │ │ +362 int subEntity_; │ │ │ │ │ +363 const HostIndexSet *hostIndexSet_; │ │ │ │ │ +364 std::vector< bool > visited_; │ │ │ │ │ +365 }; │ │ │ │ │ +366 │ │ │ │ │ +367 │ │ │ │ │ +368 │ │ │ │ │ +369 // HierarchicIterator │ │ │ │ │ +370 // ------------------ │ │ │ │ │ +371 │ │ │ │ │ +372 template< class G > │ │ │ │ │ +_3_7_3 class _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +374 { │ │ │ │ │ +375 typedef typename std::remove_const< G >::type::Traits Traits; │ │ │ │ │ +376 │ │ │ │ │ +377 public: │ │ │ │ │ +_3_7_8 typedef typename Traits::Grid _G_r_i_d; │ │ │ │ │ +379 │ │ │ │ │ +_3_8_0 static const int _c_o_d_i_m_e_n_s_i_o_n = 0; │ │ │ │ │ +381 │ │ │ │ │ +_3_8_2 typedef typename Traits::template Codim< codimension >::Entity _E_n_t_i_t_y; │ │ │ │ │ +383 │ │ │ │ │ +384 private: │ │ │ │ │ +385 typedef _G_e_o_G_r_i_d_:_:_E_n_t_i_t_y_<_ _c_o_d_i_m_e_n_s_i_o_n_,_ _T_r_a_i_t_s_:_:_d_i_m_e_n_s_i_o_n_,_ _G_ _> _E_n_t_i_t_y_I_m_p_l; │ │ │ │ │ +386 │ │ │ │ │ +387 typedef typename Grid::HostGrid::HierarchicIterator HostEntityIterator; │ │ │ │ │ +388 │ │ │ │ │ +389 public: │ │ │ │ │ +_3_9_0 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () : grid_( nullptr ) {} │ │ │ │ │ +391 │ │ │ │ │ +_3_9_2 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const _G_r_i_d &_g_r_i_d, HostEntityIterator │ │ │ │ │ +hostEntityIterator ) │ │ │ │ │ +393 : grid_( &_g_r_i_d ), │ │ │ │ │ +394 hostEntityIterator_( _s_t_d::move( hostEntityIterator ) ) │ │ │ │ │ +395 {} │ │ │ │ │ +396 │ │ │ │ │ +_3_9_7 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +398 { │ │ │ │ │ +399 ++hostEntityIterator_; │ │ │ │ │ +400 } │ │ │ │ │ +401 │ │ │ │ │ +_4_0_2 bool _e_q_u_a_l_s ( const _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r &rhs ) const │ │ │ │ │ +403 { │ │ │ │ │ +404 return hostEntityIterator_ == rhs.hostEntityIterator_; │ │ │ │ │ +405 } │ │ │ │ │ +406 │ │ │ │ │ +_4_0_7 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ +408 { │ │ │ │ │ +409 return _E_n_t_i_t_y_I_m_p_l( _g_r_i_d(), *hostEntityIterator_ ); │ │ │ │ │ +410 } │ │ │ │ │ +411 │ │ │ │ │ +_4_1_2 int _l_e_v_e_l () const { return hostEntityIterator_.level(); } │ │ │ │ │ +413 │ │ │ │ │ +_4_1_4 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ +415 { │ │ │ │ │ +416 assert( grid_ ); │ │ │ │ │ +417 return *grid_; │ │ │ │ │ +418 } │ │ │ │ │ +419 │ │ │ │ │ +420 private: │ │ │ │ │ +421 const _G_r_i_d *grid_; │ │ │ │ │ +422 HostEntityIterator hostEntityIterator_; │ │ │ │ │ +423 }; │ │ │ │ │ +424 │ │ │ │ │ +425 } // namespace GeoGrid │ │ │ │ │ +426 │ │ │ │ │ +427} // namespace Dune │ │ │ │ │ +428 │ │ │ │ │ +429#endif // #ifndef DUNE_GEOGRID_ITERATOR_HH │ │ │ │ │ +_d_e_c_l_a_r_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ │ +PartitionIteratorType │ │ │ │ │ +Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ All_Partition │ │ │ │ │ +all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ OverlapFront_Partition │ │ │ │ │ +interior, border, overlap and front entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Interior_Partition │ │ │ │ │ +only interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ InteriorBorder_Partition │ │ │ │ │ +interior and border entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Overlap_Partition │ │ │ │ │ +interior, border, and overlap entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Ghost_Partition │ │ │ │ │ +only ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ +@ InteriorEntity │ │ │ │ │ +all interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +@ GhostEntity │ │ │ │ │ +ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ +@ BorderEntity │ │ │ │ │ +on boundary between interior and overlap │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ │ +@ OverlapEntity │ │ │ │ │ +all entities lying in the overlap zone │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:33 │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s │ │ │ │ │ -DDeeffiinniittiioonn hostcorners.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn hostcorners.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -Coordinate operator[](int i) const │ │ │ │ │ -DDeeffiinniittiioonn hostcorners.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_:_:_H_o_s_t_C_o_r_n_e_r_s │ │ │ │ │ -HostCorners(const HostEntity &hostEntity) │ │ │ │ │ -DDeeffiinniittiioonn hostcorners.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -HostGeometry::GlobalCoordinate Coordinate │ │ │ │ │ -DDeeffiinniittiioonn hostcorners.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -DDeeffiinniittiioonn hostcorners.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_E_n_t_i_t_y │ │ │ │ │ +DUNE-conform implementation of the entity. │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/entity.hh:694 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:374 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int codimension │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:380 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:412 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:397 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const HierarchicIterator &rhs) const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:402 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity dereference() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:407 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +HierarchicIterator() │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +HierarchicIterator(const Grid &grid, HostEntityIterator hostEntityIterator) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:392 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:378 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:414 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +Traits::template Codim< codimension >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:382 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_c_t_y_p_e │ │ │ │ │ +std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_E_l_e_m_e_n_t │ │ │ │ │ +std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_a_p_p_l_y │ │ │ │ │ +static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ +_>_:_:_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ +_>_:_:_a_p_p_l_y │ │ │ │ │ +static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ +_>_:_:_c_t_y_p_e │ │ │ │ │ +std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ +_>_:_:_E_l_e_m_e_n_t │ │ │ │ │ +std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_E_l_e_m_e_n_t │ │ │ │ │ +std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_c_t_y_p_e │ │ │ │ │ +std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_E_l_e_m_e_n_t │ │ │ │ │ +std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_c_t_y_p_e │ │ │ │ │ +std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_a_p_p_l_y │ │ │ │ │ +static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_c_t_y_p_e │ │ │ │ │ +std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_E_l_e_m_e_n_t │ │ │ │ │ +std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_E_l_e_m_e_n_t │ │ │ │ │ +std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_c_t_y_p_e │ │ │ │ │ +std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:169 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator() │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:209 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity dereference() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:226 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:216 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const Iterator &rhs) const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:221 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_b_e_g_i_n │ │ │ │ │ +static Iterator begin(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:239 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +Traits::template Codim< codimension >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:233 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_e_n_d │ │ │ │ │ +static Iterator end(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:245 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator(const Grid &grid, HostEntityIterator hostEntityIterator) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:211 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:267 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:338 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:340 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_e_n_d │ │ │ │ │ +static Iterator end(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:353 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_b_e_g_i_n │ │ │ │ │ +static Iterator begin(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const Iterator &rhs) const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:328 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity dereference() const │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:333 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator(const Grid &grid, HostElementIterator hostElementIterator, │ │ │ │ │ +HostElementIterator hostEnd, const HostIndexSet &hostIndexSet) │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +Traits::template Codim< codimension >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator() │ │ │ │ │ +DDeeffiinniittiioonn iterator.hh:283 │ │ │ │ │ +_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ _e_n_t_i_t_y_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: declaration.hh File Reference │ │ │ │ +dune-grid: coordfunctioncaller.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,25 +71,30 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
declaration.hh File Reference
│ │ │ │ +
coordfunctioncaller.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ +
#include <dune/grid/geometrygrid/hostcorners.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,15 +2,20 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -declaration.hh File Reference │ │ │ │ │ +coordfunctioncaller.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_h_o_s_t_c_o_r_n_e_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_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_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ +  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: declaration.hh Source File │ │ │ │ +dune-grid: coordfunctioncaller.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,34 +74,123 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
declaration.hh
│ │ │ │ +
coordfunctioncaller.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GEOGRID_DECLARATION_HH
│ │ │ │ -
6#define DUNE_GEOGRID_DECLARATION_HH
│ │ │ │ +
5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ │ +
6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ │
7
│ │ │ │ -
8namespace Dune
│ │ │ │ -
9{
│ │ │ │ + │ │ │ │ + │ │ │ │
10
│ │ │ │ -
11 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ -
12 class GeometryGrid;
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │
13
│ │ │ │ -
14} // namespace Dune
│ │ │ │ -
15
│ │ │ │ -
16#endif // #ifndef DUNE_GEOGRID_DECLARATION_HH
│ │ │ │ +
14 namespace GeoGrid
│ │ │ │ +
15 {
│ │ │ │ +
16
│ │ │ │ +
17 // CoordFunctionCaller
│ │ │ │ +
18 // -------------------
│ │ │ │ +
19
│ │ │ │ +
20 template< class HostEntity, class CoordFunctionInterface >
│ │ │ │ + │ │ │ │ +
22
│ │ │ │ +
23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ +
24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
│ │ │ │ +
25 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29 static const int codimension = HostEntity::codimension;
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ +
32 typedef typename CoordFunctionInterface::RangeVector RangeVector;
│ │ │ │ +
33
│ │ │ │ +
34 CoordFunctionCaller ( const HostEntity &hostEntity,
│ │ │ │ +
35 const CoordFunctionInterface &coordFunction )
│ │ │ │ +
36 : hostCorners_( hostEntity ),
│ │ │ │ +
37 coordFunction_( coordFunction )
│ │ │ │ +
38 {}
│ │ │ │ +
39
│ │ │ │ +
40 void evaluate ( unsigned int i, RangeVector &y ) const
│ │ │ │ +
41 {
│ │ │ │ +
42 coordFunction_.evaluate( hostCorners_[ i ], y );
│ │ │ │ +
43 }
│ │ │ │ +
44
│ │ │ │ +
45 GeometryType type () const
│ │ │ │ +
46 {
│ │ │ │ +
47 return hostCorners_.type();
│ │ │ │ +
48 }
│ │ │ │ +
49
│ │ │ │ +
50 std::size_t size () const
│ │ │ │ +
51 {
│ │ │ │ +
52 return hostCorners_.size();
│ │ │ │ +
53 }
│ │ │ │ +
54
│ │ │ │ +
55 private:
│ │ │ │ +
56 const HostCorners< HostEntity > hostCorners_;
│ │ │ │ +
57 const CoordFunctionInterface &coordFunction_;
│ │ │ │ +
58 };
│ │ │ │ +
59
│ │ │ │ +
60 template< class HostEntity, class ct, unsigned int dimR, class Impl >
│ │ │ │ +
61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ +
62 {
│ │ │ │ +
63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
│ │ │ │ +
64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
│ │ │ │ +
65
│ │ │ │ +
66 typedef typename CoordFunctionInterface::RangeVector RangeVector;
│ │ │ │ +
67
│ │ │ │ +
68 public:
│ │ │ │ +
69 CoordFunctionCaller ( const HostEntity &hostEntity,
│ │ │ │ +
70 const CoordFunctionInterface &coordFunction )
│ │ │ │ +
71 : hostEntity_( hostEntity ),
│ │ │ │ +
72 coordFunction_( coordFunction )
│ │ │ │ +
73 {}
│ │ │ │ +
74
│ │ │ │ +
75 void evaluate ( unsigned int i, RangeVector &y ) const
│ │ │ │ +
76 {
│ │ │ │ +
77 coordFunction_.evaluate( hostEntity_, i, y );
│ │ │ │ +
78 }
│ │ │ │ +
79
│ │ │ │ +
80 GeometryType type () const
│ │ │ │ +
81 {
│ │ │ │ +
82 return hostEntity_.type();
│ │ │ │ +
83 }
│ │ │ │ +
84
│ │ │ │ +
85 std::size_t size () const
│ │ │ │ +
86 {
│ │ │ │ +
87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
│ │ │ │ +
88 return refElement.size( HostEntity::mydimension );
│ │ │ │ +
89 }
│ │ │ │ +
90
│ │ │ │ +
91 private:
│ │ │ │ +
92 const HostEntity &hostEntity_;
│ │ │ │ +
93 const CoordFunctionInterface &coordFunction_;
│ │ │ │ +
94 };
│ │ │ │ +
95
│ │ │ │ +
96 } // namespace GeoGrid
│ │ │ │ +
97
│ │ │ │ +
98} // namespace Dune
│ │ │ │ +
99
│ │ │ │ +
100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
GeometryType
Type representing VTK's entity geometry types.
Definition common.hh:132
│ │ │ │ +
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
Definition coordfunction.hh:44
│ │ │ │ +
Definition coordfunctioncaller.hh:21
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,31 +1,132 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -declaration.hh │ │ │ │ │ +coordfunctioncaller.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GEOGRID_DECLARATION_HH │ │ │ │ │ -6#define DUNE_GEOGRID_DECLARATION_HH │ │ │ │ │ +5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ │ +6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ │ 7 │ │ │ │ │ -8namespace _D_u_n_e │ │ │ │ │ -9{ │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_h_o_s_t_c_o_r_n_e_r_s_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ 10 │ │ │ │ │ -11 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ -12 class GeometryGrid; │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ 13 │ │ │ │ │ -14} // namespace Dune │ │ │ │ │ -15 │ │ │ │ │ -16#endif // #ifndef DUNE_GEOGRID_DECLARATION_HH │ │ │ │ │ +14 namespace GeoGrid │ │ │ │ │ +15 { │ │ │ │ │ +16 │ │ │ │ │ +17 // CoordFunctionCaller │ │ │ │ │ +18 // ------------------- │ │ │ │ │ +19 │ │ │ │ │ +20 template< class HostEntity, class CoordFunctionInterface > │ │ │ │ │ +_2_1 class _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r; │ │ │ │ │ +22 │ │ │ │ │ +23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR, │ │ │ │ │ +class Impl > │ │ │ │ │ +24 class _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r< HostEntity, _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e< ct, │ │ │ │ │ +dimD, dimR, Impl > > │ │ │ │ │ +25 { │ │ │ │ │ +26 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ +CoordFunctionInterface; │ │ │ │ │ +27 typedef _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r_<_ _H_o_s_t_E_n_t_i_t_y_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_ _> This; │ │ │ │ │ +28 │ │ │ │ │ +29 static const int codimension = HostEntity::codimension; │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef typename CoordFunctionInterface::RangeVector RangeVector; │ │ │ │ │ +33 │ │ │ │ │ +34 _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r ( const HostEntity &hostEntity, │ │ │ │ │ +35 const CoordFunctionInterface &coordFunction ) │ │ │ │ │ +36 : hostCorners_( hostEntity ), │ │ │ │ │ +37 coordFunction_( coordFunction ) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +40 void evaluate ( unsigned int i, RangeVector &y ) const │ │ │ │ │ +41 { │ │ │ │ │ +42 coordFunction_.evaluate( hostCorners_[ i ], y ); │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +45 GeometryType type () const │ │ │ │ │ +46 { │ │ │ │ │ +47 return hostCorners_.type(); │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +50 std::size_t size () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return hostCorners_.size(); │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +55 private: │ │ │ │ │ +56 const HostCorners< HostEntity > hostCorners_; │ │ │ │ │ +57 const CoordFunctionInterface &coordFunction_; │ │ │ │ │ +58 }; │ │ │ │ │ +59 │ │ │ │ │ +60 template< class HostEntity, class ct, unsigned int dimR, class Impl > │ │ │ │ │ +61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, │ │ │ │ │ +dimR, Impl > > │ │ │ │ │ +62 { │ │ │ │ │ +63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > │ │ │ │ │ +CoordFunctionInterface; │ │ │ │ │ +64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This; │ │ │ │ │ +65 │ │ │ │ │ +66 typedef typename CoordFunctionInterface::RangeVector RangeVector; │ │ │ │ │ +67 │ │ │ │ │ +68 public: │ │ │ │ │ +69 CoordFunctionCaller ( const HostEntity &hostEntity, │ │ │ │ │ +70 const CoordFunctionInterface &coordFunction ) │ │ │ │ │ +71 : hostEntity_( hostEntity ), │ │ │ │ │ +72 coordFunction_( coordFunction ) │ │ │ │ │ +73 {} │ │ │ │ │ +74 │ │ │ │ │ +75 void evaluate ( unsigned int i, RangeVector &y ) const │ │ │ │ │ +76 { │ │ │ │ │ +77 coordFunction_.evaluate( hostEntity_, i, y ); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +80 _G_e_o_m_e_t_r_y_T_y_p_e type () const │ │ │ │ │ +81 { │ │ │ │ │ +82 return hostEntity_.type(); │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +85 std::size_t size () const │ │ │ │ │ +86 { │ │ │ │ │ +87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() ); │ │ │ │ │ +88 return refElement.size( HostEntity::mydimension ); │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +91 private: │ │ │ │ │ +92 const HostEntity &hostEntity_; │ │ │ │ │ +93 const CoordFunctionInterface &coordFunction_; │ │ │ │ │ +94 }; │ │ │ │ │ +95 │ │ │ │ │ +96 } // namespace GeoGrid │ │ │ │ │ +97 │ │ │ │ │ +98} // namespace Dune │ │ │ │ │ +99 │ │ │ │ │ +100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ │ +_h_o_s_t_c_o_r_n_e_r_s_._h_h │ │ │ │ │ +_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GeometryType │ │ │ │ │ +Type representing VTK's entity geometry types. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ +Interface class for using an analytical function to define the geometry of a │ │ │ │ │ +Dune::GeometryGrid.... │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r │ │ │ │ │ +DDeeffiinniittiioonn coordfunctioncaller.hh:21 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.hh File Reference │ │ │ │ +dune-grid: meshpointer.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,49 +70,29 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
meshpointer.hh File Reference
│ │ │ │ +
meshpointer.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

provides a wrapper for ALBERTA's mesh structure │ │ │ │ -More...

│ │ │ │ -
#include <limits>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │ -#include <dune/grid/albertagrid/projection.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::Alberta::MeshPointer< dim >
 
class  Dune::Alberta::MeshPointer< dim >::MacroIterator
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

provides a wrapper for ALBERTA's mesh structure

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +1,19 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -meshpointer.hh File Reference │ │ │ │ │ -provides a wrapper for ALBERTA's mesh structure _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_p_r_o_j_e_c_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_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ -  │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +meshpointer.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ - Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometry.cc File Reference │ │ │ │ +dune-grid: coordcache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,58 +71,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
geometry.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
coordcache.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │ -#include <dune/grid/albertagrid/geometry.hh>
│ │ │ │ -#include <dune/grid/albertagrid/refinement.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ +#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
class  Dune::Alberta::CoordCache< dim >
 
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
class  Dune::Alberta::CoordCache< dim >::LocalCaching
 
struct  Dune::Alberta::CoordCache< dim >::Interpolation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Macros

#define DUNE_ALBERTA_GEOMETRY_CC
 
namespace  Dune::Alberta
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_ALBERTA_GEOMETRY_CC

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,28 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ -geometry.cc File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_r_e_f_i_n_e_m_e_n_t_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +coordcache.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _>_:_: │ │ │ │ │ - _G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _>_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d │ │ │ │ │ - _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_ _>_:_:_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_ _>_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A___G_E_O_M_E_T_R_Y___C_C │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__GGEEOOMMEETTRRYY__CCCC ********** │ │ │ │ │ -#define DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometry.cc Source File │ │ │ │ +dune-grid: coordcache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,344 +74,225 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
geometry.cc
│ │ │ │ +
coordcache.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ -
6#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ +
5#ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ +
6#define DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 // AlbertaGridGeometry
│ │ │ │ -
16 // -------------------
│ │ │ │ -
17
│ │ │ │ -
18 // print the GeometryInformation
│ │ │ │ -
19 template <int mydim, int cdim, class GridImp>
│ │ │ │ -
│ │ │ │ -
20 inline void AlbertaGridGeometry<mydim,cdim,GridImp>::print (std::ostream& ss) const
│ │ │ │ -
21 {
│ │ │ │ -
22 ss << "AlbertaGridGeometry<" << mydim << "," << cdim << "> = { \n";
│ │ │ │ -
23 for(int i=0; i<corners(); i++)
│ │ │ │ -
24 {
│ │ │ │ -
25 ss << " corner " << i << " = ";
│ │ │ │ -
26 ss << ((*this)[i]); ss << "\n";
│ │ │ │ -
27 }
│ │ │ │ -
28 ss << "} \n";
│ │ │ │ -
29 }
│ │ │ │ -
│ │ │ │ -
30
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 namespace Alberta
│ │ │ │ +
18 {
│ │ │ │ +
19
│ │ │ │ +
20 // CoordCache
│ │ │ │ +
21 // ----------
│ │ │ │ +
22
│ │ │ │ +
23 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29 class LocalCaching;
│ │ │ │ +
30 struct Interpolation;
│ │ │ │
31
│ │ │ │ -
32 template< int mydim, int cdim, class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {
│ │ │ │ -
36 GlobalCoordinate y = corner( 0 );
│ │ │ │ -
37 jacobianTransposed().umtv( local, y );
│ │ │ │ -
38 return y;
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
41
│ │ │ │ -
42 //local implementation for mydim < cdim
│ │ │ │ -
43 template< int mydim, int cdim, class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
46 {
│ │ │ │ - │ │ │ │ -
48 jacobianInverseTransposed().mtv( global - corner( 0 ), x );
│ │ │ │ -
49 return x;
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52
│ │ │ │ -
53 template< int mydim, int cdim, class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 {
│ │ │ │ -
57 if( !builtJT_ )
│ │ │ │ -
58 {
│ │ │ │ -
59 const FieldVector< ctype, coorddimension > &origin = coord_[ 0 ];
│ │ │ │ -
60 for( int i = 0; i < mydimension; ++i )
│ │ │ │ -
61 {
│ │ │ │ -
62 jT_[ i ] = coord_[ i+1 ];
│ │ │ │ -
63 jT_[ i ] -= origin;
│ │ │ │ -
64 }
│ │ │ │ -
65 builtJT_ = true;
│ │ │ │ -
66 }
│ │ │ │ -
67 return jT_;
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
70
│ │ │ │ -
71 template< int mydim, int cdim, class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
74 {
│ │ │ │ -
75 if( !builtJTInv_ )
│ │ │ │ -
76 {
│ │ │ │ -
77 elDet_ = std::abs( Alberta::invert( jacobianTransposed(), jTInv_ ) );
│ │ │ │ -
78 assert( elDet_ > 1.0e-25 );
│ │ │ │ -
79 calcedDet_ = true;
│ │ │ │ -
80 builtJTInv_ = true;
│ │ │ │ -
81 }
│ │ │ │ -
82 return jTInv_;
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ +
32 public:
│ │ │ │ +
33 static const int dimension = dim;
│ │ │ │ +
34
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
39 GlobalVector &operator() ( const Element *element, int vertex ) const
│ │ │ │ +
40 {
│ │ │ │ +
41 assert( !(!coords_) );
│ │ │ │ +
42 GlobalVector *array = (GlobalVector *)coords_;
│ │ │ │ +
43 return array[ dofAccess_( element, vertex ) ];
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
46 GlobalVector &operator() ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ │ +
47 {
│ │ │ │ +
48 return (*this)( elementInfo.el(), vertex );
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 void create ( const DofNumbering &dofNumbering )
│ │ │ │ +
52 {
│ │ │ │ +
53 MeshPointer mesh = dofNumbering.mesh();
│ │ │ │ +
54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );
│ │ │ │ +
55
│ │ │ │ +
56 coords_.create( dofSpace, "Coordinate Cache" );
│ │ │ │ +
57 LocalCaching localCaching( coords_ );
│ │ │ │ + │ │ │ │ +
59 coords_.template setupInterpolation< Interpolation >();
│ │ │ │ +
60
│ │ │ │ +
61 dofAccess_ = DofAccess( dofSpace );
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
64 void release ()
│ │ │ │ +
65 {
│ │ │ │ +
66 coords_.release();
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
69 private:
│ │ │ │ +
70 CoordVectorPointer coords_;
│ │ │ │ +
71 DofAccess dofAccess_;
│ │ │ │ +
72 };
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
74
│ │ │ │ +
75
│ │ │ │ +
76 // CoordCache::LocalCaching
│ │ │ │ +
77 // ------------------------
│ │ │ │ +
78
│ │ │ │ +
79 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
81 {
│ │ │ │ +
82 CoordVectorPointer coords_;
│ │ │ │ +
83 DofAccess dofAccess_;
│ │ │ │
84
│ │ │ │ -
85
│ │ │ │ -
86 // built Geometry
│ │ │ │ -
87 template< int mydim, int cdim, class GridImp >
│ │ │ │ -
88 template< class CoordReader >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
90 ::build ( const CoordReader &coordReader )
│ │ │ │ -
91 {
│ │ │ │ -
92 builtJT_ = false;
│ │ │ │ -
93 builtJTInv_ = false;
│ │ │ │ -
94
│ │ │ │ -
95 // copy corners
│ │ │ │ -
96 for( int i = 0; i < numCorners; ++i )
│ │ │ │ -
97 coordReader.coordinate( i, coord_[ i ] );
│ │ │ │ -
98
│ │ │ │ -
99 // calculate centroid
│ │ │ │ -
100 centroid_ = coord_[ 0 ];
│ │ │ │ -
101 for( int i = 1; i < numCorners; ++i )
│ │ │ │ -
102 centroid_ += coord_[ i ];
│ │ │ │ -
103 centroid_ *= 1.0 / numCorners;
│ │ │ │ +
85 public:
│ │ │ │ +
│ │ │ │ +
86 explicit LocalCaching ( const CoordVectorPointer &coords )
│ │ │ │ +
87 : coords_( coords ),
│ │ │ │ +
88 dofAccess_( coords.dofSpace() )
│ │ │ │ +
89 {}
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
│ │ │ │ +
91 void operator() ( const ElementInfo &elementInfo ) const
│ │ │ │ +
92 {
│ │ │ │ +
93 GlobalVector *array = (GlobalVector *)coords_;
│ │ │ │ +
94 for( int i = 0; i < DofAccess::numSubEntities; ++i )
│ │ │ │ +
95 {
│ │ │ │ +
96 const GlobalVector &x = elementInfo.coordinate( i );
│ │ │ │ +
97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];
│ │ │ │ +
98 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ +
99 y[ i ] = x[ i ];
│ │ │ │ +
100 }
│ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
102 };
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │
104
│ │ │ │ -
105 elDet_ = (coordReader.hasDeterminant() ? coordReader.determinant() : elDeterminant());
│ │ │ │ -
106 assert( std::abs( elDet_ ) > 0.0 );
│ │ │ │ -
107 calcedDet_ = true;
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
110
│ │ │ │ -
111#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
112 template< int dim, int cdim >
│ │ │ │ - │ │ │ │ -
114 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::global ( const LocalCoordinate &local ) const
│ │ │ │ -
115 {
│ │ │ │ -
116 GlobalCoordinate y = corner( 0 );
│ │ │ │ -
117 jacobianTransposed().umtv( local, y );
│ │ │ │ -
118 return y;
│ │ │ │ -
119 }
│ │ │ │ -
120
│ │ │ │ +
105
│ │ │ │ +
106 // CoordCache::Interpolation
│ │ │ │ +
107 // -------------------------
│ │ │ │ +
108
│ │ │ │ +
109 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 {
│ │ │ │ +
112 static const int dimension = dim;
│ │ │ │ +
113
│ │ │ │ + │ │ │ │ +
115
│ │ │ │ +
116 static void
│ │ │ │ +
│ │ │ │ +
117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch )
│ │ │ │ +
118 {
│ │ │ │ +
119 DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ │ +
120 GlobalVector *array = (GlobalVector *)dofVector;
│ │ │ │
121
│ │ │ │ -
122 //local implementation for mydim < cdim
│ │ │ │ -
123 template< int dim, int cdim >
│ │ │ │ -
124 inline typename AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::LocalCoordinate
│ │ │ │ -
125 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::local ( const GlobalCoordinate &global ) const
│ │ │ │ -
126 {
│ │ │ │ -
127 LocalCoordinate x;
│ │ │ │ -
128 jacobianInverseTransposed().mtv( global - corner( 0 ), x );
│ │ │ │ -
129 return x;
│ │ │ │ -
130 }
│ │ │ │ -
131#endif // #if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
132
│ │ │ │ -
133
│ │ │ │ -
134
│ │ │ │ -
135 // AlbertaGridLocalGeometryProvider
│ │ │ │ -
136 // --------------------------------
│ │ │ │ -
137
│ │ │ │ -
138 template< class Grid >
│ │ │ │ -
139 void AlbertaGridLocalGeometryProvider< Grid >::buildGeometryInFather ()
│ │ │ │ -
140 {
│ │ │ │ -
141 for( int child = 0; child < numChildren; ++child )
│ │ │ │ -
142 {
│ │ │ │ -
143 for( int orientation = 0; orientation < 2; ++orientation )
│ │ │ │ -
144 {
│ │ │ │ -
145 const GeoInFatherCoordReader coordReader( child, orientation );
│ │ │ │ -
146 geometryInFather_[ child ][ orientation ] = new LocalElementGeometry( coordReader );
│ │ │ │ -
147 }
│ │ │ │ -
148 }
│ │ │ │ -
149 }
│ │ │ │ +
122 const Element *element = patch[ 0 ];
│ │ │ │ +
123
│ │ │ │ +
124 // new vertex is always the last one
│ │ │ │ +
125 assert( element->child[ 0 ] != NULL );
│ │ │ │ +
126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension ) ];
│ │ │ │ +
127
│ │ │ │ +
128 if( element->new_coord != NULL )
│ │ │ │ +
129 {
│ │ │ │ +
130 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ +
131 newCoord[ j ] = element->new_coord[ j ];
│ │ │ │ +
132 }
│ │ │ │ +
133 else
│ │ │ │ +
134 {
│ │ │ │ +
135 // new coordinate is the average of of old ones on the same edge
│ │ │ │ +
136 // refinement edge is always between vertices 0 and 1
│ │ │ │ +
137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
│ │ │ │ +
138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
│ │ │ │ +
139 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ +
140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
│ │ │ │ +
141 }
│ │ │ │ +
142 }
│ │ │ │ +
│ │ │ │ +
143 };
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
145 }
│ │ │ │ +
146
│ │ │ │ +
147}
│ │ │ │ +
148
│ │ │ │ +
149#endif // #if HAVE_ALBERTA
│ │ │ │
150
│ │ │ │ -
151
│ │ │ │ -
152 template< class Grid >
│ │ │ │ -
153 void AlbertaGridLocalGeometryProvider< Grid >::buildFaceGeometry ()
│ │ │ │ -
154 {
│ │ │ │ -
155 for( int face = 0; face < numFaces; ++face )
│ │ │ │ -
156 {
│ │ │ │ -
157 for( int twist = minFaceTwist; twist <= maxFaceTwist; ++twist )
│ │ │ │ -
158 {
│ │ │ │ -
159 const FaceCoordReader coordReader( face, twist );
│ │ │ │ -
160 faceGeometry_[ face ][ twist - minFaceTwist ] = new LocalFaceGeometry( coordReader );
│ │ │ │ -
161 }
│ │ │ │ -
162 }
│ │ │ │ -
163 }
│ │ │ │ -
164
│ │ │ │ -
165
│ │ │ │ -
166
│ │ │ │ -
167 // AlbertaGridLocalGeometryProvider::GeoInFatherCoordReader
│ │ │ │ -
168 // --------------------------------------------------------
│ │ │ │ -
169
│ │ │ │ -
170 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
172 {
│ │ │ │ - │ │ │ │ -
174
│ │ │ │ - │ │ │ │ -
176
│ │ │ │ -
177 private:
│ │ │ │ - │ │ │ │ -
179
│ │ │ │ -
180 public:
│ │ │ │ -
│ │ │ │ -
181 GeoInFatherCoordReader ( int child, int orientation )
│ │ │ │ -
182 : child_( child ),
│ │ │ │ -
183 orientation_( orientation )
│ │ │ │ -
184 {}
│ │ │ │ -
│ │ │ │ -
185
│ │ │ │ -
│ │ │ │ -
186 void coordinate ( int i, Coordinate &x ) const
│ │ │ │ -
187 {
│ │ │ │ -
188 const typename GeoInFather::LocalVector &coord
│ │ │ │ -
189 = GeoInFather::coordinate( child_, orientation_, i );
│ │ │ │ -
190 for( int j = 0; j < dimension; ++j )
│ │ │ │ -
191 x[ j ] = coord[ j ];
│ │ │ │ -
192 }
│ │ │ │ -
│ │ │ │ -
193
│ │ │ │ -
│ │ │ │ -
194 bool hasDeterminant () const
│ │ │ │ -
195 {
│ │ │ │ -
196 return false;
│ │ │ │ -
197 }
│ │ │ │ -
│ │ │ │ -
198
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 return ctype( 0 );
│ │ │ │ -
202 }
│ │ │ │ -
│ │ │ │ -
203
│ │ │ │ -
204 private:
│ │ │ │ -
205 const int child_;
│ │ │ │ -
206 const int orientation_;
│ │ │ │ -
207 };
│ │ │ │ -
│ │ │ │ -
208
│ │ │ │ -
209
│ │ │ │ -
210
│ │ │ │ -
211 // AlbertaGridLocalGeometryProvider::FaceCoordReader
│ │ │ │ -
212 // -------------------------------------------------
│ │ │ │ -
213
│ │ │ │ -
214 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
216 {
│ │ │ │ - │ │ │ │ -
218
│ │ │ │ - │ │ │ │ -
220
│ │ │ │ -
│ │ │ │ -
221 FaceCoordReader ( const int face, const int twist = 0 )
│ │ │ │ -
222 : face_( face ),
│ │ │ │ -
223 twist_( twist )
│ │ │ │ -
224 {}
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
│ │ │ │ -
226 void coordinate ( const int i, Coordinate &x ) const
│ │ │ │ -
227 {
│ │ │ │ -
228 const int ti = Alberta::applyInverseTwist< dimension-1 >( twist_, i );
│ │ │ │ -
229 const int j = mapVertices< 1 >( face_, ti );
│ │ │ │ -
230 refCorner( j, x );
│ │ │ │ -
231 }
│ │ │ │ -
│ │ │ │ -
232
│ │ │ │ -
│ │ │ │ -
233 bool hasDeterminant () const
│ │ │ │ -
234 {
│ │ │ │ -
235 return false;
│ │ │ │ -
236 }
│ │ │ │ -
│ │ │ │ -
237
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
239 {
│ │ │ │ -
240 return ctype( 0 );
│ │ │ │ -
241 }
│ │ │ │ -
│ │ │ │ -
242
│ │ │ │ -
243 private:
│ │ │ │ -
244 static void refCorner ( const int i, Coordinate &x )
│ │ │ │ -
245 {
│ │ │ │ -
246 x = ctype( 0 );
│ │ │ │ -
247 if( i > 0 )
│ │ │ │ -
248 x[ i-1 ] = ctype( 1 );
│ │ │ │ -
249 }
│ │ │ │ -
250
│ │ │ │ -
251 int face_;
│ │ │ │ -
252 int twist_;
│ │ │ │ -
253 };
│ │ │ │ -
│ │ │ │ -
254
│ │ │ │ -
255} // namespace Dune
│ │ │ │ -
256
│ │ │ │ -
257#endif // #ifndef DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │ +
151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's mesh structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ │ - │ │ │ │ -
FieldVector< ctype, dimension > Coordinate
Definition geometry.cc:175
│ │ │ │ - │ │ │ │ -
void coordinate(int i, Coordinate &x) const
Definition geometry.cc:186
│ │ │ │ -
GeoInFatherCoordReader(int child, int orientation)
Definition geometry.cc:181
│ │ │ │ -
bool hasDeterminant() const
Definition geometry.cc:194
│ │ │ │ -
ctype determinant() const
Definition geometry.cc:199
│ │ │ │ - │ │ │ │ -
FaceCoordReader(const int face, const int twist=0)
Definition geometry.cc:221
│ │ │ │ -
void coordinate(const int i, Coordinate &x) const
Definition geometry.cc:226
│ │ │ │ -
ctype determinant() const
Definition geometry.cc:238
│ │ │ │ -
FieldVector< ctype, dimension > Coordinate
Definition geometry.cc:219
│ │ │ │ -
bool hasDeterminant() const
Definition geometry.cc:233
│ │ │ │ -
Alberta::Real ctype
Definition geometry.cc:217
│ │ │ │ -
geometry implementation for AlbertaGrid
Definition albertagrid/geometry.hh:108
│ │ │ │ -
const JacobianTransposed & jacobianTransposed() const
transposed of the geometry mapping's Jacobian
Definition geometry.cc:55
│ │ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
map a point from the geometry to the reference element
Definition geometry.cc:45
│ │ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed() const
transposed inverse of the geometry mapping's Jacobian
Definition geometry.cc:73
│ │ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
Definition albertagrid/geometry.hh:126
│ │ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Definition albertagrid/geometry.hh:130
│ │ │ │ -
void print(std::ostream &out) const
Definition geometry.cc:20
│ │ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
map a point from the reference element to the geometry
Definition geometry.cc:34
│ │ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
Definition albertagrid/geometry.hh:127
│ │ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Definition albertagrid/geometry.hh:129
│ │ │ │ -
Definition albertagrid/geometry.hh:303
│ │ │ │ -
Definition albertagrid/geometry.hh:504
│ │ │ │ -
static constexpr int dimension
Definition albertagrid/geometry.hh:510
│ │ │ │ -
Grid::ctype ctype
Definition albertagrid/geometry.hh:508
│ │ │ │ -
Definition albertagrid/geometry.hh:514
│ │ │ │ -
Definition refinement.hh:292
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ - │ │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ +
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
Definition coordcache.hh:25
│ │ │ │ +
static const int dimension
Definition coordcache.hh:33
│ │ │ │ +
GlobalVector & operator()(const Element *element, int vertex) const
Definition coordcache.hh:39
│ │ │ │ +
Alberta::MeshPointer< dimension > MeshPointer
Definition coordcache.hh:36
│ │ │ │ +
void release()
Definition coordcache.hh:64
│ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition coordcache.hh:35
│ │ │ │ +
HierarchyDofNumbering< dimension > DofNumbering
Definition coordcache.hh:37
│ │ │ │ +
void create(const DofNumbering &dofNumbering)
Definition coordcache.hh:51
│ │ │ │ +
Definition coordcache.hh:81
│ │ │ │ +
LocalCaching(const CoordVectorPointer &coords)
Definition coordcache.hh:86
│ │ │ │ +
Definition coordcache.hh:111
│ │ │ │ +
Alberta::Patch< dimension > Patch
Definition coordcache.hh:114
│ │ │ │ +
static void interpolateVector(const CoordVectorPointer &dofVector, const Patch &patch)
Definition coordcache.hh:117
│ │ │ │ + │ │ │ │ +
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ │ + │ │ │ │ +
static const int numSubEntities
Definition dofadmin.hh:40
│ │ │ │ + │ │ │ │ +
const MeshPointer & mesh() const
Definition dofadmin.hh:158
│ │ │ │ +
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ │ + │ │ │ │ +
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ │ +
void release()
Definition dofvector.hh:254
│ │ │ │ +
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ │ + │ │ │ │ +
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ +
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ +
Definition misc.hh:231
│ │ │ │ +
Definition refinement.hh:40
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,393 +1,259 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -geometry.cc │ │ │ │ │ +coordcache.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ -_6#define DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ +5#ifndef DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ +6#define DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_r_e_f_i_n_e_m_e_n_t_._h_h> │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ 11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -15 // AlbertaGridGeometry │ │ │ │ │ -16 // ------------------- │ │ │ │ │ -17 │ │ │ │ │ -18 // print the GeometryInformation │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 inline void _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_m_y_d_i_m_,_c_d_i_m_,_G_r_i_d_I_m_p_>_:_:_p_r_i_n_t (std::ostream& │ │ │ │ │ -ss) const │ │ │ │ │ -21 { │ │ │ │ │ -22 ss << "AlbertaGridGeometry<" << mydim << "," << cdim << "> = { \n"; │ │ │ │ │ -23 for(int i=0; i │ │ │ │ │ +_2_4 class _C_o_o_r_d_C_a_c_h_e │ │ │ │ │ +25 { │ │ │ │ │ +26 typedef _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r; │ │ │ │ │ +27 typedef _A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _> _D_o_f_A_c_c_e_s_s; │ │ │ │ │ +28 │ │ │ │ │ +29 class _L_o_c_a_l_C_a_c_h_i_n_g; │ │ │ │ │ +30 struct _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ 31 │ │ │ │ │ -32 template< int mydim, int cdim, class GridImp > │ │ │ │ │ -33 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -_3_4 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -&local ) const │ │ │ │ │ -35 { │ │ │ │ │ -36 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e y = corner( 0 ); │ │ │ │ │ -37 jacobianTransposed().umtv( local, y ); │ │ │ │ │ -38 return y; │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -41 │ │ │ │ │ -42 //local implementation for mydim < cdim │ │ │ │ │ -43 template< int mydim, int cdim, class GridImp > │ │ │ │ │ -44 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -_4_5 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -&global ) const │ │ │ │ │ -46 { │ │ │ │ │ -47 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x; │ │ │ │ │ -48 jacobianInverseTransposed().mtv( global - corner( 0 ), x ); │ │ │ │ │ -49 return x; │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -52 │ │ │ │ │ -53 template< int mydim, int cdim, class GridImp > │ │ │ │ │ -54 inline const typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d & │ │ │ │ │ -_5_5 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d () const │ │ │ │ │ -56 { │ │ │ │ │ -57 if( !builtJT_ ) │ │ │ │ │ -58 { │ │ │ │ │ -59 const FieldVector< ctype, coorddimension > &origin = coord_[ 0 ]; │ │ │ │ │ -60 for( int i = 0; i < mydimension; ++i ) │ │ │ │ │ -61 { │ │ │ │ │ -62 jT_[ i ] = coord_[ i+1 ]; │ │ │ │ │ -63 jT_[ i ] -= origin; │ │ │ │ │ -64 } │ │ │ │ │ -65 builtJT_ = true; │ │ │ │ │ -66 } │ │ │ │ │ -67 return jT_; │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -70 │ │ │ │ │ -71 template< int mydim, int cdim, class GridImp > │ │ │ │ │ -72 inline const typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_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 & │ │ │ │ │ -_7_3 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_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 () │ │ │ │ │ +32 public: │ │ │ │ │ +_3_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +34 │ │ │ │ │ +_3_5 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +_3_6 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +_3_7 typedef _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ │ +38 │ │ │ │ │ +_3_9 _G_l_o_b_a_l_V_e_c_t_o_r &_o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int vertex ) const │ │ │ │ │ +40 { │ │ │ │ │ +41 assert( !(!coords_) ); │ │ │ │ │ +42 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)coords_; │ │ │ │ │ +43 return array[ dofAccess_( element, vertex ) ]; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +_4_6 _G_l_o_b_a_l_V_e_c_t_o_r &_o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int vertex ) │ │ │ │ │ const │ │ │ │ │ -74 { │ │ │ │ │ -75 if( !builtJTInv_ ) │ │ │ │ │ -76 { │ │ │ │ │ -77 elDet_ = std::abs( _A_l_b_e_r_t_a_:_:_i_n_v_e_r_t( jacobianTransposed(), jTInv_ ) ); │ │ │ │ │ -78 assert( elDet_ > 1.0e-25 ); │ │ │ │ │ -79 calcedDet_ = true; │ │ │ │ │ -80 builtJTInv_ = true; │ │ │ │ │ -81 } │ │ │ │ │ -82 return jTInv_; │ │ │ │ │ -83 } │ │ │ │ │ +47 { │ │ │ │ │ +48 return (*this)( elementInfo._e_l(), vertex ); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_1 void _c_r_e_a_t_e ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering ) │ │ │ │ │ +52 { │ │ │ │ │ +53 _M_e_s_h_P_o_i_n_t_e_r mesh = dofNumbering._m_e_s_h(); │ │ │ │ │ +54 const _D_o_f_S_p_a_c_e *dofSpace = dofNumbering._d_o_f_S_p_a_c_e( _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +55 │ │ │ │ │ +56 coords_._c_r_e_a_t_e( dofSpace, "Coordinate Cache" ); │ │ │ │ │ +57 _L_o_c_a_l_C_a_c_h_i_n_g localCaching( coords_ ); │ │ │ │ │ +58 mesh._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( localCaching, _F_i_l_l_F_l_a_g_s_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s ); │ │ │ │ │ +59 coords_.template setupInterpolation< Interpolation >(); │ │ │ │ │ +60 │ │ │ │ │ +61 dofAccess_ = _D_o_f_A_c_c_e_s_s( dofSpace ); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_4 void _r_e_l_e_a_s_e () │ │ │ │ │ +65 { │ │ │ │ │ +66 coords_._r_e_l_e_a_s_e(); │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +69 private: │ │ │ │ │ +70 CoordVectorPointer coords_; │ │ │ │ │ +71 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ +72 }; │ │ │ │ │ +73 │ │ │ │ │ +74 │ │ │ │ │ +75 │ │ │ │ │ +76 // CoordCache::LocalCaching │ │ │ │ │ +77 // ------------------------ │ │ │ │ │ +78 │ │ │ │ │ +79 template< int dim > │ │ │ │ │ +_8_0 class _C_o_o_r_d_C_a_c_h_e< dim >::_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ +81 { │ │ │ │ │ +82 _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r coords_; │ │ │ │ │ +83 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ 84 │ │ │ │ │ -85 │ │ │ │ │ -86 // built Geometry │ │ │ │ │ -87 template< int mydim, int cdim, class GridImp > │ │ │ │ │ -88 template< class CoordReader > │ │ │ │ │ -89 inline void _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -_9_0_ _:_:_b_u_i_l_d ( const CoordReader &coordReader ) │ │ │ │ │ -91 { │ │ │ │ │ -92 builtJT_ = false; │ │ │ │ │ -93 builtJTInv_ = false; │ │ │ │ │ -94 │ │ │ │ │ -95 // copy corners │ │ │ │ │ -96 for( int i = 0; i < numCorners; ++i ) │ │ │ │ │ -97 coordReader.coordinate( i, coord_[ i ] ); │ │ │ │ │ -98 │ │ │ │ │ -99 // calculate centroid │ │ │ │ │ -100 centroid_ = coord_[ 0 ]; │ │ │ │ │ -101 for( int i = 1; i < numCorners; ++i ) │ │ │ │ │ -102 centroid_ += coord_[ i ]; │ │ │ │ │ -103 centroid_ *= 1.0 / numCorners; │ │ │ │ │ +85 public: │ │ │ │ │ +_8_6 explicit _L_o_c_a_l_C_a_c_h_i_n_g ( const _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r &coords ) │ │ │ │ │ +87 : coords_( coords ), │ │ │ │ │ +88 dofAccess_( coords.dofSpace() ) │ │ │ │ │ +89 {} │ │ │ │ │ +90 │ │ │ │ │ +_9_1 void _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ │ +92 { │ │ │ │ │ +93 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)coords_; │ │ │ │ │ +94 for( int i = 0; i < _D_o_f_A_c_c_e_s_s_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s; ++i ) │ │ │ │ │ +95 { │ │ │ │ │ +96 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elementInfo._c_o_o_r_d_i_n_a_t_e( i ); │ │ │ │ │ +97 _G_l_o_b_a_l_V_e_c_t_o_r &y = array[ dofAccess_( elementInfo._e_l(), i ) ]; │ │ │ │ │ +98 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ +99 y[ i ] = x[ i ]; │ │ │ │ │ +100 } │ │ │ │ │ +101 } │ │ │ │ │ +102 }; │ │ │ │ │ +103 │ │ │ │ │ 104 │ │ │ │ │ -105 elDet_ = (coordReader.hasDeterminant() ? coordReader.determinant() : │ │ │ │ │ -elDeterminant()); │ │ │ │ │ -106 assert( std::abs( elDet_ ) > 0.0 ); │ │ │ │ │ -107 calcedDet_ = true; │ │ │ │ │ -108 } │ │ │ │ │ -109 │ │ │ │ │ -110 │ │ │ │ │ -111#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -112 template< int dim, int cdim > │ │ │ │ │ -113 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y_<_ _d_i_m_,_ _c_d_i_m_,_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_< │ │ │ │ │ -_d_i_m_,_ _c_d_i_m_ _> >::GlobalCoordinate │ │ │ │ │ -114 _A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y_<_ _d_i_m_,_ _c_d_i_m_,_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _c_d_i_m_ _> >:: │ │ │ │ │ -global ( const LocalCoordinate &local ) const │ │ │ │ │ -115 { │ │ │ │ │ -116 GlobalCoordinate y = corner( 0 ); │ │ │ │ │ -117 jacobianTransposed().umtv( local, y ); │ │ │ │ │ -118 return y; │ │ │ │ │ -119 } │ │ │ │ │ -120 │ │ │ │ │ +105 │ │ │ │ │ +106 // CoordCache::Interpolation │ │ │ │ │ +107 // ------------------------- │ │ │ │ │ +108 │ │ │ │ │ +109 template< int dim > │ │ │ │ │ +_1_1_0 struct _C_o_o_r_d_C_a_c_h_e< dim >::_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +111 { │ │ │ │ │ +_1_1_2 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +113 │ │ │ │ │ +_1_1_4 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> _P_a_t_c_h; │ │ │ │ │ +115 │ │ │ │ │ +116 static void │ │ │ │ │ +_1_1_7 _i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r ( const _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r &dofVector, const _P_a_t_c_h &patch │ │ │ │ │ +) │ │ │ │ │ +118 { │ │ │ │ │ +119 _D_o_f_A_c_c_e_s_s dofAccess( dofVector._d_o_f_S_p_a_c_e() ); │ │ │ │ │ +120 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)dofVector; │ │ │ │ │ 121 │ │ │ │ │ -122 //local implementation for mydim < cdim │ │ │ │ │ -123 template< int dim, int cdim > │ │ │ │ │ -124 inline typename AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< │ │ │ │ │ -dim, cdim > >::LocalCoordinate │ │ │ │ │ -125 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >:: │ │ │ │ │ -local ( const GlobalCoordinate &global ) const │ │ │ │ │ -126 { │ │ │ │ │ -127 LocalCoordinate x; │ │ │ │ │ -128 jacobianInverseTransposed().mtv( global - corner( 0 ), x ); │ │ │ │ │ -129 return x; │ │ │ │ │ -130 } │ │ │ │ │ -131#endif // #if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -132 │ │ │ │ │ -133 │ │ │ │ │ -134 │ │ │ │ │ -135 // AlbertaGridLocalGeometryProvider │ │ │ │ │ -136 // -------------------------------- │ │ │ │ │ -137 │ │ │ │ │ -138 template< class Grid > │ │ │ │ │ -139 void AlbertaGridLocalGeometryProvider< Grid >::buildGeometryInFather () │ │ │ │ │ -140 { │ │ │ │ │ -141 for( int child = 0; child < numChildren; ++child ) │ │ │ │ │ -142 { │ │ │ │ │ -143 for( int orientation = 0; orientation < 2; ++orientation ) │ │ │ │ │ -144 { │ │ │ │ │ -145 const GeoInFatherCoordReader coordReader( child, orientation ); │ │ │ │ │ -146 geometryInFather_[ child ][ orientation ] = new LocalElementGeometry │ │ │ │ │ -( coordReader ); │ │ │ │ │ -147 } │ │ │ │ │ -148 } │ │ │ │ │ -149 } │ │ │ │ │ +122 const _E_l_e_m_e_n_t *element = patch[ 0 ]; │ │ │ │ │ +123 │ │ │ │ │ +124 // new vertex is always the last one │ │ │ │ │ +125 assert( element->child[ 0 ] != NULL ); │ │ │ │ │ +126 _G_l_o_b_a_l_V_e_c_t_o_r &newCoord = array[ dofAccess( element->child[ 0 ], _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ +]; │ │ │ │ │ +127 │ │ │ │ │ +128 if( element->new_coord != NULL ) │ │ │ │ │ +129 { │ │ │ │ │ +130 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ +131 newCoord[ j ] = element->new_coord[ j ]; │ │ │ │ │ +132 } │ │ │ │ │ +133 else │ │ │ │ │ +134 { │ │ │ │ │ +135 // new coordinate is the average of of old ones on the same edge │ │ │ │ │ +136 // refinement edge is always between vertices 0 and 1 │ │ │ │ │ +137 const _G_l_o_b_a_l_V_e_c_t_o_r &coord0 = array[ dofAccess( element, 0 ) ]; │ │ │ │ │ +138 const _G_l_o_b_a_l_V_e_c_t_o_r &coord1 = array[ dofAccess( element, 1 ) ]; │ │ │ │ │ +139 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ +140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]); │ │ │ │ │ +141 } │ │ │ │ │ +142 } │ │ │ │ │ +143 }; │ │ │ │ │ +144 │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +147} │ │ │ │ │ +148 │ │ │ │ │ +149#endif // #if HAVE_ALBERTA │ │ │ │ │ 150 │ │ │ │ │ -151 │ │ │ │ │ -152 template< class Grid > │ │ │ │ │ -153 void AlbertaGridLocalGeometryProvider< Grid >::buildFaceGeometry () │ │ │ │ │ -154 { │ │ │ │ │ -155 for( int face = 0; face < numFaces; ++face ) │ │ │ │ │ -156 { │ │ │ │ │ -157 for( int twist = minFaceTwist; twist <= maxFaceTwist; ++twist ) │ │ │ │ │ -158 { │ │ │ │ │ -159 const FaceCoordReader coordReader( face, twist ); │ │ │ │ │ -160 faceGeometry_[ face ][ twist - minFaceTwist ] = new LocalFaceGeometry │ │ │ │ │ -( coordReader ); │ │ │ │ │ -161 } │ │ │ │ │ -162 } │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -165 │ │ │ │ │ -166 │ │ │ │ │ -167 // AlbertaGridLocalGeometryProvider::GeoInFatherCoordReader │ │ │ │ │ -168 // -------------------------------------------------------- │ │ │ │ │ -169 │ │ │ │ │ -170 template< class Grid > │ │ │ │ │ -_1_7_1 struct _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r< _G_r_i_d >::_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -172 { │ │ │ │ │ -_1_7_3 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ -174 │ │ │ │ │ -_1_7_5 typedef _F_i_e_l_d_V_e_c_t_o_r_<_ _c_t_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -176 │ │ │ │ │ -177 private: │ │ │ │ │ -178 typedef _A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _G_e_o_I_n_F_a_t_h_e_r; │ │ │ │ │ -179 │ │ │ │ │ -180 public: │ │ │ │ │ -_1_8_1 _G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r ( int child, int orientation ) │ │ │ │ │ -182 : child_( child ), │ │ │ │ │ -183 orientation_( orientation ) │ │ │ │ │ -184 {} │ │ │ │ │ -185 │ │ │ │ │ -_1_8_6 void _c_o_o_r_d_i_n_a_t_e ( int i, _C_o_o_r_d_i_n_a_t_e &_x ) const │ │ │ │ │ -187 { │ │ │ │ │ -188 const typename GeoInFather::LocalVector &coord │ │ │ │ │ -189 = GeoInFather::coordinate( child_, orientation_, i ); │ │ │ │ │ -190 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ -191 _x[ j ] = coord[ j ]; │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -_1_9_4 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -195 { │ │ │ │ │ -196 return false; │ │ │ │ │ -197 } │ │ │ │ │ -198 │ │ │ │ │ -_1_9_9 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -200 { │ │ │ │ │ -201 return _c_t_y_p_e( 0 ); │ │ │ │ │ -202 } │ │ │ │ │ -203 │ │ │ │ │ -204 private: │ │ │ │ │ -205 const int child_; │ │ │ │ │ -206 const int orientation_; │ │ │ │ │ -207 }; │ │ │ │ │ -208 │ │ │ │ │ -209 │ │ │ │ │ -210 │ │ │ │ │ -211 // AlbertaGridLocalGeometryProvider::FaceCoordReader │ │ │ │ │ -212 // ------------------------------------------------- │ │ │ │ │ -213 │ │ │ │ │ -214 template< class Grid > │ │ │ │ │ -_2_1_5 struct _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r< _G_r_i_d >::_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -216 { │ │ │ │ │ -_2_1_7 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ -218 │ │ │ │ │ -_2_1_9 typedef _F_i_e_l_d_V_e_c_t_o_r_<_ _c_t_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -220 │ │ │ │ │ -_2_2_1 _F_a_c_e_C_o_o_r_d_R_e_a_d_e_r ( const int _f_a_c_e, const int twist = 0 ) │ │ │ │ │ -222 : face_( _f_a_c_e ), │ │ │ │ │ -223 twist_( twist ) │ │ │ │ │ -224 {} │ │ │ │ │ -225 │ │ │ │ │ -_2_2_6 void _c_o_o_r_d_i_n_a_t_e ( const int i, _C_o_o_r_d_i_n_a_t_e &_x ) const │ │ │ │ │ -227 { │ │ │ │ │ -228 const int _t_i = _A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t< _d_i_m_e_n_s_i_o_n-1 >( twist_, i ); │ │ │ │ │ -229 const int j = _m_a_p_V_e_r_t_i_c_e_s_<_ _1_ _>( face_, _t_i ); │ │ │ │ │ -230 refCorner( j, _x ); │ │ │ │ │ -231 } │ │ │ │ │ -232 │ │ │ │ │ -_2_3_3 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -234 { │ │ │ │ │ -235 return false; │ │ │ │ │ -236 } │ │ │ │ │ -237 │ │ │ │ │ -_2_3_8 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -239 { │ │ │ │ │ -240 return _c_t_y_p_e( 0 ); │ │ │ │ │ -241 } │ │ │ │ │ -242 │ │ │ │ │ -243 private: │ │ │ │ │ -244 static void refCorner ( const int i, Coordinate &_x ) │ │ │ │ │ -245 { │ │ │ │ │ -246 _x = _c_t_y_p_e( 0 ); │ │ │ │ │ -247 if( i > 0 ) │ │ │ │ │ -248 _x[ i-1 ] = _c_t_y_p_e( 1 ); │ │ │ │ │ -249 } │ │ │ │ │ -250 │ │ │ │ │ -251 int face_; │ │ │ │ │ -252 int twist_; │ │ │ │ │ -253 }; │ │ │ │ │ -254 │ │ │ │ │ -255} // namespace Dune │ │ │ │ │ -256 │ │ │ │ │ -257#endif // #ifndef DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ -_a_l_g_e_b_r_a_._h_h │ │ │ │ │ -_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ -geometryInFather │ │ │ │ │ +151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ +_d_o_f_a_d_m_i_n_._h_h │ │ │ │ │ +_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ │ +_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t │ │ │ │ │ -int applyInverseTwist(int twist, int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:637 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ │ -static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ │ -&inverse) │ │ │ │ │ -DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:172 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, dimension > Coordinate │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:175 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ -Alberta::Real ctype │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:173 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -void coordinate(int i, Coordinate &x) const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:186 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_: │ │ │ │ │ -_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -GeoInFatherCoordReader(int child, int orientation) │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:181 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -bool hasDeterminant() const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:194 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -ctype determinant() const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:199 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:216 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -FaceCoordReader(const int face, const int twist=0) │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:221 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -void coordinate(const int i, Coordinate &x) const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:226 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -ctype determinant() const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:238 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, dimension > Coordinate │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:219 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -bool hasDeterminant() const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:233 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ -Alberta::Real ctype │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:217 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ -geometry implementation for AlbertaGrid │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -const JacobianTransposed & jacobianTransposed() const │ │ │ │ │ -transposed of the geometry mapping's Jacobian │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:55 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ -map a point from the geometry to the reference element │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:45 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -const JacobianInverseTransposed & jacobianInverseTransposed() const │ │ │ │ │ -transposed inverse of the geometry mapping's Jacobian │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:73 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_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 │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:126 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &out) const │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:20 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ │ -map a point from the reference element to the geometry │ │ │ │ │ -DDeeffiinniittiioonn geometry.cc:34 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:303 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:510 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ -Grid::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:508 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:514 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +ALBERTA EL Element │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ +ALBERTA FE_SPACE DofSpace │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +GlobalVector & operator()(const Element *element, int vertex) const │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +HierarchyDofNumbering< dimension > DofNumbering │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_c_r_e_a_t_e │ │ │ │ │ +void create(const DofNumbering &dofNumbering) │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_L_o_c_a_l_C_a_c_h_i_n_g_:_:_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ +LocalCaching(const CoordVectorPointer &coords) │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_a_t_c_h │ │ │ │ │ +Alberta::Patch< dimension > Patch │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r │ │ │ │ │ +static void interpolateVector(const CoordVectorPointer &dofVector, const Patch │ │ │ │ │ +&patch) │ │ │ │ │ +DDeeffiinniittiioonn coordcache.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ +void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ +fillFlags=FillFlags::standard) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +static const int numSubEntities │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_m_e_s_h │ │ │ │ │ +const MeshPointer & mesh() const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * dofSpace(int codim) const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * dofSpace() const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +const GlobalVector & coordinate(int vertex) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ +Element * el() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leveliterator.hh File Reference │ │ │ │ +dune-grid: geometry.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,36 +71,58 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
leveliterator.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
geometry.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ -#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │ +#include <dune/grid/albertagrid/geometry.hh>
│ │ │ │ +#include <dune/grid/albertagrid/refinement.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
 
class  Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Macros

#define DUNE_ALBERTA_GEOMETRY_CC
 
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTA_GEOMETRY_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,32 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -leveliterator.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ +geometry.cc File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_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_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _>_:_: │ │ │ │ │ + _G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _>_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A___G_E_O_M_E_T_R_Y___C_C │ │ │ │ │ +  │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__GGEEOOMMEETTRRYY__CCCC ********** │ │ │ │ │ +#define DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leveliterator.hh Source File │ │ │ │ +dune-grid: geometry.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,145 +74,344 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
leveliterator.hh
│ │ │ │ +
geometry.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │ -
6#define DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ +
6#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 // AlbertaGridLevelIterator
│ │ │ │ -
18 // ------------------------
│ │ │ │ -
19
│ │ │ │ -
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ │ -
23 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ -
28 typedef typename Base::Entity Entity;
│ │ │ │ - │ │ │ │ -
30
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 {}
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ │ -
36 : Base( grid, level )
│ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 const MarkerVector *vec,
│ │ │ │ -
42 int level )
│ │ │ │ -
43 : Base( grid, vec, level )
│ │ │ │ -
44 {}
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
47 void increment ()
│ │ │ │ -
48 {
│ │ │ │ - │ │ │ │ -
50 }
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
15 // AlbertaGridGeometry
│ │ │ │ +
16 // -------------------
│ │ │ │ +
17
│ │ │ │ +
18 // print the GeometryInformation
│ │ │ │ +
19 template <int mydim, int cdim, class GridImp>
│ │ │ │ +
│ │ │ │ +
20 inline void AlbertaGridGeometry<mydim,cdim,GridImp>::print (std::ostream& ss) const
│ │ │ │ +
21 {
│ │ │ │ +
22 ss << "AlbertaGridGeometry<" << mydim << "," << cdim << "> = { \n";
│ │ │ │ +
23 for(int i=0; i<corners(); i++)
│ │ │ │ +
24 {
│ │ │ │ +
25 ss << " corner " << i << " = ";
│ │ │ │ +
26 ss << ((*this)[i]); ss << "\n";
│ │ │ │ +
27 }
│ │ │ │ +
28 ss << "} \n";
│ │ │ │ +
29 }
│ │ │ │
│ │ │ │ -
51 };
│ │ │ │ +
30
│ │ │ │ +
31
│ │ │ │ +
32 template< int mydim, int cdim, class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {
│ │ │ │ +
36 GlobalCoordinate y = corner( 0 );
│ │ │ │ +
37 jacobianTransposed().umtv( local, y );
│ │ │ │ +
38 return y;
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
41
│ │ │ │ +
42 //local implementation for mydim < cdim
│ │ │ │ +
43 template< int mydim, int cdim, class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 {
│ │ │ │ + │ │ │ │ +
48 jacobianInverseTransposed().mtv( global - corner( 0 ), x );
│ │ │ │ +
49 return x;
│ │ │ │ +
50 }
│ │ │ │
│ │ │ │ +
51
│ │ │ │
52
│ │ │ │ -
53
│ │ │ │ -
54 template< int codim, class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ │ -
57 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
60
│ │ │ │ -
61 public:
│ │ │ │ -
62 typedef typename Base::Entity Entity;
│ │ │ │ - │ │ │ │ -
64
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 {}
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
69 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ │ -
70 : Base( grid, level )
│ │ │ │ -
71 {}
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 const MarkerVector *,
│ │ │ │ -
76 int level )
│ │ │ │ -
77 : Base( grid, level )
│ │ │ │ -
78 {}
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 void increment ()
│ │ │ │ -
82 {
│ │ │ │ - │ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85 };
│ │ │ │ -
│ │ │ │ -
86}
│ │ │ │ -
87
│ │ │ │ -
88#endif // #if HAVE_ALBERTA
│ │ │ │ -
89
│ │ │ │ -
90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │ +
53 template< int mydim, int cdim, class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 if( !builtJT_ )
│ │ │ │ +
58 {
│ │ │ │ +
59 const FieldVector< ctype, coorddimension > &origin = coord_[ 0 ];
│ │ │ │ +
60 for( int i = 0; i < mydimension; ++i )
│ │ │ │ +
61 {
│ │ │ │ +
62 jT_[ i ] = coord_[ i+1 ];
│ │ │ │ +
63 jT_[ i ] -= origin;
│ │ │ │ +
64 }
│ │ │ │ +
65 builtJT_ = true;
│ │ │ │ +
66 }
│ │ │ │ +
67 return jT_;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
70
│ │ │ │ +
71 template< int mydim, int cdim, class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
74 {
│ │ │ │ +
75 if( !builtJTInv_ )
│ │ │ │ +
76 {
│ │ │ │ +
77 elDet_ = std::abs( Alberta::invert( jacobianTransposed(), jTInv_ ) );
│ │ │ │ +
78 assert( elDet_ > 1.0e-25 );
│ │ │ │ +
79 calcedDet_ = true;
│ │ │ │ +
80 builtJTInv_ = true;
│ │ │ │ +
81 }
│ │ │ │ +
82 return jTInv_;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
85
│ │ │ │ +
86 // built Geometry
│ │ │ │ +
87 template< int mydim, int cdim, class GridImp >
│ │ │ │ +
88 template< class CoordReader >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
90 ::build ( const CoordReader &coordReader )
│ │ │ │ +
91 {
│ │ │ │ +
92 builtJT_ = false;
│ │ │ │ +
93 builtJTInv_ = false;
│ │ │ │ +
94
│ │ │ │ +
95 // copy corners
│ │ │ │ +
96 for( int i = 0; i < numCorners; ++i )
│ │ │ │ +
97 coordReader.coordinate( i, coord_[ i ] );
│ │ │ │ +
98
│ │ │ │ +
99 // calculate centroid
│ │ │ │ +
100 centroid_ = coord_[ 0 ];
│ │ │ │ +
101 for( int i = 1; i < numCorners; ++i )
│ │ │ │ +
102 centroid_ += coord_[ i ];
│ │ │ │ +
103 centroid_ *= 1.0 / numCorners;
│ │ │ │ +
104
│ │ │ │ +
105 elDet_ = (coordReader.hasDeterminant() ? coordReader.determinant() : elDeterminant());
│ │ │ │ +
106 assert( std::abs( elDet_ ) > 0.0 );
│ │ │ │ +
107 calcedDet_ = true;
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
110
│ │ │ │ +
111#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
112 template< int dim, int cdim >
│ │ │ │ + │ │ │ │ +
114 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::global ( const LocalCoordinate &local ) const
│ │ │ │ +
115 {
│ │ │ │ +
116 GlobalCoordinate y = corner( 0 );
│ │ │ │ +
117 jacobianTransposed().umtv( local, y );
│ │ │ │ +
118 return y;
│ │ │ │ +
119 }
│ │ │ │ +
120
│ │ │ │ +
121
│ │ │ │ +
122 //local implementation for mydim < cdim
│ │ │ │ +
123 template< int dim, int cdim >
│ │ │ │ +
124 inline typename AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::LocalCoordinate
│ │ │ │ +
125 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::local ( const GlobalCoordinate &global ) const
│ │ │ │ +
126 {
│ │ │ │ +
127 LocalCoordinate x;
│ │ │ │ +
128 jacobianInverseTransposed().mtv( global - corner( 0 ), x );
│ │ │ │ +
129 return x;
│ │ │ │ +
130 }
│ │ │ │ +
131#endif // #if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
132
│ │ │ │ +
133
│ │ │ │ +
134
│ │ │ │ +
135 // AlbertaGridLocalGeometryProvider
│ │ │ │ +
136 // --------------------------------
│ │ │ │ +
137
│ │ │ │ +
138 template< class Grid >
│ │ │ │ +
139 void AlbertaGridLocalGeometryProvider< Grid >::buildGeometryInFather ()
│ │ │ │ +
140 {
│ │ │ │ +
141 for( int child = 0; child < numChildren; ++child )
│ │ │ │ +
142 {
│ │ │ │ +
143 for( int orientation = 0; orientation < 2; ++orientation )
│ │ │ │ +
144 {
│ │ │ │ +
145 const GeoInFatherCoordReader coordReader( child, orientation );
│ │ │ │ +
146 geometryInFather_[ child ][ orientation ] = new LocalElementGeometry( coordReader );
│ │ │ │ +
147 }
│ │ │ │ +
148 }
│ │ │ │ +
149 }
│ │ │ │ +
150
│ │ │ │ +
151
│ │ │ │ +
152 template< class Grid >
│ │ │ │ +
153 void AlbertaGridLocalGeometryProvider< Grid >::buildFaceGeometry ()
│ │ │ │ +
154 {
│ │ │ │ +
155 for( int face = 0; face < numFaces; ++face )
│ │ │ │ +
156 {
│ │ │ │ +
157 for( int twist = minFaceTwist; twist <= maxFaceTwist; ++twist )
│ │ │ │ +
158 {
│ │ │ │ +
159 const FaceCoordReader coordReader( face, twist );
│ │ │ │ +
160 faceGeometry_[ face ][ twist - minFaceTwist ] = new LocalFaceGeometry( coordReader );
│ │ │ │ +
161 }
│ │ │ │ +
162 }
│ │ │ │ +
163 }
│ │ │ │ +
164
│ │ │ │ +
165
│ │ │ │ +
166
│ │ │ │ +
167 // AlbertaGridLocalGeometryProvider::GeoInFatherCoordReader
│ │ │ │ +
168 // --------------------------------------------------------
│ │ │ │ +
169
│ │ │ │ +
170 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
172 {
│ │ │ │ + │ │ │ │ +
174
│ │ │ │ + │ │ │ │ +
176
│ │ │ │ +
177 private:
│ │ │ │ + │ │ │ │ +
179
│ │ │ │ +
180 public:
│ │ │ │ +
│ │ │ │ +
181 GeoInFatherCoordReader ( int child, int orientation )
│ │ │ │ +
182 : child_( child ),
│ │ │ │ +
183 orientation_( orientation )
│ │ │ │ +
184 {}
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
│ │ │ │ +
186 void coordinate ( int i, Coordinate &x ) const
│ │ │ │ +
187 {
│ │ │ │ +
188 const typename GeoInFather::LocalVector &coord
│ │ │ │ +
189 = GeoInFather::coordinate( child_, orientation_, i );
│ │ │ │ +
190 for( int j = 0; j < dimension; ++j )
│ │ │ │ +
191 x[ j ] = coord[ j ];
│ │ │ │ +
192 }
│ │ │ │ +
│ │ │ │ +
193
│ │ │ │ +
│ │ │ │ +
194 bool hasDeterminant () const
│ │ │ │ +
195 {
│ │ │ │ +
196 return false;
│ │ │ │ +
197 }
│ │ │ │ +
│ │ │ │ +
198
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
200 {
│ │ │ │ +
201 return ctype( 0 );
│ │ │ │ +
202 }
│ │ │ │ +
│ │ │ │ +
203
│ │ │ │ +
204 private:
│ │ │ │ +
205 const int child_;
│ │ │ │ +
206 const int orientation_;
│ │ │ │ +
207 };
│ │ │ │ +
│ │ │ │ +
208
│ │ │ │ +
209
│ │ │ │ +
210
│ │ │ │ +
211 // AlbertaGridLocalGeometryProvider::FaceCoordReader
│ │ │ │ +
212 // -------------------------------------------------
│ │ │ │ +
213
│ │ │ │ +
214 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
216 {
│ │ │ │ + │ │ │ │ +
218
│ │ │ │ + │ │ │ │ +
220
│ │ │ │ +
│ │ │ │ +
221 FaceCoordReader ( const int face, const int twist = 0 )
│ │ │ │ +
222 : face_( face ),
│ │ │ │ +
223 twist_( twist )
│ │ │ │ +
224 {}
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
│ │ │ │ +
226 void coordinate ( const int i, Coordinate &x ) const
│ │ │ │ +
227 {
│ │ │ │ +
228 const int ti = Alberta::applyInverseTwist< dimension-1 >( twist_, i );
│ │ │ │ +
229 const int j = mapVertices< 1 >( face_, ti );
│ │ │ │ +
230 refCorner( j, x );
│ │ │ │ +
231 }
│ │ │ │ +
│ │ │ │ +
232
│ │ │ │ +
│ │ │ │ +
233 bool hasDeterminant () const
│ │ │ │ +
234 {
│ │ │ │ +
235 return false;
│ │ │ │ +
236 }
│ │ │ │ +
│ │ │ │ +
237
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
239 {
│ │ │ │ +
240 return ctype( 0 );
│ │ │ │ +
241 }
│ │ │ │ +
│ │ │ │ +
242
│ │ │ │ +
243 private:
│ │ │ │ +
244 static void refCorner ( const int i, Coordinate &x )
│ │ │ │ +
245 {
│ │ │ │ +
246 x = ctype( 0 );
│ │ │ │ +
247 if( i > 0 )
│ │ │ │ +
248 x[ i-1 ] = ctype( 1 );
│ │ │ │ +
249 }
│ │ │ │ +
250
│ │ │ │ +
251 int face_;
│ │ │ │ +
252 int twist_;
│ │ │ │ +
253 };
│ │ │ │ +
│ │ │ │ +
254
│ │ │ │ +
255} // namespace Dune
│ │ │ │ +
256
│ │ │ │ +
257#endif // #ifndef DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ +
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition treeiterator.hh:189
│ │ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ │ -
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ │ -
void increment()
increment
Definition treeiterator.hh:411
│ │ │ │ -
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ │ -
Definition leveliterator.hh:23
│ │ │ │ -
Base::MarkerVector MarkerVector
Definition leveliterator.hh:29
│ │ │ │ -
AlbertaGridLevelIterator()
Definition leveliterator.hh:31
│ │ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition leveliterator.hh:40
│ │ │ │ -
Base::Entity Entity
Definition leveliterator.hh:28
│ │ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leveliterator.hh:35
│ │ │ │ -
void increment()
increment the iterator
Definition leveliterator.hh:47
│ │ │ │ - │ │ │ │ - │ │ │ │ -
void increment()
increment the iterator
Definition leveliterator.hh:81
│ │ │ │ -
Base::Entity Entity
Definition leveliterator.hh:62
│ │ │ │ -
Base::MarkerVector MarkerVector
Definition leveliterator.hh:63
│ │ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leveliterator.hh:69
│ │ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition leveliterator.hh:74
│ │ │ │ -
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ +
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ │ + │ │ │ │ +
FieldVector< ctype, dimension > Coordinate
Definition geometry.cc:175
│ │ │ │ + │ │ │ │ +
void coordinate(int i, Coordinate &x) const
Definition geometry.cc:186
│ │ │ │ +
GeoInFatherCoordReader(int child, int orientation)
Definition geometry.cc:181
│ │ │ │ +
bool hasDeterminant() const
Definition geometry.cc:194
│ │ │ │ +
ctype determinant() const
Definition geometry.cc:199
│ │ │ │ + │ │ │ │ +
FaceCoordReader(const int face, const int twist=0)
Definition geometry.cc:221
│ │ │ │ +
void coordinate(const int i, Coordinate &x) const
Definition geometry.cc:226
│ │ │ │ +
ctype determinant() const
Definition geometry.cc:238
│ │ │ │ +
FieldVector< ctype, dimension > Coordinate
Definition geometry.cc:219
│ │ │ │ +
bool hasDeterminant() const
Definition geometry.cc:233
│ │ │ │ +
Alberta::Real ctype
Definition geometry.cc:217
│ │ │ │ +
geometry implementation for AlbertaGrid
Definition albertagrid/geometry.hh:108
│ │ │ │ +
const JacobianTransposed & jacobianTransposed() const
transposed of the geometry mapping's Jacobian
Definition geometry.cc:55
│ │ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
map a point from the geometry to the reference element
Definition geometry.cc:45
│ │ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed() const
transposed inverse of the geometry mapping's Jacobian
Definition geometry.cc:73
│ │ │ │ +
FieldVector< ctype, mydimension > LocalCoordinate
Definition albertagrid/geometry.hh:126
│ │ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Definition albertagrid/geometry.hh:130
│ │ │ │ +
void print(std::ostream &out) const
Definition geometry.cc:20
│ │ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
map a point from the reference element to the geometry
Definition geometry.cc:34
│ │ │ │ +
FieldVector< ctype, coorddimension > GlobalCoordinate
Definition albertagrid/geometry.hh:127
│ │ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Definition albertagrid/geometry.hh:129
│ │ │ │ +
Definition albertagrid/geometry.hh:303
│ │ │ │ +
Definition albertagrid/geometry.hh:504
│ │ │ │ +
static constexpr int dimension
Definition albertagrid/geometry.hh:510
│ │ │ │ +
Grid::ctype ctype
Definition albertagrid/geometry.hh:508
│ │ │ │ +
Definition albertagrid/geometry.hh:514
│ │ │ │ +
Definition refinement.hh:292
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,175 +1,393 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -leveliterator.hh │ │ │ │ │ +geometry.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// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ -6#define DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ +_6#define DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_r_e_f_i_n_e_m_e_n_t_._h_h> │ │ │ │ │ 11 │ │ │ │ │ -12#if HAVE_ALBERTA │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 // AlbertaGridLevelIterator │ │ │ │ │ -18 // ------------------------ │ │ │ │ │ -19 │ │ │ │ │ -20 template< int codim, PartitionIteratorType pitype, class GridImp > │ │ │ │ │ -_2_1 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -22 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, false > │ │ │ │ │ -23 { │ │ │ │ │ -24 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ -25 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _> _B_a_s_e; │ │ │ │ │ -26 │ │ │ │ │ -27 public: │ │ │ │ │ -_2_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_2_9 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +15 // AlbertaGridGeometry │ │ │ │ │ +16 // ------------------- │ │ │ │ │ +17 │ │ │ │ │ +18 // print the GeometryInformation │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 inline void _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_m_y_d_i_m_,_c_d_i_m_,_G_r_i_d_I_m_p_>_:_:_p_r_i_n_t (std::ostream& │ │ │ │ │ +ss) const │ │ │ │ │ +21 { │ │ │ │ │ +22 ss << "AlbertaGridGeometry<" << mydim << "," << cdim << "> = { \n"; │ │ │ │ │ +23 for(int i=0; i │ │ │ │ │ +33 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +_3_4 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +&local ) const │ │ │ │ │ +35 { │ │ │ │ │ +36 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e y = corner( 0 ); │ │ │ │ │ +37 jacobianTransposed().umtv( local, y ); │ │ │ │ │ +38 return y; │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +41 │ │ │ │ │ +42 //local implementation for mydim < cdim │ │ │ │ │ +43 template< int mydim, int cdim, class GridImp > │ │ │ │ │ +44 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +_4_5 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +&global ) const │ │ │ │ │ +46 { │ │ │ │ │ +47 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x; │ │ │ │ │ +48 jacobianInverseTransposed().mtv( global - corner( 0 ), x ); │ │ │ │ │ +49 return x; │ │ │ │ │ 50 } │ │ │ │ │ -51 }; │ │ │ │ │ +51 │ │ │ │ │ 52 │ │ │ │ │ -53 │ │ │ │ │ -54 template< int codim, class GridImp > │ │ │ │ │ -_5_5 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r< codim, _G_h_o_s_t___P_a_r_t_i_t_i_o_n, GridImp > │ │ │ │ │ -56 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, false > │ │ │ │ │ -57 { │ │ │ │ │ -58 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ -59 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _> _B_a_s_e; │ │ │ │ │ -60 │ │ │ │ │ -61 public: │ │ │ │ │ -_6_2 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_6_3 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ -64 │ │ │ │ │ -_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r () │ │ │ │ │ -66 {} │ │ │ │ │ -67 │ │ │ │ │ -_6_9 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ -70 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ -71 {} │ │ │ │ │ -72 │ │ │ │ │ -_7_4 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ -75 const _M_a_r_k_e_r_V_e_c_t_o_r *, │ │ │ │ │ -76 int _l_e_v_e_l ) │ │ │ │ │ -77 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ -78 {} │ │ │ │ │ -79 │ │ │ │ │ -_8_1 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -82 { │ │ │ │ │ -83 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ -84 } │ │ │ │ │ -85 }; │ │ │ │ │ -86} │ │ │ │ │ -87 │ │ │ │ │ -88#endif // #if HAVE_ALBERTA │ │ │ │ │ -89 │ │ │ │ │ -90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Ghost_Partition │ │ │ │ │ -only ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ +53 template< int mydim, int cdim, class GridImp > │ │ │ │ │ +54 inline const typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d & │ │ │ │ │ +_5_5 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d () const │ │ │ │ │ +56 { │ │ │ │ │ +57 if( !builtJT_ ) │ │ │ │ │ +58 { │ │ │ │ │ +59 const FieldVector< ctype, coorddimension > &origin = coord_[ 0 ]; │ │ │ │ │ +60 for( int i = 0; i < mydimension; ++i ) │ │ │ │ │ +61 { │ │ │ │ │ +62 jT_[ i ] = coord_[ i+1 ]; │ │ │ │ │ +63 jT_[ i ] -= origin; │ │ │ │ │ +64 } │ │ │ │ │ +65 builtJT_ = true; │ │ │ │ │ +66 } │ │ │ │ │ +67 return jT_; │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +70 │ │ │ │ │ +71 template< int mydim, int cdim, class GridImp > │ │ │ │ │ +72 inline const typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_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 & │ │ │ │ │ +_7_3 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_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 │ │ │ │ │ +74 { │ │ │ │ │ +75 if( !builtJTInv_ ) │ │ │ │ │ +76 { │ │ │ │ │ +77 elDet_ = std::abs( _A_l_b_e_r_t_a_:_:_i_n_v_e_r_t( jacobianTransposed(), jTInv_ ) ); │ │ │ │ │ +78 assert( elDet_ > 1.0e-25 ); │ │ │ │ │ +79 calcedDet_ = true; │ │ │ │ │ +80 builtJTInv_ = true; │ │ │ │ │ +81 } │ │ │ │ │ +82 return jTInv_; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +85 │ │ │ │ │ +86 // built Geometry │ │ │ │ │ +87 template< int mydim, int cdim, class GridImp > │ │ │ │ │ +88 template< class CoordReader > │ │ │ │ │ +89 inline void _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +_9_0_ _:_:_b_u_i_l_d ( const CoordReader &coordReader ) │ │ │ │ │ +91 { │ │ │ │ │ +92 builtJT_ = false; │ │ │ │ │ +93 builtJTInv_ = false; │ │ │ │ │ +94 │ │ │ │ │ +95 // copy corners │ │ │ │ │ +96 for( int i = 0; i < numCorners; ++i ) │ │ │ │ │ +97 coordReader.coordinate( i, coord_[ i ] ); │ │ │ │ │ +98 │ │ │ │ │ +99 // calculate centroid │ │ │ │ │ +100 centroid_ = coord_[ 0 ]; │ │ │ │ │ +101 for( int i = 1; i < numCorners; ++i ) │ │ │ │ │ +102 centroid_ += coord_[ i ]; │ │ │ │ │ +103 centroid_ *= 1.0 / numCorners; │ │ │ │ │ +104 │ │ │ │ │ +105 elDet_ = (coordReader.hasDeterminant() ? coordReader.determinant() : │ │ │ │ │ +elDeterminant()); │ │ │ │ │ +106 assert( std::abs( elDet_ ) > 0.0 ); │ │ │ │ │ +107 calcedDet_ = true; │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +110 │ │ │ │ │ +111#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +112 template< int dim, int cdim > │ │ │ │ │ +113 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y_<_ _d_i_m_,_ _c_d_i_m_,_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_< │ │ │ │ │ +_d_i_m_,_ _c_d_i_m_ _> >::GlobalCoordinate │ │ │ │ │ +114 _A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y_<_ _d_i_m_,_ _c_d_i_m_,_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _c_d_i_m_ _> >:: │ │ │ │ │ +global ( const LocalCoordinate &local ) const │ │ │ │ │ +115 { │ │ │ │ │ +116 GlobalCoordinate y = corner( 0 ); │ │ │ │ │ +117 jacobianTransposed().umtv( local, y ); │ │ │ │ │ +118 return y; │ │ │ │ │ +119 } │ │ │ │ │ +120 │ │ │ │ │ +121 │ │ │ │ │ +122 //local implementation for mydim < cdim │ │ │ │ │ +123 template< int dim, int cdim > │ │ │ │ │ +124 inline typename AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< │ │ │ │ │ +dim, cdim > >::LocalCoordinate │ │ │ │ │ +125 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >:: │ │ │ │ │ +local ( const GlobalCoordinate &global ) const │ │ │ │ │ +126 { │ │ │ │ │ +127 LocalCoordinate x; │ │ │ │ │ +128 jacobianInverseTransposed().mtv( global - corner( 0 ), x ); │ │ │ │ │ +129 return x; │ │ │ │ │ +130 } │ │ │ │ │ +131#endif // #if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +132 │ │ │ │ │ +133 │ │ │ │ │ +134 │ │ │ │ │ +135 // AlbertaGridLocalGeometryProvider │ │ │ │ │ +136 // -------------------------------- │ │ │ │ │ +137 │ │ │ │ │ +138 template< class Grid > │ │ │ │ │ +139 void AlbertaGridLocalGeometryProvider< Grid >::buildGeometryInFather () │ │ │ │ │ +140 { │ │ │ │ │ +141 for( int child = 0; child < numChildren; ++child ) │ │ │ │ │ +142 { │ │ │ │ │ +143 for( int orientation = 0; orientation < 2; ++orientation ) │ │ │ │ │ +144 { │ │ │ │ │ +145 const GeoInFatherCoordReader coordReader( child, orientation ); │ │ │ │ │ +146 geometryInFather_[ child ][ orientation ] = new LocalElementGeometry │ │ │ │ │ +( coordReader ); │ │ │ │ │ +147 } │ │ │ │ │ +148 } │ │ │ │ │ +149 } │ │ │ │ │ +150 │ │ │ │ │ +151 │ │ │ │ │ +152 template< class Grid > │ │ │ │ │ +153 void AlbertaGridLocalGeometryProvider< Grid >::buildFaceGeometry () │ │ │ │ │ +154 { │ │ │ │ │ +155 for( int face = 0; face < numFaces; ++face ) │ │ │ │ │ +156 { │ │ │ │ │ +157 for( int twist = minFaceTwist; twist <= maxFaceTwist; ++twist ) │ │ │ │ │ +158 { │ │ │ │ │ +159 const FaceCoordReader coordReader( face, twist ); │ │ │ │ │ +160 faceGeometry_[ face ][ twist - minFaceTwist ] = new LocalFaceGeometry │ │ │ │ │ +( coordReader ); │ │ │ │ │ +161 } │ │ │ │ │ +162 } │ │ │ │ │ +163 } │ │ │ │ │ +164 │ │ │ │ │ +165 │ │ │ │ │ +166 │ │ │ │ │ +167 // AlbertaGridLocalGeometryProvider::GeoInFatherCoordReader │ │ │ │ │ +168 // -------------------------------------------------------- │ │ │ │ │ +169 │ │ │ │ │ +170 template< class Grid > │ │ │ │ │ +_1_7_1 struct _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r< _G_r_i_d >::_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +172 { │ │ │ │ │ +_1_7_3 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ +174 │ │ │ │ │ +_1_7_5 typedef _F_i_e_l_d_V_e_c_t_o_r_<_ _c_t_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +176 │ │ │ │ │ +177 private: │ │ │ │ │ +178 typedef _A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _G_e_o_I_n_F_a_t_h_e_r; │ │ │ │ │ +179 │ │ │ │ │ +180 public: │ │ │ │ │ +_1_8_1 _G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r ( int child, int orientation ) │ │ │ │ │ +182 : child_( child ), │ │ │ │ │ +183 orientation_( orientation ) │ │ │ │ │ +184 {} │ │ │ │ │ +185 │ │ │ │ │ +_1_8_6 void _c_o_o_r_d_i_n_a_t_e ( int i, _C_o_o_r_d_i_n_a_t_e &_x ) const │ │ │ │ │ +187 { │ │ │ │ │ +188 const typename GeoInFather::LocalVector &coord │ │ │ │ │ +189 = GeoInFather::coordinate( child_, orientation_, i ); │ │ │ │ │ +190 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ +191 _x[ j ] = coord[ j ]; │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +_1_9_4 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +195 { │ │ │ │ │ +196 return false; │ │ │ │ │ +197 } │ │ │ │ │ +198 │ │ │ │ │ +_1_9_9 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +200 { │ │ │ │ │ +201 return _c_t_y_p_e( 0 ); │ │ │ │ │ +202 } │ │ │ │ │ +203 │ │ │ │ │ +204 private: │ │ │ │ │ +205 const int child_; │ │ │ │ │ +206 const int orientation_; │ │ │ │ │ +207 }; │ │ │ │ │ +208 │ │ │ │ │ +209 │ │ │ │ │ +210 │ │ │ │ │ +211 // AlbertaGridLocalGeometryProvider::FaceCoordReader │ │ │ │ │ +212 // ------------------------------------------------- │ │ │ │ │ +213 │ │ │ │ │ +214 template< class Grid > │ │ │ │ │ +_2_1_5 struct _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r< _G_r_i_d >::_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +216 { │ │ │ │ │ +_2_1_7 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ +218 │ │ │ │ │ +_2_1_9 typedef _F_i_e_l_d_V_e_c_t_o_r_<_ _c_t_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +220 │ │ │ │ │ +_2_2_1 _F_a_c_e_C_o_o_r_d_R_e_a_d_e_r ( const int _f_a_c_e, const int twist = 0 ) │ │ │ │ │ +222 : face_( _f_a_c_e ), │ │ │ │ │ +223 twist_( twist ) │ │ │ │ │ +224 {} │ │ │ │ │ +225 │ │ │ │ │ +_2_2_6 void _c_o_o_r_d_i_n_a_t_e ( const int i, _C_o_o_r_d_i_n_a_t_e &_x ) const │ │ │ │ │ +227 { │ │ │ │ │ +228 const int _t_i = _A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t< _d_i_m_e_n_s_i_o_n-1 >( twist_, i ); │ │ │ │ │ +229 const int j = _m_a_p_V_e_r_t_i_c_e_s_<_ _1_ _>( face_, _t_i ); │ │ │ │ │ +230 refCorner( j, _x ); │ │ │ │ │ +231 } │ │ │ │ │ +232 │ │ │ │ │ +_2_3_3 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +234 { │ │ │ │ │ +235 return false; │ │ │ │ │ +236 } │ │ │ │ │ +237 │ │ │ │ │ +_2_3_8 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +239 { │ │ │ │ │ +240 return _c_t_y_p_e( 0 ); │ │ │ │ │ +241 } │ │ │ │ │ +242 │ │ │ │ │ +243 private: │ │ │ │ │ +244 static void refCorner ( const int i, Coordinate &_x ) │ │ │ │ │ +245 { │ │ │ │ │ +246 _x = _c_t_y_p_e( 0 ); │ │ │ │ │ +247 if( i > 0 ) │ │ │ │ │ +248 _x[ i-1 ] = _c_t_y_p_e( 1 ); │ │ │ │ │ +249 } │ │ │ │ │ +250 │ │ │ │ │ +251 int face_; │ │ │ │ │ +252 int twist_; │ │ │ │ │ +253 }; │ │ │ │ │ +254 │ │ │ │ │ +255} // namespace Dune │ │ │ │ │ +256 │ │ │ │ │ +257#endif // #ifndef DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ +_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ +geometryInFather │ │ │ │ │ +_a_l_g_e_b_r_a_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -ask for level of entities │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_g_r_i_d │ │ │ │ │ -const GridImp & grid() const │ │ │ │ │ -obtain a reference to the grid │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -Base::MarkerVector MarkerVector │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLevelIterator() │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int │ │ │ │ │ -level) │ │ │ │ │ -Constructor making begin iterator. │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, int level) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment the iterator │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLevelIterator() │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment the iterator │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -Base::MarkerVector MarkerVector │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, int level) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level) │ │ │ │ │ -Constructor making begin iterator (which is the end iterator in this case) │ │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -marker assigning subentities to one element containing them │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t │ │ │ │ │ +int applyInverseTwist(int twist, int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:637 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ │ +static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ │ +&inverse) │ │ │ │ │ +DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:172 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, dimension > Coordinate │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:175 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ +Alberta::Real ctype │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:173 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +void coordinate(int i, Coordinate &x) const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:186 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_: │ │ │ │ │ +_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +GeoInFatherCoordReader(int child, int orientation) │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:181 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +bool hasDeterminant() const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:194 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +ctype determinant() const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:199 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:216 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +FaceCoordReader(const int face, const int twist=0) │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:221 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +void coordinate(const int i, Coordinate &x) const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:226 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +ctype determinant() const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:238 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, dimension > Coordinate │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:219 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +bool hasDeterminant() const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:233 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ +Alberta::Real ctype │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:217 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ +geometry implementation for AlbertaGrid │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +const JacobianTransposed & jacobianTransposed() const │ │ │ │ │ +transposed of the geometry mapping's Jacobian │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:55 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ +map a point from the geometry to the reference element │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:45 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +const JacobianInverseTransposed & jacobianInverseTransposed() const │ │ │ │ │ +transposed inverse of the geometry mapping's Jacobian │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:73 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_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 │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:126 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &out) const │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:20 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ │ +map a point from the reference element to the geometry │ │ │ │ │ +DDeeffiinniittiioonn geometry.cc:34 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:303 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:510 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:508 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:514 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: indexstack.hh File Reference │ │ │ │ +dune-grid: dofadmin.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,39 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
indexstack.hh File Reference
│ │ │ │ +
dofadmin.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid) │ │ │ │ -More...

│ │ │ │ -
#include <assert.h>
│ │ │ │ -#include <stack>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/reservedvector.hh>
│ │ │ │ +
#include <utility>
│ │ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IndexStack< T, length >
class  Dune::Alberta::DofAccess< dim, codim >
 
class  Dune::Alberta::HierarchyDofNumbering< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)

│ │ │ │ -
Author
Robert Kloefkorn
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,26 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -indexstack.hh File Reference │ │ │ │ │ -Provides an index stack that supplies indices for element numbering for a grid │ │ │ │ │ -(i.e. AlbertaGrid and ALUGrid) _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dofadmin.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._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_:_:_I_n_d_e_x_S_t_a_c_k_<_ _T_,_ _l_e_n_g_t_h_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides an index stack that supplies indices for element numbering for a grid │ │ │ │ │ -(i.e. AlbertaGrid and ALUGrid) │ │ │ │ │ - Author │ │ │ │ │ - Robert Kloefkorn │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: indexstack.hh Source File │ │ │ │ +dune-grid: dofadmin.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,257 +74,387 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
indexstack.hh
│ │ │ │ +
dofadmin.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │ │ -
6#define DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │ +
6#define DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │
7
│ │ │ │ -
8#include <assert.h>
│ │ │ │ -
9#include <stack>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ -
12#include <dune/common/reservedvector.hh>
│ │ │ │ -
13
│ │ │ │ -
20namespace Dune {
│ │ │ │ -
21
│ │ │ │ -
24 template <class T, int length>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27 class MyFiniteStack : public ReservedVector<T,length>
│ │ │ │ -
28 {
│ │ │ │ -
29 typedef ReservedVector<T,length> BaseType ;
│ │ │ │ -
30 public:
│ │ │ │ -
32 bool full () const { return this->size() >= length; }
│ │ │ │ +
8#include <utility>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/hybridutilities.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#if HAVE_ALBERTA
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 namespace Alberta
│ │ │ │ +
21 {
│ │ │ │ +
22
│ │ │ │ +
23 // External Forward Declarations
│ │ │ │ +
24 // -----------------------------
│ │ │ │ +
25
│ │ │ │ +
26 template< int dim >
│ │ │ │ +
27 class MeshPointer;
│ │ │ │ +
28
│ │ │ │ +
29
│ │ │ │ +
30
│ │ │ │ +
31 // DofAccess
│ │ │ │ +
32 // ---------
│ │ │ │
33
│ │ │ │ -
35 void push( const T& t ) { BaseType :: push_back( t ); }
│ │ │ │ -
36
│ │ │ │ -
38 T topAndPop ()
│ │ │ │ -
39 {
│ │ │ │ -
40 assert( !this->empty() );
│ │ │ │ -
41 assert( this->size() <= length );
│ │ │ │ -
42 // This code is not slower than using the array structure directly.
│ │ │ │ -
43 // The compiler removes the temporary completely. I measured this.
│ │ │ │ -
44 // See the commit message for revision 7837 for more details.
│ │ │ │ -
45 T tmp = this->back();
│ │ │ │ -
46 this->pop_back();
│ │ │ │ -
47 return tmp;
│ │ │ │ -
48 }
│ │ │ │ -
49 };
│ │ │ │ +
34 template< int dim, int codim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {
│ │ │ │ +
37 static const int codimtype = CodimType< dim, codim >::value;
│ │ │ │ +
38
│ │ │ │ +
39 public:
│ │ │ │ + │ │ │ │ +
41
│ │ │ │ +
42 static const int dimension = dim;
│ │ │ │ +
43 static const int codimension = codim;
│ │ │ │ +
44
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
48 : node_( -1 )
│ │ │ │ +
49 {}
│ │ │ │ +
│ │ │ │
50
│ │ │ │ -
51 typedef MyFiniteStack StackType;
│ │ │ │ -
52 typedef typename std::stack < StackType * > StackListType;
│ │ │ │ -
53
│ │ │ │ -
54 StackListType fullStackList_;
│ │ │ │ -
55 StackListType emptyStackList_;
│ │ │ │ -
56
│ │ │ │ -
57 //typedef typename StackListType::Iterator DListIteratorType;
│ │ │ │ -
58 StackType * stack_;
│ │ │ │ -
59
│ │ │ │ -
60 // current maxIndex
│ │ │ │ -
61 int maxIndex_;
│ │ │ │ -
62 public:
│ │ │ │ -
64 inline IndexStack();
│ │ │ │ +
│ │ │ │ +
51 explicit DofAccess ( const DofSpace *dofSpace )
│ │ │ │ +
52 {
│ │ │ │ +
53 assert( dofSpace );
│ │ │ │ +
54 node_ = dofSpace->admin->mesh->node[ codimtype ];
│ │ │ │ +
55 index_ = dofSpace->admin->n0_dof[ codimtype ];
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
│ │ │ │ +
58 int operator() ( const Element *element, int subEntity, int i ) const
│ │ │ │ +
59 {
│ │ │ │ +
60 assert( element );
│ │ │ │ +
61 assert( node_ != -1 );
│ │ │ │ +
62 assert( subEntity < numSubEntities );
│ │ │ │ +
63 return element->dof[ node_ + subEntity ][ index_ + i ];
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │
65
│ │ │ │ -
67 inline ~IndexStack ();
│ │ │ │ -
68
│ │ │ │ -
70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ = index;}
│ │ │ │ -
71
│ │ │ │ -
73 inline void setMaxIndex(T index) { maxIndex_ = index; }
│ │ │ │ -
74
│ │ │ │ -
76 inline int getMaxIndex() const { return maxIndex_; }
│ │ │ │ -
77
│ │ │ │ -
79 inline int size() const { return getMaxIndex(); }
│ │ │ │ +
│ │ │ │ +
66 int operator() ( const Element *element, int subEntity ) const
│ │ │ │ +
67 {
│ │ │ │ +
68 return (*this)( element, subEntity, 0 );
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 int operator() ( const ElementInfo &elementInfo, int subEntity, int i ) const
│ │ │ │ +
72 {
│ │ │ │ +
73 return (*this)( elementInfo.el(), subEntity, i );
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
│ │ │ │ +
76 int operator() ( const ElementInfo &elementInfo, int subEntity ) const
│ │ │ │ +
77 {
│ │ │ │ +
78 return (*this)( elementInfo.el(), subEntity );
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │
80
│ │ │ │ -
82 inline T getIndex ();
│ │ │ │ -
83
│ │ │ │ -
85 inline void freeIndex(T index);
│ │ │ │ +
81 private:
│ │ │ │ +
82 int node_;
│ │ │ │ +
83 int index_;
│ │ │ │ +
84 };
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │
86
│ │ │ │ -
88 inline void test ();
│ │ │ │ -
89
│ │ │ │ -
90 // backup set to out stream
│ │ │ │ -
91 inline void backupIndexSet ( std::ostream & os );
│ │ │ │ -
92
│ │ │ │ -
93 // restore from in stream
│ │ │ │ -
94 inline void restoreIndexSet ( std::istream & is );
│ │ │ │ -
95 private:
│ │ │ │ -
96 // no copy constructor allowed
│ │ │ │ -
97 IndexStack( const IndexStack<T,length> & s) : maxIndex_ (0) , stack_(0) {}
│ │ │ │ +
87
│ │ │ │ +
88 // HierarchyDofNumbering
│ │ │ │ +
89 // ---------------------
│ │ │ │ +
90
│ │ │ │ +
91 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
93 {
│ │ │ │ + │ │ │ │ +
95
│ │ │ │ +
96 public:
│ │ │ │ +
97 static const int dimension = dim;
│ │ │ │
98
│ │ │ │ -
99 // no assignment operator allowed
│ │ │ │ -
100 IndexStack<T,length> & operator = ( const IndexStack<T,length> & s)
│ │ │ │ -
101 {
│ │ │ │ -
102 DUNE_THROW(Exception, "IndexStack::operator = () not allowed!");
│ │ │ │ -
103 return *this;
│ │ │ │ -
104 }
│ │ │ │ -
105
│ │ │ │ -
106 // clear fullStacks
│ │ │ │ -
107 void clearStack ();
│ │ │ │ -
108
│ │ │ │ -
109 }; // end class IndexStack
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ +
101
│ │ │ │ +
102 private:
│ │ │ │ +
103 static const int nNodeTypes = N_NODE_TYPES;
│ │ │ │ +
104
│ │ │ │ +
105 template< int codim >
│ │ │ │ +
106 struct CreateDofSpace;
│ │ │ │ +
107
│ │ │ │ +
108 template< int codim >
│ │ │ │ +
109 struct CacheDofSpace;
│ │ │ │
110
│ │ │ │ -
111 //****************************************************************
│ │ │ │ -
112 // Inline implementation
│ │ │ │ -
113 // ***************************************************************
│ │ │ │ -
114 template <class T, int length>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
116 : stack_ ( new StackType () ) , maxIndex_ (0) {}
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
118 template <class T, int length>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
120 {
│ │ │ │ -
121 if(stack_) delete stack_;
│ │ │ │ -
122 stack_ = 0;
│ │ │ │ -
123
│ │ │ │ -
124 while( !fullStackList_.empty() )
│ │ │ │ -
125 {
│ │ │ │ -
126 StackType * st = fullStackList_.top();
│ │ │ │ -
127 if(st) delete st;
│ │ │ │ -
128 fullStackList_.pop();
│ │ │ │ -
129 }
│ │ │ │ -
130 while( !emptyStackList_.empty() )
│ │ │ │ -
131 {
│ │ │ │ -
132 StackType * st = emptyStackList_.top();
│ │ │ │ -
133 if(st) delete st;
│ │ │ │ -
134 emptyStackList_.pop();
│ │ │ │ -
135 }
│ │ │ │ -
136 }
│ │ │ │ -
│ │ │ │ -
137
│ │ │ │ -
138 template <class T, int length>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
140 {
│ │ │ │ -
141 if((*stack_).empty())
│ │ │ │ -
142 {
│ │ │ │ -
143 if( fullStackList_.size() <= 0)
│ │ │ │ -
144 {
│ │ │ │ -
145 return maxIndex_++;
│ │ │ │ -
146 }
│ │ │ │ -
147 else
│ │ │ │ -
148 {
│ │ │ │ -
149 emptyStackList_.push( stack_ );
│ │ │ │ -
150 stack_ = fullStackList_.top();
│ │ │ │ -
151 fullStackList_.pop();
│ │ │ │ -
152 }
│ │ │ │ -
153 }
│ │ │ │ -
154 return (*stack_).topAndPop();
│ │ │ │ -
155 }
│ │ │ │ +
111 typedef std::pair< int, int > Cache;
│ │ │ │ +
112
│ │ │ │ +
113 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
115 {}
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
117 private:
│ │ │ │ +
118 HierarchyDofNumbering ( const This & );
│ │ │ │ +
119 This &operator= ( const This & );
│ │ │ │ +
120
│ │ │ │ +
121 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
123 {
│ │ │ │ +
124 release();
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
│ │ │ │ +
127 int operator() ( const Element *element, int codim, unsigned int subEntity ) const
│ │ │ │ +
128 {
│ │ │ │ +
129 assert( !(*this) == false );
│ │ │ │ +
130 assert( (codim >= 0) && (codim <= dimension) );
│ │ │ │ +
131 const Cache &cache = cache_[ codim ];
│ │ │ │ +
132 return element->dof[ cache.first + subEntity ][ cache.second ];
│ │ │ │ +
133 }
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
│ │ │ │ +
135 int operator() ( const ElementInfo &element, int codim, unsigned int subEntity ) const
│ │ │ │ +
136 {
│ │ │ │ +
137 return (*this)( element.el(), codim, subEntity );
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
│ │ │ │ +
140 explicit operator bool () const
│ │ │ │ +
141 {
│ │ │ │ +
142 return (bool)mesh_;
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
│ │ │ │ +
145 const DofSpace *dofSpace ( int codim ) const
│ │ │ │ +
146 {
│ │ │ │ +
147 assert( *this );
│ │ │ │ +
148 assert( (codim >= 0) && (codim <= dimension) );
│ │ │ │ +
149 return dofSpace_[ codim ];
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
│ │ │ │ +
152 const DofSpace *emptyDofSpace () const
│ │ │ │ +
153 {
│ │ │ │ +
154 assert( *this );
│ │ │ │ +
155 return emptySpace_;
│ │ │ │ +
156 }
│ │ │ │
│ │ │ │ -
156
│ │ │ │ -
157 template <class T, int length>
│ │ │ │ +
157
│ │ │ │
│ │ │ │ -
158 inline void IndexStack<T,length>::freeIndex ( T index )
│ │ │ │ -
159 {
│ │ │ │ -
160 if((*stack_).full())
│ │ │ │ -
161 {
│ │ │ │ -
162 fullStackList_.push( stack_ );
│ │ │ │ -
163 if(emptyStackList_.size() <= 0)
│ │ │ │ -
164 {
│ │ │ │ -
165 stack_ = new StackType ();
│ │ │ │ +
158 const MeshPointer &mesh () const
│ │ │ │ +
159 {
│ │ │ │ +
160 return mesh_;
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
│ │ │ │ +
163 int size ( int codim ) const
│ │ │ │ +
164 {
│ │ │ │ +
165 return dofSpace( codim )->admin->size;
│ │ │ │
166 }
│ │ │ │ -
167 else
│ │ │ │ -
168 {
│ │ │ │ -
169 stack_ = emptyStackList_.top();
│ │ │ │ -
170 emptyStackList_.pop();
│ │ │ │ -
171 }
│ │ │ │ -
172 }
│ │ │ │ -
173 (*stack_).push(index);
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
176 template <class T, int length>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
178 {
│ │ │ │ -
179 T vec[2*length];
│ │ │ │ +
│ │ │ │ +
167
│ │ │ │ +
│ │ │ │ +
168 void create ( const MeshPointer &mesh );
│ │ │ │ +
169
│ │ │ │ +
│ │ │ │ +
170 void release ()
│ │ │ │ +
171 {
│ │ │ │ +
172 if( *this )
│ │ │ │ +
173 {
│ │ │ │ +
174 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ +
175 freeDofSpace( dofSpace_[ codim ] );
│ │ │ │ +
176 freeDofSpace( emptySpace_ );
│ │ │ │ +
177 mesh_ = MeshPointer();
│ │ │ │ +
178 }
│ │ │ │ +
179 }
│ │ │ │ +
│ │ │ │
180
│ │ │ │ -
181 for(int i=0; i<2*length; i++)
│ │ │ │ -
182 vec[i] = getIndex();
│ │ │ │ -
183
│ │ │ │ -
184 for(int i=0; i<2*length; i++)
│ │ │ │ -
185 freeIndex(vec[i]);
│ │ │ │ -
186
│ │ │ │ -
187 for(int i=0; i<2*length; i++)
│ │ │ │ -
188 vec[i] = getIndex();
│ │ │ │ -
189
│ │ │ │ -
190 for(int i=0; i<2*length; i++)
│ │ │ │ -
191 printf(" index [%d] = %d \n",i,vec[i]);
│ │ │ │ -
192 }
│ │ │ │ -
│ │ │ │ -
193
│ │ │ │ -
194 template <class T, int length>
│ │ │ │ -
│ │ │ │ -
195 inline void IndexStack<T,length>::backupIndexSet ( std::ostream & os )
│ │ │ │ -
196 {
│ │ │ │ -
197 // holes are not stored at the moment
│ │ │ │ -
198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ;
│ │ │ │ -
199 return ;
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
202 template <class T, int length>
│ │ │ │ -
│ │ │ │ -
203 inline void IndexStack<T,length>::restoreIndexSet ( std::istream & is )
│ │ │ │ -
204 {
│ │ │ │ -
205 is.read ( ((char *) &maxIndex_), sizeof(int) );
│ │ │ │ -
206 clearStack ();
│ │ │ │ +
181 private:
│ │ │ │ +
182 static const DofSpace *createEmptyDofSpace ( const MeshPointer &mesh );
│ │ │ │ +
183 static const DofSpace *createDofSpace ( const MeshPointer &mesh,
│ │ │ │ +
184 const std::string &name,
│ │ │ │ +
185 const int (&ndof)[ nNodeTypes ],
│ │ │ │ +
186 const bool periodic = false );
│ │ │ │ +
187 static void freeDofSpace ( const DofSpace *dofSpace );
│ │ │ │ +
188
│ │ │ │ +
189 MeshPointer mesh_;
│ │ │ │ +
190 const DofSpace *emptySpace_;
│ │ │ │ +
191 const DofSpace *dofSpace_[ dimension+1 ];
│ │ │ │ +
192 Cache cache_[ dimension+1 ];
│ │ │ │ +
193 };
│ │ │ │ +
194
│ │ │ │ +
195
│ │ │ │ +
196
│ │ │ │ +
197 template< int dim >
│ │ │ │ +
198 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
200 {
│ │ │ │ +
201 release();
│ │ │ │ +
202
│ │ │ │ +
203 if( !mesh )
│ │ │ │ +
204 return;
│ │ │ │ +
205
│ │ │ │ +
206 mesh_ = mesh;
│ │ │ │
207
│ │ │ │ -
208 return ;
│ │ │ │ -
209 }
│ │ │ │ -
│ │ │ │ +
208 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ){ CreateDofSpace< i >::apply( mesh_, dofSpace_ ); } );
│ │ │ │ +
209 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ){ CacheDofSpace< i >::apply( dofSpace_, cache_ ); } );
│ │ │ │
210
│ │ │ │ -
211 template <class T, int length>
│ │ │ │ - │ │ │ │ -
213 {
│ │ │ │ -
214 if(stack_)
│ │ │ │ -
215 {
│ │ │ │ -
216 delete stack_;
│ │ │ │ -
217 stack_ = new StackType();
│ │ │ │ -
218 assert(stack_);
│ │ │ │ -
219 }
│ │ │ │ -
220
│ │ │ │ -
221 while( !fullStackList_.empty() )
│ │ │ │ -
222 {
│ │ │ │ -
223 StackType * st = fullStackList_.top();
│ │ │ │ -
224 if(st) delete st;
│ │ │ │ -
225 fullStackList_.pop();
│ │ │ │ -
226 }
│ │ │ │ -
227 return;
│ │ │ │ -
228 }
│ │ │ │ +
211 emptySpace_ = createEmptyDofSpace( mesh_ );
│ │ │ │ +
212 for( int i = 0; i < nNodeTypes; ++i )
│ │ │ │ +
213 assert( emptySpace_->admin->n_dof[ i ] == 0 );
│ │ │ │ +
214 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
216
│ │ │ │ +
217
│ │ │ │ +
218 template< int dim >
│ │ │ │ +
219 inline const DofSpace *
│ │ │ │ + │ │ │ │ +
221 {
│ │ │ │ +
222 int ndof[ nNodeTypes ];
│ │ │ │ +
223 for( int i = 0; i < nNodeTypes; ++i )
│ │ │ │ +
224 ndof[ i ] = 0;
│ │ │ │ +
225 std::string name = "Empty";
│ │ │ │ +
226 return createDofSpace( mesh, name, ndof );
│ │ │ │ +
227 }
│ │ │ │ +
228
│ │ │ │
229
│ │ │ │ -
230} // end namespace Dune
│ │ │ │ -
231#endif
│ │ │ │ +
230 template< int dim >
│ │ │ │ +
231 inline const DofSpace *
│ │ │ │ +
232 HierarchyDofNumbering< dim >::createDofSpace ( const MeshPointer &mesh,
│ │ │ │ +
233 const std::string &name,
│ │ │ │ +
234 const int (&ndof)[ nNodeTypes ],
│ │ │ │ +
235 const bool periodic )
│ │ │ │ +
236 {
│ │ │ │ +
237 const ALBERTA FLAGS flags
│ │ │ │ +
238 = ADM_PRESERVE_COARSE_DOFS | (periodic ? ADM_PERIODIC : 0);
│ │ │ │ +
239 return ALBERTA get_dof_space ( mesh, name.c_str(), ndof, flags );
│ │ │ │ +
240 }
│ │ │ │ +
241
│ │ │ │ +
242
│ │ │ │ +
243 template< int dim >
│ │ │ │ +
244 inline void
│ │ │ │ +
245 HierarchyDofNumbering< dim >::freeDofSpace ( const DofSpace *dofSpace )
│ │ │ │ +
246 {
│ │ │ │ +
247 ALBERTA free_fe_space( dofSpace );
│ │ │ │ +
248 }
│ │ │ │ +
249
│ │ │ │ +
250
│ │ │ │ +
251
│ │ │ │ +
252 // HierarchyDofNumbering::CreateDofSpace
│ │ │ │ +
253 // -------------------------------------
│ │ │ │ +
254
│ │ │ │ +
255 template< int dim >
│ │ │ │ +
256 template< int codim >
│ │ │ │ +
257 struct HierarchyDofNumbering< dim >::CreateDofSpace
│ │ │ │ +
258 {
│ │ │ │ +
259 static void apply ( const MeshPointer &mesh, const DofSpace *(&dofSpace)[ dim+1 ] )
│ │ │ │ +
260 {
│ │ │ │ +
261 int ndof[ nNodeTypes ];
│ │ │ │ +
262 for( int i = 0; i < nNodeTypes; ++i )
│ │ │ │ +
263 ndof[ i ] = 0;
│ │ │ │ +
264 ndof[ CodimType< dim, codim >::value ] = 1;
│ │ │ │ +
265
│ │ │ │ +
266 std::string name = "Codimension ";
│ │ │ │ +
267 name += (char)(codim + '0');
│ │ │ │ +
268
│ │ │ │ +
269 dofSpace[ codim ] = createDofSpace( mesh, name, ndof );
│ │ │ │ +
270 assert( dofSpace[ codim ] );
│ │ │ │ +
271 }
│ │ │ │ +
272 };
│ │ │ │ +
273
│ │ │ │ +
274
│ │ │ │ +
275
│ │ │ │ +
276 // HierarchyDofNumbering::CacheDofSpace
│ │ │ │ +
277 // ------------------------------------
│ │ │ │ +
278
│ │ │ │ +
279 template< int dim >
│ │ │ │ +
280 template< int codim >
│ │ │ │ +
281 struct HierarchyDofNumbering< dim >::CacheDofSpace
│ │ │ │ +
282 {
│ │ │ │ +
283 static void apply ( const DofSpace *(&dofSpace)[ dim+1 ], Cache (&cache)[ dim+1 ] )
│ │ │ │ +
284 {
│ │ │ │ +
285 assert( dofSpace[ codim ] );
│ │ │ │ +
286 const int codimtype = CodimType< dim, codim >::value;
│ │ │ │ +
287 cache[ codim ].first = dofSpace[ codim ]->mesh->node[ codimtype ];
│ │ │ │ +
288 cache[ codim ].second = dofSpace[ codim ]->admin->n0_dof[ codimtype ];
│ │ │ │ +
289 }
│ │ │ │ +
290 };
│ │ │ │ +
291
│ │ │ │ +
292 } // namespace Alberta
│ │ │ │ +
293
│ │ │ │ +
294} // namespace Dune
│ │ │ │ +
295
│ │ │ │ +
296#endif // #if HAVE_ALBERTA
│ │ │ │ +
297
│ │ │ │ +
298#endif // #ifndef DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition indexstack.hh:26
│ │ │ │ -
void restoreIndexSet(std::istream &is)
Definition indexstack.hh:203
│ │ │ │ -
void checkAndSetMax(T index)
set index as maxIndex if index is bigger than maxIndex
Definition indexstack.hh:70
│ │ │ │ -
void backupIndexSet(std::ostream &os)
Definition indexstack.hh:195
│ │ │ │ -
~IndexStack()
Destructor, deleting all stacks.
Definition indexstack.hh:119
│ │ │ │ -
T getIndex()
restore index from stack or create new index
Definition indexstack.hh:139
│ │ │ │ -
IndexStack()
Constructor, create new IndexStack.
Definition indexstack.hh:115
│ │ │ │ -
void setMaxIndex(T index)
set index as maxIndex
Definition indexstack.hh:73
│ │ │ │ -
int size() const
return maxIndex which is also the
Definition indexstack.hh:79
│ │ │ │ -
void test()
test stack functionality
Definition indexstack.hh:177
│ │ │ │ -
void freeIndex(T index)
store index on stack
Definition indexstack.hh:158
│ │ │ │ -
int getMaxIndex() const
return maxIndex which is also the
Definition indexstack.hh:76
│ │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ +
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ + │ │ │ │ +
Definition dofadmin.hh:36
│ │ │ │ +
static const int dimension
Definition dofadmin.hh:42
│ │ │ │ +
DofAccess()
Definition dofadmin.hh:47
│ │ │ │ +
static const int codimension
Definition dofadmin.hh:43
│ │ │ │ +
static const int numSubEntities
Definition dofadmin.hh:40
│ │ │ │ +
DofAccess(const DofSpace *dofSpace)
Definition dofadmin.hh:51
│ │ │ │ +
int operator()(const Element *element, int subEntity, int i) const
Definition dofadmin.hh:58
│ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition dofadmin.hh:45
│ │ │ │ +
Definition dofadmin.hh:93
│ │ │ │ +
HierarchyDofNumbering()
Definition dofadmin.hh:114
│ │ │ │ +
int operator()(const Element *element, int codim, unsigned int subEntity) const
Definition dofadmin.hh:127
│ │ │ │ +
const MeshPointer & mesh() const
Definition dofadmin.hh:158
│ │ │ │ +
void create(const MeshPointer &mesh)
Definition dofadmin.hh:199
│ │ │ │ +
~HierarchyDofNumbering()
Definition dofadmin.hh:122
│ │ │ │ +
Alberta::MeshPointer< dimension > MeshPointer
Definition dofadmin.hh:99
│ │ │ │ +
int size(int codim) const
Definition dofadmin.hh:163
│ │ │ │ +
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition dofadmin.hh:100
│ │ │ │ +
static const int dimension
Definition dofadmin.hh:97
│ │ │ │ +
const DofSpace * emptyDofSpace() const
Definition dofadmin.hh:152
│ │ │ │ +
void release()
Definition dofadmin.hh:170
│ │ │ │ + │ │ │ │ +
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ +
Definition misc.hh:148
│ │ │ │ +
Definition misc.hh:192
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,271 +1,403 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -indexstack.hh │ │ │ │ │ +dofadmin.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ │ -6#define DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ +6#define DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -20namespace _D_u_n_e { │ │ │ │ │ -21 │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 class _I_n_d_e_x_S_t_a_c_k │ │ │ │ │ -26 { │ │ │ │ │ -27 class MyFiniteStack : public ReservedVector │ │ │ │ │ -28 { │ │ │ │ │ -29 typedef ReservedVector BaseType ; │ │ │ │ │ -30 public: │ │ │ │ │ -32 bool full () const { return this->_s_i_z_e() >= length; } │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15#if HAVE_ALBERTA │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 namespace Alberta │ │ │ │ │ +21 { │ │ │ │ │ +22 │ │ │ │ │ +23 // External Forward Declarations │ │ │ │ │ +24 // ----------------------------- │ │ │ │ │ +25 │ │ │ │ │ +26 template< int dim > │ │ │ │ │ +27 class MeshPointer; │ │ │ │ │ +28 │ │ │ │ │ +29 │ │ │ │ │ +30 │ │ │ │ │ +31 // DofAccess │ │ │ │ │ +32 // --------- │ │ │ │ │ 33 │ │ │ │ │ -35 void push( const T& t ) { BaseType :: push_back( t ); } │ │ │ │ │ -36 │ │ │ │ │ -38 T topAndPop () │ │ │ │ │ -39 { │ │ │ │ │ -40 assert( !this->empty() ); │ │ │ │ │ -41 assert( this->_s_i_z_e() <= length ); │ │ │ │ │ -42 // This code is not slower than using the array structure directly. │ │ │ │ │ -43 // The compiler removes the temporary completely. I measured this. │ │ │ │ │ -44 // See the commit message for revision 7837 for more details. │ │ │ │ │ -45 T tmp = this->back(); │ │ │ │ │ -46 this->pop_back(); │ │ │ │ │ -47 return tmp; │ │ │ │ │ -48 } │ │ │ │ │ -49 }; │ │ │ │ │ +34 template< int dim, int codim > │ │ │ │ │ +_3_5 class _D_o_f_A_c_c_e_s_s │ │ │ │ │ +36 { │ │ │ │ │ +37 static const int codimtype = _C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +38 │ │ │ │ │ +39 public: │ │ │ │ │ +_4_0 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +41 │ │ │ │ │ +_4_2 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_4_3 static const int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +44 │ │ │ │ │ +_4_5 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +46 │ │ │ │ │ +_4_7 _D_o_f_A_c_c_e_s_s () │ │ │ │ │ +48 : node_( -1 ) │ │ │ │ │ +49 {} │ │ │ │ │ 50 │ │ │ │ │ -51 typedef MyFiniteStack StackType; │ │ │ │ │ -52 typedef typename std::stack < StackType * > StackListType; │ │ │ │ │ -53 │ │ │ │ │ -54 StackListType fullStackList_; │ │ │ │ │ -55 StackListType emptyStackList_; │ │ │ │ │ -56 │ │ │ │ │ -57 //typedef typename StackListType::Iterator DListIteratorType; │ │ │ │ │ -58 StackType * stack_; │ │ │ │ │ -59 │ │ │ │ │ -60 // current maxIndex │ │ │ │ │ -61 int maxIndex_; │ │ │ │ │ -62 public: │ │ │ │ │ -64 inline _I_n_d_e_x_S_t_a_c_k(); │ │ │ │ │ +_5_1 explicit _D_o_f_A_c_c_e_s_s ( const _D_o_f_S_p_a_c_e *dofSpace ) │ │ │ │ │ +52 { │ │ │ │ │ +53 assert( dofSpace ); │ │ │ │ │ +54 node_ = dofSpace->admin->mesh->node[ codimtype ]; │ │ │ │ │ +55 index_ = dofSpace->admin->n0_dof[ codimtype ]; │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +_5_8 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int subEntity, int i ) const │ │ │ │ │ +59 { │ │ │ │ │ +60 assert( element ); │ │ │ │ │ +61 assert( node_ != -1 ); │ │ │ │ │ +62 assert( subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s ); │ │ │ │ │ +63 return element->dof[ node_ + subEntity ][ index_ + i ]; │ │ │ │ │ +64 } │ │ │ │ │ 65 │ │ │ │ │ -67 inline _~_I_n_d_e_x_S_t_a_c_k (); │ │ │ │ │ -68 │ │ │ │ │ -_7_0 inline void _c_h_e_c_k_A_n_d_S_e_t_M_a_x(T index) { if(index > maxIndex_) maxIndex_ = │ │ │ │ │ -index;} │ │ │ │ │ -71 │ │ │ │ │ -_7_3 inline void _s_e_t_M_a_x_I_n_d_e_x(T index) { maxIndex_ = index; } │ │ │ │ │ -74 │ │ │ │ │ -_7_6 inline int _g_e_t_M_a_x_I_n_d_e_x() const { return maxIndex_; } │ │ │ │ │ -77 │ │ │ │ │ -_7_9 inline int _s_i_z_e() const { return _g_e_t_M_a_x_I_n_d_e_x(); } │ │ │ │ │ +_6_6 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int subEntity ) const │ │ │ │ │ +67 { │ │ │ │ │ +68 return (*this)( element, subEntity, 0 ); │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity, int i ) │ │ │ │ │ +const │ │ │ │ │ +72 { │ │ │ │ │ +73 return (*this)( elementInfo._e_l(), subEntity, i ); │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) const │ │ │ │ │ +77 { │ │ │ │ │ +78 return (*this)( elementInfo._e_l(), subEntity ); │ │ │ │ │ +79 } │ │ │ │ │ 80 │ │ │ │ │ -82 inline T _g_e_t_I_n_d_e_x (); │ │ │ │ │ -83 │ │ │ │ │ -85 inline void _f_r_e_e_I_n_d_e_x(T index); │ │ │ │ │ +81 private: │ │ │ │ │ +82 int node_; │ │ │ │ │ +83 int index_; │ │ │ │ │ +84 }; │ │ │ │ │ +85 │ │ │ │ │ 86 │ │ │ │ │ -88 inline void _t_e_s_t (); │ │ │ │ │ -89 │ │ │ │ │ -90 // backup set to out stream │ │ │ │ │ -91 inline void _b_a_c_k_u_p_I_n_d_e_x_S_e_t ( std::ostream & os ); │ │ │ │ │ -92 │ │ │ │ │ -93 // restore from in stream │ │ │ │ │ -94 inline void _r_e_s_t_o_r_e_I_n_d_e_x_S_e_t ( std::istream & is ); │ │ │ │ │ -95 private: │ │ │ │ │ -96 // no copy constructor allowed │ │ │ │ │ -97 _I_n_d_e_x_S_t_a_c_k( const _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_> & s) : maxIndex_ (0) , stack_(0) {} │ │ │ │ │ +87 │ │ │ │ │ +88 // HierarchyDofNumbering │ │ │ │ │ +89 // --------------------- │ │ │ │ │ +90 │ │ │ │ │ +91 template< int dim > │ │ │ │ │ +_9_2 class _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +93 { │ │ │ │ │ +94 typedef _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ +95 │ │ │ │ │ +96 public: │ │ │ │ │ +_9_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ 98 │ │ │ │ │ -99 // no assignment operator allowed │ │ │ │ │ -100 IndexStack & operator = ( const IndexStack & s) │ │ │ │ │ -101 { │ │ │ │ │ -102 DUNE_THROW(Exception, "IndexStack::operator = () not allowed!"); │ │ │ │ │ -103 return *this; │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -106 // clear fullStacks │ │ │ │ │ -107 void clearStack (); │ │ │ │ │ -108 │ │ │ │ │ -109 }; // end class IndexStack │ │ │ │ │ +_9_9 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +_1_0_0 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +101 │ │ │ │ │ +102 private: │ │ │ │ │ +103 static const int nNodeTypes = N_NODE_TYPES; │ │ │ │ │ +104 │ │ │ │ │ +105 template< int codim > │ │ │ │ │ +106 struct CreateDofSpace; │ │ │ │ │ +107 │ │ │ │ │ +108 template< int codim > │ │ │ │ │ +109 struct CacheDofSpace; │ │ │ │ │ 110 │ │ │ │ │ -111 //**************************************************************** │ │ │ │ │ -112 // Inline implementation │ │ │ │ │ -113 // *************************************************************** │ │ │ │ │ -114 template │ │ │ │ │ -_1_1_5 inline _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_I_n_d_e_x_S_t_a_c_k() │ │ │ │ │ -116 : stack_ ( new StackType () ) , maxIndex_ (0) {} │ │ │ │ │ -117 │ │ │ │ │ -118 template │ │ │ │ │ -_1_1_9 inline _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_~_I_n_d_e_x_S_t_a_c_k () │ │ │ │ │ -120 { │ │ │ │ │ -121 if(stack_) delete stack_; │ │ │ │ │ -122 stack_ = 0; │ │ │ │ │ -123 │ │ │ │ │ -124 while( !fullStackList_.empty() ) │ │ │ │ │ -125 { │ │ │ │ │ -126 StackType * st = fullStackList_.top(); │ │ │ │ │ -127 if(st) delete st; │ │ │ │ │ -128 fullStackList_.pop(); │ │ │ │ │ -129 } │ │ │ │ │ -130 while( !emptyStackList_.empty() ) │ │ │ │ │ -131 { │ │ │ │ │ -132 StackType * st = emptyStackList_.top(); │ │ │ │ │ -133 if(st) delete st; │ │ │ │ │ -134 emptyStackList_.pop(); │ │ │ │ │ -135 } │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 template │ │ │ │ │ -_1_3_9 inline T _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_g_e_t_I_n_d_e_x () │ │ │ │ │ -140 { │ │ │ │ │ -141 if((*stack_).empty()) │ │ │ │ │ -142 { │ │ │ │ │ -143 if( fullStackList_.size() <= 0) │ │ │ │ │ -144 { │ │ │ │ │ -145 return maxIndex_++; │ │ │ │ │ -146 } │ │ │ │ │ -147 else │ │ │ │ │ -148 { │ │ │ │ │ -149 emptyStackList_.push( stack_ ); │ │ │ │ │ -150 stack_ = fullStackList_.top(); │ │ │ │ │ -151 fullStackList_.pop(); │ │ │ │ │ -152 } │ │ │ │ │ -153 } │ │ │ │ │ -154 return (*stack_).topAndPop(); │ │ │ │ │ -155 } │ │ │ │ │ -156 │ │ │ │ │ -157 template │ │ │ │ │ -_1_5_8 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_f_r_e_e_I_n_d_e_x ( T index ) │ │ │ │ │ +111 typedef std::pair< int, int > Cache; │ │ │ │ │ +112 │ │ │ │ │ +113 public: │ │ │ │ │ +_1_1_4 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g () │ │ │ │ │ +115 {} │ │ │ │ │ +116 │ │ │ │ │ +117 private: │ │ │ │ │ +118 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g ( const This & ); │ │ │ │ │ +119 This &operator= ( const This & ); │ │ │ │ │ +120 │ │ │ │ │ +121 public: │ │ │ │ │ +_1_2_2 _~_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g () │ │ │ │ │ +123 { │ │ │ │ │ +124 _r_e_l_e_a_s_e(); │ │ │ │ │ +125 } │ │ │ │ │ +126 │ │ │ │ │ +_1_2_7 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int codim, unsigned int subEntity │ │ │ │ │ +) const │ │ │ │ │ +128 { │ │ │ │ │ +129 assert( !(*this) == false ); │ │ │ │ │ +130 assert( (codim >= 0) && (codim <= _d_i_m_e_n_s_i_o_n) ); │ │ │ │ │ +131 const Cache &cache = cache_[ codim ]; │ │ │ │ │ +132 return element->dof[ cache.first + subEntity ][ cache.second ]; │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +_1_3_5 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &element, int codim, unsigned int │ │ │ │ │ +subEntity ) const │ │ │ │ │ +136 { │ │ │ │ │ +137 return (*this)( element._e_l(), codim, subEntity ); │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +_1_4_0 explicit operator bool () const │ │ │ │ │ +141 { │ │ │ │ │ +142 return (bool)mesh_; │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +_1_4_5 const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e ( int codim ) const │ │ │ │ │ +146 { │ │ │ │ │ +147 assert( *this ); │ │ │ │ │ +148 assert( (codim >= 0) && (codim <= _d_i_m_e_n_s_i_o_n) ); │ │ │ │ │ +149 return dofSpace_[ codim ]; │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +_1_5_2 const _D_o_f_S_p_a_c_e *_e_m_p_t_y_D_o_f_S_p_a_c_e () const │ │ │ │ │ +153 { │ │ │ │ │ +154 assert( *this ); │ │ │ │ │ +155 return emptySpace_; │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +_1_5_8 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h () const │ │ │ │ │ 159 { │ │ │ │ │ -160 if((*stack_).full()) │ │ │ │ │ -161 { │ │ │ │ │ -162 fullStackList_.push( stack_ ); │ │ │ │ │ -163 if(emptyStackList_.size() <= 0) │ │ │ │ │ +160 return mesh_; │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +_1_6_3 int _s_i_z_e ( int codim ) const │ │ │ │ │ 164 { │ │ │ │ │ -165 stack_ = new StackType (); │ │ │ │ │ +165 return _d_o_f_S_p_a_c_e( codim )->admin->size; │ │ │ │ │ 166 } │ │ │ │ │ -167 else │ │ │ │ │ -168 { │ │ │ │ │ -169 stack_ = emptyStackList_.top(); │ │ │ │ │ -170 emptyStackList_.pop(); │ │ │ │ │ -171 } │ │ │ │ │ -172 } │ │ │ │ │ -173 (*stack_).push(index); │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 template │ │ │ │ │ -_1_7_7 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_t_e_s_t () │ │ │ │ │ -178 { │ │ │ │ │ -179 T vec[2*length]; │ │ │ │ │ +167 │ │ │ │ │ +_1_6_8 void _c_r_e_a_t_e ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h ); │ │ │ │ │ +169 │ │ │ │ │ +_1_7_0 void _r_e_l_e_a_s_e () │ │ │ │ │ +171 { │ │ │ │ │ +172 if( *this ) │ │ │ │ │ +173 { │ │ │ │ │ +174 for( int codim = 0; codim <= _d_i_m_e_n_s_i_o_n; ++codim ) │ │ │ │ │ +175 freeDofSpace( dofSpace_[ codim ] ); │ │ │ │ │ +176 freeDofSpace( emptySpace_ ); │ │ │ │ │ +177 mesh_ = _M_e_s_h_P_o_i_n_t_e_r(); │ │ │ │ │ +178 } │ │ │ │ │ +179 } │ │ │ │ │ 180 │ │ │ │ │ -181 for(int i=0; i<2*length; i++) │ │ │ │ │ -182 vec[i] = getIndex(); │ │ │ │ │ -183 │ │ │ │ │ -184 for(int i=0; i<2*length; i++) │ │ │ │ │ -185 freeIndex(vec[i]); │ │ │ │ │ -186 │ │ │ │ │ -187 for(int i=0; i<2*length; i++) │ │ │ │ │ -188 vec[i] = getIndex(); │ │ │ │ │ -189 │ │ │ │ │ -190 for(int i=0; i<2*length; i++) │ │ │ │ │ -191 printf(" index [%d] = %d \n",i,vec[i]); │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -194 template │ │ │ │ │ -_1_9_5 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_b_a_c_k_u_p_I_n_d_e_x_S_e_t ( std::ostream & os ) │ │ │ │ │ -196 { │ │ │ │ │ -197 // holes are not stored at the moment │ │ │ │ │ -198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ; │ │ │ │ │ -199 return ; │ │ │ │ │ -200 } │ │ │ │ │ -201 │ │ │ │ │ -202 template │ │ │ │ │ -_2_0_3 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_r_e_s_t_o_r_e_I_n_d_e_x_S_e_t ( std::istream & is ) │ │ │ │ │ -204 { │ │ │ │ │ -205 is.read ( ((char *) &maxIndex_), sizeof(int) ); │ │ │ │ │ -206 clearStack (); │ │ │ │ │ +181 private: │ │ │ │ │ +182 static const _D_o_f_S_p_a_c_e *createEmptyDofSpace ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h ); │ │ │ │ │ +183 static const _D_o_f_S_p_a_c_e *createDofSpace ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, │ │ │ │ │ +184 const std::string &name, │ │ │ │ │ +185 const int (&ndof)[ nNodeTypes ], │ │ │ │ │ +186 const bool periodic = false ); │ │ │ │ │ +187 static void freeDofSpace ( const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e ); │ │ │ │ │ +188 │ │ │ │ │ +189 _M_e_s_h_P_o_i_n_t_e_r mesh_; │ │ │ │ │ +190 const _D_o_f_S_p_a_c_e *emptySpace_; │ │ │ │ │ +191 const _D_o_f_S_p_a_c_e *dofSpace_[ _d_i_m_e_n_s_i_o_n+1 ]; │ │ │ │ │ +192 Cache cache_[ _d_i_m_e_n_s_i_o_n+1 ]; │ │ │ │ │ +193 }; │ │ │ │ │ +194 │ │ │ │ │ +195 │ │ │ │ │ +196 │ │ │ │ │ +197 template< int dim > │ │ │ │ │ +198 inline void │ │ │ │ │ +_1_9_9 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh ) │ │ │ │ │ +200 { │ │ │ │ │ +201 release(); │ │ │ │ │ +202 │ │ │ │ │ +203 if( !mesh ) │ │ │ │ │ +204 return; │ │ │ │ │ +205 │ │ │ │ │ +206 mesh_ = mesh; │ │ │ │ │ 207 │ │ │ │ │ -208 return ; │ │ │ │ │ -209 } │ │ │ │ │ +208 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CreateDofSpace< i >::apply( mesh_, dofSpace_ ); } ); │ │ │ │ │ +209 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ CacheDofSpace< i >::apply( dofSpace_, cache_ ); } ); │ │ │ │ │ 210 │ │ │ │ │ -211 template │ │ │ │ │ -212 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_c_l_e_a_r_S_t_a_c_k () │ │ │ │ │ -213 { │ │ │ │ │ -214 if(stack_) │ │ │ │ │ -215 { │ │ │ │ │ -216 delete stack_; │ │ │ │ │ -217 stack_ = new StackType(); │ │ │ │ │ -218 assert(stack_); │ │ │ │ │ -219 } │ │ │ │ │ -220 │ │ │ │ │ -221 while( !fullStackList_.empty() ) │ │ │ │ │ -222 { │ │ │ │ │ -223 StackType * st = fullStackList_.top(); │ │ │ │ │ -224 if(st) delete st; │ │ │ │ │ -225 fullStackList_.pop(); │ │ │ │ │ -226 } │ │ │ │ │ -227 return; │ │ │ │ │ -228 } │ │ │ │ │ +211 emptySpace_ = createEmptyDofSpace( mesh_ ); │ │ │ │ │ +212 for( int i = 0; i < nNodeTypes; ++i ) │ │ │ │ │ +213 assert( emptySpace_->admin->n_dof[ i ] == 0 ); │ │ │ │ │ +214 } │ │ │ │ │ +215 │ │ │ │ │ +216 │ │ │ │ │ +217 │ │ │ │ │ +218 template< int dim > │ │ │ │ │ +219 inline const _D_o_f_S_p_a_c_e * │ │ │ │ │ +220 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_E_m_p_t_y_D_o_f_S_p_a_c_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh │ │ │ │ │ +) │ │ │ │ │ +221 { │ │ │ │ │ +222 int ndof[ nNodeTypes ]; │ │ │ │ │ +223 for( int i = 0; i < nNodeTypes; ++i ) │ │ │ │ │ +224 ndof[ i ] = 0; │ │ │ │ │ +225 std::string name = "Empty"; │ │ │ │ │ +226 return createDofSpace( mesh, name, ndof ); │ │ │ │ │ +227 } │ │ │ │ │ +228 │ │ │ │ │ 229 │ │ │ │ │ -230} // end namespace Dune │ │ │ │ │ -231#endif │ │ │ │ │ +230 template< int dim > │ │ │ │ │ +231 inline const _D_o_f_S_p_a_c_e * │ │ │ │ │ +232 HierarchyDofNumbering< dim >::createDofSpace ( const MeshPointer &mesh, │ │ │ │ │ +233 const std::string &name, │ │ │ │ │ +234 const int (&ndof)[ nNodeTypes ], │ │ │ │ │ +235 const bool periodic ) │ │ │ │ │ +236 { │ │ │ │ │ +237 const _A_L_B_E_R_T_A FLAGS flags │ │ │ │ │ +238 = ADM_PRESERVE_COARSE_DOFS | (periodic ? ADM_PERIODIC : 0); │ │ │ │ │ +239 return _A_L_B_E_R_T_A get_dof_space ( mesh, name.c_str(), ndof, flags ); │ │ │ │ │ +240 } │ │ │ │ │ +241 │ │ │ │ │ +242 │ │ │ │ │ +243 template< int dim > │ │ │ │ │ +244 inline void │ │ │ │ │ +245 HierarchyDofNumbering< dim >::freeDofSpace ( const _D_o_f_S_p_a_c_e *dofSpace ) │ │ │ │ │ +246 { │ │ │ │ │ +247 _A_L_B_E_R_T_A free_fe_space( dofSpace ); │ │ │ │ │ +248 } │ │ │ │ │ +249 │ │ │ │ │ +250 │ │ │ │ │ +251 │ │ │ │ │ +252 // HierarchyDofNumbering::CreateDofSpace │ │ │ │ │ +253 // ------------------------------------- │ │ │ │ │ +254 │ │ │ │ │ +255 template< int dim > │ │ │ │ │ +256 template< int codim > │ │ │ │ │ +257 struct HierarchyDofNumbering< dim >::CreateDofSpace │ │ │ │ │ +258 { │ │ │ │ │ +259 static void apply ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, const _D_o_f_S_p_a_c_e *(&_d_o_f_S_p_a_c_e) │ │ │ │ │ +[ dim+1 ] ) │ │ │ │ │ +260 { │ │ │ │ │ +261 int ndof[ nNodeTypes ]; │ │ │ │ │ +262 for( int i = 0; i < nNodeTypes; ++i ) │ │ │ │ │ +263 ndof[ i ] = 0; │ │ │ │ │ +264 ndof[ CodimType< dim, codim >::value ] = 1; │ │ │ │ │ +265 │ │ │ │ │ +266 std::string name = "Codimension "; │ │ │ │ │ +267 name += (char)(codim + '0'); │ │ │ │ │ +268 │ │ │ │ │ +269 _d_o_f_S_p_a_c_e[ codim ] = createDofSpace( _m_e_s_h, name, ndof ); │ │ │ │ │ +270 assert( _d_o_f_S_p_a_c_e[ codim ] ); │ │ │ │ │ +271 } │ │ │ │ │ +272 }; │ │ │ │ │ +273 │ │ │ │ │ +274 │ │ │ │ │ +275 │ │ │ │ │ +276 // HierarchyDofNumbering::CacheDofSpace │ │ │ │ │ +277 // ------------------------------------ │ │ │ │ │ +278 │ │ │ │ │ +279 template< int dim > │ │ │ │ │ +280 template< int codim > │ │ │ │ │ +281 struct HierarchyDofNumbering< dim >::CacheDofSpace │ │ │ │ │ +282 { │ │ │ │ │ +283 static void apply ( const _D_o_f_S_p_a_c_e *(&_d_o_f_S_p_a_c_e)[ dim+1 ], Cache (&cache) │ │ │ │ │ +[ dim+1 ] ) │ │ │ │ │ +284 { │ │ │ │ │ +285 assert( _d_o_f_S_p_a_c_e[ codim ] ); │ │ │ │ │ +286 const int codimtype = CodimType< dim, codim >::value; │ │ │ │ │ +287 cache[ codim ].first = _d_o_f_S_p_a_c_e[ codim ]->mesh->node[ codimtype ]; │ │ │ │ │ +288 cache[ codim ].second = _d_o_f_S_p_a_c_e[ codim ]->admin->n0_dof[ codimtype ]; │ │ │ │ │ +289 } │ │ │ │ │ +290 }; │ │ │ │ │ +291 │ │ │ │ │ +292 } // namespace Alberta │ │ │ │ │ +293 │ │ │ │ │ +294} // namespace Dune │ │ │ │ │ +295 │ │ │ │ │ +296#endif // #if HAVE_ALBERTA │ │ │ │ │ +297 │ │ │ │ │ +298#endif // #ifndef DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_r_e_s_t_o_r_e_I_n_d_e_x_S_e_t │ │ │ │ │ -void restoreIndexSet(std::istream &is) │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_c_h_e_c_k_A_n_d_S_e_t_M_a_x │ │ │ │ │ -void checkAndSetMax(T index) │ │ │ │ │ -set index as maxIndex if index is bigger than maxIndex │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_b_a_c_k_u_p_I_n_d_e_x_S_e_t │ │ │ │ │ -void backupIndexSet(std::ostream &os) │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_~_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ -~IndexStack() │ │ │ │ │ -Destructor, deleting all stacks. │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_g_e_t_I_n_d_e_x │ │ │ │ │ -T getIndex() │ │ │ │ │ -restore index from stack or create new index │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ -IndexStack() │ │ │ │ │ -Constructor, create new IndexStack. │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_s_e_t_M_a_x_I_n_d_e_x │ │ │ │ │ -void setMaxIndex(T index) │ │ │ │ │ -set index as maxIndex │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_s_i_z_e │ │ │ │ │ -int size() const │ │ │ │ │ -return maxIndex which is also the │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_t_e_s_t │ │ │ │ │ -void test() │ │ │ │ │ -test stack functionality │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_f_r_e_e_I_n_d_e_x │ │ │ │ │ -void freeIndex(T index) │ │ │ │ │ -store index on stack │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:158 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_g_e_t_M_a_x_I_n_d_e_x │ │ │ │ │ -int getMaxIndex() const │ │ │ │ │ -return maxIndex which is also the │ │ │ │ │ -DDeeffiinniittiioonn indexstack.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +ALBERTA EL Element │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ +ALBERTA FE_SPACE DofSpace │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_D_o_f_A_c_c_e_s_s │ │ │ │ │ +DofAccess() │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int codimension │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +static const int numSubEntities │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_D_o_f_A_c_c_e_s_s │ │ │ │ │ +DofAccess(const DofSpace *dofSpace) │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +int operator()(const Element *element, int subEntity, int i) const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +HierarchyDofNumbering() │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +int operator()(const Element *element, int codim, unsigned int subEntity) const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_m_e_s_h │ │ │ │ │ +const MeshPointer & mesh() const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_c_r_e_a_t_e │ │ │ │ │ +void create(const MeshPointer &mesh) │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_~_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +~HierarchyDofNumbering() │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_s_i_z_e │ │ │ │ │ +int size(int codim) const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * dofSpace(int codim) const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_e_m_p_t_y_D_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * emptyDofSpace() const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ +Element * el() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:192 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: intersection.cc File Reference │ │ │ │ +dune-grid: transformation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,56 +71,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
intersection.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
transformation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/intersection.hh>
│ │ │ │ +
#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::AlbertaGridIntersectionBase< Grid >::GlobalCoordReader< GridImp >
 
struct  Dune::AlbertaGridIntersectionBase< Grid >::LocalCoordReader< GridImp >
class  Dune::AlbertaTransformation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Macros

#define DUNE_ALBERTA_INTERSECTION_CC
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_ALBERTA_INTERSECTION_CC

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,21 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ -intersection.cc File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +transformation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._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_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d_I_m_p │ │ │ │ │ - _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A___I_N_T_E_R_S_E_C_T_I_O_N___C_C │ │ │ │ │ -  │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__IINNTTEERRSSEECCTTIIOONN__CCCC ********** │ │ │ │ │ -#define DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: intersection.cc Source File │ │ │ │ +dune-grid: transformation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,618 +74,119 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
intersection.cc
│ │ │ │ +
transformation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ -
6#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ +
5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │ +
6#define DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ │
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ -
12
│ │ │ │ -
13 // AlbertaGridIntersectionBase
│ │ │ │ -
14 // ---------------------------
│ │ │ │ -
15
│ │ │ │ -
16 template< class Grid >
│ │ │ │ -
17 inline AlbertaGridIntersectionBase< Grid >
│ │ │ │ -
│ │ │ │ -
18 ::AlbertaGridIntersectionBase ()
│ │ │ │ -
19 : grid_( nullptr ),
│ │ │ │ -
20 elementInfo_(),
│ │ │ │ -
21 oppVertex_( -1 ) // mark invalid intersection
│ │ │ │ -
22 {}
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21 public:
│ │ │ │ + │ │ │ │
23
│ │ │ │ -
24 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
26 ::AlbertaGridIntersectionBase ( const EntityImp &entity, const int oppVertex )
│ │ │ │ -
27 : grid_( &entity.grid() ),
│ │ │ │ -
28 elementInfo_( entity.elementInfo() ),
│ │ │ │ -
29 oppVertex_( oppVertex )
│ │ │ │ -
30 {}
│ │ │ │ -
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
33 template< class Grid >
│ │ │ │ -
34 inline typename Grid::template Codim< 0 >::Entity
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {
│ │ │ │ - │ │ │ │ -
38 return EntityImp( grid(), elementInfo(), 0 );
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
41
│ │ │ │ -
42 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
44 {
│ │ │ │ -
45 return elementInfo().isBoundary( oppVertex_ );
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
48
│ │ │ │ -
49 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51 {
│ │ │ │ -
52 if( boundary() )
│ │ │ │ -
53 {
│ │ │ │ -
54 const int id = elementInfo().boundaryId( oppVertex_ );
│ │ │ │ -
55 assert( id != 0 );
│ │ │ │ -
56 return id;
│ │ │ │ -
57 }
│ │ │ │ -
58 else
│ │ │ │ -
59 return 0;
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
63 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
65 {
│ │ │ │ -
│ │ │ │ -
66 assert( boundary() );
│ │ │ │ -
67 const Alberta::BasicNodeProjection *projection = elementInfo().boundaryProjection( oppVertex_ );
│ │ │ │ -
│ │ │ │ -
68 assert( projection );
│ │ │ │ -
│ │ │ │ -
69 return projection->boundaryIndex();
│ │ │ │ -
70 }
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
73 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 {
│ │ │ │ -
│ │ │ │ -
76 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ -
│ │ │ │ -
77 return grid().alberta2generic( 1, face );
│ │ │ │ -
│ │ │ │ -
78 }
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
81 template< class Grid >
│ │ │ │ -
│ │ │ │ -
82 inline GeometryType AlbertaGridIntersectionBase< Grid >::type () const
│ │ │ │ -
83 {
│ │ │ │ -
84 return GeometryTypes::simplex( dimension-1 );
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
87
│ │ │ │ -
│ │ │ │ -
88 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 {
│ │ │ │ -
92 const typename Entity::Geometry geoInside = inside().geometry();
│ │ │ │ -
93
│ │ │ │ -
94 const int face = indexInInside();
│ │ │ │ -
95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex();
│ │ │ │ -
96 FieldVector< ctype, dimension > refNormal = refSimplex.integrationOuterNormal( face );
│ │ │ │ -
97
│ │ │ │ -
98 const typename Entity::Geometry::JacobianInverseTransposed &jInvT
│ │ │ │ -
99 = geoInside.impl().jacobianInverseTransposed();
│ │ │ │ -
100
│ │ │ │ -
101 NormalVector normal;
│ │ │ │ -
102 jInvT.mv( refNormal, normal );
│ │ │ │ -
103 normal *= geoInside.impl().integrationElement();
│ │ │ │ -
104
│ │ │ │ -
105 return normal;
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
108 template<>
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
110 AlbertaGridIntersectionBase< const AlbertaGrid< 1, 1 > >::centerIntegrationOuterNormal () const
│ │ │ │ -
111 {
│ │ │ │ -
112 const Alberta::GlobalVector &oppCoord = grid().getCoord( elementInfo(), oppVertex_ );
│ │ │ │ -
113 const Alberta::GlobalVector &myCoord = grid().getCoord( elementInfo(), 1-oppVertex_ );
│ │ │ │ -
114 NormalVector n;
│ │ │ │ -
115 n[ 0 ] = (myCoord[ 0 ] > oppCoord[ 0 ] ? ctype( 1 ) : -ctype( 1 ));
│ │ │ │ -
116 return n;
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
119#if defined GRIDDIM && GRIDDIM > 1
│ │ │ │ -
120 template<>
│ │ │ │ - │ │ │ │ -
122 AlbertaGridIntersectionBase< const AlbertaGrid< 2, 2 > >::centerIntegrationOuterNormal () const
│ │ │ │ -
123 {
│ │ │ │ -
124 const Alberta::GlobalVector &coordOne = grid().getCoord( elementInfo(), (oppVertex_+1)%3 );
│ │ │ │ -
125 const Alberta::GlobalVector &coordTwo = grid().getCoord( elementInfo(), (oppVertex_+2)%3 );
│ │ │ │ -
126
│ │ │ │ -
127 NormalVector n;
│ │ │ │ -
128 n[ 0 ] = -(coordOne[ 1 ] - coordTwo[ 1 ]);
│ │ │ │ -
129 n[ 1 ] = coordOne[ 0 ] - coordTwo[ 0 ];
│ │ │ │ -
130 return n;
│ │ │ │ -
131 }
│ │ │ │ -
132#endif // defined GRIDDIM && GRIDDIM > 1
│ │ │ │ -
133
│ │ │ │ -
134 template<>
│ │ │ │ -
135 inline AlbertaGridIntersectionBase< const AlbertaGrid< 3, 3 > >::NormalVector
│ │ │ │ -
│ │ │ │ -
136 AlbertaGridIntersectionBase< const AlbertaGrid< 3, 3 > >::centerIntegrationOuterNormal () const
│ │ │ │ -
137 {
│ │ │ │ -
138 // in this case the orientation is negative, multiply by -1
│ │ │ │ -
139 const ALBERTA EL_INFO &elInfo = elementInfo().elInfo();
│ │ │ │ -
140 const ctype val = (elInfo.orientation > 0) ? 1.0 : -1.0;
│ │ │ │ -
141
│ │ │ │ -
142 static const int faceVertices[ 4 ][ 3 ]
│ │ │ │ -
143 = { {1,3,2}, {0,2,3}, {0,3,1}, {0,1,2} };
│ │ │ │ -
144 const int *localFaces = faceVertices[ oppVertex_ ];
│ │ │ │ -
145
│ │ │ │ -
146 const Alberta::GlobalVector &coord0 = grid().getCoord( elementInfo(), localFaces[ 0 ] );
│ │ │ │ -
147 const Alberta::GlobalVector &coord1 = grid().getCoord( elementInfo(), localFaces[ 1 ] );
│ │ │ │ -
148 const Alberta::GlobalVector &coord2 = grid().getCoord( elementInfo(), localFaces[ 2 ] );
│ │ │ │ -
149
│ │ │ │ -
150 FieldVector< ctype, dimensionworld > u;
│ │ │ │ -
151 FieldVector< ctype, dimensionworld > v;
│ │ │ │ -
152 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
153 {
│ │ │ │ -
154 v[ i ] = coord1[ i ] - coord0[ i ];
│ │ │ │ -
155 u[ i ] = coord2[ i ] - coord1[ i ];
│ │ │ │ -
156 }
│ │ │ │ -
157
│ │ │ │ -
158 NormalVector n;
│ │ │ │ -
159 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
160 {
│ │ │ │ -
161 const int j = (i+1)%dimension;
│ │ │ │ -
162 const int k = (i+2)%dimension;
│ │ │ │ -
163 n[ i ] = val * (u[ j ] * v[ k ] - u[ k ] * v[ j ]);
│ │ │ │ -
164 }
│ │ │ │ -
165 return n;
│ │ │ │ -
166 }
│ │ │ │ -
│ │ │ │ -
167
│ │ │ │ -
168
│ │ │ │ -
169 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
172 {
│ │ │ │ -
173 return centerIntegrationOuterNormal();
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
176
│ │ │ │ -
177 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
180 {
│ │ │ │ -
181 NormalVector normal = centerOuterNormal();
│ │ │ │ -
182 normal *= (1.0 / normal.two_norm());
│ │ │ │ -
183 return normal;
│ │ │ │ -
184 }
│ │ │ │ -
│ │ │ │ -
185
│ │ │ │ -
186
│ │ │ │ -
187 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
190 {
│ │ │ │ -
191 return centerIntegrationOuterNormal();
│ │ │ │ -
192 }
│ │ │ │ -
│ │ │ │ -
193
│ │ │ │ -
194
│ │ │ │ -
195 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
198 {
│ │ │ │ -
199 return centerOuterNormal();
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
202
│ │ │ │ -
203 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
206 {
│ │ │ │ -
207 return centerUnitOuterNormal();
│ │ │ │ -
208 }
│ │ │ │ -
│ │ │ │ -
209
│ │ │ │ -
210
│ │ │ │ -
211 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
214 {
│ │ │ │ -
215 return AlbertaTransformation( elementInfo().transformation( oppVertex_ ) );
│ │ │ │ -
216 }
│ │ │ │ -
│ │ │ │ -
217
│ │ │ │ -
218
│ │ │ │ -
219 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
221 {
│ │ │ │ -
222 return *grid_;
│ │ │ │ -
223 }
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
225
│ │ │ │ -
226 template< class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
229 {
│ │ │ │ -
230 assert( !!elementInfo_ );
│ │ │ │ -
231 return elementInfo_;
│ │ │ │ -
232 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
233
│ │ │ │ -
234
│ │ │ │ -
235
│ │ │ │ -
236 // AlbertaGridIntersectionBase::GlobalCoordReader
│ │ │ │ -
237 // ----------------------------------------------
│ │ │ │ -
238
│ │ │ │ -
239 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
241 {
│ │ │ │ -
242 typedef typename std::remove_const< GridImp >::type Grid;
│ │ │ │ -
243
│ │ │ │ -
244 static const int dimension = Grid::dimension;
│ │ │ │ -
245 static const int codimension = 1;
│ │ │ │ -
246 static const int mydimension = dimension - codimension;
│ │ │ │ -
247 static const int coorddimension = Grid::dimensionworld;
│ │ │ │ -
248
│ │ │ │ - │ │ │ │ -
250
│ │ │ │ - │ │ │ │ -
252 typedef FieldVector< ctype, coorddimension > Coordinate;
│ │ │ │ -
253
│ │ │ │ -
254 private:
│ │ │ │ -
255 const Grid &grid_;
│ │ │ │ - │ │ │ │ -
257 const int subEntity_;
│ │ │ │ -
258 const int twist_;
│ │ │ │ -
259
│ │ │ │ -
260 public:
│ │ │ │ -
│ │ │ │ -
261 GlobalCoordReader ( const GridImp &grid,
│ │ │ │ - │ │ │ │ -
263 int subEntity )
│ │ │ │ -
264 : grid_( grid ),
│ │ │ │ - │ │ │ │ -
266 subEntity_( subEntity ),
│ │ │ │ -
267 twist_( elementInfo.template twist< codimension >( subEntity ) )
│ │ │ │ -
268 {}
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
│ │ │ │ -
270 void coordinate ( int i, Coordinate &x ) const
│ │ │ │ -
271 {
│ │ │ │ -
272 assert( !elementInfo_ == false );
│ │ │ │ -
273 assert( (i >= 0) && (i <= mydimension) );
│ │ │ │ -
274
│ │ │ │ -
275 const int ti = Alberta::applyInverseTwist< mydimension >( twist_, i );
│ │ │ │ -
276 const int k = mapVertices( subEntity_, ti );
│ │ │ │ -
277 const Alberta::GlobalVector &coord = grid_.getCoord( elementInfo_, k );
│ │ │ │ -
278 for( int j = 0; j < coorddimension; ++j )
│ │ │ │ -
279 x[ j ] = coord[ j ];
│ │ │ │ -
280 }
│ │ │ │ -
│ │ │ │ -
281
│ │ │ │ -
│ │ │ │ -
282 bool hasDeterminant () const
│ │ │ │ -
283 {
│ │ │ │ -
284 return false;
│ │ │ │ -
285 }
│ │ │ │ -
│ │ │ │ -
286
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
288 {
│ │ │ │ -
289 assert( false );
│ │ │ │ -
290 return ctype( 0 );
│ │ │ │ -
291 }
│ │ │ │ -
│ │ │ │ -
292
│ │ │ │ -
293 private:
│ │ │ │ -
294 static int mapVertices ( int subEntity, int i )
│ │ │ │ -
295 {
│ │ │ │ - │ │ │ │ -
297 }
│ │ │ │ -
298 };
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
300
│ │ │ │ -
301
│ │ │ │ -
302
│ │ │ │ -
303 // AlbertaGridIntersectionBase::LocalCoordReader
│ │ │ │ -
304 // ---------------------------------------------
│ │ │ │ -
305
│ │ │ │ -
306 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
308 {
│ │ │ │ -
309 typedef typename std::remove_const< GridImp >::type Grid;
│ │ │ │ -
310
│ │ │ │ -
311 static const int dimension = Grid::dimension;
│ │ │ │ -
312 static const int codimension = 1;
│ │ │ │ -
313 static const int mydimension = dimension - codimension;
│ │ │ │ -
314 static const int coorddimension = dimension;
│ │ │ │ -
315
│ │ │ │ - │ │ │ │ -
317
│ │ │ │ -
318 typedef FieldVector< ctype, coorddimension > Coordinate;
│ │ │ │ -
319
│ │ │ │ -
320 typedef typename Grid::template Codim< 0 >::Geometry ElementGeometry;
│ │ │ │ -
321 typedef typename Grid::template Codim< 1 >::Geometry FaceGeometry;
│ │ │ │ -
322
│ │ │ │ -
323 private:
│ │ │ │ -
324 const ElementGeometry &elementGeometry_;
│ │ │ │ -
325 const FaceGeometry &faceGeometry_;
│ │ │ │ -
326
│ │ │ │ -
327 public:
│ │ │ │ -
│ │ │ │ -
328 LocalCoordReader ( const ElementGeometry &elementGeometry,
│ │ │ │ -
329 const FaceGeometry &faceGeometry )
│ │ │ │ -
330 : elementGeometry_( elementGeometry ),
│ │ │ │ -
331 faceGeometry_( faceGeometry )
│ │ │ │ -
332 {}
│ │ │ │ -
│ │ │ │ -
333
│ │ │ │ -
│ │ │ │ -
334 void coordinate ( int i, Coordinate &x ) const
│ │ │ │ -
335 {
│ │ │ │ -
336 x = elementGeometry_.local( faceGeometry_.corner( i ) );
│ │ │ │ -
337 }
│ │ │ │ -
│ │ │ │ -
338
│ │ │ │ -
│ │ │ │ -
339 bool hasDeterminant () const
│ │ │ │ -
340 {
│ │ │ │ -
341 return false;
│ │ │ │ -
342 }
│ │ │ │ -
│ │ │ │ -
343
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
345 {
│ │ │ │ -
346 return ctype( 0 );
│ │ │ │ -
347 }
│ │ │ │ -
│ │ │ │ -
348 };
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
350
│ │ │ │ -
351
│ │ │ │ -
352 // AlbertaGridLeafIntersection
│ │ │ │ -
353 // ---------------------------
│ │ │ │ -
354
│ │ │ │ -
355 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
357 {
│ │ │ │ -
358 assert( oppVertex_ <= dimension );
│ │ │ │ -
359 ++oppVertex_;
│ │ │ │ -
360 neighborInfo_ = ElementInfo();
│ │ │ │ -
361 }
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
363 template< class GridImp >
│ │ │ │ -
364 inline typename GridImp::template Codim< 0 >::Entity
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
366 {
│ │ │ │ - │ │ │ │ -
368
│ │ │ │ -
369 if( !neighborInfo_ )
│ │ │ │ -
370 {
│ │ │ │ -
371 assert( neighbor() );
│ │ │ │ -
372
│ │ │ │ -
373 neighborInfo_ = elementInfo().leafNeighbor( oppVertex_ );
│ │ │ │ -
374 }
│ │ │ │ -
375
│ │ │ │ -
376 assert( !neighborInfo_ == false );
│ │ │ │ -
377 assert( neighborInfo_.el() != NULL );
│ │ │ │ -
378 return EntityImp( grid(), neighborInfo_, 0 );
│ │ │ │ -
379 }
│ │ │ │ -
│ │ │ │ -
380
│ │ │ │ -
381 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
383 {
│ │ │ │ -
384 assert( oppVertex_ <= dimension );
│ │ │ │ -
385 return elementInfo().hasLeafNeighbor( oppVertex_ );
│ │ │ │ -
386 }
│ │ │ │ -
│ │ │ │ -
387
│ │ │ │ -
388
│ │ │ │ -
389 template< class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
392 {
│ │ │ │ -
393 typedef AlbertaGridLocalGeometryProvider< GridImp > LocalGeoProvider;
│ │ │ │ -
394 const int twist = elementInfo().template twist< 1 >( oppVertex_ );
│ │ │ │ -
395 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ -
396 return LocalGeometry( LocalGeoProvider::instance().faceGeometry( face, twist ) );
│ │ │ │ -
397 }
│ │ │ │ -
│ │ │ │ -
398
│ │ │ │ -
399
│ │ │ │ -
400 template< class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
403 {
│ │ │ │ -
404 assert( neighbor() );
│ │ │ │ -
405
│ │ │ │ -
406 typedef AlbertaGridLocalGeometryProvider< GridImp > LocalGeoProvider;
│ │ │ │ -
407 const ALBERTA EL_INFO &elInfo = elementInfo().elInfo();
│ │ │ │ -
408 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ];
│ │ │ │ -
409 const int twist = elementInfo().twistInNeighbor( oppVertex_ );
│ │ │ │ -
410 const int face = (dimension > 1 ? oppVertex : 1-oppVertex);
│ │ │ │ -
411 return LocalGeometry( LocalGeoProvider::instance().faceGeometry( face, twist ) );
│ │ │ │ -
412 }
│ │ │ │ -
│ │ │ │ -
413
│ │ │ │ -
414
│ │ │ │ -
415 template< class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
418 {
│ │ │ │ -
419 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ -
420 const GlobalCoordReader coordReader( grid(), elementInfo(), face );
│ │ │ │ -
421 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ -
422 }
│ │ │ │ -
│ │ │ │ -
423
│ │ │ │ -
424
│ │ │ │ -
425 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
427 {
│ │ │ │ -
428 const ALBERTA EL_INFO &elInfo = elementInfo().elInfo();
│ │ │ │ -
429 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ];
│ │ │ │ -
430 const int face = (dimension > 1 ? oppVertex : 1-oppVertex);
│ │ │ │ -
431 return grid().alberta2generic( 1, face );
│ │ │ │ -
432 }
│ │ │ │ -
│ │ │ │ -
433
│ │ │ │ -
434} // namespace Dune
│ │ │ │ -
435
│ │ │ │ -
436#endif // #ifndef DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
24 static const int dimension = Alberta::dimWorld;
│ │ │ │ +
25
│ │ │ │ +
26 typedef FieldVector< ctype, dimension > WorldVector;
│ │ │ │ +
27
│ │ │ │ +
28 explicit
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),
│ │ │ │ +
31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )
│ │ │ │ +
32 {}
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 const GlobalSpace::Vector &shift )
│ │ │ │ +
36 : matrix_( matrix ),
│ │ │ │ +
37 shift_( shift )
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
40 WorldVector evaluate ( const WorldVector &x ) const
│ │ │ │ +
41 {
│ │ │ │ + │ │ │ │ +
43 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
44 {
│ │ │ │ +
45 const GlobalSpace::Vector &row = matrix_[ i ];
│ │ │ │ +
46 y[ i ] = shift_[ i ];
│ │ │ │ +
47 for( int j = 0; j < dimension; ++j )
│ │ │ │ +
48 y[ i ] += row[ j ] * x[ j ];
│ │ │ │ +
49 }
│ │ │ │ +
50 return y;
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 // Note: ALBERTA requires the matrix to be orthogonal
│ │ │ │ +
56 WorldVector x( ctype( 0 ) );
│ │ │ │ +
57 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
58 {
│ │ │ │ +
59 const GlobalSpace::Vector &row = matrix_[ i ];
│ │ │ │ +
60 const ctype v = y[ i ] - shift_[ i ];
│ │ │ │ +
61 for( int j = 0; j < dimension; ++j )
│ │ │ │ +
62 x[ j ] += row[ j ] * v;
│ │ │ │ +
63 }
│ │ │ │ +
64 return x;
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 private:
│ │ │ │ +
68 const GlobalSpace::Matrix &matrix_;
│ │ │ │ +
69 const GlobalSpace::Vector &shift_;
│ │ │ │ +
70 };
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
71
│ │ │ │ +
72}
│ │ │ │ +
73
│ │ │ │ +
74#endif // #if HAVE_ALBERTA
│ │ │ │ +
75
│ │ │ │ +
76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ - │ │ │ │ -
LocalGeometry geometryInOutside() const
Definition intersection.cc:402
│ │ │ │ -
GridImp::template Codim< 0 >::Entity outside() const
Definition intersection.cc:365
│ │ │ │ -
void next()
Definition intersection.cc:356
│ │ │ │ -
Base::GeometryImpl GeometryImpl
Definition albertagrid/intersection.hh:130
│ │ │ │ -
int indexInOutside() const
Definition intersection.cc:426
│ │ │ │ -
LocalGeometry geometryInInside() const
Definition intersection.cc:391
│ │ │ │ -
Base::GlobalCoordReader GlobalCoordReader
Definition albertagrid/intersection.hh:133
│ │ │ │ -
Base::Geometry Geometry
Definition albertagrid/intersection.hh:122
│ │ │ │ -
Geometry geometry() const
Definition intersection.cc:417
│ │ │ │ -
bool neighbor() const
Definition intersection.cc:382
│ │ │ │ -
Base::LocalGeometry LocalGeometry
Definition albertagrid/intersection.hh:123
│ │ │ │ -
Definition albertagrid/entity.hh:46
│ │ │ │ -
Definition albertagrid/geometry.hh:504
│ │ │ │ - │ │ │ │ -
FieldVector< ctype, coorddimension > Coordinate
Definition intersection.cc:252
│ │ │ │ -
Alberta::Real ctype
Definition intersection.cc:249
│ │ │ │ -
std::remove_const< GridImp >::type Grid
Definition intersection.cc:242
│ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition intersection.cc:251
│ │ │ │ -
ctype determinant() const
Definition intersection.cc:287
│ │ │ │ -
bool hasDeterminant() const
Definition intersection.cc:282
│ │ │ │ -
GlobalCoordReader(const GridImp &grid, const ElementInfo &elementInfo, int subEntity)
Definition intersection.cc:261
│ │ │ │ -
void coordinate(int i, Coordinate &x) const
Definition intersection.cc:270
│ │ │ │ - │ │ │ │ -
Grid::template Codim< 1 >::Geometry FaceGeometry
Definition intersection.cc:321
│ │ │ │ -
Alberta::Real ctype
Definition intersection.cc:316
│ │ │ │ -
LocalCoordReader(const ElementGeometry &elementGeometry, const FaceGeometry &faceGeometry)
Definition intersection.cc:328
│ │ │ │ -
std::remove_const< GridImp >::type Grid
Definition intersection.cc:309
│ │ │ │ -
void coordinate(int i, Coordinate &x) const
Definition intersection.cc:334
│ │ │ │ -
bool hasDeterminant() const
Definition intersection.cc:339
│ │ │ │ -
ctype determinant() const
Definition intersection.cc:344
│ │ │ │ -
FieldVector< ctype, coorddimension > Coordinate
Definition intersection.cc:318
│ │ │ │ -
Grid::template Codim< 0 >::Geometry ElementGeometry
Definition intersection.cc:320
│ │ │ │ -
Definition albertagrid/intersection.hh:32
│ │ │ │ -
NormalVector centerOuterNormal() const
Definition intersection.cc:171
│ │ │ │ -
const ElementInfo & elementInfo() const
Definition intersection.cc:228
│ │ │ │ -
FieldVector< ctype, dimensionworld > NormalVector
Definition albertagrid/intersection.hh:41
│ │ │ │ -
NormalVector centerIntegrationOuterNormal() const
Definition intersection.cc:90
│ │ │ │ -
Grid::ctype ctype
Definition albertagrid/intersection.hh:36
│ │ │ │ -
NormalVector integrationOuterNormal(const LocalCoordType &local) const
Definition intersection.cc:189
│ │ │ │ -
ElementInfo elementInfo_
Definition albertagrid/intersection.hh:93
│ │ │ │ -
FieldVector< ctype, dimension-1 > LocalCoordType
Definition albertagrid/intersection.hh:42
│ │ │ │ -
NormalVector centerUnitOuterNormal() const
Definition intersection.cc:179
│ │ │ │ -
int indexInInside() const
Definition intersection.cc:74
│ │ │ │ -
Entity inside() const
Definition intersection.cc:35
│ │ │ │ -
NormalVector unitOuterNormal(const LocalCoordType &local) const
Definition intersection.cc:205
│ │ │ │ -
const Grid & grid() const
Definition intersection.cc:220
│ │ │ │ -
static const int dimension
Definition albertagrid/intersection.hh:38
│ │ │ │ -
bool boundary() const
Definition intersection.cc:43
│ │ │ │ -
size_t boundarySegmentIndex() const
Definition intersection.cc:64
│ │ │ │ -
GeometryType type() const
Definition intersection.cc:82
│ │ │ │ -
AlbertaTransformation transformation() const
Definition intersection.cc:213
│ │ │ │ -
NormalVector outerNormal(const LocalCoordType &local) const
Definition intersection.cc:197
│ │ │ │ -
int boundaryId() const
Definition intersection.cc:50
│ │ │ │ -
const Grid * grid_
Definition albertagrid/intersection.hh:92
│ │ │ │ -
Definition misc.hh:443
│ │ │ │ -
Definition albertagrid/projection.hh:208
│ │ │ │ -
unsigned int boundaryIndex() const
Definition albertagrid/projection.hh:218
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
Definition misc.hh:102
│ │ │ │ +
GlobalMatrix Matrix
Definition misc.hh:106
│ │ │ │ +
GlobalVector Vector
Definition misc.hh:107
│ │ │ │
Definition transformation.hh:18
│ │ │ │ -
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition common/entity.hh:100
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ - │ │ │ │ +
AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL)
Definition transformation.hh:29
│ │ │ │ +
static const int dimension
Definition transformation.hh:24
│ │ │ │ +
FieldVector< ctype, dimension > WorldVector
Definition transformation.hh:26
│ │ │ │ +
AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace::Vector &shift)
Definition transformation.hh:34
│ │ │ │ +
Alberta::Real ctype
Definition transformation.hh:22
│ │ │ │ +
WorldVector evaluateInverse(const WorldVector &y) const
Definition transformation.hh:53
│ │ │ │ +
WorldVector evaluate(const WorldVector &x) const
Definition transformation.hh:40
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,671 +1,133 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -intersection.cc │ │ │ │ │ +transformation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ -_6#define DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ +5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ +6#define DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10namespace _D_u_n_e │ │ │ │ │ -11{ │ │ │ │ │ -12 │ │ │ │ │ -13 // AlbertaGridIntersectionBase │ │ │ │ │ -14 // --------------------------- │ │ │ │ │ -15 │ │ │ │ │ -16 template< class Grid > │ │ │ │ │ -17 inline AlbertaGridIntersectionBase< Grid > │ │ │ │ │ -_1_8 ::AlbertaGridIntersectionBase () │ │ │ │ │ -19 : grid_( nullptr ), │ │ │ │ │ -20 elementInfo_(), │ │ │ │ │ -21 oppVertex_( -1 ) // mark invalid intersection │ │ │ │ │ -22 {} │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12#if HAVE_ALBERTA │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +_1_7 class _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +18 { │ │ │ │ │ +19 typedef _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e _G_l_o_b_a_l_S_p_a_c_e; │ │ │ │ │ +20 │ │ │ │ │ +21 public: │ │ │ │ │ +_2_2 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ 23 │ │ │ │ │ -24 template< class Grid > │ │ │ │ │ -25 inline _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _> │ │ │ │ │ -_2_6_ _:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e ( const _E_n_t_i_t_y_I_m_p &entity, const int oppVertex │ │ │ │ │ -) │ │ │ │ │ -27 : grid_( &entity.grid() ), │ │ │ │ │ -28 elementInfo_( entity.elementInfo() ), │ │ │ │ │ -29 oppVertex_( oppVertex ) │ │ │ │ │ -30 {} │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -33 template< class Grid > │ │ │ │ │ -34 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity │ │ │ │ │ -_3_5 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_s_i_d_e () const │ │ │ │ │ -36 { │ │ │ │ │ -37 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_,_ _G_r_i_d_ _> _E_n_t_i_t_y_I_m_p; │ │ │ │ │ -38 return _E_n_t_i_t_y_I_m_p( grid(), elementInfo(), 0 ); │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -41 │ │ │ │ │ -42 template< class Grid > │ │ │ │ │ -_4_3 inline bool _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y () const │ │ │ │ │ +_2_4 static const int _d_i_m_e_n_s_i_o_n = _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d; │ │ │ │ │ +25 │ │ │ │ │ +_2_6 typedef FieldVector< ctype, dimension > _W_o_r_l_d_V_e_c_t_o_r; │ │ │ │ │ +27 │ │ │ │ │ +28 explicit │ │ │ │ │ +_2_9 _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( const _A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *trafo = NULL ) │ │ │ │ │ +30 : matrix_( (trafo != NULL ? trafo->M : _G_l_o_b_a_l_S_p_a_c_e::identityMatrix()) ), │ │ │ │ │ +31 shift_( (trafo != NULL ? trafo->t : _G_l_o_b_a_l_S_p_a_c_e::nullVector()) ) │ │ │ │ │ +32 {} │ │ │ │ │ +33 │ │ │ │ │ +_3_4 _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( const _G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x &matrix, │ │ │ │ │ +35 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &shift ) │ │ │ │ │ +36 : matrix_( matrix ), │ │ │ │ │ +37 shift_( shift ) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +_4_0 _W_o_r_l_d_V_e_c_t_o_r _e_v_a_l_u_a_t_e ( const _W_o_r_l_d_V_e_c_t_o_r &x ) const │ │ │ │ │ +41 { │ │ │ │ │ +42 _W_o_r_l_d_V_e_c_t_o_r y; │ │ │ │ │ +43 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ 44 { │ │ │ │ │ -45 return elementInfo().isBoundary( oppVertex_ ); │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -48 │ │ │ │ │ -49 template< class Grid > │ │ │ │ │ -_5_0 inline int _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d () const │ │ │ │ │ -51 { │ │ │ │ │ -52 if( boundary() ) │ │ │ │ │ -53 { │ │ │ │ │ -54 const int id = elementInfo().boundaryId( oppVertex_ ); │ │ │ │ │ -55 assert( id != 0 ); │ │ │ │ │ -56 return id; │ │ │ │ │ -57 } │ │ │ │ │ -58 else │ │ │ │ │ -59 return 0; │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_2 │ │ │ │ │ -63 template< class Grid > │ │ │ │ │ -_6_4 inline size_t _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x () │ │ │ │ │ -const │ │ │ │ │ -65 { │ │ │ │ │ -_6_6 assert( boundary() ); │ │ │ │ │ -67 const _A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n *projection = elementInfo │ │ │ │ │ -().boundaryProjection( oppVertex_ ); │ │ │ │ │ -_6_8 assert( projection ); │ │ │ │ │ -_6_9 return projection->_b_o_u_n_d_a_r_y_I_n_d_e_x(); │ │ │ │ │ -_7_0 } │ │ │ │ │ +45 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &row = matrix_[ i ]; │ │ │ │ │ +46 y[ i ] = shift_[ i ]; │ │ │ │ │ +47 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ +48 y[ i ] += row[ j ] * x[ j ]; │ │ │ │ │ +49 } │ │ │ │ │ +50 return y; │ │ │ │ │ +51 } │ │ │ │ │ +52 │ │ │ │ │ +_5_3 _W_o_r_l_d_V_e_c_t_o_r _e_v_a_l_u_a_t_e_I_n_v_e_r_s_e ( const _W_o_r_l_d_V_e_c_t_o_r &y ) const │ │ │ │ │ +54 { │ │ │ │ │ +55 // Note: ALBERTA requires the matrix to be orthogonal │ │ │ │ │ +56 _W_o_r_l_d_V_e_c_t_o_r x( _c_t_y_p_e( 0 ) ); │ │ │ │ │ +57 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ +58 { │ │ │ │ │ +59 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &row = matrix_[ i ]; │ │ │ │ │ +60 const _c_t_y_p_e v = y[ i ] - shift_[ i ]; │ │ │ │ │ +61 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ +62 x[ j ] += row[ j ] * v; │ │ │ │ │ +63 } │ │ │ │ │ +64 return x; │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +67 private: │ │ │ │ │ +68 const _G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x &matrix_; │ │ │ │ │ +69 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &shift_; │ │ │ │ │ +70 }; │ │ │ │ │ 71 │ │ │ │ │ -_7_2 │ │ │ │ │ -73 template< class Grid > │ │ │ │ │ -_7_4 inline int _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e () const │ │ │ │ │ -75 { │ │ │ │ │ -_7_6 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ │ -_7_7 return grid().alberta2generic( 1, face ); │ │ │ │ │ -_7_8 } │ │ │ │ │ -79 │ │ │ │ │ -_8_0 │ │ │ │ │ -_8_1 template< class Grid > │ │ │ │ │ -_8_2 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_t_y_p_e () const │ │ │ │ │ -83 { │ │ │ │ │ -84 return GeometryTypes::simplex( dimension-1 ); │ │ │ │ │ -_8_5 } │ │ │ │ │ -86 │ │ │ │ │ -87 │ │ │ │ │ -_8_8 template< class Grid > │ │ │ │ │ -_8_9 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -_9_0 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_I_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ │ -91 { │ │ │ │ │ -92 const typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y geoInside = inside().geometry(); │ │ │ │ │ -93 │ │ │ │ │ -94 const int face = indexInInside(); │ │ │ │ │ -95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex(); │ │ │ │ │ -96 FieldVector< ctype, dimension > refNormal = │ │ │ │ │ -refSimplex.integrationOuterNormal( face ); │ │ │ │ │ -97 │ │ │ │ │ -98 const typename Entity::Geometry::JacobianInverseTransposed &jInvT │ │ │ │ │ -99 = geoInside.impl().jacobianInverseTransposed(); │ │ │ │ │ -100 │ │ │ │ │ -101 _N_o_r_m_a_l_V_e_c_t_o_r normal; │ │ │ │ │ -102 jInvT.mv( refNormal, normal ); │ │ │ │ │ -103 normal *= geoInside.impl().integrationElement(); │ │ │ │ │ -104 │ │ │ │ │ -105 return normal; │ │ │ │ │ -106 } │ │ │ │ │ -107 │ │ │ │ │ -108 template<> │ │ │ │ │ -109 inline _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _1_,_ _1_ _> >:: │ │ │ │ │ -NormalVector │ │ │ │ │ -_1_1_0 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _1_,_ _1_ _> >:: │ │ │ │ │ -centerIntegrationOuterNormal () const │ │ │ │ │ -111 { │ │ │ │ │ -112 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &oppCoord = grid().getCoord( elementInfo(), │ │ │ │ │ -oppVertex_ ); │ │ │ │ │ -113 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &myCoord = grid().getCoord( elementInfo(), 1- │ │ │ │ │ -oppVertex_ ); │ │ │ │ │ -114 _N_o_r_m_a_l_V_e_c_t_o_r n; │ │ │ │ │ -115 n[ 0 ] = (myCoord[ 0 ] > oppCoord[ 0 ] ? _c_t_y_p_e( 1 ) : -_c_t_y_p_e( 1 )); │ │ │ │ │ -116 return n; │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -119#if defined GRIDDIM && GRIDDIM > 1 │ │ │ │ │ -120 template<> │ │ │ │ │ -121 inline _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _2_,_ _2_ _> >:: │ │ │ │ │ -NormalVector │ │ │ │ │ -122 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _2_,_ _2_ _> >:: │ │ │ │ │ -centerIntegrationOuterNormal () const │ │ │ │ │ -123 { │ │ │ │ │ -124 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coordOne = grid().getCoord( elementInfo(), │ │ │ │ │ -(oppVertex_+1)%3 ); │ │ │ │ │ -125 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coordTwo = grid().getCoord( elementInfo(), │ │ │ │ │ -(oppVertex_+2)%3 ); │ │ │ │ │ -126 │ │ │ │ │ -127 NormalVector n; │ │ │ │ │ -128 n[ 0 ] = -(coordOne[ 1 ] - coordTwo[ 1 ]); │ │ │ │ │ -129 n[ 1 ] = coordOne[ 0 ] - coordTwo[ 0 ]; │ │ │ │ │ -130 return n; │ │ │ │ │ -131 } │ │ │ │ │ -132#endif // defined GRIDDIM && GRIDDIM > 1 │ │ │ │ │ -133 │ │ │ │ │ -134 template<> │ │ │ │ │ -135 inline AlbertaGridIntersectionBase< const AlbertaGrid< 3, 3 > >:: │ │ │ │ │ -NormalVector │ │ │ │ │ -_1_3_6 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _3_,_ _3_ _> >:: │ │ │ │ │ -centerIntegrationOuterNormal () const │ │ │ │ │ -137 { │ │ │ │ │ -138 // in this case the orientation is negative, multiply by -1 │ │ │ │ │ -139 const _A_L_B_E_R_T_A EL_INFO &elInfo = elementInfo().elInfo(); │ │ │ │ │ -140 const _c_t_y_p_e val = (elInfo.orientation > 0) ? 1.0 : -1.0; │ │ │ │ │ -141 │ │ │ │ │ -142 static const int faceVertices[ 4 ][ 3 ] │ │ │ │ │ -143 = { {1,3,2}, {0,2,3}, {0,3,1}, {0,1,2} }; │ │ │ │ │ -144 const int *localFaces = faceVertices[ oppVertex_ ]; │ │ │ │ │ -145 │ │ │ │ │ -146 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord0 = grid().getCoord( elementInfo(), │ │ │ │ │ -localFaces[ 0 ] ); │ │ │ │ │ -147 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord1 = grid().getCoord( elementInfo(), │ │ │ │ │ -localFaces[ 1 ] ); │ │ │ │ │ -148 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord2 = grid().getCoord( elementInfo(), │ │ │ │ │ -localFaces[ 2 ] ); │ │ │ │ │ -149 │ │ │ │ │ -150 FieldVector< ctype, dimensionworld > u; │ │ │ │ │ -151 FieldVector< ctype, dimensionworld > v; │ │ │ │ │ -152 for( int i = 0; i < dimension; ++i ) │ │ │ │ │ -153 { │ │ │ │ │ -154 v[ i ] = coord1[ i ] - coord0[ i ]; │ │ │ │ │ -155 u[ i ] = coord2[ i ] - coord1[ i ]; │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 _N_o_r_m_a_l_V_e_c_t_o_r n; │ │ │ │ │ -159 for( int i = 0; i < dimension; ++i ) │ │ │ │ │ -160 { │ │ │ │ │ -161 const int j = (i+1)%dimension; │ │ │ │ │ -162 const int k = (i+2)%dimension; │ │ │ │ │ -163 n[ i ] = val * (u[ j ] * v[ k ] - u[ k ] * v[ j ]); │ │ │ │ │ -164 } │ │ │ │ │ -165 return n; │ │ │ │ │ -166 } │ │ │ │ │ -167 │ │ │ │ │ -168 │ │ │ │ │ -169 template< class Grid > │ │ │ │ │ -170 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -_1_7_1 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_O_u_t_e_r_N_o_r_m_a_l() const │ │ │ │ │ -172 { │ │ │ │ │ -173 return centerIntegrationOuterNormal(); │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 │ │ │ │ │ -177 template< class Grid > │ │ │ │ │ -178 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -_1_7_9 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ │ -180 { │ │ │ │ │ -181 _N_o_r_m_a_l_V_e_c_t_o_r normal = centerOuterNormal(); │ │ │ │ │ -182 normal *= (1.0 / normal.two_norm()); │ │ │ │ │ -183 return normal; │ │ │ │ │ -184 } │ │ │ │ │ -185 │ │ │ │ │ -186 │ │ │ │ │ -187 template< class Grid > │ │ │ │ │ -188 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -_1_8_9 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l ( const │ │ │ │ │ -_L_o_c_a_l_C_o_o_r_d_T_y_p_e & ) const │ │ │ │ │ -190 { │ │ │ │ │ -191 return centerIntegrationOuterNormal(); │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -194 │ │ │ │ │ -195 template< class Grid > │ │ │ │ │ -196 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -_1_9_7 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_o_u_t_e_r_N_o_r_m_a_l( const _L_o_c_a_l_C_o_o_r_d_T_y_p_e & ) │ │ │ │ │ -const │ │ │ │ │ -198 { │ │ │ │ │ -199 return centerOuterNormal(); │ │ │ │ │ -200 } │ │ │ │ │ -201 │ │ │ │ │ -202 │ │ │ │ │ -203 template< class Grid > │ │ │ │ │ -204 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -_2_0_5 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l ( const _L_o_c_a_l_C_o_o_r_d_T_y_p_e │ │ │ │ │ -& ) const │ │ │ │ │ -206 { │ │ │ │ │ -207 return centerUnitOuterNormal(); │ │ │ │ │ -208 } │ │ │ │ │ -209 │ │ │ │ │ -210 │ │ │ │ │ -211 template< class Grid > │ │ │ │ │ -212 inline _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -_2_1_3 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n () const │ │ │ │ │ -214 { │ │ │ │ │ -215 return _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n( elementInfo().transformation( oppVertex_ ) ); │ │ │ │ │ -216 } │ │ │ │ │ -217 │ │ │ │ │ -218 │ │ │ │ │ -219 template< class Grid > │ │ │ │ │ -_2_2_0 inline const _G_r_i_d &_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_g_r_i_d () const │ │ │ │ │ -221 { │ │ │ │ │ -222 return *grid_; │ │ │ │ │ -223 } │ │ │ │ │ -224 │ │ │ │ │ -225 │ │ │ │ │ -226 template< class Grid > │ │ │ │ │ -227 inline const typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o & │ │ │ │ │ -_2_2_8 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o () const │ │ │ │ │ -229 { │ │ │ │ │ -230 assert( !!elementInfo_ ); │ │ │ │ │ -231 return elementInfo_; │ │ │ │ │ -232 } │ │ │ │ │ -233 │ │ │ │ │ -234 │ │ │ │ │ -235 │ │ │ │ │ -236 // AlbertaGridIntersectionBase::GlobalCoordReader │ │ │ │ │ -237 // ---------------------------------------------- │ │ │ │ │ -238 │ │ │ │ │ -239 template< class GridImp > │ │ │ │ │ -_2_4_0 struct _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e< GridImp >::_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -241 { │ │ │ │ │ -_2_4_2 typedef typename std::remove_const< GridImp >::type _G_r_i_d; │ │ │ │ │ -243 │ │ │ │ │ -_2_4_4 static const int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_2_4_5 static const int codimension = 1; │ │ │ │ │ -_2_4_6 static const int mydimension = _d_i_m_e_n_s_i_o_n - codimension; │ │ │ │ │ -_2_4_7 static const int coorddimension = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -248 │ │ │ │ │ -_2_4_9 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ -250 │ │ │ │ │ -_2_5_1 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -_2_5_2 typedef FieldVector< ctype, coorddimension > _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -253 │ │ │ │ │ -254 private: │ │ │ │ │ -255 const _G_r_i_d &_g_r_i_d__; │ │ │ │ │ -256 const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t_I_n_f_o__; │ │ │ │ │ -257 const int subEntity_; │ │ │ │ │ -258 const int twist_; │ │ │ │ │ -259 │ │ │ │ │ -260 public: │ │ │ │ │ -_2_6_1 _G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r ( const GridImp &_g_r_i_d, │ │ │ │ │ -262 const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t_I_n_f_o, │ │ │ │ │ -263 int subEntity ) │ │ │ │ │ -264 : _g_r_i_d__( _g_r_i_d ), │ │ │ │ │ -265 _e_l_e_m_e_n_t_I_n_f_o__( _e_l_e_m_e_n_t_I_n_f_o ), │ │ │ │ │ -266 subEntity_( subEntity ), │ │ │ │ │ -267 twist_( _e_l_e_m_e_n_t_I_n_f_o.template twist< codimension >( subEntity ) ) │ │ │ │ │ -268 {} │ │ │ │ │ -269 │ │ │ │ │ -_2_7_0 void _c_o_o_r_d_i_n_a_t_e ( int i, _C_o_o_r_d_i_n_a_t_e &x ) const │ │ │ │ │ -271 { │ │ │ │ │ -272 assert( !_e_l_e_m_e_n_t_I_n_f_o__ == false ); │ │ │ │ │ -273 assert( (i >= 0) && (i <= mydimension) ); │ │ │ │ │ -274 │ │ │ │ │ -275 const int ti = Alberta::applyInverseTwist< mydimension >( twist_, i ); │ │ │ │ │ -276 const int k = mapVertices( subEntity_, ti ); │ │ │ │ │ -277 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord = _g_r_i_d__.getCoord( _e_l_e_m_e_n_t_I_n_f_o__, k ); │ │ │ │ │ -278 for( int j = 0; j < coorddimension; ++j ) │ │ │ │ │ -279 x[ j ] = coord[ j ]; │ │ │ │ │ -280 } │ │ │ │ │ -281 │ │ │ │ │ -_2_8_2 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -283 { │ │ │ │ │ -284 return false; │ │ │ │ │ -285 } │ │ │ │ │ -286 │ │ │ │ │ -_2_8_7 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -288 { │ │ │ │ │ -289 assert( false ); │ │ │ │ │ -290 return _c_t_y_p_e( 0 ); │ │ │ │ │ -291 } │ │ │ │ │ -292 │ │ │ │ │ -293 private: │ │ │ │ │ -294 static int mapVertices ( int subEntity, int i ) │ │ │ │ │ -295 { │ │ │ │ │ -296 return _A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_a_p_p_l_y( subEntity, i │ │ │ │ │ -); │ │ │ │ │ -297 } │ │ │ │ │ -298 }; │ │ │ │ │ -299 │ │ │ │ │ -300 │ │ │ │ │ -301 │ │ │ │ │ -302 │ │ │ │ │ -303 // AlbertaGridIntersectionBase::LocalCoordReader │ │ │ │ │ -304 // --------------------------------------------- │ │ │ │ │ -305 │ │ │ │ │ -306 template< class GridImp > │ │ │ │ │ -_3_0_7 struct _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e< GridImp >::_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -308 { │ │ │ │ │ -_3_0_9 typedef typename std::remove_const< GridImp >::type _G_r_i_d; │ │ │ │ │ -310 │ │ │ │ │ -_3_1_1 static const int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_3_1_2 static const int codimension = 1; │ │ │ │ │ -_3_1_3 static const int mydimension = _d_i_m_e_n_s_i_o_n - codimension; │ │ │ │ │ -_3_1_4 static const int coorddimension = _d_i_m_e_n_s_i_o_n; │ │ │ │ │ -315 │ │ │ │ │ -_3_1_6 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ -317 │ │ │ │ │ -_3_1_8 typedef FieldVector< ctype, coorddimension > _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -319 │ │ │ │ │ -_3_2_0 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Geometry _E_l_e_m_e_n_t_G_e_o_m_e_t_r_y; │ │ │ │ │ -_3_2_1 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 1 >::Geometry _F_a_c_e_G_e_o_m_e_t_r_y; │ │ │ │ │ -322 │ │ │ │ │ -323 private: │ │ │ │ │ -324 const _E_l_e_m_e_n_t_G_e_o_m_e_t_r_y &elementGeometry_; │ │ │ │ │ -325 const _F_a_c_e_G_e_o_m_e_t_r_y &faceGeometry_; │ │ │ │ │ -326 │ │ │ │ │ -327 public: │ │ │ │ │ -_3_2_8 _L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r ( const _E_l_e_m_e_n_t_G_e_o_m_e_t_r_y &elementGeometry, │ │ │ │ │ -329 const _F_a_c_e_G_e_o_m_e_t_r_y &faceGeometry ) │ │ │ │ │ -330 : elementGeometry_( elementGeometry ), │ │ │ │ │ -331 faceGeometry_( faceGeometry ) │ │ │ │ │ -332 {} │ │ │ │ │ -333 │ │ │ │ │ -_3_3_4 void _c_o_o_r_d_i_n_a_t_e ( int i, _C_o_o_r_d_i_n_a_t_e &x ) const │ │ │ │ │ -335 { │ │ │ │ │ -336 x = elementGeometry_.local( faceGeometry_.corner( i ) ); │ │ │ │ │ -337 } │ │ │ │ │ -338 │ │ │ │ │ -_3_3_9 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -340 { │ │ │ │ │ -341 return false; │ │ │ │ │ -342 } │ │ │ │ │ -343 │ │ │ │ │ -_3_4_4 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ -345 { │ │ │ │ │ -346 return _c_t_y_p_e( 0 ); │ │ │ │ │ -347 } │ │ │ │ │ -348 }; │ │ │ │ │ -349 │ │ │ │ │ -350 │ │ │ │ │ -351 │ │ │ │ │ -352 // AlbertaGridLeafIntersection │ │ │ │ │ -353 // --------------------------- │ │ │ │ │ -354 │ │ │ │ │ -355 template< class GridImp > │ │ │ │ │ -_3_5_6 inline void _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_>_:_:_n_e_x_t () │ │ │ │ │ -357 { │ │ │ │ │ -358 assert( oppVertex_ <= dimension ); │ │ │ │ │ -359 ++oppVertex_; │ │ │ │ │ -360 neighborInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ -361 } │ │ │ │ │ -362 │ │ │ │ │ -363 template< class GridImp > │ │ │ │ │ -364 inline typename GridImp::template Codim< 0 >::Entity │ │ │ │ │ -_3_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_o_u_t_s_i_d_e () const │ │ │ │ │ -366 { │ │ │ │ │ -367 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _G_r_i_d_I_m_p_:_:_d_i_m_e_n_s_i_o_n_,_ _G_r_i_d_I_m_p_ _> _E_n_t_i_t_y_I_m_p; │ │ │ │ │ -368 │ │ │ │ │ -369 if( !neighborInfo_ ) │ │ │ │ │ -370 { │ │ │ │ │ -371 assert( neighbor() ); │ │ │ │ │ -372 │ │ │ │ │ -373 neighborInfo_ = elementInfo().leafNeighbor( oppVertex_ ); │ │ │ │ │ -374 } │ │ │ │ │ -375 │ │ │ │ │ -376 assert( !neighborInfo_ == false ); │ │ │ │ │ -377 assert( neighborInfo_.el() != NULL ); │ │ │ │ │ -378 return _E_n_t_i_t_y_I_m_p( grid(), neighborInfo_, 0 ); │ │ │ │ │ -379 } │ │ │ │ │ -380 │ │ │ │ │ -381 template< class GridImp > │ │ │ │ │ -_3_8_2 inline bool _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_n_e_i_g_h_b_o_r () const │ │ │ │ │ -383 { │ │ │ │ │ -384 assert( oppVertex_ <= dimension ); │ │ │ │ │ -385 return elementInfo().hasLeafNeighbor( oppVertex_ ); │ │ │ │ │ -386 } │ │ │ │ │ -387 │ │ │ │ │ -388 │ │ │ │ │ -389 template< class GridImp > │ │ │ │ │ -390 inline typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -_3_9_1 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e () const │ │ │ │ │ -392 { │ │ │ │ │ -393 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_I_m_p_ _> LocalGeoProvider; │ │ │ │ │ -394 const int twist = elementInfo().template twist< 1 >( oppVertex_ ); │ │ │ │ │ -395 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ │ -396 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().faceGeometry( face, │ │ │ │ │ -twist ) ); │ │ │ │ │ -397 } │ │ │ │ │ -398 │ │ │ │ │ -399 │ │ │ │ │ -400 template< class GridImp > │ │ │ │ │ -401 inline typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -_4_0_2 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ -403 { │ │ │ │ │ -404 assert( neighbor() ); │ │ │ │ │ -405 │ │ │ │ │ -406 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_I_m_p_ _> LocalGeoProvider; │ │ │ │ │ -407 const _A_L_B_E_R_T_A EL_INFO &elInfo = elementInfo().elInfo(); │ │ │ │ │ -408 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ]; │ │ │ │ │ -409 const int twist = elementInfo().twistInNeighbor( oppVertex_ ); │ │ │ │ │ -410 const int face = (dimension > 1 ? oppVertex : 1-oppVertex); │ │ │ │ │ -411 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().faceGeometry( face, │ │ │ │ │ -twist ) ); │ │ │ │ │ -412 } │ │ │ │ │ -413 │ │ │ │ │ -414 │ │ │ │ │ -415 template< class GridImp > │ │ │ │ │ -416 inline typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -_4_1_7 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ -418 { │ │ │ │ │ -419 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ │ -420 const _G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r coordReader( grid(), elementInfo(), face ); │ │ │ │ │ -421 return _G_e_o_m_e_t_r_y( _G_e_o_m_e_t_r_y_I_m_p_l( coordReader ) ); │ │ │ │ │ -422 } │ │ │ │ │ -423 │ │ │ │ │ -424 │ │ │ │ │ -425 template< class GridImp > │ │ │ │ │ -_4_2_6 inline int _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ -427 { │ │ │ │ │ -428 const _A_L_B_E_R_T_A EL_INFO &elInfo = elementInfo().elInfo(); │ │ │ │ │ -429 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ]; │ │ │ │ │ -430 const int face = (dimension > 1 ? oppVertex : 1-oppVertex); │ │ │ │ │ -431 return grid().alberta2generic( 1, face ); │ │ │ │ │ -432 } │ │ │ │ │ -433 │ │ │ │ │ -434} // namespace Dune │ │ │ │ │ -435 │ │ │ │ │ -436#endif // #ifndef DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +72} │ │ │ │ │ +73 │ │ │ │ │ +74#endif // #if HAVE_ALBERTA │ │ │ │ │ +75 │ │ │ │ │ +76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ ALBERTA REAL Real │ │ │ │ │ DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ │ -LocalGeometry geometryInOutside() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:402 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ -GridImp::template Codim< 0 >::Entity outside() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:365 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_x_t │ │ │ │ │ -void next() │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:356 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y_I_m_p_l │ │ │ │ │ -Base::GeometryImpl GeometryImpl │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ │ -int indexInOutside() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:426 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ │ -LocalGeometry geometryInInside() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:391 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -Base::GlobalCoordReader GlobalCoordReader │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Base::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:417 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -bool neighbor() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:382 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -Base::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:241 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, coorddimension > Coordinate │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:252 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ -Alberta::Real ctype │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:249 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ -std::remove_const< GridImp >::type Grid │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:242 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:251 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -ctype determinant() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:287 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -bool hasDeterminant() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:282 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -GlobalCoordReader(const GridImp &grid, const ElementInfo &elementInfo, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:261 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -void coordinate(int i, Coordinate &x) const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:270 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:308 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_F_a_c_e_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< 1 >::Geometry FaceGeometry │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:321 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ -Alberta::Real ctype │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:316 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ -LocalCoordReader(const ElementGeometry &elementGeometry, const FaceGeometry │ │ │ │ │ -&faceGeometry) │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:328 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ -std::remove_const< GridImp >::type Grid │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:309 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -void coordinate(int i, Coordinate &x) const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:334 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -bool hasDeterminant() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:339 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -ctype determinant() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:344 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, coorddimension > Coordinate │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:318 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< 0 >::Geometry ElementGeometry │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:320 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_e_n_t_e_r_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector centerOuterNormal() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:171 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -const ElementInfo & elementInfo() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:228 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimensionworld > NormalVector │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_e_n_t_e_r_I_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector centerIntegrationOuterNormal() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:90 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_t_y_p_e │ │ │ │ │ -Grid::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector integrationOuterNormal(const LocalCoordType &local) const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:189 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_e_l_e_m_e_n_t_I_n_f_o__ │ │ │ │ │ -ElementInfo elementInfo_ │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_T_y_p_e │ │ │ │ │ -FieldVector< ctype, dimension-1 > LocalCoordType │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector centerUnitOuterNormal() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:179 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ -int indexInInside() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:74 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_i_n_s_i_d_e │ │ │ │ │ -Entity inside() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector unitOuterNormal(const LocalCoordType &local) const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:205 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:220 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ -bool boundary() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:43 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ -size_t boundarySegmentIndex() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:64 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:82 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -AlbertaTransformation transformation() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:213 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector outerNormal(const LocalCoordType &local) const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:197 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId() const │ │ │ │ │ -DDeeffiinniittiioonn intersection.cc:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_g_r_i_d__ │ │ │ │ │ -const Grid * grid_ │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersection.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:443 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_I_n_d_e_x │ │ │ │ │ -unsigned int boundaryIndex() const │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x │ │ │ │ │ +GlobalMatrix Matrix │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r │ │ │ │ │ +GlobalVector Vector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:107 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ DDeeffiinniittiioonn transformation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< cd >::Geometry Geometry │ │ │ │ │ -The corresponding geometry type. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static constexpr int dimensionworld │ │ │ │ │ -The dimension of the world the grid lives in. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL) │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_W_o_r_l_d_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimension > WorldVector │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace:: │ │ │ │ │ +Vector &shift) │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ +Alberta::Real ctype │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_e_v_a_l_u_a_t_e_I_n_v_e_r_s_e │ │ │ │ │ +WorldVector evaluateInverse(const WorldVector &y) const │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +WorldVector evaluate(const WorldVector &x) const │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:40 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macroelement.hh File Reference │ │ │ │ +dune-grid: misc.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,35 +71,187 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
macroelement.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Typedefs | │ │ │ │ +Functions | │ │ │ │ +Variables
│ │ │ │ +
misc.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/albertagrid/albertaheader.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::Alberta::MacroElement< dim >
class  Dune::AlbertaError
 
class  Dune::AlbertaIOError
 
class  Dune::Alberta::GlobalSpace
 
struct  Dune::Alberta::NumSubEntities< dim, 0 >
 
struct  Dune::Alberta::NumSubEntities< dim, dim >
 
struct  Dune::Alberta::NumSubEntities< 0, 0 >
 
struct  Dune::Alberta::NumSubEntities< 2, 1 >
 
struct  Dune::Alberta::NumSubEntities< 3, 1 >
 
struct  Dune::Alberta::NumSubEntities< 3, 2 >
 
struct  Dune::Alberta::CodimType< dim, 0 >
 
struct  Dune::Alberta::CodimType< dim, dim >
 
struct  Dune::Alberta::CodimType< 2, 1 >
 
struct  Dune::Alberta::CodimType< 3, 1 >
 
struct  Dune::Alberta::CodimType< 3, 2 >
 
struct  Dune::Alberta::FillFlags< dim >
 
struct  Dune::Alberta::RefinementEdge< dim >
 
struct  Dune::Alberta::RefinementEdge< 2 >
 
struct  Dune::Alberta::Dune2AlbertaNumbering< dim, codim >
 
struct  Dune::Alberta::Dune2AlbertaNumbering< 3, 2 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< dim, codim >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< dim, 1 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< 1, 1 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< 3, 2 >
 
class  Dune::Alberta::NumberingMap< dim, Numbering >
 
struct  Dune::Alberta::MapVertices< dim, 0 >
 
struct  Dune::Alberta::MapVertices< 2, 1 >
 
struct  Dune::Alberta::MapVertices< 3, 1 >
 
struct  Dune::Alberta::MapVertices< 3, 2 >
 
struct  Dune::Alberta::MapVertices< dim, dim >
 
struct  Dune::Alberta::Twist< dim, subdim >
 
struct  Dune::Alberta::Twist< dim, 1 >
 
struct  Dune::Alberta::Twist< 1, 1 >
 
struct  Dune::Alberta::Twist< dim, 2 >
 
struct  Dune::Alberta::Twist< 2, 2 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Macros

#define DUNE_ALBERTA_CACHE_COORDINATES   1
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Typedefs

typedef ALBERTA REAL Dune::Alberta::Real
 
typedef ALBERTA REAL_B Dune::Alberta::LocalVector
 
typedef ALBERTA REAL_D Dune::Alberta::GlobalVector
 
typedef ALBERTA REAL_DD Dune::Alberta::GlobalMatrix
 
typedef ALBERTA AFF_TRAFO Dune::Alberta::AffineTransformation
 
typedef ALBERTA MESH Dune::Alberta::Mesh
 
typedef ALBERTA EL Dune::Alberta::Element
 
typedef ALBERTA BNDRY_TYPE Dune::Alberta::BoundaryId
 
typedef U_CHAR Dune::Alberta::ElementType
 
typedef ALBERTA FE_SPACE Dune::Alberta::DofSpace
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Functions

template<class Data >
Data * Dune::Alberta::memAlloc (size_t size)
 
template<class Data >
Data * Dune::Alberta::memCAlloc (size_t size)
 
template<class Data >
Data * Dune::Alberta::memReAlloc (Data *ptr, size_t oldSize, size_t newSize)
 
template<class Data >
void Dune::Alberta::memFree (Data *ptr, size_t size)
 
template<int dim>
int Dune::Alberta::applyTwist (int twist, int i)
 
template<int dim>
int Dune::Alberta::applyInverseTwist (int twist, int i)
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Variables

static const int Dune::Alberta::dimWorld = DIM_OF_WORLD
 
static const int Dune::Alberta::meshRefined = MESH_REFINED
 
static const int Dune::Alberta::meshCoarsened = MESH_COARSENED
 
static const int Dune::Alberta::InteriorBoundary = INTERIOR
 
static const int Dune::Alberta::DirichletBoundary = DIRICHLET
 
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTA_CACHE_COORDINATES

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTA_CACHE_COORDINATES   1
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,150 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -macroelement.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ │ +misc.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _0_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _2_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _2_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _3_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _3_,_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_<_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_<_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _1_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _2_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _s_u_b_d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _1_,_ _1_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _2_,_ _2_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A___C_A_C_H_E___C_O_O_R_D_I_N_A_T_E_S   1 │ │ │ │ │ +  │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ + typedef _A_L_B_E_R_T_A REAL  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A REAL_B  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A REAL_D  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A REAL_DD  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A AFF_TRAFO  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A MESH  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A EL  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +  │ │ │ │ │ +typedef _A_L_B_E_R_T_A BNDRY_TYPE  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ │ +  │ │ │ │ │ + typedef U_CHAR  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ +  │ │ │ │ │ + typedef _A_L_B_E_R_T_A FE_SPACE  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +Data *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_A_l_l_o_c (size_t size) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +Data *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_C_A_l_l_o_c (size_t size) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +Data *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c (Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_F_r_e_e (Data *ptr, size_t size) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_T_w_i_s_t (int twist, int i) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t (int twist, int i) │ │ │ │ │ +  │ │ │ │ │ +VVaarriiaabblleess │ │ │ │ │ +static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d = _D_I_M___O_F___W_O_R_L_D │ │ │ │ │ +  │ │ │ │ │ +static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d = MESH_REFINED │ │ │ │ │ +  │ │ │ │ │ +static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d = MESH_COARSENED │ │ │ │ │ +  │ │ │ │ │ +static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y = INTERIOR │ │ │ │ │ +  │ │ │ │ │ +static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y = DIRICHLET │ │ │ │ │ +  │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__CCAACCHHEE__CCOOOORRDDIINNAATTEESS ********** │ │ │ │ │ +#define DUNE_ALBERTA_CACHE_COORDINATES   1 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macroelement.hh Source File │ │ │ │ +dune-grid: misc.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,105 +74,870 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
macroelement.hh
│ │ │ │ +
misc.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ -
6#define DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_MISC_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MISC_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#if HAVE_ALBERTA
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │ +
12#include <dune/common/hybridutilities.hh>
│ │ │ │ +
13#include <dune/common/typetraits.hh>
│ │ │ │
14
│ │ │ │ -
15 namespace Alberta
│ │ │ │ -
16 {
│ │ │ │ -
17
│ │ │ │ -
18 // MacroElement
│ │ │ │ -
19 // ------------
│ │ │ │ -
20
│ │ │ │ -
21 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 : public ALBERTA MACRO_EL
│ │ │ │ -
24 {
│ │ │ │ -
25 const GlobalVector &coordinate ( const int vertex ) const;
│ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17#if HAVE_ALBERTA
│ │ │ │ +
18
│ │ │ │ +
19// should the coordinates be cached in a vector (required for ALBERTA 2.0)?
│ │ │ │ +
20#ifndef DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
21#define DUNE_ALBERTA_CACHE_COORDINATES 1
│ │ │ │ +
22#endif
│ │ │ │ +
23
│ │ │ │ +
24namespace Dune
│ │ │ │ +
25{
│ │ │ │
26
│ │ │ │ -
27 int boundaryId ( const int face ) const;
│ │ │ │ -
28 bool isBoundary ( const int face ) const;
│ │ │ │ -
29 const MacroElement< dim > *neighbor ( const int face ) const;
│ │ │ │ -
30 };
│ │ │ │ -
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
33 template< int dim >
│ │ │ │ -
│ │ │ │ -
34 inline const GlobalVector &MacroElement< dim >::coordinate ( const int vertex ) const
│ │ │ │ -
35 {
│ │ │ │ -
36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );
│ │ │ │ -
37 return *coord[ vertex ];
│ │ │ │ -
38 }
│ │ │ │ +
27 // Exceptions
│ │ │ │ +
28 // ----------
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 : public Exception
│ │ │ │ +
32 {};
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 : public IOError
│ │ │ │ +
36 {};
│ │ │ │
│ │ │ │ +
37
│ │ │ │ +
38
│ │ │ │
39
│ │ │ │ -
40
│ │ │ │ -
41 template< int dim >
│ │ │ │ -
│ │ │ │ -
42 inline bool MacroElement< dim >::isBoundary ( const int face ) const
│ │ │ │ -
43 {
│ │ │ │ -
44 return (boundaryId( face ) != InteriorBoundary);
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ +
40 namespace Alberta
│ │ │ │ +
41 {
│ │ │ │ +
42
│ │ │ │ +
43 // Import Types
│ │ │ │ +
44 // ------------
│ │ │ │ +
45
│ │ │ │ +
46 static const int dimWorld = DIM_OF_WORLD;
│ │ │ │
47
│ │ │ │ -
48 template< int dim >
│ │ │ │ -
│ │ │ │ -
49 inline int MacroElement< dim >::boundaryId ( const int face ) const
│ │ │ │ -
50 {
│ │ │ │ -
51 return wall_bound[ face ];
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
54
│ │ │ │ -
55 template< int dim >
│ │ │ │ -
│ │ │ │ -
56 const MacroElement< dim > *MacroElement< dim >::neighbor ( const int face ) const
│ │ │ │ -
57 {
│ │ │ │ -
58 assert( (face >= 0) && (face < N_NEIGH_MAX) );
│ │ │ │ -
59 return static_cast< const MacroElement * >( neigh[ face ] );
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62 }
│ │ │ │ -
63
│ │ │ │ -
64}
│ │ │ │ -
65
│ │ │ │ -
66#endif // #if HAVE_ALBERTA
│ │ │ │ +
48 typedef ALBERTA REAL Real;
│ │ │ │ +
49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates
│ │ │ │ +
50 typedef ALBERTA REAL_D GlobalVector;
│ │ │ │ +
51 typedef ALBERTA REAL_DD GlobalMatrix;
│ │ │ │ +
52 typedef ALBERTA AFF_TRAFO AffineTransformation;
│ │ │ │ +
53 typedef ALBERTA MESH Mesh;
│ │ │ │ +
54 typedef ALBERTA EL Element;
│ │ │ │ +
55
│ │ │ │ +
56 static const int meshRefined = MESH_REFINED;
│ │ │ │ +
57 static const int meshCoarsened = MESH_COARSENED;
│ │ │ │ +
58
│ │ │ │ +
59 static const int InteriorBoundary = INTERIOR;
│ │ │ │ +
60 static const int DirichletBoundary = DIRICHLET;
│ │ │ │ +
61 typedef ALBERTA BNDRY_TYPE BoundaryId;
│ │ │ │ +
62
│ │ │ │ +
63 typedef U_CHAR ElementType;
│ │ │ │ +
64
│ │ │ │ +
65 typedef ALBERTA FE_SPACE DofSpace;
│ │ │ │ +
66
│ │ │ │
67
│ │ │ │ -
68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
68
│ │ │ │ +
69 // Memory Manipulation Functions
│ │ │ │ +
70 // -----------------------------
│ │ │ │ +
71
│ │ │ │ +
72 template< class Data >
│ │ │ │ +
│ │ │ │ +
73 inline Data *memAlloc ( size_t size )
│ │ │ │ +
74 {
│ │ │ │ +
75 return MEM_ALLOC( size, Data );
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
78 template< class Data >
│ │ │ │ +
│ │ │ │ +
79 inline Data *memCAlloc ( size_t size )
│ │ │ │ +
80 {
│ │ │ │ +
81 return MEM_CALLOC( size, Data );
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
84 template< class Data >
│ │ │ │ +
│ │ │ │ +
85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )
│ │ │ │ +
86 {
│ │ │ │ +
87 return MEM_REALLOC( ptr, oldSize, newSize, Data );
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
90 template< class Data >
│ │ │ │ +
│ │ │ │ +
91 inline void memFree ( Data *ptr, size_t size )
│ │ │ │ +
92 {
│ │ │ │ +
93 return MEM_FREE( ptr, size, Data );
│ │ │ │ +
94 }
│ │ │ │ +
│ │ │ │ +
95
│ │ │ │ +
96
│ │ │ │ +
97
│ │ │ │ +
98 // GlobalSpace
│ │ │ │ +
99 // -----------
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
102 {
│ │ │ │ +
103 typedef GlobalSpace This;
│ │ │ │ +
104
│ │ │ │ +
105 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
108
│ │ │ │ +
109 private:
│ │ │ │ +
110 Matrix identityMatrix_;
│ │ │ │ +
111 Vector nullVector_;
│ │ │ │ +
112
│ │ │ │ +
113 GlobalSpace ()
│ │ │ │ +
114 {
│ │ │ │ +
115 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ +
116 {
│ │ │ │ +
117 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ +
118 identityMatrix_[ i ][ j ] = Real( 0 );
│ │ │ │ +
119 identityMatrix_[ i ][ i ] = Real( 1 );
│ │ │ │ +
120 nullVector_[ i ] = Real( 0 );
│ │ │ │ +
121 }
│ │ │ │ +
122 }
│ │ │ │ +
123
│ │ │ │ +
124 static This &instance ()
│ │ │ │ +
125 {
│ │ │ │ +
126 static This theInstance;
│ │ │ │ +
127 return theInstance;
│ │ │ │ +
128 }
│ │ │ │ +
129
│ │ │ │ +
130 public:
│ │ │ │ +
│ │ │ │ +
131 static const Matrix &identityMatrix ()
│ │ │ │ +
132 {
│ │ │ │ +
133 return instance().identityMatrix_;
│ │ │ │ +
134 }
│ │ │ │ +
│ │ │ │ +
135
│ │ │ │ +
│ │ │ │ +
136 static const Vector &nullVector ()
│ │ │ │ +
137 {
│ │ │ │ +
138 return instance().nullVector_;
│ │ │ │ +
139 }
│ │ │ │ +
│ │ │ │ +
140 };
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
142
│ │ │ │ +
143
│ │ │ │ +
144 // NumSubEntities
│ │ │ │ +
145 // --------------
│ │ │ │ +
146
│ │ │ │ +
147 template< int dim, int codim >
│ │ │ │ + │ │ │ │ +
149
│ │ │ │ +
150 template< int dim >
│ │ │ │ +
│ │ │ │ +
151 struct NumSubEntities< dim, 0 >
│ │ │ │ +
152 {
│ │ │ │ +
153 static const int value = 1;
│ │ │ │ +
154 };
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
156 template< int dim >
│ │ │ │ +
│ │ │ │ +
157 struct NumSubEntities< dim, dim >
│ │ │ │ +
158 {
│ │ │ │ +
159 static const int value = dim+1;
│ │ │ │ +
160 };
│ │ │ │ +
│ │ │ │ +
161
│ │ │ │ +
162 template<>
│ │ │ │ +
│ │ │ │ +
163 struct NumSubEntities< 0, 0 >
│ │ │ │ +
164 {
│ │ │ │ +
165 static const int value = 1;
│ │ │ │ +
166 };
│ │ │ │ +
│ │ │ │ +
167
│ │ │ │ +
168 template<>
│ │ │ │ +
│ │ │ │ +
169 struct NumSubEntities< 2, 1 >
│ │ │ │ +
170 {
│ │ │ │ +
171 static const int value = 3;
│ │ │ │ +
172 };
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
174 template<>
│ │ │ │ +
│ │ │ │ +
175 struct NumSubEntities< 3, 1 >
│ │ │ │ +
176 {
│ │ │ │ +
177 static const int value = 4;
│ │ │ │ +
178 };
│ │ │ │ +
│ │ │ │ +
179
│ │ │ │ +
180 template<>
│ │ │ │ +
│ │ │ │ +
181 struct NumSubEntities< 3, 2 >
│ │ │ │ +
182 {
│ │ │ │ +
183 static const int value = 6;
│ │ │ │ +
184 };
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
186
│ │ │ │ +
187
│ │ │ │ +
188 // CodimType
│ │ │ │ +
189 // ---------
│ │ │ │ +
190
│ │ │ │ +
191 template< int dim, int codim >
│ │ │ │ +
192 struct CodimType;
│ │ │ │ +
193
│ │ │ │ +
194 template< int dim >
│ │ │ │ +
│ │ │ │ +
195 struct CodimType< dim, 0 >
│ │ │ │ +
196 {
│ │ │ │ +
197 static const int value = CENTER;
│ │ │ │ +
198 };
│ │ │ │ +
│ │ │ │ +
199
│ │ │ │ +
200 template< int dim >
│ │ │ │ +
│ │ │ │ +
201 struct CodimType< dim, dim >
│ │ │ │ +
202 {
│ │ │ │ +
203 static const int value = VERTEX;
│ │ │ │ +
204 };
│ │ │ │ +
│ │ │ │ +
205
│ │ │ │ +
206 template<>
│ │ │ │ +
│ │ │ │ +
207 struct CodimType< 2, 1 >
│ │ │ │ +
208 {
│ │ │ │ +
209 static const int value = EDGE;
│ │ │ │ +
210 };
│ │ │ │ +
│ │ │ │ +
211
│ │ │ │ +
212 template<>
│ │ │ │ +
│ │ │ │ +
213 struct CodimType< 3, 1 >
│ │ │ │ +
214 {
│ │ │ │ +
215 static const int value = FACE;
│ │ │ │ +
216 };
│ │ │ │ +
│ │ │ │ +
217
│ │ │ │ +
218 template<>
│ │ │ │ +
│ │ │ │ +
219 struct CodimType< 3, 2 >
│ │ │ │ +
220 {
│ │ │ │ +
221 static const int value = EDGE;
│ │ │ │ +
222 };
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
224
│ │ │ │ +
225
│ │ │ │ +
226 // FillFlags
│ │ │ │ +
227 // ---------
│ │ │ │ +
228
│ │ │ │ +
229 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
231 {
│ │ │ │ +
232 typedef ALBERTA FLAGS Flags;
│ │ │ │ +
233
│ │ │ │ +
234 static const Flags nothing = FILL_NOTHING;
│ │ │ │ +
235
│ │ │ │ +
236 static const Flags coords = FILL_COORDS;
│ │ │ │ +
237
│ │ │ │ +
238 static const Flags neighbor = FILL_NEIGH;
│ │ │ │ +
239
│ │ │ │ +
240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
│ │ │ │ +
241
│ │ │ │ +
242 static const Flags projection = FILL_PROJECTION;
│ │ │ │ +
243
│ │ │ │ +
244 static const Flags elementType = FILL_NOTHING;
│ │ │ │ +
245
│ │ │ │ +
246 static const Flags boundaryId = FILL_MACRO_WALLS;
│ │ │ │ +
247
│ │ │ │ +
248 static const Flags nonPeriodic = FILL_NON_PERIODIC;
│ │ │ │ +
249
│ │ │ │ + │ │ │ │ + │ │ │ │ +
252
│ │ │ │ +
253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;
│ │ │ │ +
254
│ │ │ │ +
255#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
256 static const Flags standard = standardWithCoords & ~coords;
│ │ │ │ +
257#else
│ │ │ │ + │ │ │ │ +
259#endif
│ │ │ │ +
260 };
│ │ │ │ +
│ │ │ │ +
261
│ │ │ │ +
262
│ │ │ │ +
263
│ │ │ │ +
264 // RefinementEdge
│ │ │ │ +
265 // --------------
│ │ │ │ +
266
│ │ │ │ +
267 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
269 {
│ │ │ │ +
270 static const int value = 0;
│ │ │ │ +
271 };
│ │ │ │ +
│ │ │ │ +
272
│ │ │ │ +
273 template<>
│ │ │ │ +
│ │ │ │ +
274 struct RefinementEdge< 2 >
│ │ │ │ +
275 {
│ │ │ │ +
276 static const int value = 2;
│ │ │ │ +
277 };
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
279
│ │ │ │ +
280
│ │ │ │ +
281 // Dune2AlbertaNumbering
│ │ │ │ +
282 // ---------------------
│ │ │ │ +
283
│ │ │ │ +
284 template< int dim, int codim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
286 {
│ │ │ │ +
│ │ │ │ +
287 static int apply ( const int i )
│ │ │ │ +
288 {
│ │ │ │ +
289 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ │ +
290 return i;
│ │ │ │ +
291 }
│ │ │ │ +
│ │ │ │ +
292 };
│ │ │ │ +
│ │ │ │ +
293
│ │ │ │ +
294 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
296 {
│ │ │ │ +
297 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │ │ +
298
│ │ │ │ +
│ │ │ │ +
299 static int apply ( const int i )
│ │ │ │ +
300 {
│ │ │ │ +
301 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ │ +
302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };
│ │ │ │ +
303 return dune2alberta[ i ];
│ │ │ │ +
304 }
│ │ │ │ +
│ │ │ │ +
305 };
│ │ │ │ +
│ │ │ │ +
306
│ │ │ │ +
307
│ │ │ │ +
308
│ │ │ │ +
309 // Generic2AlbertaNumbering
│ │ │ │ +
310 // ------------------------
│ │ │ │ +
311
│ │ │ │ +
312 template< int dim, int codim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
314 {
│ │ │ │ +
│ │ │ │ +
315 static int apply ( const int i )
│ │ │ │ +
316 {
│ │ │ │ +
317 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ │ +
318 return i;
│ │ │ │ +
319 }
│ │ │ │ +
│ │ │ │ +
320 };
│ │ │ │ +
│ │ │ │ +
321
│ │ │ │ +
322 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
324 {
│ │ │ │ +
│ │ │ │ +
325 static int apply ( const int i )
│ │ │ │ +
326 {
│ │ │ │ +
327 assert( (i >= 0) && (i < NumSubEntities< dim, 1 >::value) );
│ │ │ │ +
328 return dim - i;
│ │ │ │ +
329 }
│ │ │ │ +
│ │ │ │ +
330 };
│ │ │ │ +
│ │ │ │ +
331
│ │ │ │ +
332 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
334 {
│ │ │ │ +
│ │ │ │ +
335 static int apply ( const int i )
│ │ │ │ +
336 {
│ │ │ │ +
337 assert( (i >= 0) && (i < NumSubEntities< 1, 1 >::value) );
│ │ │ │ +
338 return i;
│ │ │ │ +
339 }
│ │ │ │ +
│ │ │ │ +
340 };
│ │ │ │ +
│ │ │ │ +
341
│ │ │ │ +
342 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
344 {
│ │ │ │ +
345 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │ │ +
346
│ │ │ │ +
│ │ │ │ +
347 static int apply ( const int i )
│ │ │ │ +
348 {
│ │ │ │ +
349 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ │ +
350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };
│ │ │ │ +
351 return generic2alberta[ i ];
│ │ │ │ +
352 }
│ │ │ │ +
│ │ │ │ +
353 };
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
355
│ │ │ │ +
356
│ │ │ │ +
357 // NumberingMap
│ │ │ │ +
358 // ------------
│ │ │ │ +
359
│ │ │ │ +
360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
362 {
│ │ │ │ + │ │ │ │ +
364
│ │ │ │ +
365 template< int codim >
│ │ │ │ +
366 struct Initialize;
│ │ │ │ +
367
│ │ │ │ +
368 int *dune2alberta_[ dim+1 ];
│ │ │ │ +
369 int *alberta2dune_[ dim+1 ];
│ │ │ │ +
370 int numSubEntities_[ dim+1 ];
│ │ │ │ +
371
│ │ │ │ +
372 NumberingMap ( const This & );
│ │ │ │ +
373 This &operator= ( const This & );
│ │ │ │ +
374
│ │ │ │ +
375 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
377 {
│ │ │ │ +
378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ Initialize< i >::apply( *this ); } );
│ │ │ │ +
379 }
│ │ │ │ +
│ │ │ │ +
380
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
382 {
│ │ │ │ +
383 for( int codim = 0; codim <= dim; ++codim )
│ │ │ │ +
384 {
│ │ │ │ +
385 delete[]( dune2alberta_[ codim ] );
│ │ │ │ +
386 delete[]( alberta2dune_[ codim ] );
│ │ │ │ +
387 }
│ │ │ │ +
388 }
│ │ │ │ +
│ │ │ │ +
389
│ │ │ │ +
│ │ │ │ +
390 int dune2alberta ( int codim, int i ) const
│ │ │ │ +
391 {
│ │ │ │ +
392 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ +
393 assert( (i >= 0) && (i < numSubEntities( codim )) );
│ │ │ │ +
394 return dune2alberta_[ codim ][ i ];
│ │ │ │ +
395 }
│ │ │ │ +
│ │ │ │ +
396
│ │ │ │ +
│ │ │ │ +
397 int alberta2dune ( int codim, int i ) const
│ │ │ │ +
398 {
│ │ │ │ +
399 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ +
400 assert( (i >= 0) && (i < numSubEntities( codim )) );
│ │ │ │ +
401 return alberta2dune_[ codim ][ i ];
│ │ │ │ +
402 }
│ │ │ │ +
│ │ │ │ +
403
│ │ │ │ +
│ │ │ │ +
404 int numSubEntities ( int codim ) const
│ │ │ │ +
405 {
│ │ │ │ +
406 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ +
407 return numSubEntities_[ codim ];
│ │ │ │ +
408 }
│ │ │ │ +
│ │ │ │ +
409 };
│ │ │ │ +
│ │ │ │ +
410
│ │ │ │ +
411
│ │ │ │ +
412
│ │ │ │ +
413 // NumberingMap::Initialize
│ │ │ │ +
414 // ------------------------
│ │ │ │ +
415
│ │ │ │ +
416 template< int dim, template< int, int > class Numbering >
│ │ │ │ +
417 template< int codim >
│ │ │ │ +
418 struct NumberingMap< dim, Numbering >::Initialize
│ │ │ │ +
419 {
│ │ │ │ +
420 static const int numSubEntities = NumSubEntities< dim, codim >::value;
│ │ │ │ +
421
│ │ │ │ +
422 static void apply ( NumberingMap< dim, Numbering > &map )
│ │ │ │ +
423 {
│ │ │ │ +
424 map.numSubEntities_[ codim ] = numSubEntities;
│ │ │ │ +
425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];
│ │ │ │ +
426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];
│ │ │ │ +
427
│ │ │ │ +
428 for( int i = 0; i < numSubEntities; ++i )
│ │ │ │ +
429 {
│ │ │ │ +
430 const int j = Numbering< dim, codim >::apply( i );
│ │ │ │ +
431 map.dune2alberta_[ codim ][ i ] = j;
│ │ │ │ +
432 map.alberta2dune_[ codim ][ j ] = i;
│ │ │ │ +
433 }
│ │ │ │ +
434 }
│ │ │ │ +
435 };
│ │ │ │ +
436
│ │ │ │ +
437
│ │ │ │ +
438
│ │ │ │ +
439 // MapVertices
│ │ │ │ +
440 // -----------
│ │ │ │ +
441
│ │ │ │ +
442 template< int dim, int codim >
│ │ │ │ + │ │ │ │ +
444
│ │ │ │ +
445 template< int dim >
│ │ │ │ +
│ │ │ │ +
446 struct MapVertices< dim, 0 >
│ │ │ │ +
447 {
│ │ │ │ +
│ │ │ │ +
448 static int apply ( int subEntity, int vertex )
│ │ │ │ +
449 {
│ │ │ │ +
450 assert( subEntity == 0 );
│ │ │ │ +
451 assert( (vertex >= 0) && (vertex <= NumSubEntities< dim, dim >::value) );
│ │ │ │ +
452 return vertex;
│ │ │ │ +
453 }
│ │ │ │ +
│ │ │ │ +
454 };
│ │ │ │ +
│ │ │ │ +
455
│ │ │ │ +
456 template<>
│ │ │ │ +
│ │ │ │ +
457 struct MapVertices< 2, 1 >
│ │ │ │ +
458 {
│ │ │ │ +
│ │ │ │ +
459 static int apply ( int subEntity, int vertex )
│ │ │ │ +
460 {
│ │ │ │ +
461 assert( (subEntity >= 0) && (subEntity < 3) );
│ │ │ │ +
462 assert( (vertex >= 0) && (vertex < 2) );
│ │ │ │ +
463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };
│ │ │ │ +
464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };
│ │ │ │ +
465 return map[ subEntity ][ vertex ];
│ │ │ │ +
466 }
│ │ │ │ +
│ │ │ │ +
467 };
│ │ │ │ +
│ │ │ │ +
468
│ │ │ │ +
469 template<>
│ │ │ │ +
│ │ │ │ +
470 struct MapVertices< 3, 1 >
│ │ │ │ +
471 {
│ │ │ │ +
│ │ │ │ +
472 static int apply ( int subEntity, int vertex )
│ │ │ │ +
473 {
│ │ │ │ +
474 assert( (subEntity >= 0) && (subEntity < 4) );
│ │ │ │ +
475 assert( (vertex >= 0) && (vertex < 3) );
│ │ │ │ +
476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };
│ │ │ │ +
477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };
│ │ │ │ +
478 return map[ subEntity ][ vertex ];
│ │ │ │ +
479 }
│ │ │ │ +
│ │ │ │ +
480 };
│ │ │ │ +
│ │ │ │ +
481
│ │ │ │ +
482 template<>
│ │ │ │ +
│ │ │ │ +
483 struct MapVertices< 3, 2 >
│ │ │ │ +
484 {
│ │ │ │ +
│ │ │ │ +
485 static int apply ( int subEntity, int vertex )
│ │ │ │ +
486 {
│ │ │ │ +
487 assert( (subEntity >= 0) && (subEntity < 6) );
│ │ │ │ +
488 assert( (vertex >= 0) && (vertex < 2) );
│ │ │ │ +
489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} };
│ │ │ │ +
490 return map[ subEntity ][ vertex ];
│ │ │ │ +
491 }
│ │ │ │ +
│ │ │ │ +
492 };
│ │ │ │ +
│ │ │ │ +
493
│ │ │ │ +
494 template< int dim >
│ │ │ │ +
│ │ │ │ +
495 struct MapVertices< dim, dim >
│ │ │ │ +
496 {
│ │ │ │ +
│ │ │ │ +
497 static int apply ( int subEntity, int vertex )
│ │ │ │ +
498 {
│ │ │ │ +
499 assert( (subEntity >= 0) && (subEntity < NumSubEntities< dim, 1 >::value) );
│ │ │ │ +
500 assert( vertex == 0 );
│ │ │ │ +
501 return subEntity;
│ │ │ │ +
502 }
│ │ │ │ +
│ │ │ │ +
503 };
│ │ │ │ +
│ │ │ │ +
504
│ │ │ │ +
505
│ │ │ │ +
506
│ │ │ │ +
507 // Twist
│ │ │ │ +
508 // -----
│ │ │ │ +
509
│ │ │ │ +
510 // ******************************************************************
│ │ │ │ +
511 // Meaning of the twist (same as in ALU)
│ │ │ │ +
512 // -------------------------------------
│ │ │ │ +
513 //
│ │ │ │ +
514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face
│ │ │ │ +
515 // (here, we assume their indices to be increasing). Denote by k the
│ │ │ │ +
516 // local number of a vertex v within the element and by t the twist.
│ │ │ │ +
517 // Then, v = v_j, where j is computed by the following formula:
│ │ │ │ +
518 //
│ │ │ │ +
519 // / (2n + 1 - k + t) % n, if t < 0
│ │ │ │ +
520 // j = <
│ │ │ │ +
521 // \ (k + t) % n, if t >= 0
│ │ │ │ +
522 //
│ │ │ │ +
523 // Note: We use the order of the 0-th vertex dof to assign the twist.
│ │ │ │ +
524 // This is ok for two reasons:
│ │ │ │ +
525 // - ALBERTA preserves the relative order of the dofs during
│ │ │ │ +
526 // dof compression.
│ │ │ │ +
527 // - ALBERTA enforces the first vertex dof admin to be periodic.
│ │ │ │ +
528 // ******************************************************************
│ │ │ │ +
529
│ │ │ │ +
530 template< int dim, int subdim >
│ │ │ │ +
│ │ │ │ +
531 struct Twist
│ │ │ │ +
532 {
│ │ │ │ +
533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;
│ │ │ │ +
534
│ │ │ │ +
535 static const int minTwist = 0;
│ │ │ │ +
536 static const int maxTwist = 0;
│ │ │ │ +
537
│ │ │ │ +
│ │ │ │ +
538 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ │ +
539 [[maybe_unused]] int subEntity )
│ │ │ │ +
540 {
│ │ │ │ +
541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ │ +
542 return 0;
│ │ │ │ +
543 }
│ │ │ │ +
│ │ │ │ +
544 };
│ │ │ │ +
│ │ │ │ +
545
│ │ │ │ +
546 template< int dim >
│ │ │ │ +
│ │ │ │ +
547 struct Twist< dim, 1 >
│ │ │ │ +
548 {
│ │ │ │ +
549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;
│ │ │ │ +
550
│ │ │ │ +
551 static const int minTwist = 0;
│ │ │ │ +
552 static const int maxTwist = 1;
│ │ │ │ +
553
│ │ │ │ +
│ │ │ │ +
554 static int twist ( const Element *element, int subEntity )
│ │ │ │ +
555 {
│ │ │ │ +
556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ │ +
557 const int numVertices = NumSubEntities< 1, 1 >::value;
│ │ │ │ +
558 int dof[ numVertices ];
│ │ │ │ +
559 for( int i = 0; i < numVertices; ++i )
│ │ │ │ +
560 {
│ │ │ │ +
561 const int j = MapVertices< dim, dim-1 >::apply( subEntity, i );
│ │ │ │ +
562 dof[ i ] = element->dof[ j ][ 0 ];
│ │ │ │ +
563 }
│ │ │ │ +
564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);
│ │ │ │ +
565 }
│ │ │ │ +
│ │ │ │ +
566 };
│ │ │ │ +
│ │ │ │ +
567
│ │ │ │ +
568
│ │ │ │ +
569 template<>
│ │ │ │ +
│ │ │ │ +
570 struct Twist< 1, 1 >
│ │ │ │ +
571 {
│ │ │ │ +
572 static const int minTwist = 0;
│ │ │ │ +
573 static const int maxTwist = 0;
│ │ │ │ +
574
│ │ │ │ +
│ │ │ │ +
575 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ │ +
576 [[maybe_unused]] int subEntity )
│ │ │ │ +
577 {
│ │ │ │ +
578 assert( subEntity == 0 );
│ │ │ │ +
579 return 0;
│ │ │ │ +
580 }
│ │ │ │ +
│ │ │ │ +
581 };
│ │ │ │ +
│ │ │ │ +
582
│ │ │ │ +
583
│ │ │ │ +
584 template< int dim >
│ │ │ │ +
│ │ │ │ +
585 struct Twist< dim, 2 >
│ │ │ │ +
586 {
│ │ │ │ +
587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;
│ │ │ │ +
588
│ │ │ │ +
589 static const int minTwist = -3;
│ │ │ │ +
590 static const int maxTwist = 2;
│ │ │ │ +
591
│ │ │ │ +
│ │ │ │ +
592 static int twist ( const Element *element, int subEntity )
│ │ │ │ +
593 {
│ │ │ │ +
594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ │ +
595 const int numVertices = NumSubEntities< 2, 2 >::value;
│ │ │ │ +
596 int dof[ numVertices ];
│ │ │ │ +
597 for( int i = 0; i < numVertices; ++i )
│ │ │ │ +
598 {
│ │ │ │ +
599 const int j = MapVertices< dim, dim-2 >::apply( subEntity, i );
│ │ │ │ +
600 dof[ i ] = element->dof[ j ][ 0 ];
│ │ │ │ +
601 }
│ │ │ │ +
602
│ │ │ │ +
603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };
│ │ │ │ +
604 const int k = int( dof[ 0 ] < dof[ 1 ] )
│ │ │ │ +
605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)
│ │ │ │ +
606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);
│ │ │ │ +
607 assert( twist[ k ] != 666 );
│ │ │ │ +
608 return twist[ k ];
│ │ │ │ +
609 }
│ │ │ │ +
│ │ │ │ +
610 };
│ │ │ │ +
│ │ │ │ +
611
│ │ │ │ +
612
│ │ │ │ +
613 template<>
│ │ │ │ +
│ │ │ │ +
614 struct Twist< 2, 2 >
│ │ │ │ +
615 {
│ │ │ │ +
616 static const int minTwist = 0;
│ │ │ │ +
617 static const int maxTwist = 0;
│ │ │ │ +
618
│ │ │ │ +
│ │ │ │ +
619 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ │ +
620 [[maybe_unused]] int subEntity )
│ │ │ │ +
621 {
│ │ │ │ +
622 assert( subEntity == 0 );
│ │ │ │ +
623 return 0;
│ │ │ │ +
624 }
│ │ │ │ +
│ │ │ │ +
625 };
│ │ │ │ +
│ │ │ │ +
626
│ │ │ │ +
627
│ │ │ │ +
628
│ │ │ │ +
629 template< int dim >
│ │ │ │ +
│ │ │ │ +
630 inline int applyTwist ( int twist, int i )
│ │ │ │ +
631 {
│ │ │ │ +
632 const int numCorners = NumSubEntities< dim, dim >::value;
│ │ │ │ +
633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % numCorners;
│ │ │ │ +
634 }
│ │ │ │ +
│ │ │ │ +
635
│ │ │ │ +
636 template< int dim >
│ │ │ │ +
│ │ │ │ +
637 inline int applyInverseTwist ( int twist, int i )
│ │ │ │ +
638 {
│ │ │ │ +
639 const int numCorners = NumSubEntities< dim, dim >::value;
│ │ │ │ +
640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - twist) % numCorners;
│ │ │ │ +
641 }
│ │ │ │ +
│ │ │ │ +
642
│ │ │ │ +
643 }
│ │ │ │ +
644
│ │ │ │ +
645}
│ │ │ │ +
646
│ │ │ │ +
647#endif // #if HAVE_ALBERTA
│ │ │ │ +
648
│ │ │ │ +
649#endif // #ifndef DUNE_ALBERTA_MISC_HH
│ │ │ │ + │ │ │ │ +
#define DIM_OF_WORLD
Definition albertaheader.hh:23
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │ │ +
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ +
int applyTwist(int twist, int i)
Definition misc.hh:630
│ │ │ │ +
void memFree(Data *ptr, size_t size)
Definition misc.hh:91
│ │ │ │ +
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │ +
ALBERTA REAL_B LocalVector
Definition misc.hh:49
│ │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ +
ALBERTA BNDRY_TYPE BoundaryId
Definition misc.hh:61
│ │ │ │
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
static const int meshRefined
Definition misc.hh:56
│ │ │ │ +
Data * memAlloc(size_t size)
Definition misc.hh:73
│ │ │ │ +
Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
Definition misc.hh:85
│ │ │ │ +
static const int DirichletBoundary
Definition misc.hh:60
│ │ │ │ +
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ +
Data * memCAlloc(size_t size)
Definition misc.hh:79
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
U_CHAR ElementType
Definition misc.hh:63
│ │ │ │ +
static const int meshCoarsened
Definition misc.hh:57
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
Definition macroelement.hh:24
│ │ │ │ -
bool isBoundary(const int face) const
Definition macroelement.hh:42
│ │ │ │ -
const MacroElement< dim > * neighbor(const int face) const
Definition macroelement.hh:56
│ │ │ │ -
int boundaryId(const int face) const
Definition macroelement.hh:49
│ │ │ │ -
const GlobalVector & coordinate(const int vertex) const
Definition macroelement.hh:34
│ │ │ │ +
Definition misc.hh:32
│ │ │ │ +
Definition misc.hh:36
│ │ │ │ +
Definition misc.hh:102
│ │ │ │ +
static const Matrix & identityMatrix()
Definition misc.hh:131
│ │ │ │ +
static const Vector & nullVector()
Definition misc.hh:136
│ │ │ │ +
GlobalMatrix Matrix
Definition misc.hh:106
│ │ │ │ +
GlobalVector Vector
Definition misc.hh:107
│ │ │ │ +
Definition misc.hh:148
│ │ │ │ +
Definition misc.hh:192
│ │ │ │ +
Definition misc.hh:231
│ │ │ │ +
static const Flags nothing
Definition misc.hh:234
│ │ │ │ +
static const Flags nonPeriodic
Definition misc.hh:248
│ │ │ │ +
static const Flags boundaryId
Definition misc.hh:246
│ │ │ │ +
static const Flags elementType
Definition misc.hh:244
│ │ │ │ +
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ │ +
static const Flags projection
Definition misc.hh:242
│ │ │ │ +
static const Flags coords
Definition misc.hh:236
│ │ │ │ +
static const Flags orientation
Definition misc.hh:240
│ │ │ │ +
static const Flags standard
Definition misc.hh:258
│ │ │ │ +
static const Flags neighbor
Definition misc.hh:238
│ │ │ │ +
static const Flags all
Definition misc.hh:250
│ │ │ │ +
static const Flags standardWithCoords
Definition misc.hh:253
│ │ │ │ +
Definition misc.hh:269
│ │ │ │ +
static const int value
Definition misc.hh:270
│ │ │ │ + │ │ │ │ +
static int apply(const int i)
Definition misc.hh:287
│ │ │ │ +
static int apply(const int i)
Definition misc.hh:299
│ │ │ │ + │ │ │ │ +
static int apply(const int i)
Definition misc.hh:315
│ │ │ │ +
static int apply(const int i)
Definition misc.hh:325
│ │ │ │ +
static int apply(const int i)
Definition misc.hh:335
│ │ │ │ +
static int apply(const int i)
Definition misc.hh:347
│ │ │ │ +
Definition misc.hh:362
│ │ │ │ +
int alberta2dune(int codim, int i) const
Definition misc.hh:397
│ │ │ │ +
int numSubEntities(int codim) const
Definition misc.hh:404
│ │ │ │ +
int dune2alberta(int codim, int i) const
Definition misc.hh:390
│ │ │ │ +
~NumberingMap()
Definition misc.hh:381
│ │ │ │ +
NumberingMap()
Definition misc.hh:376
│ │ │ │ +
Definition misc.hh:443
│ │ │ │ +
static int apply(int subEntity, int vertex)
Definition misc.hh:448
│ │ │ │ +
static int apply(int subEntity, int vertex)
Definition misc.hh:459
│ │ │ │ +
static int apply(int subEntity, int vertex)
Definition misc.hh:472
│ │ │ │ +
static int apply(int subEntity, int vertex)
Definition misc.hh:485
│ │ │ │ +
static int apply(int subEntity, int vertex)
Definition misc.hh:497
│ │ │ │ +
Definition misc.hh:532
│ │ │ │ +
static const int maxTwist
Definition misc.hh:536
│ │ │ │ +
static const int minTwist
Definition misc.hh:535
│ │ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:538
│ │ │ │ +
static const int numSubEntities
Definition misc.hh:533
│ │ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:554
│ │ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:575
│ │ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:592
│ │ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:619
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,109 +1,888 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -macroelement.hh │ │ │ │ │ +misc.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ -6#define DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MISC_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -10#if HAVE_ALBERTA │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ 14 │ │ │ │ │ -15 namespace Alberta │ │ │ │ │ -16 { │ │ │ │ │ -17 │ │ │ │ │ -18 // MacroElement │ │ │ │ │ -19 // ------------ │ │ │ │ │ -20 │ │ │ │ │ -21 template< int dim > │ │ │ │ │ -_2_2 struct _M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -23 : public _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ -24 { │ │ │ │ │ -25 const _G_l_o_b_a_l_V_e_c_t_o_r &_c_o_o_r_d_i_n_a_t_e ( const int vertex ) const; │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ +16 │ │ │ │ │ +17#if HAVE_ALBERTA │ │ │ │ │ +18 │ │ │ │ │ +19// should the coordinates be cached in a vector (required for ALBERTA 2.0)? │ │ │ │ │ +20#ifndef DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +_2_1#define DUNE_ALBERTA_CACHE_COORDINATES 1 │ │ │ │ │ +22#endif │ │ │ │ │ +23 │ │ │ │ │ +24namespace _D_u_n_e │ │ │ │ │ +25{ │ │ │ │ │ 26 │ │ │ │ │ -27 int _b_o_u_n_d_a_r_y_I_d ( const int face ) const; │ │ │ │ │ -28 bool _i_s_B_o_u_n_d_a_r_y ( const int face ) const; │ │ │ │ │ -29 const _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _> *_n_e_i_g_h_b_o_r ( const int face ) const; │ │ │ │ │ -30 }; │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -33 template< int dim > │ │ │ │ │ -_3_4 inline const _G_l_o_b_a_l_V_e_c_t_o_r &_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_c_o_o_r_d_i_n_a_t_e ( const int │ │ │ │ │ -vertex ) const │ │ │ │ │ -35 { │ │ │ │ │ -36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) ); │ │ │ │ │ -37 return *coord[ vertex ]; │ │ │ │ │ -38 } │ │ │ │ │ +27 // Exceptions │ │ │ │ │ +28 // ---------- │ │ │ │ │ +29 │ │ │ │ │ +_3_0 class _A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ +31 : public Exception │ │ │ │ │ +32 {}; │ │ │ │ │ +33 │ │ │ │ │ +_3_4 class _A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ +35 : public IOError │ │ │ │ │ +36 {}; │ │ │ │ │ +37 │ │ │ │ │ +38 │ │ │ │ │ 39 │ │ │ │ │ -40 │ │ │ │ │ -41 template< int dim > │ │ │ │ │ -_4_2 inline bool _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_i_s_B_o_u_n_d_a_r_y ( const int face ) const │ │ │ │ │ -43 { │ │ │ │ │ -44 return (boundaryId( face ) != _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y); │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ +40 namespace Alberta │ │ │ │ │ +41 { │ │ │ │ │ +42 │ │ │ │ │ +43 // Import Types │ │ │ │ │ +44 // ------------ │ │ │ │ │ +45 │ │ │ │ │ +_4_6 static const int _d_i_m_W_o_r_l_d = _D_I_M___O_F___W_O_R_L_D; │ │ │ │ │ 47 │ │ │ │ │ -48 template< int dim > │ │ │ │ │ -_4_9 inline int _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( const int face ) const │ │ │ │ │ -50 { │ │ │ │ │ -51 return wall_bound[ face ]; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -54 │ │ │ │ │ -55 template< int dim > │ │ │ │ │ -_5_6 const _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _> *_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( const int face ) │ │ │ │ │ -const │ │ │ │ │ -57 { │ │ │ │ │ -58 assert( (face >= 0) && (face < N_NEIGH_MAX) ); │ │ │ │ │ -59 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t * >( neigh[ face ] ); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64} │ │ │ │ │ -65 │ │ │ │ │ -66#endif // #if HAVE_ALBERTA │ │ │ │ │ +_4_8 typedef _A_L_B_E_R_T_A REAL _R_e_a_l; │ │ │ │ │ +_4_9 typedef _A_L_B_E_R_T_A REAL_B _L_o_c_a_l_V_e_c_t_o_r; // in barycentric coordinates │ │ │ │ │ +_5_0 typedef _A_L_B_E_R_T_A REAL_D _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ │ +_5_1 typedef _A_L_B_E_R_T_A REAL_DD _G_l_o_b_a_l_M_a_t_r_i_x; │ │ │ │ │ +_5_2 typedef _A_L_B_E_R_T_A AFF_TRAFO _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n; │ │ │ │ │ +_5_3 typedef _A_L_B_E_R_T_A MESH _M_e_s_h; │ │ │ │ │ +_5_4 typedef _A_L_B_E_R_T_A EL _E_l_e_m_e_n_t; │ │ │ │ │ +55 │ │ │ │ │ +_5_6 static const int _m_e_s_h_R_e_f_i_n_e_d = MESH_REFINED; │ │ │ │ │ +_5_7 static const int _m_e_s_h_C_o_a_r_s_e_n_e_d = MESH_COARSENED; │ │ │ │ │ +58 │ │ │ │ │ +_5_9 static const int _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y = INTERIOR; │ │ │ │ │ +_6_0 static const int _D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y = DIRICHLET; │ │ │ │ │ +_6_1 typedef _A_L_B_E_R_T_A BNDRY_TYPE _B_o_u_n_d_a_r_y_I_d; │ │ │ │ │ +62 │ │ │ │ │ +_6_3 typedef U_CHAR _E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ +64 │ │ │ │ │ +_6_5 typedef _A_L_B_E_R_T_A FE_SPACE _D_o_f_S_p_a_c_e; │ │ │ │ │ +66 │ │ │ │ │ 67 │ │ │ │ │ -68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ +68 │ │ │ │ │ +69 // Memory Manipulation Functions │ │ │ │ │ +70 // ----------------------------- │ │ │ │ │ +71 │ │ │ │ │ +72 template< class Data > │ │ │ │ │ +_7_3 inline Data *_m_e_m_A_l_l_o_c ( size_t size ) │ │ │ │ │ +74 { │ │ │ │ │ +75 return MEM_ALLOC( size, Data ); │ │ │ │ │ +76 } │ │ │ │ │ +77 │ │ │ │ │ +78 template< class Data > │ │ │ │ │ +_7_9 inline Data *_m_e_m_C_A_l_l_o_c ( size_t size ) │ │ │ │ │ +80 { │ │ │ │ │ +81 return MEM_CALLOC( size, Data ); │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +84 template< class Data > │ │ │ │ │ +_8_5 inline Data *_m_e_m_R_e_A_l_l_o_c ( Data *ptr, size_t oldSize, size_t newSize ) │ │ │ │ │ +86 { │ │ │ │ │ +87 return MEM_REALLOC( ptr, oldSize, newSize, Data ); │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +90 template< class Data > │ │ │ │ │ +_9_1 inline void _m_e_m_F_r_e_e ( Data *ptr, size_t size ) │ │ │ │ │ +92 { │ │ │ │ │ +93 return MEM_FREE( ptr, size, Data ); │ │ │ │ │ +94 } │ │ │ │ │ +95 │ │ │ │ │ +96 │ │ │ │ │ +97 │ │ │ │ │ +98 // GlobalSpace │ │ │ │ │ +99 // ----------- │ │ │ │ │ +100 │ │ │ │ │ +_1_0_1 class _G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ +102 { │ │ │ │ │ +103 typedef _G_l_o_b_a_l_S_p_a_c_e _T_h_i_s; │ │ │ │ │ +104 │ │ │ │ │ +105 public: │ │ │ │ │ +_1_0_6 typedef _G_l_o_b_a_l_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ +_1_0_7 typedef _G_l_o_b_a_l_V_e_c_t_o_r _V_e_c_t_o_r; │ │ │ │ │ +108 │ │ │ │ │ +109 private: │ │ │ │ │ +110 _M_a_t_r_i_x identityMatrix_; │ │ │ │ │ +111 _V_e_c_t_o_r nullVector_; │ │ │ │ │ +112 │ │ │ │ │ +113 _G_l_o_b_a_l_S_p_a_c_e () │ │ │ │ │ +114 { │ │ │ │ │ +115 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ +116 { │ │ │ │ │ +117 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ +118 identityMatrix_[ i ][ j ] = _R_e_a_l( 0 ); │ │ │ │ │ +119 identityMatrix_[ i ][ i ] = _R_e_a_l( 1 ); │ │ │ │ │ +120 nullVector_[ i ] = _R_e_a_l( 0 ); │ │ │ │ │ +121 } │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +124 static This &instance () │ │ │ │ │ +125 { │ │ │ │ │ +126 static This theInstance; │ │ │ │ │ +127 return theInstance; │ │ │ │ │ +128 } │ │ │ │ │ +129 │ │ │ │ │ +130 public: │ │ │ │ │ +_1_3_1 static const _M_a_t_r_i_x &_i_d_e_n_t_i_t_y_M_a_t_r_i_x () │ │ │ │ │ +132 { │ │ │ │ │ +133 return instance().identityMatrix_; │ │ │ │ │ +134 } │ │ │ │ │ +135 │ │ │ │ │ +_1_3_6 static const _V_e_c_t_o_r &_n_u_l_l_V_e_c_t_o_r () │ │ │ │ │ +137 { │ │ │ │ │ +138 return instance().nullVector_; │ │ │ │ │ +139 } │ │ │ │ │ +140 }; │ │ │ │ │ +141 │ │ │ │ │ +142 │ │ │ │ │ +143 │ │ │ │ │ +144 // NumSubEntities │ │ │ │ │ +145 // -------------- │ │ │ │ │ +146 │ │ │ │ │ +147 template< int dim, int codim > │ │ │ │ │ +_1_4_8 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ │ +149 │ │ │ │ │ +150 template< int dim > │ │ │ │ │ +_1_5_1 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, 0 > │ │ │ │ │ +152 { │ │ │ │ │ +_1_5_3 static const int value = 1; │ │ │ │ │ +154 }; │ │ │ │ │ +155 │ │ │ │ │ +156 template< int dim > │ │ │ │ │ +_1_5_7 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim > │ │ │ │ │ +158 { │ │ │ │ │ +_1_5_9 static const int value = dim+1; │ │ │ │ │ +160 }; │ │ │ │ │ +161 │ │ │ │ │ +162 template<> │ │ │ │ │ +_1_6_3 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 0, 0 > │ │ │ │ │ +164 { │ │ │ │ │ +_1_6_5 static const int value = 1; │ │ │ │ │ +166 }; │ │ │ │ │ +167 │ │ │ │ │ +168 template<> │ │ │ │ │ +_1_6_9 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 2, 1 > │ │ │ │ │ +170 { │ │ │ │ │ +_1_7_1 static const int value = 3; │ │ │ │ │ +172 }; │ │ │ │ │ +173 │ │ │ │ │ +174 template<> │ │ │ │ │ +_1_7_5 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 3, 1 > │ │ │ │ │ +176 { │ │ │ │ │ +_1_7_7 static const int value = 4; │ │ │ │ │ +178 }; │ │ │ │ │ +179 │ │ │ │ │ +180 template<> │ │ │ │ │ +_1_8_1 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 3, 2 > │ │ │ │ │ +182 { │ │ │ │ │ +_1_8_3 static const int value = 6; │ │ │ │ │ +184 }; │ │ │ │ │ +185 │ │ │ │ │ +186 │ │ │ │ │ +187 │ │ │ │ │ +188 // CodimType │ │ │ │ │ +189 // --------- │ │ │ │ │ +190 │ │ │ │ │ +191 template< int dim, int codim > │ │ │ │ │ +_1_9_2 struct _C_o_d_i_m_T_y_p_e; │ │ │ │ │ +193 │ │ │ │ │ +194 template< int dim > │ │ │ │ │ +_1_9_5 struct _C_o_d_i_m_T_y_p_e< dim, 0 > │ │ │ │ │ +196 { │ │ │ │ │ +_1_9_7 static const int value = CENTER; │ │ │ │ │ +198 }; │ │ │ │ │ +199 │ │ │ │ │ +200 template< int dim > │ │ │ │ │ +_2_0_1 struct _C_o_d_i_m_T_y_p_e< dim, dim > │ │ │ │ │ +202 { │ │ │ │ │ +_2_0_3 static const int value = VERTEX; │ │ │ │ │ +204 }; │ │ │ │ │ +205 │ │ │ │ │ +206 template<> │ │ │ │ │ +_2_0_7 struct _C_o_d_i_m_T_y_p_e< 2, 1 > │ │ │ │ │ +208 { │ │ │ │ │ +_2_0_9 static const int value = EDGE; │ │ │ │ │ +210 }; │ │ │ │ │ +211 │ │ │ │ │ +212 template<> │ │ │ │ │ +_2_1_3 struct _C_o_d_i_m_T_y_p_e< 3, 1 > │ │ │ │ │ +214 { │ │ │ │ │ +_2_1_5 static const int value = FACE; │ │ │ │ │ +216 }; │ │ │ │ │ +217 │ │ │ │ │ +218 template<> │ │ │ │ │ +_2_1_9 struct _C_o_d_i_m_T_y_p_e< 3, 2 > │ │ │ │ │ +220 { │ │ │ │ │ +_2_2_1 static const int value = EDGE; │ │ │ │ │ +222 }; │ │ │ │ │ +223 │ │ │ │ │ +224 │ │ │ │ │ +225 │ │ │ │ │ +226 // FillFlags │ │ │ │ │ +227 // --------- │ │ │ │ │ +228 │ │ │ │ │ +229 template< int dim > │ │ │ │ │ +_2_3_0 struct _F_i_l_l_F_l_a_g_s │ │ │ │ │ +231 { │ │ │ │ │ +_2_3_2 typedef _A_L_B_E_R_T_A FLAGS _F_l_a_g_s; │ │ │ │ │ +233 │ │ │ │ │ +_2_3_4 static const _F_l_a_g_s _n_o_t_h_i_n_g = FILL_NOTHING; │ │ │ │ │ +235 │ │ │ │ │ +_2_3_6 static const _F_l_a_g_s _c_o_o_r_d_s = FILL_COORDS; │ │ │ │ │ +237 │ │ │ │ │ +_2_3_8 static const _F_l_a_g_s _n_e_i_g_h_b_o_r = FILL_NEIGH; │ │ │ │ │ +239 │ │ │ │ │ +_2_4_0 static const _F_l_a_g_s _o_r_i_e_n_t_a_t_i_o_n = (dim == 3 ? FILL_ORIENTATION : │ │ │ │ │ +FILL_NOTHING); │ │ │ │ │ +241 │ │ │ │ │ +_2_4_2 static const _F_l_a_g_s _p_r_o_j_e_c_t_i_o_n = FILL_PROJECTION; │ │ │ │ │ +243 │ │ │ │ │ +_2_4_4 static const _F_l_a_g_s _e_l_e_m_e_n_t_T_y_p_e = FILL_NOTHING; │ │ │ │ │ +245 │ │ │ │ │ +_2_4_6 static const _F_l_a_g_s _b_o_u_n_d_a_r_y_I_d = FILL_MACRO_WALLS; │ │ │ │ │ +247 │ │ │ │ │ +_2_4_8 static const _F_l_a_g_s _n_o_n_P_e_r_i_o_d_i_c = FILL_NON_PERIODIC; │ │ │ │ │ +249 │ │ │ │ │ +_2_5_0 static const _F_l_a_g_s _a_l_l = _c_o_o_r_d_s | _n_e_i_g_h_b_o_r | _b_o_u_n_d_a_r_y_I_d | _n_o_n_P_e_r_i_o_d_i_c │ │ │ │ │ +251 | _o_r_i_e_n_t_a_t_i_o_n | _p_r_o_j_e_c_t_i_o_n | _e_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ +252 │ │ │ │ │ +_2_5_3 static const _F_l_a_g_s _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s = _a_l_l & ~nonPeriodic & ~projection; │ │ │ │ │ +254 │ │ │ │ │ +255#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +256 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s & ~coords; │ │ │ │ │ +257#else │ │ │ │ │ +_2_5_8 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s; │ │ │ │ │ +259#endif │ │ │ │ │ +260 }; │ │ │ │ │ +261 │ │ │ │ │ +262 │ │ │ │ │ +263 │ │ │ │ │ +264 // RefinementEdge │ │ │ │ │ +265 // -------------- │ │ │ │ │ +266 │ │ │ │ │ +267 template< int dim > │ │ │ │ │ +_2_6_8 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e │ │ │ │ │ +269 { │ │ │ │ │ +_2_7_0 static const int _v_a_l_u_e = 0; │ │ │ │ │ +271 }; │ │ │ │ │ +272 │ │ │ │ │ +273 template<> │ │ │ │ │ +_2_7_4 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e< 2 > │ │ │ │ │ +275 { │ │ │ │ │ +_2_7_6 static const int _v_a_l_u_e = 2; │ │ │ │ │ +277 }; │ │ │ │ │ +278 │ │ │ │ │ +279 │ │ │ │ │ +280 │ │ │ │ │ +281 // Dune2AlbertaNumbering │ │ │ │ │ +282 // --------------------- │ │ │ │ │ +283 │ │ │ │ │ +284 template< int dim, int codim > │ │ │ │ │ +_2_8_5 struct _D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ +286 { │ │ │ │ │ +_2_8_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ +288 { │ │ │ │ │ +289 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ +290 return i; │ │ │ │ │ +291 } │ │ │ │ │ +292 }; │ │ │ │ │ +293 │ │ │ │ │ +294 template<> │ │ │ │ │ +_2_9_5 struct _D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ │ +296 { │ │ │ │ │ +_2_9_7 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +298 │ │ │ │ │ +_2_9_9 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ +300 { │ │ │ │ │ +301 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ │ +302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 }; │ │ │ │ │ +303 return dune2alberta[ i ]; │ │ │ │ │ +304 } │ │ │ │ │ +305 }; │ │ │ │ │ +306 │ │ │ │ │ +307 │ │ │ │ │ +308 │ │ │ │ │ +309 // Generic2AlbertaNumbering │ │ │ │ │ +310 // ------------------------ │ │ │ │ │ +311 │ │ │ │ │ +312 template< int dim, int codim > │ │ │ │ │ +_3_1_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ +314 { │ │ │ │ │ +_3_1_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ +316 { │ │ │ │ │ +317 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ +318 return i; │ │ │ │ │ +319 } │ │ │ │ │ +320 }; │ │ │ │ │ +321 │ │ │ │ │ +322 template< int dim > │ │ │ │ │ +_3_2_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< dim, 1 > │ │ │ │ │ +324 { │ │ │ │ │ +_3_2_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ +326 { │ │ │ │ │ +327 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ +328 return dim - i; │ │ │ │ │ +329 } │ │ │ │ │ +330 }; │ │ │ │ │ +331 │ │ │ │ │ +332 template<> │ │ │ │ │ +_3_3_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 1, 1 > │ │ │ │ │ +334 { │ │ │ │ │ +_3_3_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ +336 { │ │ │ │ │ +337 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ +338 return i; │ │ │ │ │ +339 } │ │ │ │ │ +340 }; │ │ │ │ │ +341 │ │ │ │ │ +342 template<> │ │ │ │ │ +_3_4_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ │ +344 { │ │ │ │ │ +_3_4_5 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +346 │ │ │ │ │ +_3_4_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ +348 { │ │ │ │ │ +349 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ │ +350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 }; │ │ │ │ │ +351 return generic2alberta[ i ]; │ │ │ │ │ +352 } │ │ │ │ │ +353 }; │ │ │ │ │ +354 │ │ │ │ │ +355 │ │ │ │ │ +356 │ │ │ │ │ +357 // NumberingMap │ │ │ │ │ +358 // ------------ │ │ │ │ │ +359 │ │ │ │ │ +360 template< int dim, template< int, int > class Numbering = │ │ │ │ │ +Generic2AlbertaNumbering > │ │ │ │ │ +_3_6_1 class _N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ +362 { │ │ │ │ │ +363 typedef _N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> _T_h_i_s; │ │ │ │ │ +364 │ │ │ │ │ +365 template< int codim > │ │ │ │ │ +366 struct Initialize; │ │ │ │ │ +367 │ │ │ │ │ +368 int *dune2alberta_[ dim+1 ]; │ │ │ │ │ +369 int *alberta2dune_[ dim+1 ]; │ │ │ │ │ +370 int numSubEntities_[ dim+1 ]; │ │ │ │ │ +371 │ │ │ │ │ +372 _N_u_m_b_e_r_i_n_g_M_a_p ( const _T_h_i_s & ); │ │ │ │ │ +373 _T_h_i_s &operator= ( const _T_h_i_s & ); │ │ │ │ │ +374 │ │ │ │ │ +375 public: │ │ │ │ │ +_3_7_6 _N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ │ +377 { │ │ │ │ │ +378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ +{ Initialize< i >::apply( *this ); } ); │ │ │ │ │ +379 } │ │ │ │ │ +380 │ │ │ │ │ +_3_8_1 _~_N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ │ +382 { │ │ │ │ │ +383 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ │ +384 { │ │ │ │ │ +385 delete[]( dune2alberta_[ codim ] ); │ │ │ │ │ +386 delete[]( alberta2dune_[ codim ] ); │ │ │ │ │ +387 } │ │ │ │ │ +388 } │ │ │ │ │ +389 │ │ │ │ │ +_3_9_0 int _d_u_n_e_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ │ +391 { │ │ │ │ │ +392 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ │ +393 assert( (i >= 0) && (i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s( codim )) ); │ │ │ │ │ +394 return dune2alberta_[ codim ][ i ]; │ │ │ │ │ +395 } │ │ │ │ │ +396 │ │ │ │ │ +_3_9_7 int _a_l_b_e_r_t_a_2_d_u_n_e ( int codim, int i ) const │ │ │ │ │ +398 { │ │ │ │ │ +399 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ │ +400 assert( (i >= 0) && (i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s( codim )) ); │ │ │ │ │ +401 return alberta2dune_[ codim ][ i ]; │ │ │ │ │ +402 } │ │ │ │ │ +403 │ │ │ │ │ +_4_0_4 int _n_u_m_S_u_b_E_n_t_i_t_i_e_s ( int codim ) const │ │ │ │ │ +405 { │ │ │ │ │ +406 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ │ +407 return numSubEntities_[ codim ]; │ │ │ │ │ +408 } │ │ │ │ │ +409 }; │ │ │ │ │ +410 │ │ │ │ │ +411 │ │ │ │ │ +412 │ │ │ │ │ +413 // NumberingMap::Initialize │ │ │ │ │ +414 // ------------------------ │ │ │ │ │ +415 │ │ │ │ │ +416 template< int dim, template< int, int > class Numbering > │ │ │ │ │ +417 template< int codim > │ │ │ │ │ +418 struct NumberingMap< dim, Numbering >::Initialize │ │ │ │ │ +419 { │ │ │ │ │ +420 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = NumSubEntities< dim, codim >::value; │ │ │ │ │ +421 │ │ │ │ │ +422 static void apply ( NumberingMap< dim, Numbering > &map ) │ │ │ │ │ +423 { │ │ │ │ │ +424 map.numSubEntities_[ codim ] = _n_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ │ +425 map.dune2alberta_[ codim ] = new int[ _n_u_m_S_u_b_E_n_t_i_t_i_e_s ]; │ │ │ │ │ +426 map.alberta2dune_[ codim ] = new int[ _n_u_m_S_u_b_E_n_t_i_t_i_e_s ]; │ │ │ │ │ +427 │ │ │ │ │ +428 for( int i = 0; i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s; ++i ) │ │ │ │ │ +429 { │ │ │ │ │ +430 const int j = Numbering< dim, codim >::apply( i ); │ │ │ │ │ +431 map.dune2alberta_[ codim ][ i ] = j; │ │ │ │ │ +432 map.alberta2dune_[ codim ][ j ] = i; │ │ │ │ │ +433 } │ │ │ │ │ +434 } │ │ │ │ │ +435 }; │ │ │ │ │ +436 │ │ │ │ │ +437 │ │ │ │ │ +438 │ │ │ │ │ +439 // MapVertices │ │ │ │ │ +440 // ----------- │ │ │ │ │ +441 │ │ │ │ │ +442 template< int dim, int codim > │ │ │ │ │ +_4_4_3 struct _M_a_p_V_e_r_t_i_c_e_s; │ │ │ │ │ +444 │ │ │ │ │ +445 template< int dim > │ │ │ │ │ +_4_4_6 struct _M_a_p_V_e_r_t_i_c_e_s< dim, 0 > │ │ │ │ │ +447 { │ │ │ │ │ +_4_4_8 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ +449 { │ │ │ │ │ +450 assert( subEntity == 0 ); │ │ │ │ │ +451 assert( (vertex >= 0) && (vertex <= _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ +452 return vertex; │ │ │ │ │ +453 } │ │ │ │ │ +454 }; │ │ │ │ │ +455 │ │ │ │ │ +456 template<> │ │ │ │ │ +_4_5_7 struct _M_a_p_V_e_r_t_i_c_e_s< 2, 1 > │ │ │ │ │ +458 { │ │ │ │ │ +_4_5_9 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ +460 { │ │ │ │ │ +461 assert( (subEntity >= 0) && (subEntity < 3) ); │ │ │ │ │ +462 assert( (vertex >= 0) && (vertex < 2) ); │ │ │ │ │ +463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} }; │ │ │ │ │ +464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} }; │ │ │ │ │ +465 return map[ subEntity ][ vertex ]; │ │ │ │ │ +466 } │ │ │ │ │ +467 }; │ │ │ │ │ +468 │ │ │ │ │ +469 template<> │ │ │ │ │ +_4_7_0 struct _M_a_p_V_e_r_t_i_c_e_s< 3, 1 > │ │ │ │ │ +471 { │ │ │ │ │ +_4_7_2 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ +473 { │ │ │ │ │ +474 assert( (subEntity >= 0) && (subEntity < 4) ); │ │ │ │ │ +475 assert( (vertex >= 0) && (vertex < 3) ); │ │ │ │ │ +476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} }; │ │ │ │ │ +477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} }; │ │ │ │ │ +478 return map[ subEntity ][ vertex ]; │ │ │ │ │ +479 } │ │ │ │ │ +480 }; │ │ │ │ │ +481 │ │ │ │ │ +482 template<> │ │ │ │ │ +_4_8_3 struct _M_a_p_V_e_r_t_i_c_e_s< 3, 2 > │ │ │ │ │ +484 { │ │ │ │ │ +_4_8_5 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ +486 { │ │ │ │ │ +487 assert( (subEntity >= 0) && (subEntity < 6) ); │ │ │ │ │ +488 assert( (vertex >= 0) && (vertex < 2) ); │ │ │ │ │ +489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} │ │ │ │ │ +}; │ │ │ │ │ +490 return map[ subEntity ][ vertex ]; │ │ │ │ │ +491 } │ │ │ │ │ +492 }; │ │ │ │ │ +493 │ │ │ │ │ +494 template< int dim > │ │ │ │ │ +_4_9_5 struct _M_a_p_V_e_r_t_i_c_e_s< dim, dim > │ │ │ │ │ +496 { │ │ │ │ │ +_4_9_7 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ +498 { │ │ │ │ │ +499 assert( (subEntity >= 0) && (subEntity < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) │ │ │ │ │ +); │ │ │ │ │ +500 assert( vertex == 0 ); │ │ │ │ │ +501 return subEntity; │ │ │ │ │ +502 } │ │ │ │ │ +503 }; │ │ │ │ │ +504 │ │ │ │ │ +505 │ │ │ │ │ +506 │ │ │ │ │ +507 // Twist │ │ │ │ │ +508 // ----- │ │ │ │ │ +509 │ │ │ │ │ +510 // ****************************************************************** │ │ │ │ │ +511 // Meaning of the twist (same as in ALU) │ │ │ │ │ +512 // ------------------------------------- │ │ │ │ │ +513 // │ │ │ │ │ +514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face │ │ │ │ │ +515 // (here, we assume their indices to be increasing). Denote by k the │ │ │ │ │ +516 // local number of a vertex v within the element and by t the twist. │ │ │ │ │ +517 // Then, v = v_j, where j is computed by the following formula: │ │ │ │ │ +518 // │ │ │ │ │ +519 // / (2n + 1 - k + t) % n, if t < 0 │ │ │ │ │ +520 // j = < │ │ │ │ │ +521 // \ (k + t) % n, if t >= 0 │ │ │ │ │ +522 // │ │ │ │ │ +523 // Note: We use the order of the 0-th vertex dof to assign the twist. │ │ │ │ │ +524 // This is ok for two reasons: │ │ │ │ │ +525 // - ALBERTA preserves the relative order of the dofs during │ │ │ │ │ +526 // dof compression. │ │ │ │ │ +527 // - ALBERTA enforces the first vertex dof admin to be periodic. │ │ │ │ │ +528 // ****************************************************************** │ │ │ │ │ +529 │ │ │ │ │ +530 template< int dim, int subdim > │ │ │ │ │ +_5_3_1 struct _T_w_i_s_t │ │ │ │ │ +532 { │ │ │ │ │ +_5_3_3 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-subdim >::value; │ │ │ │ │ +534 │ │ │ │ │ +_5_3_5 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ +_5_3_6 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ │ +537 │ │ │ │ │ +_5_3_8 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ │ +539 [[maybe_unused]] int subEntity ) │ │ │ │ │ +540 { │ │ │ │ │ +541 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ │ +542 return 0; │ │ │ │ │ +543 } │ │ │ │ │ +544 }; │ │ │ │ │ +545 │ │ │ │ │ +546 template< int dim > │ │ │ │ │ +_5_4_7 struct _T_w_i_s_t< dim, 1 > │ │ │ │ │ +548 { │ │ │ │ │ +_5_4_9 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-1 >::value; │ │ │ │ │ +550 │ │ │ │ │ +_5_5_1 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ +_5_5_2 static const int _m_a_x_T_w_i_s_t = 1; │ │ │ │ │ +553 │ │ │ │ │ +_5_5_4 static int _t_w_i_s_t ( const _E_l_e_m_e_n_t *element, int subEntity ) │ │ │ │ │ +555 { │ │ │ │ │ +556 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ │ +557 const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +558 int dof[ numVertices ]; │ │ │ │ │ +559 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ +560 { │ │ │ │ │ +561 const int j = _M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_-_1_ _>_:_:_a_p_p_l_y( subEntity, i ); │ │ │ │ │ +562 dof[ i ] = element->dof[ j ][ 0 ]; │ │ │ │ │ +563 } │ │ │ │ │ +564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1); │ │ │ │ │ +565 } │ │ │ │ │ +566 }; │ │ │ │ │ +567 │ │ │ │ │ +568 │ │ │ │ │ +569 template<> │ │ │ │ │ +_5_7_0 struct _T_w_i_s_t< 1, 1 > │ │ │ │ │ +571 { │ │ │ │ │ +_5_7_2 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ +_5_7_3 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ │ +574 │ │ │ │ │ +_5_7_5 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ │ +576 [[maybe_unused]] int subEntity ) │ │ │ │ │ +577 { │ │ │ │ │ +578 assert( subEntity == 0 ); │ │ │ │ │ +579 return 0; │ │ │ │ │ +580 } │ │ │ │ │ +581 }; │ │ │ │ │ +582 │ │ │ │ │ +583 │ │ │ │ │ +584 template< int dim > │ │ │ │ │ +_5_8_5 struct _T_w_i_s_t< dim, 2 > │ │ │ │ │ +586 { │ │ │ │ │ +_5_8_7 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-2 >::value; │ │ │ │ │ +588 │ │ │ │ │ +_5_8_9 static const int _m_i_n_T_w_i_s_t = -3; │ │ │ │ │ +_5_9_0 static const int _m_a_x_T_w_i_s_t = 2; │ │ │ │ │ +591 │ │ │ │ │ +_5_9_2 static int _t_w_i_s_t ( const _E_l_e_m_e_n_t *element, int subEntity ) │ │ │ │ │ +593 { │ │ │ │ │ +594 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ │ +595 const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _2_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +596 int dof[ numVertices ]; │ │ │ │ │ +597 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ +598 { │ │ │ │ │ +599 const int j = _M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_-_2_ _>_:_:_a_p_p_l_y( subEntity, i ); │ │ │ │ │ +600 dof[ i ] = element->dof[ j ][ 0 ]; │ │ │ │ │ +601 } │ │ │ │ │ +602 │ │ │ │ │ +603 const int _t_w_i_s_t[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 }; │ │ │ │ │ +604 const int k = int( dof[ 0 ] < dof[ 1 ] ) │ │ │ │ │ +605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1) │ │ │ │ │ +606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2); │ │ │ │ │ +607 assert( _t_w_i_s_t[ k ] != 666 ); │ │ │ │ │ +608 return _t_w_i_s_t[ k ]; │ │ │ │ │ +609 } │ │ │ │ │ +610 }; │ │ │ │ │ +611 │ │ │ │ │ +612 │ │ │ │ │ +613 template<> │ │ │ │ │ +_6_1_4 struct _T_w_i_s_t< 2, 2 > │ │ │ │ │ +615 { │ │ │ │ │ +_6_1_6 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ +_6_1_7 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ │ +618 │ │ │ │ │ +_6_1_9 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ │ +620 [[maybe_unused]] int subEntity ) │ │ │ │ │ +621 { │ │ │ │ │ +622 assert( subEntity == 0 ); │ │ │ │ │ +623 return 0; │ │ │ │ │ +624 } │ │ │ │ │ +625 }; │ │ │ │ │ +626 │ │ │ │ │ +627 │ │ │ │ │ +628 │ │ │ │ │ +629 template< int dim > │ │ │ │ │ +_6_3_0 inline int _a_p_p_l_y_T_w_i_s_t ( int twist, int i ) │ │ │ │ │ +631 { │ │ │ │ │ +632 const int numCorners = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % │ │ │ │ │ +numCorners; │ │ │ │ │ +634 } │ │ │ │ │ +635 │ │ │ │ │ +636 template< int dim > │ │ │ │ │ +_6_3_7 inline int _a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t ( int twist, int i ) │ │ │ │ │ +638 { │ │ │ │ │ +639 const int numCorners = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - │ │ │ │ │ +twist) % numCorners; │ │ │ │ │ +641 } │ │ │ │ │ +642 │ │ │ │ │ +643 } │ │ │ │ │ +644 │ │ │ │ │ +645} │ │ │ │ │ +646 │ │ │ │ │ +647#endif // #if HAVE_ALBERTA │ │ │ │ │ +648 │ │ │ │ │ +649#endif // #ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ │ +_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ +_D_I_M___O_F___W_O_R_L_D │ │ │ │ │ +#define DIM_OF_WORLD │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:23 │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t │ │ │ │ │ +int applyInverseTwist(int twist, int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:637 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ +ALBERTA MESH Mesh │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_T_w_i_s_t │ │ │ │ │ +int applyTwist(int twist, int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:630 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_F_r_e_e │ │ │ │ │ +void memFree(Data *ptr, size_t size) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ │ +ALBERTA REAL_DD GlobalMatrix │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_B LocalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +ALBERTA EL Element │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ │ +ALBERTA BNDRY_TYPE BoundaryId │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:61 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y │ │ │ │ │ static const int InteriorBoundary │ │ │ │ │ DDeeffiinniittiioonn misc.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d │ │ │ │ │ +static const int meshRefined │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_A_l_l_o_c │ │ │ │ │ +Data * memAlloc(size_t size) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c │ │ │ │ │ +Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ +static const int DirichletBoundary │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ +ALBERTA FE_SPACE DofSpace │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_C_A_l_l_o_c │ │ │ │ │ +Data * memCAlloc(size_t size) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ +U_CHAR ElementType │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d │ │ │ │ │ +static const int meshCoarsened │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:57 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ -bool isBoundary(const int face) const │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -const MacroElement< dim > * neighbor(const int face) const │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const int face) const │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -const GlobalVector & coordinate(const int vertex) const │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_i_d_e_n_t_i_t_y_M_a_t_r_i_x │ │ │ │ │ +static const Matrix & identityMatrix() │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_n_u_l_l_V_e_c_t_o_r │ │ │ │ │ +static const Vector & nullVector() │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x │ │ │ │ │ +GlobalMatrix Matrix │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r │ │ │ │ │ +GlobalVector Vector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ +static const Flags nothing │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_n_P_e_r_i_o_d_i_c │ │ │ │ │ +static const Flags nonPeriodic │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:248 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +static const Flags boundaryId │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_e_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ +static const Flags elementType │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:244 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ +ALBERTA FLAGS Flags │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_p_r_o_j_e_c_t_i_o_n │ │ │ │ │ +static const Flags projection │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:242 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s │ │ │ │ │ +static const Flags coords │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_o_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ +static const Flags orientation │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ │ +static const Flags standard │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:258 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +static const Flags neighbor │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_a_l_l │ │ │ │ │ +static const Flags all │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:250 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s │ │ │ │ │ +static const Flags standardWithCoords │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:269 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_:_:_v_a_l_u_e │ │ │ │ │ +static const int value │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:270 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:286 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(const int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(const int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(const int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:315 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(const int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:325 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _1_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(const int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(const int i) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:347 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:362 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_a_l_b_e_r_t_a_2_d_u_n_e │ │ │ │ │ +int alberta2dune(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:397 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +int numSubEntities(int codim) const │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:404 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_d_u_n_e_2_a_l_b_e_r_t_a │ │ │ │ │ +int dune2alberta(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_~_N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ +~NumberingMap() │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:381 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ +NumberingMap() │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:376 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:443 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _0_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(int subEntity, int vertex) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:448 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _2_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(int subEntity, int vertex) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:459 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(int subEntity, int vertex) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:472 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(int subEntity, int vertex) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:485 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static int apply(int subEntity, int vertex) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:497 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:532 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_m_a_x_T_w_i_s_t │ │ │ │ │ +static const int maxTwist │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:536 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_m_i_n_T_w_i_s_t │ │ │ │ │ +static const int minTwist │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:535 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_t_w_i_s_t │ │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:538 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +static const int numSubEntities │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:533 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _1_ _>_:_:_t_w_i_s_t │ │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:554 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _1_,_ _1_ _>_:_:_t_w_i_s_t │ │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:575 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _2_ _>_:_:_t_w_i_s_t │ │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:592 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _2_,_ _2_ _>_:_:_t_w_i_s_t │ │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:619 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometrycache.hh File Reference │ │ │ │ +dune-grid: dofvector.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,37 +71,58 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
geometrycache.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
dofvector.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │ +
#include <cstdlib>
│ │ │ │ +#include <limits>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/refinement.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Alberta::GeometryCache< dim >
struct  Dune::Alberta::DofVectorProvider< int >
 
struct  Dune::Alberta::GeometryCacheProxy< dim >
struct  Dune::Alberta::DofVectorProvider< signed char >
 
struct  Dune::Alberta::DofVectorProvider< unsigned char >
 
struct  Dune::Alberta::DofVectorProvider< Real >
 
struct  Dune::Alberta::DofVectorProvider< GlobalVector >
 
class  Dune::Alberta::DofVectorPointer< Dof >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

void Dune::Alberta::abs (const DofVectorPointer< int > &dofVector)
 
int Dune::Alberta::max (const DofVectorPointer< int > &dofVector)
 
int Dune::Alberta::min (const DofVectorPointer< int > &dofVector)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,43 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -geometrycache.hh File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +dofvector.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_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_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_<_ _d_i_m_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _D_o_f_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +void  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s (const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r< int > &dofVector) │ │ │ │ │ +  │ │ │ │ │ + int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_a_x (const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r< int > &dofVector) │ │ │ │ │ +  │ │ │ │ │ + int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_i_n (const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r< int > &dofVector) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometrycache.hh Source File │ │ │ │ +dune-grid: dofvector.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,187 +74,532 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
geometrycache.hh
│ │ │ │ +
dofvector.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │ -
6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <cstdlib>
│ │ │ │ +
9#include <limits>
│ │ │ │
10
│ │ │ │ -
11#if HAVE_ALBERTA
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 namespace Alberta
│ │ │ │ -
17 {
│ │ │ │ -
18
│ │ │ │ -
19 // GeometryCache
│ │ │ │ -
20 // -------------
│ │ │ │ -
21
│ │ │ │ -
22 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 static const unsigned int flagIntegrationElement = (1 << 0);
│ │ │ │ -
26 static const unsigned int flagJacobianTransposed = (1 << 1);
│ │ │ │ -
27 static const unsigned int flagJacobianInverseTransposed = (1 << 2);
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#if HAVE_ALBERTA
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 namespace Alberta
│ │ │ │ +
21 {
│ │ │ │ +
22
│ │ │ │ +
23 // External Forward Declarations
│ │ │ │ +
24 // -----------------------------
│ │ │ │ +
25
│ │ │ │ +
26 template< int dim >
│ │ │ │ +
27 class MeshPointer;
│ │ │ │
28
│ │ │ │ -
29 public:
│ │ │ │ -
30 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
│ │ │ │ -
31 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 : flags_( 0 )
│ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ +
29
│ │ │ │ +
30
│ │ │ │ +
31 // DofVectorProvider
│ │ │ │ +
32 // -----------------
│ │ │ │ +
33
│ │ │ │ +
34 template< class Dof >
│ │ │ │ + │ │ │ │
36
│ │ │ │ -
│ │ │ │ -
37 const Real &integrationElement ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ -
38 {
│ │ │ │ -
39 if( (flags_ & flagIntegrationElement) == 0 )
│ │ │ │ -
40 {
│ │ │ │ -
41 integrationElement_ = std::abs( determinant( jacobianTransposed( elInfo ) ) );
│ │ │ │ -
42 assert( integrationElement_ > 1e-14 );
│ │ │ │ -
43 flags_ |= flagIntegrationElement;
│ │ │ │ -
44 }
│ │ │ │ -
45 return integrationElement_;
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 const JacobianTransposed &jacobianTransposed ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ -
49 {
│ │ │ │ -
50 if( (flags_ & flagJacobianTransposed) == 0 )
│ │ │ │ -
51 {
│ │ │ │ -
52 assert( (elInfo.fill_flag & FillFlags< dim >::coords) != 0 );
│ │ │ │ -
53 const GlobalVector &x = elInfo.coord[ 0 ];
│ │ │ │ -
54 for( int i = 0; i < dim; ++i )
│ │ │ │ -
55 {
│ │ │ │ -
56 const GlobalVector &y = elInfo.coord[ i+1 ];
│ │ │ │ -
57 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ -
58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ];
│ │ │ │ -
59 }
│ │ │ │ -
60 flags_ |= flagJacobianTransposed;
│ │ │ │ -
61 }
│ │ │ │ -
62 return jacobianTransposed_;
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
66 jacobianInverseTransposed ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ -
67 {
│ │ │ │ -
68 if( (flags_ & flagJacobianInverseTransposed) == 0 )
│ │ │ │ -
69 {
│ │ │ │ -
70 integrationElement_ = std::abs( invert( jacobianTransposed( elInfo ), jacobianInverseTransposed_ ) );
│ │ │ │ -
71 assert( integrationElement_ > 1e-14 );
│ │ │ │ -
72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed;
│ │ │ │ -
73 }
│ │ │ │ -
74 return jacobianInverseTransposed_;
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
77 private:
│ │ │ │ -
78 unsigned int flags_;
│ │ │ │ -
79 Real integrationElement_;
│ │ │ │ -
80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_;
│ │ │ │ -
81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_;
│ │ │ │ -
82 };
│ │ │ │ +
37 template<>
│ │ │ │ +
│ │ │ │ +
38 struct DofVectorProvider< int >
│ │ │ │ +
39 {
│ │ │ │ +
40 typedef ALBERTA DOF_INT_VEC DofVector;
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ +
43 {
│ │ │ │ +
44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
│ │ │ │ +
47 static void free ( DofVector *dofVector )
│ │ │ │ +
48 {
│ │ │ │ +
49 ALBERTA free_dof_int_vec( dofVector );
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ +
52 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ +
53 {
│ │ │ │ +
54 return ALBERTA read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
│ │ │ │ +
57 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ +
58 {
│ │ │ │ +
59 int success = ALBERTA write_dof_int_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ +
60 return (success == 0);
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62 };
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64 template<>
│ │ │ │ +
│ │ │ │ +
65 struct DofVectorProvider< signed char >
│ │ │ │ +
66 {
│ │ │ │ +
67 typedef ALBERTA DOF_SCHAR_VEC DofVector;
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ +
69 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ +
70 {
│ │ │ │ +
71 return ALBERTA get_dof_schar_vec( name.c_str(), dofSpace );
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
74 static void free ( DofVector *dofVector )
│ │ │ │ +
75 {
│ │ │ │ +
76 ALBERTA free_dof_schar_vec( dofVector );
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ +
79 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ +
80 {
│ │ │ │ +
81 return ALBERTA read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ +
82 }
│ │ │ │
│ │ │ │
83
│ │ │ │ -
84
│ │ │ │ -
85
│ │ │ │ -
86 // GeometryCacheProxy
│ │ │ │ -
87 // ------------------
│ │ │ │ -
88
│ │ │ │ -
89 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 {
│ │ │ │ -
92 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
│ │ │ │ -
93 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
│ │ │ │ -
94
│ │ │ │ -
│ │ │ │ -
95 GeometryCacheProxy ( GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo )
│ │ │ │ -
96 : geometryCache_( geometryCache ),
│ │ │ │ -
97 elInfo_( elInfo )
│ │ │ │ -
98 {}
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
101 {
│ │ │ │ -
102 return geometryCache_.integrationElement( elInfo_ );
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
106 {
│ │ │ │ -
107 return geometryCache_.jacobianTransposed( elInfo_ );
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 {
│ │ │ │ -
112 return geometryCache_.jacobianInverseTransposed( elInfo_ );
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
115 private:
│ │ │ │ -
116 GeometryCache< dim > &geometryCache_;
│ │ │ │ -
117 const ALBERTA EL_INFO &elInfo_;
│ │ │ │ -
118 };
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120 } // namespace Alberta
│ │ │ │ -
121
│ │ │ │ -
122} // namespace Dune
│ │ │ │ -
123
│ │ │ │ -
124#endif // #if HAVE_ALBERTA
│ │ │ │ -
125
│ │ │ │ -
126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
│ │ │ │ +
84 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ +
85 {
│ │ │ │ +
86 int success = ALBERTA write_dof_schar_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ +
87 return (success == 0);
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ +
89 };
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
91 template<>
│ │ │ │ +
│ │ │ │ +
92 struct DofVectorProvider< unsigned char >
│ │ │ │ +
93 {
│ │ │ │ +
94 typedef ALBERTA DOF_UCHAR_VEC DofVector;
│ │ │ │ +
95
│ │ │ │ +
│ │ │ │ +
96 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ +
97 {
│ │ │ │ +
98 return ALBERTA get_dof_uchar_vec( name.c_str(), dofSpace );
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
101 static void free ( DofVector *dofVector )
│ │ │ │ +
102 {
│ │ │ │ +
103 ALBERTA free_dof_uchar_vec( dofVector );
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
106 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ +
107 {
│ │ │ │ +
108 return ALBERTA read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
111 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ +
112 {
│ │ │ │ +
113 int success = ALBERTA write_dof_uchar_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ +
114 return (success == 0);
│ │ │ │ +
115 }
│ │ │ │ +
│ │ │ │ +
116 };
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
118 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
120 {
│ │ │ │ +
121 typedef ALBERTA DOF_REAL_VEC DofVector;
│ │ │ │ +
122
│ │ │ │ +
│ │ │ │ +
123 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ +
124 {
│ │ │ │ +
125 return ALBERTA get_dof_real_vec( name.c_str(), dofSpace );
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
│ │ │ │ +
128 static void free ( DofVector *dofVector )
│ │ │ │ +
129 {
│ │ │ │ +
130 ALBERTA free_dof_real_vec( dofVector );
│ │ │ │ +
131 }
│ │ │ │ +
│ │ │ │ +
132
│ │ │ │ +
│ │ │ │ +
133 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ +
134 {
│ │ │ │ +
135 return ALBERTA read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ +
136 }
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
│ │ │ │ +
138 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ +
139 {
│ │ │ │ +
140 int success = ALBERTA write_dof_real_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ +
141 return (success == 0);
│ │ │ │ +
142 }
│ │ │ │ +
│ │ │ │ +
143 };
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
145 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
147 {
│ │ │ │ +
148 typedef ALBERTA DOF_REAL_D_VEC DofVector;
│ │ │ │ +
149
│ │ │ │ +
│ │ │ │ +
150 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ +
151 {
│ │ │ │ +
152 return ALBERTA get_dof_real_d_vec( name.c_str(), dofSpace );
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154
│ │ │ │ +
│ │ │ │ +
155 static void free ( DofVector *dofVector )
│ │ │ │ +
156 {
│ │ │ │ +
157 ALBERTA free_dof_real_d_vec( dofVector );
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ +
160 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ +
161 {
│ │ │ │ +
162 return ALBERTA read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │ +
164
│ │ │ │ +
│ │ │ │ +
165 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ +
166 {
│ │ │ │ +
167 int success = ALBERTA write_dof_real_d_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ +
168 return (success == 0);
│ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │ +
170 };
│ │ │ │ +
│ │ │ │ +
171
│ │ │ │ +
172
│ │ │ │ +
173
│ │ │ │ +
174 // DofVectorPointer
│ │ │ │ +
175 // ----------------
│ │ │ │ +
176
│ │ │ │ +
177 template< class Dof >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
179 {
│ │ │ │ + │ │ │ │ +
181
│ │ │ │ + │ │ │ │ +
183
│ │ │ │ +
184 public:
│ │ │ │ +
185 typedef typename DofVectorProvider::DofVector DofVector;
│ │ │ │ +
186
│ │ │ │ +
187 static const bool supportsAdaptationData = true;
│ │ │ │ +
188
│ │ │ │ +
189 private:
│ │ │ │ +
190 DofVector *dofVector_;
│ │ │ │ +
191
│ │ │ │ +
192 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
194 : dofVector_( NULL )
│ │ │ │ +
195 {}
│ │ │ │ +
│ │ │ │ +
196
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
198 const std::string &name = "" )
│ │ │ │ +
199 : dofVector_ ( DofVectorProvider::get( dofSpace, name ) )
│ │ │ │ +
200 {}
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
│ │ │ │ +
202 explicit DofVectorPointer ( DofVector *dofVector )
│ │ │ │ +
203 : dofVector_( dofVector )
│ │ │ │ +
204 {}
│ │ │ │ +
│ │ │ │ +
205
│ │ │ │ +
│ │ │ │ +
206 explicit operator bool () const
│ │ │ │ +
207 {
│ │ │ │ +
208 return (bool)dofVector_;
│ │ │ │ +
209 }
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
│ │ │ │ +
211 operator DofVector * () const
│ │ │ │ +
212 {
│ │ │ │ +
213 return dofVector_;
│ │ │ │ +
214 }
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
│ │ │ │ +
216 operator Dof * () const
│ │ │ │ +
217 {
│ │ │ │ +
218 Dof *ptr = NULL;
│ │ │ │ +
219 GET_DOF_VEC( ptr, dofVector_ );
│ │ │ │ +
220 return ptr;
│ │ │ │ +
221 }
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
│ │ │ │ +
223 const DofSpace *dofSpace () const
│ │ │ │ +
224 {
│ │ │ │ +
225 return dofVector_->fe_space;
│ │ │ │ +
226 }
│ │ │ │ +
│ │ │ │ +
227
│ │ │ │ +
│ │ │ │ +
228 std::string name () const
│ │ │ │ +
229 {
│ │ │ │ +
230 if( dofVector_ )
│ │ │ │ +
231 return dofVector_->name;
│ │ │ │ +
232 else
│ │ │ │ +
233 return std::string();
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
│ │ │ │ +
236 void create ( const DofSpace *dofSpace, const std::string &name = "" )
│ │ │ │ +
237 {
│ │ │ │ +
238 release();
│ │ │ │ +
239 dofVector_ = DofVectorProvider::get( dofSpace, name );
│ │ │ │ +
240 }
│ │ │ │ +
│ │ │ │ +
241
│ │ │ │ +
242 template< int dim >
│ │ │ │ +
│ │ │ │ +
243 void read ( const std::string &filename, const MeshPointer< dim > &meshPointer )
│ │ │ │ +
244 {
│ │ │ │ +
245 release();
│ │ │ │ +
246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL );
│ │ │ │ +
247 }
│ │ │ │ +
│ │ │ │ +
248
│ │ │ │ +
│ │ │ │ +
249 bool write ( const std::string &filename ) const
│ │ │ │ +
250 {
│ │ │ │ +
251 return DofVectorProvider::write( dofVector_, filename );
│ │ │ │ +
252 }
│ │ │ │ +
│ │ │ │ +
253
│ │ │ │ +
│ │ │ │ +
254 void release ()
│ │ │ │ +
255 {
│ │ │ │ +
256 if( dofVector_ )
│ │ │ │ +
257 {
│ │ │ │ +
258 DofVectorProvider::free( dofVector_ );
│ │ │ │ +
259 dofVector_ = NULL;
│ │ │ │ +
260 }
│ │ │ │ +
261 }
│ │ │ │ +
│ │ │ │ +
262
│ │ │ │ +
263 template< class Functor >
│ │ │ │ +
│ │ │ │ +
264 void forEach ( Functor &functor ) const
│ │ │ │ +
265 {
│ │ │ │ +
266 Dof *array = (Dof *)(*this);
│ │ │ │ +
267 FOR_ALL_DOFS( dofSpace()->admin, functor( array[ dof ] ) );
│ │ │ │ +
268 }
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
│ │ │ │ +
270 void initialize ( const Dof &value )
│ │ │ │ +
271 {
│ │ │ │ +
272 Dof *array = (Dof *)(*this);
│ │ │ │ +
273 FOR_ALL_DOFS( dofSpace()->admin, array[ dof ] = value );
│ │ │ │ +
274 }
│ │ │ │ +
│ │ │ │ +
275
│ │ │ │ +
276 template< class AdaptationData >
│ │ │ │ +
│ │ │ │ +
277 AdaptationData *getAdaptationData () const
│ │ │ │ +
278 {
│ │ │ │ +
279 assert( dofVector_ );
│ │ │ │ +
280 assert( dofVector_->user_data );
│ │ │ │ +
281 return static_cast< AdaptationData * >( dofVector_->user_data );
│ │ │ │ +
282 }
│ │ │ │ +
│ │ │ │ +
283
│ │ │ │ +
284 template< class AdaptationData >
│ │ │ │ +
│ │ │ │ +
285 void setAdaptationData ( AdaptationData *adaptationData )
│ │ │ │ +
286 {
│ │ │ │ +
287 assert( dofVector_ );
│ │ │ │ +
288 dofVector_->user_data = adaptationData;
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
290
│ │ │ │ +
291 template< class Interpolation >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
293 {
│ │ │ │ +
294 assert( dofVector_ );
│ │ │ │ +
295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >;
│ │ │ │ +
296 }
│ │ │ │ +
│ │ │ │ +
297
│ │ │ │ +
298 template< class Restriction >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
300 {
│ │ │ │ +
301 assert( dofVector_ );
│ │ │ │ +
302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >;
│ │ │ │ +
303 }
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
305 private:
│ │ │ │ +
306 template< class Interpolation >
│ │ │ │ +
307 static void refineInterpolate ( DofVector *dofVector, RC_LIST_EL *list, int n )
│ │ │ │ +
308 {
│ │ │ │ +
309 const This dofVectorPointer( dofVector );
│ │ │ │ +
310 typename Interpolation::Patch patch( list, n );
│ │ │ │ +
311 Interpolation::interpolateVector( dofVectorPointer, patch );
│ │ │ │ +
312 }
│ │ │ │ +
313
│ │ │ │ +
314 template< class Restriction >
│ │ │ │ +
315 static void coarsenRestrict ( DofVector *dofVector, RC_LIST_EL *list, int n )
│ │ │ │ +
316 {
│ │ │ │ +
317 const This dofVectorPointer( dofVector );
│ │ │ │ +
318 typename Restriction::Patch patch( list, n );
│ │ │ │ +
319 Restriction::restrictVector( dofVectorPointer, patch );
│ │ │ │ +
320 }
│ │ │ │ +
321 };
│ │ │ │ +
│ │ │ │ +
322
│ │ │ │ +
323
│ │ │ │ +
324
│ │ │ │ +
325 // Auxiliary Functions
│ │ │ │ +
326 // --------------------
│ │ │ │ +
327
│ │ │ │ +
│ │ │ │ +
328 inline void abs ( const DofVectorPointer< int > &dofVector )
│ │ │ │ +
329 {
│ │ │ │ +
330 assert( !dofVector == false );
│ │ │ │ +
331 int *array = (int *)dofVector;
│ │ │ │ +
332 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
│ │ │ │ +
333 array[ dof ] = std::abs( array[ dof ] ) );
│ │ │ │ +
334 }
│ │ │ │ +
│ │ │ │ +
335
│ │ │ │ +
336
│ │ │ │ +
│ │ │ │ +
337 inline int max ( const DofVectorPointer< int > &dofVector )
│ │ │ │ +
338 {
│ │ │ │ +
339 assert( !dofVector == false );
│ │ │ │ +
340 int *array = (int *)dofVector;
│ │ │ │ +
341 int result = std::numeric_limits< int >::min();
│ │ │ │ +
342 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
│ │ │ │ +
343 result = std::max( result, array[ dof ] ) );
│ │ │ │ +
344 return result;
│ │ │ │ +
345 }
│ │ │ │ +
│ │ │ │ +
346
│ │ │ │ +
347
│ │ │ │ +
│ │ │ │ +
348 inline int min ( const DofVectorPointer< int > &dofVector )
│ │ │ │ +
349 {
│ │ │ │ +
350 assert( !dofVector == false );
│ │ │ │ +
351 int *array = (int *)dofVector;
│ │ │ │ +
352 int result = std::numeric_limits< int >::max();
│ │ │ │ +
353 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
│ │ │ │ +
354 result = std::min( result, array[ dof ] ) );
│ │ │ │ +
355 return result;
│ │ │ │ +
356 }
│ │ │ │ +
│ │ │ │ +
357
│ │ │ │ +
358 } // namespace Alberta
│ │ │ │ +
359
│ │ │ │ +
360} // namespace Dune
│ │ │ │ +
361
│ │ │ │ +
362#endif // #if HAVE_ALBERTA
│ │ │ │ +
363
│ │ │ │ +
364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ +
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ +
void abs(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:328
│ │ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition algebra.hh:30
│ │ │ │ -
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ +
int min(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:348
│ │ │ │ +
int max(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:337
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
Definition geometrycache.hh:24
│ │ │ │ -
GeometryCache()
Definition geometrycache.hh:33
│ │ │ │ -
const Real & integrationElement(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:37
│ │ │ │ -
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition geometrycache.hh:31
│ │ │ │ -
const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:48
│ │ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:66
│ │ │ │ -
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition geometrycache.hh:30
│ │ │ │ -
Definition geometrycache.hh:91
│ │ │ │ -
const JacobianTransposed & jacobianTransposed()
Definition geometrycache.hh:105
│ │ │ │ -
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition geometrycache.hh:93
│ │ │ │ -
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition geometrycache.hh:92
│ │ │ │ -
const Real & integrationElement()
Definition geometrycache.hh:100
│ │ │ │ -
GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:95
│ │ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed()
Definition geometrycache.hh:110
│ │ │ │ -
Definition misc.hh:231
│ │ │ │ +
Definition meshpointer.hh:40
│ │ │ │ +
Definition dofvector.hh:35
│ │ │ │ +
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:42
│ │ │ │ +
ALBERTA DOF_INT_VEC DofVector
Definition dofvector.hh:40
│ │ │ │ +
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:57
│ │ │ │ +
static void free(DofVector *dofVector)
Definition dofvector.hh:47
│ │ │ │ +
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:52
│ │ │ │ +
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:84
│ │ │ │ +
static void free(DofVector *dofVector)
Definition dofvector.hh:74
│ │ │ │ +
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:69
│ │ │ │ +
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:79
│ │ │ │ +
ALBERTA DOF_SCHAR_VEC DofVector
Definition dofvector.hh:67
│ │ │ │ +
static void free(DofVector *dofVector)
Definition dofvector.hh:101
│ │ │ │ +
ALBERTA DOF_UCHAR_VEC DofVector
Definition dofvector.hh:94
│ │ │ │ +
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:106
│ │ │ │ +
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:96
│ │ │ │ +
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:111
│ │ │ │ +
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:123
│ │ │ │ +
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:133
│ │ │ │ +
static void free(DofVector *dofVector)
Definition dofvector.hh:128
│ │ │ │ +
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:138
│ │ │ │ +
ALBERTA DOF_REAL_VEC DofVector
Definition dofvector.hh:121
│ │ │ │ +
ALBERTA DOF_REAL_D_VEC DofVector
Definition dofvector.hh:148
│ │ │ │ +
static void free(DofVector *dofVector)
Definition dofvector.hh:155
│ │ │ │ +
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:165
│ │ │ │ +
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:160
│ │ │ │ +
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:150
│ │ │ │ +
Definition dofvector.hh:179
│ │ │ │ +
DofVectorProvider::DofVector DofVector
Definition dofvector.hh:185
│ │ │ │ +
void setupInterpolation()
Definition dofvector.hh:292
│ │ │ │ +
void initialize(const Dof &value)
Definition dofvector.hh:270
│ │ │ │ +
void read(const std::string &filename, const MeshPointer< dim > &meshPointer)
Definition dofvector.hh:243
│ │ │ │ +
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ │ +
void release()
Definition dofvector.hh:254
│ │ │ │ +
AdaptationData * getAdaptationData() const
Definition dofvector.hh:277
│ │ │ │ +
void setupRestriction()
Definition dofvector.hh:299
│ │ │ │ +
DofVectorPointer()
Definition dofvector.hh:193
│ │ │ │ +
void setAdaptationData(AdaptationData *adaptationData)
Definition dofvector.hh:285
│ │ │ │ +
bool write(const std::string &filename) const
Definition dofvector.hh:249
│ │ │ │ +
DofVectorPointer(DofVector *dofVector)
Definition dofvector.hh:202
│ │ │ │ +
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ │ +
static const bool supportsAdaptationData
Definition dofvector.hh:187
│ │ │ │ +
std::string name() const
Definition dofvector.hh:228
│ │ │ │ +
void forEach(Functor &functor) const
Definition dofvector.hh:264
│ │ │ │ +
DofVectorPointer(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:197
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,210 +1,563 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -geometrycache.hh │ │ │ │ │ +dofvector.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ -6#define DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#if HAVE_ALBERTA │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 namespace Alberta │ │ │ │ │ -17 { │ │ │ │ │ -18 │ │ │ │ │ -19 // GeometryCache │ │ │ │ │ -20 // ------------- │ │ │ │ │ -21 │ │ │ │ │ -22 template< int dim > │ │ │ │ │ -_2_3 class _G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -24 { │ │ │ │ │ -25 static const unsigned int flagIntegrationElement = (1 << 0); │ │ │ │ │ -26 static const unsigned int flagJacobianTransposed = (1 << 1); │ │ │ │ │ -27 static const unsigned int flagJacobianInverseTransposed = (1 << 2); │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_r_e_f_i_n_e_m_e_n_t_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15#if HAVE_ALBERTA │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 namespace Alberta │ │ │ │ │ +21 { │ │ │ │ │ +22 │ │ │ │ │ +23 // External Forward Declarations │ │ │ │ │ +24 // ----------------------------- │ │ │ │ │ +25 │ │ │ │ │ +26 template< int dim > │ │ │ │ │ +27 class MeshPointer; │ │ │ │ │ 28 │ │ │ │ │ -29 public: │ │ │ │ │ -_3_0 typedef FieldMatrix< Real, dimWorld, dim > _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; │ │ │ │ │ -_3_1 typedef FieldMatrix< Real, dim, dimWorld > _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ -32 │ │ │ │ │ -_3_3 _G_e_o_m_e_t_r_y_C_a_c_h_e () │ │ │ │ │ -34 : flags_( 0 ) │ │ │ │ │ -35 {} │ │ │ │ │ +29 │ │ │ │ │ +30 │ │ │ │ │ +31 // DofVectorProvider │ │ │ │ │ +32 // ----------------- │ │ │ │ │ +33 │ │ │ │ │ +34 template< class Dof > │ │ │ │ │ +_3_5 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r; │ │ │ │ │ 36 │ │ │ │ │ -_3_7 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ -38 { │ │ │ │ │ -39 if( (flags_ & flagIntegrationElement) == 0 ) │ │ │ │ │ -40 { │ │ │ │ │ -41 integrationElement_ = std::abs( _d_e_t_e_r_m_i_n_a_n_t( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( elInfo ) ) │ │ │ │ │ -); │ │ │ │ │ -42 assert( integrationElement_ > 1e-14 ); │ │ │ │ │ -43 flags_ |= flagIntegrationElement; │ │ │ │ │ -44 } │ │ │ │ │ -45 return integrationElement_; │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -_4_8 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _A_L_B_E_R_T_A EL_INFO &elInfo │ │ │ │ │ -) │ │ │ │ │ -49 { │ │ │ │ │ -50 if( (flags_ & flagJacobianTransposed) == 0 ) │ │ │ │ │ -51 { │ │ │ │ │ -52 assert( (elInfo.fill_flag & _F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _>_:_:_c_o_o_r_d_s) != 0 ); │ │ │ │ │ -53 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elInfo.coord[ 0 ]; │ │ │ │ │ -54 for( int i = 0; i < dim; ++i ) │ │ │ │ │ -55 { │ │ │ │ │ -56 const _G_l_o_b_a_l_V_e_c_t_o_r &y = elInfo.coord[ i+1 ]; │ │ │ │ │ -57 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ -58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ]; │ │ │ │ │ -59 } │ │ │ │ │ -60 flags_ |= flagJacobianTransposed; │ │ │ │ │ +37 template<> │ │ │ │ │ +_3_8 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< int > │ │ │ │ │ +39 { │ │ │ │ │ +_4_0 typedef _A_L_B_E_R_T_A DOF_INT_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +41 │ │ │ │ │ +_4_2 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ +43 { │ │ │ │ │ +44 return _A_L_B_E_R_T_A get_dof_int_vec( name.c_str(), dofSpace ); │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +_4_7 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ +48 { │ │ │ │ │ +49 _A_L_B_E_R_T_A free_dof_int_vec( dofVector ); │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +_5_2 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ +*dofSpace ) │ │ │ │ │ +53 { │ │ │ │ │ +54 return _A_L_B_E_R_T_A read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +_5_7 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ +) │ │ │ │ │ +58 { │ │ │ │ │ +59 int success = _A_L_B_E_R_T_A write_dof_int_vec_xdr( dofVector, filename.c_str() ); │ │ │ │ │ +60 return (success == 0); │ │ │ │ │ 61 } │ │ │ │ │ -62 return jacobianTransposed_; │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -65 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 & │ │ │ │ │ -_6_6 _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 _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ -67 { │ │ │ │ │ -68 if( (flags_ & flagJacobianInverseTransposed) == 0 ) │ │ │ │ │ -69 { │ │ │ │ │ -70 integrationElement_ = std::abs( _i_n_v_e_r_t( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( elInfo ), │ │ │ │ │ -jacobianInverseTransposed_ ) ); │ │ │ │ │ -71 assert( integrationElement_ > 1e-14 ); │ │ │ │ │ -72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed; │ │ │ │ │ -73 } │ │ │ │ │ -74 return jacobianInverseTransposed_; │ │ │ │ │ -75 } │ │ │ │ │ -76 │ │ │ │ │ -77 private: │ │ │ │ │ -78 unsigned int flags_; │ │ │ │ │ -79 _R_e_a_l integrationElement_; │ │ │ │ │ -80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_; │ │ │ │ │ -81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_; │ │ │ │ │ -82 }; │ │ │ │ │ +62 }; │ │ │ │ │ +63 │ │ │ │ │ +64 template<> │ │ │ │ │ +_6_5 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< signed char > │ │ │ │ │ +66 { │ │ │ │ │ +_6_7 typedef _A_L_B_E_R_T_A DOF_SCHAR_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +68 │ │ │ │ │ +_6_9 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ +70 { │ │ │ │ │ +71 return _A_L_B_E_R_T_A get_dof_schar_vec( name.c_str(), dofSpace ); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_7_4 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ +75 { │ │ │ │ │ +76 _A_L_B_E_R_T_A free_dof_schar_vec( dofVector ); │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +_7_9 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ +*dofSpace ) │ │ │ │ │ +80 { │ │ │ │ │ +81 return _A_L_B_E_R_T_A read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ +82 } │ │ │ │ │ 83 │ │ │ │ │ -84 │ │ │ │ │ -85 │ │ │ │ │ -86 // GeometryCacheProxy │ │ │ │ │ -87 // ------------------ │ │ │ │ │ -88 │ │ │ │ │ -89 template< int dim > │ │ │ │ │ -_9_0 struct _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ -91 { │ │ │ │ │ -_9_2 typedef FieldMatrix< Real, dimWorld, dim > _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; │ │ │ │ │ -_9_3 typedef FieldMatrix< Real, dim, dimWorld > _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ -94 │ │ │ │ │ -_9_5 _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y ( _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache, const _A_L_B_E_R_T_A │ │ │ │ │ -EL_INFO &elInfo ) │ │ │ │ │ -96 : geometryCache_( geometryCache ), │ │ │ │ │ -97 elInfo_( elInfo ) │ │ │ │ │ -98 {} │ │ │ │ │ -99 │ │ │ │ │ -_1_0_0 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t () │ │ │ │ │ -101 { │ │ │ │ │ -102 return geometryCache_.integrationElement( elInfo_ ); │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_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 () │ │ │ │ │ -106 { │ │ │ │ │ -107 return geometryCache_.jacobianTransposed( elInfo_ ); │ │ │ │ │ -108 } │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 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 () │ │ │ │ │ -111 { │ │ │ │ │ -112 return geometryCache_.jacobianInverseTransposed( elInfo_ ); │ │ │ │ │ -113 } │ │ │ │ │ -114 │ │ │ │ │ -115 private: │ │ │ │ │ -116 _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache_; │ │ │ │ │ -117 const _A_L_B_E_R_T_A EL_INFO &elInfo_; │ │ │ │ │ -118 }; │ │ │ │ │ -119 │ │ │ │ │ -120 } // namespace Alberta │ │ │ │ │ -121 │ │ │ │ │ -122} // namespace Dune │ │ │ │ │ -123 │ │ │ │ │ -124#endif // #if HAVE_ALBERTA │ │ │ │ │ -125 │ │ │ │ │ -126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ -_a_l_g_e_b_r_a_._h_h │ │ │ │ │ +_8_4 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ +) │ │ │ │ │ +85 { │ │ │ │ │ +86 int success = _A_L_B_E_R_T_A write_dof_schar_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ +); │ │ │ │ │ +87 return (success == 0); │ │ │ │ │ +88 } │ │ │ │ │ +89 }; │ │ │ │ │ +90 │ │ │ │ │ +91 template<> │ │ │ │ │ +_9_2 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< unsigned char > │ │ │ │ │ +93 { │ │ │ │ │ +_9_4 typedef _A_L_B_E_R_T_A DOF_UCHAR_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +95 │ │ │ │ │ +_9_6 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ +97 { │ │ │ │ │ +98 return _A_L_B_E_R_T_A get_dof_uchar_vec( name.c_str(), dofSpace ); │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +_1_0_1 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ +102 { │ │ │ │ │ +103 _A_L_B_E_R_T_A free_dof_uchar_vec( dofVector ); │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ +*dofSpace ) │ │ │ │ │ +107 { │ │ │ │ │ +108 return _A_L_B_E_R_T_A read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ +) │ │ │ │ │ +112 { │ │ │ │ │ +113 int success = _A_L_B_E_R_T_A write_dof_uchar_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ +); │ │ │ │ │ +114 return (success == 0); │ │ │ │ │ +115 } │ │ │ │ │ +116 }; │ │ │ │ │ +117 │ │ │ │ │ +118 template<> │ │ │ │ │ +_1_1_9 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< _R_e_a_l > │ │ │ │ │ +120 { │ │ │ │ │ +_1_2_1 typedef _A_L_B_E_R_T_A DOF_REAL_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +122 │ │ │ │ │ +_1_2_3 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ +124 { │ │ │ │ │ +125 return _A_L_B_E_R_T_A get_dof_real_vec( name.c_str(), dofSpace ); │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ +129 { │ │ │ │ │ +130 _A_L_B_E_R_T_A free_dof_real_vec( dofVector ); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +_1_3_3 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ +*dofSpace ) │ │ │ │ │ +134 { │ │ │ │ │ +135 return _A_L_B_E_R_T_A read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +_1_3_8 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ +) │ │ │ │ │ +139 { │ │ │ │ │ +140 int success = _A_L_B_E_R_T_A write_dof_real_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ +); │ │ │ │ │ +141 return (success == 0); │ │ │ │ │ +142 } │ │ │ │ │ +143 }; │ │ │ │ │ +144 │ │ │ │ │ +145 template<> │ │ │ │ │ +_1_4_6 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< _G_l_o_b_a_l_V_e_c_t_o_r > │ │ │ │ │ +147 { │ │ │ │ │ +_1_4_8 typedef _A_L_B_E_R_T_A DOF_REAL_D_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +149 │ │ │ │ │ +_1_5_0 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ +151 { │ │ │ │ │ +152 return _A_L_B_E_R_T_A get_dof_real_d_vec( name.c_str(), dofSpace ); │ │ │ │ │ +153 } │ │ │ │ │ +154 │ │ │ │ │ +_1_5_5 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ +156 { │ │ │ │ │ +157 _A_L_B_E_R_T_A free_dof_real_d_vec( dofVector ); │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +_1_6_0 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ +*dofSpace ) │ │ │ │ │ +161 { │ │ │ │ │ +162 return _A_L_B_E_R_T_A read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ +163 } │ │ │ │ │ +164 │ │ │ │ │ +_1_6_5 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ +) │ │ │ │ │ +166 { │ │ │ │ │ +167 int success = _A_L_B_E_R_T_A write_dof_real_d_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ +); │ │ │ │ │ +168 return (success == 0); │ │ │ │ │ +169 } │ │ │ │ │ +170 }; │ │ │ │ │ +171 │ │ │ │ │ +172 │ │ │ │ │ +173 │ │ │ │ │ +174 // DofVectorPointer │ │ │ │ │ +175 // ---------------- │ │ │ │ │ +176 │ │ │ │ │ +177 template< class Dof > │ │ │ │ │ +_1_7_8 class _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ +179 { │ │ │ │ │ +180 typedef _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _D_o_f_ _> _T_h_i_s; │ │ │ │ │ +181 │ │ │ │ │ +182 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _D_o_f_ _> _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r; │ │ │ │ │ +183 │ │ │ │ │ +184 public: │ │ │ │ │ +_1_8_5 typedef typename DofVectorProvider::DofVector _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +186 │ │ │ │ │ +_1_8_7 static const bool _s_u_p_p_o_r_t_s_A_d_a_p_t_a_t_i_o_n_D_a_t_a = true; │ │ │ │ │ +188 │ │ │ │ │ +189 private: │ │ │ │ │ +190 _D_o_f_V_e_c_t_o_r *dofVector_; │ │ │ │ │ +191 │ │ │ │ │ +192 public: │ │ │ │ │ +_1_9_3 _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r () │ │ │ │ │ +194 : dofVector_( NULL ) │ │ │ │ │ +195 {} │ │ │ │ │ +196 │ │ │ │ │ +_1_9_7 explicit _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r ( const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e, │ │ │ │ │ +198 const std::string &_n_a_m_e = "" ) │ │ │ │ │ +199 : dofVector_ ( _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r::get( _d_o_f_S_p_a_c_e, _n_a_m_e ) ) │ │ │ │ │ +200 {} │ │ │ │ │ +201 │ │ │ │ │ +_2_0_2 explicit _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ +203 : dofVector_( dofVector ) │ │ │ │ │ +204 {} │ │ │ │ │ +205 │ │ │ │ │ +_2_0_6 explicit operator bool () const │ │ │ │ │ +207 { │ │ │ │ │ +208 return (bool)dofVector_; │ │ │ │ │ +209 } │ │ │ │ │ +210 │ │ │ │ │ +_2_1_1 operator _D_o_f_V_e_c_t_o_r * () const │ │ │ │ │ +212 { │ │ │ │ │ +213 return dofVector_; │ │ │ │ │ +214 } │ │ │ │ │ +215 │ │ │ │ │ +_2_1_6 operator Dof * () const │ │ │ │ │ +217 { │ │ │ │ │ +218 Dof *ptr = NULL; │ │ │ │ │ +219 GET_DOF_VEC( ptr, dofVector_ ); │ │ │ │ │ +220 return ptr; │ │ │ │ │ +221 } │ │ │ │ │ +222 │ │ │ │ │ +_2_2_3 const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e () const │ │ │ │ │ +224 { │ │ │ │ │ +225 return dofVector_->fe_space; │ │ │ │ │ +226 } │ │ │ │ │ +227 │ │ │ │ │ +_2_2_8 std::string _n_a_m_e () const │ │ │ │ │ +229 { │ │ │ │ │ +230 if( dofVector_ ) │ │ │ │ │ +231 return dofVector_->name; │ │ │ │ │ +232 else │ │ │ │ │ +233 return std::string(); │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +_2_3_6 void _c_r_e_a_t_e ( const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e, const std::string &_n_a_m_e = "" ) │ │ │ │ │ +237 { │ │ │ │ │ +238 _r_e_l_e_a_s_e(); │ │ │ │ │ +239 dofVector_ = DofVectorProvider::get( _d_o_f_S_p_a_c_e, _n_a_m_e ); │ │ │ │ │ +240 } │ │ │ │ │ +241 │ │ │ │ │ +242 template< int dim > │ │ │ │ │ +_2_4_3 void _r_e_a_d ( const std::string &filename, const _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +&meshPointer ) │ │ │ │ │ +244 { │ │ │ │ │ +245 _r_e_l_e_a_s_e(); │ │ │ │ │ +246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL ); │ │ │ │ │ +247 } │ │ │ │ │ +248 │ │ │ │ │ +_2_4_9 bool _w_r_i_t_e ( const std::string &filename ) const │ │ │ │ │ +250 { │ │ │ │ │ +251 return DofVectorProvider::write( dofVector_, filename ); │ │ │ │ │ +252 } │ │ │ │ │ +253 │ │ │ │ │ +_2_5_4 void _r_e_l_e_a_s_e () │ │ │ │ │ +255 { │ │ │ │ │ +256 if( dofVector_ ) │ │ │ │ │ +257 { │ │ │ │ │ +258 DofVectorProvider::free( dofVector_ ); │ │ │ │ │ +259 dofVector_ = NULL; │ │ │ │ │ +260 } │ │ │ │ │ +261 } │ │ │ │ │ +262 │ │ │ │ │ +263 template< class Functor > │ │ │ │ │ +_2_6_4 void _f_o_r_E_a_c_h ( Functor &functor ) const │ │ │ │ │ +265 { │ │ │ │ │ +266 Dof *array = (Dof *)(*this); │ │ │ │ │ +267 FOR_ALL_DOFS( _d_o_f_S_p_a_c_e()->admin, functor( array[ dof ] ) ); │ │ │ │ │ +268 } │ │ │ │ │ +269 │ │ │ │ │ +_2_7_0 void _i_n_i_t_i_a_l_i_z_e ( const Dof &value ) │ │ │ │ │ +271 { │ │ │ │ │ +272 Dof *array = (Dof *)(*this); │ │ │ │ │ +273 FOR_ALL_DOFS( _d_o_f_S_p_a_c_e()->admin, array[ dof ] = value ); │ │ │ │ │ +274 } │ │ │ │ │ +275 │ │ │ │ │ +276 template< class AdaptationData > │ │ │ │ │ +_2_7_7 AdaptationData *_g_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a () const │ │ │ │ │ +278 { │ │ │ │ │ +279 assert( dofVector_ ); │ │ │ │ │ +280 assert( dofVector_->user_data ); │ │ │ │ │ +281 return static_cast< AdaptationData * >( dofVector_->user_data ); │ │ │ │ │ +282 } │ │ │ │ │ +283 │ │ │ │ │ +284 template< class AdaptationData > │ │ │ │ │ +_2_8_5 void _s_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a ( AdaptationData *adaptationData ) │ │ │ │ │ +286 { │ │ │ │ │ +287 assert( dofVector_ ); │ │ │ │ │ +288 dofVector_->user_data = adaptationData; │ │ │ │ │ +289 } │ │ │ │ │ +290 │ │ │ │ │ +291 template< class Interpolation > │ │ │ │ │ +_2_9_2 void _s_e_t_u_p_I_n_t_e_r_p_o_l_a_t_i_o_n () │ │ │ │ │ +293 { │ │ │ │ │ +294 assert( dofVector_ ); │ │ │ │ │ +295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >; │ │ │ │ │ +296 } │ │ │ │ │ +297 │ │ │ │ │ +298 template< class Restriction > │ │ │ │ │ +_2_9_9 void _s_e_t_u_p_R_e_s_t_r_i_c_t_i_o_n () │ │ │ │ │ +300 { │ │ │ │ │ +301 assert( dofVector_ ); │ │ │ │ │ +302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >; │ │ │ │ │ +303 } │ │ │ │ │ +304 │ │ │ │ │ +305 private: │ │ │ │ │ +306 template< class Interpolation > │ │ │ │ │ +307 static void refineInterpolate ( _D_o_f_V_e_c_t_o_r *dofVector, RC_LIST_EL *list, int │ │ │ │ │ +n ) │ │ │ │ │ +308 { │ │ │ │ │ +309 const This dofVectorPointer( dofVector ); │ │ │ │ │ +310 typename Interpolation::Patch patch( list, n ); │ │ │ │ │ +311 Interpolation::interpolateVector( dofVectorPointer, patch ); │ │ │ │ │ +312 } │ │ │ │ │ +313 │ │ │ │ │ +314 template< class Restriction > │ │ │ │ │ +315 static void coarsenRestrict ( _D_o_f_V_e_c_t_o_r *dofVector, RC_LIST_EL *list, int n │ │ │ │ │ +) │ │ │ │ │ +316 { │ │ │ │ │ +317 const This dofVectorPointer( dofVector ); │ │ │ │ │ +318 typename Restriction::Patch patch( list, n ); │ │ │ │ │ +319 Restriction::restrictVector( dofVectorPointer, patch ); │ │ │ │ │ +320 } │ │ │ │ │ +321 }; │ │ │ │ │ +322 │ │ │ │ │ +323 │ │ │ │ │ +324 │ │ │ │ │ +325 // Auxiliary Functions │ │ │ │ │ +326 // -------------------- │ │ │ │ │ +327 │ │ │ │ │ +_3_2_8 inline void _a_b_s ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _i_n_t_ _> &dofVector ) │ │ │ │ │ +329 { │ │ │ │ │ +330 assert( !dofVector == false ); │ │ │ │ │ +331 int *array = (int *)dofVector; │ │ │ │ │ +332 FOR_ALL_DOFS( dofVector._d_o_f_S_p_a_c_e()->admin, │ │ │ │ │ +333 array[ dof ] = std::abs( array[ dof ] ) ); │ │ │ │ │ +334 } │ │ │ │ │ +335 │ │ │ │ │ +336 │ │ │ │ │ +_3_3_7 inline int _m_a_x ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _i_n_t_ _> &dofVector ) │ │ │ │ │ +338 { │ │ │ │ │ +339 assert( !dofVector == false ); │ │ │ │ │ +340 int *array = (int *)dofVector; │ │ │ │ │ +341 int result = std::numeric_limits< int >::min(); │ │ │ │ │ +342 FOR_ALL_DOFS( dofVector._d_o_f_S_p_a_c_e()->admin, │ │ │ │ │ +343 result = std::max( result, array[ dof ] ) ); │ │ │ │ │ +344 return result; │ │ │ │ │ +345 } │ │ │ │ │ +346 │ │ │ │ │ +347 │ │ │ │ │ +_3_4_8 inline int _m_i_n ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _i_n_t_ _> &dofVector ) │ │ │ │ │ +349 { │ │ │ │ │ +350 assert( !dofVector == false ); │ │ │ │ │ +351 int *array = (int *)dofVector; │ │ │ │ │ +352 int result = std::numeric_limits< int >::max(); │ │ │ │ │ +353 FOR_ALL_DOFS( dofVector._d_o_f_S_p_a_c_e()->admin, │ │ │ │ │ +354 result = std::min( result, array[ dof ] ) ); │ │ │ │ │ +355 return result; │ │ │ │ │ +356 } │ │ │ │ │ +357 │ │ │ │ │ +358 } // namespace Alberta │ │ │ │ │ +359 │ │ │ │ │ +360} // namespace Dune │ │ │ │ │ +361 │ │ │ │ │ +362#endif // #if HAVE_ALBERTA │ │ │ │ │ +363 │ │ │ │ │ +364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ _m_i_s_c_._h_h │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ +_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ +geometryInFather │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ +ALBERTA MESH Mesh │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s │ │ │ │ │ +void abs(const DofVectorPointer< int > &dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:328 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ ALBERTA REAL Real │ │ │ │ │ DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -static K determinant(const FieldMatrix< K, 0, m > &matrix) │ │ │ │ │ -DDeeffiinniittiioonn algebra.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ │ -static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ │ -&inverse) │ │ │ │ │ -DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ +ALBERTA FE_SPACE DofSpace │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_i_n │ │ │ │ │ +int min(const DofVectorPointer< int > &dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_a_x │ │ │ │ │ +int max(const DofVectorPointer< int > &dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:337 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -GeometryCache() │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ -const Real & integrationElement(const ALBERTA EL_INFO &elInfo) │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -FieldMatrix< Real, dim, dimWorld > JacobianTransposed │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo) │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_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 │ │ │ │ │ -const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA │ │ │ │ │ -EL_INFO &elInfo) │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_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 │ │ │ │ │ -FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -const JacobianTransposed & jacobianTransposed() │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -FieldMatrix< Real, dim, dimWorld > JacobianTransposed │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_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< Real, dimWorld, dim > JacobianInverseTransposed │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ -const Real & integrationElement() │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ -GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO │ │ │ │ │ -&elInfo) │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_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() │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_g_e_t │ │ │ │ │ +static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ +ALBERTA DOF_INT_VEC DofVector │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_w_r_i_t_e │ │ │ │ │ +static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_f_r_e_e │ │ │ │ │ +static void free(DofVector *dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_r_e_a_d │ │ │ │ │ +static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ +*dofSpace) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_w_r_i_t_e │ │ │ │ │ +static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_f_r_e_e │ │ │ │ │ +static void free(DofVector *dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_g_e_t │ │ │ │ │ +static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_r_e_a_d │ │ │ │ │ +static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ +*dofSpace) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ +ALBERTA DOF_SCHAR_VEC DofVector │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_f_r_e_e │ │ │ │ │ +static void free(DofVector *dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ +ALBERTA DOF_UCHAR_VEC DofVector │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_r_e_a_d │ │ │ │ │ +static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ +*dofSpace) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_g_e_t │ │ │ │ │ +static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:96 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_w_r_i_t_e │ │ │ │ │ +static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_g_e_t │ │ │ │ │ +static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_r_e_a_d │ │ │ │ │ +static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ +*dofSpace) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_f_r_e_e │ │ │ │ │ +static void free(DofVector *dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_w_r_i_t_e │ │ │ │ │ +static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ +ALBERTA DOF_REAL_VEC DofVector │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:121 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ +ALBERTA DOF_REAL_D_VEC DofVector │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_f_r_e_e │ │ │ │ │ +static void free(DofVector *dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_w_r_i_t_e │ │ │ │ │ +static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_r_e_a_d │ │ │ │ │ +static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ +*dofSpace) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_g_e_t │ │ │ │ │ +static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ +DofVectorProvider::DofVector DofVector │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_e_t_u_p_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +void setupInterpolation() │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_i_n_i_t_i_a_l_i_z_e │ │ │ │ │ +void initialize(const Dof &value) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:270 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_a_d │ │ │ │ │ +void read(const std::string &filename, const MeshPointer< dim > &meshPointer) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_g_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a │ │ │ │ │ +AdaptationData * getAdaptationData() const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:277 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_e_t_u_p_R_e_s_t_r_i_c_t_i_o_n │ │ │ │ │ +void setupRestriction() │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ +DofVectorPointer() │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:193 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a │ │ │ │ │ +void setAdaptationData(AdaptationData *adaptationData) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +bool write(const std::string &filename) const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ +DofVectorPointer(DofVector *dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:202 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * dofSpace() const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_u_p_p_o_r_t_s_A_d_a_p_t_a_t_i_o_n_D_a_t_a │ │ │ │ │ +static const bool supportsAdaptationData │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_n_a_m_e │ │ │ │ │ +std::string name() const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:228 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_f_o_r_E_a_c_h │ │ │ │ │ +void forEach(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:264 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ +DofVectorPointer(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:197 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometryreference.hh File Reference │ │ │ │ +dune-grid: albertagrid.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,42 +71,66 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
geometryreference.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Functions | │ │ │ │ +Variables
│ │ │ │ +
albertagrid.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

Wrapper and interface classes for element geometries. │ │ │ │ -More...

│ │ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/geometry.hh>
│ │ │ │ +
#include "geometry.cc"
│ │ │ │ +#include "entity.cc"
│ │ │ │ +#include "intersection.cc"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::GeometryReference< Implementation >
 
class  Dune::LocalGeometryReference< mydim, cdim, Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Macros

#define DUNE_ALBERTAGRID_CC
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Functions

template<int dim, int dimworld>
static void Dune::checkAlbertaDimensions ()
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Variables

static void * Dune::Alberta::adaptationDataHandler_
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Wrapper and interface classes for element geometries.

│ │ │ │ -
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTAGRID_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTAGRID_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,34 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -geometryreference.hh File Reference │ │ │ │ │ -Wrapper and interface classes for element geometries. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ │ +albertagrid.cc File Reference │ │ │ │ │ +#include "_g_e_o_m_e_t_r_y_._c_c" │ │ │ │ │ +#include "_e_n_t_i_t_y_._c_c" │ │ │ │ │ +#include "_i_n_t_e_r_s_e_c_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_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Wrapper and interface classes for element geometries. │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ +  │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A_G_R_I_D___C_C │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +static void  _D_u_n_e_:_:_c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s () │ │ │ │ │ +  │ │ │ │ │ +VVaarriiaabblleess │ │ │ │ │ +static void *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__ │ │ │ │ │ +  │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__AALLBBEERRTTAAGGRRIIDD__CCCC ********** │ │ │ │ │ +#define DUNE_ALBERTAGRID_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometryreference.hh Source File │ │ │ │ +dune-grid: albertagrid.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,225 +74,802 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
geometryreference.hh
│ │ │ │ +
albertagrid.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │ -
6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTAGRID_CC
│ │ │ │ +
6#define DUNE_ALBERTAGRID_CC
│ │ │ │
7
│ │ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
20
│ │ │ │ -
21 // GeometryReference
│ │ │ │ -
22 // -----------------
│ │ │ │ -
23
│ │ │ │ -
24 template< class Implementation >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ -
30 static const int mydimension = Implementation::mydimension;
│ │ │ │ -
31 static const int coorddimension = Implementation::coorddimension;
│ │ │ │ -
32
│ │ │ │ -
33 typedef typename Implementation::ctype ctype;
│ │ │ │ -
34
│ │ │ │ -
35 typedef typename Implementation::LocalCoordinate LocalCoordinate;
│ │ │ │ -
36 typedef typename Implementation::GlobalCoordinate GlobalCoordinate;
│ │ │ │ +
8//************************************************************************
│ │ │ │ +
9//
│ │ │ │ +
10// implementation of AlbertaGrid
│ │ │ │ +
11//
│ │ │ │ +
12// namespace Dune
│ │ │ │ +
13//
│ │ │ │ +
14//************************************************************************
│ │ │ │ +
15#include "geometry.cc"
│ │ │ │ +
16#include "entity.cc"
│ │ │ │ +
17#include "intersection.cc"
│ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
│ │ │ │ +
22 namespace Alberta
│ │ │ │ +
23 {
│ │ │ │ + │ │ │ │ +
25 }
│ │ │ │ +
│ │ │ │ +
26
│ │ │ │ +
27
│ │ │ │ +
28 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 // If this check fails, define ALBERTA_DIM accordingly
│ │ │ │ +
32 static_assert((dimworld == Alberta::dimWorld),
│ │ │ │ +
33 "Template Parameter dimworld does not match "
│ │ │ │ +
34 "ALBERTA's DIM_OF_WORLD setting.");
│ │ │ │ +
35 }
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │
37
│ │ │ │ -
38 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ │ -
39 typedef typename Implementation::JacobianTransposed JacobianTransposed;
│ │ │ │ +
38 // AlbertaGrid
│ │ │ │ +
39 // -----------
│ │ │ │
40
│ │ │ │ -
41 private:
│ │ │ │ -
42
│ │ │ │ -
43 template<class Implementation_T>
│ │ │ │ -
44 using JacobianInverseOfImplementation = decltype(typename Implementation_T::JacobianInverse{std::declval<Implementation_T>().jacobianInverse(std::declval<LocalCoordinate>())});
│ │ │ │ -
45
│ │ │ │ -
46 using JacobianInverseDefault = decltype(transpose(std::declval<JacobianInverseTransposed>()));
│ │ │ │ -
47
│ │ │ │ -
48 template<class Implementation_T>
│ │ │ │ -
49 using JacobianOfImplementation = decltype(typename Implementation_T::Jacobian{std::declval<Implementation_T>().jacobian(std::declval<LocalCoordinate>())});
│ │ │ │ -
50
│ │ │ │ -
51 using JacobianDefault = decltype(transpose(std::declval<JacobianTransposed>()));
│ │ │ │ -
52
│ │ │ │ -
53
│ │ │ │ -
54 template <class I = Implementation>
│ │ │ │ -
55 [[deprecated("Geometry implementatons are required to provide a jacobian(local) method. The default implementation is deprecated and will be removed after release 2.9")]]
│ │ │ │ -
56 auto deprecatedDefaultJacobian ( const LocalCoordinate& local ) const {
│ │ │ │ -
57 return transpose(jacobianTransposed(local));
│ │ │ │ -
58 }
│ │ │ │ -
59
│ │ │ │ -
60 template <class I = Implementation>
│ │ │ │ -
61 [[deprecated("Geometry implementatons are required to provide a jacobianInverse(local) method. The default implementation is deprecated and will be removed after release 2.9")]]
│ │ │ │ -
62 auto deprecatedDefaultJacobianInverse ( const LocalCoordinate& local ) const {
│ │ │ │ -
63 return transpose(jacobianInverseTransposed(local));
│ │ │ │ -
64 }
│ │ │ │ -
65
│ │ │ │ -
66 public:
│ │ │ │ -
67
│ │ │ │ -
68 using Jacobian = Std::detected_or_t<JacobianDefault, JacobianOfImplementation, Implementation>;
│ │ │ │ -
69 using JacobianInverse = Std::detected_or_t<JacobianInverseDefault, JacobianInverseOfImplementation, Implementation>;
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ -
71 explicit GeometryReference ( const Implementation &impl )
│ │ │ │ -
72 : impl_( &impl )
│ │ │ │ -
73 {}
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75 GeometryType type () const { return impl().type(); }
│ │ │ │ -
76
│ │ │ │ -
77 bool affine() const { return impl().affine(); }
│ │ │ │ -
78
│ │ │ │ -
79 int corners () const { return impl().corners(); }
│ │ │ │ -
80 GlobalCoordinate corner ( int i ) const { return impl().corner( i ); }
│ │ │ │ -
81 GlobalCoordinate center () const { return impl().center(); }
│ │ │ │ +
41 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43 : mesh_(),
│ │ │ │ +
44 maxlevel_( 0 ),
│ │ │ │ +
45 numBoundarySegments_( 0 ),
│ │ │ │ +
46 hIndexSet_( dofNumbering_ ),
│ │ │ │ +
47 idSet_( hIndexSet_ ),
│ │ │ │ +
48 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ +
49 leafIndexSet_( 0 ),
│ │ │ │ +
50 sizeCache_( *this ),
│ │ │ │ +
51 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ +
52 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ +
53 {
│ │ │ │ + │ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57
│ │ │ │ +
58 template< int dim, int dimworld >
│ │ │ │ +
59 template< class Proj, class Impl >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
63 : mesh_(),
│ │ │ │ +
64 maxlevel_( 0 ),
│ │ │ │ +
65 numBoundarySegments_( 0 ),
│ │ │ │ +
66 hIndexSet_( dofNumbering_ ),
│ │ │ │ +
67 idSet_( hIndexSet_ ),
│ │ │ │ +
68 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ +
69 leafIndexSet_ ( 0 ),
│ │ │ │ +
70 sizeCache_( *this ),
│ │ │ │ +
71 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ +
72 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ +
73 {
│ │ │ │ + │ │ │ │ +
75
│ │ │ │ +
76 numBoundarySegments_ = mesh_.create( macroData, projectionFactory );
│ │ │ │ +
77 if( !mesh_ )
│ │ │ │ +
78 DUNE_THROW( AlbertaError, "Invalid macro data structure." );
│ │ │ │ +
79
│ │ │ │ +
80 setup();
│ │ │ │ +
81 hIndexSet_.create();
│ │ │ │
82
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 {
│ │ │ │ -
85 return impl().global( local );
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
89 {
│ │ │ │ -
90 return impl().local( global );
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
94 {
│ │ │ │ -
95 return impl().integrationElement( local );
│ │ │ │ -
96 }
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
98 ctype volume () const { return impl().volume(); }
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
101 {
│ │ │ │ -
102 return impl().jacobianTransposed( local );
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
106 {
│ │ │ │ -
107 return impl().jacobianInverseTransposed( local );
│ │ │ │ -
108 }
│ │ │ │ +
83 calcExtras();
│ │ │ │ +
84 }
│ │ │ │
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 {
│ │ │ │ -
112 if constexpr(Std::is_detected_v<JacobianOfImplementation, Implementation>)
│ │ │ │ -
113 return impl().jacobian(local);
│ │ │ │ -
114 else
│ │ │ │ -
115 return deprecatedDefaultJacobian(local);
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
119 {
│ │ │ │ -
120 if constexpr(Std::is_detected_v<JacobianInverseOfImplementation, Implementation>)
│ │ │ │ -
121 return impl().jacobianInverse(local);
│ │ │ │ -
122 else
│ │ │ │ -
123 return deprecatedDefaultJacobianInverse(local);
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
126 const Implementation &impl () const { return *impl_; }
│ │ │ │ -
127
│ │ │ │ -
128 private:
│ │ │ │ -
129 const Implementation *impl_;
│ │ │ │ -
130 };
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
132
│ │ │ │ -
133 // LocalGeometryReference
│ │ │ │ -
134 // -----------------------
│ │ │ │ +
85
│ │ │ │ +
86
│ │ │ │ +
87 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
90 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection )
│ │ │ │ +
91 : mesh_(),
│ │ │ │ +
92 maxlevel_( 0 ),
│ │ │ │ +
93 numBoundarySegments_( 0 ),
│ │ │ │ +
94 hIndexSet_( dofNumbering_ ),
│ │ │ │ +
95 idSet_( hIndexSet_ ),
│ │ │ │ +
96 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ +
97 leafIndexSet_ ( 0 ),
│ │ │ │ +
98 sizeCache_( *this ),
│ │ │ │ +
99 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ +
100 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ +
101 {
│ │ │ │ + │ │ │ │ +
103
│ │ │ │ +
104 if( projection != 0 )
│ │ │ │ +
105 {
│ │ │ │ +
106 Alberta::DuneGlobalBoundaryProjectionFactory< dimension > projectionFactory( projection );
│ │ │ │ +
107 numBoundarySegments_ = mesh_.create( macroData, projectionFactory );
│ │ │ │ +
108 }
│ │ │ │ +
109 else
│ │ │ │ +
110 numBoundarySegments_ = mesh_.create( macroData );
│ │ │ │ +
111 if( !mesh_ )
│ │ │ │ +
112 DUNE_THROW( AlbertaError, "Invalid macro data structure." );
│ │ │ │ +
113
│ │ │ │ +
114 setup();
│ │ │ │ +
115 hIndexSet_.create();
│ │ │ │ +
116
│ │ │ │ +
117 calcExtras();
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120
│ │ │ │ +
121 template < int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
123 ::AlbertaGrid ( const std::string &macroGridFileName )
│ │ │ │ +
124 : mesh_(),
│ │ │ │ +
125 maxlevel_( 0 ),
│ │ │ │ +
126 hIndexSet_( dofNumbering_ ),
│ │ │ │ +
127 idSet_( hIndexSet_ ),
│ │ │ │ +
128 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ +
129 leafIndexSet_ ( 0 ),
│ │ │ │ +
130 sizeCache_( *this ),
│ │ │ │ +
131 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ +
132 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ +
133 {
│ │ │ │ + │ │ │ │
135
│ │ │ │ -
136 template< int mydim, int cdim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
138 : public GeometryReference< typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl >
│ │ │ │ -
139 {
│ │ │ │ -
140 typedef typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl Implementation;
│ │ │ │ -
141
│ │ │ │ -
142 public:
│ │ │ │ -
│ │ │ │ -
143 LocalGeometryReference ( const Implementation &impl )
│ │ │ │ -
144 : GeometryReference< Implementation >( impl )
│ │ │ │ -
145 {}
│ │ │ │ -
│ │ │ │ -
146 };
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ +
136 numBoundarySegments_ = mesh_.create( macroGridFileName );
│ │ │ │ +
137 if( !mesh_ )
│ │ │ │ +
138 {
│ │ │ │ + │ │ │ │ +
140 "Grid file '" << macroGridFileName
│ │ │ │ +
141 << "' is not in ALBERTA macro triangulation format." );
│ │ │ │ +
142 }
│ │ │ │ +
143
│ │ │ │ +
144 setup();
│ │ │ │ +
145 hIndexSet_.create();
│ │ │ │ +
146
│ │ │ │ +
147 calcExtras();
│ │ │ │
148
│ │ │ │ -
149
│ │ │ │ -
150 // Definitions of GeometryReference
│ │ │ │ -
151 // --------------------------------
│ │ │ │ +
149 std::cout << typeName() << " created from macro grid file '"
│ │ │ │ +
150 << macroGridFileName << "'." << std::endl;
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │
152
│ │ │ │ -
153 template< class Implementation >
│ │ │ │ - │ │ │ │ -
155
│ │ │ │ -
156 template< class Implementation >
│ │ │ │ - │ │ │ │ +
153
│ │ │ │ +
154 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
156 {
│ │ │ │ +
157 dofNumbering_.create( mesh_ );
│ │ │ │
158
│ │ │ │ -
159} // namespace Dune
│ │ │ │ +
159 levelProvider_.create( dofNumbering_ );
│ │ │ │
160
│ │ │ │ -
161#endif // #ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │ +
161#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
162 coordCache_.create( dofNumbering_ );
│ │ │ │ +
163#endif
│ │ │ │ +
164 }
│ │ │ │ +
165
│ │ │ │ +
166
│ │ │ │ +
167 template< int dim, int dimworld >
│ │ │ │ +
168 inline void AlbertaGrid< dim, dimworld >::removeMesh ()
│ │ │ │ +
169 {
│ │ │ │ +
170 for( size_t i = 0; i < levelIndexVec_.size(); ++i )
│ │ │ │ +
171 {
│ │ │ │ +
172 if( levelIndexVec_[ i ] != 0 )
│ │ │ │ +
173 delete levelIndexVec_[ i ];
│ │ │ │ +
174 levelIndexVec_[ i ] = 0;
│ │ │ │ +
175 }
│ │ │ │ +
176
│ │ │ │ +
177 if( leafIndexSet_ != 0 )
│ │ │ │ +
178 delete leafIndexSet_;
│ │ │ │ +
179 leafIndexSet_ = 0;
│ │ │ │ +
180
│ │ │ │ +
181 // release dof vectors
│ │ │ │ +
182 hIndexSet_.release();
│ │ │ │ +
183 levelProvider_.release();
│ │ │ │ +
184#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
185 coordCache_.release();
│ │ │ │ +
186#endif
│ │ │ │ +
187 dofNumbering_.release();
│ │ │ │ +
188
│ │ │ │ +
189 sizeCache_.reset();
│ │ │ │ +
190
│ │ │ │ +
191 mesh_.release();
│ │ │ │ +
192 }
│ │ │ │ +
193
│ │ │ │ +
194
│ │ │ │ +
195 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
197 {
│ │ │ │ +
198 removeMesh();
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
201
│ │ │ │ +
202 template< int dim, int dimworld >
│ │ │ │ +
203 template< int codim, PartitionIteratorType pitype >
│ │ │ │ + │ │ │ │ +
205 ::template Codim< codim >::template Partition<pitype>::LevelIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
207 {
│ │ │ │ + │ │ │ │ +
209 assert( level >= 0 );
│ │ │ │ +
210
│ │ │ │ +
211 if( level > maxlevel_ )
│ │ │ │ +
212 return lend< codim, pitype >( level );
│ │ │ │ +
213 MarkerVector &markerVector = levelMarkerVector_[ level ];
│ │ │ │ +
214
│ │ │ │ +
215 if( (codim > 0) && !markerVector.up2Date() )
│ │ │ │ +
216 markerVector.template markSubEntities< 1 >( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ │ +
217
│ │ │ │ +
218 return LevelIteratorImp( *this, &markerVector, level );
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220
│ │ │ │ +
221
│ │ │ │ +
222 template< int dim, int dimworld >
│ │ │ │ +
223 template< int codim, PartitionIteratorType pitype >
│ │ │ │ + │ │ │ │ +
225 ::template Codim< codim >::template Partition< pitype >::LevelIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
227 {
│ │ │ │ + │ │ │ │ +
229 assert( level >= 0 );
│ │ │ │ +
230
│ │ │ │ +
231 return LevelIteratorImp( *this, level );
│ │ │ │ +
232 }
│ │ │ │ +
│ │ │ │ +
233
│ │ │ │ +
234
│ │ │ │ +
235 template< int dim, int dimworld >
│ │ │ │ +
236 template< int codim >
│ │ │ │ + │ │ │ │ +
238 ::template Codim< codim >::LevelIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
240 {
│ │ │ │ +
241 return lbegin< codim, All_Partition >( level );
│ │ │ │ +
242 }
│ │ │ │ +
│ │ │ │ +
243
│ │ │ │ +
244
│ │ │ │ +
245 template< int dim, int dimworld >
│ │ │ │ +
246 template< int codim >
│ │ │ │ + │ │ │ │ +
248 ::template Codim< codim >::LevelIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
250 {
│ │ │ │ +
251 return lend< codim, All_Partition >( level );
│ │ │ │ +
252 }
│ │ │ │ +
│ │ │ │ +
253
│ │ │ │ +
254
│ │ │ │ +
255 template< int dim, int dimworld >
│ │ │ │ +
256 template< int codim, PartitionIteratorType pitype >
│ │ │ │ + │ │ │ │ +
258 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
260 {
│ │ │ │ + │ │ │ │ +
262
│ │ │ │ +
263 MarkerVector &markerVector = leafMarkerVector_;
│ │ │ │ +
264 const int firstMarkedCodim = 2;
│ │ │ │ +
265 if( (codim >= firstMarkedCodim) && !markerVector.up2Date() )
│ │ │ │ + │ │ │ │ +
267
│ │ │ │ +
268 return LeafIteratorImp( *this, &markerVector, maxlevel_ );
│ │ │ │ +
269 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
271
│ │ │ │ +
272 template< int dim, int dimworld >
│ │ │ │ +
273 template< int codim, PartitionIteratorType pitype >
│ │ │ │ + │ │ │ │ +
275 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
279 return LeafIteratorImp( *this, maxlevel_ );
│ │ │ │ +
280 }
│ │ │ │ +
281
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
283 template< int dim, int dimworld >
│ │ │ │ +
284 template< int codim >
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
288 {
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
290 }
│ │ │ │ +
291
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
293 template< int dim, int dimworld >
│ │ │ │ +
294 template< int codim >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
298 {
│ │ │ │ + │ │ │ │ +
300 }
│ │ │ │ +
│ │ │ │ +
301
│ │ │ │ +
302
│ │ │ │ +
303 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
305 {
│ │ │ │ +
306 typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
│ │ │ │ +
307
│ │ │ │ +
308 // only MAXL levels allowed
│ │ │ │ +
309 assert( (refCount >= 0) && (refCount + maxlevel_ < MAXL) );
│ │ │ │ +
310
│ │ │ │ +
311 for( int i = 0; i < refCount; ++i )
│ │ │ │ +
312 {
│ │ │ │ +
313 // mark all interior elements
│ │ │ │ +
314 const LeafIterator endit = leafend< 0 >();
│ │ │ │ +
315 for( LeafIterator it = leafbegin< 0 >(); it != endit; ++it )
│ │ │ │ +
316 mark( 1, *it );
│ │ │ │ +
317
│ │ │ │ +
318 preAdapt();
│ │ │ │ +
319 adapt();
│ │ │ │ +
320 postAdapt();
│ │ │ │ +
321 }
│ │ │ │ +
322 }
│ │ │ │ +
│ │ │ │ +
323
│ │ │ │ +
324
│ │ │ │ +
325 template< int dim, int dimworld >
│ │ │ │ +
326 template< class DataHandle >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
329 {
│ │ │ │ +
330 typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
│ │ │ │ +
331
│ │ │ │ +
332 // only MAXL levels allowed
│ │ │ │ +
333 assert( (refCount >= 0) && (refCount + maxlevel_ < MAXL) );
│ │ │ │ +
334
│ │ │ │ +
335 for( int i = 0; i < refCount; ++i )
│ │ │ │ +
336 {
│ │ │ │ +
337 // mark all interior elements
│ │ │ │ +
338 const LeafIterator endit = leafend< 0 >();
│ │ │ │ +
339 for( LeafIterator it = leafbegin< 0 >(); it != endit; ++it )
│ │ │ │ +
340 mark( 1, *it );
│ │ │ │ +
341
│ │ │ │ +
342 adapt( handle );
│ │ │ │ +
343 }
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
346
│ │ │ │ +
│ │ │ │ +
347 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
349 {
│ │ │ │ +
│ │ │ │ +
350 adaptationState_.preAdapt();
│ │ │ │ +
351 return adaptationState_.coarsen();
│ │ │ │ +
352 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
354
│ │ │ │ +
355 template < int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
357 {
│ │ │ │ +
358#ifndef NDEBUG
│ │ │ │ +
359 if( leafIndexSet_ != 0 )
│ │ │ │ +
360 {
│ │ │ │ +
361 bool consistent = true;
│ │ │ │ +
362 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ +
363 {
│ │ │ │ +
364 if( int(leafIndexSet_->size( codim )) == mesh_.size( codim ) )
│ │ │ │ +
365 continue;
│ │ │ │ +
366 std::cerr << "Incorrect size of leaf index set for codimension "
│ │ │ │ +
367 << codim << "!" << std::endl;
│ │ │ │ +
368 std::cerr << "DUNE index set reports: " << leafIndexSet_->size( codim )
│ │ │ │ +
369 << std::endl;
│ │ │ │ +
370 std::cerr << "ALBERTA mesh reports: " << mesh_.size( codim ) << std::endl;
│ │ │ │ +
371 consistent = false;
│ │ │ │ +
372 }
│ │ │ │ +
373 if( !consistent )
│ │ │ │ +
374 abort();
│ │ │ │ +
375 }
│ │ │ │ +
376#endif
│ │ │ │ +
377
│ │ │ │ +
378 levelProvider_.markAllOld();
│ │ │ │ +
379 adaptationState_.postAdapt();
│ │ │ │ +
380 }
│ │ │ │ +
│ │ │ │ +
381
│ │ │ │ +
382
│ │ │ │ +
383 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
385 ::mark( int refCount, const typename Traits::template Codim< 0 >::Entity &e )
│ │ │ │ +
386 {
│ │ │ │ +
387 // if not leaf entity, leave method
│ │ │ │ +
│ │ │ │ +
388 if( !e.isLeaf() )
│ │ │ │ +
389 return false;
│ │ │ │ +
390
│ │ │ │ +
│ │ │ │ +
391 // don't mark macro elements for coarsening
│ │ │ │ +
392 if( refCount < -e.level() )
│ │ │ │ +
393 return false;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
395 // take back previous marking
│ │ │ │ +
396 adaptationState_.unmark( getMark( e ) );
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
398 // set new marking
│ │ │ │ +
399 adaptationState_.mark( refCount );
│ │ │ │ +
400 e.impl().elementInfo().setMark( refCount );
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
402 return true;
│ │ │ │ +
403 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
405
│ │ │ │ +
406 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
409 {
│ │ │ │ +
410 return e.impl().elementInfo().getMark();
│ │ │ │ +
411 }
│ │ │ │ +
│ │ │ │ +
412
│ │ │ │ +
413
│ │ │ │ +
414 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
416 {
│ │ │ │ +
417 // this is already done in postAdapt
│ │ │ │ +
418 //levelProvider_.markAllOld();
│ │ │ │ +
419
│ │ │ │ +
420 // adapt mesh
│ │ │ │ +
421 hIndexSet_.preAdapt();
│ │ │ │ +
422 const bool refined = mesh_.refine();
│ │ │ │ +
423 const bool coarsened = (adaptationState_.coarsen() ? mesh_.coarsen() : false);
│ │ │ │ +
424 adaptationState_.adapt();
│ │ │ │ +
425 hIndexSet_.postAdapt();
│ │ │ │ +
426
│ │ │ │ +
427 if( refined || coarsened )
│ │ │ │ +
428 calcExtras();
│ │ │ │ +
429
│ │ │ │ +
430 // return true if elements were created
│ │ │ │ +
431 return refined;
│ │ │ │ +
432 }
│ │ │ │ +
│ │ │ │ +
433
│ │ │ │ +
434
│ │ │ │ +
435 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ +
436 template< class DataHandle >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
440 preAdapt();
│ │ │ │ +
441
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
446
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
448 typename Callback::DofVectorPointer callbackVector;
│ │ │ │ +
449 callbackVector.create( dofNumbering_.emptyDofSpace(), "Adaptation Callback" );
│ │ │ │ + │ │ │ │ + │ │ │ │ +
452 if( Callback::DofVectorPointer::supportsAdaptationData )
│ │ │ │ +
453 callbackVector.setAdaptationData( &dataHandler );
│ │ │ │ +
454 else
│ │ │ │ +
455 Alberta::adaptationDataHandler_ = &dataHandler;
│ │ │ │ +
456
│ │ │ │ +
457 bool refined = adapt();
│ │ │ │ +
458
│ │ │ │ +
459 if( !Callback::DofVectorPointer::supportsAdaptationData )
│ │ │ │ +
460 Alberta::adaptationDataHandler_ = 0;
│ │ │ │ +
461 callbackVector.release();
│ │ │ │ +
462
│ │ │ │ +
463 postAdapt();
│ │ │ │ +
464 return refined;
│ │ │ │ +
465 }
│ │ │ │ +
466
│ │ │ │ +
467
│ │ │ │ +
468 template< int dim, int dimworld >
│ │ │ │ +
469 inline const Alberta::GlobalVector &
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
471 ::getCoord ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ │ +
472 {
│ │ │ │ +
473 assert( (vertex >= 0) && (vertex <= dim) );
│ │ │ │ +
474#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
475 return coordCache_( elementInfo, vertex );
│ │ │ │ +
476#else
│ │ │ │ +
477 return elementInfo.coordinate( vertex );
│ │ │ │ +
478#endif
│ │ │ │ +
479 }
│ │ │ │ +
│ │ │ │ +
480
│ │ │ │ +
481
│ │ │ │ +
482 template < int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
484 {
│ │ │ │ +
485 return maxlevel_;
│ │ │ │ +
486 }
│ │ │ │ +
│ │ │ │ +
487
│ │ │ │ +
488
│ │ │ │ +
489 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ +
490 inline int AlbertaGrid< dim, dimworld >::size ( int level, int codim ) const
│ │ │ │ +
491 {
│ │ │ │ +
492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, codim ) : 0);
│ │ │ │ +
493 }
│ │ │ │ +
│ │ │ │ +
494
│ │ │ │ +
495
│ │ │ │ +
496 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ +
497 inline int AlbertaGrid< dim, dimworld >::size ( int level, GeometryType type ) const
│ │ │ │ +
498 {
│ │ │ │ +
499 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, type ) : 0);
│ │ │ │ +
500 }
│ │ │ │ +
│ │ │ │ +
501
│ │ │ │ +
502
│ │ │ │ +
503 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
505 {
│ │ │ │ +
506 assert( sizeCache_.size( codim ) == mesh_.size( codim ) );
│ │ │ │ +
507 return mesh_.size( codim );
│ │ │ │ +
508 }
│ │ │ │ +
│ │ │ │ +
509
│ │ │ │ +
510
│ │ │ │ +
511 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ +
512 inline int AlbertaGrid< dim, dimworld >::size ( GeometryType type ) const
│ │ │ │ +
513 {
│ │ │ │ +
514 return sizeCache_.size( type );
│ │ │ │ +
515 }
│ │ │ │ +
│ │ │ │ +
516
│ │ │ │ +
517
│ │ │ │ +
518 template < int dim, int dimworld >
│ │ │ │ +
519 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: LevelIndexSet &
│ │ │ │ +
│ │ │ │ +
520 AlbertaGrid < dim, dimworld > :: levelIndexSet (int level) const
│ │ │ │ +
521 {
│ │ │ │ +
522 // assert that given level is in range
│ │ │ │ +
523 assert( (level >= 0) && (level < (int)levelIndexVec_.size()) );
│ │ │ │ +
524
│ │ │ │ +
525 if( levelIndexVec_[ level ] == 0 )
│ │ │ │ +
526 {
│ │ │ │ +
527 levelIndexVec_[ level ] = new typename GridFamily::LevelIndexSetImp ( dofNumbering_ );
│ │ │ │ +
528 levelIndexVec_[ level ]->update( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ │ +
529 }
│ │ │ │ +
530 return *(levelIndexVec_[ level ]);
│ │ │ │ +
531 }
│ │ │ │ +
│ │ │ │ +
532
│ │ │ │ +
533 template < int dim, int dimworld >
│ │ │ │ +
534 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: LeafIndexSet &
│ │ │ │ +
│ │ │ │ +
535 AlbertaGrid < dim, dimworld > :: leafIndexSet () const
│ │ │ │ +
536 {
│ │ │ │ +
537 if( leafIndexSet_ == 0 )
│ │ │ │ +
538 {
│ │ │ │ +
539 leafIndexSet_ = new typename GridFamily::LeafIndexSetImp( dofNumbering_ );
│ │ │ │ +
540 leafIndexSet_->update( leafbegin< 0 >(), leafend< 0 >() );
│ │ │ │ +
541 }
│ │ │ │ +
542 return *leafIndexSet_;
│ │ │ │ +
543 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
544
│ │ │ │ +
545
│ │ │ │ +
546 template < int dim, int dimworld >
│ │ │ │ +
547 inline void AlbertaGrid < dim, dimworld >::calcExtras ()
│ │ │ │ +
548 {
│ │ │ │ +
549 // determine new maxlevel
│ │ │ │ +
550 maxlevel_ = levelProvider_.maxLevel();
│ │ │ │ +
551 assert( (maxlevel_ >= 0) && (maxlevel_ < MAXL) );
│ │ │ │ +
552
│ │ │ │ +
553 // unset up2Dat status, if lbegin is called then this status is updated
│ │ │ │ +
│ │ │ │ +
554 for( int l = 0; l < MAXL; ++l )
│ │ │ │ +
555 levelMarkerVector_[ l ].clear();
│ │ │ │ +
556
│ │ │ │ +
557 // unset up2Dat status, if leafbegin is called then this status is updated
│ │ │ │ +
558 leafMarkerVector_.clear();
│ │ │ │ +
559
│ │ │ │ +
560 sizeCache_.reset();
│ │ │ │ +
561
│ │ │ │ +
562 // update index sets (if they exist)
│ │ │ │ +
563 if( leafIndexSet_ != 0 )
│ │ │ │ +
564 leafIndexSet_->update( leafbegin< 0 >(), leafend< 0 >() );
│ │ │ │ +
565 for( unsigned int level = 0; level < levelIndexVec_.size(); ++level )
│ │ │ │ +
566 {
│ │ │ │ +
567 if( levelIndexVec_[ level ] )
│ │ │ │ +
568 levelIndexVec_[ level ]->update( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ │ +
569 }
│ │ │ │ +
570 }
│ │ │ │ +
571
│ │ │ │ +
572
│ │ │ │ +
573 template< int dim, int dimworld >
│ │ │ │ +
574 inline bool AlbertaGrid< dim, dimworld >
│ │ │ │ +
│ │ │ │ +
575 ::writeGrid ( const std::string &filename, ctype time ) const
│ │ │ │ +
576 {
│ │ │ │ +
577 if( filename.size() <= 0 )
│ │ │ │ +
578 DUNE_THROW( AlbertaIOError, "No filename given to writeGridXdr." );
│ │ │ │ +
579 return (mesh_.write( filename, time ) && hIndexSet_.write( filename ));
│ │ │ │ +
580 }
│ │ │ │ +
│ │ │ │ +
581
│ │ │ │ +
582
│ │ │ │ +
583 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
585 ::readGrid ( const std::string &filename, ctype &time )
│ │ │ │ +
586 {
│ │ │ │ +
587 //removeMesh();
│ │ │ │ +
588
│ │ │ │ +
589 if( filename.size() <= 0 )
│ │ │ │ +
590 return false;
│ │ │ │ +
591
│ │ │ │ +
592 numBoundarySegments_ = mesh_.read( filename, time );
│ │ │ │ +
593 if( !mesh_ )
│ │ │ │ +
594 DUNE_THROW( AlbertaIOError, "Could not read grid file: " << filename << "." );
│ │ │ │ +
595
│ │ │ │ +
596 setup();
│ │ │ │ +
597 hIndexSet_.read( filename );
│ │ │ │ +
598
│ │ │ │ +
599 // calc maxlevel and indexOnLevel and so on
│ │ │ │ +
600 calcExtras();
│ │ │ │ +
601
│ │ │ │ +
602 return true;
│ │ │ │ +
603 }
│ │ │ │ +
│ │ │ │ +
604
│ │ │ │ +
605
│ │ │ │ +
606 // AlbertaGrid::AdaptationCallback
│ │ │ │ +
607 // -------------------------------
│ │ │ │ +
608
│ │ │ │ +
609 template< int dim, int dimworld >
│ │ │ │ +
610 template< class DataHandler >
│ │ │ │ +
611 struct AlbertaGrid< dim, dimworld >::AdaptationCallback
│ │ │ │ +
612 {
│ │ │ │ +
613 static const int dimension = dim;
│ │ │ │ +
614
│ │ │ │ + │ │ │ │ +
616 typedef Alberta::Patch< dimension > Patch;
│ │ │ │ +
617
│ │ │ │ +
618 static DataHandler &getDataHandler ( const DofVectorPointer &dofVector )
│ │ │ │ +
619 {
│ │ │ │ +
620 DataHandler *dataHandler;
│ │ │ │ +
621 if( DofVectorPointer::supportsAdaptationData )
│ │ │ │ +
622 dataHandler = dofVector.getAdaptationData< DataHandler >();
│ │ │ │ +
623 else
│ │ │ │ +
624 dataHandler = (DataHandler *)Alberta::adaptationDataHandler_;
│ │ │ │ +
625 assert( dataHandler != 0 );
│ │ │ │ +
626 return *dataHandler;
│ │ │ │ +
627 }
│ │ │ │ +
628
│ │ │ │ +
629 static void interpolateVector ( const DofVectorPointer &dofVector,
│ │ │ │ +
630 const Patch &patch )
│ │ │ │ +
631 {
│ │ │ │ +
632 DataHandler &dataHandler = getDataHandler( dofVector );
│ │ │ │ +
633 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ +
634 dataHandler.prolongLocal( patch, i );
│ │ │ │ +
635 }
│ │ │ │ +
636
│ │ │ │ +
637 static void restrictVector ( const DofVectorPointer &dofVector,
│ │ │ │ +
638 const Patch &patch )
│ │ │ │ +
639 {
│ │ │ │ +
640 DataHandler &dataHandler = getDataHandler( dofVector );
│ │ │ │ +
641 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ +
642 dataHandler.restrictLocal( patch, i );
│ │ │ │ +
643 }
│ │ │ │ +
644 };
│ │ │ │ +
645
│ │ │ │ +
646} // namespace Dune
│ │ │ │ +
647
│ │ │ │ +
648#endif
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition geometryreference.hh:26
│ │ │ │ -
static const int mydimension
Definition geometryreference.hh:30
│ │ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
Definition geometryreference.hh:93
│ │ │ │ -
ctype volume() const
Definition geometryreference.hh:98
│ │ │ │ -
const Implementation & impl() const
Definition geometryreference.hh:126
│ │ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Definition geometryreference.hh:118
│ │ │ │ -
GlobalCoordinate center() const
Definition geometryreference.hh:81
│ │ │ │ -
Implementation::JacobianTransposed JacobianTransposed
Definition geometryreference.hh:39
│ │ │ │ -
GeometryReference(const Implementation &impl)
Definition geometryreference.hh:71
│ │ │ │ -
Std::detected_or_t< JacobianInverseDefault, JacobianInverseOfImplementation, Implementation > JacobianInverse
Definition geometryreference.hh:69
│ │ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Definition geometryreference.hh:88
│ │ │ │ -
Implementation::GlobalCoordinate GlobalCoordinate
Definition geometryreference.hh:36
│ │ │ │ -
static const int coorddimension
Definition geometryreference.hh:31
│ │ │ │ -
bool affine() const
Definition geometryreference.hh:77
│ │ │ │ -
GlobalCoordinate corner(int i) const
Definition geometryreference.hh:80
│ │ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Definition geometryreference.hh:105
│ │ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Definition geometryreference.hh:100
│ │ │ │ -
int corners() const
Definition geometryreference.hh:79
│ │ │ │ -
Implementation::LocalCoordinate LocalCoordinate
Definition geometryreference.hh:35
│ │ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Definition geometryreference.hh:83
│ │ │ │ -
Std::detected_or_t< JacobianDefault, JacobianOfImplementation, Implementation > Jacobian
Definition geometryreference.hh:68
│ │ │ │ -
Implementation::ctype ctype
Definition geometryreference.hh:33
│ │ │ │ -
Implementation::JacobianInverseTransposed JacobianInverseTransposed
Definition geometryreference.hh:38
│ │ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Definition geometryreference.hh:110
│ │ │ │ -
GeometryType type() const
Definition geometryreference.hh:75
│ │ │ │ -
Definition geometryreference.hh:139
│ │ │ │ -
LocalGeometryReference(const Implementation &impl)
Definition geometryreference.hh:143
│ │ │ │ -
Wrapper and interface classes for element geometries.
│ │ │ │ +
static void checkAlbertaDimensions()
Definition albertagrid.cc:29
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
static void * adaptationDataHandler_
Definition albertagrid.cc:24
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │ +
static std::string typeName()
Definition agrid.hh:416
│ │ │ │ +
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │ +
bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition albertagrid.cc:385
│ │ │ │ +
Definition albertagrid/datahandle.hh:27
│ │ │ │ +
unsigned int create(const MacroData< dim > &macroData)
Definition meshpointer.hh:299
│ │ │ │ +
Definition dofvector.hh:179
│ │ │ │ + │ │ │ │ +
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ +
void create()
Definition indexsets.cc:140
│ │ │ │ +
Definition albertagrid/indexsets.hh:335
│ │ │ │ +
Definition albertagrid/gridfamily.hh:98
│ │ │ │ +
Definition albertagrid/gridfamily.hh:117
│ │ │ │ +
Definition macrodata.hh:30
│ │ │ │ +
Definition misc.hh:32
│ │ │ │ +
Definition misc.hh:36
│ │ │ │ +
Definition albertagrid/projection.hh:80
│ │ │ │ +
Definition albertagrid/projection.hh:163
│ │ │ │ +
Definition refinement.hh:40
│ │ │ │ +
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,277 +1,752 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -geometryreference.hh │ │ │ │ │ +albertagrid.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// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ -6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTAGRID_CC │ │ │ │ │ +_6#define DUNE_ALBERTAGRID_CC │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -20 │ │ │ │ │ -21 // GeometryReference │ │ │ │ │ -22 // ----------------- │ │ │ │ │ -23 │ │ │ │ │ -24 template< class Implementation > │ │ │ │ │ -_2_5 class _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ -26 { │ │ │ │ │ -27 typedef _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> _T_h_i_s; │ │ │ │ │ -28 │ │ │ │ │ -29 public: │ │ │ │ │ -_3_0 static const int _m_y_d_i_m_e_n_s_i_o_n = Implementation::mydimension; │ │ │ │ │ -_3_1 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = Implementation::coorddimension; │ │ │ │ │ -32 │ │ │ │ │ -_3_3 typedef typename Implementation::ctype _c_t_y_p_e; │ │ │ │ │ -34 │ │ │ │ │ -_3_5 typedef typename Implementation::LocalCoordinate _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ -_3_6 typedef typename Implementation::GlobalCoordinate _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +8//************************************************************************ │ │ │ │ │ +9// │ │ │ │ │ +10// implementation of AlbertaGrid │ │ │ │ │ +11// │ │ │ │ │ +12// namespace Dune │ │ │ │ │ +13// │ │ │ │ │ +14//************************************************************************ │ │ │ │ │ +15#include "_g_e_o_m_e_t_r_y_._c_c" │ │ │ │ │ +16#include "_e_n_t_i_t_y_._c_c" │ │ │ │ │ +17#include "_i_n_t_e_r_s_e_c_t_i_o_n_._c_c" │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 │ │ │ │ │ +_2_2 namespace Alberta │ │ │ │ │ +23 { │ │ │ │ │ +_2_4 static void *_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__; │ │ │ │ │ +25 } │ │ │ │ │ +26 │ │ │ │ │ +27 │ │ │ │ │ +28 template< int dim, int dimworld > │ │ │ │ │ +_2_9 static void _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s () │ │ │ │ │ +30 { │ │ │ │ │ +31 // If this check fails, define ALBERTA_DIM accordingly │ │ │ │ │ +32 static_assert((dimworld == _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d), │ │ │ │ │ +33 "Template Parameter dimworld does not match " │ │ │ │ │ +34 "ALBERTA's DIM_OF_WORLD setting."); │ │ │ │ │ +35 } │ │ │ │ │ +36 │ │ │ │ │ 37 │ │ │ │ │ -_3_8 typedef typename Implementation::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; │ │ │ │ │ -_3_9 typedef typename Implementation::JacobianTransposed _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ +38 // AlbertaGrid │ │ │ │ │ +39 // ----------- │ │ │ │ │ 40 │ │ │ │ │ -41 private: │ │ │ │ │ -42 │ │ │ │ │ -43 template │ │ │ │ │ -44 using JacobianInverseOfImplementation = decltype(typename Implementation_T:: │ │ │ │ │ -JacobianInverse{std::declval().jacobianInverse(std:: │ │ │ │ │ -declval())}); │ │ │ │ │ -45 │ │ │ │ │ -46 using JacobianInverseDefault = decltype(transpose(std:: │ │ │ │ │ -declval())); │ │ │ │ │ -47 │ │ │ │ │ -48 template │ │ │ │ │ -49 using JacobianOfImplementation = decltype(typename Implementation_T:: │ │ │ │ │ -Jacobian{std::declval().jacobian(std:: │ │ │ │ │ -declval())}); │ │ │ │ │ -50 │ │ │ │ │ -51 using JacobianDefault = decltype(transpose(std::declval │ │ │ │ │ -())); │ │ │ │ │ -52 │ │ │ │ │ -53 │ │ │ │ │ -54 template │ │ │ │ │ -55 [[deprecated("Geometry implementatons are required to provide a jacobian │ │ │ │ │ -(local) method. The default implementation is deprecated and will be removed │ │ │ │ │ -after release 2.9")]] │ │ │ │ │ -56 auto deprecatedDefaultJacobian ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l ) const { │ │ │ │ │ -57 return transpose(_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l)); │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 template │ │ │ │ │ -61 [[deprecated("Geometry implementatons are required to provide a │ │ │ │ │ -jacobianInverse(local) method. The default implementation is deprecated and │ │ │ │ │ -will be removed after release 2.9")]] │ │ │ │ │ -62 auto deprecatedDefaultJacobianInverse ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l ) const │ │ │ │ │ -{ │ │ │ │ │ -63 return transpose(_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)); │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -66 public: │ │ │ │ │ -67 │ │ │ │ │ -_6_8 using _J_a_c_o_b_i_a_n = Std::detected_or_t; │ │ │ │ │ -_6_9 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = Std::detected_or_t; │ │ │ │ │ -70 │ │ │ │ │ -_7_1 explicit _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e ( const Implementation &_i_m_p_l ) │ │ │ │ │ -72 : impl_( &_i_m_p_l ) │ │ │ │ │ -73 {} │ │ │ │ │ -74 │ │ │ │ │ -_7_5 GeometryType _t_y_p_e () const { return _i_m_p_l().type(); } │ │ │ │ │ -76 │ │ │ │ │ -_7_7 bool _a_f_f_i_n_e() const { return _i_m_p_l().affine(); } │ │ │ │ │ -78 │ │ │ │ │ -_7_9 int _c_o_r_n_e_r_s () const { return _i_m_p_l().corners(); } │ │ │ │ │ -_8_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r ( int i ) const { return _i_m_p_l().corner( i ); } │ │ │ │ │ -_8_1 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _i_m_p_l().center(); } │ │ │ │ │ +41 template< int dim, int dimworld > │ │ │ │ │ +_4_2 inline _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_A_l_b_e_r_t_a_G_r_i_d () │ │ │ │ │ +43 : mesh_(), │ │ │ │ │ +44 maxlevel_( 0 ), │ │ │ │ │ +45 numBoundarySegments_( 0 ), │ │ │ │ │ +46 hIndexSet_( dofNumbering_ ), │ │ │ │ │ +47 idSet_( hIndexSet_ ), │ │ │ │ │ +48 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ +49 leafIndexSet_( 0 ), │ │ │ │ │ +50 sizeCache_( *_t_h_i_s ), │ │ │ │ │ +51 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ +52 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ +53 { │ │ │ │ │ +54 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_>(); │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +57 │ │ │ │ │ +58 template< int dim, int dimworld > │ │ │ │ │ +59 template< class Proj, class Impl > │ │ │ │ │ +60 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_6_1_ _:_:_A_l_b_e_r_t_a_G_r_i_d ( const _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_> &_m_a_c_r_o_D_a_t_a, │ │ │ │ │ +62 const _A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory ) │ │ │ │ │ +63 : mesh_(), │ │ │ │ │ +64 maxlevel_( 0 ), │ │ │ │ │ +65 numBoundarySegments_( 0 ), │ │ │ │ │ +66 hIndexSet_( dofNumbering_ ), │ │ │ │ │ +67 idSet_( hIndexSet_ ), │ │ │ │ │ +68 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ +69 leafIndexSet_ ( 0 ), │ │ │ │ │ +70 sizeCache_( *_t_h_i_s ), │ │ │ │ │ +71 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ +72 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ +73 { │ │ │ │ │ +74 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>(); │ │ │ │ │ +75 │ │ │ │ │ +76 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_D_a_t_a, projectionFactory ); │ │ │ │ │ +77 if( !mesh_ ) │ │ │ │ │ +78 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_E_r_r_o_r, "Invalid macro data structure." ); │ │ │ │ │ +79 │ │ │ │ │ +80 setup(); │ │ │ │ │ +81 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ 82 │ │ │ │ │ -_8_3 _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 │ │ │ │ │ -84 { │ │ │ │ │ -85 return _i_m_p_l().global( _l_o_c_a_l ); │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -_8_8 _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 │ │ │ │ │ -89 { │ │ │ │ │ -90 return _i_m_p_l().local( _g_l_o_b_a_l ); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -_9_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 │ │ │ │ │ -94 { │ │ │ │ │ -95 return _i_m_p_l().integrationElement( _l_o_c_a_l ); │ │ │ │ │ -96 } │ │ │ │ │ -97 │ │ │ │ │ -_9_8 _c_t_y_p_e _v_o_l_u_m_e () const { return _i_m_p_l().volume(); } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_0 _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 │ │ │ │ │ +83 calcExtras(); │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +86 │ │ │ │ │ +87 template< int dim, int dimworld > │ │ │ │ │ +88 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_8_9_ _:_:_A_l_b_e_r_t_a_G_r_i_d ( const _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_> &_m_a_c_r_o_D_a_t_a, │ │ │ │ │ +90 const std::shared_ptr< _D_u_n_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_w_o_r_l_d_ _> > │ │ │ │ │ +&projection ) │ │ │ │ │ +91 : mesh_(), │ │ │ │ │ +92 maxlevel_( 0 ), │ │ │ │ │ +93 numBoundarySegments_( 0 ), │ │ │ │ │ +94 hIndexSet_( dofNumbering_ ), │ │ │ │ │ +95 idSet_( hIndexSet_ ), │ │ │ │ │ +96 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ +97 leafIndexSet_ ( 0 ), │ │ │ │ │ +98 sizeCache_( *_t_h_i_s ), │ │ │ │ │ +99 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ +100 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ 101 { │ │ │ │ │ -102 return _i_m_p_l().jacobianTransposed( _l_o_c_a_l ); │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_5 _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 │ │ │ │ │ -106 { │ │ │ │ │ -107 return _i_m_p_l().jacobianInverseTransposed( _l_o_c_a_l ); │ │ │ │ │ +102 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>(); │ │ │ │ │ +103 │ │ │ │ │ +104 if( projection != 0 ) │ │ │ │ │ +105 { │ │ │ │ │ +106 _A_l_b_e_r_t_a_:_:_D_u_n_e_G_l_o_b_a_l_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_e_n_s_i_o_n_ _> projectionFactory │ │ │ │ │ +( projection ); │ │ │ │ │ +107 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_D_a_t_a, projectionFactory ); │ │ │ │ │ 108 } │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 _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 │ │ │ │ │ -111 { │ │ │ │ │ -112 if constexpr(Std::is_detected_v) │ │ │ │ │ -113 return _i_m_p_l().jacobian(_l_o_c_a_l); │ │ │ │ │ -114 else │ │ │ │ │ -115 return deprecatedDefaultJacobian(_l_o_c_a_l); │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_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 │ │ │ │ │ -119 { │ │ │ │ │ -120 if constexpr(Std::is_detected_v) │ │ │ │ │ -121 return _i_m_p_l().jacobianInverse(_l_o_c_a_l); │ │ │ │ │ -122 else │ │ │ │ │ -123 return deprecatedDefaultJacobianInverse(_l_o_c_a_l); │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -_1_2_6 const Implementation &_i_m_p_l () const { return *impl_; } │ │ │ │ │ -127 │ │ │ │ │ -128 private: │ │ │ │ │ -129 const Implementation *impl_; │ │ │ │ │ -130 }; │ │ │ │ │ -131 │ │ │ │ │ -132 │ │ │ │ │ -133 // LocalGeometryReference │ │ │ │ │ -134 // ----------------------- │ │ │ │ │ +109 else │ │ │ │ │ +110 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_D_a_t_a ); │ │ │ │ │ +111 if( !mesh_ ) │ │ │ │ │ +112 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_E_r_r_o_r, "Invalid macro data structure." ); │ │ │ │ │ +113 │ │ │ │ │ +114 setup(); │ │ │ │ │ +115 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ +116 │ │ │ │ │ +117 calcExtras(); │ │ │ │ │ +118 } │ │ │ │ │ +119 │ │ │ │ │ +120 │ │ │ │ │ +121 template < int dim, int dimworld > │ │ │ │ │ +122 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_1_2_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d ( const std::string &_m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e ) │ │ │ │ │ +124 : mesh_(), │ │ │ │ │ +125 maxlevel_( 0 ), │ │ │ │ │ +126 hIndexSet_( dofNumbering_ ), │ │ │ │ │ +127 idSet_( hIndexSet_ ), │ │ │ │ │ +128 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ +129 leafIndexSet_ ( 0 ), │ │ │ │ │ +130 sizeCache_( *_t_h_i_s ), │ │ │ │ │ +131 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ +132 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ +133 { │ │ │ │ │ +134 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>(); │ │ │ │ │ 135 │ │ │ │ │ -136 template< int mydim, int cdim, class Grid > │ │ │ │ │ -_1_3_7 class _L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ -138 : public _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e< typename std::remove_const< Grid >::type:: │ │ │ │ │ -Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >:: │ │ │ │ │ -LocalGeometryImpl > │ │ │ │ │ -139 { │ │ │ │ │ -140 typedef typename std::remove_const< Grid >::type::Traits::template Codim< │ │ │ │ │ -std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl │ │ │ │ │ -Implementation; │ │ │ │ │ -141 │ │ │ │ │ -142 public: │ │ │ │ │ -_1_4_3 _L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e ( const Implementation &_i_m_p_l ) │ │ │ │ │ -144 : _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e< Implementation >( _i_m_p_l ) │ │ │ │ │ -145 {} │ │ │ │ │ -146 }; │ │ │ │ │ -147 │ │ │ │ │ +136 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e ); │ │ │ │ │ +137 if( !mesh_ ) │ │ │ │ │ +138 { │ │ │ │ │ +139 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_I_O_E_r_r_o_r, │ │ │ │ │ +140 "Grid file '" << _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e │ │ │ │ │ +141 << "' is not in ALBERTA macro triangulation format." ); │ │ │ │ │ +142 } │ │ │ │ │ +143 │ │ │ │ │ +144 setup(); │ │ │ │ │ +145 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ +146 │ │ │ │ │ +147 calcExtras(); │ │ │ │ │ 148 │ │ │ │ │ -149 │ │ │ │ │ -150 // Definitions of GeometryReference │ │ │ │ │ -151 // -------------------------------- │ │ │ │ │ +149 std::cout << _t_y_p_e_N_a_m_e() << " created from macro grid file '" │ │ │ │ │ +150 << _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e << "'." << std::endl; │ │ │ │ │ +151 } │ │ │ │ │ 152 │ │ │ │ │ -153 template< class Implementation > │ │ │ │ │ -154 const int _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _>_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -155 │ │ │ │ │ -156 template< class Implementation > │ │ │ │ │ -157 const int _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _>_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +153 │ │ │ │ │ +154 template< int dim, int dimworld > │ │ │ │ │ +155 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_e_t_u_p () │ │ │ │ │ +156 { │ │ │ │ │ +157 dofNumbering_.create( mesh_ ); │ │ │ │ │ 158 │ │ │ │ │ -159} // namespace Dune │ │ │ │ │ +159 levelProvider_.create( dofNumbering_ ); │ │ │ │ │ 160 │ │ │ │ │ -161#endif // #ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ +161#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +162 coordCache_.create( dofNumbering_ ); │ │ │ │ │ +163#endif │ │ │ │ │ +164 } │ │ │ │ │ +165 │ │ │ │ │ +166 │ │ │ │ │ +167 template< int dim, int dimworld > │ │ │ │ │ +168 inline void AlbertaGrid< dim, dimworld >::removeMesh () │ │ │ │ │ +169 { │ │ │ │ │ +170 for( size_t i = 0; i < levelIndexVec_.size(); ++i ) │ │ │ │ │ +171 { │ │ │ │ │ +172 if( levelIndexVec_[ i ] != 0 ) │ │ │ │ │ +173 delete levelIndexVec_[ i ]; │ │ │ │ │ +174 levelIndexVec_[ i ] = 0; │ │ │ │ │ +175 } │ │ │ │ │ +176 │ │ │ │ │ +177 if( leafIndexSet_ != 0 ) │ │ │ │ │ +178 delete leafIndexSet_; │ │ │ │ │ +179 leafIndexSet_ = 0; │ │ │ │ │ +180 │ │ │ │ │ +181 // release dof vectors │ │ │ │ │ +182 hIndexSet_.release(); │ │ │ │ │ +183 levelProvider_.release(); │ │ │ │ │ +184#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +185 coordCache_.release(); │ │ │ │ │ +186#endif │ │ │ │ │ +187 dofNumbering_.release(); │ │ │ │ │ +188 │ │ │ │ │ +189 sizeCache_.reset(); │ │ │ │ │ +190 │ │ │ │ │ +191 mesh_.release(); │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +194 │ │ │ │ │ +195 template< int dim, int dimworld > │ │ │ │ │ +_1_9_6 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_~_A_l_b_e_r_t_a_G_r_i_d () │ │ │ │ │ +197 { │ │ │ │ │ +198 removeMesh(); │ │ │ │ │ +199 } │ │ │ │ │ +200 │ │ │ │ │ +201 │ │ │ │ │ +202 template< int dim, int dimworld > │ │ │ │ │ +203 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +204 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +205 ::template Codim< codim >::template Partition::LevelIterator │ │ │ │ │ +_2_0_6 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_b_e_g_i_n ( int level ) const │ │ │ │ │ +207 { │ │ │ │ │ +208 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ +LevelIteratorImp; │ │ │ │ │ +209 _a_s_s_e_r_t( level >= 0 ); │ │ │ │ │ +210 │ │ │ │ │ +211 if( level > maxlevel_ ) │ │ │ │ │ +212 return _l_e_n_d_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_ _>( level ); │ │ │ │ │ +213 _M_a_r_k_e_r_V_e_c_t_o_r &_m_a_r_k_e_r_V_e_c_t_o_r = levelMarkerVector_[ level ]; │ │ │ │ │ +214 │ │ │ │ │ +215 if( (_c_o_d_i_m > 0) && !_m_a_r_k_e_r_V_e_c_t_o_r.up2Date() ) │ │ │ │ │ +216 _m_a_r_k_e_r_V_e_c_t_o_r.template _m_a_r_k_S_u_b_E_n_t_i_t_i_e_s_<_ _1_ _>( _l_b_e_g_i_n_<_ _0_ _>( level ), _l_e_n_d_<_ _0_ _> │ │ │ │ │ +( level ) ); │ │ │ │ │ +217 │ │ │ │ │ +218 return LevelIteratorImp( *this, &_m_a_r_k_e_r_V_e_c_t_o_r, level ); │ │ │ │ │ +219 } │ │ │ │ │ +220 │ │ │ │ │ +221 │ │ │ │ │ +222 template< int dim, int dimworld > │ │ │ │ │ +223 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +224 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +225 ::template Codim< codim >::template Partition< pitype >::LevelIterator │ │ │ │ │ +_2_2_6 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_n_d ( int level ) const │ │ │ │ │ +227 { │ │ │ │ │ +228 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ +LevelIteratorImp; │ │ │ │ │ +229 _a_s_s_e_r_t( level >= 0 ); │ │ │ │ │ +230 │ │ │ │ │ +231 return LevelIteratorImp( *this, level ); │ │ │ │ │ +232 } │ │ │ │ │ +233 │ │ │ │ │ +234 │ │ │ │ │ +235 template< int dim, int dimworld > │ │ │ │ │ +236 template< int codim > │ │ │ │ │ +237 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +238 ::template Codim< codim >::LevelIterator │ │ │ │ │ +_2_3_9 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_b_e_g_i_n ( int level ) const │ │ │ │ │ +240 { │ │ │ │ │ +241 return _l_b_e_g_i_n_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level ); │ │ │ │ │ +242 } │ │ │ │ │ +243 │ │ │ │ │ +244 │ │ │ │ │ +245 template< int dim, int dimworld > │ │ │ │ │ +246 template< int codim > │ │ │ │ │ +247 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +248 ::template Codim< codim >::LevelIterator │ │ │ │ │ +_2_4_9 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_n_d ( int level ) const │ │ │ │ │ +250 { │ │ │ │ │ +251 return _l_e_n_d_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level ); │ │ │ │ │ +252 } │ │ │ │ │ +253 │ │ │ │ │ +254 │ │ │ │ │ +255 template< int dim, int dimworld > │ │ │ │ │ +256 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +257 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +258 ::template Codim< codim >::template Partition< pitype >::LeafIterator │ │ │ │ │ +_2_5_9 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_b_e_g_i_n () const │ │ │ │ │ +260 { │ │ │ │ │ +261 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ +LeafIteratorImp; │ │ │ │ │ +262 │ │ │ │ │ +263 _M_a_r_k_e_r_V_e_c_t_o_r &_m_a_r_k_e_r_V_e_c_t_o_r = leafMarkerVector_; │ │ │ │ │ +264 const int _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m = 2; │ │ │ │ │ +265 if( (_c_o_d_i_m >= _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m) && !_m_a_r_k_e_r_V_e_c_t_o_r.up2Date() ) │ │ │ │ │ +266 _m_a_r_k_e_r_V_e_c_t_o_r.template _m_a_r_k_S_u_b_E_n_t_i_t_i_e_s_<_ _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m_ _>( _l_e_a_f_b_e_g_i_n_<_ _0_ _> │ │ │ │ │ +(), _l_e_a_f_e_n_d_<_ _0_ _>() ); │ │ │ │ │ +267 │ │ │ │ │ +268 return LeafIteratorImp( *this, &_m_a_r_k_e_r_V_e_c_t_o_r, maxlevel_ ); │ │ │ │ │ +269 } │ │ │ │ │ +_2_7_0 │ │ │ │ │ +271 │ │ │ │ │ +272 template< int dim, int dimworld > │ │ │ │ │ +273 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +274 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +275 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_t_e_m_p_l_a_t_e Partition< pitype >::LeafIterator │ │ │ │ │ +_2_7_6 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_e_n_d () const │ │ │ │ │ +_2_7_7 { │ │ │ │ │ +278 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ +LeafIteratorImp; │ │ │ │ │ +279 return LeafIteratorImp( *this, maxlevel_ ); │ │ │ │ │ +280 } │ │ │ │ │ +281 │ │ │ │ │ +_2_8_2 │ │ │ │ │ +283 template< int dim, int dimworld > │ │ │ │ │ +284 template< int codim > │ │ │ │ │ +285 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_d_i_m_,_d_i_m_w_o_r_l_d_>_:_:_T_r_a_i_t_s │ │ │ │ │ +286 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +_2_8_7 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_b_e_g_i_n () const │ │ │ │ │ +288 { │ │ │ │ │ +_2_8_9 return _l_e_a_f_b_e_g_i_n_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ +290 } │ │ │ │ │ +291 │ │ │ │ │ +_2_9_2 │ │ │ │ │ +293 template< int dim, int dimworld > │ │ │ │ │ +294 template< int codim > │ │ │ │ │ +295 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +_2_9_6 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +_2_9_7 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_e_n_d () const │ │ │ │ │ +298 { │ │ │ │ │ +299 return _l_e_a_f_e_n_d_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ +300 } │ │ │ │ │ +301 │ │ │ │ │ +302 │ │ │ │ │ +303 template< int dim, int dimworld > │ │ │ │ │ +_3_0_4 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_g_l_o_b_a_l_R_e_f_i_n_e ( int refCount ) │ │ │ │ │ +305 { │ │ │ │ │ +306 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r LeafIterator; │ │ │ │ │ +307 │ │ │ │ │ +308 // only MAXL levels allowed │ │ │ │ │ +309 _a_s_s_e_r_t( (refCount >= 0) && (refCount + maxlevel_ < MAXL) ); │ │ │ │ │ +310 │ │ │ │ │ +311 for( int i = 0; i < refCount; ++i ) │ │ │ │ │ +312 { │ │ │ │ │ +313 // mark all interior elements │ │ │ │ │ +314 const LeafIterator _e_n_d_i_t = _l_e_a_f_e_n_d_<_ _0_ _>(); │ │ │ │ │ +315 for( LeafIterator _i_t = _l_e_a_f_b_e_g_i_n_<_ _0_ _>(); _i_t != _e_n_d_i_t; ++_i_t ) │ │ │ │ │ +316 mark( 1, *_i_t ); │ │ │ │ │ +317 │ │ │ │ │ +318 preAdapt(); │ │ │ │ │ +319 adapt(); │ │ │ │ │ +320 postAdapt(); │ │ │ │ │ +321 } │ │ │ │ │ +322 } │ │ │ │ │ +323 │ │ │ │ │ +324 │ │ │ │ │ +325 template< int dim, int dimworld > │ │ │ │ │ +326 template< class DataHandle > │ │ │ │ │ +327 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_3_2_8_ _:_:_g_l_o_b_a_l_R_e_f_i_n_e ( int refCount, _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> │ │ │ │ │ +&_h_a_n_d_l_e ) │ │ │ │ │ +329 { │ │ │ │ │ +330 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r LeafIterator; │ │ │ │ │ +331 │ │ │ │ │ +332 // only MAXL levels allowed │ │ │ │ │ +333 _a_s_s_e_r_t( (refCount >= 0) && (refCount + maxlevel_ < MAXL) ); │ │ │ │ │ +334 │ │ │ │ │ +335 for( int i = 0; i < refCount; ++i ) │ │ │ │ │ +336 { │ │ │ │ │ +337 // mark all interior elements │ │ │ │ │ +338 const LeafIterator _e_n_d_i_t = _l_e_a_f_e_n_d_<_ _0_ _>(); │ │ │ │ │ +339 for( LeafIterator _i_t = _l_e_a_f_b_e_g_i_n_<_ _0_ _>(); _i_t != _e_n_d_i_t; ++_i_t ) │ │ │ │ │ +340 mark( 1, *_i_t ); │ │ │ │ │ +341 │ │ │ │ │ +342 adapt( _h_a_n_d_l_e ); │ │ │ │ │ +343 } │ │ │ │ │ +_3_4_4 } │ │ │ │ │ +345 │ │ │ │ │ +346 │ │ │ │ │ +_3_4_7 template< int dim, int dimworld > │ │ │ │ │ +_3_4_8 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_p_r_e_A_d_a_p_t () │ │ │ │ │ +349 { │ │ │ │ │ +_3_5_0 adaptationState_.preAdapt(); │ │ │ │ │ +351 return adaptationState_.coarsen(); │ │ │ │ │ +352 } │ │ │ │ │ +_3_5_3 │ │ │ │ │ +354 │ │ │ │ │ +355 template < int dim, int dimworld > │ │ │ │ │ +_3_5_6 inline void _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_p_o_s_t_A_d_a_p_t () │ │ │ │ │ +357 { │ │ │ │ │ +358#ifndef NDEBUG │ │ │ │ │ +359 if( leafIndexSet_ != 0 ) │ │ │ │ │ +360 { │ │ │ │ │ +361 bool _c_o_n_s_i_s_t_e_n_t = true; │ │ │ │ │ +362 for( int _c_o_d_i_m = 0; _c_o_d_i_m <= dimension; ++_c_o_d_i_m ) │ │ │ │ │ +363 { │ │ │ │ │ +364 if( int(leafIndexSet_->size( _c_o_d_i_m )) == mesh_.size( _c_o_d_i_m ) ) │ │ │ │ │ +365 continue; │ │ │ │ │ +366 std::cerr << "Incorrect size of leaf index set for codimension " │ │ │ │ │ +367 << _c_o_d_i_m << "!" << std::endl; │ │ │ │ │ +368 std::cerr << "DUNE index set reports: " << leafIndexSet_->size( _c_o_d_i_m ) │ │ │ │ │ +369 << std::endl; │ │ │ │ │ +370 std::cerr << "ALBERTA mesh reports: " << mesh_.size( _c_o_d_i_m ) << std::endl; │ │ │ │ │ +371 _c_o_n_s_i_s_t_e_n_t = false; │ │ │ │ │ +372 } │ │ │ │ │ +373 if( !_c_o_n_s_i_s_t_e_n_t ) │ │ │ │ │ +374 _a_b_o_r_t(); │ │ │ │ │ +375 } │ │ │ │ │ +376#endif │ │ │ │ │ +377 │ │ │ │ │ +378 levelProvider_.markAllOld(); │ │ │ │ │ +379 adaptationState_.postAdapt(); │ │ │ │ │ +380 } │ │ │ │ │ +381 │ │ │ │ │ +382 │ │ │ │ │ +383 template< int dim, int dimworld > │ │ │ │ │ +384 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_3_8_5_ _:_:_m_a_r_k( int refCount, const typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_E_n_t_i_t_y &_e │ │ │ │ │ +) │ │ │ │ │ +386 { │ │ │ │ │ +387 // if not leaf entity, leave method │ │ │ │ │ +_3_8_8 if( !_e.isLeaf() ) │ │ │ │ │ +389 return false; │ │ │ │ │ +390 │ │ │ │ │ +_3_9_1 // don't mark macro elements for coarsening │ │ │ │ │ +392 if( refCount < -_e.level() ) │ │ │ │ │ +393 return false; │ │ │ │ │ +_3_9_4 │ │ │ │ │ +395 // take back previous marking │ │ │ │ │ +396 adaptationState_.unmark( getMark( _e ) ); │ │ │ │ │ +_3_9_7 │ │ │ │ │ +398 // set new marking │ │ │ │ │ +399 adaptationState_._m_a_r_k( refCount ); │ │ │ │ │ +400 _e.impl().elementInfo().setMark( refCount ); │ │ │ │ │ +_4_0_1 │ │ │ │ │ +402 return true; │ │ │ │ │ +403 } │ │ │ │ │ +_4_0_4 │ │ │ │ │ +405 │ │ │ │ │ +406 template< int dim, int dimworld > │ │ │ │ │ +_4_0_7 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_4_0_8_ _:_:_g_e_t_M_a_r_k( const typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_E_n_t_i_t_y &_e ) const │ │ │ │ │ +409 { │ │ │ │ │ +410 return _e.impl().elementInfo().getMark(); │ │ │ │ │ +411 } │ │ │ │ │ +412 │ │ │ │ │ +413 │ │ │ │ │ +414 template< int dim, int dimworld > │ │ │ │ │ +_4_1_5 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_a_d_a_p_t () │ │ │ │ │ +416 { │ │ │ │ │ +417 // this is already done in postAdapt │ │ │ │ │ +418 //levelProvider_.markAllOld(); │ │ │ │ │ +419 │ │ │ │ │ +420 // adapt mesh │ │ │ │ │ +421 hIndexSet_.preAdapt(); │ │ │ │ │ +422 const bool _r_e_f_i_n_e_d = mesh_.refine(); │ │ │ │ │ +423 const bool _c_o_a_r_s_e_n_e_d = (adaptationState_.coarsen() ? mesh_.coarsen() : │ │ │ │ │ +false); │ │ │ │ │ +424 adaptationState_.adapt(); │ │ │ │ │ +425 hIndexSet_.postAdapt(); │ │ │ │ │ +426 │ │ │ │ │ +427 if( _r_e_f_i_n_e_d || _c_o_a_r_s_e_n_e_d ) │ │ │ │ │ +428 calcExtras(); │ │ │ │ │ +429 │ │ │ │ │ +430 // return true if elements were created │ │ │ │ │ +431 return _r_e_f_i_n_e_d; │ │ │ │ │ +432 } │ │ │ │ │ +433 │ │ │ │ │ +434 │ │ │ │ │ +435 template< int dim, int dimworld > │ │ │ │ │ +_4_3_6 template< class DataHandle > │ │ │ │ │ +437 inline bool _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_4_3_8 ::adapt ( _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> &_h_a_n_d_l_e ) │ │ │ │ │ +_4_3_9 { │ │ │ │ │ +440 preAdapt(); │ │ │ │ │ +441 │ │ │ │ │ +442 typedef _A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ +443 < _T_h_i_s, _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> > │ │ │ │ │ +444 _D_a_t_a_H_a_n_d_l_e_r; │ │ │ │ │ +_4_4_5 _D_a_t_a_H_a_n_d_l_e_r _d_a_t_a_H_a_n_d_l_e_r( *this, _h_a_n_d_l_e ); │ │ │ │ │ +446 │ │ │ │ │ +447 typedef _A_d_a_p_t_a_t_i_o_n_C_a_l_l_b_a_c_k_<_ _D_a_t_a_H_a_n_d_l_e_r_ _> _C_a_l_l_b_a_c_k; │ │ │ │ │ +_4_4_8 typename Callback::DofVectorPointer _c_a_l_l_b_a_c_k_V_e_c_t_o_r; │ │ │ │ │ +449 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.create( dofNumbering_.emptyDofSpace(), "Adaptation Callback" │ │ │ │ │ +); │ │ │ │ │ +450 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.template _s_e_t_u_p_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _C_a_l_l_b_a_c_k_ _>(); │ │ │ │ │ +451 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.template _s_e_t_u_p_R_e_s_t_r_i_c_t_i_o_n_<_ _C_a_l_l_b_a_c_k_ _>(); │ │ │ │ │ +452 if( Callback::DofVectorPointer::supportsAdaptationData ) │ │ │ │ │ +453 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.setAdaptationData( &_d_a_t_a_H_a_n_d_l_e_r ); │ │ │ │ │ +454 else │ │ │ │ │ +455 Alberta::adaptationDataHandler_ = &_d_a_t_a_H_a_n_d_l_e_r; │ │ │ │ │ +456 │ │ │ │ │ +457 bool _r_e_f_i_n_e_d = adapt(); │ │ │ │ │ +458 │ │ │ │ │ +459 if( !Callback::DofVectorPointer::supportsAdaptationData ) │ │ │ │ │ +460 Alberta::adaptationDataHandler_ = 0; │ │ │ │ │ +461 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.release(); │ │ │ │ │ +462 │ │ │ │ │ +463 postAdapt(); │ │ │ │ │ +464 return _r_e_f_i_n_e_d; │ │ │ │ │ +465 } │ │ │ │ │ +466 │ │ │ │ │ +467 │ │ │ │ │ +468 template< int dim, int dimworld > │ │ │ │ │ +469 inline const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r & │ │ │ │ │ +470 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_4_7_1_ _:_:_g_e_t_C_o_o_r_d ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int vertex ) const │ │ │ │ │ +472 { │ │ │ │ │ +473 _a_s_s_e_r_t( (vertex >= 0) && (vertex <= dim) ); │ │ │ │ │ +474#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +475 return _c_o_o_r_d_C_a_c_h_e__( elementInfo, vertex ); │ │ │ │ │ +476#else │ │ │ │ │ +477 return elementInfo._c_o_o_r_d_i_n_a_t_e( vertex ); │ │ │ │ │ +478#endif │ │ │ │ │ +479 } │ │ │ │ │ +480 │ │ │ │ │ +481 │ │ │ │ │ +482 template < int dim, int dimworld > │ │ │ │ │ +_4_8_3 inline int _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_m_a_x_L_e_v_e_l() const │ │ │ │ │ +484 { │ │ │ │ │ +485 return maxlevel_; │ │ │ │ │ +486 } │ │ │ │ │ +487 │ │ │ │ │ +488 │ │ │ │ │ +489 template< int dim, int dimworld > │ │ │ │ │ +_4_9_0 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int level, int _c_o_d_i_m ) │ │ │ │ │ +const │ │ │ │ │ +491 { │ │ │ │ │ +492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, │ │ │ │ │ +_c_o_d_i_m ) : 0); │ │ │ │ │ +493 } │ │ │ │ │ +494 │ │ │ │ │ +495 │ │ │ │ │ +496 template< int dim, int dimworld > │ │ │ │ │ +_4_9_7 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int level, GeometryType │ │ │ │ │ +type ) const │ │ │ │ │ +498 { │ │ │ │ │ +499 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, type │ │ │ │ │ +) : 0); │ │ │ │ │ +500 } │ │ │ │ │ +501 │ │ │ │ │ +502 │ │ │ │ │ +503 template< int dim, int dimworld > │ │ │ │ │ +_5_0_4 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int _c_o_d_i_m ) const │ │ │ │ │ +505 { │ │ │ │ │ +506 _a_s_s_e_r_t( sizeCache_.size( _c_o_d_i_m ) == mesh_.size( _c_o_d_i_m ) ); │ │ │ │ │ +507 return mesh_.size( _c_o_d_i_m ); │ │ │ │ │ +508 } │ │ │ │ │ +509 │ │ │ │ │ +510 │ │ │ │ │ +511 template< int dim, int dimworld > │ │ │ │ │ +_5_1_2 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( GeometryType type ) const │ │ │ │ │ +513 { │ │ │ │ │ +514 return sizeCache_.size( type ); │ │ │ │ │ +515 } │ │ │ │ │ +516 │ │ │ │ │ +517 │ │ │ │ │ +518 template < int dim, int dimworld > │ │ │ │ │ +519 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: │ │ │ │ │ +LevelIndexSet & │ │ │ │ │ +_5_2_0 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> :: levelIndexSet (int level) const │ │ │ │ │ +521 { │ │ │ │ │ +522 // assert that given level is in range │ │ │ │ │ +523 _a_s_s_e_r_t( (level >= 0) && (level < (int)levelIndexVec_.size()) ); │ │ │ │ │ +524 │ │ │ │ │ +525 if( levelIndexVec_[ level ] == 0 ) │ │ │ │ │ +526 { │ │ │ │ │ +527 levelIndexVec_[ level ] = new typename _G_r_i_d_F_a_m_i_l_y_:_:_L_e_v_e_l_I_n_d_e_x_S_e_t_I_m_p │ │ │ │ │ +( dofNumbering_ ); │ │ │ │ │ +528 levelIndexVec_[ level ]->update( _l_b_e_g_i_n_<_ _0_ _>( level ), _l_e_n_d_<_ _0_ _>( level ) │ │ │ │ │ +); │ │ │ │ │ +529 } │ │ │ │ │ +530 return *(levelIndexVec_[ level ]); │ │ │ │ │ +531 } │ │ │ │ │ +532 │ │ │ │ │ +533 template < int dim, int dimworld > │ │ │ │ │ +534 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: │ │ │ │ │ +LeafIndexSet & │ │ │ │ │ +_5_3_5 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> :: leafIndexSet () const │ │ │ │ │ +536 { │ │ │ │ │ +537 if( leafIndexSet_ == 0 ) │ │ │ │ │ +538 { │ │ │ │ │ +539 leafIndexSet_ = new typename _G_r_i_d_F_a_m_i_l_y_:_:_L_e_a_f_I_n_d_e_x_S_e_t_I_m_p( dofNumbering_ ); │ │ │ │ │ +540 leafIndexSet_->update( _l_e_a_f_b_e_g_i_n_<_ _0_ _>(), _l_e_a_f_e_n_d_<_ _0_ _>() ); │ │ │ │ │ +541 } │ │ │ │ │ +542 return *leafIndexSet_; │ │ │ │ │ +543 } │ │ │ │ │ +544 │ │ │ │ │ +545 │ │ │ │ │ +546 template < int dim, int dimworld > │ │ │ │ │ +547 inline void AlbertaGrid < dim, dimworld >::calcExtras () │ │ │ │ │ +548 { │ │ │ │ │ +549 // determine new maxlevel │ │ │ │ │ +550 maxlevel_ = levelProvider_.maxLevel(); │ │ │ │ │ +551 assert( (maxlevel_ >= 0) && (maxlevel_ < MAXL) ); │ │ │ │ │ +552 │ │ │ │ │ +553 // unset up2Dat status, if lbegin is called then this status is updated │ │ │ │ │ +_5_5_4 for( int _l = 0; _l < MAXL; ++_l ) │ │ │ │ │ +555 levelMarkerVector_[ _l ].clear(); │ │ │ │ │ +556 │ │ │ │ │ +557 // unset up2Dat status, if leafbegin is called then this status is updated │ │ │ │ │ +558 leafMarkerVector_.clear(); │ │ │ │ │ +559 │ │ │ │ │ +560 sizeCache_.reset(); │ │ │ │ │ +561 │ │ │ │ │ +562 // update index sets (if they exist) │ │ │ │ │ +563 if( leafIndexSet_ != 0 ) │ │ │ │ │ +564 leafIndexSet_->update( _l_e_a_f_b_e_g_i_n_<_ _0_ _>(), _l_e_a_f_e_n_d_<_ _0_ _>() ); │ │ │ │ │ +565 for( unsigned int level = 0; level < levelIndexVec_.size(); ++level ) │ │ │ │ │ +566 { │ │ │ │ │ +567 if( levelIndexVec_[ level ] ) │ │ │ │ │ +568 levelIndexVec_[ level ]->update( _l_b_e_g_i_n_<_ _0_ _>( level ), _l_e_n_d_<_ _0_ _>( level ) │ │ │ │ │ +); │ │ │ │ │ +569 } │ │ │ │ │ +570 } │ │ │ │ │ +571 │ │ │ │ │ +572 │ │ │ │ │ +573 template< int dim, int dimworld > │ │ │ │ │ +574 inline bool AlbertaGrid< dim, dimworld > │ │ │ │ │ +_5_7_5 ::writeGrid ( const std::string &filename, _c_t_y_p_e _t_i_m_e ) const │ │ │ │ │ +576 { │ │ │ │ │ +577 if( filename.size() <= 0 ) │ │ │ │ │ +578 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_I_O_E_r_r_o_r, "No filename given to writeGridXdr." ); │ │ │ │ │ +579 return (mesh_.write( filename, _t_i_m_e ) && hIndexSet_.write( filename )); │ │ │ │ │ +580 } │ │ │ │ │ +581 │ │ │ │ │ +582 │ │ │ │ │ +583 template< int dim, int dimworld > │ │ │ │ │ +584 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_5_8_5_ _:_:_r_e_a_d_G_r_i_d ( const std::string &filename, _c_t_y_p_e &_t_i_m_e ) │ │ │ │ │ +586 { │ │ │ │ │ +587 //removeMesh(); │ │ │ │ │ +588 │ │ │ │ │ +589 if( filename.size() <= 0 ) │ │ │ │ │ +590 return false; │ │ │ │ │ +591 │ │ │ │ │ +592 numBoundarySegments_ = mesh_.read( filename, _t_i_m_e ); │ │ │ │ │ +593 if( !mesh_ ) │ │ │ │ │ +594 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_I_O_E_r_r_o_r, "Could not read grid file: " << filename << "." │ │ │ │ │ +); │ │ │ │ │ +595 │ │ │ │ │ +596 setup(); │ │ │ │ │ +597 hIndexSet_.read( filename ); │ │ │ │ │ +598 │ │ │ │ │ +599 // calc maxlevel and indexOnLevel and so on │ │ │ │ │ +600 calcExtras(); │ │ │ │ │ +601 │ │ │ │ │ +602 return true; │ │ │ │ │ +603 } │ │ │ │ │ +604 │ │ │ │ │ +605 │ │ │ │ │ +606 // AlbertaGrid::AdaptationCallback │ │ │ │ │ +607 // ------------------------------- │ │ │ │ │ +608 │ │ │ │ │ +609 template< int dim, int dimworld > │ │ │ │ │ +610 template< class DataHandler > │ │ │ │ │ +611 struct _A_l_b_e_r_t_a_G_r_i_d< dim, dimworld >::AdaptationCallback │ │ │ │ │ +612 { │ │ │ │ │ +613 static const int dimension = dim; │ │ │ │ │ +614 │ │ │ │ │ +615 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ │ +DofVectorPointer; │ │ │ │ │ +616 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> Patch; │ │ │ │ │ +617 │ │ │ │ │ +618 static DataHandler &getDataHandler ( const DofVectorPointer &dofVector ) │ │ │ │ │ +619 { │ │ │ │ │ +620 DataHandler *dataHandler; │ │ │ │ │ +621 if( DofVectorPointer::supportsAdaptationData ) │ │ │ │ │ +622 dataHandler = dofVector.getAdaptationData< DataHandler >(); │ │ │ │ │ +623 else │ │ │ │ │ +624 dataHandler = (DataHandler *)Alberta::adaptationDataHandler_; │ │ │ │ │ +625 assert( dataHandler != 0 ); │ │ │ │ │ +626 return *dataHandler; │ │ │ │ │ +627 } │ │ │ │ │ +628 │ │ │ │ │ +629 static void interpolateVector ( const DofVectorPointer &dofVector, │ │ │ │ │ +630 const Patch &patch ) │ │ │ │ │ +631 { │ │ │ │ │ +632 DataHandler &dataHandler = getDataHandler( dofVector ); │ │ │ │ │ +633 for( int i = 0; i < patch.count(); ++i ) │ │ │ │ │ +634 dataHandler.prolongLocal( patch, i ); │ │ │ │ │ +635 } │ │ │ │ │ +636 │ │ │ │ │ +637 static void restrictVector ( const DofVectorPointer &dofVector, │ │ │ │ │ +638 const Patch &patch ) │ │ │ │ │ +639 { │ │ │ │ │ +640 DataHandler &dataHandler = getDataHandler( dofVector ); │ │ │ │ │ +641 for( int i = 0; i < patch.count(); ++i ) │ │ │ │ │ +642 dataHandler.restrictLocal( patch, i ); │ │ │ │ │ +643 } │ │ │ │ │ +644 }; │ │ │ │ │ +645 │ │ │ │ │ +646} // namespace Dune │ │ │ │ │ +647 │ │ │ │ │ +648#endif │ │ │ │ │ +_g_e_o_m_e_t_r_y_._c_c │ │ │ │ │ +_e_n_t_i_t_y_._c_c │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._c_c │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int mydimension │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ -ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_v_o_l_u_m_e │ │ │ │ │ -ctype volume() const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_i_m_p_l │ │ │ │ │ -const Implementation & impl() const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:126 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ │ -JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_e_n_t_e_r │ │ │ │ │ -GlobalCoordinate center() const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -Implementation::JacobianTransposed JacobianTransposed │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ -GeometryReference(const Implementation &impl) │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ │ -Std::detected_or_t< JacobianInverseDefault, JacobianInverseOfImplementation, │ │ │ │ │ -Implementation > JacobianInverse │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_l_o_c_a_l │ │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -Implementation::GlobalCoordinate GlobalCoordinate │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int coorddimension │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_a_f_f_i_n_e │ │ │ │ │ -bool affine() const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_o_r_n_e_r │ │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_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 │ │ │ │ │ -JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ │ -&local) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_o_r_n_e_r_s │ │ │ │ │ -int corners() const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -Implementation::LocalCoordinate LocalCoordinate │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_g_l_o_b_a_l │ │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_J_a_c_o_b_i_a_n │ │ │ │ │ -Std::detected_or_t< JacobianDefault, JacobianOfImplementation, Implementation > │ │ │ │ │ -Jacobian │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_t_y_p_e │ │ │ │ │ -Implementation::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_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 │ │ │ │ │ -Implementation::JacobianInverseTransposed JacobianInverseTransposed │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_j_a_c_o_b_i_a_n │ │ │ │ │ -Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ -LocalGeometryReference(const Implementation &impl) │ │ │ │ │ -DDeeffiinniittiioonn geometryreference.hh:143 │ │ │ │ │ -_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ -Wrapper and interface classes for element geometries. │ │ │ │ │ +_D_u_n_e_:_:_c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s │ │ │ │ │ +static void checkAlbertaDimensions() │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__ │ │ │ │ │ +static void * adaptationDataHandler_ │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ +[ provides Dune::Grid ] │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_t_y_p_e_N_a_m_e │ │ │ │ │ +static std::string typeName() │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:416 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ +GridFamily::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_m_a_r_k │ │ │ │ │ +bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e) │ │ │ │ │ +Marks an entity to be refined/coarsened in a subsequent adapt. │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:385 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/datahandle.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +unsigned int create(const MacroData< dim > ¯oData) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +const GlobalVector & coordinate(int vertex) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t_:_:_c_r_e_a_t_e │ │ │ │ │ +void create() │ │ │ │ │ +DDeeffiinniittiioonn indexsets.cc:140 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/indexsets.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_G_l_o_b_a_l_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +marker assigning subentities to one element containing them │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leafiterator.hh File Reference │ │ │ │ +dune-grid: entity.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,37 +70,48 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
leafiterator.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
entity.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ -#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
 
class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Macros

#define DUNE_ALBERTA_ENTITY_CC
 
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTA_ENTITY_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTA_ENTITY_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,22 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -leafiterator.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ +entity.cc 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_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A___E_N_T_I_T_Y___C_C │ │ │ │ │ +  │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__EENNTTIITTYY__CCCC ********** │ │ │ │ │ +#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leafiterator.hh Source File │ │ │ │ +dune-grid: entity.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,146 +74,493 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
leafiterator.hh
│ │ │ │ +
entity.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │ -
6#define DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_ENTITY_CC
│ │ │ │ +
6#define DUNE_ALBERTA_ENTITY_CC
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ +
8namespace Dune
│ │ │ │ +
9{
│ │ │ │ +
10
│ │ │ │ +
11 // AlbertaGridEntity (for codim > 0)
│ │ │ │ +
12 // ---------------------------------
│ │ │ │
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 // AlbertaGridLeafIterator
│ │ │ │ -
18 // -----------------------
│ │ │ │ -
19
│ │ │ │ -
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ │ -
23 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ -
28 typedef typename Base::Entity Entity;
│ │ │ │ - │ │ │ │ -
30
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 {}
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ -
36 : Base( grid, level )
│ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ +
14 template<int codim, int dim, class Grid>
│ │ │ │ +
15 inline AlbertaGridEntity< codim, dim, Grid >
│ │ │ │ +
│ │ │ │ +
16 ::AlbertaGridEntity ( const Grid &grid, const ElementInfo &elementInfo, int subEntity )
│ │ │ │ +
17 : grid_( &grid ),
│ │ │ │ +
18 elementInfo_( elementInfo ),
│ │ │ │ +
19 subEntity_( subEntity )
│ │ │ │ +
20 {}
│ │ │ │ +
│ │ │ │ +
21
│ │ │ │ +
22 template<int codim, int dim, class Grid>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 : grid_( &grid ),
│ │ │ │ +
26 elementInfo_(),
│ │ │ │ +
27 subEntity_( -1 )
│ │ │ │ +
28 {}
│ │ │ │ +
│ │ │ │ +
29
│ │ │ │ +
30 template<int codim, int dim, class Grid>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 : grid_( NULL ),
│ │ │ │ +
34 elementInfo_(),
│ │ │ │ +
35 subEntity_( -1 )
│ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
38 template< int codim, int dim, class Grid >
│ │ │ │ +
39 inline PartitionType
│ │ │ │
│ │ │ │ -
40 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ │ -
41 const MarkerVector *vec,
│ │ │ │ -
42 int level )
│ │ │ │ -
43 : Base( grid, vec, level )
│ │ │ │ -
44 {}
│ │ │ │ + │ │ │ │ +
41 {
│ │ │ │ +
42 return InteriorEntity;
│ │ │ │ +
43 }
│ │ │ │
│ │ │ │ +
44
│ │ │ │
45
│ │ │ │ -
│ │ │ │ -
47 void increment ()
│ │ │ │ -
48 {
│ │ │ │ - │ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ +
46 template< int codim, int dim, class Grid >
│ │ │ │ +
47 inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
49 {
│ │ │ │ +
50 const Alberta::Element *e1 = elementInfo().el();
│ │ │ │ +
51 const Alberta::Element *e2 = other.elementInfo().el();
│ │ │ │
52
│ │ │ │ -
53
│ │ │ │ -
54 template< int codim, class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ │ -
57 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
60
│ │ │ │ -
61 public:
│ │ │ │ -
62 typedef typename Base::Entity Entity;
│ │ │ │ - │ │ │ │ -
64
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 {}
│ │ │ │ +
53 // if both element null then they are equal
│ │ │ │ +
54 if( (e1 == NULL) && (e2 == NULL) )
│ │ │ │ +
55 return true;
│ │ │ │ +
56 return ((e1 == e2) && (subEntity_ == other.subEntity_));
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
59
│ │ │ │ +
60 template< int codim, int dim, class Grid >
│ │ │ │ +
61 inline ALBERTA EL_INFO *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 {
│ │ │ │ +
64 return &(elementInfo_.elInfo());
│ │ │ │ +
65 }
│ │ │ │
│ │ │ │ +
66
│ │ │ │
67
│ │ │ │ -
│ │ │ │ -
69 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ -
70 : Base( grid, level )
│ │ │ │ -
71 {}
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
74 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ │ -
75 const MarkerVector *,
│ │ │ │ -
76 int level )
│ │ │ │ -
77 : Base( grid, level )
│ │ │ │ -
78 {}
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 void increment ()
│ │ │ │ -
82 {
│ │ │ │ - │ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85 };
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
87}
│ │ │ │ -
88
│ │ │ │ -
89#endif // #if HAVE_ALBERTA
│ │ │ │ -
90
│ │ │ │ -
91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │ +
68 template< int codim, int dim, class Grid >
│ │ │ │ +
69 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71 {
│ │ │ │ +
72 elementInfo_ = ElementInfo();
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75
│ │ │ │ +
76 template< int codim, int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
78 ::setElement ( const ElementInfo &elementInfo, int subEntity )
│ │ │ │ +
79 {
│ │ │ │ +
80 elementInfo_ = elementInfo;
│ │ │ │ +
81 subEntity_ = subEntity;
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
84
│ │ │ │ +
85 template< int codim, int dim, class Grid >
│ │ │ │ +
86 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
88 {
│ │ │ │ +
89 setElement( other.elementInfo_, other.subEntity_ );
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
92
│ │ │ │ +
93 template< int codim, int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
95 {
│ │ │ │ +
96 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ │ +
97 return elementInfo_.level();
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
100
│ │ │ │ +
101 template< int codim, int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
104 {
│ │ │ │ + │ │ │ │ +
106
│ │ │ │ +
107 assert( elementInfo_ );
│ │ │ │ +
108 const CoordReader coordReader( grid(), elementInfo_, subEntity_ );
│ │ │ │ +
109 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
112
│ │ │ │ +
113 template< int codim, int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
115 {
│ │ │ │ +
116 return GeometryTypes::simplex( mydimension );
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
119
│ │ │ │ +
120
│ │ │ │ +
121 // AlbertaGridEntity (for codim = 0)
│ │ │ │ +
122 // ---------------------------------
│ │ │ │ +
123
│ │ │ │ +
124 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
126 ::AlbertaGridEntity ( const Grid &grid, const ElementInfo &elementInfo, int subEntity )
│ │ │ │ +
127 : grid_( &grid ),
│ │ │ │ +
128 elementInfo_( elementInfo )
│ │ │ │ +
129 {
│ │ │ │ +
130 assert( subEntity == 0 );
│ │ │ │ +
131 }
│ │ │ │ +
│ │ │ │ +
132
│ │ │ │ +
133 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
136 : grid_( &grid ),
│ │ │ │ +
137 elementInfo_()
│ │ │ │ +
138 {}
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
140 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
143 : grid_( NULL ),
│ │ │ │ +
144 elementInfo_()
│ │ │ │ +
145 {}
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147
│ │ │ │ +
148 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
150 {
│ │ │ │ +
151 // elements are always inside of our Domain
│ │ │ │ +
152 return 0;
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154
│ │ │ │ +
155
│ │ │ │ +
156 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
158 {
│ │ │ │ +
159 return grid().levelProvider().isNew( elementInfo_ );
│ │ │ │ +
160 }
│ │ │ │ +
│ │ │ │ +
161
│ │ │ │ +
162
│ │ │ │ +
163 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
165 {
│ │ │ │ +
166 return elementInfo_.mightVanish();
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
169
│ │ │ │ +
170 template< int dim, class Grid >
│ │ │ │ +
171 inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
173 {
│ │ │ │ +
174 assert( elementInfo_ );
│ │ │ │ +
175 bool isBoundary = false;
│ │ │ │ +
176 for( int i = 0; i < dim+1; ++i )
│ │ │ │ +
177 isBoundary |= elementInfo_.isBoundary( i );
│ │ │ │ +
178 return isBoundary;
│ │ │ │ +
179 }
│ │ │ │ +
│ │ │ │ +
180
│ │ │ │ +
181
│ │ │ │ +
182 template< int dim, class Grid >
│ │ │ │ +
183 inline PartitionType
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
185 {
│ │ │ │ +
186 return InteriorEntity;
│ │ │ │ +
187 }
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
189
│ │ │ │ +
190 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
192 {
│ │ │ │ +
193 return elementInfo_.isLeaf();
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
196
│ │ │ │ +
197 template< int dim, class Grid >
│ │ │ │ +
198 inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
200 {
│ │ │ │ +
201 // element pointers are unique
│ │ │ │ +
202 return (elementInfo().el() == other.elementInfo().el());
│ │ │ │ +
203 }
│ │ │ │ +
│ │ │ │ +
204
│ │ │ │ +
205
│ │ │ │ +
206 template< int dim, class Grid >
│ │ │ │ +
207 template< int codim >
│ │ │ │ +
208 inline typename Grid::template Codim< codim >::Entity
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
210 {
│ │ │ │ +
211 typedef AlbertaGridEntity< codim, dim, Grid > EntityImpl;
│ │ │ │ +
212 return EntityImpl( grid(), elementInfo_, grid().generic2alberta( codim, i ) );
│ │ │ │ +
213 }
│ │ │ │ +
│ │ │ │ +
214
│ │ │ │ +
215
│ │ │ │ +
216 template< int dim, class Grid >
│ │ │ │ +
217 inline ALBERTA EL_INFO *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
219 {
│ │ │ │ +
220 return &(elementInfo_.elInfo());
│ │ │ │ +
221 }
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
223
│ │ │ │ +
224 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
226 {
│ │ │ │ +
227 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ │ +
228 return elementInfo_.level();
│ │ │ │ +
229 }
│ │ │ │ +
│ │ │ │ +
230
│ │ │ │ +
231
│ │ │ │ +
232 template< int dim, class Grid >
│ │ │ │ +
233 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
235 {
│ │ │ │ +
236 elementInfo_ = ElementInfo();
│ │ │ │ +
237 }
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
239
│ │ │ │ +
240 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
242 ::setElement ( const ElementInfo &elementInfo, int /* subEntity */ )
│ │ │ │ +
243 {
│ │ │ │ +
244 elementInfo_ = elementInfo;
│ │ │ │ +
245 }
│ │ │ │ +
│ │ │ │ +
246
│ │ │ │ +
247
│ │ │ │ +
248 template< int dim, class Grid >
│ │ │ │ +
249 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
251 {
│ │ │ │ +
252 setElement( other.elementInfo_, 0 );
│ │ │ │ +
253 }
│ │ │ │ +
│ │ │ │ +
254
│ │ │ │ +
255
│ │ │ │ +
256 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
259 {
│ │ │ │ +
260 typedef AlbertaGridCoordinateReader< 0, Grid > CoordReader;
│ │ │ │ +
261
│ │ │ │ +
262 assert( elementInfo_ );
│ │ │ │ +
263 const CoordReader coordReader( grid(), elementInfo_, 0 );
│ │ │ │ +
264 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ +
265 }
│ │ │ │ +
│ │ │ │ +
266
│ │ │ │ +
267
│ │ │ │ +
268 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ +
269 inline GeometryType AlbertaGridEntity< 0, dim, Grid>::type () const
│ │ │ │ +
270 {
│ │ │ │ +
271 return GeometryTypes::simplex( mydimension );
│ │ │ │ +
272 }
│ │ │ │ +
│ │ │ │ +
273
│ │ │ │ +
274
│ │ │ │ +
275 template< int dim, class Grid >
│ │ │ │ +
276 inline typename Grid::template Codim< 0 >::Entity
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
278 {
│ │ │ │ +
279 typedef AlbertaGridEntity< 0, dim, Grid > EntityImpl;
│ │ │ │ +
280
│ │ │ │ +
281 assert( elementInfo_ );
│ │ │ │ +
282 const ElementInfo fatherInfo = elementInfo_.father();
│ │ │ │ +
283
│ │ │ │ +
284 return EntityImpl( grid(), fatherInfo, 0 );
│ │ │ │ +
285 }
│ │ │ │ +
│ │ │ │ +
286
│ │ │ │ +
287
│ │ │ │ +
288 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
290 {
│ │ │ │ +
291 return elementInfo_.indexInFather();
│ │ │ │ +
292 }
│ │ │ │ +
293
│ │ │ │ +
294
│ │ │ │ +
295 template< int dim, class Grid >
│ │ │ │ +
296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
298 {
│ │ │ │ +
299 typedef AlbertaGridLocalGeometryProvider< Grid > LocalGeoProvider;
│ │ │ │ +
300 const int indexInFather = elementInfo_.indexInFather();
│ │ │ │ +
301 const int orientation = (elementInfo_.type() == 1 ? -1 : 1);
│ │ │ │ +
302 return LocalGeometry( LocalGeoProvider::instance().geometryInFather( indexInFather, orientation ) );
│ │ │ │ +
303 }
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
305
│ │ │ │ +
306 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
309 {
│ │ │ │ +
310 assert( elementInfo_ );
│ │ │ │ +
311 typedef AlbertaGridHierarchicIterator< Grid > IteratorImp;
│ │ │ │ +
312 return IteratorImp( grid(), elementInfo_, maxlevel );
│ │ │ │ +
313 }
│ │ │ │ +
│ │ │ │ +
314
│ │ │ │ +
315
│ │ │ │ +
316 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
319 {
│ │ │ │ +
320 assert( elementInfo_ );
│ │ │ │ +
321 typedef AlbertaGridHierarchicIterator< Grid > IteratorImp;
│ │ │ │ +
322 return IteratorImp( grid(), level(), maxlevel );
│ │ │ │ +
323 }
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
325
│ │ │ │ +
326 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
329 {
│ │ │ │ +
330 assert( elementInfo_ );
│ │ │ │ +
331
│ │ │ │ +
332#ifndef NDEBUG
│ │ │ │ +
333 for( int i = 0; i <= dimension; ++i )
│ │ │ │ +
334 {
│ │ │ │ +
335 // std::cout << "Opposite vertex " << i << ": "
│ │ │ │ +
336 // << (int)(getElInfo()->opp_vertex[ i ]) << std::endl;
│ │ │ │ +
337 if( getElInfo()->opp_vertex[ i ] == 127 )
│ │ │ │ +
338 {
│ │ │ │ +
339 assert( false );
│ │ │ │ +
340 DUNE_THROW( NotImplemented, "AlbertaGrid: Intersections on outside "
│ │ │ │ +
341 "entities are not fully implemented, yet." );
│ │ │ │ +
342 }
│ │ │ │ +
343 }
│ │ │ │ +
344#endif // #ifndef NDEBUG
│ │ │ │ +
345
│ │ │ │ + │ │ │ │ +
347 return AlbertaGridLeafIntersectionIterator( *this, begin );
│ │ │ │ +
348 }
│ │ │ │ +
│ │ │ │ +
349
│ │ │ │ +
350
│ │ │ │ +
351 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
354 {
│ │ │ │ +
355 assert( elementInfo_ );
│ │ │ │ + │ │ │ │ +
357 return AlbertaGridLeafIntersectionIterator( *this, end );
│ │ │ │ +
358 }
│ │ │ │ +
│ │ │ │ +
359
│ │ │ │ +
360} // namespace Dune
│ │ │ │ +
361
│ │ │ │ +
362#endif // #ifndef DUNE_ALBERTA_ENTITY_CC
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ +
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition treeiterator.hh:189
│ │ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ │ -
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ │ -
void increment()
increment
Definition treeiterator.hh:411
│ │ │ │ -
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ │ -
Definition leafiterator.hh:23
│ │ │ │ -
Base::Entity Entity
Definition leafiterator.hh:28
│ │ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leafiterator.hh:35
│ │ │ │ -
Base::MarkerVector MarkerVector
Definition leafiterator.hh:29
│ │ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition leafiterator.hh:40
│ │ │ │ -
AlbertaGridLeafIterator()
Definition leafiterator.hh:31
│ │ │ │ -
void increment()
increment the iterator
Definition leafiterator.hh:47
│ │ │ │ - │ │ │ │ -
Base::Entity Entity
Definition leafiterator.hh:62
│ │ │ │ -
void increment()
increment the iterator
Definition leafiterator.hh:81
│ │ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition leafiterator.hh:74
│ │ │ │ - │ │ │ │ -
Base::MarkerVector MarkerVector
Definition leafiterator.hh:63
│ │ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leafiterator.hh:69
│ │ │ │ -
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ + │ │ │ │ +
int level() const
Definition elementinfo.hh:533
│ │ │ │ +
bool mightVanish() const
Definition elementinfo.hh:526
│ │ │ │ +
ElementInfo father() const
Definition elementinfo.hh:449
│ │ │ │ +
int type() const
Definition elementinfo.hh:540
│ │ │ │ +
bool isBoundary(int face) const
Definition elementinfo.hh:620
│ │ │ │ +
int indexInFather() const
Definition elementinfo.hh:457
│ │ │ │ +
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
│ │ │ │ +
Definition hierarchiciterator.hh:29
│ │ │ │ +
Definition albertagrid/intersectioniterator.hh:27
│ │ │ │ +
Definition albertagrid/entity.hh:46
│ │ │ │ +
void clearElement()
Definition entity.cc:70
│ │ │ │ +
ALBERTA EL_INFO * getElInfo() const
needed for the LevelIterator and LeafIterator
Definition entity.cc:62
│ │ │ │ +
int level() const
level of this element
Definition entity.cc:94
│ │ │ │ +
void setElement(const ElementInfo &elementInfo, int subEntity)
Definition entity.cc:78
│ │ │ │ +
PartitionType partitionType() const
return partition type of this entity
Definition entity.cc:40
│ │ │ │ +
Grid::template Codim< codim >::Geometry Geometry
Definition albertagrid/entity.hh:69
│ │ │ │ +
void setEntity(const This &other)
Definition entity.cc:87
│ │ │ │ +
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:130
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition entity.cc:103
│ │ │ │ +
static const int dimension
Definition albertagrid/entity.hh:57
│ │ │ │ +
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:142
│ │ │ │ +
int subEntity() const
obtain number of the subentity within the element (in ALBERTA numbering)
Definition albertagrid/entity.hh:148
│ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:71
│ │ │ │ +
GeometryType type() const
type of geometry of this entity
Definition entity.cc:114
│ │ │ │ +
bool equals(const This &other) const
equality of entities
Definition entity.cc:48
│ │ │ │ +
Definition albertagrid/entity.hh:63
│ │ │ │ +
Definition albertagrid/entity.hh:185
│ │ │ │ +
Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:211
│ │ │ │ +
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:355
│ │ │ │ +
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:210
│ │ │ │ +
Definition albertagrid/geometry.hh:30
│ │ │ │ +
Definition albertagrid/geometry.hh:504
│ │ │ │ +
Definition albertagrid/intersectioniterator.hh:35
│ │ │ │ +
Definition albertagrid/intersectioniterator.hh:36
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,176 +1,505 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -leafiterator.hh │ │ │ │ │ +entity.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// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ -6#define DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ +_6#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12#if HAVE_ALBERTA │ │ │ │ │ +8namespace _D_u_n_e │ │ │ │ │ +9{ │ │ │ │ │ +10 │ │ │ │ │ +11 // AlbertaGridEntity (for codim > 0) │ │ │ │ │ +12 // --------------------------------- │ │ │ │ │ 13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 // AlbertaGridLeafIterator │ │ │ │ │ -18 // ----------------------- │ │ │ │ │ -19 │ │ │ │ │ -20 template< int codim, PartitionIteratorType pitype, class GridImp > │ │ │ │ │ -_2_1 class _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -22 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, true > │ │ │ │ │ -23 { │ │ │ │ │ -24 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ -25 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _> _B_a_s_e; │ │ │ │ │ -26 │ │ │ │ │ -27 public: │ │ │ │ │ -_2_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_2_9 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ -30 │ │ │ │ │ -_3_1 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r () │ │ │ │ │ -32 {} │ │ │ │ │ -33 │ │ │ │ │ -_3_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ -36 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ -37 {} │ │ │ │ │ -38 │ │ │ │ │ -_4_0 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ -41 const _M_a_r_k_e_r_V_e_c_t_o_r *vec, │ │ │ │ │ -42 int _l_e_v_e_l ) │ │ │ │ │ -43 : _B_a_s_e( _g_r_i_d, vec, _l_e_v_e_l ) │ │ │ │ │ -44 {} │ │ │ │ │ +14 template │ │ │ │ │ +15 inline AlbertaGridEntity< codim, dim, Grid > │ │ │ │ │ +_1_6 ::AlbertaGridEntity ( const _G_r_i_d &grid, const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int │ │ │ │ │ +subEntity ) │ │ │ │ │ +17 : grid_( &grid ), │ │ │ │ │ +18 elementInfo_( elementInfo ), │ │ │ │ │ +19 subEntity_( subEntity ) │ │ │ │ │ +20 {} │ │ │ │ │ +21 │ │ │ │ │ +22 template │ │ │ │ │ +23 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_2_4_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y ( const _G_r_i_d &grid ) │ │ │ │ │ +25 : grid_( &grid ), │ │ │ │ │ +26 elementInfo_(), │ │ │ │ │ +27 subEntity_( -1 ) │ │ │ │ │ +28 {} │ │ │ │ │ +29 │ │ │ │ │ +30 template │ │ │ │ │ +31 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_3_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y () │ │ │ │ │ +33 : grid_( _N_U_L_L ), │ │ │ │ │ +34 elementInfo_(), │ │ │ │ │ +35 subEntity_( -1 ) │ │ │ │ │ +36 {} │ │ │ │ │ +37 │ │ │ │ │ +38 template< int codim, int dim, class Grid > │ │ │ │ │ +39 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +_4_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_d_i_m_,_G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ +41 { │ │ │ │ │ +42 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ 45 │ │ │ │ │ -_4_7 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -48 { │ │ │ │ │ -49 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ -50 } │ │ │ │ │ -51 }; │ │ │ │ │ +46 template< int codim, int dim, class Grid > │ │ │ │ │ +47 inline bool │ │ │ │ │ +_4_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_q_u_a_l_s ( const _T_h_i_s &_o_t_h_e_r ) const │ │ │ │ │ +49 { │ │ │ │ │ +50 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *_e_1 = elementInfo().el(); │ │ │ │ │ +51 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *_e_2 = _o_t_h_e_r.elementInfo().el(); │ │ │ │ │ 52 │ │ │ │ │ -53 │ │ │ │ │ -54 template< int codim, class GridImp > │ │ │ │ │ -_5_5 class _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r< codim, _G_h_o_s_t___P_a_r_t_i_t_i_o_n, GridImp > │ │ │ │ │ -56 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, true > │ │ │ │ │ -57 { │ │ │ │ │ -58 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ -59 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _> _B_a_s_e; │ │ │ │ │ -60 │ │ │ │ │ -61 public: │ │ │ │ │ -_6_2 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_6_3 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ -64 │ │ │ │ │ -_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r () │ │ │ │ │ -66 {} │ │ │ │ │ +53 // if both element null then they are equal │ │ │ │ │ +54 if( (_e_1 == _N_U_L_L) && (_e_2 == _N_U_L_L) ) │ │ │ │ │ +55 return true; │ │ │ │ │ +56 return ((_e_1 == _e_2) && (subEntity_ == _o_t_h_e_r.subEntity_)); │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +59 │ │ │ │ │ +60 template< int codim, int dim, class Grid > │ │ │ │ │ +61 inline _A_L_B_E_R_T_A EL_INFO * │ │ │ │ │ +_6_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_t_E_l_I_n_f_o () const │ │ │ │ │ +63 { │ │ │ │ │ +64 return &(elementInfo_.elInfo()); │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ 67 │ │ │ │ │ -_6_9 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ -70 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ -71 {} │ │ │ │ │ -72 │ │ │ │ │ -_7_4 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ -75 const _M_a_r_k_e_r_V_e_c_t_o_r *, │ │ │ │ │ -76 int _l_e_v_e_l ) │ │ │ │ │ -77 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ -78 {} │ │ │ │ │ -79 │ │ │ │ │ -_8_1 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -82 { │ │ │ │ │ -83 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ -84 } │ │ │ │ │ -85 }; │ │ │ │ │ -86 │ │ │ │ │ -87} │ │ │ │ │ -88 │ │ │ │ │ -89#endif // #if HAVE_ALBERTA │ │ │ │ │ -90 │ │ │ │ │ -91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Ghost_Partition │ │ │ │ │ -only ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ +68 template< int codim, int dim, class Grid > │ │ │ │ │ +69 inline void │ │ │ │ │ +_7_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_c_l_e_a_r_E_l_e_m_e_n_t () │ │ │ │ │ +71 { │ │ │ │ │ +72 elementInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +75 │ │ │ │ │ +76 template< int codim, int dim, class Grid > │ │ │ │ │ +77 inline void _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_7_8_ _:_:_s_e_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) │ │ │ │ │ +79 { │ │ │ │ │ +80 elementInfo_ = elementInfo; │ │ │ │ │ +81 subEntity_ = subEntity; │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +84 │ │ │ │ │ +85 template< int codim, int dim, class Grid > │ │ │ │ │ +86 inline void │ │ │ │ │ +_8_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_e_t_E_n_t_i_t_y ( const _T_h_i_s &_o_t_h_e_r ) │ │ │ │ │ +88 { │ │ │ │ │ +89 setElement( _o_t_h_e_r.elementInfo_, _o_t_h_e_r.subEntity_ ); │ │ │ │ │ +90 } │ │ │ │ │ +91 │ │ │ │ │ +92 │ │ │ │ │ +93 template< int codim, int dim, class Grid > │ │ │ │ │ +_9_4 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_l_e_v_e_l() const │ │ │ │ │ +95 { │ │ │ │ │ +96 _a_s_s_e_r_t( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) ); │ │ │ │ │ +97 return elementInfo_.level(); │ │ │ │ │ +98 } │ │ │ │ │ +99 │ │ │ │ │ +100 │ │ │ │ │ +101 template< int codim, int dim, class Grid > │ │ │ │ │ +102 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +_1_0_3 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ +104 { │ │ │ │ │ +105 typedef _A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r_<_ _c_o_d_i_m_,_ _G_r_i_d_ _> _C_o_o_r_d_R_e_a_d_e_r; │ │ │ │ │ +106 │ │ │ │ │ +107 _a_s_s_e_r_t( elementInfo_ ); │ │ │ │ │ +108 const _C_o_o_r_d_R_e_a_d_e_r _c_o_o_r_d_R_e_a_d_e_r( grid(), elementInfo_, subEntity_ ); │ │ │ │ │ +109 return _G_e_o_m_e_t_r_y( GeometryImpl( _c_o_o_r_d_R_e_a_d_e_r ) ); │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +112 │ │ │ │ │ +113 template< int codim, int dim, class Grid > │ │ │ │ │ +_1_1_4 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_t_y_p_e () const │ │ │ │ │ +115 { │ │ │ │ │ +116 return GeometryTypes::simplex( mydimension ); │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +119 │ │ │ │ │ +120 │ │ │ │ │ +121 // AlbertaGridEntity (for codim = 0) │ │ │ │ │ +122 // --------------------------------- │ │ │ │ │ +123 │ │ │ │ │ +124 template< int dim, class Grid > │ │ │ │ │ +125 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_1_2_6_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y ( const _G_r_i_d &grid, const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int │ │ │ │ │ +subEntity ) │ │ │ │ │ +127 : grid_( &grid ), │ │ │ │ │ +128 elementInfo_( elementInfo ) │ │ │ │ │ +129 { │ │ │ │ │ +130 assert( _s_u_b_E_n_t_i_t_y == 0 ); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +133 template< int dim, class Grid > │ │ │ │ │ +134 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_1_3_5_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y( const _G_r_i_d &grid ) │ │ │ │ │ +136 : grid_( &grid ), │ │ │ │ │ +137 elementInfo_() │ │ │ │ │ +138 {} │ │ │ │ │ +139 │ │ │ │ │ +140 template< int dim, class Grid > │ │ │ │ │ +141 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_1_4_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y () │ │ │ │ │ +143 : grid_( NULL ), │ │ │ │ │ +144 elementInfo_() │ │ │ │ │ +145 {} │ │ │ │ │ +146 │ │ │ │ │ +147 │ │ │ │ │ +148 template< int dim, class Grid > │ │ │ │ │ +_1_4_9 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d() const │ │ │ │ │ +150 { │ │ │ │ │ +151 // elements are always inside of our Domain │ │ │ │ │ +152 return 0; │ │ │ │ │ +153 } │ │ │ │ │ +154 │ │ │ │ │ +155 │ │ │ │ │ +156 template< int dim, class Grid > │ │ │ │ │ +_1_5_7 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_s_N_e_w () const │ │ │ │ │ +158 { │ │ │ │ │ +159 return _g_r_i_d().levelProvider().isNew( elementInfo_ ); │ │ │ │ │ +160 } │ │ │ │ │ +161 │ │ │ │ │ +162 │ │ │ │ │ +163 template< int dim, class Grid > │ │ │ │ │ +_1_6_4 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ │ +165 { │ │ │ │ │ +166 return elementInfo_._m_i_g_h_t_V_a_n_i_s_h(); │ │ │ │ │ +167 } │ │ │ │ │ +168 │ │ │ │ │ +169 │ │ │ │ │ +170 template< int dim, class Grid > │ │ │ │ │ +171 inline bool │ │ │ │ │ +_1_7_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_a_s_B_o_u_n_d_a_r_y_I_n_t_e_r_s_e_c_t_i_o_n_s () const │ │ │ │ │ +173 { │ │ │ │ │ +174 assert( elementInfo_ ); │ │ │ │ │ +175 bool isBoundary = false; │ │ │ │ │ +176 for( int i = 0; i < dim+1; ++i ) │ │ │ │ │ +177 isBoundary |= elementInfo_._i_s_B_o_u_n_d_a_r_y( i ); │ │ │ │ │ +178 return isBoundary; │ │ │ │ │ +179 } │ │ │ │ │ +180 │ │ │ │ │ +181 │ │ │ │ │ +182 template< int dim, class Grid > │ │ │ │ │ +183 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +_1_8_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ +185 { │ │ │ │ │ +186 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +187 } │ │ │ │ │ +188 │ │ │ │ │ +189 │ │ │ │ │ +190 template< int dim, class Grid > │ │ │ │ │ +_1_9_1 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_G_r_i_d_ _>_:_:_i_s_L_e_a_f () const │ │ │ │ │ +192 { │ │ │ │ │ +193 return elementInfo_.isLeaf(); │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +196 │ │ │ │ │ +197 template< int dim, class Grid > │ │ │ │ │ +198 inline bool │ │ │ │ │ +_1_9_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ │ +200 { │ │ │ │ │ +201 // element pointers are unique │ │ │ │ │ +202 return (_e_l_e_m_e_n_t_I_n_f_o().el() == other._e_l_e_m_e_n_t_I_n_f_o().el()); │ │ │ │ │ +203 } │ │ │ │ │ +204 │ │ │ │ │ +205 │ │ │ │ │ +206 template< int dim, class Grid > │ │ │ │ │ +207 template< int codim > │ │ │ │ │ +208 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< codim >::Entity │ │ │ │ │ +_2_0_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_u_b_E_n_t_i_t_y ( int i ) const │ │ │ │ │ +210 { │ │ │ │ │ +211 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ │ +212 return EntityImpl( _g_r_i_d(), elementInfo_, _g_r_i_d().generic2alberta( codim, i ) │ │ │ │ │ +); │ │ │ │ │ +213 } │ │ │ │ │ +214 │ │ │ │ │ +215 │ │ │ │ │ +216 template< int dim, class Grid > │ │ │ │ │ +217 inline _A_L_B_E_R_T_A EL_INFO * │ │ │ │ │ +_2_1_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_t_E_l_I_n_f_o () const │ │ │ │ │ +219 { │ │ │ │ │ +220 return &(elementInfo_._e_l_I_n_f_o()); │ │ │ │ │ +221 } │ │ │ │ │ +222 │ │ │ │ │ +223 │ │ │ │ │ +224 template< int dim, class Grid > │ │ │ │ │ +_2_2_5 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_l_e_v_e_l () const │ │ │ │ │ +226 { │ │ │ │ │ +227 assert( elementInfo_._l_e_v_e_l() == _g_r_i_d().levelProvider() ( elementInfo_ ) ); │ │ │ │ │ +228 return elementInfo_._l_e_v_e_l(); │ │ │ │ │ +229 } │ │ │ │ │ +230 │ │ │ │ │ +231 │ │ │ │ │ +232 template< int dim, class Grid > │ │ │ │ │ +233 inline void │ │ │ │ │ +_2_3_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_c_l_e_a_r_E_l_e_m_e_n_t () │ │ │ │ │ +235 { │ │ │ │ │ +236 elementInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +239 │ │ │ │ │ +240 template< int dim, class Grid > │ │ │ │ │ +241 inline void _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +_2_4_2_ _:_:_s_e_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int /* subEntity */ ) │ │ │ │ │ +243 { │ │ │ │ │ +244 elementInfo_ = elementInfo; │ │ │ │ │ +245 } │ │ │ │ │ +246 │ │ │ │ │ +247 │ │ │ │ │ +248 template< int dim, class Grid > │ │ │ │ │ +249 inline void │ │ │ │ │ +_2_5_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_e_t_E_n_t_i_t_y( const _T_h_i_s &other ) │ │ │ │ │ +251 { │ │ │ │ │ +252 _s_e_t_E_l_e_m_e_n_t( other.elementInfo_, 0 ); │ │ │ │ │ +253 } │ │ │ │ │ +254 │ │ │ │ │ +255 │ │ │ │ │ +256 template< int dim, class Grid > │ │ │ │ │ +257 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +_2_5_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ +259 { │ │ │ │ │ +260 typedef _A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r_<_ _0_,_ _G_r_i_d_ _> CoordReader; │ │ │ │ │ +261 │ │ │ │ │ +262 assert( elementInfo_ ); │ │ │ │ │ +263 const CoordReader coordReader( _g_r_i_d(), elementInfo_, 0 ); │ │ │ │ │ +264 return _G_e_o_m_e_t_r_y( _G_e_o_m_e_t_r_y_I_m_p_l( coordReader ) ); │ │ │ │ │ +265 } │ │ │ │ │ +266 │ │ │ │ │ +267 │ │ │ │ │ +268 template< int dim, class Grid > │ │ │ │ │ +_2_6_9 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_>_:_:_t_y_p_e () const │ │ │ │ │ +270 { │ │ │ │ │ +271 return GeometryTypes::simplex( mydimension ); │ │ │ │ │ +272 } │ │ │ │ │ +273 │ │ │ │ │ +274 │ │ │ │ │ +275 template< int dim, class Grid > │ │ │ │ │ +276 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity │ │ │ │ │ +_2_7_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_f_a_t_h_e_r () const │ │ │ │ │ +278 { │ │ │ │ │ +279 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ │ +280 │ │ │ │ │ +281 assert( elementInfo_ ); │ │ │ │ │ +282 const _E_l_e_m_e_n_t_I_n_f_o fatherInfo = elementInfo_._f_a_t_h_e_r(); │ │ │ │ │ +283 │ │ │ │ │ +284 return EntityImpl( _g_r_i_d(), fatherInfo, 0 ); │ │ │ │ │ +285 } │ │ │ │ │ +286 │ │ │ │ │ +287 │ │ │ │ │ +288 template< int dim, class Grid > │ │ │ │ │ +289 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_n_C_h_i_l_d () const │ │ │ │ │ +290 { │ │ │ │ │ +291 return elementInfo_._i_n_d_e_x_I_n_F_a_t_h_e_r(); │ │ │ │ │ +292 } │ │ │ │ │ +293 │ │ │ │ │ +294 │ │ │ │ │ +295 template< int dim, class Grid > │ │ │ │ │ +296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry │ │ │ │ │ +_2_9_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r() const │ │ │ │ │ +298 { │ │ │ │ │ +299 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _> LocalGeoProvider; │ │ │ │ │ +300 const int indexInFather = elementInfo_._i_n_d_e_x_I_n_F_a_t_h_e_r(); │ │ │ │ │ +301 const int orientation = (elementInfo_._t_y_p_e() == 1 ? -1 : 1); │ │ │ │ │ +302 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().geometryInFather │ │ │ │ │ +( indexInFather, orientation ) ); │ │ │ │ │ +303 } │ │ │ │ │ +304 │ │ │ │ │ +305 │ │ │ │ │ +306 template< int dim, class Grid > │ │ │ │ │ +307 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_0_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_b_e_g_i_n( int maxlevel ) const │ │ │ │ │ +309 { │ │ │ │ │ +310 assert( elementInfo_ ); │ │ │ │ │ +311 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_ _> IteratorImp; │ │ │ │ │ +312 return IteratorImp( _g_r_i_d(), elementInfo_, maxlevel ); │ │ │ │ │ +313 } │ │ │ │ │ +314 │ │ │ │ │ +315 │ │ │ │ │ +316 template< int dim, class Grid > │ │ │ │ │ +317 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_1_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_>_:_:_h_e_n_d( int maxlevel ) const │ │ │ │ │ +319 { │ │ │ │ │ +320 assert( elementInfo_ ); │ │ │ │ │ +321 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_ _> IteratorImp; │ │ │ │ │ +322 return IteratorImp( grid(), level(), maxlevel ); │ │ │ │ │ +323 } │ │ │ │ │ +324 │ │ │ │ │ +325 │ │ │ │ │ +326 template< int dim, class Grid > │ │ │ │ │ +327 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_2_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_l_e_a_f_b_e_g_i_n() const │ │ │ │ │ +329 { │ │ │ │ │ +330 assert( elementInfo_ ); │ │ │ │ │ +331 │ │ │ │ │ +332#ifndef NDEBUG │ │ │ │ │ +333 for( int i = 0; i <= _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ +334 { │ │ │ │ │ +335 // std::cout << "Opposite vertex " << i << ": " │ │ │ │ │ +336 // << (int)(getElInfo()->opp_vertex[ i ]) << std::endl; │ │ │ │ │ +337 if( _g_e_t_E_l_I_n_f_o()->opp_vertex[ i ] == 127 ) │ │ │ │ │ +338 { │ │ │ │ │ +339 assert( false ); │ │ │ │ │ +340 DUNE_THROW( NotImplemented, "AlbertaGrid: Intersections on outside " │ │ │ │ │ +341 "entities are not fully implemented, yet." ); │ │ │ │ │ +342 } │ │ │ │ │ +343 } │ │ │ │ │ +344#endif // #ifndef NDEBUG │ │ │ │ │ +345 │ │ │ │ │ +346 typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_B_e_g_i_n begin; │ │ │ │ │ +347 return _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r( *this, begin ); │ │ │ │ │ +348 } │ │ │ │ │ +349 │ │ │ │ │ +350 │ │ │ │ │ +351 template< int dim, class Grid > │ │ │ │ │ +352 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_5_3 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_l_e_a_f_e_n_d() const │ │ │ │ │ +354 { │ │ │ │ │ +355 assert( elementInfo_ ); │ │ │ │ │ +356 typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_E_n_d end; │ │ │ │ │ +357 return _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r( *this, end ); │ │ │ │ │ +358 } │ │ │ │ │ +359 │ │ │ │ │ +360} // namespace Dune │ │ │ │ │ +361 │ │ │ │ │ +362#endif // #ifndef DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ +@ InteriorEntity │ │ │ │ │ +all interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +ALBERTA EL Element │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ │ int level() const │ │ │ │ │ -ask for level of entities │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_g_r_i_d │ │ │ │ │ -const GridImp & grid() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_i_g_h_t_V_a_n_i_s_h │ │ │ │ │ +bool mightVanish() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:526 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_f_a_t_h_e_r │ │ │ │ │ +ElementInfo father() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:449 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_y_p_e │ │ │ │ │ +int type() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:540 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ +bool isBoundary(int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:620 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r │ │ │ │ │ +int indexInFather() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:457 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_I_n_f_o │ │ │ │ │ +ALBERTA EL_INFO & elInfo() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:744 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_c_l_e_a_r_E_l_e_m_e_n_t │ │ │ │ │ +void clearElement() │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:70 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_g_e_t_E_l_I_n_f_o │ │ │ │ │ +ALBERTA EL_INFO * getElInfo() const │ │ │ │ │ +needed for the LevelIterator and LeafIterator │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:62 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +level of this element │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:94 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_s_e_t_E_l_e_m_e_n_t │ │ │ │ │ +void setElement(const ElementInfo &elementInfo, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:78 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType partitionType() const │ │ │ │ │ +return partition type of this entity │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< codim >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_s_e_t_E_n_t_i_t_y │ │ │ │ │ +void setEntity(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:87 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +const ElementInfo & elementInfo() const │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +geometry of this entity │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:103 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ obtain a reference to the grid │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLeafIterator(const GridImp &grid, int level) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -Base::MarkerVector MarkerVector │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int │ │ │ │ │ -level) │ │ │ │ │ -Constructor making begin iterator. │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLeafIterator() │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment the iterator │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment the iterator │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level) │ │ │ │ │ -Constructor making begin iterator (which is the end iterator in this case) │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLeafIterator() │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -Base::MarkerVector MarkerVector │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridLeafIterator(const GridImp &grid, int level) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn leafiterator.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -marker assigning subentities to one element containing them │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ +int subEntity() const │ │ │ │ │ +obtain number of the subentity within the element (in ALBERTA numbering) │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +type of geometry of this entity │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:114 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const This &other) const │ │ │ │ │ +equality of entities │ │ │ │ │ +DDeeffiinniittiioonn entity.cc:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y_I_m_p_l │ │ │ │ │ +Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:211 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +const ElementInfo & elementInfo() const │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:355 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_B_e_g_i_n │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_E_n_d │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-2.0.hh File Reference │ │ │ │ +dune-grid: intersection.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,25 +69,58 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
undefine-2.0.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
intersection.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ +
#include <dune/grid/albertagrid/intersection.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::AlbertaGridIntersectionBase< Grid >::GlobalCoordReader< GridImp >
 
struct  Dune::AlbertaGridIntersectionBase< Grid >::LocalCoordReader< GridImp >
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Macros

#define DUNE_ALBERTA_INTERSECTION_CC
 
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTA_INTERSECTION_CC

│ │ │ │ │ │ │ │ -

Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ -More...

│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ +
│ │ │ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Contains #undefs for all preprocessor macros defined by alberta.

│ │ │ │ -

This file is created automatically by the perl script undefAllMacros.pl.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,29 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -undefine-2.0.hh File Reference │ │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. _M_o_r_e_._._. │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ +intersection.cc File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_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_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ │ -This file is created automatically by the perl script undefAllMacros.pl. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d_I_m_p │ │ │ │ │ + _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A___I_N_T_E_R_S_E_C_T_I_O_N___C_C │ │ │ │ │ +  │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__IINNTTEERRSSEECCTTIIOONN__CCCC ********** │ │ │ │ │ +#define DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-2.0.hh Source File │ │ │ │ +dune-grid: intersection.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,476 +74,618 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
undefine-2.0.hh
│ │ │ │ +
intersection.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
12#ifdef _ALBERTA_H_
│ │ │ │ -
13 #undef _ALBERTA_H_
│ │ │ │ -
14#endif // _ALBERTA_H_
│ │ │ │ +
5#ifndef DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ +
6#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
13 // AlbertaGridIntersectionBase
│ │ │ │ +
14 // ---------------------------
│ │ │ │
15
│ │ │ │ -
16#ifdef ALBERTA_VERSION
│ │ │ │ -
17 #undef ALBERTA_VERSION
│ │ │ │ -
18#endif // ALBERTA_VERSION
│ │ │ │ -
19
│ │ │ │ -
20#ifdef ALBERTA_DEBUG
│ │ │ │ -
21 #undef ALBERTA_DEBUG
│ │ │ │ -
22#endif // ALBERTA_DEBUG
│ │ │ │ +
16 template< class Grid >
│ │ │ │ +
17 inline AlbertaGridIntersectionBase< Grid >
│ │ │ │ +
│ │ │ │ +
18 ::AlbertaGridIntersectionBase ()
│ │ │ │ +
19 : grid_( nullptr ),
│ │ │ │ +
20 elementInfo_(),
│ │ │ │ +
21 oppVertex_( -1 ) // mark invalid intersection
│ │ │ │ +
22 {}
│ │ │ │ +
│ │ │ │
23
│ │ │ │ -
24#ifdef DIM_MAX
│ │ │ │ -
25 #undef DIM_MAX
│ │ │ │ -
26#endif // DIM_MAX
│ │ │ │ -
27
│ │ │ │ -
28#ifdef N_VERTICES
│ │ │ │ -
29 #undef N_VERTICES
│ │ │ │ -
30#endif // N_VERTICES
│ │ │ │ +
24 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
26 ::AlbertaGridIntersectionBase ( const EntityImp &entity, const int oppVertex )
│ │ │ │ +
27 : grid_( &entity.grid() ),
│ │ │ │ +
28 elementInfo_( entity.elementInfo() ),
│ │ │ │ +
29 oppVertex_( oppVertex )
│ │ │ │ +
30 {}
│ │ │ │ +
│ │ │ │
31
│ │ │ │ -
32#ifdef N_EDGES
│ │ │ │ -
33 #undef N_EDGES
│ │ │ │ -
34#endif // N_EDGES
│ │ │ │ -
35
│ │ │ │ -
36#ifdef N_WALLS
│ │ │ │ -
37 #undef N_WALLS
│ │ │ │ -
38#endif // N_WALLS
│ │ │ │ -
39
│ │ │ │ -
40#ifdef N_FACES
│ │ │ │ -
41 #undef N_FACES
│ │ │ │ -
42#endif // N_FACES
│ │ │ │ -
43
│ │ │ │ -
44#ifdef N_NEIGH
│ │ │ │ -
45 #undef N_NEIGH
│ │ │ │ -
46#endif // N_NEIGH
│ │ │ │ +
32
│ │ │ │ +
33 template< class Grid >
│ │ │ │ +
34 inline typename Grid::template Codim< 0 >::Entity
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {
│ │ │ │ + │ │ │ │ +
38 return EntityImp( grid(), elementInfo(), 0 );
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
41
│ │ │ │ +
42 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
44 {
│ │ │ │ +
45 return elementInfo().isBoundary( oppVertex_ );
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │
47
│ │ │ │ -
48#ifdef DIM_FAC
│ │ │ │ -
49 #undef DIM_FAC
│ │ │ │ -
50#endif // DIM_FAC
│ │ │ │ -
51
│ │ │ │ -
52#ifdef N_VERTICES_0D
│ │ │ │ -
53 #undef N_VERTICES_0D
│ │ │ │ -
54#endif // N_VERTICES_0D
│ │ │ │ -
55
│ │ │ │ -
56#ifdef N_EDGES_0D
│ │ │ │ -
57 #undef N_EDGES_0D
│ │ │ │ -
58#endif // N_EDGES_0D
│ │ │ │ -
59
│ │ │ │ -
60#ifdef N_FACES_0D
│ │ │ │ -
61 #undef N_FACES_0D
│ │ │ │ -
62#endif // N_FACES_0D
│ │ │ │ -
63
│ │ │ │ -
64#ifdef N_NEIGH_0D
│ │ │ │ -
65 #undef N_NEIGH_0D
│ │ │ │ -
66#endif // N_NEIGH_0D
│ │ │ │ -
67
│ │ │ │ -
68#ifdef N_WALLS_0D
│ │ │ │ -
69 #undef N_WALLS_0D
│ │ │ │ -
70#endif // N_WALLS_0D
│ │ │ │ +
48
│ │ │ │ +
49 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 {
│ │ │ │ +
52 if( boundary() )
│ │ │ │ +
53 {
│ │ │ │ +
54 const int id = elementInfo().boundaryId( oppVertex_ );
│ │ │ │ +
55 assert( id != 0 );
│ │ │ │ +
56 return id;
│ │ │ │ +
57 }
│ │ │ │ +
58 else
│ │ │ │ +
59 return 0;
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
65 {
│ │ │ │ +
│ │ │ │ +
66 assert( boundary() );
│ │ │ │ +
67 const Alberta::BasicNodeProjection *projection = elementInfo().boundaryProjection( oppVertex_ );
│ │ │ │ +
│ │ │ │ +
68 assert( projection );
│ │ │ │ +
│ │ │ │ +
69 return projection->boundaryIndex();
│ │ │ │ +
70 }
│ │ │ │
71
│ │ │ │ -
72#ifdef N_VERTICES_1D
│ │ │ │ -
73 #undef N_VERTICES_1D
│ │ │ │ -
74#endif // N_VERTICES_1D
│ │ │ │ -
75
│ │ │ │ -
76#ifdef N_EDGES_1D
│ │ │ │ -
77 #undef N_EDGES_1D
│ │ │ │ -
78#endif // N_EDGES_1D
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
73 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 {
│ │ │ │ +
│ │ │ │ +
76 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ +
│ │ │ │ +
77 return grid().alberta2generic( 1, face );
│ │ │ │ +
│ │ │ │ +
78 }
│ │ │ │
79
│ │ │ │ -
80#ifdef N_FACES_1D
│ │ │ │ -
81 #undef N_FACES_1D
│ │ │ │ -
82#endif // N_FACES_1D
│ │ │ │ -
83
│ │ │ │ -
84#ifdef N_NEIGH_1D
│ │ │ │ -
85 #undef N_NEIGH_1D
│ │ │ │ -
86#endif // N_NEIGH_1D
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
81 template< class Grid >
│ │ │ │ +
│ │ │ │ +
82 inline GeometryType AlbertaGridIntersectionBase< Grid >::type () const
│ │ │ │ +
83 {
│ │ │ │ +
84 return GeometryTypes::simplex( dimension-1 );
│ │ │ │ +
85 }
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │
87
│ │ │ │ -
88#ifdef N_WALLS_1D
│ │ │ │ -
89 #undef N_WALLS_1D
│ │ │ │ -
90#endif // N_WALLS_1D
│ │ │ │ -
91
│ │ │ │ -
92#ifdef N_VERTICES_2D
│ │ │ │ -
93 #undef N_VERTICES_2D
│ │ │ │ -
94#endif // N_VERTICES_2D
│ │ │ │ -
95
│ │ │ │ -
96#ifdef N_EDGES_2D
│ │ │ │ -
97 #undef N_EDGES_2D
│ │ │ │ -
98#endif // N_EDGES_2D
│ │ │ │ -
99
│ │ │ │ -
100#ifdef N_FACES_2D
│ │ │ │ -
101 #undef N_FACES_2D
│ │ │ │ -
102#endif // N_FACES_2D
│ │ │ │ -
103
│ │ │ │ -
104#ifdef N_NEIGH_2D
│ │ │ │ -
105 #undef N_NEIGH_2D
│ │ │ │ -
106#endif // N_NEIGH_2D
│ │ │ │ +
│ │ │ │ +
88 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
91 {
│ │ │ │ +
92 const typename Entity::Geometry geoInside = inside().geometry();
│ │ │ │ +
93
│ │ │ │ +
94 const int face = indexInInside();
│ │ │ │ +
95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex();
│ │ │ │ +
96 FieldVector< ctype, dimension > refNormal = refSimplex.integrationOuterNormal( face );
│ │ │ │ +
97
│ │ │ │ +
98 const typename Entity::Geometry::JacobianInverseTransposed &jInvT
│ │ │ │ +
99 = geoInside.impl().jacobianInverseTransposed();
│ │ │ │ +
100
│ │ │ │ +
101 NormalVector normal;
│ │ │ │ +
102 jInvT.mv( refNormal, normal );
│ │ │ │ +
103 normal *= geoInside.impl().integrationElement();
│ │ │ │ +
104
│ │ │ │ +
105 return normal;
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │
107
│ │ │ │ -
108#ifdef N_WALLS_2D
│ │ │ │ -
109 #undef N_WALLS_2D
│ │ │ │ -
110#endif // N_WALLS_2D
│ │ │ │ -
111
│ │ │ │ -
112#ifdef N_VERTICES_3D
│ │ │ │ -
113 #undef N_VERTICES_3D
│ │ │ │ -
114#endif // N_VERTICES_3D
│ │ │ │ -
115
│ │ │ │ -
116#ifdef N_EDGES_3D
│ │ │ │ -
117 #undef N_EDGES_3D
│ │ │ │ -
118#endif // N_EDGES_3D
│ │ │ │ -
119
│ │ │ │ -
120#ifdef N_FACES_3D
│ │ │ │ -
121 #undef N_FACES_3D
│ │ │ │ -
122#endif // N_FACES_3D
│ │ │ │ -
123
│ │ │ │ -
124#ifdef N_NEIGH_3D
│ │ │ │ -
125 #undef N_NEIGH_3D
│ │ │ │ -
126#endif // N_NEIGH_3D
│ │ │ │ -
127
│ │ │ │ -
128#ifdef N_WALLS_3D
│ │ │ │ -
129 #undef N_WALLS_3D
│ │ │ │ -
130#endif // N_WALLS_3D
│ │ │ │ -
131
│ │ │ │ -
132#ifdef N_VERTICES_MAX
│ │ │ │ -
133 #undef N_VERTICES_MAX
│ │ │ │ -
134#endif // N_VERTICES_MAX
│ │ │ │ -
135
│ │ │ │ -
136#ifdef N_EDGES_MAX
│ │ │ │ -
137 #undef N_EDGES_MAX
│ │ │ │ -
138#endif // N_EDGES_MAX
│ │ │ │ -
139
│ │ │ │ -
140#ifdef N_FACES_MAX
│ │ │ │ -
141 #undef N_FACES_MAX
│ │ │ │ -
142#endif // N_FACES_MAX
│ │ │ │ -
143
│ │ │ │ -
144#ifdef N_NEIGH_MAX
│ │ │ │ -
145 #undef N_NEIGH_MAX
│ │ │ │ -
146#endif // N_NEIGH_MAX
│ │ │ │ -
147
│ │ │ │ -
148#ifdef N_WALLS_MAX
│ │ │ │ -
149 #undef N_WALLS_MAX
│ │ │ │ -
150#endif // N_WALLS_MAX
│ │ │ │ -
151
│ │ │ │ -
152#ifdef N_LAMBDA
│ │ │ │ -
153 #undef N_LAMBDA
│ │ │ │ -
154#endif // N_LAMBDA
│ │ │ │ -
155
│ │ │ │ -
156#ifdef LAMBDA_MAX
│ │ │ │ -
157 #undef LAMBDA_MAX
│ │ │ │ -
158#endif // LAMBDA_MAX
│ │ │ │ -
159
│ │ │ │ -
160#ifdef INDEX
│ │ │ │ -
161 #undef INDEX
│ │ │ │ -
162#endif // INDEX
│ │ │ │ -
163
│ │ │ │ -
164#ifdef INDEX
│ │ │ │ -
165 #undef INDEX
│ │ │ │ -
166#endif // INDEX
│ │ │ │ +
108 template<>
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
110 AlbertaGridIntersectionBase< const AlbertaGrid< 1, 1 > >::centerIntegrationOuterNormal () const
│ │ │ │ +
111 {
│ │ │ │ +
112 const Alberta::GlobalVector &oppCoord = grid().getCoord( elementInfo(), oppVertex_ );
│ │ │ │ +
113 const Alberta::GlobalVector &myCoord = grid().getCoord( elementInfo(), 1-oppVertex_ );
│ │ │ │ +
114 NormalVector n;
│ │ │ │ +
115 n[ 0 ] = (myCoord[ 0 ] > oppCoord[ 0 ] ? ctype( 1 ) : -ctype( 1 ));
│ │ │ │ +
116 return n;
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
119#if defined GRIDDIM && GRIDDIM > 1
│ │ │ │ +
120 template<>
│ │ │ │ + │ │ │ │ +
122 AlbertaGridIntersectionBase< const AlbertaGrid< 2, 2 > >::centerIntegrationOuterNormal () const
│ │ │ │ +
123 {
│ │ │ │ +
124 const Alberta::GlobalVector &coordOne = grid().getCoord( elementInfo(), (oppVertex_+1)%3 );
│ │ │ │ +
125 const Alberta::GlobalVector &coordTwo = grid().getCoord( elementInfo(), (oppVertex_+2)%3 );
│ │ │ │ +
126
│ │ │ │ +
127 NormalVector n;
│ │ │ │ +
128 n[ 0 ] = -(coordOne[ 1 ] - coordTwo[ 1 ]);
│ │ │ │ +
129 n[ 1 ] = coordOne[ 0 ] - coordTwo[ 0 ];
│ │ │ │ +
130 return n;
│ │ │ │ +
131 }
│ │ │ │ +
132#endif // defined GRIDDIM && GRIDDIM > 1
│ │ │ │ +
133
│ │ │ │ +
134 template<>
│ │ │ │ +
135 inline AlbertaGridIntersectionBase< const AlbertaGrid< 3, 3 > >::NormalVector
│ │ │ │ +
│ │ │ │ +
136 AlbertaGridIntersectionBase< const AlbertaGrid< 3, 3 > >::centerIntegrationOuterNormal () const
│ │ │ │ +
137 {
│ │ │ │ +
138 // in this case the orientation is negative, multiply by -1
│ │ │ │ +
139 const ALBERTA EL_INFO &elInfo = elementInfo().elInfo();
│ │ │ │ +
140 const ctype val = (elInfo.orientation > 0) ? 1.0 : -1.0;
│ │ │ │ +
141
│ │ │ │ +
142 static const int faceVertices[ 4 ][ 3 ]
│ │ │ │ +
143 = { {1,3,2}, {0,2,3}, {0,3,1}, {0,1,2} };
│ │ │ │ +
144 const int *localFaces = faceVertices[ oppVertex_ ];
│ │ │ │ +
145
│ │ │ │ +
146 const Alberta::GlobalVector &coord0 = grid().getCoord( elementInfo(), localFaces[ 0 ] );
│ │ │ │ +
147 const Alberta::GlobalVector &coord1 = grid().getCoord( elementInfo(), localFaces[ 1 ] );
│ │ │ │ +
148 const Alberta::GlobalVector &coord2 = grid().getCoord( elementInfo(), localFaces[ 2 ] );
│ │ │ │ +
149
│ │ │ │ +
150 FieldVector< ctype, dimensionworld > u;
│ │ │ │ +
151 FieldVector< ctype, dimensionworld > v;
│ │ │ │ +
152 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
153 {
│ │ │ │ +
154 v[ i ] = coord1[ i ] - coord0[ i ];
│ │ │ │ +
155 u[ i ] = coord2[ i ] - coord1[ i ];
│ │ │ │ +
156 }
│ │ │ │ +
157
│ │ │ │ +
158 NormalVector n;
│ │ │ │ +
159 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
160 {
│ │ │ │ +
161 const int j = (i+1)%dimension;
│ │ │ │ +
162 const int k = (i+2)%dimension;
│ │ │ │ +
163 n[ i ] = val * (u[ j ] * v[ k ] - u[ k ] * v[ j ]);
│ │ │ │ +
164 }
│ │ │ │ +
165 return n;
│ │ │ │ +
166 }
│ │ │ │ +
│ │ │ │
167
│ │ │ │ -
168#ifdef IS_LEAF_EL
│ │ │ │ -
169 #undef IS_LEAF_EL
│ │ │ │ -
170#endif // IS_LEAF_EL
│ │ │ │ -
171
│ │ │ │ -
172#ifdef LEAF_DATA
│ │ │ │ -
173 #undef LEAF_DATA
│ │ │ │ -
174#endif // LEAF_DATA
│ │ │ │ +
168
│ │ │ │ +
169 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
172 {
│ │ │ │ +
173 return centerIntegrationOuterNormal();
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │
175
│ │ │ │ -
176#ifdef INTERIOR
│ │ │ │ -
177 #undef INTERIOR
│ │ │ │ -
178#endif // INTERIOR
│ │ │ │ -
179
│ │ │ │ -
180#ifdef DIRICHLET
│ │ │ │ -
181 #undef DIRICHLET
│ │ │ │ -
182#endif // DIRICHLET
│ │ │ │ -
183
│ │ │ │ -
184#ifdef NEUMANN
│ │ │ │ -
185 #undef NEUMANN
│ │ │ │ -
186#endif // NEUMANN
│ │ │ │ -
187
│ │ │ │ -
188#ifdef IS_NEUMANN
│ │ │ │ -
189 #undef IS_NEUMANN
│ │ │ │ -
190#endif // IS_NEUMANN
│ │ │ │ -
191
│ │ │ │ -
192#ifdef IS_DIRICHLET
│ │ │ │ -
193 #undef IS_DIRICHLET
│ │ │ │ -
194#endif // IS_DIRICHLET
│ │ │ │ -
195
│ │ │ │ -
196#ifdef IS_INTERIOR
│ │ │ │ -
197 #undef IS_INTERIOR
│ │ │ │ -
198#endif // IS_INTERIOR
│ │ │ │ -
199
│ │ │ │ -
200#ifdef N_NODE_TYPES
│ │ │ │ -
201 #undef N_NODE_TYPES
│ │ │ │ -
202#endif // N_NODE_TYPES
│ │ │ │ -
203
│ │ │ │ -
204#ifdef VERTEX
│ │ │ │ -
205 #undef VERTEX
│ │ │ │ -
206#endif // VERTEX
│ │ │ │ -
207
│ │ │ │ -
208#ifdef CENTER
│ │ │ │ -
209 #undef CENTER
│ │ │ │ -
210#endif // CENTER
│ │ │ │ -
211
│ │ │ │ -
212#ifdef EDGE
│ │ │ │ -
213 #undef EDGE
│ │ │ │ -
214#endif // EDGE
│ │ │ │ -
215
│ │ │ │ -
216#ifdef FACE
│ │ │ │ -
217 #undef FACE
│ │ │ │ -
218#endif // FACE
│ │ │ │ -
219
│ │ │ │ -
220#ifdef LIST_ENTRY
│ │ │ │ -
221 #undef LIST_ENTRY
│ │ │ │ -
222#endif // LIST_ENTRY
│ │ │ │ -
223
│ │ │ │ -
224#ifdef WALL_BOUND
│ │ │ │ -
225 #undef WALL_BOUND
│ │ │ │ -
226#endif // WALL_BOUND
│ │ │ │ -
227
│ │ │ │ -
228#ifdef FILL_NOTHING
│ │ │ │ -
229 #undef FILL_NOTHING
│ │ │ │ -
230#endif // FILL_NOTHING
│ │ │ │ -
231
│ │ │ │ -
232#ifdef FILL_COORDS
│ │ │ │ -
233 #undef FILL_COORDS
│ │ │ │ -
234#endif // FILL_COORDS
│ │ │ │ +
176
│ │ │ │ +
177 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
180 {
│ │ │ │ +
181 NormalVector normal = centerOuterNormal();
│ │ │ │ +
182 normal *= (1.0 / normal.two_norm());
│ │ │ │ +
183 return normal;
│ │ │ │ +
184 }
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
186
│ │ │ │ +
187 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
190 {
│ │ │ │ +
191 return centerIntegrationOuterNormal();
│ │ │ │ +
192 }
│ │ │ │ +
│ │ │ │ +
193
│ │ │ │ +
194
│ │ │ │ +
195 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
198 {
│ │ │ │ +
199 return centerOuterNormal();
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
202
│ │ │ │ +
203 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
206 {
│ │ │ │ +
207 return centerUnitOuterNormal();
│ │ │ │ +
208 }
│ │ │ │ +
│ │ │ │ +
209
│ │ │ │ +
210
│ │ │ │ +
211 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
214 {
│ │ │ │ +
215 return AlbertaTransformation( elementInfo().transformation( oppVertex_ ) );
│ │ │ │ +
216 }
│ │ │ │ +
│ │ │ │ +
217
│ │ │ │ +
218
│ │ │ │ +
219 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
221 {
│ │ │ │ +
222 return *grid_;
│ │ │ │ +
223 }
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
225
│ │ │ │ +
226 template< class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
229 {
│ │ │ │ +
230 assert( !!elementInfo_ );
│ │ │ │ +
231 return elementInfo_;
│ │ │ │ +
232 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
233
│ │ │ │ +
234
│ │ │ │
235
│ │ │ │ -
236#ifdef FILL_BOUND
│ │ │ │ -
237 #undef FILL_BOUND
│ │ │ │ -
238#endif // FILL_BOUND
│ │ │ │ -
239
│ │ │ │ -
240#ifdef FILL_NEIGH
│ │ │ │ -
241 #undef FILL_NEIGH
│ │ │ │ -
242#endif // FILL_NEIGH
│ │ │ │ +
236 // AlbertaGridIntersectionBase::GlobalCoordReader
│ │ │ │ +
237 // ----------------------------------------------
│ │ │ │ +
238
│ │ │ │ +
239 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
241 {
│ │ │ │ +
242 typedef typename std::remove_const< GridImp >::type Grid;
│ │ │ │
243
│ │ │ │ -
244#ifdef FILL_OPP_COORDS
│ │ │ │ -
245 #undef FILL_OPP_COORDS
│ │ │ │ -
246#endif // FILL_OPP_COORDS
│ │ │ │ -
247
│ │ │ │ -
248#ifdef FILL_ORIENTATION
│ │ │ │ -
249 #undef FILL_ORIENTATION
│ │ │ │ -
250#endif // FILL_ORIENTATION
│ │ │ │ -
251
│ │ │ │ -
252#ifdef FILL_EL_TYPE
│ │ │ │ -
253 #undef FILL_EL_TYPE
│ │ │ │ -
254#endif // FILL_EL_TYPE
│ │ │ │ -
255
│ │ │ │ -
256#ifdef FILL_PROJECTION
│ │ │ │ -
257 #undef FILL_PROJECTION
│ │ │ │ -
258#endif // FILL_PROJECTION
│ │ │ │ +
244 static const int dimension = Grid::dimension;
│ │ │ │ +
245 static const int codimension = 1;
│ │ │ │ +
246 static const int mydimension = dimension - codimension;
│ │ │ │ +
247 static const int coorddimension = Grid::dimensionworld;
│ │ │ │ +
248
│ │ │ │ + │ │ │ │ +
250
│ │ │ │ + │ │ │ │ +
252 typedef FieldVector< ctype, coorddimension > Coordinate;
│ │ │ │ +
253
│ │ │ │ +
254 private:
│ │ │ │ +
255 const Grid &grid_;
│ │ │ │ + │ │ │ │ +
257 const int subEntity_;
│ │ │ │ +
258 const int twist_;
│ │ │ │
259
│ │ │ │ -
260#ifdef FILL_ANY
│ │ │ │ -
261 #undef FILL_ANY
│ │ │ │ -
262#endif // FILL_ANY
│ │ │ │ -
263
│ │ │ │ -
264#ifdef HOOK_QUEUE_OFFSET
│ │ │ │ -
265 #undef HOOK_QUEUE_OFFSET
│ │ │ │ -
266#endif // HOOK_QUEUE_OFFSET
│ │ │ │ -
267
│ │ │ │ -
268#ifdef RUN_HOOKS_0
│ │ │ │ -
269 #undef RUN_HOOKS_0
│ │ │ │ -
270#endif // RUN_HOOKS_0
│ │ │ │ -
271
│ │ │ │ -
272#ifdef RUN_BAS_FCTS_HOOKS
│ │ │ │ -
273 #undef RUN_BAS_FCTS_HOOKS
│ │ │ │ -
274#endif // RUN_BAS_FCTS_HOOKS
│ │ │ │ -
275
│ │ │ │ -
276#ifdef RUN_HOOKS_1
│ │ │ │ -
277 #undef RUN_HOOKS_1
│ │ │ │ -
278#endif // RUN_HOOKS_1
│ │ │ │ -
279
│ │ │ │ -
280#ifdef RUN_HOOKS_2
│ │ │ │ -
281 #undef RUN_HOOKS_2
│ │ │ │ -
282#endif // RUN_HOOKS_2
│ │ │ │ -
283
│ │ │ │ -
284#ifdef RUN_HOOKS_3
│ │ │ │ -
285 #undef RUN_HOOKS_3
│ │ │ │ -
286#endif // RUN_HOOKS_3
│ │ │ │ -
287
│ │ │ │ -
288#ifdef RUN_HOOKS_4
│ │ │ │ -
289 #undef RUN_HOOKS_4
│ │ │ │ -
290#endif // RUN_HOOKS_4
│ │ │ │ -
291
│ │ │ │ -
292#ifdef RUN_HOOKS_5
│ │ │ │ -
293 #undef RUN_HOOKS_5
│ │ │ │ -
294#endif // RUN_HOOKS_5
│ │ │ │ -
295
│ │ │ │ -
296#ifdef RUN_HOOKS_6
│ │ │ │ -
297 #undef RUN_HOOKS_6
│ │ │ │ -
298#endif // RUN_HOOKS_6
│ │ │ │ +
260 public:
│ │ │ │ +
│ │ │ │ +
261 GlobalCoordReader ( const GridImp &grid,
│ │ │ │ + │ │ │ │ +
263 int subEntity )
│ │ │ │ +
264 : grid_( grid ),
│ │ │ │ + │ │ │ │ +
266 subEntity_( subEntity ),
│ │ │ │ +
267 twist_( elementInfo.template twist< codimension >( subEntity ) )
│ │ │ │ +
268 {}
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
│ │ │ │ +
270 void coordinate ( int i, Coordinate &x ) const
│ │ │ │ +
271 {
│ │ │ │ +
272 assert( !elementInfo_ == false );
│ │ │ │ +
273 assert( (i >= 0) && (i <= mydimension) );
│ │ │ │ +
274
│ │ │ │ +
275 const int ti = Alberta::applyInverseTwist< mydimension >( twist_, i );
│ │ │ │ +
276 const int k = mapVertices( subEntity_, ti );
│ │ │ │ +
277 const Alberta::GlobalVector &coord = grid_.getCoord( elementInfo_, k );
│ │ │ │ +
278 for( int j = 0; j < coorddimension; ++j )
│ │ │ │ +
279 x[ j ] = coord[ j ];
│ │ │ │ +
280 }
│ │ │ │ +
│ │ │ │ +
281
│ │ │ │ +
│ │ │ │ +
282 bool hasDeterminant () const
│ │ │ │ +
283 {
│ │ │ │ +
284 return false;
│ │ │ │ +
285 }
│ │ │ │ +
│ │ │ │ +
286
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
288 {
│ │ │ │ +
289 assert( false );
│ │ │ │ +
290 return ctype( 0 );
│ │ │ │ +
291 }
│ │ │ │ +
│ │ │ │ +
292
│ │ │ │ +
293 private:
│ │ │ │ +
294 static int mapVertices ( int subEntity, int i )
│ │ │ │ +
295 {
│ │ │ │ + │ │ │ │ +
297 }
│ │ │ │ +
298 };
│ │ │ │ +
│ │ │ │
299
│ │ │ │ -
300#ifdef RUN_HOOKS_7
│ │ │ │ -
301 #undef RUN_HOOKS_7
│ │ │ │ -
302#endif // RUN_HOOKS_7
│ │ │ │ -
303
│ │ │ │ -
304#ifdef CALL_EVERY_EL_PREORDER
│ │ │ │ -
305 #undef CALL_EVERY_EL_PREORDER
│ │ │ │ -
306#endif // CALL_EVERY_EL_PREORDER
│ │ │ │ -
307
│ │ │ │ -
308#ifdef CALL_EVERY_EL_INORDER
│ │ │ │ -
309 #undef CALL_EVERY_EL_INORDER
│ │ │ │ -
310#endif // CALL_EVERY_EL_INORDER
│ │ │ │ -
311
│ │ │ │ -
312#ifdef CALL_EVERY_EL_POSTORDER
│ │ │ │ -
313 #undef CALL_EVERY_EL_POSTORDER
│ │ │ │ -
314#endif // CALL_EVERY_EL_POSTORDER
│ │ │ │ +
300
│ │ │ │ +
301
│ │ │ │ +
302
│ │ │ │ +
303 // AlbertaGridIntersectionBase::LocalCoordReader
│ │ │ │ +
304 // ---------------------------------------------
│ │ │ │ +
305
│ │ │ │ +
306 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
308 {
│ │ │ │ +
309 typedef typename std::remove_const< GridImp >::type Grid;
│ │ │ │ +
310
│ │ │ │ +
311 static const int dimension = Grid::dimension;
│ │ │ │ +
312 static const int codimension = 1;
│ │ │ │ +
313 static const int mydimension = dimension - codimension;
│ │ │ │ +
314 static const int coorddimension = dimension;
│ │ │ │
315
│ │ │ │ -
316#ifdef CALL_LEAF_EL
│ │ │ │ -
317 #undef CALL_LEAF_EL
│ │ │ │ -
318#endif // CALL_LEAF_EL
│ │ │ │ + │ │ │ │ +
317
│ │ │ │ +
318 typedef FieldVector< ctype, coorddimension > Coordinate;
│ │ │ │
319
│ │ │ │ -
320#ifdef CALL_LEAF_EL_LEVEL
│ │ │ │ -
321 #undef CALL_LEAF_EL_LEVEL
│ │ │ │ -
322#endif // CALL_LEAF_EL_LEVEL
│ │ │ │ -
323
│ │ │ │ -
324#ifdef CALL_EL_LEVEL
│ │ │ │ -
325 #undef CALL_EL_LEVEL
│ │ │ │ -
326#endif // CALL_EL_LEVEL
│ │ │ │ -
327
│ │ │ │ -
328#ifdef CALL_MG_LEVEL
│ │ │ │ -
329 #undef CALL_MG_LEVEL
│ │ │ │ -
330#endif // CALL_MG_LEVEL
│ │ │ │ -
331
│ │ │ │ -
332#ifdef TEST_FLAG
│ │ │ │ -
333 #undef TEST_FLAG
│ │ │ │ -
334#endif // TEST_FLAG
│ │ │ │ -
335
│ │ │ │ -
336#ifdef DOF_ADMIN_DEF
│ │ │ │ -
337 #undef DOF_ADMIN_DEF
│ │ │ │ -
338#endif // DOF_ADMIN_DEF
│ │ │ │ -
339
│ │ │ │ -
340#ifdef DOF_FREE_SIZE
│ │ │ │ -
341 #undef DOF_FREE_SIZE
│ │ │ │ -
342#endif // DOF_FREE_SIZE
│ │ │ │ +
320 typedef typename Grid::template Codim< 0 >::Geometry ElementGeometry;
│ │ │ │ +
321 typedef typename Grid::template Codim< 1 >::Geometry FaceGeometry;
│ │ │ │ +
322
│ │ │ │ +
323 private:
│ │ │ │ +
324 const ElementGeometry &elementGeometry_;
│ │ │ │ +
325 const FaceGeometry &faceGeometry_;
│ │ │ │ +
326
│ │ │ │ +
327 public:
│ │ │ │ +
│ │ │ │ +
328 LocalCoordReader ( const ElementGeometry &elementGeometry,
│ │ │ │ +
329 const FaceGeometry &faceGeometry )
│ │ │ │ +
330 : elementGeometry_( elementGeometry ),
│ │ │ │ +
331 faceGeometry_( faceGeometry )
│ │ │ │ +
332 {}
│ │ │ │ +
│ │ │ │ +
333
│ │ │ │ +
│ │ │ │ +
334 void coordinate ( int i, Coordinate &x ) const
│ │ │ │ +
335 {
│ │ │ │ +
336 x = elementGeometry_.local( faceGeometry_.corner( i ) );
│ │ │ │ +
337 }
│ │ │ │ +
│ │ │ │ +
338
│ │ │ │ +
│ │ │ │ +
339 bool hasDeterminant () const
│ │ │ │ +
340 {
│ │ │ │ +
341 return false;
│ │ │ │ +
342 }
│ │ │ │ +
│ │ │ │
343
│ │ │ │ -
344#ifdef DOF_UNIT_ALL_FREE
│ │ │ │ -
345 #undef DOF_UNIT_ALL_FREE
│ │ │ │ -
346#endif // DOF_UNIT_ALL_FREE
│ │ │ │ -
347
│ │ │ │ -
348#ifdef FOR_ALL_DOFS
│ │ │ │ -
349 #undef FOR_ALL_DOFS
│ │ │ │ -
350#endif // FOR_ALL_DOFS
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
345 {
│ │ │ │ +
346 return ctype( 0 );
│ │ │ │ +
347 }
│ │ │ │ +
│ │ │ │ +
348 };
│ │ │ │ +
│ │ │ │ +
349
│ │ │ │ +
350
│ │ │ │
351
│ │ │ │ -
352#ifdef FOR_ALL_FREE_DOFS
│ │ │ │ -
353 #undef FOR_ALL_FREE_DOFS
│ │ │ │ -
354#endif // FOR_ALL_FREE_DOFS
│ │ │ │ -
355
│ │ │ │ -
356#ifdef DOWBM_FULL
│ │ │ │ -
357 #undef DOWBM_FULL
│ │ │ │ -
358#endif // DOWBM_FULL
│ │ │ │ -
359
│ │ │ │ -
360#ifdef DOWBM_SYMM
│ │ │ │ -
361 #undef DOWBM_SYMM
│ │ │ │ -
362#endif // DOWBM_SYMM
│ │ │ │ -
363
│ │ │ │ -
364#ifdef DOWBM_DIAG
│ │ │ │ -
365 #undef DOWBM_DIAG
│ │ │ │ -
366#endif // DOWBM_DIAG
│ │ │ │ -
367
│ │ │ │ -
368#ifdef ROW_LENGTH
│ │ │ │ -
369 #undef ROW_LENGTH
│ │ │ │ -
370#endif // ROW_LENGTH
│ │ │ │ -
371
│ │ │ │ -
372#ifdef ENTRY_USED
│ │ │ │ -
373 #undef ENTRY_USED
│ │ │ │ -
374#endif // ENTRY_USED
│ │ │ │ +
352 // AlbertaGridLeafIntersection
│ │ │ │ +
353 // ---------------------------
│ │ │ │ +
354
│ │ │ │ +
355 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
357 {
│ │ │ │ +
358 assert( oppVertex_ <= dimension );
│ │ │ │ +
359 ++oppVertex_;
│ │ │ │ +
360 neighborInfo_ = ElementInfo();
│ │ │ │ +
361 }
│ │ │ │ +
│ │ │ │ +
362
│ │ │ │ +
363 template< class GridImp >
│ │ │ │ +
364 inline typename GridImp::template Codim< 0 >::Entity
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
366 {
│ │ │ │ + │ │ │ │ +
368
│ │ │ │ +
369 if( !neighborInfo_ )
│ │ │ │ +
370 {
│ │ │ │ +
371 assert( neighbor() );
│ │ │ │ +
372
│ │ │ │ +
373 neighborInfo_ = elementInfo().leafNeighbor( oppVertex_ );
│ │ │ │ +
374 }
│ │ │ │
375
│ │ │ │ -
376#ifdef ENTRY_NOT_USED
│ │ │ │ -
377 #undef ENTRY_NOT_USED
│ │ │ │ -
378#endif // ENTRY_NOT_USED
│ │ │ │ -
379
│ │ │ │ -
380#ifdef UNUSED_ENTRY
│ │ │ │ -
381 #undef UNUSED_ENTRY
│ │ │ │ -
382#endif // UNUSED_ENTRY
│ │ │ │ -
383
│ │ │ │ -
384#ifdef NO_MORE_ENTRIES
│ │ │ │ -
385 #undef NO_MORE_ENTRIES
│ │ │ │ -
386#endif // NO_MORE_ENTRIES
│ │ │ │ +
376 assert( !neighborInfo_ == false );
│ │ │ │ +
377 assert( neighborInfo_.el() != NULL );
│ │ │ │ +
378 return EntityImp( grid(), neighborInfo_, 0 );
│ │ │ │ +
379 }
│ │ │ │ +
│ │ │ │ +
380
│ │ │ │ +
381 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
383 {
│ │ │ │ +
384 assert( oppVertex_ <= dimension );
│ │ │ │ +
385 return elementInfo().hasLeafNeighbor( oppVertex_ );
│ │ │ │ +
386 }
│ │ │ │ +
│ │ │ │
387
│ │ │ │ -
388#ifdef LAGRANGE_NODES
│ │ │ │ -
389 #undef LAGRANGE_NODES
│ │ │ │ -
390#endif // LAGRANGE_NODES
│ │ │ │ -
391
│ │ │ │ -
392#ifdef MAX_N_QUAD_POINTS
│ │ │ │ -
393 #undef MAX_N_QUAD_POINTS
│ │ │ │ -
394#endif // MAX_N_QUAD_POINTS
│ │ │ │ -
395
│ │ │ │ -
396#ifdef INIT_PHI
│ │ │ │ -
397 #undef INIT_PHI
│ │ │ │ -
398#endif // INIT_PHI
│ │ │ │ +
388
│ │ │ │ +
389 template< class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
392 {
│ │ │ │ +
393 typedef AlbertaGridLocalGeometryProvider< GridImp > LocalGeoProvider;
│ │ │ │ +
394 const int twist = elementInfo().template twist< 1 >( oppVertex_ );
│ │ │ │ +
395 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ +
396 return LocalGeometry( LocalGeoProvider::instance().faceGeometry( face, twist ) );
│ │ │ │ +
397 }
│ │ │ │ +
│ │ │ │ +
398
│ │ │ │
399
│ │ │ │ -
400#ifdef INIT_GRD_PHI
│ │ │ │ -
401 #undef INIT_GRD_PHI
│ │ │ │ -
402#endif // INIT_GRD_PHI
│ │ │ │ -
403
│ │ │ │ -
404#ifdef INIT_D2_PHI
│ │ │ │ -
405 #undef INIT_D2_PHI
│ │ │ │ -
406#endif // INIT_D2_PHI
│ │ │ │ -
407
│ │ │ │ -
408#ifdef MESH_REFINED
│ │ │ │ -
409 #undef MESH_REFINED
│ │ │ │ -
410#endif // MESH_REFINED
│ │ │ │ -
411
│ │ │ │ -
412#ifdef MESH_COARSENED
│ │ │ │ -
413 #undef MESH_COARSENED
│ │ │ │ -
414#endif // MESH_COARSENED
│ │ │ │ -
415
│ │ │ │ -
416#ifdef H1_NORM
│ │ │ │ -
417 #undef H1_NORM
│ │ │ │ -
418#endif // H1_NORM
│ │ │ │ -
419
│ │ │ │ -
420#ifdef L2_NORM
│ │ │ │ -
421 #undef L2_NORM
│ │ │ │ -
422#endif // L2_NORM
│ │ │ │ +
400 template< class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
403 {
│ │ │ │ +
404 assert( neighbor() );
│ │ │ │ +
405
│ │ │ │ +
406 typedef AlbertaGridLocalGeometryProvider< GridImp > LocalGeoProvider;
│ │ │ │ +
407 const ALBERTA EL_INFO &elInfo = elementInfo().elInfo();
│ │ │ │ +
408 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ];
│ │ │ │ +
409 const int twist = elementInfo().twistInNeighbor( oppVertex_ );
│ │ │ │ +
410 const int face = (dimension > 1 ? oppVertex : 1-oppVertex);
│ │ │ │ +
411 return LocalGeometry( LocalGeoProvider::instance().faceGeometry( face, twist ) );
│ │ │ │ +
412 }
│ │ │ │ +
│ │ │ │ +
413
│ │ │ │ +
414
│ │ │ │ +
415 template< class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
418 {
│ │ │ │ +
419 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ +
420 const GlobalCoordReader coordReader( grid(), elementInfo(), face );
│ │ │ │ +
421 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ +
422 }
│ │ │ │ +
│ │ │ │
423
│ │ │ │ -
424#ifdef GRAPH_MESH_BOUNDARY
│ │ │ │ -
425 #undef GRAPH_MESH_BOUNDARY
│ │ │ │ -
426#endif // GRAPH_MESH_BOUNDARY
│ │ │ │ -
427
│ │ │ │ -
428#ifdef GRAPH_MESH_ELEMENT_MARK
│ │ │ │ -
429 #undef GRAPH_MESH_ELEMENT_MARK
│ │ │ │ -
430#endif // GRAPH_MESH_ELEMENT_MARK
│ │ │ │ -
431
│ │ │ │ -
432#ifdef GRAPH_MESH_VERTEX_DOF
│ │ │ │ -
433 #undef GRAPH_MESH_VERTEX_DOF
│ │ │ │ -
434#endif // GRAPH_MESH_VERTEX_DOF
│ │ │ │ +
424
│ │ │ │ +
425 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
427 {
│ │ │ │ +
428 const ALBERTA EL_INFO &elInfo = elementInfo().elInfo();
│ │ │ │ +
429 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ];
│ │ │ │ +
430 const int face = (dimension > 1 ? oppVertex : 1-oppVertex);
│ │ │ │ +
431 return grid().alberta2generic( 1, face );
│ │ │ │ +
432 }
│ │ │ │ +
│ │ │ │ +
433
│ │ │ │ +
434} // namespace Dune
│ │ │ │
435
│ │ │ │ -
436#ifdef GRAPH_MESH_ELEMENT_INDEX
│ │ │ │ -
437 #undef GRAPH_MESH_ELEMENT_INDEX
│ │ │ │ -
438#endif // GRAPH_MESH_ELEMENT_INDEX
│ │ │ │ -
439
│ │ │ │ -
440#ifdef GET_MESH
│ │ │ │ -
441 #undef GET_MESH
│ │ │ │ -
442#endif // GET_MESH
│ │ │ │ -
443
│ │ │ │ -
444#ifdef GET_DOF_VEC
│ │ │ │ -
445 #undef GET_DOF_VEC
│ │ │ │ -
446#endif // GET_DOF_VEC
│ │ │ │ -
447
│ │ │ │ -
448#ifdef CARD_SN_MAX
│ │ │ │ -
449 #undef CARD_SN_MAX
│ │ │ │ -
450#endif // CARD_SN_MAX
│ │ │ │ -
451
│ │ │ │ -
452#ifdef INIT_UH
│ │ │ │ -
453 #undef INIT_UH
│ │ │ │ -
454#endif // INIT_UH
│ │ │ │ -
455
│ │ │ │ -
456#ifdef INIT_GRD_UH
│ │ │ │ -
457 #undef INIT_GRD_UH
│ │ │ │ -
458#endif // INIT_GRD_UH
│ │ │ │ -
459
│ │ │ │ -
460#ifdef TRAVERSE_START
│ │ │ │ -
461 #undef TRAVERSE_START
│ │ │ │ -
462#endif // TRAVERSE_START
│ │ │ │ -
463
│ │ │ │ -
464#ifdef TRAVERSE_STOP
│ │ │ │ -
465 #undef TRAVERSE_STOP
│ │ │ │ -
466#endif // TRAVERSE_STOP
│ │ │ │ +
436#endif // #ifndef DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ + │ │ │ │ +
LocalGeometry geometryInOutside() const
Definition intersection.cc:402
│ │ │ │ +
GridImp::template Codim< 0 >::Entity outside() const
Definition intersection.cc:365
│ │ │ │ +
void next()
Definition intersection.cc:356
│ │ │ │ +
Base::GeometryImpl GeometryImpl
Definition albertagrid/intersection.hh:130
│ │ │ │ +
int indexInOutside() const
Definition intersection.cc:426
│ │ │ │ +
LocalGeometry geometryInInside() const
Definition intersection.cc:391
│ │ │ │ +
Base::GlobalCoordReader GlobalCoordReader
Definition albertagrid/intersection.hh:133
│ │ │ │ +
Base::Geometry Geometry
Definition albertagrid/intersection.hh:122
│ │ │ │ +
Geometry geometry() const
Definition intersection.cc:417
│ │ │ │ +
bool neighbor() const
Definition intersection.cc:382
│ │ │ │ +
Base::LocalGeometry LocalGeometry
Definition albertagrid/intersection.hh:123
│ │ │ │ +
Definition albertagrid/entity.hh:46
│ │ │ │ +
Definition albertagrid/geometry.hh:504
│ │ │ │ + │ │ │ │ +
FieldVector< ctype, coorddimension > Coordinate
Definition intersection.cc:252
│ │ │ │ +
Alberta::Real ctype
Definition intersection.cc:249
│ │ │ │ +
std::remove_const< GridImp >::type Grid
Definition intersection.cc:242
│ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition intersection.cc:251
│ │ │ │ +
ctype determinant() const
Definition intersection.cc:287
│ │ │ │ +
bool hasDeterminant() const
Definition intersection.cc:282
│ │ │ │ +
GlobalCoordReader(const GridImp &grid, const ElementInfo &elementInfo, int subEntity)
Definition intersection.cc:261
│ │ │ │ +
void coordinate(int i, Coordinate &x) const
Definition intersection.cc:270
│ │ │ │ + │ │ │ │ +
Grid::template Codim< 1 >::Geometry FaceGeometry
Definition intersection.cc:321
│ │ │ │ +
Alberta::Real ctype
Definition intersection.cc:316
│ │ │ │ +
LocalCoordReader(const ElementGeometry &elementGeometry, const FaceGeometry &faceGeometry)
Definition intersection.cc:328
│ │ │ │ +
std::remove_const< GridImp >::type Grid
Definition intersection.cc:309
│ │ │ │ +
void coordinate(int i, Coordinate &x) const
Definition intersection.cc:334
│ │ │ │ +
bool hasDeterminant() const
Definition intersection.cc:339
│ │ │ │ +
ctype determinant() const
Definition intersection.cc:344
│ │ │ │ +
FieldVector< ctype, coorddimension > Coordinate
Definition intersection.cc:318
│ │ │ │ +
Grid::template Codim< 0 >::Geometry ElementGeometry
Definition intersection.cc:320
│ │ │ │ +
Definition albertagrid/intersection.hh:32
│ │ │ │ +
NormalVector centerOuterNormal() const
Definition intersection.cc:171
│ │ │ │ +
const ElementInfo & elementInfo() const
Definition intersection.cc:228
│ │ │ │ +
FieldVector< ctype, dimensionworld > NormalVector
Definition albertagrid/intersection.hh:41
│ │ │ │ +
NormalVector centerIntegrationOuterNormal() const
Definition intersection.cc:90
│ │ │ │ +
Grid::ctype ctype
Definition albertagrid/intersection.hh:36
│ │ │ │ +
NormalVector integrationOuterNormal(const LocalCoordType &local) const
Definition intersection.cc:189
│ │ │ │ +
ElementInfo elementInfo_
Definition albertagrid/intersection.hh:93
│ │ │ │ +
FieldVector< ctype, dimension-1 > LocalCoordType
Definition albertagrid/intersection.hh:42
│ │ │ │ +
NormalVector centerUnitOuterNormal() const
Definition intersection.cc:179
│ │ │ │ +
int indexInInside() const
Definition intersection.cc:74
│ │ │ │ +
Entity inside() const
Definition intersection.cc:35
│ │ │ │ +
NormalVector unitOuterNormal(const LocalCoordType &local) const
Definition intersection.cc:205
│ │ │ │ +
const Grid & grid() const
Definition intersection.cc:220
│ │ │ │ +
static const int dimension
Definition albertagrid/intersection.hh:38
│ │ │ │ +
bool boundary() const
Definition intersection.cc:43
│ │ │ │ +
size_t boundarySegmentIndex() const
Definition intersection.cc:64
│ │ │ │ +
GeometryType type() const
Definition intersection.cc:82
│ │ │ │ +
AlbertaTransformation transformation() const
Definition intersection.cc:213
│ │ │ │ +
NormalVector outerNormal(const LocalCoordType &local) const
Definition intersection.cc:197
│ │ │ │ +
int boundaryId() const
Definition intersection.cc:50
│ │ │ │ +
const Grid * grid_
Definition albertagrid/intersection.hh:92
│ │ │ │ +
Definition misc.hh:443
│ │ │ │ +
Definition albertagrid/projection.hh:208
│ │ │ │ +
unsigned int boundaryIndex() const
Definition albertagrid/projection.hh:218
│ │ │ │ +
Definition transformation.hh:18
│ │ │ │ +
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition common/entity.hh:100
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,471 +1,671 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -undefine-2.0.hh │ │ │ │ │ +intersection.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// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -12#ifdef _ALBERTA_H_ │ │ │ │ │ -13 #undef _ALBERTA_H_ │ │ │ │ │ -14#endif // _ALBERTA_H_ │ │ │ │ │ +5#ifndef DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ +_6#define DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ +12 │ │ │ │ │ +13 // AlbertaGridIntersectionBase │ │ │ │ │ +14 // --------------------------- │ │ │ │ │ 15 │ │ │ │ │ -16#ifdef ALBERTA_VERSION │ │ │ │ │ -17 #undef ALBERTA_VERSION │ │ │ │ │ -18#endif // ALBERTA_VERSION │ │ │ │ │ -19 │ │ │ │ │ -20#ifdef ALBERTA_DEBUG │ │ │ │ │ -21 #undef ALBERTA_DEBUG │ │ │ │ │ -22#endif // ALBERTA_DEBUG │ │ │ │ │ +16 template< class Grid > │ │ │ │ │ +17 inline AlbertaGridIntersectionBase< Grid > │ │ │ │ │ +_1_8 ::AlbertaGridIntersectionBase () │ │ │ │ │ +19 : grid_( nullptr ), │ │ │ │ │ +20 elementInfo_(), │ │ │ │ │ +21 oppVertex_( -1 ) // mark invalid intersection │ │ │ │ │ +22 {} │ │ │ │ │ 23 │ │ │ │ │ -24#ifdef DIM_MAX │ │ │ │ │ -25 #undef DIM_MAX │ │ │ │ │ -26#endif // DIM_MAX │ │ │ │ │ -27 │ │ │ │ │ -28#ifdef N_VERTICES │ │ │ │ │ -29 #undef N_VERTICES │ │ │ │ │ -30#endif // N_VERTICES │ │ │ │ │ +24 template< class Grid > │ │ │ │ │ +25 inline _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _> │ │ │ │ │ +_2_6_ _:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e ( const _E_n_t_i_t_y_I_m_p &entity, const int oppVertex │ │ │ │ │ +) │ │ │ │ │ +27 : grid_( &entity.grid() ), │ │ │ │ │ +28 elementInfo_( entity.elementInfo() ), │ │ │ │ │ +29 oppVertex_( oppVertex ) │ │ │ │ │ +30 {} │ │ │ │ │ 31 │ │ │ │ │ -32#ifdef N_EDGES │ │ │ │ │ -33 #undef N_EDGES │ │ │ │ │ -34#endif // N_EDGES │ │ │ │ │ -35 │ │ │ │ │ -36#ifdef N_WALLS │ │ │ │ │ -37 #undef N_WALLS │ │ │ │ │ -38#endif // N_WALLS │ │ │ │ │ -39 │ │ │ │ │ -40#ifdef N_FACES │ │ │ │ │ -41 #undef N_FACES │ │ │ │ │ -42#endif // N_FACES │ │ │ │ │ -43 │ │ │ │ │ -44#ifdef N_NEIGH │ │ │ │ │ -45 #undef N_NEIGH │ │ │ │ │ -46#endif // N_NEIGH │ │ │ │ │ +32 │ │ │ │ │ +33 template< class Grid > │ │ │ │ │ +34 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity │ │ │ │ │ +_3_5 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_s_i_d_e () const │ │ │ │ │ +36 { │ │ │ │ │ +37 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_,_ _G_r_i_d_ _> _E_n_t_i_t_y_I_m_p; │ │ │ │ │ +38 return _E_n_t_i_t_y_I_m_p( grid(), elementInfo(), 0 ); │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +41 │ │ │ │ │ +42 template< class Grid > │ │ │ │ │ +_4_3 inline bool _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y () const │ │ │ │ │ +44 { │ │ │ │ │ +45 return elementInfo().isBoundary( oppVertex_ ); │ │ │ │ │ +46 } │ │ │ │ │ 47 │ │ │ │ │ -48#ifdef DIM_FAC │ │ │ │ │ -49 #undef DIM_FAC │ │ │ │ │ -50#endif // DIM_FAC │ │ │ │ │ -51 │ │ │ │ │ -52#ifdef N_VERTICES_0D │ │ │ │ │ -53 #undef N_VERTICES_0D │ │ │ │ │ -54#endif // N_VERTICES_0D │ │ │ │ │ -55 │ │ │ │ │ -56#ifdef N_EDGES_0D │ │ │ │ │ -57 #undef N_EDGES_0D │ │ │ │ │ -58#endif // N_EDGES_0D │ │ │ │ │ -59 │ │ │ │ │ -60#ifdef N_FACES_0D │ │ │ │ │ -61 #undef N_FACES_0D │ │ │ │ │ -62#endif // N_FACES_0D │ │ │ │ │ -63 │ │ │ │ │ -64#ifdef N_NEIGH_0D │ │ │ │ │ -65 #undef N_NEIGH_0D │ │ │ │ │ -66#endif // N_NEIGH_0D │ │ │ │ │ -67 │ │ │ │ │ -68#ifdef N_WALLS_0D │ │ │ │ │ -69 #undef N_WALLS_0D │ │ │ │ │ -70#endif // N_WALLS_0D │ │ │ │ │ +48 │ │ │ │ │ +49 template< class Grid > │ │ │ │ │ +_5_0 inline int _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d () const │ │ │ │ │ +51 { │ │ │ │ │ +52 if( boundary() ) │ │ │ │ │ +53 { │ │ │ │ │ +54 const int id = elementInfo().boundaryId( oppVertex_ ); │ │ │ │ │ +55 assert( id != 0 ); │ │ │ │ │ +56 return id; │ │ │ │ │ +57 } │ │ │ │ │ +58 else │ │ │ │ │ +59 return 0; │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +_6_2 │ │ │ │ │ +63 template< class Grid > │ │ │ │ │ +_6_4 inline size_t _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x () │ │ │ │ │ +const │ │ │ │ │ +65 { │ │ │ │ │ +_6_6 assert( boundary() ); │ │ │ │ │ +67 const _A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n *projection = elementInfo │ │ │ │ │ +().boundaryProjection( oppVertex_ ); │ │ │ │ │ +_6_8 assert( projection ); │ │ │ │ │ +_6_9 return projection->_b_o_u_n_d_a_r_y_I_n_d_e_x(); │ │ │ │ │ +_7_0 } │ │ │ │ │ 71 │ │ │ │ │ -72#ifdef N_VERTICES_1D │ │ │ │ │ -73 #undef N_VERTICES_1D │ │ │ │ │ -74#endif // N_VERTICES_1D │ │ │ │ │ -75 │ │ │ │ │ -76#ifdef N_EDGES_1D │ │ │ │ │ -77 #undef N_EDGES_1D │ │ │ │ │ -78#endif // N_EDGES_1D │ │ │ │ │ +_7_2 │ │ │ │ │ +73 template< class Grid > │ │ │ │ │ +_7_4 inline int _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e () const │ │ │ │ │ +75 { │ │ │ │ │ +_7_6 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ │ +_7_7 return grid().alberta2generic( 1, face ); │ │ │ │ │ +_7_8 } │ │ │ │ │ 79 │ │ │ │ │ -80#ifdef N_FACES_1D │ │ │ │ │ -81 #undef N_FACES_1D │ │ │ │ │ -82#endif // N_FACES_1D │ │ │ │ │ -83 │ │ │ │ │ -84#ifdef N_NEIGH_1D │ │ │ │ │ -85 #undef N_NEIGH_1D │ │ │ │ │ -86#endif // N_NEIGH_1D │ │ │ │ │ +_8_0 │ │ │ │ │ +_8_1 template< class Grid > │ │ │ │ │ +_8_2 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_t_y_p_e () const │ │ │ │ │ +83 { │ │ │ │ │ +84 return GeometryTypes::simplex( dimension-1 ); │ │ │ │ │ +_8_5 } │ │ │ │ │ +86 │ │ │ │ │ 87 │ │ │ │ │ -88#ifdef N_WALLS_1D │ │ │ │ │ -89 #undef N_WALLS_1D │ │ │ │ │ -90#endif // N_WALLS_1D │ │ │ │ │ -91 │ │ │ │ │ -92#ifdef N_VERTICES_2D │ │ │ │ │ -93 #undef N_VERTICES_2D │ │ │ │ │ -94#endif // N_VERTICES_2D │ │ │ │ │ -95 │ │ │ │ │ -96#ifdef N_EDGES_2D │ │ │ │ │ -97 #undef N_EDGES_2D │ │ │ │ │ -98#endif // N_EDGES_2D │ │ │ │ │ -99 │ │ │ │ │ -100#ifdef N_FACES_2D │ │ │ │ │ -101 #undef N_FACES_2D │ │ │ │ │ -102#endif // N_FACES_2D │ │ │ │ │ -103 │ │ │ │ │ -104#ifdef N_NEIGH_2D │ │ │ │ │ -105 #undef N_NEIGH_2D │ │ │ │ │ -106#endif // N_NEIGH_2D │ │ │ │ │ +_8_8 template< class Grid > │ │ │ │ │ +_8_9 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +_9_0 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_I_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ │ +91 { │ │ │ │ │ +92 const typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y geoInside = inside().geometry(); │ │ │ │ │ +93 │ │ │ │ │ +94 const int face = indexInInside(); │ │ │ │ │ +95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex(); │ │ │ │ │ +96 FieldVector< ctype, dimension > refNormal = │ │ │ │ │ +refSimplex.integrationOuterNormal( face ); │ │ │ │ │ +97 │ │ │ │ │ +98 const typename Entity::Geometry::JacobianInverseTransposed &jInvT │ │ │ │ │ +99 = geoInside.impl().jacobianInverseTransposed(); │ │ │ │ │ +100 │ │ │ │ │ +101 _N_o_r_m_a_l_V_e_c_t_o_r normal; │ │ │ │ │ +102 jInvT.mv( refNormal, normal ); │ │ │ │ │ +103 normal *= geoInside.impl().integrationElement(); │ │ │ │ │ +104 │ │ │ │ │ +105 return normal; │ │ │ │ │ +106 } │ │ │ │ │ 107 │ │ │ │ │ -108#ifdef N_WALLS_2D │ │ │ │ │ -109 #undef N_WALLS_2D │ │ │ │ │ -110#endif // N_WALLS_2D │ │ │ │ │ -111 │ │ │ │ │ -112#ifdef N_VERTICES_3D │ │ │ │ │ -113 #undef N_VERTICES_3D │ │ │ │ │ -114#endif // N_VERTICES_3D │ │ │ │ │ -115 │ │ │ │ │ -116#ifdef N_EDGES_3D │ │ │ │ │ -117 #undef N_EDGES_3D │ │ │ │ │ -118#endif // N_EDGES_3D │ │ │ │ │ -119 │ │ │ │ │ -120#ifdef N_FACES_3D │ │ │ │ │ -121 #undef N_FACES_3D │ │ │ │ │ -122#endif // N_FACES_3D │ │ │ │ │ -123 │ │ │ │ │ -124#ifdef N_NEIGH_3D │ │ │ │ │ -125 #undef N_NEIGH_3D │ │ │ │ │ -126#endif // N_NEIGH_3D │ │ │ │ │ -127 │ │ │ │ │ -128#ifdef N_WALLS_3D │ │ │ │ │ -129 #undef N_WALLS_3D │ │ │ │ │ -130#endif // N_WALLS_3D │ │ │ │ │ -131 │ │ │ │ │ -132#ifdef N_VERTICES_MAX │ │ │ │ │ -133 #undef N_VERTICES_MAX │ │ │ │ │ -134#endif // N_VERTICES_MAX │ │ │ │ │ -135 │ │ │ │ │ -136#ifdef N_EDGES_MAX │ │ │ │ │ -137 #undef N_EDGES_MAX │ │ │ │ │ -138#endif // N_EDGES_MAX │ │ │ │ │ -139 │ │ │ │ │ -140#ifdef N_FACES_MAX │ │ │ │ │ -141 #undef N_FACES_MAX │ │ │ │ │ -142#endif // N_FACES_MAX │ │ │ │ │ -143 │ │ │ │ │ -144#ifdef N_NEIGH_MAX │ │ │ │ │ -145 #undef N_NEIGH_MAX │ │ │ │ │ -146#endif // N_NEIGH_MAX │ │ │ │ │ -147 │ │ │ │ │ -148#ifdef N_WALLS_MAX │ │ │ │ │ -149 #undef N_WALLS_MAX │ │ │ │ │ -150#endif // N_WALLS_MAX │ │ │ │ │ -151 │ │ │ │ │ -152#ifdef N_LAMBDA │ │ │ │ │ -153 #undef N_LAMBDA │ │ │ │ │ -154#endif // N_LAMBDA │ │ │ │ │ -155 │ │ │ │ │ -156#ifdef LAMBDA_MAX │ │ │ │ │ -157 #undef LAMBDA_MAX │ │ │ │ │ -158#endif // LAMBDA_MAX │ │ │ │ │ -159 │ │ │ │ │ -160#ifdef INDEX │ │ │ │ │ -161 #undef INDEX │ │ │ │ │ -162#endif // INDEX │ │ │ │ │ -163 │ │ │ │ │ -164#ifdef INDEX │ │ │ │ │ -165 #undef INDEX │ │ │ │ │ -166#endif // INDEX │ │ │ │ │ +108 template<> │ │ │ │ │ +109 inline _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _1_,_ _1_ _> >:: │ │ │ │ │ +NormalVector │ │ │ │ │ +_1_1_0 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _1_,_ _1_ _> >:: │ │ │ │ │ +centerIntegrationOuterNormal () const │ │ │ │ │ +111 { │ │ │ │ │ +112 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &oppCoord = grid().getCoord( elementInfo(), │ │ │ │ │ +oppVertex_ ); │ │ │ │ │ +113 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &myCoord = grid().getCoord( elementInfo(), 1- │ │ │ │ │ +oppVertex_ ); │ │ │ │ │ +114 _N_o_r_m_a_l_V_e_c_t_o_r n; │ │ │ │ │ +115 n[ 0 ] = (myCoord[ 0 ] > oppCoord[ 0 ] ? _c_t_y_p_e( 1 ) : -_c_t_y_p_e( 1 )); │ │ │ │ │ +116 return n; │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +119#if defined GRIDDIM && GRIDDIM > 1 │ │ │ │ │ +120 template<> │ │ │ │ │ +121 inline _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _2_,_ _2_ _> >:: │ │ │ │ │ +NormalVector │ │ │ │ │ +122 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _2_,_ _2_ _> >:: │ │ │ │ │ +centerIntegrationOuterNormal () const │ │ │ │ │ +123 { │ │ │ │ │ +124 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coordOne = grid().getCoord( elementInfo(), │ │ │ │ │ +(oppVertex_+1)%3 ); │ │ │ │ │ +125 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coordTwo = grid().getCoord( elementInfo(), │ │ │ │ │ +(oppVertex_+2)%3 ); │ │ │ │ │ +126 │ │ │ │ │ +127 NormalVector n; │ │ │ │ │ +128 n[ 0 ] = -(coordOne[ 1 ] - coordTwo[ 1 ]); │ │ │ │ │ +129 n[ 1 ] = coordOne[ 0 ] - coordTwo[ 0 ]; │ │ │ │ │ +130 return n; │ │ │ │ │ +131 } │ │ │ │ │ +132#endif // defined GRIDDIM && GRIDDIM > 1 │ │ │ │ │ +133 │ │ │ │ │ +134 template<> │ │ │ │ │ +135 inline AlbertaGridIntersectionBase< const AlbertaGrid< 3, 3 > >:: │ │ │ │ │ +NormalVector │ │ │ │ │ +_1_3_6 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _3_,_ _3_ _> >:: │ │ │ │ │ +centerIntegrationOuterNormal () const │ │ │ │ │ +137 { │ │ │ │ │ +138 // in this case the orientation is negative, multiply by -1 │ │ │ │ │ +139 const _A_L_B_E_R_T_A EL_INFO &elInfo = elementInfo().elInfo(); │ │ │ │ │ +140 const _c_t_y_p_e val = (elInfo.orientation > 0) ? 1.0 : -1.0; │ │ │ │ │ +141 │ │ │ │ │ +142 static const int faceVertices[ 4 ][ 3 ] │ │ │ │ │ +143 = { {1,3,2}, {0,2,3}, {0,3,1}, {0,1,2} }; │ │ │ │ │ +144 const int *localFaces = faceVertices[ oppVertex_ ]; │ │ │ │ │ +145 │ │ │ │ │ +146 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord0 = grid().getCoord( elementInfo(), │ │ │ │ │ +localFaces[ 0 ] ); │ │ │ │ │ +147 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord1 = grid().getCoord( elementInfo(), │ │ │ │ │ +localFaces[ 1 ] ); │ │ │ │ │ +148 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord2 = grid().getCoord( elementInfo(), │ │ │ │ │ +localFaces[ 2 ] ); │ │ │ │ │ +149 │ │ │ │ │ +150 FieldVector< ctype, dimensionworld > u; │ │ │ │ │ +151 FieldVector< ctype, dimensionworld > v; │ │ │ │ │ +152 for( int i = 0; i < dimension; ++i ) │ │ │ │ │ +153 { │ │ │ │ │ +154 v[ i ] = coord1[ i ] - coord0[ i ]; │ │ │ │ │ +155 u[ i ] = coord2[ i ] - coord1[ i ]; │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +158 _N_o_r_m_a_l_V_e_c_t_o_r n; │ │ │ │ │ +159 for( int i = 0; i < dimension; ++i ) │ │ │ │ │ +160 { │ │ │ │ │ +161 const int j = (i+1)%dimension; │ │ │ │ │ +162 const int k = (i+2)%dimension; │ │ │ │ │ +163 n[ i ] = val * (u[ j ] * v[ k ] - u[ k ] * v[ j ]); │ │ │ │ │ +164 } │ │ │ │ │ +165 return n; │ │ │ │ │ +166 } │ │ │ │ │ 167 │ │ │ │ │ -168#ifdef IS_LEAF_EL │ │ │ │ │ -169 #undef IS_LEAF_EL │ │ │ │ │ -170#endif // IS_LEAF_EL │ │ │ │ │ -171 │ │ │ │ │ -172#ifdef LEAF_DATA │ │ │ │ │ -173 #undef LEAF_DATA │ │ │ │ │ -174#endif // LEAF_DATA │ │ │ │ │ +168 │ │ │ │ │ +169 template< class Grid > │ │ │ │ │ +170 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +_1_7_1 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_O_u_t_e_r_N_o_r_m_a_l() const │ │ │ │ │ +172 { │ │ │ │ │ +173 return centerIntegrationOuterNormal(); │ │ │ │ │ +174 } │ │ │ │ │ 175 │ │ │ │ │ -176#ifdef INTERIOR │ │ │ │ │ -177 #undef INTERIOR │ │ │ │ │ -178#endif // INTERIOR │ │ │ │ │ -179 │ │ │ │ │ -180#ifdef DIRICHLET │ │ │ │ │ -181 #undef DIRICHLET │ │ │ │ │ -182#endif // DIRICHLET │ │ │ │ │ -183 │ │ │ │ │ -184#ifdef NEUMANN │ │ │ │ │ -185 #undef NEUMANN │ │ │ │ │ -186#endif // NEUMANN │ │ │ │ │ -187 │ │ │ │ │ -188#ifdef IS_NEUMANN │ │ │ │ │ -189 #undef IS_NEUMANN │ │ │ │ │ -190#endif // IS_NEUMANN │ │ │ │ │ -191 │ │ │ │ │ -192#ifdef IS_DIRICHLET │ │ │ │ │ -193 #undef IS_DIRICHLET │ │ │ │ │ -194#endif // IS_DIRICHLET │ │ │ │ │ -195 │ │ │ │ │ -196#ifdef IS_INTERIOR │ │ │ │ │ -197 #undef IS_INTERIOR │ │ │ │ │ -198#endif // IS_INTERIOR │ │ │ │ │ -199 │ │ │ │ │ -200#ifdef N_NODE_TYPES │ │ │ │ │ -201 #undef N_NODE_TYPES │ │ │ │ │ -202#endif // N_NODE_TYPES │ │ │ │ │ -203 │ │ │ │ │ -204#ifdef VERTEX │ │ │ │ │ -205 #undef VERTEX │ │ │ │ │ -206#endif // VERTEX │ │ │ │ │ -207 │ │ │ │ │ -208#ifdef CENTER │ │ │ │ │ -209 #undef CENTER │ │ │ │ │ -210#endif // CENTER │ │ │ │ │ -211 │ │ │ │ │ -212#ifdef EDGE │ │ │ │ │ -213 #undef EDGE │ │ │ │ │ -214#endif // EDGE │ │ │ │ │ -215 │ │ │ │ │ -216#ifdef FACE │ │ │ │ │ -217 #undef FACE │ │ │ │ │ -218#endif // FACE │ │ │ │ │ -219 │ │ │ │ │ -220#ifdef LIST_ENTRY │ │ │ │ │ -221 #undef LIST_ENTRY │ │ │ │ │ -222#endif // LIST_ENTRY │ │ │ │ │ -223 │ │ │ │ │ -224#ifdef WALL_BOUND │ │ │ │ │ -225 #undef WALL_BOUND │ │ │ │ │ -226#endif // WALL_BOUND │ │ │ │ │ -227 │ │ │ │ │ -228#ifdef FILL_NOTHING │ │ │ │ │ -229 #undef FILL_NOTHING │ │ │ │ │ -230#endif // FILL_NOTHING │ │ │ │ │ -231 │ │ │ │ │ -232#ifdef FILL_COORDS │ │ │ │ │ -233 #undef FILL_COORDS │ │ │ │ │ -234#endif // FILL_COORDS │ │ │ │ │ +176 │ │ │ │ │ +177 template< class Grid > │ │ │ │ │ +178 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +_1_7_9 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ │ +180 { │ │ │ │ │ +181 _N_o_r_m_a_l_V_e_c_t_o_r normal = centerOuterNormal(); │ │ │ │ │ +182 normal *= (1.0 / normal.two_norm()); │ │ │ │ │ +183 return normal; │ │ │ │ │ +184 } │ │ │ │ │ +185 │ │ │ │ │ +186 │ │ │ │ │ +187 template< class Grid > │ │ │ │ │ +188 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +_1_8_9 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l ( const │ │ │ │ │ +_L_o_c_a_l_C_o_o_r_d_T_y_p_e & ) const │ │ │ │ │ +190 { │ │ │ │ │ +191 return centerIntegrationOuterNormal(); │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +194 │ │ │ │ │ +195 template< class Grid > │ │ │ │ │ +196 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +_1_9_7 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_o_u_t_e_r_N_o_r_m_a_l( const _L_o_c_a_l_C_o_o_r_d_T_y_p_e & ) │ │ │ │ │ +const │ │ │ │ │ +198 { │ │ │ │ │ +199 return centerOuterNormal(); │ │ │ │ │ +200 } │ │ │ │ │ +201 │ │ │ │ │ +202 │ │ │ │ │ +203 template< class Grid > │ │ │ │ │ +204 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +_2_0_5 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l ( const _L_o_c_a_l_C_o_o_r_d_T_y_p_e │ │ │ │ │ +& ) const │ │ │ │ │ +206 { │ │ │ │ │ +207 return centerUnitOuterNormal(); │ │ │ │ │ +208 } │ │ │ │ │ +209 │ │ │ │ │ +210 │ │ │ │ │ +211 template< class Grid > │ │ │ │ │ +212 inline _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +_2_1_3 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n () const │ │ │ │ │ +214 { │ │ │ │ │ +215 return _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n( elementInfo().transformation( oppVertex_ ) ); │ │ │ │ │ +216 } │ │ │ │ │ +217 │ │ │ │ │ +218 │ │ │ │ │ +219 template< class Grid > │ │ │ │ │ +_2_2_0 inline const _G_r_i_d &_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_g_r_i_d () const │ │ │ │ │ +221 { │ │ │ │ │ +222 return *grid_; │ │ │ │ │ +223 } │ │ │ │ │ +224 │ │ │ │ │ +225 │ │ │ │ │ +226 template< class Grid > │ │ │ │ │ +227 inline const typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o & │ │ │ │ │ +_2_2_8 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o () const │ │ │ │ │ +229 { │ │ │ │ │ +230 assert( !!elementInfo_ ); │ │ │ │ │ +231 return elementInfo_; │ │ │ │ │ +232 } │ │ │ │ │ +233 │ │ │ │ │ +234 │ │ │ │ │ 235 │ │ │ │ │ -236#ifdef FILL_BOUND │ │ │ │ │ -237 #undef FILL_BOUND │ │ │ │ │ -238#endif // FILL_BOUND │ │ │ │ │ -239 │ │ │ │ │ -240#ifdef FILL_NEIGH │ │ │ │ │ -241 #undef FILL_NEIGH │ │ │ │ │ -242#endif // FILL_NEIGH │ │ │ │ │ +236 // AlbertaGridIntersectionBase::GlobalCoordReader │ │ │ │ │ +237 // ---------------------------------------------- │ │ │ │ │ +238 │ │ │ │ │ +239 template< class GridImp > │ │ │ │ │ +_2_4_0 struct _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e< GridImp >::_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +241 { │ │ │ │ │ +_2_4_2 typedef typename std::remove_const< GridImp >::type _G_r_i_d; │ │ │ │ │ 243 │ │ │ │ │ -244#ifdef FILL_OPP_COORDS │ │ │ │ │ -245 #undef FILL_OPP_COORDS │ │ │ │ │ -246#endif // FILL_OPP_COORDS │ │ │ │ │ -247 │ │ │ │ │ -248#ifdef FILL_ORIENTATION │ │ │ │ │ -249 #undef FILL_ORIENTATION │ │ │ │ │ -250#endif // FILL_ORIENTATION │ │ │ │ │ -251 │ │ │ │ │ -252#ifdef FILL_EL_TYPE │ │ │ │ │ -253 #undef FILL_EL_TYPE │ │ │ │ │ -254#endif // FILL_EL_TYPE │ │ │ │ │ -255 │ │ │ │ │ -256#ifdef FILL_PROJECTION │ │ │ │ │ -257 #undef FILL_PROJECTION │ │ │ │ │ -258#endif // FILL_PROJECTION │ │ │ │ │ +_2_4_4 static const int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_2_4_5 static const int codimension = 1; │ │ │ │ │ +_2_4_6 static const int mydimension = _d_i_m_e_n_s_i_o_n - codimension; │ │ │ │ │ +_2_4_7 static const int coorddimension = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +248 │ │ │ │ │ +_2_4_9 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ +250 │ │ │ │ │ +_2_5_1 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +_2_5_2 typedef FieldVector< ctype, coorddimension > _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +253 │ │ │ │ │ +254 private: │ │ │ │ │ +255 const _G_r_i_d &_g_r_i_d__; │ │ │ │ │ +256 const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t_I_n_f_o__; │ │ │ │ │ +257 const int subEntity_; │ │ │ │ │ +258 const int twist_; │ │ │ │ │ 259 │ │ │ │ │ -260#ifdef FILL_ANY │ │ │ │ │ -261 #undef FILL_ANY │ │ │ │ │ -262#endif // FILL_ANY │ │ │ │ │ -263 │ │ │ │ │ -264#ifdef HOOK_QUEUE_OFFSET │ │ │ │ │ -265 #undef HOOK_QUEUE_OFFSET │ │ │ │ │ -266#endif // HOOK_QUEUE_OFFSET │ │ │ │ │ -267 │ │ │ │ │ -268#ifdef RUN_HOOKS_0 │ │ │ │ │ -269 #undef RUN_HOOKS_0 │ │ │ │ │ -270#endif // RUN_HOOKS_0 │ │ │ │ │ -271 │ │ │ │ │ -272#ifdef RUN_BAS_FCTS_HOOKS │ │ │ │ │ -273 #undef RUN_BAS_FCTS_HOOKS │ │ │ │ │ -274#endif // RUN_BAS_FCTS_HOOKS │ │ │ │ │ -275 │ │ │ │ │ -276#ifdef RUN_HOOKS_1 │ │ │ │ │ -277 #undef RUN_HOOKS_1 │ │ │ │ │ -278#endif // RUN_HOOKS_1 │ │ │ │ │ -279 │ │ │ │ │ -280#ifdef RUN_HOOKS_2 │ │ │ │ │ -281 #undef RUN_HOOKS_2 │ │ │ │ │ -282#endif // RUN_HOOKS_2 │ │ │ │ │ -283 │ │ │ │ │ -284#ifdef RUN_HOOKS_3 │ │ │ │ │ -285 #undef RUN_HOOKS_3 │ │ │ │ │ -286#endif // RUN_HOOKS_3 │ │ │ │ │ -287 │ │ │ │ │ -288#ifdef RUN_HOOKS_4 │ │ │ │ │ -289 #undef RUN_HOOKS_4 │ │ │ │ │ -290#endif // RUN_HOOKS_4 │ │ │ │ │ -291 │ │ │ │ │ -292#ifdef RUN_HOOKS_5 │ │ │ │ │ -293 #undef RUN_HOOKS_5 │ │ │ │ │ -294#endif // RUN_HOOKS_5 │ │ │ │ │ -295 │ │ │ │ │ -296#ifdef RUN_HOOKS_6 │ │ │ │ │ -297 #undef RUN_HOOKS_6 │ │ │ │ │ -298#endif // RUN_HOOKS_6 │ │ │ │ │ +260 public: │ │ │ │ │ +_2_6_1 _G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +262 const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t_I_n_f_o, │ │ │ │ │ +263 int subEntity ) │ │ │ │ │ +264 : _g_r_i_d__( _g_r_i_d ), │ │ │ │ │ +265 _e_l_e_m_e_n_t_I_n_f_o__( _e_l_e_m_e_n_t_I_n_f_o ), │ │ │ │ │ +266 subEntity_( subEntity ), │ │ │ │ │ +267 twist_( _e_l_e_m_e_n_t_I_n_f_o.template twist< codimension >( subEntity ) ) │ │ │ │ │ +268 {} │ │ │ │ │ +269 │ │ │ │ │ +_2_7_0 void _c_o_o_r_d_i_n_a_t_e ( int i, _C_o_o_r_d_i_n_a_t_e &x ) const │ │ │ │ │ +271 { │ │ │ │ │ +272 assert( !_e_l_e_m_e_n_t_I_n_f_o__ == false ); │ │ │ │ │ +273 assert( (i >= 0) && (i <= mydimension) ); │ │ │ │ │ +274 │ │ │ │ │ +275 const int ti = Alberta::applyInverseTwist< mydimension >( twist_, i ); │ │ │ │ │ +276 const int k = mapVertices( subEntity_, ti ); │ │ │ │ │ +277 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coord = _g_r_i_d__.getCoord( _e_l_e_m_e_n_t_I_n_f_o__, k ); │ │ │ │ │ +278 for( int j = 0; j < coorddimension; ++j ) │ │ │ │ │ +279 x[ j ] = coord[ j ]; │ │ │ │ │ +280 } │ │ │ │ │ +281 │ │ │ │ │ +_2_8_2 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +283 { │ │ │ │ │ +284 return false; │ │ │ │ │ +285 } │ │ │ │ │ +286 │ │ │ │ │ +_2_8_7 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +288 { │ │ │ │ │ +289 assert( false ); │ │ │ │ │ +290 return _c_t_y_p_e( 0 ); │ │ │ │ │ +291 } │ │ │ │ │ +292 │ │ │ │ │ +293 private: │ │ │ │ │ +294 static int mapVertices ( int subEntity, int i ) │ │ │ │ │ +295 { │ │ │ │ │ +296 return _A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_a_p_p_l_y( subEntity, i │ │ │ │ │ +); │ │ │ │ │ +297 } │ │ │ │ │ +298 }; │ │ │ │ │ 299 │ │ │ │ │ -300#ifdef RUN_HOOKS_7 │ │ │ │ │ -301 #undef RUN_HOOKS_7 │ │ │ │ │ -302#endif // RUN_HOOKS_7 │ │ │ │ │ -303 │ │ │ │ │ -304#ifdef CALL_EVERY_EL_PREORDER │ │ │ │ │ -305 #undef CALL_EVERY_EL_PREORDER │ │ │ │ │ -306#endif // CALL_EVERY_EL_PREORDER │ │ │ │ │ -307 │ │ │ │ │ -308#ifdef CALL_EVERY_EL_INORDER │ │ │ │ │ -309 #undef CALL_EVERY_EL_INORDER │ │ │ │ │ -310#endif // CALL_EVERY_EL_INORDER │ │ │ │ │ -311 │ │ │ │ │ -312#ifdef CALL_EVERY_EL_POSTORDER │ │ │ │ │ -313 #undef CALL_EVERY_EL_POSTORDER │ │ │ │ │ -314#endif // CALL_EVERY_EL_POSTORDER │ │ │ │ │ +300 │ │ │ │ │ +301 │ │ │ │ │ +302 │ │ │ │ │ +303 // AlbertaGridIntersectionBase::LocalCoordReader │ │ │ │ │ +304 // --------------------------------------------- │ │ │ │ │ +305 │ │ │ │ │ +306 template< class GridImp > │ │ │ │ │ +_3_0_7 struct _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e< GridImp >::_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +308 { │ │ │ │ │ +_3_0_9 typedef typename std::remove_const< GridImp >::type _G_r_i_d; │ │ │ │ │ +310 │ │ │ │ │ +_3_1_1 static const int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_3_1_2 static const int codimension = 1; │ │ │ │ │ +_3_1_3 static const int mydimension = _d_i_m_e_n_s_i_o_n - codimension; │ │ │ │ │ +_3_1_4 static const int coorddimension = _d_i_m_e_n_s_i_o_n; │ │ │ │ │ 315 │ │ │ │ │ -316#ifdef CALL_LEAF_EL │ │ │ │ │ -317 #undef CALL_LEAF_EL │ │ │ │ │ -318#endif // CALL_LEAF_EL │ │ │ │ │ +_3_1_6 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ +317 │ │ │ │ │ +_3_1_8 typedef FieldVector< ctype, coorddimension > _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ 319 │ │ │ │ │ -320#ifdef CALL_LEAF_EL_LEVEL │ │ │ │ │ -321 #undef CALL_LEAF_EL_LEVEL │ │ │ │ │ -322#endif // CALL_LEAF_EL_LEVEL │ │ │ │ │ -323 │ │ │ │ │ -324#ifdef CALL_EL_LEVEL │ │ │ │ │ -325 #undef CALL_EL_LEVEL │ │ │ │ │ -326#endif // CALL_EL_LEVEL │ │ │ │ │ -327 │ │ │ │ │ -328#ifdef CALL_MG_LEVEL │ │ │ │ │ -329 #undef CALL_MG_LEVEL │ │ │ │ │ -330#endif // CALL_MG_LEVEL │ │ │ │ │ -331 │ │ │ │ │ -332#ifdef TEST_FLAG │ │ │ │ │ -333 #undef TEST_FLAG │ │ │ │ │ -334#endif // TEST_FLAG │ │ │ │ │ -335 │ │ │ │ │ -336#ifdef DOF_ADMIN_DEF │ │ │ │ │ -337 #undef DOF_ADMIN_DEF │ │ │ │ │ -338#endif // DOF_ADMIN_DEF │ │ │ │ │ -339 │ │ │ │ │ -340#ifdef DOF_FREE_SIZE │ │ │ │ │ -341 #undef DOF_FREE_SIZE │ │ │ │ │ -342#endif // DOF_FREE_SIZE │ │ │ │ │ +_3_2_0 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Geometry _E_l_e_m_e_n_t_G_e_o_m_e_t_r_y; │ │ │ │ │ +_3_2_1 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 1 >::Geometry _F_a_c_e_G_e_o_m_e_t_r_y; │ │ │ │ │ +322 │ │ │ │ │ +323 private: │ │ │ │ │ +324 const _E_l_e_m_e_n_t_G_e_o_m_e_t_r_y &elementGeometry_; │ │ │ │ │ +325 const _F_a_c_e_G_e_o_m_e_t_r_y &faceGeometry_; │ │ │ │ │ +326 │ │ │ │ │ +327 public: │ │ │ │ │ +_3_2_8 _L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r ( const _E_l_e_m_e_n_t_G_e_o_m_e_t_r_y &elementGeometry, │ │ │ │ │ +329 const _F_a_c_e_G_e_o_m_e_t_r_y &faceGeometry ) │ │ │ │ │ +330 : elementGeometry_( elementGeometry ), │ │ │ │ │ +331 faceGeometry_( faceGeometry ) │ │ │ │ │ +332 {} │ │ │ │ │ +333 │ │ │ │ │ +_3_3_4 void _c_o_o_r_d_i_n_a_t_e ( int i, _C_o_o_r_d_i_n_a_t_e &x ) const │ │ │ │ │ +335 { │ │ │ │ │ +336 x = elementGeometry_.local( faceGeometry_.corner( i ) ); │ │ │ │ │ +337 } │ │ │ │ │ +338 │ │ │ │ │ +_3_3_9 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +340 { │ │ │ │ │ +341 return false; │ │ │ │ │ +342 } │ │ │ │ │ 343 │ │ │ │ │ -344#ifdef DOF_UNIT_ALL_FREE │ │ │ │ │ -345 #undef DOF_UNIT_ALL_FREE │ │ │ │ │ -346#endif // DOF_UNIT_ALL_FREE │ │ │ │ │ -347 │ │ │ │ │ -348#ifdef FOR_ALL_DOFS │ │ │ │ │ -349 #undef FOR_ALL_DOFS │ │ │ │ │ -350#endif // FOR_ALL_DOFS │ │ │ │ │ +_3_4_4 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ │ +345 { │ │ │ │ │ +346 return _c_t_y_p_e( 0 ); │ │ │ │ │ +347 } │ │ │ │ │ +348 }; │ │ │ │ │ +349 │ │ │ │ │ +350 │ │ │ │ │ 351 │ │ │ │ │ -352#ifdef FOR_ALL_FREE_DOFS │ │ │ │ │ -353 #undef FOR_ALL_FREE_DOFS │ │ │ │ │ -354#endif // FOR_ALL_FREE_DOFS │ │ │ │ │ -355 │ │ │ │ │ -356#ifdef DOWBM_FULL │ │ │ │ │ -357 #undef DOWBM_FULL │ │ │ │ │ -358#endif // DOWBM_FULL │ │ │ │ │ -359 │ │ │ │ │ -360#ifdef DOWBM_SYMM │ │ │ │ │ -361 #undef DOWBM_SYMM │ │ │ │ │ -362#endif // DOWBM_SYMM │ │ │ │ │ -363 │ │ │ │ │ -364#ifdef DOWBM_DIAG │ │ │ │ │ -365 #undef DOWBM_DIAG │ │ │ │ │ -366#endif // DOWBM_DIAG │ │ │ │ │ -367 │ │ │ │ │ -368#ifdef ROW_LENGTH │ │ │ │ │ -369 #undef ROW_LENGTH │ │ │ │ │ -370#endif // ROW_LENGTH │ │ │ │ │ -371 │ │ │ │ │ -372#ifdef ENTRY_USED │ │ │ │ │ -373 #undef ENTRY_USED │ │ │ │ │ -374#endif // ENTRY_USED │ │ │ │ │ +352 // AlbertaGridLeafIntersection │ │ │ │ │ +353 // --------------------------- │ │ │ │ │ +354 │ │ │ │ │ +355 template< class GridImp > │ │ │ │ │ +_3_5_6 inline void _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_>_:_:_n_e_x_t () │ │ │ │ │ +357 { │ │ │ │ │ +358 assert( oppVertex_ <= dimension ); │ │ │ │ │ +359 ++oppVertex_; │ │ │ │ │ +360 neighborInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ +361 } │ │ │ │ │ +362 │ │ │ │ │ +363 template< class GridImp > │ │ │ │ │ +364 inline typename GridImp::template Codim< 0 >::Entity │ │ │ │ │ +_3_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_o_u_t_s_i_d_e () const │ │ │ │ │ +366 { │ │ │ │ │ +367 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _G_r_i_d_I_m_p_:_:_d_i_m_e_n_s_i_o_n_,_ _G_r_i_d_I_m_p_ _> _E_n_t_i_t_y_I_m_p; │ │ │ │ │ +368 │ │ │ │ │ +369 if( !neighborInfo_ ) │ │ │ │ │ +370 { │ │ │ │ │ +371 assert( neighbor() ); │ │ │ │ │ +372 │ │ │ │ │ +373 neighborInfo_ = elementInfo().leafNeighbor( oppVertex_ ); │ │ │ │ │ +374 } │ │ │ │ │ 375 │ │ │ │ │ -376#ifdef ENTRY_NOT_USED │ │ │ │ │ -377 #undef ENTRY_NOT_USED │ │ │ │ │ -378#endif // ENTRY_NOT_USED │ │ │ │ │ -379 │ │ │ │ │ -380#ifdef UNUSED_ENTRY │ │ │ │ │ -381 #undef UNUSED_ENTRY │ │ │ │ │ -382#endif // UNUSED_ENTRY │ │ │ │ │ -383 │ │ │ │ │ -384#ifdef NO_MORE_ENTRIES │ │ │ │ │ -385 #undef NO_MORE_ENTRIES │ │ │ │ │ -386#endif // NO_MORE_ENTRIES │ │ │ │ │ +376 assert( !neighborInfo_ == false ); │ │ │ │ │ +377 assert( neighborInfo_.el() != NULL ); │ │ │ │ │ +378 return _E_n_t_i_t_y_I_m_p( grid(), neighborInfo_, 0 ); │ │ │ │ │ +379 } │ │ │ │ │ +380 │ │ │ │ │ +381 template< class GridImp > │ │ │ │ │ +_3_8_2 inline bool _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_n_e_i_g_h_b_o_r () const │ │ │ │ │ +383 { │ │ │ │ │ +384 assert( oppVertex_ <= dimension ); │ │ │ │ │ +385 return elementInfo().hasLeafNeighbor( oppVertex_ ); │ │ │ │ │ +386 } │ │ │ │ │ 387 │ │ │ │ │ -388#ifdef LAGRANGE_NODES │ │ │ │ │ -389 #undef LAGRANGE_NODES │ │ │ │ │ -390#endif // LAGRANGE_NODES │ │ │ │ │ -391 │ │ │ │ │ -392#ifdef MAX_N_QUAD_POINTS │ │ │ │ │ -393 #undef MAX_N_QUAD_POINTS │ │ │ │ │ -394#endif // MAX_N_QUAD_POINTS │ │ │ │ │ -395 │ │ │ │ │ -396#ifdef INIT_PHI │ │ │ │ │ -397 #undef INIT_PHI │ │ │ │ │ -398#endif // INIT_PHI │ │ │ │ │ +388 │ │ │ │ │ +389 template< class GridImp > │ │ │ │ │ +390 inline typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +_3_9_1 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e () const │ │ │ │ │ +392 { │ │ │ │ │ +393 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_I_m_p_ _> LocalGeoProvider; │ │ │ │ │ +394 const int twist = elementInfo().template twist< 1 >( oppVertex_ ); │ │ │ │ │ +395 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ │ +396 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().faceGeometry( face, │ │ │ │ │ +twist ) ); │ │ │ │ │ +397 } │ │ │ │ │ +398 │ │ │ │ │ 399 │ │ │ │ │ -400#ifdef INIT_GRD_PHI │ │ │ │ │ -401 #undef INIT_GRD_PHI │ │ │ │ │ -402#endif // INIT_GRD_PHI │ │ │ │ │ -403 │ │ │ │ │ -404#ifdef INIT_D2_PHI │ │ │ │ │ -405 #undef INIT_D2_PHI │ │ │ │ │ -406#endif // INIT_D2_PHI │ │ │ │ │ -407 │ │ │ │ │ -408#ifdef MESH_REFINED │ │ │ │ │ -409 #undef MESH_REFINED │ │ │ │ │ -410#endif // MESH_REFINED │ │ │ │ │ -411 │ │ │ │ │ -412#ifdef MESH_COARSENED │ │ │ │ │ -413 #undef MESH_COARSENED │ │ │ │ │ -414#endif // MESH_COARSENED │ │ │ │ │ -415 │ │ │ │ │ -416#ifdef H1_NORM │ │ │ │ │ -417 #undef H1_NORM │ │ │ │ │ -418#endif // H1_NORM │ │ │ │ │ -419 │ │ │ │ │ -420#ifdef L2_NORM │ │ │ │ │ -421 #undef L2_NORM │ │ │ │ │ -422#endif // L2_NORM │ │ │ │ │ +400 template< class GridImp > │ │ │ │ │ +401 inline typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +_4_0_2 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ +403 { │ │ │ │ │ +404 assert( neighbor() ); │ │ │ │ │ +405 │ │ │ │ │ +406 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_I_m_p_ _> LocalGeoProvider; │ │ │ │ │ +407 const _A_L_B_E_R_T_A EL_INFO &elInfo = elementInfo().elInfo(); │ │ │ │ │ +408 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ]; │ │ │ │ │ +409 const int twist = elementInfo().twistInNeighbor( oppVertex_ ); │ │ │ │ │ +410 const int face = (dimension > 1 ? oppVertex : 1-oppVertex); │ │ │ │ │ +411 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().faceGeometry( face, │ │ │ │ │ +twist ) ); │ │ │ │ │ +412 } │ │ │ │ │ +413 │ │ │ │ │ +414 │ │ │ │ │ +415 template< class GridImp > │ │ │ │ │ +416 inline typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +_4_1_7 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ +418 { │ │ │ │ │ +419 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ │ +420 const _G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r coordReader( grid(), elementInfo(), face ); │ │ │ │ │ +421 return _G_e_o_m_e_t_r_y( _G_e_o_m_e_t_r_y_I_m_p_l( coordReader ) ); │ │ │ │ │ +422 } │ │ │ │ │ 423 │ │ │ │ │ -424#ifdef GRAPH_MESH_BOUNDARY │ │ │ │ │ -425 #undef GRAPH_MESH_BOUNDARY │ │ │ │ │ -426#endif // GRAPH_MESH_BOUNDARY │ │ │ │ │ -427 │ │ │ │ │ -428#ifdef GRAPH_MESH_ELEMENT_MARK │ │ │ │ │ -429 #undef GRAPH_MESH_ELEMENT_MARK │ │ │ │ │ -430#endif // GRAPH_MESH_ELEMENT_MARK │ │ │ │ │ -431 │ │ │ │ │ -432#ifdef GRAPH_MESH_VERTEX_DOF │ │ │ │ │ -433 #undef GRAPH_MESH_VERTEX_DOF │ │ │ │ │ -434#endif // GRAPH_MESH_VERTEX_DOF │ │ │ │ │ +424 │ │ │ │ │ +425 template< class GridImp > │ │ │ │ │ +_4_2_6 inline int _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _>_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ +427 { │ │ │ │ │ +428 const _A_L_B_E_R_T_A EL_INFO &elInfo = elementInfo().elInfo(); │ │ │ │ │ +429 const int oppVertex = elInfo.opp_vertex[ oppVertex_ ]; │ │ │ │ │ +430 const int face = (dimension > 1 ? oppVertex : 1-oppVertex); │ │ │ │ │ +431 return grid().alberta2generic( 1, face ); │ │ │ │ │ +432 } │ │ │ │ │ +433 │ │ │ │ │ +434} // namespace Dune │ │ │ │ │ 435 │ │ │ │ │ -436#ifdef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ │ -437 #undef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ │ -438#endif // GRAPH_MESH_ELEMENT_INDEX │ │ │ │ │ -439 │ │ │ │ │ -440#ifdef GET_MESH │ │ │ │ │ -441 #undef GET_MESH │ │ │ │ │ -442#endif // GET_MESH │ │ │ │ │ -443 │ │ │ │ │ -444#ifdef GET_DOF_VEC │ │ │ │ │ -445 #undef GET_DOF_VEC │ │ │ │ │ -446#endif // GET_DOF_VEC │ │ │ │ │ -447 │ │ │ │ │ -448#ifdef CARD_SN_MAX │ │ │ │ │ -449 #undef CARD_SN_MAX │ │ │ │ │ -450#endif // CARD_SN_MAX │ │ │ │ │ -451 │ │ │ │ │ -452#ifdef INIT_UH │ │ │ │ │ -453 #undef INIT_UH │ │ │ │ │ -454#endif // INIT_UH │ │ │ │ │ -455 │ │ │ │ │ -456#ifdef INIT_GRD_UH │ │ │ │ │ -457 #undef INIT_GRD_UH │ │ │ │ │ -458#endif // INIT_GRD_UH │ │ │ │ │ -459 │ │ │ │ │ -460#ifdef TRAVERSE_START │ │ │ │ │ -461 #undef TRAVERSE_START │ │ │ │ │ -462#endif // TRAVERSE_START │ │ │ │ │ -463 │ │ │ │ │ -464#ifdef TRAVERSE_STOP │ │ │ │ │ -465 #undef TRAVERSE_STOP │ │ │ │ │ -466#endif // TRAVERSE_STOP │ │ │ │ │ +436#endif // #ifndef DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +Include standard header files. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ │ +LocalGeometry geometryInOutside() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:402 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ +GridImp::template Codim< 0 >::Entity outside() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:365 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_x_t │ │ │ │ │ +void next() │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:356 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y_I_m_p_l │ │ │ │ │ +Base::GeometryImpl GeometryImpl │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ │ +int indexInOutside() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:426 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ │ +LocalGeometry geometryInInside() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:391 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +Base::GlobalCoordReader GlobalCoordReader │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Base::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:417 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +bool neighbor() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:382 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +Base::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:241 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, coorddimension > Coordinate │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:252 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ +Alberta::Real ctype │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:249 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ +std::remove_const< GridImp >::type Grid │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:242 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:251 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +ctype determinant() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:287 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +bool hasDeterminant() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:282 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +GlobalCoordReader(const GridImp &grid, const ElementInfo &elementInfo, int │ │ │ │ │ +subEntity) │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:261 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +void coordinate(int i, Coordinate &x) const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:270 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:308 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_F_a_c_e_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< 1 >::Geometry FaceGeometry │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:321 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ +Alberta::Real ctype │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:316 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ │ +LocalCoordReader(const ElementGeometry &elementGeometry, const FaceGeometry │ │ │ │ │ +&faceGeometry) │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:328 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ +std::remove_const< GridImp >::type Grid │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:309 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +void coordinate(int i, Coordinate &x) const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:334 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +bool hasDeterminant() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:339 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +ctype determinant() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:344 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, coorddimension > Coordinate │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:318 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_R_e_a_d_e_r_:_:_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ │ +Grid::template Codim< 0 >::Geometry ElementGeometry │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:320 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_e_n_t_e_r_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector centerOuterNormal() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:171 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +const ElementInfo & elementInfo() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:228 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimensionworld > NormalVector │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_e_n_t_e_r_I_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector centerIntegrationOuterNormal() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:90 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector integrationOuterNormal(const LocalCoordType &local) const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_e_l_e_m_e_n_t_I_n_f_o__ │ │ │ │ │ +ElementInfo elementInfo_ │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_T_y_p_e │ │ │ │ │ +FieldVector< ctype, dimension-1 > LocalCoordType │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector centerUnitOuterNormal() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:179 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ +int indexInInside() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:74 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_i_n_s_i_d_e │ │ │ │ │ +Entity inside() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector unitOuterNormal(const LocalCoordType &local) const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:205 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:220 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ +bool boundary() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:43 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:64 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:82 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +AlbertaTransformation transformation() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:213 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector outerNormal(const LocalCoordType &local) const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:197 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId() const │ │ │ │ │ +DDeeffiinniittiioonn intersection.cc:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_:_:_g_r_i_d__ │ │ │ │ │ +const Grid * grid_ │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:443 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_I_n_d_e_x │ │ │ │ │ +unsigned int boundaryIndex() const │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn transformation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< cd >::Geometry Geometry │ │ │ │ │ +The corresponding geometry type. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static constexpr int dimensionworld │ │ │ │ │ +The dimension of the world the grid lives in. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: level.hh File Reference │ │ │ │ +dune-grid: hierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,34 +72,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
level.hh File Reference
│ │ │ │ +
hierarchiciterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cstdlib>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/common/entityiterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaGridLevelProvider< dim >
 
class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
 
class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
 
struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
class  Dune::AlbertaGridHierarchicIterator< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,20 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -level.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ +hierarchiciterator.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_S_e_t_L_o_c_a_l │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: level.hh Source File │ │ │ │ +dune-grid: hierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,327 +74,210 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
level.hh
│ │ │ │ +
hierarchiciterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_LEVEL_HH
│ │ │ │ -
6#define DUNE_ALBERTA_LEVEL_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <cstdlib>
│ │ │ │ + │ │ │ │ + │ │ │ │
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15#if HAVE_ALBERTA
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 // AlbertaGridLevelProvider
│ │ │ │ -
21 // ------------------------
│ │ │ │ -
22
│ │ │ │ -
23 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28 typedef unsigned char Level;
│ │ │ │ -
29
│ │ │ │ - │ │ │ │ - │ │ │ │ -
32
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35 static const Level isNewFlag = (1 << 7);
│ │ │ │ -
36 static const Level levelMask = (1 << 7) - 1;
│ │ │ │ -
37
│ │ │ │ -
38 class SetLocal;
│ │ │ │ -
39 class CalcMaxLevel;
│ │ │ │ +
11#if HAVE_ALBERTA
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 // AlbertaGridHierarchicIterator
│ │ │ │ +
17 // -----------------------------
│ │ │ │ +
18
│ │ │ │ +
27 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
33 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
34 typedef typename GridImp::ctype ctype;
│ │ │ │ +
35
│ │ │ │ + │ │ │ │ + │ │ │ │ +
38
│ │ │ │ +
39 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │ │
40
│ │ │ │ -
41 template< Level flags >
│ │ │ │ -
42 struct ClearFlags;
│ │ │ │ -
43
│ │ │ │ -
44 struct Interpolation;
│ │ │ │ -
45
│ │ │ │ -
46 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 Level operator() ( const Alberta::Element *element ) const
│ │ │ │ -
52 {
│ │ │ │ -
53 const Level *array = (Level *)level_;
│ │ │ │ -
54 return array[ dofAccess_( element, 0 ) ] & levelMask;
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
│ │ │ │ -
57 Level operator() ( const ElementInfo &elementInfo ) const
│ │ │ │ -
58 {
│ │ │ │ -
59 return (*this)( elementInfo.el() );
│ │ │ │ -
60 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
42 {}
│ │ │ │
│ │ │ │ -
61
│ │ │ │ +
43
│ │ │ │ +
45 AlbertaGridHierarchicIterator ( const GridImp &grid,
│ │ │ │ +
46 const ElementInfo &elementInfo,
│ │ │ │ +
47 int maxLevel );
│ │ │ │ +
48
│ │ │ │ +
50 AlbertaGridHierarchicIterator ( const GridImp &grid, int actLevel, int maxLevel );
│ │ │ │ +
51
│ │ │ │ +
53 AlbertaGridHierarchicIterator ( const This &other );
│ │ │ │ +
54
│ │ │ │ +
56 This &operator= ( const This &other );
│ │ │ │ +
57
│ │ │ │ +
59 void increment();
│ │ │ │ +
60
│ │ │ │
│ │ │ │ -
62 bool isNew ( const Alberta::Element *element ) const
│ │ │ │ +
62 bool equals ( const This &other ) const
│ │ │ │
63 {
│ │ │ │ -
64 const Level *array = (Level *)level_;
│ │ │ │ -
65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0);
│ │ │ │ -
66 }
│ │ │ │ +
64 return entity_.impl().equals( other.entity_.impl() );
│ │ │ │ +
65 }
│ │ │ │
│ │ │ │ -
67
│ │ │ │ +
66
│ │ │ │
│ │ │ │ -
68 bool isNew ( const ElementInfo &elementInfo ) const
│ │ │ │ + │ │ │ │
69 {
│ │ │ │ -
70 return isNew( elementInfo.el() );
│ │ │ │ +
70 return entity_;
│ │ │ │
71 }
│ │ │ │
│ │ │ │
72
│ │ │ │ -
│ │ │ │ -
73 Level maxLevel () const
│ │ │ │ -
74 {
│ │ │ │ -
75 CalcMaxLevel calcFromCache;
│ │ │ │ -
76 level_.forEach( calcFromCache );
│ │ │ │ -
77#ifndef NDEBUG
│ │ │ │ -
78 CalcMaxLevel calcFromGrid;
│ │ │ │ -
79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );
│ │ │ │ -
80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );
│ │ │ │ -
81#endif
│ │ │ │ -
82 return calcFromCache.maxLevel();;
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
86 {
│ │ │ │ -
87 return MeshPointer( level_.dofSpace()->mesh );
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ -
90 void markAllOld ()
│ │ │ │ -
91 {
│ │ │ │ -
92 ClearFlags< isNewFlag > clearIsNew;
│ │ │ │ -
93 level_.forEach( clearIsNew );
│ │ │ │ -
94 }
│ │ │ │ -
│ │ │ │ -
95
│ │ │ │ -
│ │ │ │ -
96 void create ( const DofNumbering &dofNumbering )
│ │ │ │ -
97 {
│ │ │ │ -
98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );
│ │ │ │ -
99 dofAccess_ = DofAccess( dofSpace );
│ │ │ │ -
100
│ │ │ │ -
101 level_.create( dofSpace, "Element level" );
│ │ │ │ -
102 assert( level_ );
│ │ │ │ -
103 level_.template setupInterpolation< Interpolation >();
│ │ │ │ -
104
│ │ │ │ -
105 SetLocal setLocal( level_ );
│ │ │ │ - │ │ │ │ -
107 }
│ │ │ │ -
│ │ │ │ -
108
│ │ │ │ -
│ │ │ │ -
109 void release ()
│ │ │ │ -
110 {
│ │ │ │ -
111 level_.release();
│ │ │ │ -
112 dofAccess_ = DofAccess();
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
115 private:
│ │ │ │ -
116 DofVectorPointer level_;
│ │ │ │ -
117 DofAccess dofAccess_;
│ │ │ │ -
118 };
│ │ │ │ +
│ │ │ │ +
74 int level () const
│ │ │ │ +
75 {
│ │ │ │ +
76 return entity_.impl().level();
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79 protected:
│ │ │ │ +
│ │ │ │ +
81 const GridImp &grid () const
│ │ │ │ +
82 {
│ │ │ │ +
83 return entity_.impl().grid();
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86 private:
│ │ │ │ +
87 void increment ( ElementInfo elementInfo );
│ │ │ │ +
88
│ │ │ │ +
89 mutable Entity entity_;
│ │ │ │ +
90
│ │ │ │ +
91 // level on which the iterator was started
│ │ │ │ +
92 int startLevel_;
│ │ │ │ +
93
│ │ │ │ +
94 // maximal level to go down to
│ │ │ │ +
95 int maxlevel_;
│ │ │ │ +
96 };
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
98
│ │ │ │ +
99 template< class GridImp >
│ │ │ │ +
100 inline AlbertaGridHierarchicIterator< GridImp >
│ │ │ │ +
│ │ │ │ +
101 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int maxLevel )
│ │ │ │ +
102 : entity_( EntityImp( grid ) ),
│ │ │ │ +
103 startLevel_( actLevel ),
│ │ │ │ +
104 maxlevel_( maxLevel )
│ │ │ │ +
105 {}
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
107
│ │ │ │ +
108 template< class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 const ElementInfo &elementInfo,
│ │ │ │ +
112 int maxLevel )
│ │ │ │ +
113 : entity_( EntityImp( grid ) ),
│ │ │ │ +
114 startLevel_( elementInfo.level() ),
│ │ │ │ +
115 maxlevel_( maxLevel )
│ │ │ │ +
116 {
│ │ │ │ +
117 increment( elementInfo );
│ │ │ │ +
118 }
│ │ │ │
│ │ │ │
119
│ │ │ │
120
│ │ │ │ -
121
│ │ │ │ -
122 // AlbertaGridLevelProvider::SetLocal
│ │ │ │ -
123 // ----------------------------------
│ │ │ │ -
124
│ │ │ │ -
125 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
127 {
│ │ │ │ -
128 DofVectorPointer level_;
│ │ │ │ -
129 DofAccess dofAccess_;
│ │ │ │ -
130
│ │ │ │ -
131 public:
│ │ │ │ +
121 template< class GridImp >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
124 : entity_( other.entity_ ),
│ │ │ │ +
125 startLevel_( other.startLevel_ ),
│ │ │ │ +
126 maxlevel_( other.maxlevel_ )
│ │ │ │ +
127 {}
│ │ │ │ +
│ │ │ │ +
128
│ │ │ │ +
129
│ │ │ │ +
130 template< class GridImp >
│ │ │ │ + │ │ │ │
│ │ │ │ -
132 explicit SetLocal ( const DofVectorPointer &level )
│ │ │ │ -
133 : level_( level ),
│ │ │ │ -
134 dofAccess_( level.dofSpace() )
│ │ │ │ -
135 {}
│ │ │ │ -
│ │ │ │ -
136
│ │ │ │ -
│ │ │ │ -
137 void operator() ( const Alberta::ElementInfo< dim > &elementInfo ) const
│ │ │ │ -
138 {
│ │ │ │ -
139 Level *const array = (Level *)level_;
│ │ │ │ -
140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo.level();
│ │ │ │ -
141 }
│ │ │ │ -
│ │ │ │ -
142 };
│ │ │ │ -
│ │ │ │ -
143
│ │ │ │ -
144
│ │ │ │ -
145
│ │ │ │ -
146 // AlbertaGridLevelProvider::CalcMaxLevel
│ │ │ │ -
147 // --------------------------------------
│ │ │ │ -
148
│ │ │ │ -
149 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
151 {
│ │ │ │ -
152 Level maxLevel_;
│ │ │ │ -
153
│ │ │ │ -
154 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
156 : maxLevel_( 0 )
│ │ │ │ -
157 {}
│ │ │ │ -
│ │ │ │ -
158
│ │ │ │ -
│ │ │ │ -
159 void operator() ( const Level &dof )
│ │ │ │ -
160 {
│ │ │ │ -
161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) );
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ -
│ │ │ │ -
164 void operator() ( const Alberta::ElementInfo< dim > &elementInfo )
│ │ │ │ -
165 {
│ │ │ │ -
166 maxLevel_ = std::max( maxLevel_, Level( elementInfo.level() ) );
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
133 {
│ │ │ │ +
134 entity_ = other.entity_;
│ │ │ │ +
135 startLevel_ = other.startLevel_;
│ │ │ │ +
136 maxlevel_ = other.maxlevel_;
│ │ │ │ +
137 return *this;
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
140
│ │ │ │ +
141 template< class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
143 {
│ │ │ │ +
144 increment( entity_.impl().elementInfo() );
│ │ │ │ +
145 }
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147 template< class GridImp >
│ │ │ │ + │ │ │ │ +
149 ::increment ( ElementInfo elementInfo )
│ │ │ │ +
150 {
│ │ │ │ +
151 assert( !elementInfo == false );
│ │ │ │ +
152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() )
│ │ │ │ +
153 {
│ │ │ │ +
154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() == 1) )
│ │ │ │ +
155 elementInfo = elementInfo.father();
│ │ │ │ +
156 if( elementInfo.level() > startLevel_ )
│ │ │ │ +
157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 );
│ │ │ │ +
158 else
│ │ │ │ +
159 entity_.impl().clearElement();
│ │ │ │ +
160 }
│ │ │ │ +
161 else
│ │ │ │ +
162 entity_.impl().setElement( elementInfo.child( 0 ), 0 );
│ │ │ │ +
163 }
│ │ │ │ +
164
│ │ │ │ +
165}
│ │ │ │ +
166
│ │ │ │ +
167#endif // #if HAVE_ALBERTA
│ │ │ │
168
│ │ │ │ -
│ │ │ │ -
169 Level maxLevel () const
│ │ │ │ -
170 {
│ │ │ │ -
171 return maxLevel_;
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173 };
│ │ │ │ -
│ │ │ │ -
174
│ │ │ │ -
175
│ │ │ │ -
176
│ │ │ │ -
177 // AlbertaGridLevelProvider::ClearFlags
│ │ │ │ -
178 // ------------------------------------
│ │ │ │ -
179
│ │ │ │ -
180 template< int dim >
│ │ │ │ -
181 template< typename AlbertaGridLevelProvider< dim >::Level flags >
│ │ │ │ -
182 struct AlbertaGridLevelProvider< dim >::ClearFlags
│ │ │ │ -
183 {
│ │ │ │ -
184 void operator() ( Level &dof ) const
│ │ │ │ -
185 {
│ │ │ │ -
186 dof &= ~flags;
│ │ │ │ -
187 }
│ │ │ │ -
188 };
│ │ │ │ -
189
│ │ │ │ -
190
│ │ │ │ -
191
│ │ │ │ -
192 // AlbertaGridLevelProvider::Interpolation
│ │ │ │ -
193 // ---------------------------------------
│ │ │ │ -
194
│ │ │ │ -
195 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
197 {
│ │ │ │ -
198 static const int dimension = dim;
│ │ │ │ -
199
│ │ │ │ - │ │ │ │ -
201
│ │ │ │ -
│ │ │ │ -
202 static void interpolateVector ( const DofVectorPointer &dofVector,
│ │ │ │ -
203 const Patch &patch )
│ │ │ │ -
204 {
│ │ │ │ -
205 const DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ │ -
206 Level *array = (Level *)dofVector;
│ │ │ │ -
207
│ │ │ │ -
208 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ -
209 {
│ │ │ │ -
210 const Alberta::Element *const father = patch[ i ];
│ │ │ │ -
211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );
│ │ │ │ -
212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag;
│ │ │ │ -
213 for( int i = 0; i < 2; ++i )
│ │ │ │ -
214 {
│ │ │ │ -
215 const Alberta::Element *child = father->child[ i ];
│ │ │ │ -
216 array[ dofAccess( child, 0 ) ] = childLevel;
│ │ │ │ -
217 }
│ │ │ │ -
218 }
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ -
220 };
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
222}
│ │ │ │ -
223
│ │ │ │ -
224#endif // #if HAVE_ALBERTA
│ │ │ │ -
225
│ │ │ │ -
226#endif
│ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ - │ │ │ │ - │ │ │ │ +
169#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ -
Definition meshpointer.hh:40
│ │ │ │ -
void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:385
│ │ │ │ -
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ │ - │ │ │ │ -
Definition dofadmin.hh:93
│ │ │ │ -
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ │ - │ │ │ │ -
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ │ -
void release()
Definition dofvector.hh:254
│ │ │ │ -
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ │ -
void forEach(Functor &functor) const
Definition dofvector.hh:264
│ │ │ │ -
Definition elementinfo.hh:43
│ │ │ │ -
int level() const
Definition elementinfo.hh:533
│ │ │ │ -
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ -
Definition level.hh:25
│ │ │ │ -
bool isNew(const Alberta::Element *element) const
Definition level.hh:62
│ │ │ │ -
bool isNew(const ElementInfo &elementInfo) const
Definition level.hh:68
│ │ │ │ -
Alberta::MeshPointer< dim > MeshPointer
Definition level.hh:48
│ │ │ │ -
MeshPointer mesh() const
Definition level.hh:85
│ │ │ │ -
void create(const DofNumbering &dofNumbering)
Definition level.hh:96
│ │ │ │ -
Level maxLevel() const
Definition level.hh:73
│ │ │ │ -
Alberta::HierarchyDofNumbering< dim > DofNumbering
Definition level.hh:49
│ │ │ │ -
void release()
Definition level.hh:109
│ │ │ │ -
Level operator()(const Alberta::Element *element) const
Definition level.hh:51
│ │ │ │ -
void markAllOld()
Definition level.hh:90
│ │ │ │ -
Alberta::ElementInfo< dim > ElementInfo
Definition level.hh:47
│ │ │ │ - │ │ │ │ -
SetLocal(const DofVectorPointer &level)
Definition level.hh:132
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Level maxLevel() const
Definition level.hh:169
│ │ │ │ - │ │ │ │ -
Alberta::Patch< dimension > Patch
Definition level.hh:200
│ │ │ │ -
static void interpolateVector(const DofVectorPointer &dofVector, const Patch &patch)
Definition level.hh:202
│ │ │ │ -
Definition misc.hh:231
│ │ │ │ -
static const Flags nothing
Definition misc.hh:234
│ │ │ │ -
Definition refinement.hh:40
│ │ │ │ -
int count() const
Definition refinement.hh:67
│ │ │ │ +
Definition hierarchiciterator.hh:29
│ │ │ │ +
Entity & dereference() const
dereferencing
Definition hierarchiciterator.hh:68
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition hierarchiciterator.hh:33
│ │ │ │ +
const GridImp & grid() const
obtain a reference to the grid
Definition hierarchiciterator.hh:81
│ │ │ │ +
EntityImp::ElementInfo ElementInfo
Definition hierarchiciterator.hh:39
│ │ │ │ +
int level() const
ask for level of entities
Definition hierarchiciterator.hh:74
│ │ │ │ +
AlbertaGridHierarchicIterator()
Definition hierarchiciterator.hh:41
│ │ │ │ +
void increment()
increment
Definition hierarchiciterator.hh:142
│ │ │ │ +
GridImp::ctype ctype
Definition hierarchiciterator.hh:34
│ │ │ │ +
EntityObject::ImplementationType EntityImp
Definition hierarchiciterator.hh:37
│ │ │ │ +
bool equals(const This &other) const
equality
Definition hierarchiciterator.hh:62
│ │ │ │ +
This & operator=(const This &other)
assignment operator
Definition hierarchiciterator.hh:132
│ │ │ │ +
MakeableInterfaceObject< Entity > EntityObject
Definition hierarchiciterator.hh:36
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ + │ │ │ │ +
InterfaceType::Implementation ImplementationType
Definition common/grid.hh:1108
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,355 +1,224 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -level.hh │ │ │ │ │ +hierarchiciterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_LEVEL_HH │ │ │ │ │ -6#define DUNE_ALBERTA_LEVEL_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15#if HAVE_ALBERTA │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -20 // AlbertaGridLevelProvider │ │ │ │ │ -21 // ------------------------ │ │ │ │ │ -22 │ │ │ │ │ -23 template< int dim > │ │ │ │ │ -_2_4 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ │ -25 { │ │ │ │ │ -26 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ -27 │ │ │ │ │ -28 typedef unsigned char Level; │ │ │ │ │ -29 │ │ │ │ │ -30 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _L_e_v_e_l_ _> _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r; │ │ │ │ │ -31 typedef _A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _0_ _> _D_o_f_A_c_c_e_s_s; │ │ │ │ │ -32 │ │ │ │ │ -33 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ │ -34 │ │ │ │ │ -35 static const Level isNewFlag = (1 << 7); │ │ │ │ │ -36 static const Level levelMask = (1 << 7) - 1; │ │ │ │ │ -37 │ │ │ │ │ -38 class _S_e_t_L_o_c_a_l; │ │ │ │ │ -39 class _C_a_l_c_M_a_x_L_e_v_e_l; │ │ │ │ │ +11#if HAVE_ALBERTA │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 // AlbertaGridHierarchicIterator │ │ │ │ │ +17 // ----------------------------- │ │ │ │ │ +18 │ │ │ │ │ +27 template< class GridImp > │ │ │ │ │ +_2_8 class _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +29 { │ │ │ │ │ +30 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ +31 │ │ │ │ │ +32 public: │ │ │ │ │ +_3_3 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ +_3_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +35 │ │ │ │ │ +_3_6 typedef _M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ +_3_7 typedef typename _E_n_t_i_t_y_O_b_j_e_c_t_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e _E_n_t_i_t_y_I_m_p; │ │ │ │ │ +38 │ │ │ │ │ +_3_9 typedef typename EntityImp::ElementInfo _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ 40 │ │ │ │ │ -41 template< Level flags > │ │ │ │ │ -42 struct ClearFlags; │ │ │ │ │ +_4_1 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () │ │ │ │ │ +42 {} │ │ │ │ │ 43 │ │ │ │ │ -44 struct _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -45 │ │ │ │ │ -46 public: │ │ │ │ │ -_4_7 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -_4_8 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -_4_9 typedef _A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ │ -50 │ │ │ │ │ -_5_1 Level _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element ) const │ │ │ │ │ -52 { │ │ │ │ │ -53 const Level *array = (Level *)level_; │ │ │ │ │ -54 return array[ dofAccess_( element, 0 ) ] & levelMask; │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -_5_7 Level _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ │ -58 { │ │ │ │ │ -59 return (*this)( elementInfo._e_l() ); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_2 bool _i_s_N_e_w ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element ) const │ │ │ │ │ +45 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +46 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ │ +47 int maxLevel ); │ │ │ │ │ +48 │ │ │ │ │ +50 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int actLevel, int │ │ │ │ │ +maxLevel ); │ │ │ │ │ +51 │ │ │ │ │ +53 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const This &other ); │ │ │ │ │ +54 │ │ │ │ │ +56 This &_o_p_e_r_a_t_o_r_=_ ( const This &other ); │ │ │ │ │ +57 │ │ │ │ │ +59 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ +60 │ │ │ │ │ +_6_2 bool _e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ │ 63 { │ │ │ │ │ -64 const Level *array = (Level *)level_; │ │ │ │ │ -65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0); │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 bool _i_s_N_e_w ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ │ +64 return entity_.impl().equals( other.entity_.impl() ); │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +_6_8 _E_n_t_i_t_y &_d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ 69 { │ │ │ │ │ -70 return _i_s_N_e_w( elementInfo._e_l() ); │ │ │ │ │ +70 return entity_; │ │ │ │ │ 71 } │ │ │ │ │ 72 │ │ │ │ │ -_7_3 Level _m_a_x_L_e_v_e_l () const │ │ │ │ │ -74 { │ │ │ │ │ -75 _C_a_l_c_M_a_x_L_e_v_e_l calcFromCache; │ │ │ │ │ -76 level_._f_o_r_E_a_c_h( calcFromCache ); │ │ │ │ │ -77#ifndef NDEBUG │ │ │ │ │ -78 _C_a_l_c_M_a_x_L_e_v_e_l calcFromGrid; │ │ │ │ │ -79 _m_e_s_h()._l_e_a_f_T_r_a_v_e_r_s_e( calcFromGrid, _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ -80 assert( calcFromCache._m_a_x_L_e_v_e_l() == calcFromGrid._m_a_x_L_e_v_e_l() ); │ │ │ │ │ -81#endif │ │ │ │ │ -82 return calcFromCache._m_a_x_L_e_v_e_l();; │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_5 _M_e_s_h_P_o_i_n_t_e_r _m_e_s_h () const │ │ │ │ │ -86 { │ │ │ │ │ -87 return _M_e_s_h_P_o_i_n_t_e_r( level_._d_o_f_S_p_a_c_e()->mesh ); │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -_9_0 void _m_a_r_k_A_l_l_O_l_d () │ │ │ │ │ -91 { │ │ │ │ │ -92 ClearFlags< isNewFlag > clearIsNew; │ │ │ │ │ -93 level_._f_o_r_E_a_c_h( clearIsNew ); │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -_9_6 void _c_r_e_a_t_e ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering ) │ │ │ │ │ -97 { │ │ │ │ │ -98 const _A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e *const dofSpace = dofNumbering._d_o_f_S_p_a_c_e( 0 ); │ │ │ │ │ -99 dofAccess_ = _D_o_f_A_c_c_e_s_s( dofSpace ); │ │ │ │ │ -100 │ │ │ │ │ -101 level_._c_r_e_a_t_e( dofSpace, "Element level" ); │ │ │ │ │ -102 assert( level_ ); │ │ │ │ │ -103 level_.template setupInterpolation< Interpolation >(); │ │ │ │ │ -104 │ │ │ │ │ -105 _S_e_t_L_o_c_a_l setLocal( level_ ); │ │ │ │ │ -106 _m_e_s_h()._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( setLocal, _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ -107 } │ │ │ │ │ -108 │ │ │ │ │ -_1_0_9 void _r_e_l_e_a_s_e () │ │ │ │ │ -110 { │ │ │ │ │ -111 level_._r_e_l_e_a_s_e(); │ │ │ │ │ -112 dofAccess_ = _D_o_f_A_c_c_e_s_s(); │ │ │ │ │ -113 } │ │ │ │ │ -114 │ │ │ │ │ -115 private: │ │ │ │ │ -116 DofVectorPointer level_; │ │ │ │ │ -117 DofAccess dofAccess_; │ │ │ │ │ -118 }; │ │ │ │ │ +_7_4 int _l_e_v_e_l () const │ │ │ │ │ +75 { │ │ │ │ │ +76 return entity_.impl().level(); │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +79 protected: │ │ │ │ │ +_8_1 const GridImp &_g_r_i_d () const │ │ │ │ │ +82 { │ │ │ │ │ +83 return entity_.impl().grid(); │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +86 private: │ │ │ │ │ +87 void _i_n_c_r_e_m_e_n_t ( _E_l_e_m_e_n_t_I_n_f_o elementInfo ); │ │ │ │ │ +88 │ │ │ │ │ +89 mutable _E_n_t_i_t_y entity_; │ │ │ │ │ +90 │ │ │ │ │ +91 // level on which the iterator was started │ │ │ │ │ +92 int startLevel_; │ │ │ │ │ +93 │ │ │ │ │ +94 // maximal level to go down to │ │ │ │ │ +95 int maxlevel_; │ │ │ │ │ +96 }; │ │ │ │ │ +97 │ │ │ │ │ +98 │ │ │ │ │ +99 template< class GridImp > │ │ │ │ │ +100 inline AlbertaGridHierarchicIterator< GridImp > │ │ │ │ │ +_1_0_1 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int │ │ │ │ │ +maxLevel ) │ │ │ │ │ +102 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ +103 startLevel_( actLevel ), │ │ │ │ │ +104 maxlevel_( maxLevel ) │ │ │ │ │ +105 {} │ │ │ │ │ +106 │ │ │ │ │ +107 │ │ │ │ │ +108 template< class GridImp > │ │ │ │ │ +109 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +_1_1_0_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ │ +111 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ │ +112 int maxLevel ) │ │ │ │ │ +113 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ +114 startLevel_( elementInfo.level() ), │ │ │ │ │ +115 maxlevel_( maxLevel ) │ │ │ │ │ +116 { │ │ │ │ │ +117 _i_n_c_r_e_m_e_n_t( elementInfo ); │ │ │ │ │ +118 } │ │ │ │ │ 119 │ │ │ │ │ 120 │ │ │ │ │ -121 │ │ │ │ │ -122 // AlbertaGridLevelProvider::SetLocal │ │ │ │ │ -123 // ---------------------------------- │ │ │ │ │ -124 │ │ │ │ │ -125 template< int dim > │ │ │ │ │ -_1_2_6 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_S_e_t_L_o_c_a_l │ │ │ │ │ -127 { │ │ │ │ │ -128 _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r level_; │ │ │ │ │ -129 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ -130 │ │ │ │ │ -131 public: │ │ │ │ │ -_1_3_2 explicit _S_e_t_L_o_c_a_l ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r &level ) │ │ │ │ │ -133 : level_( level ), │ │ │ │ │ -134 dofAccess_( level.dofSpace() ) │ │ │ │ │ -135 {} │ │ │ │ │ -136 │ │ │ │ │ -_1_3_7 void _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &elementInfo ) const │ │ │ │ │ -138 { │ │ │ │ │ -139 Level *const array = (Level *)level_; │ │ │ │ │ -140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo._l_e_v_e_l(); │ │ │ │ │ -141 } │ │ │ │ │ -142 }; │ │ │ │ │ -143 │ │ │ │ │ -144 │ │ │ │ │ -145 │ │ │ │ │ -146 // AlbertaGridLevelProvider::CalcMaxLevel │ │ │ │ │ -147 // -------------------------------------- │ │ │ │ │ -148 │ │ │ │ │ -149 template< int dim > │ │ │ │ │ -_1_5_0 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ -151 { │ │ │ │ │ -152 Level maxLevel_; │ │ │ │ │ -153 │ │ │ │ │ -154 public: │ │ │ │ │ -_1_5_5 _C_a_l_c_M_a_x_L_e_v_e_l () │ │ │ │ │ -156 : maxLevel_( 0 ) │ │ │ │ │ -157 {} │ │ │ │ │ -158 │ │ │ │ │ -_1_5_9 void _o_p_e_r_a_t_o_r_(_)_ ( const Level &dof ) │ │ │ │ │ -160 { │ │ │ │ │ -161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) ); │ │ │ │ │ -162 } │ │ │ │ │ -163 │ │ │ │ │ -_1_6_4 void _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &elementInfo ) │ │ │ │ │ -165 { │ │ │ │ │ -166 maxLevel_ = std::max( maxLevel_, Level( elementInfo._l_e_v_e_l() ) ); │ │ │ │ │ -167 } │ │ │ │ │ +121 template< class GridImp > │ │ │ │ │ +122 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +_1_2_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r( const _T_h_i_s &other ) │ │ │ │ │ +124 : entity_( other.entity_ ), │ │ │ │ │ +125 startLevel_( other.startLevel_ ), │ │ │ │ │ +126 maxlevel_( other.maxlevel_ ) │ │ │ │ │ +127 {} │ │ │ │ │ +128 │ │ │ │ │ +129 │ │ │ │ │ +130 template< class GridImp > │ │ │ │ │ +131 inline typename _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_T_h_i_s & │ │ │ │ │ +_1_3_2 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +133 { │ │ │ │ │ +134 entity_ = other.entity_; │ │ │ │ │ +135 startLevel_ = other.startLevel_; │ │ │ │ │ +136 maxlevel_ = other.maxlevel_; │ │ │ │ │ +137 return *this; │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +140 │ │ │ │ │ +141 template< class GridImp > │ │ │ │ │ +_1_4_2 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t () │ │ │ │ │ +143 { │ │ │ │ │ +144 increment( entity_.impl().elementInfo() ); │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +147 template< class GridImp > │ │ │ │ │ +148 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +149_ _:_:_i_n_c_r_e_m_e_n_t ( ElementInfo elementInfo ) │ │ │ │ │ +150 { │ │ │ │ │ +151 assert( !elementInfo == false ); │ │ │ │ │ +152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() ) │ │ │ │ │ +153 { │ │ │ │ │ +154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() │ │ │ │ │ +== 1) ) │ │ │ │ │ +155 elementInfo = elementInfo.father(); │ │ │ │ │ +156 if( elementInfo.level() > startLevel_ ) │ │ │ │ │ +157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 ); │ │ │ │ │ +158 else │ │ │ │ │ +159 entity_.impl().clearElement(); │ │ │ │ │ +160 } │ │ │ │ │ +161 else │ │ │ │ │ +162 entity_.impl().setElement( elementInfo.child( 0 ), 0 ); │ │ │ │ │ +163 } │ │ │ │ │ +164 │ │ │ │ │ +165} │ │ │ │ │ +166 │ │ │ │ │ +167#endif // #if HAVE_ALBERTA │ │ │ │ │ 168 │ │ │ │ │ -_1_6_9 Level _m_a_x_L_e_v_e_l () const │ │ │ │ │ -170 { │ │ │ │ │ -171 return maxLevel_; │ │ │ │ │ -172 } │ │ │ │ │ -173 }; │ │ │ │ │ -174 │ │ │ │ │ -175 │ │ │ │ │ -176 │ │ │ │ │ -177 // AlbertaGridLevelProvider::ClearFlags │ │ │ │ │ -178 // ------------------------------------ │ │ │ │ │ -179 │ │ │ │ │ -180 template< int dim > │ │ │ │ │ -181 template< typename AlbertaGridLevelProvider< dim >::Level flags > │ │ │ │ │ -182 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::ClearFlags │ │ │ │ │ -183 { │ │ │ │ │ -184 void _o_p_e_r_a_t_o_r_(_)_ ( Level &dof ) const │ │ │ │ │ -185 { │ │ │ │ │ -186 dof &= ~flags; │ │ │ │ │ -187 } │ │ │ │ │ -188 }; │ │ │ │ │ -189 │ │ │ │ │ -190 │ │ │ │ │ -191 │ │ │ │ │ -192 // AlbertaGridLevelProvider::Interpolation │ │ │ │ │ -193 // --------------------------------------- │ │ │ │ │ -194 │ │ │ │ │ -195 template< int dim > │ │ │ │ │ -_1_9_6 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -197 { │ │ │ │ │ -_1_9_8 static const int dimension = dim; │ │ │ │ │ -199 │ │ │ │ │ -_2_0_0 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> _P_a_t_c_h; │ │ │ │ │ -201 │ │ │ │ │ -_2_0_2 static void _i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r &dofVector, │ │ │ │ │ -203 const _P_a_t_c_h &patch ) │ │ │ │ │ -204 { │ │ │ │ │ -205 const _D_o_f_A_c_c_e_s_s dofAccess( dofVector._d_o_f_S_p_a_c_e() ); │ │ │ │ │ -206 Level *array = (Level *)dofVector; │ │ │ │ │ -207 │ │ │ │ │ -208 for( int i = 0; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ -209 { │ │ │ │ │ -210 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ -211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask ); │ │ │ │ │ -212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag; │ │ │ │ │ -213 for( int i = 0; i < 2; ++i ) │ │ │ │ │ -214 { │ │ │ │ │ -215 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *child = father->child[ i ]; │ │ │ │ │ -216 array[ dofAccess( child, 0 ) ] = childLevel; │ │ │ │ │ -217 } │ │ │ │ │ -218 } │ │ │ │ │ -219 } │ │ │ │ │ -220 }; │ │ │ │ │ -221 │ │ │ │ │ -222} │ │ │ │ │ -223 │ │ │ │ │ -224#endif // #if HAVE_ALBERTA │ │ │ │ │ -225 │ │ │ │ │ -226#endif │ │ │ │ │ -_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ -_d_o_f_a_d_m_i_n_._h_h │ │ │ │ │ -_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ │ +169#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ +_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -ALBERTA EL Element │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ -ALBERTA FE_SPACE DofSpace │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ -void leafTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:385 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ -void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * dofSpace(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _L_e_v_e_l_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * dofSpace() const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_f_o_r_E_a_c_h │ │ │ │ │ -void forEach(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:264 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity & dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ │ +const GridImp & grid() const │ │ │ │ │ +obtain a reference to the grid │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +EntityImp::ElementInfo ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ │ int level() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ -Element * el() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn level.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_i_s_N_e_w │ │ │ │ │ -bool isNew(const Alberta::Element *element) const │ │ │ │ │ -DDeeffiinniittiioonn level.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_i_s_N_e_w │ │ │ │ │ -bool isNew(const ElementInfo &elementInfo) const │ │ │ │ │ -DDeeffiinniittiioonn level.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -Alberta::MeshPointer< dim > MeshPointer │ │ │ │ │ -DDeeffiinniittiioonn level.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_e_s_h │ │ │ │ │ -MeshPointer mesh() const │ │ │ │ │ -DDeeffiinniittiioonn level.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -void create(const DofNumbering &dofNumbering) │ │ │ │ │ -DDeeffiinniittiioonn level.hh:96 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ -Level maxLevel() const │ │ │ │ │ -DDeeffiinniittiioonn level.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -Alberta::HierarchyDofNumbering< dim > DofNumbering │ │ │ │ │ -DDeeffiinniittiioonn level.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -DDeeffiinniittiioonn level.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -Level operator()(const Alberta::Element *element) const │ │ │ │ │ -DDeeffiinniittiioonn level.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_a_r_k_A_l_l_O_l_d │ │ │ │ │ -void markAllOld() │ │ │ │ │ -DDeeffiinniittiioonn level.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dim > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn level.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_S_e_t_L_o_c_a_l │ │ │ │ │ -DDeeffiinniittiioonn level.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_S_e_t_L_o_c_a_l_:_:_S_e_t_L_o_c_a_l │ │ │ │ │ -SetLocal(const DofVectorPointer &level) │ │ │ │ │ -DDeeffiinniittiioonn level.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ -DDeeffiinniittiioonn level.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ -CalcMaxLevel() │ │ │ │ │ -DDeeffiinniittiioonn level.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ -Level maxLevel() const │ │ │ │ │ -DDeeffiinniittiioonn level.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn level.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_a_t_c_h │ │ │ │ │ -Alberta::Patch< dimension > Patch │ │ │ │ │ -DDeeffiinniittiioonn level.hh:200 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r │ │ │ │ │ -static void interpolateVector(const DofVectorPointer &dofVector, const Patch │ │ │ │ │ -&patch) │ │ │ │ │ -DDeeffiinniittiioonn level.hh:202 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ -static const Flags nothing │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_c_o_u_n_t │ │ │ │ │ -int count() const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:67 │ │ │ │ │ +ask for level of entities │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridHierarchicIterator() │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_t_y_p_e │ │ │ │ │ +GridImp::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_I_m_p │ │ │ │ │ +EntityObject::ImplementationType EntityImp │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const This &other) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &other) │ │ │ │ │ +assignment operator │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_O_b_j_e_c_t │ │ │ │ │ +MakeableInterfaceObject< Entity > EntityObject │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> │ │ │ │ │ +_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _>_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e │ │ │ │ │ +InterfaceType::Implementation ImplementationType │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:1108 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: algebra.hh File Reference │ │ │ │ +dune-grid: geometryreference.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,77 +70,43 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
algebra.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
geometryreference.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ + │ │ │ │ +

Wrapper and interface classes for element geometries. │ │ │ │ +More...

│ │ │ │ +
#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/geometry.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::GeometryReference< Implementation >
 
class  Dune::LocalGeometryReference< mydim, cdim, Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<class K >
static FieldVector< K, 3 > Dune::Alberta::vectorProduct (const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
 
template<class K , int m>
static K Dune::Alberta::determinant (const FieldMatrix< K, 0, m > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 1, 1 > &matrix)
 
template<class K , int m>
static K Dune::Alberta::determinant (const FieldMatrix< K, 1, m > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 2, 2 > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 2, 3 > &matrix)
 
template<class K , int m>
static K Dune::Alberta::determinant (const FieldMatrix< K, 2, m > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 3, 3 > &matrix)
 
template<class K , int m>
static K Dune::Alberta::invert (const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
 
template<class K >
static K Dune::Alberta::invert (const FieldMatrix< K, 1, 1 > &matrix, FieldMatrix< K, 1, 1 > &inverse)
 
template<class K , int m>
static K Dune::Alberta::invert (const FieldMatrix< K, 1, m > &matrix, FieldMatrix< K, m, 1 > &inverse)
 
template<class K >
static K Dune::Alberta::invert (const FieldMatrix< K, 2, 2 > &matrix, FieldMatrix< K, 2, 2 > &inverse)
 
template<class K , int m>
static K Dune::Alberta::invert (const FieldMatrix< K, 2, m > &matrix, FieldMatrix< K, m, 2 > &inverse)
 
template<class K >
static K Dune::Alberta::invert (const FieldMatrix< K, 3, 3 > &matrix, FieldMatrix< K, 3, 3 > &inverse)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Wrapper and interface classes for element geometries.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,77 +1,27 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -algebra.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +geometryreference.hh File Reference │ │ │ │ │ +Wrapper and interface classes for element geometries. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_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_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -static FieldVector< K, 3 >  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_v_e_c_t_o_r_P_r_o_d_u_c_t (const FieldVector< K, │ │ │ │ │ - 3 > &u, const FieldVector< K, 3 > &v) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 0, m > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 1, 1 > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 1, m > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 2, 2 > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 2, 3 > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 2, m > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ - 3, 3 > &matrix) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 0, m > │ │ │ │ │ - &matrix, FieldMatrix< K, m, 0 > &inverse) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 1, 1 > │ │ │ │ │ - &matrix, FieldMatrix< K, 1, 1 > &inverse) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 1, m > │ │ │ │ │ - &matrix, FieldMatrix< K, m, 1 > &inverse) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 2, 2 > │ │ │ │ │ - &matrix, FieldMatrix< K, 2, 2 > &inverse) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 2, m > │ │ │ │ │ - &matrix, FieldMatrix< K, m, 2 > &inverse) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 3, 3 > │ │ │ │ │ - &matrix, FieldMatrix< K, 3, 3 > &inverse) │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Wrapper and interface classes for element geometries. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: algebra.hh Source File │ │ │ │ +dune-grid: geometryreference.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,197 +74,225 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
algebra.hh
│ │ │ │ +
geometryreference.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │ -
6#define DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │ +
5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │ +
6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/fvector.hh>
│ │ │ │ -
9#include <dune/common/fmatrix.hh>
│ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ +
12#include <dune/common/typetraits.hh>
│ │ │ │
13
│ │ │ │ -
14 namespace Alberta
│ │ │ │ -
15 {
│ │ │ │ -
16
│ │ │ │ -
17 template< class K >
│ │ │ │ -
18 inline static FieldVector< K, 3 >
│ │ │ │ -
│ │ │ │ -
19 vectorProduct ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v )
│ │ │ │ -
20 {
│ │ │ │ -
21 FieldVector< K, 3 > w;
│ │ │ │ -
22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ];
│ │ │ │ -
23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ];
│ │ │ │ -
24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ];
│ │ │ │ -
25 return w;
│ │ │ │ -
26 }
│ │ │ │ -
│ │ │ │ -
27
│ │ │ │ +
14#include <dune/geometry/type.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
20
│ │ │ │ +
21 // GeometryReference
│ │ │ │ +
22 // -----------------
│ │ │ │ +
23
│ │ │ │ +
24 template< class Implementation >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ + │ │ │ │
28
│ │ │ │ -
29 template< class K, int m >
│ │ │ │ -
│ │ │ │ -
30 inline static K determinant ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix )
│ │ │ │ -
31 {
│ │ │ │ -
32 return K( 1 );
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ +
29 public:
│ │ │ │ +
30 static const int mydimension = Implementation::mydimension;
│ │ │ │ +
31 static const int coorddimension = Implementation::coorddimension;
│ │ │ │ +
32
│ │ │ │ +
33 typedef typename Implementation::ctype ctype;
│ │ │ │
34
│ │ │ │ -
35 template< class K >
│ │ │ │ -
│ │ │ │ -
36 inline static K determinant ( const FieldMatrix< K, 1, 1 > &matrix )
│ │ │ │ -
37 {
│ │ │ │ -
38 return matrix[ 0 ][ 0 ];
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ +
35 typedef typename Implementation::LocalCoordinate LocalCoordinate;
│ │ │ │ +
36 typedef typename Implementation::GlobalCoordinate GlobalCoordinate;
│ │ │ │ +
37
│ │ │ │ +
38 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ │ +
39 typedef typename Implementation::JacobianTransposed JacobianTransposed;
│ │ │ │
40
│ │ │ │ -
41 template< class K, int m >
│ │ │ │ -
│ │ │ │ -
42 inline static K determinant ( const FieldMatrix< K, 1, m > &matrix )
│ │ │ │ -
43 {
│ │ │ │ -
44 using std::sqrt;
│ │ │ │ -
45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ];
│ │ │ │ -
46 for( int i = 1; i < m; ++i )
│ │ │ │ -
47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ];
│ │ │ │ -
48 return sqrt( sum );
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ +
41 private:
│ │ │ │ +
42
│ │ │ │ +
43 template<class Implementation_T>
│ │ │ │ +
44 using JacobianInverseOfImplementation = decltype(typename Implementation_T::JacobianInverse{std::declval<Implementation_T>().jacobianInverse(std::declval<LocalCoordinate>())});
│ │ │ │ +
45
│ │ │ │ +
46 using JacobianInverseDefault = decltype(transpose(std::declval<JacobianInverseTransposed>()));
│ │ │ │ +
47
│ │ │ │ +
48 template<class Implementation_T>
│ │ │ │ +
49 using JacobianOfImplementation = decltype(typename Implementation_T::Jacobian{std::declval<Implementation_T>().jacobian(std::declval<LocalCoordinate>())});
│ │ │ │
50
│ │ │ │ -
51 template< class K >
│ │ │ │ -
│ │ │ │ -
52 inline static K determinant ( const FieldMatrix< K, 2, 2 > &matrix )
│ │ │ │ -
53 {
│ │ │ │ -
54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ][ 0 ];
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 template< class K >
│ │ │ │ -
│ │ │ │ -
58 inline static K determinant ( const FieldMatrix< K, 2, 3 > &matrix )
│ │ │ │ -
59 {
│ │ │ │ -
60 return vectorProduct( matrix[ 0 ], matrix[ 1 ] ).two_norm();
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
63 template< class K, int m >
│ │ │ │ -
│ │ │ │ -
64 inline static K determinant ( const FieldMatrix< K, 2, m > &matrix )
│ │ │ │ -
65 {
│ │ │ │ -
66 using std::sqrt;
│ │ │ │ -
67 const K tmpA = matrix[ 0 ].two_norm2();
│ │ │ │ -
68 const K tmpB = matrix[ 1 ].two_norm2();
│ │ │ │ -
69 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
│ │ │ │ -
70 return sqrt( tmpA * tmpB - tmpC * tmpC );
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 template< class K >
│ │ │ │ -
│ │ │ │ -
74 inline static K determinant ( const FieldMatrix< K, 3, 3 > &matrix )
│ │ │ │ -
75 {
│ │ │ │ -
76 return matrix[ 0 ] * vectorProduct( matrix[ 1 ], matrix[ 2 ] );
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ +
51 using JacobianDefault = decltype(transpose(std::declval<JacobianTransposed>()));
│ │ │ │ +
52
│ │ │ │ +
53
│ │ │ │ +
54 template <class I = Implementation>
│ │ │ │ +
55 [[deprecated("Geometry implementatons are required to provide a jacobian(local) method. The default implementation is deprecated and will be removed after release 2.9")]]
│ │ │ │ +
56 auto deprecatedDefaultJacobian ( const LocalCoordinate& local ) const {
│ │ │ │ +
57 return transpose(jacobianTransposed(local));
│ │ │ │ +
58 }
│ │ │ │ +
59
│ │ │ │ +
60 template <class I = Implementation>
│ │ │ │ +
61 [[deprecated("Geometry implementatons are required to provide a jacobianInverse(local) method. The default implementation is deprecated and will be removed after release 2.9")]]
│ │ │ │ +
62 auto deprecatedDefaultJacobianInverse ( const LocalCoordinate& local ) const {
│ │ │ │ +
63 return transpose(jacobianInverseTransposed(local));
│ │ │ │ +
64 }
│ │ │ │ +
65
│ │ │ │ +
66 public:
│ │ │ │ +
67
│ │ │ │ +
68 using Jacobian = Std::detected_or_t<JacobianDefault, JacobianOfImplementation, Implementation>;
│ │ │ │ +
69 using JacobianInverse = Std::detected_or_t<JacobianInverseDefault, JacobianInverseOfImplementation, Implementation>;
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 explicit GeometryReference ( const Implementation &impl )
│ │ │ │ +
72 : impl_( &impl )
│ │ │ │ +
73 {}
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 GeometryType type () const { return impl().type(); }
│ │ │ │ +
76
│ │ │ │ +
77 bool affine() const { return impl().affine(); }
│ │ │ │
78
│ │ │ │ -
79
│ │ │ │ -
80 template< class K, int m >
│ │ │ │ -
│ │ │ │ -
81 inline static K invert ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix,
│ │ │ │ -
82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse )
│ │ │ │ -
83 {
│ │ │ │ -
84 return K( 1 );
│ │ │ │ -
85 }
│ │ │ │ +
79 int corners () const { return impl().corners(); }
│ │ │ │ +
80 GlobalCoordinate corner ( int i ) const { return impl().corner( i ); }
│ │ │ │ +
81 GlobalCoordinate center () const { return impl().center(); }
│ │ │ │ +
82
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
84 {
│ │ │ │ +
85 return impl().global( local );
│ │ │ │ +
86 }
│ │ │ │
│ │ │ │ -
86
│ │ │ │ -
87 template< class K >
│ │ │ │ +
87
│ │ │ │
│ │ │ │ -
88 inline static K invert ( const FieldMatrix< K, 1, 1 > &matrix,
│ │ │ │ -
89 FieldMatrix< K, 1, 1 > &inverse )
│ │ │ │ -
90 {
│ │ │ │ -
91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ];
│ │ │ │ -
92 return matrix[ 0 ][ 0 ];
│ │ │ │ -
93 }
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95 template< class K, int m >
│ │ │ │ -
│ │ │ │ -
96 inline static K invert ( const FieldMatrix< K, 1, m > &matrix,
│ │ │ │ -
97 FieldMatrix< K, m, 1 > &inverse )
│ │ │ │ -
98 {
│ │ │ │ -
99 using std::sqrt;
│ │ │ │ -
100 K detSqr = matrix[ 0 ].two_norm2();
│ │ │ │ -
101 K invDetSqr = K( 1 ) / detSqr;
│ │ │ │ -
102 for( int i = 0; i < m; ++i )
│ │ │ │ -
103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ];
│ │ │ │ -
104 return sqrt( detSqr );
│ │ │ │ -
105 }
│ │ │ │ -
│ │ │ │ -
106
│ │ │ │ -
107 template< class K >
│ │ │ │ -
│ │ │ │ -
108 inline static K invert ( const FieldMatrix< K, 2, 2 > &matrix,
│ │ │ │ -
109 FieldMatrix< K, 2, 2 > &inverse )
│ │ │ │ -
110 {
│ │ │ │ -
111 K det = determinant( matrix );
│ │ │ │ -
112 K invDet = K( 1 ) / det;
│ │ │ │ -
113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ];
│ │ │ │ -
114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ];
│ │ │ │ -
115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ];
│ │ │ │ -
116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ];
│ │ │ │ -
117 return det;
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120 template< class K, int m >
│ │ │ │ -
│ │ │ │ -
121 inline static K invert ( const FieldMatrix< K, 2, m > &matrix,
│ │ │ │ -
122 FieldMatrix< K, m, 2 > &inverse )
│ │ │ │ -
123 {
│ │ │ │ -
124 using std::sqrt;
│ │ │ │ -
125 const K tmpA = matrix[ 0 ].two_norm2();
│ │ │ │ -
126 const K tmpB = matrix[ 1 ].two_norm2();
│ │ │ │ -
127 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
│ │ │ │ -
128 const K detSqr = tmpA * tmpB - tmpC * tmpC;
│ │ │ │ -
129 const K invDetSqr = K( 1 ) / detSqr;
│ │ │ │ -
130 for( int i = 0; i < m; ++i )
│ │ │ │ -
131 {
│ │ │ │ -
132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix[ 1 ][ i ]);
│ │ │ │ -
133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix[ 0 ][ i ]);
│ │ │ │ -
134 }
│ │ │ │ -
135 return sqrt( detSqr );
│ │ │ │ -
136 }
│ │ │ │ -
│ │ │ │ -
137
│ │ │ │ -
138 template< class K >
│ │ │ │ -
│ │ │ │ -
139 inline static K invert ( const FieldMatrix< K, 3, 3 > &matrix,
│ │ │ │ -
140 FieldMatrix< K, 3, 3 > &inverse )
│ │ │ │ -
141 {
│ │ │ │ -
142 return FMatrixHelp::invertMatrix( matrix, inverse );
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144 }
│ │ │ │ -
145
│ │ │ │ -
146}
│ │ │ │ + │ │ │ │ +
89 {
│ │ │ │ +
90 return impl().local( global );
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
94 {
│ │ │ │ +
95 return impl().integrationElement( local );
│ │ │ │ +
96 }
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
98 ctype volume () const { return impl().volume(); }
│ │ │ │ +
99
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
101 {
│ │ │ │ +
102 return impl().jacobianTransposed( local );
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
106 {
│ │ │ │ +
107 return impl().jacobianInverseTransposed( local );
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 {
│ │ │ │ +
112 if constexpr(Std::is_detected_v<JacobianOfImplementation, Implementation>)
│ │ │ │ +
113 return impl().jacobian(local);
│ │ │ │ +
114 else
│ │ │ │ +
115 return deprecatedDefaultJacobian(local);
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
119 {
│ │ │ │ +
120 if constexpr(Std::is_detected_v<JacobianInverseOfImplementation, Implementation>)
│ │ │ │ +
121 return impl().jacobianInverse(local);
│ │ │ │ +
122 else
│ │ │ │ +
123 return deprecatedDefaultJacobianInverse(local);
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
126 const Implementation &impl () const { return *impl_; }
│ │ │ │ +
127
│ │ │ │ +
128 private:
│ │ │ │ +
129 const Implementation *impl_;
│ │ │ │ +
130 };
│ │ │ │ +
│ │ │ │ +
131
│ │ │ │ +
132
│ │ │ │ +
133 // LocalGeometryReference
│ │ │ │ +
134 // -----------------------
│ │ │ │ +
135
│ │ │ │ +
136 template< int mydim, int cdim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
138 : public GeometryReference< typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl >
│ │ │ │ +
139 {
│ │ │ │ +
140 typedef typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl Implementation;
│ │ │ │ +
141
│ │ │ │ +
142 public:
│ │ │ │ +
│ │ │ │ +
143 LocalGeometryReference ( const Implementation &impl )
│ │ │ │ +
144 : GeometryReference< Implementation >( impl )
│ │ │ │ +
145 {}
│ │ │ │ +
│ │ │ │ +
146 };
│ │ │ │ +
│ │ │ │
147
│ │ │ │ -
148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │ +
148
│ │ │ │ +
149
│ │ │ │ +
150 // Definitions of GeometryReference
│ │ │ │ +
151 // --------------------------------
│ │ │ │ +
152
│ │ │ │ +
153 template< class Implementation >
│ │ │ │ + │ │ │ │ +
155
│ │ │ │ +
156 template< class Implementation >
│ │ │ │ + │ │ │ │ +
158
│ │ │ │ +
159} // namespace Dune
│ │ │ │ +
160
│ │ │ │ +
161#endif // #ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition algebra.hh:30
│ │ │ │ -
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ │ -
static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
Definition algebra.hh:19
│ │ │ │ +
Definition geometryreference.hh:26
│ │ │ │ +
static const int mydimension
Definition geometryreference.hh:30
│ │ │ │ +
ctype integrationElement(const LocalCoordinate &local) const
Definition geometryreference.hh:93
│ │ │ │ +
ctype volume() const
Definition geometryreference.hh:98
│ │ │ │ +
const Implementation & impl() const
Definition geometryreference.hh:126
│ │ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Definition geometryreference.hh:118
│ │ │ │ +
GlobalCoordinate center() const
Definition geometryreference.hh:81
│ │ │ │ +
Implementation::JacobianTransposed JacobianTransposed
Definition geometryreference.hh:39
│ │ │ │ +
GeometryReference(const Implementation &impl)
Definition geometryreference.hh:71
│ │ │ │ +
Std::detected_or_t< JacobianInverseDefault, JacobianInverseOfImplementation, Implementation > JacobianInverse
Definition geometryreference.hh:69
│ │ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Definition geometryreference.hh:88
│ │ │ │ +
Implementation::GlobalCoordinate GlobalCoordinate
Definition geometryreference.hh:36
│ │ │ │ +
static const int coorddimension
Definition geometryreference.hh:31
│ │ │ │ +
bool affine() const
Definition geometryreference.hh:77
│ │ │ │ +
GlobalCoordinate corner(int i) const
Definition geometryreference.hh:80
│ │ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Definition geometryreference.hh:105
│ │ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Definition geometryreference.hh:100
│ │ │ │ +
int corners() const
Definition geometryreference.hh:79
│ │ │ │ +
Implementation::LocalCoordinate LocalCoordinate
Definition geometryreference.hh:35
│ │ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
Definition geometryreference.hh:83
│ │ │ │ +
Std::detected_or_t< JacobianDefault, JacobianOfImplementation, Implementation > Jacobian
Definition geometryreference.hh:68
│ │ │ │ +
Implementation::ctype ctype
Definition geometryreference.hh:33
│ │ │ │ +
Implementation::JacobianInverseTransposed JacobianInverseTransposed
Definition geometryreference.hh:38
│ │ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Definition geometryreference.hh:110
│ │ │ │ +
GeometryType type() const
Definition geometryreference.hh:75
│ │ │ │ +
Definition geometryreference.hh:139
│ │ │ │ +
LocalGeometryReference(const Implementation &impl)
Definition geometryreference.hh:143
│ │ │ │ +
Wrapper and interface classes for element geometries.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,179 +1,277 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -algebra.hh │ │ │ │ │ +geometryreference.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ │ -6#define DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ │ +5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ +6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14 namespace Alberta │ │ │ │ │ -15 { │ │ │ │ │ -16 │ │ │ │ │ -17 template< class K > │ │ │ │ │ -18 inline static FieldVector< K, 3 > │ │ │ │ │ -_1_9 _v_e_c_t_o_r_P_r_o_d_u_c_t ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v ) │ │ │ │ │ -20 { │ │ │ │ │ -21 FieldVector< K, 3 > w; │ │ │ │ │ -22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ]; │ │ │ │ │ -23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ]; │ │ │ │ │ -24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ]; │ │ │ │ │ -25 return w; │ │ │ │ │ -26 } │ │ │ │ │ -27 │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +20 │ │ │ │ │ +21 // GeometryReference │ │ │ │ │ +22 // ----------------- │ │ │ │ │ +23 │ │ │ │ │ +24 template< class Implementation > │ │ │ │ │ +_2_5 class _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ +26 { │ │ │ │ │ +27 typedef _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> _T_h_i_s; │ │ │ │ │ 28 │ │ │ │ │ -29 template< class K, int m > │ │ │ │ │ -_3_0 inline static K _d_e_t_e_r_m_i_n_a_n_t ( [[maybe_unused]] const FieldMatrix< K, 0, m > │ │ │ │ │ -&matrix ) │ │ │ │ │ -31 { │ │ │ │ │ -32 return K( 1 ); │ │ │ │ │ -33 } │ │ │ │ │ +29 public: │ │ │ │ │ +_3_0 static const int _m_y_d_i_m_e_n_s_i_o_n = Implementation::mydimension; │ │ │ │ │ +_3_1 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = Implementation::coorddimension; │ │ │ │ │ +32 │ │ │ │ │ +_3_3 typedef typename Implementation::ctype _c_t_y_p_e; │ │ │ │ │ 34 │ │ │ │ │ -35 template< class K > │ │ │ │ │ -_3_6 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 1, 1 > &matrix ) │ │ │ │ │ -37 { │ │ │ │ │ -38 return matrix[ 0 ][ 0 ]; │ │ │ │ │ -39 } │ │ │ │ │ +_3_5 typedef typename Implementation::LocalCoordinate _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +_3_6 typedef typename Implementation::GlobalCoordinate _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +37 │ │ │ │ │ +_3_8 typedef typename Implementation::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; │ │ │ │ │ +_3_9 typedef typename Implementation::JacobianTransposed _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ 40 │ │ │ │ │ -41 template< class K, int m > │ │ │ │ │ -_4_2 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 1, m > &matrix ) │ │ │ │ │ -43 { │ │ │ │ │ -44 using std::sqrt; │ │ │ │ │ -45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ]; │ │ │ │ │ -46 for( int i = 1; i < m; ++i ) │ │ │ │ │ -47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ]; │ │ │ │ │ -48 return sqrt( sum ); │ │ │ │ │ -49 } │ │ │ │ │ +41 private: │ │ │ │ │ +42 │ │ │ │ │ +43 template │ │ │ │ │ +44 using JacobianInverseOfImplementation = decltype(typename Implementation_T:: │ │ │ │ │ +JacobianInverse{std::declval().jacobianInverse(std:: │ │ │ │ │ +declval())}); │ │ │ │ │ +45 │ │ │ │ │ +46 using JacobianInverseDefault = decltype(transpose(std:: │ │ │ │ │ +declval())); │ │ │ │ │ +47 │ │ │ │ │ +48 template │ │ │ │ │ +49 using JacobianOfImplementation = decltype(typename Implementation_T:: │ │ │ │ │ +Jacobian{std::declval().jacobian(std:: │ │ │ │ │ +declval())}); │ │ │ │ │ 50 │ │ │ │ │ -51 template< class K > │ │ │ │ │ -_5_2 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 2, 2 > &matrix ) │ │ │ │ │ -53 { │ │ │ │ │ -54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ] │ │ │ │ │ -[ 0 ]; │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 template< class K > │ │ │ │ │ -_5_8 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 2, 3 > &matrix ) │ │ │ │ │ -59 { │ │ │ │ │ -60 return _v_e_c_t_o_r_P_r_o_d_u_c_t( matrix[ 0 ], matrix[ 1 ] ).two_norm(); │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -63 template< class K, int m > │ │ │ │ │ -_6_4 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 2, m > &matrix ) │ │ │ │ │ -65 { │ │ │ │ │ -66 using std::sqrt; │ │ │ │ │ -67 const K tmpA = matrix[ 0 ].two_norm2(); │ │ │ │ │ -68 const K tmpB = matrix[ 1 ].two_norm2(); │ │ │ │ │ -69 const K tmpC = matrix[ 0 ] * matrix[ 1 ]; │ │ │ │ │ -70 return sqrt( tmpA * tmpB - tmpC * tmpC ); │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 template< class K > │ │ │ │ │ -_7_4 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 3, 3 > &matrix ) │ │ │ │ │ -75 { │ │ │ │ │ -76 return matrix[ 0 ] * _v_e_c_t_o_r_P_r_o_d_u_c_t( matrix[ 1 ], matrix[ 2 ] ); │ │ │ │ │ -77 } │ │ │ │ │ +51 using JacobianDefault = decltype(transpose(std::declval │ │ │ │ │ +())); │ │ │ │ │ +52 │ │ │ │ │ +53 │ │ │ │ │ +54 template │ │ │ │ │ +55 [[deprecated("Geometry implementatons are required to provide a jacobian │ │ │ │ │ +(local) method. The default implementation is deprecated and will be removed │ │ │ │ │ +after release 2.9")]] │ │ │ │ │ +56 auto deprecatedDefaultJacobian ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l ) const { │ │ │ │ │ +57 return transpose(_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l)); │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +60 template │ │ │ │ │ +61 [[deprecated("Geometry implementatons are required to provide a │ │ │ │ │ +jacobianInverse(local) method. The default implementation is deprecated and │ │ │ │ │ +will be removed after release 2.9")]] │ │ │ │ │ +62 auto deprecatedDefaultJacobianInverse ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l ) const │ │ │ │ │ +{ │ │ │ │ │ +63 return transpose(_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)); │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +66 public: │ │ │ │ │ +67 │ │ │ │ │ +_6_8 using _J_a_c_o_b_i_a_n = Std::detected_or_t; │ │ │ │ │ +_6_9 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = Std::detected_or_t; │ │ │ │ │ +70 │ │ │ │ │ +_7_1 explicit _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e ( const Implementation &_i_m_p_l ) │ │ │ │ │ +72 : impl_( &_i_m_p_l ) │ │ │ │ │ +73 {} │ │ │ │ │ +74 │ │ │ │ │ +_7_5 GeometryType _t_y_p_e () const { return _i_m_p_l().type(); } │ │ │ │ │ +76 │ │ │ │ │ +_7_7 bool _a_f_f_i_n_e() const { return _i_m_p_l().affine(); } │ │ │ │ │ 78 │ │ │ │ │ -79 │ │ │ │ │ -80 template< class K, int m > │ │ │ │ │ -_8_1 inline static K _i_n_v_e_r_t ( [[maybe_unused]] const FieldMatrix< K, 0, m > │ │ │ │ │ -&matrix, │ │ │ │ │ -82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse ) │ │ │ │ │ -83 { │ │ │ │ │ -84 return K( 1 ); │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -87 template< class K > │ │ │ │ │ -_8_8 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 1, 1 > &matrix, │ │ │ │ │ -89 FieldMatrix< K, 1, 1 > &inverse ) │ │ │ │ │ -90 { │ │ │ │ │ -91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ]; │ │ │ │ │ -92 return matrix[ 0 ][ 0 ]; │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -95 template< class K, int m > │ │ │ │ │ -_9_6 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 1, m > &matrix, │ │ │ │ │ -97 FieldMatrix< K, m, 1 > &inverse ) │ │ │ │ │ -98 { │ │ │ │ │ -99 using std::sqrt; │ │ │ │ │ -100 K detSqr = matrix[ 0 ].two_norm2(); │ │ │ │ │ -101 K invDetSqr = K( 1 ) / detSqr; │ │ │ │ │ -102 for( int i = 0; i < m; ++i ) │ │ │ │ │ -103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ]; │ │ │ │ │ -104 return sqrt( detSqr ); │ │ │ │ │ -105 } │ │ │ │ │ -106 │ │ │ │ │ -107 template< class K > │ │ │ │ │ -_1_0_8 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 2, 2 > &matrix, │ │ │ │ │ -109 FieldMatrix< K, 2, 2 > &inverse ) │ │ │ │ │ -110 { │ │ │ │ │ -111 K det = _d_e_t_e_r_m_i_n_a_n_t( matrix ); │ │ │ │ │ -112 K invDet = K( 1 ) / det; │ │ │ │ │ -113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ]; │ │ │ │ │ -114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ]; │ │ │ │ │ -115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ]; │ │ │ │ │ -116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ]; │ │ │ │ │ -117 return det; │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120 template< class K, int m > │ │ │ │ │ -_1_2_1 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 2, m > &matrix, │ │ │ │ │ -122 FieldMatrix< K, m, 2 > &inverse ) │ │ │ │ │ -123 { │ │ │ │ │ -124 using std::sqrt; │ │ │ │ │ -125 const K tmpA = matrix[ 0 ].two_norm2(); │ │ │ │ │ -126 const K tmpB = matrix[ 1 ].two_norm2(); │ │ │ │ │ -127 const K tmpC = matrix[ 0 ] * matrix[ 1 ]; │ │ │ │ │ -128 const K detSqr = tmpA * tmpB - tmpC * tmpC; │ │ │ │ │ -129 const K invDetSqr = K( 1 ) / detSqr; │ │ │ │ │ -130 for( int i = 0; i < m; ++i ) │ │ │ │ │ -131 { │ │ │ │ │ -132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix[ 1 │ │ │ │ │ -][ i ]); │ │ │ │ │ -133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix[ 0 │ │ │ │ │ -][ i ]); │ │ │ │ │ -134 } │ │ │ │ │ -135 return sqrt( detSqr ); │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 template< class K > │ │ │ │ │ -_1_3_9 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 3, 3 > &matrix, │ │ │ │ │ -140 FieldMatrix< K, 3, 3 > &inverse ) │ │ │ │ │ -141 { │ │ │ │ │ -142 return FMatrixHelp::invertMatrix( matrix, inverse ); │ │ │ │ │ -143 } │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146} │ │ │ │ │ +_7_9 int _c_o_r_n_e_r_s () const { return _i_m_p_l().corners(); } │ │ │ │ │ +_8_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r ( int i ) const { return _i_m_p_l().corner( i ); } │ │ │ │ │ +_8_1 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _i_m_p_l().center(); } │ │ │ │ │ +82 │ │ │ │ │ +_8_3 _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 │ │ │ │ │ +84 { │ │ │ │ │ +85 return _i_m_p_l().global( _l_o_c_a_l ); │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +_8_8 _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 │ │ │ │ │ +89 { │ │ │ │ │ +90 return _i_m_p_l().local( _g_l_o_b_a_l ); │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +_9_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 │ │ │ │ │ +94 { │ │ │ │ │ +95 return _i_m_p_l().integrationElement( _l_o_c_a_l ); │ │ │ │ │ +96 } │ │ │ │ │ +97 │ │ │ │ │ +_9_8 _c_t_y_p_e _v_o_l_u_m_e () const { return _i_m_p_l().volume(); } │ │ │ │ │ +99 │ │ │ │ │ +_1_0_0 _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 │ │ │ │ │ +101 { │ │ │ │ │ +102 return _i_m_p_l().jacobianTransposed( _l_o_c_a_l ); │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_5 _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 │ │ │ │ │ +106 { │ │ │ │ │ +107 return _i_m_p_l().jacobianInverseTransposed( _l_o_c_a_l ); │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +_1_1_0 _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 │ │ │ │ │ +111 { │ │ │ │ │ +112 if constexpr(Std::is_detected_v) │ │ │ │ │ +113 return _i_m_p_l().jacobian(_l_o_c_a_l); │ │ │ │ │ +114 else │ │ │ │ │ +115 return deprecatedDefaultJacobian(_l_o_c_a_l); │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_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 │ │ │ │ │ +119 { │ │ │ │ │ +120 if constexpr(Std::is_detected_v) │ │ │ │ │ +121 return _i_m_p_l().jacobianInverse(_l_o_c_a_l); │ │ │ │ │ +122 else │ │ │ │ │ +123 return deprecatedDefaultJacobianInverse(_l_o_c_a_l); │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +_1_2_6 const Implementation &_i_m_p_l () const { return *impl_; } │ │ │ │ │ +127 │ │ │ │ │ +128 private: │ │ │ │ │ +129 const Implementation *impl_; │ │ │ │ │ +130 }; │ │ │ │ │ +131 │ │ │ │ │ +132 │ │ │ │ │ +133 // LocalGeometryReference │ │ │ │ │ +134 // ----------------------- │ │ │ │ │ +135 │ │ │ │ │ +136 template< int mydim, int cdim, class Grid > │ │ │ │ │ +_1_3_7 class _L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ +138 : public _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e< typename std::remove_const< Grid >::type:: │ │ │ │ │ +Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >:: │ │ │ │ │ +LocalGeometryImpl > │ │ │ │ │ +139 { │ │ │ │ │ +140 typedef typename std::remove_const< Grid >::type::Traits::template Codim< │ │ │ │ │ +std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl │ │ │ │ │ +Implementation; │ │ │ │ │ +141 │ │ │ │ │ +142 public: │ │ │ │ │ +_1_4_3 _L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e ( const Implementation &_i_m_p_l ) │ │ │ │ │ +144 : _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e< Implementation >( _i_m_p_l ) │ │ │ │ │ +145 {} │ │ │ │ │ +146 }; │ │ │ │ │ 147 │ │ │ │ │ -148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ │ +148 │ │ │ │ │ +149 │ │ │ │ │ +150 // Definitions of GeometryReference │ │ │ │ │ +151 // -------------------------------- │ │ │ │ │ +152 │ │ │ │ │ +153 template< class Implementation > │ │ │ │ │ +154 const int _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _>_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +155 │ │ │ │ │ +156 template< class Implementation > │ │ │ │ │ +157 const int _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _>_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +158 │ │ │ │ │ +159} // namespace Dune │ │ │ │ │ +160 │ │ │ │ │ +161#endif // #ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ -static K determinant(const FieldMatrix< K, 0, m > &matrix) │ │ │ │ │ -DDeeffiinniittiioonn algebra.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ │ -static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ │ -&inverse) │ │ │ │ │ -DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_v_e_c_t_o_r_P_r_o_d_u_c_t │ │ │ │ │ -static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const │ │ │ │ │ -FieldVector< K, 3 > &v) │ │ │ │ │ -DDeeffiinniittiioonn algebra.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int mydimension │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ +ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_v_o_l_u_m_e │ │ │ │ │ +ctype volume() const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_i_m_p_l │ │ │ │ │ +const Implementation & impl() const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:126 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ │ +JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_e_n_t_e_r │ │ │ │ │ +GlobalCoordinate center() const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +Implementation::JacobianTransposed JacobianTransposed │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ +GeometryReference(const Implementation &impl) │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ │ +Std::detected_or_t< JacobianInverseDefault, JacobianInverseOfImplementation, │ │ │ │ │ +Implementation > JacobianInverse │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_l_o_c_a_l │ │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +Implementation::GlobalCoordinate GlobalCoordinate │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int coorddimension │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_a_f_f_i_n_e │ │ │ │ │ +bool affine() const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:77 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_o_r_n_e_r │ │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_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 │ │ │ │ │ +JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ │ +&local) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_o_r_n_e_r_s │ │ │ │ │ +int corners() const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +Implementation::LocalCoordinate LocalCoordinate │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_g_l_o_b_a_l │ │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_J_a_c_o_b_i_a_n │ │ │ │ │ +Std::detected_or_t< JacobianDefault, JacobianOfImplementation, Implementation > │ │ │ │ │ +Jacobian │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_c_t_y_p_e │ │ │ │ │ +Implementation::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_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 │ │ │ │ │ +Implementation::JacobianInverseTransposed JacobianInverseTransposed │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_j_a_c_o_b_i_a_n │ │ │ │ │ +Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ │ +LocalGeometryReference(const Implementation &impl) │ │ │ │ │ +DDeeffiinniittiioonn geometryreference.hh:143 │ │ │ │ │ +_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ +Wrapper and interface classes for element geometries. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertagrid.cc File Reference │ │ │ │ +dune-grid: leveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,66 +71,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros | │ │ │ │ -Functions | │ │ │ │ -Variables
│ │ │ │ -
albertagrid.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
leveliterator.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include "geometry.cc"
│ │ │ │ -#include "entity.cc"
│ │ │ │ -#include "intersection.cc"
│ │ │ │ +
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ +#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >
 
class  Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Macros

#define DUNE_ALBERTAGRID_CC
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Functions

template<int dim, int dimworld>
static void Dune::checkAlbertaDimensions ()
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Variables

static void * Dune::Alberta::adaptationDataHandler_
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_ALBERTAGRID_CC

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_ALBERTAGRID_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +1,23 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_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 | _V_a_r_i_a_b_l_e_s │ │ │ │ │ -albertagrid.cc File Reference │ │ │ │ │ -#include "_g_e_o_m_e_t_r_y_._c_c" │ │ │ │ │ -#include "_e_n_t_i_t_y_._c_c" │ │ │ │ │ -#include "_i_n_t_e_r_s_e_c_t_i_o_n_._c_c" │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +leveliterator.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A_G_R_I_D___C_C │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -static void  _D_u_n_e_:_:_c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s () │ │ │ │ │ -  │ │ │ │ │ -VVaarriiaabblleess │ │ │ │ │ -static void *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__ │ │ │ │ │ -  │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAAGGRRIIDD__CCCC ********** │ │ │ │ │ -#define DUNE_ALBERTAGRID_CC │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertagrid.cc Source File │ │ │ │ +dune-grid: leveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,802 +74,145 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
albertagrid.cc
│ │ │ │ +
leveliterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTAGRID_CC
│ │ │ │ -
6#define DUNE_ALBERTAGRID_CC
│ │ │ │ +
5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │
7
│ │ │ │ -
8//************************************************************************
│ │ │ │ -
9//
│ │ │ │ -
10// implementation of AlbertaGrid
│ │ │ │ -
11//
│ │ │ │ -
12// namespace Dune
│ │ │ │ -
13//
│ │ │ │ -
14//************************************************************************
│ │ │ │ -
15#include "geometry.cc"
│ │ │ │ -
16#include "entity.cc"
│ │ │ │ -
17#include "intersection.cc"
│ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21
│ │ │ │ -
│ │ │ │ -
22 namespace Alberta
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 // AlbertaGridLevelIterator
│ │ │ │ +
18 // ------------------------
│ │ │ │ +
19
│ │ │ │ +
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ │
23 {
│ │ │ │ - │ │ │ │ -
25 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │
26
│ │ │ │ -
27
│ │ │ │ -
28 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31 // If this check fails, define ALBERTA_DIM accordingly
│ │ │ │ -
32 static_assert((dimworld == Alberta::dimWorld),
│ │ │ │ -
33 "Template Parameter dimworld does not match "
│ │ │ │ -
34 "ALBERTA's DIM_OF_WORLD setting.");
│ │ │ │ -
35 }
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
37
│ │ │ │ -
38 // AlbertaGrid
│ │ │ │ -
39 // -----------
│ │ │ │ -
40
│ │ │ │ -
41 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
43 : mesh_(),
│ │ │ │ -
44 maxlevel_( 0 ),
│ │ │ │ -
45 numBoundarySegments_( 0 ),
│ │ │ │ -
46 hIndexSet_( dofNumbering_ ),
│ │ │ │ -
47 idSet_( hIndexSet_ ),
│ │ │ │ -
48 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ -
49 leafIndexSet_( 0 ),
│ │ │ │ -
50 sizeCache_( *this ),
│ │ │ │ -
51 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ -
52 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ -
53 {
│ │ │ │ - │ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57
│ │ │ │ -
58 template< int dim, int dimworld >
│ │ │ │ -
59 template< class Proj, class Impl >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
63 : mesh_(),
│ │ │ │ -
64 maxlevel_( 0 ),
│ │ │ │ -
65 numBoundarySegments_( 0 ),
│ │ │ │ -
66 hIndexSet_( dofNumbering_ ),
│ │ │ │ -
67 idSet_( hIndexSet_ ),
│ │ │ │ -
68 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ -
69 leafIndexSet_ ( 0 ),
│ │ │ │ -
70 sizeCache_( *this ),
│ │ │ │ -
71 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ -
72 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ -
73 {
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ -
76 numBoundarySegments_ = mesh_.create( macroData, projectionFactory );
│ │ │ │ -
77 if( !mesh_ )
│ │ │ │ -
78 DUNE_THROW( AlbertaError, "Invalid macro data structure." );
│ │ │ │ -
79
│ │ │ │ -
80 setup();
│ │ │ │ -
81 hIndexSet_.create();
│ │ │ │ -
82
│ │ │ │ -
83 calcExtras();
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86
│ │ │ │ -
87 template< int dim, int dimworld >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
90 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection )
│ │ │ │ -
91 : mesh_(),
│ │ │ │ -
92 maxlevel_( 0 ),
│ │ │ │ -
93 numBoundarySegments_( 0 ),
│ │ │ │ -
94 hIndexSet_( dofNumbering_ ),
│ │ │ │ -
95 idSet_( hIndexSet_ ),
│ │ │ │ -
96 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ -
97 leafIndexSet_ ( 0 ),
│ │ │ │ -
98 sizeCache_( *this ),
│ │ │ │ -
99 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ -
100 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ -
101 {
│ │ │ │ - │ │ │ │ -
103
│ │ │ │ -
104 if( projection != 0 )
│ │ │ │ -
105 {
│ │ │ │ -
106 Alberta::DuneGlobalBoundaryProjectionFactory< dimension > projectionFactory( projection );
│ │ │ │ -
107 numBoundarySegments_ = mesh_.create( macroData, projectionFactory );
│ │ │ │ -
108 }
│ │ │ │ -
109 else
│ │ │ │ -
110 numBoundarySegments_ = mesh_.create( macroData );
│ │ │ │ -
111 if( !mesh_ )
│ │ │ │ -
112 DUNE_THROW( AlbertaError, "Invalid macro data structure." );
│ │ │ │ -
113
│ │ │ │ -
114 setup();
│ │ │ │ -
115 hIndexSet_.create();
│ │ │ │ -
116
│ │ │ │ -
117 calcExtras();
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120
│ │ │ │ -
121 template < int dim, int dimworld >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
123 ::AlbertaGrid ( const std::string &macroGridFileName )
│ │ │ │ -
124 : mesh_(),
│ │ │ │ -
125 maxlevel_( 0 ),
│ │ │ │ -
126 hIndexSet_( dofNumbering_ ),
│ │ │ │ -
127 idSet_( hIndexSet_ ),
│ │ │ │ -
128 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ │ -
129 leafIndexSet_ ( 0 ),
│ │ │ │ -
130 sizeCache_( *this ),
│ │ │ │ -
131 leafMarkerVector_( dofNumbering_ ),
│ │ │ │ -
132 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ │ -
133 {
│ │ │ │ - │ │ │ │ -
135
│ │ │ │ -
136 numBoundarySegments_ = mesh_.create( macroGridFileName );
│ │ │ │ -
137 if( !mesh_ )
│ │ │ │ -
138 {
│ │ │ │ - │ │ │ │ -
140 "Grid file '" << macroGridFileName
│ │ │ │ -
141 << "' is not in ALBERTA macro triangulation format." );
│ │ │ │ -
142 }
│ │ │ │ -
143
│ │ │ │ -
144 setup();
│ │ │ │ -
145 hIndexSet_.create();
│ │ │ │ -
146
│ │ │ │ -
147 calcExtras();
│ │ │ │ -
148
│ │ │ │ -
149 std::cout << typeName() << " created from macro grid file '"
│ │ │ │ -
150 << macroGridFileName << "'." << std::endl;
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
153
│ │ │ │ -
154 template< int dim, int dimworld >
│ │ │ │ - │ │ │ │ -
156 {
│ │ │ │ -
157 dofNumbering_.create( mesh_ );
│ │ │ │ -
158
│ │ │ │ -
159 levelProvider_.create( dofNumbering_ );
│ │ │ │ -
160
│ │ │ │ -
161#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
162 coordCache_.create( dofNumbering_ );
│ │ │ │ -
163#endif
│ │ │ │ -
164 }
│ │ │ │ -
165
│ │ │ │ -
166
│ │ │ │ -
167 template< int dim, int dimworld >
│ │ │ │ -
168 inline void AlbertaGrid< dim, dimworld >::removeMesh ()
│ │ │ │ -
169 {
│ │ │ │ -
170 for( size_t i = 0; i < levelIndexVec_.size(); ++i )
│ │ │ │ -
171 {
│ │ │ │ -
172 if( levelIndexVec_[ i ] != 0 )
│ │ │ │ -
173 delete levelIndexVec_[ i ];
│ │ │ │ -
174 levelIndexVec_[ i ] = 0;
│ │ │ │ -
175 }
│ │ │ │ -
176
│ │ │ │ -
177 if( leafIndexSet_ != 0 )
│ │ │ │ -
178 delete leafIndexSet_;
│ │ │ │ -
179 leafIndexSet_ = 0;
│ │ │ │ -
180
│ │ │ │ -
181 // release dof vectors
│ │ │ │ -
182 hIndexSet_.release();
│ │ │ │ -
183 levelProvider_.release();
│ │ │ │ -
184#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
185 coordCache_.release();
│ │ │ │ -
186#endif
│ │ │ │ -
187 dofNumbering_.release();
│ │ │ │ -
188
│ │ │ │ -
189 sizeCache_.reset();
│ │ │ │ -
190
│ │ │ │ -
191 mesh_.release();
│ │ │ │ -
192 }
│ │ │ │ -
193
│ │ │ │ -
194
│ │ │ │ -
195 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
197 {
│ │ │ │ -
198 removeMesh();
│ │ │ │ -
199 }
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201
│ │ │ │ -
202 template< int dim, int dimworld >
│ │ │ │ -
203 template< int codim, PartitionIteratorType pitype >
│ │ │ │ - │ │ │ │ -
205 ::template Codim< codim >::template Partition<pitype>::LevelIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
207 {
│ │ │ │ - │ │ │ │ -
209 assert( level >= 0 );
│ │ │ │ -
210
│ │ │ │ -
211 if( level > maxlevel_ )
│ │ │ │ -
212 return lend< codim, pitype >( level );
│ │ │ │ -
213 MarkerVector &markerVector = levelMarkerVector_[ level ];
│ │ │ │ -
214
│ │ │ │ -
215 if( (codim > 0) && !markerVector.up2Date() )
│ │ │ │ -
216 markerVector.template markSubEntities< 1 >( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ │ -
217
│ │ │ │ -
218 return LevelIteratorImp( *this, &markerVector, level );
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ -
220
│ │ │ │ -
221
│ │ │ │ -
222 template< int dim, int dimworld >
│ │ │ │ -
223 template< int codim, PartitionIteratorType pitype >
│ │ │ │ - │ │ │ │ -
225 ::template Codim< codim >::template Partition< pitype >::LevelIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
227 {
│ │ │ │ - │ │ │ │ -
229 assert( level >= 0 );
│ │ │ │ -
230
│ │ │ │ -
231 return LevelIteratorImp( *this, level );
│ │ │ │ -
232 }
│ │ │ │ -
│ │ │ │ -
233
│ │ │ │ -
234
│ │ │ │ -
235 template< int dim, int dimworld >
│ │ │ │ -
236 template< int codim >
│ │ │ │ - │ │ │ │ -
238 ::template Codim< codim >::LevelIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
240 {
│ │ │ │ -
241 return lbegin< codim, All_Partition >( level );
│ │ │ │ -
242 }
│ │ │ │ -
│ │ │ │ -
243
│ │ │ │ -
244
│ │ │ │ -
245 template< int dim, int dimworld >
│ │ │ │ -
246 template< int codim >
│ │ │ │ - │ │ │ │ -
248 ::template Codim< codim >::LevelIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
250 {
│ │ │ │ -
251 return lend< codim, All_Partition >( level );
│ │ │ │ -
252 }
│ │ │ │ -
│ │ │ │ -
253
│ │ │ │ -
254
│ │ │ │ -
255 template< int dim, int dimworld >
│ │ │ │ -
256 template< int codim, PartitionIteratorType pitype >
│ │ │ │ - │ │ │ │ -
258 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
260 {
│ │ │ │ - │ │ │ │ -
262
│ │ │ │ -
263 MarkerVector &markerVector = leafMarkerVector_;
│ │ │ │ -
264 const int firstMarkedCodim = 2;
│ │ │ │ -
265 if( (codim >= firstMarkedCodim) && !markerVector.up2Date() )
│ │ │ │ - │ │ │ │ -
267
│ │ │ │ -
268 return LeafIteratorImp( *this, &markerVector, maxlevel_ );
│ │ │ │ -
269 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
271
│ │ │ │ -
272 template< int dim, int dimworld >
│ │ │ │ -
273 template< int codim, PartitionIteratorType pitype >
│ │ │ │ - │ │ │ │ -
275 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
279 return LeafIteratorImp( *this, maxlevel_ );
│ │ │ │ -
280 }
│ │ │ │ -
281
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
283 template< int dim, int dimworld >
│ │ │ │ -
284 template< int codim >
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
288 {
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
290 }
│ │ │ │ -
291
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
293 template< int dim, int dimworld >
│ │ │ │ -
294 template< int codim >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
298 {
│ │ │ │ - │ │ │ │ -
300 }
│ │ │ │ -
│ │ │ │ -
301
│ │ │ │ -
302
│ │ │ │ -
303 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
305 {
│ │ │ │ -
306 typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
│ │ │ │ -
307
│ │ │ │ -
308 // only MAXL levels allowed
│ │ │ │ -
309 assert( (refCount >= 0) && (refCount + maxlevel_ < MAXL) );
│ │ │ │ -
310
│ │ │ │ -
311 for( int i = 0; i < refCount; ++i )
│ │ │ │ -
312 {
│ │ │ │ -
313 // mark all interior elements
│ │ │ │ -
314 const LeafIterator endit = leafend< 0 >();
│ │ │ │ -
315 for( LeafIterator it = leafbegin< 0 >(); it != endit; ++it )
│ │ │ │ -
316 mark( 1, *it );
│ │ │ │ -
317
│ │ │ │ -
318 preAdapt();
│ │ │ │ -
319 adapt();
│ │ │ │ -
320 postAdapt();
│ │ │ │ -
321 }
│ │ │ │ -
322 }
│ │ │ │ -
│ │ │ │ -
323
│ │ │ │ -
324
│ │ │ │ -
325 template< int dim, int dimworld >
│ │ │ │ -
326 template< class DataHandle >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
329 {
│ │ │ │ -
330 typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
│ │ │ │ -
331
│ │ │ │ -
332 // only MAXL levels allowed
│ │ │ │ -
333 assert( (refCount >= 0) && (refCount + maxlevel_ < MAXL) );
│ │ │ │ -
334
│ │ │ │ -
335 for( int i = 0; i < refCount; ++i )
│ │ │ │ -
336 {
│ │ │ │ -
337 // mark all interior elements
│ │ │ │ -
338 const LeafIterator endit = leafend< 0 >();
│ │ │ │ -
339 for( LeafIterator it = leafbegin< 0 >(); it != endit; ++it )
│ │ │ │ -
340 mark( 1, *it );
│ │ │ │ -
341
│ │ │ │ -
342 adapt( handle );
│ │ │ │ -
343 }
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
345
│ │ │ │ -
346
│ │ │ │ -
│ │ │ │ -
347 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
349 {
│ │ │ │ -
│ │ │ │ -
350 adaptationState_.preAdapt();
│ │ │ │ -
351 return adaptationState_.coarsen();
│ │ │ │ -
352 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
354
│ │ │ │ -
355 template < int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
357 {
│ │ │ │ -
358#ifndef NDEBUG
│ │ │ │ -
359 if( leafIndexSet_ != 0 )
│ │ │ │ -
360 {
│ │ │ │ -
361 bool consistent = true;
│ │ │ │ -
362 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ -
363 {
│ │ │ │ -
364 if( int(leafIndexSet_->size( codim )) == mesh_.size( codim ) )
│ │ │ │ -
365 continue;
│ │ │ │ -
366 std::cerr << "Incorrect size of leaf index set for codimension "
│ │ │ │ -
367 << codim << "!" << std::endl;
│ │ │ │ -
368 std::cerr << "DUNE index set reports: " << leafIndexSet_->size( codim )
│ │ │ │ -
369 << std::endl;
│ │ │ │ -
370 std::cerr << "ALBERTA mesh reports: " << mesh_.size( codim ) << std::endl;
│ │ │ │ -
371 consistent = false;
│ │ │ │ -
372 }
│ │ │ │ -
373 if( !consistent )
│ │ │ │ -
374 abort();
│ │ │ │ -
375 }
│ │ │ │ -
376#endif
│ │ │ │ -
377
│ │ │ │ -
378 levelProvider_.markAllOld();
│ │ │ │ -
379 adaptationState_.postAdapt();
│ │ │ │ -
380 }
│ │ │ │ -
│ │ │ │ -
381
│ │ │ │ -
382
│ │ │ │ -
383 template< int dim, int dimworld >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
385 ::mark( int refCount, const typename Traits::template Codim< 0 >::Entity &e )
│ │ │ │ -
386 {
│ │ │ │ -
387 // if not leaf entity, leave method
│ │ │ │ -
│ │ │ │ -
388 if( !e.isLeaf() )
│ │ │ │ -
389 return false;
│ │ │ │ -
390
│ │ │ │ -
│ │ │ │ -
391 // don't mark macro elements for coarsening
│ │ │ │ -
392 if( refCount < -e.level() )
│ │ │ │ -
393 return false;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
395 // take back previous marking
│ │ │ │ -
396 adaptationState_.unmark( getMark( e ) );
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
398 // set new marking
│ │ │ │ -
399 adaptationState_.mark( refCount );
│ │ │ │ -
400 e.impl().elementInfo().setMark( refCount );
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
402 return true;
│ │ │ │ -
403 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
405
│ │ │ │ -
406 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
409 {
│ │ │ │ -
410 return e.impl().elementInfo().getMark();
│ │ │ │ -
411 }
│ │ │ │ -
│ │ │ │ -
412
│ │ │ │ -
413
│ │ │ │ -
414 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
416 {
│ │ │ │ -
417 // this is already done in postAdapt
│ │ │ │ -
418 //levelProvider_.markAllOld();
│ │ │ │ -
419
│ │ │ │ -
420 // adapt mesh
│ │ │ │ -
421 hIndexSet_.preAdapt();
│ │ │ │ -
422 const bool refined = mesh_.refine();
│ │ │ │ -
423 const bool coarsened = (adaptationState_.coarsen() ? mesh_.coarsen() : false);
│ │ │ │ -
424 adaptationState_.adapt();
│ │ │ │ -
425 hIndexSet_.postAdapt();
│ │ │ │ -
426
│ │ │ │ -
427 if( refined || coarsened )
│ │ │ │ -
428 calcExtras();
│ │ │ │ -
429
│ │ │ │ -
430 // return true if elements were created
│ │ │ │ -
431 return refined;
│ │ │ │ -
432 }
│ │ │ │ -
│ │ │ │ -
433
│ │ │ │ -
434
│ │ │ │ -
435 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ -
436 template< class DataHandle >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
440 preAdapt();
│ │ │ │ -
441
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
446
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
448 typename Callback::DofVectorPointer callbackVector;
│ │ │ │ -
449 callbackVector.create( dofNumbering_.emptyDofSpace(), "Adaptation Callback" );
│ │ │ │ - │ │ │ │ - │ │ │ │ -
452 if( Callback::DofVectorPointer::supportsAdaptationData )
│ │ │ │ -
453 callbackVector.setAdaptationData( &dataHandler );
│ │ │ │ -
454 else
│ │ │ │ -
455 Alberta::adaptationDataHandler_ = &dataHandler;
│ │ │ │ -
456
│ │ │ │ -
457 bool refined = adapt();
│ │ │ │ -
458
│ │ │ │ -
459 if( !Callback::DofVectorPointer::supportsAdaptationData )
│ │ │ │ -
460 Alberta::adaptationDataHandler_ = 0;
│ │ │ │ -
461 callbackVector.release();
│ │ │ │ -
462
│ │ │ │ -
463 postAdapt();
│ │ │ │ -
464 return refined;
│ │ │ │ -
465 }
│ │ │ │ -
466
│ │ │ │ -
467
│ │ │ │ -
468 template< int dim, int dimworld >
│ │ │ │ -
469 inline const Alberta::GlobalVector &
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
471 ::getCoord ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ │ -
472 {
│ │ │ │ -
473 assert( (vertex >= 0) && (vertex <= dim) );
│ │ │ │ -
474#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
475 return coordCache_( elementInfo, vertex );
│ │ │ │ -
476#else
│ │ │ │ -
477 return elementInfo.coordinate( vertex );
│ │ │ │ -
478#endif
│ │ │ │ -
479 }
│ │ │ │ -
│ │ │ │ -
480
│ │ │ │ -
481
│ │ │ │ -
482 template < int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
484 {
│ │ │ │ -
485 return maxlevel_;
│ │ │ │ -
486 }
│ │ │ │ -
│ │ │ │ -
487
│ │ │ │ -
488
│ │ │ │ -
489 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ -
490 inline int AlbertaGrid< dim, dimworld >::size ( int level, int codim ) const
│ │ │ │ -
491 {
│ │ │ │ -
492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, codim ) : 0);
│ │ │ │ -
493 }
│ │ │ │ -
│ │ │ │ -
494
│ │ │ │ -
495
│ │ │ │ -
496 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ -
497 inline int AlbertaGrid< dim, dimworld >::size ( int level, GeometryType type ) const
│ │ │ │ -
498 {
│ │ │ │ -
499 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, type ) : 0);
│ │ │ │ -
500 }
│ │ │ │ -
│ │ │ │ -
501
│ │ │ │ -
502
│ │ │ │ -
503 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
505 {
│ │ │ │ -
506 assert( sizeCache_.size( codim ) == mesh_.size( codim ) );
│ │ │ │ -
507 return mesh_.size( codim );
│ │ │ │ -
508 }
│ │ │ │ -
│ │ │ │ -
509
│ │ │ │ -
510
│ │ │ │ -
511 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ -
512 inline int AlbertaGrid< dim, dimworld >::size ( GeometryType type ) const
│ │ │ │ -
513 {
│ │ │ │ -
514 return sizeCache_.size( type );
│ │ │ │ -
515 }
│ │ │ │ -
│ │ │ │ -
516
│ │ │ │ -
517
│ │ │ │ -
518 template < int dim, int dimworld >
│ │ │ │ -
519 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: LevelIndexSet &
│ │ │ │ -
│ │ │ │ -
520 AlbertaGrid < dim, dimworld > :: levelIndexSet (int level) const
│ │ │ │ -
521 {
│ │ │ │ -
522 // assert that given level is in range
│ │ │ │ -
523 assert( (level >= 0) && (level < (int)levelIndexVec_.size()) );
│ │ │ │ -
524
│ │ │ │ -
525 if( levelIndexVec_[ level ] == 0 )
│ │ │ │ -
526 {
│ │ │ │ -
527 levelIndexVec_[ level ] = new typename GridFamily::LevelIndexSetImp ( dofNumbering_ );
│ │ │ │ -
528 levelIndexVec_[ level ]->update( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ │ -
529 }
│ │ │ │ -
530 return *(levelIndexVec_[ level ]);
│ │ │ │ -
531 }
│ │ │ │ -
│ │ │ │ -
532
│ │ │ │ -
533 template < int dim, int dimworld >
│ │ │ │ -
534 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: LeafIndexSet &
│ │ │ │ -
│ │ │ │ -
535 AlbertaGrid < dim, dimworld > :: leafIndexSet () const
│ │ │ │ -
536 {
│ │ │ │ -
537 if( leafIndexSet_ == 0 )
│ │ │ │ -
538 {
│ │ │ │ -
539 leafIndexSet_ = new typename GridFamily::LeafIndexSetImp( dofNumbering_ );
│ │ │ │ -
540 leafIndexSet_->update( leafbegin< 0 >(), leafend< 0 >() );
│ │ │ │ -
541 }
│ │ │ │ -
542 return *leafIndexSet_;
│ │ │ │ -
543 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
544
│ │ │ │ -
545
│ │ │ │ -
546 template < int dim, int dimworld >
│ │ │ │ -
547 inline void AlbertaGrid < dim, dimworld >::calcExtras ()
│ │ │ │ -
548 {
│ │ │ │ -
549 // determine new maxlevel
│ │ │ │ -
550 maxlevel_ = levelProvider_.maxLevel();
│ │ │ │ -
551 assert( (maxlevel_ >= 0) && (maxlevel_ < MAXL) );
│ │ │ │ -
552
│ │ │ │ -
553 // unset up2Dat status, if lbegin is called then this status is updated
│ │ │ │ -
│ │ │ │ -
554 for( int l = 0; l < MAXL; ++l )
│ │ │ │ -
555 levelMarkerVector_[ l ].clear();
│ │ │ │ -
556
│ │ │ │ -
557 // unset up2Dat status, if leafbegin is called then this status is updated
│ │ │ │ -
558 leafMarkerVector_.clear();
│ │ │ │ -
559
│ │ │ │ -
560 sizeCache_.reset();
│ │ │ │ -
561
│ │ │ │ -
562 // update index sets (if they exist)
│ │ │ │ -
563 if( leafIndexSet_ != 0 )
│ │ │ │ -
564 leafIndexSet_->update( leafbegin< 0 >(), leafend< 0 >() );
│ │ │ │ -
565 for( unsigned int level = 0; level < levelIndexVec_.size(); ++level )
│ │ │ │ -
566 {
│ │ │ │ -
567 if( levelIndexVec_[ level ] )
│ │ │ │ -
568 levelIndexVec_[ level ]->update( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ │ -
569 }
│ │ │ │ -
570 }
│ │ │ │ -
571
│ │ │ │ -
572
│ │ │ │ -
573 template< int dim, int dimworld >
│ │ │ │ -
574 inline bool AlbertaGrid< dim, dimworld >
│ │ │ │ -
│ │ │ │ -
575 ::writeGrid ( const std::string &filename, ctype time ) const
│ │ │ │ -
576 {
│ │ │ │ -
577 if( filename.size() <= 0 )
│ │ │ │ -
578 DUNE_THROW( AlbertaIOError, "No filename given to writeGridXdr." );
│ │ │ │ -
579 return (mesh_.write( filename, time ) && hIndexSet_.write( filename ));
│ │ │ │ -
580 }
│ │ │ │ -
│ │ │ │ -
581
│ │ │ │ -
582
│ │ │ │ -
583 template< int dim, int dimworld >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
585 ::readGrid ( const std::string &filename, ctype &time )
│ │ │ │ -
586 {
│ │ │ │ -
587 //removeMesh();
│ │ │ │ -
588
│ │ │ │ -
589 if( filename.size() <= 0 )
│ │ │ │ -
590 return false;
│ │ │ │ -
591
│ │ │ │ -
592 numBoundarySegments_ = mesh_.read( filename, time );
│ │ │ │ -
593 if( !mesh_ )
│ │ │ │ -
594 DUNE_THROW( AlbertaIOError, "Could not read grid file: " << filename << "." );
│ │ │ │ -
595
│ │ │ │ -
596 setup();
│ │ │ │ -
597 hIndexSet_.read( filename );
│ │ │ │ -
598
│ │ │ │ -
599 // calc maxlevel and indexOnLevel and so on
│ │ │ │ -
600 calcExtras();
│ │ │ │ -
601
│ │ │ │ -
602 return true;
│ │ │ │ -
603 }
│ │ │ │ -
│ │ │ │ -
604
│ │ │ │ -
605
│ │ │ │ -
606 // AlbertaGrid::AdaptationCallback
│ │ │ │ -
607 // -------------------------------
│ │ │ │ -
608
│ │ │ │ -
609 template< int dim, int dimworld >
│ │ │ │ -
610 template< class DataHandler >
│ │ │ │ -
611 struct AlbertaGrid< dim, dimworld >::AdaptationCallback
│ │ │ │ -
612 {
│ │ │ │ -
613 static const int dimension = dim;
│ │ │ │ -
614
│ │ │ │ - │ │ │ │ -
616 typedef Alberta::Patch< dimension > Patch;
│ │ │ │ -
617
│ │ │ │ -
618 static DataHandler &getDataHandler ( const DofVectorPointer &dofVector )
│ │ │ │ -
619 {
│ │ │ │ -
620 DataHandler *dataHandler;
│ │ │ │ -
621 if( DofVectorPointer::supportsAdaptationData )
│ │ │ │ -
622 dataHandler = dofVector.getAdaptationData< DataHandler >();
│ │ │ │ -
623 else
│ │ │ │ -
624 dataHandler = (DataHandler *)Alberta::adaptationDataHandler_;
│ │ │ │ -
625 assert( dataHandler != 0 );
│ │ │ │ -
626 return *dataHandler;
│ │ │ │ -
627 }
│ │ │ │ -
628
│ │ │ │ -
629 static void interpolateVector ( const DofVectorPointer &dofVector,
│ │ │ │ -
630 const Patch &patch )
│ │ │ │ -
631 {
│ │ │ │ -
632 DataHandler &dataHandler = getDataHandler( dofVector );
│ │ │ │ -
633 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ -
634 dataHandler.prolongLocal( patch, i );
│ │ │ │ -
635 }
│ │ │ │ -
636
│ │ │ │ -
637 static void restrictVector ( const DofVectorPointer &dofVector,
│ │ │ │ -
638 const Patch &patch )
│ │ │ │ -
639 {
│ │ │ │ -
640 DataHandler &dataHandler = getDataHandler( dofVector );
│ │ │ │ -
641 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ -
642 dataHandler.restrictLocal( patch, i );
│ │ │ │ -
643 }
│ │ │ │ -
644 };
│ │ │ │ -
645
│ │ │ │ -
646} // namespace Dune
│ │ │ │ -
647
│ │ │ │ -
648#endif
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef typename Base::Entity Entity;
│ │ │ │ + │ │ │ │ +
30
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
32 {}
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ │ +
36 : Base( grid, level )
│ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 const MarkerVector *vec,
│ │ │ │ +
42 int level )
│ │ │ │ +
43 : Base( grid, vec, level )
│ │ │ │ +
44 {}
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
47 void increment ()
│ │ │ │ +
48 {
│ │ │ │ + │ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51 };
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
53
│ │ │ │ +
54 template< int codim, class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ │ +
57 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
60
│ │ │ │ +
61 public:
│ │ │ │ +
62 typedef typename Base::Entity Entity;
│ │ │ │ + │ │ │ │ +
64
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 {}
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
69 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ │ +
70 : Base( grid, level )
│ │ │ │ +
71 {}
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 const MarkerVector *,
│ │ │ │ +
76 int level )
│ │ │ │ +
77 : Base( grid, level )
│ │ │ │ +
78 {}
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
81 void increment ()
│ │ │ │ +
82 {
│ │ │ │ + │ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85 };
│ │ │ │ +
│ │ │ │ +
86}
│ │ │ │ +
87
│ │ │ │ +
88#endif // #if HAVE_ALBERTA
│ │ │ │ +
89
│ │ │ │ +
90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ +
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
static void checkAlbertaDimensions()
Definition albertagrid.cc:29
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ -
static void * adaptationDataHandler_
Definition albertagrid.cc:24
│ │ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │ -
static std::string typeName()
Definition agrid.hh:416
│ │ │ │ -
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │ -
bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition albertagrid.cc:385
│ │ │ │ -
Definition albertagrid/datahandle.hh:27
│ │ │ │ -
unsigned int create(const MacroData< dim > &macroData)
Definition meshpointer.hh:299
│ │ │ │ -
Definition dofvector.hh:179
│ │ │ │ - │ │ │ │ -
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ -
void create()
Definition indexsets.cc:140
│ │ │ │ -
Definition albertagrid/indexsets.hh:335
│ │ │ │ -
Definition albertagrid/gridfamily.hh:98
│ │ │ │ -
Definition albertagrid/gridfamily.hh:117
│ │ │ │ -
Definition macrodata.hh:30
│ │ │ │ -
Definition misc.hh:32
│ │ │ │ -
Definition misc.hh:36
│ │ │ │ -
Definition albertagrid/projection.hh:80
│ │ │ │ -
Definition albertagrid/projection.hh:163
│ │ │ │ -
Definition refinement.hh:40
│ │ │ │ +
Definition treeiterator.hh:189
│ │ │ │ +
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ │ +
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ │ +
void increment()
increment
Definition treeiterator.hh:411
│ │ │ │ +
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ │ +
Definition leveliterator.hh:23
│ │ │ │ +
Base::MarkerVector MarkerVector
Definition leveliterator.hh:29
│ │ │ │ +
AlbertaGridLevelIterator()
Definition leveliterator.hh:31
│ │ │ │ +
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition leveliterator.hh:40
│ │ │ │ +
Base::Entity Entity
Definition leveliterator.hh:28
│ │ │ │ +
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leveliterator.hh:35
│ │ │ │ +
void increment()
increment the iterator
Definition leveliterator.hh:47
│ │ │ │ + │ │ │ │ + │ │ │ │ +
void increment()
increment the iterator
Definition leveliterator.hh:81
│ │ │ │ +
Base::Entity Entity
Definition leveliterator.hh:62
│ │ │ │ +
Base::MarkerVector MarkerVector
Definition leveliterator.hh:63
│ │ │ │ +
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leveliterator.hh:69
│ │ │ │ +
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition leveliterator.hh:74
│ │ │ │
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,752 +1,175 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -albertagrid.cc │ │ │ │ │ +leveliterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTAGRID_CC │ │ │ │ │ -_6#define DUNE_ALBERTAGRID_CC │ │ │ │ │ +5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8//************************************************************************ │ │ │ │ │ -9// │ │ │ │ │ -10// implementation of AlbertaGrid │ │ │ │ │ -11// │ │ │ │ │ -12// namespace Dune │ │ │ │ │ -13// │ │ │ │ │ -14//************************************************************************ │ │ │ │ │ -15#include "_g_e_o_m_e_t_r_y_._c_c" │ │ │ │ │ -16#include "_e_n_t_i_t_y_._c_c" │ │ │ │ │ -17#include "_i_n_t_e_r_s_e_c_t_i_o_n_._c_c" │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 │ │ │ │ │ -_2_2 namespace Alberta │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12#if HAVE_ALBERTA │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 // AlbertaGridLevelIterator │ │ │ │ │ +18 // ------------------------ │ │ │ │ │ +19 │ │ │ │ │ +20 template< int codim, PartitionIteratorType pitype, class GridImp > │ │ │ │ │ +_2_1 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +22 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, false > │ │ │ │ │ 23 { │ │ │ │ │ -_2_4 static void *_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__; │ │ │ │ │ -25 } │ │ │ │ │ +24 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ +25 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _> _B_a_s_e; │ │ │ │ │ 26 │ │ │ │ │ -27 │ │ │ │ │ -28 template< int dim, int dimworld > │ │ │ │ │ -_2_9 static void _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s () │ │ │ │ │ -30 { │ │ │ │ │ -31 // If this check fails, define ALBERTA_DIM accordingly │ │ │ │ │ -32 static_assert((dimworld == _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d), │ │ │ │ │ -33 "Template Parameter dimworld does not match " │ │ │ │ │ -34 "ALBERTA's DIM_OF_WORLD setting."); │ │ │ │ │ -35 } │ │ │ │ │ -36 │ │ │ │ │ -37 │ │ │ │ │ -38 // AlbertaGrid │ │ │ │ │ -39 // ----------- │ │ │ │ │ -40 │ │ │ │ │ -41 template< int dim, int dimworld > │ │ │ │ │ -_4_2 inline _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_A_l_b_e_r_t_a_G_r_i_d () │ │ │ │ │ -43 : mesh_(), │ │ │ │ │ -44 maxlevel_( 0 ), │ │ │ │ │ -45 numBoundarySegments_( 0 ), │ │ │ │ │ -46 hIndexSet_( dofNumbering_ ), │ │ │ │ │ -47 idSet_( hIndexSet_ ), │ │ │ │ │ -48 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ -49 leafIndexSet_( 0 ), │ │ │ │ │ -50 sizeCache_( *_t_h_i_s ), │ │ │ │ │ -51 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ -52 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ -53 { │ │ │ │ │ -54 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_>(); │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 │ │ │ │ │ -58 template< int dim, int dimworld > │ │ │ │ │ -59 template< class Proj, class Impl > │ │ │ │ │ -60 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_6_1_ _:_:_A_l_b_e_r_t_a_G_r_i_d ( const _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_> &_m_a_c_r_o_D_a_t_a, │ │ │ │ │ -62 const _A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory ) │ │ │ │ │ -63 : mesh_(), │ │ │ │ │ -64 maxlevel_( 0 ), │ │ │ │ │ -65 numBoundarySegments_( 0 ), │ │ │ │ │ -66 hIndexSet_( dofNumbering_ ), │ │ │ │ │ -67 idSet_( hIndexSet_ ), │ │ │ │ │ -68 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ -69 leafIndexSet_ ( 0 ), │ │ │ │ │ -70 sizeCache_( *_t_h_i_s ), │ │ │ │ │ -71 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ -72 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ -73 { │ │ │ │ │ -74 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>(); │ │ │ │ │ -75 │ │ │ │ │ -76 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_D_a_t_a, projectionFactory ); │ │ │ │ │ -77 if( !mesh_ ) │ │ │ │ │ -78 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_E_r_r_o_r, "Invalid macro data structure." ); │ │ │ │ │ +27 public: │ │ │ │ │ +_2_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_2_9 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ +30 │ │ │ │ │ +_3_1 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r () │ │ │ │ │ +32 {} │ │ │ │ │ +33 │ │ │ │ │ +_3_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ +36 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ +37 {} │ │ │ │ │ +38 │ │ │ │ │ +_4_0 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +41 const _M_a_r_k_e_r_V_e_c_t_o_r *vec, │ │ │ │ │ +42 int _l_e_v_e_l ) │ │ │ │ │ +43 : _B_a_s_e( _g_r_i_d, vec, _l_e_v_e_l ) │ │ │ │ │ +44 {} │ │ │ │ │ +45 │ │ │ │ │ +_4_7 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +48 { │ │ │ │ │ +49 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ +50 } │ │ │ │ │ +51 }; │ │ │ │ │ +52 │ │ │ │ │ +53 │ │ │ │ │ +54 template< int codim, class GridImp > │ │ │ │ │ +_5_5 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r< codim, _G_h_o_s_t___P_a_r_t_i_t_i_o_n, GridImp > │ │ │ │ │ +56 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, false > │ │ │ │ │ +57 { │ │ │ │ │ +58 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ +59 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _> _B_a_s_e; │ │ │ │ │ +60 │ │ │ │ │ +61 public: │ │ │ │ │ +_6_2 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_6_3 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ +64 │ │ │ │ │ +_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r () │ │ │ │ │ +66 {} │ │ │ │ │ +67 │ │ │ │ │ +_6_9 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ +70 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ +71 {} │ │ │ │ │ +72 │ │ │ │ │ +_7_4 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +75 const _M_a_r_k_e_r_V_e_c_t_o_r *, │ │ │ │ │ +76 int _l_e_v_e_l ) │ │ │ │ │ +77 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ +78 {} │ │ │ │ │ 79 │ │ │ │ │ -80 setup(); │ │ │ │ │ -81 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ -82 │ │ │ │ │ -83 calcExtras(); │ │ │ │ │ +_8_1 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +82 { │ │ │ │ │ +83 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ 84 } │ │ │ │ │ -85 │ │ │ │ │ -86 │ │ │ │ │ -87 template< int dim, int dimworld > │ │ │ │ │ -88 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_8_9_ _:_:_A_l_b_e_r_t_a_G_r_i_d ( const _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_> &_m_a_c_r_o_D_a_t_a, │ │ │ │ │ -90 const std::shared_ptr< _D_u_n_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_w_o_r_l_d_ _> > │ │ │ │ │ -&projection ) │ │ │ │ │ -91 : mesh_(), │ │ │ │ │ -92 maxlevel_( 0 ), │ │ │ │ │ -93 numBoundarySegments_( 0 ), │ │ │ │ │ -94 hIndexSet_( dofNumbering_ ), │ │ │ │ │ -95 idSet_( hIndexSet_ ), │ │ │ │ │ -96 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ -97 leafIndexSet_ ( 0 ), │ │ │ │ │ -98 sizeCache_( *_t_h_i_s ), │ │ │ │ │ -99 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ -100 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ -101 { │ │ │ │ │ -102 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>(); │ │ │ │ │ -103 │ │ │ │ │ -104 if( projection != 0 ) │ │ │ │ │ -105 { │ │ │ │ │ -106 _A_l_b_e_r_t_a_:_:_D_u_n_e_G_l_o_b_a_l_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_e_n_s_i_o_n_ _> projectionFactory │ │ │ │ │ -( projection ); │ │ │ │ │ -107 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_D_a_t_a, projectionFactory ); │ │ │ │ │ -108 } │ │ │ │ │ -109 else │ │ │ │ │ -110 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_D_a_t_a ); │ │ │ │ │ -111 if( !mesh_ ) │ │ │ │ │ -112 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_E_r_r_o_r, "Invalid macro data structure." ); │ │ │ │ │ -113 │ │ │ │ │ -114 setup(); │ │ │ │ │ -115 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ -116 │ │ │ │ │ -117 calcExtras(); │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120 │ │ │ │ │ -121 template < int dim, int dimworld > │ │ │ │ │ -122 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_1_2_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d ( const std::string &_m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e ) │ │ │ │ │ -124 : mesh_(), │ │ │ │ │ -125 maxlevel_( 0 ), │ │ │ │ │ -126 hIndexSet_( dofNumbering_ ), │ │ │ │ │ -127 idSet_( hIndexSet_ ), │ │ │ │ │ -128 levelIndexVec_( (_s_i_z_e___t)MAXL, 0 ), │ │ │ │ │ -129 leafIndexSet_ ( 0 ), │ │ │ │ │ -130 sizeCache_( *_t_h_i_s ), │ │ │ │ │ -131 leafMarkerVector_( dofNumbering_ ), │ │ │ │ │ -132 levelMarkerVector_( (_s_i_z_e___t)MAXL, _M_a_r_k_e_r_V_e_c_t_o_r( dofNumbering_ ) ) │ │ │ │ │ -133 { │ │ │ │ │ -134 _c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>(); │ │ │ │ │ -135 │ │ │ │ │ -136 numBoundarySegments_ = mesh_._c_r_e_a_t_e( _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e ); │ │ │ │ │ -137 if( !mesh_ ) │ │ │ │ │ -138 { │ │ │ │ │ -139 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_I_O_E_r_r_o_r, │ │ │ │ │ -140 "Grid file '" << _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e │ │ │ │ │ -141 << "' is not in ALBERTA macro triangulation format." ); │ │ │ │ │ -142 } │ │ │ │ │ -143 │ │ │ │ │ -144 setup(); │ │ │ │ │ -145 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ -146 │ │ │ │ │ -147 calcExtras(); │ │ │ │ │ -148 │ │ │ │ │ -149 std::cout << _t_y_p_e_N_a_m_e() << " created from macro grid file '" │ │ │ │ │ -150 << _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e << "'." << std::endl; │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -153 │ │ │ │ │ -154 template< int dim, int dimworld > │ │ │ │ │ -155 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_e_t_u_p () │ │ │ │ │ -156 { │ │ │ │ │ -157 dofNumbering_.create( mesh_ ); │ │ │ │ │ -158 │ │ │ │ │ -159 levelProvider_.create( dofNumbering_ ); │ │ │ │ │ -160 │ │ │ │ │ -161#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -162 coordCache_.create( dofNumbering_ ); │ │ │ │ │ -163#endif │ │ │ │ │ -164 } │ │ │ │ │ -165 │ │ │ │ │ -166 │ │ │ │ │ -167 template< int dim, int dimworld > │ │ │ │ │ -168 inline void AlbertaGrid< dim, dimworld >::removeMesh () │ │ │ │ │ -169 { │ │ │ │ │ -170 for( size_t i = 0; i < levelIndexVec_.size(); ++i ) │ │ │ │ │ -171 { │ │ │ │ │ -172 if( levelIndexVec_[ i ] != 0 ) │ │ │ │ │ -173 delete levelIndexVec_[ i ]; │ │ │ │ │ -174 levelIndexVec_[ i ] = 0; │ │ │ │ │ -175 } │ │ │ │ │ -176 │ │ │ │ │ -177 if( leafIndexSet_ != 0 ) │ │ │ │ │ -178 delete leafIndexSet_; │ │ │ │ │ -179 leafIndexSet_ = 0; │ │ │ │ │ -180 │ │ │ │ │ -181 // release dof vectors │ │ │ │ │ -182 hIndexSet_.release(); │ │ │ │ │ -183 levelProvider_.release(); │ │ │ │ │ -184#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -185 coordCache_.release(); │ │ │ │ │ -186#endif │ │ │ │ │ -187 dofNumbering_.release(); │ │ │ │ │ -188 │ │ │ │ │ -189 sizeCache_.reset(); │ │ │ │ │ -190 │ │ │ │ │ -191 mesh_.release(); │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -194 │ │ │ │ │ -195 template< int dim, int dimworld > │ │ │ │ │ -_1_9_6 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_~_A_l_b_e_r_t_a_G_r_i_d () │ │ │ │ │ -197 { │ │ │ │ │ -198 removeMesh(); │ │ │ │ │ -199 } │ │ │ │ │ -200 │ │ │ │ │ -201 │ │ │ │ │ -202 template< int dim, int dimworld > │ │ │ │ │ -203 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ -204 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -205 ::template Codim< codim >::template Partition::LevelIterator │ │ │ │ │ -_2_0_6 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_b_e_g_i_n ( int level ) const │ │ │ │ │ -207 { │ │ │ │ │ -208 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ -LevelIteratorImp; │ │ │ │ │ -209 _a_s_s_e_r_t( level >= 0 ); │ │ │ │ │ -210 │ │ │ │ │ -211 if( level > maxlevel_ ) │ │ │ │ │ -212 return _l_e_n_d_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_ _>( level ); │ │ │ │ │ -213 _M_a_r_k_e_r_V_e_c_t_o_r &_m_a_r_k_e_r_V_e_c_t_o_r = levelMarkerVector_[ level ]; │ │ │ │ │ -214 │ │ │ │ │ -215 if( (_c_o_d_i_m > 0) && !_m_a_r_k_e_r_V_e_c_t_o_r.up2Date() ) │ │ │ │ │ -216 _m_a_r_k_e_r_V_e_c_t_o_r.template _m_a_r_k_S_u_b_E_n_t_i_t_i_e_s_<_ _1_ _>( _l_b_e_g_i_n_<_ _0_ _>( level ), _l_e_n_d_<_ _0_ _> │ │ │ │ │ -( level ) ); │ │ │ │ │ -217 │ │ │ │ │ -218 return LevelIteratorImp( *this, &_m_a_r_k_e_r_V_e_c_t_o_r, level ); │ │ │ │ │ -219 } │ │ │ │ │ -220 │ │ │ │ │ -221 │ │ │ │ │ -222 template< int dim, int dimworld > │ │ │ │ │ -223 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ -224 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -225 ::template Codim< codim >::template Partition< pitype >::LevelIterator │ │ │ │ │ -_2_2_6 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_n_d ( int level ) const │ │ │ │ │ -227 { │ │ │ │ │ -228 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ -LevelIteratorImp; │ │ │ │ │ -229 _a_s_s_e_r_t( level >= 0 ); │ │ │ │ │ -230 │ │ │ │ │ -231 return LevelIteratorImp( *this, level ); │ │ │ │ │ -232 } │ │ │ │ │ -233 │ │ │ │ │ -234 │ │ │ │ │ -235 template< int dim, int dimworld > │ │ │ │ │ -236 template< int codim > │ │ │ │ │ -237 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -238 ::template Codim< codim >::LevelIterator │ │ │ │ │ -_2_3_9 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_b_e_g_i_n ( int level ) const │ │ │ │ │ -240 { │ │ │ │ │ -241 return _l_b_e_g_i_n_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level ); │ │ │ │ │ -242 } │ │ │ │ │ -243 │ │ │ │ │ -244 │ │ │ │ │ -245 template< int dim, int dimworld > │ │ │ │ │ -246 template< int codim > │ │ │ │ │ -247 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -248 ::template Codim< codim >::LevelIterator │ │ │ │ │ -_2_4_9 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_n_d ( int level ) const │ │ │ │ │ -250 { │ │ │ │ │ -251 return _l_e_n_d_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level ); │ │ │ │ │ -252 } │ │ │ │ │ -253 │ │ │ │ │ -254 │ │ │ │ │ -255 template< int dim, int dimworld > │ │ │ │ │ -256 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ -257 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -258 ::template Codim< codim >::template Partition< pitype >::LeafIterator │ │ │ │ │ -_2_5_9 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_b_e_g_i_n () const │ │ │ │ │ -260 { │ │ │ │ │ -261 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ -LeafIteratorImp; │ │ │ │ │ -262 │ │ │ │ │ -263 _M_a_r_k_e_r_V_e_c_t_o_r &_m_a_r_k_e_r_V_e_c_t_o_r = leafMarkerVector_; │ │ │ │ │ -264 const int _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m = 2; │ │ │ │ │ -265 if( (_c_o_d_i_m >= _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m) && !_m_a_r_k_e_r_V_e_c_t_o_r.up2Date() ) │ │ │ │ │ -266 _m_a_r_k_e_r_V_e_c_t_o_r.template _m_a_r_k_S_u_b_E_n_t_i_t_i_e_s_<_ _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m_ _>( _l_e_a_f_b_e_g_i_n_<_ _0_ _> │ │ │ │ │ -(), _l_e_a_f_e_n_d_<_ _0_ _>() ); │ │ │ │ │ -267 │ │ │ │ │ -268 return LeafIteratorImp( *this, &_m_a_r_k_e_r_V_e_c_t_o_r, maxlevel_ ); │ │ │ │ │ -269 } │ │ │ │ │ -_2_7_0 │ │ │ │ │ -271 │ │ │ │ │ -272 template< int dim, int dimworld > │ │ │ │ │ -273 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ -274 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -275 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_t_e_m_p_l_a_t_e Partition< pitype >::LeafIterator │ │ │ │ │ -_2_7_6 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_e_n_d () const │ │ │ │ │ -_2_7_7 { │ │ │ │ │ -278 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ │ -LeafIteratorImp; │ │ │ │ │ -279 return LeafIteratorImp( *this, maxlevel_ ); │ │ │ │ │ -280 } │ │ │ │ │ -281 │ │ │ │ │ -_2_8_2 │ │ │ │ │ -283 template< int dim, int dimworld > │ │ │ │ │ -284 template< int codim > │ │ │ │ │ -285 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_d_i_m_,_d_i_m_w_o_r_l_d_>_:_:_T_r_a_i_t_s │ │ │ │ │ -286 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -_2_8_7 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_b_e_g_i_n () const │ │ │ │ │ -288 { │ │ │ │ │ -_2_8_9 return _l_e_a_f_b_e_g_i_n_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ -290 } │ │ │ │ │ -291 │ │ │ │ │ -_2_9_2 │ │ │ │ │ -293 template< int dim, int dimworld > │ │ │ │ │ -294 template< int codim > │ │ │ │ │ -295 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -_2_9_6 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -_2_9_7 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_e_n_d () const │ │ │ │ │ -298 { │ │ │ │ │ -299 return _l_e_a_f_e_n_d_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ -300 } │ │ │ │ │ -301 │ │ │ │ │ -302 │ │ │ │ │ -303 template< int dim, int dimworld > │ │ │ │ │ -_3_0_4 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_g_l_o_b_a_l_R_e_f_i_n_e ( int refCount ) │ │ │ │ │ -305 { │ │ │ │ │ -306 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r LeafIterator; │ │ │ │ │ -307 │ │ │ │ │ -308 // only MAXL levels allowed │ │ │ │ │ -309 _a_s_s_e_r_t( (refCount >= 0) && (refCount + maxlevel_ < MAXL) ); │ │ │ │ │ -310 │ │ │ │ │ -311 for( int i = 0; i < refCount; ++i ) │ │ │ │ │ -312 { │ │ │ │ │ -313 // mark all interior elements │ │ │ │ │ -314 const LeafIterator _e_n_d_i_t = _l_e_a_f_e_n_d_<_ _0_ _>(); │ │ │ │ │ -315 for( LeafIterator _i_t = _l_e_a_f_b_e_g_i_n_<_ _0_ _>(); _i_t != _e_n_d_i_t; ++_i_t ) │ │ │ │ │ -316 mark( 1, *_i_t ); │ │ │ │ │ -317 │ │ │ │ │ -318 preAdapt(); │ │ │ │ │ -319 adapt(); │ │ │ │ │ -320 postAdapt(); │ │ │ │ │ -321 } │ │ │ │ │ -322 } │ │ │ │ │ -323 │ │ │ │ │ -324 │ │ │ │ │ -325 template< int dim, int dimworld > │ │ │ │ │ -326 template< class DataHandle > │ │ │ │ │ -327 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_3_2_8_ _:_:_g_l_o_b_a_l_R_e_f_i_n_e ( int refCount, _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> │ │ │ │ │ -&_h_a_n_d_l_e ) │ │ │ │ │ -329 { │ │ │ │ │ -330 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r LeafIterator; │ │ │ │ │ -331 │ │ │ │ │ -332 // only MAXL levels allowed │ │ │ │ │ -333 _a_s_s_e_r_t( (refCount >= 0) && (refCount + maxlevel_ < MAXL) ); │ │ │ │ │ -334 │ │ │ │ │ -335 for( int i = 0; i < refCount; ++i ) │ │ │ │ │ -336 { │ │ │ │ │ -337 // mark all interior elements │ │ │ │ │ -338 const LeafIterator _e_n_d_i_t = _l_e_a_f_e_n_d_<_ _0_ _>(); │ │ │ │ │ -339 for( LeafIterator _i_t = _l_e_a_f_b_e_g_i_n_<_ _0_ _>(); _i_t != _e_n_d_i_t; ++_i_t ) │ │ │ │ │ -340 mark( 1, *_i_t ); │ │ │ │ │ -341 │ │ │ │ │ -342 adapt( _h_a_n_d_l_e ); │ │ │ │ │ -343 } │ │ │ │ │ -_3_4_4 } │ │ │ │ │ -345 │ │ │ │ │ -346 │ │ │ │ │ -_3_4_7 template< int dim, int dimworld > │ │ │ │ │ -_3_4_8 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_p_r_e_A_d_a_p_t () │ │ │ │ │ -349 { │ │ │ │ │ -_3_5_0 adaptationState_.preAdapt(); │ │ │ │ │ -351 return adaptationState_.coarsen(); │ │ │ │ │ -352 } │ │ │ │ │ -_3_5_3 │ │ │ │ │ -354 │ │ │ │ │ -355 template < int dim, int dimworld > │ │ │ │ │ -_3_5_6 inline void _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_p_o_s_t_A_d_a_p_t () │ │ │ │ │ -357 { │ │ │ │ │ -358#ifndef NDEBUG │ │ │ │ │ -359 if( leafIndexSet_ != 0 ) │ │ │ │ │ -360 { │ │ │ │ │ -361 bool _c_o_n_s_i_s_t_e_n_t = true; │ │ │ │ │ -362 for( int _c_o_d_i_m = 0; _c_o_d_i_m <= dimension; ++_c_o_d_i_m ) │ │ │ │ │ -363 { │ │ │ │ │ -364 if( int(leafIndexSet_->size( _c_o_d_i_m )) == mesh_.size( _c_o_d_i_m ) ) │ │ │ │ │ -365 continue; │ │ │ │ │ -366 std::cerr << "Incorrect size of leaf index set for codimension " │ │ │ │ │ -367 << _c_o_d_i_m << "!" << std::endl; │ │ │ │ │ -368 std::cerr << "DUNE index set reports: " << leafIndexSet_->size( _c_o_d_i_m ) │ │ │ │ │ -369 << std::endl; │ │ │ │ │ -370 std::cerr << "ALBERTA mesh reports: " << mesh_.size( _c_o_d_i_m ) << std::endl; │ │ │ │ │ -371 _c_o_n_s_i_s_t_e_n_t = false; │ │ │ │ │ -372 } │ │ │ │ │ -373 if( !_c_o_n_s_i_s_t_e_n_t ) │ │ │ │ │ -374 _a_b_o_r_t(); │ │ │ │ │ -375 } │ │ │ │ │ -376#endif │ │ │ │ │ -377 │ │ │ │ │ -378 levelProvider_.markAllOld(); │ │ │ │ │ -379 adaptationState_.postAdapt(); │ │ │ │ │ -380 } │ │ │ │ │ -381 │ │ │ │ │ -382 │ │ │ │ │ -383 template< int dim, int dimworld > │ │ │ │ │ -384 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_3_8_5_ _:_:_m_a_r_k( int refCount, const typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_E_n_t_i_t_y &_e │ │ │ │ │ -) │ │ │ │ │ -386 { │ │ │ │ │ -387 // if not leaf entity, leave method │ │ │ │ │ -_3_8_8 if( !_e.isLeaf() ) │ │ │ │ │ -389 return false; │ │ │ │ │ -390 │ │ │ │ │ -_3_9_1 // don't mark macro elements for coarsening │ │ │ │ │ -392 if( refCount < -_e.level() ) │ │ │ │ │ -393 return false; │ │ │ │ │ -_3_9_4 │ │ │ │ │ -395 // take back previous marking │ │ │ │ │ -396 adaptationState_.unmark( getMark( _e ) ); │ │ │ │ │ -_3_9_7 │ │ │ │ │ -398 // set new marking │ │ │ │ │ -399 adaptationState_._m_a_r_k( refCount ); │ │ │ │ │ -400 _e.impl().elementInfo().setMark( refCount ); │ │ │ │ │ -_4_0_1 │ │ │ │ │ -402 return true; │ │ │ │ │ -403 } │ │ │ │ │ -_4_0_4 │ │ │ │ │ -405 │ │ │ │ │ -406 template< int dim, int dimworld > │ │ │ │ │ -_4_0_7 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_4_0_8_ _:_:_g_e_t_M_a_r_k( const typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_E_n_t_i_t_y &_e ) const │ │ │ │ │ -409 { │ │ │ │ │ -410 return _e.impl().elementInfo().getMark(); │ │ │ │ │ -411 } │ │ │ │ │ -412 │ │ │ │ │ -413 │ │ │ │ │ -414 template< int dim, int dimworld > │ │ │ │ │ -_4_1_5 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_a_d_a_p_t () │ │ │ │ │ -416 { │ │ │ │ │ -417 // this is already done in postAdapt │ │ │ │ │ -418 //levelProvider_.markAllOld(); │ │ │ │ │ -419 │ │ │ │ │ -420 // adapt mesh │ │ │ │ │ -421 hIndexSet_.preAdapt(); │ │ │ │ │ -422 const bool _r_e_f_i_n_e_d = mesh_.refine(); │ │ │ │ │ -423 const bool _c_o_a_r_s_e_n_e_d = (adaptationState_.coarsen() ? mesh_.coarsen() : │ │ │ │ │ -false); │ │ │ │ │ -424 adaptationState_.adapt(); │ │ │ │ │ -425 hIndexSet_.postAdapt(); │ │ │ │ │ -426 │ │ │ │ │ -427 if( _r_e_f_i_n_e_d || _c_o_a_r_s_e_n_e_d ) │ │ │ │ │ -428 calcExtras(); │ │ │ │ │ -429 │ │ │ │ │ -430 // return true if elements were created │ │ │ │ │ -431 return _r_e_f_i_n_e_d; │ │ │ │ │ -432 } │ │ │ │ │ -433 │ │ │ │ │ -434 │ │ │ │ │ -435 template< int dim, int dimworld > │ │ │ │ │ -_4_3_6 template< class DataHandle > │ │ │ │ │ -437 inline bool _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_4_3_8 ::adapt ( _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> &_h_a_n_d_l_e ) │ │ │ │ │ -_4_3_9 { │ │ │ │ │ -440 preAdapt(); │ │ │ │ │ -441 │ │ │ │ │ -442 typedef _A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ -443 < _T_h_i_s, _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> > │ │ │ │ │ -444 _D_a_t_a_H_a_n_d_l_e_r; │ │ │ │ │ -_4_4_5 _D_a_t_a_H_a_n_d_l_e_r _d_a_t_a_H_a_n_d_l_e_r( *this, _h_a_n_d_l_e ); │ │ │ │ │ -446 │ │ │ │ │ -447 typedef _A_d_a_p_t_a_t_i_o_n_C_a_l_l_b_a_c_k_<_ _D_a_t_a_H_a_n_d_l_e_r_ _> _C_a_l_l_b_a_c_k; │ │ │ │ │ -_4_4_8 typename Callback::DofVectorPointer _c_a_l_l_b_a_c_k_V_e_c_t_o_r; │ │ │ │ │ -449 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.create( dofNumbering_.emptyDofSpace(), "Adaptation Callback" │ │ │ │ │ -); │ │ │ │ │ -450 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.template _s_e_t_u_p_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _C_a_l_l_b_a_c_k_ _>(); │ │ │ │ │ -451 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.template _s_e_t_u_p_R_e_s_t_r_i_c_t_i_o_n_<_ _C_a_l_l_b_a_c_k_ _>(); │ │ │ │ │ -452 if( Callback::DofVectorPointer::supportsAdaptationData ) │ │ │ │ │ -453 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.setAdaptationData( &_d_a_t_a_H_a_n_d_l_e_r ); │ │ │ │ │ -454 else │ │ │ │ │ -455 Alberta::adaptationDataHandler_ = &_d_a_t_a_H_a_n_d_l_e_r; │ │ │ │ │ -456 │ │ │ │ │ -457 bool _r_e_f_i_n_e_d = adapt(); │ │ │ │ │ -458 │ │ │ │ │ -459 if( !Callback::DofVectorPointer::supportsAdaptationData ) │ │ │ │ │ -460 Alberta::adaptationDataHandler_ = 0; │ │ │ │ │ -461 _c_a_l_l_b_a_c_k_V_e_c_t_o_r.release(); │ │ │ │ │ -462 │ │ │ │ │ -463 postAdapt(); │ │ │ │ │ -464 return _r_e_f_i_n_e_d; │ │ │ │ │ -465 } │ │ │ │ │ -466 │ │ │ │ │ -467 │ │ │ │ │ -468 template< int dim, int dimworld > │ │ │ │ │ -469 inline const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r & │ │ │ │ │ -470 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_4_7_1_ _:_:_g_e_t_C_o_o_r_d ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int vertex ) const │ │ │ │ │ -472 { │ │ │ │ │ -473 _a_s_s_e_r_t( (vertex >= 0) && (vertex <= dim) ); │ │ │ │ │ -474#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -475 return _c_o_o_r_d_C_a_c_h_e__( elementInfo, vertex ); │ │ │ │ │ -476#else │ │ │ │ │ -477 return elementInfo._c_o_o_r_d_i_n_a_t_e( vertex ); │ │ │ │ │ -478#endif │ │ │ │ │ -479 } │ │ │ │ │ -480 │ │ │ │ │ -481 │ │ │ │ │ -482 template < int dim, int dimworld > │ │ │ │ │ -_4_8_3 inline int _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_m_a_x_L_e_v_e_l() const │ │ │ │ │ -484 { │ │ │ │ │ -485 return maxlevel_; │ │ │ │ │ -486 } │ │ │ │ │ -487 │ │ │ │ │ -488 │ │ │ │ │ -489 template< int dim, int dimworld > │ │ │ │ │ -_4_9_0 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int level, int _c_o_d_i_m ) │ │ │ │ │ -const │ │ │ │ │ -491 { │ │ │ │ │ -492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, │ │ │ │ │ -_c_o_d_i_m ) : 0); │ │ │ │ │ -493 } │ │ │ │ │ -494 │ │ │ │ │ -495 │ │ │ │ │ -496 template< int dim, int dimworld > │ │ │ │ │ -_4_9_7 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int level, GeometryType │ │ │ │ │ -type ) const │ │ │ │ │ -498 { │ │ │ │ │ -499 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, type │ │ │ │ │ -) : 0); │ │ │ │ │ -500 } │ │ │ │ │ -501 │ │ │ │ │ -502 │ │ │ │ │ -503 template< int dim, int dimworld > │ │ │ │ │ -_5_0_4 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int _c_o_d_i_m ) const │ │ │ │ │ -505 { │ │ │ │ │ -506 _a_s_s_e_r_t( sizeCache_.size( _c_o_d_i_m ) == mesh_.size( _c_o_d_i_m ) ); │ │ │ │ │ -507 return mesh_.size( _c_o_d_i_m ); │ │ │ │ │ -508 } │ │ │ │ │ -509 │ │ │ │ │ -510 │ │ │ │ │ -511 template< int dim, int dimworld > │ │ │ │ │ -_5_1_2 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( GeometryType type ) const │ │ │ │ │ -513 { │ │ │ │ │ -514 return sizeCache_.size( type ); │ │ │ │ │ -515 } │ │ │ │ │ -516 │ │ │ │ │ -517 │ │ │ │ │ -518 template < int dim, int dimworld > │ │ │ │ │ -519 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: │ │ │ │ │ -LevelIndexSet & │ │ │ │ │ -_5_2_0 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> :: levelIndexSet (int level) const │ │ │ │ │ -521 { │ │ │ │ │ -522 // assert that given level is in range │ │ │ │ │ -523 _a_s_s_e_r_t( (level >= 0) && (level < (int)levelIndexVec_.size()) ); │ │ │ │ │ -524 │ │ │ │ │ -525 if( levelIndexVec_[ level ] == 0 ) │ │ │ │ │ -526 { │ │ │ │ │ -527 levelIndexVec_[ level ] = new typename _G_r_i_d_F_a_m_i_l_y_:_:_L_e_v_e_l_I_n_d_e_x_S_e_t_I_m_p │ │ │ │ │ -( dofNumbering_ ); │ │ │ │ │ -528 levelIndexVec_[ level ]->update( _l_b_e_g_i_n_<_ _0_ _>( level ), _l_e_n_d_<_ _0_ _>( level ) │ │ │ │ │ -); │ │ │ │ │ -529 } │ │ │ │ │ -530 return *(levelIndexVec_[ level ]); │ │ │ │ │ -531 } │ │ │ │ │ -532 │ │ │ │ │ -533 template < int dim, int dimworld > │ │ │ │ │ -534 inline const typename AlbertaGrid < dim, dimworld > :: Traits :: │ │ │ │ │ -LeafIndexSet & │ │ │ │ │ -_5_3_5 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> :: leafIndexSet () const │ │ │ │ │ -536 { │ │ │ │ │ -537 if( leafIndexSet_ == 0 ) │ │ │ │ │ -538 { │ │ │ │ │ -539 leafIndexSet_ = new typename _G_r_i_d_F_a_m_i_l_y_:_:_L_e_a_f_I_n_d_e_x_S_e_t_I_m_p( dofNumbering_ ); │ │ │ │ │ -540 leafIndexSet_->update( _l_e_a_f_b_e_g_i_n_<_ _0_ _>(), _l_e_a_f_e_n_d_<_ _0_ _>() ); │ │ │ │ │ -541 } │ │ │ │ │ -542 return *leafIndexSet_; │ │ │ │ │ -543 } │ │ │ │ │ -544 │ │ │ │ │ -545 │ │ │ │ │ -546 template < int dim, int dimworld > │ │ │ │ │ -547 inline void AlbertaGrid < dim, dimworld >::calcExtras () │ │ │ │ │ -548 { │ │ │ │ │ -549 // determine new maxlevel │ │ │ │ │ -550 maxlevel_ = levelProvider_.maxLevel(); │ │ │ │ │ -551 assert( (maxlevel_ >= 0) && (maxlevel_ < MAXL) ); │ │ │ │ │ -552 │ │ │ │ │ -553 // unset up2Dat status, if lbegin is called then this status is updated │ │ │ │ │ -_5_5_4 for( int _l = 0; _l < MAXL; ++_l ) │ │ │ │ │ -555 levelMarkerVector_[ _l ].clear(); │ │ │ │ │ -556 │ │ │ │ │ -557 // unset up2Dat status, if leafbegin is called then this status is updated │ │ │ │ │ -558 leafMarkerVector_.clear(); │ │ │ │ │ -559 │ │ │ │ │ -560 sizeCache_.reset(); │ │ │ │ │ -561 │ │ │ │ │ -562 // update index sets (if they exist) │ │ │ │ │ -563 if( leafIndexSet_ != 0 ) │ │ │ │ │ -564 leafIndexSet_->update( _l_e_a_f_b_e_g_i_n_<_ _0_ _>(), _l_e_a_f_e_n_d_<_ _0_ _>() ); │ │ │ │ │ -565 for( unsigned int level = 0; level < levelIndexVec_.size(); ++level ) │ │ │ │ │ -566 { │ │ │ │ │ -567 if( levelIndexVec_[ level ] ) │ │ │ │ │ -568 levelIndexVec_[ level ]->update( _l_b_e_g_i_n_<_ _0_ _>( level ), _l_e_n_d_<_ _0_ _>( level ) │ │ │ │ │ -); │ │ │ │ │ -569 } │ │ │ │ │ -570 } │ │ │ │ │ -571 │ │ │ │ │ -572 │ │ │ │ │ -573 template< int dim, int dimworld > │ │ │ │ │ -574 inline bool AlbertaGrid< dim, dimworld > │ │ │ │ │ -_5_7_5 ::writeGrid ( const std::string &filename, _c_t_y_p_e _t_i_m_e ) const │ │ │ │ │ -576 { │ │ │ │ │ -577 if( filename.size() <= 0 ) │ │ │ │ │ -578 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_I_O_E_r_r_o_r, "No filename given to writeGridXdr." ); │ │ │ │ │ -579 return (mesh_.write( filename, _t_i_m_e ) && hIndexSet_.write( filename )); │ │ │ │ │ -580 } │ │ │ │ │ -581 │ │ │ │ │ -582 │ │ │ │ │ -583 template< int dim, int dimworld > │ │ │ │ │ -584 inline bool _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_5_8_5_ _:_:_r_e_a_d_G_r_i_d ( const std::string &filename, _c_t_y_p_e &_t_i_m_e ) │ │ │ │ │ -586 { │ │ │ │ │ -587 //removeMesh(); │ │ │ │ │ -588 │ │ │ │ │ -589 if( filename.size() <= 0 ) │ │ │ │ │ -590 return false; │ │ │ │ │ -591 │ │ │ │ │ -592 numBoundarySegments_ = mesh_.read( filename, _t_i_m_e ); │ │ │ │ │ -593 if( !mesh_ ) │ │ │ │ │ -594 _D_U_N_E___T_H_R_O_W( _A_l_b_e_r_t_a_I_O_E_r_r_o_r, "Could not read grid file: " << filename << "." │ │ │ │ │ -); │ │ │ │ │ -595 │ │ │ │ │ -596 setup(); │ │ │ │ │ -597 hIndexSet_.read( filename ); │ │ │ │ │ -598 │ │ │ │ │ -599 // calc maxlevel and indexOnLevel and so on │ │ │ │ │ -600 calcExtras(); │ │ │ │ │ -601 │ │ │ │ │ -602 return true; │ │ │ │ │ -603 } │ │ │ │ │ -604 │ │ │ │ │ -605 │ │ │ │ │ -606 // AlbertaGrid::AdaptationCallback │ │ │ │ │ -607 // ------------------------------- │ │ │ │ │ -608 │ │ │ │ │ -609 template< int dim, int dimworld > │ │ │ │ │ -610 template< class DataHandler > │ │ │ │ │ -611 struct _A_l_b_e_r_t_a_G_r_i_d< dim, dimworld >::AdaptationCallback │ │ │ │ │ -612 { │ │ │ │ │ -613 static const int dimension = dim; │ │ │ │ │ -614 │ │ │ │ │ -615 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ │ -DofVectorPointer; │ │ │ │ │ -616 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> Patch; │ │ │ │ │ -617 │ │ │ │ │ -618 static DataHandler &getDataHandler ( const DofVectorPointer &dofVector ) │ │ │ │ │ -619 { │ │ │ │ │ -620 DataHandler *dataHandler; │ │ │ │ │ -621 if( DofVectorPointer::supportsAdaptationData ) │ │ │ │ │ -622 dataHandler = dofVector.getAdaptationData< DataHandler >(); │ │ │ │ │ -623 else │ │ │ │ │ -624 dataHandler = (DataHandler *)Alberta::adaptationDataHandler_; │ │ │ │ │ -625 assert( dataHandler != 0 ); │ │ │ │ │ -626 return *dataHandler; │ │ │ │ │ -627 } │ │ │ │ │ -628 │ │ │ │ │ -629 static void interpolateVector ( const DofVectorPointer &dofVector, │ │ │ │ │ -630 const Patch &patch ) │ │ │ │ │ -631 { │ │ │ │ │ -632 DataHandler &dataHandler = getDataHandler( dofVector ); │ │ │ │ │ -633 for( int i = 0; i < patch.count(); ++i ) │ │ │ │ │ -634 dataHandler.prolongLocal( patch, i ); │ │ │ │ │ -635 } │ │ │ │ │ -636 │ │ │ │ │ -637 static void restrictVector ( const DofVectorPointer &dofVector, │ │ │ │ │ -638 const Patch &patch ) │ │ │ │ │ -639 { │ │ │ │ │ -640 DataHandler &dataHandler = getDataHandler( dofVector ); │ │ │ │ │ -641 for( int i = 0; i < patch.count(); ++i ) │ │ │ │ │ -642 dataHandler.restrictLocal( patch, i ); │ │ │ │ │ -643 } │ │ │ │ │ -644 }; │ │ │ │ │ -645 │ │ │ │ │ -646} // namespace Dune │ │ │ │ │ -647 │ │ │ │ │ -648#endif │ │ │ │ │ -_g_e_o_m_e_t_r_y_._c_c │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._c_c │ │ │ │ │ -_e_n_t_i_t_y_._c_c │ │ │ │ │ +85 }; │ │ │ │ │ +86} │ │ │ │ │ +87 │ │ │ │ │ +88#endif // #if HAVE_ALBERTA │ │ │ │ │ +89 │ │ │ │ │ +90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ +_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Ghost_Partition │ │ │ │ │ +only ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s │ │ │ │ │ -static void checkAlbertaDimensions() │ │ │ │ │ -DDeeffiinniittiioonn albertagrid.cc:29 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__ │ │ │ │ │ -static void * adaptationDataHandler_ │ │ │ │ │ -DDeeffiinniittiioonn albertagrid.cc:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ -[ provides Dune::Grid ] │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_t_y_p_e_N_a_m_e │ │ │ │ │ -static std::string typeName() │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:416 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ -GridFamily::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:143 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_m_a_r_k │ │ │ │ │ -bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e) │ │ │ │ │ -Marks an entity to be refined/coarsened in a subsequent adapt. │ │ │ │ │ -DDeeffiinniittiioonn albertagrid.cc:385 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/datahandle.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -unsigned int create(const MacroData< dim > ¯oData) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -const GlobalVector & coordinate(int vertex) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t_:_:_c_r_e_a_t_e │ │ │ │ │ -void create() │ │ │ │ │ -DDeeffiinniittiioonn indexsets.cc:140 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_d_e_x_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/indexsets.hh:335 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/gridfamily.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/gridfamily.hh:117 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_G_l_o_b_a_l_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +ask for level of entities │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_g_r_i_d │ │ │ │ │ +const GridImp & grid() const │ │ │ │ │ +obtain a reference to the grid │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +Base::MarkerVector MarkerVector │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLevelIterator() │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int │ │ │ │ │ +level) │ │ │ │ │ +Constructor making begin iterator. │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLevelIterator(const GridImp &grid, int level) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment the iterator │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLevelIterator() │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment the iterator │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +Base::MarkerVector MarkerVector │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLevelIterator(const GridImp &grid, int level) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level) │ │ │ │ │ +Constructor making begin iterator (which is the end iterator in this case) │ │ │ │ │ +DDeeffiinniittiioonn leveliterator.hh:74 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ marker assigning subentities to one element containing them │ │ │ │ │ DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: elementinfo.hh File Reference │ │ │ │ +dune-grid: indexstack.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,50 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
elementinfo.hh File Reference
│ │ │ │ +
indexstack.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

provides a wrapper for ALBERTA's el_info structure │ │ │ │ +

Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid) │ │ │ │ More...

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/grid/albertagrid/geometrycache.hh>
│ │ │ │ -#include <dune/grid/albertagrid/macroelement.hh>
│ │ │ │ +
#include <assert.h>
│ │ │ │ +#include <stack>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/reservedvector.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Alberta::ElementInfo< dim >
 
struct  Dune::Alberta::ElementInfo< dim >::Instance
 
class  Dune::Alberta::ElementInfo< dim >::Stack
 
struct  Dune::Alberta::ElementInfo< dim >::Seed
class  Dune::IndexStack< T, length >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │

Detailed Description

│ │ │ │ -

provides a wrapper for ALBERTA's el_info structure

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ +

Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)

│ │ │ │ +
Author
Robert Kloefkorn
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,36 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -elementinfo.hh File Reference │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ +indexstack.hh File Reference │ │ │ │ │ +Provides an index stack that supplies indices for element numbering for a grid │ │ │ │ │ +(i.e. AlbertaGrid and ALUGrid) _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d │ │ │ │ │ +class   _D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_<_ _T_,_ _l_e_n_g_t_h_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ +Provides an index stack that supplies indices for element numbering for a grid │ │ │ │ │ +(i.e. AlbertaGrid and ALUGrid) │ │ │ │ │ Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ + Robert Kloefkorn │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: elementinfo.hh Source File │ │ │ │ +dune-grid: indexstack.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1228 +74,257 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
elementinfo.hh
│ │ │ │ +
indexstack.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │ -
6#define DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │ │ +
6#define DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │ │
7
│ │ │ │ -
13#include <cassert>
│ │ │ │ -
14#include <vector>
│ │ │ │ -
15#include <utility>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20#if HAVE_ALBERTA
│ │ │ │ +
8#include <assert.h>
│ │ │ │ +
9#include <stack>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │ +
12#include <dune/common/reservedvector.hh>
│ │ │ │ +
13
│ │ │ │ +
20namespace Dune {
│ │ │ │
21
│ │ │ │ -
22namespace Dune
│ │ │ │ -
23{
│ │ │ │ -
24
│ │ │ │ -
25 namespace Alberta
│ │ │ │ +
24 template <class T, int length>
│ │ │ │ +
│ │ │ │ + │ │ │ │
26 {
│ │ │ │ -
27
│ │ │ │ -
28 // External Forward Declarations
│ │ │ │ -
29 // -----------------------------
│ │ │ │ -
30
│ │ │ │ -
31 template< int dim >
│ │ │ │ -
32 class MeshPointer;
│ │ │ │ +
27 class MyFiniteStack : public ReservedVector<T,length>
│ │ │ │ +
28 {
│ │ │ │ +
29 typedef ReservedVector<T,length> BaseType ;
│ │ │ │ +
30 public:
│ │ │ │ +
32 bool full () const { return this->size() >= length; }
│ │ │ │
33
│ │ │ │ -
34 struct BasicNodeProjection;
│ │ │ │ -
35
│ │ │ │ +
35 void push( const T& t ) { BaseType :: push_back( t ); }
│ │ │ │
36
│ │ │ │ -
37
│ │ │ │ -
38 // ElementInfo
│ │ │ │ -
39 // -----------
│ │ │ │ -
40
│ │ │ │ -
41 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
43 {
│ │ │ │ -
44 struct Instance;
│ │ │ │ -
45 class Stack;
│ │ │ │ -
46
│ │ │ │ -
47 template< int >
│ │ │ │ -
48 struct Library;
│ │ │ │ -
49
│ │ │ │ -
50 typedef Instance *InstancePtr;
│ │ │ │ -
51
│ │ │ │ -
52 public:
│ │ │ │ -
53 static const int dimension = dim;
│ │ │ │ -
54
│ │ │ │ - │ │ │ │ - │ │ │ │ -
57
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
61
│ │ │ │ -
62 static const int maxNeighbors = N_NEIGH_MAX;
│ │ │ │ -
63
│ │ │ │ -
64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;
│ │ │ │ +
38 T topAndPop ()
│ │ │ │ +
39 {
│ │ │ │ +
40 assert( !this->empty() );
│ │ │ │ +
41 assert( this->size() <= length );
│ │ │ │ +
42 // This code is not slower than using the array structure directly.
│ │ │ │ +
43 // The compiler removes the temporary completely. I measured this.
│ │ │ │ +
44 // See the commit message for revision 7837 for more details.
│ │ │ │ +
45 T tmp = this->back();
│ │ │ │ +
46 this->pop_back();
│ │ │ │ +
47 return tmp;
│ │ │ │ +
48 }
│ │ │ │ +
49 };
│ │ │ │ +
50
│ │ │ │ +
51 typedef MyFiniteStack StackType;
│ │ │ │ +
52 typedef typename std::stack < StackType * > StackListType;
│ │ │ │ +
53
│ │ │ │ +
54 StackListType fullStackList_;
│ │ │ │ +
55 StackListType emptyStackList_;
│ │ │ │ +
56
│ │ │ │ +
57 //typedef typename StackListType::Iterator DListIteratorType;
│ │ │ │ +
58 StackType * stack_;
│ │ │ │ +
59
│ │ │ │ +
60 // current maxIndex
│ │ │ │ +
61 int maxIndex_;
│ │ │ │ +
62 public:
│ │ │ │ +
64 inline IndexStack();
│ │ │ │
65
│ │ │ │ -
66#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ - │ │ │ │ -
68#endif
│ │ │ │ -
69
│ │ │ │ -
70 struct Seed;
│ │ │ │ +
67 inline ~IndexStack ();
│ │ │ │ +
68
│ │ │ │ +
70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ = index;}
│ │ │ │
71
│ │ │ │ -
72 private:
│ │ │ │ -
73 explicit ElementInfo ( const InstancePtr &instance );
│ │ │ │ +
73 inline void setMaxIndex(T index) { maxIndex_ = index; }
│ │ │ │
74
│ │ │ │ -
75 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
78 typename FillFlags::Flags fillFlags = FillFlags::standard );
│ │ │ │ -
│ │ │ │ -
79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,
│ │ │ │ -
80 typename FillFlags::Flags fillFlags = FillFlags::standard );
│ │ │ │ -
│ │ │ │ -
81 ElementInfo ( const ElementInfo &other );
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
76 inline int getMaxIndex() const { return maxIndex_; }
│ │ │ │ +
77
│ │ │ │ +
79 inline int size() const { return getMaxIndex(); }
│ │ │ │ +
80
│ │ │ │ +
82 inline T getIndex ();
│ │ │ │
83
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
85
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
88
│ │ │ │ -
89 explicit operator bool () const { return (instance_ != null()); }
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ -
91 bool operator== ( const ElementInfo &other ) const;
│ │ │ │ -
│ │ │ │ -
92 bool operator!= ( const ElementInfo &other ) const;
│ │ │ │ -
93
│ │ │ │ -
│ │ │ │ -
94 const MacroElement &macroElement () const;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
96 int indexInFather () const;
│ │ │ │ -
│ │ │ │ -
97 ElementInfo child ( int i ) const;
│ │ │ │ -
│ │ │ │ -
98 bool isLeaf () const;
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ -
100 Seed seed () const;
│ │ │ │ -
101
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
104 bool mightVanish () const;
│ │ │ │ +
85 inline void freeIndex(T index);
│ │ │ │ +
86
│ │ │ │ +
88 inline void test ();
│ │ │ │ +
89
│ │ │ │ +
90 // backup set to out stream
│ │ │ │ +
91 inline void backupIndexSet ( std::ostream & os );
│ │ │ │ +
92
│ │ │ │ +
93 // restore from in stream
│ │ │ │ +
94 inline void restoreIndexSet ( std::istream & is );
│ │ │ │ +
95 private:
│ │ │ │ +
96 // no copy constructor allowed
│ │ │ │ +
97 IndexStack( const IndexStack<T,length> & s) : maxIndex_ (0) , stack_(0) {}
│ │ │ │ +
98
│ │ │ │ +
99 // no assignment operator allowed
│ │ │ │ +
100 IndexStack<T,length> & operator = ( const IndexStack<T,length> & s)
│ │ │ │ +
101 {
│ │ │ │ +
102 DUNE_THROW(Exception, "IndexStack::operator = () not allowed!");
│ │ │ │ +
103 return *this;
│ │ │ │ +
104 }
│ │ │ │
105
│ │ │ │ -
│ │ │ │ -
106 int level () const;
│ │ │ │ -
107 // see ALBERTA documentation for definition of element type
│ │ │ │ -
108 // values are 0, 1, 2
│ │ │ │ -
│ │ │ │ -
109 int type () const;
│ │ │ │ +
106 // clear fullStacks
│ │ │ │ +
107 void clearStack ();
│ │ │ │ +
108
│ │ │ │ +
109 }; // end class IndexStack
│ │ │ │ +
│ │ │ │
110
│ │ │ │ -
│ │ │ │ -
111 int getMark () const;
│ │ │ │ -
│ │ │ │ -
112 void setMark ( int refCount ) const;
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
114 bool hasLeafNeighbor ( const int face ) const;
│ │ │ │ +
111 //****************************************************************
│ │ │ │ +
112 // Inline implementation
│ │ │ │ +
113 // ***************************************************************
│ │ │ │ +
114 template <class T, int length>
│ │ │ │
│ │ │ │ -
115 ElementInfo leafNeighbor ( const int face ) const;
│ │ │ │ -
116
│ │ │ │ -
117 /* obtain all level neighbors of a face
│ │ │ │ -
118 *
│ │ │ │ -
119 * param[in] face face for which the neighbors are desired
│ │ │ │ -
120 * param[out] neighbor array storing the neighbors
│ │ │ │ -
121 * param[out] faceInNeighbor array storing the faces in neighbor
│ │ │ │ -
122 * (-1, if this neighbor does not exist)
│ │ │ │ -
123 *
│ │ │ │ -
124 * returns (potential) number of neighbors (i.e., the number of valid
│ │ │ │ -
125 * entries in the output arrays
│ │ │ │ -
126 */
│ │ │ │ -
│ │ │ │ -
127 int levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const;
│ │ │ │ -
128
│ │ │ │ -
129 template< int codim >
│ │ │ │ -
│ │ │ │ -
130 int twist ( int subEntity ) const;
│ │ │ │ -
│ │ │ │ -
131 int twistInNeighbor ( int face ) const;
│ │ │ │ -
│ │ │ │ -
132 bool isBoundary ( int face ) const;
│ │ │ │ -
│ │ │ │ -
133 int boundaryId ( int face ) const;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
136
│ │ │ │ -
│ │ │ │ -
137 bool hasCoordinates () const;
│ │ │ │ -
│ │ │ │ -
138 const GlobalVector &coordinate ( int vertex ) const;
│ │ │ │ -
139#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
141 {
│ │ │ │ -
142 return GeometryCache( instance_->geometryCache, instance_->elInfo );
│ │ │ │ -
143 }
│ │ │ │ + │ │ │ │ +
116 : stack_ ( new StackType () ) , maxIndex_ (0) {}
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
118 template <class T, int length>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
120 {
│ │ │ │ +
121 if(stack_) delete stack_;
│ │ │ │ +
122 stack_ = 0;
│ │ │ │ +
123
│ │ │ │ +
124 while( !fullStackList_.empty() )
│ │ │ │ +
125 {
│ │ │ │ +
126 StackType * st = fullStackList_.top();
│ │ │ │ +
127 if(st) delete st;
│ │ │ │ +
128 fullStackList_.pop();
│ │ │ │ +
129 }
│ │ │ │ +
130 while( !emptyStackList_.empty() )
│ │ │ │ +
131 {
│ │ │ │ +
132 StackType * st = emptyStackList_.top();
│ │ │ │ +
133 if(st) delete st;
│ │ │ │ +
134 emptyStackList_.pop();
│ │ │ │ +
135 }
│ │ │ │ +
136 }
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
138 template <class T, int length>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
140 {
│ │ │ │ +
141 if((*stack_).empty())
│ │ │ │ +
142 {
│ │ │ │ +
143 if( fullStackList_.size() <= 0)
│ │ │ │ +
144 {
│ │ │ │ +
145 return maxIndex_++;
│ │ │ │ +
146 }
│ │ │ │ +
147 else
│ │ │ │ +
148 {
│ │ │ │ +
149 emptyStackList_.push( stack_ );
│ │ │ │ +
150 stack_ = fullStackList_.top();
│ │ │ │ +
151 fullStackList_.pop();
│ │ │ │ +
152 }
│ │ │ │ +
153 }
│ │ │ │ +
154 return (*stack_).topAndPop();
│ │ │ │ +
155 }
│ │ │ │
│ │ │ │ -
144#endif
│ │ │ │ -
145
│ │ │ │ -
146 template< class Functor >
│ │ │ │ -
│ │ │ │ -
147 void hierarchicTraverse ( Functor &functor ) const;
│ │ │ │ -
148
│ │ │ │ -
149 template< class Functor >
│ │ │ │ -
│ │ │ │ -
150 void leafTraverse ( Functor &functor ) const;
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
152 const Element *element () const;
│ │ │ │ -
│ │ │ │ -
153 const Element *neighbor ( int face ) const;
│ │ │ │ -
│ │ │ │ -
154 Element *el () const;
│ │ │ │ -
│ │ │ │ -
155 ALBERTA EL_INFO &elInfo () const;
│ │ │ │
156
│ │ │ │ -
157 static ElementInfo
│ │ │ │ +
157 template <class T, int length>
│ │ │ │
│ │ │ │ - │ │ │ │ -
159 const Element *element, int level, int type = 0 );
│ │ │ │ -
│ │ │ │ -
160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );
│ │ │ │ -
161
│ │ │ │ -
162 private:
│ │ │ │ -
163 static bool isLeaf ( Element *element );
│ │ │ │ -
164 static bool mightVanish ( Element *element, int depth );
│ │ │ │ -
165
│ │ │ │ -
166 static void fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo );
│ │ │ │ -
167 static void fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo );
│ │ │ │ -
168
│ │ │ │ -
169 void addReference () const;
│ │ │ │ -
170 void removeReference () const;
│ │ │ │ -
171
│ │ │ │ -
172 static InstancePtr null ();
│ │ │ │ -
173 static Stack &stack ();
│ │ │ │ -
174
│ │ │ │ -
175 InstancePtr instance_;
│ │ │ │ -
176 };
│ │ │ │ -
177
│ │ │ │ -
178
│ │ │ │ -
179
│ │ │ │ -
180 // ElementInfo::Instance
│ │ │ │ -
181 // ---------------------
│ │ │ │ -
182
│ │ │ │ -
183 template< int dim >
│ │ │ │ -
│ │ │ │ -
184 struct ElementInfo< dim >::Instance
│ │ │ │ -
185 {
│ │ │ │ - │ │ │ │ -
187 unsigned int refCount;
│ │ │ │ -
188
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
190 {
│ │ │ │ -
191 return parent_;
│ │ │ │ -
192 }
│ │ │ │ +
158 inline void IndexStack<T,length>::freeIndex ( T index )
│ │ │ │ +
159 {
│ │ │ │ +
160 if((*stack_).full())
│ │ │ │ +
161 {
│ │ │ │ +
162 fullStackList_.push( stack_ );
│ │ │ │ +
163 if(emptyStackList_.size() <= 0)
│ │ │ │ +
164 {
│ │ │ │ +
165 stack_ = new StackType ();
│ │ │ │ +
166 }
│ │ │ │ +
167 else
│ │ │ │ +
168 {
│ │ │ │ +
169 stack_ = emptyStackList_.top();
│ │ │ │ +
170 emptyStackList_.pop();
│ │ │ │ +
171 }
│ │ │ │ +
172 }
│ │ │ │ +
173 (*stack_).push(index);
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
176 template <class T, int length>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
178 {
│ │ │ │ +
179 T vec[2*length];
│ │ │ │ +
180
│ │ │ │ +
181 for(int i=0; i<2*length; i++)
│ │ │ │ +
182 vec[i] = getIndex();
│ │ │ │ +
183
│ │ │ │ +
184 for(int i=0; i<2*length; i++)
│ │ │ │ +
185 freeIndex(vec[i]);
│ │ │ │ +
186
│ │ │ │ +
187 for(int i=0; i<2*length; i++)
│ │ │ │ +
188 vec[i] = getIndex();
│ │ │ │ +
189
│ │ │ │ +
190 for(int i=0; i<2*length; i++)
│ │ │ │ +
191 printf(" index [%d] = %d \n",i,vec[i]);
│ │ │ │ +
192 }
│ │ │ │
│ │ │ │
193
│ │ │ │ -
194 private:
│ │ │ │ -
195 InstancePtr parent_;
│ │ │ │ -
196
│ │ │ │ -
197#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
198 public:
│ │ │ │ - │ │ │ │ -
200#endif
│ │ │ │ -
201 };
│ │ │ │ -
│ │ │ │ -
202
│ │ │ │ -
203
│ │ │ │ -
204
│ │ │ │ -
205 // ElementInfo::Stack
│ │ │ │ -
206 // ------------------
│ │ │ │ +
194 template <class T, int length>
│ │ │ │ +
│ │ │ │ +
195 inline void IndexStack<T,length>::backupIndexSet ( std::ostream & os )
│ │ │ │ +
196 {
│ │ │ │ +
197 // holes are not stored at the moment
│ │ │ │ +
198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ;
│ │ │ │ +
199 return ;
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
202 template <class T, int length>
│ │ │ │ +
│ │ │ │ +
203 inline void IndexStack<T,length>::restoreIndexSet ( std::istream & is )
│ │ │ │ +
204 {
│ │ │ │ +
205 is.read ( ((char *) &maxIndex_), sizeof(int) );
│ │ │ │ +
206 clearStack ();
│ │ │ │
207
│ │ │ │ -
208 template< int dim >
│ │ │ │ -
│ │ │ │ -
209 class ElementInfo< dim >::Stack
│ │ │ │ -
210 {
│ │ │ │ -
211 InstancePtr top_;
│ │ │ │ -
212 Instance null_;
│ │ │ │ -
213
│ │ │ │ -
214 public:
│ │ │ │ -
│ │ │ │ -
215 Stack ();
│ │ │ │ -
│ │ │ │ -
216 ~Stack ();
│ │ │ │ -
217
│ │ │ │ -
│ │ │ │ -
218 InstancePtr allocate ();
│ │ │ │ -
│ │ │ │ -
219 void release ( InstancePtr &p );
│ │ │ │ -
│ │ │ │ -
220 InstancePtr null ();
│ │ │ │ -
221 };
│ │ │ │ -
222
│ │ │ │ -
223
│ │ │ │ -
224
│ │ │ │ -
225 // ElementInfo::Library
│ │ │ │ -
226 // --------------------
│ │ │ │ -
227
│ │ │ │ -
228 template< int dim >
│ │ │ │ -
229 template< int >
│ │ │ │ -
230 struct ElementInfo< dim >::Library
│ │ │ │ -
231 {
│ │ │ │ - │ │ │ │ -
233
│ │ │ │ -
234 static const int maxLevelNeighbors = (1 << (dim-1));
│ │ │ │ -
235
│ │ │ │ -
236 static int
│ │ │ │ -
237 leafNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
│ │ │ │ -
238
│ │ │ │ -
239 static int
│ │ │ │ -
240 levelNeighbors ( const ElementInfo &element, const int face,
│ │ │ │ -
241 ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] );
│ │ │ │ -
242
│ │ │ │ -
243 private:
│ │ │ │ -
244 static int
│ │ │ │ -
245 macroNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
│ │ │ │ -
246 };
│ │ │ │ -
247
│ │ │ │ -
248
│ │ │ │ -
249
│ │ │ │ -
250 // ElementInfo::Seed
│ │ │ │ -
251 // -----------------
│ │ │ │ -
252
│ │ │ │ -
253 template< int dim >
│ │ │ │ -
│ │ │ │ -
254 struct ElementInfo< dim >::Seed
│ │ │ │ -
255 {
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
257 : macroIndex_( -1 ), level_( 0 ), path_( 0 )
│ │ │ │ -
258 {}
│ │ │ │ -
│ │ │ │ -
259
│ │ │ │ -
│ │ │ │ -
260 Seed ( const int macroIndex, const int level, const unsigned long path )
│ │ │ │ -
261 : macroIndex_( macroIndex ), level_( level ), path_( path )
│ │ │ │ -
262 {}
│ │ │ │ -
│ │ │ │ -
263
│ │ │ │ -
│ │ │ │ -
264 bool operator== ( const Seed &other ) const
│ │ │ │ -
265 {
│ │ │ │ -
266 return (macroIndex() == other.macroIndex()) && (level() == other.level()) && (path() == other.path());
│ │ │ │ -
267 }
│ │ │ │ -
│ │ │ │ -
268
│ │ │ │ -
│ │ │ │ -
269 bool operator< ( const Seed &other ) const
│ │ │ │ -
270 {
│ │ │ │ -
271 const bool ml = (macroIndex() < other.macroIndex());
│ │ │ │ -
272 const bool me = (macroIndex() == other.macroIndex());
│ │ │ │ -
273 const bool ll = (level() < other.level());
│ │ │ │ -
274 const bool le = (level() == other.level());
│ │ │ │ -
275 const bool pl = (path() < other.path());
│ │ │ │ -
276 return ml | (me & (ll | (le & pl)));
│ │ │ │ -
277 }
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
279 bool operator!= ( const Seed &other ) const { return !(*this == other); }
│ │ │ │ -
280 bool operator<= ( const Seed &other ) const { return !(other < *this); }
│ │ │ │ -
281 bool operator> ( const Seed &other ) const { return (other < *this); }
│ │ │ │ -
282 bool operator>= ( const Seed &other ) const { return !(*this < other); }
│ │ │ │ -
283
│ │ │ │ -
284 bool isValid ( ) const { return macroIndex_ != -1; }
│ │ │ │ -
285
│ │ │ │ -
286 int macroIndex () const { return macroIndex_; }
│ │ │ │ -
287 int level () const { return level_; }
│ │ │ │ -
288 unsigned long path () const { return path_; }
│ │ │ │ -
289
│ │ │ │ -
290 private:
│ │ │ │ -
291 int macroIndex_;
│ │ │ │ -
292 int level_;
│ │ │ │ -
293 unsigned long path_;
│ │ │ │ -
294 };
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
296
│ │ │ │ -
297
│ │ │ │ -
298 // Implementation of ElementInfo
│ │ │ │ -
299 // -----------------------------
│ │ │ │ -
300
│ │ │ │ -
301 template< int dim >
│ │ │ │ -
302 inline ElementInfo< dim >::ElementInfo ( const InstancePtr &instance )
│ │ │ │ -
303 : instance_( instance )
│ │ │ │ -
304 {
│ │ │ │ -
305 addReference();
│ │ │ │ -
306 }
│ │ │ │ -
307
│ │ │ │ -
308
│ │ │ │ -
309 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
311 : instance_( null() )
│ │ │ │ -
312 {
│ │ │ │ -
313 addReference();
│ │ │ │ -
314 }
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316
│ │ │ │ -
317 template< int dim >
│ │ │ │ -
318 inline ElementInfo< dim >
│ │ │ │ -
│ │ │ │ -
319 ::ElementInfo ( const MeshPointer &mesh, const MacroElement &macroElement,
│ │ │ │ -
320 typename FillFlags::Flags fillFlags )
│ │ │ │ -
321 {
│ │ │ │ -
322 instance_ = stack().allocate();
│ │ │ │ -
323 instance_->parent() = null();
│ │ │ │ -
324 ++(instance_->parent()->refCount);
│ │ │ │ -
325
│ │ │ │ -
326 addReference();
│ │ │ │ -
327
│ │ │ │ -
328 elInfo().fill_flag = fillFlags;
│ │ │ │ -
329
│ │ │ │ -
330 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ -
331 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ -
332 elInfo().opp_vertex[ k ] = -1;
│ │ │ │ -
333
│ │ │ │ -
334 fill( mesh, &macroElement, elInfo() );
│ │ │ │ -
335 }
│ │ │ │ -
│ │ │ │ -
336
│ │ │ │ -
337
│ │ │ │ -
338 template< int dim >
│ │ │ │ -
339 inline ElementInfo< dim >
│ │ │ │ -
│ │ │ │ -
340 ::ElementInfo ( const MeshPointer &mesh, const Seed &seed,
│ │ │ │ -
341 typename FillFlags::Flags fillFlags )
│ │ │ │ -
342 {
│ │ │ │ -
343 instance_ = stack().allocate();
│ │ │ │ -
344 instance_->parent() = null();
│ │ │ │ -
345 ++(instance_->parent()->refCount);
│ │ │ │ -
346
│ │ │ │ -
347 addReference();
│ │ │ │ -
348
│ │ │ │ -
349 // fill in macro element info
│ │ │ │ -
350 elInfo().fill_flag = fillFlags;
│ │ │ │ -
351
│ │ │ │ -
352 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ -
353 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ -
354 elInfo().opp_vertex[ k ] = -1;
│ │ │ │ -
355
│ │ │ │ -
356 fill( mesh, ((Mesh *)mesh)->macro_els + seed.macroIndex(), elInfo() );
│ │ │ │ -
357
│ │ │ │ -
358 // traverse the seed's path
│ │ │ │ -
359 unsigned long path = seed.path();
│ │ │ │ -
360 for( int i = 0; i < seed.level(); ++i )
│ │ │ │ -
361 {
│ │ │ │ -
362 InstancePtr child = stack().allocate();
│ │ │ │ -
363 child->parent() = instance_;
│ │ │ │ -
364
│ │ │ │ -
365 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ -
366 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ -
367 child->elInfo.opp_vertex[ k ] = -2;
│ │ │ │ -
368
│ │ │ │ -
369 fill( path & 1, elInfo(), child->elInfo );
│ │ │ │ -
370
│ │ │ │ -
371 instance_ = child;
│ │ │ │ -
372 addReference();
│ │ │ │ -
373
│ │ │ │ -
374 path = path >> 1;
│ │ │ │ -
375 }
│ │ │ │ -
376
│ │ │ │ -
377 assert( this->seed() == seed );
│ │ │ │ -
378 }
│ │ │ │ -
│ │ │ │ -
379
│ │ │ │ -
380
│ │ │ │ -
381 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
383 : instance_( other.instance_ )
│ │ │ │ -
384 {
│ │ │ │ -
385 addReference();
│ │ │ │ -
386 }
│ │ │ │ -
│ │ │ │ -
387
│ │ │ │ -
388 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
390 : instance_( NULL )
│ │ │ │ -
391 {
│ │ │ │ -
392 using std::swap;
│ │ │ │ -
393 swap( instance_, other.instance_ );
│ │ │ │ -
394 }
│ │ │ │ -
│ │ │ │ -
395
│ │ │ │ -
396 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
398 {
│ │ │ │ -
399 removeReference();
│ │ │ │ -
400 }
│ │ │ │ -
│ │ │ │ -
401
│ │ │ │ -
402
│ │ │ │ -
403 template< int dim >
│ │ │ │ -
404 inline ElementInfo< dim > &
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
406 {
│ │ │ │ -
407 other.addReference();
│ │ │ │ -
408 removeReference();
│ │ │ │ -
409 instance_ = other.instance_;
│ │ │ │ -
410 return *this;
│ │ │ │ -
411 }
│ │ │ │ -
│ │ │ │ -
412
│ │ │ │ -
413 template< int dim >
│ │ │ │ -
414 inline ElementInfo< dim > &
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
416 {
│ │ │ │ -
417 using std::swap;
│ │ │ │ -
418 swap( instance_, other.instance_ );
│ │ │ │ -
419 return *this;
│ │ │ │ -
420 }
│ │ │ │ -
│ │ │ │ -
421
│ │ │ │ -
422 template< int dim >
│ │ │ │ -
423 inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
425 {
│ │ │ │ -
426 return (instance_->elInfo.el == other.instance_->elInfo.el);
│ │ │ │ -
427 }
│ │ │ │ -
│ │ │ │ -
428
│ │ │ │ -
429
│ │ │ │ -
430 template< int dim >
│ │ │ │ -
431 inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
433 {
│ │ │ │ -
434 return (instance_->elInfo.el != other.instance_->elInfo.el);
│ │ │ │ -
435 }
│ │ │ │ -
│ │ │ │ -
436
│ │ │ │ -
437
│ │ │ │ -
438 template< int dim >
│ │ │ │ -
439 inline const typename ElementInfo< dim >::MacroElement &
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
441 {
│ │ │ │ -
442 assert( !!(*this) );
│ │ │ │ -
443 assert( elInfo().macro_el != NULL );
│ │ │ │ -
444 return static_cast< const MacroElement & >( *(elInfo().macro_el) );
│ │ │ │ -
445 }
│ │ │ │ -
│ │ │ │ -
446
│ │ │ │ -
447
│ │ │ │ -
448 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
450 {
│ │ │ │ -
451 assert( !!(*this) );
│ │ │ │ -
452 return ElementInfo< dim >( instance_->parent() );
│ │ │ │ -
453 }
│ │ │ │ -
│ │ │ │ -
454
│ │ │ │ -
455
│ │ │ │ -
456 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
458 {
│ │ │ │ -
459 const Element *element = elInfo().el;
│ │ │ │ -
460 const Element *father = elInfo().parent->el;
│ │ │ │ -
461 assert( father != NULL );
│ │ │ │ -
462
│ │ │ │ -
463 const int index = (father->child[ 0 ] == element ? 0 : 1);
│ │ │ │ -
464 assert( father->child[ index ] == element );
│ │ │ │ -
465 return index;
│ │ │ │ -
466 }
│ │ │ │ -
│ │ │ │ -
467
│ │ │ │ -
468
│ │ │ │ -
469 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
471 {
│ │ │ │ -
472 assert( !isLeaf() );
│ │ │ │ -
473
│ │ │ │ -
474 InstancePtr child = stack().allocate();
│ │ │ │ -
475 child->parent() = instance_;
│ │ │ │ -
476 addReference();
│ │ │ │ -
477
│ │ │ │ -
478 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ -
479 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ -
480 child->elInfo.opp_vertex[ k ] = -2;
│ │ │ │ -
481
│ │ │ │ -
482 fill( i, elInfo(), child->elInfo );
│ │ │ │ -
483 return ElementInfo< dim >( child );
│ │ │ │ -
484 }
│ │ │ │ -
│ │ │ │ -
485
│ │ │ │ -
486
│ │ │ │ -
487 template< int dim >
│ │ │ │ -
│ │ │ │ -
488 inline bool ElementInfo< dim >::isLeaf () const
│ │ │ │ -
489 {
│ │ │ │ -
490 assert( !(*this) == false );
│ │ │ │ -
491 return isLeaf( el() );
│ │ │ │ -
492 }
│ │ │ │ -
│ │ │ │ -
493
│ │ │ │ -
494
│ │ │ │ -
495 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
497 {
│ │ │ │ -
498 assert( !!(*this) );
│ │ │ │ -
499
│ │ │ │ -
500 int level = 0;
│ │ │ │ -
501 unsigned long path = 0;
│ │ │ │ -
502 for( InstancePtr p = instance_; p->parent() != null(); p = p->parent() )
│ │ │ │ -
503 {
│ │ │ │ -
504 const Element *element = p->elInfo.el;
│ │ │ │ -
505 const Element *father = p->parent()->elInfo.el;
│ │ │ │ -
506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 ] == element );
│ │ │ │ -
507 path = (path << 1) | child;
│ │ │ │ -
508 ++level;
│ │ │ │ -
509 }
│ │ │ │ -
510
│ │ │ │ -
511 if( level != elInfo().level )
│ │ │ │ -
512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." );
│ │ │ │ -
513
│ │ │ │ -
514 return Seed( macroElement().index, level, path );
│ │ │ │ -
515 }
│ │ │ │ -
│ │ │ │ -
516
│ │ │ │ -
517
│ │ │ │ -
518 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
520 {
│ │ │ │ -
521 return MeshPointer( elInfo().mesh );
│ │ │ │ -
522 }
│ │ │ │ -
│ │ │ │ -
523
│ │ │ │ -
524
│ │ │ │ -
525 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
527 {
│ │ │ │ -
528 return mightVanish( el(), 0 );
│ │ │ │ -
529 }
│ │ │ │ -
│ │ │ │ -
530
│ │ │ │ -
531
│ │ │ │ -
532 template< int dim >
│ │ │ │ -
│ │ │ │ -
533 inline int ElementInfo< dim >::level () const
│ │ │ │ -
534 {
│ │ │ │ -
535 return elInfo().level;
│ │ │ │ -
536 }
│ │ │ │ -
│ │ │ │ -
537
│ │ │ │ -
538
│ │ │ │ -
539 template< int dim >
│ │ │ │ -
│ │ │ │ -
540 inline int ElementInfo< dim >::type () const
│ │ │ │ -
541 {
│ │ │ │ -
542 return 0;
│ │ │ │ -
543 }
│ │ │ │ -
│ │ │ │ -
544
│ │ │ │ -
545
│ │ │ │ -
546 template<>
│ │ │ │ -
│ │ │ │ -
547 inline int ElementInfo< 3 >::type () const
│ │ │ │ -
548 {
│ │ │ │ -
549 return instance_->elInfo.el_type;
│ │ │ │ -
550 }
│ │ │ │ -
│ │ │ │ -
551
│ │ │ │ -
552
│ │ │ │ -
553 template< int dim >
│ │ │ │ -
│ │ │ │ -
554 inline int ElementInfo< dim >::getMark () const
│ │ │ │ -
555 {
│ │ │ │ -
556 return el()->mark;
│ │ │ │ -
557 }
│ │ │ │ -
│ │ │ │ -
558
│ │ │ │ -
559
│ │ │ │ -
560 template< int dim >
│ │ │ │ -
│ │ │ │ -
561 inline void ElementInfo< dim >::setMark ( int refCount ) const
│ │ │ │ -
562 {
│ │ │ │ -
563 assert( isLeaf() );
│ │ │ │ -
564 assert( (refCount >= -128) && (refCount < 127) );
│ │ │ │ -
565 el()->mark = refCount;
│ │ │ │ -
566 }
│ │ │ │ -
│ │ │ │ -
567
│ │ │ │ -
568
│ │ │ │ -
569 template< int dim >
│ │ │ │ -
│ │ │ │ -
570 inline bool ElementInfo< dim >::hasLeafNeighbor ( const int face ) const
│ │ │ │ -
571 {
│ │ │ │ -
572 assert( !!(*this) );
│ │ │ │ -
573 assert( (face >= 0) && (face < maxNeighbors) );
│ │ │ │ -
574
│ │ │ │ -
575 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ -
576 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ -
577 if( macroFace >= 0 )
│ │ │ │ -
578 return (macroElement().neighbor( macroFace ) != NULL);
│ │ │ │ -
579 else
│ │ │ │ -
580 return true;
│ │ │ │ -
581 }
│ │ │ │ -
│ │ │ │ -
582
│ │ │ │ -
583
│ │ │ │ -
584 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
586 {
│ │ │ │ -
587 assert( (face >= 0) && (face < numFaces) );
│ │ │ │ -
588 ElementInfo neighbor;
│ │ │ │ -
589 Library< dimWorld >::leafNeighbor( *this, face, neighbor );
│ │ │ │ -
590 return neighbor;
│ │ │ │ -
591 }
│ │ │ │ -
│ │ │ │ -
592
│ │ │ │ -
593
│ │ │ │ -
594 template< int dim >
│ │ │ │ -
595 inline int ElementInfo< dim >
│ │ │ │ -
│ │ │ │ -
596 ::levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const
│ │ │ │ -
597 {
│ │ │ │ -
598 assert( (face >= 0) && (face < numFaces) );
│ │ │ │ -
599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, faceInNeighbor );
│ │ │ │ -
600 }
│ │ │ │ -
│ │ │ │ -
601
│ │ │ │ -
602
│ │ │ │ -
603 template< int dim >
│ │ │ │ -
604 template< int codim >
│ │ │ │ -
│ │ │ │ -
605 inline int ElementInfo< dim >::twist ( int subEntity ) const
│ │ │ │ -
606 {
│ │ │ │ -
607 return Twist< dim, dim-codim >::twist( element(), subEntity );
│ │ │ │ -
608 }
│ │ │ │ -
│ │ │ │ -
609
│ │ │ │ -
610
│ │ │ │ -
611 template< int dim >
│ │ │ │ -
│ │ │ │ -
612 inline int ElementInfo< dim >::twistInNeighbor ( const int face ) const
│ │ │ │ -
613 {
│ │ │ │ -
614 assert( neighbor( face ) != NULL );
│ │ │ │ -
615 return Twist< dim, dim-1 >::twist( neighbor( face ), elInfo().opp_vertex[ face ] );
│ │ │ │ -
616 }
│ │ │ │ -
│ │ │ │ -
617
│ │ │ │ -
618
│ │ │ │ -
619 template< int dim >
│ │ │ │ -
│ │ │ │ -
620 inline bool ElementInfo< dim >::isBoundary ( int face ) const
│ │ │ │ -
621 {
│ │ │ │ -
622 assert( !!(*this) );
│ │ │ │ -
623 assert( (face >= 0) && (face < maxNeighbors) );
│ │ │ │ -
624
│ │ │ │ -
625 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ -
626 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ -
627 if( macroFace >= 0 )
│ │ │ │ -
628 return macroElement().isBoundary( macroFace );
│ │ │ │ -
629 else
│ │ │ │ -
630 return false;
│ │ │ │ -
631 }
│ │ │ │ -
│ │ │ │ -
632
│ │ │ │ -
633
│ │ │ │ -
634 template< int dim >
│ │ │ │ -
│ │ │ │ -
635 inline int ElementInfo< dim >::boundaryId ( int face ) const
│ │ │ │ -
636 {
│ │ │ │ -
637 assert( !!(*this) );
│ │ │ │ -
638 assert( (face >= 0) && (face < N_WALLS_MAX) );
│ │ │ │ -
639
│ │ │ │ -
640 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ -
641 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ -
642 const int id = macroElement().boundaryId( macroFace );
│ │ │ │ -
643 // this assertion is only allowed, if FILL_BOUND is set
│ │ │ │ -
644 // assert( id == elInfo().wall_bound[ face ] );
│ │ │ │ -
645 return id;
│ │ │ │ -
646 }
│ │ │ │ -
│ │ │ │ -
647
│ │ │ │ -
648
│ │ │ │ -
649 template< int dim >
│ │ │ │ -
650 inline AffineTransformation *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
652 {
│ │ │ │ -
653 assert( !!(*this) );
│ │ │ │ -
654 assert( (face >= 0) && (face < N_WALLS_MAX) );
│ │ │ │ -
655
│ │ │ │ -
656 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ -
657 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ -
658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]);
│ │ │ │ -
659 }
│ │ │ │ -
│ │ │ │ -
660
│ │ │ │ -
661
│ │ │ │ -
662 template< int dim >
│ │ │ │ -
663 inline BasicNodeProjection *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
665 {
│ │ │ │ -
666 assert( !!(*this) );
│ │ │ │ -
667 assert( (face >= 0) && (face < N_WALLS_MAX) );
│ │ │ │ -
668
│ │ │ │ -
669 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ -
670 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ -
671 if( macroFace >= 0 )
│ │ │ │ -
672 return static_cast< BasicNodeProjection * >( macroElement().projection[ macroFace+1 ] );
│ │ │ │ -
673 else
│ │ │ │ -
674 return 0;
│ │ │ │ -
675 }
│ │ │ │ -
│ │ │ │ -
676
│ │ │ │ -
677
│ │ │ │ -
678 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
680 {
│ │ │ │ -
681 return ((elInfo().fill_flag & FillFlags::coords) != 0);
│ │ │ │ -
682 }
│ │ │ │ -
│ │ │ │ -
683
│ │ │ │ -
684 template< int dim >
│ │ │ │ -
│ │ │ │ -
685 inline const GlobalVector &ElementInfo< dim >::coordinate ( int vertex ) const
│ │ │ │ -
686 {
│ │ │ │ -
687 assert( hasCoordinates() );
│ │ │ │ -
688 assert( (vertex >= 0) && (vertex < numVertices) );
│ │ │ │ -
689 return elInfo().coord[ vertex ];
│ │ │ │ -
690 }
│ │ │ │ -
│ │ │ │ -
691
│ │ │ │ -
692
│ │ │ │ -
693 template< int dim >
│ │ │ │ -
694 template< class Functor >
│ │ │ │ -
│ │ │ │ -
695 inline void ElementInfo< dim >::hierarchicTraverse ( Functor &functor ) const
│ │ │ │ -
696 {
│ │ │ │ -
697 functor( *this );
│ │ │ │ -
698 if( !isLeaf() )
│ │ │ │ -
699 {
│ │ │ │ -
700 child( 0 ).hierarchicTraverse( functor );
│ │ │ │ -
701 child( 1 ).hierarchicTraverse( functor );
│ │ │ │ -
702 }
│ │ │ │ -
703 }
│ │ │ │ -
│ │ │ │ -
704
│ │ │ │ -
705
│ │ │ │ -
706 template< int dim >
│ │ │ │ -
707 template< class Functor >
│ │ │ │ -
│ │ │ │ -
708 inline void ElementInfo< dim >::leafTraverse ( Functor &functor ) const
│ │ │ │ -
709 {
│ │ │ │ -
710 if( !isLeaf() )
│ │ │ │ -
711 {
│ │ │ │ -
712 child( 0 ).leafTraverse( functor );
│ │ │ │ -
713 child( 1 ).leafTraverse( functor );
│ │ │ │ -
714 }
│ │ │ │ -
715 else
│ │ │ │ -
716 functor( *this );
│ │ │ │ -
717 }
│ │ │ │ -
│ │ │ │ -
718
│ │ │ │ -
719
│ │ │ │ -
720 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
722 {
│ │ │ │ -
723 return elInfo().el;
│ │ │ │ -
724 }
│ │ │ │ -
│ │ │ │ -
725
│ │ │ │ -
726
│ │ │ │ -
727 template< int dim >
│ │ │ │ -
│ │ │ │ -
728 inline const Element *ElementInfo< dim >::neighbor ( int face ) const
│ │ │ │ -
729 {
│ │ │ │ -
730 assert( (face >= 0) && (face < numFaces) );
│ │ │ │ -
731 assert( (elInfo().fill_flag & FillFlags::neighbor) != 0 );
│ │ │ │ -
732 return elInfo().neigh[ face ];
│ │ │ │ -
733 }
│ │ │ │ -
│ │ │ │ -
734
│ │ │ │ -
735
│ │ │ │ -
736 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
738 {
│ │ │ │ -
739 return elInfo().el;
│ │ │ │ -
740 }
│ │ │ │ -
│ │ │ │ -
741
│ │ │ │ -
742
│ │ │ │ -
743 template< int dim >
│ │ │ │ -
│ │ │ │ -
744 inline ALBERTA EL_INFO &ElementInfo< dim >::elInfo () const
│ │ │ │ -
745 {
│ │ │ │ -
746 return (instance_->elInfo);
│ │ │ │ -
747 }
│ │ │ │ -
│ │ │ │ -
748
│ │ │ │ -
749
│ │ │ │ -
750 template< int dim >
│ │ │ │ -
751 inline ElementInfo< dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
753 const Element *element, int level, int type )
│ │ │ │ -
754 {
│ │ │ │ -
755 InstancePtr instance = stack().allocate();
│ │ │ │ -
756 instance->parent() = null();
│ │ │ │ -
757 ++(instance->parent()->refCount);
│ │ │ │ -
758
│ │ │ │ -
759 instance->elInfo.mesh = mesh;
│ │ │ │ -
760 instance->elInfo.macro_el = NULL;
│ │ │ │ -
761 instance->elInfo.el = const_cast< Element * >( element );
│ │ │ │ -
762 instance->elInfo.parent = NULL;
│ │ │ │ -
763 instance->elInfo.fill_flag = FillFlags::nothing;
│ │ │ │ -
764 instance->elInfo.level = level;
│ │ │ │ -
765 instance->elInfo.el_type = type;
│ │ │ │ -
766
│ │ │ │ -
767 return ElementInfo< dim >( instance );
│ │ │ │ -
768 }
│ │ │ │ -
│ │ │ │ -
769
│ │ │ │ -
770
│ │ │ │ -
771 template< int dim >
│ │ │ │ -
772 inline ElementInfo< dim >
│ │ │ │ -
│ │ │ │ -
773 ElementInfo< dim >::createFake ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ -
774 {
│ │ │ │ -
775 InstancePtr instance = stack().allocate();
│ │ │ │ -
776 instance->parent() = null();
│ │ │ │ -
777 ++(instance->parent()->refCount);
│ │ │ │ -
778
│ │ │ │ -
779 instance->elInfo = elInfo;
│ │ │ │ -
780 return ElementInfo< dim >( instance );
│ │ │ │ -
781 }
│ │ │ │ -
│ │ │ │ -
782
│ │ │ │ -
783
│ │ │ │ -
784 template< int dim >
│ │ │ │ -
785 inline bool ElementInfo< dim >::isLeaf ( Element *element )
│ │ │ │ -
786 {
│ │ │ │ -
787 return IS_LEAF_EL( element );
│ │ │ │ -
788 }
│ │ │ │ -
789
│ │ │ │ -
790
│ │ │ │ -
791 template< int dim >
│ │ │ │ -
792 inline bool ElementInfo< dim >::mightVanish ( Alberta::Element *element, int depth )
│ │ │ │ -
793 {
│ │ │ │ -
794 if( isLeaf( element ) )
│ │ │ │ -
795 return (element->mark < depth);
│ │ │ │ -
796 else
│ │ │ │ -
797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish( element->child[ 1 ], depth-1 ));
│ │ │ │ -
798 }
│ │ │ │ -
799
│ │ │ │ -
800
│ │ │ │ -
801 template< int dim >
│ │ │ │ -
802 inline void ElementInfo< dim >
│ │ │ │ -
803 ::fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo )
│ │ │ │ -
804 {
│ │ │ │ -
805 ALBERTA fill_macro_info( mesh, mel, &elInfo );
│ │ │ │ -
806 }
│ │ │ │ -
807
│ │ │ │ -
808 template< int dim >
│ │ │ │ -
809 inline void ElementInfo< dim >
│ │ │ │ -
810 ::fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo )
│ │ │ │ -
811 {
│ │ │ │ -
812 ALBERTA fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo );
│ │ │ │ -
813 }
│ │ │ │ -
814
│ │ │ │ -
815
│ │ │ │ -
816 template< int dim >
│ │ │ │ -
817 inline void ElementInfo< dim >::addReference () const
│ │ │ │ -
818 {
│ │ │ │ -
819 ++(instance_->refCount);
│ │ │ │ -
820 }
│ │ │ │ -
821
│ │ │ │ -
822
│ │ │ │ -
823 template< int dim >
│ │ │ │ -
824 inline void ElementInfo< dim >::removeReference () const
│ │ │ │ -
825 {
│ │ │ │ -
826 // short-circuit for rvalues that have been drained as argument to a move operation
│ │ │ │ -
827 if ( !instance_ )
│ │ │ │ -
828 return;
│ │ │ │ -
829 // this loop breaks when instance becomes null()
│ │ │ │ -
830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; )
│ │ │ │ -
831 {
│ │ │ │ -
832 const InstancePtr parent = instance->parent();
│ │ │ │ -
833 stack().release( instance );
│ │ │ │ -
834 instance = parent;
│ │ │ │ -
835 }
│ │ │ │ -
836 }
│ │ │ │ -
837
│ │ │ │ -
838
│ │ │ │ -
839 template< int dim >
│ │ │ │ -
840 inline typename ElementInfo< dim >::InstancePtr
│ │ │ │ -
841 ElementInfo< dim >::null ()
│ │ │ │ -
842 {
│ │ │ │ -
843 return stack().null();
│ │ │ │ -
844 }
│ │ │ │ -
845
│ │ │ │ -
846
│ │ │ │ -
847 template< int dim >
│ │ │ │ -
848 inline typename ElementInfo< dim >::Stack &
│ │ │ │ -
849 ElementInfo< dim >::stack ()
│ │ │ │ -
850 {
│ │ │ │ -
851 static Stack s;
│ │ │ │ -
852 return s;
│ │ │ │ -
853 }
│ │ │ │ -
854
│ │ │ │ -
855
│ │ │ │ -
856
│ │ │ │ -
857 // Implementation of ElementInfo::Stack
│ │ │ │ -
858 // ------------------------------------
│ │ │ │ -
859
│ │ │ │ -
860 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
862 : top_( 0 )
│ │ │ │ -
863 {
│ │ │ │ -
864 null_.elInfo.el = NULL;
│ │ │ │ -
865 null_.refCount = 1;
│ │ │ │ -
866 null_.parent() = 0;
│ │ │ │ -
867 }
│ │ │ │ -
│ │ │ │ -
868
│ │ │ │ -
869
│ │ │ │ -
870 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
872 {
│ │ │ │ -
873 while( top_ != 0 )
│ │ │ │ -
874 {
│ │ │ │ -
875 InstancePtr p = top_;
│ │ │ │ -
876 top_ = p->parent();
│ │ │ │ -
877 delete p;
│ │ │ │ -
878 }
│ │ │ │ -
879 }
│ │ │ │ -
│ │ │ │ -
880
│ │ │ │ -
881
│ │ │ │ -
882 template< int dim >
│ │ │ │ -
883 inline typename ElementInfo< dim >::InstancePtr
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
885 {
│ │ │ │ -
886 InstancePtr p = top_;
│ │ │ │ -
887 if( p != 0 )
│ │ │ │ -
888 top_ = p->parent();
│ │ │ │ -
889 else
│ │ │ │ -
890 p = new Instance;
│ │ │ │ -
891 p->refCount = 0;
│ │ │ │ -
892 return p;
│ │ │ │ -
893 }
│ │ │ │ -
│ │ │ │ -
894
│ │ │ │ -
895
│ │ │ │ -
896 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
898 {
│ │ │ │ -
899 assert( (p != null()) && (p->refCount == 0) );
│ │ │ │ -
900 p->parent() = top_;
│ │ │ │ -
901 top_ = p;
│ │ │ │ -
902 }
│ │ │ │ -
│ │ │ │ -
903
│ │ │ │ -
904
│ │ │ │ -
905 template< int dim >
│ │ │ │ -
906 inline typename ElementInfo< dim >::InstancePtr
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
908 {
│ │ │ │ -
909 return &null_;
│ │ │ │ -
910 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
911
│ │ │ │ -
912 } // namespace Alberta
│ │ │ │ -
913
│ │ │ │ -
914} // namespace Dune
│ │ │ │ -
915
│ │ │ │ -
916#endif // #if HAVE_ALBERTA
│ │ │ │ -
917
│ │ │ │ -
918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
208 return ;
│ │ │ │ +
209 }
│ │ │ │
│ │ │ │ - │ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ -
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │ +
210
│ │ │ │ +
211 template <class T, int length>
│ │ │ │ + │ │ │ │ +
213 {
│ │ │ │ +
214 if(stack_)
│ │ │ │ +
215 {
│ │ │ │ +
216 delete stack_;
│ │ │ │ +
217 stack_ = new StackType();
│ │ │ │ +
218 assert(stack_);
│ │ │ │ +
219 }
│ │ │ │ +
220
│ │ │ │ +
221 while( !fullStackList_.empty() )
│ │ │ │ +
222 {
│ │ │ │ +
223 StackType * st = fullStackList_.top();
│ │ │ │ +
224 if(st) delete st;
│ │ │ │ +
225 fullStackList_.pop();
│ │ │ │ +
226 }
│ │ │ │ +
227 return;
│ │ │ │ +
228 }
│ │ │ │ +
229
│ │ │ │ +
230} // end namespace Dune
│ │ │ │ +
231#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ -
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ - │ │ │ │ -
Definition elementinfo.hh:43
│ │ │ │ -
ElementInfo leafNeighbor(const int face) const
Definition elementinfo.hh:585
│ │ │ │ -
bool isLeaf() const
Definition elementinfo.hh:488
│ │ │ │ -
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Definition elementinfo.hh:752
│ │ │ │ -
ElementInfo child(int i) const
Definition elementinfo.hh:470
│ │ │ │ -
int level() const
Definition elementinfo.hh:533
│ │ │ │ -
bool mightVanish() const
Definition elementinfo.hh:526
│ │ │ │ -
static const int numFaces
Definition elementinfo.hh:56
│ │ │ │ -
int twist(int subEntity) const
Definition elementinfo.hh:605
│ │ │ │ -
int twistInNeighbor(int face) const
Definition elementinfo.hh:612
│ │ │ │ -
Alberta::MacroElement< dimension > MacroElement
Definition elementinfo.hh:58
│ │ │ │ -
BasicNodeProjection * boundaryProjection(int face) const
Definition elementinfo.hh:664
│ │ │ │ -
const MacroElement & macroElement() const
Definition elementinfo.hh:440
│ │ │ │ -
static const int maxLevelNeighbors
Definition elementinfo.hh:64
│ │ │ │ -
ElementInfo father() const
Definition elementinfo.hh:449
│ │ │ │ -
ElementInfo(const ElementInfo &other)
Definition elementinfo.hh:382
│ │ │ │ -
GeometryCacheProxy< dim > GeometryCache
Definition elementinfo.hh:67
│ │ │ │ -
ElementInfo & operator=(const ElementInfo &other)
Definition elementinfo.hh:405
│ │ │ │ -
bool hasLeafNeighbor(const int face) const
Definition elementinfo.hh:570
│ │ │ │ -
bool operator==(const ElementInfo &other) const
Definition elementinfo.hh:424
│ │ │ │ -
static const int dimension
Definition elementinfo.hh:53
│ │ │ │ -
void hierarchicTraverse(Functor &functor) const
Definition elementinfo.hh:695
│ │ │ │ -
int type() const
Definition elementinfo.hh:540
│ │ │ │ -
static const int maxNeighbors
Definition elementinfo.hh:62
│ │ │ │ -
void setMark(int refCount) const
Definition elementinfo.hh:561
│ │ │ │ -
~ElementInfo()
Definition elementinfo.hh:397
│ │ │ │ -
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ -
static const int numVertices
Definition elementinfo.hh:55
│ │ │ │ -
int getMark() const
Definition elementinfo.hh:554
│ │ │ │ -
void leafTraverse(Functor &functor) const
Definition elementinfo.hh:708
│ │ │ │ -
Alberta::MeshPointer< dimension > MeshPointer
Definition elementinfo.hh:59
│ │ │ │ -
const Element * neighbor(int face) const
Definition elementinfo.hh:728
│ │ │ │ -
static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)
Definition elementinfo.hh:773
│ │ │ │ -
ElementInfo()
Definition elementinfo.hh:310
│ │ │ │ -
int boundaryId(int face) const
Definition elementinfo.hh:635
│ │ │ │ -
bool operator!=(const ElementInfo &other) const
Definition elementinfo.hh:432
│ │ │ │ -
Alberta::FillFlags< dimension > FillFlags
Definition elementinfo.hh:60
│ │ │ │ -
ElementInfo(const MeshPointer &mesh, const MacroElement &macroElement, typename FillFlags::Flags fillFlags=FillFlags::standard)
Definition elementinfo.hh:319
│ │ │ │ -
AffineTransformation * transformation(int face) const
Definition elementinfo.hh:651
│ │ │ │ -
bool isBoundary(int face) const
Definition elementinfo.hh:620
│ │ │ │ -
int indexInFather() const
Definition elementinfo.hh:457
│ │ │ │ -
Seed seed() const
Definition elementinfo.hh:496
│ │ │ │ -
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ -
const Element * element() const
Definition elementinfo.hh:721
│ │ │ │ -
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
│ │ │ │ -
MeshPointer mesh() const
Definition elementinfo.hh:519
│ │ │ │ -
GeometryCache geometryCache() const
Definition elementinfo.hh:140
│ │ │ │ -
bool hasCoordinates() const
Definition elementinfo.hh:679
│ │ │ │ -
int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], int(&faceInNeighbor)[maxLevelNeighbors]) const
Definition elementinfo.hh:596
│ │ │ │ -
ElementInfo(ElementInfo &&other)
Definition elementinfo.hh:389
│ │ │ │ -
ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::Flags fillFlags=FillFlags::standard)
Definition elementinfo.hh:340
│ │ │ │ -
Definition elementinfo.hh:185
│ │ │ │ -
InstancePtr & parent()
Definition elementinfo.hh:189
│ │ │ │ -
Alberta::GeometryCache< dim > geometryCache
Definition elementinfo.hh:199
│ │ │ │ -
ALBERTA EL_INFO elInfo
Definition elementinfo.hh:186
│ │ │ │ -
unsigned int refCount
Definition elementinfo.hh:187
│ │ │ │ -
Definition elementinfo.hh:210
│ │ │ │ -
InstancePtr null()
Definition elementinfo.hh:907
│ │ │ │ -
~Stack()
Definition elementinfo.hh:871
│ │ │ │ -
void release(InstancePtr &p)
Definition elementinfo.hh:897
│ │ │ │ -
Stack()
Definition elementinfo.hh:861
│ │ │ │ -
InstancePtr allocate()
Definition elementinfo.hh:884
│ │ │ │ -
Definition elementinfo.hh:255
│ │ │ │ -
Seed(const int macroIndex, const int level, const unsigned long path)
Definition elementinfo.hh:260
│ │ │ │ -
Seed()
Definition elementinfo.hh:256
│ │ │ │ -
int level() const
Definition elementinfo.hh:287
│ │ │ │ -
bool isValid() const
Definition elementinfo.hh:284
│ │ │ │ -
unsigned long path() const
Definition elementinfo.hh:288
│ │ │ │ -
int macroIndex() const
Definition elementinfo.hh:286
│ │ │ │ -
Definition geometrycache.hh:24
│ │ │ │ -
Definition geometrycache.hh:91
│ │ │ │ -
Definition macroelement.hh:24
│ │ │ │ -
Definition misc.hh:148
│ │ │ │ -
Definition misc.hh:231
│ │ │ │ -
static const Flags nothing
Definition misc.hh:234
│ │ │ │ -
static const Flags boundaryId
Definition misc.hh:246
│ │ │ │ -
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ │ -
static const Flags coords
Definition misc.hh:236
│ │ │ │ -
static const Flags standard
Definition misc.hh:258
│ │ │ │ -
static const Flags neighbor
Definition misc.hh:238
│ │ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:538
│ │ │ │ -
Definition albertagrid/projection.hh:208
│ │ │ │ +
Definition indexstack.hh:26
│ │ │ │ +
void restoreIndexSet(std::istream &is)
Definition indexstack.hh:203
│ │ │ │ +
void checkAndSetMax(T index)
set index as maxIndex if index is bigger than maxIndex
Definition indexstack.hh:70
│ │ │ │ +
void backupIndexSet(std::ostream &os)
Definition indexstack.hh:195
│ │ │ │ +
~IndexStack()
Destructor, deleting all stacks.
Definition indexstack.hh:119
│ │ │ │ +
T getIndex()
restore index from stack or create new index
Definition indexstack.hh:139
│ │ │ │ +
IndexStack()
Constructor, create new IndexStack.
Definition indexstack.hh:115
│ │ │ │ +
void setMaxIndex(T index)
set index as maxIndex
Definition indexstack.hh:73
│ │ │ │ +
int size() const
return maxIndex which is also the
Definition indexstack.hh:79
│ │ │ │ +
void test()
test stack functionality
Definition indexstack.hh:177
│ │ │ │ +
void freeIndex(T index)
store index on stack
Definition indexstack.hh:158
│ │ │ │ +
int getMaxIndex() const
return maxIndex which is also the
Definition indexstack.hh:76
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1211 +1,271 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -elementinfo.hh │ │ │ │ │ +indexstack.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ │ -6#define DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ │ +6#define DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ │ 7 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ -19 │ │ │ │ │ -20#if HAVE_ALBERTA │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +20namespace _D_u_n_e { │ │ │ │ │ 21 │ │ │ │ │ -22namespace _D_u_n_e │ │ │ │ │ -23{ │ │ │ │ │ -24 │ │ │ │ │ -25 namespace Alberta │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _I_n_d_e_x_S_t_a_c_k │ │ │ │ │ 26 { │ │ │ │ │ -27 │ │ │ │ │ -28 // External Forward Declarations │ │ │ │ │ -29 // ----------------------------- │ │ │ │ │ -30 │ │ │ │ │ -31 template< int dim > │ │ │ │ │ -32 class MeshPointer; │ │ │ │ │ +27 class MyFiniteStack : public ReservedVector │ │ │ │ │ +28 { │ │ │ │ │ +29 typedef ReservedVector BaseType ; │ │ │ │ │ +30 public: │ │ │ │ │ +32 bool full () const { return this->_s_i_z_e() >= length; } │ │ │ │ │ 33 │ │ │ │ │ -34 struct BasicNodeProjection; │ │ │ │ │ -35 │ │ │ │ │ +35 void push( const T& t ) { BaseType :: push_back( t ); } │ │ │ │ │ 36 │ │ │ │ │ -37 │ │ │ │ │ -38 // ElementInfo │ │ │ │ │ -39 // ----------- │ │ │ │ │ -40 │ │ │ │ │ -41 template< int dim > │ │ │ │ │ -_4_2 class _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -43 { │ │ │ │ │ -44 struct _I_n_s_t_a_n_c_e; │ │ │ │ │ -45 class _S_t_a_c_k; │ │ │ │ │ -46 │ │ │ │ │ -47 template< int > │ │ │ │ │ -48 struct Library; │ │ │ │ │ -49 │ │ │ │ │ -50 typedef _I_n_s_t_a_n_c_e *_I_n_s_t_a_n_c_e_P_t_r; │ │ │ │ │ -51 │ │ │ │ │ -52 public: │ │ │ │ │ -_5_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -54 │ │ │ │ │ -_5_5 static const int _n_u_m_V_e_r_t_i_c_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ │ -_v_a_l_u_e; │ │ │ │ │ -_5_6 static const int _n_u_m_F_a_c_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _1_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -57 │ │ │ │ │ -_5_8 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_ _> _M_a_c_r_o_E_l_e_m_e_n_t; │ │ │ │ │ -_5_9 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -_6_0 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_e_n_s_i_o_n_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ │ -61 │ │ │ │ │ -_6_2 static const int _m_a_x_N_e_i_g_h_b_o_r_s = N_NEIGH_MAX; │ │ │ │ │ -63 │ │ │ │ │ -_6_4 static const int _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s = Library< dimWorld >::maxLevelNeighbors; │ │ │ │ │ +38 T topAndPop () │ │ │ │ │ +39 { │ │ │ │ │ +40 assert( !this->empty() ); │ │ │ │ │ +41 assert( this->_s_i_z_e() <= length ); │ │ │ │ │ +42 // This code is not slower than using the array structure directly. │ │ │ │ │ +43 // The compiler removes the temporary completely. I measured this. │ │ │ │ │ +44 // See the commit message for revision 7837 for more details. │ │ │ │ │ +45 T tmp = this->back(); │ │ │ │ │ +46 this->pop_back(); │ │ │ │ │ +47 return tmp; │ │ │ │ │ +48 } │ │ │ │ │ +49 }; │ │ │ │ │ +50 │ │ │ │ │ +51 typedef MyFiniteStack StackType; │ │ │ │ │ +52 typedef typename std::stack < StackType * > StackListType; │ │ │ │ │ +53 │ │ │ │ │ +54 StackListType fullStackList_; │ │ │ │ │ +55 StackListType emptyStackList_; │ │ │ │ │ +56 │ │ │ │ │ +57 //typedef typename StackListType::Iterator DListIteratorType; │ │ │ │ │ +58 StackType * stack_; │ │ │ │ │ +59 │ │ │ │ │ +60 // current maxIndex │ │ │ │ │ +61 int maxIndex_; │ │ │ │ │ +62 public: │ │ │ │ │ +64 inline _I_n_d_e_x_S_t_a_c_k(); │ │ │ │ │ 65 │ │ │ │ │ -66#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -_6_7 typedef _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_<_ _d_i_m_ _> _G_e_o_m_e_t_r_y_C_a_c_h_e; │ │ │ │ │ -68#endif │ │ │ │ │ -69 │ │ │ │ │ -70 struct _S_e_e_d; │ │ │ │ │ +67 inline _~_I_n_d_e_x_S_t_a_c_k (); │ │ │ │ │ +68 │ │ │ │ │ +_7_0 inline void _c_h_e_c_k_A_n_d_S_e_t_M_a_x(T index) { if(index > maxIndex_) maxIndex_ = │ │ │ │ │ +index;} │ │ │ │ │ 71 │ │ │ │ │ -72 private: │ │ │ │ │ -73 explicit _E_l_e_m_e_n_t_I_n_f_o ( const _I_n_s_t_a_n_c_e_P_t_r &instance ); │ │ │ │ │ +_7_3 inline void _s_e_t_M_a_x_I_n_d_e_x(T index) { maxIndex_ = index; } │ │ │ │ │ 74 │ │ │ │ │ -75 public: │ │ │ │ │ -_7_6 _E_l_e_m_e_n_t_I_n_f_o (); │ │ │ │ │ -_7_7 _E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, const _M_a_c_r_o_E_l_e_m_e_n_t &_m_a_c_r_o_E_l_e_m_e_n_t, │ │ │ │ │ -78 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ); │ │ │ │ │ -_7_9 _E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, const Seed &_s_e_e_d, │ │ │ │ │ -80 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ); │ │ │ │ │ -_8_1 _E_l_e_m_e_n_t_I_n_f_o ( const _E_l_e_m_e_n_t_I_n_f_o &other ); │ │ │ │ │ -_8_2 _E_l_e_m_e_n_t_I_n_f_o ( _E_l_e_m_e_n_t_I_n_f_o&& other ); │ │ │ │ │ +_7_6 inline int _g_e_t_M_a_x_I_n_d_e_x() const { return maxIndex_; } │ │ │ │ │ +77 │ │ │ │ │ +_7_9 inline int _s_i_z_e() const { return _g_e_t_M_a_x_I_n_d_e_x(); } │ │ │ │ │ +80 │ │ │ │ │ +82 inline T _g_e_t_I_n_d_e_x (); │ │ │ │ │ 83 │ │ │ │ │ -_8_4 _~_E_l_e_m_e_n_t_I_n_f_o (); │ │ │ │ │ -85 │ │ │ │ │ -_8_6 _E_l_e_m_e_n_t_I_n_f_o &_o_p_e_r_a_t_o_r_=_ ( const _E_l_e_m_e_n_t_I_n_f_o &other ); │ │ │ │ │ -_8_7 _E_l_e_m_e_n_t_I_n_f_o &_o_p_e_r_a_t_o_r_=_ ( _E_l_e_m_e_n_t_I_n_f_o &&other ); │ │ │ │ │ -88 │ │ │ │ │ -_8_9 explicit operator bool () const { return (instance_ != null()); } │ │ │ │ │ -90 │ │ │ │ │ -_9_1 bool _o_p_e_r_a_t_o_r_=_=_ ( const _E_l_e_m_e_n_t_I_n_f_o &other ) const; │ │ │ │ │ -_9_2 bool _o_p_e_r_a_t_o_r_!_=_ ( const _E_l_e_m_e_n_t_I_n_f_o &other ) const; │ │ │ │ │ -93 │ │ │ │ │ -_9_4 const _M_a_c_r_o_E_l_e_m_e_n_t &_m_a_c_r_o_E_l_e_m_e_n_t () const; │ │ │ │ │ -_9_5 _E_l_e_m_e_n_t_I_n_f_o _f_a_t_h_e_r () const; │ │ │ │ │ -_9_6 int _i_n_d_e_x_I_n_F_a_t_h_e_r () const; │ │ │ │ │ -_9_7 _E_l_e_m_e_n_t_I_n_f_o _c_h_i_l_d ( int i ) const; │ │ │ │ │ -_9_8 bool _i_s_L_e_a_f () const; │ │ │ │ │ -99 │ │ │ │ │ -_1_0_0 Seed _s_e_e_d () const; │ │ │ │ │ -101 │ │ │ │ │ -_1_0_2 _M_e_s_h_P_o_i_n_t_e_r _m_e_s_h () const; │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 bool _m_i_g_h_t_V_a_n_i_s_h () const; │ │ │ │ │ +85 inline void _f_r_e_e_I_n_d_e_x(T index); │ │ │ │ │ +86 │ │ │ │ │ +88 inline void _t_e_s_t (); │ │ │ │ │ +89 │ │ │ │ │ +90 // backup set to out stream │ │ │ │ │ +91 inline void _b_a_c_k_u_p_I_n_d_e_x_S_e_t ( std::ostream & os ); │ │ │ │ │ +92 │ │ │ │ │ +93 // restore from in stream │ │ │ │ │ +94 inline void _r_e_s_t_o_r_e_I_n_d_e_x_S_e_t ( std::istream & is ); │ │ │ │ │ +95 private: │ │ │ │ │ +96 // no copy constructor allowed │ │ │ │ │ +97 _I_n_d_e_x_S_t_a_c_k( const _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_> & s) : maxIndex_ (0) , stack_(0) {} │ │ │ │ │ +98 │ │ │ │ │ +99 // no assignment operator allowed │ │ │ │ │ +100 IndexStack & operator = ( const IndexStack & s) │ │ │ │ │ +101 { │ │ │ │ │ +102 DUNE_THROW(Exception, "IndexStack::operator = () not allowed!"); │ │ │ │ │ +103 return *this; │ │ │ │ │ +104 } │ │ │ │ │ 105 │ │ │ │ │ -_1_0_6 int _l_e_v_e_l () const; │ │ │ │ │ -107 // see ALBERTA documentation for definition of element type │ │ │ │ │ -108 // values are 0, 1, 2 │ │ │ │ │ -_1_0_9 int _t_y_p_e () const; │ │ │ │ │ +106 // clear fullStacks │ │ │ │ │ +107 void clearStack (); │ │ │ │ │ +108 │ │ │ │ │ +109 }; // end class IndexStack │ │ │ │ │ 110 │ │ │ │ │ -_1_1_1 int _g_e_t_M_a_r_k () const; │ │ │ │ │ -_1_1_2 void _s_e_t_M_a_r_k ( int refCount ) const; │ │ │ │ │ -113 │ │ │ │ │ -_1_1_4 bool _h_a_s_L_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const; │ │ │ │ │ -_1_1_5 _E_l_e_m_e_n_t_I_n_f_o _l_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const; │ │ │ │ │ -116 │ │ │ │ │ -117 /* obtain all level neighbors of a face │ │ │ │ │ -118 * │ │ │ │ │ -119 * param[in] face face for which the neighbors are desired │ │ │ │ │ -120 * param[out] neighbor array storing the neighbors │ │ │ │ │ -121 * param[out] faceInNeighbor array storing the faces in neighbor │ │ │ │ │ -122 * (-1, if this neighbor does not exist) │ │ │ │ │ -123 * │ │ │ │ │ -124 * returns (potential) number of neighbors (i.e., the number of valid │ │ │ │ │ -125 * entries in the output arrays │ │ │ │ │ -126 */ │ │ │ │ │ -_1_2_7 int _l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const int face, _E_l_e_m_e_n_t_I_n_f_o (&_n_e_i_g_h_b_o_r) │ │ │ │ │ -[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ], int (&faceInNeighbor)[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ] ) const; │ │ │ │ │ -128 │ │ │ │ │ -129 template< int codim > │ │ │ │ │ -_1_3_0 int _t_w_i_s_t ( int subEntity ) const; │ │ │ │ │ -_1_3_1 int _t_w_i_s_t_I_n_N_e_i_g_h_b_o_r ( int face ) const; │ │ │ │ │ -_1_3_2 bool _i_s_B_o_u_n_d_a_r_y ( int face ) const; │ │ │ │ │ -_1_3_3 int _b_o_u_n_d_a_r_y_I_d ( int face ) const; │ │ │ │ │ -_1_3_4 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int face ) const; │ │ │ │ │ -_1_3_5 _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n *_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n ( int face ) const; │ │ │ │ │ -136 │ │ │ │ │ -_1_3_7 bool _h_a_s_C_o_o_r_d_i_n_a_t_e_s () const; │ │ │ │ │ -_1_3_8 const _G_l_o_b_a_l_V_e_c_t_o_r &_c_o_o_r_d_i_n_a_t_e ( int vertex ) const; │ │ │ │ │ -139#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -_1_4_0 _G_e_o_m_e_t_r_y_C_a_c_h_e _g_e_o_m_e_t_r_y_C_a_c_h_e () const │ │ │ │ │ -141 { │ │ │ │ │ -142 return _G_e_o_m_e_t_r_y_C_a_c_h_e( instance_->_g_e_o_m_e_t_r_y_C_a_c_h_e, instance_->_e_l_I_n_f_o ); │ │ │ │ │ -143 } │ │ │ │ │ -144#endif │ │ │ │ │ -145 │ │ │ │ │ -146 template< class Functor > │ │ │ │ │ -_1_4_7 void _h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor ) const; │ │ │ │ │ -148 │ │ │ │ │ -149 template< class Functor > │ │ │ │ │ -_1_5_0 void _l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor ) const; │ │ │ │ │ -151 │ │ │ │ │ -_1_5_2 const _E_l_e_m_e_n_t *_e_l_e_m_e_n_t () const; │ │ │ │ │ -_1_5_3 const _E_l_e_m_e_n_t *_n_e_i_g_h_b_o_r ( int face ) const; │ │ │ │ │ -_1_5_4 _E_l_e_m_e_n_t *_e_l () const; │ │ │ │ │ -_1_5_5 _A_L_B_E_R_T_A EL_INFO &_e_l_I_n_f_o () const; │ │ │ │ │ +111 //**************************************************************** │ │ │ │ │ +112 // Inline implementation │ │ │ │ │ +113 // *************************************************************** │ │ │ │ │ +114 template │ │ │ │ │ +_1_1_5 inline _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_I_n_d_e_x_S_t_a_c_k() │ │ │ │ │ +116 : stack_ ( new StackType () ) , maxIndex_ (0) {} │ │ │ │ │ +117 │ │ │ │ │ +118 template │ │ │ │ │ +_1_1_9 inline _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_~_I_n_d_e_x_S_t_a_c_k () │ │ │ │ │ +120 { │ │ │ │ │ +121 if(stack_) delete stack_; │ │ │ │ │ +122 stack_ = 0; │ │ │ │ │ +123 │ │ │ │ │ +124 while( !fullStackList_.empty() ) │ │ │ │ │ +125 { │ │ │ │ │ +126 StackType * st = fullStackList_.top(); │ │ │ │ │ +127 if(st) delete st; │ │ │ │ │ +128 fullStackList_.pop(); │ │ │ │ │ +129 } │ │ │ │ │ +130 while( !emptyStackList_.empty() ) │ │ │ │ │ +131 { │ │ │ │ │ +132 StackType * st = emptyStackList_.top(); │ │ │ │ │ +133 if(st) delete st; │ │ │ │ │ +134 emptyStackList_.pop(); │ │ │ │ │ +135 } │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 template │ │ │ │ │ +_1_3_9 inline T _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_g_e_t_I_n_d_e_x () │ │ │ │ │ +140 { │ │ │ │ │ +141 if((*stack_).empty()) │ │ │ │ │ +142 { │ │ │ │ │ +143 if( fullStackList_.size() <= 0) │ │ │ │ │ +144 { │ │ │ │ │ +145 return maxIndex_++; │ │ │ │ │ +146 } │ │ │ │ │ +147 else │ │ │ │ │ +148 { │ │ │ │ │ +149 emptyStackList_.push( stack_ ); │ │ │ │ │ +150 stack_ = fullStackList_.top(); │ │ │ │ │ +151 fullStackList_.pop(); │ │ │ │ │ +152 } │ │ │ │ │ +153 } │ │ │ │ │ +154 return (*stack_).topAndPop(); │ │ │ │ │ +155 } │ │ │ │ │ 156 │ │ │ │ │ -157 static _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -_1_5_8 _c_r_e_a_t_e_F_a_k_e ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, │ │ │ │ │ -159 const _E_l_e_m_e_n_t *_e_l_e_m_e_n_t, int _l_e_v_e_l, int _t_y_p_e = 0 ); │ │ │ │ │ -_1_6_0 static _E_l_e_m_e_n_t_I_n_f_o _c_r_e_a_t_e_F_a_k_e ( const _A_L_B_E_R_T_A EL_INFO &_e_l_I_n_f_o ); │ │ │ │ │ -161 │ │ │ │ │ -162 private: │ │ │ │ │ -163 static bool _i_s_L_e_a_f ( _E_l_e_m_e_n_t *_e_l_e_m_e_n_t ); │ │ │ │ │ -164 static bool _m_i_g_h_t_V_a_n_i_s_h ( _E_l_e_m_e_n_t *_e_l_e_m_e_n_t, int depth ); │ │ │ │ │ -165 │ │ │ │ │ -166 static void fill ( _M_e_s_h *_m_e_s_h, const _A_L_B_E_R_T_A MACRO_EL *mel, _A_L_B_E_R_T_A EL_INFO │ │ │ │ │ -&_e_l_I_n_f_o ); │ │ │ │ │ -167 static void fill ( int ichild, const _A_L_B_E_R_T_A EL_INFO &parentInfo, _A_L_B_E_R_T_A │ │ │ │ │ -EL_INFO &_e_l_I_n_f_o ); │ │ │ │ │ -168 │ │ │ │ │ -169 void addReference () const; │ │ │ │ │ -170 void removeReference () const; │ │ │ │ │ -171 │ │ │ │ │ -172 static InstancePtr null (); │ │ │ │ │ -173 static Stack &stack (); │ │ │ │ │ -174 │ │ │ │ │ -175 InstancePtr instance_; │ │ │ │ │ -176 }; │ │ │ │ │ -177 │ │ │ │ │ -178 │ │ │ │ │ -179 │ │ │ │ │ -180 // ElementInfo::Instance │ │ │ │ │ -181 // --------------------- │ │ │ │ │ -182 │ │ │ │ │ -183 template< int dim > │ │ │ │ │ -_1_8_4 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::_I_n_s_t_a_n_c_e │ │ │ │ │ -185 { │ │ │ │ │ -_1_8_6 _A_L_B_E_R_T_A EL_INFO _e_l_I_n_f_o; │ │ │ │ │ -_1_8_7 unsigned int _r_e_f_C_o_u_n_t; │ │ │ │ │ -188 │ │ │ │ │ -_1_8_9 _I_n_s_t_a_n_c_e_P_t_r &_p_a_r_e_n_t () │ │ │ │ │ -190 { │ │ │ │ │ -191 return parent_; │ │ │ │ │ +157 template │ │ │ │ │ +_1_5_8 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_f_r_e_e_I_n_d_e_x ( T index ) │ │ │ │ │ +159 { │ │ │ │ │ +160 if((*stack_).full()) │ │ │ │ │ +161 { │ │ │ │ │ +162 fullStackList_.push( stack_ ); │ │ │ │ │ +163 if(emptyStackList_.size() <= 0) │ │ │ │ │ +164 { │ │ │ │ │ +165 stack_ = new StackType (); │ │ │ │ │ +166 } │ │ │ │ │ +167 else │ │ │ │ │ +168 { │ │ │ │ │ +169 stack_ = emptyStackList_.top(); │ │ │ │ │ +170 emptyStackList_.pop(); │ │ │ │ │ +171 } │ │ │ │ │ +172 } │ │ │ │ │ +173 (*stack_).push(index); │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +176 template │ │ │ │ │ +_1_7_7 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_t_e_s_t () │ │ │ │ │ +178 { │ │ │ │ │ +179 T vec[2*length]; │ │ │ │ │ +180 │ │ │ │ │ +181 for(int i=0; i<2*length; i++) │ │ │ │ │ +182 vec[i] = getIndex(); │ │ │ │ │ +183 │ │ │ │ │ +184 for(int i=0; i<2*length; i++) │ │ │ │ │ +185 freeIndex(vec[i]); │ │ │ │ │ +186 │ │ │ │ │ +187 for(int i=0; i<2*length; i++) │ │ │ │ │ +188 vec[i] = getIndex(); │ │ │ │ │ +189 │ │ │ │ │ +190 for(int i=0; i<2*length; i++) │ │ │ │ │ +191 printf(" index [%d] = %d \n",i,vec[i]); │ │ │ │ │ 192 } │ │ │ │ │ 193 │ │ │ │ │ -194 private: │ │ │ │ │ -195 _I_n_s_t_a_n_c_e_P_t_r parent_; │ │ │ │ │ -196 │ │ │ │ │ -197#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -198 public: │ │ │ │ │ -_1_9_9 _A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> _g_e_o_m_e_t_r_y_C_a_c_h_e; │ │ │ │ │ -200#endif │ │ │ │ │ -201 }; │ │ │ │ │ -202 │ │ │ │ │ -203 │ │ │ │ │ -204 │ │ │ │ │ -205 // ElementInfo::Stack │ │ │ │ │ -206 // ------------------ │ │ │ │ │ +194 template │ │ │ │ │ +_1_9_5 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_b_a_c_k_u_p_I_n_d_e_x_S_e_t ( std::ostream & os ) │ │ │ │ │ +196 { │ │ │ │ │ +197 // holes are not stored at the moment │ │ │ │ │ +198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ; │ │ │ │ │ +199 return ; │ │ │ │ │ +200 } │ │ │ │ │ +201 │ │ │ │ │ +202 template │ │ │ │ │ +_2_0_3 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_r_e_s_t_o_r_e_I_n_d_e_x_S_e_t ( std::istream & is ) │ │ │ │ │ +204 { │ │ │ │ │ +205 is.read ( ((char *) &maxIndex_), sizeof(int) ); │ │ │ │ │ +206 clearStack (); │ │ │ │ │ 207 │ │ │ │ │ -208 template< int dim > │ │ │ │ │ -_2_0_9 class _E_l_e_m_e_n_t_I_n_f_o< dim >::_S_t_a_c_k │ │ │ │ │ -210 { │ │ │ │ │ -211 _I_n_s_t_a_n_c_e_P_t_r top_; │ │ │ │ │ -212 _I_n_s_t_a_n_c_e null_; │ │ │ │ │ -213 │ │ │ │ │ -214 public: │ │ │ │ │ -_2_1_5 Stack (); │ │ │ │ │ -_2_1_6 ~Stack (); │ │ │ │ │ -217 │ │ │ │ │ -_2_1_8 InstancePtr allocate (); │ │ │ │ │ -_2_1_9 void release ( InstancePtr &p ); │ │ │ │ │ -_2_2_0 InstancePtr null (); │ │ │ │ │ -221 }; │ │ │ │ │ -222 │ │ │ │ │ -223 │ │ │ │ │ -224 │ │ │ │ │ -225 // ElementInfo::Library │ │ │ │ │ -226 // -------------------- │ │ │ │ │ -227 │ │ │ │ │ -228 template< int dim > │ │ │ │ │ -229 template< int > │ │ │ │ │ -230 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::Library │ │ │ │ │ -231 { │ │ │ │ │ -232 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -233 │ │ │ │ │ -234 static const int _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s = (1 << (dim-1)); │ │ │ │ │ -235 │ │ │ │ │ -236 static int │ │ │ │ │ -237 _l_e_a_f_N_e_i_g_h_b_o_r ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -&_n_e_i_g_h_b_o_r ); │ │ │ │ │ -238 │ │ │ │ │ -239 static int │ │ │ │ │ -240 _l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, │ │ │ │ │ -241 _E_l_e_m_e_n_t_I_n_f_o (&_n_e_i_g_h_b_o_r)[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ], int (&faceInNeighbor) │ │ │ │ │ -[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ] ); │ │ │ │ │ -242 │ │ │ │ │ -243 private: │ │ │ │ │ -244 static int │ │ │ │ │ -245 macroNeighbor ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -&_n_e_i_g_h_b_o_r ); │ │ │ │ │ -246 }; │ │ │ │ │ -247 │ │ │ │ │ -248 │ │ │ │ │ -249 │ │ │ │ │ -250 // ElementInfo::Seed │ │ │ │ │ -251 // ----------------- │ │ │ │ │ -252 │ │ │ │ │ -253 template< int dim > │ │ │ │ │ -_2_5_4 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::_S_e_e_d │ │ │ │ │ -255 { │ │ │ │ │ -_2_5_6 _S_e_e_d () │ │ │ │ │ -257 : macroIndex_( -1 ), level_( 0 ), path_( 0 ) │ │ │ │ │ -258 {} │ │ │ │ │ -259 │ │ │ │ │ -_2_6_0 _S_e_e_d ( const int macroIndex, const int _l_e_v_e_l, const unsigned long path ) │ │ │ │ │ -261 : macroIndex_( macroIndex ), level_( _l_e_v_e_l ), path_( path ) │ │ │ │ │ -262 {} │ │ │ │ │ -263 │ │ │ │ │ -_2_6_4 bool _o_p_e_r_a_t_o_r_=_=_ ( const _S_e_e_d &other ) const │ │ │ │ │ -265 { │ │ │ │ │ -266 return (macroIndex() == other._m_a_c_r_o_I_n_d_e_x()) && (_l_e_v_e_l() == other._l_e_v_e_l()) │ │ │ │ │ -&& (path() == other._p_a_t_h()); │ │ │ │ │ -267 } │ │ │ │ │ -268 │ │ │ │ │ -_2_6_9 bool operator< ( const _S_e_e_d &other ) const │ │ │ │ │ -270 { │ │ │ │ │ -271 const bool ml = (macroIndex() < other._m_a_c_r_o_I_n_d_e_x()); │ │ │ │ │ -272 const bool me = (macroIndex() == other._m_a_c_r_o_I_n_d_e_x()); │ │ │ │ │ -273 const bool ll = (_l_e_v_e_l() < other._l_e_v_e_l()); │ │ │ │ │ -274 const bool le = (_l_e_v_e_l() == other._l_e_v_e_l()); │ │ │ │ │ -275 const bool pl = (path() < other._p_a_t_h()); │ │ │ │ │ -276 return ml | (me & (ll | (le & pl))); │ │ │ │ │ -277 } │ │ │ │ │ -278 │ │ │ │ │ -_2_7_9 bool _o_p_e_r_a_t_o_r_!_=_ ( const _S_e_e_d &other ) const { return !(*this == other); } │ │ │ │ │ -_2_8_0 bool operator<= ( const _S_e_e_d &other ) const { return !(other < *this); } │ │ │ │ │ -_2_8_1 bool operator> ( const _S_e_e_d &other ) const { return (other < *this); } │ │ │ │ │ -_2_8_2 bool operator>= ( const _S_e_e_d &other ) const { return !(*this < other); } │ │ │ │ │ -283 │ │ │ │ │ -_2_8_4 bool _i_s_V_a_l_i_d ( ) const { return macroIndex_ != -1; } │ │ │ │ │ -285 │ │ │ │ │ -_2_8_6 int _m_a_c_r_o_I_n_d_e_x () const { return macroIndex_; } │ │ │ │ │ -_2_8_7 int _l_e_v_e_l () const { return level_; } │ │ │ │ │ -_2_8_8 unsigned long _p_a_t_h () const { return path_; } │ │ │ │ │ -289 │ │ │ │ │ -290 private: │ │ │ │ │ -291 int macroIndex_; │ │ │ │ │ -292 int level_; │ │ │ │ │ -293 unsigned long path_; │ │ │ │ │ -294 }; │ │ │ │ │ -295 │ │ │ │ │ -296 │ │ │ │ │ -297 │ │ │ │ │ -298 // Implementation of ElementInfo │ │ │ │ │ -299 // ----------------------------- │ │ │ │ │ -300 │ │ │ │ │ -301 template< int dim > │ │ │ │ │ -302 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( const InstancePtr &instance ) │ │ │ │ │ -303 : instance_( instance ) │ │ │ │ │ -304 { │ │ │ │ │ -305 addReference(); │ │ │ │ │ -306 } │ │ │ │ │ -307 │ │ │ │ │ -308 │ │ │ │ │ -309 template< int dim > │ │ │ │ │ -_3_1_0 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o () │ │ │ │ │ -311 : instance_( null() ) │ │ │ │ │ -312 { │ │ │ │ │ -313 addReference(); │ │ │ │ │ -314 } │ │ │ │ │ -315 │ │ │ │ │ -316 │ │ │ │ │ -317 template< int dim > │ │ │ │ │ -318 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ -_3_1_9_ _:_:_E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, const _M_a_c_r_o_E_l_e_m_e_n_t ¯oElement, │ │ │ │ │ -320 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) │ │ │ │ │ -321 { │ │ │ │ │ -322 instance_ = stack().allocate(); │ │ │ │ │ -323 instance_->parent() = null(); │ │ │ │ │ -324 ++(instance_->parent()->refCount); │ │ │ │ │ -325 │ │ │ │ │ -326 addReference(); │ │ │ │ │ -327 │ │ │ │ │ -328 elInfo().fill_flag = fillFlags; │ │ │ │ │ -329 │ │ │ │ │ -330 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ -331 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ -332 elInfo().opp_vertex[ k ] = -1; │ │ │ │ │ -333 │ │ │ │ │ -334 fill( mesh, ¯oElement, elInfo() ); │ │ │ │ │ -335 } │ │ │ │ │ -336 │ │ │ │ │ -337 │ │ │ │ │ -338 template< int dim > │ │ │ │ │ -339 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ -_3_4_0_ _:_:_E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, const _S_e_e_d &seed, │ │ │ │ │ -341 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) │ │ │ │ │ -342 { │ │ │ │ │ -343 instance_ = stack().allocate(); │ │ │ │ │ -344 instance_->parent() = null(); │ │ │ │ │ -345 ++(instance_->parent()->refCount); │ │ │ │ │ -346 │ │ │ │ │ -347 addReference(); │ │ │ │ │ -348 │ │ │ │ │ -349 // fill in macro element info │ │ │ │ │ -350 elInfo().fill_flag = fillFlags; │ │ │ │ │ -351 │ │ │ │ │ -352 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ -353 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ -354 elInfo().opp_vertex[ k ] = -1; │ │ │ │ │ -355 │ │ │ │ │ -356 fill( mesh, ((_M_e_s_h *)mesh)->macro_els + seed._m_a_c_r_o_I_n_d_e_x(), elInfo() ); │ │ │ │ │ -357 │ │ │ │ │ -358 // traverse the seed's path │ │ │ │ │ -359 unsigned long path = seed._p_a_t_h(); │ │ │ │ │ -360 for( int i = 0; i < seed._l_e_v_e_l(); ++i ) │ │ │ │ │ -361 { │ │ │ │ │ -362 _I_n_s_t_a_n_c_e_P_t_r child = stack().allocate(); │ │ │ │ │ -363 child->_p_a_r_e_n_t() = instance_; │ │ │ │ │ -364 │ │ │ │ │ -365 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ -366 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ -367 child->_e_l_I_n_f_o.opp_vertex[ k ] = -2; │ │ │ │ │ -368 │ │ │ │ │ -369 fill( path & 1, elInfo(), child->_e_l_I_n_f_o ); │ │ │ │ │ -370 │ │ │ │ │ -371 instance_ = child; │ │ │ │ │ -372 addReference(); │ │ │ │ │ -373 │ │ │ │ │ -374 path = path >> 1; │ │ │ │ │ -375 } │ │ │ │ │ -376 │ │ │ │ │ -377 assert( this->seed() == seed ); │ │ │ │ │ -378 } │ │ │ │ │ -379 │ │ │ │ │ -380 │ │ │ │ │ -381 template< int dim > │ │ │ │ │ -_3_8_2 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( const _E_l_e_m_e_n_t_I_n_f_o &other ) │ │ │ │ │ -383 : instance_( other.instance_ ) │ │ │ │ │ -384 { │ │ │ │ │ -385 addReference(); │ │ │ │ │ -386 } │ │ │ │ │ -387 │ │ │ │ │ -388 template< int dim > │ │ │ │ │ -_3_8_9 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( _E_l_e_m_e_n_t_I_n_f_o &&other ) │ │ │ │ │ -390 : instance_( NULL ) │ │ │ │ │ -391 { │ │ │ │ │ -392 using _s_t_d_:_:_s_w_a_p; │ │ │ │ │ -393 swap( instance_, other.instance_ ); │ │ │ │ │ -394 } │ │ │ │ │ -395 │ │ │ │ │ -396 template< int dim > │ │ │ │ │ -_3_9_7 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_~_E_l_e_m_e_n_t_I_n_f_o () │ │ │ │ │ -398 { │ │ │ │ │ -399 removeReference(); │ │ │ │ │ -400 } │ │ │ │ │ -401 │ │ │ │ │ -402 │ │ │ │ │ -403 template< int dim > │ │ │ │ │ -404 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> & │ │ │ │ │ -_4_0_5 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) │ │ │ │ │ -406 { │ │ │ │ │ -407 other.addReference(); │ │ │ │ │ -408 removeReference(); │ │ │ │ │ -409 instance_ = other.instance_; │ │ │ │ │ -410 return *this; │ │ │ │ │ -411 } │ │ │ │ │ -412 │ │ │ │ │ -413 template< int dim > │ │ │ │ │ -414 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> & │ │ │ │ │ -_4_1_5 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &&other ) │ │ │ │ │ -416 { │ │ │ │ │ -417 using _s_t_d_:_:_s_w_a_p; │ │ │ │ │ -418 swap( instance_, other.instance_ ); │ │ │ │ │ -419 return *this; │ │ │ │ │ -420 } │ │ │ │ │ -421 │ │ │ │ │ -422 template< int dim > │ │ │ │ │ -423 inline bool │ │ │ │ │ -_4_2_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) const │ │ │ │ │ -425 { │ │ │ │ │ -426 return (instance_->elInfo.el == other.instance_->_e_l_I_n_f_o.el); │ │ │ │ │ -427 } │ │ │ │ │ -428 │ │ │ │ │ -429 │ │ │ │ │ -430 template< int dim > │ │ │ │ │ -431 inline bool │ │ │ │ │ -_4_3_2 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_!_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) const │ │ │ │ │ -433 { │ │ │ │ │ -434 return (instance_->elInfo.el != other.instance_->_e_l_I_n_f_o.el); │ │ │ │ │ -435 } │ │ │ │ │ -436 │ │ │ │ │ -437 │ │ │ │ │ -438 template< int dim > │ │ │ │ │ -439 inline const typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_M_a_c_r_o_E_l_e_m_e_n_t & │ │ │ │ │ -_4_4_0 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_a_c_r_o_E_l_e_m_e_n_t () const │ │ │ │ │ -441 { │ │ │ │ │ -442 assert( !!(*this) ); │ │ │ │ │ -443 assert( elInfo().macro_el != NULL ); │ │ │ │ │ -444 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & >( *(elInfo().macro_el) ); │ │ │ │ │ -445 } │ │ │ │ │ -446 │ │ │ │ │ -447 │ │ │ │ │ -448 template< int dim > │ │ │ │ │ -_4_4_9 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_f_a_t_h_e_r () const │ │ │ │ │ -450 { │ │ │ │ │ -451 assert( !!(*this) ); │ │ │ │ │ -452 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance_->parent() ); │ │ │ │ │ -453 } │ │ │ │ │ -454 │ │ │ │ │ -455 │ │ │ │ │ -456 template< int dim > │ │ │ │ │ -_4_5_7 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r () const │ │ │ │ │ -458 { │ │ │ │ │ -459 const _E_l_e_m_e_n_t *element = elInfo()._e_l; │ │ │ │ │ -460 const _E_l_e_m_e_n_t *father = elInfo().parent->el; │ │ │ │ │ -461 assert( father != NULL ); │ │ │ │ │ -462 │ │ │ │ │ -463 const int index = (father->child[ 0 ] == element ? 0 : 1); │ │ │ │ │ -464 assert( father->child[ index ] == element ); │ │ │ │ │ -465 return index; │ │ │ │ │ -466 } │ │ │ │ │ -467 │ │ │ │ │ -468 │ │ │ │ │ -469 template< int dim > │ │ │ │ │ -_4_7_0 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_h_i_l_d ( int i ) const │ │ │ │ │ -471 { │ │ │ │ │ -472 assert( !isLeaf() ); │ │ │ │ │ -473 │ │ │ │ │ -474 _I_n_s_t_a_n_c_e_P_t_r child = stack().allocate(); │ │ │ │ │ -475 child->_p_a_r_e_n_t() = instance_; │ │ │ │ │ -476 addReference(); │ │ │ │ │ -477 │ │ │ │ │ -478 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ -479 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ -480 child->_e_l_I_n_f_o.opp_vertex[ k ] = -2; │ │ │ │ │ -481 │ │ │ │ │ -482 fill( i, elInfo(), child->_e_l_I_n_f_o ); │ │ │ │ │ -483 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( child ); │ │ │ │ │ -484 } │ │ │ │ │ -485 │ │ │ │ │ -486 │ │ │ │ │ -487 template< int dim > │ │ │ │ │ -_4_8_8 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_L_e_a_f () const │ │ │ │ │ -489 { │ │ │ │ │ -490 assert( !(*this) == false ); │ │ │ │ │ -491 return isLeaf( el() ); │ │ │ │ │ -492 } │ │ │ │ │ -493 │ │ │ │ │ -494 │ │ │ │ │ -495 template< int dim > │ │ │ │ │ -_4_9_6 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_s_e_e_d () const │ │ │ │ │ -497 { │ │ │ │ │ -498 assert( !!(*this) ); │ │ │ │ │ -499 │ │ │ │ │ -500 int level = 0; │ │ │ │ │ -501 unsigned long path = 0; │ │ │ │ │ -502 for( _I_n_s_t_a_n_c_e_P_t_r p = instance_; p->_p_a_r_e_n_t() != null(); p = p->_p_a_r_e_n_t() ) │ │ │ │ │ -503 { │ │ │ │ │ -504 const _E_l_e_m_e_n_t *element = p->_e_l_I_n_f_o.el; │ │ │ │ │ -505 const _E_l_e_m_e_n_t *father = p->parent()->elInfo.el; │ │ │ │ │ -506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 │ │ │ │ │ -] == element ); │ │ │ │ │ -507 path = (path << 1) | child; │ │ │ │ │ -508 ++level; │ │ │ │ │ -509 } │ │ │ │ │ -510 │ │ │ │ │ -511 if( level != elInfo().level ) │ │ │ │ │ -512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." ); │ │ │ │ │ -513 │ │ │ │ │ -514 return _S_e_e_d( macroElement().index, level, path ); │ │ │ │ │ -515 } │ │ │ │ │ -516 │ │ │ │ │ -517 │ │ │ │ │ -518 template< int dim > │ │ │ │ │ -_5_1_9 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_M_e_s_h_P_o_i_n_t_e_r _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_e_s_h () │ │ │ │ │ -const │ │ │ │ │ -520 { │ │ │ │ │ -521 return _M_e_s_h_P_o_i_n_t_e_r( elInfo().mesh ); │ │ │ │ │ -522 } │ │ │ │ │ -523 │ │ │ │ │ -524 │ │ │ │ │ -525 template< int dim > │ │ │ │ │ -_5_2_6 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ │ -527 { │ │ │ │ │ -528 return mightVanish( el(), 0 ); │ │ │ │ │ -529 } │ │ │ │ │ -530 │ │ │ │ │ -531 │ │ │ │ │ -532 template< int dim > │ │ │ │ │ -_5_3_3 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_v_e_l () const │ │ │ │ │ -534 { │ │ │ │ │ -535 return elInfo().level; │ │ │ │ │ -536 } │ │ │ │ │ -537 │ │ │ │ │ -538 │ │ │ │ │ -539 template< int dim > │ │ │ │ │ -_5_4_0 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_y_p_e () const │ │ │ │ │ -541 { │ │ │ │ │ -542 return 0; │ │ │ │ │ -543 } │ │ │ │ │ -544 │ │ │ │ │ -545 │ │ │ │ │ -546 template<> │ │ │ │ │ -_5_4_7 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _3_ _>_:_:_t_y_p_e () const │ │ │ │ │ -548 { │ │ │ │ │ -549 return instance_->elInfo.el_type; │ │ │ │ │ -550 } │ │ │ │ │ -551 │ │ │ │ │ -552 │ │ │ │ │ -553 template< int dim > │ │ │ │ │ -_5_5_4 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_g_e_t_M_a_r_k () const │ │ │ │ │ -555 { │ │ │ │ │ -556 return el()->mark; │ │ │ │ │ -557 } │ │ │ │ │ -558 │ │ │ │ │ -559 │ │ │ │ │ -560 template< int dim > │ │ │ │ │ -_5_6_1 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_s_e_t_M_a_r_k ( int refCount ) const │ │ │ │ │ -562 { │ │ │ │ │ -563 assert( isLeaf() ); │ │ │ │ │ -564 assert( (refCount >= -128) && (refCount < 127) ); │ │ │ │ │ -565 el()->mark = refCount; │ │ │ │ │ -566 } │ │ │ │ │ -567 │ │ │ │ │ -568 │ │ │ │ │ -569 template< int dim > │ │ │ │ │ -_5_7_0 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_a_s_L_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const │ │ │ │ │ -571 { │ │ │ │ │ -572 assert( !!(*this) ); │ │ │ │ │ -573 assert( (face >= 0) && (face < maxNeighbors) ); │ │ │ │ │ -574 │ │ │ │ │ -575 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ -576 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ -577 if( macroFace >= 0 ) │ │ │ │ │ -578 return (macroElement().neighbor( macroFace ) != NULL); │ │ │ │ │ -579 else │ │ │ │ │ -580 return true; │ │ │ │ │ -581 } │ │ │ │ │ -582 │ │ │ │ │ -583 │ │ │ │ │ -584 template< int dim > │ │ │ │ │ -_5_8_5 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_a_f_N_e_i_g_h_b_o_r ( const int face │ │ │ │ │ -) const │ │ │ │ │ -586 { │ │ │ │ │ -587 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ │ -588 _E_l_e_m_e_n_t_I_n_f_o neighbor; │ │ │ │ │ -589 Library< dimWorld >::leafNeighbor( *this, face, neighbor ); │ │ │ │ │ -590 return neighbor; │ │ │ │ │ -591 } │ │ │ │ │ -592 │ │ │ │ │ -593 │ │ │ │ │ -594 template< int dim > │ │ │ │ │ -595 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ -_5_9_6_ _:_:_l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const int face, _E_l_e_m_e_n_t_I_n_f_o (&neighbor) │ │ │ │ │ -[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const │ │ │ │ │ -597 { │ │ │ │ │ -598 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ │ -599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, │ │ │ │ │ -faceInNeighbor ); │ │ │ │ │ -600 } │ │ │ │ │ -601 │ │ │ │ │ -602 │ │ │ │ │ -603 template< int dim > │ │ │ │ │ -604 template< int codim > │ │ │ │ │ -_6_0_5 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_w_i_s_t ( int subEntity ) const │ │ │ │ │ -606 { │ │ │ │ │ -607 return _T_w_i_s_t_<_ _d_i_m_,_ _d_i_m_-_c_o_d_i_m_ _>_:_:_t_w_i_s_t( element(), subEntity ); │ │ │ │ │ -608 } │ │ │ │ │ -609 │ │ │ │ │ -610 │ │ │ │ │ -611 template< int dim > │ │ │ │ │ -_6_1_2 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_w_i_s_t_I_n_N_e_i_g_h_b_o_r ( const int face ) const │ │ │ │ │ -613 { │ │ │ │ │ -614 assert( neighbor( face ) != NULL ); │ │ │ │ │ -615 return _T_w_i_s_t_<_ _d_i_m_,_ _d_i_m_-_1_ _>_:_:_t_w_i_s_t( neighbor( face ), elInfo().opp_vertex │ │ │ │ │ -[ face ] ); │ │ │ │ │ -616 } │ │ │ │ │ -617 │ │ │ │ │ -618 │ │ │ │ │ -619 template< int dim > │ │ │ │ │ -_6_2_0 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_B_o_u_n_d_a_r_y ( int face ) const │ │ │ │ │ -621 { │ │ │ │ │ -622 assert( !!(*this) ); │ │ │ │ │ -623 assert( (face >= 0) && (face < maxNeighbors) ); │ │ │ │ │ -624 │ │ │ │ │ -625 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ -626 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ -627 if( macroFace >= 0 ) │ │ │ │ │ -628 return macroElement().isBoundary( macroFace ); │ │ │ │ │ -629 else │ │ │ │ │ -630 return false; │ │ │ │ │ -631 } │ │ │ │ │ -632 │ │ │ │ │ -633 │ │ │ │ │ -634 template< int dim > │ │ │ │ │ -_6_3_5 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( int face ) const │ │ │ │ │ -636 { │ │ │ │ │ -637 assert( !!(*this) ); │ │ │ │ │ -638 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ │ -639 │ │ │ │ │ -640 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ -641 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ -642 const int id = macroElement().boundaryId( macroFace ); │ │ │ │ │ -643 // this assertion is only allowed, if FILL_BOUND is set │ │ │ │ │ -644 // assert( id == elInfo().wall_bound[ face ] ); │ │ │ │ │ -645 return id; │ │ │ │ │ -646 } │ │ │ │ │ -647 │ │ │ │ │ -648 │ │ │ │ │ -649 template< int dim > │ │ │ │ │ -650 inline _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n * │ │ │ │ │ -_6_5_1 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int face ) const │ │ │ │ │ -652 { │ │ │ │ │ -653 assert( !!(*this) ); │ │ │ │ │ -654 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ │ -655 │ │ │ │ │ -656 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ -657 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ -658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]); │ │ │ │ │ -659 } │ │ │ │ │ -660 │ │ │ │ │ -661 │ │ │ │ │ -662 template< int dim > │ │ │ │ │ -663 inline _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n * │ │ │ │ │ -_6_6_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n ( int face ) const │ │ │ │ │ -665 { │ │ │ │ │ -666 assert( !!(*this) ); │ │ │ │ │ -667 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ │ -668 │ │ │ │ │ -669 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ -670 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ -671 if( macroFace >= 0 ) │ │ │ │ │ -672 return static_cast< _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n * >( macroElement().projection │ │ │ │ │ -[ macroFace+1 ] ); │ │ │ │ │ -673 else │ │ │ │ │ -674 return 0; │ │ │ │ │ -675 } │ │ │ │ │ -676 │ │ │ │ │ -677 │ │ │ │ │ -678 template< int dim > │ │ │ │ │ -_6_7_9 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_a_s_C_o_o_r_d_i_n_a_t_e_s () const │ │ │ │ │ -680 { │ │ │ │ │ -681 return ((elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s) != 0); │ │ │ │ │ -682 } │ │ │ │ │ -683 │ │ │ │ │ -684 template< int dim > │ │ │ │ │ -_6_8_5 inline const _G_l_o_b_a_l_V_e_c_t_o_r &_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_o_o_r_d_i_n_a_t_e ( int vertex ) │ │ │ │ │ -const │ │ │ │ │ -686 { │ │ │ │ │ -687 assert( hasCoordinates() ); │ │ │ │ │ -688 assert( (vertex >= 0) && (vertex < numVertices) ); │ │ │ │ │ -689 return elInfo().coord[ vertex ]; │ │ │ │ │ -690 } │ │ │ │ │ -691 │ │ │ │ │ -692 │ │ │ │ │ -693 template< int dim > │ │ │ │ │ -694 template< class Functor > │ │ │ │ │ -_6_9_5 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor ) │ │ │ │ │ -const │ │ │ │ │ -696 { │ │ │ │ │ -697 functor( *this ); │ │ │ │ │ -698 if( !isLeaf() ) │ │ │ │ │ -699 { │ │ │ │ │ -700 child( 0 ).hierarchicTraverse( functor ); │ │ │ │ │ -701 child( 1 ).hierarchicTraverse( functor ); │ │ │ │ │ -702 } │ │ │ │ │ -703 } │ │ │ │ │ -704 │ │ │ │ │ -705 │ │ │ │ │ -706 template< int dim > │ │ │ │ │ -707 template< class Functor > │ │ │ │ │ -_7_0_8 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor ) const │ │ │ │ │ -709 { │ │ │ │ │ -710 if( !isLeaf() ) │ │ │ │ │ -711 { │ │ │ │ │ -712 child( 0 ).leafTraverse( functor ); │ │ │ │ │ -713 child( 1 ).leafTraverse( functor ); │ │ │ │ │ -714 } │ │ │ │ │ -715 else │ │ │ │ │ -716 functor( *this ); │ │ │ │ │ -717 } │ │ │ │ │ -718 │ │ │ │ │ -719 │ │ │ │ │ -720 template< int dim > │ │ │ │ │ -_7_2_1 inline const _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t () const │ │ │ │ │ -722 { │ │ │ │ │ -723 return elInfo().el; │ │ │ │ │ -724 } │ │ │ │ │ -725 │ │ │ │ │ -726 │ │ │ │ │ -727 template< int dim > │ │ │ │ │ -_7_2_8 inline const _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( int face ) const │ │ │ │ │ -729 { │ │ │ │ │ -730 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ │ -731 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r) != 0 ); │ │ │ │ │ -732 return elInfo().neigh[ face ]; │ │ │ │ │ -733 } │ │ │ │ │ -734 │ │ │ │ │ -735 │ │ │ │ │ -736 template< int dim > │ │ │ │ │ -_7_3_7 inline _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l () const │ │ │ │ │ -738 { │ │ │ │ │ -739 return elInfo().el; │ │ │ │ │ -740 } │ │ │ │ │ -741 │ │ │ │ │ -742 │ │ │ │ │ -743 template< int dim > │ │ │ │ │ -_7_4_4 inline _A_L_B_E_R_T_A EL_INFO &_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l_I_n_f_o () const │ │ │ │ │ -745 { │ │ │ │ │ -746 return (instance_->elInfo); │ │ │ │ │ -747 } │ │ │ │ │ -748 │ │ │ │ │ -749 │ │ │ │ │ -750 template< int dim > │ │ │ │ │ -751 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ -_7_5_2 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_F_a_k_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, │ │ │ │ │ -753 const _E_l_e_m_e_n_t *element, int level, int type ) │ │ │ │ │ -754 { │ │ │ │ │ -755 _I_n_s_t_a_n_c_e_P_t_r instance = stack().allocate(); │ │ │ │ │ -756 instance->_p_a_r_e_n_t() = null(); │ │ │ │ │ -757 ++(instance->_p_a_r_e_n_t()->_r_e_f_C_o_u_n_t); │ │ │ │ │ -758 │ │ │ │ │ -759 instance->_e_l_I_n_f_o.mesh = mesh; │ │ │ │ │ -760 instance->_e_l_I_n_f_o.macro_el = NULL; │ │ │ │ │ -761 instance->_e_l_I_n_f_o.el = const_cast< _E_l_e_m_e_n_t * >( element ); │ │ │ │ │ -762 instance->_e_l_I_n_f_o.parent = NULL; │ │ │ │ │ -763 instance->_e_l_I_n_f_o.fill_flag = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g; │ │ │ │ │ -764 instance->_e_l_I_n_f_o.level = level; │ │ │ │ │ -765 instance->_e_l_I_n_f_o.el_type = type; │ │ │ │ │ -766 │ │ │ │ │ -767 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance ); │ │ │ │ │ -768 } │ │ │ │ │ -769 │ │ │ │ │ -770 │ │ │ │ │ -771 template< int dim > │ │ │ │ │ -772 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ -_7_7_3 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_F_a_k_e ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ -774 { │ │ │ │ │ -775 _I_n_s_t_a_n_c_e_P_t_r instance = stack().allocate(); │ │ │ │ │ -776 instance->_p_a_r_e_n_t() = null(); │ │ │ │ │ -777 ++(instance->_p_a_r_e_n_t()->_r_e_f_C_o_u_n_t); │ │ │ │ │ -778 │ │ │ │ │ -779 instance->_e_l_I_n_f_o = elInfo; │ │ │ │ │ -780 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance ); │ │ │ │ │ -781 } │ │ │ │ │ -782 │ │ │ │ │ -783 │ │ │ │ │ -784 template< int dim > │ │ │ │ │ -785 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_L_e_a_f ( _E_l_e_m_e_n_t *element ) │ │ │ │ │ -786 { │ │ │ │ │ -787 return IS_LEAF_EL( element ); │ │ │ │ │ -788 } │ │ │ │ │ -789 │ │ │ │ │ -790 │ │ │ │ │ -791 template< int dim > │ │ │ │ │ -792 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h ( _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element, │ │ │ │ │ -int depth ) │ │ │ │ │ -793 { │ │ │ │ │ -794 if( isLeaf( element ) ) │ │ │ │ │ -795 return (element->mark < depth); │ │ │ │ │ -796 else │ │ │ │ │ -797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish │ │ │ │ │ -( element->child[ 1 ], depth-1 )); │ │ │ │ │ -798 } │ │ │ │ │ -799 │ │ │ │ │ -800 │ │ │ │ │ -801 template< int dim > │ │ │ │ │ -802 inline void ElementInfo< dim > │ │ │ │ │ -803 ::fill ( _M_e_s_h *mesh, const _A_L_B_E_R_T_A MACRO_EL *mel, _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ -804 { │ │ │ │ │ -805 _A_L_B_E_R_T_A fill_macro_info( mesh, mel, &elInfo ); │ │ │ │ │ -806 } │ │ │ │ │ -807 │ │ │ │ │ -808 template< int dim > │ │ │ │ │ -809 inline void ElementInfo< dim > │ │ │ │ │ -810 ::fill ( int ichild, const _A_L_B_E_R_T_A EL_INFO &parentInfo, _A_L_B_E_R_T_A EL_INFO │ │ │ │ │ -&elInfo ) │ │ │ │ │ -811 { │ │ │ │ │ -812 _A_L_B_E_R_T_A fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo ); │ │ │ │ │ -813 } │ │ │ │ │ -814 │ │ │ │ │ -815 │ │ │ │ │ -816 template< int dim > │ │ │ │ │ -817 inline void ElementInfo< dim >::addReference () const │ │ │ │ │ -818 { │ │ │ │ │ -819 ++(instance_->refCount); │ │ │ │ │ -820 } │ │ │ │ │ -821 │ │ │ │ │ -822 │ │ │ │ │ -823 template< int dim > │ │ │ │ │ -824 inline void ElementInfo< dim >::removeReference () const │ │ │ │ │ -825 { │ │ │ │ │ -826 // short-circuit for rvalues that have been drained as argument to a move │ │ │ │ │ -operation │ │ │ │ │ -827 if ( !instance_ ) │ │ │ │ │ -828 return; │ │ │ │ │ -829 // this loop breaks when instance becomes null() │ │ │ │ │ -830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; ) │ │ │ │ │ -831 { │ │ │ │ │ -832 const InstancePtr parent = instance->parent(); │ │ │ │ │ -833 stack().release( instance ); │ │ │ │ │ -834 instance = parent; │ │ │ │ │ -835 } │ │ │ │ │ -836 } │ │ │ │ │ -837 │ │ │ │ │ -838 │ │ │ │ │ -839 template< int dim > │ │ │ │ │ -840 inline typename ElementInfo< dim >::InstancePtr │ │ │ │ │ -841 ElementInfo< dim >::null () │ │ │ │ │ -842 { │ │ │ │ │ -843 return stack().null(); │ │ │ │ │ -844 } │ │ │ │ │ -845 │ │ │ │ │ -846 │ │ │ │ │ -847 template< int dim > │ │ │ │ │ -848 inline typename ElementInfo< dim >::Stack & │ │ │ │ │ -849 ElementInfo< dim >::stack () │ │ │ │ │ -850 { │ │ │ │ │ -851 static Stack s; │ │ │ │ │ -852 return s; │ │ │ │ │ -853 } │ │ │ │ │ -854 │ │ │ │ │ -855 │ │ │ │ │ -856 │ │ │ │ │ -857 // Implementation of ElementInfo::Stack │ │ │ │ │ -858 // ------------------------------------ │ │ │ │ │ -859 │ │ │ │ │ -860 template< int dim > │ │ │ │ │ -_8_6_1 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_S_t_a_c_k () │ │ │ │ │ -862 : top_( 0 ) │ │ │ │ │ -863 { │ │ │ │ │ -864 null_._e_l_I_n_f_o.el = NULL; │ │ │ │ │ -865 null_._r_e_f_C_o_u_n_t = 1; │ │ │ │ │ -866 null_._p_a_r_e_n_t() = 0; │ │ │ │ │ -867 } │ │ │ │ │ -868 │ │ │ │ │ -869 │ │ │ │ │ -870 template< int dim > │ │ │ │ │ -_8_7_1 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_~_S_t_a_c_k () │ │ │ │ │ -872 { │ │ │ │ │ -873 while( top_ != 0 ) │ │ │ │ │ -874 { │ │ │ │ │ -875 _I_n_s_t_a_n_c_e_P_t_r p = top_; │ │ │ │ │ -876 top_ = p->_p_a_r_e_n_t(); │ │ │ │ │ -877 delete p; │ │ │ │ │ -878 } │ │ │ │ │ -879 } │ │ │ │ │ -880 │ │ │ │ │ -881 │ │ │ │ │ -882 template< int dim > │ │ │ │ │ -883 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e_P_t_r │ │ │ │ │ -_8_8_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_a_l_l_o_c_a_t_e () │ │ │ │ │ -885 { │ │ │ │ │ -886 _I_n_s_t_a_n_c_e_P_t_r p = top_; │ │ │ │ │ -887 if( p != 0 ) │ │ │ │ │ -888 top_ = p->_p_a_r_e_n_t(); │ │ │ │ │ -889 else │ │ │ │ │ -890 p = new _I_n_s_t_a_n_c_e; │ │ │ │ │ -891 p->_r_e_f_C_o_u_n_t = 0; │ │ │ │ │ -892 return p; │ │ │ │ │ -893 } │ │ │ │ │ -894 │ │ │ │ │ -895 │ │ │ │ │ -896 template< int dim > │ │ │ │ │ -_8_9_7 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_r_e_l_e_a_s_e ( _I_n_s_t_a_n_c_e_P_t_r &p ) │ │ │ │ │ -898 { │ │ │ │ │ -899 assert( (p != null()) && (p->_r_e_f_C_o_u_n_t == 0) ); │ │ │ │ │ -900 p->_p_a_r_e_n_t() = top_; │ │ │ │ │ -901 top_ = p; │ │ │ │ │ -902 } │ │ │ │ │ -903 │ │ │ │ │ -904 │ │ │ │ │ -905 template< int dim > │ │ │ │ │ -906 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e_P_t_r │ │ │ │ │ -_9_0_7 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_n_u_l_l () │ │ │ │ │ -908 { │ │ │ │ │ -909 return &null_; │ │ │ │ │ -910 } │ │ │ │ │ -911 │ │ │ │ │ -912 } // namespace Alberta │ │ │ │ │ -913 │ │ │ │ │ -914} // namespace Dune │ │ │ │ │ -915 │ │ │ │ │ -916#endif // #if HAVE_ALBERTA │ │ │ │ │ -917 │ │ │ │ │ -918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ │ -_m_a_c_r_o_e_l_e_m_e_n_t_._h_h │ │ │ │ │ -_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ │ -void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ -> &b) │ │ │ │ │ -DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ +208 return ; │ │ │ │ │ +209 } │ │ │ │ │ +210 │ │ │ │ │ +211 template │ │ │ │ │ +212 inline void _I_n_d_e_x_S_t_a_c_k_<_T_,_l_e_n_g_t_h_>_:_:_c_l_e_a_r_S_t_a_c_k () │ │ │ │ │ +213 { │ │ │ │ │ +214 if(stack_) │ │ │ │ │ +215 { │ │ │ │ │ +216 delete stack_; │ │ │ │ │ +217 stack_ = new StackType(); │ │ │ │ │ +218 assert(stack_); │ │ │ │ │ +219 } │ │ │ │ │ +220 │ │ │ │ │ +221 while( !fullStackList_.empty() ) │ │ │ │ │ +222 { │ │ │ │ │ +223 StackType * st = fullStackList_.top(); │ │ │ │ │ +224 if(st) delete st; │ │ │ │ │ +225 fullStackList_.pop(); │ │ │ │ │ +226 } │ │ │ │ │ +227 return; │ │ │ │ │ +228 } │ │ │ │ │ +229 │ │ │ │ │ +230} // end namespace Dune │ │ │ │ │ +231#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ -ALBERTA MESH Mesh │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -ALBERTA EL Element │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_N_e_i_g_h_b_o_r │ │ │ │ │ -ElementInfo leafNeighbor(const int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:585 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_L_e_a_f │ │ │ │ │ -bool isLeaf() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:488 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ │ -static ElementInfo createFake(const MeshPointer &mesh, const Element *element, │ │ │ │ │ -int level, int type=0) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:752 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_h_i_l_d │ │ │ │ │ -ElementInfo child(int i) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:470 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_i_g_h_t_V_a_n_i_s_h │ │ │ │ │ -bool mightVanish() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:526 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_u_m_F_a_c_e_s │ │ │ │ │ -static const int numFaces │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_w_i_s_t │ │ │ │ │ -int twist(int subEntity) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:605 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_w_i_s_t_I_n_N_e_i_g_h_b_o_r │ │ │ │ │ -int twistInNeighbor(int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:612 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -Alberta::MacroElement< dimension > MacroElement │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ -BasicNodeProjection * boundaryProjection(int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:664 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -const MacroElement & macroElement() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:440 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s │ │ │ │ │ -static const int maxLevelNeighbors │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_f_a_t_h_e_r │ │ │ │ │ -ElementInfo father() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:449 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo(const ElementInfo &other) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:382 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -GeometryCacheProxy< dim > GeometryCache │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -ElementInfo & operator=(const ElementInfo &other) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:405 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_a_s_L_e_a_f_N_e_i_g_h_b_o_r │ │ │ │ │ -bool hasLeafNeighbor(const int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:570 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(const ElementInfo &other) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:424 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ -void hierarchicTraverse(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:695 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_y_p_e │ │ │ │ │ -int type() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:540 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_x_N_e_i_g_h_b_o_r_s │ │ │ │ │ -static const int maxNeighbors │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_s_e_t_M_a_r_k │ │ │ │ │ -void setMark(int refCount) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:561 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_~_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -~ElementInfo() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:397 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -const GlobalVector & coordinate(int vertex) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -static const int numVertices │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_g_e_t_M_a_r_k │ │ │ │ │ -int getMark() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:554 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ -void leafTraverse(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:708 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -const Element * neighbor(int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:728 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ │ -static ElementInfo createFake(const ALBERTA EL_INFO &elInfo) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:773 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:310 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:635 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ -bool operator!=(const ElementInfo &other) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:432 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -Alberta::FillFlags< dimension > FillFlags │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo(const MeshPointer &mesh, const MacroElement ¯oElement, typename │ │ │ │ │ -FillFlags::Flags fillFlags=FillFlags::standard) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -AffineTransformation * transformation(int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:651 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ -bool isBoundary(int face) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:620 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r │ │ │ │ │ -int indexInFather() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:457 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_s_e_e_d │ │ │ │ │ -Seed seed() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:496 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ -Element * el() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_e_m_e_n_t │ │ │ │ │ -const Element * element() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:721 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_I_n_f_o │ │ │ │ │ -ALBERTA EL_INFO & elInfo() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:744 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_e_s_h │ │ │ │ │ -MeshPointer mesh() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:519 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_g_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -GeometryCache geometryCache() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_a_s_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -bool hasCoordinates() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:679 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l_N_e_i_g_h_b_o_r_s │ │ │ │ │ -int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], │ │ │ │ │ -int(&faceInNeighbor)[maxLevelNeighbors]) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:596 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo(ElementInfo &&other) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:389 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags:: │ │ │ │ │ -Flags fillFlags=FillFlags::standard) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:340 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_p_a_r_e_n_t │ │ │ │ │ -InstancePtr & parent() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_g_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -Alberta::GeometryCache< dim > geometryCache │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_e_l_I_n_f_o │ │ │ │ │ -ALBERTA EL_INFO elInfo │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_r_e_f_C_o_u_n_t │ │ │ │ │ -unsigned int refCount │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_n_u_l_l │ │ │ │ │ -InstancePtr null() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:907 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_~_S_t_a_c_k │ │ │ │ │ -~Stack() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:871 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release(InstancePtr &p) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:897 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_S_t_a_c_k │ │ │ │ │ -Stack() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:861 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -InstancePtr allocate() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:884 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:255 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_S_e_e_d │ │ │ │ │ -Seed(const int macroIndex, const int level, const unsigned long path) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:260 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_S_e_e_d │ │ │ │ │ -Seed() │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:256 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:287 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ │ -bool isValid() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:284 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_p_a_t_h │ │ │ │ │ -unsigned long path() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:288 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_m_a_c_r_o_I_n_d_e_x │ │ │ │ │ -int macroIndex() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:286 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ -DDeeffiinniittiioonn geometrycache.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ -static const Flags nothing │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -static const Flags boundaryId │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:246 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ -ALBERTA FLAGS Flags │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s │ │ │ │ │ -static const Flags coords │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ │ -static const Flags standard │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:258 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -static const Flags neighbor │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_t_w_i_s_t │ │ │ │ │ -static int twist(const Element *element, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:538 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_r_e_s_t_o_r_e_I_n_d_e_x_S_e_t │ │ │ │ │ +void restoreIndexSet(std::istream &is) │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_c_h_e_c_k_A_n_d_S_e_t_M_a_x │ │ │ │ │ +void checkAndSetMax(T index) │ │ │ │ │ +set index as maxIndex if index is bigger than maxIndex │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_b_a_c_k_u_p_I_n_d_e_x_S_e_t │ │ │ │ │ +void backupIndexSet(std::ostream &os) │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_~_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ +~IndexStack() │ │ │ │ │ +Destructor, deleting all stacks. │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_g_e_t_I_n_d_e_x │ │ │ │ │ +T getIndex() │ │ │ │ │ +restore index from stack or create new index │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ +IndexStack() │ │ │ │ │ +Constructor, create new IndexStack. │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_s_e_t_M_a_x_I_n_d_e_x │ │ │ │ │ +void setMaxIndex(T index) │ │ │ │ │ +set index as maxIndex │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_s_i_z_e │ │ │ │ │ +int size() const │ │ │ │ │ +return maxIndex which is also the │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_t_e_s_t │ │ │ │ │ +void test() │ │ │ │ │ +test stack functionality │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_f_r_e_e_I_n_d_e_x │ │ │ │ │ +void freeIndex(T index) │ │ │ │ │ +store index on stack │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_t_a_c_k_:_:_g_e_t_M_a_x_I_n_d_e_x │ │ │ │ │ +int getMaxIndex() const │ │ │ │ │ +return maxIndex which is also the │ │ │ │ │ +DDeeffiinniittiioonn indexstack.hh:76 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchiciterator.hh File Reference │ │ │ │ +dune-grid: leafiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,25 +72,27 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchiciterator.hh File Reference
│ │ │ │ +
leafiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/common/entityiterator.hh>
│ │ │ │ +
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ +#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaGridHierarchicIterator< GridImp >
class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
 
class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +2,22 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchiciterator.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +leafiterator.hh File Reference │ │ │ │ │ #include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchiciterator.hh Source File │ │ │ │ +dune-grid: leafiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,210 +74,146 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchiciterator.hh
│ │ │ │ +
leafiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │ -
6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11#if HAVE_ALBERTA
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 // AlbertaGridHierarchicIterator
│ │ │ │ -
17 // -----------------------------
│ │ │ │ -
18
│ │ │ │ -
27 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
33 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
34 typedef typename GridImp::ctype ctype;
│ │ │ │ -
35
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 // AlbertaGridLeafIterator
│ │ │ │ +
18 // -----------------------
│ │ │ │ +
19
│ │ │ │ +
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ │ +
23 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef typename Base::Entity Entity;
│ │ │ │ + │ │ │ │ +
30
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
32 {}
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ +
36 : Base( grid, level )
│ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │
38
│ │ │ │ -
39 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
42 {}
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
45 AlbertaGridHierarchicIterator ( const GridImp &grid,
│ │ │ │ -
46 const ElementInfo &elementInfo,
│ │ │ │ -
47 int maxLevel );
│ │ │ │ -
48
│ │ │ │ -
50 AlbertaGridHierarchicIterator ( const GridImp &grid, int actLevel, int maxLevel );
│ │ │ │ -
51
│ │ │ │ -
53 AlbertaGridHierarchicIterator ( const This &other );
│ │ │ │ -
54
│ │ │ │ -
56 This &operator= ( const This &other );
│ │ │ │ -
57
│ │ │ │ -
59 void increment();
│ │ │ │ +
│ │ │ │ +
40 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ │ +
41 const MarkerVector *vec,
│ │ │ │ +
42 int level )
│ │ │ │ +
43 : Base( grid, vec, level )
│ │ │ │ +
44 {}
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
47 void increment ()
│ │ │ │ +
48 {
│ │ │ │ + │ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51 };
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
53
│ │ │ │ +
54 template< int codim, class GridImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ │ +
57 {
│ │ │ │ + │ │ │ │ + │ │ │ │
60
│ │ │ │ -
│ │ │ │ -
62 bool equals ( const This &other ) const
│ │ │ │ -
63 {
│ │ │ │ -
64 return entity_.impl().equals( other.entity_.impl() );
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69 {
│ │ │ │ -
70 return entity_;
│ │ │ │ -
71 }
│ │ │ │ +
61 public:
│ │ │ │ +
62 typedef typename Base::Entity Entity;
│ │ │ │ + │ │ │ │ +
64
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 {}
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
69 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ +
70 : Base( grid, level )
│ │ │ │ +
71 {}
│ │ │ │
│ │ │ │
72
│ │ │ │
│ │ │ │ -
74 int level () const
│ │ │ │ -
75 {
│ │ │ │ -
76 return entity_.impl().level();
│ │ │ │ -
77 }
│ │ │ │ +
74 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ │ +
75 const MarkerVector *,
│ │ │ │ +
76 int level )
│ │ │ │ +
77 : Base( grid, level )
│ │ │ │ +
78 {}
│ │ │ │
│ │ │ │ -
78
│ │ │ │ -
79 protected:
│ │ │ │ +
79
│ │ │ │
│ │ │ │ -
81 const GridImp &grid () const
│ │ │ │ -
82 {
│ │ │ │ -
83 return entity_.impl().grid();
│ │ │ │ +
81 void increment ()
│ │ │ │ +
82 {
│ │ │ │ + │ │ │ │
84 }
│ │ │ │
│ │ │ │ -
85
│ │ │ │ -
86 private:
│ │ │ │ -
87 void increment ( ElementInfo elementInfo );
│ │ │ │ +
85 };
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
87}
│ │ │ │
88
│ │ │ │ -
89 mutable Entity entity_;
│ │ │ │ +
89#endif // #if HAVE_ALBERTA
│ │ │ │
90
│ │ │ │ -
91 // level on which the iterator was started
│ │ │ │ -
92 int startLevel_;
│ │ │ │ -
93
│ │ │ │ -
94 // maximal level to go down to
│ │ │ │ -
95 int maxlevel_;
│ │ │ │ -
96 };
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
98
│ │ │ │ -
99 template< class GridImp >
│ │ │ │ -
100 inline AlbertaGridHierarchicIterator< GridImp >
│ │ │ │ -
│ │ │ │ -
101 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int maxLevel )
│ │ │ │ -
102 : entity_( EntityImp( grid ) ),
│ │ │ │ -
103 startLevel_( actLevel ),
│ │ │ │ -
104 maxlevel_( maxLevel )
│ │ │ │ -
105 {}
│ │ │ │ -
│ │ │ │ -
106
│ │ │ │ -
107
│ │ │ │ -
108 template< class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 const ElementInfo &elementInfo,
│ │ │ │ -
112 int maxLevel )
│ │ │ │ -
113 : entity_( EntityImp( grid ) ),
│ │ │ │ -
114 startLevel_( elementInfo.level() ),
│ │ │ │ -
115 maxlevel_( maxLevel )
│ │ │ │ -
116 {
│ │ │ │ -
117 increment( elementInfo );
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120
│ │ │ │ -
121 template< class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
124 : entity_( other.entity_ ),
│ │ │ │ -
125 startLevel_( other.startLevel_ ),
│ │ │ │ -
126 maxlevel_( other.maxlevel_ )
│ │ │ │ -
127 {}
│ │ │ │ -
│ │ │ │ -
128
│ │ │ │ -
129
│ │ │ │ -
130 template< class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
133 {
│ │ │ │ -
134 entity_ = other.entity_;
│ │ │ │ -
135 startLevel_ = other.startLevel_;
│ │ │ │ -
136 maxlevel_ = other.maxlevel_;
│ │ │ │ -
137 return *this;
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
140
│ │ │ │ -
141 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
143 {
│ │ │ │ -
144 increment( entity_.impl().elementInfo() );
│ │ │ │ -
145 }
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
147 template< class GridImp >
│ │ │ │ - │ │ │ │ -
149 ::increment ( ElementInfo elementInfo )
│ │ │ │ -
150 {
│ │ │ │ -
151 assert( !elementInfo == false );
│ │ │ │ -
152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() )
│ │ │ │ -
153 {
│ │ │ │ -
154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() == 1) )
│ │ │ │ -
155 elementInfo = elementInfo.father();
│ │ │ │ -
156 if( elementInfo.level() > startLevel_ )
│ │ │ │ -
157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 );
│ │ │ │ -
158 else
│ │ │ │ -
159 entity_.impl().clearElement();
│ │ │ │ -
160 }
│ │ │ │ -
161 else
│ │ │ │ -
162 entity_.impl().setElement( elementInfo.child( 0 ), 0 );
│ │ │ │ -
163 }
│ │ │ │ -
164
│ │ │ │ -
165}
│ │ │ │ -
166
│ │ │ │ -
167#endif // #if HAVE_ALBERTA
│ │ │ │ -
168
│ │ │ │ -
169#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ +
91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ +
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition hierarchiciterator.hh:29
│ │ │ │ -
Entity & dereference() const
dereferencing
Definition hierarchiciterator.hh:68
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition hierarchiciterator.hh:33
│ │ │ │ -
const GridImp & grid() const
obtain a reference to the grid
Definition hierarchiciterator.hh:81
│ │ │ │ -
EntityImp::ElementInfo ElementInfo
Definition hierarchiciterator.hh:39
│ │ │ │ -
int level() const
ask for level of entities
Definition hierarchiciterator.hh:74
│ │ │ │ -
AlbertaGridHierarchicIterator()
Definition hierarchiciterator.hh:41
│ │ │ │ -
void increment()
increment
Definition hierarchiciterator.hh:142
│ │ │ │ -
GridImp::ctype ctype
Definition hierarchiciterator.hh:34
│ │ │ │ -
EntityObject::ImplementationType EntityImp
Definition hierarchiciterator.hh:37
│ │ │ │ -
bool equals(const This &other) const
equality
Definition hierarchiciterator.hh:62
│ │ │ │ -
This & operator=(const This &other)
assignment operator
Definition hierarchiciterator.hh:132
│ │ │ │ -
MakeableInterfaceObject< Entity > EntityObject
Definition hierarchiciterator.hh:36
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ - │ │ │ │ -
InterfaceType::Implementation ImplementationType
Definition common/grid.hh:1108
│ │ │ │ +
Definition treeiterator.hh:189
│ │ │ │ +
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ │ +
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ │ +
void increment()
increment
Definition treeiterator.hh:411
│ │ │ │ +
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ │ +
Definition leafiterator.hh:23
│ │ │ │ +
Base::Entity Entity
Definition leafiterator.hh:28
│ │ │ │ +
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leafiterator.hh:35
│ │ │ │ +
Base::MarkerVector MarkerVector
Definition leafiterator.hh:29
│ │ │ │ +
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition leafiterator.hh:40
│ │ │ │ +
AlbertaGridLeafIterator()
Definition leafiterator.hh:31
│ │ │ │ +
void increment()
increment the iterator
Definition leafiterator.hh:47
│ │ │ │ + │ │ │ │ +
Base::Entity Entity
Definition leafiterator.hh:62
│ │ │ │ +
void increment()
increment the iterator
Definition leafiterator.hh:81
│ │ │ │ +
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition leafiterator.hh:74
│ │ │ │ + │ │ │ │ +
Base::MarkerVector MarkerVector
Definition leafiterator.hh:63
│ │ │ │ +
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leafiterator.hh:69
│ │ │ │ +
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,224 +1,176 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -hierarchiciterator.hh │ │ │ │ │ +leafiterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ -6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11#if HAVE_ALBERTA │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 // AlbertaGridHierarchicIterator │ │ │ │ │ -17 // ----------------------------- │ │ │ │ │ -18 │ │ │ │ │ -27 template< class GridImp > │ │ │ │ │ -_2_8 class _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -29 { │ │ │ │ │ -30 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ -31 │ │ │ │ │ -32 public: │ │ │ │ │ -_3_3 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ -_3_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ -35 │ │ │ │ │ -_3_6 typedef _M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ -_3_7 typedef typename _E_n_t_i_t_y_O_b_j_e_c_t_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e _E_n_t_i_t_y_I_m_p; │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12#if HAVE_ALBERTA │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 // AlbertaGridLeafIterator │ │ │ │ │ +18 // ----------------------- │ │ │ │ │ +19 │ │ │ │ │ +20 template< int codim, PartitionIteratorType pitype, class GridImp > │ │ │ │ │ +_2_1 class _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +22 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, true > │ │ │ │ │ +23 { │ │ │ │ │ +24 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ +25 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _> _B_a_s_e; │ │ │ │ │ +26 │ │ │ │ │ +27 public: │ │ │ │ │ +_2_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_2_9 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ +30 │ │ │ │ │ +_3_1 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r () │ │ │ │ │ +32 {} │ │ │ │ │ +33 │ │ │ │ │ +_3_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ +36 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ +37 {} │ │ │ │ │ 38 │ │ │ │ │ -_3_9 typedef typename EntityImp::ElementInfo _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -40 │ │ │ │ │ -_4_1 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () │ │ │ │ │ -42 {} │ │ │ │ │ -43 │ │ │ │ │ -45 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ -46 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ │ -47 int maxLevel ); │ │ │ │ │ -48 │ │ │ │ │ -50 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int actLevel, int │ │ │ │ │ -maxLevel ); │ │ │ │ │ -51 │ │ │ │ │ -53 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const This &other ); │ │ │ │ │ -54 │ │ │ │ │ -56 This &_o_p_e_r_a_t_o_r_=_ ( const This &other ); │ │ │ │ │ -57 │ │ │ │ │ -59 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ +_4_0 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +41 const _M_a_r_k_e_r_V_e_c_t_o_r *vec, │ │ │ │ │ +42 int _l_e_v_e_l ) │ │ │ │ │ +43 : _B_a_s_e( _g_r_i_d, vec, _l_e_v_e_l ) │ │ │ │ │ +44 {} │ │ │ │ │ +45 │ │ │ │ │ +_4_7 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +48 { │ │ │ │ │ +49 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ +50 } │ │ │ │ │ +51 }; │ │ │ │ │ +52 │ │ │ │ │ +53 │ │ │ │ │ +54 template< int codim, class GridImp > │ │ │ │ │ +_5_5 class _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r< codim, _G_h_o_s_t___P_a_r_t_i_t_i_o_n, GridImp > │ │ │ │ │ +56 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, true > │ │ │ │ │ +57 { │ │ │ │ │ +58 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ │ +59 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _> _B_a_s_e; │ │ │ │ │ 60 │ │ │ │ │ -_6_2 bool _e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ │ -63 { │ │ │ │ │ -64 return entity_.impl().equals( other.entity_.impl() ); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_8 _E_n_t_i_t_y &_d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ -69 { │ │ │ │ │ -70 return entity_; │ │ │ │ │ -71 } │ │ │ │ │ +61 public: │ │ │ │ │ +_6_2 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_6_3 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ +64 │ │ │ │ │ +_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r () │ │ │ │ │ +66 {} │ │ │ │ │ +67 │ │ │ │ │ +_6_9 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ │ +70 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ +71 {} │ │ │ │ │ 72 │ │ │ │ │ -_7_4 int _l_e_v_e_l () const │ │ │ │ │ -75 { │ │ │ │ │ -76 return entity_.impl().level(); │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79 protected: │ │ │ │ │ -_8_1 const GridImp &_g_r_i_d () const │ │ │ │ │ +_7_4 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +75 const _M_a_r_k_e_r_V_e_c_t_o_r *, │ │ │ │ │ +76 int _l_e_v_e_l ) │ │ │ │ │ +77 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ │ +78 {} │ │ │ │ │ +79 │ │ │ │ │ +_8_1 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ 82 { │ │ │ │ │ -83 return entity_.impl().grid(); │ │ │ │ │ +83 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ │ 84 } │ │ │ │ │ -85 │ │ │ │ │ -86 private: │ │ │ │ │ -87 void _i_n_c_r_e_m_e_n_t ( _E_l_e_m_e_n_t_I_n_f_o elementInfo ); │ │ │ │ │ +85 }; │ │ │ │ │ +86 │ │ │ │ │ +87} │ │ │ │ │ 88 │ │ │ │ │ -89 mutable _E_n_t_i_t_y entity_; │ │ │ │ │ +89#endif // #if HAVE_ALBERTA │ │ │ │ │ 90 │ │ │ │ │ -91 // level on which the iterator was started │ │ │ │ │ -92 int startLevel_; │ │ │ │ │ -93 │ │ │ │ │ -94 // maximal level to go down to │ │ │ │ │ -95 int maxlevel_; │ │ │ │ │ -96 }; │ │ │ │ │ -97 │ │ │ │ │ -98 │ │ │ │ │ -99 template< class GridImp > │ │ │ │ │ -100 inline AlbertaGridHierarchicIterator< GridImp > │ │ │ │ │ -_1_0_1 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int │ │ │ │ │ -maxLevel ) │ │ │ │ │ -102 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ -103 startLevel_( actLevel ), │ │ │ │ │ -104 maxlevel_( maxLevel ) │ │ │ │ │ -105 {} │ │ │ │ │ -106 │ │ │ │ │ -107 │ │ │ │ │ -108 template< class GridImp > │ │ │ │ │ -109 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -_1_1_0_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ │ -111 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ │ -112 int maxLevel ) │ │ │ │ │ -113 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ -114 startLevel_( elementInfo.level() ), │ │ │ │ │ -115 maxlevel_( maxLevel ) │ │ │ │ │ -116 { │ │ │ │ │ -117 _i_n_c_r_e_m_e_n_t( elementInfo ); │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120 │ │ │ │ │ -121 template< class GridImp > │ │ │ │ │ -122 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -_1_2_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r( const _T_h_i_s &other ) │ │ │ │ │ -124 : entity_( other.entity_ ), │ │ │ │ │ -125 startLevel_( other.startLevel_ ), │ │ │ │ │ -126 maxlevel_( other.maxlevel_ ) │ │ │ │ │ -127 {} │ │ │ │ │ -128 │ │ │ │ │ -129 │ │ │ │ │ -130 template< class GridImp > │ │ │ │ │ -131 inline typename _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_T_h_i_s & │ │ │ │ │ -_1_3_2 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -133 { │ │ │ │ │ -134 entity_ = other.entity_; │ │ │ │ │ -135 startLevel_ = other.startLevel_; │ │ │ │ │ -136 maxlevel_ = other.maxlevel_; │ │ │ │ │ -137 return *this; │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -140 │ │ │ │ │ -141 template< class GridImp > │ │ │ │ │ -_1_4_2 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t () │ │ │ │ │ -143 { │ │ │ │ │ -144 increment( entity_.impl().elementInfo() ); │ │ │ │ │ -145 } │ │ │ │ │ -146 │ │ │ │ │ -147 template< class GridImp > │ │ │ │ │ -148 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -149_ _:_:_i_n_c_r_e_m_e_n_t ( ElementInfo elementInfo ) │ │ │ │ │ -150 { │ │ │ │ │ -151 assert( !elementInfo == false ); │ │ │ │ │ -152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() ) │ │ │ │ │ -153 { │ │ │ │ │ -154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() │ │ │ │ │ -== 1) ) │ │ │ │ │ -155 elementInfo = elementInfo.father(); │ │ │ │ │ -156 if( elementInfo.level() > startLevel_ ) │ │ │ │ │ -157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 ); │ │ │ │ │ -158 else │ │ │ │ │ -159 entity_.impl().clearElement(); │ │ │ │ │ -160 } │ │ │ │ │ -161 else │ │ │ │ │ -162 entity_.impl().setElement( elementInfo.child( 0 ), 0 ); │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -165} │ │ │ │ │ -166 │ │ │ │ │ -167#endif // #if HAVE_ALBERTA │ │ │ │ │ -168 │ │ │ │ │ -169#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ +91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ _e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ +_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Ghost_Partition │ │ │ │ │ +only ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity & dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ │ -const GridImp & grid() const │ │ │ │ │ -obtain a reference to the grid │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -EntityImp::ElementInfo ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ int level() const │ │ │ │ │ ask for level of entities │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridHierarchicIterator() │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ void increment() │ │ │ │ │ increment │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_t_y_p_e │ │ │ │ │ -GridImp::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_I_m_p │ │ │ │ │ -EntityObject::ImplementationType EntityImp │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const This &other) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const This &other) │ │ │ │ │ -assignment operator │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_O_b_j_e_c_t │ │ │ │ │ -MakeableInterfaceObject< Entity > EntityObject │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> │ │ │ │ │ -_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _>_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e │ │ │ │ │ -InterfaceType::Implementation ImplementationType │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:1108 │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _t_r_u_e_ _>_:_:_g_r_i_d │ │ │ │ │ +const GridImp & grid() const │ │ │ │ │ +obtain a reference to the grid │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLeafIterator(const GridImp &grid, int level) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +Base::MarkerVector MarkerVector │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int │ │ │ │ │ +level) │ │ │ │ │ +Constructor making begin iterator. │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLeafIterator() │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment the iterator │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment the iterator │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level) │ │ │ │ │ +Constructor making begin iterator (which is the end iterator in this case) │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLeafIterator() │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +Base::MarkerVector MarkerVector │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridLeafIterator(const GridImp &grid, int level) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn leafiterator.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +marker assigning subentities to one element containing them │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofadmin.hh File Reference │ │ │ │ +dune-grid: macrodata.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,39 +72,46 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dofadmin.hh File Reference
│ │ │ │ +
macrodata.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <utility>
│ │ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ + │ │ │ │ +

provides a wrapper for ALBERTA's macro_data structure │ │ │ │ +More...

│ │ │ │ +
#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │ +#include <dune/grid/albertagrid/albertaheader.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::Alberta::DofAccess< dim, codim >
class  Dune::Alberta::MacroData< dim >
 
class  Dune::Alberta::HierarchyDofNumbering< dim >
struct  Dune::Alberta::MacroData< dim >::Library< int >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

provides a wrapper for ALBERTA's macro_data structure

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,32 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dofadmin.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +macrodata.hh File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_L_i_b_r_a_r_y_<_ _i_n_t_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofadmin.hh Source File │ │ │ │ +dune-grid: macrodata.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,387 +74,518 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dofadmin.hh
│ │ │ │ +
macrodata.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │ -
6#define DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_MACRODATA_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MACRODATA_HH
│ │ │ │
7
│ │ │ │ -
8#include <utility>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/hybridutilities.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15#if HAVE_ALBERTA
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │ +
14#include <dune/common/fmatrix.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
19
│ │ │ │ -
20 namespace Alberta
│ │ │ │ -
21 {
│ │ │ │ -
22
│ │ │ │ -
23 // External Forward Declarations
│ │ │ │ -
24 // -----------------------------
│ │ │ │ -
25
│ │ │ │ -
26 template< int dim >
│ │ │ │ -
27 class MeshPointer;
│ │ │ │ -
28
│ │ │ │ -
29
│ │ │ │ -
30
│ │ │ │ -
31 // DofAccess
│ │ │ │ -
32 // ---------
│ │ │ │ -
33
│ │ │ │ -
34 template< int dim, int codim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {
│ │ │ │ -
37 static const int codimtype = CodimType< dim, codim >::value;
│ │ │ │ +
20#if HAVE_ALBERTA
│ │ │ │ +
21
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │ +
24
│ │ │ │ +
25 namespace Alberta
│ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 typedef MacroData< dim > This;
│ │ │ │ +
32
│ │ │ │ +
33 typedef ALBERTA MACRO_DATA Data;
│ │ │ │ +
34
│ │ │ │ +
35 static const int dimension = dim;
│ │ │ │ +
36 static const int numVertices = NumSubEntities< dimension, dimension >::value;
│ │ │ │ +
37 static const int numEdges = NumSubEntities< dimension, dimension-1 >::value;
│ │ │ │
38
│ │ │ │ -
39 public:
│ │ │ │ - │ │ │ │ -
41
│ │ │ │ -
42 static const int dimension = dim;
│ │ │ │ -
43 static const int codimension = codim;
│ │ │ │ +
39 static const int initialSize = 4096;
│ │ │ │ +
40
│ │ │ │ +
41 public:
│ │ │ │ +
42 template< int >
│ │ │ │ +
43 struct Library;
│ │ │ │
44
│ │ │ │ - │ │ │ │ +
45 template< int > friend struct InstantiateMacroDataLibrary;
│ │ │ │
46
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
48 : node_( -1 )
│ │ │ │ -
49 {}
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 explicit DofAccess ( const DofSpace *dofSpace )
│ │ │ │ -
52 {
│ │ │ │ -
53 assert( dofSpace );
│ │ │ │ -
54 node_ = dofSpace->admin->mesh->node[ codimtype ];
│ │ │ │ -
55 index_ = dofSpace->admin->n0_dof[ codimtype ];
│ │ │ │ -
56 }
│ │ │ │ +
47 public:
│ │ │ │ +
48 typedef int ElementId[ numVertices ];
│ │ │ │ +
49
│ │ │ │ +
50 static const int supportPeriodicity = 1;
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
53 : data_( NULL ),
│ │ │ │ +
54 vertexCount_( -1 ),
│ │ │ │ +
55 elementCount_( -1 )
│ │ │ │ +
56 {}
│ │ │ │
│ │ │ │
57
│ │ │ │
│ │ │ │ -
58 int operator() ( const Element *element, int subEntity, int i ) const
│ │ │ │ -
59 {
│ │ │ │ -
60 assert( element );
│ │ │ │ -
61 assert( node_ != -1 );
│ │ │ │ -
62 assert( subEntity < numSubEntities );
│ │ │ │ -
63 return element->dof[ node_ + subEntity ][ index_ + i ];
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
66 int operator() ( const Element *element, int subEntity ) const
│ │ │ │ -
67 {
│ │ │ │ -
68 return (*this)( element, subEntity, 0 );
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ -
71 int operator() ( const ElementInfo &elementInfo, int subEntity, int i ) const
│ │ │ │ -
72 {
│ │ │ │ -
73 return (*this)( elementInfo.el(), subEntity, i );
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ +
58 operator Data * () const
│ │ │ │ +
59 {
│ │ │ │ +
60 return data_;
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ +
63 int vertexCount () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return (vertexCount_ < 0 ? data_->n_total_vertices : vertexCount_);
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
68 int elementCount () const
│ │ │ │ +
69 {
│ │ │ │ +
70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_);
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
73 ElementId &element ( int i ) const;
│ │ │ │ +
│ │ │ │ +
74 GlobalVector &vertex ( int i ) const;
│ │ │ │ +
│ │ │ │ +
75 int &neighbor ( int element, int i ) const;
│ │ │ │
│ │ │ │ -
76 int operator() ( const ElementInfo &elementInfo, int subEntity ) const
│ │ │ │ -
77 {
│ │ │ │ -
78 return (*this)( elementInfo.el(), subEntity );
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81 private:
│ │ │ │ -
82 int node_;
│ │ │ │ -
83 int index_;
│ │ │ │ -
84 };
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86
│ │ │ │ -
87
│ │ │ │ -
88 // HierarchyDofNumbering
│ │ │ │ -
89 // ---------------------
│ │ │ │ -
90
│ │ │ │ -
91 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
93 {
│ │ │ │ - │ │ │ │ -
95
│ │ │ │ -
96 public:
│ │ │ │ -
97 static const int dimension = dim;
│ │ │ │ -
98
│ │ │ │ - │ │ │ │ - │ │ │ │ -
101
│ │ │ │ -
102 private:
│ │ │ │ -
103 static const int nNodeTypes = N_NODE_TYPES;
│ │ │ │ -
104
│ │ │ │ -
105 template< int codim >
│ │ │ │ -
106 struct CreateDofSpace;
│ │ │ │ -
107
│ │ │ │ -
108 template< int codim >
│ │ │ │ -
109 struct CacheDofSpace;
│ │ │ │ -
110
│ │ │ │ -
111 typedef std::pair< int, int > Cache;
│ │ │ │ -
112
│ │ │ │ -
113 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
115 {}
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
117 private:
│ │ │ │ -
118 HierarchyDofNumbering ( const This & );
│ │ │ │ -
119 This &operator= ( const This & );
│ │ │ │ -
120
│ │ │ │ -
121 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
123 {
│ │ │ │ -
124 release();
│ │ │ │ -
125 }
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ +
76 BoundaryId &boundaryId ( int element, int i ) const;
│ │ │ │ +
77
│ │ │ │ +
│ │ │ │ +
82 void create ();
│ │ │ │ +
83
│ │ │ │ +
│ │ │ │ +
92 void finalize ();
│ │ │ │ +
93
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
112 void setOrientation ( const Real orientation );
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
124 bool checkNeighbors () const;
│ │ │ │ +
125
│ │ │ │
│ │ │ │ -
127 int operator() ( const Element *element, int codim, unsigned int subEntity ) const
│ │ │ │ -
128 {
│ │ │ │ -
129 assert( !(*this) == false );
│ │ │ │ -
130 assert( (codim >= 0) && (codim <= dimension) );
│ │ │ │ -
131 const Cache &cache = cache_[ codim ];
│ │ │ │ -
132 return element->dof[ cache.first + subEntity ][ cache.second ];
│ │ │ │ -
133 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
│ │ │ │ -
135 int operator() ( const ElementInfo &element, int codim, unsigned int subEntity ) const
│ │ │ │ -
136 {
│ │ │ │ -
137 return (*this)( element.el(), codim, subEntity );
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
│ │ │ │ -
140 explicit operator bool () const
│ │ │ │ -
141 {
│ │ │ │ -
142 return (bool)mesh_;
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
│ │ │ │ -
145 const DofSpace *dofSpace ( int codim ) const
│ │ │ │ -
146 {
│ │ │ │ -
147 assert( *this );
│ │ │ │ -
148 assert( (codim >= 0) && (codim <= dimension) );
│ │ │ │ -
149 return dofSpace_[ codim ];
│ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
152 const DofSpace *emptyDofSpace () const
│ │ │ │ -
153 {
│ │ │ │ -
154 assert( *this );
│ │ │ │ -
155 return emptySpace_;
│ │ │ │ +
127 void release ()
│ │ │ │ +
128 {
│ │ │ │ +
129 if( data_ != NULL )
│ │ │ │ +
130 {
│ │ │ │ +
131 ALBERTA free_macro_data( data_ );
│ │ │ │ +
132 data_ = NULL;
│ │ │ │ +
133 }
│ │ │ │ +
134 vertexCount_ = elementCount_ = -1;
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
142 int insertElement ( const ElementId &id );
│ │ │ │ +
143
│ │ │ │ +
│ │ │ │ +
149 int insertVertex ( const GlobalVector &coords )
│ │ │ │ +
150 {
│ │ │ │ +
151 assert( vertexCount_ >= 0 );
│ │ │ │ +
152 if( vertexCount_ >= data_->n_total_vertices )
│ │ │ │ +
153 resizeVertices( 2*vertexCount_ );
│ │ │ │ +
154 copy( coords, vertex( vertexCount_ ) );
│ │ │ │ +
155 return vertexCount_++;
│ │ │ │
156 }
│ │ │ │
│ │ │ │
157
│ │ │ │ -
│ │ │ │ -
158 const MeshPointer &mesh () const
│ │ │ │ -
159 {
│ │ │ │ -
160 return mesh_;
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │
│ │ │ │ -
163 int size ( int codim ) const
│ │ │ │ -
164 {
│ │ │ │ -
165 return dofSpace( codim )->admin->size;
│ │ │ │ -
166 }
│ │ │ │ -
│ │ │ │ -
167
│ │ │ │ -
│ │ │ │ -
168 void create ( const MeshPointer &mesh );
│ │ │ │ -
169
│ │ │ │ -
│ │ │ │ -
170 void release ()
│ │ │ │ -
171 {
│ │ │ │ -
172 if( *this )
│ │ │ │ -
173 {
│ │ │ │ -
174 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ -
175 freeDofSpace( dofSpace_[ codim ] );
│ │ │ │ -
176 freeDofSpace( emptySpace_ );
│ │ │ │ -
177 mesh_ = MeshPointer();
│ │ │ │ -
178 }
│ │ │ │ -
179 }
│ │ │ │ -
│ │ │ │ -
180
│ │ │ │ -
181 private:
│ │ │ │ -
182 static const DofSpace *createEmptyDofSpace ( const MeshPointer &mesh );
│ │ │ │ -
183 static const DofSpace *createDofSpace ( const MeshPointer &mesh,
│ │ │ │ -
184 const std::string &name,
│ │ │ │ -
185 const int (&ndof)[ nNodeTypes ],
│ │ │ │ -
186 const bool periodic = false );
│ │ │ │ -
187 static void freeDofSpace ( const DofSpace *dofSpace );
│ │ │ │ -
188
│ │ │ │ -
189 MeshPointer mesh_;
│ │ │ │ -
190 const DofSpace *emptySpace_;
│ │ │ │ -
191 const DofSpace *dofSpace_[ dimension+1 ];
│ │ │ │ -
192 Cache cache_[ dimension+1 ];
│ │ │ │ -
193 };
│ │ │ │ -
194
│ │ │ │ +
163 int insertVertex ( const FieldVector< Real, dimWorld > &coords )
│ │ │ │ +
164 {
│ │ │ │ +
165 assert( vertexCount_ >= 0 );
│ │ │ │ +
166 if( vertexCount_ >= data_->n_total_vertices )
│ │ │ │ +
167 resizeVertices( 2*vertexCount_ );
│ │ │ │ +
168 copy( coords, vertex( vertexCount_ ) );
│ │ │ │ +
169 return vertexCount_++;
│ │ │ │ +
170 }
│ │ │ │ +
│ │ │ │ +
171
│ │ │ │ +
│ │ │ │ +
172 void insertWallTrafo ( const GlobalMatrix &m, const GlobalVector &t );
│ │ │ │ +
│ │ │ │ +
173 void insertWallTrafo ( const FieldMatrix< Real, dimWorld, dimWorld > &matrix,
│ │ │ │ +
174 const FieldVector< Real, dimWorld > &shift );
│ │ │ │ +
175
│ │ │ │ +
│ │ │ │ +
176 void checkCycles ();
│ │ │ │ +
177
│ │ │ │ +
│ │ │ │ +
178 void read ( const std::string &filename, bool binary = false );
│ │ │ │ +
179
│ │ │ │ +
│ │ │ │ +
180 bool write ( const std::string &filename, bool binary = false ) const
│ │ │ │ +
181 {
│ │ │ │ +
182 if( binary )
│ │ │ │ +
183 return ALBERTA write_macro_data_xdr( data_, filename.c_str() );
│ │ │ │ +
184 else
│ │ │ │ +
185 return ALBERTA write_macro_data( data_, filename.c_str() );
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
188 private:
│ │ │ │ +
189 template< class Vector >
│ │ │ │ +
190 void copy ( const Vector &x, GlobalVector &y )
│ │ │ │ +
191 {
│ │ │ │ +
192 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ +
193 y[ i ] = x[ i ];
│ │ │ │ +
194 }
│ │ │ │
195
│ │ │ │ -
196
│ │ │ │ -
197 template< int dim >
│ │ │ │ -
198 inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 release();
│ │ │ │ -
202
│ │ │ │ -
203 if( !mesh )
│ │ │ │ -
204 return;
│ │ │ │ +
196 void resizeElements ( const int newSize );
│ │ │ │ +
197
│ │ │ │ +
198 void resizeVertices ( const int newSize )
│ │ │ │ +
199 {
│ │ │ │ +
200 const int oldSize = data_->n_total_vertices;
│ │ │ │ +
201 data_->n_total_vertices = newSize;
│ │ │ │ +
202 data_->coords = memReAlloc< GlobalVector >( data_->coords, oldSize, newSize );
│ │ │ │ +
203 assert( (data_->coords != NULL) || (newSize == 0) );
│ │ │ │ +
204 }
│ │ │ │
205
│ │ │ │ -
206 mesh_ = mesh;
│ │ │ │ -
207
│ │ │ │ -
208 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ){ CreateDofSpace< i >::apply( mesh_, dofSpace_ ); } );
│ │ │ │ -
209 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ){ CacheDofSpace< i >::apply( dofSpace_, cache_ ); } );
│ │ │ │ -
210
│ │ │ │ -
211 emptySpace_ = createEmptyDofSpace( mesh_ );
│ │ │ │ -
212 for( int i = 0; i < nNodeTypes; ++i )
│ │ │ │ -
213 assert( emptySpace_->admin->n_dof[ i ] == 0 );
│ │ │ │ -
214 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
215
│ │ │ │ +
206 private:
│ │ │ │ +
207 Data *data_;
│ │ │ │ +
208 int vertexCount_;
│ │ │ │ +
209 int elementCount_;
│ │ │ │ +
210 };
│ │ │ │ +
211
│ │ │ │ +
212
│ │ │ │ +
213
│ │ │ │ +
214 // MacroData::Library
│ │ │ │ +
215 // ------------------
│ │ │ │
216
│ │ │ │ -
217
│ │ │ │ -
218 template< int dim >
│ │ │ │ -
219 inline const DofSpace *
│ │ │ │ - │ │ │ │ -
221 {
│ │ │ │ -
222 int ndof[ nNodeTypes ];
│ │ │ │ -
223 for( int i = 0; i < nNodeTypes; ++i )
│ │ │ │ -
224 ndof[ i ] = 0;
│ │ │ │ -
225 std::string name = "Empty";
│ │ │ │ -
226 return createDofSpace( mesh, name, ndof );
│ │ │ │ -
227 }
│ │ │ │ -
228
│ │ │ │ -
229
│ │ │ │ -
230 template< int dim >
│ │ │ │ -
231 inline const DofSpace *
│ │ │ │ -
232 HierarchyDofNumbering< dim >::createDofSpace ( const MeshPointer &mesh,
│ │ │ │ -
233 const std::string &name,
│ │ │ │ -
234 const int (&ndof)[ nNodeTypes ],
│ │ │ │ -
235 const bool periodic )
│ │ │ │ -
236 {
│ │ │ │ -
237 const ALBERTA FLAGS flags
│ │ │ │ -
238 = ADM_PRESERVE_COARSE_DOFS | (periodic ? ADM_PERIODIC : 0);
│ │ │ │ -
239 return ALBERTA get_dof_space ( mesh, name.c_str(), ndof, flags );
│ │ │ │ -
240 }
│ │ │ │ -
241
│ │ │ │ -
242
│ │ │ │ -
243 template< int dim >
│ │ │ │ -
244 inline void
│ │ │ │ -
245 HierarchyDofNumbering< dim >::freeDofSpace ( const DofSpace *dofSpace )
│ │ │ │ -
246 {
│ │ │ │ -
247 ALBERTA free_fe_space( dofSpace );
│ │ │ │ -
248 }
│ │ │ │ -
249
│ │ │ │ -
250
│ │ │ │ -
251
│ │ │ │ -
252 // HierarchyDofNumbering::CreateDofSpace
│ │ │ │ -
253 // -------------------------------------
│ │ │ │ -
254
│ │ │ │ -
255 template< int dim >
│ │ │ │ -
256 template< int codim >
│ │ │ │ -
257 struct HierarchyDofNumbering< dim >::CreateDofSpace
│ │ │ │ -
258 {
│ │ │ │ -
259 static void apply ( const MeshPointer &mesh, const DofSpace *(&dofSpace)[ dim+1 ] )
│ │ │ │ -
260 {
│ │ │ │ -
261 int ndof[ nNodeTypes ];
│ │ │ │ -
262 for( int i = 0; i < nNodeTypes; ++i )
│ │ │ │ -
263 ndof[ i ] = 0;
│ │ │ │ -
264 ndof[ CodimType< dim, codim >::value ] = 1;
│ │ │ │ -
265
│ │ │ │ -
266 std::string name = "Codimension ";
│ │ │ │ -
267 name += (char)(codim + '0');
│ │ │ │ -
268
│ │ │ │ -
269 dofSpace[ codim ] = createDofSpace( mesh, name, ndof );
│ │ │ │ -
270 assert( dofSpace[ codim ] );
│ │ │ │ -
271 }
│ │ │ │ -
272 };
│ │ │ │ -
273
│ │ │ │ -
274
│ │ │ │ -
275
│ │ │ │ -
276 // HierarchyDofNumbering::CacheDofSpace
│ │ │ │ -
277 // ------------------------------------
│ │ │ │ +
217 template< int dim >
│ │ │ │ +
218 template< int >
│ │ │ │ +
│ │ │ │ +
219 struct MacroData< dim >::Library
│ │ │ │ +
220 {
│ │ │ │ + │ │ │ │ +
222
│ │ │ │ +
223 static bool checkNeighbors ( const MacroData &macroData );
│ │ │ │ +
224 static void markLongestEdge ( MacroData &macroData );
│ │ │ │ +
225 static void setOrientation ( [[maybe_unused]] MacroData &macroData,
│ │ │ │ +
226 [[maybe_unused]] const Real orientation );
│ │ │ │ +
227
│ │ │ │ +
228 private:
│ │ │ │ +
229 static Real edgeLength ( const MacroData &macroData, const ElementId &e, int edge );
│ │ │ │ +
230 static int longestEdge ( const MacroData &macroData, const ElementId &e );
│ │ │ │ +
231
│ │ │ │ +
232 template< class Type >
│ │ │ │ +
233 static void rotate ( Type *array, int i, int shift );
│ │ │ │ +
234
│ │ │ │ +
235 static void rotate ( MacroData &macroData, int i, int shift );
│ │ │ │ +
236 static void swap ( MacroData &macroData, int el, int v1, int v2 );
│ │ │ │ +
237 };
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
239
│ │ │ │ +
240
│ │ │ │ +
241 // Implementation of MacroData
│ │ │ │ +
242 // ---------------------------
│ │ │ │ +
243
│ │ │ │ +
244 template< int dim >
│ │ │ │ +
245 inline typename MacroData< dim >::ElementId &
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
247 {
│ │ │ │ +
248 assert( (i >= 0) && (i < data_->n_macro_elements) );
│ │ │ │ +
249 const int offset = i * numVertices;
│ │ │ │ +
250 return *reinterpret_cast< ElementId * >( data_->mel_vertices + offset );
│ │ │ │ +
251 }
│ │ │ │ +
│ │ │ │ +
252
│ │ │ │ +
253
│ │ │ │ +
254 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
256 {
│ │ │ │ +
257 assert( (i >= 0) && (i < data_->n_total_vertices) );
│ │ │ │ +
258 return data_->coords[ i ];
│ │ │ │ +
259 }
│ │ │ │ +
│ │ │ │ +
260
│ │ │ │ +
261
│ │ │ │ +
262 template< int dim >
│ │ │ │ +
│ │ │ │ +
263 inline int &MacroData< dim >::neighbor ( int element, int i ) const
│ │ │ │ +
264 {
│ │ │ │ +
265 assert( (element >= 0) && (element < data_->n_macro_elements) );
│ │ │ │ +
266 assert( (i >= 0) && (i < numVertices) );
│ │ │ │ +
267 return data_->neigh[ element*numVertices + i ];
│ │ │ │ +
268 }
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
270
│ │ │ │ +
271 template< int dim >
│ │ │ │ +
│ │ │ │ +
272 inline BoundaryId &MacroData< dim >::boundaryId ( int element, int i ) const
│ │ │ │ +
273 {
│ │ │ │ +
274 assert( (element >= 0) && (element < data_->n_macro_elements) );
│ │ │ │ +
275 assert( (i >= 0) && (i < numVertices) );
│ │ │ │ +
276 return data_->boundary[ element*numVertices + i ];
│ │ │ │ +
277 }
│ │ │ │ +
│ │ │ │
278
│ │ │ │ -
279 template< int dim >
│ │ │ │ -
280 template< int codim >
│ │ │ │ -
281 struct HierarchyDofNumbering< dim >::CacheDofSpace
│ │ │ │ +
279
│ │ │ │ +
280 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │
282 {
│ │ │ │ -
283 static void apply ( const DofSpace *(&dofSpace)[ dim+1 ], Cache (&cache)[ dim+1 ] )
│ │ │ │ -
284 {
│ │ │ │ -
285 assert( dofSpace[ codim ] );
│ │ │ │ -
286 const int codimtype = CodimType< dim, codim >::value;
│ │ │ │ -
287 cache[ codim ].first = dofSpace[ codim ]->mesh->node[ codimtype ];
│ │ │ │ -
288 cache[ codim ].second = dofSpace[ codim ]->admin->n0_dof[ codimtype ];
│ │ │ │ -
289 }
│ │ │ │ -
290 };
│ │ │ │ +
283 release();
│ │ │ │ +
284 data_ = ALBERTA alloc_macro_data( dim, initialSize, initialSize );
│ │ │ │ +
285 data_->boundary = memAlloc< BoundaryId >( initialSize*numVertices );
│ │ │ │ +
286 if( dim == 3 )
│ │ │ │ +
287 data_->el_type = memAlloc< ElementType >( initialSize );
│ │ │ │ +
288 vertexCount_ = elementCount_ = 0;
│ │ │ │ +
289 elementCount_ = 0;
│ │ │ │ +
290 }
│ │ │ │ +
│ │ │ │
291
│ │ │ │ -
292 } // namespace Alberta
│ │ │ │ -
293
│ │ │ │ -
294} // namespace Dune
│ │ │ │ -
295
│ │ │ │ -
296#endif // #if HAVE_ALBERTA
│ │ │ │ -
297
│ │ │ │ -
298#endif // #ifndef DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │ -
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
292
│ │ │ │ +
293 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
295 {
│ │ │ │ +
296 if( (vertexCount_ >= 0) && (elementCount_ >= 0) )
│ │ │ │ +
297 {
│ │ │ │ +
298 resizeVertices( vertexCount_ );
│ │ │ │ +
299 resizeElements( elementCount_ );
│ │ │ │ +
300 ALBERTA compute_neigh_fast( data_ );
│ │ │ │ +
301
│ │ │ │ +
302 // assign default boundary id (if none is assigned)
│ │ │ │ +
303 for( int element = 0; element < elementCount_; ++element )
│ │ │ │ +
304 {
│ │ │ │ +
305 for( int i = 0; i < numVertices; ++i )
│ │ │ │ +
306 {
│ │ │ │ +
307 BoundaryId &id = boundaryId( element, i );
│ │ │ │ +
308 if( neighbor( element, i ) >= 0 )
│ │ │ │ +
309 {
│ │ │ │ +
310 assert( id == InteriorBoundary );
│ │ │ │ +
311 id = InteriorBoundary;
│ │ │ │ +
312 }
│ │ │ │ +
313 else
│ │ │ │ +
314 id = (id == InteriorBoundary ? DirichletBoundary : id);
│ │ │ │ +
315 }
│ │ │ │ +
316 }
│ │ │ │ +
317
│ │ │ │ +
318 vertexCount_ = elementCount_ = -1;
│ │ │ │ +
319 }
│ │ │ │ +
320 assert( (vertexCount_ < 0) && (elementCount_ < 0) );
│ │ │ │ +
321 }
│ │ │ │ +
│ │ │ │ +
322
│ │ │ │ +
323
│ │ │ │ +
324 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
326 {
│ │ │ │ + │ │ │ │ +
328 }
│ │ │ │ +
│ │ │ │ +
329
│ │ │ │ +
330
│ │ │ │ +
331 template< int dim >
│ │ │ │ +
│ │ │ │ +
332 inline void MacroData< dim >::setOrientation ( const Real orientation )
│ │ │ │ +
333 {
│ │ │ │ +
334 Library< dimWorld >::setOrientation( *this, orientation );
│ │ │ │ +
335 }
│ │ │ │ +
│ │ │ │ +
336
│ │ │ │ +
337
│ │ │ │ +
338 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
340 {
│ │ │ │ + │ │ │ │ +
342 }
│ │ │ │ +
│ │ │ │ +
343
│ │ │ │ +
344
│ │ │ │ +
345 template< int dim >
│ │ │ │ +
│ │ │ │ +
346 inline int MacroData< dim >::insertElement ( const ElementId &id )
│ │ │ │ +
347 {
│ │ │ │ +
348 assert( elementCount_ >= 0 );
│ │ │ │ +
349 if( elementCount_ >= data_->n_macro_elements )
│ │ │ │ +
350 resizeElements( 2*elementCount_ );
│ │ │ │ +
351
│ │ │ │ +
352 ElementId &e = element( elementCount_ );
│ │ │ │ +
353 for( int i = 0; i < numVertices; ++i )
│ │ │ │ +
354 {
│ │ │ │ +
355 e[ i ] = id[ i ];
│ │ │ │ +
356 boundaryId( elementCount_, i ) = InteriorBoundary;
│ │ │ │ +
357 }
│ │ │ │ +
358 if( dim == 3 )
│ │ │ │ +
359 data_->el_type[ elementCount_ ] = 0;
│ │ │ │ +
360
│ │ │ │ +
361 return elementCount_++;
│ │ │ │ +
362 }
│ │ │ │ +
│ │ │ │ +
363
│ │ │ │ +
364
│ │ │ │ +
365 template< int dim >
│ │ │ │ +
366 inline void MacroData< dim >
│ │ │ │ +
│ │ │ │ +
367 ::insertWallTrafo ( const GlobalMatrix &matrix, const GlobalVector &shift )
│ │ │ │ +
368 {
│ │ │ │ +
369 int &count = data_->n_wall_trafos;
│ │ │ │ +
370 AffineTransformation *&array = data_->wall_trafos;
│ │ │ │ +
371
│ │ │ │ +
372 // resize wall trafo array
│ │ │ │ +
373 array = memReAlloc< AffineTransformation >( array, count, count+1 );
│ │ │ │ +
374 assert( data_->wall_trafos != NULL );
│ │ │ │ +
375
│ │ │ │ +
376 // copy matrix and shift
│ │ │ │ +
377 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ +
378 copy( matrix[ i ], array[ count ].M[ i ] );
│ │ │ │ +
379 copy( shift, array[ count ].t );
│ │ │ │ +
380 ++count;
│ │ │ │ +
381 }
│ │ │ │ +
│ │ │ │ +
382
│ │ │ │ +
383 template< int dim >
│ │ │ │ +
384 inline void MacroData< dim >
│ │ │ │ +
│ │ │ │ +
385 ::insertWallTrafo ( const FieldMatrix< Real, dimWorld, dimWorld > &matrix,
│ │ │ │ +
386 const FieldVector< Real, dimWorld > &shift )
│ │ │ │ +
387 {
│ │ │ │ +
388 int &count = data_->n_wall_trafos;
│ │ │ │ +
389 AffineTransformation *&array = data_->wall_trafos;
│ │ │ │ +
390
│ │ │ │ +
391 // resize wall trafo array
│ │ │ │ +
392 array = memReAlloc< AffineTransformation >( array, count, count+1 );
│ │ │ │ +
393 assert( data_->wall_trafos != NULL );
│ │ │ │ +
394
│ │ │ │ +
395 // copy matrix and shift
│ │ │ │ +
396 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ +
397 copy( matrix[ i ], array[ count ].M[ i ] );
│ │ │ │ +
398 copy( shift, array[ count ].t );
│ │ │ │ +
399 ++count;
│ │ │ │ +
400 }
│ │ │ │ +
│ │ │ │ +
401
│ │ │ │ +
402
│ │ │ │ +
403 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
405 {
│ │ │ │ +
406 // ensure that the macro data has been finalized
│ │ │ │ +
407 finalize();
│ │ │ │ +
408 ALBERTA macro_test( data_, NULL );
│ │ │ │ +
409 }
│ │ │ │ +
│ │ │ │ +
410
│ │ │ │ +
411
│ │ │ │ +
412 template< int dim >
│ │ │ │ +
│ │ │ │ +
413 inline void MacroData< dim >::read ( const std::string &filename, bool binary )
│ │ │ │ +
414 {
│ │ │ │ +
415 release();
│ │ │ │ +
416 if( binary )
│ │ │ │ +
417 data_ = ALBERTA read_macro_xdr( filename.c_str() );
│ │ │ │ +
418 else
│ │ │ │ +
419 data_ = ALBERTA read_macro( filename.c_str() );
│ │ │ │ +
420 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
421
│ │ │ │ +
422
│ │ │ │ +
423 template< int dim >
│ │ │ │ +
424 inline void MacroData< dim >::resizeElements ( const int newSize )
│ │ │ │ +
425 {
│ │ │ │ +
426 const int oldSize = data_->n_macro_elements;
│ │ │ │ +
427 data_->n_macro_elements = newSize;
│ │ │ │ +
428 data_->mel_vertices = memReAlloc( data_->mel_vertices, oldSize*numVertices, newSize*numVertices );
│ │ │ │ +
429 data_->boundary = memReAlloc( data_->boundary, oldSize*numVertices, newSize*numVertices );
│ │ │ │ +
430 if( dim == 3 )
│ │ │ │ +
431 data_->el_type = memReAlloc( data_->el_type, oldSize, newSize );
│ │ │ │ +
432 assert( (newSize == 0) || (data_->mel_vertices != NULL) );
│ │ │ │ +
433 }
│ │ │ │ +
434
│ │ │ │ +
435 }
│ │ │ │ +
436
│ │ │ │ +
437}
│ │ │ │ +
438
│ │ │ │ +
439#endif // #if HAVE_ALBERTA
│ │ │ │ +
440
│ │ │ │ +
441#endif
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ - │ │ │ │ -
Definition dofadmin.hh:36
│ │ │ │ -
static const int dimension
Definition dofadmin.hh:42
│ │ │ │ -
DofAccess()
Definition dofadmin.hh:47
│ │ │ │ -
static const int codimension
Definition dofadmin.hh:43
│ │ │ │ -
static const int numSubEntities
Definition dofadmin.hh:40
│ │ │ │ -
DofAccess(const DofSpace *dofSpace)
Definition dofadmin.hh:51
│ │ │ │ -
int operator()(const Element *element, int subEntity, int i) const
Definition dofadmin.hh:58
│ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition dofadmin.hh:45
│ │ │ │ -
Definition dofadmin.hh:93
│ │ │ │ -
HierarchyDofNumbering()
Definition dofadmin.hh:114
│ │ │ │ -
int operator()(const Element *element, int codim, unsigned int subEntity) const
Definition dofadmin.hh:127
│ │ │ │ -
const MeshPointer & mesh() const
Definition dofadmin.hh:158
│ │ │ │ -
void create(const MeshPointer &mesh)
Definition dofadmin.hh:199
│ │ │ │ -
~HierarchyDofNumbering()
Definition dofadmin.hh:122
│ │ │ │ -
Alberta::MeshPointer< dimension > MeshPointer
Definition dofadmin.hh:99
│ │ │ │ -
int size(int codim) const
Definition dofadmin.hh:163
│ │ │ │ -
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition dofadmin.hh:100
│ │ │ │ -
static const int dimension
Definition dofadmin.hh:97
│ │ │ │ -
const DofSpace * emptyDofSpace() const
Definition dofadmin.hh:152
│ │ │ │ -
void release()
Definition dofadmin.hh:170
│ │ │ │ - │ │ │ │ -
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ +
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │ +
ALBERTA BNDRY_TYPE BoundaryId
Definition misc.hh:61
│ │ │ │ +
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
Definition misc.hh:85
│ │ │ │ +
static const int DirichletBoundary
Definition misc.hh:60
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
Definition macrodata.hh:30
│ │ │ │ +
friend struct InstantiateMacroDataLibrary
Definition macrodata.hh:45
│ │ │ │ +
BoundaryId & boundaryId(int element, int i) const
Definition macrodata.hh:272
│ │ │ │ +
int insertVertex(const GlobalVector &coords)
insert vertex
Definition macrodata.hh:149
│ │ │ │ +
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ │ +
static const int supportPeriodicity
Definition macrodata.hh:50
│ │ │ │ +
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ │ +
int elementCount() const
Definition macrodata.hh:68
│ │ │ │ +
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ │ +
int vertexCount() const
Definition macrodata.hh:63
│ │ │ │ +
void markLongestEdge()
mark the longest edge of all elements as refinement edges
Definition macrodata.hh:325
│ │ │ │ +
int insertVertex(const FieldVector< Real, dimWorld > &coords)
insert vertex
Definition macrodata.hh:163
│ │ │ │ +
bool checkNeighbors() const
check the neighbor information
Definition macrodata.hh:339
│ │ │ │ +
void insertWallTrafo(const FieldMatrix< Real, dimWorld, dimWorld > &matrix, const FieldVector< Real, dimWorld > &shift)
Definition macrodata.hh:385
│ │ │ │ +
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ │ +
void checkCycles()
Definition macrodata.hh:404
│ │ │ │ +
int & neighbor(int element, int i) const
Definition macrodata.hh:263
│ │ │ │ +
MacroData()
Definition macrodata.hh:52
│ │ │ │ +
void finalize()
compress macro data structure
Definition macrodata.hh:294
│ │ │ │ +
void insertWallTrafo(const GlobalMatrix &m, const GlobalVector &t)
Definition macrodata.hh:367
│ │ │ │ +
void setOrientation(const Real orientation)
set the orientation of all elements
Definition macrodata.hh:332
│ │ │ │ +
void create()
create a new macro data structure
Definition macrodata.hh:281
│ │ │ │ +
int insertElement(const ElementId &id)
insert element
Definition macrodata.hh:346
│ │ │ │ +
bool write(const std::string &filename, bool binary=false) const
Definition macrodata.hh:180
│ │ │ │ +
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ │ +
Definition macrodata.hh:220
│ │ │ │ +
static void markLongestEdge(MacroData &macroData)
│ │ │ │ +
Alberta::MacroData< dim > MacroData
Definition macrodata.hh:221
│ │ │ │
Definition misc.hh:148
│ │ │ │ -
Definition misc.hh:192
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,403 +1,531 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -dofadmin.hh │ │ │ │ │ +macrodata.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ -6#define DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_MACRODATA_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MACRODATA_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15#if HAVE_ALBERTA │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ 19 │ │ │ │ │ -20 namespace Alberta │ │ │ │ │ -21 { │ │ │ │ │ -22 │ │ │ │ │ -23 // External Forward Declarations │ │ │ │ │ -24 // ----------------------------- │ │ │ │ │ -25 │ │ │ │ │ -26 template< int dim > │ │ │ │ │ -27 class MeshPointer; │ │ │ │ │ -28 │ │ │ │ │ -29 │ │ │ │ │ -30 │ │ │ │ │ -31 // DofAccess │ │ │ │ │ -32 // --------- │ │ │ │ │ -33 │ │ │ │ │ -34 template< int dim, int codim > │ │ │ │ │ -_3_5 class _D_o_f_A_c_c_e_s_s │ │ │ │ │ -36 { │ │ │ │ │ -37 static const int codimtype = _C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +20#if HAVE_ALBERTA │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e │ │ │ │ │ +23{ │ │ │ │ │ +24 │ │ │ │ │ +25 namespace Alberta │ │ │ │ │ +26 { │ │ │ │ │ +27 │ │ │ │ │ +28 template< int dim > │ │ │ │ │ +_2_9 class _M_a_c_r_o_D_a_t_a │ │ │ │ │ +30 { │ │ │ │ │ +31 typedef _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ +32 │ │ │ │ │ +33 typedef _A_L_B_E_R_T_A MACRO_DATA Data; │ │ │ │ │ +34 │ │ │ │ │ +35 static const int dimension = dim; │ │ │ │ │ +36 static const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ │ +_v_a_l_u_e; │ │ │ │ │ +37 static const int numEdges = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dimension, dimension-1 >::value; │ │ │ │ │ 38 │ │ │ │ │ -39 public: │ │ │ │ │ -_4_0 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -41 │ │ │ │ │ -_4_2 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_4_3 static const int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +39 static const int initialSize = 4096; │ │ │ │ │ +40 │ │ │ │ │ +41 public: │ │ │ │ │ +42 template< int > │ │ │ │ │ +43 struct _L_i_b_r_a_r_y; │ │ │ │ │ 44 │ │ │ │ │ -_4_5 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +_4_5 template< int > friend struct _I_n_s_t_a_n_t_i_a_t_e_M_a_c_r_o_D_a_t_a_L_i_b_r_a_r_y; │ │ │ │ │ 46 │ │ │ │ │ -_4_7 _D_o_f_A_c_c_e_s_s () │ │ │ │ │ -48 : node_( -1 ) │ │ │ │ │ -49 {} │ │ │ │ │ -50 │ │ │ │ │ -_5_1 explicit _D_o_f_A_c_c_e_s_s ( const _D_o_f_S_p_a_c_e *dofSpace ) │ │ │ │ │ -52 { │ │ │ │ │ -53 assert( dofSpace ); │ │ │ │ │ -54 node_ = dofSpace->admin->mesh->node[ codimtype ]; │ │ │ │ │ -55 index_ = dofSpace->admin->n0_dof[ codimtype ]; │ │ │ │ │ -56 } │ │ │ │ │ +47 public: │ │ │ │ │ +_4_8 typedef int _E_l_e_m_e_n_t_I_d[ numVertices ]; │ │ │ │ │ +49 │ │ │ │ │ +_5_0 static const int _s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y = 1; │ │ │ │ │ +51 │ │ │ │ │ +_5_2 _M_a_c_r_o_D_a_t_a () │ │ │ │ │ +53 : data_( NULL ), │ │ │ │ │ +54 vertexCount_( -1 ), │ │ │ │ │ +55 elementCount_( -1 ) │ │ │ │ │ +56 {} │ │ │ │ │ 57 │ │ │ │ │ -_5_8 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int subEntity, int i ) const │ │ │ │ │ +_5_8 operator Data * () const │ │ │ │ │ 59 { │ │ │ │ │ -60 assert( element ); │ │ │ │ │ -61 assert( node_ != -1 ); │ │ │ │ │ -62 assert( subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s ); │ │ │ │ │ -63 return element->dof[ node_ + subEntity ][ index_ + i ]; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_6 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int subEntity ) const │ │ │ │ │ -67 { │ │ │ │ │ -68 return (*this)( element, subEntity, 0 ); │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -_7_1 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity, int i ) │ │ │ │ │ -const │ │ │ │ │ -72 { │ │ │ │ │ -73 return (*this)( elementInfo._e_l(), subEntity, i ); │ │ │ │ │ -74 } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) const │ │ │ │ │ -77 { │ │ │ │ │ -78 return (*this)( elementInfo._e_l(), subEntity ); │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -81 private: │ │ │ │ │ -82 int node_; │ │ │ │ │ -83 int index_; │ │ │ │ │ -84 }; │ │ │ │ │ -85 │ │ │ │ │ -86 │ │ │ │ │ -87 │ │ │ │ │ -88 // HierarchyDofNumbering │ │ │ │ │ -89 // --------------------- │ │ │ │ │ -90 │ │ │ │ │ -91 template< int dim > │ │ │ │ │ -_9_2 class _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -93 { │ │ │ │ │ -94 typedef _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ -95 │ │ │ │ │ -96 public: │ │ │ │ │ -_9_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -98 │ │ │ │ │ -_9_9 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -_1_0_0 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -101 │ │ │ │ │ -102 private: │ │ │ │ │ -103 static const int nNodeTypes = N_NODE_TYPES; │ │ │ │ │ -104 │ │ │ │ │ -105 template< int codim > │ │ │ │ │ -106 struct CreateDofSpace; │ │ │ │ │ -107 │ │ │ │ │ -108 template< int codim > │ │ │ │ │ -109 struct CacheDofSpace; │ │ │ │ │ -110 │ │ │ │ │ -111 typedef std::pair< int, int > Cache; │ │ │ │ │ -112 │ │ │ │ │ -113 public: │ │ │ │ │ -_1_1_4 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g () │ │ │ │ │ -115 {} │ │ │ │ │ -116 │ │ │ │ │ -117 private: │ │ │ │ │ -118 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g ( const This & ); │ │ │ │ │ -119 This &operator= ( const This & ); │ │ │ │ │ -120 │ │ │ │ │ -121 public: │ │ │ │ │ -_1_2_2 _~_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g () │ │ │ │ │ -123 { │ │ │ │ │ -124 _r_e_l_e_a_s_e(); │ │ │ │ │ -125 } │ │ │ │ │ -126 │ │ │ │ │ -_1_2_7 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int codim, unsigned int subEntity │ │ │ │ │ -) const │ │ │ │ │ +60 return data_; │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +_6_3 int _v_e_r_t_e_x_C_o_u_n_t () const │ │ │ │ │ +64 { │ │ │ │ │ +65 return (vertexCount_ < 0 ? data_->n_total_vertices : vertexCount_); │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 int _e_l_e_m_e_n_t_C_o_u_n_t () const │ │ │ │ │ +69 { │ │ │ │ │ +70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_); │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +_7_3 _E_l_e_m_e_n_t_I_d &_e_l_e_m_e_n_t ( int i ) const; │ │ │ │ │ +_7_4 _G_l_o_b_a_l_V_e_c_t_o_r &_v_e_r_t_e_x ( int i ) const; │ │ │ │ │ +_7_5 int &_n_e_i_g_h_b_o_r ( int _e_l_e_m_e_n_t, int i ) const; │ │ │ │ │ +_7_6 _B_o_u_n_d_a_r_y_I_d &_b_o_u_n_d_a_r_y_I_d ( int _e_l_e_m_e_n_t, int i ) const; │ │ │ │ │ +77 │ │ │ │ │ +_8_2 void _c_r_e_a_t_e (); │ │ │ │ │ +83 │ │ │ │ │ +_9_2 void _f_i_n_a_l_i_z_e (); │ │ │ │ │ +93 │ │ │ │ │ +_1_0_2 void _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e (); │ │ │ │ │ +103 │ │ │ │ │ +_1_1_2 void _s_e_t_O_r_i_e_n_t_a_t_i_o_n ( const _R_e_a_l orientation ); │ │ │ │ │ +113 │ │ │ │ │ +_1_2_4 bool _c_h_e_c_k_N_e_i_g_h_b_o_r_s () const; │ │ │ │ │ +125 │ │ │ │ │ +_1_2_7 void _r_e_l_e_a_s_e () │ │ │ │ │ 128 { │ │ │ │ │ -129 assert( !(*this) == false ); │ │ │ │ │ -130 assert( (codim >= 0) && (codim <= _d_i_m_e_n_s_i_o_n) ); │ │ │ │ │ -131 const Cache &cache = cache_[ codim ]; │ │ │ │ │ -132 return element->dof[ cache.first + subEntity ][ cache.second ]; │ │ │ │ │ +129 if( data_ != NULL ) │ │ │ │ │ +130 { │ │ │ │ │ +131 _A_L_B_E_R_T_A free_macro_data( data_ ); │ │ │ │ │ +132 data_ = NULL; │ │ │ │ │ 133 } │ │ │ │ │ -134 │ │ │ │ │ -_1_3_5 int _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &element, int codim, unsigned int │ │ │ │ │ -subEntity ) const │ │ │ │ │ -136 { │ │ │ │ │ -137 return (*this)( element._e_l(), codim, subEntity ); │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -_1_4_0 explicit operator bool () const │ │ │ │ │ -141 { │ │ │ │ │ -142 return (bool)mesh_; │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -_1_4_5 const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e ( int codim ) const │ │ │ │ │ -146 { │ │ │ │ │ -147 assert( *this ); │ │ │ │ │ -148 assert( (codim >= 0) && (codim <= _d_i_m_e_n_s_i_o_n) ); │ │ │ │ │ -149 return dofSpace_[ codim ]; │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -_1_5_2 const _D_o_f_S_p_a_c_e *_e_m_p_t_y_D_o_f_S_p_a_c_e () const │ │ │ │ │ -153 { │ │ │ │ │ -154 assert( *this ); │ │ │ │ │ -155 return emptySpace_; │ │ │ │ │ +134 vertexCount_ = elementCount_ = -1; │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +_1_4_2 int _i_n_s_e_r_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_d &id ); │ │ │ │ │ +143 │ │ │ │ │ +_1_4_9 int _i_n_s_e_r_t_V_e_r_t_e_x ( const _G_l_o_b_a_l_V_e_c_t_o_r &coords ) │ │ │ │ │ +150 { │ │ │ │ │ +151 assert( vertexCount_ >= 0 ); │ │ │ │ │ +152 if( vertexCount_ >= data_->n_total_vertices ) │ │ │ │ │ +153 resizeVertices( 2*vertexCount_ ); │ │ │ │ │ +154 copy( coords, _v_e_r_t_e_x( vertexCount_ ) ); │ │ │ │ │ +155 return vertexCount_++; │ │ │ │ │ 156 } │ │ │ │ │ 157 │ │ │ │ │ -_1_5_8 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h () const │ │ │ │ │ -159 { │ │ │ │ │ -160 return mesh_; │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -_1_6_3 int _s_i_z_e ( int codim ) const │ │ │ │ │ +_1_6_3 int _i_n_s_e_r_t_V_e_r_t_e_x ( const FieldVector< Real, dimWorld > &coords ) │ │ │ │ │ 164 { │ │ │ │ │ -165 return _d_o_f_S_p_a_c_e( codim )->admin->size; │ │ │ │ │ -166 } │ │ │ │ │ -167 │ │ │ │ │ -_1_6_8 void _c_r_e_a_t_e ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h ); │ │ │ │ │ -169 │ │ │ │ │ -_1_7_0 void _r_e_l_e_a_s_e () │ │ │ │ │ -171 { │ │ │ │ │ -172 if( *this ) │ │ │ │ │ -173 { │ │ │ │ │ -174 for( int codim = 0; codim <= _d_i_m_e_n_s_i_o_n; ++codim ) │ │ │ │ │ -175 freeDofSpace( dofSpace_[ codim ] ); │ │ │ │ │ -176 freeDofSpace( emptySpace_ ); │ │ │ │ │ -177 mesh_ = _M_e_s_h_P_o_i_n_t_e_r(); │ │ │ │ │ -178 } │ │ │ │ │ -179 } │ │ │ │ │ -180 │ │ │ │ │ -181 private: │ │ │ │ │ -182 static const _D_o_f_S_p_a_c_e *createEmptyDofSpace ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h ); │ │ │ │ │ -183 static const _D_o_f_S_p_a_c_e *createDofSpace ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, │ │ │ │ │ -184 const std::string &name, │ │ │ │ │ -185 const int (&ndof)[ nNodeTypes ], │ │ │ │ │ -186 const bool periodic = false ); │ │ │ │ │ -187 static void freeDofSpace ( const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e ); │ │ │ │ │ -188 │ │ │ │ │ -189 _M_e_s_h_P_o_i_n_t_e_r mesh_; │ │ │ │ │ -190 const _D_o_f_S_p_a_c_e *emptySpace_; │ │ │ │ │ -191 const _D_o_f_S_p_a_c_e *dofSpace_[ _d_i_m_e_n_s_i_o_n+1 ]; │ │ │ │ │ -192 Cache cache_[ _d_i_m_e_n_s_i_o_n+1 ]; │ │ │ │ │ -193 }; │ │ │ │ │ -194 │ │ │ │ │ +165 assert( vertexCount_ >= 0 ); │ │ │ │ │ +166 if( vertexCount_ >= data_->n_total_vertices ) │ │ │ │ │ +167 resizeVertices( 2*vertexCount_ ); │ │ │ │ │ +168 copy( coords, _v_e_r_t_e_x( vertexCount_ ) ); │ │ │ │ │ +169 return vertexCount_++; │ │ │ │ │ +170 } │ │ │ │ │ +171 │ │ │ │ │ +_1_7_2 void _i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const _G_l_o_b_a_l_M_a_t_r_i_x &m, const _G_l_o_b_a_l_V_e_c_t_o_r &t ); │ │ │ │ │ +_1_7_3 void _i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const FieldMatrix< Real, dimWorld, dimWorld > │ │ │ │ │ +&matrix, │ │ │ │ │ +174 const FieldVector< Real, dimWorld > &shift ); │ │ │ │ │ +175 │ │ │ │ │ +_1_7_6 void _c_h_e_c_k_C_y_c_l_e_s (); │ │ │ │ │ +177 │ │ │ │ │ +_1_7_8 void _r_e_a_d ( const std::string &filename, bool binary = false ); │ │ │ │ │ +179 │ │ │ │ │ +_1_8_0 bool _w_r_i_t_e ( const std::string &filename, bool binary = false ) const │ │ │ │ │ +181 { │ │ │ │ │ +182 if( binary ) │ │ │ │ │ +183 return _A_L_B_E_R_T_A write_macro_data_xdr( data_, filename.c_str() ); │ │ │ │ │ +184 else │ │ │ │ │ +185 return _A_L_B_E_R_T_A write_macro_data( data_, filename.c_str() ); │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +188 private: │ │ │ │ │ +189 template< class Vector > │ │ │ │ │ +190 void copy ( const Vector &x, _G_l_o_b_a_l_V_e_c_t_o_r &y ) │ │ │ │ │ +191 { │ │ │ │ │ +192 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ +193 y[ i ] = x[ i ]; │ │ │ │ │ +194 } │ │ │ │ │ 195 │ │ │ │ │ -196 │ │ │ │ │ -197 template< int dim > │ │ │ │ │ -198 inline void │ │ │ │ │ -_1_9_9 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh ) │ │ │ │ │ -200 { │ │ │ │ │ -201 release(); │ │ │ │ │ -202 │ │ │ │ │ -203 if( !mesh ) │ │ │ │ │ -204 return; │ │ │ │ │ +196 void resizeElements ( const int newSize ); │ │ │ │ │ +197 │ │ │ │ │ +198 void resizeVertices ( const int newSize ) │ │ │ │ │ +199 { │ │ │ │ │ +200 const int oldSize = data_->n_total_vertices; │ │ │ │ │ +201 data_->n_total_vertices = newSize; │ │ │ │ │ +202 data_->coords = memReAlloc< GlobalVector >( data_->coords, oldSize, newSize │ │ │ │ │ +); │ │ │ │ │ +203 assert( (data_->coords != NULL) || (newSize == 0) ); │ │ │ │ │ +204 } │ │ │ │ │ 205 │ │ │ │ │ -206 mesh_ = mesh; │ │ │ │ │ -207 │ │ │ │ │ -208 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CreateDofSpace< i >::apply( mesh_, dofSpace_ ); } ); │ │ │ │ │ -209 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ CacheDofSpace< i >::apply( dofSpace_, cache_ ); } ); │ │ │ │ │ -210 │ │ │ │ │ -211 emptySpace_ = createEmptyDofSpace( mesh_ ); │ │ │ │ │ -212 for( int i = 0; i < nNodeTypes; ++i ) │ │ │ │ │ -213 assert( emptySpace_->admin->n_dof[ i ] == 0 ); │ │ │ │ │ -214 } │ │ │ │ │ -215 │ │ │ │ │ +206 private: │ │ │ │ │ +207 Data *data_; │ │ │ │ │ +208 int vertexCount_; │ │ │ │ │ +209 int elementCount_; │ │ │ │ │ +210 }; │ │ │ │ │ +211 │ │ │ │ │ +212 │ │ │ │ │ +213 │ │ │ │ │ +214 // MacroData::Library │ │ │ │ │ +215 // ------------------ │ │ │ │ │ 216 │ │ │ │ │ -217 │ │ │ │ │ -218 template< int dim > │ │ │ │ │ -219 inline const _D_o_f_S_p_a_c_e * │ │ │ │ │ -220 _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_E_m_p_t_y_D_o_f_S_p_a_c_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh │ │ │ │ │ -) │ │ │ │ │ -221 { │ │ │ │ │ -222 int ndof[ nNodeTypes ]; │ │ │ │ │ -223 for( int i = 0; i < nNodeTypes; ++i ) │ │ │ │ │ -224 ndof[ i ] = 0; │ │ │ │ │ -225 std::string name = "Empty"; │ │ │ │ │ -226 return createDofSpace( mesh, name, ndof ); │ │ │ │ │ -227 } │ │ │ │ │ -228 │ │ │ │ │ -229 │ │ │ │ │ -230 template< int dim > │ │ │ │ │ -231 inline const _D_o_f_S_p_a_c_e * │ │ │ │ │ -232 HierarchyDofNumbering< dim >::createDofSpace ( const MeshPointer &mesh, │ │ │ │ │ -233 const std::string &name, │ │ │ │ │ -234 const int (&ndof)[ nNodeTypes ], │ │ │ │ │ -235 const bool periodic ) │ │ │ │ │ -236 { │ │ │ │ │ -237 const _A_L_B_E_R_T_A FLAGS flags │ │ │ │ │ -238 = ADM_PRESERVE_COARSE_DOFS | (periodic ? ADM_PERIODIC : 0); │ │ │ │ │ -239 return _A_L_B_E_R_T_A get_dof_space ( mesh, name.c_str(), ndof, flags ); │ │ │ │ │ -240 } │ │ │ │ │ -241 │ │ │ │ │ -242 │ │ │ │ │ -243 template< int dim > │ │ │ │ │ -244 inline void │ │ │ │ │ -245 HierarchyDofNumbering< dim >::freeDofSpace ( const _D_o_f_S_p_a_c_e *dofSpace ) │ │ │ │ │ -246 { │ │ │ │ │ -247 _A_L_B_E_R_T_A free_fe_space( dofSpace ); │ │ │ │ │ -248 } │ │ │ │ │ -249 │ │ │ │ │ -250 │ │ │ │ │ -251 │ │ │ │ │ -252 // HierarchyDofNumbering::CreateDofSpace │ │ │ │ │ -253 // ------------------------------------- │ │ │ │ │ -254 │ │ │ │ │ -255 template< int dim > │ │ │ │ │ -256 template< int codim > │ │ │ │ │ -257 struct HierarchyDofNumbering< dim >::CreateDofSpace │ │ │ │ │ -258 { │ │ │ │ │ -259 static void apply ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, const _D_o_f_S_p_a_c_e *(&_d_o_f_S_p_a_c_e) │ │ │ │ │ -[ dim+1 ] ) │ │ │ │ │ -260 { │ │ │ │ │ -261 int ndof[ nNodeTypes ]; │ │ │ │ │ -262 for( int i = 0; i < nNodeTypes; ++i ) │ │ │ │ │ -263 ndof[ i ] = 0; │ │ │ │ │ -264 ndof[ CodimType< dim, codim >::value ] = 1; │ │ │ │ │ -265 │ │ │ │ │ -266 std::string name = "Codimension "; │ │ │ │ │ -267 name += (char)(codim + '0'); │ │ │ │ │ -268 │ │ │ │ │ -269 _d_o_f_S_p_a_c_e[ codim ] = createDofSpace( _m_e_s_h, name, ndof ); │ │ │ │ │ -270 assert( _d_o_f_S_p_a_c_e[ codim ] ); │ │ │ │ │ -271 } │ │ │ │ │ -272 }; │ │ │ │ │ -273 │ │ │ │ │ -274 │ │ │ │ │ -275 │ │ │ │ │ -276 // HierarchyDofNumbering::CacheDofSpace │ │ │ │ │ -277 // ------------------------------------ │ │ │ │ │ +217 template< int dim > │ │ │ │ │ +218 template< int > │ │ │ │ │ +_2_1_9 struct _M_a_c_r_o_D_a_t_a< dim >::_L_i_b_r_a_r_y │ │ │ │ │ +220 { │ │ │ │ │ +_2_2_1 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> _M_a_c_r_o_D_a_t_a; │ │ │ │ │ +222 │ │ │ │ │ +223 static bool _c_h_e_c_k_N_e_i_g_h_b_o_r_s ( const _M_a_c_r_o_D_a_t_a ¯oData ); │ │ │ │ │ +_2_2_4 static void _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e ( _M_a_c_r_o_D_a_t_a ¯oData ); │ │ │ │ │ +225 static void _s_e_t_O_r_i_e_n_t_a_t_i_o_n ( [[maybe_unused]] _M_a_c_r_o_D_a_t_a ¯oData, │ │ │ │ │ +226 [[maybe_unused]] const _R_e_a_l orientation ); │ │ │ │ │ +227 │ │ │ │ │ +228 private: │ │ │ │ │ +229 static _R_e_a_l edgeLength ( const _M_a_c_r_o_D_a_t_a ¯oData, const _E_l_e_m_e_n_t_I_d &e, │ │ │ │ │ +int edge ); │ │ │ │ │ +230 static int longestEdge ( const _M_a_c_r_o_D_a_t_a ¯oData, const _E_l_e_m_e_n_t_I_d &e ); │ │ │ │ │ +231 │ │ │ │ │ +232 template< class Type > │ │ │ │ │ +233 static void rotate ( Type *array, int i, int shift ); │ │ │ │ │ +234 │ │ │ │ │ +235 static void rotate ( _M_a_c_r_o_D_a_t_a ¯oData, int i, int shift ); │ │ │ │ │ +236 static void swap ( _M_a_c_r_o_D_a_t_a ¯oData, int el, int v1, int v2 ); │ │ │ │ │ +237 }; │ │ │ │ │ +238 │ │ │ │ │ +239 │ │ │ │ │ +240 │ │ │ │ │ +241 // Implementation of MacroData │ │ │ │ │ +242 // --------------------------- │ │ │ │ │ +243 │ │ │ │ │ +244 template< int dim > │ │ │ │ │ +245 inline typename _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_d & │ │ │ │ │ +_2_4_6 _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t ( int i ) const │ │ │ │ │ +247 { │ │ │ │ │ +248 assert( (i >= 0) && (i < data_->n_macro_elements) ); │ │ │ │ │ +249 const int offset = i * numVertices; │ │ │ │ │ +250 return *reinterpret_cast< ElementId * >( data_->mel_vertices + offset ); │ │ │ │ │ +251 } │ │ │ │ │ +252 │ │ │ │ │ +253 │ │ │ │ │ +254 template< int dim > │ │ │ │ │ +_2_5_5 inline _G_l_o_b_a_l_V_e_c_t_o_r &_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_v_e_r_t_e_x ( int i ) const │ │ │ │ │ +256 { │ │ │ │ │ +257 assert( (i >= 0) && (i < data_->n_total_vertices) ); │ │ │ │ │ +258 return data_->coords[ i ]; │ │ │ │ │ +259 } │ │ │ │ │ +260 │ │ │ │ │ +261 │ │ │ │ │ +262 template< int dim > │ │ │ │ │ +_2_6_3 inline int &_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( int element, int i ) const │ │ │ │ │ +264 { │ │ │ │ │ +265 assert( (element >= 0) && (element < data_->n_macro_elements) ); │ │ │ │ │ +266 assert( (i >= 0) && (i < numVertices) ); │ │ │ │ │ +267 return data_->neigh[ element*numVertices + i ]; │ │ │ │ │ +268 } │ │ │ │ │ +269 │ │ │ │ │ +270 │ │ │ │ │ +271 template< int dim > │ │ │ │ │ +_2_7_2 inline _B_o_u_n_d_a_r_y_I_d &_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( int element, int i ) │ │ │ │ │ +const │ │ │ │ │ +273 { │ │ │ │ │ +274 assert( (element >= 0) && (element < data_->n_macro_elements) ); │ │ │ │ │ +275 assert( (i >= 0) && (i < numVertices) ); │ │ │ │ │ +276 return data_->boundary[ element*numVertices + i ]; │ │ │ │ │ +277 } │ │ │ │ │ 278 │ │ │ │ │ -279 template< int dim > │ │ │ │ │ -280 template< int codim > │ │ │ │ │ -281 struct HierarchyDofNumbering< dim >::CacheDofSpace │ │ │ │ │ +279 │ │ │ │ │ +280 template< int dim > │ │ │ │ │ +_2_8_1 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e () │ │ │ │ │ 282 { │ │ │ │ │ -283 static void apply ( const _D_o_f_S_p_a_c_e *(&_d_o_f_S_p_a_c_e)[ dim+1 ], Cache (&cache) │ │ │ │ │ -[ dim+1 ] ) │ │ │ │ │ -284 { │ │ │ │ │ -285 assert( _d_o_f_S_p_a_c_e[ codim ] ); │ │ │ │ │ -286 const int codimtype = CodimType< dim, codim >::value; │ │ │ │ │ -287 cache[ codim ].first = _d_o_f_S_p_a_c_e[ codim ]->mesh->node[ codimtype ]; │ │ │ │ │ -288 cache[ codim ].second = _d_o_f_S_p_a_c_e[ codim ]->admin->n0_dof[ codimtype ]; │ │ │ │ │ -289 } │ │ │ │ │ -290 }; │ │ │ │ │ +283 release(); │ │ │ │ │ +284 data_ = _A_L_B_E_R_T_A alloc_macro_data( dim, initialSize, initialSize ); │ │ │ │ │ +285 data_->boundary = memAlloc< BoundaryId >( initialSize*numVertices ); │ │ │ │ │ +286 if( dim == 3 ) │ │ │ │ │ +287 data_->el_type = memAlloc< ElementType >( initialSize ); │ │ │ │ │ +288 vertexCount_ = elementCount_ = 0; │ │ │ │ │ +289 elementCount_ = 0; │ │ │ │ │ +290 } │ │ │ │ │ 291 │ │ │ │ │ -292 } // namespace Alberta │ │ │ │ │ -293 │ │ │ │ │ -294} // namespace Dune │ │ │ │ │ -295 │ │ │ │ │ -296#endif // #if HAVE_ALBERTA │ │ │ │ │ -297 │ │ │ │ │ -298#endif // #ifndef DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ +292 │ │ │ │ │ +293 template< int dim > │ │ │ │ │ +_2_9_4 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_f_i_n_a_l_i_z_e () │ │ │ │ │ +295 { │ │ │ │ │ +296 if( (vertexCount_ >= 0) && (elementCount_ >= 0) ) │ │ │ │ │ +297 { │ │ │ │ │ +298 resizeVertices( vertexCount_ ); │ │ │ │ │ +299 resizeElements( elementCount_ ); │ │ │ │ │ +300 _A_L_B_E_R_T_A compute_neigh_fast( data_ ); │ │ │ │ │ +301 │ │ │ │ │ +302 // assign default boundary id (if none is assigned) │ │ │ │ │ +303 for( int element = 0; element < elementCount_; ++element ) │ │ │ │ │ +304 { │ │ │ │ │ +305 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ +306 { │ │ │ │ │ +307 _B_o_u_n_d_a_r_y_I_d &id = boundaryId( element, i ); │ │ │ │ │ +308 if( neighbor( element, i ) >= 0 ) │ │ │ │ │ +309 { │ │ │ │ │ +310 assert( id == _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y ); │ │ │ │ │ +311 id = _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y; │ │ │ │ │ +312 } │ │ │ │ │ +313 else │ │ │ │ │ +314 id = (id == _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y ? _D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y : id); │ │ │ │ │ +315 } │ │ │ │ │ +316 } │ │ │ │ │ +317 │ │ │ │ │ +318 vertexCount_ = elementCount_ = -1; │ │ │ │ │ +319 } │ │ │ │ │ +320 assert( (vertexCount_ < 0) && (elementCount_ < 0) ); │ │ │ │ │ +321 } │ │ │ │ │ +322 │ │ │ │ │ +323 │ │ │ │ │ +324 template< int dim > │ │ │ │ │ +_3_2_5 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e () │ │ │ │ │ +326 { │ │ │ │ │ +327 _L_i_b_r_a_r_y_<_ _d_i_m_W_o_r_l_d_ _>_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e( *this ); │ │ │ │ │ +328 } │ │ │ │ │ +329 │ │ │ │ │ +330 │ │ │ │ │ +331 template< int dim > │ │ │ │ │ +_3_3_2 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n ( const _R_e_a_l orientation ) │ │ │ │ │ +333 { │ │ │ │ │ +334 _L_i_b_r_a_r_y_<_ _d_i_m_W_o_r_l_d_ _>_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n( *this, orientation ); │ │ │ │ │ +335 } │ │ │ │ │ +336 │ │ │ │ │ +337 │ │ │ │ │ +338 template< int dim > │ │ │ │ │ +_3_3_9 inline bool _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s () const │ │ │ │ │ +340 { │ │ │ │ │ +341 return _L_i_b_r_a_r_y_<_ _d_i_m_W_o_r_l_d_ _>_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s( *this ); │ │ │ │ │ +342 } │ │ │ │ │ +343 │ │ │ │ │ +344 │ │ │ │ │ +345 template< int dim > │ │ │ │ │ +_3_4_6 inline int _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t ( const ElementId &id ) │ │ │ │ │ +347 { │ │ │ │ │ +348 assert( elementCount_ >= 0 ); │ │ │ │ │ +349 if( elementCount_ >= data_->n_macro_elements ) │ │ │ │ │ +350 resizeElements( 2*elementCount_ ); │ │ │ │ │ +351 │ │ │ │ │ +352 ElementId &e = element( elementCount_ ); │ │ │ │ │ +353 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ +354 { │ │ │ │ │ +355 e[ i ] = id[ i ]; │ │ │ │ │ +356 boundaryId( elementCount_, i ) = _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y; │ │ │ │ │ +357 } │ │ │ │ │ +358 if( dim == 3 ) │ │ │ │ │ +359 data_->el_type[ elementCount_ ] = 0; │ │ │ │ │ +360 │ │ │ │ │ +361 return elementCount_++; │ │ │ │ │ +362 } │ │ │ │ │ +363 │ │ │ │ │ +364 │ │ │ │ │ +365 template< int dim > │ │ │ │ │ +366 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ │ +_3_6_7_ _:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const _G_l_o_b_a_l_M_a_t_r_i_x &matrix, const _G_l_o_b_a_l_V_e_c_t_o_r &shift ) │ │ │ │ │ +368 { │ │ │ │ │ +369 int &count = data_->n_wall_trafos; │ │ │ │ │ +370 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *&array = data_->wall_trafos; │ │ │ │ │ +371 │ │ │ │ │ +372 // resize wall trafo array │ │ │ │ │ +373 array = memReAlloc< AffineTransformation >( array, count, count+1 ); │ │ │ │ │ +374 assert( data_->wall_trafos != NULL ); │ │ │ │ │ +375 │ │ │ │ │ +376 // copy matrix and shift │ │ │ │ │ +377 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ +378 copy( matrix[ i ], array[ count ].M[ i ] ); │ │ │ │ │ +379 copy( shift, array[ count ].t ); │ │ │ │ │ +380 ++count; │ │ │ │ │ +381 } │ │ │ │ │ +382 │ │ │ │ │ +383 template< int dim > │ │ │ │ │ +384 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ │ +_3_8_5_ _:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const FieldMatrix< Real, dimWorld, dimWorld > &matrix, │ │ │ │ │ +386 const FieldVector< Real, dimWorld > &shift ) │ │ │ │ │ +387 { │ │ │ │ │ +388 int &count = data_->n_wall_trafos; │ │ │ │ │ +389 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *&array = data_->wall_trafos; │ │ │ │ │ +390 │ │ │ │ │ +391 // resize wall trafo array │ │ │ │ │ +392 array = memReAlloc< AffineTransformation >( array, count, count+1 ); │ │ │ │ │ +393 assert( data_->wall_trafos != NULL ); │ │ │ │ │ +394 │ │ │ │ │ +395 // copy matrix and shift │ │ │ │ │ +396 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ +397 copy( matrix[ i ], array[ count ].M[ i ] ); │ │ │ │ │ +398 copy( shift, array[ count ].t ); │ │ │ │ │ +399 ++count; │ │ │ │ │ +400 } │ │ │ │ │ +401 │ │ │ │ │ +402 │ │ │ │ │ +403 template< int dim > │ │ │ │ │ +_4_0_4 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_c_h_e_c_k_C_y_c_l_e_s () │ │ │ │ │ +405 { │ │ │ │ │ +406 // ensure that the macro data has been finalized │ │ │ │ │ +407 finalize(); │ │ │ │ │ +408 _A_L_B_E_R_T_A macro_test( data_, NULL ); │ │ │ │ │ +409 } │ │ │ │ │ +410 │ │ │ │ │ +411 │ │ │ │ │ +412 template< int dim > │ │ │ │ │ +_4_1_3 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_r_e_a_d ( const std::string &filename, bool │ │ │ │ │ +binary ) │ │ │ │ │ +414 { │ │ │ │ │ +415 release(); │ │ │ │ │ +416 if( binary ) │ │ │ │ │ +417 data_ = _A_L_B_E_R_T_A read_macro_xdr( filename.c_str() ); │ │ │ │ │ +418 else │ │ │ │ │ +419 data_ = _A_L_B_E_R_T_A read_macro( filename.c_str() ); │ │ │ │ │ +420 } │ │ │ │ │ +421 │ │ │ │ │ +422 │ │ │ │ │ +423 template< int dim > │ │ │ │ │ +424 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_r_e_s_i_z_e_E_l_e_m_e_n_t_s ( const int newSize ) │ │ │ │ │ +425 { │ │ │ │ │ +426 const int oldSize = data_->n_macro_elements; │ │ │ │ │ +427 data_->n_macro_elements = newSize; │ │ │ │ │ +428 data_->mel_vertices = _m_e_m_R_e_A_l_l_o_c( data_->mel_vertices, oldSize*numVertices, │ │ │ │ │ +newSize*numVertices ); │ │ │ │ │ +429 data_->boundary = _m_e_m_R_e_A_l_l_o_c( data_->boundary, oldSize*numVertices, │ │ │ │ │ +newSize*numVertices ); │ │ │ │ │ +430 if( dim == 3 ) │ │ │ │ │ +431 data_->el_type = _m_e_m_R_e_A_l_l_o_c( data_->el_type, oldSize, newSize ); │ │ │ │ │ +432 assert( (newSize == 0) || (data_->mel_vertices != NULL) ); │ │ │ │ │ +433 } │ │ │ │ │ +434 │ │ │ │ │ +435 } │ │ │ │ │ +436 │ │ │ │ │ +437} │ │ │ │ │ +438 │ │ │ │ │ +439#endif // #if HAVE_ALBERTA │ │ │ │ │ +440 │ │ │ │ │ +441#endif │ │ │ │ │ _m_i_s_c_._h_h │ │ │ │ │ +_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_a_l_g_e_b_r_a_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -ALBERTA EL Element │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ -ALBERTA FE_SPACE DofSpace │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_D_o_f_A_c_c_e_s_s │ │ │ │ │ -DofAccess() │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int codimension │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -static const int numSubEntities │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_D_o_f_A_c_c_e_s_s │ │ │ │ │ -DofAccess(const DofSpace *dofSpace) │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -int operator()(const Element *element, int subEntity, int i) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -HierarchyDofNumbering() │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -int operator()(const Element *element, int codim, unsigned int subEntity) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_m_e_s_h │ │ │ │ │ -const MeshPointer & mesh() const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:158 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_c_r_e_a_t_e │ │ │ │ │ -void create(const MeshPointer &mesh) │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_~_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -~HierarchyDofNumbering() │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_s_i_z_e │ │ │ │ │ -int size(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * dofSpace(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_e_m_p_t_y_D_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * emptyDofSpace() const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_r_e_l_e_a_s_e │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ │ +ALBERTA REAL_DD GlobalMatrix │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ │ +ALBERTA BNDRY_TYPE BoundaryId │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y │ │ │ │ │ +static const int InteriorBoundary │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c │ │ │ │ │ +Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ +static const int DirichletBoundary │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_I_n_s_t_a_n_t_i_a_t_e_M_a_c_r_o_D_a_t_a_L_i_b_r_a_r_y │ │ │ │ │ +friend struct InstantiateMacroDataLibrary │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +BoundaryId & boundaryId(int element, int i) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:272 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ +int insertVertex(const GlobalVector &coords) │ │ │ │ │ +insert vertex │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ │ +int ElementId[numVertices] │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y │ │ │ │ │ +static const int supportPeriodicity │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ │ void release() │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ -Element * el() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ +release the macro data structure │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t_C_o_u_n_t │ │ │ │ │ +int elementCount() const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x │ │ │ │ │ +GlobalVector & vertex(int i) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:255 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x_C_o_u_n_t │ │ │ │ │ +int vertexCount() const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ +void markLongestEdge() │ │ │ │ │ +mark the longest edge of all elements as refinement edges │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:325 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ +int insertVertex(const FieldVector< Real, dimWorld > &coords) │ │ │ │ │ +insert vertex │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s │ │ │ │ │ +bool checkNeighbors() const │ │ │ │ │ +check the neighbor information │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:339 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o │ │ │ │ │ +void insertWallTrafo(const FieldMatrix< Real, dimWorld, dimWorld > &matrix, │ │ │ │ │ +const FieldVector< Real, dimWorld > &shift) │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:385 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t │ │ │ │ │ +ElementId & element(int i) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_h_e_c_k_C_y_c_l_e_s │ │ │ │ │ +void checkCycles() │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:404 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +int & neighbor(int element, int i) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:263 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ +MacroData() │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_f_i_n_a_l_i_z_e │ │ │ │ │ +void finalize() │ │ │ │ │ +compress macro data structure │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:294 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o │ │ │ │ │ +void insertWallTrafo(const GlobalMatrix &m, const GlobalVector &t) │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:367 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ +void setOrientation(const Real orientation) │ │ │ │ │ +set the orientation of all elements │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:332 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_r_e_a_t_e │ │ │ │ │ +void create() │ │ │ │ │ +create a new macro data structure │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:281 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ │ +int insertElement(const ElementId &id) │ │ │ │ │ +insert element │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_w_r_i_t_e │ │ │ │ │ +bool write(const std::string &filename, bool binary=false) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:180 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ │ +void read(const std::string &filename, bool binary=false) │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ +static void markLongestEdge(MacroData ¯oData) │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ +Alberta::MacroData< dim > MacroData │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:221 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:192 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.cc File Reference │ │ │ │ +dune-grid: meshpointer.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,29 +70,49 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
meshpointer.cc File Reference
│ │ │ │ +
meshpointer.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

provides a wrapper for ALBERTA's mesh structure │ │ │ │ +More...

│ │ │ │ +
#include <limits>
│ │ │ │ +#include <string>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │ +#include <dune/grid/albertagrid/projection.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::Alberta::MeshPointer< dim >
 
class  Dune::Alberta::MeshPointer< dim >::MacroIterator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

provides a wrapper for ALBERTA's mesh structure

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,19 +1,34 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -meshpointer.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +meshpointer.hh File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's mesh structure _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_p_r_o_j_e_c_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_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: refinement.hh File Reference │ │ │ │ +dune-grid: albertareader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,58 +72,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinement.hh File Reference
│ │ │ │ +
albertareader.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather │ │ │ │ -More...

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ │ +#include <dune/grid/common/gridfactory.hh>
│ │ │ │ +#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Alberta::Patch< dim >
 
struct  Dune::Alberta::ForEachInteriorSubChild< dim, 0 >
 
struct  Dune::Alberta::ForEachInteriorSubChild< dim, dim >
 
struct  Dune::Alberta::ForEachInteriorSubChild< 2, 1 >
 
struct  Dune::Alberta::ForEachInteriorSubChild< 3, 1 >
 
struct  Dune::Alberta::ForEachInteriorSubChild< 3, 2 >
 
struct  Dune::Alberta::GeometryInFather< 1 >
 
struct  Dune::Alberta::GeometryInFather< 2 >
 
struct  Dune::Alberta::GeometryInFather< 3 >
class  Dune::AlbertaReader< Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,46 +2,22 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinement.hh File Reference │ │ │ │ │ -provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ -geometryInFather _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +albertareader.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._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_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _2_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _3_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ -geometryInFather │ │ │ │ │ - Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: refinement.hh Source File │ │ │ │ +dune-grid: albertareader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,454 +74,134 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinement.hh
│ │ │ │ +
albertareader.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_REFINEMENT_HH
│ │ │ │ -
6#define DUNE_ALBERTA_REFINEMENT_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ │ +
6#define DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ │
7
│ │ │ │ -
14#include <cassert>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19#if HAVE_ALBERTA
│ │ │ │ -
20
│ │ │ │ -
21namespace Dune
│ │ │ │ -
22{
│ │ │ │ -
23
│ │ │ │ -
24 namespace Alberta
│ │ │ │ -
25 {
│ │ │ │ -
26
│ │ │ │ -
27 // Internal Forward Declarations
│ │ │ │ -
28 // -----------------------------
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#if HAVE_ALBERTA
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ + │ │ │ │ +
27
│ │ │ │ +
28 typedef typename Grid::ctype ctype;
│ │ │ │
29
│ │ │ │ -
30 template< int dim, int codim >
│ │ │ │ - │ │ │ │ +
30 static const int dimension = Grid::dimension;
│ │ │ │ + │ │ │ │
32
│ │ │ │ -
33
│ │ │ │ -
34
│ │ │ │ -
35 // Patch
│ │ │ │ -
36 // -----
│ │ │ │ -
37
│ │ │ │ -
38 template< int dim >
│ │ │ │ -
│ │ │ │ -
39 class Patch
│ │ │ │ -
40 {
│ │ │ │ -
41 typedef Patch< dim > This;
│ │ │ │ -
42
│ │ │ │ -
43 static_assert(((dim >= 1) && (dim <= 3)),
│ │ │ │ -
44 "Alberta supports only dimensions 1, 2, 3");
│ │ │ │ -
45
│ │ │ │ -
46 public:
│ │ │ │ -
47 static const int dimension = dim;
│ │ │ │ -
48
│ │ │ │ - │ │ │ │ -
50
│ │ │ │ -
51 typedef ALBERTA RC_LIST_EL ElementList;
│ │ │ │ +
33 private:
│ │ │ │ +
34 static_assert(dimensionworld == Alberta::dimWorld,
│ │ │ │ +
35 "AlbertaReader: world dimension must match ALBERTA's world dimension.");
│ │ │ │ +
36
│ │ │ │ + │ │ │ │ +
38
│ │ │ │ +
39 MacroData macroData_;
│ │ │ │ +
40
│ │ │ │ +
41 AlbertaReader ( const This & );
│ │ │ │ +
42 This &operator= ( const This & );
│ │ │ │ +
43
│ │ │ │ +
44 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 {}
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 void readGrid ( const std::string &fileName, GridFactory &factory )
│ │ │ │ +
49 {
│ │ │ │ +
50 // read ALBERTA macro triangulation
│ │ │ │ +
51 macroData_.read( fileName, false );
│ │ │ │
52
│ │ │ │ -
53 private:
│ │ │ │ -
54 ElementList *list_;
│ │ │ │ -
55 int count_;
│ │ │ │ -
56
│ │ │ │ -
57 public:
│ │ │ │ -
│ │ │ │ -
58 Patch ( ElementList *list, int count )
│ │ │ │ -
59 : list_( list ),
│ │ │ │ -
60 count_( count )
│ │ │ │ -
61 {
│ │ │ │ -
62 assert( count > 0 );
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
65 Element *operator[] ( int i ) const;
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ -
67 int count () const
│ │ │ │ -
68 {
│ │ │ │ -
69 return count_;
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72 template< class LevelProvider >
│ │ │ │ -
73 ElementInfo elementInfo ( int i, const LevelProvider &levelProvider ) const;
│ │ │ │ +
53 // insert all vertices into the factory
│ │ │ │ +
54 const int numVertices = macroData_.vertexCount();
│ │ │ │ +
55 for( int i = 0; i < numVertices; ++i )
│ │ │ │ +
56 {
│ │ │ │ +
57 FieldVector< ctype, dimensionworld > v;
│ │ │ │ +
58 const Alberta::GlobalVector &coords = macroData_.vertex( i );
│ │ │ │ +
59 for( int j = 0; j < dimensionworld; ++j )
│ │ │ │ +
60 v[ j ] = coords[ j ];
│ │ │ │ +
61 factory.insertVertex( v );
│ │ │ │ +
62 }
│ │ │ │ +
63
│ │ │ │ +
64 // insert all elements into the factory
│ │ │ │ +
65 std::vector< unsigned int > vertices( dimension+1 );
│ │ │ │ +
66 const int numElements = macroData_.elementCount();
│ │ │ │ +
67 for( int i = 0; i < numElements; ++i )
│ │ │ │ +
68 {
│ │ │ │ +
69 const typename MacroData::ElementId &id = macroData_.element( i );
│ │ │ │ +
70 for( int j = 0; j <= dimension; ++j )
│ │ │ │ +
71 vertices[ j ] = id[ j ];
│ │ │ │ +
72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );
│ │ │ │ +
73 }
│ │ │ │
74
│ │ │ │ -
75 int elementType ( int i ) const;
│ │ │ │ -
76 bool hasNeighbor ( int i, int neighbor ) const;
│ │ │ │ -
77 int neighborIndex ( int i, int neighbor ) const;
│ │ │ │ -
78
│ │ │ │ -
79 template< class Functor >
│ │ │ │ -
│ │ │ │ -
80 void forEach ( Functor &functor ) const
│ │ │ │ -
81 {
│ │ │ │ -
82 for( int i = 0; i < count(); ++i )
│ │ │ │ -
83 functor( (*this)[ i ] );
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 template< int codim, class Functor >
│ │ │ │ -
│ │ │ │ -
87 void forEachInteriorSubChild ( Functor &functor ) const
│ │ │ │ -
88 {
│ │ │ │ - │ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91 };
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93
│ │ │ │ -
94 template< int dim >
│ │ │ │ -
│ │ │ │ -
95 inline Element *Patch< dim >::operator[] ( int i ) const
│ │ │ │ -
96 {
│ │ │ │ -
97 assert( (i >= 0) && (i < count()) );
│ │ │ │ -
98 return list_[ i ].el_info.el;
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
101
│ │ │ │ -
102 template< int dim >
│ │ │ │ -
103 template< class LevelProvider >
│ │ │ │ -
104 inline typename Patch< dim >::ElementInfo
│ │ │ │ -
│ │ │ │ -
105 Patch< dim >::elementInfo ( int i, const LevelProvider &levelProvider ) const
│ │ │ │ -
106 {
│ │ │ │ -
107 assert( (i >= 0) && (i < count()) );
│ │ │ │ -
108 return ElementInfo::createFake( list_[ i ].el_info );
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111 template<>
│ │ │ │ -
112 template< class LevelProvider >
│ │ │ │ -
113 inline typename Patch< 2 >::ElementInfo
│ │ │ │ -
│ │ │ │ -
114 Patch< 2 >::elementInfo ( int i, const LevelProvider &levelProvider ) const
│ │ │ │ -
115 {
│ │ │ │ -
116 assert( (i >= 0) && (i < count()) );
│ │ │ │ -
117 const MeshPointer< 2 > &mesh = levelProvider.mesh();
│ │ │ │ -
118 const Element *element = (*this)[ i ];
│ │ │ │ -
119 const int level = levelProvider( element );
│ │ │ │ -
120 return ElementInfo::createFake( mesh, element, level );
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
123
│ │ │ │ -
124 template< int dim >
│ │ │ │ -
│ │ │ │ -
125 inline int Patch< dim >::elementType ( int i ) const
│ │ │ │ -
126 {
│ │ │ │ -
127 assert( (i >= 0) && (i < count()) );
│ │ │ │ -
128 return list_[ i ].el_info.el_type;
│ │ │ │ -
129 }
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131
│ │ │ │ -
132 template< int dim >
│ │ │ │ -
│ │ │ │ -
133 inline bool Patch< dim >::hasNeighbor ( int i, int neighbor ) const
│ │ │ │ -
134 {
│ │ │ │ -
135 return (list_[ i ].neigh[ neighbor ] != NULL);
│ │ │ │ -
136 }
│ │ │ │ -
│ │ │ │ -
137
│ │ │ │ -
138 template< int dim >
│ │ │ │ -
│ │ │ │ -
139 inline int Patch< dim >::neighborIndex ( int i, int neighbor ) const
│ │ │ │ -
140 {
│ │ │ │ -
141 assert( hasNeighbor( i, neighbor ) );
│ │ │ │ -
142 return (list_[ i ].neigh[ neighbor ]->no);
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
145
│ │ │ │ -
146
│ │ │ │ -
147 // ForEachInteriorSubChild
│ │ │ │ -
148 // -----------------------
│ │ │ │ -
149
│ │ │ │ -
150 template< int dim >
│ │ │ │ -
│ │ │ │ -
151 struct ForEachInteriorSubChild< dim, 0 >
│ │ │ │ -
152 {
│ │ │ │ -
153 template< class Functor >
│ │ │ │ -
│ │ │ │ -
154 static void apply ( Functor &functor, const Patch< dim > &patch )
│ │ │ │ -
155 {
│ │ │ │ -
156 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ -
157 {
│ │ │ │ -
158 Element *const father = patch[ i ];
│ │ │ │ -
159 functor( father->child[ 0 ], 0 );
│ │ │ │ -
160 functor( father->child[ 1 ], 0 );
│ │ │ │ -
161 }
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163 };
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
165 template< int dim >
│ │ │ │ -
│ │ │ │ -
166 struct ForEachInteriorSubChild< dim, dim >
│ │ │ │ -
167 {
│ │ │ │ -
168 template< class Functor >
│ │ │ │ -
│ │ │ │ -
169 static void apply ( Functor &functor, const Patch< dim > &patch )
│ │ │ │ -
170 {
│ │ │ │ -
171 functor( patch[ 0 ]->child[ 0 ], dim );
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173 };
│ │ │ │ -
│ │ │ │ -
174
│ │ │ │ -
175 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
177 {
│ │ │ │ -
178 template< class Functor >
│ │ │ │ -
│ │ │ │ -
179 static void apply ( Functor &functor, const Patch< 2 > &patch )
│ │ │ │ -
180 {
│ │ │ │ -
181 // see alberta/src/2d/lagrange_2_2d.c for details
│ │ │ │ -
182 Element *const firstFather = patch[ 0 ];
│ │ │ │ -
183
│ │ │ │ -
184 Element *const firstChild = firstFather->child[ 0 ];
│ │ │ │ -
185 functor( firstChild, 0 );
│ │ │ │ -
186 functor( firstChild, 1 );
│ │ │ │ -
187
│ │ │ │ -
188 functor( firstFather->child[ 1 ], 1 );
│ │ │ │ -
189
│ │ │ │ -
190 if( patch.count() > 1 )
│ │ │ │ -
191 {
│ │ │ │ -
192 Element *const father = patch[ 1 ];
│ │ │ │ -
193 functor( father->child[ 0 ], 1 );
│ │ │ │ -
194 }
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196 };
│ │ │ │ -
│ │ │ │ -
197
│ │ │ │ -
198 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 template< class Functor >
│ │ │ │ -
│ │ │ │ -
202 static void apply ( Functor &functor, const Patch< 3 > &patch )
│ │ │ │ -
203 {
│ │ │ │ -
204 // see alberta/src/3d/lagrange_3_3d.c for details
│ │ │ │ -
205 Element *const firstFather = patch[ 0 ];
│ │ │ │ -
206
│ │ │ │ -
207 Element *const firstChild = firstFather->child[ 0 ];
│ │ │ │ -
208 functor( firstChild, 0 );
│ │ │ │ -
209 functor( firstChild, 1 );
│ │ │ │ -
210 functor( firstChild, 2 );
│ │ │ │ -
211
│ │ │ │ -
212 Element *const secondChild = firstFather->child[ 1 ];
│ │ │ │ -
213 functor( secondChild, 1 );
│ │ │ │ -
214 functor( secondChild, 2 );
│ │ │ │ -
215
│ │ │ │ -
216 for( int i = 1; i < patch.count(); ++i )
│ │ │ │ -
217 {
│ │ │ │ -
218 Element *const father = patch[ i ];
│ │ │ │ -
219 const int type = patch.elementType( i );
│ │ │ │ -
220
│ │ │ │ -
221 int lr_set = 0;
│ │ │ │ -
222 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
│ │ │ │ -
223 lr_set |= 1;
│ │ │ │ -
224 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
│ │ │ │ -
225 lr_set |= 2;
│ │ │ │ -
226 assert( lr_set != 0 );
│ │ │ │ -
227
│ │ │ │ -
228 functor( father->child[ 0 ], 0 );
│ │ │ │ -
229 switch( lr_set )
│ │ │ │ -
230 {
│ │ │ │ -
231 case 1 :
│ │ │ │ -
232 functor( father->child[ 0 ], 2 );
│ │ │ │ -
233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) );
│ │ │ │ -
234 break;
│ │ │ │ -
235
│ │ │ │ -
236 case 2 :
│ │ │ │ -
237 functor( father->child[ 0 ], 1 );
│ │ │ │ -
238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) );
│ │ │ │ -
239 break;
│ │ │ │ -
240 }
│ │ │ │ -
241 }
│ │ │ │ -
242 }
│ │ │ │ -
│ │ │ │ -
243 };
│ │ │ │ -
│ │ │ │ -
244
│ │ │ │ -
245 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
247 {
│ │ │ │ -
248 template< class Functor >
│ │ │ │ -
│ │ │ │ -
249 static void apply ( Functor &functor, const Patch< 3 > &patch )
│ │ │ │ -
250 {
│ │ │ │ -
251 // see alberta/src/3d/lagrange_2_3d.c for details
│ │ │ │ -
252 Element *const firstFather = patch[ 0 ];
│ │ │ │ -
253
│ │ │ │ -
254 Element *const firstChild = firstFather->child[ 0 ];
│ │ │ │ -
255 functor( firstChild, 2 );
│ │ │ │ -
256 functor( firstChild, 4 );
│ │ │ │ -
257 functor( firstChild, 5 );
│ │ │ │ -
258
│ │ │ │ -
259 functor( firstFather->child[ 1 ], 2 );
│ │ │ │ -
260
│ │ │ │ -
261 for( int i = 1; i < patch.count(); ++i )
│ │ │ │ -
262 {
│ │ │ │ -
263 Element *const father = patch[ i ];
│ │ │ │ -
264
│ │ │ │ -
265 int lr_set = 0;
│ │ │ │ -
266 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
│ │ │ │ -
267 lr_set = 1;
│ │ │ │ -
268 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
│ │ │ │ -
269 lr_set += 2;
│ │ │ │ -
270 assert( lr_set != 0 );
│ │ │ │ -
271
│ │ │ │ -
272 switch( lr_set )
│ │ │ │ -
273 {
│ │ │ │ -
274 case 1 :
│ │ │ │ -
275 functor( father->child[ 0 ], 4 );
│ │ │ │ -
276 break;
│ │ │ │ -
277
│ │ │ │ -
278 case 2 :
│ │ │ │ -
279 functor( father->child[ 0 ], 5 );
│ │ │ │ -
280 break;
│ │ │ │ -
281 }
│ │ │ │ -
282 }
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
284 };
│ │ │ │ -
│ │ │ │ -
285
│ │ │ │ -
286
│ │ │ │ -
287
│ │ │ │ -
288 // GeometryInFather
│ │ │ │ -
289 // ----------------
│ │ │ │ -
290
│ │ │ │ -
291 template< int dim >
│ │ │ │ - │ │ │ │ -
293
│ │ │ │ -
294 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
296 {
│ │ │ │ -
297 static const int dim = 1;
│ │ │ │ -
298
│ │ │ │ -
299 typedef Real LocalVector[ dim ];
│ │ │ │ -
300
│ │ │ │ -
301 static const LocalVector &
│ │ │ │ -
│ │ │ │ -
302 coordinate ( int child, int /* orientation */, int i )
│ │ │ │ -
303 {
│ │ │ │ -
304 static const Real coords[ 2 ][ dim+1 ][ dim ]
│ │ │ │ -
305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } };
│ │ │ │ -
306 assert( (i >= 0) && (i <= dim) );
│ │ │ │ -
307 return coords[ child ][ i ];
│ │ │ │ -
308 }
│ │ │ │ -
│ │ │ │ -
309 };
│ │ │ │ -
│ │ │ │ -
310
│ │ │ │ -
311 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
313 {
│ │ │ │ -
314 static const int dim = 2;
│ │ │ │ -
315
│ │ │ │ -
316 typedef Real LocalVector[ dim ];
│ │ │ │ -
317
│ │ │ │ -
318 static const LocalVector &
│ │ │ │ -
│ │ │ │ -
319 coordinate ( int child, int /* orientation */, int i )
│ │ │ │ -
320 {
│ │ │ │ -
321 static const Real coords[ 2 ][ dim+1 ][ dim ]
│ │ │ │ -
322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} },
│ │ │ │ -
323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } };
│ │ │ │ -
324 assert( (i >= 0) && (i <= dim) );
│ │ │ │ -
325 return coords[ child ][ i ];
│ │ │ │ -
326 }
│ │ │ │ -
│ │ │ │ -
327 };
│ │ │ │ -
│ │ │ │ -
328
│ │ │ │ -
329 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
331 {
│ │ │ │ -
332 static const int dim = 3;
│ │ │ │ -
333
│ │ │ │ -
334 typedef Real LocalVector[ dim ];
│ │ │ │ -
335
│ │ │ │ -
336 static const LocalVector &
│ │ │ │ -
│ │ │ │ -
337 coordinate ( int child, int orientation, int i )
│ │ │ │ -
338 {
│ │ │ │ -
339 static const Real coords[ 2 ][ dim+1 ][ dim ]
│ │ │ │ -
340 = { { {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} },
│ │ │ │ -
341 { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} } };
│ │ │ │ -
342 static const int flip[ 2 ][ 2 ][ dim+1 ]
│ │ │ │ -
343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } };
│ │ │ │ -
344 assert( (i >= 0) && (i <= dim) );
│ │ │ │ -
345 i = flip[ child ][ orientation ][ i ];
│ │ │ │ -
346 return coords[ child ][ i ];
│ │ │ │ -
347 }
│ │ │ │ -
│ │ │ │ -
348 };
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
350 }
│ │ │ │ -
351
│ │ │ │ -
352}
│ │ │ │ -
353
│ │ │ │ -
354#endif // #if HAVE_ALBERTA
│ │ │ │ -
355
│ │ │ │ -
356#endif
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
75 // release ALBERTA macro data
│ │ │ │ +
76 macroData_.release();
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78 };
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
80}
│ │ │ │ +
81
│ │ │ │ +
82#endif // #if HAVE_ALBERTA
│ │ │ │ +
83
│ │ │ │ +
84#endif
│ │ │ │ +
provides a wrapper for ALBERTA's macro_data structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA REAL_B LocalVector
Definition misc.hh:49
│ │ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
Definition meshpointer.hh:40
│ │ │ │ - │ │ │ │ -
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Definition elementinfo.hh:752
│ │ │ │ -
Definition refinement.hh:31
│ │ │ │ -
Definition refinement.hh:40
│ │ │ │ -
int neighborIndex(int i, int neighbor) const
Definition refinement.hh:139
│ │ │ │ -
int elementType(int i) const
Definition refinement.hh:125
│ │ │ │ -
int count() const
Definition refinement.hh:67
│ │ │ │ -
ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const
Definition refinement.hh:105
│ │ │ │ -
void forEach(Functor &functor) const
Definition refinement.hh:80
│ │ │ │ -
Element * operator[](int i) const
Definition refinement.hh:95
│ │ │ │ -
void forEachInteriorSubChild(Functor &functor) const
Definition refinement.hh:87
│ │ │ │ -
static const int dimension
Definition refinement.hh:47
│ │ │ │ -
bool hasNeighbor(int i, int neighbor) const
Definition refinement.hh:133
│ │ │ │ -
Patch(ElementList *list, int count)
Definition refinement.hh:58
│ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition refinement.hh:49
│ │ │ │ -
ALBERTA RC_LIST_EL ElementList
Definition refinement.hh:51
│ │ │ │ -
static void apply(Functor &functor, const Patch< dim > &patch)
Definition refinement.hh:154
│ │ │ │ -
static void apply(Functor &functor, const Patch< dim > &patch)
Definition refinement.hh:169
│ │ │ │ -
static void apply(Functor &functor, const Patch< 2 > &patch)
Definition refinement.hh:179
│ │ │ │ -
static void apply(Functor &functor, const Patch< 3 > &patch)
Definition refinement.hh:202
│ │ │ │ -
static void apply(Functor &functor, const Patch< 3 > &patch)
Definition refinement.hh:249
│ │ │ │ -
Definition refinement.hh:292
│ │ │ │ -
static const LocalVector & coordinate(int child, int, int i)
Definition refinement.hh:302
│ │ │ │ -
static const LocalVector & coordinate(int child, int, int i)
Definition refinement.hh:319
│ │ │ │ -
static const LocalVector & coordinate(int child, int orientation, int i)
Definition refinement.hh:337
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
Definition albertareader.hh:22
│ │ │ │ +
Grid::ctype ctype
Definition albertareader.hh:28
│ │ │ │ +
static const int dimensionworld
Definition albertareader.hh:31
│ │ │ │ +
static const int dimension
Definition albertareader.hh:30
│ │ │ │ +
Dune::GridFactory< Grid > GridFactory
Definition albertareader.hh:26
│ │ │ │ +
AlbertaReader()
Definition albertareader.hh:45
│ │ │ │ +
void readGrid(const std::string &fileName, GridFactory &factory)
Definition albertareader.hh:48
│ │ │ │ + │ │ │ │ +
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ │ +
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ │ +
int elementCount() const
Definition macrodata.hh:68
│ │ │ │ +
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ │ +
int vertexCount() const
Definition macrodata.hh:63
│ │ │ │ +
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ │ +
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ +
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh:532
│ │ │ │ + │ │ │ │ +
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:346
│ │ │ │ +
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:335
│ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,454 +1,176 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -refinement.hh │ │ │ │ │ +albertareader.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ │ -6#define DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ │ +6#define DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ │ 7 │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -18 │ │ │ │ │ -19#if HAVE_ALBERTA │ │ │ │ │ -20 │ │ │ │ │ -21namespace _D_u_n_e │ │ │ │ │ -22{ │ │ │ │ │ -23 │ │ │ │ │ -24 namespace Alberta │ │ │ │ │ -25 { │ │ │ │ │ -26 │ │ │ │ │ -27 // Internal Forward Declarations │ │ │ │ │ -28 // ----------------------------- │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15#if HAVE_ALBERTA │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 template< class Grid > │ │ │ │ │ +_2_1 class _A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ │ +22 { │ │ │ │ │ +23 typedef _A_l_b_e_r_t_a_R_e_a_d_e_r_<_ _G_r_i_d_ _> _T_h_i_s; │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +_2_6 typedef _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_ _> _G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ +27 │ │ │ │ │ +_2_8 typedef typename _G_r_i_d_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ 29 │ │ │ │ │ -30 template< int dim, int codim > │ │ │ │ │ -_3_1 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d; │ │ │ │ │ +_3_0 static const int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_3_1 static const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ 32 │ │ │ │ │ -33 │ │ │ │ │ -34 │ │ │ │ │ -35 // Patch │ │ │ │ │ -36 // ----- │ │ │ │ │ -37 │ │ │ │ │ -38 template< int dim > │ │ │ │ │ -_3_9 class _P_a_t_c_h │ │ │ │ │ -40 { │ │ │ │ │ -41 typedef _P_a_t_c_h_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ -42 │ │ │ │ │ -43 static_assert(((dim >= 1) && (dim <= 3)), │ │ │ │ │ -44 "Alberta supports only dimensions 1, 2, 3"); │ │ │ │ │ -45 │ │ │ │ │ -46 public: │ │ │ │ │ -_4_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -48 │ │ │ │ │ -_4_9 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -50 │ │ │ │ │ -_5_1 typedef _A_L_B_E_R_T_A RC_LIST_EL _E_l_e_m_e_n_t_L_i_s_t; │ │ │ │ │ +33 private: │ │ │ │ │ +34 static_assert(_d_i_m_e_n_s_i_o_n_w_o_r_l_d == _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d, │ │ │ │ │ +35 "AlbertaReader: world dimension must match ALBERTA's world dimension."); │ │ │ │ │ +36 │ │ │ │ │ +37 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> _M_a_c_r_o_D_a_t_a; │ │ │ │ │ +38 │ │ │ │ │ +39 _M_a_c_r_o_D_a_t_a macroData_; │ │ │ │ │ +40 │ │ │ │ │ +41 _A_l_b_e_r_t_a_R_e_a_d_e_r ( const _T_h_i_s & ); │ │ │ │ │ +42 _T_h_i_s &operator= ( const _T_h_i_s & ); │ │ │ │ │ +43 │ │ │ │ │ +44 public: │ │ │ │ │ +_4_5 _A_l_b_e_r_t_a_R_e_a_d_e_r () │ │ │ │ │ +46 {} │ │ │ │ │ +47 │ │ │ │ │ +_4_8 void _r_e_a_d_G_r_i_d ( const std::string &fileName, _G_r_i_d_F_a_c_t_o_r_y &factory ) │ │ │ │ │ +49 { │ │ │ │ │ +50 // read ALBERTA macro triangulation │ │ │ │ │ +51 macroData_._r_e_a_d( fileName, false ); │ │ │ │ │ 52 │ │ │ │ │ -53 private: │ │ │ │ │ -54 _E_l_e_m_e_n_t_L_i_s_t *list_; │ │ │ │ │ -55 int count_; │ │ │ │ │ -56 │ │ │ │ │ -57 public: │ │ │ │ │ -_5_8 _P_a_t_c_h ( _E_l_e_m_e_n_t_L_i_s_t *list, int _c_o_u_n_t ) │ │ │ │ │ -59 : list_( list ), │ │ │ │ │ -60 count_( _c_o_u_n_t ) │ │ │ │ │ -61 { │ │ │ │ │ -62 assert( _c_o_u_n_t > 0 ); │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -65 _E_l_e_m_e_n_t *_o_p_e_r_a_t_o_r_[_]_ ( int i ) const; │ │ │ │ │ -66 │ │ │ │ │ -_6_7 int _c_o_u_n_t () const │ │ │ │ │ +53 // insert all vertices into the factory │ │ │ │ │ +54 const int numVertices = macroData_._v_e_r_t_e_x_C_o_u_n_t(); │ │ │ │ │ +55 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ +56 { │ │ │ │ │ +57 FieldVector< ctype, dimensionworld > v; │ │ │ │ │ +58 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coords = macroData_._v_e_r_t_e_x( i ); │ │ │ │ │ +59 for( int j = 0; j < _d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++j ) │ │ │ │ │ +60 v[ j ] = coords[ j ]; │ │ │ │ │ +61 factory._i_n_s_e_r_t_V_e_r_t_e_x( v ); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +64 // insert all elements into the factory │ │ │ │ │ +65 std::vector< unsigned int > vertices( _d_i_m_e_n_s_i_o_n+1 ); │ │ │ │ │ +66 const int numElements = macroData_._e_l_e_m_e_n_t_C_o_u_n_t(); │ │ │ │ │ +67 for( int i = 0; i < numElements; ++i ) │ │ │ │ │ 68 { │ │ │ │ │ -69 return count_; │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -72 template< class LevelProvider > │ │ │ │ │ -73 _E_l_e_m_e_n_t_I_n_f_o _e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) const; │ │ │ │ │ +69 const typename _M_a_c_r_o_D_a_t_a_:_:_E_l_e_m_e_n_t_I_d &id = macroData_._e_l_e_m_e_n_t( i ); │ │ │ │ │ +70 for( int j = 0; j <= _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ +71 vertices[ j ] = id[ j ]; │ │ │ │ │ +72 factory._i_n_s_e_r_t_E_l_e_m_e_n_t( GeometryTypes::simplex( _d_i_m_e_n_s_i_o_n ), vertices ); │ │ │ │ │ +73 } │ │ │ │ │ 74 │ │ │ │ │ -75 int _e_l_e_m_e_n_t_T_y_p_e ( int i ) const; │ │ │ │ │ -76 bool _h_a_s_N_e_i_g_h_b_o_r ( int i, int neighbor ) const; │ │ │ │ │ -77 int _n_e_i_g_h_b_o_r_I_n_d_e_x ( int i, int neighbor ) const; │ │ │ │ │ -78 │ │ │ │ │ -79 template< class Functor > │ │ │ │ │ -_8_0 void _f_o_r_E_a_c_h ( Functor &functor ) const │ │ │ │ │ -81 { │ │ │ │ │ -82 for( int i = 0; i < _c_o_u_n_t(); ++i ) │ │ │ │ │ -83 functor( (*this)[ i ] ); │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -86 template< int codim, class Functor > │ │ │ │ │ -_8_7 void _f_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d ( Functor &functor ) const │ │ │ │ │ -88 { │ │ │ │ │ -89 _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_a_p_p_l_y( functor, *this ); │ │ │ │ │ -90 } │ │ │ │ │ -91 }; │ │ │ │ │ -92 │ │ │ │ │ -93 │ │ │ │ │ -94 template< int dim > │ │ │ │ │ -_9_5 inline _E_l_e_m_e_n_t *_P_a_t_c_h_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_[_]_ ( int i ) const │ │ │ │ │ -96 { │ │ │ │ │ -97 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ -98 return list_[ i ].el_info.el; │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -101 │ │ │ │ │ -102 template< int dim > │ │ │ │ │ -103 template< class LevelProvider > │ │ │ │ │ -104 inline typename _P_a_t_c_h_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -_1_0_5 _P_a_t_c_h_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) │ │ │ │ │ -const │ │ │ │ │ -106 { │ │ │ │ │ -107 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ -108 return _E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e( list_[ i ].el_info ); │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -111 template<> │ │ │ │ │ -112 template< class LevelProvider > │ │ │ │ │ -113 inline typename _P_a_t_c_h_<_ _2_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -_1_1_4 _P_a_t_c_h_<_ _2_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) const │ │ │ │ │ -115 { │ │ │ │ │ -116 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ -117 const _M_e_s_h_P_o_i_n_t_e_r_<_ _2_ _> &mesh = levelProvider.mesh(); │ │ │ │ │ -118 const _E_l_e_m_e_n_t *element = (*this)[ i ]; │ │ │ │ │ -119 const int level = levelProvider( element ); │ │ │ │ │ -120 return _E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e( mesh, element, level ); │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -123 │ │ │ │ │ -124 template< int dim > │ │ │ │ │ -_1_2_5 inline int _P_a_t_c_h_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t_T_y_p_e ( int i ) const │ │ │ │ │ -126 { │ │ │ │ │ -127 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ -128 return list_[ i ].el_info.el_type; │ │ │ │ │ -129 } │ │ │ │ │ -130 │ │ │ │ │ -131 │ │ │ │ │ -132 template< int dim > │ │ │ │ │ -_1_3_3 inline bool _P_a_t_c_h_<_ _d_i_m_ _>_:_:_h_a_s_N_e_i_g_h_b_o_r ( int i, int neighbor ) const │ │ │ │ │ -134 { │ │ │ │ │ -135 return (list_[ i ].neigh[ neighbor ] != NULL); │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 template< int dim > │ │ │ │ │ -_1_3_9 inline int _P_a_t_c_h_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r_I_n_d_e_x ( int i, int neighbor ) const │ │ │ │ │ -140 { │ │ │ │ │ -141 assert( hasNeighbor( i, neighbor ) ); │ │ │ │ │ -142 return (list_[ i ].neigh[ neighbor ]->no); │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -145 │ │ │ │ │ -146 │ │ │ │ │ -147 // ForEachInteriorSubChild │ │ │ │ │ -148 // ----------------------- │ │ │ │ │ -149 │ │ │ │ │ -150 template< int dim > │ │ │ │ │ -_1_5_1 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< dim, 0 > │ │ │ │ │ -152 { │ │ │ │ │ -153 template< class Functor > │ │ │ │ │ -_1_5_4 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _d_i_m_ _> &patch ) │ │ │ │ │ -155 { │ │ │ │ │ -156 for( int i = 0; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ -157 { │ │ │ │ │ -158 _E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ -159 functor( father->child[ 0 ], 0 ); │ │ │ │ │ -160 functor( father->child[ 1 ], 0 ); │ │ │ │ │ -161 } │ │ │ │ │ -162 } │ │ │ │ │ -163 }; │ │ │ │ │ -164 │ │ │ │ │ -165 template< int dim > │ │ │ │ │ -_1_6_6 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< dim, dim > │ │ │ │ │ -167 { │ │ │ │ │ -168 template< class Functor > │ │ │ │ │ -_1_6_9 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _d_i_m_ _> &patch ) │ │ │ │ │ -170 { │ │ │ │ │ -171 functor( patch[ 0 ]->child[ 0 ], dim ); │ │ │ │ │ -172 } │ │ │ │ │ -173 }; │ │ │ │ │ -174 │ │ │ │ │ -175 template<> │ │ │ │ │ -_1_7_6 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< 2, 1 > │ │ │ │ │ -177 { │ │ │ │ │ -178 template< class Functor > │ │ │ │ │ -_1_7_9 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _2_ _> &patch ) │ │ │ │ │ -180 { │ │ │ │ │ -181 // see alberta/src/2d/lagrange_2_2d.c for details │ │ │ │ │ -182 _E_l_e_m_e_n_t *const firstFather = patch[ 0 ]; │ │ │ │ │ -183 │ │ │ │ │ -184 _E_l_e_m_e_n_t *const firstChild = firstFather->child[ 0 ]; │ │ │ │ │ -185 functor( firstChild, 0 ); │ │ │ │ │ -186 functor( firstChild, 1 ); │ │ │ │ │ -187 │ │ │ │ │ -188 functor( firstFather->child[ 1 ], 1 ); │ │ │ │ │ -189 │ │ │ │ │ -190 if( patch._c_o_u_n_t() > 1 ) │ │ │ │ │ -191 { │ │ │ │ │ -192 _E_l_e_m_e_n_t *const father = patch[ 1 ]; │ │ │ │ │ -193 functor( father->child[ 0 ], 1 ); │ │ │ │ │ -194 } │ │ │ │ │ -195 } │ │ │ │ │ -196 }; │ │ │ │ │ -197 │ │ │ │ │ -198 template<> │ │ │ │ │ -_1_9_9 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< 3, 1 > │ │ │ │ │ -200 { │ │ │ │ │ -201 template< class Functor > │ │ │ │ │ -_2_0_2 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _3_ _> &patch ) │ │ │ │ │ -203 { │ │ │ │ │ -204 // see alberta/src/3d/lagrange_3_3d.c for details │ │ │ │ │ -205 _E_l_e_m_e_n_t *const firstFather = patch[ 0 ]; │ │ │ │ │ -206 │ │ │ │ │ -207 _E_l_e_m_e_n_t *const firstChild = firstFather->child[ 0 ]; │ │ │ │ │ -208 functor( firstChild, 0 ); │ │ │ │ │ -209 functor( firstChild, 1 ); │ │ │ │ │ -210 functor( firstChild, 2 ); │ │ │ │ │ -211 │ │ │ │ │ -212 _E_l_e_m_e_n_t *const secondChild = firstFather->child[ 1 ]; │ │ │ │ │ -213 functor( secondChild, 1 ); │ │ │ │ │ -214 functor( secondChild, 2 ); │ │ │ │ │ -215 │ │ │ │ │ -216 for( int i = 1; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ -217 { │ │ │ │ │ -218 _E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ -219 const int type = patch._e_l_e_m_e_n_t_T_y_p_e( i ); │ │ │ │ │ -220 │ │ │ │ │ -221 int lr_set = 0; │ │ │ │ │ -222 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 0 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 0 ) < i) ) │ │ │ │ │ -223 lr_set |= 1; │ │ │ │ │ -224 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 1 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 1 ) < i) ) │ │ │ │ │ -225 lr_set |= 2; │ │ │ │ │ -226 assert( lr_set != 0 ); │ │ │ │ │ -227 │ │ │ │ │ -228 functor( father->child[ 0 ], 0 ); │ │ │ │ │ -229 switch( lr_set ) │ │ │ │ │ -230 { │ │ │ │ │ -231 case 1 : │ │ │ │ │ -232 functor( father->child[ 0 ], 2 ); │ │ │ │ │ -233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) ); │ │ │ │ │ -234 break; │ │ │ │ │ -235 │ │ │ │ │ -236 case 2 : │ │ │ │ │ -237 functor( father->child[ 0 ], 1 ); │ │ │ │ │ -238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) ); │ │ │ │ │ -239 break; │ │ │ │ │ -240 } │ │ │ │ │ -241 } │ │ │ │ │ -242 } │ │ │ │ │ -243 }; │ │ │ │ │ -244 │ │ │ │ │ -245 template<> │ │ │ │ │ -_2_4_6 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< 3, 2 > │ │ │ │ │ -247 { │ │ │ │ │ -248 template< class Functor > │ │ │ │ │ -_2_4_9 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _3_ _> &patch ) │ │ │ │ │ -250 { │ │ │ │ │ -251 // see alberta/src/3d/lagrange_2_3d.c for details │ │ │ │ │ -252 _E_l_e_m_e_n_t *const firstFather = patch[ 0 ]; │ │ │ │ │ -253 │ │ │ │ │ -254 _E_l_e_m_e_n_t *const firstChild = firstFather->child[ 0 ]; │ │ │ │ │ -255 functor( firstChild, 2 ); │ │ │ │ │ -256 functor( firstChild, 4 ); │ │ │ │ │ -257 functor( firstChild, 5 ); │ │ │ │ │ -258 │ │ │ │ │ -259 functor( firstFather->child[ 1 ], 2 ); │ │ │ │ │ -260 │ │ │ │ │ -261 for( int i = 1; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ -262 { │ │ │ │ │ -263 _E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ -264 │ │ │ │ │ -265 int lr_set = 0; │ │ │ │ │ -266 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 0 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 0 ) < i) ) │ │ │ │ │ -267 lr_set = 1; │ │ │ │ │ -268 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 1 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 1 ) < i) ) │ │ │ │ │ -269 lr_set += 2; │ │ │ │ │ -270 assert( lr_set != 0 ); │ │ │ │ │ -271 │ │ │ │ │ -272 switch( lr_set ) │ │ │ │ │ -273 { │ │ │ │ │ -274 case 1 : │ │ │ │ │ -275 functor( father->child[ 0 ], 4 ); │ │ │ │ │ -276 break; │ │ │ │ │ -277 │ │ │ │ │ -278 case 2 : │ │ │ │ │ -279 functor( father->child[ 0 ], 5 ); │ │ │ │ │ -280 break; │ │ │ │ │ -281 } │ │ │ │ │ -282 } │ │ │ │ │ -283 } │ │ │ │ │ -284 }; │ │ │ │ │ -285 │ │ │ │ │ -286 │ │ │ │ │ -287 │ │ │ │ │ -288 // GeometryInFather │ │ │ │ │ -289 // ---------------- │ │ │ │ │ -290 │ │ │ │ │ -291 template< int dim > │ │ │ │ │ -_2_9_2 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r; │ │ │ │ │ -293 │ │ │ │ │ -294 template<> │ │ │ │ │ -_2_9_5 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r< 1 > │ │ │ │ │ -296 { │ │ │ │ │ -_2_9_7 static const int dim = 1; │ │ │ │ │ -298 │ │ │ │ │ -_2_9_9 typedef _R_e_a_l _L_o_c_a_l_V_e_c_t_o_r[ dim ]; │ │ │ │ │ -300 │ │ │ │ │ -301 static const _L_o_c_a_l_V_e_c_t_o_r & │ │ │ │ │ -_3_0_2 _c_o_o_r_d_i_n_a_t_e ( int child, int /* orientation */, int i ) │ │ │ │ │ -303 { │ │ │ │ │ -304 static const _R_e_a_l coords[ 2 ][ dim+1 ][ dim ] │ │ │ │ │ -305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } }; │ │ │ │ │ -306 assert( (i >= 0) && (i <= dim) ); │ │ │ │ │ -307 return coords[ child ][ i ]; │ │ │ │ │ -308 } │ │ │ │ │ -309 }; │ │ │ │ │ -310 │ │ │ │ │ -311 template<> │ │ │ │ │ -_3_1_2 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r< 2 > │ │ │ │ │ -313 { │ │ │ │ │ -_3_1_4 static const int dim = 2; │ │ │ │ │ -315 │ │ │ │ │ -_3_1_6 typedef _R_e_a_l _L_o_c_a_l_V_e_c_t_o_r[ dim ]; │ │ │ │ │ -317 │ │ │ │ │ -318 static const _L_o_c_a_l_V_e_c_t_o_r & │ │ │ │ │ -_3_1_9 _c_o_o_r_d_i_n_a_t_e ( int child, int /* orientation */, int i ) │ │ │ │ │ -320 { │ │ │ │ │ -321 static const _R_e_a_l coords[ 2 ][ dim+1 ][ dim ] │ │ │ │ │ -322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} }, │ │ │ │ │ -323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } }; │ │ │ │ │ -324 assert( (i >= 0) && (i <= dim) ); │ │ │ │ │ -325 return coords[ child ][ i ]; │ │ │ │ │ -326 } │ │ │ │ │ -327 }; │ │ │ │ │ -328 │ │ │ │ │ -329 template<> │ │ │ │ │ -_3_3_0 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r< 3 > │ │ │ │ │ -331 { │ │ │ │ │ -_3_3_2 static const int dim = 3; │ │ │ │ │ -333 │ │ │ │ │ -_3_3_4 typedef _R_e_a_l _L_o_c_a_l_V_e_c_t_o_r[ dim ]; │ │ │ │ │ -335 │ │ │ │ │ -336 static const _L_o_c_a_l_V_e_c_t_o_r & │ │ │ │ │ -_3_3_7 _c_o_o_r_d_i_n_a_t_e ( int child, int orientation, int i ) │ │ │ │ │ -338 { │ │ │ │ │ -339 static const _R_e_a_l coords[ 2 ][ dim+1 ][ dim ] │ │ │ │ │ -340 = { { {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} }, │ │ │ │ │ -341 { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} } }; │ │ │ │ │ -342 static const int flip[ 2 ][ 2 ][ dim+1 ] │ │ │ │ │ -343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } }; │ │ │ │ │ -344 assert( (i >= 0) && (i <= dim) ); │ │ │ │ │ -345 i = flip[ child ][ orientation ][ i ]; │ │ │ │ │ -346 return coords[ child ][ i ]; │ │ │ │ │ -347 } │ │ │ │ │ -348 }; │ │ │ │ │ -349 │ │ │ │ │ -350 } │ │ │ │ │ -351 │ │ │ │ │ -352} │ │ │ │ │ -353 │ │ │ │ │ -354#endif // #if HAVE_ALBERTA │ │ │ │ │ -355 │ │ │ │ │ -356#endif │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +75 // release ALBERTA macro data │ │ │ │ │ +76 macroData_._r_e_l_e_a_s_e(); │ │ │ │ │ +77 } │ │ │ │ │ +78 }; │ │ │ │ │ +79 │ │ │ │ │ +80} │ │ │ │ │ +81 │ │ │ │ │ +82#endif // #if HAVE_ALBERTA │ │ │ │ │ +83 │ │ │ │ │ +84#endif │ │ │ │ │ +_m_a_c_r_o_d_a_t_a_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_B LocalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -ALBERTA EL Element │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ │ -static ElementInfo createFake(const MeshPointer &mesh, const Element *element, │ │ │ │ │ -int level, int type=0) │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:752 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_n_e_i_g_h_b_o_r_I_n_d_e_x │ │ │ │ │ -int neighborIndex(int i, int neighbor) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_e_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -int elementType(int i) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_c_o_u_n_t │ │ │ │ │ -int count() const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_f_o_r_E_a_c_h │ │ │ │ │ -void forEach(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -Element * operator[](int i) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_f_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d │ │ │ │ │ -void forEachInteriorSubChild(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static const int dimensionworld │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_h_a_s_N_e_i_g_h_b_o_r │ │ │ │ │ -bool hasNeighbor(int i, int neighbor) const │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_P_a_t_c_h │ │ │ │ │ -Patch(ElementList *list, int count) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_E_l_e_m_e_n_t_L_i_s_t │ │ │ │ │ -ALBERTA RC_LIST_EL ElementList │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _0_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(Functor &functor, const Patch< dim > &patch) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _d_i_m_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(Functor &functor, const Patch< dim > &patch) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _2_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(Functor &functor, const Patch< 2 > &patch) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(Functor &functor, const Patch< 3 > &patch) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:202 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(Functor &functor, const Patch< 3 > &patch) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _1_ _>_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -static const LocalVector & coordinate(int child, int, int i) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:302 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _2_ _>_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -static const LocalVector & coordinate(int child, int, int i) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _3_ _>_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -static const LocalVector & coordinate(int child, int orientation, int i) │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:337 │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Dune::GridFactory< Grid > GridFactory │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ │ +AlbertaReader() │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_r_e_a_d_G_r_i_d │ │ │ │ │ +void readGrid(const std::string &fileName, GridFactory &factory) │ │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ │ +int ElementId[numVertices] │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +release the macro data structure │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t_C_o_u_n_t │ │ │ │ │ +int elementCount() const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x │ │ │ │ │ +GlobalVector & vertex(int i) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:255 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x_C_o_u_n_t │ │ │ │ │ +int vertexCount() const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t │ │ │ │ │ +ElementId & element(int i) const │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ │ +void read(const std::string &filename, bool binary=false) │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static constexpr int dimensionworld │ │ │ │ │ +The dimension of the world the grid lives in. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +Define type used for coordinates in grid module. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:532 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_ _> │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ │ +virtual void insertElement(const GeometryType &type, const std::vector< │ │ │ │ │ +unsigned int > &vertices) │ │ │ │ │ +Insert an element into the coarse grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ +virtual void insertVertex(const FieldVector< ctype, dimworld > &pos) │ │ │ │ │ +Insert a vertex into the coarse grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:335 │ │ │ │ │ +_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +_g_r_i_d_._h_h │ │ │ │ │ +Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertareader.hh File Reference │ │ │ │ +dune-grid: elementinfo.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,37 +70,36 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
albertareader.hh File Reference
│ │ │ │ +
elementinfo.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::AlbertaReader< Grid >
 
│ │ │ │ + │ │ │ │ +

provides a wrapper for ALBERTA's el_info structure │ │ │ │ +More...

│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

provides a wrapper for ALBERTA's el_info structure

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,25 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -albertareader.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._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_l_b_e_r_t_a_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +elementinfo.cc File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ +  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofvector.hh File Reference │ │ │ │ +dune-grid: undefine-2.0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,61 +69,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
dofvector.hh File Reference
│ │ │ │ +
undefine-2.0.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstdlib>
│ │ │ │ -#include <limits>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/refinement.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ +More...

│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::Alberta::DofVectorProvider< int >
 
struct  Dune::Alberta::DofVectorProvider< signed char >
 
struct  Dune::Alberta::DofVectorProvider< unsigned char >
 
struct  Dune::Alberta::DofVectorProvider< Real >
 
struct  Dune::Alberta::DofVectorProvider< GlobalVector >
 
class  Dune::Alberta::DofVectorPointer< Dof >
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Functions

void Dune::Alberta::abs (const DofVectorPointer< int > &dofVector)
 
int Dune::Alberta::max (const DofVectorPointer< int > &dofVector)
 
int Dune::Alberta::min (const DofVectorPointer< int > &dofVector)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Contains #undefs for all preprocessor macros defined by alberta.

│ │ │ │ +

This file is created automatically by the perl script undefAllMacros.pl.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,43 +1,15 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_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 │ │ │ │ │ -dofvector.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_r_e_f_i_n_e_m_e_n_t_._h_h> │ │ │ │ │ +undefine-2.0.hh File Reference │ │ │ │ │ +Contains #undefs for all preprocessor macros defined by alberta. _M_o_r_e_._._. │ │ │ │ │ _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_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _D_o_f_ _> │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -void  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s (const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r< int > &dofVector) │ │ │ │ │ -  │ │ │ │ │ - int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_a_x (const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r< int > &dofVector) │ │ │ │ │ -  │ │ │ │ │ - int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_i_n (const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r< int > &dofVector) │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ │ +This file is created automatically by the perl script undefAllMacros.pl. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofvector.hh Source File │ │ │ │ +dune-grid: undefine-2.0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,532 +74,476 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dofvector.hh
│ │ │ │ +
undefine-2.0.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │ -
6#define DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <cstdlib>
│ │ │ │ -
9#include <limits>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15#if HAVE_ALBERTA
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ +
12#ifdef _ALBERTA_H_
│ │ │ │ +
13 #undef _ALBERTA_H_
│ │ │ │ +
14#endif // _ALBERTA_H_
│ │ │ │ +
15
│ │ │ │ +
16#ifdef ALBERTA_VERSION
│ │ │ │ +
17 #undef ALBERTA_VERSION
│ │ │ │ +
18#endif // ALBERTA_VERSION
│ │ │ │
19
│ │ │ │ -
20 namespace Alberta
│ │ │ │ -
21 {
│ │ │ │ -
22
│ │ │ │ -
23 // External Forward Declarations
│ │ │ │ -
24 // -----------------------------
│ │ │ │ -
25
│ │ │ │ -
26 template< int dim >
│ │ │ │ -
27 class MeshPointer;
│ │ │ │ -
28
│ │ │ │ -
29
│ │ │ │ -
30
│ │ │ │ -
31 // DofVectorProvider
│ │ │ │ -
32 // -----------------
│ │ │ │ -
33
│ │ │ │ -
34 template< class Dof >
│ │ │ │ - │ │ │ │ -
36
│ │ │ │ -
37 template<>
│ │ │ │ -
│ │ │ │ -
38 struct DofVectorProvider< int >
│ │ │ │ -
39 {
│ │ │ │ -
40 typedef ALBERTA DOF_INT_VEC DofVector;
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ -
43 {
│ │ │ │ -
44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
47 static void free ( DofVector *dofVector )
│ │ │ │ -
48 {
│ │ │ │ -
49 ALBERTA free_dof_int_vec( dofVector );
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ +
20#ifdef ALBERTA_DEBUG
│ │ │ │ +
21 #undef ALBERTA_DEBUG
│ │ │ │ +
22#endif // ALBERTA_DEBUG
│ │ │ │ +
23
│ │ │ │ +
24#ifdef DIM_MAX
│ │ │ │ +
25 #undef DIM_MAX
│ │ │ │ +
26#endif // DIM_MAX
│ │ │ │ +
27
│ │ │ │ +
28#ifdef N_VERTICES
│ │ │ │ +
29 #undef N_VERTICES
│ │ │ │ +
30#endif // N_VERTICES
│ │ │ │ +
31
│ │ │ │ +
32#ifdef N_EDGES
│ │ │ │ +
33 #undef N_EDGES
│ │ │ │ +
34#endif // N_EDGES
│ │ │ │ +
35
│ │ │ │ +
36#ifdef N_WALLS
│ │ │ │ +
37 #undef N_WALLS
│ │ │ │ +
38#endif // N_WALLS
│ │ │ │ +
39
│ │ │ │ +
40#ifdef N_FACES
│ │ │ │ +
41 #undef N_FACES
│ │ │ │ +
42#endif // N_FACES
│ │ │ │ +
43
│ │ │ │ +
44#ifdef N_NEIGH
│ │ │ │ +
45 #undef N_NEIGH
│ │ │ │ +
46#endif // N_NEIGH
│ │ │ │ +
47
│ │ │ │ +
48#ifdef DIM_FAC
│ │ │ │ +
49 #undef DIM_FAC
│ │ │ │ +
50#endif // DIM_FAC
│ │ │ │
51
│ │ │ │ -
│ │ │ │ -
52 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ -
53 {
│ │ │ │ -
54 return ALBERTA read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
│ │ │ │ -
57 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ -
58 {
│ │ │ │ -
59 int success = ALBERTA write_dof_int_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ -
60 return (success == 0);
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62 };
│ │ │ │ -
│ │ │ │ +
52#ifdef N_VERTICES_0D
│ │ │ │ +
53 #undef N_VERTICES_0D
│ │ │ │ +
54#endif // N_VERTICES_0D
│ │ │ │ +
55
│ │ │ │ +
56#ifdef N_EDGES_0D
│ │ │ │ +
57 #undef N_EDGES_0D
│ │ │ │ +
58#endif // N_EDGES_0D
│ │ │ │ +
59
│ │ │ │ +
60#ifdef N_FACES_0D
│ │ │ │ +
61 #undef N_FACES_0D
│ │ │ │ +
62#endif // N_FACES_0D
│ │ │ │
63
│ │ │ │ -
64 template<>
│ │ │ │ -
│ │ │ │ -
65 struct DofVectorProvider< signed char >
│ │ │ │ -
66 {
│ │ │ │ -
67 typedef ALBERTA DOF_SCHAR_VEC DofVector;
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
69 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ -
70 {
│ │ │ │ -
71 return ALBERTA get_dof_schar_vec( name.c_str(), dofSpace );
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
74 static void free ( DofVector *dofVector )
│ │ │ │ -
75 {
│ │ │ │ -
76 ALBERTA free_dof_schar_vec( dofVector );
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ -
79 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ -
80 {
│ │ │ │ -
81 return ALBERTA read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ +
64#ifdef N_NEIGH_0D
│ │ │ │ +
65 #undef N_NEIGH_0D
│ │ │ │ +
66#endif // N_NEIGH_0D
│ │ │ │ +
67
│ │ │ │ +
68#ifdef N_WALLS_0D
│ │ │ │ +
69 #undef N_WALLS_0D
│ │ │ │ +
70#endif // N_WALLS_0D
│ │ │ │ +
71
│ │ │ │ +
72#ifdef N_VERTICES_1D
│ │ │ │ +
73 #undef N_VERTICES_1D
│ │ │ │ +
74#endif // N_VERTICES_1D
│ │ │ │ +
75
│ │ │ │ +
76#ifdef N_EDGES_1D
│ │ │ │ +
77 #undef N_EDGES_1D
│ │ │ │ +
78#endif // N_EDGES_1D
│ │ │ │ +
79
│ │ │ │ +
80#ifdef N_FACES_1D
│ │ │ │ +
81 #undef N_FACES_1D
│ │ │ │ +
82#endif // N_FACES_1D
│ │ │ │
83
│ │ │ │ -
│ │ │ │ -
84 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ -
85 {
│ │ │ │ -
86 int success = ALBERTA write_dof_schar_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ -
87 return (success == 0);
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89 };
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
91 template<>
│ │ │ │ -
│ │ │ │ -
92 struct DofVectorProvider< unsigned char >
│ │ │ │ -
93 {
│ │ │ │ -
94 typedef ALBERTA DOF_UCHAR_VEC DofVector;
│ │ │ │ +
84#ifdef N_NEIGH_1D
│ │ │ │ +
85 #undef N_NEIGH_1D
│ │ │ │ +
86#endif // N_NEIGH_1D
│ │ │ │ +
87
│ │ │ │ +
88#ifdef N_WALLS_1D
│ │ │ │ +
89 #undef N_WALLS_1D
│ │ │ │ +
90#endif // N_WALLS_1D
│ │ │ │ +
91
│ │ │ │ +
92#ifdef N_VERTICES_2D
│ │ │ │ +
93 #undef N_VERTICES_2D
│ │ │ │ +
94#endif // N_VERTICES_2D
│ │ │ │
95
│ │ │ │ -
│ │ │ │ -
96 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ -
97 {
│ │ │ │ -
98 return ALBERTA get_dof_uchar_vec( name.c_str(), dofSpace );
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
101 static void free ( DofVector *dofVector )
│ │ │ │ -
102 {
│ │ │ │ -
103 ALBERTA free_dof_uchar_vec( dofVector );
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ -
106 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ -
107 {
│ │ │ │ -
108 return ALBERTA read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
│ │ │ │ -
111 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ -
112 {
│ │ │ │ -
113 int success = ALBERTA write_dof_uchar_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ -
114 return (success == 0);
│ │ │ │ -
115 }
│ │ │ │ -
│ │ │ │ -
116 };
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
118 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
120 {
│ │ │ │ -
121 typedef ALBERTA DOF_REAL_VEC DofVector;
│ │ │ │ -
122
│ │ │ │ -
│ │ │ │ -
123 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ -
124 {
│ │ │ │ -
125 return ALBERTA get_dof_real_vec( name.c_str(), dofSpace );
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ +
96#ifdef N_EDGES_2D
│ │ │ │ +
97 #undef N_EDGES_2D
│ │ │ │ +
98#endif // N_EDGES_2D
│ │ │ │ +
99
│ │ │ │ +
100#ifdef N_FACES_2D
│ │ │ │ +
101 #undef N_FACES_2D
│ │ │ │ +
102#endif // N_FACES_2D
│ │ │ │ +
103
│ │ │ │ +
104#ifdef N_NEIGH_2D
│ │ │ │ +
105 #undef N_NEIGH_2D
│ │ │ │ +
106#endif // N_NEIGH_2D
│ │ │ │ +
107
│ │ │ │ +
108#ifdef N_WALLS_2D
│ │ │ │ +
109 #undef N_WALLS_2D
│ │ │ │ +
110#endif // N_WALLS_2D
│ │ │ │ +
111
│ │ │ │ +
112#ifdef N_VERTICES_3D
│ │ │ │ +
113 #undef N_VERTICES_3D
│ │ │ │ +
114#endif // N_VERTICES_3D
│ │ │ │ +
115
│ │ │ │ +
116#ifdef N_EDGES_3D
│ │ │ │ +
117 #undef N_EDGES_3D
│ │ │ │ +
118#endif // N_EDGES_3D
│ │ │ │ +
119
│ │ │ │ +
120#ifdef N_FACES_3D
│ │ │ │ +
121 #undef N_FACES_3D
│ │ │ │ +
122#endif // N_FACES_3D
│ │ │ │ +
123
│ │ │ │ +
124#ifdef N_NEIGH_3D
│ │ │ │ +
125 #undef N_NEIGH_3D
│ │ │ │ +
126#endif // N_NEIGH_3D
│ │ │ │
127
│ │ │ │ -
│ │ │ │ -
128 static void free ( DofVector *dofVector )
│ │ │ │ -
129 {
│ │ │ │ -
130 ALBERTA free_dof_real_vec( dofVector );
│ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
│ │ │ │ -
133 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ -
134 {
│ │ │ │ -
135 return ALBERTA read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ -
136 }
│ │ │ │ -
│ │ │ │ -
137
│ │ │ │ -
│ │ │ │ -
138 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ -
139 {
│ │ │ │ -
140 int success = ALBERTA write_dof_real_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ -
141 return (success == 0);
│ │ │ │ -
142 }
│ │ │ │ -
│ │ │ │ -
143 };
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
145 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
147 {
│ │ │ │ -
148 typedef ALBERTA DOF_REAL_D_VEC DofVector;
│ │ │ │ -
149
│ │ │ │ -
│ │ │ │ -
150 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ │ -
151 {
│ │ │ │ -
152 return ALBERTA get_dof_real_d_vec( name.c_str(), dofSpace );
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154
│ │ │ │ -
│ │ │ │ -
155 static void free ( DofVector *dofVector )
│ │ │ │ -
156 {
│ │ │ │ -
157 ALBERTA free_dof_real_d_vec( dofVector );
│ │ │ │ -
158 }
│ │ │ │ -
│ │ │ │ +
128#ifdef N_WALLS_3D
│ │ │ │ +
129 #undef N_WALLS_3D
│ │ │ │ +
130#endif // N_WALLS_3D
│ │ │ │ +
131
│ │ │ │ +
132#ifdef N_VERTICES_MAX
│ │ │ │ +
133 #undef N_VERTICES_MAX
│ │ │ │ +
134#endif // N_VERTICES_MAX
│ │ │ │ +
135
│ │ │ │ +
136#ifdef N_EDGES_MAX
│ │ │ │ +
137 #undef N_EDGES_MAX
│ │ │ │ +
138#endif // N_EDGES_MAX
│ │ │ │ +
139
│ │ │ │ +
140#ifdef N_FACES_MAX
│ │ │ │ +
141 #undef N_FACES_MAX
│ │ │ │ +
142#endif // N_FACES_MAX
│ │ │ │ +
143
│ │ │ │ +
144#ifdef N_NEIGH_MAX
│ │ │ │ +
145 #undef N_NEIGH_MAX
│ │ │ │ +
146#endif // N_NEIGH_MAX
│ │ │ │ +
147
│ │ │ │ +
148#ifdef N_WALLS_MAX
│ │ │ │ +
149 #undef N_WALLS_MAX
│ │ │ │ +
150#endif // N_WALLS_MAX
│ │ │ │ +
151
│ │ │ │ +
152#ifdef N_LAMBDA
│ │ │ │ +
153 #undef N_LAMBDA
│ │ │ │ +
154#endif // N_LAMBDA
│ │ │ │ +
155
│ │ │ │ +
156#ifdef LAMBDA_MAX
│ │ │ │ +
157 #undef LAMBDA_MAX
│ │ │ │ +
158#endif // LAMBDA_MAX
│ │ │ │
159
│ │ │ │ -
│ │ │ │ -
160 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
│ │ │ │ -
161 {
│ │ │ │ -
162 return ALBERTA read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace );
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
│ │ │ │ -
165 static bool write ( const DofVector *dofVector, const std::string &filename )
│ │ │ │ -
166 {
│ │ │ │ -
167 int success = ALBERTA write_dof_real_d_vec_xdr( dofVector, filename.c_str() );
│ │ │ │ -
168 return (success == 0);
│ │ │ │ -
169 }
│ │ │ │ -
│ │ │ │ -
170 };
│ │ │ │ -
│ │ │ │ +
160#ifdef INDEX
│ │ │ │ +
161 #undef INDEX
│ │ │ │ +
162#endif // INDEX
│ │ │ │ +
163
│ │ │ │ +
164#ifdef INDEX
│ │ │ │ +
165 #undef INDEX
│ │ │ │ +
166#endif // INDEX
│ │ │ │ +
167
│ │ │ │ +
168#ifdef IS_LEAF_EL
│ │ │ │ +
169 #undef IS_LEAF_EL
│ │ │ │ +
170#endif // IS_LEAF_EL
│ │ │ │
171
│ │ │ │ -
172
│ │ │ │ -
173
│ │ │ │ -
174 // DofVectorPointer
│ │ │ │ -
175 // ----------------
│ │ │ │ -
176
│ │ │ │ -
177 template< class Dof >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
179 {
│ │ │ │ - │ │ │ │ -
181
│ │ │ │ - │ │ │ │ +
172#ifdef LEAF_DATA
│ │ │ │ +
173 #undef LEAF_DATA
│ │ │ │ +
174#endif // LEAF_DATA
│ │ │ │ +
175
│ │ │ │ +
176#ifdef INTERIOR
│ │ │ │ +
177 #undef INTERIOR
│ │ │ │ +
178#endif // INTERIOR
│ │ │ │ +
179
│ │ │ │ +
180#ifdef DIRICHLET
│ │ │ │ +
181 #undef DIRICHLET
│ │ │ │ +
182#endif // DIRICHLET
│ │ │ │
183
│ │ │ │ -
184 public:
│ │ │ │ -
185 typedef typename DofVectorProvider::DofVector DofVector;
│ │ │ │ -
186
│ │ │ │ -
187 static const bool supportsAdaptationData = true;
│ │ │ │ -
188
│ │ │ │ -
189 private:
│ │ │ │ -
190 DofVector *dofVector_;
│ │ │ │ +
184#ifdef NEUMANN
│ │ │ │ +
185 #undef NEUMANN
│ │ │ │ +
186#endif // NEUMANN
│ │ │ │ +
187
│ │ │ │ +
188#ifdef IS_NEUMANN
│ │ │ │ +
189 #undef IS_NEUMANN
│ │ │ │ +
190#endif // IS_NEUMANN
│ │ │ │
191
│ │ │ │ -
192 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
194 : dofVector_( NULL )
│ │ │ │ -
195 {}
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
198 const std::string &name = "" )
│ │ │ │ -
199 : dofVector_ ( DofVectorProvider::get( dofSpace, name ) )
│ │ │ │ -
200 {}
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
│ │ │ │ -
202 explicit DofVectorPointer ( DofVector *dofVector )
│ │ │ │ -
203 : dofVector_( dofVector )
│ │ │ │ -
204 {}
│ │ │ │ -
│ │ │ │ -
205
│ │ │ │ -
│ │ │ │ -
206 explicit operator bool () const
│ │ │ │ -
207 {
│ │ │ │ -
208 return (bool)dofVector_;
│ │ │ │ -
209 }
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
│ │ │ │ -
211 operator DofVector * () const
│ │ │ │ -
212 {
│ │ │ │ -
213 return dofVector_;
│ │ │ │ -
214 }
│ │ │ │ -
│ │ │ │ +
192#ifdef IS_DIRICHLET
│ │ │ │ +
193 #undef IS_DIRICHLET
│ │ │ │ +
194#endif // IS_DIRICHLET
│ │ │ │ +
195
│ │ │ │ +
196#ifdef IS_INTERIOR
│ │ │ │ +
197 #undef IS_INTERIOR
│ │ │ │ +
198#endif // IS_INTERIOR
│ │ │ │ +
199
│ │ │ │ +
200#ifdef N_NODE_TYPES
│ │ │ │ +
201 #undef N_NODE_TYPES
│ │ │ │ +
202#endif // N_NODE_TYPES
│ │ │ │ +
203
│ │ │ │ +
204#ifdef VERTEX
│ │ │ │ +
205 #undef VERTEX
│ │ │ │ +
206#endif // VERTEX
│ │ │ │ +
207
│ │ │ │ +
208#ifdef CENTER
│ │ │ │ +
209 #undef CENTER
│ │ │ │ +
210#endif // CENTER
│ │ │ │ +
211
│ │ │ │ +
212#ifdef EDGE
│ │ │ │ +
213 #undef EDGE
│ │ │ │ +
214#endif // EDGE
│ │ │ │
215
│ │ │ │ -
│ │ │ │ -
216 operator Dof * () const
│ │ │ │ -
217 {
│ │ │ │ -
218 Dof *ptr = NULL;
│ │ │ │ -
219 GET_DOF_VEC( ptr, dofVector_ );
│ │ │ │ -
220 return ptr;
│ │ │ │ -
221 }
│ │ │ │ -
│ │ │ │ -
222
│ │ │ │ -
│ │ │ │ -
223 const DofSpace *dofSpace () const
│ │ │ │ -
224 {
│ │ │ │ -
225 return dofVector_->fe_space;
│ │ │ │ -
226 }
│ │ │ │ -
│ │ │ │ +
216#ifdef FACE
│ │ │ │ +
217 #undef FACE
│ │ │ │ +
218#endif // FACE
│ │ │ │ +
219
│ │ │ │ +
220#ifdef LIST_ENTRY
│ │ │ │ +
221 #undef LIST_ENTRY
│ │ │ │ +
222#endif // LIST_ENTRY
│ │ │ │ +
223
│ │ │ │ +
224#ifdef WALL_BOUND
│ │ │ │ +
225 #undef WALL_BOUND
│ │ │ │ +
226#endif // WALL_BOUND
│ │ │ │
227
│ │ │ │ -
│ │ │ │ -
228 std::string name () const
│ │ │ │ -
229 {
│ │ │ │ -
230 if( dofVector_ )
│ │ │ │ -
231 return dofVector_->name;
│ │ │ │ -
232 else
│ │ │ │ -
233 return std::string();
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ +
228#ifdef FILL_NOTHING
│ │ │ │ +
229 #undef FILL_NOTHING
│ │ │ │ +
230#endif // FILL_NOTHING
│ │ │ │ +
231
│ │ │ │ +
232#ifdef FILL_COORDS
│ │ │ │ +
233 #undef FILL_COORDS
│ │ │ │ +
234#endif // FILL_COORDS
│ │ │ │
235
│ │ │ │ -
│ │ │ │ -
236 void create ( const DofSpace *dofSpace, const std::string &name = "" )
│ │ │ │ -
237 {
│ │ │ │ -
238 release();
│ │ │ │ -
239 dofVector_ = DofVectorProvider::get( dofSpace, name );
│ │ │ │ -
240 }
│ │ │ │ -
│ │ │ │ -
241
│ │ │ │ -
242 template< int dim >
│ │ │ │ -
│ │ │ │ -
243 void read ( const std::string &filename, const MeshPointer< dim > &meshPointer )
│ │ │ │ -
244 {
│ │ │ │ -
245 release();
│ │ │ │ -
246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL );
│ │ │ │ -
247 }
│ │ │ │ -
│ │ │ │ -
248
│ │ │ │ -
│ │ │ │ -
249 bool write ( const std::string &filename ) const
│ │ │ │ -
250 {
│ │ │ │ -
251 return DofVectorProvider::write( dofVector_, filename );
│ │ │ │ -
252 }
│ │ │ │ -
│ │ │ │ -
253
│ │ │ │ -
│ │ │ │ -
254 void release ()
│ │ │ │ -
255 {
│ │ │ │ -
256 if( dofVector_ )
│ │ │ │ -
257 {
│ │ │ │ -
258 DofVectorProvider::free( dofVector_ );
│ │ │ │ -
259 dofVector_ = NULL;
│ │ │ │ -
260 }
│ │ │ │ -
261 }
│ │ │ │ -
│ │ │ │ -
262
│ │ │ │ -
263 template< class Functor >
│ │ │ │ -
│ │ │ │ -
264 void forEach ( Functor &functor ) const
│ │ │ │ -
265 {
│ │ │ │ -
266 Dof *array = (Dof *)(*this);
│ │ │ │ -
267 FOR_ALL_DOFS( dofSpace()->admin, functor( array[ dof ] ) );
│ │ │ │ -
268 }
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
│ │ │ │ -
270 void initialize ( const Dof &value )
│ │ │ │ -
271 {
│ │ │ │ -
272 Dof *array = (Dof *)(*this);
│ │ │ │ -
273 FOR_ALL_DOFS( dofSpace()->admin, array[ dof ] = value );
│ │ │ │ -
274 }
│ │ │ │ -
│ │ │ │ +
236#ifdef FILL_BOUND
│ │ │ │ +
237 #undef FILL_BOUND
│ │ │ │ +
238#endif // FILL_BOUND
│ │ │ │ +
239
│ │ │ │ +
240#ifdef FILL_NEIGH
│ │ │ │ +
241 #undef FILL_NEIGH
│ │ │ │ +
242#endif // FILL_NEIGH
│ │ │ │ +
243
│ │ │ │ +
244#ifdef FILL_OPP_COORDS
│ │ │ │ +
245 #undef FILL_OPP_COORDS
│ │ │ │ +
246#endif // FILL_OPP_COORDS
│ │ │ │ +
247
│ │ │ │ +
248#ifdef FILL_ORIENTATION
│ │ │ │ +
249 #undef FILL_ORIENTATION
│ │ │ │ +
250#endif // FILL_ORIENTATION
│ │ │ │ +
251
│ │ │ │ +
252#ifdef FILL_EL_TYPE
│ │ │ │ +
253 #undef FILL_EL_TYPE
│ │ │ │ +
254#endif // FILL_EL_TYPE
│ │ │ │ +
255
│ │ │ │ +
256#ifdef FILL_PROJECTION
│ │ │ │ +
257 #undef FILL_PROJECTION
│ │ │ │ +
258#endif // FILL_PROJECTION
│ │ │ │ +
259
│ │ │ │ +
260#ifdef FILL_ANY
│ │ │ │ +
261 #undef FILL_ANY
│ │ │ │ +
262#endif // FILL_ANY
│ │ │ │ +
263
│ │ │ │ +
264#ifdef HOOK_QUEUE_OFFSET
│ │ │ │ +
265 #undef HOOK_QUEUE_OFFSET
│ │ │ │ +
266#endif // HOOK_QUEUE_OFFSET
│ │ │ │ +
267
│ │ │ │ +
268#ifdef RUN_HOOKS_0
│ │ │ │ +
269 #undef RUN_HOOKS_0
│ │ │ │ +
270#endif // RUN_HOOKS_0
│ │ │ │ +
271
│ │ │ │ +
272#ifdef RUN_BAS_FCTS_HOOKS
│ │ │ │ +
273 #undef RUN_BAS_FCTS_HOOKS
│ │ │ │ +
274#endif // RUN_BAS_FCTS_HOOKS
│ │ │ │
275
│ │ │ │ -
276 template< class AdaptationData >
│ │ │ │ -
│ │ │ │ -
277 AdaptationData *getAdaptationData () const
│ │ │ │ -
278 {
│ │ │ │ -
279 assert( dofVector_ );
│ │ │ │ -
280 assert( dofVector_->user_data );
│ │ │ │ -
281 return static_cast< AdaptationData * >( dofVector_->user_data );
│ │ │ │ -
282 }
│ │ │ │ -
│ │ │ │ +
276#ifdef RUN_HOOKS_1
│ │ │ │ +
277 #undef RUN_HOOKS_1
│ │ │ │ +
278#endif // RUN_HOOKS_1
│ │ │ │ +
279
│ │ │ │ +
280#ifdef RUN_HOOKS_2
│ │ │ │ +
281 #undef RUN_HOOKS_2
│ │ │ │ +
282#endif // RUN_HOOKS_2
│ │ │ │
283
│ │ │ │ -
284 template< class AdaptationData >
│ │ │ │ -
│ │ │ │ -
285 void setAdaptationData ( AdaptationData *adaptationData )
│ │ │ │ -
286 {
│ │ │ │ -
287 assert( dofVector_ );
│ │ │ │ -
288 dofVector_->user_data = adaptationData;
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
290
│ │ │ │ -
291 template< class Interpolation >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
293 {
│ │ │ │ -
294 assert( dofVector_ );
│ │ │ │ -
295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >;
│ │ │ │ -
296 }
│ │ │ │ -
│ │ │ │ -
297
│ │ │ │ -
298 template< class Restriction >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
300 {
│ │ │ │ -
301 assert( dofVector_ );
│ │ │ │ -
302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >;
│ │ │ │ -
303 }
│ │ │ │ -
│ │ │ │ -
304
│ │ │ │ -
305 private:
│ │ │ │ -
306 template< class Interpolation >
│ │ │ │ -
307 static void refineInterpolate ( DofVector *dofVector, RC_LIST_EL *list, int n )
│ │ │ │ -
308 {
│ │ │ │ -
309 const This dofVectorPointer( dofVector );
│ │ │ │ -
310 typename Interpolation::Patch patch( list, n );
│ │ │ │ -
311 Interpolation::interpolateVector( dofVectorPointer, patch );
│ │ │ │ -
312 }
│ │ │ │ -
313
│ │ │ │ -
314 template< class Restriction >
│ │ │ │ -
315 static void coarsenRestrict ( DofVector *dofVector, RC_LIST_EL *list, int n )
│ │ │ │ -
316 {
│ │ │ │ -
317 const This dofVectorPointer( dofVector );
│ │ │ │ -
318 typename Restriction::Patch patch( list, n );
│ │ │ │ -
319 Restriction::restrictVector( dofVectorPointer, patch );
│ │ │ │ -
320 }
│ │ │ │ -
321 };
│ │ │ │ -
│ │ │ │ -
322
│ │ │ │ +
284#ifdef RUN_HOOKS_3
│ │ │ │ +
285 #undef RUN_HOOKS_3
│ │ │ │ +
286#endif // RUN_HOOKS_3
│ │ │ │ +
287
│ │ │ │ +
288#ifdef RUN_HOOKS_4
│ │ │ │ +
289 #undef RUN_HOOKS_4
│ │ │ │ +
290#endif // RUN_HOOKS_4
│ │ │ │ +
291
│ │ │ │ +
292#ifdef RUN_HOOKS_5
│ │ │ │ +
293 #undef RUN_HOOKS_5
│ │ │ │ +
294#endif // RUN_HOOKS_5
│ │ │ │ +
295
│ │ │ │ +
296#ifdef RUN_HOOKS_6
│ │ │ │ +
297 #undef RUN_HOOKS_6
│ │ │ │ +
298#endif // RUN_HOOKS_6
│ │ │ │ +
299
│ │ │ │ +
300#ifdef RUN_HOOKS_7
│ │ │ │ +
301 #undef RUN_HOOKS_7
│ │ │ │ +
302#endif // RUN_HOOKS_7
│ │ │ │ +
303
│ │ │ │ +
304#ifdef CALL_EVERY_EL_PREORDER
│ │ │ │ +
305 #undef CALL_EVERY_EL_PREORDER
│ │ │ │ +
306#endif // CALL_EVERY_EL_PREORDER
│ │ │ │ +
307
│ │ │ │ +
308#ifdef CALL_EVERY_EL_INORDER
│ │ │ │ +
309 #undef CALL_EVERY_EL_INORDER
│ │ │ │ +
310#endif // CALL_EVERY_EL_INORDER
│ │ │ │ +
311
│ │ │ │ +
312#ifdef CALL_EVERY_EL_POSTORDER
│ │ │ │ +
313 #undef CALL_EVERY_EL_POSTORDER
│ │ │ │ +
314#endif // CALL_EVERY_EL_POSTORDER
│ │ │ │ +
315
│ │ │ │ +
316#ifdef CALL_LEAF_EL
│ │ │ │ +
317 #undef CALL_LEAF_EL
│ │ │ │ +
318#endif // CALL_LEAF_EL
│ │ │ │ +
319
│ │ │ │ +
320#ifdef CALL_LEAF_EL_LEVEL
│ │ │ │ +
321 #undef CALL_LEAF_EL_LEVEL
│ │ │ │ +
322#endif // CALL_LEAF_EL_LEVEL
│ │ │ │
323
│ │ │ │ -
324
│ │ │ │ -
325 // Auxiliary Functions
│ │ │ │ -
326 // --------------------
│ │ │ │ +
324#ifdef CALL_EL_LEVEL
│ │ │ │ +
325 #undef CALL_EL_LEVEL
│ │ │ │ +
326#endif // CALL_EL_LEVEL
│ │ │ │
327
│ │ │ │ -
│ │ │ │ -
328 inline void abs ( const DofVectorPointer< int > &dofVector )
│ │ │ │ -
329 {
│ │ │ │ -
330 assert( !dofVector == false );
│ │ │ │ -
331 int *array = (int *)dofVector;
│ │ │ │ -
332 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
│ │ │ │ -
333 array[ dof ] = std::abs( array[ dof ] ) );
│ │ │ │ -
334 }
│ │ │ │ -
│ │ │ │ +
328#ifdef CALL_MG_LEVEL
│ │ │ │ +
329 #undef CALL_MG_LEVEL
│ │ │ │ +
330#endif // CALL_MG_LEVEL
│ │ │ │ +
331
│ │ │ │ +
332#ifdef TEST_FLAG
│ │ │ │ +
333 #undef TEST_FLAG
│ │ │ │ +
334#endif // TEST_FLAG
│ │ │ │
335
│ │ │ │ -
336
│ │ │ │ -
│ │ │ │ -
337 inline int max ( const DofVectorPointer< int > &dofVector )
│ │ │ │ -
338 {
│ │ │ │ -
339 assert( !dofVector == false );
│ │ │ │ -
340 int *array = (int *)dofVector;
│ │ │ │ -
341 int result = std::numeric_limits< int >::min();
│ │ │ │ -
342 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
│ │ │ │ -
343 result = std::max( result, array[ dof ] ) );
│ │ │ │ -
344 return result;
│ │ │ │ -
345 }
│ │ │ │ -
│ │ │ │ -
346
│ │ │ │ +
336#ifdef DOF_ADMIN_DEF
│ │ │ │ +
337 #undef DOF_ADMIN_DEF
│ │ │ │ +
338#endif // DOF_ADMIN_DEF
│ │ │ │ +
339
│ │ │ │ +
340#ifdef DOF_FREE_SIZE
│ │ │ │ +
341 #undef DOF_FREE_SIZE
│ │ │ │ +
342#endif // DOF_FREE_SIZE
│ │ │ │ +
343
│ │ │ │ +
344#ifdef DOF_UNIT_ALL_FREE
│ │ │ │ +
345 #undef DOF_UNIT_ALL_FREE
│ │ │ │ +
346#endif // DOF_UNIT_ALL_FREE
│ │ │ │
347
│ │ │ │ -
│ │ │ │ -
348 inline int min ( const DofVectorPointer< int > &dofVector )
│ │ │ │ -
349 {
│ │ │ │ -
350 assert( !dofVector == false );
│ │ │ │ -
351 int *array = (int *)dofVector;
│ │ │ │ -
352 int result = std::numeric_limits< int >::max();
│ │ │ │ -
353 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
│ │ │ │ -
354 result = std::min( result, array[ dof ] ) );
│ │ │ │ -
355 return result;
│ │ │ │ -
356 }
│ │ │ │ -
│ │ │ │ -
357
│ │ │ │ -
358 } // namespace Alberta
│ │ │ │ +
348#ifdef FOR_ALL_DOFS
│ │ │ │ +
349 #undef FOR_ALL_DOFS
│ │ │ │ +
350#endif // FOR_ALL_DOFS
│ │ │ │ +
351
│ │ │ │ +
352#ifdef FOR_ALL_FREE_DOFS
│ │ │ │ +
353 #undef FOR_ALL_FREE_DOFS
│ │ │ │ +
354#endif // FOR_ALL_FREE_DOFS
│ │ │ │ +
355
│ │ │ │ +
356#ifdef DOWBM_FULL
│ │ │ │ +
357 #undef DOWBM_FULL
│ │ │ │ +
358#endif // DOWBM_FULL
│ │ │ │
359
│ │ │ │ -
360} // namespace Dune
│ │ │ │ -
361
│ │ │ │ -
362#endif // #if HAVE_ALBERTA
│ │ │ │ +
360#ifdef DOWBM_SYMM
│ │ │ │ +
361 #undef DOWBM_SYMM
│ │ │ │ +
362#endif // DOWBM_SYMM
│ │ │ │
363
│ │ │ │ -
364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ -
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ -
void abs(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:328
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ -
int min(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:348
│ │ │ │ -
int max(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:337
│ │ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
Definition meshpointer.hh:40
│ │ │ │ -
Definition dofvector.hh:35
│ │ │ │ -
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:42
│ │ │ │ -
ALBERTA DOF_INT_VEC DofVector
Definition dofvector.hh:40
│ │ │ │ -
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:57
│ │ │ │ -
static void free(DofVector *dofVector)
Definition dofvector.hh:47
│ │ │ │ -
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:52
│ │ │ │ -
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:84
│ │ │ │ -
static void free(DofVector *dofVector)
Definition dofvector.hh:74
│ │ │ │ -
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:69
│ │ │ │ -
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:79
│ │ │ │ -
ALBERTA DOF_SCHAR_VEC DofVector
Definition dofvector.hh:67
│ │ │ │ -
static void free(DofVector *dofVector)
Definition dofvector.hh:101
│ │ │ │ -
ALBERTA DOF_UCHAR_VEC DofVector
Definition dofvector.hh:94
│ │ │ │ -
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:106
│ │ │ │ -
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:96
│ │ │ │ -
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:111
│ │ │ │ -
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:123
│ │ │ │ -
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:133
│ │ │ │ -
static void free(DofVector *dofVector)
Definition dofvector.hh:128
│ │ │ │ -
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:138
│ │ │ │ -
ALBERTA DOF_REAL_VEC DofVector
Definition dofvector.hh:121
│ │ │ │ -
ALBERTA DOF_REAL_D_VEC DofVector
Definition dofvector.hh:148
│ │ │ │ -
static void free(DofVector *dofVector)
Definition dofvector.hh:155
│ │ │ │ -
static bool write(const DofVector *dofVector, const std::string &filename)
Definition dofvector.hh:165
│ │ │ │ -
static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
Definition dofvector.hh:160
│ │ │ │ -
static DofVector * get(const DofSpace *dofSpace, const std::string &name)
Definition dofvector.hh:150
│ │ │ │ -
Definition dofvector.hh:179
│ │ │ │ -
DofVectorProvider::DofVector DofVector
Definition dofvector.hh:185
│ │ │ │ -
void setupInterpolation()
Definition dofvector.hh:292
│ │ │ │ -
void initialize(const Dof &value)
Definition dofvector.hh:270
│ │ │ │ -
void read(const std::string &filename, const MeshPointer< dim > &meshPointer)
Definition dofvector.hh:243
│ │ │ │ -
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ │ -
void release()
Definition dofvector.hh:254
│ │ │ │ -
AdaptationData * getAdaptationData() const
Definition dofvector.hh:277
│ │ │ │ -
void setupRestriction()
Definition dofvector.hh:299
│ │ │ │ -
DofVectorPointer()
Definition dofvector.hh:193
│ │ │ │ -
void setAdaptationData(AdaptationData *adaptationData)
Definition dofvector.hh:285
│ │ │ │ -
bool write(const std::string &filename) const
Definition dofvector.hh:249
│ │ │ │ -
DofVectorPointer(DofVector *dofVector)
Definition dofvector.hh:202
│ │ │ │ -
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ │ -
static const bool supportsAdaptationData
Definition dofvector.hh:187
│ │ │ │ -
std::string name() const
Definition dofvector.hh:228
│ │ │ │ -
void forEach(Functor &functor) const
Definition dofvector.hh:264
│ │ │ │ -
DofVectorPointer(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:197
│ │ │ │ +
364#ifdef DOWBM_DIAG
│ │ │ │ +
365 #undef DOWBM_DIAG
│ │ │ │ +
366#endif // DOWBM_DIAG
│ │ │ │ +
367
│ │ │ │ +
368#ifdef ROW_LENGTH
│ │ │ │ +
369 #undef ROW_LENGTH
│ │ │ │ +
370#endif // ROW_LENGTH
│ │ │ │ +
371
│ │ │ │ +
372#ifdef ENTRY_USED
│ │ │ │ +
373 #undef ENTRY_USED
│ │ │ │ +
374#endif // ENTRY_USED
│ │ │ │ +
375
│ │ │ │ +
376#ifdef ENTRY_NOT_USED
│ │ │ │ +
377 #undef ENTRY_NOT_USED
│ │ │ │ +
378#endif // ENTRY_NOT_USED
│ │ │ │ +
379
│ │ │ │ +
380#ifdef UNUSED_ENTRY
│ │ │ │ +
381 #undef UNUSED_ENTRY
│ │ │ │ +
382#endif // UNUSED_ENTRY
│ │ │ │ +
383
│ │ │ │ +
384#ifdef NO_MORE_ENTRIES
│ │ │ │ +
385 #undef NO_MORE_ENTRIES
│ │ │ │ +
386#endif // NO_MORE_ENTRIES
│ │ │ │ +
387
│ │ │ │ +
388#ifdef LAGRANGE_NODES
│ │ │ │ +
389 #undef LAGRANGE_NODES
│ │ │ │ +
390#endif // LAGRANGE_NODES
│ │ │ │ +
391
│ │ │ │ +
392#ifdef MAX_N_QUAD_POINTS
│ │ │ │ +
393 #undef MAX_N_QUAD_POINTS
│ │ │ │ +
394#endif // MAX_N_QUAD_POINTS
│ │ │ │ +
395
│ │ │ │ +
396#ifdef INIT_PHI
│ │ │ │ +
397 #undef INIT_PHI
│ │ │ │ +
398#endif // INIT_PHI
│ │ │ │ +
399
│ │ │ │ +
400#ifdef INIT_GRD_PHI
│ │ │ │ +
401 #undef INIT_GRD_PHI
│ │ │ │ +
402#endif // INIT_GRD_PHI
│ │ │ │ +
403
│ │ │ │ +
404#ifdef INIT_D2_PHI
│ │ │ │ +
405 #undef INIT_D2_PHI
│ │ │ │ +
406#endif // INIT_D2_PHI
│ │ │ │ +
407
│ │ │ │ +
408#ifdef MESH_REFINED
│ │ │ │ +
409 #undef MESH_REFINED
│ │ │ │ +
410#endif // MESH_REFINED
│ │ │ │ +
411
│ │ │ │ +
412#ifdef MESH_COARSENED
│ │ │ │ +
413 #undef MESH_COARSENED
│ │ │ │ +
414#endif // MESH_COARSENED
│ │ │ │ +
415
│ │ │ │ +
416#ifdef H1_NORM
│ │ │ │ +
417 #undef H1_NORM
│ │ │ │ +
418#endif // H1_NORM
│ │ │ │ +
419
│ │ │ │ +
420#ifdef L2_NORM
│ │ │ │ +
421 #undef L2_NORM
│ │ │ │ +
422#endif // L2_NORM
│ │ │ │ +
423
│ │ │ │ +
424#ifdef GRAPH_MESH_BOUNDARY
│ │ │ │ +
425 #undef GRAPH_MESH_BOUNDARY
│ │ │ │ +
426#endif // GRAPH_MESH_BOUNDARY
│ │ │ │ +
427
│ │ │ │ +
428#ifdef GRAPH_MESH_ELEMENT_MARK
│ │ │ │ +
429 #undef GRAPH_MESH_ELEMENT_MARK
│ │ │ │ +
430#endif // GRAPH_MESH_ELEMENT_MARK
│ │ │ │ +
431
│ │ │ │ +
432#ifdef GRAPH_MESH_VERTEX_DOF
│ │ │ │ +
433 #undef GRAPH_MESH_VERTEX_DOF
│ │ │ │ +
434#endif // GRAPH_MESH_VERTEX_DOF
│ │ │ │ +
435
│ │ │ │ +
436#ifdef GRAPH_MESH_ELEMENT_INDEX
│ │ │ │ +
437 #undef GRAPH_MESH_ELEMENT_INDEX
│ │ │ │ +
438#endif // GRAPH_MESH_ELEMENT_INDEX
│ │ │ │ +
439
│ │ │ │ +
440#ifdef GET_MESH
│ │ │ │ +
441 #undef GET_MESH
│ │ │ │ +
442#endif // GET_MESH
│ │ │ │ +
443
│ │ │ │ +
444#ifdef GET_DOF_VEC
│ │ │ │ +
445 #undef GET_DOF_VEC
│ │ │ │ +
446#endif // GET_DOF_VEC
│ │ │ │ +
447
│ │ │ │ +
448#ifdef CARD_SN_MAX
│ │ │ │ +
449 #undef CARD_SN_MAX
│ │ │ │ +
450#endif // CARD_SN_MAX
│ │ │ │ +
451
│ │ │ │ +
452#ifdef INIT_UH
│ │ │ │ +
453 #undef INIT_UH
│ │ │ │ +
454#endif // INIT_UH
│ │ │ │ +
455
│ │ │ │ +
456#ifdef INIT_GRD_UH
│ │ │ │ +
457 #undef INIT_GRD_UH
│ │ │ │ +
458#endif // INIT_GRD_UH
│ │ │ │ +
459
│ │ │ │ +
460#ifdef TRAVERSE_START
│ │ │ │ +
461 #undef TRAVERSE_START
│ │ │ │ +
462#endif // TRAVERSE_START
│ │ │ │ +
463
│ │ │ │ +
464#ifdef TRAVERSE_STOP
│ │ │ │ +
465 #undef TRAVERSE_STOP
│ │ │ │ +
466#endif // TRAVERSE_STOP
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,563 +1,471 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -dofvector.hh │ │ │ │ │ +undefine-2.0.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ -6#define DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_r_e_f_i_n_e_m_e_n_t_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15#if HAVE_ALBERTA │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ +12#ifdef _ALBERTA_H_ │ │ │ │ │ +13 #undef _ALBERTA_H_ │ │ │ │ │ +14#endif // _ALBERTA_H_ │ │ │ │ │ +15 │ │ │ │ │ +16#ifdef ALBERTA_VERSION │ │ │ │ │ +17 #undef ALBERTA_VERSION │ │ │ │ │ +18#endif // ALBERTA_VERSION │ │ │ │ │ 19 │ │ │ │ │ -20 namespace Alberta │ │ │ │ │ -21 { │ │ │ │ │ -22 │ │ │ │ │ -23 // External Forward Declarations │ │ │ │ │ -24 // ----------------------------- │ │ │ │ │ -25 │ │ │ │ │ -26 template< int dim > │ │ │ │ │ -27 class MeshPointer; │ │ │ │ │ -28 │ │ │ │ │ -29 │ │ │ │ │ -30 │ │ │ │ │ -31 // DofVectorProvider │ │ │ │ │ -32 // ----------------- │ │ │ │ │ -33 │ │ │ │ │ -34 template< class Dof > │ │ │ │ │ -_3_5 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r; │ │ │ │ │ -36 │ │ │ │ │ -37 template<> │ │ │ │ │ -_3_8 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< int > │ │ │ │ │ -39 { │ │ │ │ │ -_4_0 typedef _A_L_B_E_R_T_A DOF_INT_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ -41 │ │ │ │ │ -_4_2 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ -43 { │ │ │ │ │ -44 return _A_L_B_E_R_T_A get_dof_int_vec( name.c_str(), dofSpace ); │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -_4_7 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ -48 { │ │ │ │ │ -49 _A_L_B_E_R_T_A free_dof_int_vec( dofVector ); │ │ │ │ │ -50 } │ │ │ │ │ +20#ifdef ALBERTA_DEBUG │ │ │ │ │ +21 #undef ALBERTA_DEBUG │ │ │ │ │ +22#endif // ALBERTA_DEBUG │ │ │ │ │ +23 │ │ │ │ │ +24#ifdef DIM_MAX │ │ │ │ │ +25 #undef DIM_MAX │ │ │ │ │ +26#endif // DIM_MAX │ │ │ │ │ +27 │ │ │ │ │ +28#ifdef N_VERTICES │ │ │ │ │ +29 #undef N_VERTICES │ │ │ │ │ +30#endif // N_VERTICES │ │ │ │ │ +31 │ │ │ │ │ +32#ifdef N_EDGES │ │ │ │ │ +33 #undef N_EDGES │ │ │ │ │ +34#endif // N_EDGES │ │ │ │ │ +35 │ │ │ │ │ +36#ifdef N_WALLS │ │ │ │ │ +37 #undef N_WALLS │ │ │ │ │ +38#endif // N_WALLS │ │ │ │ │ +39 │ │ │ │ │ +40#ifdef N_FACES │ │ │ │ │ +41 #undef N_FACES │ │ │ │ │ +42#endif // N_FACES │ │ │ │ │ +43 │ │ │ │ │ +44#ifdef N_NEIGH │ │ │ │ │ +45 #undef N_NEIGH │ │ │ │ │ +46#endif // N_NEIGH │ │ │ │ │ +47 │ │ │ │ │ +48#ifdef DIM_FAC │ │ │ │ │ +49 #undef DIM_FAC │ │ │ │ │ +50#endif // DIM_FAC │ │ │ │ │ 51 │ │ │ │ │ -_5_2 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ -*dofSpace ) │ │ │ │ │ -53 { │ │ │ │ │ -54 return _A_L_B_E_R_T_A read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -_5_7 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ -) │ │ │ │ │ -58 { │ │ │ │ │ -59 int success = _A_L_B_E_R_T_A write_dof_int_vec_xdr( dofVector, filename.c_str() ); │ │ │ │ │ -60 return (success == 0); │ │ │ │ │ -61 } │ │ │ │ │ -62 }; │ │ │ │ │ +52#ifdef N_VERTICES_0D │ │ │ │ │ +53 #undef N_VERTICES_0D │ │ │ │ │ +54#endif // N_VERTICES_0D │ │ │ │ │ +55 │ │ │ │ │ +56#ifdef N_EDGES_0D │ │ │ │ │ +57 #undef N_EDGES_0D │ │ │ │ │ +58#endif // N_EDGES_0D │ │ │ │ │ +59 │ │ │ │ │ +60#ifdef N_FACES_0D │ │ │ │ │ +61 #undef N_FACES_0D │ │ │ │ │ +62#endif // N_FACES_0D │ │ │ │ │ 63 │ │ │ │ │ -64 template<> │ │ │ │ │ -_6_5 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< signed char > │ │ │ │ │ -66 { │ │ │ │ │ -_6_7 typedef _A_L_B_E_R_T_A DOF_SCHAR_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ -68 │ │ │ │ │ -_6_9 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ -70 { │ │ │ │ │ -71 return _A_L_B_E_R_T_A get_dof_schar_vec( name.c_str(), dofSpace ); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_4 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ -75 { │ │ │ │ │ -76 _A_L_B_E_R_T_A free_dof_schar_vec( dofVector ); │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -_7_9 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ -*dofSpace ) │ │ │ │ │ -80 { │ │ │ │ │ -81 return _A_L_B_E_R_T_A read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ -82 } │ │ │ │ │ +64#ifdef N_NEIGH_0D │ │ │ │ │ +65 #undef N_NEIGH_0D │ │ │ │ │ +66#endif // N_NEIGH_0D │ │ │ │ │ +67 │ │ │ │ │ +68#ifdef N_WALLS_0D │ │ │ │ │ +69 #undef N_WALLS_0D │ │ │ │ │ +70#endif // N_WALLS_0D │ │ │ │ │ +71 │ │ │ │ │ +72#ifdef N_VERTICES_1D │ │ │ │ │ +73 #undef N_VERTICES_1D │ │ │ │ │ +74#endif // N_VERTICES_1D │ │ │ │ │ +75 │ │ │ │ │ +76#ifdef N_EDGES_1D │ │ │ │ │ +77 #undef N_EDGES_1D │ │ │ │ │ +78#endif // N_EDGES_1D │ │ │ │ │ +79 │ │ │ │ │ +80#ifdef N_FACES_1D │ │ │ │ │ +81 #undef N_FACES_1D │ │ │ │ │ +82#endif // N_FACES_1D │ │ │ │ │ 83 │ │ │ │ │ -_8_4 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ -) │ │ │ │ │ -85 { │ │ │ │ │ -86 int success = _A_L_B_E_R_T_A write_dof_schar_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ -); │ │ │ │ │ -87 return (success == 0); │ │ │ │ │ -88 } │ │ │ │ │ -89 }; │ │ │ │ │ -90 │ │ │ │ │ -91 template<> │ │ │ │ │ -_9_2 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< unsigned char > │ │ │ │ │ -93 { │ │ │ │ │ -_9_4 typedef _A_L_B_E_R_T_A DOF_UCHAR_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ +84#ifdef N_NEIGH_1D │ │ │ │ │ +85 #undef N_NEIGH_1D │ │ │ │ │ +86#endif // N_NEIGH_1D │ │ │ │ │ +87 │ │ │ │ │ +88#ifdef N_WALLS_1D │ │ │ │ │ +89 #undef N_WALLS_1D │ │ │ │ │ +90#endif // N_WALLS_1D │ │ │ │ │ +91 │ │ │ │ │ +92#ifdef N_VERTICES_2D │ │ │ │ │ +93 #undef N_VERTICES_2D │ │ │ │ │ +94#endif // N_VERTICES_2D │ │ │ │ │ 95 │ │ │ │ │ -_9_6 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ -97 { │ │ │ │ │ -98 return _A_L_B_E_R_T_A get_dof_uchar_vec( name.c_str(), dofSpace ); │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -_1_0_1 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ -102 { │ │ │ │ │ -103 _A_L_B_E_R_T_A free_dof_uchar_vec( dofVector ); │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ -*dofSpace ) │ │ │ │ │ -107 { │ │ │ │ │ -108 return _A_L_B_E_R_T_A read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -_1_1_1 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ -) │ │ │ │ │ -112 { │ │ │ │ │ -113 int success = _A_L_B_E_R_T_A write_dof_uchar_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ -); │ │ │ │ │ -114 return (success == 0); │ │ │ │ │ -115 } │ │ │ │ │ -116 }; │ │ │ │ │ -117 │ │ │ │ │ -118 template<> │ │ │ │ │ -_1_1_9 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< _R_e_a_l > │ │ │ │ │ -120 { │ │ │ │ │ -_1_2_1 typedef _A_L_B_E_R_T_A DOF_REAL_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ -122 │ │ │ │ │ -_1_2_3 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ -124 { │ │ │ │ │ -125 return _A_L_B_E_R_T_A get_dof_real_vec( name.c_str(), dofSpace ); │ │ │ │ │ -126 } │ │ │ │ │ +96#ifdef N_EDGES_2D │ │ │ │ │ +97 #undef N_EDGES_2D │ │ │ │ │ +98#endif // N_EDGES_2D │ │ │ │ │ +99 │ │ │ │ │ +100#ifdef N_FACES_2D │ │ │ │ │ +101 #undef N_FACES_2D │ │ │ │ │ +102#endif // N_FACES_2D │ │ │ │ │ +103 │ │ │ │ │ +104#ifdef N_NEIGH_2D │ │ │ │ │ +105 #undef N_NEIGH_2D │ │ │ │ │ +106#endif // N_NEIGH_2D │ │ │ │ │ +107 │ │ │ │ │ +108#ifdef N_WALLS_2D │ │ │ │ │ +109 #undef N_WALLS_2D │ │ │ │ │ +110#endif // N_WALLS_2D │ │ │ │ │ +111 │ │ │ │ │ +112#ifdef N_VERTICES_3D │ │ │ │ │ +113 #undef N_VERTICES_3D │ │ │ │ │ +114#endif // N_VERTICES_3D │ │ │ │ │ +115 │ │ │ │ │ +116#ifdef N_EDGES_3D │ │ │ │ │ +117 #undef N_EDGES_3D │ │ │ │ │ +118#endif // N_EDGES_3D │ │ │ │ │ +119 │ │ │ │ │ +120#ifdef N_FACES_3D │ │ │ │ │ +121 #undef N_FACES_3D │ │ │ │ │ +122#endif // N_FACES_3D │ │ │ │ │ +123 │ │ │ │ │ +124#ifdef N_NEIGH_3D │ │ │ │ │ +125 #undef N_NEIGH_3D │ │ │ │ │ +126#endif // N_NEIGH_3D │ │ │ │ │ 127 │ │ │ │ │ -_1_2_8 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ -129 { │ │ │ │ │ -130 _A_L_B_E_R_T_A free_dof_real_vec( dofVector ); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -_1_3_3 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ -*dofSpace ) │ │ │ │ │ -134 { │ │ │ │ │ -135 return _A_L_B_E_R_T_A read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -_1_3_8 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ -) │ │ │ │ │ -139 { │ │ │ │ │ -140 int success = _A_L_B_E_R_T_A write_dof_real_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ -); │ │ │ │ │ -141 return (success == 0); │ │ │ │ │ -142 } │ │ │ │ │ -143 }; │ │ │ │ │ -144 │ │ │ │ │ -145 template<> │ │ │ │ │ -_1_4_6 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< _G_l_o_b_a_l_V_e_c_t_o_r > │ │ │ │ │ -147 { │ │ │ │ │ -_1_4_8 typedef _A_L_B_E_R_T_A DOF_REAL_D_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ │ -149 │ │ │ │ │ -_1_5_0 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ │ -151 { │ │ │ │ │ -152 return _A_L_B_E_R_T_A get_dof_real_d_vec( name.c_str(), dofSpace ); │ │ │ │ │ -153 } │ │ │ │ │ -154 │ │ │ │ │ -_1_5_5 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ -156 { │ │ │ │ │ -157 _A_L_B_E_R_T_A free_dof_real_d_vec( dofVector ); │ │ │ │ │ -158 } │ │ │ │ │ +128#ifdef N_WALLS_3D │ │ │ │ │ +129 #undef N_WALLS_3D │ │ │ │ │ +130#endif // N_WALLS_3D │ │ │ │ │ +131 │ │ │ │ │ +132#ifdef N_VERTICES_MAX │ │ │ │ │ +133 #undef N_VERTICES_MAX │ │ │ │ │ +134#endif // N_VERTICES_MAX │ │ │ │ │ +135 │ │ │ │ │ +136#ifdef N_EDGES_MAX │ │ │ │ │ +137 #undef N_EDGES_MAX │ │ │ │ │ +138#endif // N_EDGES_MAX │ │ │ │ │ +139 │ │ │ │ │ +140#ifdef N_FACES_MAX │ │ │ │ │ +141 #undef N_FACES_MAX │ │ │ │ │ +142#endif // N_FACES_MAX │ │ │ │ │ +143 │ │ │ │ │ +144#ifdef N_NEIGH_MAX │ │ │ │ │ +145 #undef N_NEIGH_MAX │ │ │ │ │ +146#endif // N_NEIGH_MAX │ │ │ │ │ +147 │ │ │ │ │ +148#ifdef N_WALLS_MAX │ │ │ │ │ +149 #undef N_WALLS_MAX │ │ │ │ │ +150#endif // N_WALLS_MAX │ │ │ │ │ +151 │ │ │ │ │ +152#ifdef N_LAMBDA │ │ │ │ │ +153 #undef N_LAMBDA │ │ │ │ │ +154#endif // N_LAMBDA │ │ │ │ │ +155 │ │ │ │ │ +156#ifdef LAMBDA_MAX │ │ │ │ │ +157 #undef LAMBDA_MAX │ │ │ │ │ +158#endif // LAMBDA_MAX │ │ │ │ │ 159 │ │ │ │ │ -_1_6_0 static _D_o_f_V_e_c_t_o_r *_r_e_a_d ( const std::string &filename, _M_e_s_h *mesh, _D_o_f_S_p_a_c_e │ │ │ │ │ -*dofSpace ) │ │ │ │ │ -161 { │ │ │ │ │ -162 return _A_L_B_E_R_T_A read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -_1_6_5 static bool _w_r_i_t_e ( const _D_o_f_V_e_c_t_o_r *dofVector, const std::string &filename │ │ │ │ │ -) │ │ │ │ │ -166 { │ │ │ │ │ -167 int success = _A_L_B_E_R_T_A write_dof_real_d_vec_xdr( dofVector, filename.c_str() │ │ │ │ │ -); │ │ │ │ │ -168 return (success == 0); │ │ │ │ │ -169 } │ │ │ │ │ -170 }; │ │ │ │ │ +160#ifdef INDEX │ │ │ │ │ +161 #undef INDEX │ │ │ │ │ +162#endif // INDEX │ │ │ │ │ +163 │ │ │ │ │ +164#ifdef INDEX │ │ │ │ │ +165 #undef INDEX │ │ │ │ │ +166#endif // INDEX │ │ │ │ │ +167 │ │ │ │ │ +168#ifdef IS_LEAF_EL │ │ │ │ │ +169 #undef IS_LEAF_EL │ │ │ │ │ +170#endif // IS_LEAF_EL │ │ │ │ │ 171 │ │ │ │ │ -172 │ │ │ │ │ -173 │ │ │ │ │ -174 // DofVectorPointer │ │ │ │ │ -175 // ---------------- │ │ │ │ │ -176 │ │ │ │ │ -177 template< class Dof > │ │ │ │ │ -_1_7_8 class _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ -179 { │ │ │ │ │ -180 typedef _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _D_o_f_ _> _T_h_i_s; │ │ │ │ │ -181 │ │ │ │ │ -182 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _D_o_f_ _> _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r; │ │ │ │ │ +172#ifdef LEAF_DATA │ │ │ │ │ +173 #undef LEAF_DATA │ │ │ │ │ +174#endif // LEAF_DATA │ │ │ │ │ +175 │ │ │ │ │ +176#ifdef INTERIOR │ │ │ │ │ +177 #undef INTERIOR │ │ │ │ │ +178#endif // INTERIOR │ │ │ │ │ +179 │ │ │ │ │ +180#ifdef DIRICHLET │ │ │ │ │ +181 #undef DIRICHLET │ │ │ │ │ +182#endif // DIRICHLET │ │ │ │ │ 183 │ │ │ │ │ -184 public: │ │ │ │ │ -_1_8_5 typedef typename DofVectorProvider::DofVector _D_o_f_V_e_c_t_o_r; │ │ │ │ │ -186 │ │ │ │ │ -_1_8_7 static const bool _s_u_p_p_o_r_t_s_A_d_a_p_t_a_t_i_o_n_D_a_t_a = true; │ │ │ │ │ -188 │ │ │ │ │ -189 private: │ │ │ │ │ -190 _D_o_f_V_e_c_t_o_r *dofVector_; │ │ │ │ │ +184#ifdef NEUMANN │ │ │ │ │ +185 #undef NEUMANN │ │ │ │ │ +186#endif // NEUMANN │ │ │ │ │ +187 │ │ │ │ │ +188#ifdef IS_NEUMANN │ │ │ │ │ +189 #undef IS_NEUMANN │ │ │ │ │ +190#endif // IS_NEUMANN │ │ │ │ │ 191 │ │ │ │ │ -192 public: │ │ │ │ │ -_1_9_3 _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r () │ │ │ │ │ -194 : dofVector_( NULL ) │ │ │ │ │ -195 {} │ │ │ │ │ -196 │ │ │ │ │ -_1_9_7 explicit _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r ( const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e, │ │ │ │ │ -198 const std::string &_n_a_m_e = "" ) │ │ │ │ │ -199 : dofVector_ ( _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r::get( _d_o_f_S_p_a_c_e, _n_a_m_e ) ) │ │ │ │ │ -200 {} │ │ │ │ │ -201 │ │ │ │ │ -_2_0_2 explicit _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ │ -203 : dofVector_( dofVector ) │ │ │ │ │ -204 {} │ │ │ │ │ -205 │ │ │ │ │ -_2_0_6 explicit operator bool () const │ │ │ │ │ -207 { │ │ │ │ │ -208 return (bool)dofVector_; │ │ │ │ │ -209 } │ │ │ │ │ -210 │ │ │ │ │ -_2_1_1 operator _D_o_f_V_e_c_t_o_r * () const │ │ │ │ │ -212 { │ │ │ │ │ -213 return dofVector_; │ │ │ │ │ -214 } │ │ │ │ │ +192#ifdef IS_DIRICHLET │ │ │ │ │ +193 #undef IS_DIRICHLET │ │ │ │ │ +194#endif // IS_DIRICHLET │ │ │ │ │ +195 │ │ │ │ │ +196#ifdef IS_INTERIOR │ │ │ │ │ +197 #undef IS_INTERIOR │ │ │ │ │ +198#endif // IS_INTERIOR │ │ │ │ │ +199 │ │ │ │ │ +200#ifdef N_NODE_TYPES │ │ │ │ │ +201 #undef N_NODE_TYPES │ │ │ │ │ +202#endif // N_NODE_TYPES │ │ │ │ │ +203 │ │ │ │ │ +204#ifdef VERTEX │ │ │ │ │ +205 #undef VERTEX │ │ │ │ │ +206#endif // VERTEX │ │ │ │ │ +207 │ │ │ │ │ +208#ifdef CENTER │ │ │ │ │ +209 #undef CENTER │ │ │ │ │ +210#endif // CENTER │ │ │ │ │ +211 │ │ │ │ │ +212#ifdef EDGE │ │ │ │ │ +213 #undef EDGE │ │ │ │ │ +214#endif // EDGE │ │ │ │ │ 215 │ │ │ │ │ -_2_1_6 operator Dof * () const │ │ │ │ │ -217 { │ │ │ │ │ -218 Dof *ptr = NULL; │ │ │ │ │ -219 GET_DOF_VEC( ptr, dofVector_ ); │ │ │ │ │ -220 return ptr; │ │ │ │ │ -221 } │ │ │ │ │ -222 │ │ │ │ │ -_2_2_3 const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e () const │ │ │ │ │ -224 { │ │ │ │ │ -225 return dofVector_->fe_space; │ │ │ │ │ -226 } │ │ │ │ │ +216#ifdef FACE │ │ │ │ │ +217 #undef FACE │ │ │ │ │ +218#endif // FACE │ │ │ │ │ +219 │ │ │ │ │ +220#ifdef LIST_ENTRY │ │ │ │ │ +221 #undef LIST_ENTRY │ │ │ │ │ +222#endif // LIST_ENTRY │ │ │ │ │ +223 │ │ │ │ │ +224#ifdef WALL_BOUND │ │ │ │ │ +225 #undef WALL_BOUND │ │ │ │ │ +226#endif // WALL_BOUND │ │ │ │ │ 227 │ │ │ │ │ -_2_2_8 std::string _n_a_m_e () const │ │ │ │ │ -229 { │ │ │ │ │ -230 if( dofVector_ ) │ │ │ │ │ -231 return dofVector_->name; │ │ │ │ │ -232 else │ │ │ │ │ -233 return std::string(); │ │ │ │ │ -234 } │ │ │ │ │ +228#ifdef FILL_NOTHING │ │ │ │ │ +229 #undef FILL_NOTHING │ │ │ │ │ +230#endif // FILL_NOTHING │ │ │ │ │ +231 │ │ │ │ │ +232#ifdef FILL_COORDS │ │ │ │ │ +233 #undef FILL_COORDS │ │ │ │ │ +234#endif // FILL_COORDS │ │ │ │ │ 235 │ │ │ │ │ -_2_3_6 void _c_r_e_a_t_e ( const _D_o_f_S_p_a_c_e *_d_o_f_S_p_a_c_e, const std::string &_n_a_m_e = "" ) │ │ │ │ │ -237 { │ │ │ │ │ -238 _r_e_l_e_a_s_e(); │ │ │ │ │ -239 dofVector_ = DofVectorProvider::get( _d_o_f_S_p_a_c_e, _n_a_m_e ); │ │ │ │ │ -240 } │ │ │ │ │ -241 │ │ │ │ │ -242 template< int dim > │ │ │ │ │ -_2_4_3 void _r_e_a_d ( const std::string &filename, const _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -&meshPointer ) │ │ │ │ │ -244 { │ │ │ │ │ -245 _r_e_l_e_a_s_e(); │ │ │ │ │ -246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL ); │ │ │ │ │ -247 } │ │ │ │ │ -248 │ │ │ │ │ -_2_4_9 bool _w_r_i_t_e ( const std::string &filename ) const │ │ │ │ │ -250 { │ │ │ │ │ -251 return DofVectorProvider::write( dofVector_, filename ); │ │ │ │ │ -252 } │ │ │ │ │ -253 │ │ │ │ │ -_2_5_4 void _r_e_l_e_a_s_e () │ │ │ │ │ -255 { │ │ │ │ │ -256 if( dofVector_ ) │ │ │ │ │ -257 { │ │ │ │ │ -258 DofVectorProvider::free( dofVector_ ); │ │ │ │ │ -259 dofVector_ = NULL; │ │ │ │ │ -260 } │ │ │ │ │ -261 } │ │ │ │ │ -262 │ │ │ │ │ -263 template< class Functor > │ │ │ │ │ -_2_6_4 void _f_o_r_E_a_c_h ( Functor &functor ) const │ │ │ │ │ -265 { │ │ │ │ │ -266 Dof *array = (Dof *)(*this); │ │ │ │ │ -267 FOR_ALL_DOFS( _d_o_f_S_p_a_c_e()->admin, functor( array[ dof ] ) ); │ │ │ │ │ -268 } │ │ │ │ │ -269 │ │ │ │ │ -_2_7_0 void _i_n_i_t_i_a_l_i_z_e ( const Dof &value ) │ │ │ │ │ -271 { │ │ │ │ │ -272 Dof *array = (Dof *)(*this); │ │ │ │ │ -273 FOR_ALL_DOFS( _d_o_f_S_p_a_c_e()->admin, array[ dof ] = value ); │ │ │ │ │ -274 } │ │ │ │ │ +236#ifdef FILL_BOUND │ │ │ │ │ +237 #undef FILL_BOUND │ │ │ │ │ +238#endif // FILL_BOUND │ │ │ │ │ +239 │ │ │ │ │ +240#ifdef FILL_NEIGH │ │ │ │ │ +241 #undef FILL_NEIGH │ │ │ │ │ +242#endif // FILL_NEIGH │ │ │ │ │ +243 │ │ │ │ │ +244#ifdef FILL_OPP_COORDS │ │ │ │ │ +245 #undef FILL_OPP_COORDS │ │ │ │ │ +246#endif // FILL_OPP_COORDS │ │ │ │ │ +247 │ │ │ │ │ +248#ifdef FILL_ORIENTATION │ │ │ │ │ +249 #undef FILL_ORIENTATION │ │ │ │ │ +250#endif // FILL_ORIENTATION │ │ │ │ │ +251 │ │ │ │ │ +252#ifdef FILL_EL_TYPE │ │ │ │ │ +253 #undef FILL_EL_TYPE │ │ │ │ │ +254#endif // FILL_EL_TYPE │ │ │ │ │ +255 │ │ │ │ │ +256#ifdef FILL_PROJECTION │ │ │ │ │ +257 #undef FILL_PROJECTION │ │ │ │ │ +258#endif // FILL_PROJECTION │ │ │ │ │ +259 │ │ │ │ │ +260#ifdef FILL_ANY │ │ │ │ │ +261 #undef FILL_ANY │ │ │ │ │ +262#endif // FILL_ANY │ │ │ │ │ +263 │ │ │ │ │ +264#ifdef HOOK_QUEUE_OFFSET │ │ │ │ │ +265 #undef HOOK_QUEUE_OFFSET │ │ │ │ │ +266#endif // HOOK_QUEUE_OFFSET │ │ │ │ │ +267 │ │ │ │ │ +268#ifdef RUN_HOOKS_0 │ │ │ │ │ +269 #undef RUN_HOOKS_0 │ │ │ │ │ +270#endif // RUN_HOOKS_0 │ │ │ │ │ +271 │ │ │ │ │ +272#ifdef RUN_BAS_FCTS_HOOKS │ │ │ │ │ +273 #undef RUN_BAS_FCTS_HOOKS │ │ │ │ │ +274#endif // RUN_BAS_FCTS_HOOKS │ │ │ │ │ 275 │ │ │ │ │ -276 template< class AdaptationData > │ │ │ │ │ -_2_7_7 AdaptationData *_g_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a () const │ │ │ │ │ -278 { │ │ │ │ │ -279 assert( dofVector_ ); │ │ │ │ │ -280 assert( dofVector_->user_data ); │ │ │ │ │ -281 return static_cast< AdaptationData * >( dofVector_->user_data ); │ │ │ │ │ -282 } │ │ │ │ │ +276#ifdef RUN_HOOKS_1 │ │ │ │ │ +277 #undef RUN_HOOKS_1 │ │ │ │ │ +278#endif // RUN_HOOKS_1 │ │ │ │ │ +279 │ │ │ │ │ +280#ifdef RUN_HOOKS_2 │ │ │ │ │ +281 #undef RUN_HOOKS_2 │ │ │ │ │ +282#endif // RUN_HOOKS_2 │ │ │ │ │ 283 │ │ │ │ │ -284 template< class AdaptationData > │ │ │ │ │ -_2_8_5 void _s_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a ( AdaptationData *adaptationData ) │ │ │ │ │ -286 { │ │ │ │ │ -287 assert( dofVector_ ); │ │ │ │ │ -288 dofVector_->user_data = adaptationData; │ │ │ │ │ -289 } │ │ │ │ │ -290 │ │ │ │ │ -291 template< class Interpolation > │ │ │ │ │ -_2_9_2 void _s_e_t_u_p_I_n_t_e_r_p_o_l_a_t_i_o_n () │ │ │ │ │ -293 { │ │ │ │ │ -294 assert( dofVector_ ); │ │ │ │ │ -295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >; │ │ │ │ │ -296 } │ │ │ │ │ -297 │ │ │ │ │ -298 template< class Restriction > │ │ │ │ │ -_2_9_9 void _s_e_t_u_p_R_e_s_t_r_i_c_t_i_o_n () │ │ │ │ │ -300 { │ │ │ │ │ -301 assert( dofVector_ ); │ │ │ │ │ -302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >; │ │ │ │ │ -303 } │ │ │ │ │ -304 │ │ │ │ │ -305 private: │ │ │ │ │ -306 template< class Interpolation > │ │ │ │ │ -307 static void refineInterpolate ( _D_o_f_V_e_c_t_o_r *dofVector, RC_LIST_EL *list, int │ │ │ │ │ -n ) │ │ │ │ │ -308 { │ │ │ │ │ -309 const This dofVectorPointer( dofVector ); │ │ │ │ │ -310 typename Interpolation::Patch patch( list, n ); │ │ │ │ │ -311 Interpolation::interpolateVector( dofVectorPointer, patch ); │ │ │ │ │ -312 } │ │ │ │ │ -313 │ │ │ │ │ -314 template< class Restriction > │ │ │ │ │ -315 static void coarsenRestrict ( _D_o_f_V_e_c_t_o_r *dofVector, RC_LIST_EL *list, int n │ │ │ │ │ -) │ │ │ │ │ -316 { │ │ │ │ │ -317 const This dofVectorPointer( dofVector ); │ │ │ │ │ -318 typename Restriction::Patch patch( list, n ); │ │ │ │ │ -319 Restriction::restrictVector( dofVectorPointer, patch ); │ │ │ │ │ -320 } │ │ │ │ │ -321 }; │ │ │ │ │ -322 │ │ │ │ │ +284#ifdef RUN_HOOKS_3 │ │ │ │ │ +285 #undef RUN_HOOKS_3 │ │ │ │ │ +286#endif // RUN_HOOKS_3 │ │ │ │ │ +287 │ │ │ │ │ +288#ifdef RUN_HOOKS_4 │ │ │ │ │ +289 #undef RUN_HOOKS_4 │ │ │ │ │ +290#endif // RUN_HOOKS_4 │ │ │ │ │ +291 │ │ │ │ │ +292#ifdef RUN_HOOKS_5 │ │ │ │ │ +293 #undef RUN_HOOKS_5 │ │ │ │ │ +294#endif // RUN_HOOKS_5 │ │ │ │ │ +295 │ │ │ │ │ +296#ifdef RUN_HOOKS_6 │ │ │ │ │ +297 #undef RUN_HOOKS_6 │ │ │ │ │ +298#endif // RUN_HOOKS_6 │ │ │ │ │ +299 │ │ │ │ │ +300#ifdef RUN_HOOKS_7 │ │ │ │ │ +301 #undef RUN_HOOKS_7 │ │ │ │ │ +302#endif // RUN_HOOKS_7 │ │ │ │ │ +303 │ │ │ │ │ +304#ifdef CALL_EVERY_EL_PREORDER │ │ │ │ │ +305 #undef CALL_EVERY_EL_PREORDER │ │ │ │ │ +306#endif // CALL_EVERY_EL_PREORDER │ │ │ │ │ +307 │ │ │ │ │ +308#ifdef CALL_EVERY_EL_INORDER │ │ │ │ │ +309 #undef CALL_EVERY_EL_INORDER │ │ │ │ │ +310#endif // CALL_EVERY_EL_INORDER │ │ │ │ │ +311 │ │ │ │ │ +312#ifdef CALL_EVERY_EL_POSTORDER │ │ │ │ │ +313 #undef CALL_EVERY_EL_POSTORDER │ │ │ │ │ +314#endif // CALL_EVERY_EL_POSTORDER │ │ │ │ │ +315 │ │ │ │ │ +316#ifdef CALL_LEAF_EL │ │ │ │ │ +317 #undef CALL_LEAF_EL │ │ │ │ │ +318#endif // CALL_LEAF_EL │ │ │ │ │ +319 │ │ │ │ │ +320#ifdef CALL_LEAF_EL_LEVEL │ │ │ │ │ +321 #undef CALL_LEAF_EL_LEVEL │ │ │ │ │ +322#endif // CALL_LEAF_EL_LEVEL │ │ │ │ │ 323 │ │ │ │ │ -324 │ │ │ │ │ -325 // Auxiliary Functions │ │ │ │ │ -326 // -------------------- │ │ │ │ │ +324#ifdef CALL_EL_LEVEL │ │ │ │ │ +325 #undef CALL_EL_LEVEL │ │ │ │ │ +326#endif // CALL_EL_LEVEL │ │ │ │ │ 327 │ │ │ │ │ -_3_2_8 inline void _a_b_s ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _i_n_t_ _> &dofVector ) │ │ │ │ │ -329 { │ │ │ │ │ -330 assert( !dofVector == false ); │ │ │ │ │ -331 int *array = (int *)dofVector; │ │ │ │ │ -332 FOR_ALL_DOFS( dofVector._d_o_f_S_p_a_c_e()->admin, │ │ │ │ │ -333 array[ dof ] = std::abs( array[ dof ] ) ); │ │ │ │ │ -334 } │ │ │ │ │ +328#ifdef CALL_MG_LEVEL │ │ │ │ │ +329 #undef CALL_MG_LEVEL │ │ │ │ │ +330#endif // CALL_MG_LEVEL │ │ │ │ │ +331 │ │ │ │ │ +332#ifdef TEST_FLAG │ │ │ │ │ +333 #undef TEST_FLAG │ │ │ │ │ +334#endif // TEST_FLAG │ │ │ │ │ 335 │ │ │ │ │ -336 │ │ │ │ │ -_3_3_7 inline int _m_a_x ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _i_n_t_ _> &dofVector ) │ │ │ │ │ -338 { │ │ │ │ │ -339 assert( !dofVector == false ); │ │ │ │ │ -340 int *array = (int *)dofVector; │ │ │ │ │ -341 int result = std::numeric_limits< int >::min(); │ │ │ │ │ -342 FOR_ALL_DOFS( dofVector._d_o_f_S_p_a_c_e()->admin, │ │ │ │ │ -343 result = std::max( result, array[ dof ] ) ); │ │ │ │ │ -344 return result; │ │ │ │ │ -345 } │ │ │ │ │ -346 │ │ │ │ │ +336#ifdef DOF_ADMIN_DEF │ │ │ │ │ +337 #undef DOF_ADMIN_DEF │ │ │ │ │ +338#endif // DOF_ADMIN_DEF │ │ │ │ │ +339 │ │ │ │ │ +340#ifdef DOF_FREE_SIZE │ │ │ │ │ +341 #undef DOF_FREE_SIZE │ │ │ │ │ +342#endif // DOF_FREE_SIZE │ │ │ │ │ +343 │ │ │ │ │ +344#ifdef DOF_UNIT_ALL_FREE │ │ │ │ │ +345 #undef DOF_UNIT_ALL_FREE │ │ │ │ │ +346#endif // DOF_UNIT_ALL_FREE │ │ │ │ │ 347 │ │ │ │ │ -_3_4_8 inline int _m_i_n ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _i_n_t_ _> &dofVector ) │ │ │ │ │ -349 { │ │ │ │ │ -350 assert( !dofVector == false ); │ │ │ │ │ -351 int *array = (int *)dofVector; │ │ │ │ │ -352 int result = std::numeric_limits< int >::max(); │ │ │ │ │ -353 FOR_ALL_DOFS( dofVector._d_o_f_S_p_a_c_e()->admin, │ │ │ │ │ -354 result = std::min( result, array[ dof ] ) ); │ │ │ │ │ -355 return result; │ │ │ │ │ -356 } │ │ │ │ │ -357 │ │ │ │ │ -358 } // namespace Alberta │ │ │ │ │ +348#ifdef FOR_ALL_DOFS │ │ │ │ │ +349 #undef FOR_ALL_DOFS │ │ │ │ │ +350#endif // FOR_ALL_DOFS │ │ │ │ │ +351 │ │ │ │ │ +352#ifdef FOR_ALL_FREE_DOFS │ │ │ │ │ +353 #undef FOR_ALL_FREE_DOFS │ │ │ │ │ +354#endif // FOR_ALL_FREE_DOFS │ │ │ │ │ +355 │ │ │ │ │ +356#ifdef DOWBM_FULL │ │ │ │ │ +357 #undef DOWBM_FULL │ │ │ │ │ +358#endif // DOWBM_FULL │ │ │ │ │ 359 │ │ │ │ │ -360} // namespace Dune │ │ │ │ │ -361 │ │ │ │ │ -362#endif // #if HAVE_ALBERTA │ │ │ │ │ +360#ifdef DOWBM_SYMM │ │ │ │ │ +361 #undef DOWBM_SYMM │ │ │ │ │ +362#endif // DOWBM_SYMM │ │ │ │ │ 363 │ │ │ │ │ -364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ -_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ -geometryInFather │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -Include standard header files. │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ -ALBERTA MESH Mesh │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s │ │ │ │ │ -void abs(const DofVectorPointer< int > &dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:328 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ -ALBERTA FE_SPACE DofSpace │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_i_n │ │ │ │ │ -int min(const DofVectorPointer< int > &dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:348 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_a_x │ │ │ │ │ -int max(const DofVectorPointer< int > &dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:337 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_g_e_t │ │ │ │ │ -static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ -ALBERTA DOF_INT_VEC DofVector │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_w_r_i_t_e │ │ │ │ │ -static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_f_r_e_e │ │ │ │ │ -static void free(DofVector *dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _>_:_:_r_e_a_d │ │ │ │ │ -static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ -*dofSpace) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_w_r_i_t_e │ │ │ │ │ -static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_f_r_e_e │ │ │ │ │ -static void free(DofVector *dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_g_e_t │ │ │ │ │ -static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_r_e_a_d │ │ │ │ │ -static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ -*dofSpace) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ -ALBERTA DOF_SCHAR_VEC DofVector │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_f_r_e_e │ │ │ │ │ -static void free(DofVector *dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ -ALBERTA DOF_UCHAR_VEC DofVector │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_r_e_a_d │ │ │ │ │ -static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ -*dofSpace) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_g_e_t │ │ │ │ │ -static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:96 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_w_r_i_t_e │ │ │ │ │ -static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_g_e_t │ │ │ │ │ -static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_r_e_a_d │ │ │ │ │ -static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ -*dofSpace) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_f_r_e_e │ │ │ │ │ -static void free(DofVector *dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_w_r_i_t_e │ │ │ │ │ -static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ -ALBERTA DOF_REAL_VEC DofVector │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ -ALBERTA DOF_REAL_D_VEC DofVector │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_f_r_e_e │ │ │ │ │ -static void free(DofVector *dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_w_r_i_t_e │ │ │ │ │ -static bool write(const DofVector *dofVector, const std::string &filename) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_r_e_a_d │ │ │ │ │ -static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace │ │ │ │ │ -*dofSpace) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _>_:_:_g_e_t │ │ │ │ │ -static DofVector * get(const DofSpace *dofSpace, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r │ │ │ │ │ -DofVectorProvider::DofVector DofVector │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_e_t_u_p_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -void setupInterpolation() │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_i_n_i_t_i_a_l_i_z_e │ │ │ │ │ -void initialize(const Dof &value) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:270 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_a_d │ │ │ │ │ -void read(const std::string &filename, const MeshPointer< dim > &meshPointer) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_g_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a │ │ │ │ │ -AdaptationData * getAdaptationData() const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:277 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_e_t_u_p_R_e_s_t_r_i_c_t_i_o_n │ │ │ │ │ -void setupRestriction() │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ -DofVectorPointer() │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:193 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_e_t_A_d_a_p_t_a_t_i_o_n_D_a_t_a │ │ │ │ │ -void setAdaptationData(AdaptationData *adaptationData) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -bool write(const std::string &filename) const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ -DofVectorPointer(DofVector *dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:202 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * dofSpace() const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_s_u_p_p_o_r_t_s_A_d_a_p_t_a_t_i_o_n_D_a_t_a │ │ │ │ │ -static const bool supportsAdaptationData │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_n_a_m_e │ │ │ │ │ -std::string name() const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:228 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_f_o_r_E_a_c_h │ │ │ │ │ -void forEach(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:264 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r │ │ │ │ │ -DofVectorPointer(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:197 │ │ │ │ │ +364#ifdef DOWBM_DIAG │ │ │ │ │ +365 #undef DOWBM_DIAG │ │ │ │ │ +366#endif // DOWBM_DIAG │ │ │ │ │ +367 │ │ │ │ │ +368#ifdef ROW_LENGTH │ │ │ │ │ +369 #undef ROW_LENGTH │ │ │ │ │ +370#endif // ROW_LENGTH │ │ │ │ │ +371 │ │ │ │ │ +372#ifdef ENTRY_USED │ │ │ │ │ +373 #undef ENTRY_USED │ │ │ │ │ +374#endif // ENTRY_USED │ │ │ │ │ +375 │ │ │ │ │ +376#ifdef ENTRY_NOT_USED │ │ │ │ │ +377 #undef ENTRY_NOT_USED │ │ │ │ │ +378#endif // ENTRY_NOT_USED │ │ │ │ │ +379 │ │ │ │ │ +380#ifdef UNUSED_ENTRY │ │ │ │ │ +381 #undef UNUSED_ENTRY │ │ │ │ │ +382#endif // UNUSED_ENTRY │ │ │ │ │ +383 │ │ │ │ │ +384#ifdef NO_MORE_ENTRIES │ │ │ │ │ +385 #undef NO_MORE_ENTRIES │ │ │ │ │ +386#endif // NO_MORE_ENTRIES │ │ │ │ │ +387 │ │ │ │ │ +388#ifdef LAGRANGE_NODES │ │ │ │ │ +389 #undef LAGRANGE_NODES │ │ │ │ │ +390#endif // LAGRANGE_NODES │ │ │ │ │ +391 │ │ │ │ │ +392#ifdef MAX_N_QUAD_POINTS │ │ │ │ │ +393 #undef MAX_N_QUAD_POINTS │ │ │ │ │ +394#endif // MAX_N_QUAD_POINTS │ │ │ │ │ +395 │ │ │ │ │ +396#ifdef INIT_PHI │ │ │ │ │ +397 #undef INIT_PHI │ │ │ │ │ +398#endif // INIT_PHI │ │ │ │ │ +399 │ │ │ │ │ +400#ifdef INIT_GRD_PHI │ │ │ │ │ +401 #undef INIT_GRD_PHI │ │ │ │ │ +402#endif // INIT_GRD_PHI │ │ │ │ │ +403 │ │ │ │ │ +404#ifdef INIT_D2_PHI │ │ │ │ │ +405 #undef INIT_D2_PHI │ │ │ │ │ +406#endif // INIT_D2_PHI │ │ │ │ │ +407 │ │ │ │ │ +408#ifdef MESH_REFINED │ │ │ │ │ +409 #undef MESH_REFINED │ │ │ │ │ +410#endif // MESH_REFINED │ │ │ │ │ +411 │ │ │ │ │ +412#ifdef MESH_COARSENED │ │ │ │ │ +413 #undef MESH_COARSENED │ │ │ │ │ +414#endif // MESH_COARSENED │ │ │ │ │ +415 │ │ │ │ │ +416#ifdef H1_NORM │ │ │ │ │ +417 #undef H1_NORM │ │ │ │ │ +418#endif // H1_NORM │ │ │ │ │ +419 │ │ │ │ │ +420#ifdef L2_NORM │ │ │ │ │ +421 #undef L2_NORM │ │ │ │ │ +422#endif // L2_NORM │ │ │ │ │ +423 │ │ │ │ │ +424#ifdef GRAPH_MESH_BOUNDARY │ │ │ │ │ +425 #undef GRAPH_MESH_BOUNDARY │ │ │ │ │ +426#endif // GRAPH_MESH_BOUNDARY │ │ │ │ │ +427 │ │ │ │ │ +428#ifdef GRAPH_MESH_ELEMENT_MARK │ │ │ │ │ +429 #undef GRAPH_MESH_ELEMENT_MARK │ │ │ │ │ +430#endif // GRAPH_MESH_ELEMENT_MARK │ │ │ │ │ +431 │ │ │ │ │ +432#ifdef GRAPH_MESH_VERTEX_DOF │ │ │ │ │ +433 #undef GRAPH_MESH_VERTEX_DOF │ │ │ │ │ +434#endif // GRAPH_MESH_VERTEX_DOF │ │ │ │ │ +435 │ │ │ │ │ +436#ifdef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ │ +437 #undef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ │ +438#endif // GRAPH_MESH_ELEMENT_INDEX │ │ │ │ │ +439 │ │ │ │ │ +440#ifdef GET_MESH │ │ │ │ │ +441 #undef GET_MESH │ │ │ │ │ +442#endif // GET_MESH │ │ │ │ │ +443 │ │ │ │ │ +444#ifdef GET_DOF_VEC │ │ │ │ │ +445 #undef GET_DOF_VEC │ │ │ │ │ +446#endif // GET_DOF_VEC │ │ │ │ │ +447 │ │ │ │ │ +448#ifdef CARD_SN_MAX │ │ │ │ │ +449 #undef CARD_SN_MAX │ │ │ │ │ +450#endif // CARD_SN_MAX │ │ │ │ │ +451 │ │ │ │ │ +452#ifdef INIT_UH │ │ │ │ │ +453 #undef INIT_UH │ │ │ │ │ +454#endif // INIT_UH │ │ │ │ │ +455 │ │ │ │ │ +456#ifdef INIT_GRD_UH │ │ │ │ │ +457 #undef INIT_GRD_UH │ │ │ │ │ +458#endif // INIT_GRD_UH │ │ │ │ │ +459 │ │ │ │ │ +460#ifdef TRAVERSE_START │ │ │ │ │ +461 #undef TRAVERSE_START │ │ │ │ │ +462#endif // TRAVERSE_START │ │ │ │ │ +463 │ │ │ │ │ +464#ifdef TRAVERSE_STOP │ │ │ │ │ +465 #undef TRAVERSE_STOP │ │ │ │ │ +466#endif // TRAVERSE_STOP │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.cc File Reference │ │ │ │ +dune-grid: albertaheader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,38 +70,122 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
macrodata.cc File Reference
│ │ │ │ +Macros
│ │ │ │ +
albertaheader.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

provides a wrapper for ALBERTA's macro_data structure │ │ │ │ -More...

│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <array>
│ │ │ │ -#include <dune/grid/common/exceptions.hh>
│ │ │ │ -#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
#include <alberta/alberta.h>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

│ │ │ │ +

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Macros

#define DIM_OF_WORLD   ALBERTA_DIM
 
#define ALBERTA   ::
 
#define ALBERTA_DEBUG   0
 
#define _MAX_NOT_DEFINED_
 
#define _MIN_NOT_DEFINED_
 
#define _ABS_NOT_DEFINED_
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

provides a wrapper for ALBERTA's macro_data structure

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ _ABS_NOT_DEFINED_

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define _ABS_NOT_DEFINED_
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ _MAX_NOT_DEFINED_

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define _MAX_NOT_DEFINED_
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ _MIN_NOT_DEFINED_

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define _MIN_NOT_DEFINED_
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ ALBERTA

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA   ::
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ ALBERTA_DEBUG

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA_DEBUG   0
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ DIM_OF_WORLD

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DIM_OF_WORLD   ALBERTA_DIM
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,39 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -macrodata.cc File Reference │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ - Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ +_M_a_c_r_o_s │ │ │ │ │ +albertaheader.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_. │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_I_M___O_F___W_O_R_L_D   ALBERTA_DIM │ │ │ │ │ +  │ │ │ │ │ +#define  _A_L_B_E_R_T_A   :: │ │ │ │ │ +  │ │ │ │ │ +#define  _A_L_B_E_R_T_A___D_E_B_U_G   0 │ │ │ │ │ +  │ │ │ │ │ +#define  ___M_A_X___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ │ +  │ │ │ │ │ +#define  ___M_I_N___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ │ +  │ │ │ │ │ +#define  ___A_B_S___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ │ +  │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? __AABBSS__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ │ +#define _ABS_NOT_DEFINED_ │ │ │ │ │ +********** _?◆_? __MMAAXX__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ │ +#define _MAX_NOT_DEFINED_ │ │ │ │ │ +********** _?◆_? __MMIINN__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ │ +#define _MIN_NOT_DEFINED_ │ │ │ │ │ +********** _?◆_? AALLBBEERRTTAA ********** │ │ │ │ │ +#define ALBERTA   :: │ │ │ │ │ +********** _?◆_? AALLBBEERRTTAA__DDEEBBUUGG ********** │ │ │ │ │ +#define ALBERTA_DEBUG   0 │ │ │ │ │ +********** _?◆_? DDIIMM__OOFF__WWOORRLLDD ********** │ │ │ │ │ +#define DIM_OF_WORLD   ALBERTA_DIM │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: misc.hh File Reference │ │ │ │ +dune-grid: macroelement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,187 +71,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros | │ │ │ │ -Typedefs | │ │ │ │ -Functions | │ │ │ │ -Variables
│ │ │ │ -
misc.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
macroelement.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/albertagrid/albertaheader.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaError
 
class  Dune::AlbertaIOError
 
class  Dune::Alberta::GlobalSpace
 
struct  Dune::Alberta::NumSubEntities< dim, 0 >
 
struct  Dune::Alberta::NumSubEntities< dim, dim >
 
struct  Dune::Alberta::NumSubEntities< 0, 0 >
 
struct  Dune::Alberta::NumSubEntities< 2, 1 >
 
struct  Dune::Alberta::NumSubEntities< 3, 1 >
 
struct  Dune::Alberta::NumSubEntities< 3, 2 >
 
struct  Dune::Alberta::CodimType< dim, 0 >
 
struct  Dune::Alberta::CodimType< dim, dim >
 
struct  Dune::Alberta::CodimType< 2, 1 >
 
struct  Dune::Alberta::CodimType< 3, 1 >
 
struct  Dune::Alberta::CodimType< 3, 2 >
 
struct  Dune::Alberta::FillFlags< dim >
 
struct  Dune::Alberta::RefinementEdge< dim >
 
struct  Dune::Alberta::RefinementEdge< 2 >
 
struct  Dune::Alberta::Dune2AlbertaNumbering< dim, codim >
 
struct  Dune::Alberta::Dune2AlbertaNumbering< 3, 2 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< dim, codim >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< dim, 1 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< 1, 1 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< 3, 2 >
 
class  Dune::Alberta::NumberingMap< dim, Numbering >
 
struct  Dune::Alberta::MapVertices< dim, 0 >
 
struct  Dune::Alberta::MapVertices< 2, 1 >
 
struct  Dune::Alberta::MapVertices< 3, 1 >
 
struct  Dune::Alberta::MapVertices< 3, 2 >
 
struct  Dune::Alberta::MapVertices< dim, dim >
 
struct  Dune::Alberta::Twist< dim, subdim >
 
struct  Dune::Alberta::Twist< dim, 1 >
 
struct  Dune::Alberta::Twist< 1, 1 >
 
struct  Dune::Alberta::Twist< dim, 2 >
 
struct  Dune::Alberta::Twist< 2, 2 >
struct  Dune::Alberta::MacroElement< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Macros

#define DUNE_ALBERTA_CACHE_COORDINATES   1
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Typedefs

typedef ALBERTA REAL Dune::Alberta::Real
 
typedef ALBERTA REAL_B Dune::Alberta::LocalVector
 
typedef ALBERTA REAL_D Dune::Alberta::GlobalVector
 
typedef ALBERTA REAL_DD Dune::Alberta::GlobalMatrix
 
typedef ALBERTA AFF_TRAFO Dune::Alberta::AffineTransformation
 
typedef ALBERTA MESH Dune::Alberta::Mesh
 
typedef ALBERTA EL Dune::Alberta::Element
 
typedef ALBERTA BNDRY_TYPE Dune::Alberta::BoundaryId
 
typedef U_CHAR Dune::Alberta::ElementType
 
typedef ALBERTA FE_SPACE Dune::Alberta::DofSpace
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Functions

template<class Data >
Data * Dune::Alberta::memAlloc (size_t size)
 
template<class Data >
Data * Dune::Alberta::memCAlloc (size_t size)
 
template<class Data >
Data * Dune::Alberta::memReAlloc (Data *ptr, size_t oldSize, size_t newSize)
 
template<class Data >
void Dune::Alberta::memFree (Data *ptr, size_t size)
 
template<int dim>
int Dune::Alberta::applyTwist (int twist, int i)
 
template<int dim>
int Dune::Alberta::applyInverseTwist (int twist, int i)
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Variables

static const int Dune::Alberta::dimWorld = DIM_OF_WORLD
 
static const int Dune::Alberta::meshRefined = MESH_REFINED
 
static const int Dune::Alberta::meshCoarsened = MESH_COARSENED
 
static const int Dune::Alberta::InteriorBoundary = INTERIOR
 
static const int Dune::Alberta::DirichletBoundary = DIRICHLET
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_ALBERTA_CACHE_COORDINATES

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_ALBERTA_CACHE_COORDINATES   1
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,150 +1,22 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ │ -misc.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +macroelement.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._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_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _0_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _2_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _2_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _3_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _3_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_<_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _1_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _2_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _s_u_b_d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _1_,_ _1_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _2_,_ _2_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A___C_A_C_H_E___C_O_O_R_D_I_N_A_T_E_S   1 │ │ │ │ │ -  │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ - typedef _A_L_B_E_R_T_A REAL  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A REAL_B  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A REAL_D  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A REAL_DD  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A AFF_TRAFO  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A MESH  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A EL  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -  │ │ │ │ │ -typedef _A_L_B_E_R_T_A BNDRY_TYPE  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ │ -  │ │ │ │ │ - typedef U_CHAR  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -  │ │ │ │ │ - typedef _A_L_B_E_R_T_A FE_SPACE  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -Data *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_A_l_l_o_c (size_t size) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -Data *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_C_A_l_l_o_c (size_t size) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -Data *  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c (Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_F_r_e_e (Data *ptr, size_t size) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_T_w_i_s_t (int twist, int i) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t (int twist, int i) │ │ │ │ │ -  │ │ │ │ │ -VVaarriiaabblleess │ │ │ │ │ -static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d = _D_I_M___O_F___W_O_R_L_D │ │ │ │ │ -  │ │ │ │ │ -static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d = MESH_REFINED │ │ │ │ │ -  │ │ │ │ │ -static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d = MESH_COARSENED │ │ │ │ │ -  │ │ │ │ │ -static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y = INTERIOR │ │ │ │ │ -  │ │ │ │ │ -static const int  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y = DIRICHLET │ │ │ │ │ -  │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__CCAACCHHEE__CCOOOORRDDIINNAATTEESS ********** │ │ │ │ │ -#define DUNE_ALBERTA_CACHE_COORDINATES   1 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: misc.hh Source File │ │ │ │ +dune-grid: macroelement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,870 +74,105 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
misc.hh
│ │ │ │ +
macroelement.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_MISC_HH
│ │ │ │ -
6#define DUNE_ALBERTA_MISC_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ -
12#include <dune/common/hybridutilities.hh>
│ │ │ │ -
13#include <dune/common/typetraits.hh>
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#if HAVE_ALBERTA
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
14
│ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17#if HAVE_ALBERTA
│ │ │ │ -
18
│ │ │ │ -
19// should the coordinates be cached in a vector (required for ALBERTA 2.0)?
│ │ │ │ -
20#ifndef DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
21#define DUNE_ALBERTA_CACHE_COORDINATES 1
│ │ │ │ -
22#endif
│ │ │ │ -
23
│ │ │ │ -
24namespace Dune
│ │ │ │ -
25{
│ │ │ │ +
15 namespace Alberta
│ │ │ │ +
16 {
│ │ │ │ +
17
│ │ │ │ +
18 // MacroElement
│ │ │ │ +
19 // ------------
│ │ │ │ +
20
│ │ │ │ +
21 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 : public ALBERTA MACRO_EL
│ │ │ │ +
24 {
│ │ │ │ +
25 const GlobalVector &coordinate ( const int vertex ) const;
│ │ │ │
26
│ │ │ │ -
27 // Exceptions
│ │ │ │ -
28 // ----------
│ │ │ │ -
29
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 : public Exception
│ │ │ │ -
32 {};
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 : public IOError
│ │ │ │ -
36 {};
│ │ │ │ +
27 int boundaryId ( const int face ) const;
│ │ │ │ +
28 bool isBoundary ( const int face ) const;
│ │ │ │ +
29 const MacroElement< dim > *neighbor ( const int face ) const;
│ │ │ │ +
30 };
│ │ │ │ +
│ │ │ │ +
31
│ │ │ │ +
32
│ │ │ │ +
33 template< int dim >
│ │ │ │ +
│ │ │ │ +
34 inline const GlobalVector &MacroElement< dim >::coordinate ( const int vertex ) const
│ │ │ │ +
35 {
│ │ │ │ +
36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );
│ │ │ │ +
37 return *coord[ vertex ];
│ │ │ │ +
38 }
│ │ │ │
│ │ │ │ -
37
│ │ │ │ -
38
│ │ │ │
39
│ │ │ │ -
40 namespace Alberta
│ │ │ │ -
41 {
│ │ │ │ -
42
│ │ │ │ -
43 // Import Types
│ │ │ │ -
44 // ------------
│ │ │ │ -
45
│ │ │ │ -
46 static const int dimWorld = DIM_OF_WORLD;
│ │ │ │ +
40
│ │ │ │ +
41 template< int dim >
│ │ │ │ +
│ │ │ │ +
42 inline bool MacroElement< dim >::isBoundary ( const int face ) const
│ │ │ │ +
43 {
│ │ │ │ +
44 return (boundaryId( face ) != InteriorBoundary);
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │
47
│ │ │ │ -
48 typedef ALBERTA REAL Real;
│ │ │ │ -
49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates
│ │ │ │ -
50 typedef ALBERTA REAL_D GlobalVector;
│ │ │ │ -
51 typedef ALBERTA REAL_DD GlobalMatrix;
│ │ │ │ -
52 typedef ALBERTA AFF_TRAFO AffineTransformation;
│ │ │ │ -
53 typedef ALBERTA MESH Mesh;
│ │ │ │ -
54 typedef ALBERTA EL Element;
│ │ │ │ -
55
│ │ │ │ -
56 static const int meshRefined = MESH_REFINED;
│ │ │ │ -
57 static const int meshCoarsened = MESH_COARSENED;
│ │ │ │ -
58
│ │ │ │ -
59 static const int InteriorBoundary = INTERIOR;
│ │ │ │ -
60 static const int DirichletBoundary = DIRICHLET;
│ │ │ │ -
61 typedef ALBERTA BNDRY_TYPE BoundaryId;
│ │ │ │ -
62
│ │ │ │ -
63 typedef U_CHAR ElementType;
│ │ │ │ -
64
│ │ │ │ -
65 typedef ALBERTA FE_SPACE DofSpace;
│ │ │ │ -
66
│ │ │ │ +
48 template< int dim >
│ │ │ │ +
│ │ │ │ +
49 inline int MacroElement< dim >::boundaryId ( const int face ) const
│ │ │ │ +
50 {
│ │ │ │ +
51 return wall_bound[ face ];
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54
│ │ │ │ +
55 template< int dim >
│ │ │ │ +
│ │ │ │ +
56 const MacroElement< dim > *MacroElement< dim >::neighbor ( const int face ) const
│ │ │ │ +
57 {
│ │ │ │ +
58 assert( (face >= 0) && (face < N_NEIGH_MAX) );
│ │ │ │ +
59 return static_cast< const MacroElement * >( neigh[ face ] );
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
62 }
│ │ │ │ +
63
│ │ │ │ +
64}
│ │ │ │ +
65
│ │ │ │ +
66#endif // #if HAVE_ALBERTA
│ │ │ │
67
│ │ │ │ -
68
│ │ │ │ -
69 // Memory Manipulation Functions
│ │ │ │ -
70 // -----------------------------
│ │ │ │ -
71
│ │ │ │ -
72 template< class Data >
│ │ │ │ -
│ │ │ │ -
73 inline Data *memAlloc ( size_t size )
│ │ │ │ -
74 {
│ │ │ │ -
75 return MEM_ALLOC( size, Data );
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78 template< class Data >
│ │ │ │ -
│ │ │ │ -
79 inline Data *memCAlloc ( size_t size )
│ │ │ │ -
80 {
│ │ │ │ -
81 return MEM_CALLOC( size, Data );
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
84 template< class Data >
│ │ │ │ -
│ │ │ │ -
85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )
│ │ │ │ -
86 {
│ │ │ │ -
87 return MEM_REALLOC( ptr, oldSize, newSize, Data );
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
90 template< class Data >
│ │ │ │ -
│ │ │ │ -
91 inline void memFree ( Data *ptr, size_t size )
│ │ │ │ -
92 {
│ │ │ │ -
93 return MEM_FREE( ptr, size, Data );
│ │ │ │ -
94 }
│ │ │ │ -
│ │ │ │ -
95
│ │ │ │ -
96
│ │ │ │ -
97
│ │ │ │ -
98 // GlobalSpace
│ │ │ │ -
99 // -----------
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
102 {
│ │ │ │ -
103 typedef GlobalSpace This;
│ │ │ │ -
104
│ │ │ │ -
105 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
108
│ │ │ │ -
109 private:
│ │ │ │ -
110 Matrix identityMatrix_;
│ │ │ │ -
111 Vector nullVector_;
│ │ │ │ -
112
│ │ │ │ -
113 GlobalSpace ()
│ │ │ │ -
114 {
│ │ │ │ -
115 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ -
116 {
│ │ │ │ -
117 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ -
118 identityMatrix_[ i ][ j ] = Real( 0 );
│ │ │ │ -
119 identityMatrix_[ i ][ i ] = Real( 1 );
│ │ │ │ -
120 nullVector_[ i ] = Real( 0 );
│ │ │ │ -
121 }
│ │ │ │ -
122 }
│ │ │ │ -
123
│ │ │ │ -
124 static This &instance ()
│ │ │ │ -
125 {
│ │ │ │ -
126 static This theInstance;
│ │ │ │ -
127 return theInstance;
│ │ │ │ -
128 }
│ │ │ │ -
129
│ │ │ │ -
130 public:
│ │ │ │ -
│ │ │ │ -
131 static const Matrix &identityMatrix ()
│ │ │ │ -
132 {
│ │ │ │ -
133 return instance().identityMatrix_;
│ │ │ │ -
134 }
│ │ │ │ -
│ │ │ │ -
135
│ │ │ │ -
│ │ │ │ -
136 static const Vector &nullVector ()
│ │ │ │ -
137 {
│ │ │ │ -
138 return instance().nullVector_;
│ │ │ │ -
139 }
│ │ │ │ -
│ │ │ │ -
140 };
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
142
│ │ │ │ -
143
│ │ │ │ -
144 // NumSubEntities
│ │ │ │ -
145 // --------------
│ │ │ │ -
146
│ │ │ │ -
147 template< int dim, int codim >
│ │ │ │ - │ │ │ │ -
149
│ │ │ │ -
150 template< int dim >
│ │ │ │ -
│ │ │ │ -
151 struct NumSubEntities< dim, 0 >
│ │ │ │ -
152 {
│ │ │ │ -
153 static const int value = 1;
│ │ │ │ -
154 };
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
156 template< int dim >
│ │ │ │ -
│ │ │ │ -
157 struct NumSubEntities< dim, dim >
│ │ │ │ -
158 {
│ │ │ │ -
159 static const int value = dim+1;
│ │ │ │ -
160 };
│ │ │ │ -
│ │ │ │ -
161
│ │ │ │ -
162 template<>
│ │ │ │ -
│ │ │ │ -
163 struct NumSubEntities< 0, 0 >
│ │ │ │ -
164 {
│ │ │ │ -
165 static const int value = 1;
│ │ │ │ -
166 };
│ │ │ │ -
│ │ │ │ -
167
│ │ │ │ -
168 template<>
│ │ │ │ -
│ │ │ │ -
169 struct NumSubEntities< 2, 1 >
│ │ │ │ -
170 {
│ │ │ │ -
171 static const int value = 3;
│ │ │ │ -
172 };
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
174 template<>
│ │ │ │ -
│ │ │ │ -
175 struct NumSubEntities< 3, 1 >
│ │ │ │ -
176 {
│ │ │ │ -
177 static const int value = 4;
│ │ │ │ -
178 };
│ │ │ │ -
│ │ │ │ -
179
│ │ │ │ -
180 template<>
│ │ │ │ -
│ │ │ │ -
181 struct NumSubEntities< 3, 2 >
│ │ │ │ -
182 {
│ │ │ │ -
183 static const int value = 6;
│ │ │ │ -
184 };
│ │ │ │ -
│ │ │ │ -
185
│ │ │ │ -
186
│ │ │ │ -
187
│ │ │ │ -
188 // CodimType
│ │ │ │ -
189 // ---------
│ │ │ │ -
190
│ │ │ │ -
191 template< int dim, int codim >
│ │ │ │ -
192 struct CodimType;
│ │ │ │ -
193
│ │ │ │ -
194 template< int dim >
│ │ │ │ -
│ │ │ │ -
195 struct CodimType< dim, 0 >
│ │ │ │ -
196 {
│ │ │ │ -
197 static const int value = CENTER;
│ │ │ │ -
198 };
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
200 template< int dim >
│ │ │ │ -
│ │ │ │ -
201 struct CodimType< dim, dim >
│ │ │ │ -
202 {
│ │ │ │ -
203 static const int value = VERTEX;
│ │ │ │ -
204 };
│ │ │ │ -
│ │ │ │ -
205
│ │ │ │ -
206 template<>
│ │ │ │ -
│ │ │ │ -
207 struct CodimType< 2, 1 >
│ │ │ │ -
208 {
│ │ │ │ -
209 static const int value = EDGE;
│ │ │ │ -
210 };
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
212 template<>
│ │ │ │ -
│ │ │ │ -
213 struct CodimType< 3, 1 >
│ │ │ │ -
214 {
│ │ │ │ -
215 static const int value = FACE;
│ │ │ │ -
216 };
│ │ │ │ -
│ │ │ │ -
217
│ │ │ │ -
218 template<>
│ │ │ │ -
│ │ │ │ -
219 struct CodimType< 3, 2 >
│ │ │ │ -
220 {
│ │ │ │ -
221 static const int value = EDGE;
│ │ │ │ -
222 };
│ │ │ │ -
│ │ │ │ -
223
│ │ │ │ -
224
│ │ │ │ -
225
│ │ │ │ -
226 // FillFlags
│ │ │ │ -
227 // ---------
│ │ │ │ -
228
│ │ │ │ -
229 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
231 {
│ │ │ │ -
232 typedef ALBERTA FLAGS Flags;
│ │ │ │ -
233
│ │ │ │ -
234 static const Flags nothing = FILL_NOTHING;
│ │ │ │ -
235
│ │ │ │ -
236 static const Flags coords = FILL_COORDS;
│ │ │ │ -
237
│ │ │ │ -
238 static const Flags neighbor = FILL_NEIGH;
│ │ │ │ -
239
│ │ │ │ -
240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
│ │ │ │ -
241
│ │ │ │ -
242 static const Flags projection = FILL_PROJECTION;
│ │ │ │ -
243
│ │ │ │ -
244 static const Flags elementType = FILL_NOTHING;
│ │ │ │ -
245
│ │ │ │ -
246 static const Flags boundaryId = FILL_MACRO_WALLS;
│ │ │ │ -
247
│ │ │ │ -
248 static const Flags nonPeriodic = FILL_NON_PERIODIC;
│ │ │ │ -
249
│ │ │ │ - │ │ │ │ - │ │ │ │ -
252
│ │ │ │ -
253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;
│ │ │ │ -
254
│ │ │ │ -
255#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
256 static const Flags standard = standardWithCoords & ~coords;
│ │ │ │ -
257#else
│ │ │ │ - │ │ │ │ -
259#endif
│ │ │ │ -
260 };
│ │ │ │ -
│ │ │ │ -
261
│ │ │ │ -
262
│ │ │ │ -
263
│ │ │ │ -
264 // RefinementEdge
│ │ │ │ -
265 // --------------
│ │ │ │ -
266
│ │ │ │ -
267 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
269 {
│ │ │ │ -
270 static const int value = 0;
│ │ │ │ -
271 };
│ │ │ │ -
│ │ │ │ -
272
│ │ │ │ -
273 template<>
│ │ │ │ -
│ │ │ │ -
274 struct RefinementEdge< 2 >
│ │ │ │ -
275 {
│ │ │ │ -
276 static const int value = 2;
│ │ │ │ -
277 };
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
279
│ │ │ │ -
280
│ │ │ │ -
281 // Dune2AlbertaNumbering
│ │ │ │ -
282 // ---------------------
│ │ │ │ -
283
│ │ │ │ -
284 template< int dim, int codim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
286 {
│ │ │ │ -
│ │ │ │ -
287 static int apply ( const int i )
│ │ │ │ -
288 {
│ │ │ │ -
289 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ │ -
290 return i;
│ │ │ │ -
291 }
│ │ │ │ -
│ │ │ │ -
292 };
│ │ │ │ -
│ │ │ │ -
293
│ │ │ │ -
294 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
296 {
│ │ │ │ -
297 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │ │ -
298
│ │ │ │ -
│ │ │ │ -
299 static int apply ( const int i )
│ │ │ │ -
300 {
│ │ │ │ -
301 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ │ -
302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };
│ │ │ │ -
303 return dune2alberta[ i ];
│ │ │ │ -
304 }
│ │ │ │ -
│ │ │ │ -
305 };
│ │ │ │ -
│ │ │ │ -
306
│ │ │ │ -
307
│ │ │ │ -
308
│ │ │ │ -
309 // Generic2AlbertaNumbering
│ │ │ │ -
310 // ------------------------
│ │ │ │ -
311
│ │ │ │ -
312 template< int dim, int codim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
314 {
│ │ │ │ -
│ │ │ │ -
315 static int apply ( const int i )
│ │ │ │ -
316 {
│ │ │ │ -
317 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ │ -
318 return i;
│ │ │ │ -
319 }
│ │ │ │ -
│ │ │ │ -
320 };
│ │ │ │ -
│ │ │ │ -
321
│ │ │ │ -
322 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
324 {
│ │ │ │ -
│ │ │ │ -
325 static int apply ( const int i )
│ │ │ │ -
326 {
│ │ │ │ -
327 assert( (i >= 0) && (i < NumSubEntities< dim, 1 >::value) );
│ │ │ │ -
328 return dim - i;
│ │ │ │ -
329 }
│ │ │ │ -
│ │ │ │ -
330 };
│ │ │ │ -
│ │ │ │ -
331
│ │ │ │ -
332 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
334 {
│ │ │ │ -
│ │ │ │ -
335 static int apply ( const int i )
│ │ │ │ -
336 {
│ │ │ │ -
337 assert( (i >= 0) && (i < NumSubEntities< 1, 1 >::value) );
│ │ │ │ -
338 return i;
│ │ │ │ -
339 }
│ │ │ │ -
│ │ │ │ -
340 };
│ │ │ │ -
│ │ │ │ -
341
│ │ │ │ -
342 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
344 {
│ │ │ │ -
345 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │ │ -
346
│ │ │ │ -
│ │ │ │ -
347 static int apply ( const int i )
│ │ │ │ -
348 {
│ │ │ │ -
349 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ │ -
350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };
│ │ │ │ -
351 return generic2alberta[ i ];
│ │ │ │ -
352 }
│ │ │ │ -
│ │ │ │ -
353 };
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
355
│ │ │ │ -
356
│ │ │ │ -
357 // NumberingMap
│ │ │ │ -
358 // ------------
│ │ │ │ -
359
│ │ │ │ -
360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
362 {
│ │ │ │ - │ │ │ │ -
364
│ │ │ │ -
365 template< int codim >
│ │ │ │ -
366 struct Initialize;
│ │ │ │ -
367
│ │ │ │ -
368 int *dune2alberta_[ dim+1 ];
│ │ │ │ -
369 int *alberta2dune_[ dim+1 ];
│ │ │ │ -
370 int numSubEntities_[ dim+1 ];
│ │ │ │ -
371
│ │ │ │ -
372 NumberingMap ( const This & );
│ │ │ │ -
373 This &operator= ( const This & );
│ │ │ │ -
374
│ │ │ │ -
375 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
377 {
│ │ │ │ -
378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ Initialize< i >::apply( *this ); } );
│ │ │ │ -
379 }
│ │ │ │ -
│ │ │ │ -
380
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
382 {
│ │ │ │ -
383 for( int codim = 0; codim <= dim; ++codim )
│ │ │ │ -
384 {
│ │ │ │ -
385 delete[]( dune2alberta_[ codim ] );
│ │ │ │ -
386 delete[]( alberta2dune_[ codim ] );
│ │ │ │ -
387 }
│ │ │ │ -
388 }
│ │ │ │ -
│ │ │ │ -
389
│ │ │ │ -
│ │ │ │ -
390 int dune2alberta ( int codim, int i ) const
│ │ │ │ -
391 {
│ │ │ │ -
392 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ -
393 assert( (i >= 0) && (i < numSubEntities( codim )) );
│ │ │ │ -
394 return dune2alberta_[ codim ][ i ];
│ │ │ │ -
395 }
│ │ │ │ -
│ │ │ │ -
396
│ │ │ │ -
│ │ │ │ -
397 int alberta2dune ( int codim, int i ) const
│ │ │ │ -
398 {
│ │ │ │ -
399 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ -
400 assert( (i >= 0) && (i < numSubEntities( codim )) );
│ │ │ │ -
401 return alberta2dune_[ codim ][ i ];
│ │ │ │ -
402 }
│ │ │ │ -
│ │ │ │ -
403
│ │ │ │ -
│ │ │ │ -
404 int numSubEntities ( int codim ) const
│ │ │ │ -
405 {
│ │ │ │ -
406 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ -
407 return numSubEntities_[ codim ];
│ │ │ │ -
408 }
│ │ │ │ -
│ │ │ │ -
409 };
│ │ │ │ -
│ │ │ │ -
410
│ │ │ │ -
411
│ │ │ │ -
412
│ │ │ │ -
413 // NumberingMap::Initialize
│ │ │ │ -
414 // ------------------------
│ │ │ │ -
415
│ │ │ │ -
416 template< int dim, template< int, int > class Numbering >
│ │ │ │ -
417 template< int codim >
│ │ │ │ -
418 struct NumberingMap< dim, Numbering >::Initialize
│ │ │ │ -
419 {
│ │ │ │ -
420 static const int numSubEntities = NumSubEntities< dim, codim >::value;
│ │ │ │ -
421
│ │ │ │ -
422 static void apply ( NumberingMap< dim, Numbering > &map )
│ │ │ │ -
423 {
│ │ │ │ -
424 map.numSubEntities_[ codim ] = numSubEntities;
│ │ │ │ -
425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];
│ │ │ │ -
426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];
│ │ │ │ -
427
│ │ │ │ -
428 for( int i = 0; i < numSubEntities; ++i )
│ │ │ │ -
429 {
│ │ │ │ -
430 const int j = Numbering< dim, codim >::apply( i );
│ │ │ │ -
431 map.dune2alberta_[ codim ][ i ] = j;
│ │ │ │ -
432 map.alberta2dune_[ codim ][ j ] = i;
│ │ │ │ -
433 }
│ │ │ │ -
434 }
│ │ │ │ -
435 };
│ │ │ │ -
436
│ │ │ │ -
437
│ │ │ │ -
438
│ │ │ │ -
439 // MapVertices
│ │ │ │ -
440 // -----------
│ │ │ │ -
441
│ │ │ │ -
442 template< int dim, int codim >
│ │ │ │ - │ │ │ │ -
444
│ │ │ │ -
445 template< int dim >
│ │ │ │ -
│ │ │ │ -
446 struct MapVertices< dim, 0 >
│ │ │ │ -
447 {
│ │ │ │ -
│ │ │ │ -
448 static int apply ( int subEntity, int vertex )
│ │ │ │ -
449 {
│ │ │ │ -
450 assert( subEntity == 0 );
│ │ │ │ -
451 assert( (vertex >= 0) && (vertex <= NumSubEntities< dim, dim >::value) );
│ │ │ │ -
452 return vertex;
│ │ │ │ -
453 }
│ │ │ │ -
│ │ │ │ -
454 };
│ │ │ │ -
│ │ │ │ -
455
│ │ │ │ -
456 template<>
│ │ │ │ -
│ │ │ │ -
457 struct MapVertices< 2, 1 >
│ │ │ │ -
458 {
│ │ │ │ -
│ │ │ │ -
459 static int apply ( int subEntity, int vertex )
│ │ │ │ -
460 {
│ │ │ │ -
461 assert( (subEntity >= 0) && (subEntity < 3) );
│ │ │ │ -
462 assert( (vertex >= 0) && (vertex < 2) );
│ │ │ │ -
463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };
│ │ │ │ -
464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };
│ │ │ │ -
465 return map[ subEntity ][ vertex ];
│ │ │ │ -
466 }
│ │ │ │ -
│ │ │ │ -
467 };
│ │ │ │ -
│ │ │ │ -
468
│ │ │ │ -
469 template<>
│ │ │ │ -
│ │ │ │ -
470 struct MapVertices< 3, 1 >
│ │ │ │ -
471 {
│ │ │ │ -
│ │ │ │ -
472 static int apply ( int subEntity, int vertex )
│ │ │ │ -
473 {
│ │ │ │ -
474 assert( (subEntity >= 0) && (subEntity < 4) );
│ │ │ │ -
475 assert( (vertex >= 0) && (vertex < 3) );
│ │ │ │ -
476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };
│ │ │ │ -
477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };
│ │ │ │ -
478 return map[ subEntity ][ vertex ];
│ │ │ │ -
479 }
│ │ │ │ -
│ │ │ │ -
480 };
│ │ │ │ -
│ │ │ │ -
481
│ │ │ │ -
482 template<>
│ │ │ │ -
│ │ │ │ -
483 struct MapVertices< 3, 2 >
│ │ │ │ -
484 {
│ │ │ │ -
│ │ │ │ -
485 static int apply ( int subEntity, int vertex )
│ │ │ │ -
486 {
│ │ │ │ -
487 assert( (subEntity >= 0) && (subEntity < 6) );
│ │ │ │ -
488 assert( (vertex >= 0) && (vertex < 2) );
│ │ │ │ -
489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} };
│ │ │ │ -
490 return map[ subEntity ][ vertex ];
│ │ │ │ -
491 }
│ │ │ │ -
│ │ │ │ -
492 };
│ │ │ │ -
│ │ │ │ -
493
│ │ │ │ -
494 template< int dim >
│ │ │ │ -
│ │ │ │ -
495 struct MapVertices< dim, dim >
│ │ │ │ -
496 {
│ │ │ │ -
│ │ │ │ -
497 static int apply ( int subEntity, int vertex )
│ │ │ │ -
498 {
│ │ │ │ -
499 assert( (subEntity >= 0) && (subEntity < NumSubEntities< dim, 1 >::value) );
│ │ │ │ -
500 assert( vertex == 0 );
│ │ │ │ -
501 return subEntity;
│ │ │ │ -
502 }
│ │ │ │ -
│ │ │ │ -
503 };
│ │ │ │ -
│ │ │ │ -
504
│ │ │ │ -
505
│ │ │ │ -
506
│ │ │ │ -
507 // Twist
│ │ │ │ -
508 // -----
│ │ │ │ -
509
│ │ │ │ -
510 // ******************************************************************
│ │ │ │ -
511 // Meaning of the twist (same as in ALU)
│ │ │ │ -
512 // -------------------------------------
│ │ │ │ -
513 //
│ │ │ │ -
514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face
│ │ │ │ -
515 // (here, we assume their indices to be increasing). Denote by k the
│ │ │ │ -
516 // local number of a vertex v within the element and by t the twist.
│ │ │ │ -
517 // Then, v = v_j, where j is computed by the following formula:
│ │ │ │ -
518 //
│ │ │ │ -
519 // / (2n + 1 - k + t) % n, if t < 0
│ │ │ │ -
520 // j = <
│ │ │ │ -
521 // \ (k + t) % n, if t >= 0
│ │ │ │ -
522 //
│ │ │ │ -
523 // Note: We use the order of the 0-th vertex dof to assign the twist.
│ │ │ │ -
524 // This is ok for two reasons:
│ │ │ │ -
525 // - ALBERTA preserves the relative order of the dofs during
│ │ │ │ -
526 // dof compression.
│ │ │ │ -
527 // - ALBERTA enforces the first vertex dof admin to be periodic.
│ │ │ │ -
528 // ******************************************************************
│ │ │ │ -
529
│ │ │ │ -
530 template< int dim, int subdim >
│ │ │ │ -
│ │ │ │ -
531 struct Twist
│ │ │ │ -
532 {
│ │ │ │ -
533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;
│ │ │ │ -
534
│ │ │ │ -
535 static const int minTwist = 0;
│ │ │ │ -
536 static const int maxTwist = 0;
│ │ │ │ -
537
│ │ │ │ -
│ │ │ │ -
538 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ │ -
539 [[maybe_unused]] int subEntity )
│ │ │ │ -
540 {
│ │ │ │ -
541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ │ -
542 return 0;
│ │ │ │ -
543 }
│ │ │ │ -
│ │ │ │ -
544 };
│ │ │ │ -
│ │ │ │ -
545
│ │ │ │ -
546 template< int dim >
│ │ │ │ -
│ │ │ │ -
547 struct Twist< dim, 1 >
│ │ │ │ -
548 {
│ │ │ │ -
549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;
│ │ │ │ -
550
│ │ │ │ -
551 static const int minTwist = 0;
│ │ │ │ -
552 static const int maxTwist = 1;
│ │ │ │ -
553
│ │ │ │ -
│ │ │ │ -
554 static int twist ( const Element *element, int subEntity )
│ │ │ │ -
555 {
│ │ │ │ -
556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ │ -
557 const int numVertices = NumSubEntities< 1, 1 >::value;
│ │ │ │ -
558 int dof[ numVertices ];
│ │ │ │ -
559 for( int i = 0; i < numVertices; ++i )
│ │ │ │ -
560 {
│ │ │ │ -
561 const int j = MapVertices< dim, dim-1 >::apply( subEntity, i );
│ │ │ │ -
562 dof[ i ] = element->dof[ j ][ 0 ];
│ │ │ │ -
563 }
│ │ │ │ -
564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);
│ │ │ │ -
565 }
│ │ │ │ -
│ │ │ │ -
566 };
│ │ │ │ -
│ │ │ │ -
567
│ │ │ │ -
568
│ │ │ │ -
569 template<>
│ │ │ │ -
│ │ │ │ -
570 struct Twist< 1, 1 >
│ │ │ │ -
571 {
│ │ │ │ -
572 static const int minTwist = 0;
│ │ │ │ -
573 static const int maxTwist = 0;
│ │ │ │ -
574
│ │ │ │ -
│ │ │ │ -
575 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ │ -
576 [[maybe_unused]] int subEntity )
│ │ │ │ -
577 {
│ │ │ │ -
578 assert( subEntity == 0 );
│ │ │ │ -
579 return 0;
│ │ │ │ -
580 }
│ │ │ │ -
│ │ │ │ -
581 };
│ │ │ │ -
│ │ │ │ -
582
│ │ │ │ -
583
│ │ │ │ -
584 template< int dim >
│ │ │ │ -
│ │ │ │ -
585 struct Twist< dim, 2 >
│ │ │ │ -
586 {
│ │ │ │ -
587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;
│ │ │ │ -
588
│ │ │ │ -
589 static const int minTwist = -3;
│ │ │ │ -
590 static const int maxTwist = 2;
│ │ │ │ -
591
│ │ │ │ -
│ │ │ │ -
592 static int twist ( const Element *element, int subEntity )
│ │ │ │ -
593 {
│ │ │ │ -
594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ │ -
595 const int numVertices = NumSubEntities< 2, 2 >::value;
│ │ │ │ -
596 int dof[ numVertices ];
│ │ │ │ -
597 for( int i = 0; i < numVertices; ++i )
│ │ │ │ -
598 {
│ │ │ │ -
599 const int j = MapVertices< dim, dim-2 >::apply( subEntity, i );
│ │ │ │ -
600 dof[ i ] = element->dof[ j ][ 0 ];
│ │ │ │ -
601 }
│ │ │ │ -
602
│ │ │ │ -
603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };
│ │ │ │ -
604 const int k = int( dof[ 0 ] < dof[ 1 ] )
│ │ │ │ -
605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)
│ │ │ │ -
606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);
│ │ │ │ -
607 assert( twist[ k ] != 666 );
│ │ │ │ -
608 return twist[ k ];
│ │ │ │ -
609 }
│ │ │ │ -
│ │ │ │ -
610 };
│ │ │ │ -
│ │ │ │ -
611
│ │ │ │ -
612
│ │ │ │ -
613 template<>
│ │ │ │ -
│ │ │ │ -
614 struct Twist< 2, 2 >
│ │ │ │ -
615 {
│ │ │ │ -
616 static const int minTwist = 0;
│ │ │ │ -
617 static const int maxTwist = 0;
│ │ │ │ -
618
│ │ │ │ -
│ │ │ │ -
619 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ │ -
620 [[maybe_unused]] int subEntity )
│ │ │ │ -
621 {
│ │ │ │ -
622 assert( subEntity == 0 );
│ │ │ │ -
623 return 0;
│ │ │ │ -
624 }
│ │ │ │ -
│ │ │ │ -
625 };
│ │ │ │ -
│ │ │ │ -
626
│ │ │ │ -
627
│ │ │ │ -
628
│ │ │ │ -
629 template< int dim >
│ │ │ │ -
│ │ │ │ -
630 inline int applyTwist ( int twist, int i )
│ │ │ │ -
631 {
│ │ │ │ -
632 const int numCorners = NumSubEntities< dim, dim >::value;
│ │ │ │ -
633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % numCorners;
│ │ │ │ -
634 }
│ │ │ │ -
│ │ │ │ -
635
│ │ │ │ -
636 template< int dim >
│ │ │ │ -
│ │ │ │ -
637 inline int applyInverseTwist ( int twist, int i )
│ │ │ │ -
638 {
│ │ │ │ -
639 const int numCorners = NumSubEntities< dim, dim >::value;
│ │ │ │ -
640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - twist) % numCorners;
│ │ │ │ -
641 }
│ │ │ │ -
│ │ │ │ -
642
│ │ │ │ -
643 }
│ │ │ │ -
644
│ │ │ │ -
645}
│ │ │ │ -
646
│ │ │ │ -
647#endif // #if HAVE_ALBERTA
│ │ │ │ -
648
│ │ │ │ -
649#endif // #ifndef DUNE_ALBERTA_MISC_HH
│ │ │ │ - │ │ │ │ -
#define DIM_OF_WORLD
Definition albertaheader.hh:23
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │ │ -
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ -
int applyTwist(int twist, int i)
Definition misc.hh:630
│ │ │ │ -
void memFree(Data *ptr, size_t size)
Definition misc.hh:91
│ │ │ │ -
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ │ -
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │ -
ALBERTA REAL_B LocalVector
Definition misc.hh:49
│ │ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ -
ALBERTA BNDRY_TYPE BoundaryId
Definition misc.hh:61
│ │ │ │
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
static const int meshRefined
Definition misc.hh:56
│ │ │ │ -
Data * memAlloc(size_t size)
Definition misc.hh:73
│ │ │ │ -
Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
Definition misc.hh:85
│ │ │ │ -
static const int DirichletBoundary
Definition misc.hh:60
│ │ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ -
Data * memCAlloc(size_t size)
Definition misc.hh:79
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ -
U_CHAR ElementType
Definition misc.hh:63
│ │ │ │ -
static const int meshCoarsened
Definition misc.hh:57
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
Definition misc.hh:32
│ │ │ │ -
Definition misc.hh:36
│ │ │ │ -
Definition misc.hh:102
│ │ │ │ -
static const Matrix & identityMatrix()
Definition misc.hh:131
│ │ │ │ -
static const Vector & nullVector()
Definition misc.hh:136
│ │ │ │ -
GlobalMatrix Matrix
Definition misc.hh:106
│ │ │ │ -
GlobalVector Vector
Definition misc.hh:107
│ │ │ │ -
Definition misc.hh:148
│ │ │ │ -
Definition misc.hh:192
│ │ │ │ -
Definition misc.hh:231
│ │ │ │ -
static const Flags nothing
Definition misc.hh:234
│ │ │ │ -
static const Flags nonPeriodic
Definition misc.hh:248
│ │ │ │ -
static const Flags boundaryId
Definition misc.hh:246
│ │ │ │ -
static const Flags elementType
Definition misc.hh:244
│ │ │ │ -
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ │ -
static const Flags projection
Definition misc.hh:242
│ │ │ │ -
static const Flags coords
Definition misc.hh:236
│ │ │ │ -
static const Flags orientation
Definition misc.hh:240
│ │ │ │ -
static const Flags standard
Definition misc.hh:258
│ │ │ │ -
static const Flags neighbor
Definition misc.hh:238
│ │ │ │ -
static const Flags all
Definition misc.hh:250
│ │ │ │ -
static const Flags standardWithCoords
Definition misc.hh:253
│ │ │ │ -
Definition misc.hh:269
│ │ │ │ -
static const int value
Definition misc.hh:270
│ │ │ │ - │ │ │ │ -
static int apply(const int i)
Definition misc.hh:287
│ │ │ │ -
static int apply(const int i)
Definition misc.hh:299
│ │ │ │ - │ │ │ │ -
static int apply(const int i)
Definition misc.hh:315
│ │ │ │ -
static int apply(const int i)
Definition misc.hh:325
│ │ │ │ -
static int apply(const int i)
Definition misc.hh:335
│ │ │ │ -
static int apply(const int i)
Definition misc.hh:347
│ │ │ │ -
Definition misc.hh:362
│ │ │ │ -
int alberta2dune(int codim, int i) const
Definition misc.hh:397
│ │ │ │ -
int numSubEntities(int codim) const
Definition misc.hh:404
│ │ │ │ -
int dune2alberta(int codim, int i) const
Definition misc.hh:390
│ │ │ │ -
~NumberingMap()
Definition misc.hh:381
│ │ │ │ -
NumberingMap()
Definition misc.hh:376
│ │ │ │ -
Definition misc.hh:443
│ │ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:448
│ │ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:459
│ │ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:472
│ │ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:485
│ │ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:497
│ │ │ │ -
Definition misc.hh:532
│ │ │ │ -
static const int maxTwist
Definition misc.hh:536
│ │ │ │ -
static const int minTwist
Definition misc.hh:535
│ │ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:538
│ │ │ │ -
static const int numSubEntities
Definition misc.hh:533
│ │ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:554
│ │ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:575
│ │ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:592
│ │ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:619
│ │ │ │ +
Definition macroelement.hh:24
│ │ │ │ +
bool isBoundary(const int face) const
Definition macroelement.hh:42
│ │ │ │ +
const MacroElement< dim > * neighbor(const int face) const
Definition macroelement.hh:56
│ │ │ │ +
int boundaryId(const int face) const
Definition macroelement.hh:49
│ │ │ │ +
const GlobalVector & coordinate(const int vertex) const
Definition macroelement.hh:34
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,888 +1,109 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -misc.hh │ │ │ │ │ +macroelement.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ │ -6#define DUNE_ALBERTA_MISC_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#if HAVE_ALBERTA │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ 14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ -16 │ │ │ │ │ -17#if HAVE_ALBERTA │ │ │ │ │ -18 │ │ │ │ │ -19// should the coordinates be cached in a vector (required for ALBERTA 2.0)? │ │ │ │ │ -20#ifndef DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -_2_1#define DUNE_ALBERTA_CACHE_COORDINATES 1 │ │ │ │ │ -22#endif │ │ │ │ │ -23 │ │ │ │ │ -24namespace _D_u_n_e │ │ │ │ │ -25{ │ │ │ │ │ +15 namespace Alberta │ │ │ │ │ +16 { │ │ │ │ │ +17 │ │ │ │ │ +18 // MacroElement │ │ │ │ │ +19 // ------------ │ │ │ │ │ +20 │ │ │ │ │ +21 template< int dim > │ │ │ │ │ +_2_2 struct _M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +23 : public _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ +24 { │ │ │ │ │ +25 const _G_l_o_b_a_l_V_e_c_t_o_r &_c_o_o_r_d_i_n_a_t_e ( const int vertex ) const; │ │ │ │ │ 26 │ │ │ │ │ -27 // Exceptions │ │ │ │ │ -28 // ---------- │ │ │ │ │ -29 │ │ │ │ │ -_3_0 class _A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ -31 : public Exception │ │ │ │ │ -32 {}; │ │ │ │ │ -33 │ │ │ │ │ -_3_4 class _A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ -35 : public IOError │ │ │ │ │ -36 {}; │ │ │ │ │ -37 │ │ │ │ │ -38 │ │ │ │ │ +27 int _b_o_u_n_d_a_r_y_I_d ( const int face ) const; │ │ │ │ │ +28 bool _i_s_B_o_u_n_d_a_r_y ( const int face ) const; │ │ │ │ │ +29 const _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _> *_n_e_i_g_h_b_o_r ( const int face ) const; │ │ │ │ │ +30 }; │ │ │ │ │ +31 │ │ │ │ │ +32 │ │ │ │ │ +33 template< int dim > │ │ │ │ │ +_3_4 inline const _G_l_o_b_a_l_V_e_c_t_o_r &_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_c_o_o_r_d_i_n_a_t_e ( const int │ │ │ │ │ +vertex ) const │ │ │ │ │ +35 { │ │ │ │ │ +36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) ); │ │ │ │ │ +37 return *coord[ vertex ]; │ │ │ │ │ +38 } │ │ │ │ │ 39 │ │ │ │ │ -40 namespace Alberta │ │ │ │ │ -41 { │ │ │ │ │ -42 │ │ │ │ │ -43 // Import Types │ │ │ │ │ -44 // ------------ │ │ │ │ │ -45 │ │ │ │ │ -_4_6 static const int _d_i_m_W_o_r_l_d = _D_I_M___O_F___W_O_R_L_D; │ │ │ │ │ +40 │ │ │ │ │ +41 template< int dim > │ │ │ │ │ +_4_2 inline bool _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_i_s_B_o_u_n_d_a_r_y ( const int face ) const │ │ │ │ │ +43 { │ │ │ │ │ +44 return (boundaryId( face ) != _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y); │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ 47 │ │ │ │ │ -_4_8 typedef _A_L_B_E_R_T_A REAL _R_e_a_l; │ │ │ │ │ -_4_9 typedef _A_L_B_E_R_T_A REAL_B _L_o_c_a_l_V_e_c_t_o_r; // in barycentric coordinates │ │ │ │ │ -_5_0 typedef _A_L_B_E_R_T_A REAL_D _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ │ -_5_1 typedef _A_L_B_E_R_T_A REAL_DD _G_l_o_b_a_l_M_a_t_r_i_x; │ │ │ │ │ -_5_2 typedef _A_L_B_E_R_T_A AFF_TRAFO _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n; │ │ │ │ │ -_5_3 typedef _A_L_B_E_R_T_A MESH _M_e_s_h; │ │ │ │ │ -_5_4 typedef _A_L_B_E_R_T_A EL _E_l_e_m_e_n_t; │ │ │ │ │ -55 │ │ │ │ │ -_5_6 static const int _m_e_s_h_R_e_f_i_n_e_d = MESH_REFINED; │ │ │ │ │ -_5_7 static const int _m_e_s_h_C_o_a_r_s_e_n_e_d = MESH_COARSENED; │ │ │ │ │ -58 │ │ │ │ │ -_5_9 static const int _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y = INTERIOR; │ │ │ │ │ -_6_0 static const int _D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y = DIRICHLET; │ │ │ │ │ -_6_1 typedef _A_L_B_E_R_T_A BNDRY_TYPE _B_o_u_n_d_a_r_y_I_d; │ │ │ │ │ -62 │ │ │ │ │ -_6_3 typedef U_CHAR _E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ -64 │ │ │ │ │ -_6_5 typedef _A_L_B_E_R_T_A FE_SPACE _D_o_f_S_p_a_c_e; │ │ │ │ │ -66 │ │ │ │ │ +48 template< int dim > │ │ │ │ │ +_4_9 inline int _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( const int face ) const │ │ │ │ │ +50 { │ │ │ │ │ +51 return wall_bound[ face ]; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +54 │ │ │ │ │ +55 template< int dim > │ │ │ │ │ +_5_6 const _M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _> *_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( const int face ) │ │ │ │ │ +const │ │ │ │ │ +57 { │ │ │ │ │ +58 assert( (face >= 0) && (face < N_NEIGH_MAX) ); │ │ │ │ │ +59 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t * >( neigh[ face ] ); │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +64} │ │ │ │ │ +65 │ │ │ │ │ +66#endif // #if HAVE_ALBERTA │ │ │ │ │ 67 │ │ │ │ │ -68 │ │ │ │ │ -69 // Memory Manipulation Functions │ │ │ │ │ -70 // ----------------------------- │ │ │ │ │ -71 │ │ │ │ │ -72 template< class Data > │ │ │ │ │ -_7_3 inline Data *_m_e_m_A_l_l_o_c ( size_t size ) │ │ │ │ │ -74 { │ │ │ │ │ -75 return MEM_ALLOC( size, Data ); │ │ │ │ │ -76 } │ │ │ │ │ -77 │ │ │ │ │ -78 template< class Data > │ │ │ │ │ -_7_9 inline Data *_m_e_m_C_A_l_l_o_c ( size_t size ) │ │ │ │ │ -80 { │ │ │ │ │ -81 return MEM_CALLOC( size, Data ); │ │ │ │ │ -82 } │ │ │ │ │ -83 │ │ │ │ │ -84 template< class Data > │ │ │ │ │ -_8_5 inline Data *_m_e_m_R_e_A_l_l_o_c ( Data *ptr, size_t oldSize, size_t newSize ) │ │ │ │ │ -86 { │ │ │ │ │ -87 return MEM_REALLOC( ptr, oldSize, newSize, Data ); │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -90 template< class Data > │ │ │ │ │ -_9_1 inline void _m_e_m_F_r_e_e ( Data *ptr, size_t size ) │ │ │ │ │ -92 { │ │ │ │ │ -93 return MEM_FREE( ptr, size, Data ); │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -96 │ │ │ │ │ -97 │ │ │ │ │ -98 // GlobalSpace │ │ │ │ │ -99 // ----------- │ │ │ │ │ -100 │ │ │ │ │ -_1_0_1 class _G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ -102 { │ │ │ │ │ -103 typedef _G_l_o_b_a_l_S_p_a_c_e _T_h_i_s; │ │ │ │ │ -104 │ │ │ │ │ -105 public: │ │ │ │ │ -_1_0_6 typedef _G_l_o_b_a_l_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ -_1_0_7 typedef _G_l_o_b_a_l_V_e_c_t_o_r _V_e_c_t_o_r; │ │ │ │ │ -108 │ │ │ │ │ -109 private: │ │ │ │ │ -110 _M_a_t_r_i_x identityMatrix_; │ │ │ │ │ -111 _V_e_c_t_o_r nullVector_; │ │ │ │ │ -112 │ │ │ │ │ -113 _G_l_o_b_a_l_S_p_a_c_e () │ │ │ │ │ -114 { │ │ │ │ │ -115 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ -116 { │ │ │ │ │ -117 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ -118 identityMatrix_[ i ][ j ] = _R_e_a_l( 0 ); │ │ │ │ │ -119 identityMatrix_[ i ][ i ] = _R_e_a_l( 1 ); │ │ │ │ │ -120 nullVector_[ i ] = _R_e_a_l( 0 ); │ │ │ │ │ -121 } │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -124 static This &instance () │ │ │ │ │ -125 { │ │ │ │ │ -126 static This theInstance; │ │ │ │ │ -127 return theInstance; │ │ │ │ │ -128 } │ │ │ │ │ -129 │ │ │ │ │ -130 public: │ │ │ │ │ -_1_3_1 static const _M_a_t_r_i_x &_i_d_e_n_t_i_t_y_M_a_t_r_i_x () │ │ │ │ │ -132 { │ │ │ │ │ -133 return instance().identityMatrix_; │ │ │ │ │ -134 } │ │ │ │ │ -135 │ │ │ │ │ -_1_3_6 static const _V_e_c_t_o_r &_n_u_l_l_V_e_c_t_o_r () │ │ │ │ │ -137 { │ │ │ │ │ -138 return instance().nullVector_; │ │ │ │ │ -139 } │ │ │ │ │ -140 }; │ │ │ │ │ -141 │ │ │ │ │ -142 │ │ │ │ │ -143 │ │ │ │ │ -144 // NumSubEntities │ │ │ │ │ -145 // -------------- │ │ │ │ │ -146 │ │ │ │ │ -147 template< int dim, int codim > │ │ │ │ │ -_1_4_8 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ │ -149 │ │ │ │ │ -150 template< int dim > │ │ │ │ │ -_1_5_1 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, 0 > │ │ │ │ │ -152 { │ │ │ │ │ -_1_5_3 static const int value = 1; │ │ │ │ │ -154 }; │ │ │ │ │ -155 │ │ │ │ │ -156 template< int dim > │ │ │ │ │ -_1_5_7 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim > │ │ │ │ │ -158 { │ │ │ │ │ -_1_5_9 static const int value = dim+1; │ │ │ │ │ -160 }; │ │ │ │ │ -161 │ │ │ │ │ -162 template<> │ │ │ │ │ -_1_6_3 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 0, 0 > │ │ │ │ │ -164 { │ │ │ │ │ -_1_6_5 static const int value = 1; │ │ │ │ │ -166 }; │ │ │ │ │ -167 │ │ │ │ │ -168 template<> │ │ │ │ │ -_1_6_9 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 2, 1 > │ │ │ │ │ -170 { │ │ │ │ │ -_1_7_1 static const int value = 3; │ │ │ │ │ -172 }; │ │ │ │ │ -173 │ │ │ │ │ -174 template<> │ │ │ │ │ -_1_7_5 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 3, 1 > │ │ │ │ │ -176 { │ │ │ │ │ -_1_7_7 static const int value = 4; │ │ │ │ │ -178 }; │ │ │ │ │ -179 │ │ │ │ │ -180 template<> │ │ │ │ │ -_1_8_1 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 3, 2 > │ │ │ │ │ -182 { │ │ │ │ │ -_1_8_3 static const int value = 6; │ │ │ │ │ -184 }; │ │ │ │ │ -185 │ │ │ │ │ -186 │ │ │ │ │ -187 │ │ │ │ │ -188 // CodimType │ │ │ │ │ -189 // --------- │ │ │ │ │ -190 │ │ │ │ │ -191 template< int dim, int codim > │ │ │ │ │ -_1_9_2 struct _C_o_d_i_m_T_y_p_e; │ │ │ │ │ -193 │ │ │ │ │ -194 template< int dim > │ │ │ │ │ -_1_9_5 struct _C_o_d_i_m_T_y_p_e< dim, 0 > │ │ │ │ │ -196 { │ │ │ │ │ -_1_9_7 static const int value = CENTER; │ │ │ │ │ -198 }; │ │ │ │ │ -199 │ │ │ │ │ -200 template< int dim > │ │ │ │ │ -_2_0_1 struct _C_o_d_i_m_T_y_p_e< dim, dim > │ │ │ │ │ -202 { │ │ │ │ │ -_2_0_3 static const int value = VERTEX; │ │ │ │ │ -204 }; │ │ │ │ │ -205 │ │ │ │ │ -206 template<> │ │ │ │ │ -_2_0_7 struct _C_o_d_i_m_T_y_p_e< 2, 1 > │ │ │ │ │ -208 { │ │ │ │ │ -_2_0_9 static const int value = EDGE; │ │ │ │ │ -210 }; │ │ │ │ │ -211 │ │ │ │ │ -212 template<> │ │ │ │ │ -_2_1_3 struct _C_o_d_i_m_T_y_p_e< 3, 1 > │ │ │ │ │ -214 { │ │ │ │ │ -_2_1_5 static const int value = FACE; │ │ │ │ │ -216 }; │ │ │ │ │ -217 │ │ │ │ │ -218 template<> │ │ │ │ │ -_2_1_9 struct _C_o_d_i_m_T_y_p_e< 3, 2 > │ │ │ │ │ -220 { │ │ │ │ │ -_2_2_1 static const int value = EDGE; │ │ │ │ │ -222 }; │ │ │ │ │ -223 │ │ │ │ │ -224 │ │ │ │ │ -225 │ │ │ │ │ -226 // FillFlags │ │ │ │ │ -227 // --------- │ │ │ │ │ -228 │ │ │ │ │ -229 template< int dim > │ │ │ │ │ -_2_3_0 struct _F_i_l_l_F_l_a_g_s │ │ │ │ │ -231 { │ │ │ │ │ -_2_3_2 typedef _A_L_B_E_R_T_A FLAGS _F_l_a_g_s; │ │ │ │ │ -233 │ │ │ │ │ -_2_3_4 static const _F_l_a_g_s _n_o_t_h_i_n_g = FILL_NOTHING; │ │ │ │ │ -235 │ │ │ │ │ -_2_3_6 static const _F_l_a_g_s _c_o_o_r_d_s = FILL_COORDS; │ │ │ │ │ -237 │ │ │ │ │ -_2_3_8 static const _F_l_a_g_s _n_e_i_g_h_b_o_r = FILL_NEIGH; │ │ │ │ │ -239 │ │ │ │ │ -_2_4_0 static const _F_l_a_g_s _o_r_i_e_n_t_a_t_i_o_n = (dim == 3 ? FILL_ORIENTATION : │ │ │ │ │ -FILL_NOTHING); │ │ │ │ │ -241 │ │ │ │ │ -_2_4_2 static const _F_l_a_g_s _p_r_o_j_e_c_t_i_o_n = FILL_PROJECTION; │ │ │ │ │ -243 │ │ │ │ │ -_2_4_4 static const _F_l_a_g_s _e_l_e_m_e_n_t_T_y_p_e = FILL_NOTHING; │ │ │ │ │ -245 │ │ │ │ │ -_2_4_6 static const _F_l_a_g_s _b_o_u_n_d_a_r_y_I_d = FILL_MACRO_WALLS; │ │ │ │ │ -247 │ │ │ │ │ -_2_4_8 static const _F_l_a_g_s _n_o_n_P_e_r_i_o_d_i_c = FILL_NON_PERIODIC; │ │ │ │ │ -249 │ │ │ │ │ -_2_5_0 static const _F_l_a_g_s _a_l_l = _c_o_o_r_d_s | _n_e_i_g_h_b_o_r | _b_o_u_n_d_a_r_y_I_d | _n_o_n_P_e_r_i_o_d_i_c │ │ │ │ │ -251 | _o_r_i_e_n_t_a_t_i_o_n | _p_r_o_j_e_c_t_i_o_n | _e_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ -252 │ │ │ │ │ -_2_5_3 static const _F_l_a_g_s _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s = _a_l_l & ~nonPeriodic & ~projection; │ │ │ │ │ -254 │ │ │ │ │ -255#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -256 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s & ~coords; │ │ │ │ │ -257#else │ │ │ │ │ -_2_5_8 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s; │ │ │ │ │ -259#endif │ │ │ │ │ -260 }; │ │ │ │ │ -261 │ │ │ │ │ -262 │ │ │ │ │ -263 │ │ │ │ │ -264 // RefinementEdge │ │ │ │ │ -265 // -------------- │ │ │ │ │ -266 │ │ │ │ │ -267 template< int dim > │ │ │ │ │ -_2_6_8 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e │ │ │ │ │ -269 { │ │ │ │ │ -_2_7_0 static const int _v_a_l_u_e = 0; │ │ │ │ │ -271 }; │ │ │ │ │ -272 │ │ │ │ │ -273 template<> │ │ │ │ │ -_2_7_4 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e< 2 > │ │ │ │ │ -275 { │ │ │ │ │ -_2_7_6 static const int _v_a_l_u_e = 2; │ │ │ │ │ -277 }; │ │ │ │ │ -278 │ │ │ │ │ -279 │ │ │ │ │ -280 │ │ │ │ │ -281 // Dune2AlbertaNumbering │ │ │ │ │ -282 // --------------------- │ │ │ │ │ -283 │ │ │ │ │ -284 template< int dim, int codim > │ │ │ │ │ -_2_8_5 struct _D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ -286 { │ │ │ │ │ -_2_8_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ -288 { │ │ │ │ │ -289 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ -290 return i; │ │ │ │ │ -291 } │ │ │ │ │ -292 }; │ │ │ │ │ -293 │ │ │ │ │ -294 template<> │ │ │ │ │ -_2_9_5 struct _D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ │ -296 { │ │ │ │ │ -_2_9_7 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -298 │ │ │ │ │ -_2_9_9 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ -300 { │ │ │ │ │ -301 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ │ -302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 }; │ │ │ │ │ -303 return dune2alberta[ i ]; │ │ │ │ │ -304 } │ │ │ │ │ -305 }; │ │ │ │ │ -306 │ │ │ │ │ -307 │ │ │ │ │ -308 │ │ │ │ │ -309 // Generic2AlbertaNumbering │ │ │ │ │ -310 // ------------------------ │ │ │ │ │ -311 │ │ │ │ │ -312 template< int dim, int codim > │ │ │ │ │ -_3_1_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ -314 { │ │ │ │ │ -_3_1_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ -316 { │ │ │ │ │ -317 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ -318 return i; │ │ │ │ │ -319 } │ │ │ │ │ -320 }; │ │ │ │ │ -321 │ │ │ │ │ -322 template< int dim > │ │ │ │ │ -_3_2_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< dim, 1 > │ │ │ │ │ -324 { │ │ │ │ │ -_3_2_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ -326 { │ │ │ │ │ -327 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ -328 return dim - i; │ │ │ │ │ -329 } │ │ │ │ │ -330 }; │ │ │ │ │ -331 │ │ │ │ │ -332 template<> │ │ │ │ │ -_3_3_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 1, 1 > │ │ │ │ │ -334 { │ │ │ │ │ -_3_3_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ -336 { │ │ │ │ │ -337 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ -338 return i; │ │ │ │ │ -339 } │ │ │ │ │ -340 }; │ │ │ │ │ -341 │ │ │ │ │ -342 template<> │ │ │ │ │ -_3_4_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ │ -344 { │ │ │ │ │ -_3_4_5 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -346 │ │ │ │ │ -_3_4_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ │ -348 { │ │ │ │ │ -349 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ │ -350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 }; │ │ │ │ │ -351 return generic2alberta[ i ]; │ │ │ │ │ -352 } │ │ │ │ │ -353 }; │ │ │ │ │ -354 │ │ │ │ │ -355 │ │ │ │ │ -356 │ │ │ │ │ -357 // NumberingMap │ │ │ │ │ -358 // ------------ │ │ │ │ │ -359 │ │ │ │ │ -360 template< int dim, template< int, int > class Numbering = │ │ │ │ │ -Generic2AlbertaNumbering > │ │ │ │ │ -_3_6_1 class _N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ -362 { │ │ │ │ │ -363 typedef _N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> _T_h_i_s; │ │ │ │ │ -364 │ │ │ │ │ -365 template< int codim > │ │ │ │ │ -366 struct Initialize; │ │ │ │ │ -367 │ │ │ │ │ -368 int *dune2alberta_[ dim+1 ]; │ │ │ │ │ -369 int *alberta2dune_[ dim+1 ]; │ │ │ │ │ -370 int numSubEntities_[ dim+1 ]; │ │ │ │ │ -371 │ │ │ │ │ -372 _N_u_m_b_e_r_i_n_g_M_a_p ( const _T_h_i_s & ); │ │ │ │ │ -373 _T_h_i_s &operator= ( const _T_h_i_s & ); │ │ │ │ │ -374 │ │ │ │ │ -375 public: │ │ │ │ │ -_3_7_6 _N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ │ -377 { │ │ │ │ │ -378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ │ -{ Initialize< i >::apply( *this ); } ); │ │ │ │ │ -379 } │ │ │ │ │ -380 │ │ │ │ │ -_3_8_1 _~_N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ │ -382 { │ │ │ │ │ -383 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ │ -384 { │ │ │ │ │ -385 delete[]( dune2alberta_[ codim ] ); │ │ │ │ │ -386 delete[]( alberta2dune_[ codim ] ); │ │ │ │ │ -387 } │ │ │ │ │ -388 } │ │ │ │ │ -389 │ │ │ │ │ -_3_9_0 int _d_u_n_e_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ │ -391 { │ │ │ │ │ -392 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ │ -393 assert( (i >= 0) && (i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s( codim )) ); │ │ │ │ │ -394 return dune2alberta_[ codim ][ i ]; │ │ │ │ │ -395 } │ │ │ │ │ -396 │ │ │ │ │ -_3_9_7 int _a_l_b_e_r_t_a_2_d_u_n_e ( int codim, int i ) const │ │ │ │ │ -398 { │ │ │ │ │ -399 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ │ -400 assert( (i >= 0) && (i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s( codim )) ); │ │ │ │ │ -401 return alberta2dune_[ codim ][ i ]; │ │ │ │ │ -402 } │ │ │ │ │ -403 │ │ │ │ │ -_4_0_4 int _n_u_m_S_u_b_E_n_t_i_t_i_e_s ( int codim ) const │ │ │ │ │ -405 { │ │ │ │ │ -406 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ │ -407 return numSubEntities_[ codim ]; │ │ │ │ │ -408 } │ │ │ │ │ -409 }; │ │ │ │ │ -410 │ │ │ │ │ -411 │ │ │ │ │ -412 │ │ │ │ │ -413 // NumberingMap::Initialize │ │ │ │ │ -414 // ------------------------ │ │ │ │ │ -415 │ │ │ │ │ -416 template< int dim, template< int, int > class Numbering > │ │ │ │ │ -417 template< int codim > │ │ │ │ │ -418 struct NumberingMap< dim, Numbering >::Initialize │ │ │ │ │ -419 { │ │ │ │ │ -420 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = NumSubEntities< dim, codim >::value; │ │ │ │ │ -421 │ │ │ │ │ -422 static void apply ( NumberingMap< dim, Numbering > &map ) │ │ │ │ │ -423 { │ │ │ │ │ -424 map.numSubEntities_[ codim ] = _n_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ │ -425 map.dune2alberta_[ codim ] = new int[ _n_u_m_S_u_b_E_n_t_i_t_i_e_s ]; │ │ │ │ │ -426 map.alberta2dune_[ codim ] = new int[ _n_u_m_S_u_b_E_n_t_i_t_i_e_s ]; │ │ │ │ │ -427 │ │ │ │ │ -428 for( int i = 0; i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s; ++i ) │ │ │ │ │ -429 { │ │ │ │ │ -430 const int j = Numbering< dim, codim >::apply( i ); │ │ │ │ │ -431 map.dune2alberta_[ codim ][ i ] = j; │ │ │ │ │ -432 map.alberta2dune_[ codim ][ j ] = i; │ │ │ │ │ -433 } │ │ │ │ │ -434 } │ │ │ │ │ -435 }; │ │ │ │ │ -436 │ │ │ │ │ -437 │ │ │ │ │ -438 │ │ │ │ │ -439 // MapVertices │ │ │ │ │ -440 // ----------- │ │ │ │ │ -441 │ │ │ │ │ -442 template< int dim, int codim > │ │ │ │ │ -_4_4_3 struct _M_a_p_V_e_r_t_i_c_e_s; │ │ │ │ │ -444 │ │ │ │ │ -445 template< int dim > │ │ │ │ │ -_4_4_6 struct _M_a_p_V_e_r_t_i_c_e_s< dim, 0 > │ │ │ │ │ -447 { │ │ │ │ │ -_4_4_8 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ -449 { │ │ │ │ │ -450 assert( subEntity == 0 ); │ │ │ │ │ -451 assert( (vertex >= 0) && (vertex <= _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ │ -452 return vertex; │ │ │ │ │ -453 } │ │ │ │ │ -454 }; │ │ │ │ │ -455 │ │ │ │ │ -456 template<> │ │ │ │ │ -_4_5_7 struct _M_a_p_V_e_r_t_i_c_e_s< 2, 1 > │ │ │ │ │ -458 { │ │ │ │ │ -_4_5_9 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ -460 { │ │ │ │ │ -461 assert( (subEntity >= 0) && (subEntity < 3) ); │ │ │ │ │ -462 assert( (vertex >= 0) && (vertex < 2) ); │ │ │ │ │ -463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} }; │ │ │ │ │ -464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} }; │ │ │ │ │ -465 return map[ subEntity ][ vertex ]; │ │ │ │ │ -466 } │ │ │ │ │ -467 }; │ │ │ │ │ -468 │ │ │ │ │ -469 template<> │ │ │ │ │ -_4_7_0 struct _M_a_p_V_e_r_t_i_c_e_s< 3, 1 > │ │ │ │ │ -471 { │ │ │ │ │ -_4_7_2 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ -473 { │ │ │ │ │ -474 assert( (subEntity >= 0) && (subEntity < 4) ); │ │ │ │ │ -475 assert( (vertex >= 0) && (vertex < 3) ); │ │ │ │ │ -476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} }; │ │ │ │ │ -477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} }; │ │ │ │ │ -478 return map[ subEntity ][ vertex ]; │ │ │ │ │ -479 } │ │ │ │ │ -480 }; │ │ │ │ │ -481 │ │ │ │ │ -482 template<> │ │ │ │ │ -_4_8_3 struct _M_a_p_V_e_r_t_i_c_e_s< 3, 2 > │ │ │ │ │ -484 { │ │ │ │ │ -_4_8_5 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ -486 { │ │ │ │ │ -487 assert( (subEntity >= 0) && (subEntity < 6) ); │ │ │ │ │ -488 assert( (vertex >= 0) && (vertex < 2) ); │ │ │ │ │ -489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} │ │ │ │ │ -}; │ │ │ │ │ -490 return map[ subEntity ][ vertex ]; │ │ │ │ │ -491 } │ │ │ │ │ -492 }; │ │ │ │ │ -493 │ │ │ │ │ -494 template< int dim > │ │ │ │ │ -_4_9_5 struct _M_a_p_V_e_r_t_i_c_e_s< dim, dim > │ │ │ │ │ -496 { │ │ │ │ │ -_4_9_7 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ │ -498 { │ │ │ │ │ -499 assert( (subEntity >= 0) && (subEntity < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) │ │ │ │ │ -); │ │ │ │ │ -500 assert( vertex == 0 ); │ │ │ │ │ -501 return subEntity; │ │ │ │ │ -502 } │ │ │ │ │ -503 }; │ │ │ │ │ -504 │ │ │ │ │ -505 │ │ │ │ │ -506 │ │ │ │ │ -507 // Twist │ │ │ │ │ -508 // ----- │ │ │ │ │ -509 │ │ │ │ │ -510 // ****************************************************************** │ │ │ │ │ -511 // Meaning of the twist (same as in ALU) │ │ │ │ │ -512 // ------------------------------------- │ │ │ │ │ -513 // │ │ │ │ │ -514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face │ │ │ │ │ -515 // (here, we assume their indices to be increasing). Denote by k the │ │ │ │ │ -516 // local number of a vertex v within the element and by t the twist. │ │ │ │ │ -517 // Then, v = v_j, where j is computed by the following formula: │ │ │ │ │ -518 // │ │ │ │ │ -519 // / (2n + 1 - k + t) % n, if t < 0 │ │ │ │ │ -520 // j = < │ │ │ │ │ -521 // \ (k + t) % n, if t >= 0 │ │ │ │ │ -522 // │ │ │ │ │ -523 // Note: We use the order of the 0-th vertex dof to assign the twist. │ │ │ │ │ -524 // This is ok for two reasons: │ │ │ │ │ -525 // - ALBERTA preserves the relative order of the dofs during │ │ │ │ │ -526 // dof compression. │ │ │ │ │ -527 // - ALBERTA enforces the first vertex dof admin to be periodic. │ │ │ │ │ -528 // ****************************************************************** │ │ │ │ │ -529 │ │ │ │ │ -530 template< int dim, int subdim > │ │ │ │ │ -_5_3_1 struct _T_w_i_s_t │ │ │ │ │ -532 { │ │ │ │ │ -_5_3_3 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-subdim >::value; │ │ │ │ │ -534 │ │ │ │ │ -_5_3_5 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ -_5_3_6 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ │ -537 │ │ │ │ │ -_5_3_8 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ │ -539 [[maybe_unused]] int subEntity ) │ │ │ │ │ -540 { │ │ │ │ │ -541 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ │ -542 return 0; │ │ │ │ │ -543 } │ │ │ │ │ -544 }; │ │ │ │ │ -545 │ │ │ │ │ -546 template< int dim > │ │ │ │ │ -_5_4_7 struct _T_w_i_s_t< dim, 1 > │ │ │ │ │ -548 { │ │ │ │ │ -_5_4_9 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-1 >::value; │ │ │ │ │ -550 │ │ │ │ │ -_5_5_1 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ -_5_5_2 static const int _m_a_x_T_w_i_s_t = 1; │ │ │ │ │ -553 │ │ │ │ │ -_5_5_4 static int _t_w_i_s_t ( const _E_l_e_m_e_n_t *element, int subEntity ) │ │ │ │ │ -555 { │ │ │ │ │ -556 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ │ -557 const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -558 int dof[ numVertices ]; │ │ │ │ │ -559 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ -560 { │ │ │ │ │ -561 const int j = _M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_-_1_ _>_:_:_a_p_p_l_y( subEntity, i ); │ │ │ │ │ -562 dof[ i ] = element->dof[ j ][ 0 ]; │ │ │ │ │ -563 } │ │ │ │ │ -564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1); │ │ │ │ │ -565 } │ │ │ │ │ -566 }; │ │ │ │ │ -567 │ │ │ │ │ -568 │ │ │ │ │ -569 template<> │ │ │ │ │ -_5_7_0 struct _T_w_i_s_t< 1, 1 > │ │ │ │ │ -571 { │ │ │ │ │ -_5_7_2 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ -_5_7_3 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ │ -574 │ │ │ │ │ -_5_7_5 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ │ -576 [[maybe_unused]] int subEntity ) │ │ │ │ │ -577 { │ │ │ │ │ -578 assert( subEntity == 0 ); │ │ │ │ │ -579 return 0; │ │ │ │ │ -580 } │ │ │ │ │ -581 }; │ │ │ │ │ -582 │ │ │ │ │ -583 │ │ │ │ │ -584 template< int dim > │ │ │ │ │ -_5_8_5 struct _T_w_i_s_t< dim, 2 > │ │ │ │ │ -586 { │ │ │ │ │ -_5_8_7 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-2 >::value; │ │ │ │ │ -588 │ │ │ │ │ -_5_8_9 static const int _m_i_n_T_w_i_s_t = -3; │ │ │ │ │ -_5_9_0 static const int _m_a_x_T_w_i_s_t = 2; │ │ │ │ │ -591 │ │ │ │ │ -_5_9_2 static int _t_w_i_s_t ( const _E_l_e_m_e_n_t *element, int subEntity ) │ │ │ │ │ -593 { │ │ │ │ │ -594 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ │ -595 const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _2_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -596 int dof[ numVertices ]; │ │ │ │ │ -597 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ -598 { │ │ │ │ │ -599 const int j = _M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_-_2_ _>_:_:_a_p_p_l_y( subEntity, i ); │ │ │ │ │ -600 dof[ i ] = element->dof[ j ][ 0 ]; │ │ │ │ │ -601 } │ │ │ │ │ -602 │ │ │ │ │ -603 const int _t_w_i_s_t[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 }; │ │ │ │ │ -604 const int k = int( dof[ 0 ] < dof[ 1 ] ) │ │ │ │ │ -605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1) │ │ │ │ │ -606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2); │ │ │ │ │ -607 assert( _t_w_i_s_t[ k ] != 666 ); │ │ │ │ │ -608 return _t_w_i_s_t[ k ]; │ │ │ │ │ -609 } │ │ │ │ │ -610 }; │ │ │ │ │ -611 │ │ │ │ │ -612 │ │ │ │ │ -613 template<> │ │ │ │ │ -_6_1_4 struct _T_w_i_s_t< 2, 2 > │ │ │ │ │ -615 { │ │ │ │ │ -_6_1_6 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ │ -_6_1_7 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ │ -618 │ │ │ │ │ -_6_1_9 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ │ -620 [[maybe_unused]] int subEntity ) │ │ │ │ │ -621 { │ │ │ │ │ -622 assert( subEntity == 0 ); │ │ │ │ │ -623 return 0; │ │ │ │ │ -624 } │ │ │ │ │ -625 }; │ │ │ │ │ -626 │ │ │ │ │ -627 │ │ │ │ │ -628 │ │ │ │ │ -629 template< int dim > │ │ │ │ │ -_6_3_0 inline int _a_p_p_l_y_T_w_i_s_t ( int twist, int i ) │ │ │ │ │ -631 { │ │ │ │ │ -632 const int numCorners = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % │ │ │ │ │ -numCorners; │ │ │ │ │ -634 } │ │ │ │ │ -635 │ │ │ │ │ -636 template< int dim > │ │ │ │ │ -_6_3_7 inline int _a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t ( int twist, int i ) │ │ │ │ │ -638 { │ │ │ │ │ -639 const int numCorners = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - │ │ │ │ │ -twist) % numCorners; │ │ │ │ │ -641 } │ │ │ │ │ -642 │ │ │ │ │ -643 } │ │ │ │ │ -644 │ │ │ │ │ -645} │ │ │ │ │ -646 │ │ │ │ │ -647#endif // #if HAVE_ALBERTA │ │ │ │ │ -648 │ │ │ │ │ -649#endif // #ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ │ -_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ -_D_I_M___O_F___W_O_R_L_D │ │ │ │ │ -#define DIM_OF_WORLD │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:23 │ │ │ │ │ +68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t │ │ │ │ │ -int applyInverseTwist(int twist, int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:637 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ -ALBERTA MESH Mesh │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_T_w_i_s_t │ │ │ │ │ -int applyTwist(int twist, int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:630 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_F_r_e_e │ │ │ │ │ -void memFree(Data *ptr, size_t size) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ │ -ALBERTA REAL_DD GlobalMatrix │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_B LocalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -ALBERTA EL Element │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ │ -ALBERTA BNDRY_TYPE BoundaryId │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:61 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y │ │ │ │ │ static const int InteriorBoundary │ │ │ │ │ DDeeffiinniittiioonn misc.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d │ │ │ │ │ -static const int meshRefined │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_A_l_l_o_c │ │ │ │ │ -Data * memAlloc(size_t size) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c │ │ │ │ │ -Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ -static const int DirichletBoundary │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ -ALBERTA FE_SPACE DofSpace │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_C_A_l_l_o_c │ │ │ │ │ -Data * memCAlloc(size_t size) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -U_CHAR ElementType │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d │ │ │ │ │ -static const int meshCoarsened │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:57 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_i_d_e_n_t_i_t_y_M_a_t_r_i_x │ │ │ │ │ -static const Matrix & identityMatrix() │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_n_u_l_l_V_e_c_t_o_r │ │ │ │ │ -static const Vector & nullVector() │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x │ │ │ │ │ -GlobalMatrix Matrix │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r │ │ │ │ │ -GlobalVector Vector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ -static const Flags nothing │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_n_P_e_r_i_o_d_i_c │ │ │ │ │ -static const Flags nonPeriodic │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:248 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -static const Flags boundaryId │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:246 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_e_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -static const Flags elementType │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:244 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ -ALBERTA FLAGS Flags │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_p_r_o_j_e_c_t_i_o_n │ │ │ │ │ -static const Flags projection │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:242 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s │ │ │ │ │ -static const Flags coords │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_o_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ -static const Flags orientation │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ │ -static const Flags standard │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:258 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -static const Flags neighbor │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_a_l_l │ │ │ │ │ -static const Flags all │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:250 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s │ │ │ │ │ -static const Flags standardWithCoords │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:269 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_:_:_v_a_l_u_e │ │ │ │ │ -static const int value │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:270 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:286 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(const int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:287 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(const int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(const int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:315 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(const int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:325 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _1_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(const int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:335 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(const int i) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:347 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:362 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_a_l_b_e_r_t_a_2_d_u_n_e │ │ │ │ │ -int alberta2dune(int codim, int i) const │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:397 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -int numSubEntities(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:404 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_d_u_n_e_2_a_l_b_e_r_t_a │ │ │ │ │ -int dune2alberta(int codim, int i) const │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:390 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_~_N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ -~NumberingMap() │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:381 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ │ -NumberingMap() │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:376 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:443 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _0_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(int subEntity, int vertex) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:448 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _2_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(int subEntity, int vertex) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:459 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(int subEntity, int vertex) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:472 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(int subEntity, int vertex) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:485 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static int apply(int subEntity, int vertex) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:497 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:532 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_m_a_x_T_w_i_s_t │ │ │ │ │ -static const int maxTwist │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:536 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_m_i_n_T_w_i_s_t │ │ │ │ │ -static const int minTwist │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:535 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_t_w_i_s_t │ │ │ │ │ -static int twist(const Element *element, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:538 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -static const int numSubEntities │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:533 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _1_ _>_:_:_t_w_i_s_t │ │ │ │ │ -static int twist(const Element *element, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:554 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _1_,_ _1_ _>_:_:_t_w_i_s_t │ │ │ │ │ -static int twist(const Element *element, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:575 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _2_ _>_:_:_t_w_i_s_t │ │ │ │ │ -static int twist(const Element *element, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:592 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _2_,_ _2_ _>_:_:_t_w_i_s_t │ │ │ │ │ -static int twist(const Element *element, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:619 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ +bool isBoundary(const int face) const │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +const MacroElement< dim > * neighbor(const int face) const │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const int face) const │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +const GlobalVector & coordinate(const int vertex) const │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:34 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertaheader.hh File Reference │ │ │ │ +dune-grid: geometrycache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,39 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Macros
│ │ │ │ -
albertaheader.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
geometrycache.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <alberta/alberta.h>
│ │ │ │ +
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Macros

#define DIM_OF_WORLD   ALBERTA_DIM
 
#define ALBERTA   ::
 
#define ALBERTA_DEBUG   0
 
#define _MAX_NOT_DEFINED_
 
#define _MIN_NOT_DEFINED_
 
#define _ABS_NOT_DEFINED_
 

│ │ │ │ +Classes

class  Dune::Alberta::GeometryCache< dim >
 
struct  Dune::Alberta::GeometryCacheProxy< dim >
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ _ABS_NOT_DEFINED_

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define _ABS_NOT_DEFINED_
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ _MAX_NOT_DEFINED_

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define _MAX_NOT_DEFINED_
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ _MIN_NOT_DEFINED_

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define _MIN_NOT_DEFINED_
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ ALBERTA

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define ALBERTA   ::
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ ALBERTA_DEBUG

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define ALBERTA_DEBUG   0
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ DIM_OF_WORLD

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DIM_OF_WORLD   ALBERTA_DIM
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,39 +1,25 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_M_a_c_r_o_s │ │ │ │ │ -albertaheader.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +geometrycache.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._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_. │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_I_M___O_F___W_O_R_L_D   ALBERTA_DIM │ │ │ │ │ +CCllaasssseess │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -#define  _A_L_B_E_R_T_A   :: │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -#define  _A_L_B_E_R_T_A___D_E_B_U_G   0 │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │   │ │ │ │ │ -#define  ___M_A_X___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ -#define  ___M_I_N___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ │ -  │ │ │ │ │ -#define  ___A_B_S___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ │ -  │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? __AABBSS__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ │ -#define _ABS_NOT_DEFINED_ │ │ │ │ │ -********** _?◆_? __MMAAXX__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ │ -#define _MAX_NOT_DEFINED_ │ │ │ │ │ -********** _?◆_? __MMIINN__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ │ -#define _MIN_NOT_DEFINED_ │ │ │ │ │ -********** _?◆_? AALLBBEERRTTAA ********** │ │ │ │ │ -#define ALBERTA   :: │ │ │ │ │ -********** _?◆_? AALLBBEERRTTAA__DDEEBBUUGG ********** │ │ │ │ │ -#define ALBERTA_DEBUG   0 │ │ │ │ │ -********** _?◆_? DDIIMM__OOFF__WWOORRLLDD ********** │ │ │ │ │ -#define DIM_OF_WORLD   ALBERTA_DIM │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertaheader.hh Source File │ │ │ │ +dune-grid: geometrycache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,94 +74,187 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
albertaheader.hh
│ │ │ │ +
geometrycache.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTAHEADER_HH
│ │ │ │ -
6#define DUNE_ALBERTAHEADER_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │ +
6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │
7
│ │ │ │ -
8#if HAVE_ALBERTA
│ │ │ │ -
9
│ │ │ │ -
10#if not (ALBERTA_DIM > 0)
│ │ │ │ -
11 #if HEADERCHECK
│ │ │ │ -
12 #undef ALBERTA_DIM
│ │ │ │ -
13 #define ALBERTA_DIM 2
│ │ │ │ -
14 #else
│ │ │ │ -
15 #error ALBERTA_DIM should be 1, 2, or 3
│ │ │ │ -
16 #endif
│ │ │ │ -
17#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#if HAVE_ALBERTA
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 namespace Alberta
│ │ │ │ +
17 {
│ │ │ │
18
│ │ │ │ -
19// Set ALBERTA's DIM_OF_WORLD preprocessor variable
│ │ │ │ -
20#ifndef ALBERTA_DIM
│ │ │ │ -
21#error "ALBERTA_DIM needed to use AlbertaGrid."
│ │ │ │ -
22#endif
│ │ │ │ -
23#define DIM_OF_WORLD ALBERTA_DIM
│ │ │ │ -
24
│ │ │ │ -
25// if we have ALBERTA C++ lib define namespace for ALBERTA
│ │ │ │ -
26#ifdef __ALBERTApp__
│ │ │ │ -
27#define ALBERTA Alberta::
│ │ │ │ -
28#else
│ │ │ │ -
29#define ALBERTA ::
│ │ │ │ -
30#endif
│ │ │ │ -
31
│ │ │ │ -
32#ifndef ALBERTA_DEBUG
│ │ │ │ -
33#define ALBERTA_DEBUG 0
│ │ │ │ -
34#endif
│ │ │ │ -
35
│ │ │ │ -
36// MAX, MIN, and ABS are defined macros of ALBERTA
│ │ │ │ -
37// if they are not defined elsewhere, they are undefined here
│ │ │ │ -
38#ifndef MAX
│ │ │ │ -
39#define _MAX_NOT_DEFINED_
│ │ │ │ -
40#endif
│ │ │ │ -
41
│ │ │ │ -
42#ifndef MIN
│ │ │ │ -
43#define _MIN_NOT_DEFINED_
│ │ │ │ -
44#endif
│ │ │ │ -
45
│ │ │ │ -
46#ifndef ABS
│ │ │ │ -
47#define _ABS_NOT_DEFINED_
│ │ │ │ -
48#endif
│ │ │ │ -
49
│ │ │ │ -
50#ifndef DIM_OF_WORLD
│ │ │ │ -
51#error "DIM_OF_WORLD not defined."
│ │ │ │ -
52#endif
│ │ │ │ -
53
│ │ │ │ -
54#ifdef HAVE_CONFIG_H
│ │ │ │ -
55#define ALBERTASAVE_HAVE_CONFIG_H HAVE_CONFIG_H
│ │ │ │ -
56#undef HAVE_CONFIG_H
│ │ │ │ -
57#endif
│ │ │ │ -
58
│ │ │ │ -
59#include <alberta/alberta.h>
│ │ │ │ -
60
│ │ │ │ -
61#ifdef ALBERTASAVE_HAVE_CONFIG_H
│ │ │ │ -
62#define HAVE_CONFIG_H ALBERTASAVE_HAVE_CONFIG_H
│ │ │ │ -
63#undef ALBERTASAVE_HAVE_CONFIG_H
│ │ │ │ -
64#endif
│ │ │ │ -
65
│ │ │ │ -
66#ifndef _ALBERTA_H_
│ │ │ │ -
67#error "Unable to include alberta.h."
│ │ │ │ -
68#endif
│ │ │ │ -
69
│ │ │ │ -
70// Macro nil may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
71#ifdef nil
│ │ │ │ -
72#undef nil
│ │ │ │ -
73#endif
│ │ │ │ -
74
│ │ │ │ -
75#endif // #if HAVE_ALBERTA
│ │ │ │ +
19 // GeometryCache
│ │ │ │ +
20 // -------------
│ │ │ │ +
21
│ │ │ │ +
22 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 static const unsigned int flagIntegrationElement = (1 << 0);
│ │ │ │ +
26 static const unsigned int flagJacobianTransposed = (1 << 1);
│ │ │ │ +
27 static const unsigned int flagJacobianInverseTransposed = (1 << 2);
│ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ +
30 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
│ │ │ │ +
31 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
│ │ │ │ +
32
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
34 : flags_( 0 )
│ │ │ │ +
35 {}
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ +
37 const Real &integrationElement ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ +
38 {
│ │ │ │ +
39 if( (flags_ & flagIntegrationElement) == 0 )
│ │ │ │ +
40 {
│ │ │ │ +
41 integrationElement_ = std::abs( determinant( jacobianTransposed( elInfo ) ) );
│ │ │ │ +
42 assert( integrationElement_ > 1e-14 );
│ │ │ │ +
43 flags_ |= flagIntegrationElement;
│ │ │ │ +
44 }
│ │ │ │ +
45 return integrationElement_;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 const JacobianTransposed &jacobianTransposed ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ +
49 {
│ │ │ │ +
50 if( (flags_ & flagJacobianTransposed) == 0 )
│ │ │ │ +
51 {
│ │ │ │ +
52 assert( (elInfo.fill_flag & FillFlags< dim >::coords) != 0 );
│ │ │ │ +
53 const GlobalVector &x = elInfo.coord[ 0 ];
│ │ │ │ +
54 for( int i = 0; i < dim; ++i )
│ │ │ │ +
55 {
│ │ │ │ +
56 const GlobalVector &y = elInfo.coord[ i+1 ];
│ │ │ │ +
57 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ +
58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ];
│ │ │ │ +
59 }
│ │ │ │ +
60 flags_ |= flagJacobianTransposed;
│ │ │ │ +
61 }
│ │ │ │ +
62 return jacobianTransposed_;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
66 jacobianInverseTransposed ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ +
67 {
│ │ │ │ +
68 if( (flags_ & flagJacobianInverseTransposed) == 0 )
│ │ │ │ +
69 {
│ │ │ │ +
70 integrationElement_ = std::abs( invert( jacobianTransposed( elInfo ), jacobianInverseTransposed_ ) );
│ │ │ │ +
71 assert( integrationElement_ > 1e-14 );
│ │ │ │ +
72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed;
│ │ │ │ +
73 }
│ │ │ │ +
74 return jacobianInverseTransposed_;
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │
76
│ │ │ │ -
77#endif // #ifndef DUNE_ALBERTAHEADER_HH
│ │ │ │ +
77 private:
│ │ │ │ +
78 unsigned int flags_;
│ │ │ │ +
79 Real integrationElement_;
│ │ │ │ +
80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_;
│ │ │ │ +
81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_;
│ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
84
│ │ │ │ +
85
│ │ │ │ +
86 // GeometryCacheProxy
│ │ │ │ +
87 // ------------------
│ │ │ │ +
88
│ │ │ │ +
89 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
91 {
│ │ │ │ +
92 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
│ │ │ │ +
93 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
│ │ │ │ +
94
│ │ │ │ +
│ │ │ │ +
95 GeometryCacheProxy ( GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo )
│ │ │ │ +
96 : geometryCache_( geometryCache ),
│ │ │ │ +
97 elInfo_( elInfo )
│ │ │ │ +
98 {}
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
101 {
│ │ │ │ +
102 return geometryCache_.integrationElement( elInfo_ );
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
106 {
│ │ │ │ +
107 return geometryCache_.jacobianTransposed( elInfo_ );
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 {
│ │ │ │ +
112 return geometryCache_.jacobianInverseTransposed( elInfo_ );
│ │ │ │ +
113 }
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
115 private:
│ │ │ │ +
116 GeometryCache< dim > &geometryCache_;
│ │ │ │ +
117 const ALBERTA EL_INFO &elInfo_;
│ │ │ │ +
118 };
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120 } // namespace Alberta
│ │ │ │ +
121
│ │ │ │ +
122} // namespace Dune
│ │ │ │ +
123
│ │ │ │ +
124#endif // #if HAVE_ALBERTA
│ │ │ │ +
125
│ │ │ │ +
126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition algebra.hh:30
│ │ │ │ +
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
Definition geometrycache.hh:24
│ │ │ │ +
GeometryCache()
Definition geometrycache.hh:33
│ │ │ │ +
const Real & integrationElement(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:37
│ │ │ │ +
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition geometrycache.hh:31
│ │ │ │ +
const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:48
│ │ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:66
│ │ │ │ +
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition geometrycache.hh:30
│ │ │ │ +
Definition geometrycache.hh:91
│ │ │ │ +
const JacobianTransposed & jacobianTransposed()
Definition geometrycache.hh:105
│ │ │ │ +
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition geometrycache.hh:93
│ │ │ │ +
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition geometrycache.hh:92
│ │ │ │ +
const Real & integrationElement()
Definition geometrycache.hh:100
│ │ │ │ +
GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:95
│ │ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed()
Definition geometrycache.hh:110
│ │ │ │ +
Definition misc.hh:231
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,89 +1,210 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -albertaheader.hh │ │ │ │ │ +geometrycache.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTAHEADER_HH │ │ │ │ │ -6#define DUNE_ALBERTAHEADER_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ +6#define DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#if HAVE_ALBERTA │ │ │ │ │ -9 │ │ │ │ │ -10#if not (ALBERTA_DIM > 0) │ │ │ │ │ -11 #if HEADERCHECK │ │ │ │ │ -12 #undef ALBERTA_DIM │ │ │ │ │ -13 #define ALBERTA_DIM 2 │ │ │ │ │ -14 #else │ │ │ │ │ -15 #error ALBERTA_DIM should be 1, 2, or 3 │ │ │ │ │ -16 #endif │ │ │ │ │ -17#endif │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11#if HAVE_ALBERTA │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 namespace Alberta │ │ │ │ │ +17 { │ │ │ │ │ 18 │ │ │ │ │ -19// Set ALBERTA's DIM_OF_WORLD preprocessor variable │ │ │ │ │ -20#ifndef ALBERTA_DIM │ │ │ │ │ -21#error "ALBERTA_DIM needed to use AlbertaGrid." │ │ │ │ │ -22#endif │ │ │ │ │ -_2_3#define DIM_OF_WORLD ALBERTA_DIM │ │ │ │ │ -24 │ │ │ │ │ -25// if we have ALBERTA C++ lib define namespace for ALBERTA │ │ │ │ │ -26#ifdef __ALBERTApp__ │ │ │ │ │ -27#define ALBERTA Alberta:: │ │ │ │ │ -28#else │ │ │ │ │ -_2_9#define ALBERTA :: │ │ │ │ │ -30#endif │ │ │ │ │ -31 │ │ │ │ │ -32#ifndef ALBERTA_DEBUG │ │ │ │ │ -_3_3#define ALBERTA_DEBUG 0 │ │ │ │ │ -34#endif │ │ │ │ │ -35 │ │ │ │ │ -36// MAX, MIN, and ABS are defined macros of ALBERTA │ │ │ │ │ -37// if they are not defined elsewhere, they are undefined here │ │ │ │ │ -38#ifndef MAX │ │ │ │ │ -_3_9#define _MAX_NOT_DEFINED_ │ │ │ │ │ -40#endif │ │ │ │ │ -41 │ │ │ │ │ -42#ifndef MIN │ │ │ │ │ -_4_3#define _MIN_NOT_DEFINED_ │ │ │ │ │ -44#endif │ │ │ │ │ -45 │ │ │ │ │ -46#ifndef ABS │ │ │ │ │ -_4_7#define _ABS_NOT_DEFINED_ │ │ │ │ │ -48#endif │ │ │ │ │ -49 │ │ │ │ │ -50#ifndef DIM_OF_WORLD │ │ │ │ │ -51#error "DIM_OF_WORLD not defined." │ │ │ │ │ -52#endif │ │ │ │ │ -53 │ │ │ │ │ -54#ifdef HAVE_CONFIG_H │ │ │ │ │ -55#define ALBERTASAVE_HAVE_CONFIG_H HAVE_CONFIG_H │ │ │ │ │ -56#undef HAVE_CONFIG_H │ │ │ │ │ -57#endif │ │ │ │ │ -58 │ │ │ │ │ -59#include │ │ │ │ │ -60 │ │ │ │ │ -61#ifdef ALBERTASAVE_HAVE_CONFIG_H │ │ │ │ │ -62#define HAVE_CONFIG_H ALBERTASAVE_HAVE_CONFIG_H │ │ │ │ │ -63#undef ALBERTASAVE_HAVE_CONFIG_H │ │ │ │ │ -64#endif │ │ │ │ │ -65 │ │ │ │ │ -66#ifndef _ALBERTA_H_ │ │ │ │ │ -67#error "Unable to include alberta.h." │ │ │ │ │ -68#endif │ │ │ │ │ -69 │ │ │ │ │ -70// Macro nil may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -71#ifdef nil │ │ │ │ │ -72#undef nil │ │ │ │ │ -73#endif │ │ │ │ │ -74 │ │ │ │ │ -75#endif // #if HAVE_ALBERTA │ │ │ │ │ +19 // GeometryCache │ │ │ │ │ +20 // ------------- │ │ │ │ │ +21 │ │ │ │ │ +22 template< int dim > │ │ │ │ │ +_2_3 class _G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +24 { │ │ │ │ │ +25 static const unsigned int flagIntegrationElement = (1 << 0); │ │ │ │ │ +26 static const unsigned int flagJacobianTransposed = (1 << 1); │ │ │ │ │ +27 static const unsigned int flagJacobianInverseTransposed = (1 << 2); │ │ │ │ │ +28 │ │ │ │ │ +29 public: │ │ │ │ │ +_3_0 typedef FieldMatrix< Real, dimWorld, dim > _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; │ │ │ │ │ +_3_1 typedef FieldMatrix< Real, dim, dimWorld > _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ +32 │ │ │ │ │ +_3_3 _G_e_o_m_e_t_r_y_C_a_c_h_e () │ │ │ │ │ +34 : flags_( 0 ) │ │ │ │ │ +35 {} │ │ │ │ │ +36 │ │ │ │ │ +_3_7 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ +38 { │ │ │ │ │ +39 if( (flags_ & flagIntegrationElement) == 0 ) │ │ │ │ │ +40 { │ │ │ │ │ +41 integrationElement_ = std::abs( _d_e_t_e_r_m_i_n_a_n_t( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( elInfo ) ) │ │ │ │ │ +); │ │ │ │ │ +42 assert( integrationElement_ > 1e-14 ); │ │ │ │ │ +43 flags_ |= flagIntegrationElement; │ │ │ │ │ +44 } │ │ │ │ │ +45 return integrationElement_; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_8 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _A_L_B_E_R_T_A EL_INFO &elInfo │ │ │ │ │ +) │ │ │ │ │ +49 { │ │ │ │ │ +50 if( (flags_ & flagJacobianTransposed) == 0 ) │ │ │ │ │ +51 { │ │ │ │ │ +52 assert( (elInfo.fill_flag & _F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _>_:_:_c_o_o_r_d_s) != 0 ); │ │ │ │ │ +53 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elInfo.coord[ 0 ]; │ │ │ │ │ +54 for( int i = 0; i < dim; ++i ) │ │ │ │ │ +55 { │ │ │ │ │ +56 const _G_l_o_b_a_l_V_e_c_t_o_r &y = elInfo.coord[ i+1 ]; │ │ │ │ │ +57 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ +58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ]; │ │ │ │ │ +59 } │ │ │ │ │ +60 flags_ |= flagJacobianTransposed; │ │ │ │ │ +61 } │ │ │ │ │ +62 return jacobianTransposed_; │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +65 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 & │ │ │ │ │ +_6_6 _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 _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ +67 { │ │ │ │ │ +68 if( (flags_ & flagJacobianInverseTransposed) == 0 ) │ │ │ │ │ +69 { │ │ │ │ │ +70 integrationElement_ = std::abs( _i_n_v_e_r_t( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( elInfo ), │ │ │ │ │ +jacobianInverseTransposed_ ) ); │ │ │ │ │ +71 assert( integrationElement_ > 1e-14 ); │ │ │ │ │ +72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed; │ │ │ │ │ +73 } │ │ │ │ │ +74 return jacobianInverseTransposed_; │ │ │ │ │ +75 } │ │ │ │ │ 76 │ │ │ │ │ -77#endif // #ifndef DUNE_ALBERTAHEADER_HH │ │ │ │ │ +77 private: │ │ │ │ │ +78 unsigned int flags_; │ │ │ │ │ +79 _R_e_a_l integrationElement_; │ │ │ │ │ +80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_; │ │ │ │ │ +81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_; │ │ │ │ │ +82 }; │ │ │ │ │ +83 │ │ │ │ │ +84 │ │ │ │ │ +85 │ │ │ │ │ +86 // GeometryCacheProxy │ │ │ │ │ +87 // ------------------ │ │ │ │ │ +88 │ │ │ │ │ +89 template< int dim > │ │ │ │ │ +_9_0 struct _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ +91 { │ │ │ │ │ +_9_2 typedef FieldMatrix< Real, dimWorld, dim > _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; │ │ │ │ │ +_9_3 typedef FieldMatrix< Real, dim, dimWorld > _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ +94 │ │ │ │ │ +_9_5 _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y ( _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache, const _A_L_B_E_R_T_A │ │ │ │ │ +EL_INFO &elInfo ) │ │ │ │ │ +96 : geometryCache_( geometryCache ), │ │ │ │ │ +97 elInfo_( elInfo ) │ │ │ │ │ +98 {} │ │ │ │ │ +99 │ │ │ │ │ +_1_0_0 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t () │ │ │ │ │ +101 { │ │ │ │ │ +102 return geometryCache_.integrationElement( elInfo_ ); │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_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 () │ │ │ │ │ +106 { │ │ │ │ │ +107 return geometryCache_.jacobianTransposed( elInfo_ ); │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +_1_1_0 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 () │ │ │ │ │ +111 { │ │ │ │ │ +112 return geometryCache_.jacobianInverseTransposed( elInfo_ ); │ │ │ │ │ +113 } │ │ │ │ │ +114 │ │ │ │ │ +115 private: │ │ │ │ │ +116 _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache_; │ │ │ │ │ +117 const _A_L_B_E_R_T_A EL_INFO &elInfo_; │ │ │ │ │ +118 }; │ │ │ │ │ +119 │ │ │ │ │ +120 } // namespace Alberta │ │ │ │ │ +121 │ │ │ │ │ +122} // namespace Dune │ │ │ │ │ +123 │ │ │ │ │ +124#endif // #if HAVE_ALBERTA │ │ │ │ │ +125 │ │ │ │ │ +126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_a_l_g_e_b_r_a_._h_h │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +Include standard header files. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +static K determinant(const FieldMatrix< K, 0, m > &matrix) │ │ │ │ │ +DDeeffiinniittiioonn algebra.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ │ +static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ │ +&inverse) │ │ │ │ │ +DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +GeometryCache() │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ +const Real & integrationElement(const ALBERTA EL_INFO &elInfo) │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +FieldMatrix< Real, dim, dimWorld > JacobianTransposed │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo) │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_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 │ │ │ │ │ +const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA │ │ │ │ │ +EL_INFO &elInfo) │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_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 │ │ │ │ │ +FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +const JacobianTransposed & jacobianTransposed() │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +FieldMatrix< Real, dim, dimWorld > JacobianTransposed │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_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< Real, dimWorld, dim > JacobianInverseTransposed │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ +const Real & integrationElement() │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ +GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO │ │ │ │ │ +&elInfo) │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_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() │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordcache.hh File Reference │ │ │ │ +dune-grid: agrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,41 +71,95 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
coordcache.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
agrid.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │ + │ │ │ │ +

provides the AlbertaGrid class │ │ │ │ +More...

│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <algorithm>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/stdstreams.hh>
│ │ │ │ +#include <dune/common/parallel/communication.hh>
│ │ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ │ +#include <dune/grid/common/gridfactory.hh>
│ │ │ │ +#include <dune/grid/common/adaptcallback.hh>
│ │ │ │ +#include <dune/grid/common/sizecache.hh>
│ │ │ │ +#include "albertaheader.hh"
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/capabilities.hh>
│ │ │ │ +#include <dune/grid/albertagrid/backuprestore.hh>
│ │ │ │ +#include <dune/grid/albertagrid/coordcache.hh>
│ │ │ │ +#include <dune/grid/albertagrid/gridfamily.hh>
│ │ │ │ +#include <dune/grid/albertagrid/level.hh>
│ │ │ │ +#include <dune/grid/albertagrid/intersection.hh>
│ │ │ │ +#include <dune/grid/albertagrid/intersectioniterator.hh>
│ │ │ │ +#include <dune/grid/albertagrid/datahandle.hh>
│ │ │ │ +#include <dune/grid/albertagrid/entityseed.hh>
│ │ │ │ +#include "indexsets.hh"
│ │ │ │ +#include "geometry.hh"
│ │ │ │ +#include "entity.hh"
│ │ │ │ +#include "hierarchiciterator.hh"
│ │ │ │ +#include "treeiterator.hh"
│ │ │ │ +#include "leveliterator.hh"
│ │ │ │ +#include "leafiterator.hh"
│ │ │ │ +#include "albertagrid.cc"
│ │ │ │ +#include <dune/grid/albertagrid/undefine-3.0.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Alberta::CoordCache< dim >
 
class  Dune::Alberta::CoordCache< dim >::LocalCaching
 
struct  Dune::Alberta::CoordCache< dim >::Interpolation
class  Dune::AlbertaGrid< dim, dimworld >
 [ provides Dune::Grid ] More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Macros

#define _ALBERTA_H_
 
│ │ │ │ +

Detailed Description

│ │ │ │ +

provides the AlbertaGrid class

│ │ │ │ +
Author
Robert Kloefkorn and Martin Nolte
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ _ALBERTA_H_

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define _ALBERTA_H_
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,66 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -coordcache.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ +agrid.hh File Reference │ │ │ │ │ +provides the AlbertaGrid class _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_a_d_a_p_t_c_a_l_l_b_a_c_k_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_s_i_z_e_c_a_c_h_e_._h_h> │ │ │ │ │ +#include "_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_b_a_c_k_u_p_r_e_s_t_o_r_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_c_o_o_r_d_c_a_c_h_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_r_i_d_f_a_m_i_l_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_l_e_v_e_l_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_a_t_a_h_a_n_d_l_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_n_t_i_t_y_s_e_e_d_._h_h> │ │ │ │ │ +#include "_i_n_d_e_x_s_e_t_s_._h_h" │ │ │ │ │ +#include "_g_e_o_m_e_t_r_y_._h_h" │ │ │ │ │ +#include "_e_n_t_i_t_y_._h_h" │ │ │ │ │ +#include "_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +#include "_t_r_e_e_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +#include "_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +#include "_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +#include "_a_l_b_e_r_t_a_g_r_i_d_._c_c" │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_u_n_d_e_f_i_n_e_-_3_._0_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_ _>_:_:_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_ _>_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +  [ pprroovviiddeess _DD_uu_nn_ee_::_::_GG_rr_ii_dd ] _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  ___A_L_B_E_R_T_A___H__ │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +provides the AlbertaGrid class │ │ │ │ │ + Author │ │ │ │ │ + Robert Kloefkorn and Martin Nolte │ │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? __AALLBBEERRTTAA__HH__ ********** │ │ │ │ │ +#define _ALBERTA_H_ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordcache.hh Source File │ │ │ │ +dune-grid: agrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,225 +74,849 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
coordcache.hh
│ │ │ │ +
agrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ -
6#define DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTAGRID_IMP_HH
│ │ │ │ +
6#define DUNE_ALBERTAGRID_IMP_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace Alberta
│ │ │ │ -
18 {
│ │ │ │ -
19
│ │ │ │ -
20 // CoordCache
│ │ │ │ -
21 // ----------
│ │ │ │ -
22
│ │ │ │ -
23 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29 class LocalCaching;
│ │ │ │ -
30 struct Interpolation;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
33 static const int dimension = dim;
│ │ │ │ +
13#if HAVE_ALBERTA || DOXYGEN
│ │ │ │ +
14
│ │ │ │ +
15#include <cassert>
│ │ │ │ +
16#include <cstddef>
│ │ │ │ +
17
│ │ │ │ +
18#include <algorithm>
│ │ │ │ +
19#include <iostream>
│ │ │ │ +
20#include <fstream>
│ │ │ │ +
21#include <memory>
│ │ │ │ +
22#include <vector>
│ │ │ │ +
23
│ │ │ │ +
24// Dune includes
│ │ │ │ +
25#include <dune/common/fvector.hh>
│ │ │ │ +
26#include <dune/common/fmatrix.hh>
│ │ │ │ +
27#include <dune/common/stdstreams.hh>
│ │ │ │ +
28#include <dune/common/parallel/communication.hh>
│ │ │ │ +
29
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
34
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
35//- Local includes
│ │ │ │ +
36// some cpp defines and include of alberta.h
│ │ │ │ +
37#include "albertaheader.hh"
│ │ │ │
38
│ │ │ │ -
│ │ │ │ -
39 GlobalVector &operator() ( const Element *element, int vertex ) const
│ │ │ │ -
40 {
│ │ │ │ -
41 assert( !(!coords_) );
│ │ │ │ -
42 GlobalVector *array = (GlobalVector *)coords_;
│ │ │ │ -
43 return array[ dofAccess_( element, vertex ) ];
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
46 GlobalVector &operator() ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ │ -
47 {
│ │ │ │ -
48 return (*this)( elementInfo.el(), vertex );
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
42
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
50
│ │ │ │ -
│ │ │ │ -
51 void create ( const DofNumbering &dofNumbering )
│ │ │ │ -
52 {
│ │ │ │ -
53 MeshPointer mesh = dofNumbering.mesh();
│ │ │ │ -
54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );
│ │ │ │ -
55
│ │ │ │ -
56 coords_.create( dofSpace, "Coordinate Cache" );
│ │ │ │ -
57 LocalCaching localCaching( coords_ );
│ │ │ │ - │ │ │ │ -
59 coords_.template setupInterpolation< Interpolation >();
│ │ │ │ -
60
│ │ │ │ -
61 dofAccess_ = DofAccess( dofSpace );
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
64 void release ()
│ │ │ │ -
65 {
│ │ │ │ -
66 coords_.release();
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ +
51#include "indexsets.hh"
│ │ │ │ +
52#include "geometry.hh"
│ │ │ │ +
53#include "entity.hh"
│ │ │ │ +
54#include "hierarchiciterator.hh"
│ │ │ │ +
55#include "treeiterator.hh"
│ │ │ │ +
56#include "leveliterator.hh"
│ │ │ │ +
57#include "leafiterator.hh"
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
59namespace Dune
│ │ │ │ +
60{
│ │ │ │ +
61
│ │ │ │ +
62 // External Forward Declarations
│ │ │ │ +
63 // -----------------------------
│ │ │ │ +
64
│ │ │ │ +
65 template< class Grid >
│ │ │ │ +
66 struct DGFGridFactory;
│ │ │ │ +
67
│ │ │ │
68
│ │ │ │ -
69 private:
│ │ │ │ -
70 CoordVectorPointer coords_;
│ │ │ │ -
71 DofAccess dofAccess_;
│ │ │ │ -
72 };
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74
│ │ │ │ -
75
│ │ │ │ -
76 // CoordCache::LocalCaching
│ │ │ │ -
77 // ------------------------
│ │ │ │ -
78
│ │ │ │ -
79 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
81 {
│ │ │ │ -
82 CoordVectorPointer coords_;
│ │ │ │ -
83 DofAccess dofAccess_;
│ │ │ │ -
84
│ │ │ │ -
85 public:
│ │ │ │ -
│ │ │ │ -
86 explicit LocalCaching ( const CoordVectorPointer &coords )
│ │ │ │ -
87 : coords_( coords ),
│ │ │ │ -
88 dofAccess_( coords.dofSpace() )
│ │ │ │ -
89 {}
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ -
91 void operator() ( const ElementInfo &elementInfo ) const
│ │ │ │ -
92 {
│ │ │ │ -
93 GlobalVector *array = (GlobalVector *)coords_;
│ │ │ │ -
94 for( int i = 0; i < DofAccess::numSubEntities; ++i )
│ │ │ │ -
95 {
│ │ │ │ -
96 const GlobalVector &x = elementInfo.coordinate( i );
│ │ │ │ -
97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];
│ │ │ │ -
98 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ -
99 y[ i ] = x[ i ];
│ │ │ │ -
100 }
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102 };
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
104
│ │ │ │ -
105
│ │ │ │ -
106 // CoordCache::Interpolation
│ │ │ │ -
107 // -------------------------
│ │ │ │ -
108
│ │ │ │ -
109 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 {
│ │ │ │ -
112 static const int dimension = dim;
│ │ │ │ -
113
│ │ │ │ - │ │ │ │ -
115
│ │ │ │ -
116 static void
│ │ │ │ -
│ │ │ │ -
117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch )
│ │ │ │ -
118 {
│ │ │ │ -
119 DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ │ -
120 GlobalVector *array = (GlobalVector *)dofVector;
│ │ │ │ -
121
│ │ │ │ -
122 const Element *element = patch[ 0 ];
│ │ │ │ +
69
│ │ │ │ +
70 // AlbertaGrid
│ │ │ │ +
71 // -----------
│ │ │ │ +
72
│ │ │ │ +
105 template< int dim, int dimworld = Alberta::dimWorld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
│ │ │ │ +
109 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
113 Base;
│ │ │ │ +
114
│ │ │ │ +
115 template< int, int, class > friend class AlbertaGridEntity;
│ │ │ │ +
116 template< class > friend class AlbertaLevelGridView;
│ │ │ │ +
117 template< class > friend class AlbertaLeafGridView;
│ │ │ │ +
118 template< int, class, bool > friend class AlbertaGridTreeIterator;
│ │ │ │ +
119 template< class > friend class AlbertaGridHierarchicIterator;
│ │ │ │ +
120
│ │ │ │ +
121 friend class GridFactory< This >;
│ │ │ │ +
122 friend struct DGFGridFactory< This >;
│ │ │ │
123
│ │ │ │ -
124 // new vertex is always the last one
│ │ │ │ -
125 assert( element->child[ 0 ] != NULL );
│ │ │ │ -
126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension ) ];
│ │ │ │ -
127
│ │ │ │ -
128 if( element->new_coord != NULL )
│ │ │ │ -
129 {
│ │ │ │ -
130 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ -
131 newCoord[ j ] = element->new_coord[ j ];
│ │ │ │ -
132 }
│ │ │ │ -
133 else
│ │ │ │ -
134 {
│ │ │ │ -
135 // new coordinate is the average of of old ones on the same edge
│ │ │ │ -
136 // refinement edge is always between vertices 0 and 1
│ │ │ │ -
137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
│ │ │ │ -
138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
│ │ │ │ -
139 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ -
140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
│ │ │ │ -
141 }
│ │ │ │ -
142 }
│ │ │ │ -
│ │ │ │ -
143 };
│ │ │ │ -
│ │ │ │ +
124 friend class AlbertaGridIntersectionBase< const This >;
│ │ │ │ +
125 friend class AlbertaGridLeafIntersection< const This >;
│ │ │ │ +
126
│ │ │ │ +
127 friend class AlbertaMarkerVector< dim, dimworld >;
│ │ │ │ +
128#if (__GNUC__ < 4) && !(defined __ICC)
│ │ │ │ +
129 // add additional friend decls for gcc 3.4
│ │ │ │ +
130 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<true>;
│ │ │ │ +
131 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<false>;
│ │ │ │ +
132#endif
│ │ │ │ +
133 friend class AlbertaGridIndexSet< dim, dimworld >;
│ │ │ │ + │ │ │ │ +
135
│ │ │ │ +
136 template< class, class >
│ │ │ │ + │ │ │ │ +
138
│ │ │ │ +
139 public:
│ │ │ │ + │ │ │ │ +
142
│ │ │ │ + │ │ │ │
144
│ │ │ │ -
145 }
│ │ │ │ -
146
│ │ │ │ -
147}
│ │ │ │ -
148
│ │ │ │ -
149#endif // #if HAVE_ALBERTA
│ │ │ │ + │ │ │ │ + │ │ │ │ +
147
│ │ │ │ +
148 // the Traits
│ │ │ │ + │ │ │ │
150
│ │ │ │ -
151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
155
│ │ │ │ + │ │ │ │ +
158
│ │ │ │ + │ │ │ │ + │ │ │ │ +
163
│ │ │ │ + │ │ │ │ +
166
│ │ │ │ +
170 [[deprecated("Use Communication instead!")]]
│ │ │ │ + │ │ │ │ +
172
│ │ │ │ +
173 private:
│ │ │ │ +
175 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
│ │ │ │ +
176
│ │ │ │ +
178 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
│ │ │ │ +
179
│ │ │ │ +
181 struct AdaptationState
│ │ │ │ +
182 {
│ │ │ │ +
183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
│ │ │ │ +
184
│ │ │ │ +
185 private:
│ │ │ │ +
186 Phase phase_;
│ │ │ │ +
187 int coarsenMarked_;
│ │ │ │ +
188 int refineMarked_;
│ │ │ │ +
189
│ │ │ │ +
190 public:
│ │ │ │ +
191 AdaptationState ()
│ │ │ │ +
192 : phase_( ComputationPhase ),
│ │ │ │ +
193 coarsenMarked_( 0 ),
│ │ │ │ +
194 refineMarked_( 0 )
│ │ │ │ +
195 {}
│ │ │ │ +
196
│ │ │ │ +
197 void mark ( int count )
│ │ │ │ +
198 {
│ │ │ │ +
199 if( count < 0 )
│ │ │ │ +
200 ++coarsenMarked_;
│ │ │ │ +
201 if( count > 0 )
│ │ │ │ +
202 refineMarked_ += (2 << count);
│ │ │ │ +
203 }
│ │ │ │ +
204
│ │ │ │ +
205 void unmark ( int count )
│ │ │ │ +
206 {
│ │ │ │ +
207 if( count < 0 )
│ │ │ │ +
208 --coarsenMarked_;
│ │ │ │ +
209 if( count > 0 )
│ │ │ │ +
210 refineMarked_ -= (2 << count);
│ │ │ │ +
211 }
│ │ │ │ +
212
│ │ │ │ +
213 bool coarsen () const
│ │ │ │ +
214 {
│ │ │ │ +
215 return (coarsenMarked_ > 0);
│ │ │ │ +
216 }
│ │ │ │ +
217
│ │ │ │ +
218 int refineMarked () const
│ │ │ │ +
219 {
│ │ │ │ +
220 return refineMarked_;
│ │ │ │ +
221 }
│ │ │ │ +
222
│ │ │ │ +
223 void preAdapt ()
│ │ │ │ +
224 {
│ │ │ │ +
225 if( phase_ != ComputationPhase )
│ │ │ │ +
226 error( "preAdapt may only be called in computation phase." );
│ │ │ │ +
227 phase_ = PreAdaptationPhase;
│ │ │ │ +
228 }
│ │ │ │ +
229
│ │ │ │ +
230 void adapt ()
│ │ │ │ +
231 {
│ │ │ │ +
232 if( phase_ != PreAdaptationPhase )
│ │ │ │ +
233 error( "adapt may only be called in preadapdation phase." );
│ │ │ │ +
234 phase_ = PostAdaptationPhase;
│ │ │ │ +
235 }
│ │ │ │ +
236
│ │ │ │ +
237 void postAdapt ()
│ │ │ │ +
238 {
│ │ │ │ +
239 if( phase_ != PostAdaptationPhase )
│ │ │ │ +
240 error( "postAdapt may only be called in postadaptation phase." );
│ │ │ │ +
241 phase_ = ComputationPhase;
│ │ │ │ +
242
│ │ │ │ +
243 coarsenMarked_ = 0;
│ │ │ │ +
244 refineMarked_ = 0;
│ │ │ │ +
245 }
│ │ │ │ +
246
│ │ │ │ +
247 private:
│ │ │ │ +
248 void error ( const std::string &message )
│ │ │ │ +
249 {
│ │ │ │ + │ │ │ │ +
251 }
│ │ │ │ +
252 };
│ │ │ │ +
253
│ │ │ │ +
254 template< class DataHandler >
│ │ │ │ +
255 struct AdaptationCallback;
│ │ │ │ +
256
│ │ │ │ +
257 // max number of allowed levels is 64
│ │ │ │ +
258 static const int MAXL = 64;
│ │ │ │ +
259
│ │ │ │ +
260 typedef Alberta::ElementInfo< dimension > ElementInfo;
│ │ │ │ +
261 typedef Alberta::MeshPointer< dimension > MeshPointer;
│ │ │ │ + │ │ │ │ +
263 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
│ │ │ │ +
264
│ │ │ │ +
265 public:
│ │ │ │ +
266 AlbertaGrid ( const This & ) = delete;
│ │ │ │ +
267 This &operator= ( const This & ) = delete;
│ │ │ │ +
268
│ │ │ │ +
270 AlbertaGrid ();
│ │ │ │ +
271
│ │ │ │ + │ │ │ │ +
278 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
│ │ │ │ +
279 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
│ │ │ │ +
280
│ │ │ │ +
281 template< class Proj, class Impl >
│ │ │ │ + │ │ │ │ +
283 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
│ │ │ │ +
284
│ │ │ │ +
289 AlbertaGrid ( const std::string &macroGridFileName );
│ │ │ │ +
290
│ │ │ │ +
292 ~AlbertaGrid ();
│ │ │ │ +
293
│ │ │ │ +
296 int maxLevel () const;
│ │ │ │ +
297
│ │ │ │ +
299 template<int cd, PartitionIteratorType pitype>
│ │ │ │ +
300 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
│ │ │ │ +
301 lbegin (int level) const;
│ │ │ │ +
302
│ │ │ │ +
304 template<int cd, PartitionIteratorType pitype>
│ │ │ │ +
305 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
│ │ │ │ +
306 lend (int level) const;
│ │ │ │ +
307
│ │ │ │ +
309 template< int codim >
│ │ │ │ + │ │ │ │ +
311 lbegin ( int level ) const;
│ │ │ │ +
312
│ │ │ │ +
314 template< int codim >
│ │ │ │ + │ │ │ │ +
316 lend ( int level ) const;
│ │ │ │ +
317
│ │ │ │ +
319 template< int codim, PartitionIteratorType pitype >
│ │ │ │ +
320 typename Traits
│ │ │ │ +
321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
322 leafbegin () const;
│ │ │ │ +
323
│ │ │ │ +
325 template< int codim, PartitionIteratorType pitype >
│ │ │ │ +
326 typename Traits
│ │ │ │ +
327 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
328 leafend () const;
│ │ │ │ +
329
│ │ │ │ +
331 template< int codim >
│ │ │ │ + │ │ │ │ +
333 leafbegin () const;
│ │ │ │ +
334
│ │ │ │ +
336 template< int codim >
│ │ │ │ + │ │ │ │ +
338 leafend () const;
│ │ │ │ +
339
│ │ │ │ +
344 int size (int level, int codim) const;
│ │ │ │ +
345
│ │ │ │ +
347 int size (int level, GeometryType type) const;
│ │ │ │ +
348
│ │ │ │ +
350 int size (int codim) const;
│ │ │ │ +
351
│ │ │ │ +
353 int size (GeometryType type) const;
│ │ │ │ +
354
│ │ │ │ +
│ │ │ │ +
356 std::size_t numBoundarySegments () const
│ │ │ │ +
357 {
│ │ │ │ +
358 return numBoundarySegments_;
│ │ │ │ +
359 }
│ │ │ │ +
│ │ │ │ +
360
│ │ │ │ +
│ │ │ │ +
362 typename Traits::LevelGridView levelGridView ( int level ) const
│ │ │ │ +
363 {
│ │ │ │ +
364 typedef typename Traits::LevelGridView View;
│ │ │ │ +
365 typedef typename View::GridViewImp ViewImp;
│ │ │ │ +
366 return View( ViewImp( *this, level ) );
│ │ │ │ +
367 }
│ │ │ │ +
│ │ │ │ +
368
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
371 {
│ │ │ │ +
372 typedef typename Traits::LeafGridView View;
│ │ │ │ +
373 typedef typename View::GridViewImp ViewImp;
│ │ │ │ +
374 return View( ViewImp( *this ) );
│ │ │ │ +
375 }
│ │ │ │ +
│ │ │ │ +
376
│ │ │ │ +
377 public:
│ │ │ │ +
378 //***************************************************************
│ │ │ │ +
379 // Interface for Adaptation
│ │ │ │ +
380 //***************************************************************
│ │ │ │ +
381 using Base::getMark;
│ │ │ │ +
382 using Base::mark;
│ │ │ │ +
383
│ │ │ │ +
385 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
│ │ │ │ +
386
│ │ │ │ +
388 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
│ │ │ │ +
389
│ │ │ │ +
391 void globalRefine ( int refCount );
│ │ │ │ +
392
│ │ │ │ +
393 template< class DataHandle >
│ │ │ │ +
394 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
│ │ │ │ +
395
│ │ │ │ +
397 bool adapt ();
│ │ │ │ +
398
│ │ │ │ +
400 template< class DataHandle >
│ │ │ │ + │ │ │ │ +
402
│ │ │ │ +
404 bool preAdapt ();
│ │ │ │ +
405
│ │ │ │ +
407 void postAdapt();
│ │ │ │ +
408
│ │ │ │ +
│ │ │ │ +
411 const Communication &comm () const
│ │ │ │ +
412 {
│ │ │ │ +
413 return comm_;
│ │ │ │ +
414 }
│ │ │ │ +
│ │ │ │ +
415
│ │ │ │ +
│ │ │ │ +
416 static std::string typeName ()
│ │ │ │ +
417 {
│ │ │ │ +
418 std::ostringstream s;
│ │ │ │ +
419 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
│ │ │ │ +
420 return s.str();
│ │ │ │ +
421 }
│ │ │ │ +
│ │ │ │ +
422
│ │ │ │ +
424 template< class EntitySeed >
│ │ │ │ +
425 typename Traits::template Codim< EntitySeed::codimension >::Entity
│ │ │ │ +
│ │ │ │ +
426 entity ( const EntitySeed &seed ) const
│ │ │ │ +
427 {
│ │ │ │ + │ │ │ │ +
429 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
│ │ │ │ +
430 }
│ │ │ │ +
│ │ │ │ +
431
│ │ │ │ +
432 //**********************************************************
│ │ │ │ +
433 // End of Interface Methods
│ │ │ │ +
434 //**********************************************************
│ │ │ │ +
436 bool writeGrid( const std::string &filename, ctype time ) const;
│ │ │ │ +
437
│ │ │ │ +
439 bool readGrid( const std::string &filename, ctype &time );
│ │ │ │ +
440
│ │ │ │ +
441 // return hierarchic index set
│ │ │ │ +
442 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
│ │ │ │ +
443
│ │ │ │ +
445 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
│ │ │ │ +
446
│ │ │ │ +
448 const typename Traits :: LeafIndexSet & leafIndexSet () const;
│ │ │ │ +
449
│ │ │ │ +
│ │ │ │ +
451 const GlobalIdSet &globalIdSet () const
│ │ │ │ +
452 {
│ │ │ │ +
453 return idSet_;
│ │ │ │ +
454 }
│ │ │ │ +
│ │ │ │ +
455
│ │ │ │ +
│ │ │ │ +
457 const LocalIdSet &localIdSet () const
│ │ │ │ +
458 {
│ │ │ │ +
459 return idSet_;
│ │ │ │ +
460 }
│ │ │ │ +
│ │ │ │ +
461
│ │ │ │ +
462 // access to mesh pointer, needed by some methods
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
464 {
│ │ │ │ +
465 return mesh_;
│ │ │ │ +
466 };
│ │ │ │ +
│ │ │ │ +
467
│ │ │ │ +
│ │ │ │ +
468 const MeshPointer &meshPointer () const
│ │ │ │ +
469 {
│ │ │ │ +
470 return mesh_;
│ │ │ │ +
471 }
│ │ │ │ +
│ │ │ │ +
472
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
474 {
│ │ │ │ +
475 return dofNumbering_;
│ │ │ │ +
476 }
│ │ │ │ +
│ │ │ │ +
477
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
479 {
│ │ │ │ +
480 return levelProvider_;
│ │ │ │ +
481 }
│ │ │ │ +
│ │ │ │ +
482
│ │ │ │ +
│ │ │ │ +
483 int dune2alberta ( int codim, int i ) const
│ │ │ │ +
484 {
│ │ │ │ +
485 return numberingMap_.dune2alberta( codim, i );
│ │ │ │ +
486 }
│ │ │ │ +
│ │ │ │ +
487
│ │ │ │ +
│ │ │ │ +
488 int alberta2dune ( int codim, int i ) const
│ │ │ │ +
489 {
│ │ │ │ +
490 return numberingMap_.alberta2dune( codim, i );
│ │ │ │ +
491 }
│ │ │ │ +
│ │ │ │ +
492
│ │ │ │ +
│ │ │ │ +
493 int generic2alberta ( int codim, int i ) const
│ │ │ │ +
494 {
│ │ │ │ +
495 return genericNumberingMap_.dune2alberta( codim, i );
│ │ │ │ +
496 }
│ │ │ │ +
│ │ │ │ +
497
│ │ │ │ +
│ │ │ │ +
498 int alberta2generic ( int codim, int i ) const
│ │ │ │ +
499 {
│ │ │ │ +
500 return genericNumberingMap_.alberta2dune( codim, i );
│ │ │ │ +
501 }
│ │ │ │ +
│ │ │ │ +
502
│ │ │ │ +
503 private:
│ │ │ │ +
504 typedef std::vector<int> ArrayType;
│ │ │ │ +
505
│ │ │ │ +
506 void setup ();
│ │ │ │ +
507
│ │ │ │ +
508 // make the calculation of indexOnLevel and so on.
│ │ │ │ +
509 // extra method because of Reihenfolge
│ │ │ │ +
510 void calcExtras();
│ │ │ │ +
511
│ │ │ │ +
512 private:
│ │ │ │ +
513 // delete mesh and all vectors
│ │ │ │ +
514 void removeMesh();
│ │ │ │ +
515
│ │ │ │ +
516 //***********************************************************************
│ │ │ │ +
517 // MemoryManagement for Entitys and Geometrys
│ │ │ │ +
518 //**********************************************************************
│ │ │ │ + │ │ │ │ + │ │ │ │ +
521
│ │ │ │ +
522 public:
│ │ │ │ + │ │ │ │ +
524
│ │ │ │ +
525 template< int codim >
│ │ │ │ +
526 static int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
528 {
│ │ │ │ +
529 return entity.impl().twist();
│ │ │ │ +
530 }
│ │ │ │ +
│ │ │ │ +
531
│ │ │ │ +
532 template< int codim >
│ │ │ │ +
533 static int
│ │ │ │ +
│ │ │ │ +
534 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
│ │ │ │ +
535 {
│ │ │ │ +
536 return entity.impl().template twist< codim >( subEntity );
│ │ │ │ +
537 }
│ │ │ │ +
│ │ │ │ +
538
│ │ │ │ +
539 static int
│ │ │ │ +
│ │ │ │ +
540 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
│ │ │ │ +
541 {
│ │ │ │ +
542 return intersection.impl().twistInInside();
│ │ │ │ +
543 }
│ │ │ │ +
│ │ │ │ +
544
│ │ │ │ +
545 static int
│ │ │ │ +
│ │ │ │ +
546 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
│ │ │ │ +
547 {
│ │ │ │ +
548 return intersection.impl().twistInOutside();
│ │ │ │ +
549 }
│ │ │ │ +
│ │ │ │ +
550
│ │ │ │ +
551 public:
│ │ │ │ +
552 // read global element number from elNumbers_
│ │ │ │ + │ │ │ │ +
554 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
│ │ │ │ +
555
│ │ │ │ +
556 private:
│ │ │ │ +
557 // pointer to an Albert Mesh, which contains the data
│ │ │ │ +
558 MeshPointer mesh_;
│ │ │ │ +
559
│ │ │ │ +
560 // communication
│ │ │ │ +
561 Communication comm_;
│ │ │ │ +
562
│ │ │ │ +
563 // maximum level of the mesh
│ │ │ │ +
564 int maxlevel_;
│ │ │ │ +
565
│ │ │ │ +
566 // number of boundary segments within the macro grid
│ │ │ │ +
567 size_t numBoundarySegments_;
│ │ │ │ +
568
│ │ │ │ +
569 // map between ALBERTA and DUNE numbering
│ │ │ │ + │ │ │ │ + │ │ │ │ +
572
│ │ │ │ +
573 DofNumbering dofNumbering_;
│ │ │ │ +
574
│ │ │ │ +
575 LevelProvider levelProvider_;
│ │ │ │ +
576
│ │ │ │ +
577 // hierarchical numbering of AlbertaGrid, unique per codim
│ │ │ │ +
578 HierarchicIndexSet hIndexSet_;
│ │ │ │ +
579
│ │ │ │ +
580 // the id set of this grid
│ │ │ │ +
581 IdSetImp idSet_;
│ │ │ │ +
582
│ │ │ │ +
583 // the level index set, is generated from the HierarchicIndexSet
│ │ │ │ +
584 // is generated, when accessed
│ │ │ │ +
585 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
│ │ │ │ +
586
│ │ │ │ +
587 // the leaf index set, is generated from the HierarchicIndexSet
│ │ │ │ +
588 // is generated, when accessed
│ │ │ │ +
589 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
│ │ │ │ +
590
│ │ │ │ +
591 SizeCache< This > sizeCache_;
│ │ │ │ +
592
│ │ │ │ +
593 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
│ │ │ │ +
594
│ │ │ │ +
595 // needed for VertexIterator, mark on which element a vertex is treated
│ │ │ │ +
596 mutable MarkerVector leafMarkerVector_;
│ │ │ │ +
597
│ │ │ │ +
598 // needed for VertexIterator, mark on which element a vertex is treated
│ │ │ │ +
599 mutable std::vector< MarkerVector > levelMarkerVector_;
│ │ │ │ +
600
│ │ │ │ +
601#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ + │ │ │ │ +
603#endif
│ │ │ │ +
604
│ │ │ │ +
605 // current state of adaptation
│ │ │ │ +
606 AdaptationState adaptationState_;
│ │ │ │ +
607 };
│ │ │ │ +
│ │ │ │ +
608
│ │ │ │ +
609} // namespace Dune
│ │ │ │ +
│ │ │ │ +
610
│ │ │ │ +
611#include "albertagrid.cc"
│ │ │ │ +
612
│ │ │ │ +
613// undef all dangerous defines
│ │ │ │ +
614#undef DIM
│ │ │ │ +
615#undef DIM_OF_WORLD
│ │ │ │ +
616
│ │ │ │ +
617#ifdef _ABS_NOT_DEFINED_
│ │ │ │ +
618#undef ABS
│ │ │ │ +
619#endif
│ │ │ │ +
620
│ │ │ │ +
621#ifdef _MIN_NOT_DEFINED_
│ │ │ │ +
622#undef MIN
│ │ │ │ +
623#endif
│ │ │ │ +
624
│ │ │ │ +
625#ifdef _MAX_NOT_DEFINED_
│ │ │ │ +
626#undef MAX
│ │ │ │ +
627#endif
│ │ │ │ +
628
│ │ │ │ +
629#ifdef obstack_chunk_alloc
│ │ │ │ +
630#undef obstack_chunk_alloc
│ │ │ │ +
631#endif
│ │ │ │ +
632#ifdef obstack_chunk_free
│ │ │ │ +
633#undef obstack_chunk_free
│ │ │ │ +
634#endif
│ │ │ │ + │ │ │ │ +
636
│ │ │ │ +
637// We use MEM_ALLOC, so undefine it here.
│ │ │ │ +
638#undef MEM_ALLOC
│ │ │ │ +
639
│ │ │ │ +
640// We use MEM_REALLOC, so undefine it here.
│ │ │ │ +
641#undef MEM_REALLOC
│ │ │ │ +
642
│ │ │ │ +
643// We use MEM_CALLOC, so undefine it here.
│ │ │ │ +
644#undef MEM_CALLOC
│ │ │ │ +
645
│ │ │ │ +
646// We use MEM_FREE, so undefine it here.
│ │ │ │ +
647#undef MEM_FREE
│ │ │ │ +
648
│ │ │ │ +
649// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
650#ifdef ERROR
│ │ │ │ +
651#undef ERROR
│ │ │ │ +
652#endif // #ifdef ERROR
│ │ │ │ +
653
│ │ │ │ +
654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
655#ifdef ERROR_EXIT
│ │ │ │ +
656#undef ERROR_EXIT
│ │ │ │ +
657#endif // #ifdef ERROR_EXIT
│ │ │ │ +
658
│ │ │ │ +
659// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
660#ifdef WARNING
│ │ │ │ +
661#undef WARNING
│ │ │ │ +
662#endif // #ifdef WARNING
│ │ │ │ +
663
│ │ │ │ +
664// Macro TEST may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
665#ifdef TEST
│ │ │ │ +
666#undef TEST
│ │ │ │ +
667#endif // #ifdef TEST
│ │ │ │ +
668
│ │ │ │ +
669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
670#ifdef TEST_EXIT
│ │ │ │ +
671#undef TEST_EXIT
│ │ │ │ +
672#endif // #ifdef TEST_EXIT
│ │ │ │ +
673
│ │ │ │ +
674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
675#ifdef DEBUG_TEST
│ │ │ │ +
676#undef DEBUG_TEST
│ │ │ │ +
677#endif // #ifdef DEBUG_TEST
│ │ │ │ +
678
│ │ │ │ +
679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
680#ifdef DEBUG_TEST_EXIT
│ │ │ │ +
681#undef DEBUG_TEST_EXIT
│ │ │ │ +
682#endif // #ifdef DEBUG_TEST_EXIT
│ │ │ │ +
683
│ │ │ │ +
684// Macro INFO may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
685#ifdef INFO
│ │ │ │ +
686#undef INFO
│ │ │ │ +
687#endif // #ifdef INFO
│ │ │ │ +
688
│ │ │ │ +
689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
690#ifdef PRINT_INFO
│ │ │ │ +
691#undef PRINT_INFO
│ │ │ │ +
692#endif // #ifdef PRINT_INFO
│ │ │ │ +
693
│ │ │ │ +
694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
695#ifdef PRINT_INT_VEC
│ │ │ │ +
696#undef PRINT_INT_VEC
│ │ │ │ +
697#endif // #ifdef PRINT_INT_VEC
│ │ │ │ +
698
│ │ │ │ +
699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
700#ifdef PRINT_REAL_VEC
│ │ │ │ +
701#undef PRINT_REAL_VEC
│ │ │ │ +
702#endif // #ifdef PRINT_REAL_VEC
│ │ │ │ +
703
│ │ │ │ +
704// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
705#ifdef WAIT
│ │ │ │ +
706#undef WAIT
│ │ │ │ +
707#endif // #ifdef WAIT
│ │ │ │ +
708
│ │ │ │ +
709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
710#ifdef WAIT_REALLY
│ │ │ │ +
711#undef WAIT_REALLY
│ │ │ │ +
712#endif // #ifdef WAIT_REALLY
│ │ │ │ +
713
│ │ │ │ +
714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
715#ifdef GET_WORKSPACE
│ │ │ │ +
716#undef GET_WORKSPACE
│ │ │ │ +
717#endif // #ifdef GET_WORKSPACE
│ │ │ │ +
718
│ │ │ │ +
719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
720#ifdef FREE_WORKSPACE
│ │ │ │ +
721#undef FREE_WORKSPACE
│ │ │ │ +
722#endif // #ifdef FREE_WORKSPACE
│ │ │ │ +
723
│ │ │ │ +
724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
725#ifdef MAT_ALLOC
│ │ │ │ +
726#undef MAT_ALLOC
│ │ │ │ +
727#endif // #ifdef MAT_ALLOC
│ │ │ │ +
728
│ │ │ │ +
729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
730#ifdef MAT_FREE
│ │ │ │ +
731#undef MAT_FREE
│ │ │ │ +
732#endif // #ifdef MAT_FREE
│ │ │ │ +
733
│ │ │ │ +
734// Macro NAME may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
735#ifdef NAME
│ │ │ │ +
736#undef NAME
│ │ │ │ +
737#endif // #ifdef NAME
│ │ │ │ +
738
│ │ │ │ +
739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
740#ifdef GET_STRUCT
│ │ │ │ +
741#undef GET_STRUCT
│ │ │ │ +
742#endif // #ifdef GET_STRUCT
│ │ │ │ +
743
│ │ │ │ +
744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
745#ifdef ADD_PARAMETER
│ │ │ │ +
746#undef ADD_PARAMETER
│ │ │ │ +
747#endif // #ifdef ADD_PARAMETER
│ │ │ │ +
748
│ │ │ │ +
749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
750#ifdef GET_PARAMETER
│ │ │ │ +
751#undef GET_PARAMETER
│ │ │ │ +
752#endif // #ifdef GET_PARAMETER
│ │ │ │ +
753
│ │ │ │ +
754#define _ALBERTA_H_
│ │ │ │ +
755
│ │ │ │ +
756#endif // HAVE_ALBERTA || DOXYGEN
│ │ │ │ +
757
│ │ │ │ +
758#endif
│ │ │ │ +
Provides size cache classes to implement the grids size method efficiently.
│ │ │ │ +
interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Contains #undefs for all preprocessor macros defined by alberta.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │ +
bool readGrid(const std::string &filename, ctype &time)
read Grid from file filename and store time of mesh in time
Definition albertagrid.cc:585
│ │ │ │ +
const DofNumbering & dofNumbering() const
Definition agrid.hh:473
│ │ │ │ +
int generic2alberta(int codim, int i) const
Definition agrid.hh:493
│ │ │ │ +
static std::string typeName()
Definition agrid.hh:416
│ │ │ │ +
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin() const
return LeafIterator which points to first leaf entity
│ │ │ │ +
const HierarchicIndexSet & hierarchicIndexSet() const
Definition agrid.hh:442
│ │ │ │ +
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
one past the end on this level
│ │ │ │ +
static const int dimension
Definition agrid.hh:145
│ │ │ │ +
int dune2alberta(int codim, int i) const
Definition agrid.hh:483
│ │ │ │ +
Traits::Communication Communication
type of communication
Definition agrid.hh:165
│ │ │ │ +
int maxLevel() const
Definition albertagrid.cc:483
│ │ │ │ +
AlbertaGrid()
create an empty grid
Definition albertagrid.cc:42
│ │ │ │ +
Traits::template Codim< codim >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
│ │ │ │ +
const LevelProvider & levelProvider() const
Definition agrid.hh:478
│ │ │ │ +
static int getTwistInOutside(const typename Traits::LeafIntersection &intersection)
Definition agrid.hh:546
│ │ │ │ +
const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int vertex) const
Definition albertagrid.cc:471
│ │ │ │ +
Traits::template Codim< codim >::LevelIterator lend(int level) const
one past the end on this level
│ │ │ │ +
Traits::LeafGridView leafGridView() const
View for the leaf grid for All_Partition.
Definition agrid.hh:370
│ │ │ │ +
bool adapt()
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
Definition albertagrid.cc:415
│ │ │ │ +
static const int dimensionworld
Definition agrid.hh:146
│ │ │ │ +
static int getTwistInInside(const typename Traits::LeafIntersection &intersection)
Definition agrid.hh:540
│ │ │ │ +
void postAdapt()
clean up some markers
Definition albertagrid.cc:356
│ │ │ │ +
Traits::template Codim< codim >::LeafIterator leafbegin() const
return LeafIterator which points to first leaf entity
│ │ │ │ +
const LocalIdSet & localIdSet() const
return local IdSet
Definition agrid.hh:457
│ │ │ │ +
std::size_t numBoundarySegments() const
number of boundary segments within the macro grid
Definition agrid.hh:356
│ │ │ │ +
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │ +
AlbertaGrid(const This &)=delete
│ │ │ │ +
Communication CollectiveCommunication
Definition agrid.hh:171
│ │ │ │ +
Traits::template Codim< codim >::LeafIterator leafend() const
return LeafIterator which points behind last leaf entity
│ │ │ │ +
const Traits::LevelIndexSet & levelIndexSet(int level) const
return level index set for given level
Definition albertagrid.cc:520
│ │ │ │ +
int alberta2generic(int codim, int i) const
Definition agrid.hh:498
│ │ │ │ +
static int getTwist(const typename Traits::template Codim< codim >::Entity &entity)
Definition agrid.hh:527
│ │ │ │ +
const Communication & comm() const
return reference to communication, if MPI found this is specialisation for MPI
Definition agrid.hh:411
│ │ │ │ +
ALBERTA MESH * getMesh() const
Definition agrid.hh:463
│ │ │ │ +
int size(int level, int codim) const
Number of grid entities per level and codim because lbegin and lend are none const,...
Definition albertagrid.cc:490
│ │ │ │ +
Traits::HierarchicIndexSet HierarchicIndexSet
type of hierarchic index set
Definition agrid.hh:157
│ │ │ │ +
const Traits::LeafIndexSet & leafIndexSet() const
return leaf index set
Definition albertagrid.cc:535
│ │ │ │ +
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafend() const
return LeafIterator which points behind last leaf entity
│ │ │ │ +
bool writeGrid(const std::string &filename, ctype time) const
write Grid to file in Xdr
Definition albertagrid.cc:575
│ │ │ │ +
Traits::LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition agrid.hh:362
│ │ │ │ +
int alberta2dune(int codim, int i) const
Definition agrid.hh:488
│ │ │ │ +
This & operator=(const This &)=delete
│ │ │ │ +
AlbertaGridFamily< dim, dimworld >::Traits Traits
Definition agrid.hh:149
│ │ │ │ +
static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity, int subEntity)
Definition agrid.hh:534
│ │ │ │ +
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
│ │ │ │ +
const GlobalIdSet & globalIdSet() const
return global IdSet
Definition agrid.hh:451
│ │ │ │ +
void globalRefine(int refCount)
uses the interface, mark on entity and refineLocal
Definition albertagrid.cc:304
│ │ │ │ +
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
returns adaptation mark for given entity
Definition albertagrid.cc:408
│ │ │ │ +
Traits::template Codim< EntitySeed::codimension >::Entity entity(const EntitySeed &seed) const
obtain Entity from EntitySeed.
Definition agrid.hh:426
│ │ │ │ +
~AlbertaGrid()
desctructor
Definition albertagrid.cc:196
│ │ │ │ +
bool preAdapt()
returns true, if a least one element is marked for coarsening
Definition albertagrid.cc:348
│ │ │ │ +
bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition albertagrid.cc:385
│ │ │ │ +
const MeshPointer & meshPointer() const
Definition agrid.hh:468
│ │ │ │
Definition coordcache.hh:25
│ │ │ │ -
static const int dimension
Definition coordcache.hh:33
│ │ │ │ -
GlobalVector & operator()(const Element *element, int vertex) const
Definition coordcache.hh:39
│ │ │ │ -
Alberta::MeshPointer< dimension > MeshPointer
Definition coordcache.hh:36
│ │ │ │ -
void release()
Definition coordcache.hh:64
│ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition coordcache.hh:35
│ │ │ │ -
HierarchyDofNumbering< dimension > DofNumbering
Definition coordcache.hh:37
│ │ │ │ -
void create(const DofNumbering &dofNumbering)
Definition coordcache.hh:51
│ │ │ │ -
Definition coordcache.hh:81
│ │ │ │ -
LocalCaching(const CoordVectorPointer &coords)
Definition coordcache.hh:86
│ │ │ │ -
Definition coordcache.hh:111
│ │ │ │ -
Alberta::Patch< dimension > Patch
Definition coordcache.hh:114
│ │ │ │ -
static void interpolateVector(const CoordVectorPointer &dofVector, const Patch &patch)
Definition coordcache.hh:117
│ │ │ │ +
Definition albertagrid/datahandle.hh:27
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Implementation & impl()
access to the underlying implementation
Definition common/intersection.hh:178
│ │ │ │ │ │ │ │ -
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ │ - │ │ │ │ -
static const int numSubEntities
Definition dofadmin.hh:40
│ │ │ │ │ │ │ │ -
const MeshPointer & mesh() const
Definition dofadmin.hh:158
│ │ │ │ -
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ │ - │ │ │ │ -
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ │ -
void release()
Definition dofvector.hh:254
│ │ │ │ -
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ │ │ │ │ │ -
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ -
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ -
Definition misc.hh:231
│ │ │ │ -
Definition refinement.hh:40
│ │ │ │ +
Definition treeiterator.hh:189
│ │ │ │ +
Definition hierarchiciterator.hh:29
│ │ │ │ +
Definition albertagrid/intersection.hh:105
│ │ │ │ +
Definition albertagrid/intersectioniterator.hh:27
│ │ │ │ +
Definition albertagrid/entity.hh:46
│ │ │ │ +
Definition albertagrid/indexsets.hh:42
│ │ │ │ +
hierarchic index set of AlbertaGrid
Definition albertagrid/indexsets.hh:534
│ │ │ │ +
Definition albertagrid/indexsets.hh:335
│ │ │ │ +
Definition albertagrid/gridfamily.hh:83
│ │ │ │ +
static const int dimension
Definition albertagrid/gridfamily.hh:88
│ │ │ │ +
static const int dimensionworld
Definition albertagrid/gridfamily.hh:89
│ │ │ │ +
AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp
Definition albertagrid/gridfamily.hh:92
│ │ │ │ +
Alberta::Real ctype
Definition albertagrid/gridfamily.hh:86
│ │ │ │ +
Definition albertagrid/gridfamily.hh:98
│ │ │ │ +
Dune::Communication< No_Comm > Communication
Definition albertagrid/gridfamily.hh:148
│ │ │ │ +
Definition albertagrid/gridfamily.hh:117
│ │ │ │ +
Definition albertagrid/gridview.hh:80
│ │ │ │ +
Definition albertagrid/gridview.hh:299
│ │ │ │ +
Definition albertagrid/intersection.hh:32
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int alberta2dune(int codim, int i) const
Definition misc.hh:397
│ │ │ │ +
int dune2alberta(int codim, int i) const
Definition misc.hh:390
│ │ │ │ +
Definition albertagrid/projection.hh:80
│ │ │ │ +
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ +
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition adaptcallback.hh:33
│ │ │ │ +
Store a reference to an entity with a minimal memory footprint.
Definition common/entityseed.hh:26
│ │ │ │ +
Implementation & impl()
access to the underlying implementation
Definition common/entityseed.hh:59
│ │ │ │ +
Definition common/grid.hh:862
│ │ │ │ +
bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition common/grid.hh:915
│ │ │ │ +
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
Definition common/grid.hh:927
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
Definition common/grid.hh:1107
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:314
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
organizes the caching of sizes for one grid and one GeometryType
Definition sizecache.hh:33
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │ +
provides the GridFamily for AlbertaGrid
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Implementation of the IntersectionIterator for AlbertaGrid.
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,259 +1,1042 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -coordcache.hh │ │ │ │ │ +agrid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ -6#define DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTAGRID_IMP_HH │ │ │ │ │ +6#define DUNE_ALBERTAGRID_IMP_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12#if HAVE_ALBERTA │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 namespace Alberta │ │ │ │ │ -18 { │ │ │ │ │ -19 │ │ │ │ │ -20 // CoordCache │ │ │ │ │ -21 // ---------- │ │ │ │ │ -22 │ │ │ │ │ -23 template< int dim > │ │ │ │ │ -_2_4 class _C_o_o_r_d_C_a_c_h_e │ │ │ │ │ -25 { │ │ │ │ │ -26 typedef _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r; │ │ │ │ │ -27 typedef _A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _> _D_o_f_A_c_c_e_s_s; │ │ │ │ │ -28 │ │ │ │ │ -29 class _L_o_c_a_l_C_a_c_h_i_n_g; │ │ │ │ │ -30 struct _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -31 │ │ │ │ │ -32 public: │ │ │ │ │ -_3_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +13#if HAVE_ALBERTA || DOXYGEN │ │ │ │ │ +14 │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ +22#include │ │ │ │ │ +23 │ │ │ │ │ +24// Dune includes │ │ │ │ │ +25#include │ │ │ │ │ +26#include │ │ │ │ │ +27#include │ │ │ │ │ +28#include │ │ │ │ │ +29 │ │ │ │ │ +30#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +31#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +32#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_a_d_a_p_t_c_a_l_l_b_a_c_k_._h_h> │ │ │ │ │ +33#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_s_i_z_e_c_a_c_h_e_._h_h> │ │ │ │ │ 34 │ │ │ │ │ -_3_5 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -_3_6 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -_3_7 typedef _H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ │ +35//- Local includes │ │ │ │ │ +36// some cpp defines and include of alberta.h │ │ │ │ │ +37#include "_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h" │ │ │ │ │ 38 │ │ │ │ │ -_3_9 _G_l_o_b_a_l_V_e_c_t_o_r &_o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t *element, int vertex ) const │ │ │ │ │ -40 { │ │ │ │ │ -41 assert( !(!coords_) ); │ │ │ │ │ -42 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)coords_; │ │ │ │ │ -43 return array[ dofAccess_( element, vertex ) ]; │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -_4_6 _G_l_o_b_a_l_V_e_c_t_o_r &_o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int vertex ) │ │ │ │ │ -const │ │ │ │ │ -47 { │ │ │ │ │ -48 return (*this)( elementInfo._e_l(), vertex ); │ │ │ │ │ -49 } │ │ │ │ │ +39#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +40#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +41#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_b_a_c_k_u_p_r_e_s_t_o_r_e_._h_h> │ │ │ │ │ +42 │ │ │ │ │ +43#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_c_o_o_r_d_c_a_c_h_e_._h_h> │ │ │ │ │ +44#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_r_i_d_f_a_m_i_l_y_._h_h> │ │ │ │ │ +45#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_l_e_v_e_l_._h_h> │ │ │ │ │ +46#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +47#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +48#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_a_t_a_h_a_n_d_l_e_._h_h> │ │ │ │ │ +49#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_n_t_i_t_y_s_e_e_d_._h_h> │ │ │ │ │ 50 │ │ │ │ │ -_5_1 void _c_r_e_a_t_e ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering ) │ │ │ │ │ -52 { │ │ │ │ │ -53 _M_e_s_h_P_o_i_n_t_e_r mesh = dofNumbering._m_e_s_h(); │ │ │ │ │ -54 const _D_o_f_S_p_a_c_e *dofSpace = dofNumbering._d_o_f_S_p_a_c_e( _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ -55 │ │ │ │ │ -56 coords_._c_r_e_a_t_e( dofSpace, "Coordinate Cache" ); │ │ │ │ │ -57 _L_o_c_a_l_C_a_c_h_i_n_g localCaching( coords_ ); │ │ │ │ │ -58 mesh._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( localCaching, _F_i_l_l_F_l_a_g_s_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s ); │ │ │ │ │ -59 coords_.template setupInterpolation< Interpolation >(); │ │ │ │ │ -60 │ │ │ │ │ -61 dofAccess_ = _D_o_f_A_c_c_e_s_s( dofSpace ); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_4 void _r_e_l_e_a_s_e () │ │ │ │ │ -65 { │ │ │ │ │ -66 coords_._r_e_l_e_a_s_e(); │ │ │ │ │ -67 } │ │ │ │ │ +51#include "_i_n_d_e_x_s_e_t_s_._h_h" │ │ │ │ │ +52#include "_g_e_o_m_e_t_r_y_._h_h" │ │ │ │ │ +53#include "_e_n_t_i_t_y_._h_h" │ │ │ │ │ +54#include "_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +55#include "_t_r_e_e_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +56#include "_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +57#include "_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +58 │ │ │ │ │ +_5_9namespace _D_u_n_e │ │ │ │ │ +60{ │ │ │ │ │ +61 │ │ │ │ │ +62 // External Forward Declarations │ │ │ │ │ +63 // ----------------------------- │ │ │ │ │ +64 │ │ │ │ │ +65 template< class Grid > │ │ │ │ │ +66 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ +67 │ │ │ │ │ 68 │ │ │ │ │ -69 private: │ │ │ │ │ -70 CoordVectorPointer coords_; │ │ │ │ │ -71 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ -72 }; │ │ │ │ │ -73 │ │ │ │ │ -74 │ │ │ │ │ -75 │ │ │ │ │ -76 // CoordCache::LocalCaching │ │ │ │ │ -77 // ------------------------ │ │ │ │ │ -78 │ │ │ │ │ -79 template< int dim > │ │ │ │ │ -_8_0 class _C_o_o_r_d_C_a_c_h_e< dim >::_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ -81 { │ │ │ │ │ -82 _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r coords_; │ │ │ │ │ -83 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ -84 │ │ │ │ │ -85 public: │ │ │ │ │ -_8_6 explicit _L_o_c_a_l_C_a_c_h_i_n_g ( const _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r &coords ) │ │ │ │ │ -87 : coords_( coords ), │ │ │ │ │ -88 dofAccess_( coords.dofSpace() ) │ │ │ │ │ -89 {} │ │ │ │ │ -90 │ │ │ │ │ -_9_1 void _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ │ -92 { │ │ │ │ │ -93 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)coords_; │ │ │ │ │ -94 for( int i = 0; i < _D_o_f_A_c_c_e_s_s_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s; ++i ) │ │ │ │ │ -95 { │ │ │ │ │ -96 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elementInfo._c_o_o_r_d_i_n_a_t_e( i ); │ │ │ │ │ -97 _G_l_o_b_a_l_V_e_c_t_o_r &y = array[ dofAccess_( elementInfo._e_l(), i ) ]; │ │ │ │ │ -98 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ -99 y[ i ] = x[ i ]; │ │ │ │ │ -100 } │ │ │ │ │ -101 } │ │ │ │ │ -102 }; │ │ │ │ │ -103 │ │ │ │ │ -104 │ │ │ │ │ -105 │ │ │ │ │ -106 // CoordCache::Interpolation │ │ │ │ │ -107 // ------------------------- │ │ │ │ │ -108 │ │ │ │ │ -109 template< int dim > │ │ │ │ │ -_1_1_0 struct _C_o_o_r_d_C_a_c_h_e< dim >::_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -111 { │ │ │ │ │ -_1_1_2 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -113 │ │ │ │ │ -_1_1_4 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> _P_a_t_c_h; │ │ │ │ │ -115 │ │ │ │ │ -116 static void │ │ │ │ │ -_1_1_7 _i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r ( const _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r &dofVector, const _P_a_t_c_h &patch │ │ │ │ │ -) │ │ │ │ │ -118 { │ │ │ │ │ -119 _D_o_f_A_c_c_e_s_s dofAccess( dofVector._d_o_f_S_p_a_c_e() ); │ │ │ │ │ -120 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)dofVector; │ │ │ │ │ -121 │ │ │ │ │ -122 const _E_l_e_m_e_n_t *element = patch[ 0 ]; │ │ │ │ │ +69 │ │ │ │ │ +70 // AlbertaGrid │ │ │ │ │ +71 // ----------- │ │ │ │ │ +72 │ │ │ │ │ +105 template< int dim, int dimworld = Alberta::dimWorld > │ │ │ │ │ +_1_0_6 class _A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ +107 : public _G_r_i_d_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > > │ │ │ │ │ +109 { │ │ │ │ │ +110 typedef _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> _T_h_i_s; │ │ │ │ │ +111 typedef _G_r_i_d_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +112 < dim, dimworld, _A_l_b_e_r_t_a_:_:_R_e_a_l, _A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> > │ │ │ │ │ +113 _B_a_s_e; │ │ │ │ │ +114 │ │ │ │ │ +_1_1_5 template< int, int, class > friend class _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y; │ │ │ │ │ +_1_1_6 template< class > friend class _A_l_b_e_r_t_a_L_e_v_e_l_G_r_i_d_V_i_e_w; │ │ │ │ │ +_1_1_7 template< class > friend class _A_l_b_e_r_t_a_L_e_a_f_G_r_i_d_V_i_e_w; │ │ │ │ │ +_1_1_8 template< int, class, bool > friend class _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r; │ │ │ │ │ +_1_1_9 template< class > friend class _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +120 │ │ │ │ │ +121 friend class _G_r_i_d_F_a_c_t_o_r_y< _T_h_i_s >; │ │ │ │ │ +122 friend struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _T_h_i_s >; │ │ │ │ │ 123 │ │ │ │ │ -124 // new vertex is always the last one │ │ │ │ │ -125 assert( element->child[ 0 ] != NULL ); │ │ │ │ │ -126 _G_l_o_b_a_l_V_e_c_t_o_r &newCoord = array[ dofAccess( element->child[ 0 ], _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ -]; │ │ │ │ │ -127 │ │ │ │ │ -128 if( element->new_coord != NULL ) │ │ │ │ │ -129 { │ │ │ │ │ -130 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ -131 newCoord[ j ] = element->new_coord[ j ]; │ │ │ │ │ -132 } │ │ │ │ │ -133 else │ │ │ │ │ -134 { │ │ │ │ │ -135 // new coordinate is the average of of old ones on the same edge │ │ │ │ │ -136 // refinement edge is always between vertices 0 and 1 │ │ │ │ │ -137 const _G_l_o_b_a_l_V_e_c_t_o_r &coord0 = array[ dofAccess( element, 0 ) ]; │ │ │ │ │ -138 const _G_l_o_b_a_l_V_e_c_t_o_r &coord1 = array[ dofAccess( element, 1 ) ]; │ │ │ │ │ -139 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ -140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]); │ │ │ │ │ -141 } │ │ │ │ │ -142 } │ │ │ │ │ -143 }; │ │ │ │ │ +124 friend class _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e< _c_o_n_s_t _T_h_i_s >; │ │ │ │ │ +125 friend class _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n< _c_o_n_s_t _T_h_i_s >; │ │ │ │ │ +126 │ │ │ │ │ +127 friend class _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r< dim, dimworld >; │ │ │ │ │ +128#if (__GNUC__ < 4) && !(defined __ICC) │ │ │ │ │ +129 // add additional friend decls for gcc 3.4 │ │ │ │ │ +130 friend struct _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r< dim, dimworld >::MarkSubEntities; │ │ │ │ │ +131 _f_r_i_e_n_d _s_t_r_u_c_t _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r< dim, dimworld >::MarkSubEntities; │ │ │ │ │ +132#endif │ │ │ │ │ +133 _f_r_i_e_n_d _c_l_a_s_s _A_l_b_e_r_t_a_G_r_i_d_I_n_d_e_x_S_e_t< dim, dimworld >; │ │ │ │ │ +134 _f_r_i_e_n_d _c_l_a_s_s _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t< dim, dimworld >; │ │ │ │ │ +135 │ │ │ │ │ +136 _t_e_m_p_l_a_t_e< class, class > │ │ │ │ │ +_1_3_7 _f_r_i_e_n_d _c_l_a_s_s _A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r; │ │ │ │ │ +138 │ │ │ │ │ +139 public: │ │ │ │ │ +_1_4_1 _t_y_p_e_d_e_f _A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y< dim, dimworld > _G_r_i_d_F_a_m_i_l_y; │ │ │ │ │ +142 │ │ │ │ │ +_1_4_3 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _G_r_i_d_F_a_m_i_l_y_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ 144 │ │ │ │ │ -145 } │ │ │ │ │ -146 │ │ │ │ │ -147} │ │ │ │ │ -148 │ │ │ │ │ -149#endif // #if HAVE_ALBERTA │ │ │ │ │ +_1_4_5 _s_t_a_t_i_c _c_o_n_s_t _i_n_t _d_i_m_e_n_s_i_o_n = _G_r_i_d_F_a_m_i_l_y_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_1_4_6 _s_t_a_t_i_c _c_o_n_s_t _i_n_t _d_i_m_e_n_s_i_o_n_w_o_r_l_d = _G_r_i_d_F_a_m_i_l_y_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +147 │ │ │ │ │ +148 // the Traits │ │ │ │ │ +_1_4_9 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y< dim, dimworld >_:_:_T_r_a_i_t_s _T_r_a_i_t_s; │ │ │ │ │ 150 │ │ │ │ │ -151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ -_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ -_d_o_f_a_d_m_i_n_._h_h │ │ │ │ │ -_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ │ +_1_5_2 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_L_e_a_f_I_n_d_e_x_S_e_t _L_e_a_f_I_n_d_e_x_S_e_t; │ │ │ │ │ +_1_5_4 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_L_e_v_e_l_I_n_d_e_x_S_e_t _L_e_v_e_l_I_n_d_e_x_S_e_t; │ │ │ │ │ +155 │ │ │ │ │ +_1_5_7 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t _H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t; │ │ │ │ │ +158 │ │ │ │ │ +_1_6_0 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_G_l_o_b_a_l_I_d_S_e_t _G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +_1_6_2 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_L_o_c_a_l_I_d_S_e_t _L_o_c_a_l_I_d_S_e_t; │ │ │ │ │ +163 │ │ │ │ │ +_1_6_5 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +166 │ │ │ │ │ +170 [[deprecated("Use Communication instead!")]] │ │ │ │ │ +_1_7_1 _t_y_p_e_d_e_f _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +172 │ │ │ │ │ +173 private: │ │ │ │ │ +175 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m<0>::LeafIterator LeafIterator; │ │ │ │ │ +176 │ │ │ │ │ +178 _t_y_p_e_d_e_f _A_l_b_e_r_t_a_G_r_i_d_I_d_S_e_t _I_d_S_e_t_I_m_p; │ │ │ │ │ +179 │ │ │ │ │ +181 _s_t_r_u_c_t AdaptationState │ │ │ │ │ +182 { │ │ │ │ │ +183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase }; │ │ │ │ │ +184 │ │ │ │ │ +185 private: │ │ │ │ │ +186 Phase phase_; │ │ │ │ │ +187 int coarsenMarked_; │ │ │ │ │ +188 int refineMarked_; │ │ │ │ │ +189 │ │ │ │ │ +190 public: │ │ │ │ │ +191 AdaptationState () │ │ │ │ │ +192 : phase_( ComputationPhase ), │ │ │ │ │ +193 coarsenMarked_( 0 ), │ │ │ │ │ +194 refineMarked_( 0 ) │ │ │ │ │ +195 {} │ │ │ │ │ +196 │ │ │ │ │ +197 void mark ( int count ) │ │ │ │ │ +198 { │ │ │ │ │ +199 if( count < 0 ) │ │ │ │ │ +200 ++coarsenMarked_; │ │ │ │ │ +201 if( count > 0 ) │ │ │ │ │ +202 refineMarked_ += (2 << count); │ │ │ │ │ +203 } │ │ │ │ │ +204 │ │ │ │ │ +205 void unmark ( int count ) │ │ │ │ │ +206 { │ │ │ │ │ +207 if( count < 0 ) │ │ │ │ │ +208 --coarsenMarked_; │ │ │ │ │ +209 if( count > 0 ) │ │ │ │ │ +210 refineMarked_ -= (2 << count); │ │ │ │ │ +211 } │ │ │ │ │ +212 │ │ │ │ │ +213 bool coarsen () const │ │ │ │ │ +214 { │ │ │ │ │ +215 return (coarsenMarked_ > 0); │ │ │ │ │ +216 } │ │ │ │ │ +217 │ │ │ │ │ +218 int refineMarked () const │ │ │ │ │ +219 { │ │ │ │ │ +220 return refineMarked_; │ │ │ │ │ +221 } │ │ │ │ │ +222 │ │ │ │ │ +223 void preAdapt () │ │ │ │ │ +224 { │ │ │ │ │ +225 if( phase_ != ComputationPhase ) │ │ │ │ │ +226 error( "preAdapt may only be called in computation phase." ); │ │ │ │ │ +227 phase_ = PreAdaptationPhase; │ │ │ │ │ +228 } │ │ │ │ │ +229 │ │ │ │ │ +230 void adapt () │ │ │ │ │ +231 { │ │ │ │ │ +232 if( phase_ != PreAdaptationPhase ) │ │ │ │ │ +233 error( "adapt may only be called in preadapdation phase." ); │ │ │ │ │ +234 phase_ = PostAdaptationPhase; │ │ │ │ │ +235 } │ │ │ │ │ +236 │ │ │ │ │ +237 void postAdapt () │ │ │ │ │ +238 { │ │ │ │ │ +239 if( phase_ != PostAdaptationPhase ) │ │ │ │ │ +240 error( "postAdapt may only be called in postadaptation phase." ); │ │ │ │ │ +241 phase_ = ComputationPhase; │ │ │ │ │ +242 │ │ │ │ │ +243 coarsenMarked_ = 0; │ │ │ │ │ +244 refineMarked_ = 0; │ │ │ │ │ +245 } │ │ │ │ │ +246 │ │ │ │ │ +247 private: │ │ │ │ │ +248 void error ( const std::string &_m_e_s_s_a_g_e ) │ │ │ │ │ +249 { │ │ │ │ │ +250 _D_U_N_E___T_H_R_O_W( _I_n_v_a_l_i_d_S_t_a_t_e_E_x_c_e_p_t_i_o_n, _m_e_s_s_a_g_e ); │ │ │ │ │ +251 } │ │ │ │ │ +252 }; │ │ │ │ │ +253 │ │ │ │ │ +254 template< class DataHandler > │ │ │ │ │ +255 struct AdaptationCallback; │ │ │ │ │ +256 │ │ │ │ │ +257 // max number of allowed levels is 64 │ │ │ │ │ +258 static const int MAXL = 64; │ │ │ │ │ +259 │ │ │ │ │ +260 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> ElementInfo; │ │ │ │ │ +261 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> MeshPointer; │ │ │ │ │ +262 typedef _A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> DofNumbering; │ │ │ │ │ +263 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> LevelProvider; │ │ │ │ │ +264 │ │ │ │ │ +265 public: │ │ │ │ │ +_2_6_6 _A_l_b_e_r_t_a_G_r_i_d ( const _T_h_i_s & ) = delete; │ │ │ │ │ +_2_6_7 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = delete; │ │ │ │ │ +268 │ │ │ │ │ +270 _A_l_b_e_r_t_a_G_r_i_d (); │ │ │ │ │ +271 │ │ │ │ │ +277 _A_l_b_e_r_t_a_G_r_i_d ( const _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> &_m_a_c_r_o_D_a_t_a, │ │ │ │ │ +278 const std::shared_ptr< _D_u_n_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_w_o_r_l_d_ _> > │ │ │ │ │ +&projection │ │ │ │ │ +279 = std::shared_ptr< _D_u_n_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_w_o_r_l_d_ _> >() ); │ │ │ │ │ +280 │ │ │ │ │ +281 template< class Proj, class Impl > │ │ │ │ │ +282 _A_l_b_e_r_t_a_G_r_i_d ( const _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> &_m_a_c_r_o_D_a_t_a, │ │ │ │ │ +283 const _A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory │ │ │ │ │ +); │ │ │ │ │ +284 │ │ │ │ │ +289 _A_l_b_e_r_t_a_G_r_i_d ( const std::string &_m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e ); │ │ │ │ │ +290 │ │ │ │ │ +292 _~_A_l_b_e_r_t_a_G_r_i_d (); │ │ │ │ │ +293 │ │ │ │ │ +296 int _m_a_x_L_e_v_e_l () const; │ │ │ │ │ +297 │ │ │ │ │ +299 template │ │ │ │ │ +300 typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_c_d_>_:_:_t_e_m_p_l_a_t_e Partition:: │ │ │ │ │ +LevelIterator │ │ │ │ │ +_3_0_1 _l_b_e_g_i_n (int level) const; │ │ │ │ │ +302 │ │ │ │ │ +304 template │ │ │ │ │ +305 typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_c_d_>_:_:_t_e_m_p_l_a_t_e Partition:: │ │ │ │ │ +LevelIterator │ │ │ │ │ +_3_0_6 _l_e_n_d (int level) const; │ │ │ │ │ +307 │ │ │ │ │ +309 template< int codim > │ │ │ │ │ +310 typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_1_1 _l_b_e_g_i_n ( int level ) const; │ │ │ │ │ +312 │ │ │ │ │ +314 template< int codim > │ │ │ │ │ +315 typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_1_6 _l_e_n_d ( int level ) const; │ │ │ │ │ +317 │ │ │ │ │ +319 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +320 typename Traits │ │ │ │ │ +321 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_t_e_m_p_l_a_t_e Partition< pitype >::LeafIterator │ │ │ │ │ +_3_2_2 _l_e_a_f_b_e_g_i_n () const; │ │ │ │ │ +323 │ │ │ │ │ +325 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +326 typename Traits │ │ │ │ │ +327 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_t_e_m_p_l_a_t_e Partition< pitype >::LeafIterator │ │ │ │ │ +_3_2_8 _l_e_a_f_e_n_d () const; │ │ │ │ │ +329 │ │ │ │ │ +331 template< int codim > │ │ │ │ │ +332 typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_3_3 _l_e_a_f_b_e_g_i_n () const; │ │ │ │ │ +334 │ │ │ │ │ +336 template< int codim > │ │ │ │ │ +337 typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +_3_3_8 _l_e_a_f_e_n_d () const; │ │ │ │ │ +339 │ │ │ │ │ +344 int _s_i_z_e (int level, int _c_o_d_i_m) const; │ │ │ │ │ +345 │ │ │ │ │ +347 int _s_i_z_e (int level, GeometryType type) const; │ │ │ │ │ +348 │ │ │ │ │ +350 int _s_i_z_e (int _c_o_d_i_m) const; │ │ │ │ │ +351 │ │ │ │ │ +353 int _s_i_z_e (GeometryType type) const; │ │ │ │ │ +354 │ │ │ │ │ +_3_5_6 std::size_t _n_u_m_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s () const │ │ │ │ │ +357 { │ │ │ │ │ +358 return numBoundarySegments_; │ │ │ │ │ +359 } │ │ │ │ │ +360 │ │ │ │ │ +_3_6_2 typename _T_r_a_i_t_s_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w _l_e_v_e_l_G_r_i_d_V_i_e_w ( int level ) const │ │ │ │ │ +363 { │ │ │ │ │ +364 typedef typename _T_r_a_i_t_s_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w _V_i_e_w; │ │ │ │ │ +365 typedef typename View::GridViewImp _V_i_e_w_I_m_p; │ │ │ │ │ +366 return _V_i_e_w( _V_i_e_w_I_m_p( *this, level ) ); │ │ │ │ │ +367 } │ │ │ │ │ +368 │ │ │ │ │ +_3_7_0 typename _T_r_a_i_t_s_:_:_L_e_a_f_G_r_i_d_V_i_e_w _l_e_a_f_G_r_i_d_V_i_e_w () const │ │ │ │ │ +371 { │ │ │ │ │ +372 typedef typename _T_r_a_i_t_s_:_:_L_e_a_f_G_r_i_d_V_i_e_w _V_i_e_w; │ │ │ │ │ +373 typedef typename View::GridViewImp _V_i_e_w_I_m_p; │ │ │ │ │ +374 return _V_i_e_w( _V_i_e_w_I_m_p( *this ) ); │ │ │ │ │ +375 } │ │ │ │ │ +376 │ │ │ │ │ +377 public: │ │ │ │ │ +378 //*************************************************************** │ │ │ │ │ +379 // Interface for Adaptation │ │ │ │ │ +380 //*************************************************************** │ │ │ │ │ +381 using _B_a_s_e_:_:_g_e_t_M_a_r_k; │ │ │ │ │ +382 using _B_a_s_e_:_:_m_a_r_k; │ │ │ │ │ +383 │ │ │ │ │ +385 int _g_e_t_M_a_r_k ( const typename Traits::template Codim< 0 >::Entity &e ) │ │ │ │ │ +const; │ │ │ │ │ +386 │ │ │ │ │ +388 bool _m_a_r_k ( int refCount, const typename Traits::template Codim< 0 >:: │ │ │ │ │ +Entity &e ); │ │ │ │ │ +389 │ │ │ │ │ +391 void _g_l_o_b_a_l_R_e_f_i_n_e ( int refCount ); │ │ │ │ │ +392 │ │ │ │ │ +393 template< class DataHandle > │ │ │ │ │ +394 void _g_l_o_b_a_l_R_e_f_i_n_e ( int refCount, _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_, │ │ │ │ │ +_D_a_t_a_H_a_n_d_l_e_ _> &handle ); │ │ │ │ │ +395 │ │ │ │ │ +397 bool _a_d_a_p_t (); │ │ │ │ │ +398 │ │ │ │ │ +400 template< class DataHandle > │ │ │ │ │ +401 bool _a_d_a_p_t ( _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> &handle ); │ │ │ │ │ +402 │ │ │ │ │ +404 bool _p_r_e_A_d_a_p_t (); │ │ │ │ │ +405 │ │ │ │ │ +407 void _p_o_s_t_A_d_a_p_t(); │ │ │ │ │ +408 │ │ │ │ │ +_4_1_1 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ +412 { │ │ │ │ │ +413 return comm_; │ │ │ │ │ +414 } │ │ │ │ │ +415 │ │ │ │ │ +_4_1_6 static std::string _t_y_p_e_N_a_m_e () │ │ │ │ │ +417 { │ │ │ │ │ +418 std::ostringstream s; │ │ │ │ │ +419 s << "AlbertaGrid< " << dim << ", " << dimworld << " >"; │ │ │ │ │ +420 return s.str(); │ │ │ │ │ +421 } │ │ │ │ │ +422 │ │ │ │ │ +424 template< class EntitySeed > │ │ │ │ │ +425 typename Traits::template Codim< EntitySeed::codimension >::Entity │ │ │ │ │ +_4_2_6 _e_n_t_i_t_y ( const _E_n_t_i_t_y_S_e_e_d &seed ) const │ │ │ │ │ +427 { │ │ │ │ │ +428 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ │ +_E_n_t_i_t_y_I_m_p_l EntityImpl; │ │ │ │ │ +429 return EntityImpl( *this, seed._i_m_p_l().elementInfo( _m_e_s_h_P_o_i_n_t_e_r() ), │ │ │ │ │ +seed._i_m_p_l().subEntity() ); │ │ │ │ │ +430 } │ │ │ │ │ +431 │ │ │ │ │ +432 //********************************************************** │ │ │ │ │ +433 // End of Interface Methods │ │ │ │ │ +434 //********************************************************** │ │ │ │ │ +436 bool _w_r_i_t_e_G_r_i_d( const std::string &filename, _c_t_y_p_e time ) const; │ │ │ │ │ +437 │ │ │ │ │ +439 bool _r_e_a_d_G_r_i_d( const std::string &filename, _c_t_y_p_e &time ); │ │ │ │ │ +440 │ │ │ │ │ +441 // return hierarchic index set │ │ │ │ │ +_4_4_2 const _H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t & _h_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t () const { return hIndexSet_; │ │ │ │ │ +} │ │ │ │ │ +443 │ │ │ │ │ +445 const typename Traits :: LevelIndexSet & _l_e_v_e_l_I_n_d_e_x_S_e_t (int level) const; │ │ │ │ │ +446 │ │ │ │ │ +448 const typename Traits :: LeafIndexSet & _l_e_a_f_I_n_d_e_x_S_e_t () const; │ │ │ │ │ +449 │ │ │ │ │ +_4_5_1 const _G_l_o_b_a_l_I_d_S_e_t &_g_l_o_b_a_l_I_d_S_e_t () const │ │ │ │ │ +452 { │ │ │ │ │ +453 return idSet_; │ │ │ │ │ +454 } │ │ │ │ │ +455 │ │ │ │ │ +_4_5_7 const _L_o_c_a_l_I_d_S_e_t &_l_o_c_a_l_I_d_S_e_t () const │ │ │ │ │ +458 { │ │ │ │ │ +459 return idSet_; │ │ │ │ │ +460 } │ │ │ │ │ +461 │ │ │ │ │ +462 // access to mesh pointer, needed by some methods │ │ │ │ │ +_4_6_3 _A_L_B_E_R_T_A _M_E_S_H* _g_e_t_M_e_s_h () const │ │ │ │ │ +464 { │ │ │ │ │ +465 return mesh_; │ │ │ │ │ +466 }; │ │ │ │ │ +467 │ │ │ │ │ +_4_6_8 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h_P_o_i_n_t_e_r () const │ │ │ │ │ +469 { │ │ │ │ │ +470 return mesh_; │ │ │ │ │ +471 } │ │ │ │ │ +472 │ │ │ │ │ +_4_7_3 const _D_o_f_N_u_m_b_e_r_i_n_g &_d_o_f_N_u_m_b_e_r_i_n_g () const │ │ │ │ │ +474 { │ │ │ │ │ +475 return dofNumbering_; │ │ │ │ │ +476 } │ │ │ │ │ +477 │ │ │ │ │ +_4_7_8 const _L_e_v_e_l_P_r_o_v_i_d_e_r &_l_e_v_e_l_P_r_o_v_i_d_e_r () const │ │ │ │ │ +479 { │ │ │ │ │ +480 return levelProvider_; │ │ │ │ │ +481 } │ │ │ │ │ +482 │ │ │ │ │ +_4_8_3 int _d_u_n_e_2_a_l_b_e_r_t_a ( int _c_o_d_i_m, int i ) const │ │ │ │ │ +484 { │ │ │ │ │ +485 return numberingMap_._d_u_n_e_2_a_l_b_e_r_t_a( _c_o_d_i_m, i ); │ │ │ │ │ +486 } │ │ │ │ │ +487 │ │ │ │ │ +_4_8_8 int _a_l_b_e_r_t_a_2_d_u_n_e ( int _c_o_d_i_m, int i ) const │ │ │ │ │ +489 { │ │ │ │ │ +490 return numberingMap_._a_l_b_e_r_t_a_2_d_u_n_e( _c_o_d_i_m, i ); │ │ │ │ │ +491 } │ │ │ │ │ +492 │ │ │ │ │ +_4_9_3 int _g_e_n_e_r_i_c_2_a_l_b_e_r_t_a ( int _c_o_d_i_m, int i ) const │ │ │ │ │ +494 { │ │ │ │ │ +495 return genericNumberingMap_.dune2alberta( _c_o_d_i_m, i ); │ │ │ │ │ +496 } │ │ │ │ │ +497 │ │ │ │ │ +_4_9_8 int _a_l_b_e_r_t_a_2_g_e_n_e_r_i_c ( int _c_o_d_i_m, int i ) const │ │ │ │ │ +499 { │ │ │ │ │ +500 return genericNumberingMap_.alberta2dune( _c_o_d_i_m, i ); │ │ │ │ │ +501 } │ │ │ │ │ +502 │ │ │ │ │ +503 private: │ │ │ │ │ +504 typedef std::vector ArrayType; │ │ │ │ │ +505 │ │ │ │ │ +506 void setup (); │ │ │ │ │ +507 │ │ │ │ │ +508 // make the calculation of indexOnLevel and so on. │ │ │ │ │ +509 // extra method because of Reihenfolge │ │ │ │ │ +510 void calcExtras(); │ │ │ │ │ +511 │ │ │ │ │ +512 private: │ │ │ │ │ +513 // delete mesh and all vectors │ │ │ │ │ +514 void removeMesh(); │ │ │ │ │ +515 │ │ │ │ │ +516 //*********************************************************************** │ │ │ │ │ +517 // MemoryManagement for Entitys and Geometrys │ │ │ │ │ +518 //********************************************************************** │ │ │ │ │ +519 typedef _M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _t_y_p_e_n_a_m_e_ _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e_ _C_o_d_i_m_<_ _0_ _>_:_: │ │ │ │ │ +_E_n_t_i_t_y > │ │ │ │ │ +_5_2_0 _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ +521 │ │ │ │ │ +522 public: │ │ │ │ │ +523 friend class _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r< _c_o_n_s_t _T_h_i_s >; │ │ │ │ │ +524 │ │ │ │ │ +525 template< int codim > │ │ │ │ │ +526 static int │ │ │ │ │ +_5_2_7 _g_e_t_T_w_i_s_t ( const typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &_e_n_t_i_t_y ) │ │ │ │ │ +528 { │ │ │ │ │ +529 return _e_n_t_i_t_y.impl().twist(); │ │ │ │ │ +530 } │ │ │ │ │ +531 │ │ │ │ │ +532 template< int codim > │ │ │ │ │ +533 static int │ │ │ │ │ +_5_3_4 _g_e_t_T_w_i_s_t ( const typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_E_n_t_i_t_y &_e_n_t_i_t_y, int │ │ │ │ │ +subEntity ) │ │ │ │ │ +535 { │ │ │ │ │ +536 return _e_n_t_i_t_y.impl().template _t_w_i_s_t_<_ _c_o_d_i_m_ _>( subEntity ); │ │ │ │ │ +537 } │ │ │ │ │ +538 │ │ │ │ │ +539 static int │ │ │ │ │ +_5_4_0 _g_e_t_T_w_i_s_t_I_n_I_n_s_i_d_e ( const typename _T_r_a_i_t_s_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n &intersection ) │ │ │ │ │ +541 { │ │ │ │ │ +542 return intersection._i_m_p_l().twistInInside(); │ │ │ │ │ +543 } │ │ │ │ │ +544 │ │ │ │ │ +545 static int │ │ │ │ │ +_5_4_6 _g_e_t_T_w_i_s_t_I_n_O_u_t_s_i_d_e ( const typename _T_r_a_i_t_s_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n &intersection ) │ │ │ │ │ +547 { │ │ │ │ │ +548 return intersection._i_m_p_l().twistInOutside(); │ │ │ │ │ +549 } │ │ │ │ │ +550 │ │ │ │ │ +551 public: │ │ │ │ │ +552 // read global element number from elNumbers_ │ │ │ │ │ +553 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r & │ │ │ │ │ +554 _g_e_t_C_o_o_r_d ( const ElementInfo &elementInfo, int vertex ) const; │ │ │ │ │ +555 │ │ │ │ │ +556 private: │ │ │ │ │ +557 // pointer to an Albert Mesh, which contains the data │ │ │ │ │ +558 MeshPointer mesh_; │ │ │ │ │ +559 │ │ │ │ │ +560 // communication │ │ │ │ │ +561 _C_o_m_m_u_n_i_c_a_t_i_o_n comm_; │ │ │ │ │ +562 │ │ │ │ │ +563 // maximum level of the mesh │ │ │ │ │ +564 int maxlevel_; │ │ │ │ │ +565 │ │ │ │ │ +566 // number of boundary segments within the macro grid │ │ │ │ │ +567 size_t numBoundarySegments_; │ │ │ │ │ +568 │ │ │ │ │ +569 // map between ALBERTA and DUNE numbering │ │ │ │ │ +570 _A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_e_n_s_i_o_n_,_ _A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_ _> │ │ │ │ │ +numberingMap_; │ │ │ │ │ +571 _A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_e_n_s_i_o_n_,_ _A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_ _> │ │ │ │ │ +genericNumberingMap_; │ │ │ │ │ +572 │ │ │ │ │ +573 DofNumbering dofNumbering_; │ │ │ │ │ +574 │ │ │ │ │ +575 LevelProvider levelProvider_; │ │ │ │ │ +576 │ │ │ │ │ +577 // hierarchical numbering of AlbertaGrid, unique per codim │ │ │ │ │ +578 _H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t hIndexSet_; │ │ │ │ │ +579 │ │ │ │ │ +580 // the id set of this grid │ │ │ │ │ +581 IdSetImp idSet_; │ │ │ │ │ +582 │ │ │ │ │ +583 // the level index set, is generated from the HierarchicIndexSet │ │ │ │ │ +584 // is generated, when accessed │ │ │ │ │ +585 mutable std::vector< typename GridFamily::LevelIndexSetImp * > │ │ │ │ │ +levelIndexVec_; │ │ │ │ │ +586 │ │ │ │ │ +587 // the leaf index set, is generated from the HierarchicIndexSet │ │ │ │ │ +588 // is generated, when accessed │ │ │ │ │ +589 mutable typename _G_r_i_d_F_a_m_i_l_y_:_:_L_e_a_f_I_n_d_e_x_S_e_t_I_m_p* leafIndexSet_; │ │ │ │ │ +590 │ │ │ │ │ +591 _S_i_z_e_C_a_c_h_e_<_ _T_h_i_s_ _> sizeCache_; │ │ │ │ │ +592 │ │ │ │ │ +593 typedef _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> MarkerVector; │ │ │ │ │ +594 │ │ │ │ │ +595 // needed for VertexIterator, mark on which element a vertex is treated │ │ │ │ │ +596 mutable MarkerVector leafMarkerVector_; │ │ │ │ │ +597 │ │ │ │ │ +598 // needed for VertexIterator, mark on which element a vertex is treated │ │ │ │ │ +599 mutable std::vector< MarkerVector > levelMarkerVector_; │ │ │ │ │ +600 │ │ │ │ │ +601#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +602 _A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_<_ _d_i_m_e_n_s_i_o_n_ _> coordCache_; │ │ │ │ │ +603#endif │ │ │ │ │ +604 │ │ │ │ │ +605 // current state of adaptation │ │ │ │ │ +606 AdaptationState adaptationState_; │ │ │ │ │ +607 }; │ │ │ │ │ +608 │ │ │ │ │ +609} // namespace Dune │ │ │ │ │ +610 │ │ │ │ │ +611#include "_a_l_b_e_r_t_a_g_r_i_d_._c_c" │ │ │ │ │ +612 │ │ │ │ │ +613// undef all dangerous defines │ │ │ │ │ +614#undef DIM │ │ │ │ │ +615#undef DIM_OF_WORLD │ │ │ │ │ +616 │ │ │ │ │ +617#ifdef _ABS_NOT_DEFINED_ │ │ │ │ │ +618#undef ABS │ │ │ │ │ +619#endif │ │ │ │ │ +620 │ │ │ │ │ +621#ifdef _MIN_NOT_DEFINED_ │ │ │ │ │ +622#undef MIN │ │ │ │ │ +623#endif │ │ │ │ │ +624 │ │ │ │ │ +625#ifdef _MAX_NOT_DEFINED_ │ │ │ │ │ +626#undef MAX │ │ │ │ │ +627#endif │ │ │ │ │ +628 │ │ │ │ │ +629#ifdef obstack_chunk_alloc │ │ │ │ │ +630#undef obstack_chunk_alloc │ │ │ │ │ +631#endif │ │ │ │ │ +632#ifdef obstack_chunk_free │ │ │ │ │ +633#undef obstack_chunk_free │ │ │ │ │ +634#endif │ │ │ │ │ +635#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_u_n_d_e_f_i_n_e_-_3_._0_._h_h> │ │ │ │ │ +636 │ │ │ │ │ +637// We use MEM_ALLOC, so undefine it here. │ │ │ │ │ +638#undef MEM_ALLOC │ │ │ │ │ +639 │ │ │ │ │ +640// We use MEM_REALLOC, so undefine it here. │ │ │ │ │ +641#undef MEM_REALLOC │ │ │ │ │ +642 │ │ │ │ │ +643// We use MEM_CALLOC, so undefine it here. │ │ │ │ │ +644#undef MEM_CALLOC │ │ │ │ │ +645 │ │ │ │ │ +646// We use MEM_FREE, so undefine it here. │ │ │ │ │ +647#undef MEM_FREE │ │ │ │ │ +648 │ │ │ │ │ +649// Macro ERROR may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +650#ifdef ERROR │ │ │ │ │ +651#undef ERROR │ │ │ │ │ +652#endif // #ifdef ERROR │ │ │ │ │ +653 │ │ │ │ │ +654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +655#ifdef ERROR_EXIT │ │ │ │ │ +656#undef ERROR_EXIT │ │ │ │ │ +657#endif // #ifdef ERROR_EXIT │ │ │ │ │ +658 │ │ │ │ │ +659// Macro WARNING may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +660#ifdef WARNING │ │ │ │ │ +661#undef WARNING │ │ │ │ │ +662#endif // #ifdef WARNING │ │ │ │ │ +663 │ │ │ │ │ +664// Macro TEST may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +665#ifdef TEST │ │ │ │ │ +666#undef TEST │ │ │ │ │ +667#endif // #ifdef TEST │ │ │ │ │ +668 │ │ │ │ │ +669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +670#ifdef TEST_EXIT │ │ │ │ │ +671#undef TEST_EXIT │ │ │ │ │ +672#endif // #ifdef TEST_EXIT │ │ │ │ │ +673 │ │ │ │ │ +674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +675#ifdef DEBUG_TEST │ │ │ │ │ +676#undef DEBUG_TEST │ │ │ │ │ +677#endif // #ifdef DEBUG_TEST │ │ │ │ │ +678 │ │ │ │ │ +679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine │ │ │ │ │ +it. │ │ │ │ │ +680#ifdef DEBUG_TEST_EXIT │ │ │ │ │ +681#undef DEBUG_TEST_EXIT │ │ │ │ │ +682#endif // #ifdef DEBUG_TEST_EXIT │ │ │ │ │ +683 │ │ │ │ │ +684// Macro INFO may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +685#ifdef INFO │ │ │ │ │ +686#undef INFO │ │ │ │ │ +687#endif // #ifdef INFO │ │ │ │ │ +688 │ │ │ │ │ +689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +690#ifdef PRINT_INFO │ │ │ │ │ +691#undef PRINT_INFO │ │ │ │ │ +692#endif // #ifdef PRINT_INFO │ │ │ │ │ +693 │ │ │ │ │ +694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +695#ifdef PRINT_INT_VEC │ │ │ │ │ +696#undef PRINT_INT_VEC │ │ │ │ │ +697#endif // #ifdef PRINT_INT_VEC │ │ │ │ │ +698 │ │ │ │ │ +699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine │ │ │ │ │ +it. │ │ │ │ │ +700#ifdef PRINT_REAL_VEC │ │ │ │ │ +701#undef PRINT_REAL_VEC │ │ │ │ │ +702#endif // #ifdef PRINT_REAL_VEC │ │ │ │ │ +703 │ │ │ │ │ +704// Macro WAIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +705#ifdef WAIT │ │ │ │ │ +706#undef WAIT │ │ │ │ │ +707#endif // #ifdef WAIT │ │ │ │ │ +708 │ │ │ │ │ +709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +710#ifdef WAIT_REALLY │ │ │ │ │ +711#undef WAIT_REALLY │ │ │ │ │ +712#endif // #ifdef WAIT_REALLY │ │ │ │ │ +713 │ │ │ │ │ +714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +715#ifdef GET_WORKSPACE │ │ │ │ │ +716#undef GET_WORKSPACE │ │ │ │ │ +717#endif // #ifdef GET_WORKSPACE │ │ │ │ │ +718 │ │ │ │ │ +719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine │ │ │ │ │ +it. │ │ │ │ │ +720#ifdef FREE_WORKSPACE │ │ │ │ │ +721#undef FREE_WORKSPACE │ │ │ │ │ +722#endif // #ifdef FREE_WORKSPACE │ │ │ │ │ +723 │ │ │ │ │ +724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +725#ifdef MAT_ALLOC │ │ │ │ │ +726#undef MAT_ALLOC │ │ │ │ │ +727#endif // #ifdef MAT_ALLOC │ │ │ │ │ +728 │ │ │ │ │ +729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +730#ifdef MAT_FREE │ │ │ │ │ +731#undef MAT_FREE │ │ │ │ │ +732#endif // #ifdef MAT_FREE │ │ │ │ │ +733 │ │ │ │ │ +734// Macro NAME may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +735#ifdef NAME │ │ │ │ │ +736#undef NAME │ │ │ │ │ +737#endif // #ifdef NAME │ │ │ │ │ +738 │ │ │ │ │ +739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +740#ifdef GET_STRUCT │ │ │ │ │ +741#undef GET_STRUCT │ │ │ │ │ +742#endif // #ifdef GET_STRUCT │ │ │ │ │ +743 │ │ │ │ │ +744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +745#ifdef ADD_PARAMETER │ │ │ │ │ +746#undef ADD_PARAMETER │ │ │ │ │ +747#endif // #ifdef ADD_PARAMETER │ │ │ │ │ +748 │ │ │ │ │ +749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +750#ifdef GET_PARAMETER │ │ │ │ │ +751#undef GET_PARAMETER │ │ │ │ │ +752#endif // #ifdef GET_PARAMETER │ │ │ │ │ +753 │ │ │ │ │ +_7_5_4#define _ALBERTA_H_ │ │ │ │ │ +755 │ │ │ │ │ +756#endif // HAVE_ALBERTA || DOXYGEN │ │ │ │ │ +757 │ │ │ │ │ +758#endif │ │ │ │ │ +_s_i_z_e_c_a_c_h_e_._h_h │ │ │ │ │ +Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ +_a_d_a_p_t_c_a_l_l_b_a_c_k_._h_h │ │ │ │ │ +interfaces and wrappers needed for the callback adaptation provided by │ │ │ │ │ +AlbertaGrid and dune-ALUGrid │ │ │ │ │ +_c_o_o_r_d_c_a_c_h_e_._h_h │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_a_l_b_e_r_t_a_g_r_i_d_._c_c │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_u_n_d_e_f_i_n_e_-_3_._0_._h_h │ │ │ │ │ +Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ │ +_l_e_v_e_l_._h_h │ │ │ │ │ +_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_l_e_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ -ALBERTA EL Element │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ -ALBERTA FE_SPACE DofSpace │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ +[ provides Dune::Grid ] │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_r_e_a_d_G_r_i_d │ │ │ │ │ +bool readGrid(const std::string &filename, ctype &time) │ │ │ │ │ +read Grid from file filename and store time of mesh in time │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:585 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_d_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +const DofNumbering & dofNumbering() const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:473 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_n_e_r_i_c_2_a_l_b_e_r_t_a │ │ │ │ │ +int generic2alberta(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:493 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_t_y_p_e_N_a_m_e │ │ │ │ │ +static std::string typeName() │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:416 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_a_f_b_e_g_i_n │ │ │ │ │ +Traits::template Codim< codim >::template Partition< pitype >::LeafIterator │ │ │ │ │ +leafbegin() const │ │ │ │ │ +return LeafIterator which points to first leaf entity │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_h_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t │ │ │ │ │ +const HierarchicIndexSet & hierarchicIndexSet() const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:442 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_n_d │ │ │ │ │ +Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend │ │ │ │ │ +(int level) const │ │ │ │ │ +one past the end on this level │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_d_u_n_e_2_a_l_b_e_r_t_a │ │ │ │ │ +int dune2alberta(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:483 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Traits::Communication Communication │ │ │ │ │ +type of communication │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ +int maxLevel() const │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:483 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ +AlbertaGrid() │ │ │ │ │ +create an empty grid │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_b_e_g_i_n │ │ │ │ │ +Traits::template Codim< codim >::LevelIterator lbegin(int level) const │ │ │ │ │ +Iterator to first entity of given codim on level. │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ │ +const LevelProvider & levelProvider() const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:478 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_T_w_i_s_t_I_n_O_u_t_s_i_d_e │ │ │ │ │ +static int getTwistInOutside(const typename Traits::LeafIntersection │ │ │ │ │ +&intersection) │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:546 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_C_o_o_r_d │ │ │ │ │ +const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int │ │ │ │ │ +vertex) const │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:471 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_n_d │ │ │ │ │ +Traits::template Codim< codim >::LevelIterator lend(int level) const │ │ │ │ │ +one past the end on this level │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +Traits::LeafGridView leafGridView() const │ │ │ │ │ +View for the leaf grid for All_Partition. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:370 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_a_d_a_p_t │ │ │ │ │ +bool adapt() │ │ │ │ │ +Refine all positive marked leaf entities, coarsen all negative marked entities │ │ │ │ │ +if possible. │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:415 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static const int dimensionworld │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_T_w_i_s_t_I_n_I_n_s_i_d_e │ │ │ │ │ +static int getTwistInInside(const typename Traits::LeafIntersection │ │ │ │ │ +&intersection) │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:540 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_p_o_s_t_A_d_a_p_t │ │ │ │ │ +void postAdapt() │ │ │ │ │ +clean up some markers │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:356 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_a_f_b_e_g_i_n │ │ │ │ │ +Traits::template Codim< codim >::LeafIterator leafbegin() const │ │ │ │ │ +return LeafIterator which points to first leaf entity │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_o_c_a_l_I_d_S_e_t │ │ │ │ │ +const LocalIdSet & localIdSet() const │ │ │ │ │ +return local IdSet │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:457 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_n_u_m_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s │ │ │ │ │ +std::size_t numBoundarySegments() const │ │ │ │ │ +number of boundary segments within the macro grid │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:356 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ +GridFamily::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ +AlbertaGrid(const This &)=delete │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Communication CollectiveCommunication │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_a_f_e_n_d │ │ │ │ │ +Traits::template Codim< codim >::LeafIterator leafend() const │ │ │ │ │ +return LeafIterator which points behind last leaf entity │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_v_e_l_I_n_d_e_x_S_e_t │ │ │ │ │ +const Traits::LevelIndexSet & levelIndexSet(int level) const │ │ │ │ │ +return level index set for given level │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:520 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_a_l_b_e_r_t_a_2_g_e_n_e_r_i_c │ │ │ │ │ +int alberta2generic(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:498 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_T_w_i_s_t │ │ │ │ │ +static int getTwist(const typename Traits::template Codim< codim >::Entity │ │ │ │ │ +&entity) │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:527 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +return reference to communication, if MPI found this is specialisation for MPI │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_M_e_s_h │ │ │ │ │ +ALBERTA MESH * getMesh() const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:463 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_s_i_z_e │ │ │ │ │ +int size(int level, int codim) const │ │ │ │ │ +Number of grid entities per level and codim because lbegin and lend are none │ │ │ │ │ +const,... │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:490 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t │ │ │ │ │ +Traits::HierarchicIndexSet HierarchicIndexSet │ │ │ │ │ +type of hierarchic index set │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ +const Traits::LeafIndexSet & leafIndexSet() const │ │ │ │ │ +return leaf index set │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:535 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_a_f_e_n_d │ │ │ │ │ +Traits::template Codim< codim >::template Partition< pitype >::LeafIterator │ │ │ │ │ +leafend() const │ │ │ │ │ +return LeafIterator which points behind last leaf entity │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_w_r_i_t_e_G_r_i_d │ │ │ │ │ +bool writeGrid(const std::string &filename, ctype time) const │ │ │ │ │ +write Grid to file in Xdr │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:575 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +Traits::LevelGridView levelGridView(int level) const │ │ │ │ │ +View for a grid level for All_Partition. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:362 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_a_l_b_e_r_t_a_2_d_u_n_e │ │ │ │ │ +int alberta2dune(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:488 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &)=delete │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_T_r_a_i_t_s │ │ │ │ │ +AlbertaGridFamily< dim, dimworld >::Traits Traits │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_T_w_i_s_t │ │ │ │ │ +static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity, │ │ │ │ │ +int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:534 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_l_b_e_g_i_n │ │ │ │ │ +Traits::template Codim< cd >::template Partition< pitype >::LevelIterator │ │ │ │ │ +lbegin(int level) const │ │ │ │ │ +Iterator to first entity of given codim on level. │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +const GlobalIdSet & globalIdSet() const │ │ │ │ │ +return global IdSet │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:451 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_l_o_b_a_l_R_e_f_i_n_e │ │ │ │ │ +void globalRefine(int refCount) │ │ │ │ │ +uses the interface, mark on entity and refineLocal │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:304 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_g_e_t_M_a_r_k │ │ │ │ │ +int getMark(const typename Traits::template Codim< 0 >::Entity &e) const │ │ │ │ │ +returns adaptation mark for given entity │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:408 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_e_n_t_i_t_y │ │ │ │ │ +Traits::template Codim< EntitySeed::codimension >::Entity entity(const │ │ │ │ │ +EntitySeed &seed) const │ │ │ │ │ +obtain Entity from EntitySeed. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:426 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_~_A_l_b_e_r_t_a_G_r_i_d │ │ │ │ │ +~AlbertaGrid() │ │ │ │ │ +desctructor │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:196 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_p_r_e_A_d_a_p_t │ │ │ │ │ +bool preAdapt() │ │ │ │ │ +returns true, if a least one element is marked for coarsening │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:348 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_m_a_r_k │ │ │ │ │ +bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e) │ │ │ │ │ +Marks an entity to be refined/coarsened in a subsequent adapt. │ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:385 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_:_:_m_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +const MeshPointer & meshPointer() const │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:468 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e │ │ │ │ │ DDeeffiinniittiioonn coordcache.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -GlobalVector & operator()(const Element *element, int vertex) const │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ -HierarchyDofNumbering< dimension > DofNumbering │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_c_r_e_a_t_e │ │ │ │ │ -void create(const DofNumbering &dofNumbering) │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_L_o_c_a_l_C_a_c_h_i_n_g_:_:_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ │ -LocalCaching(const CoordVectorPointer &coords) │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_a_t_c_h │ │ │ │ │ -Alberta::Patch< dimension > Patch │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_o_r_d_C_a_c_h_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r │ │ │ │ │ -static void interpolateVector(const CoordVectorPointer &dofVector, const Patch │ │ │ │ │ -&patch) │ │ │ │ │ -DDeeffiinniittiioonn coordcache.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/datahandle.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_m_p_l │ │ │ │ │ +Implementation & impl() │ │ │ │ │ +access to the underlying implementation │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:178 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ -void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -static const int numSubEntities │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:40 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_m_e_s_h │ │ │ │ │ -const MeshPointer & mesh() const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:158 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * dofSpace(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ -const DofSpace * dofSpace() const │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ -const GlobalVector & coordinate(int vertex) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ -Element * el() const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ -DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn hierarchiciterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/entity.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/indexsets.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_d_S_e_t │ │ │ │ │ +hierarchic index set of AlbertaGrid │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/indexsets.hh:534 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/indexsets.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static const int dimensionworld │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_L_e_a_f_I_n_d_e_x_S_e_t_I_m_p │ │ │ │ │ +AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_c_t_y_p_e │ │ │ │ │ +Alberta::Real ctype │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +Dune::Communication< No_Comm > Communication │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_:_:_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridfamily.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridview.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridview.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/intersection.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_e_n_s_i_o_n_,_ _A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_a_l_b_e_r_t_a_2_d_u_n_e │ │ │ │ │ +int alberta2dune(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:397 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_:_:_d_u_n_e_2_a_l_b_e_r_t_a │ │ │ │ │ +int dune2alberta(int codim, int i) const │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +marker assigning subentities to one element containing them │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e │ │ │ │ │ +Interface class for the Grid's adapt method where the parameter is a │ │ │ │ │ +AdaptDataHandleInterface. │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +Store a reference to an entity with a minimal memory footprint. │ │ │ │ │ +DDeeffiinniittiioonn common/entityseed.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_S_e_e_d_:_:_i_m_p_l │ │ │ │ │ +Implementation & impl() │ │ │ │ │ +access to the underlying implementation │ │ │ │ │ +DDeeffiinniittiioonn common/entityseed.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:862 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_,_ _A_l_b_e_r_t_a_:_:_R_e_a_l_, │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_ _>_:_:_m_a_r_k │ │ │ │ │ +bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e) │ │ │ │ │ +Marks an entity to be refined/coarsened in a subsequent adapt. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:915 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_,_ _A_l_b_e_r_t_a_:_:_R_e_a_l_, │ │ │ │ │ +_A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_ _>_:_:_g_e_t_M_a_r_k │ │ │ │ │ +int getMark(const typename Traits::template Codim< 0 >::Entity &e) const │ │ │ │ │ +returns adaptation mark for given entity, i.e. here the default implementation │ │ │ │ │ +returns 0. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:927 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:1107 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e │ │ │ │ │ +organizes the caching of sizes for one grid and one GeometryType │ │ │ │ │ +DDeeffiinniittiioonn sizecache.hh:33 │ │ │ │ │ +_b_a_c_k_u_p_r_e_s_t_o_r_e_._h_h │ │ │ │ │ +_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ +_d_a_t_a_h_a_n_d_l_e_._h_h │ │ │ │ │ +_e_n_t_i_t_y_._h_h │ │ │ │ │ +_e_n_t_i_t_y_s_e_e_d_._h_h │ │ │ │ │ +_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ +_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +_g_r_i_d_f_a_m_i_l_y_._h_h │ │ │ │ │ +provides the GridFamily for AlbertaGrid │ │ │ │ │ +_i_n_d_e_x_s_e_t_s_._h_h │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +Implementation of the IntersectionIterator for AlbertaGrid. │ │ │ │ │ +_g_r_i_d_._h_h │ │ │ │ │ +Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: agrid.hh File Reference │ │ │ │ +dune-grid: macrodata.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,96 +70,38 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
agrid.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
macrodata.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

provides the AlbertaGrid class │ │ │ │ +

provides a wrapper for ALBERTA's macro_data structure │ │ │ │ More...

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <algorithm>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <memory>
│ │ │ │ +
#include <config.h>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/stdstreams.hh>
│ │ │ │ -#include <dune/common/parallel/communication.hh>
│ │ │ │ -#include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <dune/grid/common/adaptcallback.hh>
│ │ │ │ -#include <dune/grid/common/sizecache.hh>
│ │ │ │ -#include "albertaheader.hh"
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/capabilities.hh>
│ │ │ │ -#include <dune/grid/albertagrid/backuprestore.hh>
│ │ │ │ -#include <dune/grid/albertagrid/coordcache.hh>
│ │ │ │ -#include <dune/grid/albertagrid/gridfamily.hh>
│ │ │ │ -#include <dune/grid/albertagrid/level.hh>
│ │ │ │ -#include <dune/grid/albertagrid/intersection.hh>
│ │ │ │ -#include <dune/grid/albertagrid/intersectioniterator.hh>
│ │ │ │ -#include <dune/grid/albertagrid/datahandle.hh>
│ │ │ │ -#include <dune/grid/albertagrid/entityseed.hh>
│ │ │ │ -#include "indexsets.hh"
│ │ │ │ -#include "geometry.hh"
│ │ │ │ -#include "entity.hh"
│ │ │ │ -#include "hierarchiciterator.hh"
│ │ │ │ -#include "treeiterator.hh"
│ │ │ │ -#include "leveliterator.hh"
│ │ │ │ -#include "leafiterator.hh"
│ │ │ │ -#include "albertagrid.cc"
│ │ │ │ -#include <dune/grid/albertagrid/undefine-3.0.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::AlbertaGrid< dim, dimworld >
 [ provides Dune::Grid ] More...
 
│ │ │ │ +#include <array>
│ │ │ │ +#include <dune/grid/common/exceptions.hh>
│ │ │ │ +#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Macros

#define _ALBERTA_H_
 
namespace  Dune::Alberta
 
│ │ │ │

Detailed Description

│ │ │ │ -

provides the AlbertaGrid class

│ │ │ │ -
Author
Robert Kloefkorn and Martin Nolte
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ _ALBERTA_H_

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define _ALBERTA_H_
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +

provides a wrapper for ALBERTA's macro_data structure

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,66 +1,27 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ -agrid.hh File Reference │ │ │ │ │ -provides the AlbertaGrid class _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +macrodata.cc File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_a_d_a_p_t_c_a_l_l_b_a_c_k_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_s_i_z_e_c_a_c_h_e_._h_h> │ │ │ │ │ -#include "_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h" │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_b_a_c_k_u_p_r_e_s_t_o_r_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_c_o_o_r_d_c_a_c_h_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_r_i_d_f_a_m_i_l_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_l_e_v_e_l_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_a_t_a_h_a_n_d_l_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_n_t_i_t_y_s_e_e_d_._h_h> │ │ │ │ │ -#include "_i_n_d_e_x_s_e_t_s_._h_h" │ │ │ │ │ -#include "_g_e_o_m_e_t_r_y_._h_h" │ │ │ │ │ -#include "_e_n_t_i_t_y_._h_h" │ │ │ │ │ -#include "_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ -#include "_t_r_e_e_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ -#include "_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ -#include "_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ -#include "_a_l_b_e_r_t_a_g_r_i_d_._c_c" │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_u_n_d_e_f_i_n_e_-_3_._0_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -  [ pprroovviiddeess _DD_uu_nn_ee_::_::_GG_rr_ii_dd ] _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  ___A_L_B_E_R_T_A___H__ │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides the AlbertaGrid class │ │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ Author │ │ │ │ │ - Robert Kloefkorn and Martin Nolte │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? __AALLBBEERRTTAA__HH__ ********** │ │ │ │ │ -#define _ALBERTA_H_ │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entity.cc File Reference │ │ │ │ +dune-grid: elementinfo.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,48 +70,52 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
entity.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
elementinfo.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ +

provides a wrapper for ALBERTA's el_info structure │ │ │ │ +More...

│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/grid/albertagrid/geometrycache.hh>
│ │ │ │ +#include <dune/grid/albertagrid/macroelement.hh>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::Alberta::ElementInfo< dim >
 
struct  Dune::Alberta::ElementInfo< dim >::Instance
 
class  Dune::Alberta::ElementInfo< dim >::Stack
 
struct  Dune::Alberta::ElementInfo< dim >::Seed
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Macros

#define DUNE_ALBERTA_ENTITY_CC
 
namespace  Dune::Alberta
 
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_ALBERTA_ENTITY_CC

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define DUNE_ALBERTA_ENTITY_CC
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

provides a wrapper for ALBERTA's el_info structure

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,37 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ │ -entity.cc File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +elementinfo.hh File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_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_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -MMaaccrrooss │ │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A___E_N_T_I_T_Y___C_C │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__EENNTTIITTYY__CCCC ********** │ │ │ │ │ -#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entity.cc Source File │ │ │ │ +dune-grid: elementinfo.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,493 +74,1228 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entity.cc
│ │ │ │ +
elementinfo.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_ENTITY_CC
│ │ │ │ -
6#define DUNE_ALBERTA_ENTITY_CC
│ │ │ │ +
5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │ +
6#define DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │
7
│ │ │ │ -
8namespace Dune
│ │ │ │ -
9{
│ │ │ │ -
10
│ │ │ │ -
11 // AlbertaGridEntity (for codim > 0)
│ │ │ │ -
12 // ---------------------------------
│ │ │ │ -
13
│ │ │ │ -
14 template<int codim, int dim, class Grid>
│ │ │ │ -
15 inline AlbertaGridEntity< codim, dim, Grid >
│ │ │ │ -
│ │ │ │ -
16 ::AlbertaGridEntity ( const Grid &grid, const ElementInfo &elementInfo, int subEntity )
│ │ │ │ -
17 : grid_( &grid ),
│ │ │ │ -
18 elementInfo_( elementInfo ),
│ │ │ │ -
19 subEntity_( subEntity )
│ │ │ │ -
20 {}
│ │ │ │ -
│ │ │ │ +
13#include <cassert>
│ │ │ │ +
14#include <vector>
│ │ │ │ +
15#include <utility>
│ │ │ │ +
16
│ │ │ │ + │ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
20#if HAVE_ALBERTA
│ │ │ │
21
│ │ │ │ -
22 template<int codim, int dim, class Grid>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 : grid_( &grid ),
│ │ │ │ -
26 elementInfo_(),
│ │ │ │ -
27 subEntity_( -1 )
│ │ │ │ -
28 {}
│ │ │ │ -
│ │ │ │ -
29
│ │ │ │ -
30 template<int codim, int dim, class Grid>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 : grid_( NULL ),
│ │ │ │ -
34 elementInfo_(),
│ │ │ │ -
35 subEntity_( -1 )
│ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │ +
24
│ │ │ │ +
25 namespace Alberta
│ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 // External Forward Declarations
│ │ │ │ +
29 // -----------------------------
│ │ │ │ +
30
│ │ │ │ +
31 template< int dim >
│ │ │ │ +
32 class MeshPointer;
│ │ │ │ +
33
│ │ │ │ +
34 struct BasicNodeProjection;
│ │ │ │ +
35
│ │ │ │ +
36
│ │ │ │
37
│ │ │ │ -
38 template< int codim, int dim, class Grid >
│ │ │ │ -
39 inline PartitionType
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 return InteriorEntity;
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
45
│ │ │ │ -
46 template< int codim, int dim, class Grid >
│ │ │ │ -
47 inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
49 {
│ │ │ │ -
50 const Alberta::Element *e1 = elementInfo().el();
│ │ │ │ -
51 const Alberta::Element *e2 = other.elementInfo().el();
│ │ │ │ -
52
│ │ │ │ -
53 // if both element null then they are equal
│ │ │ │ -
54 if( (e1 == NULL) && (e2 == NULL) )
│ │ │ │ -
55 return true;
│ │ │ │ -
56 return ((e1 == e2) && (subEntity_ == other.subEntity_));
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59
│ │ │ │ -
60 template< int codim, int dim, class Grid >
│ │ │ │ -
61 inline ALBERTA EL_INFO *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
63 {
│ │ │ │ -
64 return &(elementInfo_.elInfo());
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67
│ │ │ │ -
68 template< int codim, int dim, class Grid >
│ │ │ │ -
69 inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 {
│ │ │ │ -
72 elementInfo_ = ElementInfo();
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ +
38 // ElementInfo
│ │ │ │ +
39 // -----------
│ │ │ │ +
40
│ │ │ │ +
41 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43 {
│ │ │ │ +
44 struct Instance;
│ │ │ │ +
45 class Stack;
│ │ │ │ +
46
│ │ │ │ +
47 template< int >
│ │ │ │ +
48 struct Library;
│ │ │ │ +
49
│ │ │ │ +
50 typedef Instance *InstancePtr;
│ │ │ │ +
51
│ │ │ │ +
52 public:
│ │ │ │ +
53 static const int dimension = dim;
│ │ │ │ +
54
│ │ │ │ + │ │ │ │ + │ │ │ │ +
57
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
61
│ │ │ │ +
62 static const int maxNeighbors = N_NEIGH_MAX;
│ │ │ │ +
63
│ │ │ │ +
64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;
│ │ │ │ +
65
│ │ │ │ +
66#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ + │ │ │ │ +
68#endif
│ │ │ │ +
69
│ │ │ │ +
70 struct Seed;
│ │ │ │ +
71
│ │ │ │ +
72 private:
│ │ │ │ +
73 explicit ElementInfo ( const InstancePtr &instance );
│ │ │ │
74
│ │ │ │ -
75
│ │ │ │ -
76 template< int codim, int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
78 ::setElement ( const ElementInfo &elementInfo, int subEntity )
│ │ │ │ -
79 {
│ │ │ │ -
80 elementInfo_ = elementInfo;
│ │ │ │ -
81 subEntity_ = subEntity;
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ +
75 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
78 typename FillFlags::Flags fillFlags = FillFlags::standard );
│ │ │ │ +
│ │ │ │ +
79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,
│ │ │ │ +
80 typename FillFlags::Flags fillFlags = FillFlags::standard );
│ │ │ │ +
│ │ │ │ +
81 ElementInfo ( const ElementInfo &other );
│ │ │ │ +
│ │ │ │ + │ │ │ │
83
│ │ │ │ -
84
│ │ │ │ -
85 template< int codim, int dim, class Grid >
│ │ │ │ -
86 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
85
│ │ │ │ +
│ │ │ │ + │ │ │ │
│ │ │ │ - │ │ │ │ -
88 {
│ │ │ │ -
89 setElement( other.elementInfo_, other.subEntity_ );
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92
│ │ │ │ -
93 template< int codim, int dim, class Grid >
│ │ │ │ + │ │ │ │ +
88
│ │ │ │ +
89 explicit operator bool () const { return (instance_ != null()); }
│ │ │ │ +
90
│ │ │ │ +
│ │ │ │ +
91 bool operator== ( const ElementInfo &other ) const;
│ │ │ │ +
│ │ │ │ +
92 bool operator!= ( const ElementInfo &other ) const;
│ │ │ │ +
93
│ │ │ │
│ │ │ │ - │ │ │ │ -
95 {
│ │ │ │ -
96 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ │ -
97 return elementInfo_.level();
│ │ │ │ -
98 }
│ │ │ │ -
│ │ │ │ +
94 const MacroElement &macroElement () const;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
96 int indexInFather () const;
│ │ │ │ +
│ │ │ │ +
97 ElementInfo child ( int i ) const;
│ │ │ │ +
│ │ │ │ +
98 bool isLeaf () const;
│ │ │ │
99
│ │ │ │ -
100
│ │ │ │ -
101 template< int codim, int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
104 {
│ │ │ │ - │ │ │ │ -
106
│ │ │ │ -
107 assert( elementInfo_ );
│ │ │ │ -
108 const CoordReader coordReader( grid(), elementInfo_, subEntity_ );
│ │ │ │ -
109 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
112
│ │ │ │ -
113 template< int codim, int dim, class Grid >
│ │ │ │ +
│ │ │ │ +
100 Seed seed () const;
│ │ │ │ +
101
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
104 bool mightVanish () const;
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
106 int level () const;
│ │ │ │ +
107 // see ALBERTA documentation for definition of element type
│ │ │ │ +
108 // values are 0, 1, 2
│ │ │ │ +
│ │ │ │ +
109 int type () const;
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
111 int getMark () const;
│ │ │ │ +
│ │ │ │ +
112 void setMark ( int refCount ) const;
│ │ │ │ +
113
│ │ │ │
│ │ │ │ - │ │ │ │ -
115 {
│ │ │ │ -
116 return GeometryTypes::simplex( mydimension );
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
119
│ │ │ │ -
120
│ │ │ │ -
121 // AlbertaGridEntity (for codim = 0)
│ │ │ │ -
122 // ---------------------------------
│ │ │ │ -
123
│ │ │ │ -
124 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
126 ::AlbertaGridEntity ( const Grid &grid, const ElementInfo &elementInfo, int subEntity )
│ │ │ │ -
127 : grid_( &grid ),
│ │ │ │ -
128 elementInfo_( elementInfo )
│ │ │ │ -
129 {
│ │ │ │ -
130 assert( subEntity == 0 );
│ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
133 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ +
114 bool hasLeafNeighbor ( const int face ) const;
│ │ │ │ +
│ │ │ │ +
115 ElementInfo leafNeighbor ( const int face ) const;
│ │ │ │ +
116
│ │ │ │ +
117 /* obtain all level neighbors of a face
│ │ │ │ +
118 *
│ │ │ │ +
119 * param[in] face face for which the neighbors are desired
│ │ │ │ +
120 * param[out] neighbor array storing the neighbors
│ │ │ │ +
121 * param[out] faceInNeighbor array storing the faces in neighbor
│ │ │ │ +
122 * (-1, if this neighbor does not exist)
│ │ │ │ +
123 *
│ │ │ │ +
124 * returns (potential) number of neighbors (i.e., the number of valid
│ │ │ │ +
125 * entries in the output arrays
│ │ │ │ +
126 */
│ │ │ │ +
│ │ │ │ +
127 int levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const;
│ │ │ │ +
128
│ │ │ │ +
129 template< int codim >
│ │ │ │ +
│ │ │ │ +
130 int twist ( int subEntity ) const;
│ │ │ │ +
│ │ │ │ +
131 int twistInNeighbor ( int face ) const;
│ │ │ │ +
│ │ │ │ +
132 bool isBoundary ( int face ) const;
│ │ │ │ +
│ │ │ │ +
133 int boundaryId ( int face ) const;
│ │ │ │ +
│ │ │ │ + │ │ │ │
│ │ │ │ - │ │ │ │ -
136 : grid_( &grid ),
│ │ │ │ -
137 elementInfo_()
│ │ │ │ -
138 {}
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
140 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
143 : grid_( NULL ),
│ │ │ │ -
144 elementInfo_()
│ │ │ │ -
145 {}
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
147
│ │ │ │ -
148 template< int dim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
150 {
│ │ │ │ -
151 // elements are always inside of our Domain
│ │ │ │ -
152 return 0;
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154
│ │ │ │ -
155
│ │ │ │ -
156 template< int dim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
158 {
│ │ │ │ -
159 return grid().levelProvider().isNew( elementInfo_ );
│ │ │ │ -
160 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
137 bool hasCoordinates () const;
│ │ │ │ +
│ │ │ │ +
138 const GlobalVector &coordinate ( int vertex ) const;
│ │ │ │ +
139#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
141 {
│ │ │ │ +
142 return GeometryCache( instance_->geometryCache, instance_->elInfo );
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144#endif
│ │ │ │ +
145
│ │ │ │ +
146 template< class Functor >
│ │ │ │ +
│ │ │ │ +
147 void hierarchicTraverse ( Functor &functor ) const;
│ │ │ │ +
148
│ │ │ │ +
149 template< class Functor >
│ │ │ │ +
│ │ │ │ +
150 void leafTraverse ( Functor &functor ) const;
│ │ │ │ +
151
│ │ │ │ +
│ │ │ │ +
152 const Element *element () const;
│ │ │ │ +
│ │ │ │ +
153 const Element *neighbor ( int face ) const;
│ │ │ │ +
│ │ │ │ +
154 Element *el () const;
│ │ │ │ +
│ │ │ │ +
155 ALBERTA EL_INFO &elInfo () const;
│ │ │ │ +
156
│ │ │ │ +
157 static ElementInfo
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
159 const Element *element, int level, int type = 0 );
│ │ │ │ +
│ │ │ │ +
160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );
│ │ │ │
161
│ │ │ │ -
162
│ │ │ │ -
163 template< int dim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
165 {
│ │ │ │ -
166 return elementInfo_.mightVanish();
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ +
162 private:
│ │ │ │ +
163 static bool isLeaf ( Element *element );
│ │ │ │ +
164 static bool mightVanish ( Element *element, int depth );
│ │ │ │ +
165
│ │ │ │ +
166 static void fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo );
│ │ │ │ +
167 static void fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo );
│ │ │ │
168
│ │ │ │ -
169
│ │ │ │ -
170 template< int dim, class Grid >
│ │ │ │ -
171 inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
173 {
│ │ │ │ -
174 assert( elementInfo_ );
│ │ │ │ -
175 bool isBoundary = false;
│ │ │ │ -
176 for( int i = 0; i < dim+1; ++i )
│ │ │ │ -
177 isBoundary |= elementInfo_.isBoundary( i );
│ │ │ │ -
178 return isBoundary;
│ │ │ │ -
179 }
│ │ │ │ -
│ │ │ │ -
180
│ │ │ │ -
181
│ │ │ │ -
182 template< int dim, class Grid >
│ │ │ │ -
183 inline PartitionType
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
185 {
│ │ │ │ -
186 return InteriorEntity;
│ │ │ │ -
187 }
│ │ │ │ -
│ │ │ │ +
169 void addReference () const;
│ │ │ │ +
170 void removeReference () const;
│ │ │ │ +
171
│ │ │ │ +
172 static InstancePtr null ();
│ │ │ │ +
173 static Stack &stack ();
│ │ │ │ +
174
│ │ │ │ +
175 InstancePtr instance_;
│ │ │ │ +
176 };
│ │ │ │ +
177
│ │ │ │ +
178
│ │ │ │ +
179
│ │ │ │ +
180 // ElementInfo::Instance
│ │ │ │ +
181 // ---------------------
│ │ │ │ +
182
│ │ │ │ +
183 template< int dim >
│ │ │ │ +
│ │ │ │ +
184 struct ElementInfo< dim >::Instance
│ │ │ │ +
185 {
│ │ │ │ + │ │ │ │ +
187 unsigned int refCount;
│ │ │ │
188
│ │ │ │ -
189
│ │ │ │ -
190 template< int dim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
192 {
│ │ │ │ -
193 return elementInfo_.isLeaf();
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
190 {
│ │ │ │ +
191 return parent_;
│ │ │ │ +
192 }
│ │ │ │ +
│ │ │ │ +
193
│ │ │ │ +
194 private:
│ │ │ │ +
195 InstancePtr parent_;
│ │ │ │
196
│ │ │ │ -
197 template< int dim, class Grid >
│ │ │ │ -
198 inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 // element pointers are unique
│ │ │ │ -
202 return (elementInfo().el() == other.elementInfo().el());
│ │ │ │ -
203 }
│ │ │ │ +
197#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ +
198 public:
│ │ │ │ + │ │ │ │ +
200#endif
│ │ │ │ +
201 };
│ │ │ │
│ │ │ │ +
202
│ │ │ │ +
203
│ │ │ │
204
│ │ │ │ -
205
│ │ │ │ -
206 template< int dim, class Grid >
│ │ │ │ -
207 template< int codim >
│ │ │ │ -
208 inline typename Grid::template Codim< codim >::Entity
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
210 {
│ │ │ │ -
211 typedef AlbertaGridEntity< codim, dim, Grid > EntityImpl;
│ │ │ │ -
212 return EntityImpl( grid(), elementInfo_, grid().generic2alberta( codim, i ) );
│ │ │ │ -
213 }
│ │ │ │ -
│ │ │ │ -
214
│ │ │ │ -
215
│ │ │ │ -
216 template< int dim, class Grid >
│ │ │ │ -
217 inline ALBERTA EL_INFO *
│ │ │ │ +
205 // ElementInfo::Stack
│ │ │ │ +
206 // ------------------
│ │ │ │ +
207
│ │ │ │ +
208 template< int dim >
│ │ │ │ +
│ │ │ │ +
209 class ElementInfo< dim >::Stack
│ │ │ │ +
210 {
│ │ │ │ +
211 InstancePtr top_;
│ │ │ │ +
212 Instance null_;
│ │ │ │ +
213
│ │ │ │ +
214 public:
│ │ │ │ +
│ │ │ │ +
215 Stack ();
│ │ │ │ +
│ │ │ │ +
216 ~Stack ();
│ │ │ │ +
217
│ │ │ │
│ │ │ │ - │ │ │ │ -
219 {
│ │ │ │ -
220 return &(elementInfo_.elInfo());
│ │ │ │ -
221 }
│ │ │ │ -
│ │ │ │ +
218 InstancePtr allocate ();
│ │ │ │ +
│ │ │ │ +
219 void release ( InstancePtr &p );
│ │ │ │ +
│ │ │ │ +
220 InstancePtr null ();
│ │ │ │ +
221 };
│ │ │ │
222
│ │ │ │
223
│ │ │ │ -
224 template< int dim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
226 {
│ │ │ │ -
227 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ │ -
228 return elementInfo_.level();
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230
│ │ │ │ -
231
│ │ │ │ -
232 template< int dim, class Grid >
│ │ │ │ -
233 inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
235 {
│ │ │ │ -
236 elementInfo_ = ElementInfo();
│ │ │ │ -
237 }
│ │ │ │ -
│ │ │ │ +
224
│ │ │ │ +
225 // ElementInfo::Library
│ │ │ │ +
226 // --------------------
│ │ │ │ +
227
│ │ │ │ +
228 template< int dim >
│ │ │ │ +
229 template< int >
│ │ │ │ +
230 struct ElementInfo< dim >::Library
│ │ │ │ +
231 {
│ │ │ │ + │ │ │ │ +
233
│ │ │ │ +
234 static const int maxLevelNeighbors = (1 << (dim-1));
│ │ │ │ +
235
│ │ │ │ +
236 static int
│ │ │ │ +
237 leafNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
│ │ │ │
238
│ │ │ │ -
239
│ │ │ │ -
240 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
242 ::setElement ( const ElementInfo &elementInfo, int /* subEntity */ )
│ │ │ │ -
243 {
│ │ │ │ -
244 elementInfo_ = elementInfo;
│ │ │ │ -
245 }
│ │ │ │ -
│ │ │ │ -
246
│ │ │ │ +
239 static int
│ │ │ │ +
240 levelNeighbors ( const ElementInfo &element, const int face,
│ │ │ │ +
241 ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] );
│ │ │ │ +
242
│ │ │ │ +
243 private:
│ │ │ │ +
244 static int
│ │ │ │ +
245 macroNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
│ │ │ │ +
246 };
│ │ │ │
247
│ │ │ │ -
248 template< int dim, class Grid >
│ │ │ │ -
249 inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
251 {
│ │ │ │ -
252 setElement( other.elementInfo_, 0 );
│ │ │ │ -
253 }
│ │ │ │ -
│ │ │ │ -
254
│ │ │ │ -
255
│ │ │ │ -
256 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
259 {
│ │ │ │ -
260 typedef AlbertaGridCoordinateReader< 0, Grid > CoordReader;
│ │ │ │ -
261
│ │ │ │ -
262 assert( elementInfo_ );
│ │ │ │ -
263 const CoordReader coordReader( grid(), elementInfo_, 0 );
│ │ │ │ -
264 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ -
265 }
│ │ │ │ -
│ │ │ │ -
266
│ │ │ │ -
267
│ │ │ │ -
268 template< int dim, class Grid >
│ │ │ │ +
248
│ │ │ │ +
249
│ │ │ │ +
250 // ElementInfo::Seed
│ │ │ │ +
251 // -----------------
│ │ │ │ +
252
│ │ │ │ +
253 template< int dim >
│ │ │ │ +
│ │ │ │ +
254 struct ElementInfo< dim >::Seed
│ │ │ │ +
255 {
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
257 : macroIndex_( -1 ), level_( 0 ), path_( 0 )
│ │ │ │ +
258 {}
│ │ │ │ +
│ │ │ │ +
259
│ │ │ │ +
│ │ │ │ +
260 Seed ( const int macroIndex, const int level, const unsigned long path )
│ │ │ │ +
261 : macroIndex_( macroIndex ), level_( level ), path_( path )
│ │ │ │ +
262 {}
│ │ │ │ +
│ │ │ │ +
263
│ │ │ │ +
│ │ │ │ +
264 bool operator== ( const Seed &other ) const
│ │ │ │ +
265 {
│ │ │ │ +
266 return (macroIndex() == other.macroIndex()) && (level() == other.level()) && (path() == other.path());
│ │ │ │ +
267 }
│ │ │ │ +
│ │ │ │ +
268
│ │ │ │
│ │ │ │ -
269 inline GeometryType AlbertaGridEntity< 0, dim, Grid>::type () const
│ │ │ │ -
270 {
│ │ │ │ -
271 return GeometryTypes::simplex( mydimension );
│ │ │ │ -
272 }
│ │ │ │ -
│ │ │ │ -
273
│ │ │ │ -
274
│ │ │ │ -
275 template< int dim, class Grid >
│ │ │ │ -
276 inline typename Grid::template Codim< 0 >::Entity
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
278 {
│ │ │ │ -
279 typedef AlbertaGridEntity< 0, dim, Grid > EntityImpl;
│ │ │ │ -
280
│ │ │ │ -
281 assert( elementInfo_ );
│ │ │ │ -
282 const ElementInfo fatherInfo = elementInfo_.father();
│ │ │ │ +
269 bool operator< ( const Seed &other ) const
│ │ │ │ +
270 {
│ │ │ │ +
271 const bool ml = (macroIndex() < other.macroIndex());
│ │ │ │ +
272 const bool me = (macroIndex() == other.macroIndex());
│ │ │ │ +
273 const bool ll = (level() < other.level());
│ │ │ │ +
274 const bool le = (level() == other.level());
│ │ │ │ +
275 const bool pl = (path() < other.path());
│ │ │ │ +
276 return ml | (me & (ll | (le & pl)));
│ │ │ │ +
277 }
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
279 bool operator!= ( const Seed &other ) const { return !(*this == other); }
│ │ │ │ +
280 bool operator<= ( const Seed &other ) const { return !(other < *this); }
│ │ │ │ +
281 bool operator> ( const Seed &other ) const { return (other < *this); }
│ │ │ │ +
282 bool operator>= ( const Seed &other ) const { return !(*this < other); }
│ │ │ │
283
│ │ │ │ -
284 return EntityImpl( grid(), fatherInfo, 0 );
│ │ │ │ -
285 }
│ │ │ │ -
│ │ │ │ -
286
│ │ │ │ -
287
│ │ │ │ -
288 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
290 {
│ │ │ │ -
291 return elementInfo_.indexInFather();
│ │ │ │ -
292 }
│ │ │ │ -
293
│ │ │ │ -
294
│ │ │ │ -
295 template< int dim, class Grid >
│ │ │ │ -
296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
298 {
│ │ │ │ -
299 typedef AlbertaGridLocalGeometryProvider< Grid > LocalGeoProvider;
│ │ │ │ -
300 const int indexInFather = elementInfo_.indexInFather();
│ │ │ │ -
301 const int orientation = (elementInfo_.type() == 1 ? -1 : 1);
│ │ │ │ -
302 return LocalGeometry( LocalGeoProvider::instance().geometryInFather( indexInFather, orientation ) );
│ │ │ │ -
303 }
│ │ │ │ -
│ │ │ │ -
304
│ │ │ │ -
305
│ │ │ │ -
306 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
309 {
│ │ │ │ -
310 assert( elementInfo_ );
│ │ │ │ -
311 typedef AlbertaGridHierarchicIterator< Grid > IteratorImp;
│ │ │ │ -
312 return IteratorImp( grid(), elementInfo_, maxlevel );
│ │ │ │ -
313 }
│ │ │ │ +
284 bool isValid ( ) const { return macroIndex_ != -1; }
│ │ │ │ +
285
│ │ │ │ +
286 int macroIndex () const { return macroIndex_; }
│ │ │ │ +
287 int level () const { return level_; }
│ │ │ │ +
288 unsigned long path () const { return path_; }
│ │ │ │ +
289
│ │ │ │ +
290 private:
│ │ │ │ +
291 int macroIndex_;
│ │ │ │ +
292 int level_;
│ │ │ │ +
293 unsigned long path_;
│ │ │ │ +
294 };
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
296
│ │ │ │ +
297
│ │ │ │ +
298 // Implementation of ElementInfo
│ │ │ │ +
299 // -----------------------------
│ │ │ │ +
300
│ │ │ │ +
301 template< int dim >
│ │ │ │ +
302 inline ElementInfo< dim >::ElementInfo ( const InstancePtr &instance )
│ │ │ │ +
303 : instance_( instance )
│ │ │ │ +
304 {
│ │ │ │ +
305 addReference();
│ │ │ │ +
306 }
│ │ │ │ +
307
│ │ │ │ +
308
│ │ │ │ +
309 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
311 : instance_( null() )
│ │ │ │ +
312 {
│ │ │ │ +
313 addReference();
│ │ │ │ +
314 }
│ │ │ │
│ │ │ │ -
314
│ │ │ │
315
│ │ │ │ -
316 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
319 {
│ │ │ │ -
320 assert( elementInfo_ );
│ │ │ │ -
321 typedef AlbertaGridHierarchicIterator< Grid > IteratorImp;
│ │ │ │ -
322 return IteratorImp( grid(), level(), maxlevel );
│ │ │ │ -
323 }
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ +
316
│ │ │ │ +
317 template< int dim >
│ │ │ │ +
318 inline ElementInfo< dim >
│ │ │ │ +
│ │ │ │ +
319 ::ElementInfo ( const MeshPointer &mesh, const MacroElement &macroElement,
│ │ │ │ +
320 typename FillFlags::Flags fillFlags )
│ │ │ │ +
321 {
│ │ │ │ +
322 instance_ = stack().allocate();
│ │ │ │ +
323 instance_->parent() = null();
│ │ │ │ +
324 ++(instance_->parent()->refCount);
│ │ │ │
325
│ │ │ │ -
326 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
329 {
│ │ │ │ -
330 assert( elementInfo_ );
│ │ │ │ -
331
│ │ │ │ -
332#ifndef NDEBUG
│ │ │ │ -
333 for( int i = 0; i <= dimension; ++i )
│ │ │ │ -
334 {
│ │ │ │ -
335 // std::cout << "Opposite vertex " << i << ": "
│ │ │ │ -
336 // << (int)(getElInfo()->opp_vertex[ i ]) << std::endl;
│ │ │ │ -
337 if( getElInfo()->opp_vertex[ i ] == 127 )
│ │ │ │ -
338 {
│ │ │ │ -
339 assert( false );
│ │ │ │ -
340 DUNE_THROW( NotImplemented, "AlbertaGrid: Intersections on outside "
│ │ │ │ -
341 "entities are not fully implemented, yet." );
│ │ │ │ -
342 }
│ │ │ │ -
343 }
│ │ │ │ -
344#endif // #ifndef NDEBUG
│ │ │ │ -
345
│ │ │ │ - │ │ │ │ -
347 return AlbertaGridLeafIntersectionIterator( *this, begin );
│ │ │ │ -
348 }
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
350
│ │ │ │ -
351 template< int dim, class Grid >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
354 {
│ │ │ │ -
355 assert( elementInfo_ );
│ │ │ │ - │ │ │ │ -
357 return AlbertaGridLeafIntersectionIterator( *this, end );
│ │ │ │ -
358 }
│ │ │ │ -
│ │ │ │ -
359
│ │ │ │ -
360} // namespace Dune
│ │ │ │ -
361
│ │ │ │ -
362#endif // #ifndef DUNE_ALBERTA_ENTITY_CC
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ -
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ +
326 addReference();
│ │ │ │ +
327
│ │ │ │ +
328 elInfo().fill_flag = fillFlags;
│ │ │ │ +
329
│ │ │ │ +
330 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ +
331 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ +
332 elInfo().opp_vertex[ k ] = -1;
│ │ │ │ +
333
│ │ │ │ +
334 fill( mesh, &macroElement, elInfo() );
│ │ │ │ +
335 }
│ │ │ │ +
│ │ │ │ +
336
│ │ │ │ +
337
│ │ │ │ +
338 template< int dim >
│ │ │ │ +
339 inline ElementInfo< dim >
│ │ │ │ +
│ │ │ │ +
340 ::ElementInfo ( const MeshPointer &mesh, const Seed &seed,
│ │ │ │ +
341 typename FillFlags::Flags fillFlags )
│ │ │ │ +
342 {
│ │ │ │ +
343 instance_ = stack().allocate();
│ │ │ │ +
344 instance_->parent() = null();
│ │ │ │ +
345 ++(instance_->parent()->refCount);
│ │ │ │ +
346
│ │ │ │ +
347 addReference();
│ │ │ │ +
348
│ │ │ │ +
349 // fill in macro element info
│ │ │ │ +
350 elInfo().fill_flag = fillFlags;
│ │ │ │ +
351
│ │ │ │ +
352 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ +
353 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ +
354 elInfo().opp_vertex[ k ] = -1;
│ │ │ │ +
355
│ │ │ │ +
356 fill( mesh, ((Mesh *)mesh)->macro_els + seed.macroIndex(), elInfo() );
│ │ │ │ +
357
│ │ │ │ +
358 // traverse the seed's path
│ │ │ │ +
359 unsigned long path = seed.path();
│ │ │ │ +
360 for( int i = 0; i < seed.level(); ++i )
│ │ │ │ +
361 {
│ │ │ │ +
362 InstancePtr child = stack().allocate();
│ │ │ │ +
363 child->parent() = instance_;
│ │ │ │ +
364
│ │ │ │ +
365 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ +
366 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ +
367 child->elInfo.opp_vertex[ k ] = -2;
│ │ │ │ +
368
│ │ │ │ +
369 fill( path & 1, elInfo(), child->elInfo );
│ │ │ │ +
370
│ │ │ │ +
371 instance_ = child;
│ │ │ │ +
372 addReference();
│ │ │ │ +
373
│ │ │ │ +
374 path = path >> 1;
│ │ │ │ +
375 }
│ │ │ │ +
376
│ │ │ │ +
377 assert( this->seed() == seed );
│ │ │ │ +
378 }
│ │ │ │ +
│ │ │ │ +
379
│ │ │ │ +
380
│ │ │ │ +
381 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
383 : instance_( other.instance_ )
│ │ │ │ +
384 {
│ │ │ │ +
385 addReference();
│ │ │ │ +
386 }
│ │ │ │ +
│ │ │ │ +
387
│ │ │ │ +
388 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
390 : instance_( NULL )
│ │ │ │ +
391 {
│ │ │ │ +
392 using std::swap;
│ │ │ │ +
393 swap( instance_, other.instance_ );
│ │ │ │ +
394 }
│ │ │ │ +
│ │ │ │ +
395
│ │ │ │ +
396 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
398 {
│ │ │ │ +
399 removeReference();
│ │ │ │ +
400 }
│ │ │ │ +
│ │ │ │ +
401
│ │ │ │ +
402
│ │ │ │ +
403 template< int dim >
│ │ │ │ +
404 inline ElementInfo< dim > &
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
406 {
│ │ │ │ +
407 other.addReference();
│ │ │ │ +
408 removeReference();
│ │ │ │ +
409 instance_ = other.instance_;
│ │ │ │ +
410 return *this;
│ │ │ │ +
411 }
│ │ │ │ +
│ │ │ │ +
412
│ │ │ │ +
413 template< int dim >
│ │ │ │ +
414 inline ElementInfo< dim > &
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
416 {
│ │ │ │ +
417 using std::swap;
│ │ │ │ +
418 swap( instance_, other.instance_ );
│ │ │ │ +
419 return *this;
│ │ │ │ +
420 }
│ │ │ │ +
│ │ │ │ +
421
│ │ │ │ +
422 template< int dim >
│ │ │ │ +
423 inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
425 {
│ │ │ │ +
426 return (instance_->elInfo.el == other.instance_->elInfo.el);
│ │ │ │ +
427 }
│ │ │ │ +
│ │ │ │ +
428
│ │ │ │ +
429
│ │ │ │ +
430 template< int dim >
│ │ │ │ +
431 inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
433 {
│ │ │ │ +
434 return (instance_->elInfo.el != other.instance_->elInfo.el);
│ │ │ │ +
435 }
│ │ │ │ +
│ │ │ │ +
436
│ │ │ │ +
437
│ │ │ │ +
438 template< int dim >
│ │ │ │ +
439 inline const typename ElementInfo< dim >::MacroElement &
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
441 {
│ │ │ │ +
442 assert( !!(*this) );
│ │ │ │ +
443 assert( elInfo().macro_el != NULL );
│ │ │ │ +
444 return static_cast< const MacroElement & >( *(elInfo().macro_el) );
│ │ │ │ +
445 }
│ │ │ │ +
│ │ │ │ +
446
│ │ │ │ +
447
│ │ │ │ +
448 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
450 {
│ │ │ │ +
451 assert( !!(*this) );
│ │ │ │ +
452 return ElementInfo< dim >( instance_->parent() );
│ │ │ │ +
453 }
│ │ │ │ +
│ │ │ │ +
454
│ │ │ │ +
455
│ │ │ │ +
456 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
458 {
│ │ │ │ +
459 const Element *element = elInfo().el;
│ │ │ │ +
460 const Element *father = elInfo().parent->el;
│ │ │ │ +
461 assert( father != NULL );
│ │ │ │ +
462
│ │ │ │ +
463 const int index = (father->child[ 0 ] == element ? 0 : 1);
│ │ │ │ +
464 assert( father->child[ index ] == element );
│ │ │ │ +
465 return index;
│ │ │ │ +
466 }
│ │ │ │ +
│ │ │ │ +
467
│ │ │ │ +
468
│ │ │ │ +
469 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
471 {
│ │ │ │ +
472 assert( !isLeaf() );
│ │ │ │ +
473
│ │ │ │ +
474 InstancePtr child = stack().allocate();
│ │ │ │ +
475 child->parent() = instance_;
│ │ │ │ +
476 addReference();
│ │ │ │ +
477
│ │ │ │ +
478 // Alberta fills opp_vertex only if there is a neighbor
│ │ │ │ +
479 for( int k = 0; k < maxNeighbors; ++k )
│ │ │ │ +
480 child->elInfo.opp_vertex[ k ] = -2;
│ │ │ │ +
481
│ │ │ │ +
482 fill( i, elInfo(), child->elInfo );
│ │ │ │ +
483 return ElementInfo< dim >( child );
│ │ │ │ +
484 }
│ │ │ │ +
│ │ │ │ +
485
│ │ │ │ +
486
│ │ │ │ +
487 template< int dim >
│ │ │ │ +
│ │ │ │ +
488 inline bool ElementInfo< dim >::isLeaf () const
│ │ │ │ +
489 {
│ │ │ │ +
490 assert( !(*this) == false );
│ │ │ │ +
491 return isLeaf( el() );
│ │ │ │ +
492 }
│ │ │ │ +
│ │ │ │ +
493
│ │ │ │ +
494
│ │ │ │ +
495 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
497 {
│ │ │ │ +
498 assert( !!(*this) );
│ │ │ │ +
499
│ │ │ │ +
500 int level = 0;
│ │ │ │ +
501 unsigned long path = 0;
│ │ │ │ +
502 for( InstancePtr p = instance_; p->parent() != null(); p = p->parent() )
│ │ │ │ +
503 {
│ │ │ │ +
504 const Element *element = p->elInfo.el;
│ │ │ │ +
505 const Element *father = p->parent()->elInfo.el;
│ │ │ │ +
506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 ] == element );
│ │ │ │ +
507 path = (path << 1) | child;
│ │ │ │ +
508 ++level;
│ │ │ │ +
509 }
│ │ │ │ +
510
│ │ │ │ +
511 if( level != elInfo().level )
│ │ │ │ +
512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." );
│ │ │ │ +
513
│ │ │ │ +
514 return Seed( macroElement().index, level, path );
│ │ │ │ +
515 }
│ │ │ │ +
│ │ │ │ +
516
│ │ │ │ +
517
│ │ │ │ +
518 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
520 {
│ │ │ │ +
521 return MeshPointer( elInfo().mesh );
│ │ │ │ +
522 }
│ │ │ │ +
│ │ │ │ +
523
│ │ │ │ +
524
│ │ │ │ +
525 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
527 {
│ │ │ │ +
528 return mightVanish( el(), 0 );
│ │ │ │ +
529 }
│ │ │ │ +
│ │ │ │ +
530
│ │ │ │ +
531
│ │ │ │ +
532 template< int dim >
│ │ │ │ +
│ │ │ │ +
533 inline int ElementInfo< dim >::level () const
│ │ │ │ +
534 {
│ │ │ │ +
535 return elInfo().level;
│ │ │ │ +
536 }
│ │ │ │ +
│ │ │ │ +
537
│ │ │ │ +
538
│ │ │ │ +
539 template< int dim >
│ │ │ │ +
│ │ │ │ +
540 inline int ElementInfo< dim >::type () const
│ │ │ │ +
541 {
│ │ │ │ +
542 return 0;
│ │ │ │ +
543 }
│ │ │ │ +
│ │ │ │ +
544
│ │ │ │ +
545
│ │ │ │ +
546 template<>
│ │ │ │ +
│ │ │ │ +
547 inline int ElementInfo< 3 >::type () const
│ │ │ │ +
548 {
│ │ │ │ +
549 return instance_->elInfo.el_type;
│ │ │ │ +
550 }
│ │ │ │ +
│ │ │ │ +
551
│ │ │ │ +
552
│ │ │ │ +
553 template< int dim >
│ │ │ │ +
│ │ │ │ +
554 inline int ElementInfo< dim >::getMark () const
│ │ │ │ +
555 {
│ │ │ │ +
556 return el()->mark;
│ │ │ │ +
557 }
│ │ │ │ +
│ │ │ │ +
558
│ │ │ │ +
559
│ │ │ │ +
560 template< int dim >
│ │ │ │ +
│ │ │ │ +
561 inline void ElementInfo< dim >::setMark ( int refCount ) const
│ │ │ │ +
562 {
│ │ │ │ +
563 assert( isLeaf() );
│ │ │ │ +
564 assert( (refCount >= -128) && (refCount < 127) );
│ │ │ │ +
565 el()->mark = refCount;
│ │ │ │ +
566 }
│ │ │ │ +
│ │ │ │ +
567
│ │ │ │ +
568
│ │ │ │ +
569 template< int dim >
│ │ │ │ +
│ │ │ │ +
570 inline bool ElementInfo< dim >::hasLeafNeighbor ( const int face ) const
│ │ │ │ +
571 {
│ │ │ │ +
572 assert( !!(*this) );
│ │ │ │ +
573 assert( (face >= 0) && (face < maxNeighbors) );
│ │ │ │ +
574
│ │ │ │ +
575 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ +
576 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ +
577 if( macroFace >= 0 )
│ │ │ │ +
578 return (macroElement().neighbor( macroFace ) != NULL);
│ │ │ │ +
579 else
│ │ │ │ +
580 return true;
│ │ │ │ +
581 }
│ │ │ │ +
│ │ │ │ +
582
│ │ │ │ +
583
│ │ │ │ +
584 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
586 {
│ │ │ │ +
587 assert( (face >= 0) && (face < numFaces) );
│ │ │ │ +
588 ElementInfo neighbor;
│ │ │ │ +
589 Library< dimWorld >::leafNeighbor( *this, face, neighbor );
│ │ │ │ +
590 return neighbor;
│ │ │ │ +
591 }
│ │ │ │ +
│ │ │ │ +
592
│ │ │ │ +
593
│ │ │ │ +
594 template< int dim >
│ │ │ │ +
595 inline int ElementInfo< dim >
│ │ │ │ +
│ │ │ │ +
596 ::levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const
│ │ │ │ +
597 {
│ │ │ │ +
598 assert( (face >= 0) && (face < numFaces) );
│ │ │ │ +
599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, faceInNeighbor );
│ │ │ │ +
600 }
│ │ │ │ +
│ │ │ │ +
601
│ │ │ │ +
602
│ │ │ │ +
603 template< int dim >
│ │ │ │ +
604 template< int codim >
│ │ │ │ +
│ │ │ │ +
605 inline int ElementInfo< dim >::twist ( int subEntity ) const
│ │ │ │ +
606 {
│ │ │ │ +
607 return Twist< dim, dim-codim >::twist( element(), subEntity );
│ │ │ │ +
608 }
│ │ │ │ +
│ │ │ │ +
609
│ │ │ │ +
610
│ │ │ │ +
611 template< int dim >
│ │ │ │ +
│ │ │ │ +
612 inline int ElementInfo< dim >::twistInNeighbor ( const int face ) const
│ │ │ │ +
613 {
│ │ │ │ +
614 assert( neighbor( face ) != NULL );
│ │ │ │ +
615 return Twist< dim, dim-1 >::twist( neighbor( face ), elInfo().opp_vertex[ face ] );
│ │ │ │ +
616 }
│ │ │ │ +
│ │ │ │ +
617
│ │ │ │ +
618
│ │ │ │ +
619 template< int dim >
│ │ │ │ +
│ │ │ │ +
620 inline bool ElementInfo< dim >::isBoundary ( int face ) const
│ │ │ │ +
621 {
│ │ │ │ +
622 assert( !!(*this) );
│ │ │ │ +
623 assert( (face >= 0) && (face < maxNeighbors) );
│ │ │ │ +
624
│ │ │ │ +
625 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ +
626 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ +
627 if( macroFace >= 0 )
│ │ │ │ +
628 return macroElement().isBoundary( macroFace );
│ │ │ │ +
629 else
│ │ │ │ +
630 return false;
│ │ │ │ +
631 }
│ │ │ │ +
│ │ │ │ +
632
│ │ │ │ +
633
│ │ │ │ +
634 template< int dim >
│ │ │ │ +
│ │ │ │ +
635 inline int ElementInfo< dim >::boundaryId ( int face ) const
│ │ │ │ +
636 {
│ │ │ │ +
637 assert( !!(*this) );
│ │ │ │ +
638 assert( (face >= 0) && (face < N_WALLS_MAX) );
│ │ │ │ +
639
│ │ │ │ +
640 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ +
641 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ +
642 const int id = macroElement().boundaryId( macroFace );
│ │ │ │ +
643 // this assertion is only allowed, if FILL_BOUND is set
│ │ │ │ +
644 // assert( id == elInfo().wall_bound[ face ] );
│ │ │ │ +
645 return id;
│ │ │ │ +
646 }
│ │ │ │ +
│ │ │ │ +
647
│ │ │ │ +
648
│ │ │ │ +
649 template< int dim >
│ │ │ │ +
650 inline AffineTransformation *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
652 {
│ │ │ │ +
653 assert( !!(*this) );
│ │ │ │ +
654 assert( (face >= 0) && (face < N_WALLS_MAX) );
│ │ │ │ +
655
│ │ │ │ +
656 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ +
657 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ +
658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]);
│ │ │ │ +
659 }
│ │ │ │ +
│ │ │ │ +
660
│ │ │ │ +
661
│ │ │ │ +
662 template< int dim >
│ │ │ │ +
663 inline BasicNodeProjection *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
665 {
│ │ │ │ +
666 assert( !!(*this) );
│ │ │ │ +
667 assert( (face >= 0) && (face < N_WALLS_MAX) );
│ │ │ │ +
668
│ │ │ │ +
669 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
│ │ │ │ +
670 const int macroFace = elInfo().macro_wall[ face ];
│ │ │ │ +
671 if( macroFace >= 0 )
│ │ │ │ +
672 return static_cast< BasicNodeProjection * >( macroElement().projection[ macroFace+1 ] );
│ │ │ │ +
673 else
│ │ │ │ +
674 return 0;
│ │ │ │ +
675 }
│ │ │ │ +
│ │ │ │ +
676
│ │ │ │ +
677
│ │ │ │ +
678 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
680 {
│ │ │ │ +
681 return ((elInfo().fill_flag & FillFlags::coords) != 0);
│ │ │ │ +
682 }
│ │ │ │ +
│ │ │ │ +
683
│ │ │ │ +
684 template< int dim >
│ │ │ │ +
│ │ │ │ +
685 inline const GlobalVector &ElementInfo< dim >::coordinate ( int vertex ) const
│ │ │ │ +
686 {
│ │ │ │ +
687 assert( hasCoordinates() );
│ │ │ │ +
688 assert( (vertex >= 0) && (vertex < numVertices) );
│ │ │ │ +
689 return elInfo().coord[ vertex ];
│ │ │ │ +
690 }
│ │ │ │ +
│ │ │ │ +
691
│ │ │ │ +
692
│ │ │ │ +
693 template< int dim >
│ │ │ │ +
694 template< class Functor >
│ │ │ │ +
│ │ │ │ +
695 inline void ElementInfo< dim >::hierarchicTraverse ( Functor &functor ) const
│ │ │ │ +
696 {
│ │ │ │ +
697 functor( *this );
│ │ │ │ +
698 if( !isLeaf() )
│ │ │ │ +
699 {
│ │ │ │ +
700 child( 0 ).hierarchicTraverse( functor );
│ │ │ │ +
701 child( 1 ).hierarchicTraverse( functor );
│ │ │ │ +
702 }
│ │ │ │ +
703 }
│ │ │ │ +
│ │ │ │ +
704
│ │ │ │ +
705
│ │ │ │ +
706 template< int dim >
│ │ │ │ +
707 template< class Functor >
│ │ │ │ +
│ │ │ │ +
708 inline void ElementInfo< dim >::leafTraverse ( Functor &functor ) const
│ │ │ │ +
709 {
│ │ │ │ +
710 if( !isLeaf() )
│ │ │ │ +
711 {
│ │ │ │ +
712 child( 0 ).leafTraverse( functor );
│ │ │ │ +
713 child( 1 ).leafTraverse( functor );
│ │ │ │ +
714 }
│ │ │ │ +
715 else
│ │ │ │ +
716 functor( *this );
│ │ │ │ +
717 }
│ │ │ │ +
│ │ │ │ +
718
│ │ │ │ +
719
│ │ │ │ +
720 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
722 {
│ │ │ │ +
723 return elInfo().el;
│ │ │ │ +
724 }
│ │ │ │ +
│ │ │ │ +
725
│ │ │ │ +
726
│ │ │ │ +
727 template< int dim >
│ │ │ │ +
│ │ │ │ +
728 inline const Element *ElementInfo< dim >::neighbor ( int face ) const
│ │ │ │ +
729 {
│ │ │ │ +
730 assert( (face >= 0) && (face < numFaces) );
│ │ │ │ +
731 assert( (elInfo().fill_flag & FillFlags::neighbor) != 0 );
│ │ │ │ +
732 return elInfo().neigh[ face ];
│ │ │ │ +
733 }
│ │ │ │ +
│ │ │ │ +
734
│ │ │ │ +
735
│ │ │ │ +
736 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
738 {
│ │ │ │ +
739 return elInfo().el;
│ │ │ │ +
740 }
│ │ │ │ +
│ │ │ │ +
741
│ │ │ │ +
742
│ │ │ │ +
743 template< int dim >
│ │ │ │ +
│ │ │ │ +
744 inline ALBERTA EL_INFO &ElementInfo< dim >::elInfo () const
│ │ │ │ +
745 {
│ │ │ │ +
746 return (instance_->elInfo);
│ │ │ │ +
747 }
│ │ │ │ +
│ │ │ │ +
748
│ │ │ │ +
749
│ │ │ │ +
750 template< int dim >
│ │ │ │ +
751 inline ElementInfo< dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
753 const Element *element, int level, int type )
│ │ │ │ +
754 {
│ │ │ │ +
755 InstancePtr instance = stack().allocate();
│ │ │ │ +
756 instance->parent() = null();
│ │ │ │ +
757 ++(instance->parent()->refCount);
│ │ │ │ +
758
│ │ │ │ +
759 instance->elInfo.mesh = mesh;
│ │ │ │ +
760 instance->elInfo.macro_el = NULL;
│ │ │ │ +
761 instance->elInfo.el = const_cast< Element * >( element );
│ │ │ │ +
762 instance->elInfo.parent = NULL;
│ │ │ │ +
763 instance->elInfo.fill_flag = FillFlags::nothing;
│ │ │ │ +
764 instance->elInfo.level = level;
│ │ │ │ +
765 instance->elInfo.el_type = type;
│ │ │ │ +
766
│ │ │ │ +
767 return ElementInfo< dim >( instance );
│ │ │ │ +
768 }
│ │ │ │ +
│ │ │ │ +
769
│ │ │ │ +
770
│ │ │ │ +
771 template< int dim >
│ │ │ │ +
772 inline ElementInfo< dim >
│ │ │ │ +
│ │ │ │ +
773 ElementInfo< dim >::createFake ( const ALBERTA EL_INFO &elInfo )
│ │ │ │ +
774 {
│ │ │ │ +
775 InstancePtr instance = stack().allocate();
│ │ │ │ +
776 instance->parent() = null();
│ │ │ │ +
777 ++(instance->parent()->refCount);
│ │ │ │ +
778
│ │ │ │ +
779 instance->elInfo = elInfo;
│ │ │ │ +
780 return ElementInfo< dim >( instance );
│ │ │ │ +
781 }
│ │ │ │ +
│ │ │ │ +
782
│ │ │ │ +
783
│ │ │ │ +
784 template< int dim >
│ │ │ │ +
785 inline bool ElementInfo< dim >::isLeaf ( Element *element )
│ │ │ │ +
786 {
│ │ │ │ +
787 return IS_LEAF_EL( element );
│ │ │ │ +
788 }
│ │ │ │ +
789
│ │ │ │ +
790
│ │ │ │ +
791 template< int dim >
│ │ │ │ +
792 inline bool ElementInfo< dim >::mightVanish ( Alberta::Element *element, int depth )
│ │ │ │ +
793 {
│ │ │ │ +
794 if( isLeaf( element ) )
│ │ │ │ +
795 return (element->mark < depth);
│ │ │ │ +
796 else
│ │ │ │ +
797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish( element->child[ 1 ], depth-1 ));
│ │ │ │ +
798 }
│ │ │ │ +
799
│ │ │ │ +
800
│ │ │ │ +
801 template< int dim >
│ │ │ │ +
802 inline void ElementInfo< dim >
│ │ │ │ +
803 ::fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo )
│ │ │ │ +
804 {
│ │ │ │ +
805 ALBERTA fill_macro_info( mesh, mel, &elInfo );
│ │ │ │ +
806 }
│ │ │ │ +
807
│ │ │ │ +
808 template< int dim >
│ │ │ │ +
809 inline void ElementInfo< dim >
│ │ │ │ +
810 ::fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo )
│ │ │ │ +
811 {
│ │ │ │ +
812 ALBERTA fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo );
│ │ │ │ +
813 }
│ │ │ │ +
814
│ │ │ │ +
815
│ │ │ │ +
816 template< int dim >
│ │ │ │ +
817 inline void ElementInfo< dim >::addReference () const
│ │ │ │ +
818 {
│ │ │ │ +
819 ++(instance_->refCount);
│ │ │ │ +
820 }
│ │ │ │ +
821
│ │ │ │ +
822
│ │ │ │ +
823 template< int dim >
│ │ │ │ +
824 inline void ElementInfo< dim >::removeReference () const
│ │ │ │ +
825 {
│ │ │ │ +
826 // short-circuit for rvalues that have been drained as argument to a move operation
│ │ │ │ +
827 if ( !instance_ )
│ │ │ │ +
828 return;
│ │ │ │ +
829 // this loop breaks when instance becomes null()
│ │ │ │ +
830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; )
│ │ │ │ +
831 {
│ │ │ │ +
832 const InstancePtr parent = instance->parent();
│ │ │ │ +
833 stack().release( instance );
│ │ │ │ +
834 instance = parent;
│ │ │ │ +
835 }
│ │ │ │ +
836 }
│ │ │ │ +
837
│ │ │ │ +
838
│ │ │ │ +
839 template< int dim >
│ │ │ │ +
840 inline typename ElementInfo< dim >::InstancePtr
│ │ │ │ +
841 ElementInfo< dim >::null ()
│ │ │ │ +
842 {
│ │ │ │ +
843 return stack().null();
│ │ │ │ +
844 }
│ │ │ │ +
845
│ │ │ │ +
846
│ │ │ │ +
847 template< int dim >
│ │ │ │ +
848 inline typename ElementInfo< dim >::Stack &
│ │ │ │ +
849 ElementInfo< dim >::stack ()
│ │ │ │ +
850 {
│ │ │ │ +
851 static Stack s;
│ │ │ │ +
852 return s;
│ │ │ │ +
853 }
│ │ │ │ +
854
│ │ │ │ +
855
│ │ │ │ +
856
│ │ │ │ +
857 // Implementation of ElementInfo::Stack
│ │ │ │ +
858 // ------------------------------------
│ │ │ │ +
859
│ │ │ │ +
860 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
862 : top_( 0 )
│ │ │ │ +
863 {
│ │ │ │ +
864 null_.elInfo.el = NULL;
│ │ │ │ +
865 null_.refCount = 1;
│ │ │ │ +
866 null_.parent() = 0;
│ │ │ │ +
867 }
│ │ │ │ +
│ │ │ │ +
868
│ │ │ │ +
869
│ │ │ │ +
870 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
872 {
│ │ │ │ +
873 while( top_ != 0 )
│ │ │ │ +
874 {
│ │ │ │ +
875 InstancePtr p = top_;
│ │ │ │ +
876 top_ = p->parent();
│ │ │ │ +
877 delete p;
│ │ │ │ +
878 }
│ │ │ │ +
879 }
│ │ │ │ +
│ │ │ │ +
880
│ │ │ │ +
881
│ │ │ │ +
882 template< int dim >
│ │ │ │ +
883 inline typename ElementInfo< dim >::InstancePtr
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
885 {
│ │ │ │ +
886 InstancePtr p = top_;
│ │ │ │ +
887 if( p != 0 )
│ │ │ │ +
888 top_ = p->parent();
│ │ │ │ +
889 else
│ │ │ │ +
890 p = new Instance;
│ │ │ │ +
891 p->refCount = 0;
│ │ │ │ +
892 return p;
│ │ │ │ +
893 }
│ │ │ │ +
│ │ │ │ +
894
│ │ │ │ +
895
│ │ │ │ +
896 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
898 {
│ │ │ │ +
899 assert( (p != null()) && (p->refCount == 0) );
│ │ │ │ +
900 p->parent() = top_;
│ │ │ │ +
901 top_ = p;
│ │ │ │ +
902 }
│ │ │ │ +
│ │ │ │ +
903
│ │ │ │ +
904
│ │ │ │ +
905 template< int dim >
│ │ │ │ +
906 inline typename ElementInfo< dim >::InstancePtr
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
908 {
│ │ │ │ +
909 return &null_;
│ │ │ │ +
910 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
911
│ │ │ │ +
912 } // namespace Alberta
│ │ │ │ +
913
│ │ │ │ +
914} // namespace Dune
│ │ │ │ +
915
│ │ │ │ +
916#endif // #if HAVE_ALBERTA
│ │ │ │ +
917
│ │ │ │ +
918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ + │ │ │ │ +
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ - │ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ + │ │ │ │ +
Definition elementinfo.hh:43
│ │ │ │ +
ElementInfo leafNeighbor(const int face) const
Definition elementinfo.hh:585
│ │ │ │ +
bool isLeaf() const
Definition elementinfo.hh:488
│ │ │ │ +
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Definition elementinfo.hh:752
│ │ │ │ +
ElementInfo child(int i) const
Definition elementinfo.hh:470
│ │ │ │
int level() const
Definition elementinfo.hh:533
│ │ │ │
bool mightVanish() const
Definition elementinfo.hh:526
│ │ │ │ +
static const int numFaces
Definition elementinfo.hh:56
│ │ │ │ +
int twist(int subEntity) const
Definition elementinfo.hh:605
│ │ │ │ +
int twistInNeighbor(int face) const
Definition elementinfo.hh:612
│ │ │ │ +
Alberta::MacroElement< dimension > MacroElement
Definition elementinfo.hh:58
│ │ │ │ +
BasicNodeProjection * boundaryProjection(int face) const
Definition elementinfo.hh:664
│ │ │ │ +
const MacroElement & macroElement() const
Definition elementinfo.hh:440
│ │ │ │ +
static const int maxLevelNeighbors
Definition elementinfo.hh:64
│ │ │ │
ElementInfo father() const
Definition elementinfo.hh:449
│ │ │ │ +
ElementInfo(const ElementInfo &other)
Definition elementinfo.hh:382
│ │ │ │ +
GeometryCacheProxy< dim > GeometryCache
Definition elementinfo.hh:67
│ │ │ │ +
ElementInfo & operator=(const ElementInfo &other)
Definition elementinfo.hh:405
│ │ │ │ +
bool hasLeafNeighbor(const int face) const
Definition elementinfo.hh:570
│ │ │ │ +
bool operator==(const ElementInfo &other) const
Definition elementinfo.hh:424
│ │ │ │ +
static const int dimension
Definition elementinfo.hh:53
│ │ │ │ +
void hierarchicTraverse(Functor &functor) const
Definition elementinfo.hh:695
│ │ │ │
int type() const
Definition elementinfo.hh:540
│ │ │ │ +
static const int maxNeighbors
Definition elementinfo.hh:62
│ │ │ │ +
void setMark(int refCount) const
Definition elementinfo.hh:561
│ │ │ │ +
~ElementInfo()
Definition elementinfo.hh:397
│ │ │ │ +
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ +
static const int numVertices
Definition elementinfo.hh:55
│ │ │ │ +
int getMark() const
Definition elementinfo.hh:554
│ │ │ │ +
void leafTraverse(Functor &functor) const
Definition elementinfo.hh:708
│ │ │ │ +
Alberta::MeshPointer< dimension > MeshPointer
Definition elementinfo.hh:59
│ │ │ │ +
const Element * neighbor(int face) const
Definition elementinfo.hh:728
│ │ │ │ +
static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)
Definition elementinfo.hh:773
│ │ │ │ +
ElementInfo()
Definition elementinfo.hh:310
│ │ │ │ +
int boundaryId(int face) const
Definition elementinfo.hh:635
│ │ │ │ +
bool operator!=(const ElementInfo &other) const
Definition elementinfo.hh:432
│ │ │ │ +
Alberta::FillFlags< dimension > FillFlags
Definition elementinfo.hh:60
│ │ │ │ +
ElementInfo(const MeshPointer &mesh, const MacroElement &macroElement, typename FillFlags::Flags fillFlags=FillFlags::standard)
Definition elementinfo.hh:319
│ │ │ │ +
AffineTransformation * transformation(int face) const
Definition elementinfo.hh:651
│ │ │ │
bool isBoundary(int face) const
Definition elementinfo.hh:620
│ │ │ │
int indexInFather() const
Definition elementinfo.hh:457
│ │ │ │ +
Seed seed() const
Definition elementinfo.hh:496
│ │ │ │ +
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ +
const Element * element() const
Definition elementinfo.hh:721
│ │ │ │
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
│ │ │ │ -
Definition hierarchiciterator.hh:29
│ │ │ │ -
Definition albertagrid/intersectioniterator.hh:27
│ │ │ │ -
Definition albertagrid/entity.hh:46
│ │ │ │ -
void clearElement()
Definition entity.cc:70
│ │ │ │ -
ALBERTA EL_INFO * getElInfo() const
needed for the LevelIterator and LeafIterator
Definition entity.cc:62
│ │ │ │ -
int level() const
level of this element
Definition entity.cc:94
│ │ │ │ -
void setElement(const ElementInfo &elementInfo, int subEntity)
Definition entity.cc:78
│ │ │ │ -
PartitionType partitionType() const
return partition type of this entity
Definition entity.cc:40
│ │ │ │ -
Grid::template Codim< codim >::Geometry Geometry
Definition albertagrid/entity.hh:69
│ │ │ │ -
void setEntity(const This &other)
Definition entity.cc:87
│ │ │ │ -
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:130
│ │ │ │ -
Geometry geometry() const
geometry of this entity
Definition entity.cc:103
│ │ │ │ -
static const int dimension
Definition albertagrid/entity.hh:57
│ │ │ │ -
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:142
│ │ │ │ -
int subEntity() const
obtain number of the subentity within the element (in ALBERTA numbering)
Definition albertagrid/entity.hh:148
│ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:71
│ │ │ │ -
GeometryType type() const
type of geometry of this entity
Definition entity.cc:114
│ │ │ │ -
bool equals(const This &other) const
equality of entities
Definition entity.cc:48
│ │ │ │ -
Definition albertagrid/entity.hh:63
│ │ │ │ -
Definition albertagrid/entity.hh:185
│ │ │ │ -
Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:211
│ │ │ │ -
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:355
│ │ │ │ -
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:210
│ │ │ │ -
Definition albertagrid/geometry.hh:30
│ │ │ │ -
Definition albertagrid/geometry.hh:504
│ │ │ │ -
Definition albertagrid/intersectioniterator.hh:35
│ │ │ │ -
Definition albertagrid/intersectioniterator.hh:36
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
MeshPointer mesh() const
Definition elementinfo.hh:519
│ │ │ │ +
GeometryCache geometryCache() const
Definition elementinfo.hh:140
│ │ │ │ +
bool hasCoordinates() const
Definition elementinfo.hh:679
│ │ │ │ +
int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], int(&faceInNeighbor)[maxLevelNeighbors]) const
Definition elementinfo.hh:596
│ │ │ │ +
ElementInfo(ElementInfo &&other)
Definition elementinfo.hh:389
│ │ │ │ +
ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::Flags fillFlags=FillFlags::standard)
Definition elementinfo.hh:340
│ │ │ │ +
Definition elementinfo.hh:185
│ │ │ │ +
InstancePtr & parent()
Definition elementinfo.hh:189
│ │ │ │ +
Alberta::GeometryCache< dim > geometryCache
Definition elementinfo.hh:199
│ │ │ │ +
ALBERTA EL_INFO elInfo
Definition elementinfo.hh:186
│ │ │ │ +
unsigned int refCount
Definition elementinfo.hh:187
│ │ │ │ +
Definition elementinfo.hh:210
│ │ │ │ +
InstancePtr null()
Definition elementinfo.hh:907
│ │ │ │ +
~Stack()
Definition elementinfo.hh:871
│ │ │ │ +
void release(InstancePtr &p)
Definition elementinfo.hh:897
│ │ │ │ +
Stack()
Definition elementinfo.hh:861
│ │ │ │ +
InstancePtr allocate()
Definition elementinfo.hh:884
│ │ │ │ +
Definition elementinfo.hh:255
│ │ │ │ +
Seed(const int macroIndex, const int level, const unsigned long path)
Definition elementinfo.hh:260
│ │ │ │ +
Seed()
Definition elementinfo.hh:256
│ │ │ │ +
int level() const
Definition elementinfo.hh:287
│ │ │ │ +
bool isValid() const
Definition elementinfo.hh:284
│ │ │ │ +
unsigned long path() const
Definition elementinfo.hh:288
│ │ │ │ +
int macroIndex() const
Definition elementinfo.hh:286
│ │ │ │ +
Definition geometrycache.hh:24
│ │ │ │ +
Definition geometrycache.hh:91
│ │ │ │ +
Definition macroelement.hh:24
│ │ │ │ +
Definition misc.hh:148
│ │ │ │ +
Definition misc.hh:231
│ │ │ │ +
static const Flags nothing
Definition misc.hh:234
│ │ │ │ +
static const Flags boundaryId
Definition misc.hh:246
│ │ │ │ +
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ │ +
static const Flags coords
Definition misc.hh:236
│ │ │ │ +
static const Flags standard
Definition misc.hh:258
│ │ │ │ +
static const Flags neighbor
Definition misc.hh:238
│ │ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:538
│ │ │ │ +
Definition albertagrid/projection.hh:208
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,505 +1,1211 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -entity.cc │ │ │ │ │ +elementinfo.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ -_6#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ +5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ │ +6#define DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ │ 7 │ │ │ │ │ -8namespace _D_u_n_e │ │ │ │ │ -9{ │ │ │ │ │ -10 │ │ │ │ │ -11 // AlbertaGridEntity (for codim > 0) │ │ │ │ │ -12 // --------------------------------- │ │ │ │ │ -13 │ │ │ │ │ -14 template │ │ │ │ │ -15 inline AlbertaGridEntity< codim, dim, Grid > │ │ │ │ │ -_1_6 ::AlbertaGridEntity ( const _G_r_i_d &grid, const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int │ │ │ │ │ -subEntity ) │ │ │ │ │ -17 : grid_( &grid ), │ │ │ │ │ -18 elementInfo_( elementInfo ), │ │ │ │ │ -19 subEntity_( subEntity ) │ │ │ │ │ -20 {} │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ +19 │ │ │ │ │ +20#if HAVE_ALBERTA │ │ │ │ │ 21 │ │ │ │ │ -22 template │ │ │ │ │ -23 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_2_4_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y ( const _G_r_i_d &grid ) │ │ │ │ │ -25 : grid_( &grid ), │ │ │ │ │ -26 elementInfo_(), │ │ │ │ │ -27 subEntity_( -1 ) │ │ │ │ │ -28 {} │ │ │ │ │ -29 │ │ │ │ │ -30 template │ │ │ │ │ -31 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_3_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y () │ │ │ │ │ -33 : grid_( _N_U_L_L ), │ │ │ │ │ -34 elementInfo_(), │ │ │ │ │ -35 subEntity_( -1 ) │ │ │ │ │ -36 {} │ │ │ │ │ +22namespace _D_u_n_e │ │ │ │ │ +23{ │ │ │ │ │ +24 │ │ │ │ │ +25 namespace Alberta │ │ │ │ │ +26 { │ │ │ │ │ +27 │ │ │ │ │ +28 // External Forward Declarations │ │ │ │ │ +29 // ----------------------------- │ │ │ │ │ +30 │ │ │ │ │ +31 template< int dim > │ │ │ │ │ +32 class MeshPointer; │ │ │ │ │ +33 │ │ │ │ │ +34 struct BasicNodeProjection; │ │ │ │ │ +35 │ │ │ │ │ +36 │ │ │ │ │ 37 │ │ │ │ │ -38 template< int codim, int dim, class Grid > │ │ │ │ │ -39 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -_4_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_d_i_m_,_G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ -41 { │ │ │ │ │ -42 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -45 │ │ │ │ │ -46 template< int codim, int dim, class Grid > │ │ │ │ │ -47 inline bool │ │ │ │ │ -_4_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_q_u_a_l_s ( const _T_h_i_s &_o_t_h_e_r ) const │ │ │ │ │ -49 { │ │ │ │ │ -50 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *_e_1 = elementInfo().el(); │ │ │ │ │ -51 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *_e_2 = _o_t_h_e_r.elementInfo().el(); │ │ │ │ │ -52 │ │ │ │ │ -53 // if both element null then they are equal │ │ │ │ │ -54 if( (_e_1 == _N_U_L_L) && (_e_2 == _N_U_L_L) ) │ │ │ │ │ -55 return true; │ │ │ │ │ -56 return ((_e_1 == _e_2) && (subEntity_ == _o_t_h_e_r.subEntity_)); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -59 │ │ │ │ │ -60 template< int codim, int dim, class Grid > │ │ │ │ │ -61 inline _A_L_B_E_R_T_A EL_INFO * │ │ │ │ │ -_6_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_t_E_l_I_n_f_o () const │ │ │ │ │ -63 { │ │ │ │ │ -64 return &(elementInfo_.elInfo()); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 │ │ │ │ │ -68 template< int codim, int dim, class Grid > │ │ │ │ │ -69 inline void │ │ │ │ │ -_7_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_c_l_e_a_r_E_l_e_m_e_n_t () │ │ │ │ │ -71 { │ │ │ │ │ -72 elementInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ -73 } │ │ │ │ │ +38 // ElementInfo │ │ │ │ │ +39 // ----------- │ │ │ │ │ +40 │ │ │ │ │ +41 template< int dim > │ │ │ │ │ +_4_2 class _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +43 { │ │ │ │ │ +44 struct _I_n_s_t_a_n_c_e; │ │ │ │ │ +45 class _S_t_a_c_k; │ │ │ │ │ +46 │ │ │ │ │ +47 template< int > │ │ │ │ │ +48 struct Library; │ │ │ │ │ +49 │ │ │ │ │ +50 typedef _I_n_s_t_a_n_c_e *_I_n_s_t_a_n_c_e_P_t_r; │ │ │ │ │ +51 │ │ │ │ │ +52 public: │ │ │ │ │ +_5_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +54 │ │ │ │ │ +_5_5 static const int _n_u_m_V_e_r_t_i_c_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ │ +_v_a_l_u_e; │ │ │ │ │ +_5_6 static const int _n_u_m_F_a_c_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _1_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +57 │ │ │ │ │ +_5_8 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_ _> _M_a_c_r_o_E_l_e_m_e_n_t; │ │ │ │ │ +_5_9 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +_6_0 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_e_n_s_i_o_n_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ │ +61 │ │ │ │ │ +_6_2 static const int _m_a_x_N_e_i_g_h_b_o_r_s = N_NEIGH_MAX; │ │ │ │ │ +63 │ │ │ │ │ +_6_4 static const int _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s = Library< dimWorld >::maxLevelNeighbors; │ │ │ │ │ +65 │ │ │ │ │ +66#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +_6_7 typedef _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_<_ _d_i_m_ _> _G_e_o_m_e_t_r_y_C_a_c_h_e; │ │ │ │ │ +68#endif │ │ │ │ │ +69 │ │ │ │ │ +70 struct _S_e_e_d; │ │ │ │ │ +71 │ │ │ │ │ +72 private: │ │ │ │ │ +73 explicit _E_l_e_m_e_n_t_I_n_f_o ( const _I_n_s_t_a_n_c_e_P_t_r &instance ); │ │ │ │ │ 74 │ │ │ │ │ -75 │ │ │ │ │ -76 template< int codim, int dim, class Grid > │ │ │ │ │ -77 inline void _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_7_8_ _:_:_s_e_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) │ │ │ │ │ -79 { │ │ │ │ │ -80 elementInfo_ = elementInfo; │ │ │ │ │ -81 subEntity_ = subEntity; │ │ │ │ │ -82 } │ │ │ │ │ +75 public: │ │ │ │ │ +_7_6 _E_l_e_m_e_n_t_I_n_f_o (); │ │ │ │ │ +_7_7 _E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, const _M_a_c_r_o_E_l_e_m_e_n_t &_m_a_c_r_o_E_l_e_m_e_n_t, │ │ │ │ │ +78 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ); │ │ │ │ │ +_7_9 _E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, const Seed &_s_e_e_d, │ │ │ │ │ +80 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ); │ │ │ │ │ +_8_1 _E_l_e_m_e_n_t_I_n_f_o ( const _E_l_e_m_e_n_t_I_n_f_o &other ); │ │ │ │ │ +_8_2 _E_l_e_m_e_n_t_I_n_f_o ( _E_l_e_m_e_n_t_I_n_f_o&& other ); │ │ │ │ │ 83 │ │ │ │ │ -84 │ │ │ │ │ -85 template< int codim, int dim, class Grid > │ │ │ │ │ -86 inline void │ │ │ │ │ -_8_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_e_t_E_n_t_i_t_y ( const _T_h_i_s &_o_t_h_e_r ) │ │ │ │ │ -88 { │ │ │ │ │ -89 setElement( _o_t_h_e_r.elementInfo_, _o_t_h_e_r.subEntity_ ); │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -92 │ │ │ │ │ -93 template< int codim, int dim, class Grid > │ │ │ │ │ -_9_4 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_l_e_v_e_l() const │ │ │ │ │ -95 { │ │ │ │ │ -96 _a_s_s_e_r_t( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) ); │ │ │ │ │ -97 return elementInfo_.level(); │ │ │ │ │ -98 } │ │ │ │ │ +_8_4 _~_E_l_e_m_e_n_t_I_n_f_o (); │ │ │ │ │ +85 │ │ │ │ │ +_8_6 _E_l_e_m_e_n_t_I_n_f_o &_o_p_e_r_a_t_o_r_=_ ( const _E_l_e_m_e_n_t_I_n_f_o &other ); │ │ │ │ │ +_8_7 _E_l_e_m_e_n_t_I_n_f_o &_o_p_e_r_a_t_o_r_=_ ( _E_l_e_m_e_n_t_I_n_f_o &&other ); │ │ │ │ │ +88 │ │ │ │ │ +_8_9 explicit operator bool () const { return (instance_ != null()); } │ │ │ │ │ +90 │ │ │ │ │ +_9_1 bool _o_p_e_r_a_t_o_r_=_=_ ( const _E_l_e_m_e_n_t_I_n_f_o &other ) const; │ │ │ │ │ +_9_2 bool _o_p_e_r_a_t_o_r_!_=_ ( const _E_l_e_m_e_n_t_I_n_f_o &other ) const; │ │ │ │ │ +93 │ │ │ │ │ +_9_4 const _M_a_c_r_o_E_l_e_m_e_n_t &_m_a_c_r_o_E_l_e_m_e_n_t () const; │ │ │ │ │ +_9_5 _E_l_e_m_e_n_t_I_n_f_o _f_a_t_h_e_r () const; │ │ │ │ │ +_9_6 int _i_n_d_e_x_I_n_F_a_t_h_e_r () const; │ │ │ │ │ +_9_7 _E_l_e_m_e_n_t_I_n_f_o _c_h_i_l_d ( int i ) const; │ │ │ │ │ +_9_8 bool _i_s_L_e_a_f () const; │ │ │ │ │ 99 │ │ │ │ │ -100 │ │ │ │ │ -101 template< int codim, int dim, class Grid > │ │ │ │ │ -102 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -_1_0_3 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ -104 { │ │ │ │ │ -105 typedef _A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r_<_ _c_o_d_i_m_,_ _G_r_i_d_ _> _C_o_o_r_d_R_e_a_d_e_r; │ │ │ │ │ -106 │ │ │ │ │ -107 _a_s_s_e_r_t( elementInfo_ ); │ │ │ │ │ -108 const _C_o_o_r_d_R_e_a_d_e_r _c_o_o_r_d_R_e_a_d_e_r( grid(), elementInfo_, subEntity_ ); │ │ │ │ │ -109 return _G_e_o_m_e_t_r_y( GeometryImpl( _c_o_o_r_d_R_e_a_d_e_r ) ); │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -112 │ │ │ │ │ -113 template< int codim, int dim, class Grid > │ │ │ │ │ -_1_1_4 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_t_y_p_e () const │ │ │ │ │ -115 { │ │ │ │ │ -116 return GeometryTypes::simplex( mydimension ); │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -119 │ │ │ │ │ -120 │ │ │ │ │ -121 // AlbertaGridEntity (for codim = 0) │ │ │ │ │ -122 // --------------------------------- │ │ │ │ │ -123 │ │ │ │ │ -124 template< int dim, class Grid > │ │ │ │ │ -125 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_1_2_6_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y ( const _G_r_i_d &grid, const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int │ │ │ │ │ -subEntity ) │ │ │ │ │ -127 : grid_( &grid ), │ │ │ │ │ -128 elementInfo_( elementInfo ) │ │ │ │ │ -129 { │ │ │ │ │ -130 assert( _s_u_b_E_n_t_i_t_y == 0 ); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -133 template< int dim, class Grid > │ │ │ │ │ -134 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_1_3_5_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y( const _G_r_i_d &grid ) │ │ │ │ │ -136 : grid_( &grid ), │ │ │ │ │ -137 elementInfo_() │ │ │ │ │ -138 {} │ │ │ │ │ -139 │ │ │ │ │ -140 template< int dim, class Grid > │ │ │ │ │ -141 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_1_4_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y () │ │ │ │ │ -143 : grid_( NULL ), │ │ │ │ │ -144 elementInfo_() │ │ │ │ │ -145 {} │ │ │ │ │ -146 │ │ │ │ │ -147 │ │ │ │ │ -148 template< int dim, class Grid > │ │ │ │ │ -_1_4_9 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d() const │ │ │ │ │ -150 { │ │ │ │ │ -151 // elements are always inside of our Domain │ │ │ │ │ -152 return 0; │ │ │ │ │ -153 } │ │ │ │ │ -154 │ │ │ │ │ -155 │ │ │ │ │ -156 template< int dim, class Grid > │ │ │ │ │ -_1_5_7 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_s_N_e_w () const │ │ │ │ │ -158 { │ │ │ │ │ -159 return _g_r_i_d().levelProvider().isNew( elementInfo_ ); │ │ │ │ │ -160 } │ │ │ │ │ +_1_0_0 Seed _s_e_e_d () const; │ │ │ │ │ +101 │ │ │ │ │ +_1_0_2 _M_e_s_h_P_o_i_n_t_e_r _m_e_s_h () const; │ │ │ │ │ +103 │ │ │ │ │ +_1_0_4 bool _m_i_g_h_t_V_a_n_i_s_h () const; │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 int _l_e_v_e_l () const; │ │ │ │ │ +107 // see ALBERTA documentation for definition of element type │ │ │ │ │ +108 // values are 0, 1, 2 │ │ │ │ │ +_1_0_9 int _t_y_p_e () const; │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 int _g_e_t_M_a_r_k () const; │ │ │ │ │ +_1_1_2 void _s_e_t_M_a_r_k ( int refCount ) const; │ │ │ │ │ +113 │ │ │ │ │ +_1_1_4 bool _h_a_s_L_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const; │ │ │ │ │ +_1_1_5 _E_l_e_m_e_n_t_I_n_f_o _l_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const; │ │ │ │ │ +116 │ │ │ │ │ +117 /* obtain all level neighbors of a face │ │ │ │ │ +118 * │ │ │ │ │ +119 * param[in] face face for which the neighbors are desired │ │ │ │ │ +120 * param[out] neighbor array storing the neighbors │ │ │ │ │ +121 * param[out] faceInNeighbor array storing the faces in neighbor │ │ │ │ │ +122 * (-1, if this neighbor does not exist) │ │ │ │ │ +123 * │ │ │ │ │ +124 * returns (potential) number of neighbors (i.e., the number of valid │ │ │ │ │ +125 * entries in the output arrays │ │ │ │ │ +126 */ │ │ │ │ │ +_1_2_7 int _l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const int face, _E_l_e_m_e_n_t_I_n_f_o (&_n_e_i_g_h_b_o_r) │ │ │ │ │ +[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ], int (&faceInNeighbor)[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ] ) const; │ │ │ │ │ +128 │ │ │ │ │ +129 template< int codim > │ │ │ │ │ +_1_3_0 int _t_w_i_s_t ( int subEntity ) const; │ │ │ │ │ +_1_3_1 int _t_w_i_s_t_I_n_N_e_i_g_h_b_o_r ( int face ) const; │ │ │ │ │ +_1_3_2 bool _i_s_B_o_u_n_d_a_r_y ( int face ) const; │ │ │ │ │ +_1_3_3 int _b_o_u_n_d_a_r_y_I_d ( int face ) const; │ │ │ │ │ +_1_3_4 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int face ) const; │ │ │ │ │ +_1_3_5 _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n *_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n ( int face ) const; │ │ │ │ │ +136 │ │ │ │ │ +_1_3_7 bool _h_a_s_C_o_o_r_d_i_n_a_t_e_s () const; │ │ │ │ │ +_1_3_8 const _G_l_o_b_a_l_V_e_c_t_o_r &_c_o_o_r_d_i_n_a_t_e ( int vertex ) const; │ │ │ │ │ +139#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +_1_4_0 _G_e_o_m_e_t_r_y_C_a_c_h_e _g_e_o_m_e_t_r_y_C_a_c_h_e () const │ │ │ │ │ +141 { │ │ │ │ │ +142 return _G_e_o_m_e_t_r_y_C_a_c_h_e( instance_->_g_e_o_m_e_t_r_y_C_a_c_h_e, instance_->_e_l_I_n_f_o ); │ │ │ │ │ +143 } │ │ │ │ │ +144#endif │ │ │ │ │ +145 │ │ │ │ │ +146 template< class Functor > │ │ │ │ │ +_1_4_7 void _h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor ) const; │ │ │ │ │ +148 │ │ │ │ │ +149 template< class Functor > │ │ │ │ │ +_1_5_0 void _l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor ) const; │ │ │ │ │ +151 │ │ │ │ │ +_1_5_2 const _E_l_e_m_e_n_t *_e_l_e_m_e_n_t () const; │ │ │ │ │ +_1_5_3 const _E_l_e_m_e_n_t *_n_e_i_g_h_b_o_r ( int face ) const; │ │ │ │ │ +_1_5_4 _E_l_e_m_e_n_t *_e_l () const; │ │ │ │ │ +_1_5_5 _A_L_B_E_R_T_A EL_INFO &_e_l_I_n_f_o () const; │ │ │ │ │ +156 │ │ │ │ │ +157 static _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +_1_5_8 _c_r_e_a_t_e_F_a_k_e ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, │ │ │ │ │ +159 const _E_l_e_m_e_n_t *_e_l_e_m_e_n_t, int _l_e_v_e_l, int _t_y_p_e = 0 ); │ │ │ │ │ +_1_6_0 static _E_l_e_m_e_n_t_I_n_f_o _c_r_e_a_t_e_F_a_k_e ( const _A_L_B_E_R_T_A EL_INFO &_e_l_I_n_f_o ); │ │ │ │ │ 161 │ │ │ │ │ -162 │ │ │ │ │ -163 template< int dim, class Grid > │ │ │ │ │ -_1_6_4 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ │ -165 { │ │ │ │ │ -166 return elementInfo_._m_i_g_h_t_V_a_n_i_s_h(); │ │ │ │ │ -167 } │ │ │ │ │ +162 private: │ │ │ │ │ +163 static bool _i_s_L_e_a_f ( _E_l_e_m_e_n_t *_e_l_e_m_e_n_t ); │ │ │ │ │ +164 static bool _m_i_g_h_t_V_a_n_i_s_h ( _E_l_e_m_e_n_t *_e_l_e_m_e_n_t, int depth ); │ │ │ │ │ +165 │ │ │ │ │ +166 static void fill ( _M_e_s_h *_m_e_s_h, const _A_L_B_E_R_T_A MACRO_EL *mel, _A_L_B_E_R_T_A EL_INFO │ │ │ │ │ +&_e_l_I_n_f_o ); │ │ │ │ │ +167 static void fill ( int ichild, const _A_L_B_E_R_T_A EL_INFO &parentInfo, _A_L_B_E_R_T_A │ │ │ │ │ +EL_INFO &_e_l_I_n_f_o ); │ │ │ │ │ 168 │ │ │ │ │ -169 │ │ │ │ │ -170 template< int dim, class Grid > │ │ │ │ │ -171 inline bool │ │ │ │ │ -_1_7_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_a_s_B_o_u_n_d_a_r_y_I_n_t_e_r_s_e_c_t_i_o_n_s () const │ │ │ │ │ -173 { │ │ │ │ │ -174 assert( elementInfo_ ); │ │ │ │ │ -175 bool isBoundary = false; │ │ │ │ │ -176 for( int i = 0; i < dim+1; ++i ) │ │ │ │ │ -177 isBoundary |= elementInfo_._i_s_B_o_u_n_d_a_r_y( i ); │ │ │ │ │ -178 return isBoundary; │ │ │ │ │ -179 } │ │ │ │ │ -180 │ │ │ │ │ -181 │ │ │ │ │ -182 template< int dim, class Grid > │ │ │ │ │ -183 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -_1_8_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ │ +169 void addReference () const; │ │ │ │ │ +170 void removeReference () const; │ │ │ │ │ +171 │ │ │ │ │ +172 static InstancePtr null (); │ │ │ │ │ +173 static Stack &stack (); │ │ │ │ │ +174 │ │ │ │ │ +175 InstancePtr instance_; │ │ │ │ │ +176 }; │ │ │ │ │ +177 │ │ │ │ │ +178 │ │ │ │ │ +179 │ │ │ │ │ +180 // ElementInfo::Instance │ │ │ │ │ +181 // --------------------- │ │ │ │ │ +182 │ │ │ │ │ +183 template< int dim > │ │ │ │ │ +_1_8_4 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::_I_n_s_t_a_n_c_e │ │ │ │ │ 185 { │ │ │ │ │ -186 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ -187 } │ │ │ │ │ +_1_8_6 _A_L_B_E_R_T_A EL_INFO _e_l_I_n_f_o; │ │ │ │ │ +_1_8_7 unsigned int _r_e_f_C_o_u_n_t; │ │ │ │ │ 188 │ │ │ │ │ -189 │ │ │ │ │ -190 template< int dim, class Grid > │ │ │ │ │ -_1_9_1 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_G_r_i_d_ _>_:_:_i_s_L_e_a_f () const │ │ │ │ │ -192 { │ │ │ │ │ -193 return elementInfo_.isLeaf(); │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ +_1_8_9 _I_n_s_t_a_n_c_e_P_t_r &_p_a_r_e_n_t () │ │ │ │ │ +190 { │ │ │ │ │ +191 return parent_; │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +194 private: │ │ │ │ │ +195 _I_n_s_t_a_n_c_e_P_t_r parent_; │ │ │ │ │ 196 │ │ │ │ │ -197 template< int dim, class Grid > │ │ │ │ │ -198 inline bool │ │ │ │ │ -_1_9_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ │ -200 { │ │ │ │ │ -201 // element pointers are unique │ │ │ │ │ -202 return (_e_l_e_m_e_n_t_I_n_f_o().el() == other._e_l_e_m_e_n_t_I_n_f_o().el()); │ │ │ │ │ -203 } │ │ │ │ │ +197#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +198 public: │ │ │ │ │ +_1_9_9 _A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> _g_e_o_m_e_t_r_y_C_a_c_h_e; │ │ │ │ │ +200#endif │ │ │ │ │ +201 }; │ │ │ │ │ +202 │ │ │ │ │ +203 │ │ │ │ │ 204 │ │ │ │ │ -205 │ │ │ │ │ -206 template< int dim, class Grid > │ │ │ │ │ -207 template< int codim > │ │ │ │ │ -208 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< codim >::Entity │ │ │ │ │ -_2_0_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_u_b_E_n_t_i_t_y ( int i ) const │ │ │ │ │ +205 // ElementInfo::Stack │ │ │ │ │ +206 // ------------------ │ │ │ │ │ +207 │ │ │ │ │ +208 template< int dim > │ │ │ │ │ +_2_0_9 class _E_l_e_m_e_n_t_I_n_f_o< dim >::_S_t_a_c_k │ │ │ │ │ 210 { │ │ │ │ │ -211 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ │ -212 return EntityImpl( _g_r_i_d(), elementInfo_, _g_r_i_d().generic2alberta( codim, i ) │ │ │ │ │ -); │ │ │ │ │ -213 } │ │ │ │ │ -214 │ │ │ │ │ -215 │ │ │ │ │ -216 template< int dim, class Grid > │ │ │ │ │ -217 inline _A_L_B_E_R_T_A EL_INFO * │ │ │ │ │ -_2_1_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_t_E_l_I_n_f_o () const │ │ │ │ │ -219 { │ │ │ │ │ -220 return &(elementInfo_._e_l_I_n_f_o()); │ │ │ │ │ -221 } │ │ │ │ │ +211 _I_n_s_t_a_n_c_e_P_t_r top_; │ │ │ │ │ +212 _I_n_s_t_a_n_c_e null_; │ │ │ │ │ +213 │ │ │ │ │ +214 public: │ │ │ │ │ +_2_1_5 Stack (); │ │ │ │ │ +_2_1_6 ~Stack (); │ │ │ │ │ +217 │ │ │ │ │ +_2_1_8 InstancePtr allocate (); │ │ │ │ │ +_2_1_9 void release ( InstancePtr &p ); │ │ │ │ │ +_2_2_0 InstancePtr null (); │ │ │ │ │ +221 }; │ │ │ │ │ 222 │ │ │ │ │ 223 │ │ │ │ │ -224 template< int dim, class Grid > │ │ │ │ │ -_2_2_5 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_l_e_v_e_l () const │ │ │ │ │ -226 { │ │ │ │ │ -227 assert( elementInfo_._l_e_v_e_l() == _g_r_i_d().levelProvider() ( elementInfo_ ) ); │ │ │ │ │ -228 return elementInfo_._l_e_v_e_l(); │ │ │ │ │ -229 } │ │ │ │ │ -230 │ │ │ │ │ -231 │ │ │ │ │ -232 template< int dim, class Grid > │ │ │ │ │ -233 inline void │ │ │ │ │ -_2_3_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_c_l_e_a_r_E_l_e_m_e_n_t () │ │ │ │ │ -235 { │ │ │ │ │ -236 elementInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ -237 } │ │ │ │ │ +224 │ │ │ │ │ +225 // ElementInfo::Library │ │ │ │ │ +226 // -------------------- │ │ │ │ │ +227 │ │ │ │ │ +228 template< int dim > │ │ │ │ │ +229 template< int > │ │ │ │ │ +230 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::Library │ │ │ │ │ +231 { │ │ │ │ │ +232 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +233 │ │ │ │ │ +234 static const int _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s = (1 << (dim-1)); │ │ │ │ │ +235 │ │ │ │ │ +236 static int │ │ │ │ │ +237 _l_e_a_f_N_e_i_g_h_b_o_r ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +&_n_e_i_g_h_b_o_r ); │ │ │ │ │ 238 │ │ │ │ │ -239 │ │ │ │ │ -240 template< int dim, class Grid > │ │ │ │ │ -241 inline void _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -_2_4_2_ _:_:_s_e_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int /* subEntity */ ) │ │ │ │ │ -243 { │ │ │ │ │ -244 elementInfo_ = elementInfo; │ │ │ │ │ -245 } │ │ │ │ │ -246 │ │ │ │ │ +239 static int │ │ │ │ │ +240 _l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, │ │ │ │ │ +241 _E_l_e_m_e_n_t_I_n_f_o (&_n_e_i_g_h_b_o_r)[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ], int (&faceInNeighbor) │ │ │ │ │ +[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ] ); │ │ │ │ │ +242 │ │ │ │ │ +243 private: │ │ │ │ │ +244 static int │ │ │ │ │ +245 macroNeighbor ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +&_n_e_i_g_h_b_o_r ); │ │ │ │ │ +246 }; │ │ │ │ │ 247 │ │ │ │ │ -248 template< int dim, class Grid > │ │ │ │ │ -249 inline void │ │ │ │ │ -_2_5_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_e_t_E_n_t_i_t_y( const _T_h_i_s &other ) │ │ │ │ │ -251 { │ │ │ │ │ -252 _s_e_t_E_l_e_m_e_n_t( other.elementInfo_, 0 ); │ │ │ │ │ -253 } │ │ │ │ │ -254 │ │ │ │ │ -255 │ │ │ │ │ -256 template< int dim, class Grid > │ │ │ │ │ -257 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -_2_5_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ │ -259 { │ │ │ │ │ -260 typedef _A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r_<_ _0_,_ _G_r_i_d_ _> CoordReader; │ │ │ │ │ -261 │ │ │ │ │ -262 assert( elementInfo_ ); │ │ │ │ │ -263 const CoordReader coordReader( _g_r_i_d(), elementInfo_, 0 ); │ │ │ │ │ -264 return _G_e_o_m_e_t_r_y( _G_e_o_m_e_t_r_y_I_m_p_l( coordReader ) ); │ │ │ │ │ -265 } │ │ │ │ │ -266 │ │ │ │ │ -267 │ │ │ │ │ -268 template< int dim, class Grid > │ │ │ │ │ -_2_6_9 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_>_:_:_t_y_p_e () const │ │ │ │ │ +248 │ │ │ │ │ +249 │ │ │ │ │ +250 // ElementInfo::Seed │ │ │ │ │ +251 // ----------------- │ │ │ │ │ +252 │ │ │ │ │ +253 template< int dim > │ │ │ │ │ +_2_5_4 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::_S_e_e_d │ │ │ │ │ +255 { │ │ │ │ │ +_2_5_6 _S_e_e_d () │ │ │ │ │ +257 : macroIndex_( -1 ), level_( 0 ), path_( 0 ) │ │ │ │ │ +258 {} │ │ │ │ │ +259 │ │ │ │ │ +_2_6_0 _S_e_e_d ( const int macroIndex, const int _l_e_v_e_l, const unsigned long path ) │ │ │ │ │ +261 : macroIndex_( macroIndex ), level_( _l_e_v_e_l ), path_( path ) │ │ │ │ │ +262 {} │ │ │ │ │ +263 │ │ │ │ │ +_2_6_4 bool _o_p_e_r_a_t_o_r_=_=_ ( const _S_e_e_d &other ) const │ │ │ │ │ +265 { │ │ │ │ │ +266 return (macroIndex() == other._m_a_c_r_o_I_n_d_e_x()) && (_l_e_v_e_l() == other._l_e_v_e_l()) │ │ │ │ │ +&& (path() == other._p_a_t_h()); │ │ │ │ │ +267 } │ │ │ │ │ +268 │ │ │ │ │ +_2_6_9 bool operator< ( const _S_e_e_d &other ) const │ │ │ │ │ 270 { │ │ │ │ │ -271 return GeometryTypes::simplex( mydimension ); │ │ │ │ │ -272 } │ │ │ │ │ -273 │ │ │ │ │ -274 │ │ │ │ │ -275 template< int dim, class Grid > │ │ │ │ │ -276 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity │ │ │ │ │ -_2_7_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_f_a_t_h_e_r () const │ │ │ │ │ -278 { │ │ │ │ │ -279 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ │ -280 │ │ │ │ │ -281 assert( elementInfo_ ); │ │ │ │ │ -282 const _E_l_e_m_e_n_t_I_n_f_o fatherInfo = elementInfo_._f_a_t_h_e_r(); │ │ │ │ │ +271 const bool ml = (macroIndex() < other._m_a_c_r_o_I_n_d_e_x()); │ │ │ │ │ +272 const bool me = (macroIndex() == other._m_a_c_r_o_I_n_d_e_x()); │ │ │ │ │ +273 const bool ll = (_l_e_v_e_l() < other._l_e_v_e_l()); │ │ │ │ │ +274 const bool le = (_l_e_v_e_l() == other._l_e_v_e_l()); │ │ │ │ │ +275 const bool pl = (path() < other._p_a_t_h()); │ │ │ │ │ +276 return ml | (me & (ll | (le & pl))); │ │ │ │ │ +277 } │ │ │ │ │ +278 │ │ │ │ │ +_2_7_9 bool _o_p_e_r_a_t_o_r_!_=_ ( const _S_e_e_d &other ) const { return !(*this == other); } │ │ │ │ │ +_2_8_0 bool operator<= ( const _S_e_e_d &other ) const { return !(other < *this); } │ │ │ │ │ +_2_8_1 bool operator> ( const _S_e_e_d &other ) const { return (other < *this); } │ │ │ │ │ +_2_8_2 bool operator>= ( const _S_e_e_d &other ) const { return !(*this < other); } │ │ │ │ │ 283 │ │ │ │ │ -284 return EntityImpl( _g_r_i_d(), fatherInfo, 0 ); │ │ │ │ │ -285 } │ │ │ │ │ -286 │ │ │ │ │ -287 │ │ │ │ │ -288 template< int dim, class Grid > │ │ │ │ │ -289 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_n_C_h_i_l_d () const │ │ │ │ │ -290 { │ │ │ │ │ -291 return elementInfo_._i_n_d_e_x_I_n_F_a_t_h_e_r(); │ │ │ │ │ -292 } │ │ │ │ │ -293 │ │ │ │ │ -294 │ │ │ │ │ -295 template< int dim, class Grid > │ │ │ │ │ -296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry │ │ │ │ │ -_2_9_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r() const │ │ │ │ │ -298 { │ │ │ │ │ -299 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _> LocalGeoProvider; │ │ │ │ │ -300 const int indexInFather = elementInfo_._i_n_d_e_x_I_n_F_a_t_h_e_r(); │ │ │ │ │ -301 const int orientation = (elementInfo_._t_y_p_e() == 1 ? -1 : 1); │ │ │ │ │ -302 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().geometryInFather │ │ │ │ │ -( indexInFather, orientation ) ); │ │ │ │ │ -303 } │ │ │ │ │ -304 │ │ │ │ │ -305 │ │ │ │ │ -306 template< int dim, class Grid > │ │ │ │ │ -307 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -_3_0_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_b_e_g_i_n( int maxlevel ) const │ │ │ │ │ -309 { │ │ │ │ │ -310 assert( elementInfo_ ); │ │ │ │ │ -311 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_ _> IteratorImp; │ │ │ │ │ -312 return IteratorImp( _g_r_i_d(), elementInfo_, maxlevel ); │ │ │ │ │ -313 } │ │ │ │ │ -314 │ │ │ │ │ +_2_8_4 bool _i_s_V_a_l_i_d ( ) const { return macroIndex_ != -1; } │ │ │ │ │ +285 │ │ │ │ │ +_2_8_6 int _m_a_c_r_o_I_n_d_e_x () const { return macroIndex_; } │ │ │ │ │ +_2_8_7 int _l_e_v_e_l () const { return level_; } │ │ │ │ │ +_2_8_8 unsigned long _p_a_t_h () const { return path_; } │ │ │ │ │ +289 │ │ │ │ │ +290 private: │ │ │ │ │ +291 int macroIndex_; │ │ │ │ │ +292 int level_; │ │ │ │ │ +293 unsigned long path_; │ │ │ │ │ +294 }; │ │ │ │ │ +295 │ │ │ │ │ +296 │ │ │ │ │ +297 │ │ │ │ │ +298 // Implementation of ElementInfo │ │ │ │ │ +299 // ----------------------------- │ │ │ │ │ +300 │ │ │ │ │ +301 template< int dim > │ │ │ │ │ +302 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( const InstancePtr &instance ) │ │ │ │ │ +303 : instance_( instance ) │ │ │ │ │ +304 { │ │ │ │ │ +305 addReference(); │ │ │ │ │ +306 } │ │ │ │ │ +307 │ │ │ │ │ +308 │ │ │ │ │ +309 template< int dim > │ │ │ │ │ +_3_1_0 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o () │ │ │ │ │ +311 : instance_( null() ) │ │ │ │ │ +312 { │ │ │ │ │ +313 addReference(); │ │ │ │ │ +314 } │ │ │ │ │ 315 │ │ │ │ │ -316 template< int dim, class Grid > │ │ │ │ │ -317 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -_3_1_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_>_:_:_h_e_n_d( int maxlevel ) const │ │ │ │ │ -319 { │ │ │ │ │ -320 assert( elementInfo_ ); │ │ │ │ │ -321 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_ _> IteratorImp; │ │ │ │ │ -322 return IteratorImp( grid(), level(), maxlevel ); │ │ │ │ │ -323 } │ │ │ │ │ -324 │ │ │ │ │ +316 │ │ │ │ │ +317 template< int dim > │ │ │ │ │ +318 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ +_3_1_9_ _:_:_E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, const _M_a_c_r_o_E_l_e_m_e_n_t ¯oElement, │ │ │ │ │ +320 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) │ │ │ │ │ +321 { │ │ │ │ │ +322 instance_ = stack().allocate(); │ │ │ │ │ +323 instance_->parent() = null(); │ │ │ │ │ +324 ++(instance_->parent()->refCount); │ │ │ │ │ 325 │ │ │ │ │ -326 template< int dim, class Grid > │ │ │ │ │ -327 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_3_2_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_l_e_a_f_b_e_g_i_n() const │ │ │ │ │ -329 { │ │ │ │ │ -330 assert( elementInfo_ ); │ │ │ │ │ -331 │ │ │ │ │ -332#ifndef NDEBUG │ │ │ │ │ -333 for( int i = 0; i <= _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -334 { │ │ │ │ │ -335 // std::cout << "Opposite vertex " << i << ": " │ │ │ │ │ -336 // << (int)(getElInfo()->opp_vertex[ i ]) << std::endl; │ │ │ │ │ -337 if( _g_e_t_E_l_I_n_f_o()->opp_vertex[ i ] == 127 ) │ │ │ │ │ -338 { │ │ │ │ │ -339 assert( false ); │ │ │ │ │ -340 DUNE_THROW( NotImplemented, "AlbertaGrid: Intersections on outside " │ │ │ │ │ -341 "entities are not fully implemented, yet." ); │ │ │ │ │ -342 } │ │ │ │ │ -343 } │ │ │ │ │ -344#endif // #ifndef NDEBUG │ │ │ │ │ -345 │ │ │ │ │ -346 typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_B_e_g_i_n begin; │ │ │ │ │ -347 return _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r( *this, begin ); │ │ │ │ │ -348 } │ │ │ │ │ -349 │ │ │ │ │ -350 │ │ │ │ │ -351 template< int dim, class Grid > │ │ │ │ │ -352 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_3_5_3 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_l_e_a_f_e_n_d() const │ │ │ │ │ -354 { │ │ │ │ │ -355 assert( elementInfo_ ); │ │ │ │ │ -356 typename _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_E_n_d end; │ │ │ │ │ -357 return _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r( *this, end ); │ │ │ │ │ -358 } │ │ │ │ │ -359 │ │ │ │ │ -360} // namespace Dune │ │ │ │ │ -361 │ │ │ │ │ -362#endif // #ifndef DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ +326 addReference(); │ │ │ │ │ +327 │ │ │ │ │ +328 elInfo().fill_flag = fillFlags; │ │ │ │ │ +329 │ │ │ │ │ +330 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ +331 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ +332 elInfo().opp_vertex[ k ] = -1; │ │ │ │ │ +333 │ │ │ │ │ +334 fill( mesh, ¯oElement, elInfo() ); │ │ │ │ │ +335 } │ │ │ │ │ +336 │ │ │ │ │ +337 │ │ │ │ │ +338 template< int dim > │ │ │ │ │ +339 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ +_3_4_0_ _:_:_E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, const _S_e_e_d &seed, │ │ │ │ │ +341 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) │ │ │ │ │ +342 { │ │ │ │ │ +343 instance_ = stack().allocate(); │ │ │ │ │ +344 instance_->parent() = null(); │ │ │ │ │ +345 ++(instance_->parent()->refCount); │ │ │ │ │ +346 │ │ │ │ │ +347 addReference(); │ │ │ │ │ +348 │ │ │ │ │ +349 // fill in macro element info │ │ │ │ │ +350 elInfo().fill_flag = fillFlags; │ │ │ │ │ +351 │ │ │ │ │ +352 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ +353 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ +354 elInfo().opp_vertex[ k ] = -1; │ │ │ │ │ +355 │ │ │ │ │ +356 fill( mesh, ((_M_e_s_h *)mesh)->macro_els + seed._m_a_c_r_o_I_n_d_e_x(), elInfo() ); │ │ │ │ │ +357 │ │ │ │ │ +358 // traverse the seed's path │ │ │ │ │ +359 unsigned long path = seed._p_a_t_h(); │ │ │ │ │ +360 for( int i = 0; i < seed._l_e_v_e_l(); ++i ) │ │ │ │ │ +361 { │ │ │ │ │ +362 _I_n_s_t_a_n_c_e_P_t_r child = stack().allocate(); │ │ │ │ │ +363 child->_p_a_r_e_n_t() = instance_; │ │ │ │ │ +364 │ │ │ │ │ +365 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ +366 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ +367 child->_e_l_I_n_f_o.opp_vertex[ k ] = -2; │ │ │ │ │ +368 │ │ │ │ │ +369 fill( path & 1, elInfo(), child->_e_l_I_n_f_o ); │ │ │ │ │ +370 │ │ │ │ │ +371 instance_ = child; │ │ │ │ │ +372 addReference(); │ │ │ │ │ +373 │ │ │ │ │ +374 path = path >> 1; │ │ │ │ │ +375 } │ │ │ │ │ +376 │ │ │ │ │ +377 assert( this->seed() == seed ); │ │ │ │ │ +378 } │ │ │ │ │ +379 │ │ │ │ │ +380 │ │ │ │ │ +381 template< int dim > │ │ │ │ │ +_3_8_2 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( const _E_l_e_m_e_n_t_I_n_f_o &other ) │ │ │ │ │ +383 : instance_( other.instance_ ) │ │ │ │ │ +384 { │ │ │ │ │ +385 addReference(); │ │ │ │ │ +386 } │ │ │ │ │ +387 │ │ │ │ │ +388 template< int dim > │ │ │ │ │ +_3_8_9 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( _E_l_e_m_e_n_t_I_n_f_o &&other ) │ │ │ │ │ +390 : instance_( NULL ) │ │ │ │ │ +391 { │ │ │ │ │ +392 using _s_t_d_:_:_s_w_a_p; │ │ │ │ │ +393 swap( instance_, other.instance_ ); │ │ │ │ │ +394 } │ │ │ │ │ +395 │ │ │ │ │ +396 template< int dim > │ │ │ │ │ +_3_9_7 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_~_E_l_e_m_e_n_t_I_n_f_o () │ │ │ │ │ +398 { │ │ │ │ │ +399 removeReference(); │ │ │ │ │ +400 } │ │ │ │ │ +401 │ │ │ │ │ +402 │ │ │ │ │ +403 template< int dim > │ │ │ │ │ +404 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> & │ │ │ │ │ +_4_0_5 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) │ │ │ │ │ +406 { │ │ │ │ │ +407 other.addReference(); │ │ │ │ │ +408 removeReference(); │ │ │ │ │ +409 instance_ = other.instance_; │ │ │ │ │ +410 return *this; │ │ │ │ │ +411 } │ │ │ │ │ +412 │ │ │ │ │ +413 template< int dim > │ │ │ │ │ +414 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> & │ │ │ │ │ +_4_1_5 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &&other ) │ │ │ │ │ +416 { │ │ │ │ │ +417 using _s_t_d_:_:_s_w_a_p; │ │ │ │ │ +418 swap( instance_, other.instance_ ); │ │ │ │ │ +419 return *this; │ │ │ │ │ +420 } │ │ │ │ │ +421 │ │ │ │ │ +422 template< int dim > │ │ │ │ │ +423 inline bool │ │ │ │ │ +_4_2_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) const │ │ │ │ │ +425 { │ │ │ │ │ +426 return (instance_->elInfo.el == other.instance_->_e_l_I_n_f_o.el); │ │ │ │ │ +427 } │ │ │ │ │ +428 │ │ │ │ │ +429 │ │ │ │ │ +430 template< int dim > │ │ │ │ │ +431 inline bool │ │ │ │ │ +_4_3_2 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_!_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) const │ │ │ │ │ +433 { │ │ │ │ │ +434 return (instance_->elInfo.el != other.instance_->_e_l_I_n_f_o.el); │ │ │ │ │ +435 } │ │ │ │ │ +436 │ │ │ │ │ +437 │ │ │ │ │ +438 template< int dim > │ │ │ │ │ +439 inline const typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_M_a_c_r_o_E_l_e_m_e_n_t & │ │ │ │ │ +_4_4_0 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_a_c_r_o_E_l_e_m_e_n_t () const │ │ │ │ │ +441 { │ │ │ │ │ +442 assert( !!(*this) ); │ │ │ │ │ +443 assert( elInfo().macro_el != NULL ); │ │ │ │ │ +444 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & >( *(elInfo().macro_el) ); │ │ │ │ │ +445 } │ │ │ │ │ +446 │ │ │ │ │ +447 │ │ │ │ │ +448 template< int dim > │ │ │ │ │ +_4_4_9 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_f_a_t_h_e_r () const │ │ │ │ │ +450 { │ │ │ │ │ +451 assert( !!(*this) ); │ │ │ │ │ +452 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance_->parent() ); │ │ │ │ │ +453 } │ │ │ │ │ +454 │ │ │ │ │ +455 │ │ │ │ │ +456 template< int dim > │ │ │ │ │ +_4_5_7 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r () const │ │ │ │ │ +458 { │ │ │ │ │ +459 const _E_l_e_m_e_n_t *element = elInfo()._e_l; │ │ │ │ │ +460 const _E_l_e_m_e_n_t *father = elInfo().parent->el; │ │ │ │ │ +461 assert( father != NULL ); │ │ │ │ │ +462 │ │ │ │ │ +463 const int index = (father->child[ 0 ] == element ? 0 : 1); │ │ │ │ │ +464 assert( father->child[ index ] == element ); │ │ │ │ │ +465 return index; │ │ │ │ │ +466 } │ │ │ │ │ +467 │ │ │ │ │ +468 │ │ │ │ │ +469 template< int dim > │ │ │ │ │ +_4_7_0 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_h_i_l_d ( int i ) const │ │ │ │ │ +471 { │ │ │ │ │ +472 assert( !isLeaf() ); │ │ │ │ │ +473 │ │ │ │ │ +474 _I_n_s_t_a_n_c_e_P_t_r child = stack().allocate(); │ │ │ │ │ +475 child->_p_a_r_e_n_t() = instance_; │ │ │ │ │ +476 addReference(); │ │ │ │ │ +477 │ │ │ │ │ +478 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ │ +479 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ │ +480 child->_e_l_I_n_f_o.opp_vertex[ k ] = -2; │ │ │ │ │ +481 │ │ │ │ │ +482 fill( i, elInfo(), child->_e_l_I_n_f_o ); │ │ │ │ │ +483 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( child ); │ │ │ │ │ +484 } │ │ │ │ │ +485 │ │ │ │ │ +486 │ │ │ │ │ +487 template< int dim > │ │ │ │ │ +_4_8_8 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_L_e_a_f () const │ │ │ │ │ +489 { │ │ │ │ │ +490 assert( !(*this) == false ); │ │ │ │ │ +491 return isLeaf( el() ); │ │ │ │ │ +492 } │ │ │ │ │ +493 │ │ │ │ │ +494 │ │ │ │ │ +495 template< int dim > │ │ │ │ │ +_4_9_6 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_s_e_e_d () const │ │ │ │ │ +497 { │ │ │ │ │ +498 assert( !!(*this) ); │ │ │ │ │ +499 │ │ │ │ │ +500 int level = 0; │ │ │ │ │ +501 unsigned long path = 0; │ │ │ │ │ +502 for( _I_n_s_t_a_n_c_e_P_t_r p = instance_; p->_p_a_r_e_n_t() != null(); p = p->_p_a_r_e_n_t() ) │ │ │ │ │ +503 { │ │ │ │ │ +504 const _E_l_e_m_e_n_t *element = p->_e_l_I_n_f_o.el; │ │ │ │ │ +505 const _E_l_e_m_e_n_t *father = p->parent()->elInfo.el; │ │ │ │ │ +506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 │ │ │ │ │ +] == element ); │ │ │ │ │ +507 path = (path << 1) | child; │ │ │ │ │ +508 ++level; │ │ │ │ │ +509 } │ │ │ │ │ +510 │ │ │ │ │ +511 if( level != elInfo().level ) │ │ │ │ │ +512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." ); │ │ │ │ │ +513 │ │ │ │ │ +514 return _S_e_e_d( macroElement().index, level, path ); │ │ │ │ │ +515 } │ │ │ │ │ +516 │ │ │ │ │ +517 │ │ │ │ │ +518 template< int dim > │ │ │ │ │ +_5_1_9 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_M_e_s_h_P_o_i_n_t_e_r _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_e_s_h () │ │ │ │ │ +const │ │ │ │ │ +520 { │ │ │ │ │ +521 return _M_e_s_h_P_o_i_n_t_e_r( elInfo().mesh ); │ │ │ │ │ +522 } │ │ │ │ │ +523 │ │ │ │ │ +524 │ │ │ │ │ +525 template< int dim > │ │ │ │ │ +_5_2_6 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ │ +527 { │ │ │ │ │ +528 return mightVanish( el(), 0 ); │ │ │ │ │ +529 } │ │ │ │ │ +530 │ │ │ │ │ +531 │ │ │ │ │ +532 template< int dim > │ │ │ │ │ +_5_3_3 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_v_e_l () const │ │ │ │ │ +534 { │ │ │ │ │ +535 return elInfo().level; │ │ │ │ │ +536 } │ │ │ │ │ +537 │ │ │ │ │ +538 │ │ │ │ │ +539 template< int dim > │ │ │ │ │ +_5_4_0 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_y_p_e () const │ │ │ │ │ +541 { │ │ │ │ │ +542 return 0; │ │ │ │ │ +543 } │ │ │ │ │ +544 │ │ │ │ │ +545 │ │ │ │ │ +546 template<> │ │ │ │ │ +_5_4_7 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _3_ _>_:_:_t_y_p_e () const │ │ │ │ │ +548 { │ │ │ │ │ +549 return instance_->elInfo.el_type; │ │ │ │ │ +550 } │ │ │ │ │ +551 │ │ │ │ │ +552 │ │ │ │ │ +553 template< int dim > │ │ │ │ │ +_5_5_4 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_g_e_t_M_a_r_k () const │ │ │ │ │ +555 { │ │ │ │ │ +556 return el()->mark; │ │ │ │ │ +557 } │ │ │ │ │ +558 │ │ │ │ │ +559 │ │ │ │ │ +560 template< int dim > │ │ │ │ │ +_5_6_1 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_s_e_t_M_a_r_k ( int refCount ) const │ │ │ │ │ +562 { │ │ │ │ │ +563 assert( isLeaf() ); │ │ │ │ │ +564 assert( (refCount >= -128) && (refCount < 127) ); │ │ │ │ │ +565 el()->mark = refCount; │ │ │ │ │ +566 } │ │ │ │ │ +567 │ │ │ │ │ +568 │ │ │ │ │ +569 template< int dim > │ │ │ │ │ +_5_7_0 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_a_s_L_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const │ │ │ │ │ +571 { │ │ │ │ │ +572 assert( !!(*this) ); │ │ │ │ │ +573 assert( (face >= 0) && (face < maxNeighbors) ); │ │ │ │ │ +574 │ │ │ │ │ +575 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ +576 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ +577 if( macroFace >= 0 ) │ │ │ │ │ +578 return (macroElement().neighbor( macroFace ) != NULL); │ │ │ │ │ +579 else │ │ │ │ │ +580 return true; │ │ │ │ │ +581 } │ │ │ │ │ +582 │ │ │ │ │ +583 │ │ │ │ │ +584 template< int dim > │ │ │ │ │ +_5_8_5 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_a_f_N_e_i_g_h_b_o_r ( const int face │ │ │ │ │ +) const │ │ │ │ │ +586 { │ │ │ │ │ +587 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ │ +588 _E_l_e_m_e_n_t_I_n_f_o neighbor; │ │ │ │ │ +589 Library< dimWorld >::leafNeighbor( *this, face, neighbor ); │ │ │ │ │ +590 return neighbor; │ │ │ │ │ +591 } │ │ │ │ │ +592 │ │ │ │ │ +593 │ │ │ │ │ +594 template< int dim > │ │ │ │ │ +595 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ +_5_9_6_ _:_:_l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const int face, _E_l_e_m_e_n_t_I_n_f_o (&neighbor) │ │ │ │ │ +[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const │ │ │ │ │ +597 { │ │ │ │ │ +598 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ │ +599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, │ │ │ │ │ +faceInNeighbor ); │ │ │ │ │ +600 } │ │ │ │ │ +601 │ │ │ │ │ +602 │ │ │ │ │ +603 template< int dim > │ │ │ │ │ +604 template< int codim > │ │ │ │ │ +_6_0_5 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_w_i_s_t ( int subEntity ) const │ │ │ │ │ +606 { │ │ │ │ │ +607 return _T_w_i_s_t_<_ _d_i_m_,_ _d_i_m_-_c_o_d_i_m_ _>_:_:_t_w_i_s_t( element(), subEntity ); │ │ │ │ │ +608 } │ │ │ │ │ +609 │ │ │ │ │ +610 │ │ │ │ │ +611 template< int dim > │ │ │ │ │ +_6_1_2 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_w_i_s_t_I_n_N_e_i_g_h_b_o_r ( const int face ) const │ │ │ │ │ +613 { │ │ │ │ │ +614 assert( neighbor( face ) != NULL ); │ │ │ │ │ +615 return _T_w_i_s_t_<_ _d_i_m_,_ _d_i_m_-_1_ _>_:_:_t_w_i_s_t( neighbor( face ), elInfo().opp_vertex │ │ │ │ │ +[ face ] ); │ │ │ │ │ +616 } │ │ │ │ │ +617 │ │ │ │ │ +618 │ │ │ │ │ +619 template< int dim > │ │ │ │ │ +_6_2_0 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_B_o_u_n_d_a_r_y ( int face ) const │ │ │ │ │ +621 { │ │ │ │ │ +622 assert( !!(*this) ); │ │ │ │ │ +623 assert( (face >= 0) && (face < maxNeighbors) ); │ │ │ │ │ +624 │ │ │ │ │ +625 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ +626 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ +627 if( macroFace >= 0 ) │ │ │ │ │ +628 return macroElement().isBoundary( macroFace ); │ │ │ │ │ +629 else │ │ │ │ │ +630 return false; │ │ │ │ │ +631 } │ │ │ │ │ +632 │ │ │ │ │ +633 │ │ │ │ │ +634 template< int dim > │ │ │ │ │ +_6_3_5 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( int face ) const │ │ │ │ │ +636 { │ │ │ │ │ +637 assert( !!(*this) ); │ │ │ │ │ +638 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ │ +639 │ │ │ │ │ +640 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ +641 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ +642 const int id = macroElement().boundaryId( macroFace ); │ │ │ │ │ +643 // this assertion is only allowed, if FILL_BOUND is set │ │ │ │ │ +644 // assert( id == elInfo().wall_bound[ face ] ); │ │ │ │ │ +645 return id; │ │ │ │ │ +646 } │ │ │ │ │ +647 │ │ │ │ │ +648 │ │ │ │ │ +649 template< int dim > │ │ │ │ │ +650 inline _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n * │ │ │ │ │ +_6_5_1 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int face ) const │ │ │ │ │ +652 { │ │ │ │ │ +653 assert( !!(*this) ); │ │ │ │ │ +654 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ │ +655 │ │ │ │ │ +656 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ +657 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ +658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]); │ │ │ │ │ +659 } │ │ │ │ │ +660 │ │ │ │ │ +661 │ │ │ │ │ +662 template< int dim > │ │ │ │ │ +663 inline _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n * │ │ │ │ │ +_6_6_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n ( int face ) const │ │ │ │ │ +665 { │ │ │ │ │ +666 assert( !!(*this) ); │ │ │ │ │ +667 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ │ +668 │ │ │ │ │ +669 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ │ +670 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ │ +671 if( macroFace >= 0 ) │ │ │ │ │ +672 return static_cast< _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n * >( macroElement().projection │ │ │ │ │ +[ macroFace+1 ] ); │ │ │ │ │ +673 else │ │ │ │ │ +674 return 0; │ │ │ │ │ +675 } │ │ │ │ │ +676 │ │ │ │ │ +677 │ │ │ │ │ +678 template< int dim > │ │ │ │ │ +_6_7_9 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_a_s_C_o_o_r_d_i_n_a_t_e_s () const │ │ │ │ │ +680 { │ │ │ │ │ +681 return ((elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s) != 0); │ │ │ │ │ +682 } │ │ │ │ │ +683 │ │ │ │ │ +684 template< int dim > │ │ │ │ │ +_6_8_5 inline const _G_l_o_b_a_l_V_e_c_t_o_r &_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_o_o_r_d_i_n_a_t_e ( int vertex ) │ │ │ │ │ +const │ │ │ │ │ +686 { │ │ │ │ │ +687 assert( hasCoordinates() ); │ │ │ │ │ +688 assert( (vertex >= 0) && (vertex < numVertices) ); │ │ │ │ │ +689 return elInfo().coord[ vertex ]; │ │ │ │ │ +690 } │ │ │ │ │ +691 │ │ │ │ │ +692 │ │ │ │ │ +693 template< int dim > │ │ │ │ │ +694 template< class Functor > │ │ │ │ │ +_6_9_5 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor ) │ │ │ │ │ +const │ │ │ │ │ +696 { │ │ │ │ │ +697 functor( *this ); │ │ │ │ │ +698 if( !isLeaf() ) │ │ │ │ │ +699 { │ │ │ │ │ +700 child( 0 ).hierarchicTraverse( functor ); │ │ │ │ │ +701 child( 1 ).hierarchicTraverse( functor ); │ │ │ │ │ +702 } │ │ │ │ │ +703 } │ │ │ │ │ +704 │ │ │ │ │ +705 │ │ │ │ │ +706 template< int dim > │ │ │ │ │ +707 template< class Functor > │ │ │ │ │ +_7_0_8 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor ) const │ │ │ │ │ +709 { │ │ │ │ │ +710 if( !isLeaf() ) │ │ │ │ │ +711 { │ │ │ │ │ +712 child( 0 ).leafTraverse( functor ); │ │ │ │ │ +713 child( 1 ).leafTraverse( functor ); │ │ │ │ │ +714 } │ │ │ │ │ +715 else │ │ │ │ │ +716 functor( *this ); │ │ │ │ │ +717 } │ │ │ │ │ +718 │ │ │ │ │ +719 │ │ │ │ │ +720 template< int dim > │ │ │ │ │ +_7_2_1 inline const _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t () const │ │ │ │ │ +722 { │ │ │ │ │ +723 return elInfo().el; │ │ │ │ │ +724 } │ │ │ │ │ +725 │ │ │ │ │ +726 │ │ │ │ │ +727 template< int dim > │ │ │ │ │ +_7_2_8 inline const _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( int face ) const │ │ │ │ │ +729 { │ │ │ │ │ +730 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ │ +731 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r) != 0 ); │ │ │ │ │ +732 return elInfo().neigh[ face ]; │ │ │ │ │ +733 } │ │ │ │ │ +734 │ │ │ │ │ +735 │ │ │ │ │ +736 template< int dim > │ │ │ │ │ +_7_3_7 inline _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l () const │ │ │ │ │ +738 { │ │ │ │ │ +739 return elInfo().el; │ │ │ │ │ +740 } │ │ │ │ │ +741 │ │ │ │ │ +742 │ │ │ │ │ +743 template< int dim > │ │ │ │ │ +_7_4_4 inline _A_L_B_E_R_T_A EL_INFO &_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l_I_n_f_o () const │ │ │ │ │ +745 { │ │ │ │ │ +746 return (instance_->elInfo); │ │ │ │ │ +747 } │ │ │ │ │ +748 │ │ │ │ │ +749 │ │ │ │ │ +750 template< int dim > │ │ │ │ │ +751 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ +_7_5_2 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_F_a_k_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, │ │ │ │ │ +753 const _E_l_e_m_e_n_t *element, int level, int type ) │ │ │ │ │ +754 { │ │ │ │ │ +755 _I_n_s_t_a_n_c_e_P_t_r instance = stack().allocate(); │ │ │ │ │ +756 instance->_p_a_r_e_n_t() = null(); │ │ │ │ │ +757 ++(instance->_p_a_r_e_n_t()->_r_e_f_C_o_u_n_t); │ │ │ │ │ +758 │ │ │ │ │ +759 instance->_e_l_I_n_f_o.mesh = mesh; │ │ │ │ │ +760 instance->_e_l_I_n_f_o.macro_el = NULL; │ │ │ │ │ +761 instance->_e_l_I_n_f_o.el = const_cast< _E_l_e_m_e_n_t * >( element ); │ │ │ │ │ +762 instance->_e_l_I_n_f_o.parent = NULL; │ │ │ │ │ +763 instance->_e_l_I_n_f_o.fill_flag = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g; │ │ │ │ │ +764 instance->_e_l_I_n_f_o.level = level; │ │ │ │ │ +765 instance->_e_l_I_n_f_o.el_type = type; │ │ │ │ │ +766 │ │ │ │ │ +767 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance ); │ │ │ │ │ +768 } │ │ │ │ │ +769 │ │ │ │ │ +770 │ │ │ │ │ +771 template< int dim > │ │ │ │ │ +772 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ │ +_7_7_3 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_F_a_k_e ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ +774 { │ │ │ │ │ +775 _I_n_s_t_a_n_c_e_P_t_r instance = stack().allocate(); │ │ │ │ │ +776 instance->_p_a_r_e_n_t() = null(); │ │ │ │ │ +777 ++(instance->_p_a_r_e_n_t()->_r_e_f_C_o_u_n_t); │ │ │ │ │ +778 │ │ │ │ │ +779 instance->_e_l_I_n_f_o = elInfo; │ │ │ │ │ +780 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance ); │ │ │ │ │ +781 } │ │ │ │ │ +782 │ │ │ │ │ +783 │ │ │ │ │ +784 template< int dim > │ │ │ │ │ +785 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_L_e_a_f ( _E_l_e_m_e_n_t *element ) │ │ │ │ │ +786 { │ │ │ │ │ +787 return IS_LEAF_EL( element ); │ │ │ │ │ +788 } │ │ │ │ │ +789 │ │ │ │ │ +790 │ │ │ │ │ +791 template< int dim > │ │ │ │ │ +792 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h ( _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element, │ │ │ │ │ +int depth ) │ │ │ │ │ +793 { │ │ │ │ │ +794 if( isLeaf( element ) ) │ │ │ │ │ +795 return (element->mark < depth); │ │ │ │ │ +796 else │ │ │ │ │ +797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish │ │ │ │ │ +( element->child[ 1 ], depth-1 )); │ │ │ │ │ +798 } │ │ │ │ │ +799 │ │ │ │ │ +800 │ │ │ │ │ +801 template< int dim > │ │ │ │ │ +802 inline void ElementInfo< dim > │ │ │ │ │ +803 ::fill ( _M_e_s_h *mesh, const _A_L_B_E_R_T_A MACRO_EL *mel, _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ │ +804 { │ │ │ │ │ +805 _A_L_B_E_R_T_A fill_macro_info( mesh, mel, &elInfo ); │ │ │ │ │ +806 } │ │ │ │ │ +807 │ │ │ │ │ +808 template< int dim > │ │ │ │ │ +809 inline void ElementInfo< dim > │ │ │ │ │ +810 ::fill ( int ichild, const _A_L_B_E_R_T_A EL_INFO &parentInfo, _A_L_B_E_R_T_A EL_INFO │ │ │ │ │ +&elInfo ) │ │ │ │ │ +811 { │ │ │ │ │ +812 _A_L_B_E_R_T_A fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo ); │ │ │ │ │ +813 } │ │ │ │ │ +814 │ │ │ │ │ +815 │ │ │ │ │ +816 template< int dim > │ │ │ │ │ +817 inline void ElementInfo< dim >::addReference () const │ │ │ │ │ +818 { │ │ │ │ │ +819 ++(instance_->refCount); │ │ │ │ │ +820 } │ │ │ │ │ +821 │ │ │ │ │ +822 │ │ │ │ │ +823 template< int dim > │ │ │ │ │ +824 inline void ElementInfo< dim >::removeReference () const │ │ │ │ │ +825 { │ │ │ │ │ +826 // short-circuit for rvalues that have been drained as argument to a move │ │ │ │ │ +operation │ │ │ │ │ +827 if ( !instance_ ) │ │ │ │ │ +828 return; │ │ │ │ │ +829 // this loop breaks when instance becomes null() │ │ │ │ │ +830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; ) │ │ │ │ │ +831 { │ │ │ │ │ +832 const InstancePtr parent = instance->parent(); │ │ │ │ │ +833 stack().release( instance ); │ │ │ │ │ +834 instance = parent; │ │ │ │ │ +835 } │ │ │ │ │ +836 } │ │ │ │ │ +837 │ │ │ │ │ +838 │ │ │ │ │ +839 template< int dim > │ │ │ │ │ +840 inline typename ElementInfo< dim >::InstancePtr │ │ │ │ │ +841 ElementInfo< dim >::null () │ │ │ │ │ +842 { │ │ │ │ │ +843 return stack().null(); │ │ │ │ │ +844 } │ │ │ │ │ +845 │ │ │ │ │ +846 │ │ │ │ │ +847 template< int dim > │ │ │ │ │ +848 inline typename ElementInfo< dim >::Stack & │ │ │ │ │ +849 ElementInfo< dim >::stack () │ │ │ │ │ +850 { │ │ │ │ │ +851 static Stack s; │ │ │ │ │ +852 return s; │ │ │ │ │ +853 } │ │ │ │ │ +854 │ │ │ │ │ +855 │ │ │ │ │ +856 │ │ │ │ │ +857 // Implementation of ElementInfo::Stack │ │ │ │ │ +858 // ------------------------------------ │ │ │ │ │ +859 │ │ │ │ │ +860 template< int dim > │ │ │ │ │ +_8_6_1 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_S_t_a_c_k () │ │ │ │ │ +862 : top_( 0 ) │ │ │ │ │ +863 { │ │ │ │ │ +864 null_._e_l_I_n_f_o.el = NULL; │ │ │ │ │ +865 null_._r_e_f_C_o_u_n_t = 1; │ │ │ │ │ +866 null_._p_a_r_e_n_t() = 0; │ │ │ │ │ +867 } │ │ │ │ │ +868 │ │ │ │ │ +869 │ │ │ │ │ +870 template< int dim > │ │ │ │ │ +_8_7_1 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_~_S_t_a_c_k () │ │ │ │ │ +872 { │ │ │ │ │ +873 while( top_ != 0 ) │ │ │ │ │ +874 { │ │ │ │ │ +875 _I_n_s_t_a_n_c_e_P_t_r p = top_; │ │ │ │ │ +876 top_ = p->_p_a_r_e_n_t(); │ │ │ │ │ +877 delete p; │ │ │ │ │ +878 } │ │ │ │ │ +879 } │ │ │ │ │ +880 │ │ │ │ │ +881 │ │ │ │ │ +882 template< int dim > │ │ │ │ │ +883 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e_P_t_r │ │ │ │ │ +_8_8_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_a_l_l_o_c_a_t_e () │ │ │ │ │ +885 { │ │ │ │ │ +886 _I_n_s_t_a_n_c_e_P_t_r p = top_; │ │ │ │ │ +887 if( p != 0 ) │ │ │ │ │ +888 top_ = p->_p_a_r_e_n_t(); │ │ │ │ │ +889 else │ │ │ │ │ +890 p = new _I_n_s_t_a_n_c_e; │ │ │ │ │ +891 p->_r_e_f_C_o_u_n_t = 0; │ │ │ │ │ +892 return p; │ │ │ │ │ +893 } │ │ │ │ │ +894 │ │ │ │ │ +895 │ │ │ │ │ +896 template< int dim > │ │ │ │ │ +_8_9_7 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_r_e_l_e_a_s_e ( _I_n_s_t_a_n_c_e_P_t_r &p ) │ │ │ │ │ +898 { │ │ │ │ │ +899 assert( (p != null()) && (p->_r_e_f_C_o_u_n_t == 0) ); │ │ │ │ │ +900 p->_p_a_r_e_n_t() = top_; │ │ │ │ │ +901 top_ = p; │ │ │ │ │ +902 } │ │ │ │ │ +903 │ │ │ │ │ +904 │ │ │ │ │ +905 template< int dim > │ │ │ │ │ +906 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e_P_t_r │ │ │ │ │ +_9_0_7 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_n_u_l_l () │ │ │ │ │ +908 { │ │ │ │ │ +909 return &null_; │ │ │ │ │ +910 } │ │ │ │ │ +911 │ │ │ │ │ +912 } // namespace Alberta │ │ │ │ │ +913 │ │ │ │ │ +914} // namespace Dune │ │ │ │ │ +915 │ │ │ │ │ +916#endif // #if HAVE_ALBERTA │ │ │ │ │ +917 │ │ │ │ │ +918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType │ │ │ │ │ -Attributes used in the generic overlap model. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ -@ InteriorEntity │ │ │ │ │ -all interior entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ +_m_a_c_r_o_e_l_e_m_e_n_t_._h_h │ │ │ │ │ +_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h │ │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ │ +void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ +> &b) │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ +ALBERTA MESH Mesh │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ ALBERTA EL Element │ │ │ │ │ DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_N_e_i_g_h_b_o_r │ │ │ │ │ +ElementInfo leafNeighbor(const int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:585 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_L_e_a_f │ │ │ │ │ +bool isLeaf() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:488 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ │ +static ElementInfo createFake(const MeshPointer &mesh, const Element *element, │ │ │ │ │ +int level, int type=0) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:752 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_h_i_l_d │ │ │ │ │ +ElementInfo child(int i) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:470 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ │ int level() const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_i_g_h_t_V_a_n_i_s_h │ │ │ │ │ bool mightVanish() const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:526 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_u_m_F_a_c_e_s │ │ │ │ │ +static const int numFaces │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_w_i_s_t │ │ │ │ │ +int twist(int subEntity) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:605 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_w_i_s_t_I_n_N_e_i_g_h_b_o_r │ │ │ │ │ +int twistInNeighbor(int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:612 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +Alberta::MacroElement< dimension > MacroElement │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ +BasicNodeProjection * boundaryProjection(int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:664 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +const MacroElement & macroElement() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:440 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s │ │ │ │ │ +static const int maxLevelNeighbors │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:64 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_f_a_t_h_e_r │ │ │ │ │ ElementInfo father() const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:449 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo(const ElementInfo &other) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:382 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +GeometryCacheProxy< dim > GeometryCache │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +ElementInfo & operator=(const ElementInfo &other) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:405 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_a_s_L_e_a_f_N_e_i_g_h_b_o_r │ │ │ │ │ +bool hasLeafNeighbor(const int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:570 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(const ElementInfo &other) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:424 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ +void hierarchicTraverse(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:695 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_y_p_e │ │ │ │ │ int type() const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:540 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_x_N_e_i_g_h_b_o_r_s │ │ │ │ │ +static const int maxNeighbors │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_s_e_t_M_a_r_k │ │ │ │ │ +void setMark(int refCount) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:561 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_~_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +~ElementInfo() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:397 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +const GlobalVector & coordinate(int vertex) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +static const int numVertices │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_g_e_t_M_a_r_k │ │ │ │ │ +int getMark() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:554 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ +void leafTraverse(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:708 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +const Element * neighbor(int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:728 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ │ +static ElementInfo createFake(const ALBERTA EL_INFO &elInfo) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:773 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:635 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ +bool operator!=(const ElementInfo &other) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:432 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +Alberta::FillFlags< dimension > FillFlags │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo(const MeshPointer &mesh, const MacroElement ¯oElement, typename │ │ │ │ │ +FillFlags::Flags fillFlags=FillFlags::standard) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +AffineTransformation * transformation(int face) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:651 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ bool isBoundary(int face) const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:620 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r │ │ │ │ │ int indexInFather() const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:457 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_s_e_e_d │ │ │ │ │ +Seed seed() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:496 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ +Element * el() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_e_m_e_n_t │ │ │ │ │ +const Element * element() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:721 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_I_n_f_o │ │ │ │ │ ALBERTA EL_INFO & elInfo() const │ │ │ │ │ DDeeffiinniittiioonn elementinfo.hh:744 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_c_l_e_a_r_E_l_e_m_e_n_t │ │ │ │ │ -void clearElement() │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:70 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_g_e_t_E_l_I_n_f_o │ │ │ │ │ -ALBERTA EL_INFO * getElInfo() const │ │ │ │ │ -needed for the LevelIterator and LeafIterator │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:62 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_e_s_h │ │ │ │ │ +MeshPointer mesh() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:519 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_g_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +GeometryCache geometryCache() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_a_s_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +bool hasCoordinates() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:679 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l_N_e_i_g_h_b_o_r_s │ │ │ │ │ +int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], │ │ │ │ │ +int(&faceInNeighbor)[maxLevelNeighbors]) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:596 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo(ElementInfo &&other) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:389 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags:: │ │ │ │ │ +Flags fillFlags=FillFlags::standard) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:340 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_p_a_r_e_n_t │ │ │ │ │ +InstancePtr & parent() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_g_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +Alberta::GeometryCache< dim > geometryCache │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_e_l_I_n_f_o │ │ │ │ │ +ALBERTA EL_INFO elInfo │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_r_e_f_C_o_u_n_t │ │ │ │ │ +unsigned int refCount │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_n_u_l_l │ │ │ │ │ +InstancePtr null() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:907 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_~_S_t_a_c_k │ │ │ │ │ +~Stack() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:871 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release(InstancePtr &p) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:897 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_S_t_a_c_k │ │ │ │ │ +Stack() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:861 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +InstancePtr allocate() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:884 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:255 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_S_e_e_d │ │ │ │ │ +Seed(const int macroIndex, const int level, const unsigned long path) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:260 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_S_e_e_d │ │ │ │ │ +Seed() │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_l_e_v_e_l │ │ │ │ │ int level() const │ │ │ │ │ -level of this element │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:94 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_s_e_t_E_l_e_m_e_n_t │ │ │ │ │ -void setElement(const ElementInfo &elementInfo, int subEntity) │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:78 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType partitionType() const │ │ │ │ │ -return partition type of this entity │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< codim >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_s_e_t_E_n_t_i_t_y │ │ │ │ │ -void setEntity(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:87 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -const ElementInfo & elementInfo() const │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -geometry of this entity │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:103 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -obtain a reference to the grid │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ -int subEntity() const │ │ │ │ │ -obtain number of the subentity within the element (in ALBERTA numbering) │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -type of geometry of this entity │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:114 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const This &other) const │ │ │ │ │ -equality of entities │ │ │ │ │ -DDeeffiinniittiioonn entity.cc:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y_I_m_p_l │ │ │ │ │ -Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:211 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -const ElementInfo & elementInfo() const │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:355 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_B_e_g_i_n │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_E_n_d │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ │ +bool isValid() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:284 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_p_a_t_h │ │ │ │ │ +unsigned long path() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:288 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_m_a_c_r_o_I_n_d_e_x │ │ │ │ │ +int macroIndex() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:286 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ +static const Flags nothing │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +static const Flags boundaryId │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ +ALBERTA FLAGS Flags │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s │ │ │ │ │ +static const Flags coords │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ │ +static const Flags standard │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:258 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +static const Flags neighbor │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_t_w_i_s_t │ │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:538 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: elementinfo.cc File Reference │ │ │ │ +dune-grid: algebra.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,36 +70,77 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
elementinfo.cc File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
algebra.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

provides a wrapper for ALBERTA's el_info structure │ │ │ │ -More...

│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -
│ │ │ │ +
#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<class K >
static FieldVector< K, 3 > Dune::Alberta::vectorProduct (const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
 
template<class K , int m>
static K Dune::Alberta::determinant (const FieldMatrix< K, 0, m > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 1, 1 > &matrix)
 
template<class K , int m>
static K Dune::Alberta::determinant (const FieldMatrix< K, 1, m > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 2, 2 > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 2, 3 > &matrix)
 
template<class K , int m>
static K Dune::Alberta::determinant (const FieldMatrix< K, 2, m > &matrix)
 
template<class K >
static K Dune::Alberta::determinant (const FieldMatrix< K, 3, 3 > &matrix)
 
template<class K , int m>
static K Dune::Alberta::invert (const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
 
template<class K >
static K Dune::Alberta::invert (const FieldMatrix< K, 1, 1 > &matrix, FieldMatrix< K, 1, 1 > &inverse)
 
template<class K , int m>
static K Dune::Alberta::invert (const FieldMatrix< K, 1, m > &matrix, FieldMatrix< K, m, 1 > &inverse)
 
template<class K >
static K Dune::Alberta::invert (const FieldMatrix< K, 2, 2 > &matrix, FieldMatrix< K, 2, 2 > &inverse)
 
template<class K , int m>
static K Dune::Alberta::invert (const FieldMatrix< K, 2, m > &matrix, FieldMatrix< K, m, 2 > &inverse)
 
template<class K >
static K Dune::Alberta::invert (const FieldMatrix< K, 3, 3 > &matrix, FieldMatrix< K, 3, 3 > &inverse)
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

provides a wrapper for ALBERTA's el_info structure

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,77 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -elementinfo.cc File Reference │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +algebra.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ - Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +static FieldVector< K, 3 >  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_v_e_c_t_o_r_P_r_o_d_u_c_t (const FieldVector< K, │ │ │ │ │ + 3 > &u, const FieldVector< K, 3 > &v) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 0, m > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 1, 1 > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 1, m > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 2, 2 > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 2, 3 > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 2, m > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ │ + 3, 3 > &matrix) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 0, m > │ │ │ │ │ + &matrix, FieldMatrix< K, m, 0 > &inverse) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 1, 1 > │ │ │ │ │ + &matrix, FieldMatrix< K, 1, 1 > &inverse) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 1, m > │ │ │ │ │ + &matrix, FieldMatrix< K, m, 1 > &inverse) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 2, 2 > │ │ │ │ │ + &matrix, FieldMatrix< K, 2, 2 > &inverse) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 2, m > │ │ │ │ │ + &matrix, FieldMatrix< K, m, 2 > &inverse) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 3, 3 > │ │ │ │ │ + &matrix, FieldMatrix< K, 3, 3 > &inverse) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00722.html │ │ │ │ @@ -72,15 +72,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
albertagrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include "albertagrid/agrid.hh"
│ │ │ │ +
#include "albertagrid/agrid.hh"
│ │ │ │ #include "albertagrid/gridfactory.hh"
│ │ │ │ #include "albertagrid/structuredgridfactory.hh"
│ │ │ │ #include "albertagrid/persistentcontainer.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │
│ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html │ │ │ │ @@ -83,20 +83,20 @@ │ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTAGRID_HH
│ │ │ │
6#define DUNE_ALBERTAGRID_HH
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
11#endif
│ │ │ │ -
provides the AlbertaGrid class
│ │ │ │ +
provides the AlbertaGrid class
│ │ │ │
specialization of the generic GridFactory for AlbertaGrid
│ │ │ │ │ │ │ │
specialization of the generic StructuredGridFactory for AlbertaGrid
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridleveliterator.hh
│ │ │ │ +
identitygridgeometry.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRIDGEOMETRY_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDGEOMETRY_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
14namespace Dune {
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13#include <dune/common/typetraits.hh>
│ │ │ │ + │ │ │ │
15
│ │ │ │ -
19 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
16namespace Dune {
│ │ │ │ +
17
│ │ │ │ +
18 template<int mydim, int coorddim, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
20 public GeometryDefaultImplementation <mydim, coorddim, GridImp, IdentityGridGeometry>
│ │ │ │
21 {
│ │ │ │ -
22
│ │ │ │ -
23 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator HostGridLevelIterator;
│ │ │ │ -
24
│ │ │ │ -
25 public:
│ │ │ │ +
22 private:
│ │ │ │ +
23
│ │ │ │ +
24 typedef typename GridImp::ctype ctype;
│ │ │ │ +
25
│ │ │ │
26
│ │ │ │ -
27 constexpr static int codimension = codim;
│ │ │ │ +
27 public:
│ │ │ │
28
│ │ │ │ -
29 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │ -
30
│ │ │ │ -
│ │ │ │ -
32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
│ │ │ │ -
33 : identityGrid_(identityGrid),
│ │ │ │ -
34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
│ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ +
29 // The codimension of this entitypointer wrt the host grid
│ │ │ │ +
30 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - mydim;
│ │ │ │ +
31 constexpr static int DimensionWorld = GridImp::HostGridType::dimensionworld;
│ │ │ │ +
32
│ │ │ │ +
33 // select appropriate hostgrid geometry via typeswitch
│ │ │ │ +
34 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridGeometryType;
│ │ │ │ +
35 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridLocalGeometryType;
│ │ │ │
36
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [[maybe_unused]] bool endDummy)
│ │ │ │ -
44 : identityGrid_(identityGrid),
│ │ │ │ -
45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template end<codim,pitype>())
│ │ │ │ -
46 {}
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ -
50 void increment() {
│ │ │ │ -
51 ++hostLevelIterator_;
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 return Entity{{identityGrid_,*hostLevelIterator_}};
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 bool equals(const IdentityGridLevelIterator& i) const {
│ │ │ │ -
61 return hostLevelIterator_ == i.hostLevelIterator_;
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
64 private:
│ │ │ │ -
65 const GridImp* identityGrid_;
│ │ │ │ +
37 typedef typename std::conditional<coorddim==DimensionWorld, HostGridGeometryType, HostGridLocalGeometryType>::type HostGridGeometry;
│ │ │ │ +
38
│ │ │ │ +
40 typedef typename HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ │ +
41 typedef typename HostGridGeometryType::JacobianTransposed JacobianTransposed;
│ │ │ │ +
42
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 : hostGeometry_(hostGeometry)
│ │ │ │ +
48 {}
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
53 GeometryType type () const {
│ │ │ │ +
54 return hostGeometry_.type();
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57 // return wether we have an affine mapping
│ │ │ │ +
│ │ │ │ +
58 bool affine() const {
│ │ │ │ +
59 return hostGeometry_.affine();
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
63 int corners () const {
│ │ │ │ +
64 return hostGeometry_.corners();
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │
66
│ │ │ │ -
67 HostGridLevelIterator hostLevelIterator_;
│ │ │ │ -
68 };
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
69 const FieldVector<ctype, coorddim> corner (int i) const {
│ │ │ │ +
70 return hostGeometry_.corner(i);
│ │ │ │ +
71 }
│ │ │ │
│ │ │ │ -
69
│ │ │ │ -
70
│ │ │ │ -
71} // namespace Dune
│ │ │ │
72
│ │ │ │ -
73#endif
│ │ │ │ - │ │ │ │ -
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
76 FieldVector<ctype, coorddim> global (const FieldVector<ctype, mydim>& local) const {
│ │ │ │ +
77 return hostGeometry_.global(local);
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
83 jacobianTransposed ( const FieldVector<ctype, mydim>& local ) const {
│ │ │ │ +
84 return hostGeometry_.jacobianTransposed(local);
│ │ │ │ +
85 }
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
│ │ │ │ +
89 FieldVector<ctype, mydim> local (const FieldVector<ctype, coorddim>& global) const {
│ │ │ │ +
90 return hostGeometry_.local(global);
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93
│ │ │ │ +
│ │ │ │ +
95 bool checkInside(const FieldVector<ctype, mydim> &local) const {
│ │ │ │ +
96 return hostGeometry_.checkInside(local);
│ │ │ │ +
97 }
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
99
│ │ │ │ +
│ │ │ │ +
102 ctype integrationElement (const FieldVector<ctype, mydim>& local) const {
│ │ │ │ +
103 return hostGeometry_.integrationElement(local);
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
106
│ │ │ │ +
│ │ │ │ +
108 JacobianInverseTransposed jacobianInverseTransposed (const FieldVector<ctype, mydim>& local) const {
│ │ │ │ +
109 return hostGeometry_.jacobianInverseTransposed(local);
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
112
│ │ │ │ + │ │ │ │ +
114
│ │ │ │ +
115 };
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
117} // namespace Dune
│ │ │ │ +
118
│ │ │ │ +
119#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Iterator over all entities of a given codimension and level of a grid.
Definition identitygridleveliterator.hh:21
│ │ │ │ -
void increment()
prefix increment
Definition identitygridleveliterator.hh:50
│ │ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition identitygridleveliterator.hh:29
│ │ │ │ -
IdentityGridLevelIterator(const GridImp *identityGrid, int level)
Constructor.
Definition identitygridleveliterator.hh:32
│ │ │ │ -
IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool endDummy)
Constructor which create the end iterator.
Definition identitygridleveliterator.hh:43
│ │ │ │ -
static constexpr int codimension
Definition identitygridleveliterator.hh:27
│ │ │ │ -
bool equals(const IdentityGridLevelIterator &i) const
equality
Definition identitygridleveliterator.hh:60
│ │ │ │ -
Entity dereference() const
dereferencing
Definition identitygridleveliterator.hh:55
│ │ │ │ +
Default implementation for class Geometry.
Definition common/geometry.hh:406
│ │ │ │ +
Definition identitygridgeometry.hh:21
│ │ │ │ +
bool checkInside(const FieldVector< ctype, mydim > &local) const
Returns true if the point is in the current element.
Definition identitygridgeometry.hh:95
│ │ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const FieldVector< ctype, mydim > &local) const
The Jacobian matrix of the mapping from the reference element to this element.
Definition identitygridgeometry.hh:108
│ │ │ │ +
JacobianTransposed jacobianTransposed(const FieldVector< ctype, mydim > &local) const
Return the transposed of the Jacobian.
Definition identitygridgeometry.hh:83
│ │ │ │ +
std::conditional< coorddim==DimensionWorld, HostGridGeometryType, HostGridLocalGeometryType >::type HostGridGeometry
Definition identitygridgeometry.hh:37
│ │ │ │ +
bool affine() const
Definition identitygridgeometry.hh:58
│ │ │ │ +
static constexpr int CodimInHostGrid
Definition identitygridgeometry.hh:30
│ │ │ │ +
FieldVector< ctype, coorddim > global(const FieldVector< ctype, mydim > &local) const
Maps a local coordinate within reference element to global coordinate in element
Definition identitygridgeometry.hh:76
│ │ │ │ +
IdentityGridGeometry(const HostGridGeometry &hostGeometry)
Definition identitygridgeometry.hh:46
│ │ │ │ +
GeometryType type() const
Return the element type identifier.
Definition identitygridgeometry.hh:53
│ │ │ │ +
const FieldVector< ctype, coorddim > corner(int i) const
access to coordinates of corners. Index is the number of the corner
Definition identitygridgeometry.hh:69
│ │ │ │ +
HostGridGeometryType::JacobianTransposed JacobianTransposed
Definition identitygridgeometry.hh:41
│ │ │ │ +
ctype integrationElement(const FieldVector< ctype, mydim > &local) const
Definition identitygridgeometry.hh:102
│ │ │ │ +
HostGridGeometry hostGeometry_
Definition identitygridgeometry.hh:113
│ │ │ │ +
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry HostGridLocalGeometryType
Definition identitygridgeometry.hh:35
│ │ │ │ +
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry HostGridGeometryType
Definition identitygridgeometry.hh:34
│ │ │ │ +
HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed
type of jacobian transposed
Definition identitygridgeometry.hh:40
│ │ │ │ +
static constexpr int DimensionWorld
Definition identitygridgeometry.hh:31
│ │ │ │ +
FieldVector< ctype, mydim > local(const FieldVector< ctype, coorddim > &global) const
Maps a global coordinate within the element to a local coordinate in its reference element.
Definition identitygridgeometry.hh:89
│ │ │ │ +
int corners() const
return the number of corners of this element. Corners are numbered 0...n-1
Definition identitygridgeometry.hh:63
│ │ │ │ +
Wrapper and interface classes for element geometries.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,112 +1,205 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridleveliterator.hh │ │ │ │ │ +identitygridgeometry.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRIDGEOMETRY_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDGEOMETRY_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ 15 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ +17 │ │ │ │ │ +18 template │ │ │ │ │ +_1_9 class _I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y : │ │ │ │ │ +20 public _G_e_o_m_e_t_r_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ 21 { │ │ │ │ │ -22 │ │ │ │ │ -23 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ │ -template Partition::LevelIterator HostGridLevelIterator; │ │ │ │ │ -24 │ │ │ │ │ -25 public: │ │ │ │ │ +22 private: │ │ │ │ │ +23 │ │ │ │ │ +24 typedef typename GridImp::ctype ctype; │ │ │ │ │ +25 │ │ │ │ │ 26 │ │ │ │ │ -_2_7 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +27 public: │ │ │ │ │ 28 │ │ │ │ │ -_2_9 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ -30 │ │ │ │ │ -_3_2 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r(const GridImp* identityGrid, int level) │ │ │ │ │ -33 : identityGrid_(identityGrid), │ │ │ │ │ -34 hostLevelIterator_(identityGrid->hostgrid_->_l_e_v_e_l_G_r_i_d_V_i_e_w(level).template │ │ │ │ │ -begin()) │ │ │ │ │ -35 {} │ │ │ │ │ +29 // The codimension of this entitypointer wrt the host grid │ │ │ │ │ +_3_0 constexpr static int _C_o_d_i_m_I_n_H_o_s_t_G_r_i_d = GridImp::HostGridType::dimension - │ │ │ │ │ +mydim; │ │ │ │ │ +_3_1 constexpr static int _D_i_m_e_n_s_i_o_n_W_o_r_l_d = GridImp::HostGridType::dimensionworld; │ │ │ │ │ +32 │ │ │ │ │ +33 // select appropriate hostgrid geometry via typeswitch │ │ │ │ │ +_3_4 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ +Codim::Geometry _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y_T_y_p_e; │ │ │ │ │ +_3_5 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ +Codim::Geometry _H_o_s_t_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e; │ │ │ │ │ 36 │ │ │ │ │ -37 │ │ │ │ │ -_4_3 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r(const GridImp* identityGrid, int level, [ │ │ │ │ │ -[maybe_unused]] bool endDummy) │ │ │ │ │ -44 : identityGrid_(identityGrid), │ │ │ │ │ -45 hostLevelIterator_(identityGrid->hostgrid_->_l_e_v_e_l_G_r_i_d_V_i_e_w(level).template │ │ │ │ │ -end()) │ │ │ │ │ -46 {} │ │ │ │ │ -47 │ │ │ │ │ -48 │ │ │ │ │ -_5_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -51 ++hostLevelIterator_; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_5 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -56 return _E_n_t_i_t_y{{identityGrid_,*hostLevelIterator_}}; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_0 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r& i) const { │ │ │ │ │ -61 return hostLevelIterator_ == i.hostLevelIterator_; │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64 private: │ │ │ │ │ -65 const GridImp* identityGrid_; │ │ │ │ │ +_3_7 typedef typename std::conditional::type _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y; │ │ │ │ │ +38 │ │ │ │ │ +_4_0 typedef typename HostGridGeometryType::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; │ │ │ │ │ +_4_1 typedef typename HostGridGeometryType::JacobianTransposed │ │ │ │ │ +_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ +42 │ │ │ │ │ +43 │ │ │ │ │ +_4_6 _I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y(const _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y& hostGeometry) │ │ │ │ │ +47 : _h_o_s_t_G_e_o_m_e_t_r_y__(hostGeometry) │ │ │ │ │ +48 {} │ │ │ │ │ +49 │ │ │ │ │ +50 │ │ │ │ │ +_5_3 GeometryType _t_y_p_e () const { │ │ │ │ │ +54 return _h_o_s_t_G_e_o_m_e_t_r_y__.type(); │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +57 // return wether we have an affine mapping │ │ │ │ │ +_5_8 bool _a_f_f_i_n_e() const { │ │ │ │ │ +59 return _h_o_s_t_G_e_o_m_e_t_r_y__.affine(); │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +_6_3 int _c_o_r_n_e_r_s () const { │ │ │ │ │ +64 return _h_o_s_t_G_e_o_m_e_t_r_y__.corners(); │ │ │ │ │ +65 } │ │ │ │ │ 66 │ │ │ │ │ -67 HostGridLevelIterator hostLevelIterator_; │ │ │ │ │ -68 }; │ │ │ │ │ -69 │ │ │ │ │ -70 │ │ │ │ │ -71} // namespace Dune │ │ │ │ │ +67 │ │ │ │ │ +_6_9 const FieldVector _c_o_r_n_e_r (int i) const { │ │ │ │ │ +70 return _h_o_s_t_G_e_o_m_e_t_r_y__.corner(i); │ │ │ │ │ +71 } │ │ │ │ │ 72 │ │ │ │ │ -73#endif │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_D_u_n_e_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< │ │ │ │ │ -dim, dimworld, ct, GridFamily > &grid, int level) │ │ │ │ │ -level grid view for the given grid and level. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:802 │ │ │ │ │ +73 │ │ │ │ │ +_7_6 FieldVector _g_l_o_b_a_l (const FieldVector& _l_o_c_a_l) │ │ │ │ │ +const { │ │ │ │ │ +77 return _h_o_s_t_G_e_o_m_e_t_r_y__.global(_l_o_c_a_l); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +82 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +_8_3 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const FieldVector& _l_o_c_a_l ) const { │ │ │ │ │ +84 return _h_o_s_t_G_e_o_m_e_t_r_y__.jacobianTransposed(_l_o_c_a_l); │ │ │ │ │ +85 } │ │ │ │ │ +86 │ │ │ │ │ +_8_9 FieldVector _l_o_c_a_l (const FieldVector& _g_l_o_b_a_l) │ │ │ │ │ +const { │ │ │ │ │ +90 return _h_o_s_t_G_e_o_m_e_t_r_y__.local(_g_l_o_b_a_l); │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +93 │ │ │ │ │ +_9_5 bool _c_h_e_c_k_I_n_s_i_d_e(const FieldVector &_l_o_c_a_l) const { │ │ │ │ │ +96 return _h_o_s_t_G_e_o_m_e_t_r_y__.checkInside(_l_o_c_a_l); │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +99 │ │ │ │ │ +_1_0_2 ctype _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t (const FieldVector& _l_o_c_a_l) const { │ │ │ │ │ +103 return _h_o_s_t_G_e_o_m_e_t_r_y__.integrationElement(_l_o_c_a_l); │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +106 │ │ │ │ │ +_1_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 (const │ │ │ │ │ +FieldVector& _l_o_c_a_l) const { │ │ │ │ │ +109 return _h_o_s_t_G_e_o_m_e_t_r_y__.jacobianInverseTransposed(_l_o_c_a_l); │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y _h_o_s_t_G_e_o_m_e_t_r_y__; │ │ │ │ │ +114 │ │ │ │ │ +115 }; │ │ │ │ │ +116 │ │ │ │ │ +117} // namespace Dune │ │ │ │ │ +118 │ │ │ │ │ +119#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -prefix increment │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLevelIterator(const GridImp *identityGrid, int level) │ │ │ │ │ -Constructor. │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool │ │ │ │ │ -endDummy) │ │ │ │ │ -Constructor which create the end iterator. │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridLevelIterator &i) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +Default implementation for class Geometry. │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:406 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_c_h_e_c_k_I_n_s_i_d_e │ │ │ │ │ +bool checkInside(const FieldVector< ctype, mydim > &local) const │ │ │ │ │ +Returns true if the point is in the current element. │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +JacobianInverseTransposed jacobianInverseTransposed(const FieldVector< ctype, │ │ │ │ │ +mydim > &local) const │ │ │ │ │ +The Jacobian matrix of the mapping from the reference element to this element. │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +JacobianTransposed jacobianTransposed(const FieldVector< ctype, mydim > &local) │ │ │ │ │ +const │ │ │ │ │ +Return the transposed of the Jacobian. │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ +std::conditional< coorddim==DimensionWorld, HostGridGeometryType, │ │ │ │ │ +HostGridLocalGeometryType >::type HostGridGeometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ │ +bool affine() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_C_o_d_i_m_I_n_H_o_s_t_G_r_i_d │ │ │ │ │ +static constexpr int CodimInHostGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ │ +FieldVector< ctype, coorddim > global(const FieldVector< ctype, mydim > &local) │ │ │ │ │ +const │ │ │ │ │ +Maps a local coordinate within reference element to global coordinate in │ │ │ │ │ +element │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ +IdentityGridGeometry(const HostGridGeometry &hostGeometry) │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Return the element type identifier. │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ │ +const FieldVector< ctype, coorddim > corner(int i) const │ │ │ │ │ +access to coordinates of corners. Index is the number of the corner │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +HostGridGeometryType::JacobianTransposed JacobianTransposed │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ +ctype integrationElement(const FieldVector< ctype, mydim > &local) const │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_h_o_s_t_G_e_o_m_e_t_r_y__ │ │ │ │ │ +HostGridGeometry hostGeometry_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_H_o_s_t_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry │ │ │ │ │ +HostGridLocalGeometryType │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry │ │ │ │ │ +HostGridGeometryType │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ +HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed │ │ │ │ │ +type of jacobian transposed │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_D_i_m_e_n_s_i_o_n_W_o_r_l_d │ │ │ │ │ +static constexpr int DimensionWorld │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ │ +FieldVector< ctype, mydim > local(const FieldVector< ctype, coorddim > &global) │ │ │ │ │ +const │ │ │ │ │ +Maps a global coordinate within the element to a local coordinate in its │ │ │ │ │ +reference element. │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ │ +int corners() const │ │ │ │ │ +return the number of corners of this element. Corners are numbered 0...n-1 │ │ │ │ │ +DDeeffiinniittiioonn identitygridgeometry.hh:63 │ │ │ │ │ +_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ +Wrapper and interface classes for element geometries. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersectioniterator.hh File Reference │ │ │ │ +dune-grid: identitygridhierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,37 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridintersectioniterator.hh File Reference
│ │ │ │ +
identitygridhierarchiciterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes. │ │ │ │ +

The IdentityGridHierarchicIterator class. │ │ │ │ More...

│ │ │ │ -
#include "identitygridintersections.hh"
│ │ │ │ -#include "identitygridentity.hh"
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridLeafIntersectionIterator< GridImp >
 Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 These neighbors are accessed via a IntersectionIterator. This allows the implement non-matching meshes. The number of neighbors may be different from the number of an element! More...
 
class  Dune::IdentityGridLevelIntersectionIterator< GridImp >
class  Dune::IdentityGridHierarchicIterator< GridImp >
 Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit all entities of codimension 0 obtained through nested, hierarchic refinement of the entity. Iteration over this set of entities is provided by the HierarchicIterator, starting from a given entity. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.

│ │ │ │ +

The IdentityGridHierarchicIterator class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +2,26 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridintersectioniterator.hh File Reference │ │ │ │ │ -The IdentityGridLeafIntersectionIterator and │ │ │ │ │ -IdentityGridLevelIntersectionIterator classes. _M_o_r_e_._._. │ │ │ │ │ -#include "_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h" │ │ │ │ │ -#include "_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h" │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +identitygridhierarchiciterator.hh File Reference │ │ │ │ │ +The IdentityGridHierarchicIterator class. _M_o_r_e_._._. │ │ │ │ │ _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_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ - Iterator over all element neighborsMesh entities of codimension 0 │ │ │ │ │ - ("elements") allow to visit all neighbors, where a neighbor is an │ │ │ │ │ -  entity of codimension 0 which has a common entity of codimension 1 │ │ │ │ │ - These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. This allows │ │ │ │ │ - the implement non-matching meshes. The number of neighbors may be │ │ │ │ │ - different from the number of an element! _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ + Iterator over the descendants of an entity.Mesh entities of codimension │ │ │ │ │ + 0 ("elements") allow to visit all entities of codimension 0 obtained │ │ │ │ │ +  through nested, hierarchic refinement of the entity. Iteration over │ │ │ │ │ + this set of entities is provided by the HierarchicIterator, starting │ │ │ │ │ + from a given entity. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridLeafIntersectionIterator and │ │ │ │ │ -IdentityGridLevelIntersectionIterator classes. │ │ │ │ │ +The IdentityGridHierarchicIterator class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersectioniterator.hh Source File │ │ │ │ +dune-grid: identitygridhierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,177 +74,99 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridintersectioniterator.hh
│ │ │ │ +
identitygridhierarchiciterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDHIERITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
17namespace Dune {
│ │ │ │ -
18
│ │ │ │ -
27 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ +
12namespace Dune {
│ │ │ │ +
13
│ │ │ │ +
14
│ │ │ │ +
15 //**********************************************************************
│ │ │ │ +
16 //
│ │ │ │ +
24 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 // Type of the corresponding HierarchicIterator in the host grid
│ │ │ │ +
29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::HierarchicIterator HostGridHierarchicIterator;
│ │ │ │
30
│ │ │ │ -
31 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
31 public:
│ │ │ │
32
│ │ │ │ -
33 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
33 constexpr static int codimension = 0;
│ │ │ │
34
│ │ │ │ -
35 // The type used to store coordinates
│ │ │ │ -
36 typedef typename GridImp::ctype ctype;
│ │ │ │ -
37
│ │ │ │ -
38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
│ │ │ │ -
39
│ │ │ │ -
40 public:
│ │ │ │ -
41
│ │ │ │ - │ │ │ │ +
35 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ +
38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel) :
│ │ │ │ +
39 identityGrid_(identityGrid),
│ │ │ │ +
40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))
│ │ │ │ +
41 {}
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │
43
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 {}
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,
│ │ │ │ -
48 const HostLeafIntersectionIterator& hostIterator)
│ │ │ │ -
49 : identityGrid_(identityGrid)
│ │ │ │ -
50 , hostIterator_(hostIterator)
│ │ │ │ -
51 {}
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 return hostIterator_ == other.hostIterator_;
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 void increment() {
│ │ │ │ -
61 ++hostIterator_;
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69 private:
│ │ │ │ -
70 //**********************************************************
│ │ │ │ -
71 // private data
│ │ │ │ -
72 //**********************************************************
│ │ │ │ +
│ │ │ │ +
45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :
│ │ │ │ +
46 identityGrid_(identityGrid),
│ │ │ │ +
47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))
│ │ │ │ +
48 {}
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
52 void increment()
│ │ │ │ +
53 {
│ │ │ │ +
54 ++hostHierarchicIterator_;
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 return Entity{{identityGrid_,*hostHierarchicIterator_}};
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 private:
│ │ │ │ +
68 const GridImp* identityGrid_;
│ │ │ │ +
69
│ │ │ │ +
70 HostGridHierarchicIterator hostHierarchicIterator_;
│ │ │ │ +
71
│ │ │ │ +
72 };
│ │ │ │ +
│ │ │ │
73
│ │ │ │ -
74 const GridImp* identityGrid_ = nullptr;
│ │ │ │ -
75 HostLeafIntersectionIterator hostIterator_ = {};
│ │ │ │ -
76 };
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78
│ │ │ │ -
79
│ │ │ │ -
80
│ │ │ │ -
82 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 {
│ │ │ │ -
85 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
86
│ │ │ │ -
87 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
88
│ │ │ │ -
89 // The type used to store coordinates
│ │ │ │ -
90 typedef typename GridImp::ctype ctype;
│ │ │ │ -
91
│ │ │ │ -
92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
│ │ │ │ -
93
│ │ │ │ -
94 public:
│ │ │ │ -
95
│ │ │ │ - │ │ │ │ -
97
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
99 {}
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,
│ │ │ │ -
102 const HostLevelIntersectionIterator& hostIterator)
│ │ │ │ -
103 : identityGrid_(identityGrid)
│ │ │ │ -
104 , hostIterator_(hostIterator)
│ │ │ │ -
105 {}
│ │ │ │ -
│ │ │ │ -
106
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
109 return hostIterator_ == other.hostIterator_;
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ -
114 void increment() {
│ │ │ │ -
115 ++hostIterator_;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
120 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
123 private:
│ │ │ │ -
124
│ │ │ │ -
125
│ │ │ │ -
126 const GridImp* identityGrid_ = nullptr;
│ │ │ │ -
127 HostLevelIntersectionIterator hostIterator_ = {};
│ │ │ │ -
128
│ │ │ │ -
129 };
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131
│ │ │ │ -
132} // namespace Dune
│ │ │ │ -
133
│ │ │ │ -
134#endif
│ │ │ │ -
The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
│ │ │ │ -
The IdentityGridEntity class.
│ │ │ │ +
74
│ │ │ │ +
75} // end namespace Dune
│ │ │ │ +
76
│ │ │ │ +
77#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
Definition identitygridintersectioniterator.hh:84
│ │ │ │ -
bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) const
equality
Definition identitygridintersectioniterator.hh:108
│ │ │ │ -
void increment()
prefix increment
Definition identitygridintersectioniterator.hh:114
│ │ │ │ -
IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const HostLevelIntersectionIterator &hostIterator)
Definition identitygridintersectioniterator.hh:101
│ │ │ │ -
Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp > > Intersection
Definition identitygridintersectioniterator.hh:96
│ │ │ │ -
Intersection dereference() const
dereferencing
Definition identitygridintersectioniterator.hh:119
│ │ │ │ -
IdentityGridLevelIntersectionIterator()
Definition identitygridintersectioniterator.hh:98
│ │ │ │ -
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ │ -
bool equals(const IdentityGridLeafIntersectionIterator &other) const
equality
Definition identitygridintersectioniterator.hh:54
│ │ │ │ -
void increment()
prefix increment
Definition identitygridintersectioniterator.hh:60
│ │ │ │ -
IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const HostLeafIntersectionIterator &hostIterator)
Definition identitygridintersectioniterator.hh:47
│ │ │ │ -
Intersection dereference() const
dereferencing
Definition identitygridintersectioniterator.hh:65
│ │ │ │ -
Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp > > Intersection
Definition identitygridintersectioniterator.hh:42
│ │ │ │ -
IdentityGridLeafIntersectionIterator()
Definition identitygridintersectioniterator.hh:44
│ │ │ │ -
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition identitygridintersections.hh:33
│ │ │ │ -
Definition identitygridintersections.hh:192
│ │ │ │ - │ │ │ │ +
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition identitygridhierarchiciterator.hh:26
│ │ │ │ +
void increment()
Definition identitygridhierarchiciterator.hh:52
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridhierarchiciterator.hh:35
│ │ │ │ +
bool equals(const IdentityGridHierarchicIterator &i) const
equality
Definition identitygridhierarchiciterator.hh:63
│ │ │ │ +
static constexpr int codimension
Definition identitygridhierarchiciterator.hh:33
│ │ │ │ +
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel, bool endDummy)
Definition identitygridhierarchiciterator.hh:45
│ │ │ │ +
Entity dereference() const
dereferencing
Definition identitygridhierarchiciterator.hh:58
│ │ │ │ +
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel)
the default Constructor
Definition identitygridhierarchiciterator.hh:38
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,208 +1,109 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridintersectioniterator.hh │ │ │ │ │ +identitygridhierarchiciterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include "_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h" │ │ │ │ │ -9#include "_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h" │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -17namespace _D_u_n_e { │ │ │ │ │ -18 │ │ │ │ │ -27 template │ │ │ │ │ -_2_8 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -29 { │ │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ │ +13 │ │ │ │ │ +14 │ │ │ │ │ +15 //********************************************************************** │ │ │ │ │ +16 // │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +26 { │ │ │ │ │ +27 │ │ │ │ │ +28 // Type of the corresponding HierarchicIterator in the host grid │ │ │ │ │ +29 typedef typename GridImp::HostGridType::template Codim<0>::Entity:: │ │ │ │ │ +HierarchicIterator HostGridHierarchicIterator; │ │ │ │ │ 30 │ │ │ │ │ -31 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +31 public: │ │ │ │ │ 32 │ │ │ │ │ -33 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +_3_3 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = 0; │ │ │ │ │ 34 │ │ │ │ │ -35 // The type used to store coordinates │ │ │ │ │ -36 typedef typename GridImp::ctype ctype; │ │ │ │ │ -37 │ │ │ │ │ -38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator │ │ │ │ │ -HostLeafIntersectionIterator; │ │ │ │ │ -39 │ │ │ │ │ -40 public: │ │ │ │ │ -41 │ │ │ │ │ -_4_2 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_c_o_n_s_t_ _G_r_i_d_I_m_p_,_ _D_u_n_e_:_: │ │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> > _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +_3_5 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ +36 │ │ │ │ │ +_3_8 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ │ +_E_n_t_i_t_y& startEntity, int maxLevel) : │ │ │ │ │ +39 identityGrid_(identityGrid), │ │ │ │ │ +40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel)) │ │ │ │ │ +41 {} │ │ │ │ │ +42 │ │ │ │ │ 43 │ │ │ │ │ -_4_4 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ │ -45 {} │ │ │ │ │ -46 │ │ │ │ │ -_4_7 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(const GridImp* identityGrid, │ │ │ │ │ -48 const HostLeafIntersectionIterator& hostIterator) │ │ │ │ │ -49 : identityGrid_(identityGrid) │ │ │ │ │ -50 , hostIterator_(hostIterator) │ │ │ │ │ -51 {} │ │ │ │ │ -52 │ │ │ │ │ -_5_4 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) const { │ │ │ │ │ -55 return hostIterator_ == other.hostIterator_; │ │ │ │ │ -56 } │ │ │ │ │ -57 │ │ │ │ │ -58 │ │ │ │ │ -_6_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -61 ++hostIterator_; │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_5 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -66 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_>(identityGrid_,*hostIterator_); │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -69 private: │ │ │ │ │ -70 //********************************************************** │ │ │ │ │ -71 // private data │ │ │ │ │ -72 //********************************************************** │ │ │ │ │ +_4_5 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ │ +_E_n_t_i_t_y& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) : │ │ │ │ │ +46 identityGrid_(identityGrid), │ │ │ │ │ +47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel)) │ │ │ │ │ +48 {} │ │ │ │ │ +49 │ │ │ │ │ +50 │ │ │ │ │ +_5_2 void _i_n_c_r_e_m_e_n_t() │ │ │ │ │ +53 { │ │ │ │ │ +54 ++hostHierarchicIterator_; │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +_5_8 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +59 return _E_n_t_i_t_y{{identityGrid_,*hostHierarchicIterator_}}; │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +_6_3 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r& i) const { │ │ │ │ │ +64 return hostHierarchicIterator_ == i.hostHierarchicIterator_; │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +67 private: │ │ │ │ │ +68 const GridImp* identityGrid_; │ │ │ │ │ +69 │ │ │ │ │ +70 HostGridHierarchicIterator hostHierarchicIterator_; │ │ │ │ │ +71 │ │ │ │ │ +72 }; │ │ │ │ │ 73 │ │ │ │ │ -74 const GridImp* identityGrid_ = nullptr; │ │ │ │ │ -75 HostLeafIntersectionIterator hostIterator_ = {}; │ │ │ │ │ -76 }; │ │ │ │ │ -77 │ │ │ │ │ -78 │ │ │ │ │ -79 │ │ │ │ │ -80 │ │ │ │ │ -82 template │ │ │ │ │ -_8_3 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -84 { │ │ │ │ │ -85 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -86 │ │ │ │ │ -87 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -88 │ │ │ │ │ -89 // The type used to store coordinates │ │ │ │ │ -90 typedef typename GridImp::ctype ctype; │ │ │ │ │ -91 │ │ │ │ │ -92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator │ │ │ │ │ -HostLevelIntersectionIterator; │ │ │ │ │ -93 │ │ │ │ │ -94 public: │ │ │ │ │ -95 │ │ │ │ │ -_9_6 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_c_o_n_s_t_ _G_r_i_d_I_m_p_,_ _D_u_n_e_:_: │ │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> > _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -97 │ │ │ │ │ -_9_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ │ -99 {} │ │ │ │ │ -100 │ │ │ │ │ -_1_0_1 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(const GridImp* identityGrid, │ │ │ │ │ -102 const HostLevelIntersectionIterator& hostIterator) │ │ │ │ │ -103 : identityGrid_(identityGrid) │ │ │ │ │ -104 , hostIterator_(hostIterator) │ │ │ │ │ -105 {} │ │ │ │ │ -106 │ │ │ │ │ -_1_0_8 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>& other) │ │ │ │ │ -const { │ │ │ │ │ -109 return hostIterator_ == other.hostIterator_; │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -112 │ │ │ │ │ -_1_1_4 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -115 ++hostIterator_; │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_1_9 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -120 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> │ │ │ │ │ -(identityGrid_,*hostIterator_); │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -123 private: │ │ │ │ │ -124 │ │ │ │ │ -125 │ │ │ │ │ -126 const GridImp* identityGrid_ = nullptr; │ │ │ │ │ -127 HostLevelIntersectionIterator hostIterator_ = {}; │ │ │ │ │ -128 │ │ │ │ │ -129 }; │ │ │ │ │ -130 │ │ │ │ │ -131 │ │ │ │ │ -132} // namespace Dune │ │ │ │ │ -133 │ │ │ │ │ -134#endif │ │ │ │ │ -_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h │ │ │ │ │ -The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ -_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ │ -The IdentityGridEntity class. │ │ │ │ │ +74 │ │ │ │ │ +75} // end namespace Dune │ │ │ │ │ +76 │ │ │ │ │ +77#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) │ │ │ │ │ -const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over the descendants of an entity.Mesh entities of codimension 0 │ │ │ │ │ +("elements") allow to visit... │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ void increment() │ │ │ │ │ -prefix increment │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ │ -HostLevelIntersectionIterator &hostIterator) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp │ │ │ │ │ -> > Intersection │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:96 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Intersection dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLevelIntersectionIterator() │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ │ -allow to visit all nei... │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridLeafIntersectionIterator &other) const │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridHierarchicIterator &i) const │ │ │ │ │ equality │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -prefix increment │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ │ -HostLeafIntersectionIterator &hostIterator) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Intersection dereference() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ │ +&startEntity, int maxLevel, bool endDummy) │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity dereference() const │ │ │ │ │ dereferencing │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp │ │ │ │ │ -> > Intersection │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLeafIntersectionIterator() │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ │ -("elements") allow to visi... │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ │ +&startEntity, int maxLevel) │ │ │ │ │ +the default Constructor │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:38 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridleafiterator.hh File Reference │ │ │ │ +dune-grid: identitygridentityseed.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridleafiterator.hh File Reference
│ │ │ │ +
identitygridentityseed.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridLeafIterator class. │ │ │ │ +

The IdentityGridEntitySeed class. │ │ │ │ More...

│ │ │ │ -
#include <dune/grid/common/gridenums.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridLeafIterator< codim, pitype, GridImp >
 Iterator over all entities of a given codimension and level of a grid. More...
class  Dune::IdentityGridEntitySeed< codim, GridImp >
 The EntitySeed class provides the minimal information needed to restore an Entity using the grid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridLeafIterator class.

│ │ │ │ +

The IdentityGridEntitySeed class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,24 +2,23 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridleafiterator.hh File Reference │ │ │ │ │ -The IdentityGridLeafIterator class. _M_o_r_e_._._. │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +identitygridentityseed.hh File Reference │ │ │ │ │ +The IdentityGridEntitySeed class. _M_o_r_e_._._. │ │ │ │ │ _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_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  The _E_n_t_i_t_y_S_e_e_d class provides the minimal information needed to restore │ │ │ │ │ + an _E_n_t_i_t_y using the grid. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridLeafIterator class. │ │ │ │ │ +The IdentityGridEntitySeed class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridleafiterator.hh Source File │ │ │ │ +dune-grid: identitygridentityseed.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,100 +74,85 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridleafiterator.hh
│ │ │ │ +
identitygridentityseed.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │ +
6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │
14namespace Dune {
│ │ │ │
15
│ │ │ │
16
│ │ │ │ -
20 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ -
23 private:
│ │ │ │ -
24
│ │ │ │ -
25 // LevelIterator to the equivalent entity in the host grid
│ │ │ │ -
26 typedef typename GridImp::HostGridType::template Codim<codim>::template Partition<pitype>::LeafIterator HostGridLeafIterator;
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ +
22 template<int codim, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 protected:
│ │ │ │ +
26
│ │ │ │ +
27 // Entity type of the hostgrid
│ │ │ │ +
28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
│ │ │ │
29
│ │ │ │ -
30 constexpr static int codimension = codim;
│ │ │ │ -
31
│ │ │ │ -
32 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 explicit IdentityGridLeafIterator(const GridImp* identityGrid) :
│ │ │ │ -
36 identityGrid_(identityGrid),
│ │ │ │ -
37 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template begin<codim,pitype>())
│ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
44 explicit IdentityGridLeafIterator(const GridImp* identityGrid, [[maybe_unused]] bool endDummy) :
│ │ │ │ -
45 identityGrid_(identityGrid),
│ │ │ │ -
46 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template end<codim,pitype>())
│ │ │ │ -
47 {}
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
51 void increment() {
│ │ │ │ -
52 ++hostLeafIterator_;
│ │ │ │ -
53 }
│ │ │ │ +
30 // EntitySeed type of the hostgrid
│ │ │ │ +
31 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ +
34
│ │ │ │ +
35 constexpr static int codimension = codim;
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 {}
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
50 hostEntitySeed_(hostEntity.seed())
│ │ │ │ +
51 {}
│ │ │ │
│ │ │ │ -
54
│ │ │ │ +
52
│ │ │ │
│ │ │ │ - │ │ │ │ -
57 return Entity{{identityGrid_,*hostLeafIterator_}};
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ -
61 bool equals(const IdentityGridLeafIterator& i) const {
│ │ │ │ -
62 return hostLeafIterator_ == i.hostLeafIterator_;
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
65 private:
│ │ │ │ -
66 const GridImp* identityGrid_;
│ │ │ │ -
67
│ │ │ │ -
68 HostGridLeafIterator hostLeafIterator_;
│ │ │ │ + │ │ │ │ +
57 {
│ │ │ │ +
58 return hostEntitySeed_;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
64 bool isValid() const
│ │ │ │ +
65 {
│ │ │ │ +
66 return hostEntitySeed_.isValid();
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68 private:
│ │ │ │
69
│ │ │ │ -
70 };
│ │ │ │ +
70 HostEntitySeed hostEntitySeed_;
│ │ │ │ +
71 };
│ │ │ │
│ │ │ │ -
71
│ │ │ │
72
│ │ │ │ -
73} // namespace Dune
│ │ │ │ +
73} // namespace Dune
│ │ │ │
74
│ │ │ │ -
75#endif
│ │ │ │ - │ │ │ │ -
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │ +
75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Iterator over all entities of a given codimension and level of a grid.
Definition identitygridleafiterator.hh:22
│ │ │ │ -
Entity dereference() const
dereferencing
Definition identitygridleafiterator.hh:56
│ │ │ │ -
bool equals(const IdentityGridLeafIterator &i) const
equality
Definition identitygridleafiterator.hh:61
│ │ │ │ -
IdentityGridLeafIterator(const GridImp *identityGrid, bool endDummy)
Constructor which create the end iterator.
Definition identitygridleafiterator.hh:44
│ │ │ │ -
static constexpr int codimension
Definition identitygridleafiterator.hh:30
│ │ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition identitygridleafiterator.hh:32
│ │ │ │ -
IdentityGridLeafIterator(const GridImp *identityGrid)
Definition identitygridleafiterator.hh:35
│ │ │ │ -
void increment()
prefix increment
Definition identitygridleafiterator.hh:51
│ │ │ │ +
The EntitySeed class provides the minimal information needed to restore an Entity using the grid.
Definition identitygridentityseed.hh:24
│ │ │ │ +
static constexpr int codimension
Definition identitygridentityseed.hh:35
│ │ │ │ +
IdentityGridEntitySeed()
Construct an empty (i.e. isValid() == false) seed.
Definition identitygridentityseed.hh:40
│ │ │ │ +
bool isValid() const
Check whether it is safe to create an Entity from this Seed.
Definition identitygridentityseed.hh:64
│ │ │ │ +
GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity
Definition identitygridentityseed.hh:28
│ │ │ │ +
IdentityGridEntitySeed(const HostEntity &hostEntity)
Create EntitySeed from hostgrid Entity.
Definition identitygridentityseed.hh:49
│ │ │ │ +
const HostEntitySeed & hostEntitySeed() const
Get stored HostEntitySeed.
Definition identitygridentityseed.hh:56
│ │ │ │ +
GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed HostEntitySeed
Definition identitygridentityseed.hh:31
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,113 +1,96 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridleafiterator.hh │ │ │ │ │ +identitygridentityseed.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ +6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -9 │ │ │ │ │ 14namespace _D_u_n_e { │ │ │ │ │ 15 │ │ │ │ │ 16 │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -22 { │ │ │ │ │ -23 private: │ │ │ │ │ -24 │ │ │ │ │ -25 // LevelIterator to the equivalent entity in the host grid │ │ │ │ │ -26 typedef typename GridImp::HostGridType::template Codim::template │ │ │ │ │ -Partition::LeafIterator HostGridLeafIterator; │ │ │ │ │ -27 │ │ │ │ │ -28 public: │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +24 { │ │ │ │ │ +25 protected: │ │ │ │ │ +26 │ │ │ │ │ +27 // Entity type of the hostgrid │ │ │ │ │ +_2_8 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ │ +Entity _H_o_s_t_E_n_t_i_t_y; │ │ │ │ │ 29 │ │ │ │ │ -_3_0 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ -31 │ │ │ │ │ -_3_2 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ -33 │ │ │ │ │ -_3_5 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r(const GridImp* identityGrid) : │ │ │ │ │ -36 identityGrid_(identityGrid), │ │ │ │ │ -37 hostLeafIterator_(identityGrid->hostgrid_->_l_e_a_f_G_r_i_d_V_i_e_w().template │ │ │ │ │ -begin()) │ │ │ │ │ -38 {} │ │ │ │ │ -39 │ │ │ │ │ -_4_4 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r(const GridImp* identityGrid, [ │ │ │ │ │ -[maybe_unused]] bool endDummy) : │ │ │ │ │ -45 identityGrid_(identityGrid), │ │ │ │ │ -46 hostLeafIterator_(identityGrid->hostgrid_->_l_e_a_f_G_r_i_d_V_i_e_w().template │ │ │ │ │ -end()) │ │ │ │ │ -47 {} │ │ │ │ │ -48 │ │ │ │ │ -49 │ │ │ │ │ -_5_1 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -52 ++hostLeafIterator_; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -_5_6 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -57 return _E_n_t_i_t_y{{identityGrid_,*hostLeafIterator_}}; │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -_6_1 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r& i) const { │ │ │ │ │ -62 return hostLeafIterator_ == i.hostLeafIterator_; │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -65 private: │ │ │ │ │ -66 const GridImp* identityGrid_; │ │ │ │ │ -67 │ │ │ │ │ -68 HostGridLeafIterator hostLeafIterator_; │ │ │ │ │ +30 // EntitySeed type of the hostgrid │ │ │ │ │ +_3_1 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ │ +EntitySeed _H_o_s_t_E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +32 │ │ │ │ │ +33 public: │ │ │ │ │ +34 │ │ │ │ │ +_3_5 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +36 │ │ │ │ │ +_4_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d() │ │ │ │ │ +41 {} │ │ │ │ │ +42 │ │ │ │ │ +_4_9 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d(const _H_o_s_t_E_n_t_i_t_y& hostEntity) : │ │ │ │ │ +50 hostEntitySeed_(hostEntity.seed()) │ │ │ │ │ +51 {} │ │ │ │ │ +52 │ │ │ │ │ +_5_6 const _H_o_s_t_E_n_t_i_t_y_S_e_e_d& _h_o_s_t_E_n_t_i_t_y_S_e_e_d() const │ │ │ │ │ +57 { │ │ │ │ │ +58 return hostEntitySeed_; │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +_6_4 bool _i_s_V_a_l_i_d() const │ │ │ │ │ +65 { │ │ │ │ │ +66 return hostEntitySeed_.isValid(); │ │ │ │ │ +67 } │ │ │ │ │ +68 private: │ │ │ │ │ 69 │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ +70 _H_o_s_t_E_n_t_i_t_y_S_e_e_d hostEntitySeed_; │ │ │ │ │ +71 }; │ │ │ │ │ 72 │ │ │ │ │ 73} // namespace Dune │ │ │ │ │ 74 │ │ │ │ │ -75#endif │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_D_u_n_e_:_:_l_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< │ │ │ │ │ -dim, dimworld, ct, GridFamily > &grid) │ │ │ │ │ -leaf grid view for the given grid │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:819 │ │ │ │ │ +75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridLeafIterator &i) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLeafIterator(const GridImp *identityGrid, bool endDummy) │ │ │ │ │ -Constructor which create the end iterator. │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +The EntitySeed class provides the minimal information needed to restore an │ │ │ │ │ +Entity using the grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ static constexpr int codimension │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridLeafIterator(const GridImp *identityGrid) │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -prefix increment │ │ │ │ │ -DDeeffiinniittiioonn identitygridleafiterator.hh:51 │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +IdentityGridEntitySeed() │ │ │ │ │ +Construct an empty (i.e. isValid() == false) seed. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ │ +bool isValid() const │ │ │ │ │ +Check whether it is safe to create an Entity from this Seed. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y │ │ │ │ │ +GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +IdentityGridEntitySeed(const HostEntity &hostEntity) │ │ │ │ │ +Create EntitySeed from hostgrid Entity. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_h_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +const HostEntitySeed & hostEntitySeed() const │ │ │ │ │ +Get stored HostEntitySeed. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed │ │ │ │ │ +HostEntitySeed │ │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:31 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersections.hh File Reference │ │ │ │ +dune-grid: identitygridentity.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridintersections.hh File Reference
│ │ │ │ +
identitygridentity.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ +

The IdentityGridEntity class. │ │ │ │ More...

│ │ │ │ -
#include "identitygridleafiterator.hh"
│ │ │ │ -#include <dune/grid/identitygrid/identitygridentity.hh>
│ │ │ │ +
#include <dune/grid/common/grid.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridLeafIntersection< GridImp >
 An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 These neighbors are accessed via a IntersectionIterator. This allows the implement non-matching meshes. The number of neighbors may be different from the number of an element! More...
class  Dune::IdentityGridEntity< codim, dim, GridImp >
 The implementation of entities in a IdentityGrid. More...
 
class  Dune::IdentityGridLevelIntersection< GridImp >
class  Dune::IdentityGridEntity< 0, dim, GridImp >
 Specialization for codim-0-entities. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

│ │ │ │ +

The IdentityGridEntity class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,32 +2,26 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridintersections.hh File Reference │ │ │ │ │ -The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ -_M_o_r_e_._._. │ │ │ │ │ -#include "_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h> │ │ │ │ │ +identitygridentity.hh File Reference │ │ │ │ │ +The IdentityGridEntity class. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ - An intersection with a leaf neighbor elementMesh entities of │ │ │ │ │ - codimension 0 ("elements") allow to visit all neighbors, where a │ │ │ │ │ -  neighbor is an entity of codimension 0 which has a common entity of │ │ │ │ │ - codimension 1 These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. │ │ │ │ │ - This allows the implement non-matching meshes. The number of neighbors │ │ │ │ │ - may be different from the number of an element! _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  The implementation of entities in a _I_d_e_n_t_i_t_y_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  Specialization for codim-0-entities. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ +The IdentityGridEntity class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersections.hh Source File │ │ │ │ +dune-grid: identitygridentity.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,435 +74,542 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridintersections.hh
│ │ │ │ +
identitygridentity.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRIDENTITY_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDENTITY_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
15namespace Dune {
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune {
│ │ │ │ +
15
│ │ │ │
16
│ │ │ │ -
17
│ │ │ │ -
18 // External forward declarations
│ │ │ │ -
19 template< class Grid >
│ │ │ │ -
20 struct HostGridAccess;
│ │ │ │ +
17 // Forward declarations
│ │ │ │ +
18
│ │ │ │ +
19 template<int codim, int dim, class GridImp>
│ │ │ │ +
20 class IdentityGridEntity;
│ │ │ │
21
│ │ │ │ -
22
│ │ │ │ +
22 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ +
23 class IdentityGridLevelIterator;
│ │ │ │ +
24
│ │ │ │ +
25 template<class GridImp>
│ │ │ │ +
26 class IdentityGridLevelIntersectionIterator;
│ │ │ │ +
27
│ │ │ │ +
28 template<class GridImp>
│ │ │ │ +
29 class IdentityGridLeafIntersectionIterator;
│ │ │ │ +
30
│ │ │ │
31 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ +
32 class IdentityGridHierarchicIterator;
│ │ │ │ +
33
│ │ │ │
34
│ │ │ │ -
35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
│ │ │ │ -
36
│ │ │ │ -
37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ +
35 // External forward declarations
│ │ │ │ +
36 template< class Grid >
│ │ │ │ +
37 struct HostGridAccess;
│ │ │ │
38
│ │ │ │ -
39 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
40
│ │ │ │ -
41 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
42
│ │ │ │ -
43 // The type used to store coordinates
│ │ │ │ -
44 typedef typename GridImp::ctype ctype;
│ │ │ │ -
45
│ │ │ │ -
46 typedef typename GridImp::HostGridType::LeafGridView::Intersection HostLeafIntersection;
│ │ │ │ -
47
│ │ │ │ -
48 public:
│ │ │ │ -
49
│ │ │ │ -
50 typedef typename GridImp::template Codim<1>::Geometry Geometry;
│ │ │ │ -
51 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
│ │ │ │ -
52 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
53 typedef FieldVector<ctype, dimworld> NormalVector;
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 {}
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
58 IdentityGridLeafIntersection(const GridImp* identityGrid,
│ │ │ │ -
59 const HostLeafIntersection& hostIntersection)
│ │ │ │ -
60 : identityGrid_(identityGrid)
│ │ │ │ -
61 , hostIntersection_(hostIntersection)
│ │ │ │ -
62 {}
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
64 IdentityGridLeafIntersection(const GridImp* identityGrid,
│ │ │ │ -
65 HostLeafIntersection&& hostIntersection)
│ │ │ │ -
66 : identityGrid_(identityGrid)
│ │ │ │ -
67 , hostIntersection_(std::move(hostIntersection))
│ │ │ │ -
68 {}
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
│ │ │ │ -
70 bool equals(const IdentityGridLeafIntersection& other) const
│ │ │ │ -
71 {
│ │ │ │ -
72 return hostIntersection_ == other.hostIntersection_;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
│ │ │ │ -
77 Entity inside() const {
│ │ │ │ -
78 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ +
39
│ │ │ │ +
40 //**********************************************************************
│ │ │ │ +
41 //
│ │ │ │ +
42 // --IdentityGridEntity
│ │ │ │ +
43 // --Entity
│ │ │ │ +
44 //
│ │ │ │ +
52 template<int codim, int dim, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 public EntityDefaultImplementation <codim,dim,GridImp,IdentityGridEntity>
│ │ │ │ +
55 {
│ │ │ │ +
56
│ │ │ │ +
57 template <class GridImp_>
│ │ │ │ + │ │ │ │ +
59
│ │ │ │ +
60 template <class GridImp_>
│ │ │ │ + │ │ │ │ +
62
│ │ │ │ +
63 template <class GridImp_>
│ │ │ │ + │ │ │ │ +
65
│ │ │ │ +
66 template <class GridImp_>
│ │ │ │ + │ │ │ │ +
68
│ │ │ │ +
69 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ +
70
│ │ │ │ +
71
│ │ │ │ +
72 private:
│ │ │ │ +
73
│ │ │ │ +
74 typedef typename GridImp::ctype ctype;
│ │ │ │ +
75
│ │ │ │ +
76 // The codimension of this entity wrt the host grid
│ │ │ │ +
77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension + codim;
│ │ │ │ +
78
│ │ │ │ +
79 // equivalent entity in the host grid
│ │ │ │ +
80 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
│ │ │ │
81
│ │ │ │ -
│ │ │ │ -
84 Entity outside() const {
│ │ │ │ -
85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
88
│ │ │ │ +
82
│ │ │ │ +
83 public:
│ │ │ │ +
84
│ │ │ │ +
85 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
│ │ │ │ +
86
│ │ │ │ +
88 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
│ │ │ │ +
89
│ │ │ │
│ │ │ │ -
90 bool boundary () const {
│ │ │ │ -
91 return hostIntersection_.boundary();
│ │ │ │ -
92 }
│ │ │ │ + │ │ │ │ +
91 : identityGrid_(nullptr)
│ │ │ │ +
92 {}
│ │ │ │
│ │ │ │
93
│ │ │ │ +
│ │ │ │ +
94 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
│ │ │ │ +
95 : hostEntity_(hostEntity)
│ │ │ │ +
96 , identityGrid_(identityGrid)
│ │ │ │ +
97 {}
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │
│ │ │ │ - │ │ │ │ -
100 return hostIntersection_.centerUnitOuterNormal();
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
│ │ │ │ -
104 bool neighbor () const {
│ │ │ │ -
105 return hostIntersection_.neighbor();
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
│ │ │ │ -
109 size_t boundarySegmentIndex() const {
│ │ │ │ -
110 return hostIntersection_.boundarySegmentIndex();
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ -
114 bool conforming () const {
│ │ │ │ -
115 return hostIntersection_.conforming();
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ -
119 GeometryType type () const {
│ │ │ │ -
120 return hostIntersection_.type();
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
123
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
129 {
│ │ │ │ -
130 return LocalGeometry( hostIntersection_.geometryInInside() );
│ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
136 {
│ │ │ │ -
137 return LocalGeometry( hostIntersection_.geometryInOutside() );
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
143 {
│ │ │ │ -
144 return Geometry( hostIntersection_.geometry() );
│ │ │ │ +
99 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
│ │ │ │ +
100 : hostEntity_(std::move(hostEntity))
│ │ │ │ +
101 , identityGrid_(identityGrid)
│ │ │ │ +
102 {}
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
106 : hostEntity_(original.hostEntity_)
│ │ │ │ +
107 , identityGrid_(original.identityGrid_)
│ │ │ │ +
108 {}
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 : hostEntity_(std::move(original.hostEntity_))
│ │ │ │ +
112 , identityGrid_(original.identityGrid_)
│ │ │ │ +
113 {}
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
117 {
│ │ │ │ +
118 if (this != &original)
│ │ │ │ +
119 {
│ │ │ │ +
120 identityGrid_ = original.identityGrid_;
│ │ │ │ +
121 hostEntity_ = original.hostEntity_;
│ │ │ │ +
122 }
│ │ │ │ +
123 return *this;
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
128 {
│ │ │ │ +
129 if (this != &original)
│ │ │ │ +
130 {
│ │ │ │ +
131 identityGrid_ = original.identityGrid_;
│ │ │ │ +
132 hostEntity_ = std::move(original.hostEntity_);
│ │ │ │ +
133 }
│ │ │ │ +
134 return *this;
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
137 bool equals(const IdentityGridEntity& other) const
│ │ │ │ +
138 {
│ │ │ │ +
139 return hostEntity_ == other.hostEntity_;
│ │ │ │ +
140 }
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
│ │ │ │ +
143 bool hasFather () const {
│ │ │ │ +
144 return hostEntity_.hasFather();
│ │ │ │
145 }
│ │ │ │
│ │ │ │
146
│ │ │ │ -
147
│ │ │ │ -
│ │ │ │ -
149 int indexInInside () const {
│ │ │ │ -
150 return hostIntersection_.indexInInside();
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
149 {
│ │ │ │ +
150 return EntitySeed(hostEntity_);
│ │ │ │
151 }
│ │ │ │
│ │ │ │
152
│ │ │ │ -
153
│ │ │ │ -
│ │ │ │ -
155 int indexInOutside () const {
│ │ │ │ -
156 return hostIntersection_.indexInOutside();
│ │ │ │ -
157 }
│ │ │ │ +
│ │ │ │ +
154 int level () const {
│ │ │ │ +
155 return hostEntity_.level();
│ │ │ │ +
156 }
│ │ │ │
│ │ │ │ +
157
│ │ │ │
158
│ │ │ │ -
159
│ │ │ │
│ │ │ │ -
161 FieldVector<ctype, GridImp::dimensionworld> outerNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
│ │ │ │ -
162 return hostIntersection_.outerNormal(local);
│ │ │ │ + │ │ │ │ +
162 return hostEntity_.partitionType();
│ │ │ │
163 }
│ │ │ │
│ │ │ │
164
│ │ │ │ -
│ │ │ │ -
166 FieldVector<ctype, GridImp::dimensionworld> integrationOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
│ │ │ │ -
167 return hostIntersection_.integrationOuterNormal(local);
│ │ │ │ -
168 }
│ │ │ │ -
│ │ │ │ -
169
│ │ │ │ -
│ │ │ │ -
171 FieldVector<ctype, GridImp::dimensionworld> unitOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
│ │ │ │ -
172 return hostIntersection_.unitOuterNormal(local);
│ │ │ │ -
173 }
│ │ │ │ -
│ │ │ │ -
174
│ │ │ │ -
175
│ │ │ │ -
176 private:
│ │ │ │ -
177 //**********************************************************
│ │ │ │ -
178 // private methods
│ │ │ │ -
179 //**********************************************************
│ │ │ │ +
│ │ │ │ +
167 unsigned int subEntities (unsigned int cc) const
│ │ │ │ +
168 {
│ │ │ │ +
169 return hostEntity_.subEntities(cc);
│ │ │ │ +
170 }
│ │ │ │ +
│ │ │ │ +
171
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
174 {
│ │ │ │ +
175 return Geometry( hostEntity_.geometry() );
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
178
│ │ │ │ +
179 HostGridEntity hostEntity_;
│ │ │ │
180
│ │ │ │ -
181 const GridImp* identityGrid_;
│ │ │ │ +
181 private:
│ │ │ │
182
│ │ │ │ -
183 HostLeafIntersection hostIntersection_;
│ │ │ │ -
184 };
│ │ │ │ +
183 const GridImp* identityGrid_;
│ │ │ │ +
184
│ │ │ │ +
185 };
│ │ │ │
│ │ │ │ -
185
│ │ │ │
186
│ │ │ │
187
│ │ │ │
188
│ │ │ │ -
190 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
192 {
│ │ │ │ -
193
│ │ │ │ -
194 friend class IdentityGridLevelIntersectionIterator<GridImp>;
│ │ │ │ -
195
│ │ │ │ -
196 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ -
197
│ │ │ │ -
198 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
199
│ │ │ │ -
200 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
201
│ │ │ │ -
202 // The type used to store coordinates
│ │ │ │ -
203 typedef typename GridImp::ctype ctype;
│ │ │ │ -
204
│ │ │ │ -
205 typedef typename GridImp::HostGridType::LevelGridView::Intersection HostLevelIntersection;
│ │ │ │ -
206
│ │ │ │ -
207 public:
│ │ │ │ -
208
│ │ │ │ -
209 typedef typename GridImp::template Codim<1>::Geometry Geometry;
│ │ │ │ -
210 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
│ │ │ │ -
211 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
212 typedef FieldVector<ctype, dimworld> NormalVector;
│ │ │ │ -
213
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
215 {}
│ │ │ │ -
│ │ │ │ -
216
│ │ │ │ -
│ │ │ │ -
217 IdentityGridLevelIntersection(const GridImp* identityGrid,
│ │ │ │ -
218 const HostLevelIntersection& hostIntersection)
│ │ │ │ -
219 : identityGrid_(identityGrid)
│ │ │ │ -
220 , hostIntersection_(hostIntersection)
│ │ │ │ -
221 {}
│ │ │ │ -
│ │ │ │ +
189
│ │ │ │ +
190 //***********************
│ │ │ │ +
191 //
│ │ │ │ +
192 // --IdentityGridEntity
│ │ │ │ +
193 //
│ │ │ │ +
194 //***********************
│ │ │ │ +
202 template<int dim, class GridImp>
│ │ │ │ +
│ │ │ │ +
203 class IdentityGridEntity<0,dim,GridImp> :
│ │ │ │ +
204 public EntityDefaultImplementation<0,dim,GridImp, IdentityGridEntity>
│ │ │ │ +
205 {
│ │ │ │ +
206 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ +
207
│ │ │ │ +
208 public:
│ │ │ │ +
209
│ │ │ │ +
210 // The codimension of this entitypointer wrt the host grid
│ │ │ │ +
211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension;
│ │ │ │ +
212
│ │ │ │ +
213 // equivalent entity in the host grid
│ │ │ │ +
214 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
│ │ │ │ +
215
│ │ │ │ +
216 typedef typename GridImp::template Codim<0>::Geometry Geometry;
│ │ │ │ +
217
│ │ │ │ +
218 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
│ │ │ │ +
219
│ │ │ │ + │ │ │ │
222
│ │ │ │ -
│ │ │ │ -
223 IdentityGridLevelIntersection(const GridImp* identityGrid,
│ │ │ │ -
224 HostLevelIntersection&& hostIntersection)
│ │ │ │ -
225 : identityGrid_(identityGrid)
│ │ │ │ -
226 , hostIntersection_(std::move(hostIntersection))
│ │ │ │ -
227 {}
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
225
│ │ │ │ + │ │ │ │
228
│ │ │ │ -
│ │ │ │ -
229 bool equals(const IdentityGridLevelIntersection& other) const
│ │ │ │ -
230 {
│ │ │ │ -
231 return hostIntersection_ == other.hostIntersection_;
│ │ │ │ -
232 }
│ │ │ │ -
│ │ │ │ +
230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
│ │ │ │ +
231
│ │ │ │ +
232
│ │ │ │
233
│ │ │ │ -
│ │ │ │ -
236 Entity inside() const {
│ │ │ │ -
237 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
│ │ │ │ -
238 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
235 : identityGrid_(nullptr)
│ │ │ │ +
236 {}
│ │ │ │ +
│ │ │ │ +
237
│ │ │ │ +
│ │ │ │ +
238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
│ │ │ │ +
239 : hostEntity_(hostEntity)
│ │ │ │ +
240 , identityGrid_(identityGrid)
│ │ │ │ +
241 {}
│ │ │ │
│ │ │ │ -
239
│ │ │ │ -
240
│ │ │ │ +
242
│ │ │ │
│ │ │ │ -
243 Entity outside() const {
│ │ │ │ -
244 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ │ -
245 }
│ │ │ │ +
243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
│ │ │ │ +
244 : hostEntity_(std::move(hostEntity))
│ │ │ │ +
245 , identityGrid_(identityGrid)
│ │ │ │ +
246 {}
│ │ │ │
│ │ │ │ -
246
│ │ │ │
247
│ │ │ │ -
│ │ │ │ -
250 bool boundary () const {
│ │ │ │ -
251 return hostIntersection_.boundary();
│ │ │ │ -
252 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
250 : hostEntity_(original.hostEntity_)
│ │ │ │ +
251 , identityGrid_(original.identityGrid_)
│ │ │ │ +
252 {}
│ │ │ │
│ │ │ │
253
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
260 return hostIntersection_.centerUnitOuterNormal();
│ │ │ │ -
261 }
│ │ │ │ -
│ │ │ │ -
262
│ │ │ │ -
│ │ │ │ -
264 bool neighbor () const {
│ │ │ │ -
265 return hostIntersection_.neighbor();
│ │ │ │ -
266 }
│ │ │ │ -
│ │ │ │ -
267
│ │ │ │ -
│ │ │ │ -
269 size_t boundarySegmentIndex() const {
│ │ │ │ -
270 return hostIntersection_.boundarySegmentIndex();
│ │ │ │ -
271 }
│ │ │ │ -
│ │ │ │ -
272
│ │ │ │ -
│ │ │ │ -
274 bool conforming () const {
│ │ │ │ -
275 return hostIntersection_.conforming();
│ │ │ │ -
276 }
│ │ │ │ -
│ │ │ │ -
277
│ │ │ │ -
│ │ │ │ -
279 GeometryType type () const {
│ │ │ │ -
280 return hostIntersection_.type();
│ │ │ │ -
281 }
│ │ │ │ -
│ │ │ │ -
282
│ │ │ │ -
283
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
289 {
│ │ │ │ -
290 return LocalGeometry( hostIntersection_.geometryInInside() );
│ │ │ │ -
291 }
│ │ │ │ -
│ │ │ │ -
292
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
296 {
│ │ │ │ -
297 return LocalGeometry( hostIntersection_.geometryInOutside() );
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
303 {
│ │ │ │ -
304 return Geometry( hostIntersection_.geometry() );
│ │ │ │ -
305 }
│ │ │ │ -
│ │ │ │ -
306
│ │ │ │ -
307
│ │ │ │ -
│ │ │ │ -
309 int indexInInside () const {
│ │ │ │ -
310 return hostIntersection_.indexInInside();
│ │ │ │ -
311 }
│ │ │ │ -
│ │ │ │ -
312
│ │ │ │ -
313
│ │ │ │ -
│ │ │ │ -
315 int indexInOutside () const {
│ │ │ │ -
316 return hostIntersection_.indexInOutside();
│ │ │ │ -
317 }
│ │ │ │ -
│ │ │ │ -
318
│ │ │ │ -
319
│ │ │ │ -
│ │ │ │ -
321 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& local) const {
│ │ │ │ -
322 return hostIntersection_.outerNormal(local);
│ │ │ │ -
323 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
255 : hostEntity_(std::move(original.hostEntity_))
│ │ │ │ +
256 , identityGrid_(original.identityGrid_)
│ │ │ │ +
257 {}
│ │ │ │ +
│ │ │ │ +
258
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
261 {
│ │ │ │ +
262 if (this != &original)
│ │ │ │ +
263 {
│ │ │ │ +
264 identityGrid_ = original.identityGrid_;
│ │ │ │ +
265 hostEntity_ = original.hostEntity_;
│ │ │ │ +
266 }
│ │ │ │ +
267 return *this;
│ │ │ │ +
268 }
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
272 {
│ │ │ │ +
273 if (this != &original)
│ │ │ │ +
274 {
│ │ │ │ +
275 identityGrid_ = original.identityGrid_;
│ │ │ │ +
276 hostEntity_ = std::move(original.hostEntity_);
│ │ │ │ +
277 }
│ │ │ │ +
278 return *this;
│ │ │ │ +
279 }
│ │ │ │ +
│ │ │ │ +
280
│ │ │ │ +
│ │ │ │ +
281 bool equals(const IdentityGridEntity& other) const
│ │ │ │ +
282 {
│ │ │ │ +
283 return hostEntity_ == other.hostEntity_;
│ │ │ │ +
284 }
│ │ │ │ +
│ │ │ │ +
285
│ │ │ │ +
│ │ │ │ +
287 bool hasFather () const {
│ │ │ │ +
288 return hostEntity_.hasFather();
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
290
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
293 {
│ │ │ │ +
294 return EntitySeed(hostEntity_);
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
296
│ │ │ │ +
│ │ │ │ +
298 int level () const
│ │ │ │ +
299 {
│ │ │ │ +
300 return hostEntity_.level();
│ │ │ │ +
301 }
│ │ │ │ +
│ │ │ │ +
302
│ │ │ │ +
303
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
306 return hostEntity_.partitionType();
│ │ │ │ +
307 }
│ │ │ │ +
│ │ │ │ +
308
│ │ │ │ +
309
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
312 {
│ │ │ │ +
313 return Geometry( hostEntity_.geometry() );
│ │ │ │ +
314 }
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
316
│ │ │ │ +
│ │ │ │ +
319 unsigned int subEntities (unsigned int codim) const
│ │ │ │ +
320 {
│ │ │ │ +
321 return hostEntity_.subEntities(codim);
│ │ │ │ +
322 }
│ │ │ │
│ │ │ │ +
323
│ │ │ │
324
│ │ │ │ -
│ │ │ │ -
326 FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
│ │ │ │ -
327 return hostIntersection_.integrationOuterNormal(local);
│ │ │ │ -
328 }
│ │ │ │ -
│ │ │ │ -
329
│ │ │ │ -
│ │ │ │ -
331 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& local) const {
│ │ │ │ -
332 return hostIntersection_.unitOuterNormal(local);
│ │ │ │ -
333 }
│ │ │ │ -
│ │ │ │ -
334
│ │ │ │ -
335 private:
│ │ │ │ -
336
│ │ │ │ -
337 const GridImp* identityGrid_;
│ │ │ │ -
338
│ │ │ │ -
339 HostLevelIntersection hostIntersection_;
│ │ │ │ -
340
│ │ │ │ -
341 };
│ │ │ │ +
328 template<int cc>
│ │ │ │ +
│ │ │ │ +
329 typename GridImp::template Codim<cc>::Entity subEntity (int i) const {
│ │ │ │ +
330 return IdentityGridEntity<cc,dim,GridImp>(identityGrid_, hostEntity_.template subEntity<cc>(i));
│ │ │ │ +
331 }
│ │ │ │ +
│ │ │ │ +
332
│ │ │ │ +
333
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
337 identityGrid_,
│ │ │ │ +
338 identityGrid_->getHostGrid().levelGridView(level()).ibegin(hostEntity_));
│ │ │ │ +
339 }
│ │ │ │
│ │ │ │ -
342
│ │ │ │ -
343
│ │ │ │ -
344} // namespace Dune
│ │ │ │ -
345
│ │ │ │ -
346#endif
│ │ │ │ -
The IdentityGridLeafIterator class.
│ │ │ │ -
The IdentityGridEntity class.
│ │ │ │ +
340
│ │ │ │ +
341
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
345 identityGrid_,
│ │ │ │ +
346 identityGrid_->getHostGrid().levelGridView(level()).iend(hostEntity_));
│ │ │ │ +
347 }
│ │ │ │ +
│ │ │ │ +
348
│ │ │ │ +
349
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
353 identityGrid_,
│ │ │ │ +
354 identityGrid_->getHostGrid().leafGridView().ibegin(hostEntity_));
│ │ │ │ +
355 }
│ │ │ │ +
│ │ │ │ +
356
│ │ │ │ +
357
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
361 identityGrid_,
│ │ │ │ +
362 identityGrid_->getHostGrid().leafGridView().iend(hostEntity_));
│ │ │ │ +
363 }
│ │ │ │ +
│ │ │ │ +
364
│ │ │ │ +
365
│ │ │ │ +
│ │ │ │ +
367 bool isLeaf() const {
│ │ │ │ +
368 return hostEntity_.isLeaf();
│ │ │ │ +
369 }
│ │ │ │ +
│ │ │ │ +
370
│ │ │ │ +
371
│ │ │ │ +
│ │ │ │ +
374 typename GridImp::template Codim<0>::Entity father () const {
│ │ │ │ +
375 return IdentityGridEntity(identityGrid_, hostEntity_.father());
│ │ │ │ +
376 }
│ │ │ │ +
│ │ │ │ +
377
│ │ │ │ +
378
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
389 {
│ │ │ │ +
390 return LocalGeometry( hostEntity_.geometryInFather() );
│ │ │ │ +
391 }
│ │ │ │ +
│ │ │ │ +
392
│ │ │ │ +
393
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
399 {
│ │ │ │ +
400 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel);
│ │ │ │ +
401 }
│ │ │ │ +
│ │ │ │ +
402
│ │ │ │ +
403
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
406 {
│ │ │ │ +
407 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel, true);
│ │ │ │ +
408 }
│ │ │ │ +
│ │ │ │ +
409
│ │ │ │ +
410
│ │ │ │ +
│ │ │ │ +
412 bool wasRefined () const
│ │ │ │ +
413 {
│ │ │ │ +
414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)
│ │ │ │ +
415 return false;
│ │ │ │ +
416
│ │ │ │ +
417 int level = this->level();
│ │ │ │ +
418 int index = identityGrid_->levelIndexSet(level).index(*this);
│ │ │ │ +
419 return identityGrid_->refinementMark_[level][index];
│ │ │ │ +
420 }
│ │ │ │ +
│ │ │ │ +
421
│ │ │ │ +
422
│ │ │ │ +
│ │ │ │ +
424 bool mightBeCoarsened () const
│ │ │ │ +
425 {
│ │ │ │ +
426 return true;
│ │ │ │ +
427 }
│ │ │ │ +
│ │ │ │ +
428
│ │ │ │ +
429
│ │ │ │ +
430 // /////////////////////////////////////////
│ │ │ │ +
431 // Internal stuff
│ │ │ │ +
432 // /////////////////////////////////////////
│ │ │ │ +
433
│ │ │ │ +
434
│ │ │ │ + │ │ │ │ +
436 const GridImp* identityGrid_;
│ │ │ │ +
437
│ │ │ │ +
438 private:
│ │ │ │ +
439
│ │ │ │ +
440 typedef typename GridImp::ctype ctype;
│ │ │ │ +
441
│ │ │ │ +
442 }; // end of IdentityGridEntity codim = 0
│ │ │ │ +
│ │ │ │ +
443
│ │ │ │ +
444
│ │ │ │ +
445} // namespace Dune
│ │ │ │ +
446
│ │ │ │ +
447
│ │ │ │ +
448#endif
│ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
Default Implementations for EntityImp.
Definition common/entity.hh:542
│ │ │ │ +
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition common/entity.hh:576
│ │ │ │
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │
The implementation of entities in a IdentityGrid.
Definition identitygridentity.hh:55
│ │ │ │ +
IdentityGridEntity()
Definition identitygridentity.hh:90
│ │ │ │ +
IdentityGridEntity & operator=(IdentityGridEntity &&original)
Definition identitygridentity.hh:127
│ │ │ │ +
IdentityGridEntity(IdentityGridEntity &&original)
Definition identitygridentity.hh:110
│ │ │ │ +
bool equals(const IdentityGridEntity &other) const
Definition identitygridentity.hh:137
│ │ │ │ +
HostGridEntity hostEntity_
Definition identitygridentity.hh:179
│ │ │ │ +
GridImp::template Codim< codim >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition identitygridentity.hh:88
│ │ │ │ +
EntitySeed seed() const
Create EntitySeed.
Definition identitygridentity.hh:148
│ │ │ │ +
IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
Definition identitygridentity.hh:94
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition identitygridentity.hh:173
│ │ │ │ +
PartitionType partitionType() const
The partition type for parallel computing.
Definition identitygridentity.hh:161
│ │ │ │ +
unsigned int subEntities(unsigned int cc) const
Return the number of subEntities of codimension codim.
Definition identitygridentity.hh:167
│ │ │ │ +
IdentityGridEntity(const IdentityGridEntity &original)
Definition identitygridentity.hh:105
│ │ │ │ +
IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
Definition identitygridentity.hh:99
│ │ │ │ +
bool hasFather() const
returns true if father entity exists
Definition identitygridentity.hh:143
│ │ │ │ +
GridImp::template Codim< codim >::Geometry Geometry
Definition identitygridentity.hh:85
│ │ │ │ +
IdentityGridEntity & operator=(const IdentityGridEntity &original)
Definition identitygridentity.hh:116
│ │ │ │ +
int level() const
level of this element
Definition identitygridentity.hh:154
│ │ │ │
Definition identitygridintersectioniterator.hh:84
│ │ │ │
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ │ -
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition identitygridintersections.hh:33
│ │ │ │ -
Entity inside() const
Definition identitygridintersections.hh:77
│ │ │ │ -
IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
Definition identitygridintersections.hh:64
│ │ │ │ -
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:99
│ │ │ │ -
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:51
│ │ │ │ -
Geometry geometry() const
Definition identitygridintersections.hh:142
│ │ │ │ -
Entity outside() const
Definition identitygridintersections.hh:84
│ │ │ │ -
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:135
│ │ │ │ -
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:90
│ │ │ │ -
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:119
│ │ │ │ -
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:53
│ │ │ │ -
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:128
│ │ │ │ -
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:114
│ │ │ │ -
IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
Definition identitygridintersections.hh:58
│ │ │ │ -
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:109
│ │ │ │ -
bool equals(const IdentityGridLeafIntersection &other) const
Definition identitygridintersections.hh:70
│ │ │ │ -
FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal
Definition identitygridintersections.hh:161
│ │ │ │ -
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:155
│ │ │ │ -
FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:166
│ │ │ │ -
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:104
│ │ │ │ -
FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:171
│ │ │ │ -
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:149
│ │ │ │ -
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:50
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:52
│ │ │ │ -
Definition identitygridintersections.hh:192
│ │ │ │ -
Geometry geometry() const
Definition identitygridintersections.hh:302
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:211
│ │ │ │ -
IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
Definition identitygridintersections.hh:217
│ │ │ │ -
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:209
│ │ │ │ -
bool equals(const IdentityGridLevelIntersection &other) const
Definition identitygridintersections.hh:229
│ │ │ │ -
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:264
│ │ │ │ -
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:259
│ │ │ │ -
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:274
│ │ │ │ -
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:309
│ │ │ │ -
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal
Definition identitygridintersections.hh:321
│ │ │ │ -
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:210
│ │ │ │ -
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:212
│ │ │ │ -
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:250
│ │ │ │ -
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:326
│ │ │ │ -
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:295
│ │ │ │ -
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:288
│ │ │ │ -
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:315
│ │ │ │ -
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:331
│ │ │ │ -
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:269
│ │ │ │ -
Entity outside() const
Definition identitygridintersections.hh:243
│ │ │ │ -
Entity inside() const
Definition identitygridintersections.hh:236
│ │ │ │ -
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:279
│ │ │ │ -
IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
Definition identitygridintersections.hh:223
│ │ │ │ +
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition identitygridhierarchiciterator.hh:26
│ │ │ │ +
unsigned int subEntities(unsigned int codim) const
Return the number of subEntities of codimension codim.
Definition identitygridentity.hh:319
│ │ │ │ +
IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
Definition identitygridentity.hh:243
│ │ │ │ +
bool isLeaf() const
returns true if Entity has NO children
Definition identitygridentity.hh:367
│ │ │ │ +
IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
Definition identitygridentity.hh:398
│ │ │ │ +
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition identitygridentity.hh:218
│ │ │ │ +
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition identitygridentity.hh:230
│ │ │ │ +
EntitySeed seed() const
Create EntitySeed.
Definition identitygridentity.hh:292
│ │ │ │ +
IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const
First level intersection.
Definition identitygridentity.hh:335
│ │ │ │ +
IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
Definition identitygridentity.hh:238
│ │ │ │ +
int level() const
Level of this element.
Definition identitygridentity.hh:298
│ │ │ │ +
IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition identitygridentity.hh:351
│ │ │ │ +
HostGridEntity hostEntity_
Definition identitygridentity.hh:435
│ │ │ │ +
IdentityGridEntity & operator=(const IdentityGridEntity &original)
Definition identitygridentity.hh:260
│ │ │ │ +
Geometry geometry() const
Geometry of this entity.
Definition identitygridentity.hh:311
│ │ │ │ +
IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const
Reference to one past the last neighbor.
Definition identitygridentity.hh:343
│ │ │ │ +
IdentityGridEntity(const IdentityGridEntity &original)
Definition identitygridentity.hh:249
│ │ │ │ +
IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const
Returns iterator to one past the last son.
Definition identitygridentity.hh:405
│ │ │ │ +
IdentityGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition identitygridentity.hh:359
│ │ │ │ +
bool wasRefined() const
Definition identitygridentity.hh:412
│ │ │ │ +
IdentityGridEntity & operator=(IdentityGridEntity &&original)
Definition identitygridentity.hh:271
│ │ │ │ +
bool hasFather() const
returns true if father entity exists
Definition identitygridentity.hh:287
│ │ │ │ +
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity HostGridEntity
Definition identitygridentity.hh:214
│ │ │ │ +
GridImp::template Codim< 0 >::Entity father() const
Definition identitygridentity.hh:374
│ │ │ │ +
bool mightBeCoarsened() const
Definition identitygridentity.hh:424
│ │ │ │ +
LocalGeometry geometryInFather() const
Location of this element relative to the reference element element of the father. This is sufficient ...
Definition identitygridentity.hh:388
│ │ │ │ +
const GridImp * identityGrid_
Definition identitygridentity.hh:436
│ │ │ │ +
GridImp::template Codim< cc >::Entity subEntity(int i) const
Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
Definition identitygridentity.hh:329
│ │ │ │ +
IdentityGridEntity(IdentityGridEntity &&original)
Definition identitygridentity.hh:254
│ │ │ │ +
GridImp::template Codim< 0 >::Geometry Geometry
Definition identitygridentity.hh:216
│ │ │ │ +
bool equals(const IdentityGridEntity &other) const
Definition identitygridentity.hh:281
│ │ │ │ +
PartitionType partitionType() const
The partition type for parallel computing.
Definition identitygridentity.hh:305
│ │ │ │ +
Definition identitygridindexsets.hh:26
│ │ │ │ +
Definition identitygridindexsets.hh:103
│ │ │ │ +
Definition identitygridindexsets.hh:199
│ │ │ │ +
Definition identitygridindexsets.hh:251
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,500 +1,620 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridintersections.hh │ │ │ │ │ +identitygridentity.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -_1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRIDENTITY_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDENTITY_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include "_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ │ +15 │ │ │ │ │ 16 │ │ │ │ │ -17 │ │ │ │ │ -18 // External forward declarations │ │ │ │ │ -19 template< class Grid > │ │ │ │ │ -20 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s; │ │ │ │ │ +17 // Forward declarations │ │ │ │ │ +18 │ │ │ │ │ +19 template │ │ │ │ │ +20 class IdentityGridEntity; │ │ │ │ │ 21 │ │ │ │ │ -22 │ │ │ │ │ +22 template │ │ │ │ │ +23 class IdentityGridLevelIterator; │ │ │ │ │ +24 │ │ │ │ │ +25 template │ │ │ │ │ +26 class IdentityGridLevelIntersectionIterator; │ │ │ │ │ +27 │ │ │ │ │ +28 template │ │ │ │ │ +29 class IdentityGridLeafIntersectionIterator; │ │ │ │ │ +30 │ │ │ │ │ 31 template │ │ │ │ │ -_3_2 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -33 { │ │ │ │ │ +32 class IdentityGridHierarchicIterator; │ │ │ │ │ +33 │ │ │ │ │ 34 │ │ │ │ │ -35 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -36 │ │ │ │ │ -37 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e >; │ │ │ │ │ +35 // External forward declarations │ │ │ │ │ +36 template< class Grid > │ │ │ │ │ +37 struct HostGridAccess; │ │ │ │ │ 38 │ │ │ │ │ -39 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -40 │ │ │ │ │ -41 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -42 │ │ │ │ │ -43 // The type used to store coordinates │ │ │ │ │ -44 typedef typename GridImp::ctype ctype; │ │ │ │ │ -45 │ │ │ │ │ -46 typedef typename GridImp::HostGridType::LeafGridView::Intersection │ │ │ │ │ -HostLeafIntersection; │ │ │ │ │ -47 │ │ │ │ │ -48 public: │ │ │ │ │ -49 │ │ │ │ │ -_5_0 typedef typename GridImp::template Codim<1>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -_5_1 typedef typename GridImp::template Codim<1>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -_5_2 typedef typename GridImp::template Codim<0>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_5_3 typedef FieldVector _N_o_r_m_a_l_V_e_c_t_o_r; │ │ │ │ │ -54 │ │ │ │ │ -_5_5 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n() │ │ │ │ │ -56 {} │ │ │ │ │ -57 │ │ │ │ │ -_5_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ -59 const HostLeafIntersection& hostIntersection) │ │ │ │ │ -60 : identityGrid_(identityGrid) │ │ │ │ │ -61 , hostIntersection_(hostIntersection) │ │ │ │ │ -62 {} │ │ │ │ │ -63 │ │ │ │ │ -_6_4 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ -65 HostLeafIntersection&& hostIntersection) │ │ │ │ │ -66 : identityGrid_(identityGrid) │ │ │ │ │ -67 , hostIntersection_(_s_t_d::move(hostIntersection)) │ │ │ │ │ -68 {} │ │ │ │ │ -69 │ │ │ │ │ -_7_0 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n& other) const │ │ │ │ │ -71 { │ │ │ │ │ -72 return hostIntersection_ == other.hostIntersection_; │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -_7_7 _E_n_t_i_t_y _i_n_s_i_d_e() const { │ │ │ │ │ -78 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ -(identityGrid_,hostIntersection_.inside()); │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ +39 │ │ │ │ │ +40 //********************************************************************** │ │ │ │ │ +41 // │ │ │ │ │ +42 // --IdentityGridEntity │ │ │ │ │ +43 // --Entity │ │ │ │ │ +44 // │ │ │ │ │ +52 template │ │ │ │ │ +_5_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y : │ │ │ │ │ +54 public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +55 { │ │ │ │ │ +56 │ │ │ │ │ +57 template │ │ │ │ │ +_5_8 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t; │ │ │ │ │ +59 │ │ │ │ │ +60 template │ │ │ │ │ +_6_1 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t; │ │ │ │ │ +62 │ │ │ │ │ +63 template │ │ │ │ │ +_6_4 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t; │ │ │ │ │ +65 │ │ │ │ │ +66 template │ │ │ │ │ +_6_7 friend class _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +68 │ │ │ │ │ +69 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e >; │ │ │ │ │ +70 │ │ │ │ │ +71 │ │ │ │ │ +72 private: │ │ │ │ │ +73 │ │ │ │ │ +74 typedef typename GridImp::ctype ctype; │ │ │ │ │ +75 │ │ │ │ │ +76 // The codimension of this entity wrt the host grid │ │ │ │ │ +77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - │ │ │ │ │ +GridImp::dimension + codim; │ │ │ │ │ +78 │ │ │ │ │ +79 // equivalent entity in the host grid │ │ │ │ │ +80 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ +Codim::Entity HostGridEntity; │ │ │ │ │ 81 │ │ │ │ │ -_8_4 _E_n_t_i_t_y _o_u_t_s_i_d_e() const { │ │ │ │ │ -85 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ -(identityGrid_,hostIntersection_.outside()); │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -88 │ │ │ │ │ -_9_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ │ -91 return hostIntersection_.boundary(); │ │ │ │ │ -92 } │ │ │ │ │ +82 │ │ │ │ │ +83 public: │ │ │ │ │ +84 │ │ │ │ │ +_8_5 typedef typename GridImp::template Codim_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +86 │ │ │ │ │ +_8_8 typedef typename GridImp::template Codim_:_:_E_n_t_i_t_y_S_e_e_d _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +89 │ │ │ │ │ +_9_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y() │ │ │ │ │ +91 : identityGrid_(nullptr) │ │ │ │ │ +92 {} │ │ │ │ │ 93 │ │ │ │ │ -_9_9 _N_o_r_m_a_l_V_e_c_t_o_r _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const { │ │ │ │ │ -100 return hostIntersection_.centerUnitOuterNormal(); │ │ │ │ │ -101 } │ │ │ │ │ -102 │ │ │ │ │ -_1_0_4 bool _n_e_i_g_h_b_o_r () const { │ │ │ │ │ -105 return hostIntersection_.neighbor(); │ │ │ │ │ -106 } │ │ │ │ │ -107 │ │ │ │ │ -_1_0_9 size_t _b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() const { │ │ │ │ │ -110 return hostIntersection_.boundarySegmentIndex(); │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_4 bool _c_o_n_f_o_r_m_i_n_g () const { │ │ │ │ │ -115 return hostIntersection_.conforming(); │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_1_9 GeometryType _t_y_p_e () const { │ │ │ │ │ -120 return hostIntersection_.type(); │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -123 │ │ │ │ │ -_1_2_8 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e () const │ │ │ │ │ -129 { │ │ │ │ │ -130 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInInside() ); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -_1_3_5 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ -136 { │ │ │ │ │ -137 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInOutside() ); │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -_1_4_2 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ -143 { │ │ │ │ │ -144 return _G_e_o_m_e_t_r_y( hostIntersection_.geometry() ); │ │ │ │ │ +_9_4 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, const HostGridEntity& │ │ │ │ │ +hostEntity) │ │ │ │ │ +95 : _h_o_s_t_E_n_t_i_t_y__(hostEntity) │ │ │ │ │ +96 , identityGrid_(identityGrid) │ │ │ │ │ +97 {} │ │ │ │ │ +98 │ │ │ │ │ +_9_9 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, HostGridEntity&& hostEntity) │ │ │ │ │ +100 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(hostEntity)) │ │ │ │ │ +101 , identityGrid_(identityGrid) │ │ │ │ │ +102 {} │ │ │ │ │ +103 │ │ │ │ │ +_1_0_5 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ +106 : _h_o_s_t_E_n_t_i_t_y__(original._h_o_s_t_E_n_t_i_t_y__) │ │ │ │ │ +107 , identityGrid_(original.identityGrid_) │ │ │ │ │ +108 {} │ │ │ │ │ +109 │ │ │ │ │ +_1_1_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ +111 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(original._h_o_s_t_E_n_t_i_t_y__)) │ │ │ │ │ +112 , identityGrid_(original.identityGrid_) │ │ │ │ │ +113 {} │ │ │ │ │ +114 │ │ │ │ │ +_1_1_6 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ +117 { │ │ │ │ │ +118 if (this != &original) │ │ │ │ │ +119 { │ │ │ │ │ +120 identityGrid_ = original.identityGrid_; │ │ │ │ │ +121 _h_o_s_t_E_n_t_i_t_y__ = original._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ +122 } │ │ │ │ │ +123 return *this; │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +_1_2_7 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ +128 { │ │ │ │ │ +129 if (this != &original) │ │ │ │ │ +130 { │ │ │ │ │ +131 identityGrid_ = original.identityGrid_; │ │ │ │ │ +132 _h_o_s_t_E_n_t_i_t_y__ = std::move(original.hostEntity_); │ │ │ │ │ +133 } │ │ │ │ │ +134 return *this; │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +_1_3_7 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& other) const │ │ │ │ │ +138 { │ │ │ │ │ +139 return _h_o_s_t_E_n_t_i_t_y__ == other._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ +140 } │ │ │ │ │ +141 │ │ │ │ │ +_1_4_3 bool _h_a_s_F_a_t_h_e_r () const { │ │ │ │ │ +144 return _h_o_s_t_E_n_t_i_t_y__.hasFather(); │ │ │ │ │ 145 } │ │ │ │ │ 146 │ │ │ │ │ -147 │ │ │ │ │ -_1_4_9 int _i_n_d_e_x_I_n_I_n_s_i_d_e () const { │ │ │ │ │ -150 return hostIntersection_.indexInInside(); │ │ │ │ │ +_1_4_8 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const │ │ │ │ │ +149 { │ │ │ │ │ +150 return _E_n_t_i_t_y_S_e_e_d(_h_o_s_t_E_n_t_i_t_y__); │ │ │ │ │ 151 } │ │ │ │ │ 152 │ │ │ │ │ -153 │ │ │ │ │ -_1_5_5 int _i_n_d_e_x_I_n_O_u_t_s_i_d_e () const { │ │ │ │ │ -156 return hostIntersection_.indexInOutside(); │ │ │ │ │ -157 } │ │ │ │ │ +_1_5_4 int _l_e_v_e_l () const { │ │ │ │ │ +155 return _h_o_s_t_E_n_t_i_t_y__.level(); │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ 158 │ │ │ │ │ -159 │ │ │ │ │ -_1_6_1 FieldVector _o_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ -FieldVector& local) const { │ │ │ │ │ -162 return hostIntersection_.outerNormal(local); │ │ │ │ │ +_1_6_1 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const { │ │ │ │ │ +162 return _h_o_s_t_E_n_t_i_t_y__.partitionType(); │ │ │ │ │ 163 } │ │ │ │ │ 164 │ │ │ │ │ -_1_6_6 FieldVector _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ -FieldVector& local) const { │ │ │ │ │ -167 return hostIntersection_.integrationOuterNormal(local); │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -_1_7_1 FieldVector _u_n_i_t_O_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ -FieldVector& local) const { │ │ │ │ │ -172 return hostIntersection_.unitOuterNormal(local); │ │ │ │ │ -173 } │ │ │ │ │ -174 │ │ │ │ │ -175 │ │ │ │ │ -176 private: │ │ │ │ │ -177 //********************************************************** │ │ │ │ │ -178 // private methods │ │ │ │ │ -179 //********************************************************** │ │ │ │ │ +_1_6_7 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ +168 { │ │ │ │ │ +169 return _h_o_s_t_E_n_t_i_t_y__.subEntities(cc); │ │ │ │ │ +170 } │ │ │ │ │ +171 │ │ │ │ │ +_1_7_3 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ +174 { │ │ │ │ │ +175 return _G_e_o_m_e_t_r_y( _h_o_s_t_E_n_t_i_t_y__.geometry() ); │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +178 │ │ │ │ │ +_1_7_9 HostGridEntity _h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ 180 │ │ │ │ │ -181 const GridImp* identityGrid_; │ │ │ │ │ +181 private: │ │ │ │ │ 182 │ │ │ │ │ -_1_8_3 HostLeafIntersection hostIntersection_; │ │ │ │ │ -184 }; │ │ │ │ │ -185 │ │ │ │ │ +_1_8_3 const GridImp* identityGrid_; │ │ │ │ │ +184 │ │ │ │ │ +185 }; │ │ │ │ │ 186 │ │ │ │ │ 187 │ │ │ │ │ 188 │ │ │ │ │ -190 template │ │ │ │ │ -_1_9_1 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -192 { │ │ │ │ │ -193 │ │ │ │ │ -194 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -195 │ │ │ │ │ -196 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e │ │ │ │ │ +189 │ │ │ │ │ +190 //*********************** │ │ │ │ │ +191 // │ │ │ │ │ +192 // --IdentityGridEntity │ │ │ │ │ +193 // │ │ │ │ │ +194 //*********************** │ │ │ │ │ +202 template │ │ │ │ │ +_2_0_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y<0,dim,GridImp> : │ │ │ │ │ +204 public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n<0,dim,GridImp, IdentityGridEntity> │ │ │ │ │ +205 { │ │ │ │ │ +206 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e │ │ │ │ │ >; │ │ │ │ │ -197 │ │ │ │ │ -198 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -199 │ │ │ │ │ -200 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -201 │ │ │ │ │ -202 // The type used to store coordinates │ │ │ │ │ -203 typedef typename GridImp::ctype ctype; │ │ │ │ │ -204 │ │ │ │ │ -205 typedef typename GridImp::HostGridType::LevelGridView::Intersection │ │ │ │ │ -HostLevelIntersection; │ │ │ │ │ -206 │ │ │ │ │ -207 public: │ │ │ │ │ -208 │ │ │ │ │ -_2_0_9 typedef typename GridImp::template Codim<1>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -_2_1_0 typedef typename GridImp::template Codim<1>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -_2_1_1 typedef typename GridImp::template Codim<0>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_2_1_2 typedef FieldVector _N_o_r_m_a_l_V_e_c_t_o_r; │ │ │ │ │ -213 │ │ │ │ │ -_2_1_4 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n() │ │ │ │ │ -215 {} │ │ │ │ │ -216 │ │ │ │ │ -_2_1_7 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ -218 const HostLevelIntersection& hostIntersection) │ │ │ │ │ -219 : identityGrid_(identityGrid) │ │ │ │ │ -220 , hostIntersection_(hostIntersection) │ │ │ │ │ -221 {} │ │ │ │ │ +207 │ │ │ │ │ +208 public: │ │ │ │ │ +209 │ │ │ │ │ +210 // The codimension of this entitypointer wrt the host grid │ │ │ │ │ +_2_1_1 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - │ │ │ │ │ +GridImp::dimension; │ │ │ │ │ +212 │ │ │ │ │ +213 // equivalent entity in the host grid │ │ │ │ │ +_2_1_4 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ +Codim::Entity _H_o_s_t_G_r_i_d_E_n_t_i_t_y; │ │ │ │ │ +215 │ │ │ │ │ +_2_1_6 typedef typename GridImp::template Codim<0>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +217 │ │ │ │ │ +_2_1_8 typedef typename GridImp::template Codim<0>::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +219 │ │ │ │ │ +_2_2_1 typedef _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ 222 │ │ │ │ │ -_2_2_3 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ -224 HostLevelIntersection&& hostIntersection) │ │ │ │ │ -225 : identityGrid_(identityGrid) │ │ │ │ │ -226 , hostIntersection_(_s_t_d::move(hostIntersection)) │ │ │ │ │ -227 {} │ │ │ │ │ +_2_2_4 typedef _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +225 │ │ │ │ │ +_2_2_7 typedef _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ 228 │ │ │ │ │ -_2_2_9 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n& other) const │ │ │ │ │ -230 { │ │ │ │ │ -231 return hostIntersection_ == other.hostIntersection_; │ │ │ │ │ -232 } │ │ │ │ │ +_2_3_0 typedef typename GridImp::template Codim<0>_:_:_E_n_t_i_t_y_S_e_e_d _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +231 │ │ │ │ │ +232 │ │ │ │ │ 233 │ │ │ │ │ -_2_3_6 _E_n_t_i_t_y _i_n_s_i_d_e() const { │ │ │ │ │ -237 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ -(identityGrid_,hostIntersection_.inside()); │ │ │ │ │ -238 } │ │ │ │ │ -239 │ │ │ │ │ -240 │ │ │ │ │ -_2_4_3 _E_n_t_i_t_y _o_u_t_s_i_d_e() const { │ │ │ │ │ -244 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ -(identityGrid_,hostIntersection_.outside()); │ │ │ │ │ -245 } │ │ │ │ │ -246 │ │ │ │ │ +_2_3_4 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y() │ │ │ │ │ +235 : identityGrid_(nullptr) │ │ │ │ │ +236 {} │ │ │ │ │ +237 │ │ │ │ │ +_2_3_8 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, const _H_o_s_t_G_r_i_d_E_n_t_i_t_y& │ │ │ │ │ +hostEntity) │ │ │ │ │ +239 : _h_o_s_t_E_n_t_i_t_y__(hostEntity) │ │ │ │ │ +240 , identityGrid_(identityGrid) │ │ │ │ │ +241 {} │ │ │ │ │ +242 │ │ │ │ │ +_2_4_3 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, _H_o_s_t_G_r_i_d_E_n_t_i_t_y&& │ │ │ │ │ +hostEntity) │ │ │ │ │ +244 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(hostEntity)) │ │ │ │ │ +245 , identityGrid_(identityGrid) │ │ │ │ │ +246 {} │ │ │ │ │ 247 │ │ │ │ │ -_2_5_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ │ -251 return hostIntersection_.boundary(); │ │ │ │ │ -252 } │ │ │ │ │ +_2_4_9 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ +250 : _h_o_s_t_E_n_t_i_t_y__(original._h_o_s_t_E_n_t_i_t_y__) │ │ │ │ │ +251 , identityGrid_(original.identityGrid_) │ │ │ │ │ +252 {} │ │ │ │ │ 253 │ │ │ │ │ -_2_5_9 _N_o_r_m_a_l_V_e_c_t_o_r _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const { │ │ │ │ │ -260 return hostIntersection_.centerUnitOuterNormal(); │ │ │ │ │ -261 } │ │ │ │ │ -262 │ │ │ │ │ -_2_6_4 bool _n_e_i_g_h_b_o_r () const { │ │ │ │ │ -265 return hostIntersection_.neighbor(); │ │ │ │ │ +_2_5_4 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ +255 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(original._h_o_s_t_E_n_t_i_t_y__)) │ │ │ │ │ +256 , identityGrid_(original.identityGrid_) │ │ │ │ │ +257 {} │ │ │ │ │ +258 │ │ │ │ │ +_2_6_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ +261 { │ │ │ │ │ +262 if (this != &original) │ │ │ │ │ +263 { │ │ │ │ │ +264 identityGrid_ = original.identityGrid_; │ │ │ │ │ +265 _h_o_s_t_E_n_t_i_t_y__ = original._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ 266 } │ │ │ │ │ -267 │ │ │ │ │ -_2_6_9 size_t _b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() const { │ │ │ │ │ -270 return hostIntersection_.boundarySegmentIndex(); │ │ │ │ │ -271 } │ │ │ │ │ -272 │ │ │ │ │ -_2_7_4 bool _c_o_n_f_o_r_m_i_n_g () const { │ │ │ │ │ -275 return hostIntersection_.conforming(); │ │ │ │ │ -276 } │ │ │ │ │ -277 │ │ │ │ │ -_2_7_9 GeometryType _t_y_p_e () const { │ │ │ │ │ -280 return hostIntersection_.type(); │ │ │ │ │ -281 } │ │ │ │ │ -282 │ │ │ │ │ -283 │ │ │ │ │ -_2_8_8 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e () const │ │ │ │ │ -289 { │ │ │ │ │ -290 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInInside() ); │ │ │ │ │ -291 } │ │ │ │ │ -292 │ │ │ │ │ -_2_9_5 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ -296 { │ │ │ │ │ -297 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInOutside() ); │ │ │ │ │ -298 } │ │ │ │ │ -299 │ │ │ │ │ -_3_0_2 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ -303 { │ │ │ │ │ -304 return _G_e_o_m_e_t_r_y( hostIntersection_.geometry() ); │ │ │ │ │ -305 } │ │ │ │ │ -306 │ │ │ │ │ -307 │ │ │ │ │ -_3_0_9 int _i_n_d_e_x_I_n_I_n_s_i_d_e () const { │ │ │ │ │ -310 return hostIntersection_.indexInInside(); │ │ │ │ │ -311 } │ │ │ │ │ -312 │ │ │ │ │ -313 │ │ │ │ │ -_3_1_5 int _i_n_d_e_x_I_n_O_u_t_s_i_d_e () const { │ │ │ │ │ -316 return hostIntersection_.indexInOutside(); │ │ │ │ │ -317 } │ │ │ │ │ -318 │ │ │ │ │ -319 │ │ │ │ │ -_3_2_1 FieldVector _o_u_t_e_r_N_o_r_m_a_l (const FieldVector& │ │ │ │ │ -local) const { │ │ │ │ │ -322 return hostIntersection_.outerNormal(local); │ │ │ │ │ -323 } │ │ │ │ │ +267 return *this; │ │ │ │ │ +268 } │ │ │ │ │ +269 │ │ │ │ │ +_2_7_1 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ +272 { │ │ │ │ │ +273 if (this != &original) │ │ │ │ │ +274 { │ │ │ │ │ +275 identityGrid_ = original.identityGrid_; │ │ │ │ │ +276 _h_o_s_t_E_n_t_i_t_y__ = std::move(original.hostEntity_); │ │ │ │ │ +277 } │ │ │ │ │ +278 return *this; │ │ │ │ │ +279 } │ │ │ │ │ +280 │ │ │ │ │ +_2_8_1 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& other) const │ │ │ │ │ +282 { │ │ │ │ │ +283 return _h_o_s_t_E_n_t_i_t_y__ == other._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ +284 } │ │ │ │ │ +285 │ │ │ │ │ +_2_8_7 bool _h_a_s_F_a_t_h_e_r () const { │ │ │ │ │ +288 return _h_o_s_t_E_n_t_i_t_y__.hasFather(); │ │ │ │ │ +289 } │ │ │ │ │ +290 │ │ │ │ │ +_2_9_2 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const │ │ │ │ │ +293 { │ │ │ │ │ +294 return _E_n_t_i_t_y_S_e_e_d(_h_o_s_t_E_n_t_i_t_y__); │ │ │ │ │ +295 } │ │ │ │ │ +296 │ │ │ │ │ +_2_9_8 int _l_e_v_e_l () const │ │ │ │ │ +299 { │ │ │ │ │ +300 return _h_o_s_t_E_n_t_i_t_y__.level(); │ │ │ │ │ +301 } │ │ │ │ │ +302 │ │ │ │ │ +303 │ │ │ │ │ +_3_0_5 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const { │ │ │ │ │ +306 return _h_o_s_t_E_n_t_i_t_y__.partitionType(); │ │ │ │ │ +307 } │ │ │ │ │ +308 │ │ │ │ │ +309 │ │ │ │ │ +_3_1_1 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ +312 { │ │ │ │ │ +313 return _G_e_o_m_e_t_r_y( _h_o_s_t_E_n_t_i_t_y__.geometry() ); │ │ │ │ │ +314 } │ │ │ │ │ +315 │ │ │ │ │ +316 │ │ │ │ │ +_3_1_9 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int codim) const │ │ │ │ │ +320 { │ │ │ │ │ +321 return _h_o_s_t_E_n_t_i_t_y__.subEntities(codim); │ │ │ │ │ +322 } │ │ │ │ │ +323 │ │ │ │ │ 324 │ │ │ │ │ -_3_2_6 FieldVector _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ -FieldVector& local) const { │ │ │ │ │ -327 return hostIntersection_.integrationOuterNormal(local); │ │ │ │ │ -328 } │ │ │ │ │ -329 │ │ │ │ │ -_3_3_1 FieldVector _u_n_i_t_O_u_t_e_r_N_o_r_m_a_l (const FieldVector& local) const { │ │ │ │ │ -332 return hostIntersection_.unitOuterNormal(local); │ │ │ │ │ -333 } │ │ │ │ │ -334 │ │ │ │ │ -335 private: │ │ │ │ │ -336 │ │ │ │ │ -337 const GridImp* identityGrid_; │ │ │ │ │ -338 │ │ │ │ │ -339 HostLevelIntersection hostIntersection_; │ │ │ │ │ +328 template │ │ │ │ │ +_3_2_9 typename GridImp::template Codim::Entity _s_u_b_E_n_t_i_t_y (int i) const { │ │ │ │ │ +330 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_c_c_,_d_i_m_,_G_r_i_d_I_m_p_>(identityGrid_, │ │ │ │ │ +_h_o_s_t_E_n_t_i_t_y__.template subEntity(i)); │ │ │ │ │ +331 } │ │ │ │ │ +332 │ │ │ │ │ +333 │ │ │ │ │ +_3_3_5 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_v_e_l_b_e_g_i_n () const { │ │ │ │ │ +336 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ +337 identityGrid_, │ │ │ │ │ +338 identityGrid_->getHostGrid().levelGridView(_l_e_v_e_l()).ibegin(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ +339 } │ │ │ │ │ 340 │ │ │ │ │ -341 }; │ │ │ │ │ -342 │ │ │ │ │ -343 │ │ │ │ │ -344} // namespace Dune │ │ │ │ │ -345 │ │ │ │ │ -346#endif │ │ │ │ │ -_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -The IdentityGridLeafIterator class. │ │ │ │ │ -_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ │ -The IdentityGridEntity class. │ │ │ │ │ +341 │ │ │ │ │ +_3_4_3 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_v_e_l_e_n_d () const { │ │ │ │ │ +344 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ +345 identityGrid_, │ │ │ │ │ +346 identityGrid_->getHostGrid().levelGridView(_l_e_v_e_l()).iend(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ +347 } │ │ │ │ │ +348 │ │ │ │ │ +349 │ │ │ │ │ +_3_5_1 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_a_f_b_e_g_i_n () const { │ │ │ │ │ +352 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ +353 identityGrid_, │ │ │ │ │ +354 identityGrid_->getHostGrid().leafGridView().ibegin(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ +355 } │ │ │ │ │ +356 │ │ │ │ │ +357 │ │ │ │ │ +_3_5_9 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_a_f_e_n_d () const { │ │ │ │ │ +360 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ +361 identityGrid_, │ │ │ │ │ +362 identityGrid_->getHostGrid().leafGridView().iend(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ +363 } │ │ │ │ │ +364 │ │ │ │ │ +365 │ │ │ │ │ +_3_6_7 bool _i_s_L_e_a_f() const { │ │ │ │ │ +368 return _h_o_s_t_E_n_t_i_t_y__.isLeaf(); │ │ │ │ │ +369 } │ │ │ │ │ +370 │ │ │ │ │ +371 │ │ │ │ │ +_3_7_4 typename GridImp::template Codim<0>::Entity _f_a_t_h_e_r () const { │ │ │ │ │ +375 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(identityGrid_, _h_o_s_t_E_n_t_i_t_y__.father()); │ │ │ │ │ +376 } │ │ │ │ │ +377 │ │ │ │ │ +378 │ │ │ │ │ +_3_8_8 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r () const │ │ │ │ │ +389 { │ │ │ │ │ +390 return _L_o_c_a_l_G_e_o_m_e_t_r_y( _h_o_s_t_E_n_t_i_t_y__.geometryInFather() ); │ │ │ │ │ +391 } │ │ │ │ │ +392 │ │ │ │ │ +393 │ │ │ │ │ +_3_9_8 _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _h_b_e_g_i_n (int maxLevel) const │ │ │ │ │ +399 { │ │ │ │ │ +400 return _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_c_o_n_s_t_ _G_r_i_d_I_m_p_>(identityGrid_, *this, │ │ │ │ │ +maxLevel); │ │ │ │ │ +401 } │ │ │ │ │ +402 │ │ │ │ │ +403 │ │ │ │ │ +_4_0_5 _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _h_e_n_d (int maxLevel) const │ │ │ │ │ +406 { │ │ │ │ │ +407 return _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_c_o_n_s_t_ _G_r_i_d_I_m_p_>(identityGrid_, *this, │ │ │ │ │ +maxLevel, true); │ │ │ │ │ +408 } │ │ │ │ │ +409 │ │ │ │ │ +410 │ │ │ │ │ +_4_1_2 bool _w_a_s_R_e_f_i_n_e_d () const │ │ │ │ │ +413 { │ │ │ │ │ +414 if (identityGrid_->adaptationStep!=GridImp::adaptDone) │ │ │ │ │ +415 return false; │ │ │ │ │ +416 │ │ │ │ │ +417 int _l_e_v_e_l = this->_l_e_v_e_l(); │ │ │ │ │ +418 int index = identityGrid_->levelIndexSet(_l_e_v_e_l).index(*this); │ │ │ │ │ +419 return identityGrid_->refinementMark_[_l_e_v_e_l][index]; │ │ │ │ │ +420 } │ │ │ │ │ +421 │ │ │ │ │ +422 │ │ │ │ │ +_4_2_4 bool _m_i_g_h_t_B_e_C_o_a_r_s_e_n_e_d () const │ │ │ │ │ +425 { │ │ │ │ │ +426 return true; │ │ │ │ │ +427 } │ │ │ │ │ +428 │ │ │ │ │ +429 │ │ │ │ │ +430 // ///////////////////////////////////////// │ │ │ │ │ +431 // Internal stuff │ │ │ │ │ +432 // ///////////////////////////////////////// │ │ │ │ │ +433 │ │ │ │ │ +434 │ │ │ │ │ +_4_3_5 _H_o_s_t_G_r_i_d_E_n_t_i_t_y _h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ +_4_3_6 const GridImp* _i_d_e_n_t_i_t_y_G_r_i_d__; │ │ │ │ │ +437 │ │ │ │ │ +438 private: │ │ │ │ │ +439 │ │ │ │ │ +440 typedef typename GridImp::ctype ctype; │ │ │ │ │ +441 │ │ │ │ │ +442 }; // end of IdentityGridEntity codim = 0 │ │ │ │ │ +443 │ │ │ │ │ +444 │ │ │ │ │ +445} // namespace Dune │ │ │ │ │ +446 │ │ │ │ │ +447 │ │ │ │ │ +448#endif │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ _s_t_d │ │ │ │ │ STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +Default Implementations for EntityImp. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:542 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_,_ _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_ _>_:_: │ │ │ │ │ +_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Return the name of the reference element. The type can be used to access the │ │ │ │ │ +Dune::ReferenceElement. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:576 │ │ │ │ │ _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ provides access to host grid objects from GeometryGrid │ │ │ │ │ DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ The implementation of entities in a IdentityGrid. │ │ │ │ │ DDeeffiinniittiioonn identitygridentity.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity() │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +IdentityGridEntity & operator=(IdentityGridEntity &&original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(IdentityGridEntity &&original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridEntity &other) const │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_h_o_s_t_E_n_t_i_t_y__ │ │ │ │ │ +HostGridEntity hostEntity_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +GridImp::template Codim< codim >::EntitySeed EntitySeed │ │ │ │ │ +The type of the EntitySeed interface class. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_s_e_e_d │ │ │ │ │ +EntitySeed seed() const │ │ │ │ │ +Create EntitySeed. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity │ │ │ │ │ +&hostEntity) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +geometry of this entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:173 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType partitionType() const │ │ │ │ │ +The partition type for parallel computing. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:161 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +unsigned int subEntities(unsigned int cc) const │ │ │ │ │ +Return the number of subEntities of codimension codim. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(const IdentityGridEntity &original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_h_a_s_F_a_t_h_e_r │ │ │ │ │ +bool hasFather() const │ │ │ │ │ +returns true if father entity exists │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< codim >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +IdentityGridEntity & operator=(const IdentityGridEntity &original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +level of this element │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:154 │ │ │ │ │ _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ │ _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ │ allow to visit all nei... │ │ │ │ │ DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ │ -("elements") allow to visi... │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ -Entity inside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection │ │ │ │ │ -&&hostIntersection) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector centerUnitOuterNormal() const │ │ │ │ │ -Return unit outer normal (length == 1) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over the descendants of an entity.Mesh entities of codimension 0 │ │ │ │ │ +("elements") allow to visit... │ │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +unsigned int subEntities(unsigned int codim) const │ │ │ │ │ +Return the number of subEntities of codimension codim. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_s_L_e_a_f │ │ │ │ │ +bool isLeaf() const │ │ │ │ │ +returns true if Entity has NO children │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:367 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_b_e_g_i_n │ │ │ │ │ +IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const │ │ │ │ │ +Inter-level access to son elements on higher levels<=maxlevel. This is provided │ │ │ │ │ +for sparsely stored n... │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:398 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ +GridImp::template Codim< 0 >::EntitySeed EntitySeed │ │ │ │ │ +The type of the EntitySeed interface class. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:230 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_e_e_d │ │ │ │ │ +EntitySeed seed() const │ │ │ │ │ +Create EntitySeed. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_v_e_l_b_e_g_i_n │ │ │ │ │ +IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const │ │ │ │ │ +First level intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity │ │ │ │ │ +&hostEntity) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +Level of this element. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:298 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_a_f_b_e_g_i_n │ │ │ │ │ +IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const │ │ │ │ │ +First leaf intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:351 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_o_s_t_E_n_t_i_t_y__ │ │ │ │ │ +HostGridEntity hostEntity_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:435 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +IdentityGridEntity & operator=(const IdentityGridEntity &original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:260 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ Geometry geometry() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ -Entity outside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ │ -LocalGeometry geometryInOutside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ -bool boundary() const │ │ │ │ │ -return true if intersection is with boundary. │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Geometry type of an intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimworld > NormalVector │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ │ -LocalGeometry geometryInInside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -bool conforming() const │ │ │ │ │ -Return true if this is a conforming intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -IdentityGridLeafIntersection(const GridImp *identityGrid, const │ │ │ │ │ -HostLeafIntersection &hostIntersection) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ -size_t boundarySegmentIndex() const │ │ │ │ │ -return the boundary segment index │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridLeafIntersection &other) const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< │ │ │ │ │ -ctype, GridImp::dimension-1 > &local) const │ │ │ │ │ -return outer normal │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:161 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ │ -int indexInOutside() const │ │ │ │ │ -local number of codim 1 entity in neighbor where intersection is contained │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const │ │ │ │ │ -FieldVector< ctype, GridImp::dimension-1 > &local) const │ │ │ │ │ -return outer normal multiplied by the integration element │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -bool neighbor() const │ │ │ │ │ -return true if across the edge an neighbor on this level exists │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:104 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const │ │ │ │ │ -FieldVector< ctype, GridImp::dimension-1 > &local) const │ │ │ │ │ -return unit outer normal │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ -int indexInInside() const │ │ │ │ │ -local number of codim 1 entity in self where intersection is contained in │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 1 >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:302 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:211 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -IdentityGridLevelIntersection(const GridImp *identityGrid, const │ │ │ │ │ -HostLevelIntersection &hostIntersection) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:217 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 1 >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:209 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridLevelIntersection &other) const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:229 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -bool neighbor() const │ │ │ │ │ -return true if across the edge an neighbor on this level exists │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:264 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -NormalVector centerUnitOuterNormal() const │ │ │ │ │ -Return unit outer normal (length == 1) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:259 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -bool conforming() const │ │ │ │ │ -Return true if this is a conforming intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:274 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ -int indexInInside() const │ │ │ │ │ -local number of codim 1 entity in self where intersection is contained in │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:309 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > │ │ │ │ │ -&local) const │ │ │ │ │ -return outer normal │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:321 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimworld > NormalVector │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:212 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ -bool boundary() const │ │ │ │ │ -return true if intersection is with boundary. │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:250 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, │ │ │ │ │ -dim-1 > &local) const │ │ │ │ │ -return outer normal multiplied by the integration element │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:326 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ │ -LocalGeometry geometryInOutside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:295 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ │ -LocalGeometry geometryInInside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:288 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ │ -int indexInOutside() const │ │ │ │ │ -local number of codim 1 entity in neighbor where intersection is contained │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:315 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ -FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim- │ │ │ │ │ -1 > &local) const │ │ │ │ │ -return unit outer normal │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:331 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ -size_t boundarySegmentIndex() const │ │ │ │ │ -return the boundary segment index │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:269 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ -Entity outside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ -Entity inside() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Geometry type of an intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:279 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -IdentityGridLevelIntersection(const GridImp *identityGrid, │ │ │ │ │ -HostLevelIntersection &&hostIntersection) │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:223 │ │ │ │ │ +Geometry of this entity. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:311 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_v_e_l_e_n_d │ │ │ │ │ +IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const │ │ │ │ │ +Reference to one past the last neighbor. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:343 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(const IdentityGridEntity &original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_e_n_d │ │ │ │ │ +IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const │ │ │ │ │ +Returns iterator to one past the last son. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:405 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_a_f_e_n_d │ │ │ │ │ +IdentityGridLeafIntersectionIterator< GridImp > ileafend() const │ │ │ │ │ +Reference to one past the last leaf intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_w_a_s_R_e_f_i_n_e_d │ │ │ │ │ +bool wasRefined() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:412 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +IdentityGridEntity & operator=(IdentityGridEntity &&original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_a_s_F_a_t_h_e_r │ │ │ │ │ +bool hasFather() const │ │ │ │ │ +returns true if father entity exists │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_H_o_s_t_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity │ │ │ │ │ +HostGridEntity │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:214 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_f_a_t_h_e_r │ │ │ │ │ +GridImp::template Codim< 0 >::Entity father() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:374 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_m_i_g_h_t_B_e_C_o_a_r_s_e_n_e_d │ │ │ │ │ +bool mightBeCoarsened() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:424 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ +LocalGeometry geometryInFather() const │ │ │ │ │ +Location of this element relative to the reference element element of the │ │ │ │ │ +father. This is sufficient ... │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:388 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_d_e_n_t_i_t_y_G_r_i_d__ │ │ │ │ │ +const GridImp * identityGrid_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:436 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< cc >::Entity subEntity(int i) const │ │ │ │ │ +Provide access to sub entity i of given codimension. Entities are numbered 0 │ │ │ │ │ +... subEntities(cc)-1. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:329 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +IdentityGridEntity(IdentityGridEntity &&original) │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 0 >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:216 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridEntity &other) const │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:281 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType partitionType() const │ │ │ │ │ +The partition type for parallel computing. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:305 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:251 │ │ │ │ │ +_g_r_i_d_._h_h │ │ │ │ │ +Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentityseed.hh File Reference │ │ │ │ +dune-grid: identitygridindexsets.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,44 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridentityseed.hh File Reference
│ │ │ │ +
identitygridindexsets.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridEntitySeed class. │ │ │ │ +

The index and id sets for the IdentityGrid class. │ │ │ │ More...

│ │ │ │ - │ │ │ │ +
#include <dune/grid/common/indexidset.hh>
│ │ │ │ +#include <vector>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridEntitySeed< codim, GridImp >
 The EntitySeed class provides the minimal information needed to restore an Entity using the grid. More...
class  Dune::IdentityGridLevelIndexSet< GridImp >
 
class  Dune::IdentityGridLeafIndexSet< GridImp >
 
class  Dune::IdentityGridGlobalIdSet< GridImp >
 
class  Dune::IdentityGridLocalIdSet< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridEntitySeed class.

│ │ │ │ +

The index and id sets for the IdentityGrid class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,23 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridentityseed.hh File Reference │ │ │ │ │ -The IdentityGridEntitySeed class. _M_o_r_e_._._. │ │ │ │ │ +identitygridindexsets.hh File Reference │ │ │ │ │ +The index and id sets for the IdentityGrid class. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  The _E_n_t_i_t_y_S_e_e_d class provides the minimal information needed to restore │ │ │ │ │ - an _E_n_t_i_t_y using the grid. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridEntitySeed class. │ │ │ │ │ +The index and id sets for the IdentityGrid class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentityseed.hh Source File │ │ │ │ +dune-grid: identitygridindexsets.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,85 +74,382 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridentityseed.hh
│ │ │ │ +
identitygridindexsets.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │ -
6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │ │
7
│ │ │ │ -
14namespace Dune {
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14#include <vector>
│ │ │ │
15
│ │ │ │ -
16
│ │ │ │ -
22 template<int codim, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 protected:
│ │ │ │ -
26
│ │ │ │ -
27 // Entity type of the hostgrid
│ │ │ │ -
28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
│ │ │ │ -
29
│ │ │ │ -
30 // EntitySeed type of the hostgrid
│ │ │ │ -
31 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ -
34
│ │ │ │ -
35 constexpr static int codimension = codim;
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {}
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 hostEntitySeed_(hostEntity.seed())
│ │ │ │ -
51 {}
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 return hostEntitySeed_;
│ │ │ │ -
59 }
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
17
│ │ │ │ +
19 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
21 public IndexSet<GridImp,
│ │ │ │ +
22 IdentityGridLevelIndexSet<GridImp>,
│ │ │ │ +
23 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::IndexType,
│ │ │ │ +
24 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::Types
│ │ │ │ +
25 >
│ │ │ │ +
26 {
│ │ │ │ +
27 public:
│ │ │ │ +
28
│ │ │ │ +
29 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ +
30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ │ +
31
│ │ │ │ +
32 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
33
│ │ │ │ +
35 template<int codim>
│ │ │ │ +
│ │ │ │ +
36 int index (const typename GridImp::Traits::template Codim<codim>::Entity& e) const
│ │ │ │ +
37 {
│ │ │ │ +
38 return grid_->hostgrid_->levelIndexSet(level_).template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
41
│ │ │ │ +
43 template<int cc>
│ │ │ │ +
│ │ │ │ +
44 int subIndex (const typename GridImp::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ │ +
45 {
│ │ │ │ +
46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template getHostEntity<cc>(e), i, codim);
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
51 std::size_t size (int codim) const {
│ │ │ │ +
52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
57 std::size_t size (GeometryType type) const
│ │ │ │ +
58 {
│ │ │ │ +
59 return grid_->hostgrid_->levelIndexSet(level_).size(type);
│ │ │ │ +
60 }
│ │ │ │
│ │ │ │ -
60
│ │ │ │ +
61
│ │ │ │ +
62
│ │ │ │
│ │ │ │ -
64 bool isValid() const
│ │ │ │ +
64 const std::vector<GeometryType>& geomTypes (int codim) const
│ │ │ │
65 {
│ │ │ │ -
66 return hostEntitySeed_.isValid();
│ │ │ │ +
66 return grid_->hostgrid_->levelIndexSet(level_).geomTypes(codim);
│ │ │ │
67 }
│ │ │ │
│ │ │ │ -
68 private:
│ │ │ │ -
69
│ │ │ │ -
70 HostEntitySeed hostEntitySeed_;
│ │ │ │ -
71 };
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ +
70 Types types (int codim) const
│ │ │ │ +
71 {
│ │ │ │ +
72 return grid_->hostgrid_->levelIndexSet(level_).types(codim);
│ │ │ │ +
73 }
│ │ │ │
│ │ │ │ -
72
│ │ │ │ -
73} // namespace Dune
│ │ │ │
74
│ │ │ │ -
75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │ +
76 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
77 bool contains (const EntityType& e) const
│ │ │ │ +
78 {
│ │ │ │ +
79 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ +
80 }
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
83 void update(const GridImp& grid, int level)
│ │ │ │ +
84 {
│ │ │ │ +
85 grid_ = &grid;
│ │ │ │ +
86 level_ = level;
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
89
│ │ │ │ +
90 GridImp* grid_;
│ │ │ │ +
91
│ │ │ │ +
92 int level_;
│ │ │ │ +
93 };
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95
│ │ │ │ +
96 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
98 public IndexSet<GridImp,
│ │ │ │ +
99 IdentityGridLeafIndexSet<GridImp>,
│ │ │ │ +
100 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::IndexType,
│ │ │ │ +
101 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::Types
│ │ │ │ +
102 >
│ │ │ │ +
103 {
│ │ │ │ +
104 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ +
105
│ │ │ │ +
106 public:
│ │ │ │ +
107
│ │ │ │ +
108 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ │ +
109
│ │ │ │ +
110 /*
│ │ │ │ +
111 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
112 * because the const class is not instantiated yet.
│ │ │ │ +
113 */
│ │ │ │ +
114 constexpr static int dim = std::remove_const<GridImp>::type::dimension;
│ │ │ │ +
115
│ │ │ │ +
116
│ │ │ │ +
│ │ │ │ +
118 IdentityGridLeafIndexSet (const GridImp& grid)
│ │ │ │ +
119 : grid_(&grid)
│ │ │ │ +
120 {}
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
122
│ │ │ │ +
124 /*
│ │ │ │ +
125 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ +
126 because the const class is not instantiated yet.
│ │ │ │ +
127 */
│ │ │ │ +
128 template<int codim>
│ │ │ │ +
│ │ │ │ +
129 int index (const typename std::remove_const<GridImp>::type::template Codim<codim>::Entity& e) const
│ │ │ │ +
130 {
│ │ │ │ +
131 return grid_->hostgrid_->leafIndexSet().template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
133
│ │ │ │ +
134
│ │ │ │ +
136 /*
│ │ │ │ +
137 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ +
138 because the const class is not instantiated yet.
│ │ │ │ +
139 */
│ │ │ │ +
140 template<int cc>
│ │ │ │ +
│ │ │ │ +
141 int subIndex (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ │ +
142 {
│ │ │ │ +
143 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template getHostEntity<cc>(e),i, codim);
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │ +
145
│ │ │ │ +
146
│ │ │ │ +
│ │ │ │ +
148 std::size_t size (GeometryType type) const
│ │ │ │ +
149 {
│ │ │ │ +
150 return grid_->hostgrid_->leafIndexSet().size(type);
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │ +
152
│ │ │ │ +
153
│ │ │ │ +
│ │ │ │ +
155 std::size_t size (int codim) const
│ │ │ │ +
156 {
│ │ │ │ +
157 return grid_->hostgrid_->leafIndexSet().size(codim);
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
160
│ │ │ │ +
│ │ │ │ +
162 const std::vector<GeometryType>& geomTypes (int codim) const
│ │ │ │ +
163 {
│ │ │ │ +
164 return grid_->hostgrid_->leafIndexSet().geomTypes(codim);
│ │ │ │ +
165 }
│ │ │ │ +
│ │ │ │ +
166
│ │ │ │ +
│ │ │ │ +
168 Types types (int codim) const
│ │ │ │ +
169 {
│ │ │ │ +
170 return grid_->hostgrid_->leafIndexSet().types(codim);
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
174 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
175 bool contains (const EntityType& e) const
│ │ │ │ +
176 {
│ │ │ │ +
177 return grid_->hostgrid_->leafIndexSet().contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ +
178 }
│ │ │ │ +
│ │ │ │ +
179
│ │ │ │ +
180
│ │ │ │ +
181
│ │ │ │ +
│ │ │ │ +
183 void update(const GridImp& grid)
│ │ │ │ +
184 {
│ │ │ │ +
185 grid_ = &grid;
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
188
│ │ │ │ +
189 GridImp* grid_;
│ │ │ │ +
190 };
│ │ │ │ +
│ │ │ │ +
191
│ │ │ │ +
192
│ │ │ │ +
193
│ │ │ │ +
194
│ │ │ │ +
195 template <class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
197 public IdSet<GridImp,IdentityGridGlobalIdSet<GridImp>,
│ │ │ │ +
198 typename std::remove_const<GridImp>::type::HostGridType::Traits::GlobalIdSet::IdType>
│ │ │ │ +
199 {
│ │ │ │ +
200
│ │ │ │ +
201 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ +
202
│ │ │ │ +
203
│ │ │ │ +
204 public:
│ │ │ │ +
206 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ +
207
│ │ │ │ +
209 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;
│ │ │ │ +
210
│ │ │ │ +
211
│ │ │ │ +
213 /*
│ │ │ │ +
214 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
215 because the const class is not instantiated yet.
│ │ │ │ +
216 */
│ │ │ │ +
217 template<int cd>
│ │ │ │ +
│ │ │ │ +
218 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ +
219 {
│ │ │ │ +
220 // Return id of the host entity
│ │ │ │ +
221 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);
│ │ │ │ +
222 }
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
224
│ │ │ │ +
226 /*
│ │ │ │ +
227 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
228 because the const class is not instantiated yet.
│ │ │ │ +
229 */
│ │ │ │ +
│ │ │ │ +
230 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ +
231 {
│ │ │ │ +
232 // Return sub id of the host entity
│ │ │ │ +
233 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, codim);
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
236
│ │ │ │ +
238 void update() {}
│ │ │ │ +
239
│ │ │ │ +
240
│ │ │ │ +
241 const GridImp* grid_;
│ │ │ │ +
242 };
│ │ │ │ +
│ │ │ │ +
243
│ │ │ │ +
244
│ │ │ │ +
245
│ │ │ │ +
246
│ │ │ │ +
247 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
249 public IdSet<GridImp,IdentityGridLocalIdSet<GridImp>,
│ │ │ │ +
250 typename std::remove_const<GridImp>::type::HostGridType::Traits::LocalIdSet::IdType>
│ │ │ │ +
251 {
│ │ │ │ +
252 private:
│ │ │ │ +
253
│ │ │ │ +
254 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ +
255
│ │ │ │ +
256
│ │ │ │ +
257 public:
│ │ │ │ +
259 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;
│ │ │ │ +
260
│ │ │ │ +
261
│ │ │ │ +
263 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ +
264
│ │ │ │ +
265
│ │ │ │ +
267 /*
│ │ │ │ +
268 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
269 because the const class is not instantiated yet.
│ │ │ │ +
270 */
│ │ │ │ +
271 template<int cd>
│ │ │ │ +
│ │ │ │ +
272 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ +
273 {
│ │ │ │ +
274 // Return id of the host entity
│ │ │ │ +
275 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);
│ │ │ │ +
276 }
│ │ │ │ +
│ │ │ │ +
277
│ │ │ │ +
278
│ │ │ │ +
280 /*
│ │ │ │ +
281 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
282 * because the const class is not instantiated yet.
│ │ │ │ +
283 */
│ │ │ │ +
│ │ │ │ +
284 IdType subId (const typename std::remove_const<GridImp>::type::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ +
285 {
│ │ │ │ +
286 // Return sub id of the host entity
│ │ │ │ +
287 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);
│ │ │ │ +
288 }
│ │ │ │ +
│ │ │ │ +
289
│ │ │ │ +
290
│ │ │ │ +
292 void update() {}
│ │ │ │ +
293
│ │ │ │ +
294
│ │ │ │ +
295 const GridImp* grid_;
│ │ │ │ +
296 };
│ │ │ │ +
│ │ │ │ +
297
│ │ │ │ +
298
│ │ │ │ +
299} // namespace Dune
│ │ │ │ +
300
│ │ │ │ +
301
│ │ │ │ +
302#endif
│ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
The EntitySeed class provides the minimal information needed to restore an Entity using the grid.
Definition identitygridentityseed.hh:24
│ │ │ │ -
static constexpr int codimension
Definition identitygridentityseed.hh:35
│ │ │ │ -
IdentityGridEntitySeed()
Construct an empty (i.e. isValid() == false) seed.
Definition identitygridentityseed.hh:40
│ │ │ │ -
bool isValid() const
Check whether it is safe to create an Entity from this Seed.
Definition identitygridentityseed.hh:64
│ │ │ │ -
GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity
Definition identitygridentityseed.hh:28
│ │ │ │ -
IdentityGridEntitySeed(const HostEntity &hostEntity)
Create EntitySeed from hostgrid Entity.
Definition identitygridentityseed.hh:49
│ │ │ │ -
const HostEntitySeed & hostEntitySeed() const
Get stored HostEntitySeed.
Definition identitygridentityseed.hh:56
│ │ │ │ -
GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed HostEntitySeed
Definition identitygridentityseed.hh:31
│ │ │ │ +
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │ +
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ +
Definition identitygridindexsets.hh:26
│ │ │ │ +
bool contains(const EntityType &e) const
Return true if the given entity is contained in the index set.
Definition identitygridindexsets.hh:77
│ │ │ │ +
int index(const typename GridImp::Traits::template Codim< codim >::Entity &e) const
get index of an entity
Definition identitygridindexsets.hh:36
│ │ │ │ +
GridImp * grid_
Definition identitygridindexsets.hh:90
│ │ │ │ +
std::remove_const< GridImp >::type::HostGridType HostGrid
Definition identitygridindexsets.hh:29
│ │ │ │ +
const std::vector< GeometryType > & geomTypes(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:64
│ │ │ │ +
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:70
│ │ │ │ +
std::size_t size(GeometryType type) const
get number of entities of given codim, type and on this level
Definition identitygridindexsets.hh:57
│ │ │ │ +
static constexpr int dim
Definition identitygridindexsets.hh:32
│ │ │ │ +
HostGrid::LevelGridView::IndexSet::Types Types
Definition identitygridindexsets.hh:30
│ │ │ │ +
std::size_t size(int codim) const
get number of entities of given codim, type and on this level
Definition identitygridindexsets.hh:51
│ │ │ │ +
int subIndex(const typename GridImp::Traits::template Codim< cc >::Entity &e, int i, int codim) const
get index of subEntity of a codim 0 entity
Definition identitygridindexsets.hh:44
│ │ │ │ +
int level_
Definition identitygridindexsets.hh:92
│ │ │ │ +
void update(const GridImp &grid, int level)
Set up the index set.
Definition identitygridindexsets.hh:83
│ │ │ │ +
Definition identitygridindexsets.hh:103
│ │ │ │ +
IdentityGridLeafIndexSet(const GridImp &grid)
constructor stores reference to a grid and level
Definition identitygridindexsets.hh:118
│ │ │ │ +
static constexpr int dim
Definition identitygridindexsets.hh:114
│ │ │ │ +
std::size_t size(int codim) const
get number of entities of given codim
Definition identitygridindexsets.hh:155
│ │ │ │ +
bool contains(const EntityType &e) const
Return true if the given entity is contained in the index set.
Definition identitygridindexsets.hh:175
│ │ │ │ +
std::size_t size(GeometryType type) const
get number of entities of given type
Definition identitygridindexsets.hh:148
│ │ │ │ +
HostGrid::LevelGridView::IndexSet::Types Types
Definition identitygridindexsets.hh:108
│ │ │ │ +
int index(const typename std::remove_const< GridImp >::type::template Codim< codim >::Entity &e) const
get index of an entity
Definition identitygridindexsets.hh:129
│ │ │ │ +
int subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
get index of subEntity of a codim 0 entity
Definition identitygridindexsets.hh:141
│ │ │ │ +
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:168
│ │ │ │ +
GridImp * grid_
Definition identitygridindexsets.hh:189
│ │ │ │ +
void update(const GridImp &grid)
Definition identitygridindexsets.hh:183
│ │ │ │ +
const std::vector< GeometryType > & geomTypes(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:162
│ │ │ │ +
Definition identitygridindexsets.hh:199
│ │ │ │ +
IdentityGridGlobalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:206
│ │ │ │ +
void update()
Definition identitygridindexsets.hh:238
│ │ │ │ +
const GridImp * grid_
Definition identitygridindexsets.hh:241
│ │ │ │ +
HostGrid::Traits::GlobalIdSet::IdType IdType
define the type used for persistent indices
Definition identitygridindexsets.hh:209
│ │ │ │ +
IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, int codim) const
get id of subEntity
Definition identitygridindexsets.hh:230
│ │ │ │ +
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:218
│ │ │ │ +
Definition identitygridindexsets.hh:251
│ │ │ │ +
IdType subId(const typename std::remove_const< GridImp >::type::template Codim< 0 >::Entity &e, int i, int codim) const
get id of subEntity
Definition identitygridindexsets.hh:284
│ │ │ │ +
IdentityGridLocalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:263
│ │ │ │ +
const GridImp * grid_
Definition identitygridindexsets.hh:295
│ │ │ │ +
void update()
Definition identitygridindexsets.hh:292
│ │ │ │ +
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:272
│ │ │ │ +
HostGrid::Traits::LocalIdSet::IdType IdType
define the type used for persistent local ids
Definition identitygridindexsets.hh:259
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,96 +1,465 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridentityseed.hh │ │ │ │ │ +identitygridindexsets.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ -6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ │ 7 │ │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ 15 │ │ │ │ │ -16 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -24 { │ │ │ │ │ -25 protected: │ │ │ │ │ -26 │ │ │ │ │ -27 // Entity type of the hostgrid │ │ │ │ │ -_2_8 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ │ -Entity _H_o_s_t_E_n_t_i_t_y; │ │ │ │ │ -29 │ │ │ │ │ -30 // EntitySeed type of the hostgrid │ │ │ │ │ -_3_1 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ │ -EntitySeed _H_o_s_t_E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ -32 │ │ │ │ │ -33 public: │ │ │ │ │ -34 │ │ │ │ │ -_3_5 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ -36 │ │ │ │ │ -_4_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d() │ │ │ │ │ -41 {} │ │ │ │ │ -42 │ │ │ │ │ -_4_9 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d(const _H_o_s_t_E_n_t_i_t_y& hostEntity) : │ │ │ │ │ -50 hostEntitySeed_(hostEntity.seed()) │ │ │ │ │ -51 {} │ │ │ │ │ -52 │ │ │ │ │ -_5_6 const _H_o_s_t_E_n_t_i_t_y_S_e_e_d& _h_o_s_t_E_n_t_i_t_y_S_e_e_d() const │ │ │ │ │ -57 { │ │ │ │ │ -58 return hostEntitySeed_; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_4 bool _i_s_V_a_l_i_d() const │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ +17 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t : │ │ │ │ │ +21 public _I_n_d_e_x_S_e_t, │ │ │ │ │ +23 typename std::remove_const::type::HostGridType::LevelGridView:: │ │ │ │ │ +IndexSet::IndexType, │ │ │ │ │ +24 typename std::remove_const::type::HostGridType::LevelGridView:: │ │ │ │ │ +IndexSet::Types │ │ │ │ │ +25 > │ │ │ │ │ +26 { │ │ │ │ │ +27 public: │ │ │ │ │ +28 │ │ │ │ │ +_2_9 typedef typename std::remove_const::type::HostGridType _H_o_s_t_G_r_i_d; │ │ │ │ │ +_3_0 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ │ +31 │ │ │ │ │ +_3_2 constexpr static int _d_i_m = GridImp::dimension; │ │ │ │ │ +33 │ │ │ │ │ +35 template │ │ │ │ │ +_3_6 int _i_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e) │ │ │ │ │ +const │ │ │ │ │ +37 { │ │ │ │ │ +38 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).template index(_g_r_i_d__- │ │ │ │ │ +>template getHostEntity(e)); │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +41 │ │ │ │ │ +43 template │ │ │ │ │ +_4_4 int _s_u_b_I_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e, │ │ │ │ │ +int i, int codim) const │ │ │ │ │ +45 { │ │ │ │ │ +46 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).subIndex(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e), i, codim); │ │ │ │ │ +47 } │ │ │ │ │ +48 │ │ │ │ │ +49 │ │ │ │ │ +_5_1 std::size_t _s_i_z_e (int codim) const { │ │ │ │ │ +52 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).size(codim); │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +55 │ │ │ │ │ +_5_7 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ +58 { │ │ │ │ │ +59 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).size(type); │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +62 │ │ │ │ │ +_6_4 const std::vector& _g_e_o_m_T_y_p_e_s (int codim) const │ │ │ │ │ 65 { │ │ │ │ │ -66 return hostEntitySeed_.isValid(); │ │ │ │ │ +66 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).geomTypes(codim); │ │ │ │ │ 67 } │ │ │ │ │ -68 private: │ │ │ │ │ -69 │ │ │ │ │ -70 _H_o_s_t_E_n_t_i_t_y_S_e_e_d hostEntitySeed_; │ │ │ │ │ -71 }; │ │ │ │ │ -72 │ │ │ │ │ -73} // namespace Dune │ │ │ │ │ +68 │ │ │ │ │ +_7_0 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ +71 { │ │ │ │ │ +72 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).types(codim); │ │ │ │ │ +73 } │ │ │ │ │ 74 │ │ │ │ │ -75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ +76 template │ │ │ │ │ +_7_7 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ +78 { │ │ │ │ │ +79 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).contains(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e)); │ │ │ │ │ +80 } │ │ │ │ │ +81 │ │ │ │ │ +_8_3 void _u_p_d_a_t_e(const GridImp& grid, int level) │ │ │ │ │ +84 { │ │ │ │ │ +85 _g_r_i_d__ = &grid; │ │ │ │ │ +86 _l_e_v_e_l__ = level; │ │ │ │ │ +87 } │ │ │ │ │ +88 │ │ │ │ │ +89 │ │ │ │ │ +_9_0 GridImp* _g_r_i_d__; │ │ │ │ │ +91 │ │ │ │ │ +_9_2 int _l_e_v_e_l__; │ │ │ │ │ +93 }; │ │ │ │ │ +94 │ │ │ │ │ +95 │ │ │ │ │ +96 template │ │ │ │ │ +_9_7 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t : │ │ │ │ │ +98 public _I_n_d_e_x_S_e_t, │ │ │ │ │ +100 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ +IndexSet::IndexType, │ │ │ │ │ +101 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ +IndexSet::Types │ │ │ │ │ +102 > │ │ │ │ │ +103 { │ │ │ │ │ +104 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ +105 │ │ │ │ │ +106 public: │ │ │ │ │ +107 │ │ │ │ │ +_1_0_8 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ │ +109 │ │ │ │ │ +110 /* │ │ │ │ │ +111 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +112 * because the const class is not instantiated yet. │ │ │ │ │ +113 */ │ │ │ │ │ +_1_1_4 constexpr static int _d_i_m = std::remove_const::type::dimension; │ │ │ │ │ +115 │ │ │ │ │ +116 │ │ │ │ │ +_1_1_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t (const GridImp& grid) │ │ │ │ │ +119 : _g_r_i_d__(&grid) │ │ │ │ │ +120 {} │ │ │ │ │ +121 │ │ │ │ │ +122 │ │ │ │ │ +124 /* │ │ │ │ │ +125 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ +126 because the const class is not instantiated yet. │ │ │ │ │ +127 */ │ │ │ │ │ +128 template │ │ │ │ │ +_1_2_9 int _i_n_d_e_x (const typename std::remove_const::type::template │ │ │ │ │ +Codim::Entity& e) const │ │ │ │ │ +130 { │ │ │ │ │ +131 return _g_r_i_d__->hostgrid_->leafIndexSet().template index(_g_r_i_d__- │ │ │ │ │ +>template getHostEntity(e)); │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +134 │ │ │ │ │ +136 /* │ │ │ │ │ +137 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ +138 because the const class is not instantiated yet. │ │ │ │ │ +139 */ │ │ │ │ │ +140 template │ │ │ │ │ +_1_4_1 int _s_u_b_I_n_d_e_x (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim::Entity& e, int i, int codim) const │ │ │ │ │ +142 { │ │ │ │ │ +143 return _g_r_i_d__->hostgrid_->leafIndexSet().subIndex(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e),i, codim); │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +146 │ │ │ │ │ +_1_4_8 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ +149 { │ │ │ │ │ +150 return _g_r_i_d__->hostgrid_->leafIndexSet().size(type); │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +153 │ │ │ │ │ +_1_5_5 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ +156 { │ │ │ │ │ +157 return _g_r_i_d__->hostgrid_->leafIndexSet().size(codim); │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +160 │ │ │ │ │ +_1_6_2 const std::vector& _g_e_o_m_T_y_p_e_s (int codim) const │ │ │ │ │ +163 { │ │ │ │ │ +164 return _g_r_i_d__->hostgrid_->leafIndexSet().geomTypes(codim); │ │ │ │ │ +165 } │ │ │ │ │ +166 │ │ │ │ │ +_1_6_8 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ +169 { │ │ │ │ │ +170 return _g_r_i_d__->hostgrid_->leafIndexSet().types(codim); │ │ │ │ │ +171 } │ │ │ │ │ +172 │ │ │ │ │ +174 template │ │ │ │ │ +_1_7_5 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ +176 { │ │ │ │ │ +177 return _g_r_i_d__->hostgrid_->leafIndexSet().contains(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e)); │ │ │ │ │ +178 } │ │ │ │ │ +179 │ │ │ │ │ +180 │ │ │ │ │ +181 │ │ │ │ │ +_1_8_3 void _u_p_d_a_t_e(const GridImp& grid) │ │ │ │ │ +184 { │ │ │ │ │ +185 _g_r_i_d__ = &grid; │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +188 │ │ │ │ │ +_1_8_9 GridImp* _g_r_i_d__; │ │ │ │ │ +190 }; │ │ │ │ │ +191 │ │ │ │ │ +192 │ │ │ │ │ +193 │ │ │ │ │ +194 │ │ │ │ │ +195 template │ │ │ │ │ +_1_9_6 class _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t : │ │ │ │ │ +197 public _I_d_S_e_t, │ │ │ │ │ +198 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ +GlobalIdSet::IdType> │ │ │ │ │ +199 { │ │ │ │ │ +200 │ │ │ │ │ +201 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ +202 │ │ │ │ │ +203 │ │ │ │ │ +204 public: │ │ │ │ │ +_2_0_6 _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t (const GridImp& g) : _g_r_i_d__(&g) {} │ │ │ │ │ +207 │ │ │ │ │ +_2_0_9 typedef typename HostGrid::Traits::GlobalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ +210 │ │ │ │ │ +211 │ │ │ │ │ +213 /* │ │ │ │ │ +214 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +215 because the const class is not instantiated yet. │ │ │ │ │ +216 */ │ │ │ │ │ +217 template │ │ │ │ │ +_2_1_8 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim::Entity& e) const │ │ │ │ │ +219 { │ │ │ │ │ +220 // Return id of the host entity │ │ │ │ │ +221 return _g_r_i_d__->hostgrid_->globalIdSet().id(e.impl().hostEntity_); │ │ │ │ │ +222 } │ │ │ │ │ +223 │ │ │ │ │ +224 │ │ │ │ │ +226 /* │ │ │ │ │ +227 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +228 because the const class is not instantiated yet. │ │ │ │ │ +229 */ │ │ │ │ │ +_2_3_0 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim<0>::Entity& e, int i, int codim) const │ │ │ │ │ +231 { │ │ │ │ │ +232 // Return sub id of the host entity │ │ │ │ │ +233 return _g_r_i_d__->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, │ │ │ │ │ +codim); │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +236 │ │ │ │ │ +_2_3_8 void _u_p_d_a_t_e() {} │ │ │ │ │ +239 │ │ │ │ │ +240 │ │ │ │ │ +_2_4_1 const GridImp* _g_r_i_d__; │ │ │ │ │ +242 }; │ │ │ │ │ +243 │ │ │ │ │ +244 │ │ │ │ │ +245 │ │ │ │ │ +246 │ │ │ │ │ +247 template │ │ │ │ │ +_2_4_8 class _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t : │ │ │ │ │ +249 public _I_d_S_e_t, │ │ │ │ │ +250 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ +LocalIdSet::IdType> │ │ │ │ │ +251 { │ │ │ │ │ +252 private: │ │ │ │ │ +253 │ │ │ │ │ +254 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ +255 │ │ │ │ │ +256 │ │ │ │ │ +257 public: │ │ │ │ │ +_2_5_9 typedef typename HostGrid::Traits::LocalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ +260 │ │ │ │ │ +261 │ │ │ │ │ +_2_6_3 _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t (const GridImp& g) : _g_r_i_d__(&g) {} │ │ │ │ │ +264 │ │ │ │ │ +265 │ │ │ │ │ +267 /* │ │ │ │ │ +268 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +269 because the const class is not instantiated yet. │ │ │ │ │ +270 */ │ │ │ │ │ +271 template │ │ │ │ │ +_2_7_2 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim::Entity& e) const │ │ │ │ │ +273 { │ │ │ │ │ +274 // Return id of the host entity │ │ │ │ │ +275 return _g_r_i_d__->hostgrid_->localIdSet().id(e.impl().hostEntity_); │ │ │ │ │ +276 } │ │ │ │ │ +277 │ │ │ │ │ +278 │ │ │ │ │ +280 /* │ │ │ │ │ +281 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +282 * because the const class is not instantiated yet. │ │ │ │ │ +283 */ │ │ │ │ │ +_2_8_4 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::template │ │ │ │ │ +Codim<0>::Entity& e, int i, int codim) const │ │ │ │ │ +285 { │ │ │ │ │ +286 // Return sub id of the host entity │ │ │ │ │ +287 return _g_r_i_d__->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim); │ │ │ │ │ +288 } │ │ │ │ │ +289 │ │ │ │ │ +290 │ │ │ │ │ +_2_9_2 void _u_p_d_a_t_e() {} │ │ │ │ │ +293 │ │ │ │ │ +294 │ │ │ │ │ +_2_9_5 const GridImp* _g_r_i_d__; │ │ │ │ │ +296 }; │ │ │ │ │ +297 │ │ │ │ │ +298 │ │ │ │ │ +299} // namespace Dune │ │ │ │ │ +300 │ │ │ │ │ +301 │ │ │ │ │ +302#endif │ │ │ │ │ +_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ +Provides base classes for index and id sets. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -The EntitySeed class provides the minimal information needed to restore an │ │ │ │ │ -Entity using the grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -IdentityGridEntitySeed() │ │ │ │ │ -Construct an empty (i.e. isValid() == false) seed. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ │ -bool isValid() const │ │ │ │ │ -Check whether it is safe to create an Entity from this Seed. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y │ │ │ │ │ -GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -IdentityGridEntitySeed(const HostEntity &hostEntity) │ │ │ │ │ -Create EntitySeed from hostgrid Entity. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_h_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -const HostEntitySeed & hostEntitySeed() const │ │ │ │ │ -Get stored HostEntitySeed. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed │ │ │ │ │ -HostEntitySeed │ │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Index Set Interface base class. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ +Id Set Interface. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const EntityType &e) const │ │ │ │ │ +Return true if the given entity is contained in the index set. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:77 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ +int index(const typename GridImp::Traits::template Codim< codim >::Entity &e) │ │ │ │ │ +const │ │ │ │ │ +get index of an entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ +GridImp * grid_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_H_o_s_t_G_r_i_d │ │ │ │ │ +std::remove_const< GridImp >::type::HostGridType HostGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_g_e_o_m_T_y_p_e_s │ │ │ │ │ +const std::vector< GeometryType > & geomTypes(int codim) const │ │ │ │ │ +Deliver all geometry types used in this grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ +Types types(int codim) const │ │ │ │ │ +Deliver all geometry types used in this grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(GeometryType type) const │ │ │ │ │ +get number of entities of given codim, type and on this level │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_d_i_m │ │ │ │ │ +static constexpr int dim │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_T_y_p_e_s │ │ │ │ │ +HostGrid::LevelGridView::IndexSet::Types Types │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(int codim) const │ │ │ │ │ +get number of entities of given codim, type and on this level │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +int subIndex(const typename GridImp::Traits::template Codim< cc >::Entity &e, │ │ │ │ │ +int i, int codim) const │ │ │ │ │ +get index of subEntity of a codim 0 entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_l_e_v_e_l__ │ │ │ │ │ +int level_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(const GridImp &grid, int level) │ │ │ │ │ +Set up the index set. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ +IdentityGridLeafIndexSet(const GridImp &grid) │ │ │ │ │ +constructor stores reference to a grid and level │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_d_i_m │ │ │ │ │ +static constexpr int dim │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(int codim) const │ │ │ │ │ +get number of entities of given codim │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const EntityType &e) const │ │ │ │ │ +Return true if the given entity is contained in the index set. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:175 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(GeometryType type) const │ │ │ │ │ +get number of entities of given type │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_T_y_p_e_s │ │ │ │ │ +HostGrid::LevelGridView::IndexSet::Types Types │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ +int index(const typename std::remove_const< GridImp >::type::template Codim< │ │ │ │ │ +codim >::Entity &e) const │ │ │ │ │ +get index of an entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +int subIndex(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ +template Codim< cc >::Entity &e, int i, int codim) const │ │ │ │ │ +get index of subEntity of a codim 0 entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ +Types types(int codim) const │ │ │ │ │ +Deliver all geometry types used in this grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ +GridImp * grid_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(const GridImp &grid) │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:183 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_g_e_o_m_T_y_p_e_s │ │ │ │ │ +const std::vector< GeometryType > & geomTypes(int codim) const │ │ │ │ │ +Deliver all geometry types used in this grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:162 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ +IdentityGridGlobalIdSet(const GridImp &g) │ │ │ │ │ +constructor stores reference to a grid │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:206 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ +void update() │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ +const GridImp * grid_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:241 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ +HostGrid::Traits::GlobalIdSet::IdType IdType │ │ │ │ │ +define the type used for persistent indices │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:209 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ +IdType subId(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ +template Codim< 0 >::Entity &e, int i, int codim) const │ │ │ │ │ +get id of subEntity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:230 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ │ +IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ │ +Codim< cd >::Entity &e) const │ │ │ │ │ +get id of an entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:251 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ +IdType subId(const typename std::remove_const< GridImp >::type::template Codim< │ │ │ │ │ +0 >::Entity &e, int i, int codim) const │ │ │ │ │ +get id of subEntity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:284 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t │ │ │ │ │ +IdentityGridLocalIdSet(const GridImp &g) │ │ │ │ │ +constructor stores reference to a grid │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:263 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ +const GridImp * grid_ │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:295 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ +void update() │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ │ +IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ │ +Codim< cd >::Entity &e) const │ │ │ │ │ +get id of an entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:272 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ +HostGrid::Traits::LocalIdSet::IdType IdType │ │ │ │ │ +define the type used for persistent local ids │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:259 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridhierarchiciterator.hh File Reference │ │ │ │ +dune-grid: identitygridleafiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,38 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridhierarchiciterator.hh File Reference
│ │ │ │ +
identitygridleafiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridHierarchicIterator class. │ │ │ │ +

The IdentityGridLeafIterator class. │ │ │ │ More...

│ │ │ │ - │ │ │ │ +
#include <dune/grid/common/gridenums.hh>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridHierarchicIterator< GridImp >
 Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit all entities of codimension 0 obtained through nested, hierarchic refinement of the entity. Iteration over this set of entities is provided by the HierarchicIterator, starting from a given entity. More...
class  Dune::IdentityGridLeafIterator< codim, pitype, GridImp >
 Iterator over all entities of a given codimension and level of a grid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridHierarchicIterator class.

│ │ │ │ +

The IdentityGridLeafIterator class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,24 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridhierarchiciterator.hh File Reference │ │ │ │ │ -The IdentityGridHierarchicIterator class. _M_o_r_e_._._. │ │ │ │ │ +identitygridleafiterator.hh File Reference │ │ │ │ │ +The IdentityGridLeafIterator class. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ - Iterator over the descendants of an entity.Mesh entities of codimension │ │ │ │ │ - 0 ("elements") allow to visit all entities of codimension 0 obtained │ │ │ │ │ -  through nested, hierarchic refinement of the entity. Iteration over │ │ │ │ │ - this set of entities is provided by the HierarchicIterator, starting │ │ │ │ │ - from a given entity. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridHierarchicIterator class. │ │ │ │ │ +The IdentityGridLeafIterator class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridhierarchiciterator.hh Source File │ │ │ │ +dune-grid: identitygridleafiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,99 +74,100 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridhierarchiciterator.hh
│ │ │ │ +
identitygridleafiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRIDHIERITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ │
7
│ │ │ │ -
12namespace Dune {
│ │ │ │ -
13
│ │ │ │ -
14
│ │ │ │ -
15 //**********************************************************************
│ │ │ │ -
16 //
│ │ │ │ -
24 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
14namespace Dune {
│ │ │ │ +
15
│ │ │ │ +
16
│ │ │ │ +
20 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ +
23 private:
│ │ │ │ +
24
│ │ │ │ +
25 // LevelIterator to the equivalent entity in the host grid
│ │ │ │ +
26 typedef typename GridImp::HostGridType::template Codim<codim>::template Partition<pitype>::LeafIterator HostGridLeafIterator;
│ │ │ │
27
│ │ │ │ -
28 // Type of the corresponding HierarchicIterator in the host grid
│ │ │ │ -
29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::HierarchicIterator HostGridHierarchicIterator;
│ │ │ │ -
30
│ │ │ │ -
31 public:
│ │ │ │ -
32
│ │ │ │ -
33 constexpr static int codimension = 0;
│ │ │ │ -
34
│ │ │ │ -
35 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ -
38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel) :
│ │ │ │ -
39 identityGrid_(identityGrid),
│ │ │ │ -
40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))
│ │ │ │ -
41 {}
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :
│ │ │ │ -
46 identityGrid_(identityGrid),
│ │ │ │ -
47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))
│ │ │ │ -
48 {}
│ │ │ │ +
28 public:
│ │ │ │ +
29
│ │ │ │ +
30 constexpr static int codimension = codim;
│ │ │ │ +
31
│ │ │ │ +
32 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 explicit IdentityGridLeafIterator(const GridImp* identityGrid) :
│ │ │ │ +
36 identityGrid_(identityGrid),
│ │ │ │ +
37 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template begin<codim,pitype>())
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
44 explicit IdentityGridLeafIterator(const GridImp* identityGrid, [[maybe_unused]] bool endDummy) :
│ │ │ │ +
45 identityGrid_(identityGrid),
│ │ │ │ +
46 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template end<codim,pitype>())
│ │ │ │ +
47 {}
│ │ │ │
│ │ │ │ +
48
│ │ │ │
49
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
52 void increment()
│ │ │ │ -
53 {
│ │ │ │ -
54 ++hostHierarchicIterator_;
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
59 return Entity{{identityGrid_,*hostHierarchicIterator_}};
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 private:
│ │ │ │ -
68 const GridImp* identityGrid_;
│ │ │ │ +
│ │ │ │ +
51 void increment() {
│ │ │ │ +
52 ++hostLeafIterator_;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 return Entity{{identityGrid_,*hostLeafIterator_}};
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ +
61 bool equals(const IdentityGridLeafIterator& i) const {
│ │ │ │ +
62 return hostLeafIterator_ == i.hostLeafIterator_;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
65 private:
│ │ │ │ +
66 const GridImp* identityGrid_;
│ │ │ │ +
67
│ │ │ │ +
68 HostGridLeafIterator hostLeafIterator_;
│ │ │ │
69
│ │ │ │ -
70 HostGridHierarchicIterator hostHierarchicIterator_;
│ │ │ │ -
71
│ │ │ │ -
72 };
│ │ │ │ +
70 };
│ │ │ │
│ │ │ │ -
73
│ │ │ │ +
71
│ │ │ │ +
72
│ │ │ │ +
73} // namespace Dune
│ │ │ │
74
│ │ │ │ -
75} // end namespace Dune
│ │ │ │ -
76
│ │ │ │ -
77#endif
│ │ │ │ +
75#endif
│ │ │ │ + │ │ │ │ +
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition identitygridhierarchiciterator.hh:26
│ │ │ │ -
void increment()
Definition identitygridhierarchiciterator.hh:52
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridhierarchiciterator.hh:35
│ │ │ │ -
bool equals(const IdentityGridHierarchicIterator &i) const
equality
Definition identitygridhierarchiciterator.hh:63
│ │ │ │ -
static constexpr int codimension
Definition identitygridhierarchiciterator.hh:33
│ │ │ │ -
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel, bool endDummy)
Definition identitygridhierarchiciterator.hh:45
│ │ │ │ -
Entity dereference() const
dereferencing
Definition identitygridhierarchiciterator.hh:58
│ │ │ │ -
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel)
the default Constructor
Definition identitygridhierarchiciterator.hh:38
│ │ │ │ +
Iterator over all entities of a given codimension and level of a grid.
Definition identitygridleafiterator.hh:22
│ │ │ │ +
Entity dereference() const
dereferencing
Definition identitygridleafiterator.hh:56
│ │ │ │ +
bool equals(const IdentityGridLeafIterator &i) const
equality
Definition identitygridleafiterator.hh:61
│ │ │ │ +
IdentityGridLeafIterator(const GridImp *identityGrid, bool endDummy)
Constructor which create the end iterator.
Definition identitygridleafiterator.hh:44
│ │ │ │ +
static constexpr int codimension
Definition identitygridleafiterator.hh:30
│ │ │ │ +
GridImp::template Codim< codim >::Entity Entity
Definition identitygridleafiterator.hh:32
│ │ │ │ +
IdentityGridLeafIterator(const GridImp *identityGrid)
Definition identitygridleafiterator.hh:35
│ │ │ │ +
void increment()
prefix increment
Definition identitygridleafiterator.hh:51
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,109 +1,113 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridhierarchiciterator.hh │ │ │ │ │ +identitygridleafiterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ │ -13 │ │ │ │ │ -14 │ │ │ │ │ -15 //********************************************************************** │ │ │ │ │ -16 // │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 class _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -26 { │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ │ +15 │ │ │ │ │ +16 │ │ │ │ │ +20 template │ │ │ │ │ +_2_1 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +22 { │ │ │ │ │ +23 private: │ │ │ │ │ +24 │ │ │ │ │ +25 // LevelIterator to the equivalent entity in the host grid │ │ │ │ │ +26 typedef typename GridImp::HostGridType::template Codim::template │ │ │ │ │ +Partition::LeafIterator HostGridLeafIterator; │ │ │ │ │ 27 │ │ │ │ │ -28 // Type of the corresponding HierarchicIterator in the host grid │ │ │ │ │ -29 typedef typename GridImp::HostGridType::template Codim<0>::Entity:: │ │ │ │ │ -HierarchicIterator HostGridHierarchicIterator; │ │ │ │ │ -30 │ │ │ │ │ -31 public: │ │ │ │ │ -32 │ │ │ │ │ -_3_3 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = 0; │ │ │ │ │ -34 │ │ │ │ │ -_3_5 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ -36 │ │ │ │ │ -_3_8 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ │ -_E_n_t_i_t_y& startEntity, int maxLevel) : │ │ │ │ │ -39 identityGrid_(identityGrid), │ │ │ │ │ -40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel)) │ │ │ │ │ -41 {} │ │ │ │ │ -42 │ │ │ │ │ -43 │ │ │ │ │ -_4_5 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ │ -_E_n_t_i_t_y& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) : │ │ │ │ │ -46 identityGrid_(identityGrid), │ │ │ │ │ -47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel)) │ │ │ │ │ -48 {} │ │ │ │ │ +28 public: │ │ │ │ │ +29 │ │ │ │ │ +_3_0 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +31 │ │ │ │ │ +_3_2 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ +33 │ │ │ │ │ +_3_5 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r(const GridImp* identityGrid) : │ │ │ │ │ +36 identityGrid_(identityGrid), │ │ │ │ │ +37 hostLeafIterator_(identityGrid->hostgrid_->_l_e_a_f_G_r_i_d_V_i_e_w().template │ │ │ │ │ +begin()) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +_4_4 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r(const GridImp* identityGrid, [ │ │ │ │ │ +[maybe_unused]] bool endDummy) : │ │ │ │ │ +45 identityGrid_(identityGrid), │ │ │ │ │ +46 hostLeafIterator_(identityGrid->hostgrid_->_l_e_a_f_G_r_i_d_V_i_e_w().template │ │ │ │ │ +end()) │ │ │ │ │ +47 {} │ │ │ │ │ +48 │ │ │ │ │ 49 │ │ │ │ │ -50 │ │ │ │ │ -_5_2 void _i_n_c_r_e_m_e_n_t() │ │ │ │ │ -53 { │ │ │ │ │ -54 ++hostHierarchicIterator_; │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -_5_8 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -59 return _E_n_t_i_t_y{{identityGrid_,*hostHierarchicIterator_}}; │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_3 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r& i) const { │ │ │ │ │ -64 return hostHierarchicIterator_ == i.hostHierarchicIterator_; │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 private: │ │ │ │ │ -68 const GridImp* identityGrid_; │ │ │ │ │ +_5_1 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +52 ++hostLeafIterator_; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_6 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +57 return _E_n_t_i_t_y{{identityGrid_,*hostLeafIterator_}}; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +_6_1 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r& i) const { │ │ │ │ │ +62 return hostLeafIterator_ == i.hostLeafIterator_; │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +65 private: │ │ │ │ │ +66 const GridImp* identityGrid_; │ │ │ │ │ +67 │ │ │ │ │ +68 HostGridLeafIterator hostLeafIterator_; │ │ │ │ │ 69 │ │ │ │ │ -70 HostGridHierarchicIterator hostHierarchicIterator_; │ │ │ │ │ +70 }; │ │ │ │ │ 71 │ │ │ │ │ -72 }; │ │ │ │ │ -73 │ │ │ │ │ +72 │ │ │ │ │ +73} // namespace Dune │ │ │ │ │ 74 │ │ │ │ │ -75} // end namespace Dune │ │ │ │ │ -76 │ │ │ │ │ -77#endif │ │ │ │ │ +75#endif │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_l_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< │ │ │ │ │ +dim, dimworld, ct, GridFamily > &grid) │ │ │ │ │ +leaf grid view for the given grid │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:819 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over the descendants of an entity.Mesh entities of codimension 0 │ │ │ │ │ -("elements") allow to visit... │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridHierarchicIterator &i) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ │ -&startEntity, int maxLevel, bool endDummy) │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ Entity dereference() const │ │ │ │ │ dereferencing │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ │ -&startEntity, int maxLevel) │ │ │ │ │ -the default Constructor │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:38 │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridLeafIterator &i) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLeafIterator(const GridImp *identityGrid, bool endDummy) │ │ │ │ │ +Constructor which create the end iterator. │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLeafIterator(const GridImp *identityGrid) │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +prefix increment │ │ │ │ │ +DDeeffiinniittiioonn identitygridleafiterator.hh:51 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentity.hh File Reference │ │ │ │ +dune-grid: identitygridleveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,38 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridentity.hh File Reference
│ │ │ │ +
identitygridleveliterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridEntity class. │ │ │ │ +

The IdentityGridLevelIterator class. │ │ │ │ More...

│ │ │ │ -
#include <dune/grid/common/grid.hh>
│ │ │ │ +
#include <dune/grid/common/gridenums.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridEntity< codim, dim, GridImp >
 The implementation of entities in a IdentityGrid. More...
 
class  Dune::IdentityGridEntity< 0, dim, GridImp >
 Specialization for codim-0-entities. More...
class  Dune::IdentityGridLevelIterator< codim, pitype, GridImp >
 Iterator over all entities of a given codimension and level of a grid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridEntity class.

│ │ │ │ +

The IdentityGridLevelIterator class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,24 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridentity.hh File Reference │ │ │ │ │ -The IdentityGridEntity class. _M_o_r_e_._._. │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +identitygridleveliterator.hh File Reference │ │ │ │ │ +The IdentityGridLevelIterator class. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  The implementation of entities in a _I_d_e_n_t_i_t_y_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  Specialization for codim-0-entities. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridEntity class. │ │ │ │ │ +The IdentityGridLevelIterator class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentity.hh Source File │ │ │ │ +dune-grid: identitygridleveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,542 +74,97 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridentity.hh
│ │ │ │ +
identitygridleveliterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRIDENTITY_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRIDENTITY_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ + │ │ │ │ +
9
│ │ │ │
14namespace Dune {
│ │ │ │
15
│ │ │ │ -
16
│ │ │ │ -
17 // Forward declarations
│ │ │ │ -
18
│ │ │ │ -
19 template<int codim, int dim, class GridImp>
│ │ │ │ -
20 class IdentityGridEntity;
│ │ │ │ -
21
│ │ │ │ -
22 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ -
23 class IdentityGridLevelIterator;
│ │ │ │ +
19 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
21 {
│ │ │ │ +
22
│ │ │ │ +
23 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator HostGridLevelIterator;
│ │ │ │
24
│ │ │ │ -
25 template<class GridImp>
│ │ │ │ -
26 class IdentityGridLevelIntersectionIterator;
│ │ │ │ -
27
│ │ │ │ -
28 template<class GridImp>
│ │ │ │ -
29 class IdentityGridLeafIntersectionIterator;
│ │ │ │ +
25 public:
│ │ │ │ +
26
│ │ │ │ +
27 constexpr static int codimension = codim;
│ │ │ │ +
28
│ │ │ │ +
29 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │
30
│ │ │ │ -
31 template<class GridImp>
│ │ │ │ -
32 class IdentityGridHierarchicIterator;
│ │ │ │ -
33
│ │ │ │ -
34
│ │ │ │ -
35 // External forward declarations
│ │ │ │ -
36 template< class Grid >
│ │ │ │ -
37 struct HostGridAccess;
│ │ │ │ -
38
│ │ │ │ -
39
│ │ │ │ -
40 //**********************************************************************
│ │ │ │ -
41 //
│ │ │ │ -
42 // --IdentityGridEntity
│ │ │ │ -
43 // --Entity
│ │ │ │ -
44 //
│ │ │ │ -
52 template<int codim, int dim, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 public EntityDefaultImplementation <codim,dim,GridImp,IdentityGridEntity>
│ │ │ │ -
55 {
│ │ │ │ -
56
│ │ │ │ -
57 template <class GridImp_>
│ │ │ │ - │ │ │ │ -
59
│ │ │ │ -
60 template <class GridImp_>
│ │ │ │ - │ │ │ │ -
62
│ │ │ │ -
63 template <class GridImp_>
│ │ │ │ - │ │ │ │ -
65
│ │ │ │ -
66 template <class GridImp_>
│ │ │ │ - │ │ │ │ -
68
│ │ │ │ -
69 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ +
│ │ │ │ +
32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
│ │ │ │ +
33 : identityGrid_(identityGrid),
│ │ │ │ +
34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
│ │ │ │ +
35 {}
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [[maybe_unused]] bool endDummy)
│ │ │ │ +
44 : identityGrid_(identityGrid),
│ │ │ │ +
45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template end<codim,pitype>())
│ │ │ │ +
46 {}
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
50 void increment() {
│ │ │ │ +
51 ++hostLevelIterator_;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 return Entity{{identityGrid_,*hostLevelIterator_}};
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 bool equals(const IdentityGridLevelIterator& i) const {
│ │ │ │ +
61 return hostLevelIterator_ == i.hostLevelIterator_;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64 private:
│ │ │ │ +
65 const GridImp* identityGrid_;
│ │ │ │ +
66
│ │ │ │ +
67 HostGridLevelIterator hostLevelIterator_;
│ │ │ │ +
68 };
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │
70
│ │ │ │ -
71
│ │ │ │ -
72 private:
│ │ │ │ -
73
│ │ │ │ -
74 typedef typename GridImp::ctype ctype;
│ │ │ │ -
75
│ │ │ │ -
76 // The codimension of this entity wrt the host grid
│ │ │ │ -
77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension + codim;
│ │ │ │ -
78
│ │ │ │ -
79 // equivalent entity in the host grid
│ │ │ │ -
80 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
│ │ │ │ -
81
│ │ │ │ -
82
│ │ │ │ -
83 public:
│ │ │ │ -
84
│ │ │ │ -
85 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
│ │ │ │ -
86
│ │ │ │ -
88 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 : identityGrid_(nullptr)
│ │ │ │ -
92 {}
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
│ │ │ │ -
94 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
│ │ │ │ -
95 : hostEntity_(hostEntity)
│ │ │ │ -
96 , identityGrid_(identityGrid)
│ │ │ │ -
97 {}
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
│ │ │ │ -
99 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
│ │ │ │ -
100 : hostEntity_(std::move(hostEntity))
│ │ │ │ -
101 , identityGrid_(identityGrid)
│ │ │ │ -
102 {}
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
106 : hostEntity_(original.hostEntity_)
│ │ │ │ -
107 , identityGrid_(original.identityGrid_)
│ │ │ │ -
108 {}
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 : hostEntity_(std::move(original.hostEntity_))
│ │ │ │ -
112 , identityGrid_(original.identityGrid_)
│ │ │ │ -
113 {}
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
117 {
│ │ │ │ -
118 if (this != &original)
│ │ │ │ -
119 {
│ │ │ │ -
120 identityGrid_ = original.identityGrid_;
│ │ │ │ -
121 hostEntity_ = original.hostEntity_;
│ │ │ │ -
122 }
│ │ │ │ -
123 return *this;
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
128 {
│ │ │ │ -
129 if (this != &original)
│ │ │ │ -
130 {
│ │ │ │ -
131 identityGrid_ = original.identityGrid_;
│ │ │ │ -
132 hostEntity_ = std::move(original.hostEntity_);
│ │ │ │ -
133 }
│ │ │ │ -
134 return *this;
│ │ │ │ -
135 }
│ │ │ │ -
│ │ │ │ -
136
│ │ │ │ -
│ │ │ │ -
137 bool equals(const IdentityGridEntity& other) const
│ │ │ │ -
138 {
│ │ │ │ -
139 return hostEntity_ == other.hostEntity_;
│ │ │ │ -
140 }
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
│ │ │ │ -
143 bool hasFather () const {
│ │ │ │ -
144 return hostEntity_.hasFather();
│ │ │ │ -
145 }
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
149 {
│ │ │ │ -
150 return EntitySeed(hostEntity_);
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
│ │ │ │ -
154 int level () const {
│ │ │ │ -
155 return hostEntity_.level();
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
162 return hostEntity_.partitionType();
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
│ │ │ │ -
167 unsigned int subEntities (unsigned int cc) const
│ │ │ │ -
168 {
│ │ │ │ -
169 return hostEntity_.subEntities(cc);
│ │ │ │ -
170 }
│ │ │ │ -
│ │ │ │ -
171
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
174 {
│ │ │ │ -
175 return Geometry( hostEntity_.geometry() );
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
178
│ │ │ │ -
179 HostGridEntity hostEntity_;
│ │ │ │ -
180
│ │ │ │ -
181 private:
│ │ │ │ -
182
│ │ │ │ -
183 const GridImp* identityGrid_;
│ │ │ │ -
184
│ │ │ │ -
185 };
│ │ │ │ -
│ │ │ │ -
186
│ │ │ │ -
187
│ │ │ │ -
188
│ │ │ │ -
189
│ │ │ │ -
190 //***********************
│ │ │ │ -
191 //
│ │ │ │ -
192 // --IdentityGridEntity
│ │ │ │ -
193 //
│ │ │ │ -
194 //***********************
│ │ │ │ -
202 template<int dim, class GridImp>
│ │ │ │ -
│ │ │ │ -
203 class IdentityGridEntity<0,dim,GridImp> :
│ │ │ │ -
204 public EntityDefaultImplementation<0,dim,GridImp, IdentityGridEntity>
│ │ │ │ -
205 {
│ │ │ │ -
206 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ -
207
│ │ │ │ -
208 public:
│ │ │ │ -
209
│ │ │ │ -
210 // The codimension of this entitypointer wrt the host grid
│ │ │ │ -
211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension;
│ │ │ │ -
212
│ │ │ │ -
213 // equivalent entity in the host grid
│ │ │ │ -
214 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
│ │ │ │ -
215
│ │ │ │ -
216 typedef typename GridImp::template Codim<0>::Geometry Geometry;
│ │ │ │ -
217
│ │ │ │ -
218 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
│ │ │ │ -
219
│ │ │ │ - │ │ │ │ -
222
│ │ │ │ - │ │ │ │ -
225
│ │ │ │ - │ │ │ │ -
228
│ │ │ │ -
230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
│ │ │ │ -
231
│ │ │ │ -
232
│ │ │ │ -
233
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
235 : identityGrid_(nullptr)
│ │ │ │ -
236 {}
│ │ │ │ -
│ │ │ │ -
237
│ │ │ │ -
│ │ │ │ -
238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
│ │ │ │ -
239 : hostEntity_(hostEntity)
│ │ │ │ -
240 , identityGrid_(identityGrid)
│ │ │ │ -
241 {}
│ │ │ │ -
│ │ │ │ -
242
│ │ │ │ -
│ │ │ │ -
243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
│ │ │ │ -
244 : hostEntity_(std::move(hostEntity))
│ │ │ │ -
245 , identityGrid_(identityGrid)
│ │ │ │ -
246 {}
│ │ │ │ -
│ │ │ │ -
247
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
250 : hostEntity_(original.hostEntity_)
│ │ │ │ -
251 , identityGrid_(original.identityGrid_)
│ │ │ │ -
252 {}
│ │ │ │ -
│ │ │ │ -
253
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
255 : hostEntity_(std::move(original.hostEntity_))
│ │ │ │ -
256 , identityGrid_(original.identityGrid_)
│ │ │ │ -
257 {}
│ │ │ │ -
│ │ │ │ -
258
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
261 {
│ │ │ │ -
262 if (this != &original)
│ │ │ │ -
263 {
│ │ │ │ -
264 identityGrid_ = original.identityGrid_;
│ │ │ │ -
265 hostEntity_ = original.hostEntity_;
│ │ │ │ -
266 }
│ │ │ │ -
267 return *this;
│ │ │ │ -
268 }
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
272 {
│ │ │ │ -
273 if (this != &original)
│ │ │ │ -
274 {
│ │ │ │ -
275 identityGrid_ = original.identityGrid_;
│ │ │ │ -
276 hostEntity_ = std::move(original.hostEntity_);
│ │ │ │ -
277 }
│ │ │ │ -
278 return *this;
│ │ │ │ -
279 }
│ │ │ │ -
│ │ │ │ -
280
│ │ │ │ -
│ │ │ │ -
281 bool equals(const IdentityGridEntity& other) const
│ │ │ │ -
282 {
│ │ │ │ -
283 return hostEntity_ == other.hostEntity_;
│ │ │ │ -
284 }
│ │ │ │ -
│ │ │ │ -
285
│ │ │ │ -
│ │ │ │ -
287 bool hasFather () const {
│ │ │ │ -
288 return hostEntity_.hasFather();
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
290
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
293 {
│ │ │ │ -
294 return EntitySeed(hostEntity_);
│ │ │ │ -
295 }
│ │ │ │ -
│ │ │ │ -
296
│ │ │ │ -
│ │ │ │ -
298 int level () const
│ │ │ │ -
299 {
│ │ │ │ -
300 return hostEntity_.level();
│ │ │ │ -
301 }
│ │ │ │ -
│ │ │ │ -
302
│ │ │ │ -
303
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
306 return hostEntity_.partitionType();
│ │ │ │ -
307 }
│ │ │ │ -
│ │ │ │ -
308
│ │ │ │ -
309
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
312 {
│ │ │ │ -
313 return Geometry( hostEntity_.geometry() );
│ │ │ │ -
314 }
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316
│ │ │ │ -
│ │ │ │ -
319 unsigned int subEntities (unsigned int codim) const
│ │ │ │ -
320 {
│ │ │ │ -
321 return hostEntity_.subEntities(codim);
│ │ │ │ -
322 }
│ │ │ │ -
│ │ │ │ -
323
│ │ │ │ -
324
│ │ │ │ -
328 template<int cc>
│ │ │ │ -
│ │ │ │ -
329 typename GridImp::template Codim<cc>::Entity subEntity (int i) const {
│ │ │ │ -
330 return IdentityGridEntity<cc,dim,GridImp>(identityGrid_, hostEntity_.template subEntity<cc>(i));
│ │ │ │ -
331 }
│ │ │ │ -
│ │ │ │ -
332
│ │ │ │ -
333
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
337 identityGrid_,
│ │ │ │ -
338 identityGrid_->getHostGrid().levelGridView(level()).ibegin(hostEntity_));
│ │ │ │ -
339 }
│ │ │ │ -
│ │ │ │ -
340
│ │ │ │ -
341
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
345 identityGrid_,
│ │ │ │ -
346 identityGrid_->getHostGrid().levelGridView(level()).iend(hostEntity_));
│ │ │ │ -
347 }
│ │ │ │ -
│ │ │ │ -
348
│ │ │ │ -
349
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
353 identityGrid_,
│ │ │ │ -
354 identityGrid_->getHostGrid().leafGridView().ibegin(hostEntity_));
│ │ │ │ -
355 }
│ │ │ │ -
│ │ │ │ -
356
│ │ │ │ -
357
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
361 identityGrid_,
│ │ │ │ -
362 identityGrid_->getHostGrid().leafGridView().iend(hostEntity_));
│ │ │ │ -
363 }
│ │ │ │ -
│ │ │ │ -
364
│ │ │ │ -
365
│ │ │ │ -
│ │ │ │ -
367 bool isLeaf() const {
│ │ │ │ -
368 return hostEntity_.isLeaf();
│ │ │ │ -
369 }
│ │ │ │ -
│ │ │ │ -
370
│ │ │ │ -
371
│ │ │ │ -
│ │ │ │ -
374 typename GridImp::template Codim<0>::Entity father () const {
│ │ │ │ -
375 return IdentityGridEntity(identityGrid_, hostEntity_.father());
│ │ │ │ -
376 }
│ │ │ │ -
│ │ │ │ -
377
│ │ │ │ -
378
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
389 {
│ │ │ │ -
390 return LocalGeometry( hostEntity_.geometryInFather() );
│ │ │ │ -
391 }
│ │ │ │ -
│ │ │ │ -
392
│ │ │ │ -
393
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
399 {
│ │ │ │ -
400 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel);
│ │ │ │ -
401 }
│ │ │ │ -
│ │ │ │ -
402
│ │ │ │ -
403
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
406 {
│ │ │ │ -
407 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel, true);
│ │ │ │ -
408 }
│ │ │ │ -
│ │ │ │ -
409
│ │ │ │ -
410
│ │ │ │ -
│ │ │ │ -
412 bool wasRefined () const
│ │ │ │ -
413 {
│ │ │ │ -
414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)
│ │ │ │ -
415 return false;
│ │ │ │ -
416
│ │ │ │ -
417 int level = this->level();
│ │ │ │ -
418 int index = identityGrid_->levelIndexSet(level).index(*this);
│ │ │ │ -
419 return identityGrid_->refinementMark_[level][index];
│ │ │ │ -
420 }
│ │ │ │ -
│ │ │ │ -
421
│ │ │ │ -
422
│ │ │ │ -
│ │ │ │ -
424 bool mightBeCoarsened () const
│ │ │ │ -
425 {
│ │ │ │ -
426 return true;
│ │ │ │ -
427 }
│ │ │ │ -
│ │ │ │ -
428
│ │ │ │ -
429
│ │ │ │ -
430 // /////////////////////////////////////////
│ │ │ │ -
431 // Internal stuff
│ │ │ │ -
432 // /////////////////////////////////////////
│ │ │ │ -
433
│ │ │ │ -
434
│ │ │ │ - │ │ │ │ -
436 const GridImp* identityGrid_;
│ │ │ │ -
437
│ │ │ │ -
438 private:
│ │ │ │ -
439
│ │ │ │ -
440 typedef typename GridImp::ctype ctype;
│ │ │ │ -
441
│ │ │ │ -
442 }; // end of IdentityGridEntity codim = 0
│ │ │ │ -
│ │ │ │ -
443
│ │ │ │ -
444
│ │ │ │ -
445} // namespace Dune
│ │ │ │ -
446
│ │ │ │ -
447
│ │ │ │ -
448#endif
│ │ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ -
STL namespace.
│ │ │ │ +
71} // namespace Dune
│ │ │ │ +
72
│ │ │ │ +
73#endif
│ │ │ │ + │ │ │ │ +
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Default Implementations for EntityImp.
Definition common/entity.hh:542
│ │ │ │ -
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition common/entity.hh:576
│ │ │ │ -
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ -
The implementation of entities in a IdentityGrid.
Definition identitygridentity.hh:55
│ │ │ │ -
IdentityGridEntity()
Definition identitygridentity.hh:90
│ │ │ │ -
IdentityGridEntity & operator=(IdentityGridEntity &&original)
Definition identitygridentity.hh:127
│ │ │ │ -
IdentityGridEntity(IdentityGridEntity &&original)
Definition identitygridentity.hh:110
│ │ │ │ -
bool equals(const IdentityGridEntity &other) const
Definition identitygridentity.hh:137
│ │ │ │ -
HostGridEntity hostEntity_
Definition identitygridentity.hh:179
│ │ │ │ -
GridImp::template Codim< codim >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition identitygridentity.hh:88
│ │ │ │ -
EntitySeed seed() const
Create EntitySeed.
Definition identitygridentity.hh:148
│ │ │ │ -
IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
Definition identitygridentity.hh:94
│ │ │ │ -
Geometry geometry() const
geometry of this entity
Definition identitygridentity.hh:173
│ │ │ │ -
PartitionType partitionType() const
The partition type for parallel computing.
Definition identitygridentity.hh:161
│ │ │ │ -
unsigned int subEntities(unsigned int cc) const
Return the number of subEntities of codimension codim.
Definition identitygridentity.hh:167
│ │ │ │ -
IdentityGridEntity(const IdentityGridEntity &original)
Definition identitygridentity.hh:105
│ │ │ │ -
IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
Definition identitygridentity.hh:99
│ │ │ │ -
bool hasFather() const
returns true if father entity exists
Definition identitygridentity.hh:143
│ │ │ │ -
GridImp::template Codim< codim >::Geometry Geometry
Definition identitygridentity.hh:85
│ │ │ │ -
IdentityGridEntity & operator=(const IdentityGridEntity &original)
Definition identitygridentity.hh:116
│ │ │ │ -
int level() const
level of this element
Definition identitygridentity.hh:154
│ │ │ │ -
Definition identitygridintersectioniterator.hh:84
│ │ │ │ -
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ │ -
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition identitygridhierarchiciterator.hh:26
│ │ │ │ -
unsigned int subEntities(unsigned int codim) const
Return the number of subEntities of codimension codim.
Definition identitygridentity.hh:319
│ │ │ │ -
IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
Definition identitygridentity.hh:243
│ │ │ │ -
bool isLeaf() const
returns true if Entity has NO children
Definition identitygridentity.hh:367
│ │ │ │ -
IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
Definition identitygridentity.hh:398
│ │ │ │ -
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition identitygridentity.hh:218
│ │ │ │ -
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition identitygridentity.hh:230
│ │ │ │ -
EntitySeed seed() const
Create EntitySeed.
Definition identitygridentity.hh:292
│ │ │ │ -
IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const
First level intersection.
Definition identitygridentity.hh:335
│ │ │ │ -
IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
Definition identitygridentity.hh:238
│ │ │ │ -
int level() const
Level of this element.
Definition identitygridentity.hh:298
│ │ │ │ -
IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition identitygridentity.hh:351
│ │ │ │ -
HostGridEntity hostEntity_
Definition identitygridentity.hh:435
│ │ │ │ -
IdentityGridEntity & operator=(const IdentityGridEntity &original)
Definition identitygridentity.hh:260
│ │ │ │ -
Geometry geometry() const
Geometry of this entity.
Definition identitygridentity.hh:311
│ │ │ │ -
IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const
Reference to one past the last neighbor.
Definition identitygridentity.hh:343
│ │ │ │ -
IdentityGridEntity(const IdentityGridEntity &original)
Definition identitygridentity.hh:249
│ │ │ │ -
IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const
Returns iterator to one past the last son.
Definition identitygridentity.hh:405
│ │ │ │ -
IdentityGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition identitygridentity.hh:359
│ │ │ │ -
bool wasRefined() const
Definition identitygridentity.hh:412
│ │ │ │ -
IdentityGridEntity & operator=(IdentityGridEntity &&original)
Definition identitygridentity.hh:271
│ │ │ │ -
bool hasFather() const
returns true if father entity exists
Definition identitygridentity.hh:287
│ │ │ │ -
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity HostGridEntity
Definition identitygridentity.hh:214
│ │ │ │ -
GridImp::template Codim< 0 >::Entity father() const
Definition identitygridentity.hh:374
│ │ │ │ -
bool mightBeCoarsened() const
Definition identitygridentity.hh:424
│ │ │ │ -
LocalGeometry geometryInFather() const
Location of this element relative to the reference element element of the father. This is sufficient ...
Definition identitygridentity.hh:388
│ │ │ │ -
const GridImp * identityGrid_
Definition identitygridentity.hh:436
│ │ │ │ -
GridImp::template Codim< cc >::Entity subEntity(int i) const
Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
Definition identitygridentity.hh:329
│ │ │ │ -
IdentityGridEntity(IdentityGridEntity &&original)
Definition identitygridentity.hh:254
│ │ │ │ -
GridImp::template Codim< 0 >::Geometry Geometry
Definition identitygridentity.hh:216
│ │ │ │ -
bool equals(const IdentityGridEntity &other) const
Definition identitygridentity.hh:281
│ │ │ │ -
PartitionType partitionType() const
The partition type for parallel computing.
Definition identitygridentity.hh:305
│ │ │ │ -
Definition identitygridindexsets.hh:26
│ │ │ │ -
Definition identitygridindexsets.hh:103
│ │ │ │ -
Definition identitygridindexsets.hh:199
│ │ │ │ -
Definition identitygridindexsets.hh:251
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
Iterator over all entities of a given codimension and level of a grid.
Definition identitygridleveliterator.hh:21
│ │ │ │ +
void increment()
prefix increment
Definition identitygridleveliterator.hh:50
│ │ │ │ +
GridImp::template Codim< codim >::Entity Entity
Definition identitygridleveliterator.hh:29
│ │ │ │ +
IdentityGridLevelIterator(const GridImp *identityGrid, int level)
Constructor.
Definition identitygridleveliterator.hh:32
│ │ │ │ +
IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool endDummy)
Constructor which create the end iterator.
Definition identitygridleveliterator.hh:43
│ │ │ │ +
static constexpr int codimension
Definition identitygridleveliterator.hh:27
│ │ │ │ +
bool equals(const IdentityGridLevelIterator &i) const
equality
Definition identitygridleveliterator.hh:60
│ │ │ │ +
Entity dereference() const
dereferencing
Definition identitygridleveliterator.hh:55
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,620 +1,112 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridentity.hh │ │ │ │ │ +identitygridleveliterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRIDENTITY_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRIDENTITY_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -13 │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +9 │ │ │ │ │ 14namespace _D_u_n_e { │ │ │ │ │ 15 │ │ │ │ │ -16 │ │ │ │ │ -17 // Forward declarations │ │ │ │ │ -18 │ │ │ │ │ -19 template │ │ │ │ │ -20 class IdentityGridEntity; │ │ │ │ │ -21 │ │ │ │ │ -22 template │ │ │ │ │ -23 class IdentityGridLevelIterator; │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +21 { │ │ │ │ │ +22 │ │ │ │ │ +23 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ │ +template Partition::LevelIterator HostGridLevelIterator; │ │ │ │ │ 24 │ │ │ │ │ -25 template │ │ │ │ │ -26 class IdentityGridLevelIntersectionIterator; │ │ │ │ │ -27 │ │ │ │ │ -28 template │ │ │ │ │ -29 class IdentityGridLeafIntersectionIterator; │ │ │ │ │ +25 public: │ │ │ │ │ +26 │ │ │ │ │ +_2_7 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +28 │ │ │ │ │ +_2_9 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ 30 │ │ │ │ │ -31 template │ │ │ │ │ -32 class IdentityGridHierarchicIterator; │ │ │ │ │ -33 │ │ │ │ │ -34 │ │ │ │ │ -35 // External forward declarations │ │ │ │ │ -36 template< class Grid > │ │ │ │ │ -37 struct HostGridAccess; │ │ │ │ │ -38 │ │ │ │ │ -39 │ │ │ │ │ -40 //********************************************************************** │ │ │ │ │ -41 // │ │ │ │ │ -42 // --IdentityGridEntity │ │ │ │ │ -43 // --Entity │ │ │ │ │ -44 // │ │ │ │ │ -52 template │ │ │ │ │ -_5_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y : │ │ │ │ │ -54 public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -55 { │ │ │ │ │ -56 │ │ │ │ │ -57 template │ │ │ │ │ -_5_8 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t; │ │ │ │ │ -59 │ │ │ │ │ -60 template │ │ │ │ │ -_6_1 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t; │ │ │ │ │ -62 │ │ │ │ │ -63 template │ │ │ │ │ -_6_4 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t; │ │ │ │ │ -65 │ │ │ │ │ -66 template │ │ │ │ │ -_6_7 friend class _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ -68 │ │ │ │ │ -69 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e >; │ │ │ │ │ +_3_2 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r(const GridImp* identityGrid, int level) │ │ │ │ │ +33 : identityGrid_(identityGrid), │ │ │ │ │ +34 hostLevelIterator_(identityGrid->hostgrid_->_l_e_v_e_l_G_r_i_d_V_i_e_w(level).template │ │ │ │ │ +begin()) │ │ │ │ │ +35 {} │ │ │ │ │ +36 │ │ │ │ │ +37 │ │ │ │ │ +_4_3 explicit _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r(const GridImp* identityGrid, int level, [ │ │ │ │ │ +[maybe_unused]] bool endDummy) │ │ │ │ │ +44 : identityGrid_(identityGrid), │ │ │ │ │ +45 hostLevelIterator_(identityGrid->hostgrid_->_l_e_v_e_l_G_r_i_d_V_i_e_w(level).template │ │ │ │ │ +end()) │ │ │ │ │ +46 {} │ │ │ │ │ +47 │ │ │ │ │ +48 │ │ │ │ │ +_5_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +51 ++hostLevelIterator_; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_5 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +56 return _E_n_t_i_t_y{{identityGrid_,*hostLevelIterator_}}; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_0 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r& i) const { │ │ │ │ │ +61 return hostLevelIterator_ == i.hostLevelIterator_; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +64 private: │ │ │ │ │ +65 const GridImp* identityGrid_; │ │ │ │ │ +66 │ │ │ │ │ +67 HostGridLevelIterator hostLevelIterator_; │ │ │ │ │ +68 }; │ │ │ │ │ +69 │ │ │ │ │ 70 │ │ │ │ │ -71 │ │ │ │ │ -72 private: │ │ │ │ │ -73 │ │ │ │ │ -74 typedef typename GridImp::ctype ctype; │ │ │ │ │ -75 │ │ │ │ │ -76 // The codimension of this entity wrt the host grid │ │ │ │ │ -77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - │ │ │ │ │ -GridImp::dimension + codim; │ │ │ │ │ -78 │ │ │ │ │ -79 // equivalent entity in the host grid │ │ │ │ │ -80 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ -Codim::Entity HostGridEntity; │ │ │ │ │ -81 │ │ │ │ │ -82 │ │ │ │ │ -83 public: │ │ │ │ │ -84 │ │ │ │ │ -_8_5 typedef typename GridImp::template Codim_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -86 │ │ │ │ │ -_8_8 typedef typename GridImp::template Codim_:_:_E_n_t_i_t_y_S_e_e_d _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ -89 │ │ │ │ │ -_9_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y() │ │ │ │ │ -91 : identityGrid_(nullptr) │ │ │ │ │ -92 {} │ │ │ │ │ -93 │ │ │ │ │ -_9_4 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, const HostGridEntity& │ │ │ │ │ -hostEntity) │ │ │ │ │ -95 : _h_o_s_t_E_n_t_i_t_y__(hostEntity) │ │ │ │ │ -96 , identityGrid_(identityGrid) │ │ │ │ │ -97 {} │ │ │ │ │ -98 │ │ │ │ │ -_9_9 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, HostGridEntity&& hostEntity) │ │ │ │ │ -100 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(hostEntity)) │ │ │ │ │ -101 , identityGrid_(identityGrid) │ │ │ │ │ -102 {} │ │ │ │ │ -103 │ │ │ │ │ -_1_0_5 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ -106 : _h_o_s_t_E_n_t_i_t_y__(original._h_o_s_t_E_n_t_i_t_y__) │ │ │ │ │ -107 , identityGrid_(original.identityGrid_) │ │ │ │ │ -108 {} │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ -111 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(original._h_o_s_t_E_n_t_i_t_y__)) │ │ │ │ │ -112 , identityGrid_(original.identityGrid_) │ │ │ │ │ -113 {} │ │ │ │ │ -114 │ │ │ │ │ -_1_1_6 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ -117 { │ │ │ │ │ -118 if (this != &original) │ │ │ │ │ -119 { │ │ │ │ │ -120 identityGrid_ = original.identityGrid_; │ │ │ │ │ -121 _h_o_s_t_E_n_t_i_t_y__ = original._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ -122 } │ │ │ │ │ -123 return *this; │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -_1_2_7 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ -128 { │ │ │ │ │ -129 if (this != &original) │ │ │ │ │ -130 { │ │ │ │ │ -131 identityGrid_ = original.identityGrid_; │ │ │ │ │ -132 _h_o_s_t_E_n_t_i_t_y__ = std::move(original.hostEntity_); │ │ │ │ │ -133 } │ │ │ │ │ -134 return *this; │ │ │ │ │ -135 } │ │ │ │ │ -136 │ │ │ │ │ -_1_3_7 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& other) const │ │ │ │ │ -138 { │ │ │ │ │ -139 return _h_o_s_t_E_n_t_i_t_y__ == other._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ -140 } │ │ │ │ │ -141 │ │ │ │ │ -_1_4_3 bool _h_a_s_F_a_t_h_e_r () const { │ │ │ │ │ -144 return _h_o_s_t_E_n_t_i_t_y__.hasFather(); │ │ │ │ │ -145 } │ │ │ │ │ -146 │ │ │ │ │ -_1_4_8 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const │ │ │ │ │ -149 { │ │ │ │ │ -150 return _E_n_t_i_t_y_S_e_e_d(_h_o_s_t_E_n_t_i_t_y__); │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -_1_5_4 int _l_e_v_e_l () const { │ │ │ │ │ -155 return _h_o_s_t_E_n_t_i_t_y__.level(); │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 │ │ │ │ │ -_1_6_1 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const { │ │ │ │ │ -162 return _h_o_s_t_E_n_t_i_t_y__.partitionType(); │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -_1_6_7 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ -168 { │ │ │ │ │ -169 return _h_o_s_t_E_n_t_i_t_y__.subEntities(cc); │ │ │ │ │ -170 } │ │ │ │ │ -171 │ │ │ │ │ -_1_7_3 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ -174 { │ │ │ │ │ -175 return _G_e_o_m_e_t_r_y( _h_o_s_t_E_n_t_i_t_y__.geometry() ); │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -178 │ │ │ │ │ -_1_7_9 HostGridEntity _h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ -180 │ │ │ │ │ -181 private: │ │ │ │ │ -182 │ │ │ │ │ -_1_8_3 const GridImp* identityGrid_; │ │ │ │ │ -184 │ │ │ │ │ -185 }; │ │ │ │ │ -186 │ │ │ │ │ -187 │ │ │ │ │ -188 │ │ │ │ │ -189 │ │ │ │ │ -190 //*********************** │ │ │ │ │ -191 // │ │ │ │ │ -192 // --IdentityGridEntity │ │ │ │ │ -193 // │ │ │ │ │ -194 //*********************** │ │ │ │ │ -202 template │ │ │ │ │ -_2_0_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y<0,dim,GridImp> : │ │ │ │ │ -204 public _E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n<0,dim,GridImp, IdentityGridEntity> │ │ │ │ │ -205 { │ │ │ │ │ -206 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e │ │ │ │ │ ->; │ │ │ │ │ -207 │ │ │ │ │ -208 public: │ │ │ │ │ -209 │ │ │ │ │ -210 // The codimension of this entitypointer wrt the host grid │ │ │ │ │ -_2_1_1 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - │ │ │ │ │ -GridImp::dimension; │ │ │ │ │ -212 │ │ │ │ │ -213 // equivalent entity in the host grid │ │ │ │ │ -_2_1_4 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ -Codim::Entity _H_o_s_t_G_r_i_d_E_n_t_i_t_y; │ │ │ │ │ -215 │ │ │ │ │ -_2_1_6 typedef typename GridImp::template Codim<0>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -217 │ │ │ │ │ -_2_1_8 typedef typename GridImp::template Codim<0>::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -219 │ │ │ │ │ -_2_2_1 typedef _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -222 │ │ │ │ │ -_2_2_4 typedef _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -225 │ │ │ │ │ -_2_2_7 typedef _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ -228 │ │ │ │ │ -_2_3_0 typedef typename GridImp::template Codim<0>_:_:_E_n_t_i_t_y_S_e_e_d _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ -231 │ │ │ │ │ -232 │ │ │ │ │ -233 │ │ │ │ │ -_2_3_4 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y() │ │ │ │ │ -235 : identityGrid_(nullptr) │ │ │ │ │ -236 {} │ │ │ │ │ -237 │ │ │ │ │ -_2_3_8 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, const _H_o_s_t_G_r_i_d_E_n_t_i_t_y& │ │ │ │ │ -hostEntity) │ │ │ │ │ -239 : _h_o_s_t_E_n_t_i_t_y__(hostEntity) │ │ │ │ │ -240 , identityGrid_(identityGrid) │ │ │ │ │ -241 {} │ │ │ │ │ -242 │ │ │ │ │ -_2_4_3 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const GridImp* identityGrid, _H_o_s_t_G_r_i_d_E_n_t_i_t_y&& │ │ │ │ │ -hostEntity) │ │ │ │ │ -244 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(hostEntity)) │ │ │ │ │ -245 , identityGrid_(identityGrid) │ │ │ │ │ -246 {} │ │ │ │ │ -247 │ │ │ │ │ -_2_4_9 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ -250 : _h_o_s_t_E_n_t_i_t_y__(original._h_o_s_t_E_n_t_i_t_y__) │ │ │ │ │ -251 , identityGrid_(original.identityGrid_) │ │ │ │ │ -252 {} │ │ │ │ │ -253 │ │ │ │ │ -_2_5_4 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ -255 : _h_o_s_t_E_n_t_i_t_y__(_s_t_d::move(original._h_o_s_t_E_n_t_i_t_y__)) │ │ │ │ │ -256 , identityGrid_(original.identityGrid_) │ │ │ │ │ -257 {} │ │ │ │ │ -258 │ │ │ │ │ -_2_6_0 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& original) │ │ │ │ │ -261 { │ │ │ │ │ -262 if (this != &original) │ │ │ │ │ -263 { │ │ │ │ │ -264 identityGrid_ = original.identityGrid_; │ │ │ │ │ -265 _h_o_s_t_E_n_t_i_t_y__ = original._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ -266 } │ │ │ │ │ -267 return *this; │ │ │ │ │ -268 } │ │ │ │ │ -269 │ │ │ │ │ -_2_7_1 _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& _o_p_e_r_a_t_o_r_=(_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y&& original) │ │ │ │ │ -272 { │ │ │ │ │ -273 if (this != &original) │ │ │ │ │ -274 { │ │ │ │ │ -275 identityGrid_ = original.identityGrid_; │ │ │ │ │ -276 _h_o_s_t_E_n_t_i_t_y__ = std::move(original.hostEntity_); │ │ │ │ │ -277 } │ │ │ │ │ -278 return *this; │ │ │ │ │ -279 } │ │ │ │ │ -280 │ │ │ │ │ -_2_8_1 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y& other) const │ │ │ │ │ -282 { │ │ │ │ │ -283 return _h_o_s_t_E_n_t_i_t_y__ == other._h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ -284 } │ │ │ │ │ -285 │ │ │ │ │ -_2_8_7 bool _h_a_s_F_a_t_h_e_r () const { │ │ │ │ │ -288 return _h_o_s_t_E_n_t_i_t_y__.hasFather(); │ │ │ │ │ -289 } │ │ │ │ │ -290 │ │ │ │ │ -_2_9_2 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const │ │ │ │ │ -293 { │ │ │ │ │ -294 return _E_n_t_i_t_y_S_e_e_d(_h_o_s_t_E_n_t_i_t_y__); │ │ │ │ │ -295 } │ │ │ │ │ -296 │ │ │ │ │ -_2_9_8 int _l_e_v_e_l () const │ │ │ │ │ -299 { │ │ │ │ │ -300 return _h_o_s_t_E_n_t_i_t_y__.level(); │ │ │ │ │ -301 } │ │ │ │ │ -302 │ │ │ │ │ -303 │ │ │ │ │ -_3_0_5 _P_a_r_t_i_t_i_o_n_T_y_p_e _p_a_r_t_i_t_i_o_n_T_y_p_e () const { │ │ │ │ │ -306 return _h_o_s_t_E_n_t_i_t_y__.partitionType(); │ │ │ │ │ -307 } │ │ │ │ │ -308 │ │ │ │ │ -309 │ │ │ │ │ -_3_1_1 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ -312 { │ │ │ │ │ -313 return _G_e_o_m_e_t_r_y( _h_o_s_t_E_n_t_i_t_y__.geometry() ); │ │ │ │ │ -314 } │ │ │ │ │ -315 │ │ │ │ │ -316 │ │ │ │ │ -_3_1_9 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int codim) const │ │ │ │ │ -320 { │ │ │ │ │ -321 return _h_o_s_t_E_n_t_i_t_y__.subEntities(codim); │ │ │ │ │ -322 } │ │ │ │ │ -323 │ │ │ │ │ -324 │ │ │ │ │ -328 template │ │ │ │ │ -_3_2_9 typename GridImp::template Codim::Entity _s_u_b_E_n_t_i_t_y (int i) const { │ │ │ │ │ -330 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_c_c_,_d_i_m_,_G_r_i_d_I_m_p_>(identityGrid_, │ │ │ │ │ -_h_o_s_t_E_n_t_i_t_y__.template subEntity(i)); │ │ │ │ │ -331 } │ │ │ │ │ -332 │ │ │ │ │ -333 │ │ │ │ │ -_3_3_5 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_v_e_l_b_e_g_i_n () const { │ │ │ │ │ -336 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ -337 identityGrid_, │ │ │ │ │ -338 identityGrid_->getHostGrid().levelGridView(_l_e_v_e_l()).ibegin(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ -339 } │ │ │ │ │ -340 │ │ │ │ │ -341 │ │ │ │ │ -_3_4_3 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_v_e_l_e_n_d () const { │ │ │ │ │ -344 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ -345 identityGrid_, │ │ │ │ │ -346 identityGrid_->getHostGrid().levelGridView(_l_e_v_e_l()).iend(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ -347 } │ │ │ │ │ -348 │ │ │ │ │ -349 │ │ │ │ │ -_3_5_1 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_a_f_b_e_g_i_n () const { │ │ │ │ │ -352 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ -353 identityGrid_, │ │ │ │ │ -354 identityGrid_->getHostGrid().leafGridView().ibegin(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ -355 } │ │ │ │ │ -356 │ │ │ │ │ -357 │ │ │ │ │ -_3_5_9 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _i_l_e_a_f_e_n_d () const { │ │ │ │ │ -360 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>( │ │ │ │ │ -361 identityGrid_, │ │ │ │ │ -362 identityGrid_->getHostGrid().leafGridView().iend(_h_o_s_t_E_n_t_i_t_y__)); │ │ │ │ │ -363 } │ │ │ │ │ -364 │ │ │ │ │ -365 │ │ │ │ │ -_3_6_7 bool _i_s_L_e_a_f() const { │ │ │ │ │ -368 return _h_o_s_t_E_n_t_i_t_y__.isLeaf(); │ │ │ │ │ -369 } │ │ │ │ │ -370 │ │ │ │ │ -371 │ │ │ │ │ -_3_7_4 typename GridImp::template Codim<0>::Entity _f_a_t_h_e_r () const { │ │ │ │ │ -375 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y(identityGrid_, _h_o_s_t_E_n_t_i_t_y__.father()); │ │ │ │ │ -376 } │ │ │ │ │ -377 │ │ │ │ │ -378 │ │ │ │ │ -_3_8_8 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r () const │ │ │ │ │ -389 { │ │ │ │ │ -390 return _L_o_c_a_l_G_e_o_m_e_t_r_y( _h_o_s_t_E_n_t_i_t_y__.geometryInFather() ); │ │ │ │ │ -391 } │ │ │ │ │ -392 │ │ │ │ │ -393 │ │ │ │ │ -_3_9_8 _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _h_b_e_g_i_n (int maxLevel) const │ │ │ │ │ -399 { │ │ │ │ │ -400 return _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_c_o_n_s_t_ _G_r_i_d_I_m_p_>(identityGrid_, *this, │ │ │ │ │ -maxLevel); │ │ │ │ │ -401 } │ │ │ │ │ -402 │ │ │ │ │ -403 │ │ │ │ │ -_4_0_5 _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_> _h_e_n_d (int maxLevel) const │ │ │ │ │ -406 { │ │ │ │ │ -407 return _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_c_o_n_s_t_ _G_r_i_d_I_m_p_>(identityGrid_, *this, │ │ │ │ │ -maxLevel, true); │ │ │ │ │ -408 } │ │ │ │ │ -409 │ │ │ │ │ -410 │ │ │ │ │ -_4_1_2 bool _w_a_s_R_e_f_i_n_e_d () const │ │ │ │ │ -413 { │ │ │ │ │ -414 if (identityGrid_->adaptationStep!=GridImp::adaptDone) │ │ │ │ │ -415 return false; │ │ │ │ │ -416 │ │ │ │ │ -417 int _l_e_v_e_l = this->_l_e_v_e_l(); │ │ │ │ │ -418 int index = identityGrid_->levelIndexSet(_l_e_v_e_l).index(*this); │ │ │ │ │ -419 return identityGrid_->refinementMark_[_l_e_v_e_l][index]; │ │ │ │ │ -420 } │ │ │ │ │ -421 │ │ │ │ │ -422 │ │ │ │ │ -_4_2_4 bool _m_i_g_h_t_B_e_C_o_a_r_s_e_n_e_d () const │ │ │ │ │ -425 { │ │ │ │ │ -426 return true; │ │ │ │ │ -427 } │ │ │ │ │ -428 │ │ │ │ │ -429 │ │ │ │ │ -430 // ///////////////////////////////////////// │ │ │ │ │ -431 // Internal stuff │ │ │ │ │ -432 // ///////////////////////////////////////// │ │ │ │ │ -433 │ │ │ │ │ -434 │ │ │ │ │ -_4_3_5 _H_o_s_t_G_r_i_d_E_n_t_i_t_y _h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ -_4_3_6 const GridImp* _i_d_e_n_t_i_t_y_G_r_i_d__; │ │ │ │ │ -437 │ │ │ │ │ -438 private: │ │ │ │ │ -439 │ │ │ │ │ -440 typedef typename GridImp::ctype ctype; │ │ │ │ │ -441 │ │ │ │ │ -442 }; // end of IdentityGridEntity codim = 0 │ │ │ │ │ -443 │ │ │ │ │ -444 │ │ │ │ │ -445} // namespace Dune │ │ │ │ │ -446 │ │ │ │ │ -447 │ │ │ │ │ -448#endif │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType │ │ │ │ │ -Attributes used in the generic overlap model. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ -_s_t_d │ │ │ │ │ -STL namespace. │ │ │ │ │ +71} // namespace Dune │ │ │ │ │ +72 │ │ │ │ │ +73#endif │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< │ │ │ │ │ +dim, dimworld, ct, GridFamily > &grid, int level) │ │ │ │ │ +level grid view for the given grid and level. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:802 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -Default Implementations for EntityImp. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:542 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_,_ _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_ _>_:_: │ │ │ │ │ -_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Return the name of the reference element. The type can be used to access the │ │ │ │ │ -Dune::ReferenceElement. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:576 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ -provides access to host grid objects from GeometryGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -The implementation of entities in a IdentityGrid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity() │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -IdentityGridEntity & operator=(IdentityGridEntity &&original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(IdentityGridEntity &&original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridEntity &other) const │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_h_o_s_t_E_n_t_i_t_y__ │ │ │ │ │ -HostGridEntity hostEntity_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -GridImp::template Codim< codim >::EntitySeed EntitySeed │ │ │ │ │ -The type of the EntitySeed interface class. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_s_e_e_d │ │ │ │ │ -EntitySeed seed() const │ │ │ │ │ -Create EntitySeed. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity │ │ │ │ │ -&hostEntity) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -geometry of this entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:173 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType partitionType() const │ │ │ │ │ -The partition type for parallel computing. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:161 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -unsigned int subEntities(unsigned int cc) const │ │ │ │ │ -Return the number of subEntities of codimension codim. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(const IdentityGridEntity &original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_h_a_s_F_a_t_h_e_r │ │ │ │ │ -bool hasFather() const │ │ │ │ │ -returns true if father entity exists │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:143 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< codim >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -IdentityGridEntity & operator=(const IdentityGridEntity &original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -level of this element │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ │ -allow to visit all nei... │ │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over the descendants of an entity.Mesh entities of codimension 0 │ │ │ │ │ -("elements") allow to visit... │ │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -unsigned int subEntities(unsigned int codim) const │ │ │ │ │ -Return the number of subEntities of codimension codim. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_s_L_e_a_f │ │ │ │ │ -bool isLeaf() const │ │ │ │ │ -returns true if Entity has NO children │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:367 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_b_e_g_i_n │ │ │ │ │ -IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const │ │ │ │ │ -Inter-level access to son elements on higher levels<=maxlevel. This is provided │ │ │ │ │ -for sparsely stored n... │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:398 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:218 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y_S_e_e_d │ │ │ │ │ -GridImp::template Codim< 0 >::EntitySeed EntitySeed │ │ │ │ │ -The type of the EntitySeed interface class. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:230 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_e_e_d │ │ │ │ │ -EntitySeed seed() const │ │ │ │ │ -Create EntitySeed. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_v_e_l_b_e_g_i_n │ │ │ │ │ -IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const │ │ │ │ │ -First level intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:335 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity │ │ │ │ │ -&hostEntity) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -Level of this element. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:298 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_a_f_b_e_g_i_n │ │ │ │ │ -IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const │ │ │ │ │ -First leaf intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:351 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_o_s_t_E_n_t_i_t_y__ │ │ │ │ │ -HostGridEntity hostEntity_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:435 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -IdentityGridEntity & operator=(const IdentityGridEntity &original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:260 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -Geometry of this entity. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:311 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_v_e_l_e_n_d │ │ │ │ │ -IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const │ │ │ │ │ -Reference to one past the last neighbor. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:343 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(const IdentityGridEntity &original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_e_n_d │ │ │ │ │ -IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const │ │ │ │ │ -Returns iterator to one past the last son. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:405 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_l_e_a_f_e_n_d │ │ │ │ │ -IdentityGridLeafIntersectionIterator< GridImp > ileafend() const │ │ │ │ │ -Reference to one past the last leaf intersection. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:359 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_w_a_s_R_e_f_i_n_e_d │ │ │ │ │ -bool wasRefined() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:412 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -IdentityGridEntity & operator=(IdentityGridEntity &&original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_h_a_s_F_a_t_h_e_r │ │ │ │ │ -bool hasFather() const │ │ │ │ │ -returns true if father entity exists │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:287 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_H_o_s_t_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity │ │ │ │ │ -HostGridEntity │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:214 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_f_a_t_h_e_r │ │ │ │ │ -GridImp::template Codim< 0 >::Entity father() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:374 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_m_i_g_h_t_B_e_C_o_a_r_s_e_n_e_d │ │ │ │ │ -bool mightBeCoarsened() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:424 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ -LocalGeometry geometryInFather() const │ │ │ │ │ -Location of this element relative to the reference element element of the │ │ │ │ │ -father. This is sufficient ... │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:388 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_i_d_e_n_t_i_t_y_G_r_i_d__ │ │ │ │ │ -const GridImp * identityGrid_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:436 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< cc >::Entity subEntity(int i) const │ │ │ │ │ -Provide access to sub entity i of given codimension. Entities are numbered 0 │ │ │ │ │ -... subEntities(cc)-1. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:329 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ -IdentityGridEntity(IdentityGridEntity &&original) │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 0 >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:216 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const IdentityGridEntity &other) const │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:281 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType partitionType() const │ │ │ │ │ -The partition type for parallel computing. │ │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:305 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:251 │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over all entities of a given codimension and level of a grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +prefix increment │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLevelIterator(const GridImp *identityGrid, int level) │ │ │ │ │ +Constructor. │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool │ │ │ │ │ +endDummy) │ │ │ │ │ +Constructor which create the end iterator. │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridLevelIterator &i) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:55 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridindexsets.hh File Reference │ │ │ │ +dune-grid: identitygridintersectioniterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,44 +72,42 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridindexsets.hh File Reference
│ │ │ │ +
identitygridintersectioniterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The index and id sets for the IdentityGrid class. │ │ │ │ +

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes. │ │ │ │ More...

│ │ │ │ -
#include <dune/grid/common/indexidset.hh>
│ │ │ │ -#include <vector>
│ │ │ │ +
#include "identitygridintersections.hh"
│ │ │ │ +#include "identitygridentity.hh"
│ │ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridLevelIndexSet< GridImp >
class  Dune::IdentityGridLeafIntersectionIterator< GridImp >
 Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 These neighbors are accessed via a IntersectionIterator. This allows the implement non-matching meshes. The number of neighbors may be different from the number of an element! More...
 
class  Dune::IdentityGridLeafIndexSet< GridImp >
 
class  Dune::IdentityGridGlobalIdSet< GridImp >
 
class  Dune::IdentityGridLocalIdSet< GridImp >
class  Dune::IdentityGridLevelIntersectionIterator< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The index and id sets for the IdentityGrid class.

│ │ │ │ +

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,34 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridindexsets.hh File Reference │ │ │ │ │ -The index and id sets for the IdentityGrid class. _M_o_r_e_._._. │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ -#include │ │ │ │ │ +identitygridintersectioniterator.hh File Reference │ │ │ │ │ +The IdentityGridLeafIntersectionIterator and │ │ │ │ │ +IdentityGridLevelIntersectionIterator classes. _M_o_r_e_._._. │ │ │ │ │ +#include "_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h" │ │ │ │ │ +#include "_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_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_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ + Iterator over all element neighborsMesh entities of codimension 0 │ │ │ │ │ + ("elements") allow to visit all neighbors, where a neighbor is an │ │ │ │ │ +  entity of codimension 0 which has a common entity of codimension 1 │ │ │ │ │ + These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. This allows │ │ │ │ │ + the implement non-matching meshes. The number of neighbors may be │ │ │ │ │ + different from the number of an element! _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The index and id sets for the IdentityGrid class. │ │ │ │ │ +The IdentityGridLeafIntersectionIterator and │ │ │ │ │ +IdentityGridLevelIntersectionIterator classes. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridindexsets.hh Source File │ │ │ │ +dune-grid: identitygridintersectioniterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,382 +74,177 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridindexsets.hh
│ │ │ │ +
identitygridintersectioniterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14#include <vector>
│ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ -
17
│ │ │ │ -
19 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 public IndexSet<GridImp,
│ │ │ │ -
22 IdentityGridLevelIndexSet<GridImp>,
│ │ │ │ -
23 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::IndexType,
│ │ │ │ -
24 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::Types
│ │ │ │ -
25 >
│ │ │ │ -
26 {
│ │ │ │ -
27 public:
│ │ │ │ -
28
│ │ │ │ -
29 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ │ -
31
│ │ │ │ -
32 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
33
│ │ │ │ -
35 template<int codim>
│ │ │ │ -
│ │ │ │ -
36 int index (const typename GridImp::Traits::template Codim<codim>::Entity& e) const
│ │ │ │ -
37 {
│ │ │ │ -
38 return grid_->hostgrid_->levelIndexSet(level_).template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │ +
27 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
32
│ │ │ │ +
33 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
34
│ │ │ │ +
35 // The type used to store coordinates
│ │ │ │ +
36 typedef typename GridImp::ctype ctype;
│ │ │ │ +
37
│ │ │ │ +
38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
│ │ │ │ +
39
│ │ │ │ +
40 public:
│ │ │ │
41
│ │ │ │ -
43 template<int cc>
│ │ │ │ + │ │ │ │ +
43
│ │ │ │
│ │ │ │ -
44 int subIndex (const typename GridImp::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ │ -
45 {
│ │ │ │ -
46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template getHostEntity<cc>(e), i, codim);
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
51 std::size_t size (int codim) const {
│ │ │ │ -
52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
57 std::size_t size (GeometryType type) const
│ │ │ │ -
58 {
│ │ │ │ -
59 return grid_->hostgrid_->levelIndexSet(level_).size(type);
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ -
64 const std::vector<GeometryType>& geomTypes (int codim) const
│ │ │ │ -
65 {
│ │ │ │ -
66 return grid_->hostgrid_->levelIndexSet(level_).geomTypes(codim);
│ │ │ │ + │ │ │ │ +
45 {}
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
│ │ │ │ +
47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,
│ │ │ │ +
48 const HostLeafIntersectionIterator& hostIterator)
│ │ │ │ +
49 : identityGrid_(identityGrid)
│ │ │ │ +
50 , hostIterator_(hostIterator)
│ │ │ │ +
51 {}
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 return hostIterator_ == other.hostIterator_;
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 void increment() {
│ │ │ │ +
61 ++hostIterator_;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │
67 }
│ │ │ │
│ │ │ │
68
│ │ │ │ -
│ │ │ │ -
70 Types types (int codim) const
│ │ │ │ -
71 {
│ │ │ │ -
72 return grid_->hostgrid_->levelIndexSet(level_).types(codim);
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
76 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
77 bool contains (const EntityType& e) const
│ │ │ │ -
78 {
│ │ │ │ -
79 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
83 void update(const GridImp& grid, int level)
│ │ │ │ -
84 {
│ │ │ │ -
85 grid_ = &grid;
│ │ │ │ -
86 level_ = level;
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ +
69 private:
│ │ │ │ +
70 //**********************************************************
│ │ │ │ +
71 // private data
│ │ │ │ +
72 //**********************************************************
│ │ │ │ +
73
│ │ │ │ +
74 const GridImp* identityGrid_ = nullptr;
│ │ │ │ +
75 HostLeafIntersectionIterator hostIterator_ = {};
│ │ │ │ +
76 };
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
78
│ │ │ │ +
79
│ │ │ │ +
80
│ │ │ │ +
82 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
84 {
│ │ │ │ +
85 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
86
│ │ │ │ +
87 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │
88
│ │ │ │ -
89
│ │ │ │ -
90 GridImp* grid_;
│ │ │ │ +
89 // The type used to store coordinates
│ │ │ │ +
90 typedef typename GridImp::ctype ctype;
│ │ │ │
91
│ │ │ │ -
92 int level_;
│ │ │ │ -
93 };
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ +
92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
│ │ │ │ +
93
│ │ │ │ +
94 public:
│ │ │ │
95
│ │ │ │ -
96 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
98 public IndexSet<GridImp,
│ │ │ │ -
99 IdentityGridLeafIndexSet<GridImp>,
│ │ │ │ -
100 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::IndexType,
│ │ │ │ -
101 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::Types
│ │ │ │ -
102 >
│ │ │ │ -
103 {
│ │ │ │ -
104 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
105
│ │ │ │ -
106 public:
│ │ │ │ -
107
│ │ │ │ -
108 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ │ -
109
│ │ │ │ -
110 /*
│ │ │ │ -
111 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
112 * because the const class is not instantiated yet.
│ │ │ │ -
113 */
│ │ │ │ -
114 constexpr static int dim = std::remove_const<GridImp>::type::dimension;
│ │ │ │ -
115
│ │ │ │ -
116
│ │ │ │ -
│ │ │ │ -
118 IdentityGridLeafIndexSet (const GridImp& grid)
│ │ │ │ -
119 : grid_(&grid)
│ │ │ │ -
120 {}
│ │ │ │ + │ │ │ │ +
97
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
99 {}
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,
│ │ │ │ +
102 const HostLevelIntersectionIterator& hostIterator)
│ │ │ │ +
103 : identityGrid_(identityGrid)
│ │ │ │ +
104 , hostIterator_(hostIterator)
│ │ │ │ +
105 {}
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
109 return hostIterator_ == other.hostIterator_;
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ +
114 void increment() {
│ │ │ │ +
115 ++hostIterator_;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
120 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │ +
121 }
│ │ │ │
│ │ │ │ -
121
│ │ │ │
122
│ │ │ │ -
124 /*
│ │ │ │ -
125 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ -
126 because the const class is not instantiated yet.
│ │ │ │ -
127 */
│ │ │ │ -
128 template<int codim>
│ │ │ │ -
│ │ │ │ -
129 int index (const typename std::remove_const<GridImp>::type::template Codim<codim>::Entity& e) const
│ │ │ │ -
130 {
│ │ │ │ -
131 return grid_->hostgrid_->leafIndexSet().template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ +
123 private:
│ │ │ │ +
124
│ │ │ │ +
125
│ │ │ │ +
126 const GridImp* identityGrid_ = nullptr;
│ │ │ │ +
127 HostLevelIntersectionIterator hostIterator_ = {};
│ │ │ │ +
128
│ │ │ │ +
129 };
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
131
│ │ │ │ +
132} // namespace Dune
│ │ │ │
133
│ │ │ │ -
134
│ │ │ │ -
136 /*
│ │ │ │ -
137 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ -
138 because the const class is not instantiated yet.
│ │ │ │ -
139 */
│ │ │ │ -
140 template<int cc>
│ │ │ │ -
│ │ │ │ -
141 int subIndex (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ │ -
142 {
│ │ │ │ -
143 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template getHostEntity<cc>(e),i, codim);
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
148 std::size_t size (GeometryType type) const
│ │ │ │ -
149 {
│ │ │ │ -
150 return grid_->hostgrid_->leafIndexSet().size(type);
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
153
│ │ │ │ -
│ │ │ │ -
155 std::size_t size (int codim) const
│ │ │ │ -
156 {
│ │ │ │ -
157 return grid_->hostgrid_->leafIndexSet().size(codim);
│ │ │ │ -
158 }
│ │ │ │ -
│ │ │ │ -
159
│ │ │ │ -
160
│ │ │ │ -
│ │ │ │ -
162 const std::vector<GeometryType>& geomTypes (int codim) const
│ │ │ │ -
163 {
│ │ │ │ -
164 return grid_->hostgrid_->leafIndexSet().geomTypes(codim);
│ │ │ │ -
165 }
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
│ │ │ │ -
168 Types types (int codim) const
│ │ │ │ -
169 {
│ │ │ │ -
170 return grid_->hostgrid_->leafIndexSet().types(codim);
│ │ │ │ -
171 }
│ │ │ │ -
│ │ │ │ -
172
│ │ │ │ -
174 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
175 bool contains (const EntityType& e) const
│ │ │ │ -
176 {
│ │ │ │ -
177 return grid_->hostgrid_->leafIndexSet().contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ -
178 }
│ │ │ │ -
│ │ │ │ -
179
│ │ │ │ -
180
│ │ │ │ -
181
│ │ │ │ -
│ │ │ │ -
183 void update(const GridImp& grid)
│ │ │ │ -
184 {
│ │ │ │ -
185 grid_ = &grid;
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
188
│ │ │ │ -
189 GridImp* grid_;
│ │ │ │ -
190 };
│ │ │ │ -
│ │ │ │ -
191
│ │ │ │ -
192
│ │ │ │ -
193
│ │ │ │ -
194
│ │ │ │ -
195 template <class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
197 public IdSet<GridImp,IdentityGridGlobalIdSet<GridImp>,
│ │ │ │ -
198 typename std::remove_const<GridImp>::type::HostGridType::Traits::GlobalIdSet::IdType>
│ │ │ │ -
199 {
│ │ │ │ -
200
│ │ │ │ -
201 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
202
│ │ │ │ -
203
│ │ │ │ -
204 public:
│ │ │ │ -
206 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ -
207
│ │ │ │ -
209 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;
│ │ │ │ -
210
│ │ │ │ -
211
│ │ │ │ -
213 /*
│ │ │ │ -
214 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
215 because the const class is not instantiated yet.
│ │ │ │ -
216 */
│ │ │ │ -
217 template<int cd>
│ │ │ │ -
│ │ │ │ -
218 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ -
219 {
│ │ │ │ -
220 // Return id of the host entity
│ │ │ │ -
221 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);
│ │ │ │ -
222 }
│ │ │ │ -
│ │ │ │ -
223
│ │ │ │ -
224
│ │ │ │ -
226 /*
│ │ │ │ -
227 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
228 because the const class is not instantiated yet.
│ │ │ │ -
229 */
│ │ │ │ -
│ │ │ │ -
230 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ -
231 {
│ │ │ │ -
232 // Return sub id of the host entity
│ │ │ │ -
233 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, codim);
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ -
235
│ │ │ │ -
236
│ │ │ │ -
238 void update() {}
│ │ │ │ -
239
│ │ │ │ -
240
│ │ │ │ -
241 const GridImp* grid_;
│ │ │ │ -
242 };
│ │ │ │ -
│ │ │ │ -
243
│ │ │ │ -
244
│ │ │ │ -
245
│ │ │ │ -
246
│ │ │ │ -
247 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
249 public IdSet<GridImp,IdentityGridLocalIdSet<GridImp>,
│ │ │ │ -
250 typename std::remove_const<GridImp>::type::HostGridType::Traits::LocalIdSet::IdType>
│ │ │ │ -
251 {
│ │ │ │ -
252 private:
│ │ │ │ -
253
│ │ │ │ -
254 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
255
│ │ │ │ -
256
│ │ │ │ -
257 public:
│ │ │ │ -
259 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;
│ │ │ │ -
260
│ │ │ │ -
261
│ │ │ │ -
263 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ -
264
│ │ │ │ -
265
│ │ │ │ -
267 /*
│ │ │ │ -
268 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
269 because the const class is not instantiated yet.
│ │ │ │ -
270 */
│ │ │ │ -
271 template<int cd>
│ │ │ │ -
│ │ │ │ -
272 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ -
273 {
│ │ │ │ -
274 // Return id of the host entity
│ │ │ │ -
275 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);
│ │ │ │ -
276 }
│ │ │ │ -
│ │ │ │ -
277
│ │ │ │ -
278
│ │ │ │ -
280 /*
│ │ │ │ -
281 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
282 * because the const class is not instantiated yet.
│ │ │ │ -
283 */
│ │ │ │ -
│ │ │ │ -
284 IdType subId (const typename std::remove_const<GridImp>::type::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ -
285 {
│ │ │ │ -
286 // Return sub id of the host entity
│ │ │ │ -
287 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);
│ │ │ │ -
288 }
│ │ │ │ -
│ │ │ │ -
289
│ │ │ │ -
290
│ │ │ │ -
292 void update() {}
│ │ │ │ -
293
│ │ │ │ -
294
│ │ │ │ -
295 const GridImp* grid_;
│ │ │ │ -
296 };
│ │ │ │ -
│ │ │ │ -
297
│ │ │ │ -
298
│ │ │ │ -
299} // namespace Dune
│ │ │ │ -
300
│ │ │ │ -
301
│ │ │ │ -
302#endif
│ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ +
134#endif
│ │ │ │ +
The IdentityGridEntity class.
│ │ │ │ +
The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │ -
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ -
Definition identitygridindexsets.hh:26
│ │ │ │ -
bool contains(const EntityType &e) const
Return true if the given entity is contained in the index set.
Definition identitygridindexsets.hh:77
│ │ │ │ -
int index(const typename GridImp::Traits::template Codim< codim >::Entity &e) const
get index of an entity
Definition identitygridindexsets.hh:36
│ │ │ │ -
GridImp * grid_
Definition identitygridindexsets.hh:90
│ │ │ │ -
std::remove_const< GridImp >::type::HostGridType HostGrid
Definition identitygridindexsets.hh:29
│ │ │ │ -
const std::vector< GeometryType > & geomTypes(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:64
│ │ │ │ -
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:70
│ │ │ │ -
std::size_t size(GeometryType type) const
get number of entities of given codim, type and on this level
Definition identitygridindexsets.hh:57
│ │ │ │ -
static constexpr int dim
Definition identitygridindexsets.hh:32
│ │ │ │ -
HostGrid::LevelGridView::IndexSet::Types Types
Definition identitygridindexsets.hh:30
│ │ │ │ -
std::size_t size(int codim) const
get number of entities of given codim, type and on this level
Definition identitygridindexsets.hh:51
│ │ │ │ -
int subIndex(const typename GridImp::Traits::template Codim< cc >::Entity &e, int i, int codim) const
get index of subEntity of a codim 0 entity
Definition identitygridindexsets.hh:44
│ │ │ │ -
int level_
Definition identitygridindexsets.hh:92
│ │ │ │ -
void update(const GridImp &grid, int level)
Set up the index set.
Definition identitygridindexsets.hh:83
│ │ │ │ -
Definition identitygridindexsets.hh:103
│ │ │ │ -
IdentityGridLeafIndexSet(const GridImp &grid)
constructor stores reference to a grid and level
Definition identitygridindexsets.hh:118
│ │ │ │ -
static constexpr int dim
Definition identitygridindexsets.hh:114
│ │ │ │ -
std::size_t size(int codim) const
get number of entities of given codim
Definition identitygridindexsets.hh:155
│ │ │ │ -
bool contains(const EntityType &e) const
Return true if the given entity is contained in the index set.
Definition identitygridindexsets.hh:175
│ │ │ │ -
std::size_t size(GeometryType type) const
get number of entities of given type
Definition identitygridindexsets.hh:148
│ │ │ │ -
HostGrid::LevelGridView::IndexSet::Types Types
Definition identitygridindexsets.hh:108
│ │ │ │ -
int index(const typename std::remove_const< GridImp >::type::template Codim< codim >::Entity &e) const
get index of an entity
Definition identitygridindexsets.hh:129
│ │ │ │ -
int subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
get index of subEntity of a codim 0 entity
Definition identitygridindexsets.hh:141
│ │ │ │ -
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:168
│ │ │ │ -
GridImp * grid_
Definition identitygridindexsets.hh:189
│ │ │ │ -
void update(const GridImp &grid)
Definition identitygridindexsets.hh:183
│ │ │ │ -
const std::vector< GeometryType > & geomTypes(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:162
│ │ │ │ -
Definition identitygridindexsets.hh:199
│ │ │ │ -
IdentityGridGlobalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:206
│ │ │ │ -
void update()
Definition identitygridindexsets.hh:238
│ │ │ │ -
const GridImp * grid_
Definition identitygridindexsets.hh:241
│ │ │ │ -
HostGrid::Traits::GlobalIdSet::IdType IdType
define the type used for persistent indices
Definition identitygridindexsets.hh:209
│ │ │ │ -
IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, int codim) const
get id of subEntity
Definition identitygridindexsets.hh:230
│ │ │ │ -
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:218
│ │ │ │ -
Definition identitygridindexsets.hh:251
│ │ │ │ -
IdType subId(const typename std::remove_const< GridImp >::type::template Codim< 0 >::Entity &e, int i, int codim) const
get id of subEntity
Definition identitygridindexsets.hh:284
│ │ │ │ -
IdentityGridLocalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:263
│ │ │ │ -
const GridImp * grid_
Definition identitygridindexsets.hh:295
│ │ │ │ -
void update()
Definition identitygridindexsets.hh:292
│ │ │ │ -
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:272
│ │ │ │ -
HostGrid::Traits::LocalIdSet::IdType IdType
define the type used for persistent local ids
Definition identitygridindexsets.hh:259
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Definition identitygridintersectioniterator.hh:84
│ │ │ │ +
bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) const
equality
Definition identitygridintersectioniterator.hh:108
│ │ │ │ +
void increment()
prefix increment
Definition identitygridintersectioniterator.hh:114
│ │ │ │ +
IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const HostLevelIntersectionIterator &hostIterator)
Definition identitygridintersectioniterator.hh:101
│ │ │ │ +
Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp > > Intersection
Definition identitygridintersectioniterator.hh:96
│ │ │ │ +
Intersection dereference() const
dereferencing
Definition identitygridintersectioniterator.hh:119
│ │ │ │ +
IdentityGridLevelIntersectionIterator()
Definition identitygridintersectioniterator.hh:98
│ │ │ │ +
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ │ +
bool equals(const IdentityGridLeafIntersectionIterator &other) const
equality
Definition identitygridintersectioniterator.hh:54
│ │ │ │ +
void increment()
prefix increment
Definition identitygridintersectioniterator.hh:60
│ │ │ │ +
IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const HostLeafIntersectionIterator &hostIterator)
Definition identitygridintersectioniterator.hh:47
│ │ │ │ +
Intersection dereference() const
dereferencing
Definition identitygridintersectioniterator.hh:65
│ │ │ │ +
Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp > > Intersection
Definition identitygridintersectioniterator.hh:42
│ │ │ │ +
IdentityGridLeafIntersectionIterator()
Definition identitygridintersectioniterator.hh:44
│ │ │ │ +
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition identitygridintersections.hh:33
│ │ │ │ +
Definition identitygridintersections.hh:192
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,465 +1,208 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridindexsets.hh │ │ │ │ │ +identitygridintersectioniterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ │ -17 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t : │ │ │ │ │ -21 public _I_n_d_e_x_S_e_t, │ │ │ │ │ -23 typename std::remove_const::type::HostGridType::LevelGridView:: │ │ │ │ │ -IndexSet::IndexType, │ │ │ │ │ -24 typename std::remove_const::type::HostGridType::LevelGridView:: │ │ │ │ │ -IndexSet::Types │ │ │ │ │ -25 > │ │ │ │ │ -26 { │ │ │ │ │ -27 public: │ │ │ │ │ -28 │ │ │ │ │ -_2_9 typedef typename std::remove_const::type::HostGridType _H_o_s_t_G_r_i_d; │ │ │ │ │ -_3_0 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ │ -31 │ │ │ │ │ -_3_2 constexpr static int _d_i_m = GridImp::dimension; │ │ │ │ │ -33 │ │ │ │ │ -35 template │ │ │ │ │ -_3_6 int _i_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e) │ │ │ │ │ -const │ │ │ │ │ -37 { │ │ │ │ │ -38 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).template index(_g_r_i_d__- │ │ │ │ │ ->template getHostEntity(e)); │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ +8#include "_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h" │ │ │ │ │ +9#include "_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h" │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ │ +18 │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +29 { │ │ │ │ │ +30 │ │ │ │ │ +31 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +32 │ │ │ │ │ +33 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +34 │ │ │ │ │ +35 // The type used to store coordinates │ │ │ │ │ +36 typedef typename GridImp::ctype ctype; │ │ │ │ │ +37 │ │ │ │ │ +38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator │ │ │ │ │ +HostLeafIntersectionIterator; │ │ │ │ │ +39 │ │ │ │ │ +40 public: │ │ │ │ │ 41 │ │ │ │ │ -43 template │ │ │ │ │ -_4_4 int _s_u_b_I_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e, │ │ │ │ │ -int i, int codim) const │ │ │ │ │ -45 { │ │ │ │ │ -46 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).subIndex(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e), i, codim); │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -49 │ │ │ │ │ -_5_1 std::size_t _s_i_z_e (int codim) const { │ │ │ │ │ -52 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).size(codim); │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -55 │ │ │ │ │ -_5_7 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ -58 { │ │ │ │ │ -59 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).size(type); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -62 │ │ │ │ │ -_6_4 const std::vector& _g_e_o_m_T_y_p_e_s (int codim) const │ │ │ │ │ -65 { │ │ │ │ │ -66 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).geomTypes(codim); │ │ │ │ │ +_4_2 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_c_o_n_s_t_ _G_r_i_d_I_m_p_,_ _D_u_n_e_:_: │ │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> > _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +43 │ │ │ │ │ +_4_4 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ │ +45 {} │ │ │ │ │ +46 │ │ │ │ │ +_4_7 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(const GridImp* identityGrid, │ │ │ │ │ +48 const HostLeafIntersectionIterator& hostIterator) │ │ │ │ │ +49 : identityGrid_(identityGrid) │ │ │ │ │ +50 , hostIterator_(hostIterator) │ │ │ │ │ +51 {} │ │ │ │ │ +52 │ │ │ │ │ +_5_4 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) const { │ │ │ │ │ +55 return hostIterator_ == other.hostIterator_; │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +58 │ │ │ │ │ +_6_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +61 ++hostIterator_; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +66 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_>(identityGrid_,*hostIterator_); │ │ │ │ │ 67 } │ │ │ │ │ 68 │ │ │ │ │ -_7_0 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ -71 { │ │ │ │ │ -72 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).types(codim); │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -76 template │ │ │ │ │ -_7_7 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ -78 { │ │ │ │ │ -79 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).contains(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e)); │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -_8_3 void _u_p_d_a_t_e(const GridImp& grid, int level) │ │ │ │ │ +69 private: │ │ │ │ │ +70 //********************************************************** │ │ │ │ │ +71 // private data │ │ │ │ │ +72 //********************************************************** │ │ │ │ │ +73 │ │ │ │ │ +74 const GridImp* identityGrid_ = nullptr; │ │ │ │ │ +75 HostLeafIntersectionIterator hostIterator_ = {}; │ │ │ │ │ +76 }; │ │ │ │ │ +77 │ │ │ │ │ +78 │ │ │ │ │ +79 │ │ │ │ │ +80 │ │ │ │ │ +82 template │ │ │ │ │ +_8_3 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ 84 { │ │ │ │ │ -85 _g_r_i_d__ = &grid; │ │ │ │ │ -86 _l_e_v_e_l__ = level; │ │ │ │ │ -87 } │ │ │ │ │ +85 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +86 │ │ │ │ │ +87 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ 88 │ │ │ │ │ -89 │ │ │ │ │ -_9_0 GridImp* _g_r_i_d__; │ │ │ │ │ +89 // The type used to store coordinates │ │ │ │ │ +90 typedef typename GridImp::ctype ctype; │ │ │ │ │ 91 │ │ │ │ │ -_9_2 int _l_e_v_e_l__; │ │ │ │ │ -93 }; │ │ │ │ │ -94 │ │ │ │ │ +92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator │ │ │ │ │ +HostLevelIntersectionIterator; │ │ │ │ │ +93 │ │ │ │ │ +94 public: │ │ │ │ │ 95 │ │ │ │ │ -96 template │ │ │ │ │ -_9_7 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t : │ │ │ │ │ -98 public _I_n_d_e_x_S_e_t, │ │ │ │ │ -100 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ -IndexSet::IndexType, │ │ │ │ │ -101 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ -IndexSet::Types │ │ │ │ │ -102 > │ │ │ │ │ -103 { │ │ │ │ │ -104 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ -105 │ │ │ │ │ -106 public: │ │ │ │ │ -107 │ │ │ │ │ -_1_0_8 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ │ -109 │ │ │ │ │ -110 /* │ │ │ │ │ -111 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -112 * because the const class is not instantiated yet. │ │ │ │ │ -113 */ │ │ │ │ │ -_1_1_4 constexpr static int _d_i_m = std::remove_const::type::dimension; │ │ │ │ │ -115 │ │ │ │ │ -116 │ │ │ │ │ -_1_1_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t (const GridImp& grid) │ │ │ │ │ -119 : _g_r_i_d__(&grid) │ │ │ │ │ -120 {} │ │ │ │ │ -121 │ │ │ │ │ +_9_6 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_c_o_n_s_t_ _G_r_i_d_I_m_p_,_ _D_u_n_e_:_: │ │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> > _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +97 │ │ │ │ │ +_9_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ │ +99 {} │ │ │ │ │ +100 │ │ │ │ │ +_1_0_1 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(const GridImp* identityGrid, │ │ │ │ │ +102 const HostLevelIntersectionIterator& hostIterator) │ │ │ │ │ +103 : identityGrid_(identityGrid) │ │ │ │ │ +104 , hostIterator_(hostIterator) │ │ │ │ │ +105 {} │ │ │ │ │ +106 │ │ │ │ │ +_1_0_8 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>& other) │ │ │ │ │ +const { │ │ │ │ │ +109 return hostIterator_ == other.hostIterator_; │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +112 │ │ │ │ │ +_1_1_4 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +115 ++hostIterator_; │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_1_9 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +120 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> │ │ │ │ │ +(identityGrid_,*hostIterator_); │ │ │ │ │ +121 } │ │ │ │ │ 122 │ │ │ │ │ -124 /* │ │ │ │ │ -125 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ -126 because the const class is not instantiated yet. │ │ │ │ │ -127 */ │ │ │ │ │ -128 template │ │ │ │ │ -_1_2_9 int _i_n_d_e_x (const typename std::remove_const::type::template │ │ │ │ │ -Codim::Entity& e) const │ │ │ │ │ -130 { │ │ │ │ │ -131 return _g_r_i_d__->hostgrid_->leafIndexSet().template index(_g_r_i_d__- │ │ │ │ │ ->template getHostEntity(e)); │ │ │ │ │ -132 } │ │ │ │ │ +123 private: │ │ │ │ │ +124 │ │ │ │ │ +125 │ │ │ │ │ +126 const GridImp* identityGrid_ = nullptr; │ │ │ │ │ +127 HostLevelIntersectionIterator hostIterator_ = {}; │ │ │ │ │ +128 │ │ │ │ │ +129 }; │ │ │ │ │ +130 │ │ │ │ │ +131 │ │ │ │ │ +132} // namespace Dune │ │ │ │ │ 133 │ │ │ │ │ -134 │ │ │ │ │ -136 /* │ │ │ │ │ -137 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ -138 because the const class is not instantiated yet. │ │ │ │ │ -139 */ │ │ │ │ │ -140 template │ │ │ │ │ -_1_4_1 int _s_u_b_I_n_d_e_x (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim::Entity& e, int i, int codim) const │ │ │ │ │ -142 { │ │ │ │ │ -143 return _g_r_i_d__->hostgrid_->leafIndexSet().subIndex(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e),i, codim); │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146 │ │ │ │ │ -_1_4_8 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ -149 { │ │ │ │ │ -150 return _g_r_i_d__->hostgrid_->leafIndexSet().size(type); │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -153 │ │ │ │ │ -_1_5_5 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ -156 { │ │ │ │ │ -157 return _g_r_i_d__->hostgrid_->leafIndexSet().size(codim); │ │ │ │ │ -158 } │ │ │ │ │ -159 │ │ │ │ │ -160 │ │ │ │ │ -_1_6_2 const std::vector& _g_e_o_m_T_y_p_e_s (int codim) const │ │ │ │ │ -163 { │ │ │ │ │ -164 return _g_r_i_d__->hostgrid_->leafIndexSet().geomTypes(codim); │ │ │ │ │ -165 } │ │ │ │ │ -166 │ │ │ │ │ -_1_6_8 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ -169 { │ │ │ │ │ -170 return _g_r_i_d__->hostgrid_->leafIndexSet().types(codim); │ │ │ │ │ -171 } │ │ │ │ │ -172 │ │ │ │ │ -174 template │ │ │ │ │ -_1_7_5 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ -176 { │ │ │ │ │ -177 return _g_r_i_d__->hostgrid_->leafIndexSet().contains(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e)); │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -180 │ │ │ │ │ -181 │ │ │ │ │ -_1_8_3 void _u_p_d_a_t_e(const GridImp& grid) │ │ │ │ │ -184 { │ │ │ │ │ -185 _g_r_i_d__ = &grid; │ │ │ │ │ -186 } │ │ │ │ │ -187 │ │ │ │ │ -188 │ │ │ │ │ -_1_8_9 GridImp* _g_r_i_d__; │ │ │ │ │ -190 }; │ │ │ │ │ -191 │ │ │ │ │ -192 │ │ │ │ │ -193 │ │ │ │ │ -194 │ │ │ │ │ -195 template │ │ │ │ │ -_1_9_6 class _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t : │ │ │ │ │ -197 public _I_d_S_e_t, │ │ │ │ │ -198 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ -GlobalIdSet::IdType> │ │ │ │ │ -199 { │ │ │ │ │ -200 │ │ │ │ │ -201 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ -202 │ │ │ │ │ -203 │ │ │ │ │ -204 public: │ │ │ │ │ -_2_0_6 _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t (const GridImp& g) : _g_r_i_d__(&g) {} │ │ │ │ │ -207 │ │ │ │ │ -_2_0_9 typedef typename HostGrid::Traits::GlobalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ -210 │ │ │ │ │ -211 │ │ │ │ │ -213 /* │ │ │ │ │ -214 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -215 because the const class is not instantiated yet. │ │ │ │ │ -216 */ │ │ │ │ │ -217 template │ │ │ │ │ -_2_1_8 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim::Entity& e) const │ │ │ │ │ -219 { │ │ │ │ │ -220 // Return id of the host entity │ │ │ │ │ -221 return _g_r_i_d__->hostgrid_->globalIdSet().id(e.impl().hostEntity_); │ │ │ │ │ -222 } │ │ │ │ │ -223 │ │ │ │ │ -224 │ │ │ │ │ -226 /* │ │ │ │ │ -227 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -228 because the const class is not instantiated yet. │ │ │ │ │ -229 */ │ │ │ │ │ -_2_3_0 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim<0>::Entity& e, int i, int codim) const │ │ │ │ │ -231 { │ │ │ │ │ -232 // Return sub id of the host entity │ │ │ │ │ -233 return _g_r_i_d__->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, │ │ │ │ │ -codim); │ │ │ │ │ -234 } │ │ │ │ │ -235 │ │ │ │ │ -236 │ │ │ │ │ -_2_3_8 void _u_p_d_a_t_e() {} │ │ │ │ │ -239 │ │ │ │ │ -240 │ │ │ │ │ -_2_4_1 const GridImp* _g_r_i_d__; │ │ │ │ │ -242 }; │ │ │ │ │ -243 │ │ │ │ │ -244 │ │ │ │ │ -245 │ │ │ │ │ -246 │ │ │ │ │ -247 template │ │ │ │ │ -_2_4_8 class _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t : │ │ │ │ │ -249 public _I_d_S_e_t, │ │ │ │ │ -250 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ -LocalIdSet::IdType> │ │ │ │ │ -251 { │ │ │ │ │ -252 private: │ │ │ │ │ -253 │ │ │ │ │ -254 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ -255 │ │ │ │ │ -256 │ │ │ │ │ -257 public: │ │ │ │ │ -_2_5_9 typedef typename HostGrid::Traits::LocalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ -260 │ │ │ │ │ -261 │ │ │ │ │ -_2_6_3 _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t (const GridImp& g) : _g_r_i_d__(&g) {} │ │ │ │ │ -264 │ │ │ │ │ -265 │ │ │ │ │ -267 /* │ │ │ │ │ -268 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -269 because the const class is not instantiated yet. │ │ │ │ │ -270 */ │ │ │ │ │ -271 template │ │ │ │ │ -_2_7_2 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim::Entity& e) const │ │ │ │ │ -273 { │ │ │ │ │ -274 // Return id of the host entity │ │ │ │ │ -275 return _g_r_i_d__->hostgrid_->localIdSet().id(e.impl().hostEntity_); │ │ │ │ │ -276 } │ │ │ │ │ -277 │ │ │ │ │ -278 │ │ │ │ │ -280 /* │ │ │ │ │ -281 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -282 * because the const class is not instantiated yet. │ │ │ │ │ -283 */ │ │ │ │ │ -_2_8_4 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::template │ │ │ │ │ -Codim<0>::Entity& e, int i, int codim) const │ │ │ │ │ -285 { │ │ │ │ │ -286 // Return sub id of the host entity │ │ │ │ │ -287 return _g_r_i_d__->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim); │ │ │ │ │ -288 } │ │ │ │ │ -289 │ │ │ │ │ -290 │ │ │ │ │ -_2_9_2 void _u_p_d_a_t_e() {} │ │ │ │ │ -293 │ │ │ │ │ -294 │ │ │ │ │ -_2_9_5 const GridImp* _g_r_i_d__; │ │ │ │ │ -296 }; │ │ │ │ │ -297 │ │ │ │ │ -298 │ │ │ │ │ -299} // namespace Dune │ │ │ │ │ -300 │ │ │ │ │ -301 │ │ │ │ │ -302#endif │ │ │ │ │ -_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ -Provides base classes for index and id sets. │ │ │ │ │ +134#endif │ │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ │ +The IdentityGridEntity class. │ │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h │ │ │ │ │ +The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Index Set Interface base class. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ -Id Set Interface. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const EntityType &e) const │ │ │ │ │ -Return true if the given entity is contained in the index set. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ -int index(const typename GridImp::Traits::template Codim< codim >::Entity &e) │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) │ │ │ │ │ const │ │ │ │ │ -get index of an entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ -GridImp * grid_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_H_o_s_t_G_r_i_d │ │ │ │ │ -std::remove_const< GridImp >::type::HostGridType HostGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_g_e_o_m_T_y_p_e_s │ │ │ │ │ -const std::vector< GeometryType > & geomTypes(int codim) const │ │ │ │ │ -Deliver all geometry types used in this grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ -Types types(int codim) const │ │ │ │ │ -Deliver all geometry types used in this grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(GeometryType type) const │ │ │ │ │ -get number of entities of given codim, type and on this level │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_d_i_m │ │ │ │ │ -static constexpr int dim │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_T_y_p_e_s │ │ │ │ │ -HostGrid::LevelGridView::IndexSet::Types Types │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(int codim) const │ │ │ │ │ -get number of entities of given codim, type and on this level │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -int subIndex(const typename GridImp::Traits::template Codim< cc >::Entity &e, │ │ │ │ │ -int i, int codim) const │ │ │ │ │ -get index of subEntity of a codim 0 entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_l_e_v_e_l__ │ │ │ │ │ -int level_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(const GridImp &grid, int level) │ │ │ │ │ -Set up the index set. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t │ │ │ │ │ -IdentityGridLeafIndexSet(const GridImp &grid) │ │ │ │ │ -constructor stores reference to a grid and level │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_d_i_m │ │ │ │ │ -static constexpr int dim │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(int codim) const │ │ │ │ │ -get number of entities of given codim │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const EntityType &e) const │ │ │ │ │ -Return true if the given entity is contained in the index set. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size(GeometryType type) const │ │ │ │ │ -get number of entities of given type │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_T_y_p_e_s │ │ │ │ │ -HostGrid::LevelGridView::IndexSet::Types Types │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ -int index(const typename std::remove_const< GridImp >::type::template Codim< │ │ │ │ │ -codim >::Entity &e) const │ │ │ │ │ -get index of an entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -int subIndex(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ -template Codim< cc >::Entity &e, int i, int codim) const │ │ │ │ │ -get index of subEntity of a codim 0 entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ -Types types(int codim) const │ │ │ │ │ -Deliver all geometry types used in this grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ -GridImp * grid_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(const GridImp &grid) │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:183 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_d_e_x_S_e_t_:_:_g_e_o_m_T_y_p_e_s │ │ │ │ │ -const std::vector< GeometryType > & geomTypes(int codim) const │ │ │ │ │ -Deliver all geometry types used in this grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:162 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ │ -IdentityGridGlobalIdSet(const GridImp &g) │ │ │ │ │ -constructor stores reference to a grid │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:206 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ -const GridImp * grid_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:241 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ -HostGrid::Traits::GlobalIdSet::IdType IdType │ │ │ │ │ -define the type used for persistent indices │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:209 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ -IdType subId(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ -template Codim< 0 >::Entity &e, int i, int codim) const │ │ │ │ │ -get id of subEntity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:230 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ │ -IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ │ -Codim< cd >::Entity &e) const │ │ │ │ │ -get id of an entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:218 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:251 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ -IdType subId(const typename std::remove_const< GridImp >::type::template Codim< │ │ │ │ │ -0 >::Entity &e, int i, int codim) const │ │ │ │ │ -get id of subEntity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:284 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t │ │ │ │ │ -IdentityGridLocalIdSet(const GridImp &g) │ │ │ │ │ -constructor stores reference to a grid │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:263 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_g_r_i_d__ │ │ │ │ │ -const GridImp * grid_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:295 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ │ -IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ │ -Codim< cd >::Entity &e) const │ │ │ │ │ -get id of an entity │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ -HostGrid::Traits::LocalIdSet::IdType IdType │ │ │ │ │ -define the type used for persistent local ids │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:259 │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +prefix increment │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ │ +HostLevelIntersectionIterator &hostIterator) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp │ │ │ │ │ +> > Intersection │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:96 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Intersection dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLevelIntersectionIterator() │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ │ +allow to visit all nei... │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridLeafIntersectionIterator &other) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +prefix increment │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ │ +HostLeafIntersectionIterator &hostIterator) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Intersection dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp │ │ │ │ │ +> > Intersection │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +IdentityGridLeafIntersectionIterator() │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ │ +("elements") allow to visi... │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridgeometry.hh File Reference │ │ │ │ +dune-grid: identitygridintersections.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,39 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridgeometry.hh File Reference
│ │ │ │ +
identitygridintersections.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridGeometry class and its specializations. │ │ │ │ +

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ More...

│ │ │ │ -
#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/geometry.hh>
│ │ │ │ +
#include "identitygridleafiterator.hh"
│ │ │ │ +#include <dune/grid/identitygrid/identitygridentity.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridGeometry< mydim, coorddim, GridImp >
class  Dune::IdentityGridLeafIntersection< GridImp >
 An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 These neighbors are accessed via a IntersectionIterator. This allows the implement non-matching meshes. The number of neighbors may be different from the number of an element! More...
 
class  Dune::IdentityGridLevelIntersection< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridGeometry class and its specializations.

│ │ │ │ +

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,24 +2,32 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -identitygridgeometry.hh File Reference │ │ │ │ │ -The IdentityGridGeometry class and its specializations. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ +identitygridintersections.hh File Reference │ │ │ │ │ +The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ +_M_o_r_e_._._. │ │ │ │ │ +#include "_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_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_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_o_o_r_d_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ + An intersection with a leaf neighbor elementMesh entities of │ │ │ │ │ + codimension 0 ("elements") allow to visit all neighbors, where a │ │ │ │ │ +  neighbor is an entity of codimension 0 which has a common entity of │ │ │ │ │ + codimension 1 These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. │ │ │ │ │ + This allows the implement non-matching meshes. The number of neighbors │ │ │ │ │ + may be different from the number of an element! _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridGeometry class and its specializations. │ │ │ │ │ +The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridgeometry.hh Source File │ │ │ │ +dune-grid: identitygridintersections.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,162 +74,435 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridgeometry.hh
│ │ │ │ +
identitygridintersections.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_IDENTITYGRIDGEOMETRY_HH
│ │ │ │ -
6#define DUNE_IDENTITYGRIDGEOMETRY_HH
│ │ │ │ +
5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ │
7
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13#include <dune/common/typetraits.hh>
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │
17
│ │ │ │ -
18 template<int mydim, int coorddim, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
20 public GeometryDefaultImplementation <mydim, coorddim, GridImp, IdentityGridGeometry>
│ │ │ │ -
21 {
│ │ │ │ -
22 private:
│ │ │ │ -
23
│ │ │ │ -
24 typedef typename GridImp::ctype ctype;
│ │ │ │ -
25
│ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ -
28
│ │ │ │ -
29 // The codimension of this entitypointer wrt the host grid
│ │ │ │ -
30 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - mydim;
│ │ │ │ -
31 constexpr static int DimensionWorld = GridImp::HostGridType::dimensionworld;
│ │ │ │ -
32
│ │ │ │ -
33 // select appropriate hostgrid geometry via typeswitch
│ │ │ │ -
34 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridGeometryType;
│ │ │ │ -
35 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Geometry HostGridLocalGeometryType;
│ │ │ │ +
18 // External forward declarations
│ │ │ │ +
19 template< class Grid >
│ │ │ │ +
20 struct HostGridAccess;
│ │ │ │ +
21
│ │ │ │ +
22
│ │ │ │ +
31 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {
│ │ │ │ +
34
│ │ │ │ +
35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
│ │ │ │
36
│ │ │ │ -
37 typedef typename std::conditional<coorddim==DimensionWorld, HostGridGeometryType, HostGridLocalGeometryType>::type HostGridGeometry;
│ │ │ │ +
37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │
38
│ │ │ │ -
40 typedef typename HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ │ -
41 typedef typename HostGridGeometryType::JacobianTransposed JacobianTransposed;
│ │ │ │ +
39 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
40
│ │ │ │ +
41 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │
42
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 : hostGeometry_(hostGeometry)
│ │ │ │ -
48 {}
│ │ │ │ -
│ │ │ │ +
43 // The type used to store coordinates
│ │ │ │ +
44 typedef typename GridImp::ctype ctype;
│ │ │ │ +
45
│ │ │ │ +
46 typedef typename GridImp::HostGridType::LeafGridView::Intersection HostLeafIntersection;
│ │ │ │ +
47
│ │ │ │ +
48 public:
│ │ │ │
49
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
53 GeometryType type () const {
│ │ │ │ -
54 return hostGeometry_.type();
│ │ │ │ -
55 }
│ │ │ │ +
50 typedef typename GridImp::template Codim<1>::Geometry Geometry;
│ │ │ │ +
51 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
│ │ │ │ +
52 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
53 typedef FieldVector<ctype, dimworld> NormalVector;
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {}
│ │ │ │
│ │ │ │ -
56
│ │ │ │ -
57 // return wether we have an affine mapping
│ │ │ │ +
57
│ │ │ │
│ │ │ │ -
58 bool affine() const {
│ │ │ │ -
59 return hostGeometry_.affine();
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
63 int corners () const {
│ │ │ │ -
64 return hostGeometry_.corners();
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
69 const FieldVector<ctype, coorddim> corner (int i) const {
│ │ │ │ -
70 return hostGeometry_.corner(i);
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
76 FieldVector<ctype, coorddim> global (const FieldVector<ctype, mydim>& local) const {
│ │ │ │ -
77 return hostGeometry_.global(local);
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
83 jacobianTransposed ( const FieldVector<ctype, mydim>& local ) const {
│ │ │ │ -
84 return hostGeometry_.jacobianTransposed(local);
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
│ │ │ │ -
89 FieldVector<ctype, mydim> local (const FieldVector<ctype, coorddim>& global) const {
│ │ │ │ -
90 return hostGeometry_.local(global);
│ │ │ │ -
91 }
│ │ │ │ +
58 IdentityGridLeafIntersection(const GridImp* identityGrid,
│ │ │ │ +
59 const HostLeafIntersection& hostIntersection)
│ │ │ │ +
60 : identityGrid_(identityGrid)
│ │ │ │ +
61 , hostIntersection_(hostIntersection)
│ │ │ │ +
62 {}
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
64 IdentityGridLeafIntersection(const GridImp* identityGrid,
│ │ │ │ +
65 HostLeafIntersection&& hostIntersection)
│ │ │ │ +
66 : identityGrid_(identityGrid)
│ │ │ │ +
67 , hostIntersection_(std::move(hostIntersection))
│ │ │ │ +
68 {}
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 bool equals(const IdentityGridLeafIntersection& other) const
│ │ │ │ +
71 {
│ │ │ │ +
72 return hostIntersection_ == other.hostIntersection_;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
│ │ │ │ +
77 Entity inside() const {
│ │ │ │ +
78 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
84 Entity outside() const {
│ │ │ │ +
85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
90 bool boundary () const {
│ │ │ │ +
91 return hostIntersection_.boundary();
│ │ │ │ +
92 }
│ │ │ │
│ │ │ │ -
92
│ │ │ │
93
│ │ │ │ -
│ │ │ │ -
95 bool checkInside(const FieldVector<ctype, mydim> &local) const {
│ │ │ │ -
96 return hostGeometry_.checkInside(local);
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ -
102 ctype integrationElement (const FieldVector<ctype, mydim>& local) const {
│ │ │ │ -
103 return hostGeometry_.integrationElement(local);
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
106
│ │ │ │ -
│ │ │ │ -
108 JacobianInverseTransposed jacobianInverseTransposed (const FieldVector<ctype, mydim>& local) const {
│ │ │ │ -
109 return hostGeometry_.jacobianInverseTransposed(local);
│ │ │ │ -
110 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
100 return hostIntersection_.centerUnitOuterNormal();
│ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
│ │ │ │ +
104 bool neighbor () const {
│ │ │ │ +
105 return hostIntersection_.neighbor();
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ +
109 size_t boundarySegmentIndex() const {
│ │ │ │ +
110 return hostIntersection_.boundarySegmentIndex();
│ │ │ │ +
111 }
│ │ │ │
│ │ │ │ -
111
│ │ │ │
112
│ │ │ │ - │ │ │ │ -
114
│ │ │ │ -
115 };
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
117} // namespace Dune
│ │ │ │ -
118
│ │ │ │ -
119#endif
│ │ │ │ +
│ │ │ │ +
114 bool conforming () const {
│ │ │ │ +
115 return hostIntersection_.conforming();
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ +
119 GeometryType type () const {
│ │ │ │ +
120 return hostIntersection_.type();
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122
│ │ │ │ +
123
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
129 {
│ │ │ │ +
130 return LocalGeometry( hostIntersection_.geometryInInside() );
│ │ │ │ +
131 }
│ │ │ │ +
│ │ │ │ +
132
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
136 {
│ │ │ │ +
137 return LocalGeometry( hostIntersection_.geometryInOutside() );
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
143 {
│ │ │ │ +
144 return Geometry( hostIntersection_.geometry() );
│ │ │ │ +
145 }
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147
│ │ │ │ +
│ │ │ │ +
149 int indexInInside () const {
│ │ │ │ +
150 return hostIntersection_.indexInInside();
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │ +
152
│ │ │ │ +
153
│ │ │ │ +
│ │ │ │ +
155 int indexInOutside () const {
│ │ │ │ +
156 return hostIntersection_.indexInOutside();
│ │ │ │ +
157 }
│ │ │ │ +
│ │ │ │ +
158
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ +
161 FieldVector<ctype, GridImp::dimensionworld> outerNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
│ │ │ │ +
162 return hostIntersection_.outerNormal(local);
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │ +
164
│ │ │ │ +
│ │ │ │ +
166 FieldVector<ctype, GridImp::dimensionworld> integrationOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
│ │ │ │ +
167 return hostIntersection_.integrationOuterNormal(local);
│ │ │ │ +
168 }
│ │ │ │ +
│ │ │ │ +
169
│ │ │ │ +
│ │ │ │ +
171 FieldVector<ctype, GridImp::dimensionworld> unitOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
│ │ │ │ +
172 return hostIntersection_.unitOuterNormal(local);
│ │ │ │ +
173 }
│ │ │ │ +
│ │ │ │ +
174
│ │ │ │ +
175
│ │ │ │ +
176 private:
│ │ │ │ +
177 //**********************************************************
│ │ │ │ +
178 // private methods
│ │ │ │ +
179 //**********************************************************
│ │ │ │ +
180
│ │ │ │ +
181 const GridImp* identityGrid_;
│ │ │ │ +
182
│ │ │ │ +
183 HostLeafIntersection hostIntersection_;
│ │ │ │ +
184 };
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
186
│ │ │ │ +
187
│ │ │ │ +
188
│ │ │ │ +
190 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
192 {
│ │ │ │ +
193
│ │ │ │ +
194 friend class IdentityGridLevelIntersectionIterator<GridImp>;
│ │ │ │ +
195
│ │ │ │ +
196 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ +
197
│ │ │ │ +
198 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
199
│ │ │ │ +
200 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
201
│ │ │ │ +
202 // The type used to store coordinates
│ │ │ │ +
203 typedef typename GridImp::ctype ctype;
│ │ │ │ +
204
│ │ │ │ +
205 typedef typename GridImp::HostGridType::LevelGridView::Intersection HostLevelIntersection;
│ │ │ │ +
206
│ │ │ │ +
207 public:
│ │ │ │ +
208
│ │ │ │ +
209 typedef typename GridImp::template Codim<1>::Geometry Geometry;
│ │ │ │ +
210 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
│ │ │ │ +
211 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
212 typedef FieldVector<ctype, dimworld> NormalVector;
│ │ │ │ +
213
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
215 {}
│ │ │ │ +
│ │ │ │ +
216
│ │ │ │ +
│ │ │ │ +
217 IdentityGridLevelIntersection(const GridImp* identityGrid,
│ │ │ │ +
218 const HostLevelIntersection& hostIntersection)
│ │ │ │ +
219 : identityGrid_(identityGrid)
│ │ │ │ +
220 , hostIntersection_(hostIntersection)
│ │ │ │ +
221 {}
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
│ │ │ │ +
223 IdentityGridLevelIntersection(const GridImp* identityGrid,
│ │ │ │ +
224 HostLevelIntersection&& hostIntersection)
│ │ │ │ +
225 : identityGrid_(identityGrid)
│ │ │ │ +
226 , hostIntersection_(std::move(hostIntersection))
│ │ │ │ +
227 {}
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
│ │ │ │ +
229 bool equals(const IdentityGridLevelIntersection& other) const
│ │ │ │ +
230 {
│ │ │ │ +
231 return hostIntersection_ == other.hostIntersection_;
│ │ │ │ +
232 }
│ │ │ │ +
│ │ │ │ +
233
│ │ │ │ +
│ │ │ │ +
236 Entity inside() const {
│ │ │ │ +
237 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
│ │ │ │ +
238 }
│ │ │ │ +
│ │ │ │ +
239
│ │ │ │ +
240
│ │ │ │ +
│ │ │ │ +
243 Entity outside() const {
│ │ │ │ +
244 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ │ +
245 }
│ │ │ │ +
│ │ │ │ +
246
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ +
250 bool boundary () const {
│ │ │ │ +
251 return hostIntersection_.boundary();
│ │ │ │ +
252 }
│ │ │ │ +
│ │ │ │ +
253
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
260 return hostIntersection_.centerUnitOuterNormal();
│ │ │ │ +
261 }
│ │ │ │ +
│ │ │ │ +
262
│ │ │ │ +
│ │ │ │ +
264 bool neighbor () const {
│ │ │ │ +
265 return hostIntersection_.neighbor();
│ │ │ │ +
266 }
│ │ │ │ +
│ │ │ │ +
267
│ │ │ │ +
│ │ │ │ +
269 size_t boundarySegmentIndex() const {
│ │ │ │ +
270 return hostIntersection_.boundarySegmentIndex();
│ │ │ │ +
271 }
│ │ │ │ +
│ │ │ │ +
272
│ │ │ │ +
│ │ │ │ +
274 bool conforming () const {
│ │ │ │ +
275 return hostIntersection_.conforming();
│ │ │ │ +
276 }
│ │ │ │ +
│ │ │ │ +
277
│ │ │ │ +
│ │ │ │ +
279 GeometryType type () const {
│ │ │ │ +
280 return hostIntersection_.type();
│ │ │ │ +
281 }
│ │ │ │ +
│ │ │ │ +
282
│ │ │ │ +
283
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
289 {
│ │ │ │ +
290 return LocalGeometry( hostIntersection_.geometryInInside() );
│ │ │ │ +
291 }
│ │ │ │ +
│ │ │ │ +
292
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
296 {
│ │ │ │ +
297 return LocalGeometry( hostIntersection_.geometryInOutside() );
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
303 {
│ │ │ │ +
304 return Geometry( hostIntersection_.geometry() );
│ │ │ │ +
305 }
│ │ │ │ +
│ │ │ │ +
306
│ │ │ │ +
307
│ │ │ │ +
│ │ │ │ +
309 int indexInInside () const {
│ │ │ │ +
310 return hostIntersection_.indexInInside();
│ │ │ │ +
311 }
│ │ │ │ +
│ │ │ │ +
312
│ │ │ │ +
313
│ │ │ │ +
│ │ │ │ +
315 int indexInOutside () const {
│ │ │ │ +
316 return hostIntersection_.indexInOutside();
│ │ │ │ +
317 }
│ │ │ │ +
│ │ │ │ +
318
│ │ │ │ +
319
│ │ │ │ +
│ │ │ │ +
321 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& local) const {
│ │ │ │ +
322 return hostIntersection_.outerNormal(local);
│ │ │ │ +
323 }
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
│ │ │ │ +
326 FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
│ │ │ │ +
327 return hostIntersection_.integrationOuterNormal(local);
│ │ │ │ +
328 }
│ │ │ │ +
│ │ │ │ +
329
│ │ │ │ +
│ │ │ │ +
331 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& local) const {
│ │ │ │ +
332 return hostIntersection_.unitOuterNormal(local);
│ │ │ │ +
333 }
│ │ │ │ +
│ │ │ │ +
334
│ │ │ │ +
335 private:
│ │ │ │ +
336
│ │ │ │ +
337 const GridImp* identityGrid_;
│ │ │ │ +
338
│ │ │ │ +
339 HostLevelIntersection hostIntersection_;
│ │ │ │ +
340
│ │ │ │ +
341 };
│ │ │ │ +
│ │ │ │ +
342
│ │ │ │ +
343
│ │ │ │ +
344} // namespace Dune
│ │ │ │ +
345
│ │ │ │ +
346#endif
│ │ │ │ +
The IdentityGridEntity class.
│ │ │ │ +
The IdentityGridLeafIterator class.
│ │ │ │ +
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Default implementation for class Geometry.
Definition common/geometry.hh:406
│ │ │ │ -
Definition identitygridgeometry.hh:21
│ │ │ │ -
bool checkInside(const FieldVector< ctype, mydim > &local) const
Returns true if the point is in the current element.
Definition identitygridgeometry.hh:95
│ │ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const FieldVector< ctype, mydim > &local) const
The Jacobian matrix of the mapping from the reference element to this element.
Definition identitygridgeometry.hh:108
│ │ │ │ -
JacobianTransposed jacobianTransposed(const FieldVector< ctype, mydim > &local) const
Return the transposed of the Jacobian.
Definition identitygridgeometry.hh:83
│ │ │ │ -
std::conditional< coorddim==DimensionWorld, HostGridGeometryType, HostGridLocalGeometryType >::type HostGridGeometry
Definition identitygridgeometry.hh:37
│ │ │ │ -
bool affine() const
Definition identitygridgeometry.hh:58
│ │ │ │ -
static constexpr int CodimInHostGrid
Definition identitygridgeometry.hh:30
│ │ │ │ -
FieldVector< ctype, coorddim > global(const FieldVector< ctype, mydim > &local) const
Maps a local coordinate within reference element to global coordinate in element
Definition identitygridgeometry.hh:76
│ │ │ │ -
IdentityGridGeometry(const HostGridGeometry &hostGeometry)
Definition identitygridgeometry.hh:46
│ │ │ │ -
GeometryType type() const
Return the element type identifier.
Definition identitygridgeometry.hh:53
│ │ │ │ -
const FieldVector< ctype, coorddim > corner(int i) const
access to coordinates of corners. Index is the number of the corner
Definition identitygridgeometry.hh:69
│ │ │ │ -
HostGridGeometryType::JacobianTransposed JacobianTransposed
Definition identitygridgeometry.hh:41
│ │ │ │ -
ctype integrationElement(const FieldVector< ctype, mydim > &local) const
Definition identitygridgeometry.hh:102
│ │ │ │ -
HostGridGeometry hostGeometry_
Definition identitygridgeometry.hh:113
│ │ │ │ -
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry HostGridLocalGeometryType
Definition identitygridgeometry.hh:35
│ │ │ │ -
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry HostGridGeometryType
Definition identitygridgeometry.hh:34
│ │ │ │ -
HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed
type of jacobian transposed
Definition identitygridgeometry.hh:40
│ │ │ │ -
static constexpr int DimensionWorld
Definition identitygridgeometry.hh:31
│ │ │ │ -
FieldVector< ctype, mydim > local(const FieldVector< ctype, coorddim > &global) const
Maps a global coordinate within the element to a local coordinate in its reference element.
Definition identitygridgeometry.hh:89
│ │ │ │ -
int corners() const
return the number of corners of this element. Corners are numbered 0...n-1
Definition identitygridgeometry.hh:63
│ │ │ │ -
Wrapper and interface classes for element geometries.
│ │ │ │ +
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ +
The implementation of entities in a IdentityGrid.
Definition identitygridentity.hh:55
│ │ │ │ +
Definition identitygridintersectioniterator.hh:84
│ │ │ │ +
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ │ +
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition identitygridintersections.hh:33
│ │ │ │ +
Entity inside() const
Definition identitygridintersections.hh:77
│ │ │ │ +
IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
Definition identitygridintersections.hh:64
│ │ │ │ +
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:99
│ │ │ │ +
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:51
│ │ │ │ +
Geometry geometry() const
Definition identitygridintersections.hh:142
│ │ │ │ +
Entity outside() const
Definition identitygridintersections.hh:84
│ │ │ │ +
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:135
│ │ │ │ +
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:90
│ │ │ │ +
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:119
│ │ │ │ +
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:53
│ │ │ │ +
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:128
│ │ │ │ +
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:114
│ │ │ │ +
IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
Definition identitygridintersections.hh:58
│ │ │ │ +
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:109
│ │ │ │ +
bool equals(const IdentityGridLeafIntersection &other) const
Definition identitygridintersections.hh:70
│ │ │ │ +
FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal
Definition identitygridintersections.hh:161
│ │ │ │ +
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:155
│ │ │ │ +
FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:166
│ │ │ │ +
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:104
│ │ │ │ +
FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:171
│ │ │ │ +
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:149
│ │ │ │ +
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:50
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:52
│ │ │ │ +
Definition identitygridintersections.hh:192
│ │ │ │ +
Geometry geometry() const
Definition identitygridintersections.hh:302
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:211
│ │ │ │ +
IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
Definition identitygridintersections.hh:217
│ │ │ │ +
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:209
│ │ │ │ +
bool equals(const IdentityGridLevelIntersection &other) const
Definition identitygridintersections.hh:229
│ │ │ │ +
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:264
│ │ │ │ +
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:259
│ │ │ │ +
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:274
│ │ │ │ +
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:309
│ │ │ │ +
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal
Definition identitygridintersections.hh:321
│ │ │ │ +
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:210
│ │ │ │ +
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:212
│ │ │ │ +
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:250
│ │ │ │ +
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:326
│ │ │ │ +
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:295
│ │ │ │ +
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:288
│ │ │ │ +
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:315
│ │ │ │ +
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:331
│ │ │ │ +
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:269
│ │ │ │ +
Entity outside() const
Definition identitygridintersections.hh:243
│ │ │ │ +
Entity inside() const
Definition identitygridintersections.hh:236
│ │ │ │ +
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:279
│ │ │ │ +
IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
Definition identitygridintersections.hh:223
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,205 +1,500 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ │ -identitygridgeometry.hh │ │ │ │ │ +identitygridintersections.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +_1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_IDENTITYGRIDGEOMETRY_HH │ │ │ │ │ -6#define DUNE_IDENTITYGRIDGEOMETRY_HH │ │ │ │ │ +5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ │ +8#include "_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ │ +16 │ │ │ │ │ 17 │ │ │ │ │ -18 template │ │ │ │ │ -_1_9 class _I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y : │ │ │ │ │ -20 public _G_e_o_m_e_t_r_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -21 { │ │ │ │ │ -22 private: │ │ │ │ │ -23 │ │ │ │ │ -24 typedef typename GridImp::ctype ctype; │ │ │ │ │ -25 │ │ │ │ │ -26 │ │ │ │ │ -27 public: │ │ │ │ │ -28 │ │ │ │ │ -29 // The codimension of this entitypointer wrt the host grid │ │ │ │ │ -_3_0 constexpr static int _C_o_d_i_m_I_n_H_o_s_t_G_r_i_d = GridImp::HostGridType::dimension - │ │ │ │ │ -mydim; │ │ │ │ │ -_3_1 constexpr static int _D_i_m_e_n_s_i_o_n_W_o_r_l_d = GridImp::HostGridType::dimensionworld; │ │ │ │ │ -32 │ │ │ │ │ -33 // select appropriate hostgrid geometry via typeswitch │ │ │ │ │ -_3_4 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ -Codim::Geometry _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y_T_y_p_e; │ │ │ │ │ -_3_5 typedef typename GridImp::HostGridType::Traits::template │ │ │ │ │ -Codim::Geometry _H_o_s_t_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e; │ │ │ │ │ +18 // External forward declarations │ │ │ │ │ +19 template< class Grid > │ │ │ │ │ +20 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s; │ │ │ │ │ +21 │ │ │ │ │ +22 │ │ │ │ │ +31 template │ │ │ │ │ +_3_2 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +33 { │ │ │ │ │ +34 │ │ │ │ │ +35 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ 36 │ │ │ │ │ -_3_7 typedef typename std::conditional::type _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y; │ │ │ │ │ +37 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e >; │ │ │ │ │ 38 │ │ │ │ │ -_4_0 typedef typename HostGridGeometryType::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; │ │ │ │ │ -_4_1 typedef typename HostGridGeometryType::JacobianTransposed │ │ │ │ │ -_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ │ +39 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +40 │ │ │ │ │ +41 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ 42 │ │ │ │ │ -43 │ │ │ │ │ -_4_6 _I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y(const _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y& hostGeometry) │ │ │ │ │ -47 : _h_o_s_t_G_e_o_m_e_t_r_y__(hostGeometry) │ │ │ │ │ -48 {} │ │ │ │ │ +43 // The type used to store coordinates │ │ │ │ │ +44 typedef typename GridImp::ctype ctype; │ │ │ │ │ +45 │ │ │ │ │ +46 typedef typename GridImp::HostGridType::LeafGridView::Intersection │ │ │ │ │ +HostLeafIntersection; │ │ │ │ │ +47 │ │ │ │ │ +48 public: │ │ │ │ │ 49 │ │ │ │ │ -50 │ │ │ │ │ -_5_3 GeometryType _t_y_p_e () const { │ │ │ │ │ -54 return _h_o_s_t_G_e_o_m_e_t_r_y__.type(); │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 // return wether we have an affine mapping │ │ │ │ │ -_5_8 bool _a_f_f_i_n_e() const { │ │ │ │ │ -59 return _h_o_s_t_G_e_o_m_e_t_r_y__.affine(); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_3 int _c_o_r_n_e_r_s () const { │ │ │ │ │ -64 return _h_o_s_t_G_e_o_m_e_t_r_y__.corners(); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 │ │ │ │ │ -_6_9 const FieldVector _c_o_r_n_e_r (int i) const { │ │ │ │ │ -70 return _h_o_s_t_G_e_o_m_e_t_r_y__.corner(i); │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 │ │ │ │ │ -_7_6 FieldVector _g_l_o_b_a_l (const FieldVector& _l_o_c_a_l) │ │ │ │ │ -const { │ │ │ │ │ -77 return _h_o_s_t_G_e_o_m_e_t_r_y__.global(_l_o_c_a_l); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -82 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -_8_3 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const FieldVector& _l_o_c_a_l ) const { │ │ │ │ │ -84 return _h_o_s_t_G_e_o_m_e_t_r_y__.jacobianTransposed(_l_o_c_a_l); │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -_8_9 FieldVector _l_o_c_a_l (const FieldVector& _g_l_o_b_a_l) │ │ │ │ │ -const { │ │ │ │ │ -90 return _h_o_s_t_G_e_o_m_e_t_r_y__.local(_g_l_o_b_a_l); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ +_5_0 typedef typename GridImp::template Codim<1>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +_5_1 typedef typename GridImp::template Codim<1>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +_5_2 typedef typename GridImp::template Codim<0>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_5_3 typedef FieldVector _N_o_r_m_a_l_V_e_c_t_o_r; │ │ │ │ │ +54 │ │ │ │ │ +_5_5 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n() │ │ │ │ │ +56 {} │ │ │ │ │ +57 │ │ │ │ │ +_5_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ +59 const HostLeafIntersection& hostIntersection) │ │ │ │ │ +60 : identityGrid_(identityGrid) │ │ │ │ │ +61 , hostIntersection_(hostIntersection) │ │ │ │ │ +62 {} │ │ │ │ │ +63 │ │ │ │ │ +_6_4 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ +65 HostLeafIntersection&& hostIntersection) │ │ │ │ │ +66 : identityGrid_(identityGrid) │ │ │ │ │ +67 , hostIntersection_(_s_t_d::move(hostIntersection)) │ │ │ │ │ +68 {} │ │ │ │ │ +69 │ │ │ │ │ +_7_0 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n& other) const │ │ │ │ │ +71 { │ │ │ │ │ +72 return hostIntersection_ == other.hostIntersection_; │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +_7_7 _E_n_t_i_t_y _i_n_s_i_d_e() const { │ │ │ │ │ +78 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ +(identityGrid_,hostIntersection_.inside()); │ │ │ │ │ +79 } │ │ │ │ │ +80 │ │ │ │ │ +81 │ │ │ │ │ +_8_4 _E_n_t_i_t_y _o_u_t_s_i_d_e() const { │ │ │ │ │ +85 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ +(identityGrid_,hostIntersection_.outside()); │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +88 │ │ │ │ │ +_9_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ │ +91 return hostIntersection_.boundary(); │ │ │ │ │ +92 } │ │ │ │ │ 93 │ │ │ │ │ -_9_5 bool _c_h_e_c_k_I_n_s_i_d_e(const FieldVector &_l_o_c_a_l) const { │ │ │ │ │ -96 return _h_o_s_t_G_e_o_m_e_t_r_y__.checkInside(_l_o_c_a_l); │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -99 │ │ │ │ │ -_1_0_2 ctype _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t (const FieldVector& _l_o_c_a_l) const { │ │ │ │ │ -103 return _h_o_s_t_G_e_o_m_e_t_r_y__.integrationElement(_l_o_c_a_l); │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -106 │ │ │ │ │ -_1_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 (const │ │ │ │ │ -FieldVector& _l_o_c_a_l) const { │ │ │ │ │ -109 return _h_o_s_t_G_e_o_m_e_t_r_y__.jacobianInverseTransposed(_l_o_c_a_l); │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ +_9_9 _N_o_r_m_a_l_V_e_c_t_o_r _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const { │ │ │ │ │ +100 return hostIntersection_.centerUnitOuterNormal(); │ │ │ │ │ +101 } │ │ │ │ │ +102 │ │ │ │ │ +_1_0_4 bool _n_e_i_g_h_b_o_r () const { │ │ │ │ │ +105 return hostIntersection_.neighbor(); │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +_1_0_9 size_t _b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() const { │ │ │ │ │ +110 return hostIntersection_.boundarySegmentIndex(); │ │ │ │ │ +111 } │ │ │ │ │ 112 │ │ │ │ │ -_1_1_3 _H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y _h_o_s_t_G_e_o_m_e_t_r_y__; │ │ │ │ │ -114 │ │ │ │ │ -115 }; │ │ │ │ │ -116 │ │ │ │ │ -117} // namespace Dune │ │ │ │ │ -118 │ │ │ │ │ -119#endif │ │ │ │ │ +_1_1_4 bool _c_o_n_f_o_r_m_i_n_g () const { │ │ │ │ │ +115 return hostIntersection_.conforming(); │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_1_9 GeometryType _t_y_p_e () const { │ │ │ │ │ +120 return hostIntersection_.type(); │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +123 │ │ │ │ │ +_1_2_8 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e () const │ │ │ │ │ +129 { │ │ │ │ │ +130 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInInside() ); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +_1_3_5 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ +136 { │ │ │ │ │ +137 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInOutside() ); │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +_1_4_2 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ +143 { │ │ │ │ │ +144 return _G_e_o_m_e_t_r_y( hostIntersection_.geometry() ); │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +147 │ │ │ │ │ +_1_4_9 int _i_n_d_e_x_I_n_I_n_s_i_d_e () const { │ │ │ │ │ +150 return hostIntersection_.indexInInside(); │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +153 │ │ │ │ │ +_1_5_5 int _i_n_d_e_x_I_n_O_u_t_s_i_d_e () const { │ │ │ │ │ +156 return hostIntersection_.indexInOutside(); │ │ │ │ │ +157 } │ │ │ │ │ +158 │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 FieldVector _o_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ +FieldVector& local) const { │ │ │ │ │ +162 return hostIntersection_.outerNormal(local); │ │ │ │ │ +163 } │ │ │ │ │ +164 │ │ │ │ │ +_1_6_6 FieldVector _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ +FieldVector& local) const { │ │ │ │ │ +167 return hostIntersection_.integrationOuterNormal(local); │ │ │ │ │ +168 } │ │ │ │ │ +169 │ │ │ │ │ +_1_7_1 FieldVector _u_n_i_t_O_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ +FieldVector& local) const { │ │ │ │ │ +172 return hostIntersection_.unitOuterNormal(local); │ │ │ │ │ +173 } │ │ │ │ │ +174 │ │ │ │ │ +175 │ │ │ │ │ +176 private: │ │ │ │ │ +177 //********************************************************** │ │ │ │ │ +178 // private methods │ │ │ │ │ +179 //********************************************************** │ │ │ │ │ +180 │ │ │ │ │ +181 const GridImp* identityGrid_; │ │ │ │ │ +182 │ │ │ │ │ +_1_8_3 HostLeafIntersection hostIntersection_; │ │ │ │ │ +184 }; │ │ │ │ │ +185 │ │ │ │ │ +186 │ │ │ │ │ +187 │ │ │ │ │ +188 │ │ │ │ │ +190 template │ │ │ │ │ +_1_9_1 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +192 { │ │ │ │ │ +193 │ │ │ │ │ +194 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +195 │ │ │ │ │ +196 friend struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< typename _s_t_d::remove_const< GridImp >_:_:_t_y_p_e │ │ │ │ │ +>; │ │ │ │ │ +197 │ │ │ │ │ +198 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +199 │ │ │ │ │ +200 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +201 │ │ │ │ │ +202 // The type used to store coordinates │ │ │ │ │ +203 typedef typename GridImp::ctype ctype; │ │ │ │ │ +204 │ │ │ │ │ +205 typedef typename GridImp::HostGridType::LevelGridView::Intersection │ │ │ │ │ +HostLevelIntersection; │ │ │ │ │ +206 │ │ │ │ │ +207 public: │ │ │ │ │ +208 │ │ │ │ │ +_2_0_9 typedef typename GridImp::template Codim<1>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +_2_1_0 typedef typename GridImp::template Codim<1>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +_2_1_1 typedef typename GridImp::template Codim<0>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_2_1_2 typedef FieldVector _N_o_r_m_a_l_V_e_c_t_o_r; │ │ │ │ │ +213 │ │ │ │ │ +_2_1_4 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n() │ │ │ │ │ +215 {} │ │ │ │ │ +216 │ │ │ │ │ +_2_1_7 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ +218 const HostLevelIntersection& hostIntersection) │ │ │ │ │ +219 : identityGrid_(identityGrid) │ │ │ │ │ +220 , hostIntersection_(hostIntersection) │ │ │ │ │ +221 {} │ │ │ │ │ +222 │ │ │ │ │ +_2_2_3 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n(const GridImp* identityGrid, │ │ │ │ │ +224 HostLevelIntersection&& hostIntersection) │ │ │ │ │ +225 : identityGrid_(identityGrid) │ │ │ │ │ +226 , hostIntersection_(_s_t_d::move(hostIntersection)) │ │ │ │ │ +227 {} │ │ │ │ │ +228 │ │ │ │ │ +_2_2_9 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n& other) const │ │ │ │ │ +230 { │ │ │ │ │ +231 return hostIntersection_ == other.hostIntersection_; │ │ │ │ │ +232 } │ │ │ │ │ +233 │ │ │ │ │ +_2_3_6 _E_n_t_i_t_y _i_n_s_i_d_e() const { │ │ │ │ │ +237 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ +(identityGrid_,hostIntersection_.inside()); │ │ │ │ │ +238 } │ │ │ │ │ +239 │ │ │ │ │ +240 │ │ │ │ │ +_2_4_3 _E_n_t_i_t_y _o_u_t_s_i_d_e() const { │ │ │ │ │ +244 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ │ +(identityGrid_,hostIntersection_.outside()); │ │ │ │ │ +245 } │ │ │ │ │ +246 │ │ │ │ │ +247 │ │ │ │ │ +_2_5_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ │ +251 return hostIntersection_.boundary(); │ │ │ │ │ +252 } │ │ │ │ │ +253 │ │ │ │ │ +_2_5_9 _N_o_r_m_a_l_V_e_c_t_o_r _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const { │ │ │ │ │ +260 return hostIntersection_.centerUnitOuterNormal(); │ │ │ │ │ +261 } │ │ │ │ │ +262 │ │ │ │ │ +_2_6_4 bool _n_e_i_g_h_b_o_r () const { │ │ │ │ │ +265 return hostIntersection_.neighbor(); │ │ │ │ │ +266 } │ │ │ │ │ +267 │ │ │ │ │ +_2_6_9 size_t _b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() const { │ │ │ │ │ +270 return hostIntersection_.boundarySegmentIndex(); │ │ │ │ │ +271 } │ │ │ │ │ +272 │ │ │ │ │ +_2_7_4 bool _c_o_n_f_o_r_m_i_n_g () const { │ │ │ │ │ +275 return hostIntersection_.conforming(); │ │ │ │ │ +276 } │ │ │ │ │ +277 │ │ │ │ │ +_2_7_9 GeometryType _t_y_p_e () const { │ │ │ │ │ +280 return hostIntersection_.type(); │ │ │ │ │ +281 } │ │ │ │ │ +282 │ │ │ │ │ +283 │ │ │ │ │ +_2_8_8 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e () const │ │ │ │ │ +289 { │ │ │ │ │ +290 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInInside() ); │ │ │ │ │ +291 } │ │ │ │ │ +292 │ │ │ │ │ +_2_9_5 _L_o_c_a_l_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ +296 { │ │ │ │ │ +297 return _L_o_c_a_l_G_e_o_m_e_t_r_y( hostIntersection_.geometryInOutside() ); │ │ │ │ │ +298 } │ │ │ │ │ +299 │ │ │ │ │ +_3_0_2 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ +303 { │ │ │ │ │ +304 return _G_e_o_m_e_t_r_y( hostIntersection_.geometry() ); │ │ │ │ │ +305 } │ │ │ │ │ +306 │ │ │ │ │ +307 │ │ │ │ │ +_3_0_9 int _i_n_d_e_x_I_n_I_n_s_i_d_e () const { │ │ │ │ │ +310 return hostIntersection_.indexInInside(); │ │ │ │ │ +311 } │ │ │ │ │ +312 │ │ │ │ │ +313 │ │ │ │ │ +_3_1_5 int _i_n_d_e_x_I_n_O_u_t_s_i_d_e () const { │ │ │ │ │ +316 return hostIntersection_.indexInOutside(); │ │ │ │ │ +317 } │ │ │ │ │ +318 │ │ │ │ │ +319 │ │ │ │ │ +_3_2_1 FieldVector _o_u_t_e_r_N_o_r_m_a_l (const FieldVector& │ │ │ │ │ +local) const { │ │ │ │ │ +322 return hostIntersection_.outerNormal(local); │ │ │ │ │ +323 } │ │ │ │ │ +324 │ │ │ │ │ +_3_2_6 FieldVector _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l (const │ │ │ │ │ +FieldVector& local) const { │ │ │ │ │ +327 return hostIntersection_.integrationOuterNormal(local); │ │ │ │ │ +328 } │ │ │ │ │ +329 │ │ │ │ │ +_3_3_1 FieldVector _u_n_i_t_O_u_t_e_r_N_o_r_m_a_l (const FieldVector& local) const { │ │ │ │ │ +332 return hostIntersection_.unitOuterNormal(local); │ │ │ │ │ +333 } │ │ │ │ │ +334 │ │ │ │ │ +335 private: │ │ │ │ │ +336 │ │ │ │ │ +337 const GridImp* identityGrid_; │ │ │ │ │ +338 │ │ │ │ │ +339 HostLevelIntersection hostIntersection_; │ │ │ │ │ +340 │ │ │ │ │ +341 }; │ │ │ │ │ +342 │ │ │ │ │ +343 │ │ │ │ │ +344} // namespace Dune │ │ │ │ │ +345 │ │ │ │ │ +346#endif │ │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ │ +The IdentityGridEntity class. │ │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +The IdentityGridLeafIterator class. │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_D_e_f_a_u_l_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ -Default implementation for class Geometry. │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:406 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_c_h_e_c_k_I_n_s_i_d_e │ │ │ │ │ -bool checkInside(const FieldVector< ctype, mydim > &local) const │ │ │ │ │ -Returns true if the point is in the current element. │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -JacobianInverseTransposed jacobianInverseTransposed(const FieldVector< ctype, │ │ │ │ │ -mydim > &local) const │ │ │ │ │ -The Jacobian matrix of the mapping from the reference element to this element. │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -JacobianTransposed jacobianTransposed(const FieldVector< ctype, mydim > &local) │ │ │ │ │ -const │ │ │ │ │ -Return the transposed of the Jacobian. │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ -std::conditional< coorddim==DimensionWorld, HostGridGeometryType, │ │ │ │ │ -HostGridLocalGeometryType >::type HostGridGeometry │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ │ -bool affine() const │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_C_o_d_i_m_I_n_H_o_s_t_G_r_i_d │ │ │ │ │ -static constexpr int CodimInHostGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ │ -FieldVector< ctype, coorddim > global(const FieldVector< ctype, mydim > &local) │ │ │ │ │ -const │ │ │ │ │ -Maps a local coordinate within reference element to global coordinate in │ │ │ │ │ -element │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ │ -IdentityGridGeometry(const HostGridGeometry &hostGeometry) │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ +provides access to host grid objects from GeometryGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ │ +The implementation of entities in a IdentityGrid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ │ +allow to visit all nei... │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ │ +("elements") allow to visi... │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ +Entity inside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:77 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection │ │ │ │ │ +&&hostIntersection) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector centerUnitOuterNormal() const │ │ │ │ │ +Return unit outer normal (length == 1) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ +Entity outside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ │ +LocalGeometry geometryInOutside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ +bool boundary() const │ │ │ │ │ +return true if intersection is with boundary. │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ │ GeometryType type() const │ │ │ │ │ -Return the element type identifier. │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ │ -const FieldVector< ctype, coorddim > corner(int i) const │ │ │ │ │ -access to coordinates of corners. Index is the number of the corner │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -HostGridGeometryType::JacobianTransposed JacobianTransposed │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ │ -ctype integrationElement(const FieldVector< ctype, mydim > &local) const │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_h_o_s_t_G_e_o_m_e_t_r_y__ │ │ │ │ │ -HostGridGeometry hostGeometry_ │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_H_o_s_t_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry │ │ │ │ │ -HostGridLocalGeometryType │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_H_o_s_t_G_r_i_d_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Geometry │ │ │ │ │ -HostGridGeometryType │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ │ -HostGridGeometryType::JacobianInverseTransposed JacobianInverseTransposed │ │ │ │ │ -type of jacobian transposed │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_D_i_m_e_n_s_i_o_n_W_o_r_l_d │ │ │ │ │ -static constexpr int DimensionWorld │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ │ -FieldVector< ctype, mydim > local(const FieldVector< ctype, coorddim > &global) │ │ │ │ │ -const │ │ │ │ │ -Maps a global coordinate within the element to a local coordinate in its │ │ │ │ │ -reference element. │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ │ -int corners() const │ │ │ │ │ -return the number of corners of this element. Corners are numbered 0...n-1 │ │ │ │ │ -DDeeffiinniittiioonn identitygridgeometry.hh:63 │ │ │ │ │ -_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ -Wrapper and interface classes for element geometries. │ │ │ │ │ +Geometry type of an intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimworld > NormalVector │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ │ +LocalGeometry geometryInInside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +bool conforming() const │ │ │ │ │ +Return true if this is a conforming intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +IdentityGridLeafIntersection(const GridImp *identityGrid, const │ │ │ │ │ +HostLeafIntersection &hostIntersection) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ │ +return the boundary segment index │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridLeafIntersection &other) const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< │ │ │ │ │ +ctype, GridImp::dimension-1 > &local) const │ │ │ │ │ +return outer normal │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:161 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ │ +int indexInOutside() const │ │ │ │ │ +local number of codim 1 entity in neighbor where intersection is contained │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const │ │ │ │ │ +FieldVector< ctype, GridImp::dimension-1 > &local) const │ │ │ │ │ +return outer normal multiplied by the integration element │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +bool neighbor() const │ │ │ │ │ +return true if across the edge an neighbor on this level exists │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const │ │ │ │ │ +FieldVector< ctype, GridImp::dimension-1 > &local) const │ │ │ │ │ +return unit outer normal │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ +int indexInInside() const │ │ │ │ │ +local number of codim 1 entity in self where intersection is contained in │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 1 >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:302 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:211 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +IdentityGridLevelIntersection(const GridImp *identityGrid, const │ │ │ │ │ +HostLevelIntersection &hostIntersection) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:217 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 1 >::Geometry Geometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:209 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const IdentityGridLevelIntersection &other) const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:229 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ +bool neighbor() const │ │ │ │ │ +return true if across the edge an neighbor on this level exists │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:264 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +NormalVector centerUnitOuterNormal() const │ │ │ │ │ +Return unit outer normal (length == 1) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:259 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +bool conforming() const │ │ │ │ │ +Return true if this is a conforming intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ +int indexInInside() const │ │ │ │ │ +local number of codim 1 entity in self where intersection is contained in │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:309 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > │ │ │ │ │ +&local) const │ │ │ │ │ +return outer normal │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:321 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimworld > NormalVector │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:212 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ +bool boundary() const │ │ │ │ │ +return true if intersection is with boundary. │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:250 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, │ │ │ │ │ +dim-1 > &local) const │ │ │ │ │ +return outer normal multiplied by the integration element │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:326 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ │ +LocalGeometry geometryInOutside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:295 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ │ +LocalGeometry geometryInInside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:288 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ │ +int indexInOutside() const │ │ │ │ │ +local number of codim 1 entity in neighbor where intersection is contained │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:315 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ │ +FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim- │ │ │ │ │ +1 > &local) const │ │ │ │ │ +return unit outer normal │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:331 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ │ +return the boundary segment index │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:269 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ +Entity outside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ +Entity inside() const │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Geometry type of an intersection. │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:279 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +IdentityGridLevelIntersection(const GridImp *identityGrid, │ │ │ │ │ +HostLevelIntersection &&hostIntersection) │ │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:223 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.cc File Reference │ │ │ │ +dune-grid: printgrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,45 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
gnuplot.cc File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
printgrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ -More...

│ │ │ │ -
#include "../gnuplot.hh"
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<typename GridType >
void Dune::printGrid (const GridType &grid, const Dune::MPIHelper &helper, std::string output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, bool local_corner_indices=true, bool local_intersection_indices=true, bool outer_normals=true)
 Print a grid as a gnuplot for testing and development.
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Implementation of gnuplot output for 1D and 2D grids.

│ │ │ │ -
Author
Christian Engwer
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,23 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _g_n_u_p_l_o_t │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -gnuplot.cc File Reference │ │ │ │ │ -Implementation of gnuplot output for 1D and 2D grids. _M_o_r_e_._._. │ │ │ │ │ -#include "_._._/_g_n_u_p_l_o_t_._h_h" │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +printgrid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ │ - Author │ │ │ │ │ - Christian Engwer │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +void  _D_u_n_e_:_:_p_r_i_n_t_G_r_i_d (const GridType &grid, const Dune::MPIHelper &helper, │ │ │ │ │ + std::string output_file="printgrid", int size=2000, bool │ │ │ │ │ + execute_plot=true, bool png=true, bool local_corner_indices=true, bool │ │ │ │ │ + local_intersection_indices=true, bool outer_normals=true) │ │ │ │ │ +  Print a grid as a gnuplot for testing and development. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.cc Source File │ │ │ │ +dune-grid: printgrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,136 +70,226 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gnuplot.cc
│ │ │ │ +
printgrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
10#include "../gnuplot.hh"
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune {
│ │ │ │ -
13
│ │ │ │ -
17 template<class GridView>
│ │ │ │ -
18 void
│ │ │ │ -
│ │ │ │ -
19 GnuplotWriter<GridView>::write(const std::string& filename) const
│ │ │ │ -
20 {
│ │ │ │ -
21 // open file
│ │ │ │ -
22 std::ofstream file(filename.c_str());
│ │ │ │ -
23 // write all column names
│ │ │ │ -
24 file << "# coord\t";
│ │ │ │ -
25 for (size_t i=0; i<_names.size(); i++)
│ │ │ │ -
26 file << _names[i] << "\t";
│ │ │ │ -
27 file << "\n";
│ │ │ │ -
28
│ │ │ │ -
29 if (dimworld==1) {
│ │ │ │ -
30#if !NDEBUG
│ │ │ │ -
31 int counter = 0;
│ │ │ │ -
32#endif
│ │ │ │ -
33 typedef typename GridView::template Codim<0>::Iterator CellIterator;
│ │ │ │ -
34 CellIterator it = _gv.template begin<0>();
│ │ │ │ -
35 CellIterator end = _gv.template end<0>();
│ │ │ │ -
36 for (; it != end; ++it)
│ │ │ │ -
37 {
│ │ │ │ -
38 int i = _is.index(*it);
│ │ │ │ -
39 // check that the elements are numbered consecutively
│ │ │ │ -
40 assert (i == counter++);
│ │ │ │ -
41 // calc positions
│ │ │ │ -
42 assert(it->geometry().corners() == 2);
│ │ │ │ -
43 const FieldVector<ctype,dimworld>& left = it->geometry().corner(0);
│ │ │ │ -
44 const FieldVector<ctype,dimworld>& right = it->geometry().corner(1);
│ │ │ │ -
45 assert(left[0] < right[0]);
│ │ │ │ -
46 // write gnuplot rows for left & right vertex
│ │ │ │ -
47 writeRow(file, left, _data[2*i]);
│ │ │ │ -
48 writeRow(file, right, _data[2*i+1]);
│ │ │ │ -
49 }
│ │ │ │ -
50
│ │ │ │ -
51 } else {
│ │ │ │ -
52
│ │ │ │ -
53 typedef typename GridView::template Codim<dimworld>::Iterator VertexIterator;
│ │ │ │ -
54 VertexIterator it = _gv.template begin<dimworld>();
│ │ │ │ -
55 VertexIterator end = _gv.template end<dimworld>();
│ │ │ │ -
56 for (; it != end; ++it) {
│ │ │ │ -
57
│ │ │ │ -
58 // write gnuplot rows for vertex
│ │ │ │ -
59 writeRow(file, it->geometry().corner(0), _data[_is.index(*it)]);
│ │ │ │ -
60
│ │ │ │ -
61 }
│ │ │ │ -
62
│ │ │ │ -
63 }
│ │ │ │ -
64
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 template<class GridView>
│ │ │ │ -
68 void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
70 const FieldVector<ctype,dimworld>& position,
│ │ │ │ -
71 const std::vector<float> & data) const
│ │ │ │ -
72 {
│ │ │ │ -
73 assert (data.size() == _names.size());
│ │ │ │ -
74 // write position
│ │ │ │ -
75 file << position << "\t";
│ │ │ │ -
76 // write all data columns
│ │ │ │ -
77 for (size_t j=0; j<data.size(); j++)
│ │ │ │ -
78 file << data[j] << "\t";
│ │ │ │ -
79 file << "\n";
│ │ │ │ -
80 }
│ │ │ │ -
81
│ │ │ │ -
87 template<class GridView>
│ │ │ │ -
88 template<class DataContainer>
│ │ │ │ -
89 void
│ │ │ │ -
90 GnuplotWriter<GridView>::addData(DataType t, const DataContainer& data, const std::string & name)
│ │ │ │ -
91 {
│ │ │ │ -
92 assert((t == cellData && _is.size(0) == data.size())
│ │ │ │ -
93 || (t == vertexData && _is.size(GridView::dimension) == data.size()) );
│ │ │ │ -
94 _names.push_back(name);
│ │ │ │ -
95
│ │ │ │ -
96 // copy data to new container
│ │ │ │ -
97
│ │ │ │ -
98 if (dimworld==1) {
│ │ │ │ -
99
│ │ │ │ -
100 // data is transformed to nonconforming vertex data
│ │ │ │ -
101 int c = 0;
│ │ │ │ -
102 int shift = (t==vertexData ? 1 : 0);
│ │ │ │ -
103 for (size_t i=0; i<_is.size(0); i++)
│ │ │ │ -
104 {
│ │ │ │ -
105 _data[c++].push_back(data[i]);
│ │ │ │ -
106 _data[c++].push_back(data[i+shift]);
│ │ │ │ -
107 };
│ │ │ │ -
108
│ │ │ │ -
109 } else {
│ │ │ │ -
110
│ │ │ │ -
111 // 2d: only vertex data is allowed
│ │ │ │ -
112 for (size_t i=0; i<_is.size(dimworld); i++)
│ │ │ │ -
113 _data[i].push_back(data[i]);
│ │ │ │ +
5#ifndef DUNE_PRINTGRID_HH
│ │ │ │ +
6#define DUNE_PRINTGRID_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <string>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │ +
12#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
17 namespace {
│ │ │ │ +
18
│ │ │ │ +
19 template<int dim>
│ │ │ │ +
20 struct ElementDataLayout
│ │ │ │ +
21 {
│ │ │ │ +
22 bool contains (Dune::GeometryType gt)
│ │ │ │ +
23 {
│ │ │ │ +
24 return gt.dim()==dim;
│ │ │ │ +
25 }
│ │ │ │ +
26 };
│ │ │ │ +
27
│ │ │ │ +
28 template<int dim>
│ │ │ │ +
29 struct NodeDataLayout
│ │ │ │ +
30 {
│ │ │ │ +
31 bool contains (Dune::GeometryType gt)
│ │ │ │ +
32 {
│ │ │ │ +
33 return gt.dim()==0;
│ │ │ │ +
34 }
│ │ │ │ +
35 };
│ │ │ │ +
36
│ │ │ │ +
37 // Move a point closer to basegeo's center by factor scale (used for drawing relative to the element)
│ │ │ │ +
38 template <typename B, typename C>
│ │ │ │ +
39 C centrify (const B& basegeo, const C& coords, const double scale) {
│ │ │ │ +
40 C ret = coords;
│ │ │ │ +
41 ret -= basegeo.center();
│ │ │ │ +
42 ret *= scale;
│ │ │ │ +
43 ret += basegeo.center();
│ │ │ │ +
44 return ret;
│ │ │ │ +
45 }
│ │ │ │ +
46
│ │ │ │ +
47 // Add a line to the plotfile from p1 to p2
│ │ │ │ +
48 template <typename Coord>
│ │ │ │ +
49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2, std::string options) {
│ │ │ │ +
50 plotfile << "set object poly from ";
│ │ │ │ +
51 plotfile << p1[0] << "," << p1[1] << " to ";
│ │ │ │ +
52 plotfile << p2[0] << "," << p2[1] << " to ";
│ │ │ │ +
53 plotfile << p1[0] << "," << p1[1];
│ │ │ │ +
54 plotfile << " " << options << std::endl;
│ │ │ │ +
55 }
│ │ │ │ +
56
│ │ │ │ +
57 }
│ │ │ │ +
58
│ │ │ │ +
72 template <typename GridType>
│ │ │ │ +
│ │ │ │ +
73 void printGrid (const GridType& grid, const Dune::MPIHelper& helper, std::string output_file = "printgrid",
│ │ │ │ +
74 int size = 2000, bool execute_plot = true, bool png = true, bool local_corner_indices = true,
│ │ │ │ +
75 bool local_intersection_indices = true, bool outer_normals = true)
│ │ │ │ +
76 {
│ │ │ │ +
77
│ │ │ │ +
78 // Create output file
│ │ │ │ +
79 output_file = output_file + "_" + std::to_string(helper.rank());
│ │ │ │ +
80 std::string plot_file_name = output_file + ".gnuplot";
│ │ │ │ +
81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc);
│ │ │ │ +
82 if (!plotfile.is_open()) {
│ │ │ │ +
83 DUNE_THROW(Dune::IOError, "Could not create plot file " << output_file << "!");
│ │ │ │ +
84 return;
│ │ │ │ +
85 }
│ │ │ │ +
86
│ │ │ │ +
87 // Basic plot settings
│ │ │ │ +
88 plotfile << "set size ratio -1" << std::endl;
│ │ │ │ +
89 if (png) {
│ │ │ │ +
90 plotfile << "set terminal png size " << size << "," << size << std::endl;
│ │ │ │ +
91 plotfile << "set output '" << output_file << ".png'" << std::endl;
│ │ │ │ +
92 } else {
│ │ │ │ +
93 plotfile << "set terminal svg size " << size << "," << size << " enhanced background rgb 'white'" << std::endl;
│ │ │ │ +
94 plotfile << "set output '" << output_file << ".svg'" << std::endl;
│ │ │ │ +
95 }
│ │ │ │ +
96
│ │ │ │ +
97 // Get GridView
│ │ │ │ +
98 typedef typename GridType::LeafGridView GV;
│ │ │ │ +
99 const GV gv = grid.leafGridView();
│ │ │ │ +
100
│ │ │ │ +
101 // Create mappers used to retrieve indices
│ │ │ │ + │ │ │ │ +
103 const Mapper elementmapper(gv, mcmgElementLayout());
│ │ │ │ +
104 const Mapper nodemapper(gv, mcmgVertexLayout());
│ │ │ │ +
105
│ │ │ │ +
106 // Create iterators
│ │ │ │ +
107 typedef typename GV::template Codim<0 >::Iterator LeafIterator;
│ │ │ │ +
108 typedef typename GV::IntersectionIterator IntersectionIterator;
│ │ │ │ +
109
│ │ │ │ +
110 LeafIterator it = gv.template begin<0>();
│ │ │ │ +
111
│ │ │ │ +
112 // Will contain min/max coordinates. Needed for scaling of the plot
│ │ │ │ +
113 Dune::FieldVector<typename GridType::ctype,2> max_coord (it->geometry().center()), min_coord (max_coord);
│ │ │ │
114
│ │ │ │ -
115 }
│ │ │ │ -
116
│ │ │ │ -
117 }
│ │ │ │ -
118
│ │ │ │ -
119}
│ │ │ │ +
115 // Iterate over elements
│ │ │ │ +
116 for (; it != gv.template end<0>(); ++it) {
│ │ │ │ +
117
│ │ │ │ +
118 const auto& entity = *it;
│ │ │ │ +
119 auto geo = entity.geometry();
│ │ │ │ +
120
│ │ │ │ +
121 // Plot element index
│ │ │ │ +
122 int element_id = elementmapper.index(entity);
│ │ │ │ +
123 plotfile << "set label at " << geo.center()[0] << "," << geo.center()[1] << " '"
│ │ │ │ +
124 << element_id << "' center" << std::endl;
│ │ │ │ +
125
│ │ │ │ +
126 for (int i = 0; i < geo.corners(); ++i) {
│ │ │ │ +
127 // Plot corner indices
│ │ │ │ +
128 const int globalNodeNumber1 = nodemapper.subIndex(entity, i, 2);
│ │ │ │ +
129 auto labelpos = centrify (geo, geo.corner(i), 0.7);
│ │ │ │ +
130 plotfile << "set label at " << labelpos[0] << "," << labelpos[1] << " '" << globalNodeNumber1;
│ │ │ │ +
131 if (local_corner_indices)
│ │ │ │ +
132 plotfile << "(" << i << ")";
│ │ │ │ +
133 plotfile << "' center" << std::endl;
│ │ │ │ +
134
│ │ │ │ +
135 // Adapt min / max coordinates
│ │ │ │ +
136 for (int dim = 0; dim < 2; ++dim) {
│ │ │ │ +
137 if (geo.corner(i)[dim] < min_coord[dim])
│ │ │ │ +
138 min_coord[dim] = geo.corner(i)[dim];
│ │ │ │ +
139 else if (geo.corner(i)[dim] > max_coord[dim])
│ │ │ │ +
140 max_coord[dim] = geo.corner(i)[dim];
│ │ │ │ +
141 }
│ │ │ │ +
142 }
│ │ │ │ +
143
│ │ │ │ +
144 // Iterate over intersections
│ │ │ │ +
145 for (IntersectionIterator is = gv.ibegin(entity); is != gv.iend(entity); ++is) {
│ │ │ │ +
146
│ │ │ │ +
147 const auto& intersection = *is;
│ │ │ │ +
148 auto igeo = intersection.geometry();
│ │ │ │ +
149
│ │ │ │ +
150 // Draw intersection line
│ │ │ │ +
151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), "fs empty border 1");
│ │ │ │ +
152
│ │ │ │ +
153 // Plot local intersection index
│ │ │ │ +
154 if (local_intersection_indices) {
│ │ │ │ +
155 auto label_pos = centrify (geo, igeo.center(), 0.8);
│ │ │ │ +
156 plotfile << "set label at " << label_pos[0] << "," << label_pos[1]
│ │ │ │ +
157 << " '" << intersection.indexInInside() << "' center" << std::endl;
│ │ │ │ +
158 }
│ │ │ │ +
159
│ │ │ │ +
160 // Plot outer normal
│ │ │ │ +
161 if (outer_normals) {
│ │ │ │ +
162 auto intersection_pos = igeo.center();
│ │ │ │ +
163 auto normal = intersection.centerUnitOuterNormal();
│ │ │ │ +
164 normal *= 0.15 * igeo.volume();
│ │ │ │ +
165 auto normal_end = intersection_pos + normal;
│ │ │ │ +
166 plotfile << "set arrow from " << intersection_pos[0] << "," << intersection_pos[1]
│ │ │ │ +
167 << " to " << normal_end[0] << "," << normal_end[1] << " lt rgb \"gray\"" << std::endl;
│ │ │ │ +
168 }
│ │ │ │ +
169
│ │ │ │ +
170 // Get corners for inner intersection representation
│ │ │ │ +
171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5);
│ │ │ │ +
172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5);
│ │ │ │ +
173
│ │ │ │ +
174 // Thick line in case of boundary()
│ │ │ │ +
175 if (intersection.boundary())
│ │ │ │ +
176 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 3 lw 4");
│ │ │ │ +
177
│ │ │ │ +
178 // Thin line with color according to neighbor()
│ │ │ │ +
179 if (intersection.neighbor())
│ │ │ │ +
180 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 2");
│ │ │ │ +
181 else
│ │ │ │ +
182 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 1");
│ │ │ │ +
183 }
│ │ │ │ +
184
│ │ │ │ +
185 }
│ │ │ │ +
186
│ │ │ │ +
187 // Finish plot, pass extend of the grid
│ │ │ │ +
188 Dune::FieldVector<typename GridType::ctype,2> extend (max_coord - min_coord);
│ │ │ │ +
189
│ │ │ │ +
190 extend *= 0.2;
│ │ │ │ +
191 min_coord -= extend;
│ │ │ │ +
192 max_coord += extend;
│ │ │ │ +
193 plotfile << "plot [" << min_coord[0] << ":" << max_coord[0] << "] [" << min_coord[1]
│ │ │ │ +
194 << ":" << max_coord[1] << "] NaN notitle" << std::endl;
│ │ │ │ +
195 plotfile.close();
│ │ │ │ +
196
│ │ │ │ +
197 if (execute_plot) {
│ │ │ │ +
198 std::string cmd = "gnuplot -p '" + plot_file_name + "'";
│ │ │ │ +
199 if (std::system (cmd.c_str()) != 0)
│ │ │ │ +
200 DUNE_THROW(Dune::Exception,"Error running GNUPlot: " << cmd);
│ │ │ │ +
201 }
│ │ │ │ +
202 }
│ │ │ │
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ +
203
│ │ │ │ +
204}
│ │ │ │ +
205
│ │ │ │ +
206#endif // #ifndef DUNE_PRINTGRID_HH
│ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │ +
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │ +
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ -
Writer for 1D grids in gnuplot format.
Definition gnuplot.hh:30
│ │ │ │ -
void write(const std::string &filename) const
Write Gnuplot file to disk.
Definition gnuplot.cc:19
│ │ │ │ +
void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, bool local_corner_indices=true, bool local_intersection_indices=true, bool outer_normals=true)
Print a grid as a gnuplot for testing and development.
Definition printgrid.hh:73
│ │ │ │ +
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
│ │ │ │ +
Mapper interface.
Definition mapper.hh:110
│ │ │ │ +
Index index(const EntityType &e) const
Map entity to array index.
Definition mapper.hh:122
│ │ │ │ +
Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity i of codim cc of a codim 0 entity to array index.
Definition mapper.hh:136
│ │ │ │ +
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,139 +2,259 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _g_n_u_p_l_o_t │ │ │ │ │ -gnuplot.cc │ │ │ │ │ +printgrid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -10#include "../gnuplot.hh" │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ │ -13 │ │ │ │ │ -17 template │ │ │ │ │ -18 void │ │ │ │ │ -_1_9 _G_n_u_p_l_o_t_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e(const std::string& filename) const │ │ │ │ │ -20 { │ │ │ │ │ -21 // open file │ │ │ │ │ -22 std::ofstream file(filename.c_str()); │ │ │ │ │ -23 // write all column names │ │ │ │ │ -24 file << "# coord\t"; │ │ │ │ │ -25 for (size_t i=0; i<_names.size(); i++) │ │ │ │ │ -26 file << _names[i] << "\t"; │ │ │ │ │ -27 file << "\n"; │ │ │ │ │ -28 │ │ │ │ │ -29 if (dimworld==1) { │ │ │ │ │ -30#if !NDEBUG │ │ │ │ │ -31 int counter = 0; │ │ │ │ │ -32#endif │ │ │ │ │ -33 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim<0>::Iterator CellIterator; │ │ │ │ │ -34 CellIterator it = _gv.template begin<0>(); │ │ │ │ │ -35 CellIterator end = _gv.template end<0>(); │ │ │ │ │ -36 for (; it != end; ++it) │ │ │ │ │ -37 { │ │ │ │ │ -38 int i = _is.index(*it); │ │ │ │ │ -39 // check that the elements are numbered consecutively │ │ │ │ │ -40 assert (i == counter++); │ │ │ │ │ -41 // calc positions │ │ │ │ │ -42 assert(it->geometry().corners() == 2); │ │ │ │ │ -43 const FieldVector& left = it->geometry().corner(0); │ │ │ │ │ -44 const FieldVector& right = it->geometry().corner(1); │ │ │ │ │ -45 assert(left[0] < right[0]); │ │ │ │ │ -46 // write gnuplot rows for left & right vertex │ │ │ │ │ -47 writeRow(file, left, _data[2*i]); │ │ │ │ │ -48 writeRow(file, right, _data[2*i+1]); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -51 } else { │ │ │ │ │ -52 │ │ │ │ │ -53 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim::Iterator │ │ │ │ │ -VertexIterator; │ │ │ │ │ -54 VertexIterator it = _gv.template begin(); │ │ │ │ │ -55 VertexIterator end = _gv.template end(); │ │ │ │ │ -56 for (; it != end; ++it) { │ │ │ │ │ -57 │ │ │ │ │ -58 // write gnuplot rows for vertex │ │ │ │ │ -59 writeRow(file, it->geometry().corner(0), _data[_is.index(*it)]); │ │ │ │ │ -60 │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 template │ │ │ │ │ -68 void │ │ │ │ │ -_6_9 _G_n_u_p_l_o_t_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_R_o_w(std::ostream & file, │ │ │ │ │ -70 const FieldVector& position, │ │ │ │ │ -71 const std::vector & data) const │ │ │ │ │ -72 { │ │ │ │ │ -73 assert (data.size() == _names.size()); │ │ │ │ │ -74 // write position │ │ │ │ │ -75 file << position << "\t"; │ │ │ │ │ -76 // write all data columns │ │ │ │ │ -77 for (size_t j=0; j │ │ │ │ │ -88 template │ │ │ │ │ -89 void │ │ │ │ │ -90 _G_n_u_p_l_o_t_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_a_d_d_D_a_t_a(DataType t, const DataContainer& data, │ │ │ │ │ -const std::string & name) │ │ │ │ │ -91 { │ │ │ │ │ -92 assert((t == cellData && _is.size(0) == data.size()) │ │ │ │ │ -93 || (t == vertexData && _is.size(_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n) == data.size()) ); │ │ │ │ │ -94 _names.push_back(name); │ │ │ │ │ -95 │ │ │ │ │ -96 // copy data to new container │ │ │ │ │ -97 │ │ │ │ │ -98 if (dimworld==1) { │ │ │ │ │ -99 │ │ │ │ │ -100 // data is transformed to nonconforming vertex data │ │ │ │ │ -101 int c = 0; │ │ │ │ │ -102 int shift = (t==vertexData ? 1 : 0); │ │ │ │ │ -103 for (size_t i=0; i<_is.size(0); i++) │ │ │ │ │ -104 { │ │ │ │ │ -105 _data[c++].push_back(data[i]); │ │ │ │ │ -106 _data[c++].push_back(data[i+shift]); │ │ │ │ │ -107 }; │ │ │ │ │ -108 │ │ │ │ │ -109 } else { │ │ │ │ │ -110 │ │ │ │ │ -111 // 2d: only vertex data is allowed │ │ │ │ │ -112 for (size_t i=0; i<_is.size(dimworld); i++) │ │ │ │ │ -113 _data[i].push_back(data[i]); │ │ │ │ │ +5#ifndef DUNE_PRINTGRID_HH │ │ │ │ │ +6#define DUNE_PRINTGRID_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ │ +16 │ │ │ │ │ +17 namespace { │ │ │ │ │ +18 │ │ │ │ │ +19 template │ │ │ │ │ +20 struct ElementDataLayout │ │ │ │ │ +21 { │ │ │ │ │ +22 bool contains (Dune::GeometryType gt) │ │ │ │ │ +23 { │ │ │ │ │ +24 return gt.dim()==dim; │ │ │ │ │ +25 } │ │ │ │ │ +26 }; │ │ │ │ │ +27 │ │ │ │ │ +28 template │ │ │ │ │ +29 struct NodeDataLayout │ │ │ │ │ +30 { │ │ │ │ │ +31 bool contains (Dune::GeometryType gt) │ │ │ │ │ +32 { │ │ │ │ │ +33 return gt.dim()==0; │ │ │ │ │ +34 } │ │ │ │ │ +35 }; │ │ │ │ │ +36 │ │ │ │ │ +37 // Move a point closer to basegeo's center by factor scale (used for drawing │ │ │ │ │ +relative to the element) │ │ │ │ │ +38 template │ │ │ │ │ +39 C centrify (const B& basegeo, const C& coords, const double scale) { │ │ │ │ │ +40 C ret = coords; │ │ │ │ │ +41 ret -= basegeo.center(); │ │ │ │ │ +42 ret *= scale; │ │ │ │ │ +43 ret += basegeo.center(); │ │ │ │ │ +44 return ret; │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +47 // Add a line to the plotfile from p1 to p2 │ │ │ │ │ +48 template │ │ │ │ │ +49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2, │ │ │ │ │ +std::string options) { │ │ │ │ │ +50 plotfile << "set object poly from "; │ │ │ │ │ +51 plotfile << p1[0] << "," << p1[1] << " to "; │ │ │ │ │ +52 plotfile << p2[0] << "," << p2[1] << " to "; │ │ │ │ │ +53 plotfile << p1[0] << "," << p1[1]; │ │ │ │ │ +54 plotfile << " " << options << std::endl; │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +72 template │ │ │ │ │ +_7_3 void _p_r_i_n_t_G_r_i_d (const GridType& grid, const Dune::MPIHelper& helper, std:: │ │ │ │ │ +string output_file = "printgrid", │ │ │ │ │ +74 int size = 2000, bool execute_plot = true, bool png = true, bool │ │ │ │ │ +local_corner_indices = true, │ │ │ │ │ +75 bool local_intersection_indices = true, bool outer_normals = true) │ │ │ │ │ +76 { │ │ │ │ │ +77 │ │ │ │ │ +78 // Create output file │ │ │ │ │ +79 output_file = output_file + "_" + std::to_string(helper.rank()); │ │ │ │ │ +80 std::string plot_file_name = output_file + ".gnuplot"; │ │ │ │ │ +81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc); │ │ │ │ │ +82 if (!plotfile.is_open()) { │ │ │ │ │ +83 DUNE_THROW(Dune::IOError, "Could not create plot file " << output_file << │ │ │ │ │ +"!"); │ │ │ │ │ +84 return; │ │ │ │ │ +85 } │ │ │ │ │ +86 │ │ │ │ │ +87 // Basic plot settings │ │ │ │ │ +88 plotfile << "set size ratio -1" << std::endl; │ │ │ │ │ +89 if (png) { │ │ │ │ │ +90 plotfile << "set terminal png size " << size << "," << size << std::endl; │ │ │ │ │ +91 plotfile << "set output '" << output_file << ".png'" << std::endl; │ │ │ │ │ +92 } else { │ │ │ │ │ +93 plotfile << "set terminal svg size " << size << "," << size << " enhanced │ │ │ │ │ +background rgb 'white'" << std::endl; │ │ │ │ │ +94 plotfile << "set output '" << output_file << ".svg'" << std::endl; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97 // Get GridView │ │ │ │ │ +98 typedef typename GridType::LeafGridView GV; │ │ │ │ │ +99 const GV gv = grid.leafGridView(); │ │ │ │ │ +100 │ │ │ │ │ +101 // Create mappers used to retrieve indices │ │ │ │ │ +102 typedef typename _D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ │ +103 const _M_a_p_p_e_r elementmapper(gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t()); │ │ │ │ │ +104 const _M_a_p_p_e_r nodemapper(gv, _m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t()); │ │ │ │ │ +105 │ │ │ │ │ +106 // Create iterators │ │ │ │ │ +107 typedef typename GV::template Codim<0 >::Iterator LeafIterator; │ │ │ │ │ +108 typedef typename GV::IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +109 │ │ │ │ │ +110 LeafIterator it = gv.template begin<0>(); │ │ │ │ │ +111 │ │ │ │ │ +112 // Will contain min/max coordinates. Needed for scaling of the plot │ │ │ │ │ +113 Dune::FieldVector max_coord (it->geometry │ │ │ │ │ +().center()), min_coord (max_coord); │ │ │ │ │ 114 │ │ │ │ │ -115 } │ │ │ │ │ -116 │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -119} │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ +115 // Iterate over elements │ │ │ │ │ +116 for (; it != gv.template end<0>(); ++it) { │ │ │ │ │ +117 │ │ │ │ │ +118 const auto& entity = *it; │ │ │ │ │ +119 auto geo = entity.geometry(); │ │ │ │ │ +120 │ │ │ │ │ +121 // Plot element index │ │ │ │ │ +122 int element_id = elementmapper._i_n_d_e_x(entity); │ │ │ │ │ +123 plotfile << "set label at " << geo.center()[0] << "," << geo.center()[1] << │ │ │ │ │ +" '" │ │ │ │ │ +124 << element_id << "' center" << std::endl; │ │ │ │ │ +125 │ │ │ │ │ +126 for (int i = 0; i < geo.corners(); ++i) { │ │ │ │ │ +127 // Plot corner indices │ │ │ │ │ +128 const int globalNodeNumber1 = nodemapper._s_u_b_I_n_d_e_x(entity, i, 2); │ │ │ │ │ +129 auto labelpos = centrify (geo, geo.corner(i), 0.7); │ │ │ │ │ +130 plotfile << "set label at " << labelpos[0] << "," << labelpos[1] << " '" << │ │ │ │ │ +globalNodeNumber1; │ │ │ │ │ +131 if (local_corner_indices) │ │ │ │ │ +132 plotfile << "(" << i << ")"; │ │ │ │ │ +133 plotfile << "' center" << std::endl; │ │ │ │ │ +134 │ │ │ │ │ +135 // Adapt min / max coordinates │ │ │ │ │ +136 for (int dim = 0; dim < 2; ++dim) { │ │ │ │ │ +137 if (geo.corner(i)[dim] < min_coord[dim]) │ │ │ │ │ +138 min_coord[dim] = geo.corner(i)[dim]; │ │ │ │ │ +139 else if (geo.corner(i)[dim] > max_coord[dim]) │ │ │ │ │ +140 max_coord[dim] = geo.corner(i)[dim]; │ │ │ │ │ +141 } │ │ │ │ │ +142 } │ │ │ │ │ +143 │ │ │ │ │ +144 // Iterate over intersections │ │ │ │ │ +145 for (_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r is = gv.ibegin(entity); is != gv.iend(entity); │ │ │ │ │ +++is) { │ │ │ │ │ +146 │ │ │ │ │ +147 const auto& intersection = *is; │ │ │ │ │ +148 auto igeo = intersection.geometry(); │ │ │ │ │ +149 │ │ │ │ │ +150 // Draw intersection line │ │ │ │ │ +151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), "fs empty border 1"); │ │ │ │ │ +152 │ │ │ │ │ +153 // Plot local intersection index │ │ │ │ │ +154 if (local_intersection_indices) { │ │ │ │ │ +155 auto label_pos = centrify (geo, igeo.center(), 0.8); │ │ │ │ │ +156 plotfile << "set label at " << label_pos[0] << "," << label_pos[1] │ │ │ │ │ +157 << " '" << intersection.indexInInside() << "' center" << std::endl; │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +160 // Plot outer normal │ │ │ │ │ +161 if (outer_normals) { │ │ │ │ │ +162 auto intersection_pos = igeo.center(); │ │ │ │ │ +163 auto normal = intersection.centerUnitOuterNormal(); │ │ │ │ │ +164 normal *= 0.15 * igeo.volume(); │ │ │ │ │ +165 auto normal_end = intersection_pos + normal; │ │ │ │ │ +166 plotfile << "set arrow from " << intersection_pos[0] << "," << │ │ │ │ │ +intersection_pos[1] │ │ │ │ │ +167 << " to " << normal_end[0] << "," << normal_end[1] << " lt rgb \"gray\"" << │ │ │ │ │ +std::endl; │ │ │ │ │ +168 } │ │ │ │ │ +169 │ │ │ │ │ +170 // Get corners for inner intersection representation │ │ │ │ │ +171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5); │ │ │ │ │ +172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5); │ │ │ │ │ +173 │ │ │ │ │ +174 // Thick line in case of boundary() │ │ │ │ │ +175 if (intersection.boundary()) │ │ │ │ │ +176 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 3 lw │ │ │ │ │ +4"); │ │ │ │ │ +177 │ │ │ │ │ +178 // Thin line with color according to neighbor() │ │ │ │ │ +179 if (intersection.neighbor()) │ │ │ │ │ +180 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 2"); │ │ │ │ │ +181 else │ │ │ │ │ +182 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 1"); │ │ │ │ │ +183 } │ │ │ │ │ +184 │ │ │ │ │ +185 } │ │ │ │ │ +186 │ │ │ │ │ +187 // Finish plot, pass extend of the grid │ │ │ │ │ +188 Dune::FieldVector extend (max_coord - │ │ │ │ │ +min_coord); │ │ │ │ │ +189 │ │ │ │ │ +190 extend *= 0.2; │ │ │ │ │ +191 min_coord -= extend; │ │ │ │ │ +192 max_coord += extend; │ │ │ │ │ +193 plotfile << "plot [" << min_coord[0] << ":" << max_coord[0] << "] [" << │ │ │ │ │ +min_coord[1] │ │ │ │ │ +194 << ":" << max_coord[1] << "] NaN notitle" << std::endl; │ │ │ │ │ +195 plotfile.close(); │ │ │ │ │ +196 │ │ │ │ │ +197 if (execute_plot) { │ │ │ │ │ +198 std::string cmd = "gnuplot -p '" + plot_file_name + "'"; │ │ │ │ │ +199 if (std::system (cmd.c_str()) != 0) │ │ │ │ │ +200 DUNE_THROW(Dune::Exception,"Error running GNUPlot: " << cmd); │ │ │ │ │ +201 } │ │ │ │ │ +202 } │ │ │ │ │ +203 │ │ │ │ │ +204} │ │ │ │ │ +205 │ │ │ │ │ +206#endif // #ifndef DUNE_PRINTGRID_HH │ │ │ │ │ +_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ +Mapper for multiple codim and multiple geometry types. │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgElementLayout() │ │ │ │ │ +layout for elements (codim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgVertexLayout() │ │ │ │ │ +layout for vertices (dim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:107 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -A struct that collects all associated types of one implementation from the │ │ │ │ │ -Traits class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -Writer for 1D grids in gnuplot format. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -void write(const std::string &filename) const │ │ │ │ │ -Write Gnuplot file to disk. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.cc:19 │ │ │ │ │ +_D_u_n_e_:_:_p_r_i_n_t_G_r_i_d │ │ │ │ │ +void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string │ │ │ │ │ +output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, │ │ │ │ │ +bool local_corner_indices=true, bool local_intersection_indices=true, bool │ │ │ │ │ +outer_normals=true) │ │ │ │ │ +Print a grid as a gnuplot for testing and development. │ │ │ │ │ +DDeeffiinniittiioonn printgrid.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +Mesh entities of codimension 0 ("elements") allow to visit all intersections │ │ │ │ │ +with "neighboring" eleme... │ │ │ │ │ +DDeeffiinniittiioonn common/intersectioniterator.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_r │ │ │ │ │ +Mapper interface. │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ +Index index(const EntityType &e) const │ │ │ │ │ +Map entity to array index. │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ +unsigned int codim) const │ │ │ │ │ +Map subentity i of codim cc of a codim 0 entity to array index. │ │ │ │ │ +DDeeffiinniittiioonn mapper.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshwriter.hh File Reference │ │ │ │ +dune-grid: pvtuwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,45 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
gmshwriter.hh File Reference
│ │ │ │ +
pvtuwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <iomanip>
│ │ │ │ +
#include <ostream>
│ │ │ │ #include <string>
│ │ │ │ -#include <vector>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ +#include <dune/common/indent.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::GmshWriter< GridView >
 Write Gmsh mesh file. More...
class  Dune::VTK::PVTUWriter
 Dump a .vtu/.vtp files contents to a stream. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +2,28 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -gmshwriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +pvtuwriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_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_m_s_h_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  Write _G_m_s_h mesh file. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +  Dump a .vtu/.vtp files contents to a stream. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshwriter.hh Source File │ │ │ │ +dune-grid: pvtuwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,240 +70,197 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gmshwriter.hh
│ │ │ │ +
pvtuwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ -
6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <iomanip>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <vector>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/exceptions.hh>
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16#include <dune/geometry/referenceelements.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20namespace Dune {
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/exceptions.hh>
│ │ │ │ +
13#include <dune/common/indent.hh>
│ │ │ │ +
14
│ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │
21
│ │ │ │ -
35 template <class GridView>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {
│ │ │ │ -
38 private:
│ │ │ │ -
39 const GridView gv;
│ │ │ │ -
40 int precision;
│ │ │ │ -
41
│ │ │ │ -
42 static const unsigned int dim = GridView::dimension;
│ │ │ │ -
43 static const unsigned int dimWorld = GridView::dimensionworld;
│ │ │ │ -
44 static_assert( (dimWorld <= 3), "GmshWriter requires dimWorld <= 3." );
│ │ │ │ -
45
│ │ │ │ -
47 template<typename Entity>
│ │ │ │ -
48 std::size_t nodeIndexFromEntity(const Entity& entity, int i) const {
│ │ │ │ -
49 return gv.indexSet().subIndex(entity, i, dim)+1;
│ │ │ │ -
50 }
│ │ │ │ -
51
│ │ │ │ -
55 static std::size_t translateDuneToGmshType(const GeometryType& type) {
│ │ │ │ -
56 std::size_t element_type;
│ │ │ │ -
57
│ │ │ │ -
58 if (type.isLine())
│ │ │ │ -
59 element_type = 1;
│ │ │ │ -
60 else if (type.isTriangle())
│ │ │ │ -
61 element_type = 2;
│ │ │ │ -
62 else if (type.isQuadrilateral())
│ │ │ │ -
63 element_type = 3;
│ │ │ │ -
64 else if (type.isTetrahedron())
│ │ │ │ -
65 element_type = 4;
│ │ │ │ -
66 else if (type.isHexahedron())
│ │ │ │ -
67 element_type = 5;
│ │ │ │ -
68 else if (type.isPrism())
│ │ │ │ -
69 element_type = 6;
│ │ │ │ -
70 else if (type.isPyramid())
│ │ │ │ -
71 element_type = 7;
│ │ │ │ -
72 else if (type.isVertex())
│ │ │ │ -
73 element_type = 15;
│ │ │ │ -
74 else
│ │ │ │ -
75 DUNE_THROW(Dune::IOError, "GeometryType " << type << " is not supported by gmsh.");
│ │ │ │ -
76
│ │ │ │ -
77 return element_type;
│ │ │ │ -
78 }
│ │ │ │ -
79
│ │ │ │ -
94 void outputElements(std::ofstream& file, const std::vector<int>& physicalEntities, const std::vector<int>& physicalBoundaries) const {
│ │ │ │ - │ │ │ │ -
96 std::size_t counter(1);
│ │ │ │ -
97 for (const auto& entity : elements(gv)) {
│ │ │ │ -
98 // Check whether the type is compatible. If not, close file and rethrow exception.
│ │ │ │ -
99 try {
│ │ │ │ -
100 std::size_t element_type = translateDuneToGmshType(entity.type());
│ │ │ │ -
101
│ │ │ │ -
102 file << counter << " " << element_type;
│ │ │ │ -
103 // If present, set the first tag to the physical entity
│ │ │ │ -
104 if (!physicalEntities.empty())
│ │ │ │ -
105 file << " " << 1 << " " << physicalEntities[elementMapper.index(entity)];
│ │ │ │ -
106 else
│ │ │ │ -
107 file << " " << 0; // "0" for "I do not use any tags."
│ │ │ │ -
108
│ │ │ │ -
109 // Output list of nodes.
│ │ │ │ -
110 // 3, 5 and 7 got different vertex numbering compared to Dune
│ │ │ │ -
111 if (3 == element_type)
│ │ │ │ -
112 file << " "
│ │ │ │ -
113 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
│ │ │ │ -
114 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2);
│ │ │ │ -
115 else if (5 == element_type)
│ │ │ │ -
116 file << " "
│ │ │ │ -
117 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
│ │ │ │ -
118 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
│ │ │ │ -
119 << nodeIndexFromEntity(entity, 4) << " " << nodeIndexFromEntity(entity, 5) << " "
│ │ │ │ -
120 << nodeIndexFromEntity(entity, 7) << " " << nodeIndexFromEntity(entity, 6);
│ │ │ │ -
121 else if (7 == element_type)
│ │ │ │ -
122 file << " "
│ │ │ │ -
123 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
│ │ │ │ -
124 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
│ │ │ │ -
125 << nodeIndexFromEntity(entity, 4);
│ │ │ │ -
126 else {
│ │ │ │ -
127 for (int k = 0; k < entity.geometry().corners(); ++k)
│ │ │ │ -
128 file << " " << nodeIndexFromEntity(entity, k);
│ │ │ │ -
129 }
│ │ │ │ -
130 ++counter;
│ │ │ │ -
131
│ │ │ │ -
132 file << std::endl;
│ │ │ │ +
22 namespace VTK {
│ │ │ │ +
23
│ │ │ │ +
25
│ │ │ │ +
│ │ │ │ +
62 class PVTUWriter {
│ │ │ │ +
63 std::ostream& stream;
│ │ │ │ +
64
│ │ │ │ +
65 std::string fileType;
│ │ │ │ +
66
│ │ │ │ +
67 Indent indent;
│ │ │ │ +
68
│ │ │ │ +
69 public:
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
78 inline PVTUWriter(std::ostream& stream_, FileType fileType_)
│ │ │ │ +
79 : stream(stream_)
│ │ │ │ +
80 {
│ │ │ │ +
81 switch(fileType_) {
│ │ │ │ +
82 case polyData :
│ │ │ │ +
83 fileType = "PPolyData";
│ │ │ │ +
84 break;
│ │ │ │ +
85 case unstructuredGrid :
│ │ │ │ +
86 fileType = "PUnstructuredGrid";
│ │ │ │ +
87 break;
│ │ │ │ +
88 default :
│ │ │ │ +
89 DUNE_THROW(IOError, "PVTUWriter: Unknown fileType: " << fileType_);
│ │ │ │ +
90 }
│ │ │ │ +
91 const std::string& byteOrder = getEndiannessString();
│ │ │ │ +
92
│ │ │ │ +
93 stream << indent << "<?xml version=\"1.0\"?>\n";
│ │ │ │ +
94 stream << indent << "<VTKFile"
│ │ │ │ +
95 << " type=\"" << fileType << "\""
│ │ │ │ +
96 << " version=\"0.1\""
│ │ │ │ +
97 << " byte_order=\"" << byteOrder << "\">\n";
│ │ │ │ +
98 ++indent;
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
102 inline ~PVTUWriter() {
│ │ │ │ +
103 --indent;
│ │ │ │ +
104 stream << indent << "</VTKFile>\n"
│ │ │ │ +
105 << std::flush;
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ +
120 inline void beginPointData(const std::string& scalars = "",
│ │ │ │ +
121 const std::string& vectors = "") {
│ │ │ │ +
122 stream << indent << "<PPointData";
│ │ │ │ +
123 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ +
124 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ +
125 stream << ">\n";
│ │ │ │ +
126 ++indent;
│ │ │ │ +
127 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
129 inline void endPointData() {
│ │ │ │ +
130 --indent;
│ │ │ │ +
131 stream << indent << "</PPointData>\n";
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │
133
│ │ │ │ -
134 // Write boundaries
│ │ │ │ -
135 if (!physicalBoundaries.empty()) {
│ │ │ │ -
136 auto refElement = referenceElement<typename GridView::ctype,dim>(entity.type());
│ │ │ │ -
137 for(const auto& intersection : intersections(gv, entity)) {
│ │ │ │ -
138 if(intersection.boundary()) {
│ │ │ │ -
139 const auto faceLocalIndex(intersection.indexInInside());
│ │ │ │ -
140 file << counter << " " << translateDuneToGmshType(intersection.type())
│ │ │ │ -
141 << " " << 1 << " " << physicalBoundaries[intersection.boundarySegmentIndex()];
│ │ │ │ -
142 for (int k = 0; k < intersection.geometry().corners(); ++k)
│ │ │ │ -
143 {
│ │ │ │ -
144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim));
│ │ │ │ -
145 file << " " << nodeIndexFromEntity(entity, vtxLocalIndex);
│ │ │ │ -
146 }
│ │ │ │ -
147 ++counter;
│ │ │ │ -
148 file << std::endl;
│ │ │ │ -
149 }
│ │ │ │ -
150 }
│ │ │ │ -
151 }
│ │ │ │ -
152
│ │ │ │ -
153 } catch(Exception& e) {
│ │ │ │ -
154 file.close();
│ │ │ │ -
155 throw;
│ │ │ │ -
156 }
│ │ │ │ -
157 }
│ │ │ │ -
158 }
│ │ │ │ +
135
│ │ │ │ +
│ │ │ │ +
146 inline void beginCellData(const std::string& scalars = "",
│ │ │ │ +
147 const std::string& vectors = "") {
│ │ │ │ +
148 stream << indent << "<PCellData";
│ │ │ │ +
149 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ +
150 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ +
151 stream << ">\n";
│ │ │ │ +
152 ++indent;
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
155 inline void endCellData() {
│ │ │ │ +
156 --indent;
│ │ │ │ +
157 stream << indent << "</PCellData>\n";
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │
159
│ │ │ │ -
160
│ │ │ │ -
167 void outputNodes(std::ofstream& file) const {
│ │ │ │ -
168 for (const auto& vertex : vertices(gv)) {
│ │ │ │ -
169 const auto globalCoord = vertex.geometry().center();
│ │ │ │ -
170 const auto nodeIndex = gv.indexSet().index(vertex)+1; // Start counting indices by "1".
│ │ │ │ -
171
│ │ │ │ -
172 if (1 == dimWorld)
│ │ │ │ -
173 file << nodeIndex << " " << globalCoord[0] << " " << 0 << " " << 0 << std::endl;
│ │ │ │ -
174 else if (2 == dimWorld)
│ │ │ │ -
175 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << 0 << std::endl;
│ │ │ │ -
176 else // (3 == dimWorld)
│ │ │ │ -
177 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << globalCoord[2] << std::endl;
│ │ │ │ -
178 }
│ │ │ │ -
179 }
│ │ │ │ -
180
│ │ │ │ -
181 public:
│ │ │ │ -
187 GmshWriter(const GridView& gridView, int numDigits=6) : gv(gridView), precision(numDigits) {}
│ │ │ │ -
188
│ │ │ │ -
│ │ │ │ -
193 void setPrecision(int numDigits) {
│ │ │ │ -
194 precision = numDigits;
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
│ │ │ │ -
218 void write(const std::string& fileName,
│ │ │ │ -
219 const std::vector<int>& physicalEntities=std::vector<int>(),
│ │ │ │ -
220 const std::vector<int>& physicalBoundaries=std::vector<int>()) const {
│ │ │ │ -
221 // Open file
│ │ │ │ -
222 std::ofstream file(fileName.c_str());
│ │ │ │ -
223 if (!file.is_open())
│ │ │ │ -
224 DUNE_THROW(Dune::IOError, "Could not open " << fileName << " with write access.");
│ │ │ │ -
225
│ │ │ │ -
226 // Set precision
│ │ │ │ -
227 file << std::setprecision( precision );
│ │ │ │ -
228
│ │ │ │ -
229 // Output Header
│ │ │ │ -
230 file << "$MeshFormat" << std::endl
│ │ │ │ -
231 << "2.0 0 " << sizeof(double) << std::endl // "2.0" for "version 2.0", "0" for ASCII
│ │ │ │ -
232 << "$EndMeshFormat" << std::endl;
│ │ │ │ -
233
│ │ │ │ -
234 // Output Nodes
│ │ │ │ -
235 file << "$Nodes" << std::endl
│ │ │ │ -
236 << gv.size(dim) << std::endl;
│ │ │ │ -
237
│ │ │ │ -
238 outputNodes(file);
│ │ │ │ -
239
│ │ │ │ -
240 file << "$EndNodes" << std::endl;
│ │ │ │ -
241
│ │ │ │ -
242 // Output Elements;
│ │ │ │ -
243 int boundariesSize(0);
│ │ │ │ -
244 if(!physicalBoundaries.empty())
│ │ │ │ -
245 for(const auto& entity : elements(gv))
│ │ │ │ -
246 for(const auto& intersection : intersections(gv, entity))
│ │ │ │ -
247 if(intersection.boundary())
│ │ │ │ -
248 ++boundariesSize;
│ │ │ │ -
249
│ │ │ │ -
250 file << "$Elements" << std::endl
│ │ │ │ -
251 << gv.size(0) + boundariesSize<< std::endl;
│ │ │ │ -
252
│ │ │ │ -
253 outputElements(file, physicalEntities, physicalBoundaries);
│ │ │ │ -
254
│ │ │ │ -
255 file << "$EndElements" << std::endl;
│ │ │ │ -
256 }
│ │ │ │ -
│ │ │ │ -
257
│ │ │ │ -
258 };
│ │ │ │ -
│ │ │ │ -
259
│ │ │ │ -
260} // namespace Dune
│ │ │ │ -
261
│ │ │ │ -
262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ │ -
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:191
│ │ │ │ -
int size(int codim) const
obtain number of entities in a given codimension
Definition common/gridview.hh:197
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:151
│ │ │ │ -
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │ +
161
│ │ │ │ +
│ │ │ │ +
166 inline void beginPoints() {
│ │ │ │ +
167 stream << indent << "<PPoints>\n";
│ │ │ │ +
168 ++indent;
│ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
171 inline void endPoints() {
│ │ │ │ +
172 --indent;
│ │ │ │ +
173 stream << indent << "</PPoints>\n";
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
177
│ │ │ │ +
│ │ │ │ +
189 inline void beginMain(unsigned ghostLevel = 0) {
│ │ │ │ +
190 stream << indent << "<" << fileType
│ │ │ │ +
191 << " GhostLevel=\"" << ghostLevel << "\">\n";
│ │ │ │ +
192 ++indent;
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
195 inline void endMain() {
│ │ │ │ +
196 --indent;
│ │ │ │ +
197 stream << indent << "</" << fileType << ">\n";
│ │ │ │ +
198 }
│ │ │ │ +
│ │ │ │ +
199
│ │ │ │ +
201
│ │ │ │ +
│ │ │ │ +
207 void addArray(const std::string& name, unsigned ncomps, Precision prec) {
│ │ │ │ +
208 stream << indent << "<PDataArray"
│ │ │ │ +
209 << " type=\"" << toString(prec) << "\""
│ │ │ │ +
210 << " Name=\"" << name << "\""
│ │ │ │ +
211 << " NumberOfComponents=\"" << ncomps << "\"/>\n";
│ │ │ │ +
212 }
│ │ │ │ +
│ │ │ │ +
213
│ │ │ │ +
│ │ │ │ +
215 inline void addPiece(const std::string& filename) {
│ │ │ │ +
216 stream << indent << "<Piece "
│ │ │ │ +
217 << " Source=\"" << filename << "\"/>\n";
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219 };
│ │ │ │ +
│ │ │ │ +
220
│ │ │ │ +
221 } // namespace VTK
│ │ │ │ +
222
│ │ │ │ +
224
│ │ │ │ +
225} // namespace Dune
│ │ │ │ +
226
│ │ │ │ +
227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Geometry geometry() const
obtain geometric realization of the entity
Definition common/entity.hh:141
│ │ │ │ -
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition common/entity.hh:146
│ │ │ │ -
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ -
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ -
Index index(const EntityType &e) const
Map entity to starting index in array for dof block.
Definition mcmgmapper.hh:171
│ │ │ │ -
Write Gmsh mesh file.
Definition gmshwriter.hh:37
│ │ │ │ -
GmshWriter(const GridView &gridView, int numDigits=6)
Constructor expecting GridView of Grid to be written.
Definition gmshwriter.hh:187
│ │ │ │ -
void setPrecision(int numDigits)
Set the number of digits to be used when writing the vertices. By default is 6.
Definition gmshwriter.hh:193
│ │ │ │ -
void write(const std::string &fileName, const std::vector< int > &physicalEntities=std::vector< int >(), const std::vector< int > &physicalBoundaries=std::vector< int >()) const
Write given grid in Gmsh 2.0 compatible ASCII file.
Definition gmshwriter.hh:218
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ +
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ +
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ +
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ +
std::string toString(Precision p)
map precision to VTK type name
Definition common.hh:280
│ │ │ │ +
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ +
~PVTUWriter()
write footer
Definition pvtuwriter.hh:102
│ │ │ │ +
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition pvtuwriter.hh:195
│ │ │ │ +
void endCellData()
finish CellData section
Definition pvtuwriter.hh:155
│ │ │ │ +
void addArray(const std::string &name, unsigned ncomps, Precision prec)
Add an array to the output file.
Definition pvtuwriter.hh:207
│ │ │ │ +
void beginMain(unsigned ghostLevel=0)
start the main PPolyData/PUnstructuredGrid section
Definition pvtuwriter.hh:189
│ │ │ │ +
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition pvtuwriter.hh:146
│ │ │ │ +
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition pvtuwriter.hh:120
│ │ │ │ +
void addPiece(const std::string &filename)
Add a serial piece to the output file.
Definition pvtuwriter.hh:215
│ │ │ │ +
PVTUWriter(std::ostream &stream_, FileType fileType_)
create a PVTUWriter object
Definition pvtuwriter.hh:78
│ │ │ │ +
void endPointData()
finish PointData section
Definition pvtuwriter.hh:129
│ │ │ │ +
void endPoints()
finish section for the point coordinates
Definition pvtuwriter.hh:171
│ │ │ │ +
void beginPoints()
start section for the point coordinates
Definition pvtuwriter.hh:166
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,292 +2,224 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -gmshwriter.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +pvtuwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ -6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -19 │ │ │ │ │ -20namespace _D_u_n_e { │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ │ +18 │ │ │ │ │ 21 │ │ │ │ │ -35 template │ │ │ │ │ -_3_6 class _G_m_s_h_W_r_i_t_e_r │ │ │ │ │ -37 { │ │ │ │ │ -38 private: │ │ │ │ │ -39 const _G_r_i_d_V_i_e_w gv; │ │ │ │ │ -40 int precision; │ │ │ │ │ -41 │ │ │ │ │ -42 static const unsigned int dim = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -43 static const unsigned int dimWorld = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -44 static_assert( (dimWorld <= 3), "GmshWriter requires dimWorld <= 3." ); │ │ │ │ │ -45 │ │ │ │ │ -47 template │ │ │ │ │ -48 std::size_t nodeIndexFromEntity(const _E_n_t_i_t_y& entity, int i) const { │ │ │ │ │ -49 return gv._i_n_d_e_x_S_e_t().subIndex(entity, i, dim)+1; │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -55 static std::size_t translateDuneToGmshType(const GeometryType& type) { │ │ │ │ │ -56 std::size_t element_type; │ │ │ │ │ -57 │ │ │ │ │ -58 if (type.isLine()) │ │ │ │ │ -59 element_type = 1; │ │ │ │ │ -60 else if (type.isTriangle()) │ │ │ │ │ -61 element_type = 2; │ │ │ │ │ -62 else if (type.isQuadrilateral()) │ │ │ │ │ -63 element_type = 3; │ │ │ │ │ -64 else if (type.isTetrahedron()) │ │ │ │ │ -65 element_type = 4; │ │ │ │ │ -66 else if (type.isHexahedron()) │ │ │ │ │ -67 element_type = 5; │ │ │ │ │ -68 else if (type.isPrism()) │ │ │ │ │ -69 element_type = 6; │ │ │ │ │ -70 else if (type.isPyramid()) │ │ │ │ │ -71 element_type = 7; │ │ │ │ │ -72 else if (type.isVertex()) │ │ │ │ │ -73 element_type = 15; │ │ │ │ │ -74 else │ │ │ │ │ -75 DUNE_THROW(Dune::IOError, "GeometryType " << type << " is not supported by │ │ │ │ │ -gmsh."); │ │ │ │ │ -76 │ │ │ │ │ -77 return element_type; │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -94 void outputElements(std::ofstream& file, const std::vector& │ │ │ │ │ -physicalEntities, const std::vector& physicalBoundaries) const { │ │ │ │ │ -95 _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_r_i_d_V_i_e_w_> elementMapper(gv, │ │ │ │ │ -_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t()); │ │ │ │ │ -96 std::size_t counter(1); │ │ │ │ │ -97 for (const auto& entity : elements(gv)) { │ │ │ │ │ -98 // Check whether the type is compatible. If not, close file and rethrow │ │ │ │ │ -exception. │ │ │ │ │ -99 try { │ │ │ │ │ -100 std::size_t element_type = translateDuneToGmshType(entity._t_y_p_e()); │ │ │ │ │ -101 │ │ │ │ │ -102 file << counter << " " << element_type; │ │ │ │ │ -103 // If present, set the first tag to the physical entity │ │ │ │ │ -104 if (!physicalEntities.empty()) │ │ │ │ │ -105 file << " " << 1 << " " << physicalEntities[elementMapper._i_n_d_e_x(entity)]; │ │ │ │ │ -106 else │ │ │ │ │ -107 file << " " << 0; // "0" for "I do not use any tags." │ │ │ │ │ -108 │ │ │ │ │ -109 // Output list of nodes. │ │ │ │ │ -110 // 3, 5 and 7 got different vertex numbering compared to Dune │ │ │ │ │ -111 if (3 == element_type) │ │ │ │ │ -112 file << " " │ │ │ │ │ -113 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) │ │ │ │ │ -<< " " │ │ │ │ │ -114 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2); │ │ │ │ │ -115 else if (5 == element_type) │ │ │ │ │ -116 file << " " │ │ │ │ │ -117 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) │ │ │ │ │ -<< " " │ │ │ │ │ -118 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) │ │ │ │ │ -<< " " │ │ │ │ │ -119 << nodeIndexFromEntity(entity, 4) << " " << nodeIndexFromEntity(entity, 5) │ │ │ │ │ -<< " " │ │ │ │ │ -120 << nodeIndexFromEntity(entity, 7) << " " << nodeIndexFromEntity(entity, 6); │ │ │ │ │ -121 else if (7 == element_type) │ │ │ │ │ -122 file << " " │ │ │ │ │ -123 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) │ │ │ │ │ -<< " " │ │ │ │ │ -124 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) │ │ │ │ │ -<< " " │ │ │ │ │ -125 << nodeIndexFromEntity(entity, 4); │ │ │ │ │ -126 else { │ │ │ │ │ -127 for (int k = 0; k < entity._g_e_o_m_e_t_r_y().corners(); ++k) │ │ │ │ │ -128 file << " " << nodeIndexFromEntity(entity, k); │ │ │ │ │ -129 } │ │ │ │ │ -130 ++counter; │ │ │ │ │ -131 │ │ │ │ │ -132 file << std::endl; │ │ │ │ │ +22 namespace VTK { │ │ │ │ │ +23 │ │ │ │ │ +25 │ │ │ │ │ +_6_2 class _P_V_T_U_W_r_i_t_e_r { │ │ │ │ │ +63 std::ostream& stream; │ │ │ │ │ +64 │ │ │ │ │ +65 std::string fileType; │ │ │ │ │ +66 │ │ │ │ │ +67 Indent indent; │ │ │ │ │ +68 │ │ │ │ │ +69 public: │ │ │ │ │ +71 │ │ │ │ │ +_7_8 inline _P_V_T_U_W_r_i_t_e_r(std::ostream& stream_, _F_i_l_e_T_y_p_e fileType_) │ │ │ │ │ +79 : stream(stream_) │ │ │ │ │ +80 { │ │ │ │ │ +81 switch(fileType_) { │ │ │ │ │ +82 case _p_o_l_y_D_a_t_a : │ │ │ │ │ +83 fileType = "PPolyData"; │ │ │ │ │ +84 break; │ │ │ │ │ +85 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : │ │ │ │ │ +86 fileType = "PUnstructuredGrid"; │ │ │ │ │ +87 break; │ │ │ │ │ +88 default : │ │ │ │ │ +89 DUNE_THROW(IOError, "PVTUWriter: Unknown fileType: " << fileType_); │ │ │ │ │ +90 } │ │ │ │ │ +91 const std::string& byteOrder = _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g(); │ │ │ │ │ +92 │ │ │ │ │ +93 stream << indent << "\n"; │ │ │ │ │ +94 stream << indent << "\n"; │ │ │ │ │ +98 ++indent; │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +_1_0_2 inline _~_P_V_T_U_W_r_i_t_e_r() { │ │ │ │ │ +103 --indent; │ │ │ │ │ +104 stream << indent << "\n" │ │ │ │ │ +105 << std::flush; │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +109 │ │ │ │ │ +_1_2_0 inline void _b_e_g_i_n_P_o_i_n_t_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ +121 const std::string& vectors = "") { │ │ │ │ │ +122 stream << indent << "\n"; │ │ │ │ │ +126 ++indent; │ │ │ │ │ +127 } │ │ │ │ │ +_1_2_9 inline void _e_n_d_P_o_i_n_t_D_a_t_a() { │ │ │ │ │ +130 --indent; │ │ │ │ │ +131 stream << indent << "\n"; │ │ │ │ │ +132 } │ │ │ │ │ 133 │ │ │ │ │ -134 // Write boundaries │ │ │ │ │ -135 if (!physicalBoundaries.empty()) { │ │ │ │ │ -136 auto refElement = referenceElement │ │ │ │ │ -(entity._t_y_p_e()); │ │ │ │ │ -137 for(const auto& intersection : intersections(gv, entity)) { │ │ │ │ │ -138 if(intersection.boundary()) { │ │ │ │ │ -139 const auto faceLocalIndex(intersection.indexInInside()); │ │ │ │ │ -140 file << counter << " " << translateDuneToGmshType(intersection.type()) │ │ │ │ │ -141 << " " << 1 << " " << physicalBoundaries[intersection.boundarySegmentIndex │ │ │ │ │ -()]; │ │ │ │ │ -142 for (int k = 0; k < intersection.geometry().corners(); ++k) │ │ │ │ │ -143 { │ │ │ │ │ -144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim)); │ │ │ │ │ -145 file << " " << nodeIndexFromEntity(entity, vtxLocalIndex); │ │ │ │ │ -146 } │ │ │ │ │ -147 ++counter; │ │ │ │ │ -148 file << std::endl; │ │ │ │ │ -149 } │ │ │ │ │ -150 } │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -153 } catch(Exception& e) { │ │ │ │ │ -154 file.close(); │ │ │ │ │ -155 throw; │ │ │ │ │ -156 } │ │ │ │ │ -157 } │ │ │ │ │ +135 │ │ │ │ │ +_1_4_6 inline void _b_e_g_i_n_C_e_l_l_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ +147 const std::string& vectors = "") { │ │ │ │ │ +148 stream << indent << "\n"; │ │ │ │ │ +152 ++indent; │ │ │ │ │ +153 } │ │ │ │ │ +_1_5_5 inline void _e_n_d_C_e_l_l_D_a_t_a() { │ │ │ │ │ +156 --indent; │ │ │ │ │ +157 stream << indent << "\n"; │ │ │ │ │ 158 } │ │ │ │ │ 159 │ │ │ │ │ -160 │ │ │ │ │ -167 void outputNodes(std::ofstream& file) const { │ │ │ │ │ -168 for (const auto& vertex : vertices(gv)) { │ │ │ │ │ -169 const auto globalCoord = vertex.geometry().center(); │ │ │ │ │ -170 const auto nodeIndex = gv._i_n_d_e_x_S_e_t().index(vertex)+1; // Start counting │ │ │ │ │ -indices by "1". │ │ │ │ │ -171 │ │ │ │ │ -172 if (1 == dimWorld) │ │ │ │ │ -173 file << nodeIndex << " " << globalCoord[0] << " " << 0 << " " << 0 << std:: │ │ │ │ │ -endl; │ │ │ │ │ -174 else if (2 == dimWorld) │ │ │ │ │ -175 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " │ │ │ │ │ -<< 0 << std::endl; │ │ │ │ │ -176 else // (3 == dimWorld) │ │ │ │ │ -177 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " │ │ │ │ │ -<< globalCoord[2] << std::endl; │ │ │ │ │ -178 } │ │ │ │ │ -179 } │ │ │ │ │ -180 │ │ │ │ │ -181 public: │ │ │ │ │ -_1_8_7 _G_m_s_h_W_r_i_t_e_r(const _G_r_i_d_V_i_e_w& gridView, int numDigits=6) : gv(gridView), │ │ │ │ │ -precision(numDigits) {} │ │ │ │ │ -188 │ │ │ │ │ -_1_9_3 void _s_e_t_P_r_e_c_i_s_i_o_n(int numDigits) { │ │ │ │ │ -194 precision = numDigits; │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -_2_1_8 void _w_r_i_t_e(const std::string& fileName, │ │ │ │ │ -219 const std::vector& physicalEntities=std::vector(), │ │ │ │ │ -220 const std::vector& physicalBoundaries=std::vector()) const { │ │ │ │ │ -221 // Open file │ │ │ │ │ -222 std::ofstream file(fileName.c_str()); │ │ │ │ │ -223 if (!file.is_open()) │ │ │ │ │ -224 DUNE_THROW(Dune::IOError, "Could not open " << fileName << " with write │ │ │ │ │ -access."); │ │ │ │ │ -225 │ │ │ │ │ -226 // Set precision │ │ │ │ │ -227 file << std::setprecision( precision ); │ │ │ │ │ -228 │ │ │ │ │ -229 // Output Header │ │ │ │ │ -230 file << "$MeshFormat" << std::endl │ │ │ │ │ -231 << "2.0 0 " << sizeof(double) << std::endl // "2.0" for "version 2.0", "0" │ │ │ │ │ -for ASCII │ │ │ │ │ -232 << "$EndMeshFormat" << std::endl; │ │ │ │ │ -233 │ │ │ │ │ -234 // Output Nodes │ │ │ │ │ -235 file << "$Nodes" << std::endl │ │ │ │ │ -236 << gv._s_i_z_e(dim) << std::endl; │ │ │ │ │ -237 │ │ │ │ │ -238 outputNodes(file); │ │ │ │ │ -239 │ │ │ │ │ -240 file << "$EndNodes" << std::endl; │ │ │ │ │ -241 │ │ │ │ │ -242 // Output Elements; │ │ │ │ │ -243 int boundariesSize(0); │ │ │ │ │ -244 if(!physicalBoundaries.empty()) │ │ │ │ │ -245 for(const auto& entity : elements(gv)) │ │ │ │ │ -246 for(const auto& intersection : intersections(gv, entity)) │ │ │ │ │ -247 if(intersection.boundary()) │ │ │ │ │ -248 ++boundariesSize; │ │ │ │ │ -249 │ │ │ │ │ -250 file << "$Elements" << std::endl │ │ │ │ │ -251 << gv._s_i_z_e(0) + boundariesSize<< std::endl; │ │ │ │ │ -252 │ │ │ │ │ -253 outputElements(file, physicalEntities, physicalBoundaries); │ │ │ │ │ -254 │ │ │ │ │ -255 file << "$EndElements" << std::endl; │ │ │ │ │ -256 } │ │ │ │ │ -257 │ │ │ │ │ -258 }; │ │ │ │ │ -259 │ │ │ │ │ -260} // namespace Dune │ │ │ │ │ -261 │ │ │ │ │ -262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ -_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ -Mapper for multiple codim and multiple geometry types. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ -const IndexSet & indexSet() const │ │ │ │ │ -obtain the index set │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ -int size(int codim) const │ │ │ │ │ -obtain number of entities in a given codimension │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static constexpr int dimensionworld │ │ │ │ │ -The dimension of the world the grid lives in. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ -MCMGLayout mcmgElementLayout() │ │ │ │ │ -layout for elements (codim-0 entities) │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ +161 │ │ │ │ │ +_1_6_6 inline void _b_e_g_i_n_P_o_i_n_t_s() { │ │ │ │ │ +167 stream << indent << "\n"; │ │ │ │ │ +168 ++indent; │ │ │ │ │ +169 } │ │ │ │ │ +_1_7_1 inline void _e_n_d_P_o_i_n_t_s() { │ │ │ │ │ +172 --indent; │ │ │ │ │ +173 stream << indent << "\n"; │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +177 │ │ │ │ │ +_1_8_9 inline void _b_e_g_i_n_M_a_i_n(unsigned ghostLevel = 0) { │ │ │ │ │ +190 stream << indent << "<" << fileType │ │ │ │ │ +191 << " GhostLevel=\"" << ghostLevel << "\">\n"; │ │ │ │ │ +192 ++indent; │ │ │ │ │ +193 } │ │ │ │ │ +_1_9_5 inline void _e_n_d_M_a_i_n() { │ │ │ │ │ +196 --indent; │ │ │ │ │ +197 stream << indent << "\n"; │ │ │ │ │ +198 } │ │ │ │ │ +199 │ │ │ │ │ +201 │ │ │ │ │ +_2_0_7 void _a_d_d_A_r_r_a_y(const std::string& name, unsigned ncomps, _P_r_e_c_i_s_i_o_n prec) { │ │ │ │ │ +208 stream << indent << "\n"; │ │ │ │ │ +212 } │ │ │ │ │ +213 │ │ │ │ │ +_2_1_5 inline void _a_d_d_P_i_e_c_e(const std::string& filename) { │ │ │ │ │ +216 stream << indent << "\n"; │ │ │ │ │ +218 } │ │ │ │ │ +219 }; │ │ │ │ │ +220 │ │ │ │ │ +221 } // namespace VTK │ │ │ │ │ +222 │ │ │ │ │ +224 │ │ │ │ │ +225} // namespace Dune │ │ │ │ │ +226 │ │ │ │ │ +227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -obtain geometric realization of the entity │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Return the name of the reference element. The type can be used to access the │ │ │ │ │ -Dune::ReferenceElement. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid view abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ │ -Map entity to starting index in array for dof block. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r │ │ │ │ │ -Write Gmsh mesh file. │ │ │ │ │ -DDeeffiinniittiioonn gmshwriter.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_:_:_G_m_s_h_W_r_i_t_e_r │ │ │ │ │ -GmshWriter(const GridView &gridView, int numDigits=6) │ │ │ │ │ -Constructor expecting GridView of Grid to be written. │ │ │ │ │ -DDeeffiinniittiioonn gmshwriter.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_:_:_s_e_t_P_r_e_c_i_s_i_o_n │ │ │ │ │ -void setPrecision(int numDigits) │ │ │ │ │ -Set the number of digits to be used when writing the vertices. By default is 6. │ │ │ │ │ -DDeeffiinniittiioonn gmshwriter.hh:193 │ │ │ │ │ -_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -void write(const std::string &fileName, const std::vector< int > │ │ │ │ │ -&physicalEntities=std::vector< int >(), const std::vector< int > │ │ │ │ │ -&physicalBoundaries=std::vector< int >()) const │ │ │ │ │ -Write given grid in Gmsh 2.0 compatible ASCII file. │ │ │ │ │ -DDeeffiinniittiioonn gmshwriter.hh:218 │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ +FileType │ │ │ │ │ +which type of VTK file to write │ │ │ │ │ +DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ +@ polyData │ │ │ │ │ +for .vtp files (PolyData) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ +@ unstructuredGrid │ │ │ │ │ +for .vtu files (UnstructuredGrid) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g │ │ │ │ │ +std::string toString(Precision p) │ │ │ │ │ +map precision to VTK type name │ │ │ │ │ +DDeeffiinniittiioonn common.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ +std::string getEndiannessString() │ │ │ │ │ +determine endianness of this C++ implementation │ │ │ │ │ +DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_~_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +~PVTUWriter() │ │ │ │ │ +write footer │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ +void endMain() │ │ │ │ │ +finish the main PolyData/UnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void endCellData() │ │ │ │ │ +finish CellData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +void addArray(const std::string &name, unsigned ncomps, Precision prec) │ │ │ │ │ +Add an array to the output file. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ +void beginMain(unsigned ghostLevel=0) │ │ │ │ │ +start the main PPolyData/PUnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ +void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start CellData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start PointData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:120 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_P_i_e_c_e │ │ │ │ │ +void addPiece(const std::string &filename) │ │ │ │ │ +Add a serial piece to the output file. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:215 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +PVTUWriter(std::ostream &stream_, FileType fileType_) │ │ │ │ │ +create a PVTUWriter object │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void endPointData() │ │ │ │ │ +finish PointData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +void endPoints() │ │ │ │ │ +finish section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +void beginPoints() │ │ │ │ │ +start section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:166 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfexception.hh File Reference │ │ │ │ +dune-grid: boundarywriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfexception.hh File Reference
│ │ │ │ +
boundarywriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/exceptions.hh>
│ │ │ │ +
#include <memory>
│ │ │ │ +#include <string>
│ │ │ │ +#include <dune/grid/io/file/vtk/basicwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/boundaryiterators.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/skeletonfunction.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::DGFException
 exception class for IO errors in the DGF parser More...
class  Dune::VTK::NonConformingBoundaryWriter< GV >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,22 +2,27 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfexception.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +boundarywriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_o_u_n_d_a_r_y_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_k_e_l_e_t_o_n_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -  exception class for IO errors in the DGF parser _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_<_ _G_V_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfexception.hh Source File │ │ │ │ +dune-grid: boundarywriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,44 +70,116 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfexception.hh
│ │ │ │ +
boundarywriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_DGFEXCEPTION_HH
│ │ │ │ -
6#define DUNE_GRID_DGFEXCEPTION_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/common/exceptions.hh>
│ │ │ │ -
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ -
12
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
15 : public IOError
│ │ │ │ -
16 {};
│ │ │ │ -
│ │ │ │ -
17
│ │ │ │ -
18}
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <memory>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │
19
│ │ │ │ -
20#endif
│ │ │ │ +
20 namespace VTK {
│ │ │ │ +
21
│ │ │ │ +
22 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
│ │ │ │ +
26 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
29
│ │ │ │ +
30 const GV& gv;
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
│ │ │ │ +
35 { }
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ + │ │ │ │ +
38
│ │ │ │ +
39 template<typename Func>
│ │ │ │ +
│ │ │ │ +
40 void addCellData(const std::shared_ptr<Func>& p, const std::string& name) {
│ │ │ │ +
41 addCellData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ +
42 (new SkeletonFunctionWriter<Func>(p, name)));
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
45 template<typename Func>
│ │ │ │ +
│ │ │ │ +
46 void addCellData(Func* p, const std::string& name) {
│ │ │ │ +
47 addCellData(std::shared_ptr<Func>(p), name);
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ + │ │ │ │ +
51
│ │ │ │ +
52 template<typename Func>
│ │ │ │ +
│ │ │ │ +
53 void addPointData(const std::shared_ptr<Func>& p, const std::string& name) {
│ │ │ │ +
54 addPointData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ +
55 (new SkeletonFunctionWriter<Func>(p, name)));
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 template<typename Func>
│ │ │ │ +
│ │ │ │ +
59 void addPointData(Func* p, const std::string& name) {
│ │ │ │ +
60 addPointData(std::shared_ptr<Func>(p), name);
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
63 };
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
65 } // namespace VTK
│ │ │ │ +
66
│ │ │ │ +
68
│ │ │ │ +
69} // namespace Dune
│ │ │ │ +
70
│ │ │ │ +
71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
│ │ │ │ +
Functions for VTK output on the skeleton.
│ │ │ │ +
Functions for VTK output on the skeleton.
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Definition basicwriter.hh:35
│ │ │ │ +
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:76
│ │ │ │ +
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ +
Definition boundaryiterators.hh:159
│ │ │ │ +
Definition boundarywriter.hh:26
│ │ │ │ +
void addPointData(const std::shared_ptr< Func > &p, const std::string &name)
Definition boundarywriter.hh:53
│ │ │ │ +
void addCellData(Func *p, const std::string &name)
Definition boundarywriter.hh:46
│ │ │ │ +
void addPointData(Func *p, const std::string &name)
Definition boundarywriter.hh:59
│ │ │ │ +
NonConformingBoundaryWriter(const GV &gv_)
Definition boundarywriter.hh:33
│ │ │ │ +
void addCellData(const std::shared_ptr< Func > &p, const std::string &name)
Definition boundarywriter.hh:40
│ │ │ │ +
function writer for skeleton functions
Definition skeletonfunction.hh:83
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,38 +2,119 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfexception.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +boundarywriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_DGFEXCEPTION_HH │ │ │ │ │ -6#define DUNE_GRID_DGFEXCEPTION_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10namespace _D_u_n_e │ │ │ │ │ -11{ │ │ │ │ │ -12 │ │ │ │ │ -_1_4 class _D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -15 : public IOError │ │ │ │ │ -16 {}; │ │ │ │ │ -17 │ │ │ │ │ -18} │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_o_u_n_d_a_r_y_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_k_e_l_e_t_o_n_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ 19 │ │ │ │ │ -20#endif │ │ │ │ │ +20 namespace VTK { │ │ │ │ │ +21 │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r │ │ │ │ │ +24 : public _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y, │ │ │ │ │ +25 public _B_a_s_i_c_W_r_i_t_e_r > │ │ │ │ │ +26 { │ │ │ │ │ +27 typedef _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_G_V_> _F_a_c_t_o_r_y; │ │ │ │ │ +28 typedef _B_a_s_i_c_W_r_i_t_e_r_<_F_a_c_t_o_r_y_> _B_a_s_e; │ │ │ │ │ +29 │ │ │ │ │ +30 const GV& gv; │ │ │ │ │ +31 │ │ │ │ │ +32 public: │ │ │ │ │ +_3_3 _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r(const GV& gv_) │ │ │ │ │ +34 : _F_a_c_t_o_r_y(gv_), _B_a_s_e(static_cast(*this)), gv(gv_) │ │ │ │ │ +35 { } │ │ │ │ │ +36 │ │ │ │ │ +37 using _B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a; │ │ │ │ │ +38 │ │ │ │ │ +39 template │ │ │ │ │ +_4_0 void _a_d_d_C_e_l_l_D_a_t_a(const std::shared_ptr& p, const std::string& name) { │ │ │ │ │ +41 _a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr │ │ │ │ │ +42 (new _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_F_u_n_c_>(p, name))); │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +45 template │ │ │ │ │ +_4_6 void _a_d_d_C_e_l_l_D_a_t_a(Func* p, const std::string& name) { │ │ │ │ │ +47 _a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr(p), name); │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +50 using _B_a_s_e_:_:_a_d_d_P_o_i_n_t_D_a_t_a; │ │ │ │ │ +51 │ │ │ │ │ +52 template │ │ │ │ │ +_5_3 void _a_d_d_P_o_i_n_t_D_a_t_a(const std::shared_ptr& p, const std::string& name) { │ │ │ │ │ +54 _a_d_d_P_o_i_n_t_D_a_t_a(std::shared_ptr │ │ │ │ │ +55 (new _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_F_u_n_c_>(p, name))); │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +58 template │ │ │ │ │ +_5_9 void _a_d_d_P_o_i_n_t_D_a_t_a(Func* p, const std::string& name) { │ │ │ │ │ +60 _a_d_d_P_o_i_n_t_D_a_t_a(std::shared_ptr(p), name); │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +63 }; │ │ │ │ │ +64 │ │ │ │ │ +65 } // namespace VTK │ │ │ │ │ +66 │ │ │ │ │ +68 │ │ │ │ │ +69} // namespace Dune │ │ │ │ │ +70 │ │ │ │ │ +71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ +_b_o_u_n_d_a_r_y_i_t_e_r_a_t_o_r_s_._h_h │ │ │ │ │ +Functions for VTK output on the skeleton. │ │ │ │ │ +_s_k_e_l_e_t_o_n_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ +Functions for VTK output on the skeleton. │ │ │ │ │ +_b_a_s_i_c_w_r_i_t_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -exception class for IO errors in the DGF parser │ │ │ │ │ -DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn boundarywriter.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void addPointData(const std::shared_ptr< Func > &p, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn boundarywriter.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(Func *p, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn boundarywriter.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void addPointData(Func *p, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn boundarywriter.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r │ │ │ │ │ +NonConformingBoundaryWriter(const GV &gv_) │ │ │ │ │ +DDeeffiinniittiioonn boundarywriter.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< Func > &p, const std::string &name) │ │ │ │ │ +DDeeffiinniittiioonn boundarywriter.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +function writer for skeleton functions │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:83 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgf2dgf.cc File Reference │ │ │ │ +dune-grid: corneriterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,75 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Functions
│ │ │ │ -
dgf2dgf.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
corneriterator.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

a small program converting a DGF file into a DGF file │ │ │ │ -More...

│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
#include <iterator>
│ │ │ │ +#include <dune/common/iteratorfacades.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

│ │ │ │ +

│ │ │ │ -Functions

int main (int argc, char *argv[])
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::VTK::CornerIterator< CellIterator >
 iterate over the corners of some cell range More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

a small program converting a DGF file into a DGF file

│ │ │ │ -
Author
Matrin Nolte
│ │ │ │ -

dgf2dgf is a small example program for the DGFWriter. It reads a DGF file into any grid, optionally refining the grid globally. The leaf grid is then written back as a DGF file.

│ │ │ │ -

The program's usage is as follows:

./dgf2dgf <dgffile> [refinement level]
│ │ │ │ -

While the program may seem completely useless, it has the following usages:

    │ │ │ │ -
  • Convert an interval block into a simplex or cube grid (depending on the grid implementation used).
  • │ │ │ │ -
  • Resolve the simplex generator block into a vertex and a simplex block, so that it can be used without triangle or tetgen.
  • │ │ │ │ -
  • Construct a refined macro grid, which is very useful when setting up parallel computations with dune-ALUGrid.
  • │ │ │ │ -
│ │ │ │ -

The source code of this program also demonstrates the easy use of the DGF parser and the DGFWriter.

│ │ │ │ -

Function Documentation

│ │ │ │ - │ │ │ │ -

◆ main()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int main (int argc,
char * argv[] 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,43 +2,28 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _u_t_i_l_s │ │ │ │ │ -_F_u_n_c_t_i_o_n_s │ │ │ │ │ -dgf2dgf.cc File Reference │ │ │ │ │ -a small program converting a DGF file into a DGF file _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_w_r_i_t_e_r_._h_h> │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -int  _m_a_i_n (int argc, char *argv[]) │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +corneriterator.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_ _C_e_l_l_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +  iterate over the corners of some cell range _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -a small program converting a DGF file into a DGF file │ │ │ │ │ - Author │ │ │ │ │ - Matrin Nolte │ │ │ │ │ -dgf2dgf is a small example program for the DGFWriter. It reads a DGF file into │ │ │ │ │ -any grid, optionally refining the grid globally. The leaf grid is then written │ │ │ │ │ -back as a DGF file. │ │ │ │ │ -The program's usage is as follows: │ │ │ │ │ -./dgf2dgf [refinement level] │ │ │ │ │ -While the program may seem completely useless, it has the following usages: │ │ │ │ │ - * Convert an interval block into a simplex or cube grid (depending on the │ │ │ │ │ - grid implementation used). │ │ │ │ │ - * Resolve the simplex generator block into a vertex and a simplex block, so │ │ │ │ │ - that it can be used without triangle or tetgen. │ │ │ │ │ - * Construct a refined macro grid, which is very useful when setting up │ │ │ │ │ - parallel computations with dune-ALUGrid. │ │ │ │ │ -The source code of this program also demonstrates the easy use of the DGF │ │ │ │ │ -parser and the DGFWriter. │ │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? mmaaiinn(()) ********** │ │ │ │ │ -int main ( int  aarrggcc, │ │ │ │ │ - char *  aarrggvv[]  │ │ │ │ │ - ) │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmsh2dgf.cc File Reference │ │ │ │ +dune-grid: streams.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,71 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Functions
│ │ │ │ -
gmsh2dgf.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
streams.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

a small program converting a gmsh file into a DGF file │ │ │ │ -More...

│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Functions

int main (int argc, char *argv[])
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

a small program converting a gmsh file into a DGF file

│ │ │ │ -
Author
Matrin Nolte
│ │ │ │ -

gmsh2dgf is a small example program for the DGFWriter. It reads a gmsh file into any grid (selected by gridtype.hh) and writes it back as a DGF file.

│ │ │ │ -

The program's usage is as follows:

./gmsh2dgf <gmshfile>
│ │ │ │ -

Function Documentation

│ │ │ │ - │ │ │ │ -

◆ main()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int main (int argc,
char * argv[] 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ +
#include <ostream>
│ │ │ │ +#include <dune/grid/io/file/vtk/b64enc.hh>
│ │ │ │
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::Base64Stream
 class to base64 encode a stream of data More...
 
class  Dune::RawStream
 write out data in binary More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,35 +2,26 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _u_t_i_l_s │ │ │ │ │ -_F_u_n_c_t_i_o_n_s │ │ │ │ │ -gmsh2dgf.cc File Reference │ │ │ │ │ -a small program converting a gmsh file into a DGF file _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_w_r_i_t_e_r_._h_h> │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -int  _m_a_i_n (int argc, char *argv[]) │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +streams.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_6_4_e_n_c_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ │ +  class to base64 encode a stream of data _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ │ +  write out data in binary _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -a small program converting a gmsh file into a DGF file │ │ │ │ │ - Author │ │ │ │ │ - Matrin Nolte │ │ │ │ │ -gmsh2dgf is a small example program for the DGFWriter. It reads a gmsh file │ │ │ │ │ -into any grid (selected by _g_r_i_d_t_y_p_e_._h_h) and writes it back as a DGF file. │ │ │ │ │ -The program's usage is as follows: │ │ │ │ │ -./gmsh2dgf │ │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ -********** _?◆_? mmaaiinn(()) ********** │ │ │ │ │ -int main ( int  aarrggcc, │ │ │ │ │ - char *  aarrggvv[]  │ │ │ │ │ - ) │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgridfactory.hh File Reference │ │ │ │ +dune-grid: functionwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,70 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfgridfactory.hh File Reference
│ │ │ │ +
functionwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <memory>
│ │ │ │ #include <string>
│ │ │ │ +#include <typeinfo>
│ │ │ │ #include <vector>
│ │ │ │ -#include <map>
│ │ │ │ -#include <assert.h>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/macrogrid.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/dataarraywriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::DGFGridFactory< G >
class  Dune::VTK::FunctionWriterBase< Cell_ >
 Base class for function writers. More...
 
class  Dune::VTK::VTKFunctionWriter< Func >
 Base class for function writers. More...
 
class  Dune::VTK::CoordinatesWriter< Cell >
 writer for the Coordinates array More...
 
class  Dune::VTK::ConformingConnectivityWriter< IteratorFactory >
 writer for the connectivity array in conforming mode More...
 
class  Dune::VTK::NonConformingConnectivityWriter< Cell >
 writer for the connectivity array in nonconforming mode More...
 
class  Dune::VTK::OffsetsWriter< Cell >
 writer for the offsets array More...
 
class  Dune::VTK::TypesWriter< Cell >
 writer for the types array More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +2,53 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfgridfactory.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +functionwriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_m_a_c_r_o_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_ _C_e_l_l___ _> │ │ │ │ │ +  Base class for function writers. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_ _F_u_n_c_ _> │ │ │ │ │ +  Base class for function writers. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ +  writer for the Coordinates array _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_ _> │ │ │ │ │ +  writer for the connectivity array in conforming mode _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ +  writer for the connectivity array in nonconforming mode _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ +  writer for the offsets array _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ +  writer for the types array _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgridfactory.hh Source File │ │ │ │ +dune-grid: functionwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,271 +70,479 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfgridfactory.hh
│ │ │ │ +
functionwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_GRIDFACTORY_HH
│ │ │ │ -
6#define DUNE_DGF_GRIDFACTORY_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <string>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11#include <map>
│ │ │ │ -
12#include <assert.h>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <memory>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <typeinfo>
│ │ │ │ +
13#include <vector>
│ │ │ │ +
14
│ │ │ │ +
15#include <dune/common/exceptions.hh>
│ │ │ │ +
16#include <dune/common/fvector.hh>
│ │ │ │
17
│ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21
│ │ │ │ -
22namespace Dune
│ │ │ │ -
23{
│ │ │ │ +
18#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
19
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
24
│ │ │ │ -
25 // External Forward Declarations
│ │ │ │ -
26 // -----------------------------
│ │ │ │ -
27
│ │ │ │ -
28 template < class GridImp, class IntersectionImp >
│ │ │ │ -
29 class Intersection;
│ │ │ │ -
30
│ │ │ │ +
25namespace Dune
│ │ │ │ +
26{
│ │ │ │ +
29
│ │ │ │ +
30 namespace VTK {
│ │ │ │
31
│ │ │ │ -
32
│ │ │ │ -
33 // DGFGridFactory
│ │ │ │ -
34 // --------------
│ │ │ │ -
35
│ │ │ │ -
36 template < class G >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ -
39 typedef G Grid;
│ │ │ │ -
40 const static int dimension = Grid::dimension;
│ │ │ │ -
41 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
33 template<typename Cell_>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 typedef typename Cell_::Geometry::ctype DF;
│ │ │ │ +
36 static const unsigned mydim = Cell_::mydimension;
│ │ │ │ +
37 typedef ReferenceElements<DF, mydim> Refelems;
│ │ │ │ +
38
│ │ │ │ +
39 public:
│ │ │ │ +
40 typedef FieldVector<DF, mydim> Domain;
│ │ │ │ +
41 typedef Cell_ Cell;
│ │ │ │
42
│ │ │ │ -
43 private:
│ │ │ │ -
44 typedef typename Grid::template Codim< 0 >::Entity Element;
│ │ │ │ +
44 virtual std::string name() const = 0;
│ │ │ │
45
│ │ │ │ -
46 typedef typename Grid::template Codim< dimension >::Entity Vertex;
│ │ │ │ -
47
│ │ │ │ -
48 public:
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
50 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
51 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
52 : macroGrid_( filename.c_str(), comm )
│ │ │ │ -
53 {
│ │ │ │ -
54 grid_ = macroGrid_.template createGrid< Grid >();
│ │ │ │ -
55
│ │ │ │ -
56 if( macroGrid_.nofelparams > 0 )
│ │ │ │ -
57 {
│ │ │ │ -
58 const size_t nofElements = macroGrid_.elements.size();
│ │ │ │ -
59 for( size_t i = 0; i < nofElements; ++i )
│ │ │ │ -
60 {
│ │ │ │ -
61 std::vector< double > coord;
│ │ │ │ -
62
│ │ │ │ -
63 DomainType p(0);
│ │ │ │ -
64 const size_t nofCorners = macroGrid_.elements[i].size();
│ │ │ │ -
65 for (size_t k=0; k<nofCorners; ++k)
│ │ │ │ -
66 for (int j=0; j<DomainType::dimension; ++j)
│ │ │ │ -
67 p[j]+=macroGrid_.vtx[macroGrid_.elements[i][k]][j];
│ │ │ │ -
68 p/=double(nofCorners);
│ │ │ │ -
69
│ │ │ │ -
70 elInsertOrder_.insert( std::make_pair( p, i ) );
│ │ │ │ -
71 }
│ │ │ │ -
72 }
│ │ │ │ -
73
│ │ │ │ -
74 if( macroGrid_.nofvtxparams > 0 )
│ │ │ │ -
75 {
│ │ │ │ -
76 const size_t nofVertices = macroGrid_.vtx.size();
│ │ │ │ -
77 for( size_t i = 0; i < nofVertices; ++i )
│ │ │ │ -
78 {
│ │ │ │ -
79 std::vector< double > coord;
│ │ │ │ +
47 virtual unsigned ncomps() const = 0;
│ │ │ │ +
48
│ │ │ │ +
50 virtual void addArray(PVTUWriter& writer) = 0;
│ │ │ │ +
52 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) = 0;
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
59 virtual void write(const Cell& /* cell */, const Domain& /* xl */) {
│ │ │ │ +
60 DUNE_THROW(NotImplemented, "FunctionWriterBase::write(const Cell&, "
│ │ │ │ +
61 "const Domain&): Either the derived class " <<
│ │ │ │ +
62 typeid(*this).name() << " failed to implement this method "
│ │ │ │ +
63 "or this method is not meant to be called on the derived "
│ │ │ │ +
64 "class and was called in error.");
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
71 virtual void write(const Cell& cell, unsigned cornerIndex) {
│ │ │ │ +
72 write(cell,
│ │ │ │ +
73 Refelems::general(cell.type()).position(cornerIndex, mydim));
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
76 virtual void endWrite() = 0;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │
80
│ │ │ │ -
81 DomainType p;
│ │ │ │ -
82 for( int k = 0; k < DomainType::dimension; ++k )
│ │ │ │ -
83 p[ k ] = macroGrid_.vtx[i][k];
│ │ │ │ -
84
│ │ │ │ -
85 vtxInsertOrder_.insert( std::make_pair( p, i ) );
│ │ │ │ -
86 }
│ │ │ │ -
87 }
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 {
│ │ │ │ -
92 return grid_;
│ │ │ │ -
93 }
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95 template <class Intersection>
│ │ │ │ -
│ │ │ │ -
96 bool wasInserted(const Intersection &intersection) const
│ │ │ │ -
97 {
│ │ │ │ -
98 return intersection.boundary();
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
101 template <class Intersection>
│ │ │ │ -
│ │ │ │ -
102 int boundaryId(const Intersection &intersection) const
│ │ │ │ -
103 {
│ │ │ │ -
104 return (intersection.boundary()) ? int(intersection.indexInInside()+1) : int(0);
│ │ │ │ -
105 }
│ │ │ │ -
│ │ │ │ -
106
│ │ │ │ -
107 template< int codim >
│ │ │ │ -
│ │ │ │ -
108 int numParameters () const
│ │ │ │ -
109 {
│ │ │ │ -
110 if( codim == 0 )
│ │ │ │ -
111 return macroGrid_.nofelparams;
│ │ │ │ -
112 else if( codim == dimension )
│ │ │ │ -
113 return macroGrid_.nofvtxparams;
│ │ │ │ -
114 else
│ │ │ │ -
115 return 0;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
118 template < class Entity >
│ │ │ │ -
│ │ │ │ -
119 int numParameters ( const Entity & ) const
│ │ │ │ -
120 {
│ │ │ │ -
121 return numParameters< Entity::codimension >();
│ │ │ │ -
122 }
│ │ │ │ +
82 //
│ │ │ │ +
83 // A Generic Function writer for VTKFunctions
│ │ │ │ +
84 //
│ │ │ │ +
85
│ │ │ │ +
87 template<typename Func>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
89 : public FunctionWriterBase<typename Func::Entity>
│ │ │ │ +
90 {
│ │ │ │ + │ │ │ │ +
92 std::shared_ptr<const Func> func;
│ │ │ │ +
93 VTK::Precision precision_;
│ │ │ │ +
94 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
95
│ │ │ │ +
96 public:
│ │ │ │ +
│ │ │ │ +
97 VTKFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ │ + │ │ │ │ +
99 : func(func_), precision_(prec)
│ │ │ │ +
100 { }
│ │ │ │ +
│ │ │ │ +
101
│ │ │ │ +
103 virtual std::string name() const { return func->name(); }
│ │ │ │ +
104
│ │ │ │ +
│ │ │ │ +
106 virtual unsigned ncomps() const {
│ │ │ │ +
107 if(func->ncomps() == 2) return 3;
│ │ │ │ +
108 else return func->ncomps();
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
112 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
113 writer.addArray(name(), ncomps(), precision_);
│ │ │ │ +
114 }
│ │ │ │ +
│ │ │ │ +
115
│ │ │ │ +
│ │ │ │ +
117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ +
119 nitems, precision_));
│ │ │ │ +
120 return !arraywriter->writeIsNoop();
│ │ │ │ +
121 }
│ │ │ │
│ │ │ │ -
123
│ │ │ │ +
122
│ │ │ │
│ │ │ │ -
124 std::vector<double>& parameter(const Element &element)
│ │ │ │ -
125 {
│ │ │ │ -
126 const typename Element::Geometry &geo = element.geometry();
│ │ │ │ -
127 DomainType coord( geo.corner( 0 ) );
│ │ │ │ -
128 for( int i = 1; i < geo.corners(); ++i )
│ │ │ │ -
129 coord += geo.corner( i );
│ │ │ │ -
130 coord /= double( geo.corners() );
│ │ │ │ -
131
│ │ │ │ -
132 InsertOrderIterator it = elInsertOrder_.find( coord );
│ │ │ │ -
133 if( it != elInsertOrder_.end() )
│ │ │ │ -
134 return macroGrid_.elParams[ it->second ];
│ │ │ │ -
135 assert(0);
│ │ │ │ -
136 return emptyParam;
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
│ │ │ │ -
139 std::vector<double>& parameter(const Vertex &vertex)
│ │ │ │ -
140 {
│ │ │ │ -
141 const typename Vertex::Geometry &geo = vertex.geometry();
│ │ │ │ -
142 DomainType coord( geo.corner( 0 ) );
│ │ │ │ -
143
│ │ │ │ -
144 InsertOrderIterator it = vtxInsertOrder_.find( coord );
│ │ │ │ -
145 if( it != vtxInsertOrder_.end() )
│ │ │ │ -
146 return macroGrid_.vtxParams[ it->second ];
│ │ │ │ -
147 return emptyParam;
│ │ │ │ -
148 }
│ │ │ │ +
124 virtual void write(const typename Base::Cell& cell,
│ │ │ │ +
125 const typename Base::Domain& xl) {
│ │ │ │ +
126 for(int d = 0; d < func->ncomps(); ++d)
│ │ │ │ +
127 arraywriter->write(func->evaluate(d, cell, xl));
│ │ │ │ +
128 for(unsigned d = func->ncomps(); d < ncomps(); ++d)
│ │ │ │ +
129 arraywriter->write(0);
│ │ │ │ +
130 }
│ │ │ │
│ │ │ │ +
131
│ │ │ │ +
│ │ │ │ +
133 virtual void endWrite() {
│ │ │ │ +
134 arraywriter.reset();
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136 };
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
139 //
│ │ │ │ +
140 // Writers for the grid information
│ │ │ │ +
141 //
│ │ │ │ +
142
│ │ │ │ +
144 template<typename Cell>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
146 : public FunctionWriterBase<Cell>
│ │ │ │ +
147 {
│ │ │ │ + │ │ │ │
149
│ │ │ │ -
150 // return true if boundary parameters found
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
152 {
│ │ │ │ -
153 return false;
│ │ │ │ -
154 }
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
156 template< class GG, class II >
│ │ │ │ -
157 const typename DGFBoundaryParameter::type &
│ │ │ │ -
│ │ │ │ -
158 boundaryParameter ( const Intersection< GG, II > & intersection ) const
│ │ │ │ -
159 {
│ │ │ │ - │ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
163 private:
│ │ │ │ -
164 typedef FieldVector<typename Grid::ctype,Grid::dimensionworld> DomainType;
│ │ │ │ -
165 struct Compare
│ │ │ │ -
166 {
│ │ │ │ -
167 bool operator() ( const DomainType &a, const DomainType &b ) const
│ │ │ │ -
168 {
│ │ │ │ -
169 // returns true, if a < b; c[i] < -eps;
│ │ │ │ -
170 const DomainType c = a - b;
│ │ │ │ -
171 const double eps = 1e-8;
│ │ │ │ -
172
│ │ │ │ -
173 for( int i = 0; i < DomainType::dimension; ++i )
│ │ │ │ -
174 {
│ │ │ │ -
175 if( c[ i ] <= -eps )
│ │ │ │ -
176 return true;
│ │ │ │ -
177 if( c[ i ] >= eps )
│ │ │ │ -
178 return false;
│ │ │ │ -
179 }
│ │ │ │ -
180 return false;
│ │ │ │ -
181 }
│ │ │ │ -
182 };
│ │ │ │ -
183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap;
│ │ │ │ -
184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator;
│ │ │ │ -
185
│ │ │ │ -
186 MacroGrid macroGrid_;
│ │ │ │ -
187 Grid *grid_;
│ │ │ │ -
188 InsertOrderMap elInsertOrder_;
│ │ │ │ -
189 InsertOrderMap vtxInsertOrder_;
│ │ │ │ -
190 std::vector<double> emptyParam;
│ │ │ │ -
191 };
│ │ │ │ -
│ │ │ │ -
192
│ │ │ │ -
193} // end namespace Dune
│ │ │ │ -
194
│ │ │ │ -
195#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
150 VTK::Precision precision_;
│ │ │ │ +
151 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
152
│ │ │ │ +
153 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
155 : precision_(prec)
│ │ │ │ +
156 {}
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
159 virtual std::string name() const { return "Coordinates"; }
│ │ │ │ +
160
│ │ │ │ +
162 virtual unsigned ncomps() const { return 3; }
│ │ │ │ +
163
│ │ │ │ +
│ │ │ │ +
165 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
166 writer.addArray(name(), ncomps(), precision_);
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
│ │ │ │ +
170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ +
172 nitems, precision_));
│ │ │ │ +
173 return !arraywriter->writeIsNoop();
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
176 virtual void write(const typename Base::Cell& cell,
│ │ │ │ +
177 const typename Base::Domain& xl) {
│ │ │ │ +
178 FieldVector<typename Base::Cell::Geometry::ctype, Base::Cell::Geometry::coorddimension> xg
│ │ │ │ +
179 = cell.geometry().global(xl);
│ │ │ │ +
180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d)
│ │ │ │ +
181 arraywriter->write(xg[d]);
│ │ │ │ +
182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)
│ │ │ │ +
183 arraywriter->write(0);
│ │ │ │ +
184 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
186 virtual void endWrite() {
│ │ │ │ +
187 arraywriter.reset();
│ │ │ │ +
188 }
│ │ │ │ +
│ │ │ │ +
189 };
│ │ │ │ +
│ │ │ │ +
190
│ │ │ │ +
192 template<typename IteratorFactory>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
194 : public FunctionWriterBase<typename IteratorFactory::Cell>
│ │ │ │ +
195 {
│ │ │ │ + │ │ │ │ +
197 static const unsigned mydim = Base::Cell::mydimension;
│ │ │ │ +
198
│ │ │ │ +
199 const IteratorFactory& factory;
│ │ │ │ +
200 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
201 std::vector<unsigned> pointIndices;
│ │ │ │ +
202
│ │ │ │ +
203 public:
│ │ │ │ +
│ │ │ │ +
205 ConformingConnectivityWriter(const IteratorFactory& factory_)
│ │ │ │ +
206 : factory(factory_)
│ │ │ │ +
207 { }
│ │ │ │ +
│ │ │ │ +
208
│ │ │ │ +
210 virtual std::string name() const { return "connectivity"; }
│ │ │ │ +
211
│ │ │ │ +
213 virtual unsigned ncomps() const { return 1; }
│ │ │ │ +
214
│ │ │ │ +
│ │ │ │ +
216 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
217 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219
│ │ │ │ +
│ │ │ │ +
221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ +
223 nitems, Precision::int32));
│ │ │ │ +
224 if(arraywriter->writeIsNoop())
│ │ │ │ +
225 return false;
│ │ │ │ +
226
│ │ │ │ +
228 pointIndices.resize(factory.indexSet().size(mydim));
│ │ │ │ +
229 const typename IteratorFactory::PointIterator& pend =
│ │ │ │ +
230 factory.endPoints();
│ │ │ │ +
231 typename IteratorFactory::PointIterator pit = factory.beginPoints();
│ │ │ │ +
232 unsigned counter = 0;
│ │ │ │ +
233 while(pit != pend) {
│ │ │ │ +
234 pointIndices[factory.indexSet().subIndex
│ │ │ │ +
235 (pit->cell(), pit->duneIndex(), mydim)] = counter;
│ │ │ │ +
236 ++counter;
│ │ │ │ +
237 ++pit;
│ │ │ │ +
238 }
│ │ │ │ +
239 return true;
│ │ │ │ +
240 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)
│ │ │ │ +
243 {
│ │ │ │ +
244 // if pointIndices is empty, we're in writeIsNoop mode
│ │ │ │ +
245 if(pointIndices.size() == 0)
│ │ │ │ +
246 return;
│ │ │ │ +
247 arraywriter->write(pointIndices[factory.indexSet().subIndex
│ │ │ │ +
248 (cell, cornerIndex, mydim)]);
│ │ │ │ +
249 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
251 virtual void endWrite() {
│ │ │ │ +
252 arraywriter.reset();
│ │ │ │ +
253 pointIndices.clear();
│ │ │ │ +
254 }
│ │ │ │ +
│ │ │ │ +
255 };
│ │ │ │ +
│ │ │ │ +
256
│ │ │ │ +
258 template<typename Cell>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
260 : public FunctionWriterBase<Cell>
│ │ │ │ +
261 {
│ │ │ │ +
262 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
263 unsigned counter;
│ │ │ │ +
264
│ │ │ │ +
265 public:
│ │ │ │ +
267 virtual std::string name() const { return "connectivity"; }
│ │ │ │ +
268
│ │ │ │ +
270 virtual unsigned ncomps() const { return 1; }
│ │ │ │ +
271
│ │ │ │ +
│ │ │ │ +
273 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
274 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ │ +
275 }
│ │ │ │ +
│ │ │ │ +
276
│ │ │ │ +
│ │ │ │ +
278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ +
280 nitems, Precision::int32));
│ │ │ │ +
281 counter = 0;
│ │ │ │ +
282 return !arraywriter->writeIsNoop();
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)
│ │ │ │ +
286 {
│ │ │ │ +
287 arraywriter->write(counter);
│ │ │ │ +
288 ++counter;
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
291 virtual void endWrite() {
│ │ │ │ +
292 arraywriter.reset();
│ │ │ │ +
293 }
│ │ │ │ +
│ │ │ │ +
294 };
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
297 template<typename Cell>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
299 : public FunctionWriterBase<Cell>
│ │ │ │ +
300 {
│ │ │ │ + │ │ │ │ +
302
│ │ │ │ +
303 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
304 unsigned offset;
│ │ │ │ +
305
│ │ │ │ +
306 public:
│ │ │ │ +
308 virtual std::string name() const { return "offsets"; }
│ │ │ │ +
309
│ │ │ │ +
311 virtual unsigned ncomps() const { return 1; }
│ │ │ │ +
312
│ │ │ │ +
│ │ │ │ +
314 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
315 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ │ +
316 }
│ │ │ │ +
│ │ │ │ +
317
│ │ │ │ +
│ │ │ │ +
319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ +
321 nitems, Precision::int32));
│ │ │ │ +
322 offset = 0;
│ │ │ │ +
323 return !arraywriter->writeIsNoop();
│ │ │ │ +
324 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
326 virtual void write(const Cell& cell, const typename Base::Domain&) {
│ │ │ │ +
327 offset += cell.geometry().corners();
│ │ │ │ +
328 arraywriter->write(offset);
│ │ │ │ +
329 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
331 virtual void endWrite() {
│ │ │ │ +
332 arraywriter.reset();
│ │ │ │ +
333 }
│ │ │ │ +
│ │ │ │ +
334 };
│ │ │ │ +
│ │ │ │ +
335
│ │ │ │ +
337 template<typename Cell>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
339 : public FunctionWriterBase<Cell>
│ │ │ │ +
340 {
│ │ │ │ + │ │ │ │ +
342
│ │ │ │ +
343 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
344
│ │ │ │ +
345 public:
│ │ │ │ +
347 virtual std::string name() const { return "types"; }
│ │ │ │ +
348
│ │ │ │ +
350 virtual unsigned ncomps() const { return 1; }
│ │ │ │ +
351
│ │ │ │ +
│ │ │ │ +
353 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
354 writer.addArray(name(), ncomps(), Precision::uint8);
│ │ │ │ +
355 }
│ │ │ │ +
│ │ │ │ +
356
│ │ │ │ +
│ │ │ │ +
358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
359 arraywriter.reset(writer.makeArrayWriter
│ │ │ │ +
360 ( name(), ncomps(), nitems, Precision::uint8));
│ │ │ │ +
361 return !arraywriter->writeIsNoop();
│ │ │ │ +
362 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
364 virtual void write(const Cell& cell, const typename Base::Domain&) {
│ │ │ │ +
365 arraywriter->write(geometryType(cell.type()));
│ │ │ │ +
366 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
368 virtual void endWrite() {
│ │ │ │ +
369 arraywriter.reset();
│ │ │ │ +
370 }
│ │ │ │ +
│ │ │ │ +
371 };
│ │ │ │ +
│ │ │ │ +
372
│ │ │ │ +
373 } // namespace VTK
│ │ │ │ +
374
│ │ │ │ +
376
│ │ │ │ +
377} // namespace Dune
│ │ │ │ +
378
│ │ │ │ +
379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ │ + │ │ │ │ +
Data array writers for the VTKWriter.
│ │ │ │ + │ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
int numParameters() const
Definition dgfgridfactory.hh:108
│ │ │ │ -
int boundaryId(const Intersection &intersection) const
Definition dgfgridfactory.hh:102
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfgridfactory.hh:158
│ │ │ │ -
std::vector< double > & parameter(const Vertex &vertex)
Definition dgfgridfactory.hh:139
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ -
int numParameters(const Entity &) const
Definition dgfgridfactory.hh:119
│ │ │ │ -
bool wasInserted(const Intersection &intersection) const
Definition dgfgridfactory.hh:96
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfgridfactory.hh:50
│ │ │ │ -
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ -
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ -
Grid * grid()
Definition dgfgridfactory.hh:90
│ │ │ │ -
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
│ │ │ │ -
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition common/intersection.hh:216
│ │ │ │ -
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ -
int nofvtxparams
Definition parser.hh:163
│ │ │ │ -
std::vector< std::vector< double > > vtxParams
Definition parser.hh:165
│ │ │ │ -
int nofelparams
Definition parser.hh:163
│ │ │ │ -
std::vector< std::vector< double > > elParams
Definition parser.hh:165
│ │ │ │ -
std::vector< std::vector< double > > vtx
Definition parser.hh:125
│ │ │ │ -
std ::vector< std ::vector< unsigned int > > elements
Definition parser.hh:134
│ │ │ │ - │ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ +
Base class for function writers.
Definition functionwriter.hh:34
│ │ │ │ +
virtual std::string name() const =0
return name
│ │ │ │ +
virtual unsigned ncomps() const =0
return number of components of the vector
│ │ │ │ +
virtual void write(const Cell &, const Domain &)
write at the given position
Definition functionwriter.hh:59
│ │ │ │ +
Cell_ Cell
Definition functionwriter.hh:41
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)=0
add this field to the given parallel writer
│ │ │ │ +
virtual void endWrite()=0
signal end of writing
│ │ │ │ +
FieldVector< DF, mydim > Domain
Definition functionwriter.hh:40
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
start writing with the given writer
│ │ │ │ +
virtual ~FunctionWriterBase()
destructor
Definition functionwriter.hh:78
│ │ │ │ +
virtual void write(const Cell &cell, unsigned cornerIndex)
write at the given corner
Definition functionwriter.hh:71
│ │ │ │ +
Base class for function writers.
Definition functionwriter.hh:90
│ │ │ │ +
VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision prec=VTK::Precision::float32)
Definition functionwriter.hh:97
│ │ │ │ +
virtual std::string name() const
return name
Definition functionwriter.hh:103
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:106
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:117
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:112
│ │ │ │ +
virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
write at the given position
Definition functionwriter.hh:124
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:133
│ │ │ │ +
writer for the Coordinates array
Definition functionwriter.hh:147
│ │ │ │ +
virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
write at the given position
Definition functionwriter.hh:176
│ │ │ │ +
virtual std::string name() const
return name
Definition functionwriter.hh:159
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:186
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:162
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:165
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:170
│ │ │ │ +
CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32)
Definition functionwriter.hh:154
│ │ │ │ +
writer for the connectivity array in conforming mode
Definition functionwriter.hh:195
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:216
│ │ │ │ +
virtual std::string name() const
return name
Definition functionwriter.hh:210
│ │ │ │ +
virtual void write(const typename Base::Cell &cell, unsigned cornerIndex)
write at the given corner
Definition functionwriter.hh:242
│ │ │ │ +
ConformingConnectivityWriter(const IteratorFactory &factory_)
create a writer with the given iteratorfactory
Definition functionwriter.hh:205
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:213
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:221
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:251
│ │ │ │ +
writer for the connectivity array in nonconforming mode
Definition functionwriter.hh:261
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:270
│ │ │ │ +
virtual std::string name() const
return name
Definition functionwriter.hh:267
│ │ │ │ +
virtual void write(const Cell &, unsigned)
write at the given corner
Definition functionwriter.hh:285
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:273
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:278
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:291
│ │ │ │ +
writer for the offsets array
Definition functionwriter.hh:300
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:314
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:331
│ │ │ │ +
virtual std::string name() const
return name
Definition functionwriter.hh:308
│ │ │ │ +
virtual void write(const Cell &cell, const typename Base::Domain &)
write at the given position
Definition functionwriter.hh:326
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:319
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:311
│ │ │ │ +
writer for the types array
Definition functionwriter.hh:340
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:350
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:358
│ │ │ │ +
virtual std::string name() const
return name
Definition functionwriter.hh:347
│ │ │ │ +
virtual void write(const Cell &cell, const typename Base::Domain &)
write at the given position
Definition functionwriter.hh:364
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:353
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:368
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ +
void addArray(const std::string &name, unsigned ncomps, Precision prec)
Add an array to the output file.
Definition pvtuwriter.hh:207
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ +
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,309 +2,577 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfgridfactory.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +functionwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_GRIDFACTORY_HH │ │ │ │ │ -6#define DUNE_DGF_GRIDFACTORY_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_m_a_c_r_o_g_r_i_d_._h_h> │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ 17 │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e │ │ │ │ │ -23{ │ │ │ │ │ +18#include │ │ │ │ │ +19 │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +21#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ +22#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +23#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ 24 │ │ │ │ │ -25 // External Forward Declarations │ │ │ │ │ -26 // ----------------------------- │ │ │ │ │ -27 │ │ │ │ │ -28 template < class GridImp, class IntersectionImp > │ │ │ │ │ -29 class Intersection; │ │ │ │ │ -30 │ │ │ │ │ +25namespace _D_u_n_e │ │ │ │ │ +26{ │ │ │ │ │ +29 │ │ │ │ │ +30 namespace VTK { │ │ │ │ │ 31 │ │ │ │ │ -32 │ │ │ │ │ -33 // DGFGridFactory │ │ │ │ │ -34 // -------------- │ │ │ │ │ -35 │ │ │ │ │ -36 template < class G > │ │ │ │ │ -_3_7 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -38 { │ │ │ │ │ -_3_9 typedef G _G_r_i_d; │ │ │ │ │ -_4_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_4_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +33 template │ │ │ │ │ +_3_4 class _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e { │ │ │ │ │ +35 typedef typename Cell_::Geometry::ctype DF; │ │ │ │ │ +36 static const unsigned mydim = Cell_::mydimension; │ │ │ │ │ +37 typedef ReferenceElements Refelems; │ │ │ │ │ +38 │ │ │ │ │ +39 public: │ │ │ │ │ +_4_0 typedef FieldVector _D_o_m_a_i_n; │ │ │ │ │ +_4_1 typedef Cell_ _C_e_l_l; │ │ │ │ │ 42 │ │ │ │ │ -43 private: │ │ │ │ │ -44 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Element; │ │ │ │ │ +_4_4 virtual std::string _n_a_m_e() const = 0; │ │ │ │ │ 45 │ │ │ │ │ -46 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< dimension >::Entity Vertex; │ │ │ │ │ -47 │ │ │ │ │ -48 public: │ │ │ │ │ -49 │ │ │ │ │ -_5_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -51 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -52 : macroGrid_( filename.c_str(), comm ) │ │ │ │ │ -53 { │ │ │ │ │ -54 grid_ = macroGrid_.template createGrid< Grid >(); │ │ │ │ │ -55 │ │ │ │ │ -56 if( macroGrid_._n_o_f_e_l_p_a_r_a_m_s > 0 ) │ │ │ │ │ -57 { │ │ │ │ │ -58 const size_t nofElements = macroGrid_._e_l_e_m_e_n_t_s.size(); │ │ │ │ │ -59 for( size_t i = 0; i < nofElements; ++i ) │ │ │ │ │ -60 { │ │ │ │ │ -61 std::vector< double > coord; │ │ │ │ │ -62 │ │ │ │ │ -63 DomainType p(0); │ │ │ │ │ -64 const size_t nofCorners = macroGrid_._e_l_e_m_e_n_t_s[i].size(); │ │ │ │ │ -65 for (size_t k=0; k 0 ) │ │ │ │ │ -75 { │ │ │ │ │ -76 const size_t nofVertices = macroGrid_._v_t_x.size(); │ │ │ │ │ -77 for( size_t i = 0; i < nofVertices; ++i ) │ │ │ │ │ -78 { │ │ │ │ │ -79 std::vector< double > coord; │ │ │ │ │ +_4_7 virtual unsigned _n_c_o_m_p_s() const = 0; │ │ │ │ │ +48 │ │ │ │ │ +_5_0 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) = 0; │ │ │ │ │ +_5_2 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) = 0; │ │ │ │ │ +54 │ │ │ │ │ +_5_9 virtual void _w_r_i_t_e(const _C_e_l_l& /* cell */, const _D_o_m_a_i_n& /* xl */) { │ │ │ │ │ +60 DUNE_THROW(NotImplemented, "FunctionWriterBase::write(const Cell&, " │ │ │ │ │ +61 "const Domain&): Either the derived class " << │ │ │ │ │ +62 typeid(*this).name() << " failed to implement this method " │ │ │ │ │ +63 "or this method is not meant to be called on the derived " │ │ │ │ │ +64 "class and was called in error."); │ │ │ │ │ +65 } │ │ │ │ │ +67 │ │ │ │ │ +_7_1 virtual void _w_r_i_t_e(const _C_e_l_l& cell, unsigned cornerIndex) { │ │ │ │ │ +72 _w_r_i_t_e(cell, │ │ │ │ │ +73 Refelems::general(cell.type()).position(cornerIndex, mydim)); │ │ │ │ │ +74 } │ │ │ │ │ +_7_6 virtual void _e_n_d_W_r_i_t_e() = 0; │ │ │ │ │ +_7_8 virtual _~_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e() {} │ │ │ │ │ +79 }; │ │ │ │ │ 80 │ │ │ │ │ -81 DomainType p; │ │ │ │ │ -82 for( int k = 0; k < DomainType::dimension; ++k ) │ │ │ │ │ -83 p[ k ] = macroGrid_._v_t_x[i][k]; │ │ │ │ │ -84 │ │ │ │ │ -85 vtxInsertOrder_.insert( std::make_pair( p, i ) ); │ │ │ │ │ -86 } │ │ │ │ │ -87 } │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -_9_0 _G_r_i_d *_g_r_i_d() │ │ │ │ │ -91 { │ │ │ │ │ -92 return grid_; │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -95 template │ │ │ │ │ -_9_6 bool _w_a_s_I_n_s_e_r_t_e_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ -97 { │ │ │ │ │ -98 return intersection._b_o_u_n_d_a_r_y(); │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -101 template │ │ │ │ │ -_1_0_2 int _b_o_u_n_d_a_r_y_I_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ -103 { │ │ │ │ │ -104 return (intersection._b_o_u_n_d_a_r_y()) ? int(intersection._i_n_d_e_x_I_n_I_n_s_i_d_e()+1) : │ │ │ │ │ -int(0); │ │ │ │ │ -105 } │ │ │ │ │ -106 │ │ │ │ │ -107 template< int codim > │ │ │ │ │ -_1_0_8 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -109 { │ │ │ │ │ -110 if( codim == 0 ) │ │ │ │ │ -111 return macroGrid_._n_o_f_e_l_p_a_r_a_m_s; │ │ │ │ │ -112 else if( codim == _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ -113 return macroGrid_._n_o_f_v_t_x_p_a_r_a_m_s; │ │ │ │ │ -114 else │ │ │ │ │ -115 return 0; │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -118 template < class Entity > │ │ │ │ │ -_1_1_9 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ -120 { │ │ │ │ │ -121 return numParameters< Entity::codimension >(); │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -_1_2_4 std::vector& _p_a_r_a_m_e_t_e_r(const Element &element) │ │ │ │ │ -125 { │ │ │ │ │ -126 const typename Element::Geometry &geo = element.geometry(); │ │ │ │ │ -127 DomainType coord( geo.corner( 0 ) ); │ │ │ │ │ -128 for( int i = 1; i < geo.corners(); ++i ) │ │ │ │ │ -129 coord += geo.corner( i ); │ │ │ │ │ -130 coord /= double( geo.corners() ); │ │ │ │ │ +82 // │ │ │ │ │ +83 // A Generic Function writer for VTKFunctions │ │ │ │ │ +84 // │ │ │ │ │ +85 │ │ │ │ │ +87 template │ │ │ │ │ +_8_8 class _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +89 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +90 { │ │ │ │ │ +91 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_t_y_p_e_n_a_m_e_ _F_u_n_c_:_:_E_n_t_i_t_y_> _B_a_s_e; │ │ │ │ │ +92 std::shared_ptr func; │ │ │ │ │ +93 _V_T_K_:_:_P_r_e_c_i_s_i_o_n precision_; │ │ │ │ │ +94 std::shared_ptr arraywriter; │ │ │ │ │ +95 │ │ │ │ │ +96 public: │ │ │ │ │ +_9_7 _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ │ +98 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +99 : func(func_), precision_(prec) │ │ │ │ │ +100 { } │ │ │ │ │ +101 │ │ │ │ │ +_1_0_3 virtual std::string _n_a_m_e() const { return func->name(); } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_6 virtual unsigned _n_c_o_m_p_s() const { │ │ │ │ │ +107 if(func->ncomps() == 2) return 3; │ │ │ │ │ +108 else return func->ncomps(); │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_2 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +113 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +_1_1_7 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +118 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ +119 nitems, precision_)); │ │ │ │ │ +120 return !arraywriter->writeIsNoop(); │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +_1_2_4 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, │ │ │ │ │ +125 const typename _B_a_s_e_:_:_D_o_m_a_i_n& xl) { │ │ │ │ │ +126 for(int d = 0; d < func->ncomps(); ++d) │ │ │ │ │ +127 arraywriter->write(func->evaluate(d, cell, xl)); │ │ │ │ │ +128 for(unsigned d = func->ncomps(); d < _n_c_o_m_p_s(); ++d) │ │ │ │ │ +129 arraywriter->write(0); │ │ │ │ │ +130 } │ │ │ │ │ 131 │ │ │ │ │ -132 InsertOrderIterator it = elInsertOrder_.find( coord ); │ │ │ │ │ -133 if( it != elInsertOrder_.end() ) │ │ │ │ │ -134 return macroGrid_._e_l_P_a_r_a_m_s[ it->second ]; │ │ │ │ │ -135 assert(0); │ │ │ │ │ -136 return emptyParam; │ │ │ │ │ -137 } │ │ │ │ │ -138 │ │ │ │ │ -_1_3_9 std::vector& _p_a_r_a_m_e_t_e_r(const Vertex &vertex) │ │ │ │ │ -140 { │ │ │ │ │ -141 const typename Vertex::Geometry &geo = vertex.geometry(); │ │ │ │ │ -142 DomainType coord( geo.corner( 0 ) ); │ │ │ │ │ -143 │ │ │ │ │ -144 InsertOrderIterator it = vtxInsertOrder_.find( coord ); │ │ │ │ │ -145 if( it != vtxInsertOrder_.end() ) │ │ │ │ │ -146 return macroGrid_._v_t_x_P_a_r_a_m_s[ it->second ]; │ │ │ │ │ -147 return emptyParam; │ │ │ │ │ -148 } │ │ │ │ │ +_1_3_3 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +134 arraywriter.reset(); │ │ │ │ │ +135 } │ │ │ │ │ +136 }; │ │ │ │ │ +137 │ │ │ │ │ +139 // │ │ │ │ │ +140 // Writers for the grid information │ │ │ │ │ +141 // │ │ │ │ │ +142 │ │ │ │ │ +144 template │ │ │ │ │ +_1_4_5 class _C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ +146 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +147 { │ │ │ │ │ +148 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ │ 149 │ │ │ │ │ -150 // return true if boundary parameters found │ │ │ │ │ -_1_5_1 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -152 { │ │ │ │ │ -153 return false; │ │ │ │ │ -154 } │ │ │ │ │ -155 │ │ │ │ │ -156 template< class GG, class II > │ │ │ │ │ -157 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ -_1_5_8 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) const │ │ │ │ │ -159 { │ │ │ │ │ -160 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -163 private: │ │ │ │ │ -164 typedef FieldVector DomainType; │ │ │ │ │ -165 struct Compare │ │ │ │ │ -166 { │ │ │ │ │ -167 bool operator() ( const DomainType &a, const DomainType &b ) const │ │ │ │ │ -168 { │ │ │ │ │ -169 // returns true, if a < b; c[i] < -eps; │ │ │ │ │ -170 const DomainType c = a - b; │ │ │ │ │ -171 const double eps = 1e-8; │ │ │ │ │ -172 │ │ │ │ │ -173 for( int i = 0; i < DomainType::dimension; ++i ) │ │ │ │ │ -174 { │ │ │ │ │ -175 if( c[ i ] <= -eps ) │ │ │ │ │ -176 return true; │ │ │ │ │ -177 if( c[ i ] >= eps ) │ │ │ │ │ -178 return false; │ │ │ │ │ -179 } │ │ │ │ │ -180 return false; │ │ │ │ │ -181 } │ │ │ │ │ -182 }; │ │ │ │ │ -183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap; │ │ │ │ │ -184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator; │ │ │ │ │ -185 │ │ │ │ │ -186 MacroGrid macroGrid_; │ │ │ │ │ -187 _G_r_i_d *grid_; │ │ │ │ │ -188 InsertOrderMap elInsertOrder_; │ │ │ │ │ -189 InsertOrderMap vtxInsertOrder_; │ │ │ │ │ -190 std::vector emptyParam; │ │ │ │ │ -191 }; │ │ │ │ │ -192 │ │ │ │ │ -193} // end namespace Dune │ │ │ │ │ -194 │ │ │ │ │ -195#endif │ │ │ │ │ -_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ -_m_a_c_r_o_g_r_i_d_._h_h │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ +150 _V_T_K_:_:_P_r_e_c_i_s_i_o_n precision_; │ │ │ │ │ +151 std::shared_ptr arraywriter; │ │ │ │ │ +152 │ │ │ │ │ +153 public: │ │ │ │ │ +_1_5_4 explicit _C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r(_V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +155 : precision_(prec) │ │ │ │ │ +156 {} │ │ │ │ │ +157 │ │ │ │ │ +_1_5_9 virtual std::string _n_a_m_e() const { return "Coordinates"; } │ │ │ │ │ +160 │ │ │ │ │ +_1_6_2 virtual unsigned _n_c_o_m_p_s() const { return 3; } │ │ │ │ │ +163 │ │ │ │ │ +_1_6_5 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +166 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ │ +167 } │ │ │ │ │ +168 │ │ │ │ │ +_1_7_0 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +171 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ +172 nitems, precision_)); │ │ │ │ │ +173 return !arraywriter->writeIsNoop(); │ │ │ │ │ +174 } │ │ │ │ │ +_1_7_6 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, │ │ │ │ │ +177 const typename _B_a_s_e_:_:_D_o_m_a_i_n& xl) { │ │ │ │ │ +178 FieldVector xg │ │ │ │ │ +179 = cell.geometry().global(xl); │ │ │ │ │ +180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d) │ │ │ │ │ +181 arraywriter->write(xg[d]); │ │ │ │ │ +182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d) │ │ │ │ │ +183 arraywriter->write(0); │ │ │ │ │ +184 } │ │ │ │ │ +_1_8_6 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +187 arraywriter.reset(); │ │ │ │ │ +188 } │ │ │ │ │ +189 }; │ │ │ │ │ +190 │ │ │ │ │ +192 template │ │ │ │ │ +_1_9_3 class _C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +194 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +195 { │ │ │ │ │ +196 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_t_y_p_e_n_a_m_e_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l_> _B_a_s_e; │ │ │ │ │ +197 static const unsigned mydim = Base::Cell::mydimension; │ │ │ │ │ +198 │ │ │ │ │ +199 const IteratorFactory& factory; │ │ │ │ │ +200 std::shared_ptr arraywriter; │ │ │ │ │ +201 std::vector pointIndices; │ │ │ │ │ +202 │ │ │ │ │ +203 public: │ │ │ │ │ +_2_0_5 _C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(const IteratorFactory& factory_) │ │ │ │ │ +206 : factory(factory_) │ │ │ │ │ +207 { } │ │ │ │ │ +208 │ │ │ │ │ +_2_1_0 virtual std::string _n_a_m_e() const { return "connectivity"; } │ │ │ │ │ +211 │ │ │ │ │ +_2_1_3 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ +214 │ │ │ │ │ +_2_1_6 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +217 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +_2_2_1 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +222 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ +223 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +224 if(arraywriter->writeIsNoop()) │ │ │ │ │ +225 return false; │ │ │ │ │ +226 │ │ │ │ │ +228 pointIndices.resize(factory.indexSet().size(mydim)); │ │ │ │ │ +229 const typename IteratorFactory::PointIterator& pend = │ │ │ │ │ +230 factory.endPoints(); │ │ │ │ │ +231 typename IteratorFactory::PointIterator pit = factory.beginPoints(); │ │ │ │ │ +232 unsigned counter = 0; │ │ │ │ │ +233 while(pit != pend) { │ │ │ │ │ +234 pointIndices[factory.indexSet().subIndex │ │ │ │ │ +235 (pit->cell(), pit->duneIndex(), mydim)] = counter; │ │ │ │ │ +236 ++counter; │ │ │ │ │ +237 ++pit; │ │ │ │ │ +238 } │ │ │ │ │ +239 return true; │ │ │ │ │ +240 } │ │ │ │ │ +_2_4_2 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, unsigned cornerIndex) │ │ │ │ │ +243 { │ │ │ │ │ +244 // if pointIndices is empty, we're in writeIsNoop mode │ │ │ │ │ +245 if(pointIndices.size() == 0) │ │ │ │ │ +246 return; │ │ │ │ │ +247 arraywriter->write(pointIndices[factory.indexSet().subIndex │ │ │ │ │ +248 (cell, cornerIndex, mydim)]); │ │ │ │ │ +249 } │ │ │ │ │ +_2_5_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +252 arraywriter.reset(); │ │ │ │ │ +253 pointIndices.clear(); │ │ │ │ │ +254 } │ │ │ │ │ +255 }; │ │ │ │ │ +256 │ │ │ │ │ +258 template │ │ │ │ │ +_2_5_9 class _N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +260 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +261 { │ │ │ │ │ +262 std::shared_ptr arraywriter; │ │ │ │ │ +263 unsigned counter; │ │ │ │ │ +264 │ │ │ │ │ +265 public: │ │ │ │ │ +_2_6_7 virtual std::string _n_a_m_e() const { return "connectivity"; } │ │ │ │ │ +268 │ │ │ │ │ +_2_7_0 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ +271 │ │ │ │ │ +_2_7_3 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +274 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ │ +275 } │ │ │ │ │ +276 │ │ │ │ │ +_2_7_8 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +279 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ +280 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +281 counter = 0; │ │ │ │ │ +282 return !arraywriter->writeIsNoop(); │ │ │ │ │ +283 } │ │ │ │ │ +_2_8_5 virtual void _w_r_i_t_e(const _C_e_l_l& /* cell */, unsigned /* cornerIndex */) │ │ │ │ │ +286 { │ │ │ │ │ +287 arraywriter->write(counter); │ │ │ │ │ +288 ++counter; │ │ │ │ │ +289 } │ │ │ │ │ +_2_9_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +292 arraywriter.reset(); │ │ │ │ │ +293 } │ │ │ │ │ +294 }; │ │ │ │ │ +295 │ │ │ │ │ +297 template │ │ │ │ │ +_2_9_8 class _O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ │ +299 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +300 { │ │ │ │ │ +301 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ │ +302 │ │ │ │ │ +303 std::shared_ptr arraywriter; │ │ │ │ │ +304 unsigned offset; │ │ │ │ │ +305 │ │ │ │ │ +306 public: │ │ │ │ │ +_3_0_8 virtual std::string _n_a_m_e() const { return "offsets"; } │ │ │ │ │ +309 │ │ │ │ │ +_3_1_1 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ +312 │ │ │ │ │ +_3_1_4 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +315 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ │ +316 } │ │ │ │ │ +317 │ │ │ │ │ +_3_1_9 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +320 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ +321 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +322 offset = 0; │ │ │ │ │ +323 return !arraywriter->writeIsNoop(); │ │ │ │ │ +324 } │ │ │ │ │ +_3_2_6 virtual void _w_r_i_t_e(const _C_e_l_l& cell, const typename _B_a_s_e_:_:_D_o_m_a_i_n&) { │ │ │ │ │ +327 offset += cell.geometry().corners(); │ │ │ │ │ +328 arraywriter->write(offset); │ │ │ │ │ +329 } │ │ │ │ │ +_3_3_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +332 arraywriter.reset(); │ │ │ │ │ +333 } │ │ │ │ │ +334 }; │ │ │ │ │ +335 │ │ │ │ │ +337 template │ │ │ │ │ +_3_3_8 class _T_y_p_e_s_W_r_i_t_e_r │ │ │ │ │ +339 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +340 { │ │ │ │ │ +341 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ │ +342 │ │ │ │ │ +343 std::shared_ptr arraywriter; │ │ │ │ │ +344 │ │ │ │ │ +345 public: │ │ │ │ │ +_3_4_7 virtual std::string _n_a_m_e() const { return "types"; } │ │ │ │ │ +348 │ │ │ │ │ +_3_5_0 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ +351 │ │ │ │ │ +_3_5_3 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +354 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8); │ │ │ │ │ +355 } │ │ │ │ │ +356 │ │ │ │ │ +_3_5_8 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +359 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +360 ( _n_a_m_e(), _n_c_o_m_p_s(), nitems, _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8)); │ │ │ │ │ +361 return !arraywriter->writeIsNoop(); │ │ │ │ │ +362 } │ │ │ │ │ +_3_6_4 virtual void _w_r_i_t_e(const _C_e_l_l& cell, const typename _B_a_s_e_:_:_D_o_m_a_i_n&) { │ │ │ │ │ +365 arraywriter->write(_g_e_o_m_e_t_r_y_T_y_p_e(cell.type())); │ │ │ │ │ +366 } │ │ │ │ │ +_3_6_8 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +369 arraywriter.reset(); │ │ │ │ │ +370 } │ │ │ │ │ +371 }; │ │ │ │ │ +372 │ │ │ │ │ +373 } // namespace VTK │ │ │ │ │ +374 │ │ │ │ │ +376 │ │ │ │ │ +377} // namespace Dune │ │ │ │ │ +378 │ │ │ │ │ +379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ │ +_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ │ +Data array writers for the VTKWriter. │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ -> &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:158 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Vertex &vertex) │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters(const Entity &) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:96 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ -comm=MPIHelper::getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_g_r_i_d │ │ │ │ │ -Grid * grid() │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Element &element) │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ -bool boundary() const │ │ │ │ │ -Return true if intersection is with interior or exterior boundary (see the │ │ │ │ │ -cases above) │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:216 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ -int indexInInside() const │ │ │ │ │ -Local index of codim 1 entity in the inside() entity where intersection is │ │ │ │ │ -contained in. │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ -static const type & defaultValue() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_v_t_x_p_a_r_a_m_s │ │ │ │ │ -int nofvtxparams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x_P_a_r_a_m_s │ │ │ │ │ -std::vector< std::vector< double > > vtxParams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_e_l_p_a_r_a_m_s │ │ │ │ │ -int nofelparams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_P_a_r_a_m_s │ │ │ │ │ -std::vector< std::vector< double > > elParams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x │ │ │ │ │ -std::vector< std::vector< double > > vtx │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t_s │ │ │ │ │ -std ::vector< std ::vector< unsigned int > > elements │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:134 │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ +@ int32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ +@ uint8 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ +@ float32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ +mapping from GeometryType to VTKGeometryType │ │ │ │ │ +DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +Base class for function writers. │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const =0 │ │ │ │ │ +return name │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const =0 │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Cell &, const Domain &) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_C_e_l_l │ │ │ │ │ +Cell_ Cell │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer)=0 │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite()=0 │ │ │ │ │ +signal end of writing │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_D_o_m_a_i_n │ │ │ │ │ +FieldVector< DF, mydim > Domain │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0 │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_~_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +virtual ~FunctionWriterBase() │ │ │ │ │ +destructor │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Cell &cell, unsigned cornerIndex) │ │ │ │ │ +write at the given corner │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +Base class for function writers. │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision │ │ │ │ │ +prec=VTK::Precision::float32) │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const typename Base::Cell &cell, const typename Base::Domain │ │ │ │ │ +&xl) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ +writer for the Coordinates array │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const typename Base::Cell &cell, const typename Base::Domain │ │ │ │ │ +&xl) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:176 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:162 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ +CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +writer for the connectivity array in conforming mode │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:216 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const typename Base::Cell &cell, unsigned cornerIndex) │ │ │ │ │ +write at the given corner │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:242 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +ConformingConnectivityWriter(const IteratorFactory &factory_) │ │ │ │ │ +create a writer with the given iteratorfactory │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:213 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:221 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:251 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +writer for the connectivity array in nonconforming mode │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:261 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:270 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:267 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Cell &, unsigned) │ │ │ │ │ +write at the given corner │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:273 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:278 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:291 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ │ +writer for the offsets array │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:300 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:331 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:308 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Cell &cell, const typename Base::Domain &) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:326 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:311 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r │ │ │ │ │ +writer for the types array │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:340 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:350 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:358 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:347 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Cell &cell, const typename Base::Domain &) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:364 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:353 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:368 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +void addArray(const std::string &name, unsigned ncomps, Precision prec) │ │ │ │ │ +Add an array to the output file. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ +unsigned nitems, Precision prec) │ │ │ │ │ +acquire a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: interval.hh File Reference │ │ │ │ +dune-grid: vtkwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,52 +65,95 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
interval.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
vtkwriter.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ + │ │ │ │ +

Provides file i/o for the visualization toolkit. │ │ │ │ +More...

│ │ │ │ +
#include <cstring>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <sstream>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <type_traits>
│ │ │ │ #include <vector>
│ │ │ │ -#include <array>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#include <list>
│ │ │ │ +#include <map>
│ │ │ │ +#include <dune/common/visibility.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/indent.hh>
│ │ │ │ +#include <dune/common/iteratorfacades.hh>
│ │ │ │ +#include <dune/common/path.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/dataarraywriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/function.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/streams.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::IntervalBlock
class  Dune::VTKWriter< GridView >
 Writer for the ouput of grid functions in the vtk format. More...
 
class  Dune::VTKWriter< GridView >::VTKLocalFunction
 Type erasure wrapper for VTK data sets. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase
 Base class for polymorphic container of underlying data set. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F >
 Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F >
 Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordinates. More...
 
struct  Dune::dgf::IntervalBlock::Interval
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper
 Type erasure implementation for legacy VTKFunctions. More...
 
class  Dune::VTKWriter< GridView >::CellIterator
 Iterator over the grids elements. More...
 
class  Dune::VTKWriter< GridView >::VertexIterator
 Iterate over the grid's vertices. More...
 
class  Dune::VTKWriter< GridView >::CornerIterator
 Iterate over the elements' corners. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Provides file i/o for the visualization toolkit.

│ │ │ │ +
Author
Peter Bastian, Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,33 +2,79 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_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 │ │ │ │ │ -interval.hh File Reference │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +vtkwriter.hh File Reference │ │ │ │ │ +Provides file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Writer for the ouput of grid functions in the vtk format. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ +  Type erasure wrapper for _V_T_K data sets. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +  Base class for polymorphic container of underlying data set. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_<_ _F_ _> │ │ │ │ │ +  Type erasure implementation for functions conforming to the dune- │ │ │ │ │ + functions LocalFunction interface. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_< │ │ │ │ │ + _F_ _> │ │ │ │ │ +  Type erasure implementation for C++ functions, i.e., functions that │ │ │ │ │ + can be evaluated in global coordinates. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +  Type erasure implementation for legacy VTKFunctions. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +  Iterator over the grids elements. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ │ +  Iterate over the grid's vertices. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +  Iterate over the elements' corners. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _I_n_t_e_r_v_a_l_B_l_o_c_k_:_: │ │ │ │ │ - _I_n_t_e_r_v_a_l &interval) │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Provides file i/o for the visualization toolkit. │ │ │ │ │ + Author │ │ │ │ │ + Peter Bastian, Christian Engwer │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: interval.hh Source File │ │ │ │ +dune-grid: vtkwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,210 +70,1657 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
interval.hh
│ │ │ │ +
vtkwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_INTERVALBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_INTERVALBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <array>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
18 namespace dgf
│ │ │ │ -
19 {
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_VTKWRITER_HH
│ │ │ │ +
7#define DUNE_VTKWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstring>
│ │ │ │ +
10#include <iostream>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <fstream>
│ │ │ │ +
13#include <sstream>
│ │ │ │ +
14#include <iomanip>
│ │ │ │ +
15#include <memory>
│ │ │ │ +
16#include <type_traits>
│ │ │ │ +
17#include <vector>
│ │ │ │ +
18#include <list>
│ │ │ │ +
19#include <map>
│ │ │ │
20
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public BasicBlock
│ │ │ │ -
23 {
│ │ │ │ -
│ │ │ │ -
24 struct Interval
│ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
27 Interval( const Interval& interval, const std::vector<int>& map )
│ │ │ │ -
28 {
│ │ │ │ -
29 copy( interval, map );
│ │ │ │ -
30 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
31 void copy(const Interval& interval, const std::vector<int>& map )
│ │ │ │ -
32 {
│ │ │ │ -
33 const int size = map.size();
│ │ │ │ -
34 p[0].resize( size );
│ │ │ │ -
35 p[1].resize( size );
│ │ │ │ -
36 n.resize( size );
│ │ │ │ -
37 h.resize( size );
│ │ │ │ -
38 assert( size == int(interval.n.size()) );
│ │ │ │ -
39 for( int i=0; i<size; ++i )
│ │ │ │ -
40 {
│ │ │ │ -
41 p[ 0 ][ i ] = interval.p[ 0 ][ map[ i ] ];
│ │ │ │ -
42 p[ 1 ][ i ] = interval.p[ 1 ][ map[ i ] ];
│ │ │ │ -
43 n[ i ] = interval.n[ map[ i ] ];
│ │ │ │ -
44 h[ i ] = interval.h[ map[ i ] ];
│ │ │ │ -
45 }
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47 std::array< std::vector< double >, 2 > p; // lower and upper boundary points
│ │ │ │ -
48 std::vector< double > h; // width of the cells in each direction
│ │ │ │ -
49 std::vector< int > n; // number of cells in each direction
│ │ │ │ -
50 };
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52 private:
│ │ │ │ -
53 std::vector< Interval > intervals_;
│ │ │ │ -
54 std::vector< int > map_;
│ │ │ │ -
55 bool good_; //data read correctly
│ │ │ │ -
56 int dimw_; //dimension of world
│ │ │ │ -
57
│ │ │ │ -
58 public:
│ │ │ │ -
59 explicit IntervalBlock ( std::istream &in );
│ │ │ │ +
21#include <dune/common/visibility.hh>
│ │ │ │ +
22#include <dune/common/typetraits.hh>
│ │ │ │ +
23#include <dune/common/exceptions.hh>
│ │ │ │ +
24#include <dune/common/indent.hh>
│ │ │ │ +
25#include <dune/common/iteratorfacades.hh>
│ │ │ │ +
26#include <dune/common/path.hh>
│ │ │ │ +
27#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
36
│ │ │ │ +
50namespace Dune
│ │ │ │ +
51{
│ │ │ │ +
52
│ │ │ │ +
53 namespace Impl
│ │ │ │ +
54 {
│ │ │ │ +
55 // Check whether type F has a method 'bind' (see the dune-functions interface)
│ │ │ │ +
56 template< class F, class E, class = void >
│ │ │ │ +
57 struct IsBindable
│ │ │ │ +
58 : std::false_type
│ │ │ │ +
59 {};
│ │ │ │
60
│ │ │ │ -
│ │ │ │ -
61 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx,
│ │ │ │ -
62 std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl )
│ │ │ │ -
63 {
│ │ │ │ -
64 for( size_t i = 0; i < intervals_.size(); ++i )
│ │ │ │ -
65 {
│ │ │ │ -
66 int oldvtx = nofvtx;
│ │ │ │ -
67 nofvtx += getVtx( i, vtx );
│ │ │ │ -
68 nofsimpl += getHexa( i, simplex, oldvtx );
│ │ │ │ -
69 }
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ -
72 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx )
│ │ │ │ -
73 {
│ │ │ │ -
74 for( size_t i = 0; i < intervals_.size(); ++i )
│ │ │ │ -
75 nofvtx += getVtx( i, vtx );
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ +
61 template< class F, class E >
│ │ │ │ +
62 struct IsBindable< F, E, std::void_t< decltype( std::declval< F & >().bind( std::declval< const E & >() ) ),
│ │ │ │ +
63 decltype( std::declval< F & >().unbind() ) > >
│ │ │ │ +
64 : std::true_type
│ │ │ │ +
65 {};
│ │ │ │ +
66
│ │ │ │ +
67 // Check whether localFunction(F) can be called (see the dune-functions interface)
│ │ │ │ +
68 template< class F, class = void >
│ │ │ │ +
69 struct HasLocalFunction
│ │ │ │ +
70 : std::false_type
│ │ │ │ +
71 {};
│ │ │ │ +
72
│ │ │ │ +
73 template< class F >
│ │ │ │ +
74 struct HasLocalFunction< F, std::void_t< decltype( localFunction( std::declval< F& >() ) ) > >
│ │ │ │ +
75 : std::true_type
│ │ │ │ +
76 {};
│ │ │ │
77
│ │ │ │ -
│ │ │ │ -
78 const Interval &get ( int block ) const
│ │ │ │ -
79 {
│ │ │ │ -
80 return intervals_[ block ];
│ │ │ │ -
81 }
│ │ │ │ -
│ │ │ │ -
82
│ │ │ │ -
│ │ │ │ -
83 int numIntervals () const
│ │ │ │ -
84 {
│ │ │ │ -
85 return intervals_.size();
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
│ │ │ │ -
88 int dimw () const
│ │ │ │ -
89 {
│ │ │ │ -
90 return dimw_;
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93 int getVtx ( int block, std::vector< std::vector< double > > &vtx ) const;
│ │ │ │ -
94 int getHexa ( int block, std::vector< std::vector< unsigned int > > &cubes,
│ │ │ │ -
95 int offset = 0 ) const;
│ │ │ │ +
78 } // namespace Impl
│ │ │ │ +
79
│ │ │ │ +
80 // Forward-declaration here, so the class can be friend of VTKWriter
│ │ │ │ +
81 template <class GridView>
│ │ │ │ + │ │ │ │ +
83 template <class GridView>
│ │ │ │ + │ │ │ │ +
85
│ │ │ │ +
94 template< class GridView >
│ │ │ │ +
│ │ │ │ +
95 class VTKWriter {
│ │ │ │
96
│ │ │ │ -
│ │ │ │ -
97 int nofvtx ( int block ) const
│ │ │ │ -
98 {
│ │ │ │ -
99 const Interval &interval = get( block );
│ │ │ │ -
100 int n = 1;
│ │ │ │ -
101 for( int i = 0; i < dimw_; ++i )
│ │ │ │ -
102 n *= (interval.n[ i ] + 1);
│ │ │ │ -
103 return n;
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ -
106 int nofhexa ( int block ) const
│ │ │ │ -
107 {
│ │ │ │ -
108 const Interval &interval = get( block );
│ │ │ │ -
109 int n = 1;
│ │ │ │ -
110 for( int i = 0; i < dimw_; ++i )
│ │ │ │ -
111 n *= interval.n[ i ];
│ │ │ │ -
112 return n;
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ +
97 // VTKSequenceWriterBase needs getSerialPieceName
│ │ │ │ +
98 // and getParallelHeaderName
│ │ │ │ +
99 friend class VTKSequenceWriterBase<GridView>;
│ │ │ │ +
100 // VTKSequenceWriter needs the grid view, to get the MPI size and rank
│ │ │ │ +
101 friend class VTKSequenceWriter<GridView>;
│ │ │ │ +
102
│ │ │ │ +
103 // extract types
│ │ │ │ +
104 typedef typename GridView::Grid Grid;
│ │ │ │ +
105 typedef typename GridView::ctype DT;
│ │ │ │ +
106 constexpr static int n = GridView::dimension;
│ │ │ │ +
107 constexpr static int w = GridView::dimensionworld;
│ │ │ │ +
108
│ │ │ │ +
109 typedef typename GridView::template Codim< 0 >::Entity Cell;
│ │ │ │ +
110 typedef typename GridView::template Codim< n >::Entity Vertex;
│ │ │ │ +
111 typedef Cell Entity;
│ │ │ │ +
112
│ │ │ │ +
113 typedef typename GridView::IndexSet IndexSet;
│ │ │ │
114
│ │ │ │ -
115 private:
│ │ │ │ -
116 template< class T >
│ │ │ │ -
117 void parseLine ( std::vector< T > &v );
│ │ │ │ -
118
│ │ │ │ -
119 bool next ();
│ │ │ │ -
120 };
│ │ │ │ -
│ │ │ │ -
121
│ │ │ │ -
│ │ │ │ -
122 inline std::ostream &
│ │ │ │ -
123 operator<< ( std::ostream &out, const IntervalBlock::Interval &interval )
│ │ │ │ -
124 {
│ │ │ │ -
125 if( interval.p[ 0 ].empty() || interval.p[ 1 ].empty() || interval.n.empty() )
│ │ │ │ -
126 return out << "Interval {}";
│ │ │ │ -
127
│ │ │ │ -
128 out << "Interval { p0 = (" << interval.p[ 0 ][ 0 ];
│ │ │ │ -
129 for( size_t i = 1; i < interval.p[ 0 ].size(); ++i )
│ │ │ │ -
130 out << ", " << interval.p[ 0 ][ i ];
│ │ │ │ -
131 out << "), p1 = (" << interval.p[ 1 ][ 0 ];
│ │ │ │ -
132 for( size_t i = 1; i < interval.p[ 1 ].size(); ++i )
│ │ │ │ -
133 out << ", " << interval.p[ 1 ][ i ];
│ │ │ │ -
134 out << "), n = (" << interval.n[ 0 ];
│ │ │ │ -
135 for( size_t i = 1; i < interval.n.size(); ++i )
│ │ │ │ -
136 out << ", " << interval.n[ i ];
│ │ │ │ -
137 return out << ") }";
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
140 } // end namespace dgf
│ │ │ │ -
141
│ │ │ │ -
142} // end namespace Dune
│ │ │ │ -
143
│ │ │ │ -
144#endif
│ │ │ │ - │ │ │ │ +
115 static const PartitionIteratorType VTK_Partition = InteriorBorder_Partition;
│ │ │ │ +
116 //static const PartitionIteratorType VTK_Partition = All_Partition;
│ │ │ │ +
117
│ │ │ │ +
118 typedef typename GridView::template Codim< 0 >
│ │ │ │ +
119 ::template Partition< VTK_Partition >::Iterator
│ │ │ │ +
120 GridCellIterator;
│ │ │ │ +
121 typedef typename GridView::template Codim< n >
│ │ │ │ +
122 ::template Partition< VTK_Partition >::Iterator
│ │ │ │ +
123 GridVertexIterator;
│ │ │ │ +
124
│ │ │ │ +
125 typedef typename GridCellIterator::Reference EntityReference;
│ │ │ │ +
126
│ │ │ │ +
127 typedef typename GridView::template Codim< 0 >
│ │ │ │ +
128 ::Entity::Geometry::LocalCoordinate Coordinate;
│ │ │ │ +
129
│ │ │ │ + │ │ │ │ +
131
│ │ │ │ +
132 // return true if entity should be skipped in Vertex and Corner iterator
│ │ │ │ +
133 static bool skipEntity( const PartitionType entityType )
│ │ │ │ +
134 {
│ │ │ │ +
135 switch( VTK_Partition )
│ │ │ │ +
136 {
│ │ │ │ +
137 // for All_Partition no entity has to be skipped
│ │ │ │ +
138 case All_Partition: return false;
│ │ │ │ +
139 case InteriorBorder_Partition: return ( entityType != InteriorEntity );
│ │ │ │ +
140 default: DUNE_THROW(NotImplemented,"Add check for this partition type");
│ │ │ │ +
141 }
│ │ │ │ +
142 return false ;
│ │ │ │ +
143 }
│ │ │ │ +
144
│ │ │ │ +
145 public:
│ │ │ │ +
146
│ │ │ │ + │ │ │ │ +
148
│ │ │ │ +
149 protected:
│ │ │ │ +
150
│ │ │ │ +
152
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
156 {
│ │ │ │ +
157
│ │ │ │ +
158 public:
│ │ │ │ +
159
│ │ │ │ + │ │ │ │ +
161
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
164 {
│ │ │ │ +
165
│ │ │ │ +
167 virtual void bind(const Entity& e) = 0;
│ │ │ │ +
168
│ │ │ │ +
170 virtual void unbind() = 0;
│ │ │ │ +
171
│ │ │ │ +
173
│ │ │ │ +
176 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const = 0;
│ │ │ │ +
177
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
179 {}
│ │ │ │ +
│ │ │ │ +
180
│ │ │ │ +
181 };
│ │ │ │ +
│ │ │ │ +
182
│ │ │ │ +
184 // DUNE_PRIVATE since _f has less visibility
│ │ │ │ +
185 template<typename F>
│ │ │ │ +
│ │ │ │ +
186 struct DUNE_PRIVATE FunctionWrapper
│ │ │ │ +
187 : public FunctionWrapperBase
│ │ │ │ +
188 {
│ │ │ │ +
189 using Function = typename std::decay<F>::type;
│ │ │ │ +
190
│ │ │ │ +
191 template<typename F_>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
193 : _f(std::forward<F_>(f))
│ │ │ │ +
194 {}
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
│ │ │ │ +
196 virtual void bind(const Entity& e)
│ │ │ │ +
197 {
│ │ │ │ +
198 _f.bind(e);
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
│ │ │ │ +
201 virtual void unbind()
│ │ │ │ +
202 {
│ │ │ │ +
203 _f.unbind();
│ │ │ │ +
204 }
│ │ │ │ +
│ │ │ │ +
205
│ │ │ │ +
│ │ │ │ +
206 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const
│ │ │ │ +
207 {
│ │ │ │ +
208 auto r = _f(pos);
│ │ │ │ +
209 // we need to do different things here depending on whether r supports indexing into it or not.
│ │ │ │ +
210 do_write(w,r,count,IsIndexable<decltype(r)>());
│ │ │ │ +
211 }
│ │ │ │ +
│ │ │ │ +
212
│ │ │ │ +
213 private:
│ │ │ │ +
214
│ │ │ │ +
215 template<typename R>
│ │ │ │ +
216 void do_write(Writer& w, const R& r, std::size_t count, std::true_type) const
│ │ │ │ +
217 {
│ │ │ │ +
218 for (std::size_t i = 0; i < count; ++i)
│ │ │ │ +
219 w.write(r[i]);
│ │ │ │ +
220 }
│ │ │ │ +
221
│ │ │ │ +
222 template<typename R>
│ │ │ │ +
223 void do_write(Writer& w, const R& r, std::size_t count, std::false_type) const
│ │ │ │ +
224 {
│ │ │ │ +
225 assert(count == 1);
│ │ │ │ +
226 w.write(r);
│ │ │ │ +
227 }
│ │ │ │ +
228
│ │ │ │ +
229 Function _f;
│ │ │ │ +
230 };
│ │ │ │ +
│ │ │ │ +
231
│ │ │ │ +
233 template<typename F>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
235 : public FunctionWrapperBase
│ │ │ │ +
236 {
│ │ │ │ +
237 using Function = typename std::decay<F>::type;
│ │ │ │ +
238
│ │ │ │ +
239 template<typename F_>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
241 : _f(std::forward<F_>(f))
│ │ │ │ +
242 , element_(nullptr)
│ │ │ │ +
243 {}
│ │ │ │ +
│ │ │ │ +
244
│ │ │ │ +
│ │ │ │ +
245 virtual void bind(const Entity& e)
│ │ │ │ +
246 {
│ │ │ │ +
247 element_ = &e;
│ │ │ │ +
248 }
│ │ │ │ +
│ │ │ │ +
249
│ │ │ │ +
│ │ │ │ +
250 virtual void unbind()
│ │ │ │ +
251 {
│ │ │ │ +
252 element_ = nullptr;
│ │ │ │ +
253 }
│ │ │ │ +
│ │ │ │ +
254
│ │ │ │ +
│ │ │ │ +
255 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const
│ │ │ │ +
256 {
│ │ │ │ +
257 auto globalPos = element_->geometry().global(pos);
│ │ │ │ +
258 auto r = _f(globalPos);
│ │ │ │ +
259 if constexpr (IsIndexable<decltype(r)>()) {
│ │ │ │ +
260 for (std::size_t i = 0; i < count; ++i)
│ │ │ │ +
261 w.write(r[i]);
│ │ │ │ +
262 }
│ │ │ │ +
263 else {
│ │ │ │ +
264 assert(count == 1);
│ │ │ │ +
265 w.write(r);
│ │ │ │ +
266 }
│ │ │ │ +
267 }
│ │ │ │ +
│ │ │ │ +
268 private:
│ │ │ │ +
269 Function _f;
│ │ │ │ +
270 const Entity* element_;
│ │ │ │ +
271 };
│ │ │ │ +
│ │ │ │ +
272
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
275 : public FunctionWrapperBase
│ │ │ │ +
276 {
│ │ │ │ +
│ │ │ │ +
277 VTKFunctionWrapper(const std::shared_ptr< const VTKFunction >& f)
│ │ │ │ +
278 : _f(f)
│ │ │ │ +
279 , _entity(nullptr)
│ │ │ │ +
280 {}
│ │ │ │ +
│ │ │ │ +
281
│ │ │ │ +
│ │ │ │ +
282 virtual void bind(const Entity& e)
│ │ │ │ +
283 {
│ │ │ │ +
284 _entity = &e;
│ │ │ │ +
285 }
│ │ │ │ +
│ │ │ │ +
286
│ │ │ │ +
│ │ │ │ +
287 virtual void unbind()
│ │ │ │ +
288 {
│ │ │ │ +
289 _entity = nullptr;
│ │ │ │ +
290 }
│ │ │ │ +
│ │ │ │ +
291
│ │ │ │ +
│ │ │ │ +
292 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const
│ │ │ │ +
293 {
│ │ │ │ +
294 for (std::size_t i = 0; i < count; ++i)
│ │ │ │ +
295 w.write(_f->evaluate(i,*_entity,pos));
│ │ │ │ +
296 }
│ │ │ │ +
│ │ │ │ +
297
│ │ │ │ +
298 private:
│ │ │ │ +
299
│ │ │ │ +
300 std::shared_ptr< const VTKFunction > _f;
│ │ │ │ +
301 const Entity* _entity;
│ │ │ │ +
302
│ │ │ │ +
303 };
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
306 template<typename F, std::enable_if_t<Impl::IsBindable<F, Entity>::value, int> = 0>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
308 : _f(std::make_unique<FunctionWrapper<F> >(std::forward<F>(f)))
│ │ │ │ + │ │ │ │ +
310 {}
│ │ │ │ +
│ │ │ │ +
311
│ │ │ │ +
313 // That is, a function that you can create a LocalFunction for, and evaluate that in element coordinates
│ │ │ │ +
314 template<typename F, std::enable_if_t<not Impl::IsBindable<F, Entity>::value && Impl::HasLocalFunction<F>::value, int> = 0>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
316 : _f(std::make_unique< FunctionWrapper<
│ │ │ │ +
317 typename std::decay<decltype(localFunction(std::forward<F>(f)))>::type
│ │ │ │ +
318 > >(localFunction(std::forward<F>(f))))
│ │ │ │ + │ │ │ │ +
320 {}
│ │ │ │ +
│ │ │ │ +
321
│ │ │ │ +
323 // That is, a function that can be evaluated in global coordinates of the domain
│ │ │ │ +
324 template<typename F, std::enable_if_t<not Impl::IsBindable<F, Entity>::value && not Impl::HasLocalFunction<F>::value, int> = 0>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
326 : _f(std::make_unique< GlobalFunctionWrapper<F> >(std::forward<F>(f)))
│ │ │ │ + │ │ │ │ +
328 {}
│ │ │ │ +
│ │ │ │ +
329
│ │ │ │ +
│ │ │ │ +
331 explicit VTKLocalFunction (const std::shared_ptr< const VTKFunction >& vtkFunctionPtr)
│ │ │ │ +
332 : _f(std::make_unique<VTKFunctionWrapper>(vtkFunctionPtr))
│ │ │ │ +
333 , _fieldInfo(
│ │ │ │ +
334 vtkFunctionPtr->name(),
│ │ │ │ +
335 (vtkFunctionPtr->ncomps() == 2 || vtkFunctionPtr->ncomps() == 3) ? VTK::FieldInfo::Type::vector : VTK::FieldInfo::Type::scalar,
│ │ │ │ +
336 vtkFunctionPtr->ncomps(),
│ │ │ │ +
337 vtkFunctionPtr->precision()
│ │ │ │ +
338 )
│ │ │ │ +
339 {}
│ │ │ │ +
│ │ │ │ +
340
│ │ │ │ +
│ │ │ │ +
342 std::string name() const
│ │ │ │ +
343 {
│ │ │ │ +
344 return fieldInfo().name();
│ │ │ │ +
345 }
│ │ │ │ +
│ │ │ │ +
346
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
349 {
│ │ │ │ +
350 return _fieldInfo;
│ │ │ │ +
351 }
│ │ │ │ +
│ │ │ │ +
352
│ │ │ │ +
│ │ │ │ +
354 void bind(const Entity& e) const
│ │ │ │ +
355 {
│ │ │ │ +
356 _f->bind(e);
│ │ │ │ +
357 }
│ │ │ │ +
│ │ │ │ +
358
│ │ │ │ +
│ │ │ │ +
360 void unbind() const
│ │ │ │ +
361 {
│ │ │ │ +
362 _f->unbind();
│ │ │ │ +
363 }
│ │ │ │ +
│ │ │ │ +
364
│ │ │ │ +
│ │ │ │ +
366 void write(const Coordinate& pos, Writer& w) const
│ │ │ │ +
367 {
│ │ │ │ +
368 _f->write(pos,w,fieldInfo().size());
│ │ │ │ +
369 }
│ │ │ │ +
│ │ │ │ +
370
│ │ │ │ +
371 std::shared_ptr<FunctionWrapperBase> _f;
│ │ │ │ + │ │ │ │ +
373
│ │ │ │ +
374 };
│ │ │ │ +
│ │ │ │ +
375
│ │ │ │ +
376 typedef typename std::list<VTKLocalFunction>::const_iterator FunctionIterator;
│ │ │ │ +
377
│ │ │ │ +
379
│ │ │ │ +
│ │ │ │ +
384 class CellIterator : public GridCellIterator
│ │ │ │ +
385 {
│ │ │ │ +
386 public:
│ │ │ │ +
388 CellIterator(const GridCellIterator & x) : GridCellIterator(x) {}
│ │ │ │ +
│ │ │ │ +
391 const FieldVector<DT,n> position() const
│ │ │ │ +
392 {
│ │ │ │ +
393 return ReferenceElements<DT,n>::general((*this)->type()).position(0,0);
│ │ │ │ +
394 }
│ │ │ │ +
│ │ │ │ +
395 };
│ │ │ │ +
│ │ │ │ +
396
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
398 {
│ │ │ │ +
399 return gridView_.template begin< 0, VTK_Partition >();
│ │ │ │ +
400 }
│ │ │ │ +
│ │ │ │ +
401
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
403 {
│ │ │ │ +
404 return gridView_.template end< 0, VTK_Partition >();
│ │ │ │ +
405 }
│ │ │ │ +
│ │ │ │ +
406
│ │ │ │ +
408
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
423 public ForwardIteratorFacade<VertexIterator, const Entity, EntityReference, int>
│ │ │ │ +
424 {
│ │ │ │ +
425 GridCellIterator git;
│ │ │ │ +
426 GridCellIterator gend;
│ │ │ │ +
427 VTK::DataMode datamode;
│ │ │ │ +
428 // Index of the currently visited corner within the current element.
│ │ │ │ +
429 // NOTE: this is in Dune-numbering, in contrast to CornerIterator.
│ │ │ │ +
430 int cornerIndexDune;
│ │ │ │ +
431 const VertexMapper & vertexmapper;
│ │ │ │ +
432 std::vector<bool> visited;
│ │ │ │ +
433 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ │ +
434 // hold its number in the iteration order (VertexIterator)
│ │ │ │ +
435 int offset;
│ │ │ │ +
436
│ │ │ │ +
437 // hide operator ->
│ │ │ │ +
438 void operator->();
│ │ │ │ +
439 protected:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
441 {
│ │ │ │ +
442 if( git == gend )
│ │ │ │ +
443 return;
│ │ │ │ +
444 ++cornerIndexDune;
│ │ │ │ +
445 const int numCorners = git->subEntities(n);
│ │ │ │ +
446 if( cornerIndexDune == numCorners )
│ │ │ │ +
447 {
│ │ │ │ +
448 offset += numCorners;
│ │ │ │ +
449 cornerIndexDune = 0;
│ │ │ │ +
450
│ │ │ │ +
451 ++git;
│ │ │ │ +
452 while( (git != gend) && skipEntity( git->partitionType() ) )
│ │ │ │ +
453 ++git;
│ │ │ │ +
454 }
│ │ │ │ +
455 }
│ │ │ │ +
│ │ │ │ +
456 public:
│ │ │ │ +
│ │ │ │ +
457 VertexIterator(const GridCellIterator & x,
│ │ │ │ +
458 const GridCellIterator & end,
│ │ │ │ +
459 const VTK::DataMode & dm,
│ │ │ │ +
460 const VertexMapper & vm) :
│ │ │ │ +
461 git(x), gend(end), datamode(dm), cornerIndexDune(0),
│ │ │ │ +
462 vertexmapper(vm), visited(vm.size(), false),
│ │ │ │ +
463 offset(0)
│ │ │ │ +
464 {
│ │ │ │ +
465 if (datamode == VTK::conforming && git != gend)
│ │ │ │ +
466 visited[vertexmapper.subIndex(*git,cornerIndexDune,n)] = true;
│ │ │ │ +
467 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
468 void increment ()
│ │ │ │ +
469 {
│ │ │ │ +
470 switch (datamode)
│ │ │ │ +
471 {
│ │ │ │ +
472 case VTK::conforming :
│ │ │ │ +
473 while(visited[vertexmapper.subIndex(*git,cornerIndexDune,n)])
│ │ │ │ +
474 {
│ │ │ │ + │ │ │ │ +
476 if (git == gend) return;
│ │ │ │ +
477 }
│ │ │ │ +
478 visited[vertexmapper.subIndex(*git,cornerIndexDune,n)] = true;
│ │ │ │ +
479 break;
│ │ │ │ +
480 case VTK::nonconforming :
│ │ │ │ + │ │ │ │ +
482 break;
│ │ │ │ +
483 }
│ │ │ │ +
484 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
485 bool equals (const VertexIterator & cit) const
│ │ │ │ +
486 {
│ │ │ │ +
487 return git == cit.git
│ │ │ │ +
488 && cornerIndexDune == cit.cornerIndexDune
│ │ │ │ +
489 && datamode == cit.datamode;
│ │ │ │ +
490 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
491 EntityReference dereference() const
│ │ │ │ +
492 {
│ │ │ │ +
493 return *git;
│ │ │ │ +
494 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
496 int localindex () const
│ │ │ │ +
497 {
│ │ │ │ +
498 return cornerIndexDune;
│ │ │ │ +
499 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
501 FieldVector<DT,n> position () const
│ │ │ │ +
502 {
│ │ │ │ +
503 return referenceElement<DT,n>(git->type())
│ │ │ │ +
504 .position(cornerIndexDune,n);
│ │ │ │ +
505 }
│ │ │ │ +
│ │ │ │ +
506 };
│ │ │ │ +
│ │ │ │ +
507
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
509 {
│ │ │ │ +
510 return VertexIterator( gridView_.template begin< 0, VTK_Partition >(),
│ │ │ │ +
511 gridView_.template end< 0, VTK_Partition >(),
│ │ │ │ +
512 datamode, *vertexmapper );
│ │ │ │ +
513 }
│ │ │ │ +
│ │ │ │ +
514
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
516 {
│ │ │ │ +
517 return VertexIterator( gridView_.template end< 0, VTK_Partition >(),
│ │ │ │ +
518 gridView_.template end< 0, VTK_Partition >(),
│ │ │ │ +
519 datamode, *vertexmapper );
│ │ │ │ +
520 }
│ │ │ │ +
│ │ │ │ +
521
│ │ │ │ +
523
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
538 public ForwardIteratorFacade<CornerIterator, const Entity, EntityReference, int>
│ │ │ │ +
539 {
│ │ │ │ +
540 GridCellIterator git;
│ │ │ │ +
541 GridCellIterator gend;
│ │ │ │ +
542 VTK::DataMode datamode;
│ │ │ │ +
543 // Index of the currently visited corner within the current element.
│ │ │ │ +
544 // NOTE: this is in VTK-numbering, in contrast to VertexIterator.
│ │ │ │ +
545 int cornerIndexVTK;
│ │ │ │ +
546 const VertexMapper & vertexmapper;
│ │ │ │ +
547 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ │ +
548 // hold its number in the iteration order of VertexIterator (*not*
│ │ │ │ +
549 // CornerIterator)
│ │ │ │ +
550 const std::vector<int> & number;
│ │ │ │ +
551 // holds the number of corners of all the elements we have seen so far,
│ │ │ │ +
552 // excluding the current element
│ │ │ │ +
553 int offset;
│ │ │ │ +
554
│ │ │ │ +
555 // hide operator ->
│ │ │ │ +
556 void operator->();
│ │ │ │ +
557 public:
│ │ │ │ +
│ │ │ │ +
558 CornerIterator(const GridCellIterator & x,
│ │ │ │ +
559 const GridCellIterator & end,
│ │ │ │ +
560 const VTK::DataMode & dm,
│ │ │ │ +
561 const VertexMapper & vm,
│ │ │ │ +
562 const std::vector<int> & num) :
│ │ │ │ +
563 git(x), gend(end), datamode(dm), cornerIndexVTK(0),
│ │ │ │ +
564 vertexmapper(vm),
│ │ │ │ +
565 number(num), offset(0) {}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
566 void increment ()
│ │ │ │ +
567 {
│ │ │ │ +
568 if( git == gend )
│ │ │ │ +
569 return;
│ │ │ │ +
570 ++cornerIndexVTK;
│ │ │ │ +
571 const int numCorners = git->subEntities(n);
│ │ │ │ +
572 if( cornerIndexVTK == numCorners )
│ │ │ │ +
573 {
│ │ │ │ +
574 offset += numCorners;
│ │ │ │ +
575 cornerIndexVTK = 0;
│ │ │ │ +
576
│ │ │ │ +
577 ++git;
│ │ │ │ +
578 while( (git != gend) && skipEntity( git->partitionType() ) )
│ │ │ │ +
579 ++git;
│ │ │ │ +
580 }
│ │ │ │ +
581 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
582 bool equals (const CornerIterator & cit) const
│ │ │ │ +
583 {
│ │ │ │ +
584 return git == cit.git
│ │ │ │ +
585 && cornerIndexVTK == cit.cornerIndexVTK
│ │ │ │ +
586 && datamode == cit.datamode;
│ │ │ │ +
587 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
588 EntityReference dereference() const
│ │ │ │ +
589 {
│ │ │ │ +
590 return *git;
│ │ │ │ +
591 }
│ │ │ │ +
│ │ │ │ +
593
│ │ │ │ +
│ │ │ │ +
597 int id () const
│ │ │ │ +
598 {
│ │ │ │ +
599 switch (datamode)
│ │ │ │ +
600 {
│ │ │ │ +
601 case VTK::conforming :
│ │ │ │ +
602 return
│ │ │ │ +
603 number[vertexmapper.subIndex(*git,VTK::renumber(*git,cornerIndexVTK),
│ │ │ │ +
604 n)];
│ │ │ │ +
605 case VTK::nonconforming :
│ │ │ │ +
606 return offset + VTK::renumber(*git,cornerIndexVTK);
│ │ │ │ +
607 default :
│ │ │ │ +
608 DUNE_THROW(IOError,"VTKWriter: unsupported DataMode" << datamode);
│ │ │ │ +
609 }
│ │ │ │ +
610 }
│ │ │ │ +
│ │ │ │ +
611 };
│ │ │ │ +
│ │ │ │ +
612
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
614 {
│ │ │ │ +
615 return CornerIterator( gridView_.template begin< 0, VTK_Partition >(),
│ │ │ │ +
616 gridView_.template end< 0, VTK_Partition >(),
│ │ │ │ +
617 datamode, *vertexmapper, number );
│ │ │ │ +
618 }
│ │ │ │ +
│ │ │ │ +
619
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
621 {
│ │ │ │ +
622 return CornerIterator( gridView_.template end< 0, VTK_Partition >(),
│ │ │ │ +
623 gridView_.template end< 0, VTK_Partition >(),
│ │ │ │ +
624 datamode, *vertexmapper, number );
│ │ │ │ +
625 }
│ │ │ │ +
│ │ │ │ +
626
│ │ │ │ +
627 public:
│ │ │ │ +
│ │ │ │ +
636 explicit VTKWriter ( const GridView &gridView,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
639 : gridView_( gridView ),
│ │ │ │ +
640 datamode( dm ),
│ │ │ │ +
641 coordPrec (coordPrecision),
│ │ │ │ +
642 polyhedralCellsPresent_( checkForPolyhedralCells() )
│ │ │ │ +
643 { }
│ │ │ │ +
│ │ │ │ +
644
│ │ │ │ +
│ │ │ │ +
649 void addCellData (const std::shared_ptr< const VTKFunction > & p)
│ │ │ │ +
650 {
│ │ │ │ +
651 celldata.push_back(VTKLocalFunction(p));
│ │ │ │ +
652 }
│ │ │ │ +
│ │ │ │ +
653
│ │ │ │ +
673 template<typename F>
│ │ │ │ +
│ │ │ │ +
674 void addCellData(F&& f, VTK::FieldInfo vtkFieldInfo)
│ │ │ │ +
675 {
│ │ │ │ +
676 celldata.push_back(VTKLocalFunction(std::forward<F>(f),vtkFieldInfo));
│ │ │ │ +
677 }
│ │ │ │ +
│ │ │ │ +
678
│ │ │ │ +
694 template<class Container>
│ │ │ │ +
│ │ │ │ +
695 void addCellData (const Container& v, const std::string &name, int ncomps = 1,
│ │ │ │ + │ │ │ │ +
697 {
│ │ │ │ +
698 typedef P0VTKFunction<GridView, Container> Function;
│ │ │ │ +
699 for (int c=0; c<ncomps; ++c) {
│ │ │ │ +
700 std::stringstream compName;
│ │ │ │ +
701 compName << name;
│ │ │ │ +
702 if (ncomps>1)
│ │ │ │ +
703 compName << "[" << c << "]";
│ │ │ │ +
704 VTKFunction* p = new Function(gridView_, v, compName.str(), ncomps, c, prec);
│ │ │ │ +
705 addCellData(std::shared_ptr< const VTKFunction >(p));
│ │ │ │ +
706 }
│ │ │ │ +
707 }
│ │ │ │ +
│ │ │ │ +
708
│ │ │ │ +
│ │ │ │ +
713 void addVertexData (const std::shared_ptr< const VTKFunction > & p)
│ │ │ │ +
714 {
│ │ │ │ +
715 vertexdata.push_back(VTKLocalFunction(p));
│ │ │ │ +
716 }
│ │ │ │ +
│ │ │ │ +
717
│ │ │ │ +
737 template<typename F>
│ │ │ │ +
│ │ │ │ +
738 void addVertexData(F&& f, VTK::FieldInfo vtkFieldInfo)
│ │ │ │ +
739 {
│ │ │ │ +
740 vertexdata.push_back(VTKLocalFunction(std::forward<F>(f),vtkFieldInfo));
│ │ │ │ +
741 }
│ │ │ │ +
│ │ │ │ +
742
│ │ │ │ +
743
│ │ │ │ +
759 template<class Container>
│ │ │ │ +
│ │ │ │ +
760 void addVertexData (const Container& v, const std::string &name, int ncomps=1,
│ │ │ │ + │ │ │ │ +
762 {
│ │ │ │ +
763 typedef P1VTKFunction<GridView, Container> Function;
│ │ │ │ +
764 for (int c=0; c<ncomps; ++c) {
│ │ │ │ +
765 std::stringstream compName;
│ │ │ │ +
766 compName << name;
│ │ │ │ +
767 if (ncomps>1)
│ │ │ │ +
768 compName << "[" << c << "]";
│ │ │ │ +
769 VTKFunction* p = new Function(gridView_, v, compName.str(), ncomps, c, prec);
│ │ │ │ +
770 addVertexData(std::shared_ptr< const VTKFunction >(p));
│ │ │ │ +
771 }
│ │ │ │ +
772 }
│ │ │ │ +
│ │ │ │ +
773
│ │ │ │ +
│ │ │ │ +
775 void clear ()
│ │ │ │ +
776 {
│ │ │ │ +
777 celldata.clear();
│ │ │ │ +
778 vertexdata.clear();
│ │ │ │ +
779 }
│ │ │ │ +
│ │ │ │ +
780
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
783 { return coordPrec; }
│ │ │ │ +
│ │ │ │ +
784
│ │ │ │ +
│ │ │ │ +
786 virtual ~VTKWriter ()
│ │ │ │ +
787 {
│ │ │ │ +
788 this->clear();
│ │ │ │ +
789 }
│ │ │ │ +
│ │ │ │ +
790
│ │ │ │ +
│ │ │ │ +
803 std::string write ( const std::string &name,
│ │ │ │ + │ │ │ │ +
805 {
│ │ │ │ +
806 return write( name, type, gridView_.comm().rank(), gridView_.comm().size() );
│ │ │ │ +
807 }
│ │ │ │ +
│ │ │ │ +
808
│ │ │ │ +
│ │ │ │ +
835 std::string pwrite ( const std::string & name, const std::string & path, const std::string & extendpath,
│ │ │ │ + │ │ │ │ +
837 {
│ │ │ │ +
838 return pwrite( name, path, extendpath, type, gridView_.comm().rank(), gridView_.comm().size() );
│ │ │ │ +
839 }
│ │ │ │ +
│ │ │ │ +
840
│ │ │ │ +
841 protected:
│ │ │ │ +
843
│ │ │ │ +
│ │ │ │ +
855 std::string getParallelPieceName(const std::string& name,
│ │ │ │ +
856 const std::string& path,
│ │ │ │ +
857 int commRank, int commSize) const
│ │ │ │ +
858 {
│ │ │ │ +
859 std::ostringstream s;
│ │ │ │ +
860 // write path first
│ │ │ │ +
861 if(path.size() > 0)
│ │ │ │ +
862 {
│ │ │ │ +
863 s << path;
│ │ │ │ +
864 if(path[path.size()-1] != '/')
│ │ │ │ +
865 s << '/';
│ │ │ │ +
866 }
│ │ │ │ +
867
│ │ │ │ +
868 std::string fileprefix;
│ │ │ │ +
869 // check if a path was already added to name
│ │ │ │ +
870 // and if yes find filename without path
│ │ │ │ +
871 auto pos = name.rfind('/');
│ │ │ │ +
872 if( pos != std::string::npos )
│ │ │ │ +
873 {
│ │ │ │ +
874 // extract filename without path
│ │ │ │ +
875 fileprefix = name.substr( pos+1 );
│ │ │ │ +
876 // extract the path and added it before
│ │ │ │ +
877 // the magic below is added
│ │ │ │ +
878 std::string newpath = name.substr(0, pos);
│ │ │ │ +
879 s << newpath;
│ │ │ │ +
880 if(newpath[name.size()-1] != '/')
│ │ │ │ +
881 s << '/';
│ │ │ │ +
882 }
│ │ │ │ +
883 else
│ │ │ │ +
884 {
│ │ │ │ +
885 // if no path was found just copy the name
│ │ │ │ +
886 fileprefix = name;
│ │ │ │ +
887 }
│ │ │ │ +
888
│ │ │ │ +
889 s << 's' << std::setw(4) << std::setfill('0') << commSize << '-';
│ │ │ │ +
890 const bool writeHeader = commRank < 0;
│ │ │ │ +
891 if( ! writeHeader )
│ │ │ │ +
892 {
│ │ │ │ +
893 s << 'p' << std::setw(4) << std::setfill('0') << commRank << '-';
│ │ │ │ +
894 }
│ │ │ │ +
895
│ │ │ │ +
896 s << fileprefix << ".";
│ │ │ │ +
897 // write p for header files
│ │ │ │ +
898 if( writeHeader )
│ │ │ │ +
899 s << "p";
│ │ │ │ +
900 s << "vt";
│ │ │ │ +
901
│ │ │ │ +
902 if(GridView::dimension > 1)
│ │ │ │ +
903 s << "u";
│ │ │ │ +
904 else
│ │ │ │ +
905 s << "p";
│ │ │ │ +
906 return s.str();
│ │ │ │ +
907 }
│ │ │ │ +
│ │ │ │ +
908
│ │ │ │ +
910
│ │ │ │ +
│ │ │ │ +
920 std::string getParallelHeaderName(const std::string& name,
│ │ │ │ +
921 const std::string& path,
│ │ │ │ +
922 int commSize) const
│ │ │ │ +
923 {
│ │ │ │ +
924 return getParallelPieceName( name, path, -1, commSize );
│ │ │ │ +
925 }
│ │ │ │ +
│ │ │ │ +
926
│ │ │ │ +
928
│ │ │ │ +
│ │ │ │ +
940 std::string getSerialPieceName(const std::string& name,
│ │ │ │ +
941 const std::string& path) const
│ │ │ │ +
942 {
│ │ │ │ +
943 static const std::string extension =
│ │ │ │ +
944 GridView::dimension == 1 ? ".vtp" : ".vtu";
│ │ │ │ +
945
│ │ │ │ +
946 return concatPaths(path, name+extension);
│ │ │ │ +
947 }
│ │ │ │ +
│ │ │ │ +
948
│ │ │ │ +
│ │ │ │ +
965 std::string write ( const std::string &name,
│ │ │ │ +
966 VTK::OutputType type,
│ │ │ │ +
967 const int commRank,
│ │ │ │ +
968 const int commSize )
│ │ │ │ +
969 {
│ │ │ │ +
970 // in the parallel case, just use pwrite, it has all the necessary
│ │ │ │ +
971 // stuff, so we don't need to reimplement it here.
│ │ │ │ +
972 if(commSize > 1)
│ │ │ │ +
973 {
│ │ │ │ +
974 std::string filename = name;
│ │ │ │ +
975 std::string path = std::string("");
│ │ │ │ +
976
│ │ │ │ +
977 // check if a path was already added to name
│ │ │ │ +
978 // and if yes find filename without path
│ │ │ │ +
979 auto pos = name.rfind('/');
│ │ │ │ +
980 if( pos != std::string::npos )
│ │ │ │ +
981 {
│ │ │ │ +
982 // extract filename without path
│ │ │ │ +
983 filename = name.substr( pos+1 );
│ │ │ │ +
984
│ │ │ │ +
985 // extract the path and added it before
│ │ │ │ +
986 // the magic below is added
│ │ │ │ +
987 path = name.substr(0, pos);
│ │ │ │ +
988 }
│ │ │ │ +
989
│ │ │ │ +
990 return pwrite(filename, path, "", type, commRank, commSize);
│ │ │ │ +
991 }
│ │ │ │ +
992
│ │ │ │ +
993 // make data mode visible to private functions
│ │ │ │ +
994 outputtype = type;
│ │ │ │ +
995
│ │ │ │ +
996 // generate filename for process data
│ │ │ │ +
997 std::string pieceName = getSerialPieceName(name, "");
│ │ │ │ +
998
│ │ │ │ +
999 // write process data
│ │ │ │ +
1000 std::ofstream file;
│ │ │ │ +
1001 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
1002 std::ios_base::eofbit);
│ │ │ │ +
1003 // check if file can be opened
│ │ │ │ +
1004 try {
│ │ │ │ +
1005 file.open( pieceName.c_str(), std::ios::binary );
│ │ │ │ +
1006 }
│ │ │ │ +
1007 catch(...) {
│ │ │ │ +
1008 std::cerr << "Filename: " << pieceName << " could not be opened" << std::endl;
│ │ │ │ +
1009 throw;
│ │ │ │ +
1010 }
│ │ │ │ +
1011 if (! file.is_open())
│ │ │ │ +
1012 DUNE_THROW(IOError, "Could not write to piece file " << pieceName);
│ │ │ │ +
1013 writeDataFile( file );
│ │ │ │ +
1014 file.close();
│ │ │ │ +
1015
│ │ │ │ +
1016 return pieceName;
│ │ │ │ +
1017 }
│ │ │ │ +
│ │ │ │ +
1018
│ │ │ │ +
1020
│ │ │ │ +
│ │ │ │ +
1043 std::string pwrite(const std::string& name, const std::string& path,
│ │ │ │ +
1044 const std::string& extendpath,
│ │ │ │ +
1045 VTK::OutputType ot, const int commRank,
│ │ │ │ +
1046 const int commSize )
│ │ │ │ +
1047 {
│ │ │ │ +
1048 // make data mode visible to private functions
│ │ │ │ +
1049 outputtype=ot;
│ │ │ │ +
1050
│ │ │ │ +
1051 // do some magic because paraview can only cope with relative paths to piece files
│ │ │ │ +
1052 std::ofstream file;
│ │ │ │ +
1053 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
1054 std::ios_base::eofbit);
│ │ │ │ +
1055 std::string piecepath = concatPaths(path, extendpath);
│ │ │ │ +
1056 std::string relpiecepath = relativePath(path, piecepath);
│ │ │ │ +
1057
│ │ │ │ +
1058 // write this processes .vtu/.vtp piece file
│ │ │ │ +
1059 std::string fullname = getParallelPieceName(name, piecepath, commRank,
│ │ │ │ +
1060 commSize);
│ │ │ │ +
1061 // check if file can be opened
│ │ │ │ +
1062 try {
│ │ │ │ +
1063 file.open(fullname.c_str(),std::ios::binary);
│ │ │ │ +
1064 }
│ │ │ │ +
1065 catch(...) {
│ │ │ │ +
1066 std::cerr << "Filename: " << fullname << " could not be opened" << std::endl;
│ │ │ │ +
1067 throw;
│ │ │ │ +
1068 }
│ │ │ │ +
1069 if (! file.is_open())
│ │ │ │ +
1070 DUNE_THROW(IOError, "Could not write to piecefile file " << fullname);
│ │ │ │ +
1071 writeDataFile(file);
│ │ │ │ +
1072 file.close();
│ │ │ │ +
1073 gridView_.comm().barrier();
│ │ │ │ +
1074
│ │ │ │ +
1075 // if we are rank 0, write .pvtu/.pvtp parallel header
│ │ │ │ +
1076 fullname = getParallelHeaderName(name, path, commSize);
│ │ │ │ +
1077 if( commRank ==0 )
│ │ │ │ +
1078 {
│ │ │ │ +
1079 file.open(fullname.c_str());
│ │ │ │ +
1080 if (! file.is_open())
│ │ │ │ +
1081 DUNE_THROW(IOError, "Could not write to parallel file " << fullname);
│ │ │ │ +
1082 writeParallelHeader(file,name,relpiecepath, commSize );
│ │ │ │ +
1083 file.close();
│ │ │ │ +
1084 }
│ │ │ │ +
1085 gridView_.comm().barrier();
│ │ │ │ +
1086 return fullname;
│ │ │ │ +
1087 }
│ │ │ │ +
│ │ │ │ +
1088
│ │ │ │ +
1089 private:
│ │ │ │ +
1091
│ │ │ │ +
1108 void writeParallelHeader(std::ostream& s, const std::string& piecename,
│ │ │ │ +
1109 const std::string& piecepath, const int commSize)
│ │ │ │ +
1110 {
│ │ │ │ +
1111 VTK::FileType fileType =
│ │ │ │ +
1112 (n == 1) ? VTK::polyData : VTK::unstructuredGrid;
│ │ │ │ +
1113
│ │ │ │ +
1114 VTK::PVTUWriter writer(s, fileType);
│ │ │ │ +
1115
│ │ │ │ +
1116 writer.beginMain();
│ │ │ │ +
1117
│ │ │ │ +
1118 // PPointData
│ │ │ │ +
1119 {
│ │ │ │ +
1120 std::string scalars, vectors;
│ │ │ │ +
1121 std::tie(scalars,vectors) = getDataNames(vertexdata);
│ │ │ │ +
1122 writer.beginPointData(scalars, vectors);
│ │ │ │ +
1123 }
│ │ │ │ +
1124 for (auto it = vertexdata.begin(),
│ │ │ │ +
1125 end = vertexdata.end();
│ │ │ │ +
1126 it != end;
│ │ │ │ +
1127 ++it)
│ │ │ │ +
1128 {
│ │ │ │ +
1129 unsigned writecomps = it->fieldInfo().size();
│ │ │ │ +
1130 if(writecomps == 2) writecomps = 3;
│ │ │ │ +
1131 writer.addArray(it->name(), writecomps, it->fieldInfo().precision());
│ │ │ │ +
1132 }
│ │ │ │ +
1133 writer.endPointData();
│ │ │ │ +
1134
│ │ │ │ +
1135 // PCellData
│ │ │ │ +
1136 {
│ │ │ │ +
1137 std::string scalars, vectors;
│ │ │ │ +
1138 std::tie(scalars,vectors) = getDataNames(celldata);
│ │ │ │ +
1139 writer.beginCellData(scalars, vectors);
│ │ │ │ +
1140 }
│ │ │ │ +
1141 for (auto it = celldata.begin(),
│ │ │ │ +
1142 end = celldata.end();
│ │ │ │ +
1143 it != end;
│ │ │ │ +
1144 ++it)
│ │ │ │ +
1145 {
│ │ │ │ +
1146 unsigned writecomps = it->fieldInfo().size();
│ │ │ │ +
1147 if(writecomps == 2) writecomps = 3;
│ │ │ │ +
1148 writer.addArray(it->name(), writecomps, it->fieldInfo().precision());
│ │ │ │ +
1149 }
│ │ │ │ +
1150 writer.endCellData();
│ │ │ │ +
1151
│ │ │ │ +
1152 // PPoints
│ │ │ │ +
1153 writer.beginPoints();
│ │ │ │ +
1154 writer.addArray("Coordinates", 3, coordPrec);
│ │ │ │ +
1155 writer.endPoints();
│ │ │ │ +
1156
│ │ │ │ +
1157 // Pieces
│ │ │ │ +
1158 for( int i = 0; i < commSize; ++i )
│ │ │ │ +
1159 {
│ │ │ │ +
1160 const std::string& fullname = getParallelPieceName(piecename,
│ │ │ │ +
1161 piecepath, i,
│ │ │ │ +
1162 commSize);
│ │ │ │ +
1163 writer.addPiece(fullname);
│ │ │ │ +
1164 }
│ │ │ │ +
1165
│ │ │ │ +
1166 writer.endMain();
│ │ │ │ +
1167 }
│ │ │ │ +
1168
│ │ │ │ +
1170 void writeDataFile (std::ostream& s)
│ │ │ │ +
1171 {
│ │ │ │ +
1172 VTK::FileType fileType =
│ │ │ │ +
1173 (n == 1) ? VTK::polyData : VTK::unstructuredGrid;
│ │ │ │ +
1174
│ │ │ │ +
1175 VTK::VTUWriter writer(s, outputtype, fileType);
│ │ │ │ +
1176
│ │ │ │ +
1177 // Grid characteristics
│ │ │ │ +
1178 vertexmapper = new VertexMapper( gridView_, mcmgVertexLayout() );
│ │ │ │ +
1179 if (datamode == VTK::conforming)
│ │ │ │ +
1180 {
│ │ │ │ +
1181 number.resize(vertexmapper->size());
│ │ │ │ +
1182 for (std::vector<int>::size_type i=0; i<number.size(); i++) number[i] = -1;
│ │ │ │ +
1183 }
│ │ │ │ + │ │ │ │ +
1185
│ │ │ │ +
1186 writer.beginMain(ncells, nvertices);
│ │ │ │ +
1187 writeAllData(writer);
│ │ │ │ +
1188 writer.endMain();
│ │ │ │ +
1189
│ │ │ │ +
1190 // write appended binary data section
│ │ │ │ +
1191 if(writer.beginAppended())
│ │ │ │ +
1192 writeAllData(writer);
│ │ │ │ +
1193 writer.endAppended();
│ │ │ │ +
1194
│ │ │ │ +
1195 delete vertexmapper; number.clear();
│ │ │ │ +
1196 }
│ │ │ │ +
1197
│ │ │ │ +
1198 void writeAllData(VTK::VTUWriter& writer) {
│ │ │ │ +
1199 // PointData
│ │ │ │ +
1200 writeVertexData(writer);
│ │ │ │ +
1201
│ │ │ │ +
1202 // CellData
│ │ │ │ +
1203 writeCellData(writer);
│ │ │ │ +
1204
│ │ │ │ +
1205 // Points
│ │ │ │ +
1206 writeGridPoints(writer);
│ │ │ │ +
1207
│ │ │ │ +
1208 // Cells
│ │ │ │ +
1209 writeGridCells(writer);
│ │ │ │ +
1210 }
│ │ │ │ +
1211
│ │ │ │ +
1212 protected:
│ │ │ │ +
│ │ │ │ +
1213 std::string getFormatString() const
│ │ │ │ +
1214 {
│ │ │ │ + │ │ │ │ +
1216 return "ascii";
│ │ │ │ + │ │ │ │ +
1218 return "binary";
│ │ │ │ + │ │ │ │ +
1220 return "appended";
│ │ │ │ + │ │ │ │ +
1222 return "appended";
│ │ │ │ +
1223 DUNE_THROW(IOError, "VTKWriter: unsupported OutputType" << outputtype);
│ │ │ │ +
1224 }
│ │ │ │ +
│ │ │ │ +
1225
│ │ │ │ +
│ │ │ │ +
1226 std::string getTypeString() const
│ │ │ │ +
1227 {
│ │ │ │ +
1228 if (n==1)
│ │ │ │ +
1229 return "PolyData";
│ │ │ │ +
1230 else
│ │ │ │ +
1231 return "UnstructuredGrid";
│ │ │ │ +
1232 }
│ │ │ │ +
│ │ │ │ +
1233
│ │ │ │ +
│ │ │ │ +
1235 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
│ │ │ │ +
1236 {
│ │ │ │ +
1237 nvertices_ = 0;
│ │ │ │ +
1238 ncells_ = 0;
│ │ │ │ +
1239 ncorners_ = 0;
│ │ │ │ +
1240 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
1241 {
│ │ │ │ +
1242 ncells_++;
│ │ │ │ +
1243 // because of the use of vertexmapper->map(), this iteration must be
│ │ │ │ +
1244 // in the order of Dune's numbering.
│ │ │ │ +
1245 const int subEntities = it->subEntities(n);
│ │ │ │ +
1246 for (int i=0; i<subEntities; ++i)
│ │ │ │ +
1247 {
│ │ │ │ +
1248 ncorners_++;
│ │ │ │ +
1249 if (datamode == VTK::conforming)
│ │ │ │ +
1250 {
│ │ │ │ +
1251 int alpha = vertexmapper->subIndex(*it,i,n);
│ │ │ │ +
1252 if (number[alpha]<0)
│ │ │ │ +
1253 number[alpha] = nvertices_++;
│ │ │ │ +
1254 }
│ │ │ │ +
1255 else
│ │ │ │ +
1256 {
│ │ │ │ +
1257 nvertices_++;
│ │ │ │ +
1258 }
│ │ │ │ +
1259 }
│ │ │ │ +
1260 }
│ │ │ │ +
1261 }
│ │ │ │ +
│ │ │ │ +
1262
│ │ │ │ +
1263 template<typename T>
│ │ │ │ +
│ │ │ │ +
1264 std::tuple<std::string,std::string> getDataNames(const T& data) const
│ │ │ │ +
1265 {
│ │ │ │ +
1266 std::string scalars = "";
│ │ │ │ +
1267 for (auto it = data.begin(),
│ │ │ │ +
1268 end = data.end();
│ │ │ │ +
1269 it != end;
│ │ │ │ +
1270 ++it)
│ │ │ │ +
1271 if (it->fieldInfo().type() == VTK::FieldInfo::Type::scalar)
│ │ │ │ +
1272 {
│ │ │ │ +
1273 scalars = it->name();
│ │ │ │ +
1274 break;
│ │ │ │ +
1275 }
│ │ │ │ +
1276
│ │ │ │ +
1277 std::string vectors = "";
│ │ │ │ +
1278 for (auto it = data.begin(),
│ │ │ │ +
1279 end = data.end();
│ │ │ │ +
1280 it != end;
│ │ │ │ +
1281 ++it)
│ │ │ │ +
1282 if (it->fieldInfo().type() == VTK::FieldInfo::Type::vector)
│ │ │ │ +
1283 {
│ │ │ │ +
1284 vectors = it->name();
│ │ │ │ +
1285 break;
│ │ │ │ +
1286 }
│ │ │ │ +
1287 return std::make_tuple(scalars,vectors);
│ │ │ │ +
1288 }
│ │ │ │ +
│ │ │ │ +
1289
│ │ │ │ +
1290 template<typename Data, typename Iterator>
│ │ │ │ +
│ │ │ │ +
1291 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries)
│ │ │ │ +
1292 {
│ │ │ │ +
1293 for (auto it = data.begin(),
│ │ │ │ +
1294 iend = data.end();
│ │ │ │ +
1295 it != iend;
│ │ │ │ +
1296 ++it)
│ │ │ │ +
1297 {
│ │ │ │ +
1298 const auto& f = *it;
│ │ │ │ +
1299 VTK::FieldInfo fieldInfo = f.fieldInfo();
│ │ │ │ +
1300 std::size_t writecomps = fieldInfo.size();
│ │ │ │ +
1301 switch (fieldInfo.type())
│ │ │ │ +
1302 {
│ │ │ │ + │ │ │ │ +
1304 break;
│ │ │ │ + │ │ │ │ +
1306 // vtk file format: a vector data always should have 3 comps (with
│ │ │ │ +
1307 // 3rd comp = 0 in 2D case)
│ │ │ │ +
1308 if (writecomps > 3)
│ │ │ │ +
1309 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
│ │ │ │ +
1310 writecomps = 3;
│ │ │ │ +
1311 break;
│ │ │ │ + │ │ │ │ +
1313 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet");
│ │ │ │ +
1314 }
│ │ │ │ +
1315 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ +
1316 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision()));
│ │ │ │ +
1317 if(!p->writeIsNoop())
│ │ │ │ +
1318 for (Iterator eit = begin; eit!=end; ++eit)
│ │ │ │ +
1319 {
│ │ │ │ +
1320 const Entity & e = *eit;
│ │ │ │ +
1321 f.bind(e);
│ │ │ │ +
1322 f.write(eit.position(),*p);
│ │ │ │ +
1323 f.unbind();
│ │ │ │ +
1324 // vtk file format: a vector data always should have 3 comps
│ │ │ │ +
1325 // (with 3rd comp = 0 in 2D case)
│ │ │ │ +
1326 for (std::size_t j=fieldInfo.size(); j < writecomps; ++j)
│ │ │ │ +
1327 p->write(0.0);
│ │ │ │ +
1328 }
│ │ │ │ +
1329 }
│ │ │ │ +
1330 }
│ │ │ │ +
│ │ │ │ +
1331
│ │ │ │ +
│ │ │ │ +
1333 virtual void writeCellData(VTK::VTUWriter& writer)
│ │ │ │ +
1334 {
│ │ │ │ +
1335 if(celldata.size() == 0)
│ │ │ │ +
1336 return;
│ │ │ │ +
1337
│ │ │ │ +
1338 std::string scalars, vectors;
│ │ │ │ +
1339 std::tie(scalars,vectors) = getDataNames(celldata);
│ │ │ │ +
1340
│ │ │ │ +
1341 writer.beginCellData(scalars, vectors);
│ │ │ │ + │ │ │ │ +
1343 writer.endCellData();
│ │ │ │ +
1344 }
│ │ │ │ +
│ │ │ │ +
1345
│ │ │ │ +
│ │ │ │ +
1347 virtual void writeVertexData(VTK::VTUWriter& writer)
│ │ │ │ +
1348 {
│ │ │ │ +
1349 if(vertexdata.size() == 0)
│ │ │ │ +
1350 return;
│ │ │ │ +
1351
│ │ │ │ +
1352 std::string scalars, vectors;
│ │ │ │ +
1353 std::tie(scalars,vectors) = getDataNames(vertexdata);
│ │ │ │ +
1354
│ │ │ │ +
1355 writer.beginPointData(scalars, vectors);
│ │ │ │ + │ │ │ │ +
1357 writer.endPointData();
│ │ │ │ +
1358 }
│ │ │ │ +
│ │ │ │ +
1359
│ │ │ │ +
│ │ │ │ +
1361 virtual void writeGridPoints(VTK::VTUWriter& writer)
│ │ │ │ +
1362 {
│ │ │ │ +
1363 writer.beginPoints();
│ │ │ │ +
1364
│ │ │ │ +
1365 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ +
1366 (writer.makeArrayWriter("Coordinates", 3, nvertices, coordPrec));
│ │ │ │ +
1367 if(!p->writeIsNoop()) {
│ │ │ │ +
1368 VertexIterator vEnd = vertexEnd();
│ │ │ │ +
1369 for (VertexIterator vit=vertexBegin(); vit!=vEnd; ++vit)
│ │ │ │ +
1370 {
│ │ │ │ +
1371 int dimw=w;
│ │ │ │ +
1372 for (int j=0; j<std::min(dimw,3); j++)
│ │ │ │ +
1373 p->write((*vit).geometry().corner(vit.localindex())[j]);
│ │ │ │ +
1374 for (int j=std::min(dimw,3); j<3; j++)
│ │ │ │ +
1375 p->write(0.0);
│ │ │ │ +
1376 }
│ │ │ │ +
1377 }
│ │ │ │ +
1378 // free the VTK::DataArrayWriter before touching the stream
│ │ │ │ +
1379 p.reset();
│ │ │ │ +
1380
│ │ │ │ +
1381 writer.endPoints();
│ │ │ │ +
1382 }
│ │ │ │ +
│ │ │ │ +
1383
│ │ │ │ +
│ │ │ │ +
1385 virtual void writeGridCells(VTK::VTUWriter& writer)
│ │ │ │ +
1386 {
│ │ │ │ +
1387 writer.beginCells();
│ │ │ │ +
1388
│ │ │ │ +
1389 // connectivity
│ │ │ │ +
1390 {
│ │ │ │ +
1391 std::shared_ptr<VTK::DataArrayWriter> p1
│ │ │ │ +
1392 (writer.makeArrayWriter("connectivity", 1, ncorners, VTK::Precision::int32));
│ │ │ │ +
1393 if(!p1->writeIsNoop())
│ │ │ │ +
1394 for (CornerIterator it=cornerBegin(); it!=cornerEnd(); ++it)
│ │ │ │ +
1395 p1->write(it.id());
│ │ │ │ +
1396 }
│ │ │ │ +
1397
│ │ │ │ +
1398 // offsets
│ │ │ │ +
1399 {
│ │ │ │ +
1400 std::shared_ptr<VTK::DataArrayWriter> p2
│ │ │ │ +
1401 (writer.makeArrayWriter("offsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ +
1402 if(!p2->writeIsNoop()) {
│ │ │ │ +
1403 int offset = 0;
│ │ │ │ +
1404 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
1405 {
│ │ │ │ +
1406 offset += it->subEntities(n);
│ │ │ │ +
1407 p2->write(offset);
│ │ │ │ +
1408 }
│ │ │ │ +
1409 }
│ │ │ │ +
1410 }
│ │ │ │ +
1411
│ │ │ │ +
1412 // types
│ │ │ │ +
1413 if (n>1)
│ │ │ │ +
1414 {
│ │ │ │ +
1415 {
│ │ │ │ +
1416 std::shared_ptr<VTK::DataArrayWriter> p3
│ │ │ │ +
1417 (writer.makeArrayWriter("types", 1, ncells, VTK::Precision::uint8));
│ │ │ │ +
1418
│ │ │ │ +
1419 if(!p3->writeIsNoop())
│ │ │ │ +
1420 {
│ │ │ │ +
1421 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
1422 {
│ │ │ │ +
1423 int vtktype = VTK::geometryType(it->type());
│ │ │ │ +
1424 p3->write(vtktype);
│ │ │ │ +
1425 }
│ │ │ │ +
1426 }
│ │ │ │ +
1427 }
│ │ │ │ +
1428
│ │ │ │ +
1429
│ │ │ │ +
1430 // if polyhedron cells found also cell faces need to be written
│ │ │ │ +
1431 if( polyhedralCellsPresent_ )
│ │ │ │ +
1432 {
│ │ │ │ +
1433 writeCellFaces( writer );
│ │ │ │ +
1434 }
│ │ │ │ +
1435 }
│ │ │ │ +
1436
│ │ │ │ +
1437 writer.endCells();
│ │ │ │ +
1438 }
│ │ │ │ +
│ │ │ │ +
1439
│ │ │ │ +
1440 protected:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1442 {
│ │ │ │ +
1443 // check if polyhedron cells are present
│ │ │ │ +
1444 for( const auto& geomType : gridView_.indexSet().types( 0 ) )
│ │ │ │ +
1445 {
│ │ │ │ +
1446 if( VTK::geometryType( geomType ) == VTK::polyhedron )
│ │ │ │ +
1447 {
│ │ │ │ +
1448 return true;
│ │ │ │ +
1449 }
│ │ │ │ +
1450 }
│ │ │ │ +
1451 return false;
│ │ │ │ +
1452 }
│ │ │ │ +
│ │ │ │ +
1453
│ │ │ │ +
│ │ │ │ +
1455 virtual void writeCellFaces(VTK::VTUWriter& writer)
│ │ │ │ +
1456 {
│ │ │ │ +
1457 if( ! faceVertices_ )
│ │ │ │ +
1458 {
│ │ │ │ +
1459 faceVertices_.reset( new std::pair< std::vector<int>, std::vector<int> > () );
│ │ │ │ +
1460 // fill face vertex structure
│ │ │ │ + │ │ │ │ +
1462 faceVertices_->first, faceVertices_->second );
│ │ │ │ +
1463 }
│ │ │ │ +
1464
│ │ │ │ +
1465 std::vector< int >& faces = faceVertices_->first;
│ │ │ │ +
1466 std::vector< int >& faceOffsets = faceVertices_->second;
│ │ │ │ +
1467 assert( int(faceOffsets.size()) == ncells );
│ │ │ │ +
1468
│ │ │ │ +
1469 {
│ │ │ │ +
1470 std::shared_ptr<VTK::DataArrayWriter> p4
│ │ │ │ +
1471 (writer.makeArrayWriter("faces", 1, faces.size(), VTK::Precision::int32));
│ │ │ │ +
1472 if(!p4->writeIsNoop())
│ │ │ │ +
1473 {
│ │ │ │ +
1474 for( const auto& face : faces )
│ │ │ │ +
1475 p4->write( face );
│ │ │ │ +
1476 }
│ │ │ │ +
1477 }
│ │ │ │ +
1478
│ │ │ │ +
1479 {
│ │ │ │ +
1480 std::shared_ptr<VTK::DataArrayWriter> p5
│ │ │ │ +
1481 (writer.makeArrayWriter("faceoffsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ +
1482 if(!p5->writeIsNoop())
│ │ │ │ +
1483 {
│ │ │ │ +
1484 for( const auto& offset : faceOffsets )
│ │ │ │ +
1485 p5->write( offset );
│ │ │ │ +
1486
│ │ │ │ +
1487 // clear face vertex structure
│ │ │ │ +
1488 faceVertices_.reset();
│ │ │ │ +
1489 }
│ │ │ │ +
1490 }
│ │ │ │ +
1491 }
│ │ │ │ +
│ │ │ │ +
1492
│ │ │ │ +
1493 template <class CornerIterator, class IndexSet, class T>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1495 const CornerIterator end,
│ │ │ │ +
1496 const IndexSet& indexSet,
│ │ │ │ +
1497 std::vector<T>& faces,
│ │ │ │ +
1498 std::vector<T>& faceOffsets )
│ │ │ │ +
1499 {
│ │ │ │ +
1500 if( n == 3 && it != end )
│ │ │ │ +
1501 {
│ │ │ │ +
1502 // clear output arrays
│ │ │ │ +
1503 faces.clear();
│ │ │ │ +
1504 faces.reserve( 15 * ncells );
│ │ │ │ +
1505 faceOffsets.clear();
│ │ │ │ +
1506 faceOffsets.reserve( ncells );
│ │ │ │ +
1507
│ │ │ │ +
1508 int offset = 0;
│ │ │ │ +
1509
│ │ │ │ +
1510 Cell element = *it;
│ │ │ │ +
1511 int elIndex = indexSet.index( element );
│ │ │ │ +
1512 std::vector< T > vertices;
│ │ │ │ +
1513 vertices.reserve( 30 );
│ │ │ │ +
1514 for( ; it != end; ++it )
│ │ │ │ +
1515 {
│ │ │ │ +
1516 const Cell& cell = *it ;
│ │ │ │ +
1517 const int cellIndex = indexSet.index( cell ) ;
│ │ │ │ +
1518 if( elIndex != cellIndex )
│ │ │ │ +
1519 {
│ │ │ │ +
1520 fillFacesForElement( element, indexSet, vertices, offset, faces, faceOffsets );
│ │ │ │ +
1521
│ │ │ │ +
1522 vertices.clear();
│ │ │ │ +
1523 element = cell ;
│ │ │ │ +
1524 elIndex = cellIndex ;
│ │ │ │ +
1525 }
│ │ │ │ +
1526 vertices.push_back( it.id() );
│ │ │ │ +
1527 }
│ │ │ │ +
1528
│ │ │ │ +
1529 // fill faces for last element
│ │ │ │ +
1530 fillFacesForElement( element, indexSet, vertices, offset, faces, faceOffsets );
│ │ │ │ +
1531 }
│ │ │ │ +
1532 }
│ │ │ │ +
│ │ │ │ +
1533
│ │ │ │ +
1534 template <class Entity, class IndexSet, class T>
│ │ │ │ +
│ │ │ │ +
1535 static void fillFacesForElement( const Entity& element,
│ │ │ │ +
1536 const IndexSet& indexSet,
│ │ │ │ +
1537 const std::vector<T>& vertices,
│ │ │ │ +
1538 T& offset,
│ │ │ │ +
1539 std::vector<T>& faces,
│ │ │ │ +
1540 std::vector<T>& faceOffsets )
│ │ │ │ +
1541 {
│ │ │ │ +
1542 const int dim = n;
│ │ │ │ +
1543
│ │ │ │ +
1544 std::map< T, T > vxMap;
│ │ │ │ +
1545
│ │ │ │ +
1546 // get number of local faces
│ │ │ │ +
1547 const int nVertices = element.subEntities( dim );
│ │ │ │ +
1548 for( int vx = 0; vx < nVertices; ++ vx )
│ │ │ │ +
1549 {
│ │ │ │ +
1550 const int vxIdx = indexSet.subIndex( element, vx, dim );
│ │ │ │ +
1551 vxMap[ vxIdx ] = vertices[ vx ];
│ │ │ │ +
1552 }
│ │ │ │ +
1553
│ │ │ │ +
1554 // get number of local faces
│ │ │ │ +
1555 const int nFaces = element.subEntities( 1 );
│ │ │ │ +
1556 // store number of faces for current element
│ │ │ │ +
1557 faces.push_back( nFaces );
│ │ │ │ +
1558 ++offset;
│ │ │ │ +
1559 // extract each face as a set of vertex indices
│ │ │ │ +
1560 for( int fce = 0; fce < nFaces; ++ fce )
│ │ │ │ +
1561 {
│ │ │ │ +
1562 // obtain face
│ │ │ │ +
1563 const auto face = element.template subEntity< 1 > ( fce );
│ │ │ │ +
1564
│ │ │ │ +
1565 // get all vertex indices from current face
│ │ │ │ +
1566 const int nVxFace = face.subEntities( dim );
│ │ │ │ +
1567 faces.push_back( nVxFace );
│ │ │ │ +
1568 ++offset ;
│ │ │ │ +
1569 for( int i=0; i<nVxFace; ++i )
│ │ │ │ +
1570 {
│ │ │ │ +
1571 const T vxIndex = indexSet.subIndex( face, i, dim );
│ │ │ │ +
1572 assert( vxMap.find( vxIndex ) != vxMap.end() );
│ │ │ │ +
1573 faces.push_back( vxMap[ vxIndex ] );
│ │ │ │ +
1574 ++offset ;
│ │ │ │ +
1575 }
│ │ │ │ +
1576 }
│ │ │ │ +
1577
│ │ │ │ +
1578 // store face offset for each element
│ │ │ │ +
1579 faceOffsets.push_back( offset );
│ │ │ │ +
1580 }
│ │ │ │ +
│ │ │ │ +
1581
│ │ │ │ +
1582 protected:
│ │ │ │ +
1583 // the list of registered functions
│ │ │ │ +
1584 std::list<VTKLocalFunction> celldata;
│ │ │ │ +
1585 std::list<VTKLocalFunction> vertexdata;
│ │ │ │ +
1586
│ │ │ │ +
1587 // the grid
│ │ │ │ + │ │ │ │ +
1589
│ │ │ │ +
1590 // temporary grid information
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
1594 private:
│ │ │ │ +
1595 VertexMapper* vertexmapper;
│ │ │ │ +
1596 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ │ +
1597 // hold its number in the iteration order (VertexIterator)
│ │ │ │ +
1598 std::vector<int> number;
│ │ │ │ +
1599 VTK::DataMode datamode;
│ │ │ │ +
1600 VTK::Precision coordPrec;
│ │ │ │ +
1601
│ │ │ │ +
1602 // true if polyhedral cells are present in the grid
│ │ │ │ +
1603 const bool polyhedralCellsPresent_;
│ │ │ │ +
1604
│ │ │ │ +
1605 // pointer holding face vertex connectivity if needed
│ │ │ │ +
1606 std::shared_ptr< std::pair< std::vector<int>, std::vector<int> > > faceVertices_;
│ │ │ │ +
1607
│ │ │ │ +
1608 protected:
│ │ │ │ + │ │ │ │ +
1610 };
│ │ │ │ +
│ │ │ │ +
1611
│ │ │ │ +
1612}
│ │ │ │ +
1613
│ │ │ │ +
1614#endif
│ │ │ │ + │ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Data array writers for the VTKWriter.
│ │ │ │ + │ │ │ │ +
Functions for VTK output.
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ +
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ +
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ │ +
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ │ +
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ +
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:191
│ │ │ │ +
Traits::Grid Grid
type of the grid
Definition common/gridview.hh:83
│ │ │ │ +
Traits::IndexSet IndexSet
type of the index set
Definition common/gridview.hh:86
│ │ │ │ +
const Communication & comm() const
obtain communication object
Definition common/gridview.hh:280
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ +
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:145
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:151
│ │ │ │ +
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │ +
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
Definition interval.hh:123
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
Definition interval.hh:23
│ │ │ │ -
void get(std::vector< std::vector< double > > &vtx, int &nofvtx, std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl)
Definition interval.hh:61
│ │ │ │ -
int numIntervals() const
Definition interval.hh:83
│ │ │ │ -
int getVtx(int block, std::vector< std::vector< double > > &vtx) const
Definition interval.cc:84
│ │ │ │ -
const Interval & get(int block) const
Definition interval.hh:78
│ │ │ │ -
int getHexa(int block, std::vector< std::vector< unsigned int > > &cubes, int offset=0) const
Definition interval.cc:122
│ │ │ │ -
int nofhexa(int block) const
Definition interval.hh:106
│ │ │ │ -
int dimw() const
Definition interval.hh:88
│ │ │ │ -
int nofvtx(int block) const
Definition interval.hh:97
│ │ │ │ -
void get(std::vector< std::vector< double > > &vtx, int &nofvtx)
Definition interval.hh:72
│ │ │ │ -
Definition interval.hh:25
│ │ │ │ -
Interval()
Definition interval.hh:26
│ │ │ │ -
std::array< std::vector< double >, 2 > p
Definition interval.hh:47
│ │ │ │ -
std::vector< int > n
Definition interval.hh:49
│ │ │ │ -
Interval(const Interval &interval, const std::vector< int > &map)
Definition interval.hh:27
│ │ │ │ -
void copy(const Interval &interval, const std::vector< int > &map)
Definition interval.hh:31
│ │ │ │ -
std::vector< double > h
Definition interval.hh:48
│ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ +
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ +
@ appendedraw
Output is to the file is appended raw binary.
Definition common.hh:49
│ │ │ │ +
@ appendedbase64
Output is to the file is appended base64 binary.
Definition common.hh:51
│ │ │ │ +
@ base64
Output to the file is inline base64 binary.
Definition common.hh:47
│ │ │ │ +
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ +
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ +
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ +
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ +
DataMode
Whether to produce conforming or non-conforming output.
Definition common.hh:67
│ │ │ │ +
@ conforming
Output conforming data.
Definition common.hh:73
│ │ │ │ +
@ nonconforming
Output non-conforming data.
Definition common.hh:81
│ │ │ │ +
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ +
@ polyhedron
Definition common.hh:142
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ +
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ +
size_type size() const
Return total number of entities in the entity set managed by the mapper.
Definition mcmgmapper.hh:204
│ │ │ │ +
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to starting index in array for dof block.
Definition mcmgmapper.hh:185
│ │ │ │ +
Descriptor struct for VTK fields.
Definition common.hh:328
│ │ │ │ +
std::size_t size() const
The number of components in the data field.
Definition common.hh:364
│ │ │ │ +
Precision precision() const
The precision used for the output of the data field.
Definition common.hh:370
│ │ │ │ +
@ tensor
tensor field (always 3x3)
│ │ │ │ +
@ vector
vector-valued field (always 3D, will be padded if necessary)
│ │ │ │ + │ │ │ │ +
Type type() const
The type of the data field.
Definition common.hh:358
│ │ │ │ +
std::string name() const
The name of the data field.
Definition common.hh:352
│ │ │ │ +
base class for data array writers
Definition dataarraywriter.hh:56
│ │ │ │ +
void write(T data)
write one element of data
Definition dataarraywriter.hh:69
│ │ │ │ +
A base class for grid functions with any return type and dimension.
Definition function.hh:42
│ │ │ │ +
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
│ │ │ │ +
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ +
Writer for the ouput of grid functions in the vtk format.
Definition vtksequencewriter.hh:29
│ │ │ │ +
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition vtksequencewriterbase.hh:34
│ │ │ │ +
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ +
void addCellData(const Container &v, const std::string &name, int ncomps=1, VTK::Precision prec=VTK::Precision::float32)
Add a grid function (represented by container) that lives on the cells of the grid to the visualizati...
Definition vtkwriter.hh:695
│ │ │ │ +
CornerIterator cornerEnd() const
Definition vtkwriter.hh:620
│ │ │ │ +
void clear()
clear list of registered functions
Definition vtkwriter.hh:775
│ │ │ │ +
std::string write(const std::string &name, VTK::OutputType type=VTK::ascii)
write output (interface might change later)
Definition vtkwriter.hh:803
│ │ │ │ +
VertexIterator vertexBegin() const
Definition vtkwriter.hh:508
│ │ │ │ +
std::string getTypeString() const
Definition vtkwriter.hh:1226
│ │ │ │ +
std::string getParallelHeaderName(const std::string &name, const std::string &path, int commSize) const
return name of a parallel header file
Definition vtkwriter.hh:920
│ │ │ │ +
void addVertexData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the vertices of the grid to the visualization.
Definition vtkwriter.hh:713
│ │ │ │ +
Dune::VTKFunction< GridView > VTKFunction
Definition vtkwriter.hh:147
│ │ │ │ +
CellIterator cellEnd() const
Definition vtkwriter.hh:402
│ │ │ │ +
std::list< VTKLocalFunction > vertexdata
Definition vtkwriter.hh:1585
│ │ │ │ +
CornerIterator cornerBegin() const
Definition vtkwriter.hh:613
│ │ │ │ +
std::string getSerialPieceName(const std::string &name, const std::string &path) const
return name of a serial piece file
Definition vtkwriter.hh:940
│ │ │ │ +
void addCellData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the cells of the grid to the visualization.
Definition vtkwriter.hh:649
│ │ │ │ +
std::string getFormatString() const
Definition vtkwriter.hh:1213
│ │ │ │ +
bool checkForPolyhedralCells() const
Definition vtkwriter.hh:1441
│ │ │ │ +
void addVertexData(F &&f, VTK::FieldInfo vtkFieldInfo)
Add a function by sampling it on the grid vertices.
Definition vtkwriter.hh:738
│ │ │ │ +
virtual void writeCellData(VTK::VTUWriter &writer)
write cell data
Definition vtkwriter.hh:1333
│ │ │ │ +
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition vtkwriter.hh:1235
│ │ │ │ +
std::string getParallelPieceName(const std::string &name, const std::string &path, int commRank, int commSize) const
return name of a parallel piece file (or header name)
Definition vtkwriter.hh:855
│ │ │ │ +
CellIterator cellBegin() const
Definition vtkwriter.hh:397
│ │ │ │ +
VTK::OutputType outputtype
Definition vtkwriter.hh:1609
│ │ │ │ +
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1385
│ │ │ │ +
GridView gridView_
Definition vtkwriter.hh:1588
│ │ │ │ +
virtual void writeCellFaces(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1455
│ │ │ │ +
void fillFaceVertices(CornerIterator it, const CornerIterator end, const IndexSet &indexSet, std::vector< T > &faces, std::vector< T > &faceOffsets)
Definition vtkwriter.hh:1494
│ │ │ │ +
std::list< VTKLocalFunction > celldata
Definition vtkwriter.hh:1584
│ │ │ │ +
std::string write(const std::string &name, VTK::OutputType type, const int commRank, const int commSize)
write output (interface might change later)
Definition vtkwriter.hh:965
│ │ │ │ +
VTK::Precision coordPrecision() const
get the precision with which coordinates are written out
Definition vtkwriter.hh:782
│ │ │ │ +
std::list< VTKLocalFunction >::const_iterator FunctionIterator
Definition vtkwriter.hh:376
│ │ │ │ +
std::tuple< std::string, std::string > getDataNames(const T &data) const
Definition vtkwriter.hh:1264
│ │ │ │ +
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition vtkwriter.hh:1361
│ │ │ │ +
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition vtkwriter.hh:1347
│ │ │ │ +
int nvertices
Definition vtkwriter.hh:1592
│ │ │ │ +
void addCellData(F &&f, VTK::FieldInfo vtkFieldInfo)
Add a function by sampling it on the element centers.
Definition vtkwriter.hh:674
│ │ │ │ +
void addVertexData(const Container &v, const std::string &name, int ncomps=1, VTK::Precision prec=VTK::Precision::float32)
Add a grid function (represented by container) that lives on the vertices of the grid to the visualiz...
Definition vtkwriter.hh:760
│ │ │ │ +
virtual ~VTKWriter()
destructor
Definition vtkwriter.hh:786
│ │ │ │ +
static void fillFacesForElement(const Entity &element, const IndexSet &indexSet, const std::vector< T > &vertices, T &offset, std::vector< T > &faces, std::vector< T > &faceOffsets)
Definition vtkwriter.hh:1535
│ │ │ │ +
void writeData(VTK::VTUWriter &writer, const Data &data, const Iterator begin, const Iterator end, int nentries)
Definition vtkwriter.hh:1291
│ │ │ │ +
int ncells
Definition vtkwriter.hh:1591
│ │ │ │ +
VertexIterator vertexEnd() const
Definition vtkwriter.hh:515
│ │ │ │ +
VTKWriter(const GridView &gridView, VTK::DataMode dm=VTK::conforming, VTK::Precision coordPrecision=VTK::Precision::float32)
Construct a VTKWriter working on a specific GridView.
Definition vtkwriter.hh:636
│ │ │ │ +
std::string pwrite(const std::string &name, const std::string &path, const std::string &extendpath, VTK::OutputType ot, const int commRank, const int commSize)
write output; interface might change later
Definition vtkwriter.hh:1043
│ │ │ │ +
std::string pwrite(const std::string &name, const std::string &path, const std::string &extendpath, VTK::OutputType type=VTK::ascii)
write output (interface might change later)
Definition vtkwriter.hh:835
│ │ │ │ +
int ncorners
Definition vtkwriter.hh:1593
│ │ │ │ +
Type erasure wrapper for VTK data sets.
Definition vtkwriter.hh:156
│ │ │ │ +
void unbind() const
Unbind the data set from the currently bound entity.
Definition vtkwriter.hh:360
│ │ │ │ +
VTKLocalFunction(F &&f, VTK::FieldInfo fieldInfo)
Construct a VTKLocalFunction for a dune-functions style LocalFunction.
Definition vtkwriter.hh:307
│ │ │ │ +
std::string name() const
Returns the name of the data set.
Definition vtkwriter.hh:342
│ │ │ │ +
VTK::FieldInfo _fieldInfo
Definition vtkwriter.hh:372
│ │ │ │ +
VTK::DataArrayWriter Writer
Definition vtkwriter.hh:160
│ │ │ │ +
const VTK::FieldInfo & fieldInfo() const
Returns the VTK::FieldInfo for the data set.
Definition vtkwriter.hh:348
│ │ │ │ +
void bind(const Entity &e) const
Bind the data set to grid entity e.
Definition vtkwriter.hh:354
│ │ │ │ +
VTKLocalFunction(const std::shared_ptr< const VTKFunction > &vtkFunctionPtr)
Construct a VTKLocalFunction for a legacy VTKFunction.
Definition vtkwriter.hh:331
│ │ │ │ +
std::shared_ptr< FunctionWrapperBase > _f
Definition vtkwriter.hh:371
│ │ │ │ +
void write(const Coordinate &pos, Writer &w) const
Write the value of the data set at local coordinate pos to the writer w.
Definition vtkwriter.hh:366
│ │ │ │ +
Base class for polymorphic container of underlying data set.
Definition vtkwriter.hh:164
│ │ │ │ +
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const =0
Evaluate data set at local position pos inside the current entity and write result to w.
│ │ │ │ +
virtual ~FunctionWrapperBase()
Definition vtkwriter.hh:178
│ │ │ │ +
virtual void unbind()=0
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
│ │ │ │ +
virtual void bind(const Entity &e)=0
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
│ │ │ │ +
Type erasure implementation for functions conforming to the dune-functions LocalFunction interface.
Definition vtkwriter.hh:188
│ │ │ │ +
typename std::decay< F >::type Function
Definition vtkwriter.hh:189
│ │ │ │ +
FunctionWrapper(F_ &&f)
Definition vtkwriter.hh:192
│ │ │ │ +
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w.
Definition vtkwriter.hh:206
│ │ │ │ +
virtual void unbind()
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
Definition vtkwriter.hh:201
│ │ │ │ +
virtual void bind(const Entity &e)
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Definition vtkwriter.hh:196
│ │ │ │ +
Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordi...
Definition vtkwriter.hh:236
│ │ │ │ +
GlobalFunctionWrapper(F_ &&f)
Definition vtkwriter.hh:240
│ │ │ │ +
virtual void unbind()
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
Definition vtkwriter.hh:250
│ │ │ │ +
typename std::decay< F >::type Function
Definition vtkwriter.hh:237
│ │ │ │ +
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w.
Definition vtkwriter.hh:255
│ │ │ │ +
virtual void bind(const Entity &e)
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Definition vtkwriter.hh:245
│ │ │ │ +
Type erasure implementation for legacy VTKFunctions.
Definition vtkwriter.hh:276
│ │ │ │ +
virtual void unbind()
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
Definition vtkwriter.hh:287
│ │ │ │ +
VTKFunctionWrapper(const std::shared_ptr< const VTKFunction > &f)
Definition vtkwriter.hh:277
│ │ │ │ +
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w.
Definition vtkwriter.hh:292
│ │ │ │ +
virtual void bind(const Entity &e)
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Definition vtkwriter.hh:282
│ │ │ │ +
Iterator over the grids elements.
Definition vtkwriter.hh:385
│ │ │ │ +
CellIterator(const GridCellIterator &x)
construct a CellIterator from the gridview's Iterator.
Definition vtkwriter.hh:388
│ │ │ │ +
const FieldVector< DT, n > position() const
Definition vtkwriter.hh:391
│ │ │ │ +
Iterate over the grid's vertices.
Definition vtkwriter.hh:424
│ │ │ │ +
VertexIterator(const GridCellIterator &x, const GridCellIterator &end, const VTK::DataMode &dm, const VertexMapper &vm)
Definition vtkwriter.hh:457
│ │ │ │ +
void basicIncrement()
Definition vtkwriter.hh:440
│ │ │ │ +
void increment()
Definition vtkwriter.hh:468
│ │ │ │ +
EntityReference dereference() const
Definition vtkwriter.hh:491
│ │ │ │ +
bool equals(const VertexIterator &cit) const
Definition vtkwriter.hh:485
│ │ │ │ +
FieldVector< DT, n > position() const
position of vertex inside the entity
Definition vtkwriter.hh:501
│ │ │ │ +
int localindex() const
index of vertex within the entity, in Dune-numbering
Definition vtkwriter.hh:496
│ │ │ │ +
Iterate over the elements' corners.
Definition vtkwriter.hh:539
│ │ │ │ +
void increment()
Definition vtkwriter.hh:566
│ │ │ │ +
CornerIterator(const GridCellIterator &x, const GridCellIterator &end, const VTK::DataMode &dm, const VertexMapper &vm, const std::vector< int > &num)
Definition vtkwriter.hh:558
│ │ │ │ +
int id() const
Process-local consecutive zero-starting vertex id.
Definition vtkwriter.hh:597
│ │ │ │ +
EntityReference dereference() const
Definition vtkwriter.hh:588
│ │ │ │ +
bool equals(const CornerIterator &cit) const
Definition vtkwriter.hh:582
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ +
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ +
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ +
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ +
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ +
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ +
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ +
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ +
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ +
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,220 +2,1974 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -interval.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +vtkwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +_1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_INTERVALBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_INTERVALBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -18 namespace dgf │ │ │ │ │ -19 { │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_VTKWRITER_HH │ │ │ │ │ +7#define DUNE_VTKWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ 20 │ │ │ │ │ -_2_1 struct _I_n_t_e_r_v_a_l_B_l_o_c_k │ │ │ │ │ -22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -23 { │ │ │ │ │ -_2_4 struct _I_n_t_e_r_v_a_l │ │ │ │ │ -25 { │ │ │ │ │ -_2_6 _I_n_t_e_r_v_a_l() {} │ │ │ │ │ -_2_7 _I_n_t_e_r_v_a_l( const _I_n_t_e_r_v_a_l& interval, const std::vector& map ) │ │ │ │ │ -28 { │ │ │ │ │ -29 _c_o_p_y( interval, map ); │ │ │ │ │ -30 } │ │ │ │ │ -_3_1 void _c_o_p_y(const _I_n_t_e_r_v_a_l& interval, const std::vector& map ) │ │ │ │ │ -32 { │ │ │ │ │ -33 const int size = map.size(); │ │ │ │ │ -34 _p[0].resize( size ); │ │ │ │ │ -35 _p[1].resize( size ); │ │ │ │ │ -36 _n.resize( size ); │ │ │ │ │ -37 _h.resize( size ); │ │ │ │ │ -38 assert( size == int(interval._n.size()) ); │ │ │ │ │ -39 for( int i=0; i, 2 > _p; // lower and upper boundary points │ │ │ │ │ -_4_8 std::vector< double > _h; // width of the cells in each direction │ │ │ │ │ -_4_9 std::vector< int > _n; // number of cells in each direction │ │ │ │ │ -50 }; │ │ │ │ │ -51 │ │ │ │ │ -52 private: │ │ │ │ │ -53 std::vector< Interval > intervals_; │ │ │ │ │ -54 std::vector< int > map_; │ │ │ │ │ -55 bool good_; //data read correctly │ │ │ │ │ -56 int dimw_; //dimension of world │ │ │ │ │ -57 │ │ │ │ │ -58 public: │ │ │ │ │ -59 explicit _I_n_t_e_r_v_a_l_B_l_o_c_k ( std::istream &in ); │ │ │ │ │ +21#include │ │ │ │ │ +22#include │ │ │ │ │ +23#include │ │ │ │ │ +24#include │ │ │ │ │ +25#include │ │ │ │ │ +26#include │ │ │ │ │ +27#include │ │ │ │ │ +28#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +29#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +30#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +31#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ +32#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +33#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +34#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ +35#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +36 │ │ │ │ │ +50namespace _D_u_n_e │ │ │ │ │ +51{ │ │ │ │ │ +52 │ │ │ │ │ +53 namespace Impl │ │ │ │ │ +54 { │ │ │ │ │ +55 // Check whether type F has a method 'bind' (see the dune-functions │ │ │ │ │ +interface) │ │ │ │ │ +56 template< class F, class E, class = void > │ │ │ │ │ +57 struct IsBindable │ │ │ │ │ +58 : std::false_type │ │ │ │ │ +59 {}; │ │ │ │ │ 60 │ │ │ │ │ -_6_1 void _g_e_t ( std::vector< std::vector< double > > &vtx, int &_n_o_f_v_t_x, │ │ │ │ │ -62 std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl ) │ │ │ │ │ -63 { │ │ │ │ │ -64 for( size_t i = 0; i < intervals_.size(); ++i ) │ │ │ │ │ -65 { │ │ │ │ │ -66 int oldvtx = _n_o_f_v_t_x; │ │ │ │ │ -67 _n_o_f_v_t_x += _g_e_t_V_t_x( i, vtx ); │ │ │ │ │ -68 nofsimpl += _g_e_t_H_e_x_a( i, simplex, oldvtx ); │ │ │ │ │ -69 } │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -_7_2 void _g_e_t ( std::vector< std::vector< double > > &vtx, int &_n_o_f_v_t_x ) │ │ │ │ │ -73 { │ │ │ │ │ -74 for( size_t i = 0; i < intervals_.size(); ++i ) │ │ │ │ │ -75 _n_o_f_v_t_x += _g_e_t_V_t_x( i, vtx ); │ │ │ │ │ -76 } │ │ │ │ │ +61 template< class F, class E > │ │ │ │ │ +62 struct IsBindable< F, E, _s_t_d::void_t< decltype( std::declval< F & >().bind │ │ │ │ │ +( std::declval< const E & >() ) ), │ │ │ │ │ +63 decltype( std::declval< F & >().unbind() ) > > │ │ │ │ │ +64 : std::true_type │ │ │ │ │ +65 {}; │ │ │ │ │ +66 │ │ │ │ │ +67 // Check whether localFunction(F) can be called (see the dune-functions │ │ │ │ │ +interface) │ │ │ │ │ +68 template< class F, class = void > │ │ │ │ │ +69 struct HasLocalFunction │ │ │ │ │ +70 : std::false_type │ │ │ │ │ +71 {}; │ │ │ │ │ +72 │ │ │ │ │ +73 template< class F > │ │ │ │ │ +74 struct HasLocalFunction< F, _s_t_d::void_t< decltype( localFunction( std:: │ │ │ │ │ +declval< F& >() ) ) > > │ │ │ │ │ +75 : std::true_type │ │ │ │ │ +76 {}; │ │ │ │ │ 77 │ │ │ │ │ -_7_8 const _I_n_t_e_r_v_a_l &_g_e_t ( int block ) const │ │ │ │ │ -79 { │ │ │ │ │ -80 return intervals_[ block ]; │ │ │ │ │ -81 } │ │ │ │ │ -82 │ │ │ │ │ -_8_3 int _n_u_m_I_n_t_e_r_v_a_l_s () const │ │ │ │ │ -84 { │ │ │ │ │ -85 return intervals_.size(); │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -_8_8 int _d_i_m_w () const │ │ │ │ │ -89 { │ │ │ │ │ -90 return dimw_; │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -93 int _g_e_t_V_t_x ( int block, std::vector< std::vector< double > > &vtx ) const; │ │ │ │ │ -94 int _g_e_t_H_e_x_a ( int block, std::vector< std::vector< unsigned int > > &cubes, │ │ │ │ │ -95 int offset = 0 ) const; │ │ │ │ │ +78 } // namespace Impl │ │ │ │ │ +79 │ │ │ │ │ +80 // Forward-declaration here, so the class can be friend of VTKWriter │ │ │ │ │ +81 template │ │ │ │ │ +82 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e; │ │ │ │ │ +83 template │ │ │ │ │ +84 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r; │ │ │ │ │ +85 │ │ │ │ │ +94 template< class GridView > │ │ │ │ │ +_9_5 class _V_T_K_W_r_i_t_e_r { │ │ │ │ │ 96 │ │ │ │ │ -_9_7 int _n_o_f_v_t_x ( int block ) const │ │ │ │ │ -98 { │ │ │ │ │ -99 const _I_n_t_e_r_v_a_l &interval = _g_e_t( block ); │ │ │ │ │ -100 int n = 1; │ │ │ │ │ -101 for( int i = 0; i < dimw_; ++i ) │ │ │ │ │ -102 n *= (interval._n[ i ] + 1); │ │ │ │ │ -103 return n; │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 int _n_o_f_h_e_x_a ( int block ) const │ │ │ │ │ -107 { │ │ │ │ │ -108 const _I_n_t_e_r_v_a_l &interval = _g_e_t( block ); │ │ │ │ │ -109 int n = 1; │ │ │ │ │ -110 for( int i = 0; i < dimw_; ++i ) │ │ │ │ │ -111 n *= interval._n[ i ]; │ │ │ │ │ -112 return n; │ │ │ │ │ -113 } │ │ │ │ │ +97 // VTKSequenceWriterBase needs getSerialPieceName │ │ │ │ │ +98 // and getParallelHeaderName │ │ │ │ │ +99 friend class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>; │ │ │ │ │ +100 // VTKSequenceWriter needs the grid view, to get the MPI size and rank │ │ │ │ │ +101 friend class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r<_G_r_i_d_V_i_e_w>; │ │ │ │ │ +102 │ │ │ │ │ +103 // extract types │ │ │ │ │ +104 typedef typename _G_r_i_d_V_i_e_w_:_:_G_r_i_d Grid; │ │ │ │ │ +105 typedef typename _G_r_i_d_V_i_e_w_:_:_c_t_y_p_e DT; │ │ │ │ │ +106 constexpr static int n = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +107 constexpr static int w = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +108 │ │ │ │ │ +109 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Cell; │ │ │ │ │ +110 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< n >::Entity Vertex; │ │ │ │ │ +111 typedef Cell Entity; │ │ │ │ │ +112 │ │ │ │ │ +113 typedef typename _G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t IndexSet; │ │ │ │ │ 114 │ │ │ │ │ -115 private: │ │ │ │ │ -116 template< class T > │ │ │ │ │ -117 void parseLine ( std::vector< T > &v ); │ │ │ │ │ -118 │ │ │ │ │ -119 bool next (); │ │ │ │ │ -120 }; │ │ │ │ │ -121 │ │ │ │ │ -_1_2_2 inline std::ostream & │ │ │ │ │ -123 _o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l &interval ) │ │ │ │ │ -124 { │ │ │ │ │ -125 if( interval._p[ 0 ].empty() || interval._p[ 1 ].empty() || interval._n.empty │ │ │ │ │ -() ) │ │ │ │ │ -126 return out << "Interval {}"; │ │ │ │ │ -127 │ │ │ │ │ -128 out << "Interval { p0 = (" << interval._p[ 0 ][ 0 ]; │ │ │ │ │ -129 for( size_t i = 1; i < interval._p[ 0 ].size(); ++i ) │ │ │ │ │ -130 out << ", " << interval._p[ 0 ][ i ]; │ │ │ │ │ -131 out << "), p1 = (" << interval._p[ 1 ][ 0 ]; │ │ │ │ │ -132 for( size_t i = 1; i < interval._p[ 1 ].size(); ++i ) │ │ │ │ │ -133 out << ", " << interval._p[ 1 ][ i ]; │ │ │ │ │ -134 out << "), n = (" << interval._n[ 0 ]; │ │ │ │ │ -135 for( size_t i = 1; i < interval._n.size(); ++i ) │ │ │ │ │ -136 out << ", " << interval._n[ i ]; │ │ │ │ │ -137 return out << ") }"; │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -140 } // end namespace dgf │ │ │ │ │ -141 │ │ │ │ │ -142} // end namespace Dune │ │ │ │ │ -143 │ │ │ │ │ -144#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +115 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e VTK_Partition = │ │ │ │ │ +_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +116 //static const PartitionIteratorType VTK_Partition = All_Partition; │ │ │ │ │ +117 │ │ │ │ │ +118 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 > │ │ │ │ │ +119 ::template Partition< VTK_Partition >::Iterator │ │ │ │ │ +120 GridCellIterator; │ │ │ │ │ +121 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< n > │ │ │ │ │ +122 ::template Partition< VTK_Partition >::Iterator │ │ │ │ │ +123 GridVertexIterator; │ │ │ │ │ +124 │ │ │ │ │ +125 typedef typename GridCellIterator::Reference EntityReference; │ │ │ │ │ +126 │ │ │ │ │ +127 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 > │ │ │ │ │ +128 ::Entity::Geometry::LocalCoordinate Coordinate; │ │ │ │ │ +129 │ │ │ │ │ +130 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_r_i_d_V_i_e_w_ _> _V_e_r_t_e_x_M_a_p_p_e_r; │ │ │ │ │ +131 │ │ │ │ │ +132 // return true if entity should be skipped in Vertex and Corner iterator │ │ │ │ │ +133 static bool skipEntity( const _P_a_r_t_i_t_i_o_n_T_y_p_e entityType ) │ │ │ │ │ +134 { │ │ │ │ │ +135 switch( VTK_Partition ) │ │ │ │ │ +136 { │ │ │ │ │ +137 // for All_Partition no entity has to be skipped │ │ │ │ │ +138 case _A_l_l___P_a_r_t_i_t_i_o_n: return false; │ │ │ │ │ +139 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n: return ( entityType != _I_n_t_e_r_i_o_r_E_n_t_i_t_y ); │ │ │ │ │ +140 default: DUNE_THROW(NotImplemented,"Add check for this partition type"); │ │ │ │ │ +141 } │ │ │ │ │ +142 return false ; │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +145 public: │ │ │ │ │ +146 │ │ │ │ │ +_1_4_7 typedef _D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_r_i_d_V_i_e_w_ _> _V_T_K_F_u_n_c_t_i_o_n; │ │ │ │ │ +148 │ │ │ │ │ +149 protected: │ │ │ │ │ +150 │ │ │ │ │ +152 │ │ │ │ │ +_1_5_5 class _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ +156 { │ │ │ │ │ +157 │ │ │ │ │ +158 public: │ │ │ │ │ +159 │ │ │ │ │ +_1_6_0 typedef _V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r _W_r_i_t_e_r; │ │ │ │ │ +161 │ │ │ │ │ +_1_6_3 struct _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +164 { │ │ │ │ │ +165 │ │ │ │ │ +_1_6_7 virtual void _b_i_n_d(const Entity& e) = 0; │ │ │ │ │ +168 │ │ │ │ │ +_1_7_0 virtual void _u_n_b_i_n_d() = 0; │ │ │ │ │ +171 │ │ │ │ │ +173 │ │ │ │ │ +_1_7_6 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ │ +const = 0; │ │ │ │ │ +177 │ │ │ │ │ +_1_7_8 virtual _~_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e() │ │ │ │ │ +179 {} │ │ │ │ │ +180 │ │ │ │ │ +181 }; │ │ │ │ │ +182 │ │ │ │ │ +184 // DUNE_PRIVATE since _f has less visibility │ │ │ │ │ +185 template │ │ │ │ │ +_1_8_6 struct DUNE_PRIVATE _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +187 : public _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +188 { │ │ │ │ │ +_1_8_9 using _F_u_n_c_t_i_o_n = typename std::decay::type; │ │ │ │ │ +190 │ │ │ │ │ +191 template │ │ │ │ │ +_1_9_2 _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r(F_&& f) │ │ │ │ │ +193 : _f(_s_t_d::forward(f)) │ │ │ │ │ +194 {} │ │ │ │ │ +195 │ │ │ │ │ +_1_9_6 virtual void _b_i_n_d(const Entity& e) │ │ │ │ │ +197 { │ │ │ │ │ +198 _f.bind(e); │ │ │ │ │ +199 } │ │ │ │ │ +200 │ │ │ │ │ +_2_0_1 virtual void _u_n_b_i_n_d() │ │ │ │ │ +202 { │ │ │ │ │ +203 _f.unbind(); │ │ │ │ │ +204 } │ │ │ │ │ +205 │ │ │ │ │ +_2_0_6 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ │ +const │ │ │ │ │ +207 { │ │ │ │ │ +208 auto r = _f(pos); │ │ │ │ │ +209 // we need to do different things here depending on whether r supports │ │ │ │ │ +indexing into it or not. │ │ │ │ │ +210 do_write(w,r,count,IsIndexable()); │ │ │ │ │ +211 } │ │ │ │ │ +212 │ │ │ │ │ +213 private: │ │ │ │ │ +214 │ │ │ │ │ +215 template │ │ │ │ │ +216 void do_write(_W_r_i_t_e_r& w, const R& r, std::size_t count, std::true_type) │ │ │ │ │ +const │ │ │ │ │ +217 { │ │ │ │ │ +218 for (std::size_t i = 0; i < count; ++i) │ │ │ │ │ +219 w._w_r_i_t_e(r[i]); │ │ │ │ │ +220 } │ │ │ │ │ +221 │ │ │ │ │ +222 template │ │ │ │ │ +223 void do_write(Writer& w, const R& r, std::size_t count, std::false_type) │ │ │ │ │ +const │ │ │ │ │ +224 { │ │ │ │ │ +225 assert(count == 1); │ │ │ │ │ +226 w.write(r); │ │ │ │ │ +227 } │ │ │ │ │ +228 │ │ │ │ │ +229 Function _f; │ │ │ │ │ +230 }; │ │ │ │ │ +231 │ │ │ │ │ +233 template │ │ │ │ │ +_2_3_4 struct _G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +235 : public _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +236 { │ │ │ │ │ +_2_3_7 using _F_u_n_c_t_i_o_n = typename std::decay::type; │ │ │ │ │ +238 │ │ │ │ │ +239 template │ │ │ │ │ +_2_4_0 _G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r(F_&& f) │ │ │ │ │ +241 : _f(_s_t_d::forward(f)) │ │ │ │ │ +242 , element_(nullptr) │ │ │ │ │ +243 {} │ │ │ │ │ +244 │ │ │ │ │ +_2_4_5 virtual void _b_i_n_d(const Entity& e) │ │ │ │ │ +246 { │ │ │ │ │ +247 element_ = &e; │ │ │ │ │ +248 } │ │ │ │ │ +249 │ │ │ │ │ +_2_5_0 virtual void _u_n_b_i_n_d() │ │ │ │ │ +251 { │ │ │ │ │ +252 element_ = nullptr; │ │ │ │ │ +253 } │ │ │ │ │ +254 │ │ │ │ │ +_2_5_5 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ │ +const │ │ │ │ │ +256 { │ │ │ │ │ +257 auto globalPos = element_->geometry().global(pos); │ │ │ │ │ +258 auto r = _f(globalPos); │ │ │ │ │ +259 if constexpr (IsIndexable()) { │ │ │ │ │ +260 for (std::size_t i = 0; i < count; ++i) │ │ │ │ │ +261 w._w_r_i_t_e(r[i]); │ │ │ │ │ +262 } │ │ │ │ │ +263 else { │ │ │ │ │ +264 assert(count == 1); │ │ │ │ │ +265 w._w_r_i_t_e(r); │ │ │ │ │ +266 } │ │ │ │ │ +267 } │ │ │ │ │ +268 private: │ │ │ │ │ +269 _F_u_n_c_t_i_o_n _f; │ │ │ │ │ +270 const Entity* element_; │ │ │ │ │ +271 }; │ │ │ │ │ +272 │ │ │ │ │ +_2_7_4 struct _V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +275 : public _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +276 { │ │ │ │ │ +_2_7_7 _V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r(const std::shared_ptr< const VTKFunction >& f) │ │ │ │ │ +278 : _f(f) │ │ │ │ │ +279 , _entity(nullptr) │ │ │ │ │ +280 {} │ │ │ │ │ +281 │ │ │ │ │ +_2_8_2 virtual void _b_i_n_d(const Entity& e) │ │ │ │ │ +283 { │ │ │ │ │ +284 _entity = &e; │ │ │ │ │ +285 } │ │ │ │ │ +286 │ │ │ │ │ +_2_8_7 virtual void _u_n_b_i_n_d() │ │ │ │ │ +288 { │ │ │ │ │ +289 _entity = nullptr; │ │ │ │ │ +290 } │ │ │ │ │ +291 │ │ │ │ │ +_2_9_2 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ │ +const │ │ │ │ │ +293 { │ │ │ │ │ +294 for (std::size_t i = 0; i < count; ++i) │ │ │ │ │ +295 w._w_r_i_t_e(_f->evaluate(i,*_entity,pos)); │ │ │ │ │ +296 } │ │ │ │ │ +297 │ │ │ │ │ +298 private: │ │ │ │ │ +299 │ │ │ │ │ +300 std::shared_ptr< const VTKFunction > _f; │ │ │ │ │ +301 const Entity* _entity; │ │ │ │ │ +302 │ │ │ │ │ +303 }; │ │ │ │ │ +304 │ │ │ │ │ +306 template::value, │ │ │ │ │ +int> = 0> │ │ │ │ │ +_3_0_7 _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o _f_i_e_l_d_I_n_f_o) │ │ │ │ │ +308 : ___f(_s_t_d::make_unique<_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r >(_s_t_d::forward(f))) │ │ │ │ │ +309 , ___f_i_e_l_d_I_n_f_o(_f_i_e_l_d_I_n_f_o) │ │ │ │ │ +310 {} │ │ │ │ │ +311 │ │ │ │ │ +313 // That is, a function that you can create a LocalFunction for, and │ │ │ │ │ +evaluate that in element coordinates │ │ │ │ │ +314 template:: │ │ │ │ │ +value && Impl::HasLocalFunction::value, int> = 0> │ │ │ │ │ +_3_1_5 _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o _f_i_e_l_d_I_n_f_o) │ │ │ │ │ +316 : ___f(_s_t_d::make_unique< _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r< │ │ │ │ │ +317 typename _s_t_d::decay(f)))>::type │ │ │ │ │ +318 > >(localFunction(_s_t_d::forward(f)))) │ │ │ │ │ +319 , ___f_i_e_l_d_I_n_f_o(_f_i_e_l_d_I_n_f_o) │ │ │ │ │ +320 {} │ │ │ │ │ +321 │ │ │ │ │ +323 // That is, a function that can be evaluated in global coordinates of the │ │ │ │ │ +domain │ │ │ │ │ +324 template:: │ │ │ │ │ +value && not Impl::HasLocalFunction::value, int> = 0> │ │ │ │ │ +_3_2_5 _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o _f_i_e_l_d_I_n_f_o) │ │ │ │ │ +326 : ___f(_s_t_d::make_unique< _G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r >(_s_t_d::forward(f))) │ │ │ │ │ +327 , ___f_i_e_l_d_I_n_f_o(_f_i_e_l_d_I_n_f_o) │ │ │ │ │ +328 {} │ │ │ │ │ +329 │ │ │ │ │ +_3_3_1 explicit _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n (const std::shared_ptr< const VTKFunction >& │ │ │ │ │ +vtkFunctionPtr) │ │ │ │ │ +332 : ___f(_s_t_d::make_unique<_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r>(vtkFunctionPtr)) │ │ │ │ │ +333 , ___f_i_e_l_d_I_n_f_o( │ │ │ │ │ +334 vtkFunctionPtr->_n_a_m_e(), │ │ │ │ │ +335 (vtkFunctionPtr->ncomps() == 2 || vtkFunctionPtr->ncomps() == 3) ? VTK:: │ │ │ │ │ +FieldInfo::Type::vector : VTK::FieldInfo::Type::scalar, │ │ │ │ │ +336 vtkFunctionPtr->ncomps(), │ │ │ │ │ +337 vtkFunctionPtr->precision() │ │ │ │ │ +338 ) │ │ │ │ │ +339 {} │ │ │ │ │ +340 │ │ │ │ │ +_3_4_2 std::string _n_a_m_e() const │ │ │ │ │ +343 { │ │ │ │ │ +344 return _f_i_e_l_d_I_n_f_o()._n_a_m_e(); │ │ │ │ │ +345 } │ │ │ │ │ +346 │ │ │ │ │ +_3_4_8 const _V_T_K_:_:_F_i_e_l_d_I_n_f_o& _f_i_e_l_d_I_n_f_o() const │ │ │ │ │ +349 { │ │ │ │ │ +350 return ___f_i_e_l_d_I_n_f_o; │ │ │ │ │ +351 } │ │ │ │ │ +352 │ │ │ │ │ +_3_5_4 void _b_i_n_d(const Entity& e) const │ │ │ │ │ +355 { │ │ │ │ │ +356 ___f->bind(e); │ │ │ │ │ +357 } │ │ │ │ │ +358 │ │ │ │ │ +_3_6_0 void _u_n_b_i_n_d() const │ │ │ │ │ +361 { │ │ │ │ │ +362 ___f->unbind(); │ │ │ │ │ +363 } │ │ │ │ │ +364 │ │ │ │ │ +_3_6_6 void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w) const │ │ │ │ │ +367 { │ │ │ │ │ +368 ___f->write(pos,w,_f_i_e_l_d_I_n_f_o().size()); │ │ │ │ │ +369 } │ │ │ │ │ +370 │ │ │ │ │ +_3_7_1 std::shared_ptr ___f; │ │ │ │ │ +_3_7_2 _V_T_K_:_:_F_i_e_l_d_I_n_f_o ___f_i_e_l_d_I_n_f_o; │ │ │ │ │ +373 │ │ │ │ │ +374 }; │ │ │ │ │ +375 │ │ │ │ │ +_3_7_6 typedef typename std::list::const_iterator │ │ │ │ │ +_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +377 │ │ │ │ │ +379 │ │ │ │ │ +_3_8_4 class _C_e_l_l_I_t_e_r_a_t_o_r : public GridCellIterator │ │ │ │ │ +385 { │ │ │ │ │ +386 public: │ │ │ │ │ +_3_8_8 _C_e_l_l_I_t_e_r_a_t_o_r(const GridCellIterator & x) : GridCellIterator(x) {} │ │ │ │ │ +_3_9_1 const FieldVector _p_o_s_i_t_i_o_n() const │ │ │ │ │ +392 { │ │ │ │ │ +393 return ReferenceElements::general((*this)->type()).position(0,0); │ │ │ │ │ +394 } │ │ │ │ │ +395 }; │ │ │ │ │ +396 │ │ │ │ │ +_3_9_7 _C_e_l_l_I_t_e_r_a_t_o_r _c_e_l_l_B_e_g_i_n() const │ │ │ │ │ +398 { │ │ │ │ │ +399 return _g_r_i_d_V_i_e_w__.template begin< 0, VTK_Partition >(); │ │ │ │ │ +400 } │ │ │ │ │ +401 │ │ │ │ │ +_4_0_2 _C_e_l_l_I_t_e_r_a_t_o_r _c_e_l_l_E_n_d() const │ │ │ │ │ +403 { │ │ │ │ │ +404 return _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(); │ │ │ │ │ +405 } │ │ │ │ │ +406 │ │ │ │ │ +408 │ │ │ │ │ +_4_2_2 class _V_e_r_t_e_x_I_t_e_r_a_t_o_r : │ │ │ │ │ +423 public ForwardIteratorFacade │ │ │ │ │ +424 { │ │ │ │ │ +425 GridCellIterator git; │ │ │ │ │ +426 GridCellIterator gend; │ │ │ │ │ +427 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ │ +428 // Index of the currently visited corner within the current element. │ │ │ │ │ +429 // NOTE: this is in Dune-numbering, in contrast to CornerIterator. │ │ │ │ │ +430 int cornerIndexDune; │ │ │ │ │ +431 const _V_e_r_t_e_x_M_a_p_p_e_r & vertexmapper; │ │ │ │ │ +432 std::vector visited; │ │ │ │ │ +433 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ │ +434 // hold its number in the iteration order (VertexIterator) │ │ │ │ │ +435 int offset; │ │ │ │ │ +436 │ │ │ │ │ +437 // hide operator -> │ │ │ │ │ +438 void operator->(); │ │ │ │ │ +439 protected: │ │ │ │ │ +_4_4_0 void _b_a_s_i_c_I_n_c_r_e_m_e_n_t () │ │ │ │ │ +441 { │ │ │ │ │ +442 if( git == gend ) │ │ │ │ │ +443 return; │ │ │ │ │ +444 ++cornerIndexDune; │ │ │ │ │ +445 const int numCorners = git->subEntities(n); │ │ │ │ │ +446 if( cornerIndexDune == numCorners ) │ │ │ │ │ +447 { │ │ │ │ │ +448 offset += numCorners; │ │ │ │ │ +449 cornerIndexDune = 0; │ │ │ │ │ +450 │ │ │ │ │ +451 ++git; │ │ │ │ │ +452 while( (git != gend) && skipEntity( git->partitionType() ) ) │ │ │ │ │ +453 ++git; │ │ │ │ │ +454 } │ │ │ │ │ +455 } │ │ │ │ │ +456 public: │ │ │ │ │ +_4_5_7 _V_e_r_t_e_x_I_t_e_r_a_t_o_r(const GridCellIterator & x, │ │ │ │ │ +458 const GridCellIterator & end, │ │ │ │ │ +459 const _V_T_K_:_:_D_a_t_a_M_o_d_e & dm, │ │ │ │ │ +460 const _V_e_r_t_e_x_M_a_p_p_e_r & vm) : │ │ │ │ │ +461 git(x), gend(end), datamode(dm), cornerIndexDune(0), │ │ │ │ │ +462 vertexmapper(vm), visited(vm.size(), false), │ │ │ │ │ +463 offset(0) │ │ │ │ │ +464 { │ │ │ │ │ +465 if (datamode == _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g && git != gend) │ │ │ │ │ +466 visited[vertexmapper._s_u_b_I_n_d_e_x(*git,cornerIndexDune,n)] = true; │ │ │ │ │ +467 } │ │ │ │ │ +_4_6_8 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +469 { │ │ │ │ │ +470 switch (datamode) │ │ │ │ │ +471 { │ │ │ │ │ +472 case _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g : │ │ │ │ │ +473 while(visited[vertexmapper._s_u_b_I_n_d_e_x(*git,cornerIndexDune,n)]) │ │ │ │ │ +474 { │ │ │ │ │ +475 _b_a_s_i_c_I_n_c_r_e_m_e_n_t(); │ │ │ │ │ +476 if (git == gend) return; │ │ │ │ │ +477 } │ │ │ │ │ +478 visited[vertexmapper._s_u_b_I_n_d_e_x(*git,cornerIndexDune,n)] = true; │ │ │ │ │ +479 break; │ │ │ │ │ +480 case _V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g : │ │ │ │ │ +481 _b_a_s_i_c_I_n_c_r_e_m_e_n_t(); │ │ │ │ │ +482 break; │ │ │ │ │ +483 } │ │ │ │ │ +484 } │ │ │ │ │ +_4_8_5 bool _e_q_u_a_l_s (const _V_e_r_t_e_x_I_t_e_r_a_t_o_r & cit) const │ │ │ │ │ +486 { │ │ │ │ │ +487 return git == cit.git │ │ │ │ │ +488 && cornerIndexDune == cit.cornerIndexDune │ │ │ │ │ +489 && datamode == cit.datamode; │ │ │ │ │ +490 } │ │ │ │ │ +_4_9_1 EntityReference _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ +492 { │ │ │ │ │ +493 return *git; │ │ │ │ │ +494 } │ │ │ │ │ +_4_9_6 int _l_o_c_a_l_i_n_d_e_x () const │ │ │ │ │ +497 { │ │ │ │ │ +498 return cornerIndexDune; │ │ │ │ │ +499 } │ │ │ │ │ +_5_0_1 FieldVector _p_o_s_i_t_i_o_n () const │ │ │ │ │ +502 { │ │ │ │ │ +503 return referenceElement(git->type()) │ │ │ │ │ +504 .position(cornerIndexDune,n); │ │ │ │ │ +505 } │ │ │ │ │ +506 }; │ │ │ │ │ +507 │ │ │ │ │ +_5_0_8 _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_e_r_t_e_x_B_e_g_i_n () const │ │ │ │ │ +509 { │ │ │ │ │ +510 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template begin< 0, VTK_Partition >(), │ │ │ │ │ +511 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ │ +512 datamode, *vertexmapper ); │ │ │ │ │ +513 } │ │ │ │ │ +514 │ │ │ │ │ +_5_1_5 _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_e_r_t_e_x_E_n_d () const │ │ │ │ │ +516 { │ │ │ │ │ +517 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ │ +518 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ │ +519 datamode, *vertexmapper ); │ │ │ │ │ +520 } │ │ │ │ │ +521 │ │ │ │ │ +523 │ │ │ │ │ +_5_3_7 class _C_o_r_n_e_r_I_t_e_r_a_t_o_r : │ │ │ │ │ +538 public ForwardIteratorFacade │ │ │ │ │ +539 { │ │ │ │ │ +540 GridCellIterator git; │ │ │ │ │ +541 GridCellIterator gend; │ │ │ │ │ +542 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ │ +543 // Index of the currently visited corner within the current element. │ │ │ │ │ +544 // NOTE: this is in VTK-numbering, in contrast to VertexIterator. │ │ │ │ │ +545 int cornerIndexVTK; │ │ │ │ │ +546 const _V_e_r_t_e_x_M_a_p_p_e_r & vertexmapper; │ │ │ │ │ +547 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ │ +548 // hold its number in the iteration order of VertexIterator (*not* │ │ │ │ │ +549 // CornerIterator) │ │ │ │ │ +550 const std::vector & number; │ │ │ │ │ +551 // holds the number of corners of all the elements we have seen so far, │ │ │ │ │ +552 // excluding the current element │ │ │ │ │ +553 int offset; │ │ │ │ │ +554 │ │ │ │ │ +555 // hide operator -> │ │ │ │ │ +556 void operator->(); │ │ │ │ │ +557 public: │ │ │ │ │ +_5_5_8 _C_o_r_n_e_r_I_t_e_r_a_t_o_r(const GridCellIterator & x, │ │ │ │ │ +559 const GridCellIterator & end, │ │ │ │ │ +560 const _V_T_K_:_:_D_a_t_a_M_o_d_e & dm, │ │ │ │ │ +561 const _V_e_r_t_e_x_M_a_p_p_e_r & vm, │ │ │ │ │ +562 const std::vector & num) : │ │ │ │ │ +563 git(x), gend(end), datamode(dm), cornerIndexVTK(0), │ │ │ │ │ +564 vertexmapper(vm), │ │ │ │ │ +565 number(num), offset(0) {} │ │ │ │ │ +_5_6_6 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +567 { │ │ │ │ │ +568 if( git == gend ) │ │ │ │ │ +569 return; │ │ │ │ │ +570 ++cornerIndexVTK; │ │ │ │ │ +571 const int numCorners = git->subEntities(n); │ │ │ │ │ +572 if( cornerIndexVTK == numCorners ) │ │ │ │ │ +573 { │ │ │ │ │ +574 offset += numCorners; │ │ │ │ │ +575 cornerIndexVTK = 0; │ │ │ │ │ +576 │ │ │ │ │ +577 ++git; │ │ │ │ │ +578 while( (git != gend) && skipEntity( git->partitionType() ) ) │ │ │ │ │ +579 ++git; │ │ │ │ │ +580 } │ │ │ │ │ +581 } │ │ │ │ │ +_5_8_2 bool _e_q_u_a_l_s (const _C_o_r_n_e_r_I_t_e_r_a_t_o_r & cit) const │ │ │ │ │ +583 { │ │ │ │ │ +584 return git == cit.git │ │ │ │ │ +585 && cornerIndexVTK == cit.cornerIndexVTK │ │ │ │ │ +586 && datamode == cit.datamode; │ │ │ │ │ +587 } │ │ │ │ │ +_5_8_8 EntityReference _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ +589 { │ │ │ │ │ +590 return *git; │ │ │ │ │ +591 } │ │ │ │ │ +593 │ │ │ │ │ +_5_9_7 int _i_d () const │ │ │ │ │ +598 { │ │ │ │ │ +599 switch (datamode) │ │ │ │ │ +600 { │ │ │ │ │ +601 case _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g : │ │ │ │ │ +602 return │ │ │ │ │ +603 number[vertexmapper._s_u_b_I_n_d_e_x(*git,_V_T_K_:_:_r_e_n_u_m_b_e_r(*git,cornerIndexVTK), │ │ │ │ │ +604 n)]; │ │ │ │ │ +605 case _V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g : │ │ │ │ │ +606 return offset + _V_T_K_:_:_r_e_n_u_m_b_e_r(*git,cornerIndexVTK); │ │ │ │ │ +607 default : │ │ │ │ │ +608 DUNE_THROW(IOError,"VTKWriter: unsupported DataMode" << datamode); │ │ │ │ │ +609 } │ │ │ │ │ +610 } │ │ │ │ │ +611 }; │ │ │ │ │ +612 │ │ │ │ │ +_6_1_3 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _c_o_r_n_e_r_B_e_g_i_n () const │ │ │ │ │ +614 { │ │ │ │ │ +615 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template begin< 0, VTK_Partition >(), │ │ │ │ │ +616 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ │ +617 datamode, *vertexmapper, number ); │ │ │ │ │ +618 } │ │ │ │ │ +619 │ │ │ │ │ +_6_2_0 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _c_o_r_n_e_r_E_n_d () const │ │ │ │ │ +621 { │ │ │ │ │ +622 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ │ +623 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ │ +624 datamode, *vertexmapper, number ); │ │ │ │ │ +625 } │ │ │ │ │ +626 │ │ │ │ │ +627 public: │ │ │ │ │ +_6_3_6 explicit _V_T_K_W_r_i_t_e_r ( const _G_r_i_d_V_i_e_w &gridView, │ │ │ │ │ +637 _V_T_K_:_:_D_a_t_a_M_o_d_e dm = _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g, │ │ │ │ │ +638 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _c_o_o_r_d_P_r_e_c_i_s_i_o_n = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +639 : _g_r_i_d_V_i_e_w__( gridView ), │ │ │ │ │ +640 datamode( dm ), │ │ │ │ │ +641 coordPrec (_c_o_o_r_d_P_r_e_c_i_s_i_o_n), │ │ │ │ │ +642 polyhedralCellsPresent_( _c_h_e_c_k_F_o_r_P_o_l_y_h_e_d_r_a_l_C_e_l_l_s() ) │ │ │ │ │ +643 { } │ │ │ │ │ +644 │ │ │ │ │ +_6_4_9 void _a_d_d_C_e_l_l_D_a_t_a (const std::shared_ptr< const VTKFunction > & p) │ │ │ │ │ +650 { │ │ │ │ │ +651 _c_e_l_l_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(p)); │ │ │ │ │ +652 } │ │ │ │ │ +653 │ │ │ │ │ +673 template │ │ │ │ │ +_6_7_4 void _a_d_d_C_e_l_l_D_a_t_a(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o vtkFieldInfo) │ │ │ │ │ +675 { │ │ │ │ │ +676 _c_e_l_l_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(std::forward(f),vtkFieldInfo)); │ │ │ │ │ +677 } │ │ │ │ │ +678 │ │ │ │ │ +694 template │ │ │ │ │ +_6_9_5 void _a_d_d_C_e_l_l_D_a_t_a (const Container& v, const std::string &name, int ncomps = │ │ │ │ │ +1, │ │ │ │ │ +696 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +697 { │ │ │ │ │ +698 typedef _P_0_V_T_K_F_u_n_c_t_i_o_n_<_G_r_i_d_V_i_e_w_,_ _C_o_n_t_a_i_n_e_r_> Function; │ │ │ │ │ +699 for (int c=0; c1) │ │ │ │ │ +703 compName << "[" << c << "]"; │ │ │ │ │ +704 _V_T_K_F_u_n_c_t_i_o_n* p = new Function(_g_r_i_d_V_i_e_w__, v, compName.str(), ncomps, c, │ │ │ │ │ +prec); │ │ │ │ │ +705 _a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr< const VTKFunction >(p)); │ │ │ │ │ +706 } │ │ │ │ │ +707 } │ │ │ │ │ +708 │ │ │ │ │ +_7_1_3 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const std::shared_ptr< const VTKFunction > & p) │ │ │ │ │ +714 { │ │ │ │ │ +715 _v_e_r_t_e_x_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(p)); │ │ │ │ │ +716 } │ │ │ │ │ +717 │ │ │ │ │ +737 template │ │ │ │ │ +_7_3_8 void _a_d_d_V_e_r_t_e_x_D_a_t_a(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o vtkFieldInfo) │ │ │ │ │ +739 { │ │ │ │ │ +740 _v_e_r_t_e_x_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(std::forward(f),vtkFieldInfo)); │ │ │ │ │ +741 } │ │ │ │ │ +742 │ │ │ │ │ +743 │ │ │ │ │ +759 template │ │ │ │ │ +_7_6_0 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const Container& v, const std::string &name, int │ │ │ │ │ +ncomps=1, │ │ │ │ │ +761 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +762 { │ │ │ │ │ +763 typedef _P_1_V_T_K_F_u_n_c_t_i_o_n_<_G_r_i_d_V_i_e_w_,_ _C_o_n_t_a_i_n_e_r_> Function; │ │ │ │ │ +764 for (int c=0; c1) │ │ │ │ │ +768 compName << "[" << c << "]"; │ │ │ │ │ +769 _V_T_K_F_u_n_c_t_i_o_n* p = new Function(_g_r_i_d_V_i_e_w__, v, compName.str(), ncomps, c, │ │ │ │ │ +prec); │ │ │ │ │ +770 _a_d_d_V_e_r_t_e_x_D_a_t_a(std::shared_ptr< const VTKFunction >(p)); │ │ │ │ │ +771 } │ │ │ │ │ +772 } │ │ │ │ │ +773 │ │ │ │ │ +_7_7_5 void _c_l_e_a_r () │ │ │ │ │ +776 { │ │ │ │ │ +777 _c_e_l_l_d_a_t_a.clear(); │ │ │ │ │ +778 _v_e_r_t_e_x_d_a_t_a.clear(); │ │ │ │ │ +779 } │ │ │ │ │ +780 │ │ │ │ │ +_7_8_2 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _c_o_o_r_d_P_r_e_c_i_s_i_o_n() const │ │ │ │ │ +783 { return coordPrec; } │ │ │ │ │ +784 │ │ │ │ │ +_7_8_6 virtual _~_V_T_K_W_r_i_t_e_r () │ │ │ │ │ +787 { │ │ │ │ │ +788 this->_c_l_e_a_r(); │ │ │ │ │ +789 } │ │ │ │ │ +790 │ │ │ │ │ +_8_0_3 std::string _w_r_i_t_e ( const std::string &name, │ │ │ │ │ +804 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type = _V_T_K_:_:_a_s_c_i_i ) │ │ │ │ │ +805 { │ │ │ │ │ +806 return _w_r_i_t_e( name, type, _g_r_i_d_V_i_e_w__._c_o_m_m().rank(), _g_r_i_d_V_i_e_w__._c_o_m_m().size() │ │ │ │ │ +); │ │ │ │ │ +807 } │ │ │ │ │ +808 │ │ │ │ │ +_8_3_5 std::string _p_w_r_i_t_e ( const std::string & name, const std::string & path, │ │ │ │ │ +const std::string & extendpath, │ │ │ │ │ +836 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type = _V_T_K_:_:_a_s_c_i_i ) │ │ │ │ │ +837 { │ │ │ │ │ +838 return _p_w_r_i_t_e( name, path, extendpath, type, _g_r_i_d_V_i_e_w__._c_o_m_m().rank(), │ │ │ │ │ +_g_r_i_d_V_i_e_w__._c_o_m_m().size() ); │ │ │ │ │ +839 } │ │ │ │ │ +840 │ │ │ │ │ +841 protected: │ │ │ │ │ +843 │ │ │ │ │ +_8_5_5 std::string _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ +856 const std::string& path, │ │ │ │ │ +857 int commRank, int commSize) const │ │ │ │ │ +858 { │ │ │ │ │ +859 std::ostringstream s; │ │ │ │ │ +860 // write path first │ │ │ │ │ +861 if(path.size() > 0) │ │ │ │ │ +862 { │ │ │ │ │ +863 s << path; │ │ │ │ │ +864 if(path[path.size()-1] != '/') │ │ │ │ │ +865 s << '/'; │ │ │ │ │ +866 } │ │ │ │ │ +867 │ │ │ │ │ +868 std::string fileprefix; │ │ │ │ │ +869 // check if a path was already added to name │ │ │ │ │ +870 // and if yes find filename without path │ │ │ │ │ +871 auto pos = name.rfind('/'); │ │ │ │ │ +872 if( pos != std::string::npos ) │ │ │ │ │ +873 { │ │ │ │ │ +874 // extract filename without path │ │ │ │ │ +875 fileprefix = name.substr( pos+1 ); │ │ │ │ │ +876 // extract the path and added it before │ │ │ │ │ +877 // the magic below is added │ │ │ │ │ +878 std::string newpath = name.substr(0, pos); │ │ │ │ │ +879 s << newpath; │ │ │ │ │ +880 if(newpath[name.size()-1] != '/') │ │ │ │ │ +881 s << '/'; │ │ │ │ │ +882 } │ │ │ │ │ +883 else │ │ │ │ │ +884 { │ │ │ │ │ +885 // if no path was found just copy the name │ │ │ │ │ +886 fileprefix = name; │ │ │ │ │ +887 } │ │ │ │ │ +888 │ │ │ │ │ +889 s << 's' << std::setw(4) << std::setfill('0') << commSize << '-'; │ │ │ │ │ +890 const bool writeHeader = commRank < 0; │ │ │ │ │ +891 if( ! writeHeader ) │ │ │ │ │ +892 { │ │ │ │ │ +893 s << 'p' << std::setw(4) << std::setfill('0') << commRank << '-'; │ │ │ │ │ +894 } │ │ │ │ │ +895 │ │ │ │ │ +896 s << fileprefix << "."; │ │ │ │ │ +897 // write p for header files │ │ │ │ │ +898 if( writeHeader ) │ │ │ │ │ +899 s << "p"; │ │ │ │ │ +900 s << "vt"; │ │ │ │ │ +901 │ │ │ │ │ +902 if(_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n > 1) │ │ │ │ │ +903 s << "u"; │ │ │ │ │ +904 else │ │ │ │ │ +905 s << "p"; │ │ │ │ │ +906 return s.str(); │ │ │ │ │ +907 } │ │ │ │ │ +908 │ │ │ │ │ +910 │ │ │ │ │ +_9_2_0 std::string _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(const std::string& name, │ │ │ │ │ +921 const std::string& path, │ │ │ │ │ +922 int commSize) const │ │ │ │ │ +923 { │ │ │ │ │ +924 return _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e( name, path, -1, commSize ); │ │ │ │ │ +925 } │ │ │ │ │ +926 │ │ │ │ │ +928 │ │ │ │ │ +_9_4_0 std::string _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ +941 const std::string& path) const │ │ │ │ │ +942 { │ │ │ │ │ +943 static const std::string extension = │ │ │ │ │ +944 _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n == 1 ? ".vtp" : ".vtu"; │ │ │ │ │ +945 │ │ │ │ │ +946 return concatPaths(path, name+extension); │ │ │ │ │ +947 } │ │ │ │ │ +948 │ │ │ │ │ +_9_6_5 std::string _w_r_i_t_e ( const std::string &name, │ │ │ │ │ +966 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type, │ │ │ │ │ +967 const int commRank, │ │ │ │ │ +968 const int commSize ) │ │ │ │ │ +969 { │ │ │ │ │ +970 // in the parallel case, just use pwrite, it has all the necessary │ │ │ │ │ +971 // stuff, so we don't need to reimplement it here. │ │ │ │ │ +972 if(commSize > 1) │ │ │ │ │ +973 { │ │ │ │ │ +974 std::string filename = name; │ │ │ │ │ +975 std::string path = std::string(""); │ │ │ │ │ +976 │ │ │ │ │ +977 // check if a path was already added to name │ │ │ │ │ +978 // and if yes find filename without path │ │ │ │ │ +979 auto pos = name.rfind('/'); │ │ │ │ │ +980 if( pos != std::string::npos ) │ │ │ │ │ +981 { │ │ │ │ │ +982 // extract filename without path │ │ │ │ │ +983 filename = name.substr( pos+1 ); │ │ │ │ │ +984 │ │ │ │ │ +985 // extract the path and added it before │ │ │ │ │ +986 // the magic below is added │ │ │ │ │ +987 path = name.substr(0, pos); │ │ │ │ │ +988 } │ │ │ │ │ +989 │ │ │ │ │ +990 return _p_w_r_i_t_e(filename, path, "", type, commRank, commSize); │ │ │ │ │ +991 } │ │ │ │ │ +992 │ │ │ │ │ +993 // make data mode visible to private functions │ │ │ │ │ +994 _o_u_t_p_u_t_t_y_p_e = type; │ │ │ │ │ +995 │ │ │ │ │ +996 // generate filename for process data │ │ │ │ │ +997 std::string pieceName = _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(name, ""); │ │ │ │ │ +998 │ │ │ │ │ +999 // write process data │ │ │ │ │ +1000 std::ofstream file; │ │ │ │ │ +1001 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +1002 std::ios_base::eofbit); │ │ │ │ │ +1003 // check if file can be opened │ │ │ │ │ +1004 try { │ │ │ │ │ +1005 file.open( pieceName.c_str(), std::ios::binary ); │ │ │ │ │ +1006 } │ │ │ │ │ +1007 catch(...) { │ │ │ │ │ +1008 std::cerr << "Filename: " << pieceName << " could not be opened" << std:: │ │ │ │ │ +endl; │ │ │ │ │ +1009 throw; │ │ │ │ │ +1010 } │ │ │ │ │ +1011 if (! file.is_open()) │ │ │ │ │ +1012 DUNE_THROW(IOError, "Could not write to piece file " << pieceName); │ │ │ │ │ +1013 writeDataFile( file ); │ │ │ │ │ +1014 file.close(); │ │ │ │ │ +1015 │ │ │ │ │ +1016 return pieceName; │ │ │ │ │ +1017 } │ │ │ │ │ +1018 │ │ │ │ │ +1020 │ │ │ │ │ +_1_0_4_3 std::string _p_w_r_i_t_e(const std::string& name, const std::string& path, │ │ │ │ │ +1044 const std::string& extendpath, │ │ │ │ │ +1045 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e ot, const int commRank, │ │ │ │ │ +1046 const int commSize ) │ │ │ │ │ +1047 { │ │ │ │ │ +1048 // make data mode visible to private functions │ │ │ │ │ +1049 _o_u_t_p_u_t_t_y_p_e=ot; │ │ │ │ │ +1050 │ │ │ │ │ +1051 // do some magic because paraview can only cope with relative paths to │ │ │ │ │ +piece files │ │ │ │ │ +1052 std::ofstream file; │ │ │ │ │ +1053 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +1054 std::ios_base::eofbit); │ │ │ │ │ +1055 std::string piecepath = concatPaths(path, extendpath); │ │ │ │ │ +1056 std::string relpiecepath = relativePath(path, piecepath); │ │ │ │ │ +1057 │ │ │ │ │ +1058 // write this processes .vtu/.vtp piece file │ │ │ │ │ +1059 std::string fullname = _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(name, piecepath, commRank, │ │ │ │ │ +1060 commSize); │ │ │ │ │ +1061 // check if file can be opened │ │ │ │ │ +1062 try { │ │ │ │ │ +1063 file.open(fullname.c_str(),std::ios::binary); │ │ │ │ │ +1064 } │ │ │ │ │ +1065 catch(...) { │ │ │ │ │ +1066 std::cerr << "Filename: " << fullname << " could not be opened" << std:: │ │ │ │ │ +endl; │ │ │ │ │ +1067 throw; │ │ │ │ │ +1068 } │ │ │ │ │ +1069 if (! file.is_open()) │ │ │ │ │ +1070 DUNE_THROW(IOError, "Could not write to piecefile file " << fullname); │ │ │ │ │ +1071 writeDataFile(file); │ │ │ │ │ +1072 file.close(); │ │ │ │ │ +1073 _g_r_i_d_V_i_e_w__._c_o_m_m().barrier(); │ │ │ │ │ +1074 │ │ │ │ │ +1075 // if we are rank 0, write .pvtu/.pvtp parallel header │ │ │ │ │ +1076 fullname = _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(name, path, commSize); │ │ │ │ │ +1077 if( commRank ==0 ) │ │ │ │ │ +1078 { │ │ │ │ │ +1079 file.open(fullname.c_str()); │ │ │ │ │ +1080 if (! file.is_open()) │ │ │ │ │ +1081 DUNE_THROW(IOError, "Could not write to parallel file " << fullname); │ │ │ │ │ +1082 writeParallelHeader(file,name,relpiecepath, commSize ); │ │ │ │ │ +1083 file.close(); │ │ │ │ │ +1084 } │ │ │ │ │ +1085 _g_r_i_d_V_i_e_w__._c_o_m_m().barrier(); │ │ │ │ │ +1086 return fullname; │ │ │ │ │ +1087 } │ │ │ │ │ +1088 │ │ │ │ │ +1089 private: │ │ │ │ │ +1091 │ │ │ │ │ +1108 void writeParallelHeader(std::ostream& s, const std::string& piecename, │ │ │ │ │ +1109 const std::string& piecepath, const int commSize) │ │ │ │ │ +1110 { │ │ │ │ │ +1111 _V_T_K_:_:_F_i_l_e_T_y_p_e fileType = │ │ │ │ │ +1112 (n == 1) ? _V_T_K_:_:_p_o_l_y_D_a_t_a : VTK::unstructuredGrid; │ │ │ │ │ +1113 │ │ │ │ │ +1114 _V_T_K_:_:_P_V_T_U_W_r_i_t_e_r writer(s, fileType); │ │ │ │ │ +1115 │ │ │ │ │ +1116 writer.beginMain(); │ │ │ │ │ +1117 │ │ │ │ │ +1118 // PPointData │ │ │ │ │ +1119 { │ │ │ │ │ +1120 std::string scalars, vectors; │ │ │ │ │ +1121 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_v_e_r_t_e_x_d_a_t_a); │ │ │ │ │ +1122 writer.beginPointData(scalars, vectors); │ │ │ │ │ +1123 } │ │ │ │ │ +1124 for (auto it = _v_e_r_t_e_x_d_a_t_a.begin(), │ │ │ │ │ +1125 end = _v_e_r_t_e_x_d_a_t_a.end(); │ │ │ │ │ +1126 it != end; │ │ │ │ │ +1127 ++it) │ │ │ │ │ +1128 { │ │ │ │ │ +1129 unsigned writecomps = it->fieldInfo().size(); │ │ │ │ │ +1130 if(writecomps == 2) writecomps = 3; │ │ │ │ │ +1131 writer.addArray(it->name(), writecomps, it->fieldInfo().precision()); │ │ │ │ │ +1132 } │ │ │ │ │ +1133 writer.endPointData(); │ │ │ │ │ +1134 │ │ │ │ │ +1135 // PCellData │ │ │ │ │ +1136 { │ │ │ │ │ +1137 std::string scalars, vectors; │ │ │ │ │ +1138 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_c_e_l_l_d_a_t_a); │ │ │ │ │ +1139 writer.beginCellData(scalars, vectors); │ │ │ │ │ +1140 } │ │ │ │ │ +1141 for (auto it = _c_e_l_l_d_a_t_a.begin(), │ │ │ │ │ +1142 end = _c_e_l_l_d_a_t_a.end(); │ │ │ │ │ +1143 it != end; │ │ │ │ │ +1144 ++it) │ │ │ │ │ +1145 { │ │ │ │ │ +1146 unsigned writecomps = it->fieldInfo().size(); │ │ │ │ │ +1147 if(writecomps == 2) writecomps = 3; │ │ │ │ │ +1148 writer.addArray(it->name(), writecomps, it->fieldInfo().precision()); │ │ │ │ │ +1149 } │ │ │ │ │ +1150 writer.endCellData(); │ │ │ │ │ +1151 │ │ │ │ │ +1152 // PPoints │ │ │ │ │ +1153 writer.beginPoints(); │ │ │ │ │ +1154 writer.addArray("Coordinates", 3, coordPrec); │ │ │ │ │ +1155 writer.endPoints(); │ │ │ │ │ +1156 │ │ │ │ │ +1157 // Pieces │ │ │ │ │ +1158 for( int i = 0; i < commSize; ++i ) │ │ │ │ │ +1159 { │ │ │ │ │ +1160 const std::string& fullname = _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(piecename, │ │ │ │ │ +1161 piecepath, i, │ │ │ │ │ +1162 commSize); │ │ │ │ │ +1163 writer.addPiece(fullname); │ │ │ │ │ +1164 } │ │ │ │ │ +1165 │ │ │ │ │ +1166 writer.endMain(); │ │ │ │ │ +1167 } │ │ │ │ │ +1168 │ │ │ │ │ +1170 void writeDataFile (std::ostream& s) │ │ │ │ │ +1171 { │ │ │ │ │ +1172 _V_T_K_:_:_F_i_l_e_T_y_p_e fileType = │ │ │ │ │ +1173 (n == 1) ? _V_T_K_:_:_p_o_l_y_D_a_t_a : VTK::_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d; │ │ │ │ │ +1174 │ │ │ │ │ +1175 VTK::VTUWriter writer(s, _o_u_t_p_u_t_t_y_p_e, fileType); │ │ │ │ │ +1176 │ │ │ │ │ +1177 // Grid characteristics │ │ │ │ │ +1178 vertexmapper = new VertexMapper( _g_r_i_d_V_i_e_w__, _m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t() ); │ │ │ │ │ +1179 if (datamode == _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g) │ │ │ │ │ +1180 { │ │ │ │ │ +1181 number.resize(vertexmapper->_s_i_z_e()); │ │ │ │ │ +1182 for (std::vector::size_type i=0; imap(), this iteration must be │ │ │ │ │ +1244 // in the order of Dune's numbering. │ │ │ │ │ +1245 const int subEntities = it->subEntities(n); │ │ │ │ │ +1246 for (int i=0; i_s_u_b_I_n_d_e_x(*it,i,n); │ │ │ │ │ +1252 if (number[alpha]<0) │ │ │ │ │ +1253 number[alpha] = nvertices_++; │ │ │ │ │ +1254 } │ │ │ │ │ +1255 else │ │ │ │ │ +1256 { │ │ │ │ │ +1257 nvertices_++; │ │ │ │ │ +1258 } │ │ │ │ │ +1259 } │ │ │ │ │ +1260 } │ │ │ │ │ +1261 } │ │ │ │ │ +1262 │ │ │ │ │ +1263 template │ │ │ │ │ +_1_2_6_4 std::tuple _g_e_t_D_a_t_a_N_a_m_e_s(const T& data) const │ │ │ │ │ +1265 { │ │ │ │ │ +1266 std::string scalars = ""; │ │ │ │ │ +1267 for (auto it = data.begin(), │ │ │ │ │ +1268 end = data.end(); │ │ │ │ │ +1269 it != end; │ │ │ │ │ +1270 ++it) │ │ │ │ │ +1271 if (it->fieldInfo().type() == _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r) │ │ │ │ │ +1272 { │ │ │ │ │ +1273 scalars = it->name(); │ │ │ │ │ +1274 break; │ │ │ │ │ +1275 } │ │ │ │ │ +1276 │ │ │ │ │ +1277 std::string vectors = ""; │ │ │ │ │ +1278 for (auto it = data.begin(), │ │ │ │ │ +1279 end = data.end(); │ │ │ │ │ +1280 it != end; │ │ │ │ │ +1281 ++it) │ │ │ │ │ +1282 if (it->fieldInfo().type() == _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r) │ │ │ │ │ +1283 { │ │ │ │ │ +1284 vectors = it->name(); │ │ │ │ │ +1285 break; │ │ │ │ │ +1286 } │ │ │ │ │ +1287 return std::make_tuple(scalars,vectors); │ │ │ │ │ +1288 } │ │ │ │ │ +1289 │ │ │ │ │ +1290 template │ │ │ │ │ +_1_2_9_1 void _w_r_i_t_e_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer, const Data& data, const Iterator │ │ │ │ │ +begin, const Iterator end, int nentries) │ │ │ │ │ +1292 { │ │ │ │ │ +1293 for (auto it = data.begin(), │ │ │ │ │ +1294 iend = data.end(); │ │ │ │ │ +1295 it != iend; │ │ │ │ │ +1296 ++it) │ │ │ │ │ +1297 { │ │ │ │ │ +1298 const auto& f = *it; │ │ │ │ │ +1299 _V_T_K_:_:_F_i_e_l_d_I_n_f_o fieldInfo = f.fieldInfo(); │ │ │ │ │ +1300 std::size_t writecomps = fieldInfo._s_i_z_e(); │ │ │ │ │ +1301 switch (fieldInfo._t_y_p_e()) │ │ │ │ │ +1302 { │ │ │ │ │ +1303 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r: │ │ │ │ │ +1304 break; │ │ │ │ │ +1305 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r: │ │ │ │ │ +1306 // vtk file format: a vector data always should have 3 comps (with │ │ │ │ │ +1307 // 3rd comp = 0 in 2D case) │ │ │ │ │ +1308 if (writecomps > 3) │ │ │ │ │ +1309 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components │ │ │ │ │ +(components was " << writecomps << ")"); │ │ │ │ │ +1310 writecomps = 3; │ │ │ │ │ +1311 break; │ │ │ │ │ +1312 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r: │ │ │ │ │ +1313 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet"); │ │ │ │ │ +1314 } │ │ │ │ │ +1315 std::shared_ptr p │ │ │ │ │ +1316 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(f.name(), writecomps, nentries, │ │ │ │ │ +fieldInfo._p_r_e_c_i_s_i_o_n())); │ │ │ │ │ +1317 if(!p->writeIsNoop()) │ │ │ │ │ +1318 for (Iterator eit = begin; eit!=end; ++eit) │ │ │ │ │ +1319 { │ │ │ │ │ +1320 const Entity & e = *eit; │ │ │ │ │ +1321 f.bind(e); │ │ │ │ │ +1322 f.write(eit.position(),*p); │ │ │ │ │ +1323 f.unbind(); │ │ │ │ │ +1324 // vtk file format: a vector data always should have 3 comps │ │ │ │ │ +1325 // (with 3rd comp = 0 in 2D case) │ │ │ │ │ +1326 for (std::size_t j=fieldInfo._s_i_z_e(); j < writecomps; ++j) │ │ │ │ │ +1327 p->write(0.0); │ │ │ │ │ +1328 } │ │ │ │ │ +1329 } │ │ │ │ │ +1330 } │ │ │ │ │ +1331 │ │ │ │ │ +_1_3_3_3 virtual void _w_r_i_t_e_C_e_l_l_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +1334 { │ │ │ │ │ +1335 if(_c_e_l_l_d_a_t_a.size() == 0) │ │ │ │ │ +1336 return; │ │ │ │ │ +1337 │ │ │ │ │ +1338 std::string scalars, vectors; │ │ │ │ │ +1339 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_c_e_l_l_d_a_t_a); │ │ │ │ │ +1340 │ │ │ │ │ +1341 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(scalars, vectors); │ │ │ │ │ +1342 _w_r_i_t_e_D_a_t_a(writer,_c_e_l_l_d_a_t_a,_c_e_l_l_B_e_g_i_n(),_c_e_l_l_E_n_d(),_n_c_e_l_l_s); │ │ │ │ │ +1343 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +1344 } │ │ │ │ │ +1345 │ │ │ │ │ +_1_3_4_7 virtual void _w_r_i_t_e_V_e_r_t_e_x_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +1348 { │ │ │ │ │ +1349 if(_v_e_r_t_e_x_d_a_t_a.size() == 0) │ │ │ │ │ +1350 return; │ │ │ │ │ +1351 │ │ │ │ │ +1352 std::string scalars, vectors; │ │ │ │ │ +1353 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_v_e_r_t_e_x_d_a_t_a); │ │ │ │ │ +1354 │ │ │ │ │ +1355 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(scalars, vectors); │ │ │ │ │ +1356 _w_r_i_t_e_D_a_t_a(writer,_v_e_r_t_e_x_d_a_t_a,_v_e_r_t_e_x_B_e_g_i_n(),_v_e_r_t_e_x_E_n_d(),_n_v_e_r_t_i_c_e_s); │ │ │ │ │ +1357 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +1358 } │ │ │ │ │ +1359 │ │ │ │ │ +_1_3_6_1 virtual void _w_r_i_t_e_G_r_i_d_P_o_i_n_t_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +1362 { │ │ │ │ │ +1363 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +1364 │ │ │ │ │ +1365 std::shared_ptr p │ │ │ │ │ +1366 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("Coordinates", 3, _n_v_e_r_t_i_c_e_s, coordPrec)); │ │ │ │ │ +1367 if(!p->writeIsNoop()) { │ │ │ │ │ +1368 _V_e_r_t_e_x_I_t_e_r_a_t_o_r vEnd = _v_e_r_t_e_x_E_n_d(); │ │ │ │ │ +1369 for (_V_e_r_t_e_x_I_t_e_r_a_t_o_r vit=_v_e_r_t_e_x_B_e_g_i_n(); vit!=vEnd; ++vit) │ │ │ │ │ +1370 { │ │ │ │ │ +1371 int dimw=w; │ │ │ │ │ +1372 for (int j=0; jwrite((*vit).geometry().corner(vit.localindex())[j]); │ │ │ │ │ +1374 for (int j=std::min(dimw,3); j<3; j++) │ │ │ │ │ +1375 p->write(0.0); │ │ │ │ │ +1376 } │ │ │ │ │ +1377 } │ │ │ │ │ +1378 // free the VTK::DataArrayWriter before touching the stream │ │ │ │ │ +1379 p.reset(); │ │ │ │ │ +1380 │ │ │ │ │ +1381 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +1382 } │ │ │ │ │ +1383 │ │ │ │ │ +_1_3_8_5 virtual void _w_r_i_t_e_G_r_i_d_C_e_l_l_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +1386 { │ │ │ │ │ +1387 writer._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ +1388 │ │ │ │ │ +1389 // connectivity │ │ │ │ │ +1390 { │ │ │ │ │ +1391 std::shared_ptr p1 │ │ │ │ │ +1392 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("connectivity", 1, _n_c_o_r_n_e_r_s, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_: │ │ │ │ │ +_i_n_t_3_2)); │ │ │ │ │ +1393 if(!p1->writeIsNoop()) │ │ │ │ │ +1394 for (_C_o_r_n_e_r_I_t_e_r_a_t_o_r it=_c_o_r_n_e_r_B_e_g_i_n(); it!=_c_o_r_n_e_r_E_n_d(); ++it) │ │ │ │ │ +1395 p1->write(it.id()); │ │ │ │ │ +1396 } │ │ │ │ │ +1397 │ │ │ │ │ +1398 // offsets │ │ │ │ │ +1399 { │ │ │ │ │ +1400 std::shared_ptr p2 │ │ │ │ │ +1401 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("offsets", 1, _n_c_e_l_l_s, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +1402 if(!p2->writeIsNoop()) { │ │ │ │ │ +1403 int offset = 0; │ │ │ │ │ +1404 for (_C_e_l_l_I_t_e_r_a_t_o_r it=_c_e_l_l_B_e_g_i_n(); it!=_c_e_l_l_E_n_d(); ++it) │ │ │ │ │ +1405 { │ │ │ │ │ +1406 offset += it->subEntities(n); │ │ │ │ │ +1407 p2->write(offset); │ │ │ │ │ +1408 } │ │ │ │ │ +1409 } │ │ │ │ │ +1410 } │ │ │ │ │ +1411 │ │ │ │ │ +1412 // types │ │ │ │ │ +1413 if (n>1) │ │ │ │ │ +1414 { │ │ │ │ │ +1415 { │ │ │ │ │ +1416 std::shared_ptr p3 │ │ │ │ │ +1417 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("types", 1, _n_c_e_l_l_s, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8)); │ │ │ │ │ +1418 │ │ │ │ │ +1419 if(!p3->writeIsNoop()) │ │ │ │ │ +1420 { │ │ │ │ │ +1421 for (_C_e_l_l_I_t_e_r_a_t_o_r it=_c_e_l_l_B_e_g_i_n(); it!=_c_e_l_l_E_n_d(); ++it) │ │ │ │ │ +1422 { │ │ │ │ │ +1423 int vtktype = _V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e(it->type()); │ │ │ │ │ +1424 p3->write(vtktype); │ │ │ │ │ +1425 } │ │ │ │ │ +1426 } │ │ │ │ │ +1427 } │ │ │ │ │ +1428 │ │ │ │ │ +1429 │ │ │ │ │ +1430 // if polyhedron cells found also cell faces need to be written │ │ │ │ │ +1431 if( polyhedralCellsPresent_ ) │ │ │ │ │ +1432 { │ │ │ │ │ +1433 _w_r_i_t_e_C_e_l_l_F_a_c_e_s( writer ); │ │ │ │ │ +1434 } │ │ │ │ │ +1435 } │ │ │ │ │ +1436 │ │ │ │ │ +1437 writer._e_n_d_C_e_l_l_s(); │ │ │ │ │ +1438 } │ │ │ │ │ +1439 │ │ │ │ │ +1440 protected: │ │ │ │ │ +_1_4_4_1 bool _c_h_e_c_k_F_o_r_P_o_l_y_h_e_d_r_a_l_C_e_l_l_s() const │ │ │ │ │ +1442 { │ │ │ │ │ +1443 // check if polyhedron cells are present │ │ │ │ │ +1444 for( const auto& geomType : _g_r_i_d_V_i_e_w__._i_n_d_e_x_S_e_t().types( 0 ) ) │ │ │ │ │ +1445 { │ │ │ │ │ +1446 if( _V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e( geomType ) == _V_T_K_:_:_p_o_l_y_h_e_d_r_o_n ) │ │ │ │ │ +1447 { │ │ │ │ │ +1448 return true; │ │ │ │ │ +1449 } │ │ │ │ │ +1450 } │ │ │ │ │ +1451 return false; │ │ │ │ │ +1452 } │ │ │ │ │ +1453 │ │ │ │ │ +_1_4_5_5 virtual void _w_r_i_t_e_C_e_l_l_F_a_c_e_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +1456 { │ │ │ │ │ +1457 if( ! faceVertices_ ) │ │ │ │ │ +1458 { │ │ │ │ │ +1459 faceVertices_.reset( new std::pair< std::vector, std::vector > │ │ │ │ │ +() ); │ │ │ │ │ +1460 // fill face vertex structure │ │ │ │ │ +1461 _f_i_l_l_F_a_c_e_V_e_r_t_i_c_e_s( _c_o_r_n_e_r_B_e_g_i_n(), _c_o_r_n_e_r_E_n_d(), _g_r_i_d_V_i_e_w__._i_n_d_e_x_S_e_t(), │ │ │ │ │ +1462 faceVertices_->first, faceVertices_->second ); │ │ │ │ │ +1463 } │ │ │ │ │ +1464 │ │ │ │ │ +1465 std::vector< int >& faces = faceVertices_->first; │ │ │ │ │ +1466 std::vector< int >& faceOffsets = faceVertices_->second; │ │ │ │ │ +1467 assert( int(faceOffsets.size()) == _n_c_e_l_l_s ); │ │ │ │ │ +1468 │ │ │ │ │ +1469 { │ │ │ │ │ +1470 std::shared_ptr p4 │ │ │ │ │ +1471 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("faces", 1, faces.size(), _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +1472 if(!p4->writeIsNoop()) │ │ │ │ │ +1473 { │ │ │ │ │ +1474 for( const auto& face : faces ) │ │ │ │ │ +1475 p4->write( face ); │ │ │ │ │ +1476 } │ │ │ │ │ +1477 } │ │ │ │ │ +1478 │ │ │ │ │ +1479 { │ │ │ │ │ +1480 std::shared_ptr p5 │ │ │ │ │ +1481 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("faceoffsets", 1, _n_c_e_l_l_s, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +1482 if(!p5->writeIsNoop()) │ │ │ │ │ +1483 { │ │ │ │ │ +1484 for( const auto& offset : faceOffsets ) │ │ │ │ │ +1485 p5->write( offset ); │ │ │ │ │ +1486 │ │ │ │ │ +1487 // clear face vertex structure │ │ │ │ │ +1488 faceVertices_.reset(); │ │ │ │ │ +1489 } │ │ │ │ │ +1490 } │ │ │ │ │ +1491 } │ │ │ │ │ +1492 │ │ │ │ │ +1493 template │ │ │ │ │ +_1_4_9_4 inline void _f_i_l_l_F_a_c_e_V_e_r_t_i_c_e_s( _C_o_r_n_e_r_I_t_e_r_a_t_o_r it, │ │ │ │ │ +1495 const _C_o_r_n_e_r_I_t_e_r_a_t_o_r end, │ │ │ │ │ +1496 const IndexSet& indexSet, │ │ │ │ │ +1497 std::vector& faces, │ │ │ │ │ +1498 std::vector& faceOffsets ) │ │ │ │ │ +1499 { │ │ │ │ │ +1500 if( n == 3 && it != end ) │ │ │ │ │ +1501 { │ │ │ │ │ +1502 // clear output arrays │ │ │ │ │ +1503 faces.clear(); │ │ │ │ │ +1504 faces.reserve( 15 * _n_c_e_l_l_s ); │ │ │ │ │ +1505 faceOffsets.clear(); │ │ │ │ │ +1506 faceOffsets.reserve( _n_c_e_l_l_s ); │ │ │ │ │ +1507 │ │ │ │ │ +1508 int offset = 0; │ │ │ │ │ +1509 │ │ │ │ │ +1510 Cell element = *it; │ │ │ │ │ +1511 int elIndex = indexSet.index( element ); │ │ │ │ │ +1512 std::vector< T > vertices; │ │ │ │ │ +1513 vertices.reserve( 30 ); │ │ │ │ │ +1514 for( ; it != end; ++it ) │ │ │ │ │ +1515 { │ │ │ │ │ +1516 const Cell& cell = *it ; │ │ │ │ │ +1517 const int cellIndex = indexSet.index( cell ) ; │ │ │ │ │ +1518 if( elIndex != cellIndex ) │ │ │ │ │ +1519 { │ │ │ │ │ +1520 _f_i_l_l_F_a_c_e_s_F_o_r_E_l_e_m_e_n_t( element, indexSet, vertices, offset, faces, │ │ │ │ │ +faceOffsets ); │ │ │ │ │ +1521 │ │ │ │ │ +1522 vertices.clear(); │ │ │ │ │ +1523 element = cell ; │ │ │ │ │ +1524 elIndex = cellIndex ; │ │ │ │ │ +1525 } │ │ │ │ │ +1526 vertices.push_back( it._i_d() ); │ │ │ │ │ +1527 } │ │ │ │ │ +1528 │ │ │ │ │ +1529 // fill faces for last element │ │ │ │ │ +1530 _f_i_l_l_F_a_c_e_s_F_o_r_E_l_e_m_e_n_t( element, indexSet, vertices, offset, faces, │ │ │ │ │ +faceOffsets ); │ │ │ │ │ +1531 } │ │ │ │ │ +1532 } │ │ │ │ │ +1533 │ │ │ │ │ +1534 template │ │ │ │ │ +_1_5_3_5 static void _f_i_l_l_F_a_c_e_s_F_o_r_E_l_e_m_e_n_t( const Entity& element, │ │ │ │ │ +1536 const IndexSet& indexSet, │ │ │ │ │ +1537 const std::vector& vertices, │ │ │ │ │ +1538 T& offset, │ │ │ │ │ +1539 std::vector& faces, │ │ │ │ │ +1540 std::vector& faceOffsets ) │ │ │ │ │ +1541 { │ │ │ │ │ +1542 const int dim = n; │ │ │ │ │ +1543 │ │ │ │ │ +1544 std::map< T, T > vxMap; │ │ │ │ │ +1545 │ │ │ │ │ +1546 // get number of local faces │ │ │ │ │ +1547 const int nVertices = element.subEntities( dim ); │ │ │ │ │ +1548 for( int vx = 0; vx < nVertices; ++ vx ) │ │ │ │ │ +1549 { │ │ │ │ │ +1550 const int vxIdx = indexSet.subIndex( element, vx, dim ); │ │ │ │ │ +1551 vxMap[ vxIdx ] = vertices[ vx ]; │ │ │ │ │ +1552 } │ │ │ │ │ +1553 │ │ │ │ │ +1554 // get number of local faces │ │ │ │ │ +1555 const int nFaces = element.subEntities( 1 ); │ │ │ │ │ +1556 // store number of faces for current element │ │ │ │ │ +1557 faces.push_back( nFaces ); │ │ │ │ │ +1558 ++offset; │ │ │ │ │ +1559 // extract each face as a set of vertex indices │ │ │ │ │ +1560 for( int fce = 0; fce < nFaces; ++ fce ) │ │ │ │ │ +1561 { │ │ │ │ │ +1562 // obtain face │ │ │ │ │ +1563 const auto face = element.template subEntity< 1 > ( fce ); │ │ │ │ │ +1564 │ │ │ │ │ +1565 // get all vertex indices from current face │ │ │ │ │ +1566 const int nVxFace = face.subEntities( dim ); │ │ │ │ │ +1567 faces.push_back( nVxFace ); │ │ │ │ │ +1568 ++offset ; │ │ │ │ │ +1569 for( int i=0; i _c_e_l_l_d_a_t_a; │ │ │ │ │ +_1_5_8_5 std::list _v_e_r_t_e_x_d_a_t_a; │ │ │ │ │ +1586 │ │ │ │ │ +1587 // the grid │ │ │ │ │ +_1_5_8_8 _G_r_i_d_V_i_e_w _g_r_i_d_V_i_e_w__; │ │ │ │ │ +1589 │ │ │ │ │ +1590 // temporary grid information │ │ │ │ │ +_1_5_9_1 int _n_c_e_l_l_s; │ │ │ │ │ +_1_5_9_2 int _n_v_e_r_t_i_c_e_s; │ │ │ │ │ +_1_5_9_3 int _n_c_o_r_n_e_r_s; │ │ │ │ │ +1594 private: │ │ │ │ │ +1595 _V_e_r_t_e_x_M_a_p_p_e_r* vertexmapper; │ │ │ │ │ +1596 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ │ +1597 // hold its number in the iteration order (VertexIterator) │ │ │ │ │ +1598 std::vector number; │ │ │ │ │ +1599 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ │ +1600 _V_T_K_:_:_P_r_e_c_i_s_i_o_n coordPrec; │ │ │ │ │ +1601 │ │ │ │ │ +1602 // true if polyhedral cells are present in the grid │ │ │ │ │ +1603 const bool polyhedralCellsPresent_; │ │ │ │ │ +1604 │ │ │ │ │ +1605 // pointer holding face vertex connectivity if needed │ │ │ │ │ +1606 std::shared_ptr< std::pair< std::vector, std::vector > > │ │ │ │ │ +faceVertices_; │ │ │ │ │ +1607 │ │ │ │ │ +1608 protected: │ │ │ │ │ +_1_6_0_9 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e _o_u_t_p_u_t_t_y_p_e; │ │ │ │ │ +1610 }; │ │ │ │ │ +1611 │ │ │ │ │ +1612} │ │ │ │ │ +1613 │ │ │ │ │ +1614#endif │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ +Mapper for multiple codim and multiple geometry types. │ │ │ │ │ +_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_s_t_r_e_a_m_s_._h_h │ │ │ │ │ +_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ │ +Data array writers for the VTKWriter. │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ +Functions for VTK output. │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ │ +PartitionIteratorType │ │ │ │ │ +Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ All_Partition │ │ │ │ │ +all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ InteriorBorder_Partition │ │ │ │ │ +interior and border entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ +@ InteriorEntity │ │ │ │ │ +all interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ +const IndexSet & indexSet() const │ │ │ │ │ +obtain the index set │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +type of the grid │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Traits::IndexSet IndexSet │ │ │ │ │ +type of the index set │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +obtain communication object │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +type used for coordinates in grid │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static constexpr int dimensionworld │ │ │ │ │ +The dimension of the world the grid lives in. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgVertexLayout() │ │ │ │ │ +layout for vertices (dim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:107 │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval │ │ │ │ │ -&interval) │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -void get(std::vector< std::vector< double > > &vtx, int &nofvtx, std::vector< │ │ │ │ │ -std::vector< unsigned int > > &simplex, int &nofsimpl) │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_n_u_m_I_n_t_e_r_v_a_l_s │ │ │ │ │ -int numIntervals() const │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t_V_t_x │ │ │ │ │ -int getVtx(int block, std::vector< std::vector< double > > &vtx) const │ │ │ │ │ -DDeeffiinniittiioonn interval.cc:84 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -const Interval & get(int block) const │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t_H_e_x_a │ │ │ │ │ -int getHexa(int block, std::vector< std::vector< unsigned int > > &cubes, int │ │ │ │ │ -offset=0) const │ │ │ │ │ -DDeeffiinniittiioonn interval.cc:122 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_n_o_f_h_e_x_a │ │ │ │ │ -int nofhexa(int block) const │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_d_i_m_w │ │ │ │ │ -int dimw() const │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_n_o_f_v_t_x │ │ │ │ │ -int nofvtx(int block) const │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -void get(std::vector< std::vector< double > > &vtx, int &nofvtx) │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ -Interval() │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_p │ │ │ │ │ -std::array< std::vector< double >, 2 > p │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_n │ │ │ │ │ -std::vector< int > n │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ -Interval(const Interval &interval, const std::vector< int > &map) │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_c_o_p_y │ │ │ │ │ -void copy(const Interval &interval, const std::vector< int > &map) │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_h │ │ │ │ │ -std::vector< double > h │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ +@ int32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ +@ uint8 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ +@ float32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ +OutputType │ │ │ │ │ +How the bulk data should be stored in the file. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ +@ ascii │ │ │ │ │ +Output to the file is in ascii. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w │ │ │ │ │ +@ appendedraw │ │ │ │ │ +Output is to the file is appended raw binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ +@ appendedbase64 │ │ │ │ │ +Output is to the file is appended base64 binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 │ │ │ │ │ +@ base64 │ │ │ │ │ +Output to the file is inline base64 binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r │ │ │ │ │ +int renumber(const Dune::GeometryType &t, int i) │ │ │ │ │ +renumber VTK <-> Dune │ │ │ │ │ +DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ +FileType │ │ │ │ │ +which type of VTK file to write │ │ │ │ │ +DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ +@ polyData │ │ │ │ │ +for .vtp files (PolyData) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ +@ unstructuredGrid │ │ │ │ │ +for .vtu files (UnstructuredGrid) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e │ │ │ │ │ +DataMode │ │ │ │ │ +Whether to produce conforming or non-conforming output. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +@ conforming │ │ │ │ │ +Output conforming data. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +@ nonconforming │ │ │ │ │ +Output non-conforming data. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ +mapping from GeometryType to VTKGeometryType │ │ │ │ │ +DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_h_e_d_r_o_n │ │ │ │ │ +@ polyhedron │ │ │ │ │ +DDeeffiinniittiioonn common.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +A struct that collects all associated types of one implementation from the │ │ │ │ │ +Traits class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ +size_type size() const │ │ │ │ │ +Return total number of entities in the entity set managed by the mapper. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:204 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ +unsigned int codim) const │ │ │ │ │ +Map subentity of codim 0 entity to starting index in array for dof block. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ +Descriptor struct for VTK fields. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:328 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +The number of components in the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:364 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision precision() const │ │ │ │ │ +The precision used for the output of the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:370 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r │ │ │ │ │ +@ tensor │ │ │ │ │ +tensor field (always 3x3) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r │ │ │ │ │ +@ vector │ │ │ │ │ +vector-valued field (always 3D, will be padded if necessary) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r │ │ │ │ │ +@ scalar │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_t_y_p_e │ │ │ │ │ +Type type() const │ │ │ │ │ +The type of the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:358 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_n_a_m_e │ │ │ │ │ +std::string name() const │ │ │ │ │ +The name of the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:352 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +base class for data array writers │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(T data) │ │ │ │ │ +write one element of data │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +A base class for grid functions with any return type and dimension. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ +Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriter.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +Base class to write pvd-files which contains a list of all collected vtk-files. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ +Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const Container &v, const std::string &name, int ncomps=1, │ │ │ │ │ +VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +Add a grid function (represented by container) that lives on the cells of the │ │ │ │ │ +grid to the visualizati... │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:695 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_o_r_n_e_r_E_n_d │ │ │ │ │ +CornerIterator cornerEnd() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:620 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_l_e_a_r │ │ │ │ │ +void clear() │ │ │ │ │ +clear list of registered functions │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:775 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +std::string write(const std::string &name, VTK::OutputType type=VTK::ascii) │ │ │ │ │ +write output (interface might change later) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:803 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_B_e_g_i_n │ │ │ │ │ +VertexIterator vertexBegin() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:508 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_e_t_T_y_p_e_S_t_r_i_n_g │ │ │ │ │ +std::string getTypeString() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1226 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e │ │ │ │ │ +std::string getParallelHeaderName(const std::string &name, const std::string │ │ │ │ │ +&path, int commSize) const │ │ │ │ │ +return name of a parallel header file │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:920 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const std::shared_ptr< const VTKFunction > &p) │ │ │ │ │ +Add a grid function that lives on the vertices of the grid to the │ │ │ │ │ +visualization. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:713 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Dune::VTKFunction< GridView > VTKFunction │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_E_n_d │ │ │ │ │ +CellIterator cellEnd() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:402 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_d_a_t_a │ │ │ │ │ +std::list< VTKLocalFunction > vertexdata │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1585 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_o_r_n_e_r_B_e_g_i_n │ │ │ │ │ +CornerIterator cornerBegin() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:613 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e │ │ │ │ │ +std::string getSerialPieceName(const std::string &name, const std::string │ │ │ │ │ +&path) const │ │ │ │ │ +return name of a serial piece file │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:940 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< const VTKFunction > &p) │ │ │ │ │ +Add a grid function that lives on the cells of the grid to the visualization. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:649 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_e_t_F_o_r_m_a_t_S_t_r_i_n_g │ │ │ │ │ +std::string getFormatString() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1213 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_h_e_c_k_F_o_r_P_o_l_y_h_e_d_r_a_l_C_e_l_l_s │ │ │ │ │ +bool checkForPolyhedralCells() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1441 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(F &&f, VTK::FieldInfo vtkFieldInfo) │ │ │ │ │ +Add a function by sampling it on the grid vertices. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:738 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a │ │ │ │ │ +virtual void writeCellData(VTK::VTUWriter &writer) │ │ │ │ │ +write cell data │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1333 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_o_u_n_t_E_n_t_i_t_i_e_s │ │ │ │ │ +virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_) │ │ │ │ │ +count the vertices, cells and corners │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1235 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e │ │ │ │ │ +std::string getParallelPieceName(const std::string &name, const std::string │ │ │ │ │ +&path, int commRank, int commSize) const │ │ │ │ │ +return name of a parallel piece file (or header name) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:855 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_B_e_g_i_n │ │ │ │ │ +CellIterator cellBegin() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:397 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_o_u_t_p_u_t_t_y_p_e │ │ │ │ │ +VTK::OutputType outputtype │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1609 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d_C_e_l_l_s │ │ │ │ │ +virtual void writeGridCells(VTK::VTUWriter &writer) │ │ │ │ │ +write the connectivity array │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1385 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_r_i_d_V_i_e_w__ │ │ │ │ │ +GridView gridView_ │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1588 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_F_a_c_e_s │ │ │ │ │ +virtual void writeCellFaces(VTK::VTUWriter &writer) │ │ │ │ │ +write the connectivity array │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1455 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_f_i_l_l_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ +void fillFaceVertices(CornerIterator it, const CornerIterator end, const │ │ │ │ │ +IndexSet &indexSet, std::vector< T > &faces, std::vector< T > &faceOffsets) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1494 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_d_a_t_a │ │ │ │ │ +std::list< VTKLocalFunction > celldata │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1584 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +std::string write(const std::string &name, VTK::OutputType type, const int │ │ │ │ │ +commRank, const int commSize) │ │ │ │ │ +write output (interface might change later) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:965 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_o_o_r_d_P_r_e_c_i_s_i_o_n │ │ │ │ │ +VTK::Precision coordPrecision() const │ │ │ │ │ +get the precision with which coordinates are written out │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:782 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +std::list< VTKLocalFunction >::const_iterator FunctionIterator │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:376 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_g_e_t_D_a_t_a_N_a_m_e_s │ │ │ │ │ +std::tuple< std::string, std::string > getDataNames(const T &data) const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1264 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d_P_o_i_n_t_s │ │ │ │ │ +virtual void writeGridPoints(VTK::VTUWriter &writer) │ │ │ │ │ +write the positions of vertices │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1361 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +virtual void writeVertexData(VTK::VTUWriter &writer) │ │ │ │ │ +write vertex data │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1347 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_v_e_r_t_i_c_e_s │ │ │ │ │ +int nvertices │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1592 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(F &&f, VTK::FieldInfo vtkFieldInfo) │ │ │ │ │ +Add a function by sampling it on the element centers. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:674 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const Container &v, const std::string &name, int ncomps=1, │ │ │ │ │ +VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +Add a grid function (represented by container) that lives on the vertices of │ │ │ │ │ +the grid to the visualiz... │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:760 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_~_V_T_K_W_r_i_t_e_r │ │ │ │ │ +virtual ~VTKWriter() │ │ │ │ │ +destructor │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:786 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_f_i_l_l_F_a_c_e_s_F_o_r_E_l_e_m_e_n_t │ │ │ │ │ +static void fillFacesForElement(const Entity &element, const IndexSet │ │ │ │ │ +&indexSet, const std::vector< T > &vertices, T &offset, std::vector< T > │ │ │ │ │ +&faces, std::vector< T > &faceOffsets) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1535 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_D_a_t_a │ │ │ │ │ +void writeData(VTK::VTUWriter &writer, const Data &data, const Iterator begin, │ │ │ │ │ +const Iterator end, int nentries) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1291 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_e_l_l_s │ │ │ │ │ +int ncells │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1591 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_E_n_d │ │ │ │ │ +VertexIterator vertexEnd() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:515 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ +VTKWriter(const GridView &gridView, VTK::DataMode dm=VTK::conforming, VTK:: │ │ │ │ │ +Precision coordPrecision=VTK::Precision::float32) │ │ │ │ │ +Construct a VTKWriter working on a specific GridView. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:636 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_p_w_r_i_t_e │ │ │ │ │ +std::string pwrite(const std::string &name, const std::string &path, const │ │ │ │ │ +std::string &extendpath, VTK::OutputType ot, const int commRank, const int │ │ │ │ │ +commSize) │ │ │ │ │ +write output; interface might change later │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1043 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_p_w_r_i_t_e │ │ │ │ │ +std::string pwrite(const std::string &name, const std::string &path, const │ │ │ │ │ +std::string &extendpath, VTK::OutputType type=VTK::ascii) │ │ │ │ │ +write output (interface might change later) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:835 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_o_r_n_e_r_s │ │ │ │ │ +int ncorners │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1593 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ +Type erasure wrapper for VTK data sets. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:156 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_u_n_b_i_n_d │ │ │ │ │ +void unbind() const │ │ │ │ │ +Unbind the data set from the currently bound entity. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:360 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ +VTKLocalFunction(F &&f, VTK::FieldInfo fieldInfo) │ │ │ │ │ +Construct a VTKLocalFunction for a dune-functions style LocalFunction. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:307 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ +std::string name() const │ │ │ │ │ +Returns the name of the data set. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:342 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:___f_i_e_l_d_I_n_f_o │ │ │ │ │ +VTK::FieldInfo _fieldInfo │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:372 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_W_r_i_t_e_r │ │ │ │ │ +VTK::DataArrayWriter Writer │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_f_i_e_l_d_I_n_f_o │ │ │ │ │ +const VTK::FieldInfo & fieldInfo() const │ │ │ │ │ +Returns the VTK::FieldInfo for the data set. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_b_i_n_d │ │ │ │ │ +void bind(const Entity &e) const │ │ │ │ │ +Bind the data set to grid entity e. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:354 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ +VTKLocalFunction(const std::shared_ptr< const VTKFunction > &vtkFunctionPtr) │ │ │ │ │ +Construct a VTKLocalFunction for a legacy VTKFunction. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:331 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:___f │ │ │ │ │ +std::shared_ptr< FunctionWrapperBase > _f │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:371 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_w_r_i_t_e │ │ │ │ │ +void write(const Coordinate &pos, Writer &w) const │ │ │ │ │ +Write the value of the data set at local coordinate pos to the writer w. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:366 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +Base class for polymorphic container of underlying data set. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const │ │ │ │ │ +=0 │ │ │ │ │ +Evaluate data set at local position pos inside the current entity and write │ │ │ │ │ +result to w. │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e_:_:_~_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ +virtual ~FunctionWrapperBase() │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:178 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e_:_:_u_n_b_i_n_d │ │ │ │ │ +virtual void unbind()=0 │ │ │ │ │ +Unbind data set from current grid entity - mostly here for performance and │ │ │ │ │ +symmetry reasons. │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e_:_:_b_i_n_d │ │ │ │ │ +virtual void bind(const Entity &e)=0 │ │ │ │ │ +Bind data set to grid entity - must be called before evaluating (i.e. calling │ │ │ │ │ +write()) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +Type erasure implementation for functions conforming to the dune-functions │ │ │ │ │ +LocalFunction interface. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:188 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_F_u_n_c_t_i_o_n │ │ │ │ │ +typename std::decay< F >::type Function │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +FunctionWrapper(F_ &&f) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const │ │ │ │ │ +Evaluate data set at local position pos inside the current entity and write │ │ │ │ │ +result to w. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:206 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_u_n_b_i_n_d │ │ │ │ │ +virtual void unbind() │ │ │ │ │ +Unbind data set from current grid entity - mostly here for performance and │ │ │ │ │ +symmetry reasons. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:201 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_b_i_n_d │ │ │ │ │ +virtual void bind(const Entity &e) │ │ │ │ │ +Bind data set to grid entity - must be called before evaluating (i.e. calling │ │ │ │ │ +write()) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +Type erasure implementation for C++ functions, i.e., functions that can be │ │ │ │ │ +evaluated in global coordi... │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +GlobalFunctionWrapper(F_ &&f) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_u_n_b_i_n_d │ │ │ │ │ +virtual void unbind() │ │ │ │ │ +Unbind data set from current grid entity - mostly here for performance and │ │ │ │ │ +symmetry reasons. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:250 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_F_u_n_c_t_i_o_n │ │ │ │ │ +typename std::decay< F >::type Function │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:237 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const │ │ │ │ │ +Evaluate data set at local position pos inside the current entity and write │ │ │ │ │ +result to w. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:255 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_b_i_n_d │ │ │ │ │ +virtual void bind(const Entity &e) │ │ │ │ │ +Bind data set to grid entity - must be called before evaluating (i.e. calling │ │ │ │ │ +write()) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:245 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +Type erasure implementation for legacy VTKFunctions. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:276 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_u_n_b_i_n_d │ │ │ │ │ +virtual void unbind() │ │ │ │ │ +Unbind data set from current grid entity - mostly here for performance and │ │ │ │ │ +symmetry reasons. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ +VTKFunctionWrapper(const std::shared_ptr< const VTKFunction > &f) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:277 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const │ │ │ │ │ +Evaluate data set at local position pos inside the current entity and write │ │ │ │ │ +result to w. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_:_:_b_i_n_d │ │ │ │ │ +virtual void bind(const Entity &e) │ │ │ │ │ +Bind data set to grid entity - must be called before evaluating (i.e. calling │ │ │ │ │ +write()) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:282 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over the grids elements. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:385 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_e_l_l_I_t_e_r_a_t_o_r_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +CellIterator(const GridCellIterator &x) │ │ │ │ │ +construct a CellIterator from the gridview's Iterator. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:388 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_e_l_l_I_t_e_r_a_t_o_r_:_:_p_o_s_i_t_i_o_n │ │ │ │ │ +const FieldVector< DT, n > position() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:391 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterate over the grid's vertices. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:424 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ │ +VertexIterator(const GridCellIterator &x, const GridCellIterator &end, const │ │ │ │ │ +VTK::DataMode &dm, const VertexMapper &vm) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:457 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_b_a_s_i_c_I_n_c_r_e_m_e_n_t │ │ │ │ │ +void basicIncrement() │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:440 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:468 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +EntityReference dereference() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:491 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const VertexIterator &cit) const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:485 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_p_o_s_i_t_i_o_n │ │ │ │ │ +FieldVector< DT, n > position() const │ │ │ │ │ +position of vertex inside the entity │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:501 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r_:_:_l_o_c_a_l_i_n_d_e_x │ │ │ │ │ +int localindex() const │ │ │ │ │ +index of vertex within the entity, in Dune-numbering │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:496 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterate over the elements' corners. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:539 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:566 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +CornerIterator(const GridCellIterator &x, const GridCellIterator &end, const │ │ │ │ │ +VTK::DataMode &dm, const VertexMapper &vm, const std::vector< int > &num) │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:558 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_i_d │ │ │ │ │ +int id() const │ │ │ │ │ +Process-local consecutive zero-starting vertex id. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:597 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +EntityReference dereference() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:588 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const CornerIterator &cit) const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:582 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ +unsigned nitems, Precision prec) │ │ │ │ │ +acquire a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void endCellData() │ │ │ │ │ +finish CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +void beginCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void endPointData() │ │ │ │ │ +finish PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ +void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +void endPoints() │ │ │ │ │ +finish section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +void endCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +void beginPoints() │ │ │ │ │ +start section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vertex.hh File Reference │ │ │ │ +dune-grid: boundaryiterators.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,57 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vertex.hh File Reference
│ │ │ │ +
boundaryiterators.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ + │ │ │ │ +

Functions for VTK output on the skeleton. │ │ │ │ +More...

│ │ │ │ +
#include <iterator>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <dune/common/iteratorfacades.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corneriterator.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::VertexBlock
class  Dune::VTK::BoundaryIterator< GV >
 iterate over the GridViews boundary intersections More...
 
class  Dune::VTK::IntersectionIndexSet< ElementIndexSet >
 
class  Dune::VTK::NonConformingBoundaryIteratorFactory< GV >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Functions for VTK output on the skeleton.

│ │ │ │ +
Author
Jö Fahlke
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,39 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vertex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +boundaryiterators.hh File Reference │ │ │ │ │ +_d_u_n_e_-_g_r_i_d » _I_/_O » _V_i_s_u_a_l_i_z_a_t_i_o_n_ _T_o_o_l_K_i_t_ _(_V_T_K_) │ │ │ │ │ +Functions for VTK output on the skeleton. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_ _G_V_ _> │ │ │ │ │ +  iterate over the GridViews boundary intersections _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t_<_ _E_l_e_m_e_n_t_I_n_d_e_x_S_e_t_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_ _G_V_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Functions for VTK output on the skeleton. │ │ │ │ │ + Author │ │ │ │ │ + Jö Fahlke │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vertex.hh Source File │ │ │ │ +dune-grid: boundaryiterators.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,93 +70,283 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vertex.hh
│ │ │ │ +
boundaryiterators.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_VERTEXBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_VERTEXBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 namespace dgf
│ │ │ │ -
17 {
│ │ │ │ -
18
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
20 : public BasicBlock
│ │ │ │ -
21 {
│ │ │ │ -
22 int dimvertex; // the dimension of the vertices (determined from DGF file)
│ │ │ │ -
23 int dimworld; // the dimension of the world (either dimvertex or given by user)
│ │ │ │ -
24 bool goodline; // active line describes a vertex
│ │ │ │ -
25 int vtxoffset;
│ │ │ │ -
26 int nofParam;
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
29 // initialize vertex block
│ │ │ │ -
30 VertexBlock ( std :: istream &in, int &pdimworld );
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <iterator>
│ │ │ │ +
10#include <memory>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/iteratorfacades.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
18namespace Dune {
│ │ │ │ +
19
│ │ │ │ +
22
│ │ │ │ +
28 namespace VTK {
│ │ │ │ +
29
│ │ │ │
31
│ │ │ │ -
32 int get ( std :: vector< std :: vector< double > > &vtx,
│ │ │ │ -
33 std :: vector< std :: vector< double > > &param,
│ │ │ │ -
34 int &nofp );
│ │ │ │ -
35
│ │ │ │ -
36 // some information
│ │ │ │ -
│ │ │ │ -
37 bool ok () const
│ │ │ │ -
38 {
│ │ │ │ -
39 return goodline;
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
42 int offset () const
│ │ │ │ -
43 {
│ │ │ │ -
44 return vtxoffset;
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
47 private:
│ │ │ │ -
48 // get dimworld
│ │ │ │ -
49 int getDimWorld ();
│ │ │ │ -
50
│ │ │ │ -
51 // get next vertex
│ │ │ │ -
52 bool next ( std :: vector< double > &point, std :: vector< double > &param );
│ │ │ │ -
53 };
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
55 } // end namespace dgf
│ │ │ │ -
56
│ │ │ │ -
57} // end namespace Dune
│ │ │ │ -
58
│ │ │ │ -
59#endif
│ │ │ │ - │ │ │ │ +
35 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 : public ForwardIteratorFacade
│ │ │ │ +
38 < BoundaryIterator<GV>,
│ │ │ │ +
39 const typename GV::Intersection,
│ │ │ │ +
40 const typename GV::Intersection&,
│ │ │ │ +
41 typename std::iterator_traits<typename GV::template Codim<0>::
│ │ │ │ +
42 Iterator>::difference_type>
│ │ │ │ +
43 {
│ │ │ │ +
44 public:
│ │ │ │ +
45 // reiterator the facades typedefs here
│ │ │ │ + │ │ │ │ +
47 typedef const typename GV::Intersection Value;
│ │ │ │ +
48 typedef Value& Reference;
│ │ │ │ +
49 typedef typename GV::template Codim<0>::Iterator ElementIterator;
│ │ │ │ +
50 typedef typename GV::IntersectionIterator IntersectionIterator;
│ │ │ │ +
51 typedef typename std::iterator_traits<ElementIterator>::difference_type
│ │ │ │ + │ │ │ │ +
53
│ │ │ │ +
54 private:
│ │ │ │ +
55 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
│ │ │ │ +
56 DifferenceType> Facade;
│ │ │ │ +
57
│ │ │ │ +
58 const GV* gv;
│ │ │ │ + │ │ │ │ +
60 std::shared_ptr<IntersectionIterator> iit;
│ │ │ │ +
61
│ │ │ │ +
62 bool valid() const {
│ │ │ │ +
63 // we're valid if we're passed-the-end
│ │ │ │ +
64 if(eit == gv->template end<0>()) return true;
│ │ │ │ +
65 // or if we're on a boundary
│ │ │ │ +
66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;
│ │ │ │ +
67 // otherwise we're invalid
│ │ │ │ +
68 return false;
│ │ │ │ +
69 }
│ │ │ │ +
70
│ │ │ │ +
71 void basic_increment() {
│ │ │ │ +
72 ++*iit;
│ │ │ │ +
73 if(*iit == gv->iend(*eit)) {
│ │ │ │ +
74 iit.reset();
│ │ │ │ +
75 ++eit;
│ │ │ │ +
76 if(eit != gv->template end<0>())
│ │ │ │ +
77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ │ +
78 }
│ │ │ │ +
79 }
│ │ │ │ +
80
│ │ │ │ +
81 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
83 return **iit;
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
85 bool equals(const DerivedType& other) const {
│ │ │ │ +
86 if(eit != other.eit) return false;
│ │ │ │ +
87
│ │ │ │ +
88 // this is a bit tricky, since we may not compare iit if we are
│ │ │ │ +
89 // passed-the-end
│ │ │ │ +
90 bool mePassedTheEnd = eit == gv->template end<0>();
│ │ │ │ +
91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();
│ │ │ │ +
92
│ │ │ │ +
93 // both passed-the-end => consider them equal
│ │ │ │ +
94 if(mePassedTheEnd && otherPassedTheEnd) return true;
│ │ │ │ +
95
│ │ │ │ +
96 // one passed the end => not equal
│ │ │ │ +
97 if(mePassedTheEnd || otherPassedTheEnd) return false;
│ │ │ │ +
98
│ │ │ │ +
99 // none passed-the-end => do their iit iterators match?
│ │ │ │ +
100 return *iit == *other.iit;
│ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
│ │ │ │ +
103 void increment() {
│ │ │ │ +
104 basic_increment();
│ │ │ │ +
105 while(!valid()) basic_increment();
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ +
113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,
│ │ │ │ +
114 const IntersectionIterator& iit_)
│ │ │ │ +
115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))
│ │ │ │ +
116 {
│ │ │ │ +
117 while(!valid()) basic_increment();
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
│ │ │ │ +
125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)
│ │ │ │ +
126 : gv(&gv_), eit(eit_)
│ │ │ │ +
127 {
│ │ │ │ +
128 if(eit != gv->template end<0>())
│ │ │ │ +
129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ │ +
130
│ │ │ │ +
131 while(!valid()) basic_increment();
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
│ │ │ │ +
138 BoundaryIterator(const GV& gv_, bool end = false)
│ │ │ │ +
139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())
│ │ │ │ +
140 {
│ │ │ │ +
141 if(eit != gv->template end<0>())
│ │ │ │ +
142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ │ +
143
│ │ │ │ +
144 while(!valid()) basic_increment();
│ │ │ │ +
145 }
│ │ │ │ +
│ │ │ │ +
146 };
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
148 template<typename ElementIndexSet>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
150 const ElementIndexSet& eis;
│ │ │ │ +
151
│ │ │ │ +
152 public:
│ │ │ │ +
│ │ │ │ +
153 IntersectionIndexSet(const ElementIndexSet& eis_)
│ │ │ │ +
154 : eis(eis_)
│ │ │ │ +
155 { }
│ │ │ │ +
│ │ │ │ +
156 };
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
158 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
160 const GV& gv;
│ │ │ │ +
161
│ │ │ │ +
162 public:
│ │ │ │ +
163 static const unsigned dimCell = GV::dimension-1;
│ │ │ │ +
164
│ │ │ │ +
165 typedef typename GV::Intersection Cell;
│ │ │ │ + │ │ │ │ +
167
│ │ │ │ + │ │ │ │ + │ │ │ │ +
170
│ │ │ │ +
171 typedef Corner Point;
│ │ │ │ + │ │ │ │ +
173
│ │ │ │ + │ │ │ │ +
175 typedef typename GV::Communication Communication;
│ │ │ │ +
176
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
178 : gv(gv_)
│ │ │ │ +
179 { }
│ │ │ │ +
│ │ │ │ +
180
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
182 return CellIterator(gv);
│ │ │ │ +
183 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
185 return CellIterator(gv, true);
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
190 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
192 return CornerIterator(endCells());
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ + │ │ │ │ +
196 PointIterator endPoints() const { return endCorners(); }
│ │ │ │ +
197
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
199 return ConnectivityWriter();
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
201 const Communication& comm() const {
│ │ │ │ +
202 return gv.comm();
│ │ │ │ +
203 }
│ │ │ │ +
│ │ │ │ +
204 };
│ │ │ │ +
│ │ │ │ +
205
│ │ │ │ +
206 } // namespace VTK
│ │ │ │ +
207
│ │ │ │ +
209
│ │ │ │ +
210} // namespace Dune
│ │ │ │ +
211
│ │ │ │ +
212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
Definition vertex.hh:21
│ │ │ │ -
int get(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< double > > &param, int &nofp)
Definition vertex.cc:63
│ │ │ │ -
int offset() const
Definition vertex.hh:42
│ │ │ │ -
bool ok() const
Definition vertex.hh:37
│ │ │ │ +
iterate over the GridViews boundary intersections
Definition boundaryiterators.hh:43
│ │ │ │ +
BoundaryIterator< GV > DerivedType
Definition boundaryiterators.hh:46
│ │ │ │ +
BoundaryIterator(const GV &gv_, const ElementIterator &eit_)
construct a BoundaryIterator
Definition boundaryiterators.hh:125
│ │ │ │ +
Reference dereference() const
Definition boundaryiterators.hh:82
│ │ │ │ +
const GV::Intersection Value
Definition boundaryiterators.hh:47
│ │ │ │ +
BoundaryIterator(const GV &gv_, bool end=false)
construct a BoundaryIterator
Definition boundaryiterators.hh:138
│ │ │ │ +
BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const IntersectionIterator &iit_)
construct a BoundaryIterator
Definition boundaryiterators.hh:113
│ │ │ │ +
GV::template Codim< 0 >::Iterator ElementIterator
Definition boundaryiterators.hh:49
│ │ │ │ +
Value & Reference
Definition boundaryiterators.hh:48
│ │ │ │ +
GV::IntersectionIterator IntersectionIterator
Definition boundaryiterators.hh:50
│ │ │ │ +
bool equals(const DerivedType &other) const
Definition boundaryiterators.hh:85
│ │ │ │ +
std::iterator_traits< ElementIterator >::difference_type DifferenceType
Definition boundaryiterators.hh:52
│ │ │ │ +
void increment()
Definition boundaryiterators.hh:103
│ │ │ │ +
Definition boundaryiterators.hh:149
│ │ │ │ +
IntersectionIndexSet(const ElementIndexSet &eis_)
Definition boundaryiterators.hh:153
│ │ │ │ +
Definition boundaryiterators.hh:159
│ │ │ │ +
PointIterator beginPoints() const
Definition boundaryiterators.hh:195
│ │ │ │ +
ConnectivityWriter makeConnectivity() const
Definition boundaryiterators.hh:198
│ │ │ │ +
GV::Communication Communication
Definition boundaryiterators.hh:175
│ │ │ │ +
static const unsigned dimCell
Definition boundaryiterators.hh:163
│ │ │ │ +
VTK::CornerIterator< CellIterator > CornerIterator
Definition boundaryiterators.hh:169
│ │ │ │ +
BoundaryIterator< GV > CellIterator
Definition boundaryiterators.hh:166
│ │ │ │ +
Corner Point
Definition boundaryiterators.hh:171
│ │ │ │ +
CornerIterator beginCorners() const
Definition boundaryiterators.hh:188
│ │ │ │ +
CellIterator beginCells() const
Definition boundaryiterators.hh:181
│ │ │ │ +
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition boundaryiterators.hh:174
│ │ │ │ +
CornerIterator endCorners() const
Definition boundaryiterators.hh:191
│ │ │ │ +
VTK::Corner< Cell > Corner
Definition boundaryiterators.hh:168
│ │ │ │ +
GV::Intersection Cell
Definition boundaryiterators.hh:165
│ │ │ │ +
CornerIterator PointIterator
Definition boundaryiterators.hh:172
│ │ │ │ +
NonConformingBoundaryIteratorFactory(const GV &gv_)
Definition boundaryiterators.hh:177
│ │ │ │ +
CellIterator endCells() const
Definition boundaryiterators.hh:184
│ │ │ │ +
const Communication & comm() const
Definition boundaryiterators.hh:201
│ │ │ │ +
PointIterator endPoints() const
Definition boundaryiterators.hh:196
│ │ │ │ +
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ +
iterate over the corners of some cell range
Definition corneriterator.hh:39
│ │ │ │ +
writer for the connectivity array in nonconforming mode
Definition functionwriter.hh:261
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,93 +2,320 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -vertex.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +boundaryiterators.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_VERTEXBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_VERTEXBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 namespace dgf │ │ │ │ │ -17 { │ │ │ │ │ -18 │ │ │ │ │ -_1_9 class _V_e_r_t_e_x_B_l_o_c_k │ │ │ │ │ -20 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -21 { │ │ │ │ │ -22 int dimvertex; // the dimension of the vertices (determined from DGF file) │ │ │ │ │ -23 int dimworld; // the dimension of the world (either dimvertex or given by │ │ │ │ │ -user) │ │ │ │ │ -24 bool goodline; // active line describes a vertex │ │ │ │ │ -25 int vtxoffset; │ │ │ │ │ -26 int nofParam; │ │ │ │ │ -27 │ │ │ │ │ -28 public: │ │ │ │ │ -29 // initialize vertex block │ │ │ │ │ -30 _V_e_r_t_e_x_B_l_o_c_k ( std :: istream &in, int &pdimworld ); │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e { │ │ │ │ │ +19 │ │ │ │ │ +22 │ │ │ │ │ +28 namespace VTK { │ │ │ │ │ +29 │ │ │ │ │ 31 │ │ │ │ │ -32 int _g_e_t ( std :: vector< std :: vector< double > > &vtx, │ │ │ │ │ -33 std :: vector< std :: vector< double > > ¶m, │ │ │ │ │ -34 int &nofp ); │ │ │ │ │ -35 │ │ │ │ │ -36 // some information │ │ │ │ │ -_3_7 bool _o_k () const │ │ │ │ │ -38 { │ │ │ │ │ -39 return goodline; │ │ │ │ │ -40 } │ │ │ │ │ -41 │ │ │ │ │ -_4_2 int _o_f_f_s_e_t () const │ │ │ │ │ +35 template │ │ │ │ │ +_3_6 class _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ +37 : public ForwardIteratorFacade │ │ │ │ │ +38 < BoundaryIterator, │ │ │ │ │ +39 const typename GV::Intersection, │ │ │ │ │ +40 const typename GV::Intersection&, │ │ │ │ │ +41 typename std::iterator_traits:: │ │ │ │ │ +42 Iterator>::difference_type> │ │ │ │ │ 43 { │ │ │ │ │ -44 return vtxoffset; │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -47 private: │ │ │ │ │ -48 // get dimworld │ │ │ │ │ -49 int getDimWorld (); │ │ │ │ │ -50 │ │ │ │ │ -51 // get next vertex │ │ │ │ │ -52 bool next ( std :: vector< double > &point, std :: vector< double > ¶m │ │ │ │ │ -); │ │ │ │ │ -53 }; │ │ │ │ │ -54 │ │ │ │ │ -55 } // end namespace dgf │ │ │ │ │ -56 │ │ │ │ │ -57} // end namespace Dune │ │ │ │ │ -58 │ │ │ │ │ -59#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +44 public: │ │ │ │ │ +45 // reiterator the facades typedefs here │ │ │ │ │ +_4_6 typedef _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_G_V_> _D_e_r_i_v_e_d_T_y_p_e; │ │ │ │ │ +_4_7 typedef const typename GV::Intersection _V_a_l_u_e; │ │ │ │ │ +_4_8 typedef _V_a_l_u_e& _R_e_f_e_r_e_n_c_e; │ │ │ │ │ +_4_9 typedef typename GV::template Codim<0>::Iterator _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ │ +_5_0 typedef typename GV::IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +51 typedef typename std::iterator_traits::difference_type │ │ │ │ │ +_5_2 _D_i_f_f_e_r_e_n_c_e_T_y_p_e; │ │ │ │ │ +53 │ │ │ │ │ +54 private: │ │ │ │ │ +55 typedef ForwardIteratorFacade<_D_e_r_i_v_e_d_T_y_p_e, _V_a_l_u_e, _R_e_f_e_r_e_n_c_e, │ │ │ │ │ +56 _D_i_f_f_e_r_e_n_c_e_T_y_p_e> Facade; │ │ │ │ │ +57 │ │ │ │ │ +58 const GV* gv; │ │ │ │ │ +59 _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r eit; │ │ │ │ │ +60 std::shared_ptr iit; │ │ │ │ │ +61 │ │ │ │ │ +62 bool valid() const { │ │ │ │ │ +63 // we're valid if we're passed-the-end │ │ │ │ │ +64 if(eit == gv->template end<0>()) return true; │ │ │ │ │ +65 // or if we're on a boundary │ │ │ │ │ +66 if((*iit)->boundary() && !(*iit)->neighbor()) return true; │ │ │ │ │ +67 // otherwise we're invalid │ │ │ │ │ +68 return false; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +71 void basic_increment() { │ │ │ │ │ +72 ++*iit; │ │ │ │ │ +73 if(*iit == gv->iend(*eit)) { │ │ │ │ │ +74 iit.reset(); │ │ │ │ │ +75 ++eit; │ │ │ │ │ +76 if(eit != gv->template end<0>()) │ │ │ │ │ +77 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ │ +78 } │ │ │ │ │ +79 } │ │ │ │ │ +80 │ │ │ │ │ +81 public: │ │ │ │ │ +_8_2 _R_e_f_e_r_e_n_c_e _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +83 return **iit; │ │ │ │ │ +84 } │ │ │ │ │ +_8_5 bool _e_q_u_a_l_s(const _D_e_r_i_v_e_d_T_y_p_e& other) const { │ │ │ │ │ +86 if(eit != other.eit) return false; │ │ │ │ │ +87 │ │ │ │ │ +88 // this is a bit tricky, since we may not compare iit if we are │ │ │ │ │ +89 // passed-the-end │ │ │ │ │ +90 bool mePassedTheEnd = eit == gv->template end<0>(); │ │ │ │ │ +91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>(); │ │ │ │ │ +92 │ │ │ │ │ +93 // both passed-the-end => consider them equal │ │ │ │ │ +94 if(mePassedTheEnd && otherPassedTheEnd) return true; │ │ │ │ │ +95 │ │ │ │ │ +96 // one passed the end => not equal │ │ │ │ │ +97 if(mePassedTheEnd || otherPassedTheEnd) return false; │ │ │ │ │ +98 │ │ │ │ │ +99 // none passed-the-end => do their iit iterators match? │ │ │ │ │ +100 return *iit == *other.iit; │ │ │ │ │ +101 } │ │ │ │ │ +102 │ │ │ │ │ +_1_0_3 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +104 basic_increment(); │ │ │ │ │ +105 while(!valid()) basic_increment(); │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +109 │ │ │ │ │ +_1_1_3 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, const _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r& eit_, │ │ │ │ │ +114 const _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& iit_) │ │ │ │ │ +115 : gv(&gv_), eit(eit_), iit(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(iit_)) │ │ │ │ │ +116 { │ │ │ │ │ +117 while(!valid()) basic_increment(); │ │ │ │ │ +118 } │ │ │ │ │ +120 │ │ │ │ │ +_1_2_5 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, const _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r& eit_) │ │ │ │ │ +126 : gv(&gv_), eit(eit_) │ │ │ │ │ +127 { │ │ │ │ │ +128 if(eit != gv->template end<0>()) │ │ │ │ │ +129 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ │ +130 │ │ │ │ │ +131 while(!valid()) basic_increment(); │ │ │ │ │ +132 } │ │ │ │ │ +134 │ │ │ │ │ +_1_3_8 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, bool end = false) │ │ │ │ │ +139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>()) │ │ │ │ │ +140 { │ │ │ │ │ +141 if(eit != gv->template end<0>()) │ │ │ │ │ +142 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ │ +143 │ │ │ │ │ +144 while(!valid()) basic_increment(); │ │ │ │ │ +145 } │ │ │ │ │ +146 }; │ │ │ │ │ +147 │ │ │ │ │ +148 template │ │ │ │ │ +_1_4_9 class _I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t { │ │ │ │ │ +150 const ElementIndexSet& eis; │ │ │ │ │ +151 │ │ │ │ │ +152 public: │ │ │ │ │ +_1_5_3 _I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t(const ElementIndexSet& eis_) │ │ │ │ │ +154 : eis(eis_) │ │ │ │ │ +155 { } │ │ │ │ │ +156 }; │ │ │ │ │ +157 │ │ │ │ │ +158 template │ │ │ │ │ +_1_5_9 class _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y { │ │ │ │ │ +160 const GV& gv; │ │ │ │ │ +161 │ │ │ │ │ +162 public: │ │ │ │ │ +_1_6_3 static const unsigned _d_i_m_C_e_l_l = GV::dimension-1; │ │ │ │ │ +164 │ │ │ │ │ +_1_6_5 typedef typename GV::Intersection _C_e_l_l; │ │ │ │ │ +_1_6_6 typedef _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_G_V_> _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +167 │ │ │ │ │ +_1_6_8 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ │ +_1_6_9 typedef _V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_> _C_o_r_n_e_r_I_t_e_r_a_t_o_r; │ │ │ │ │ +170 │ │ │ │ │ +_1_7_1 typedef _C_o_r_n_e_r _P_o_i_n_t; │ │ │ │ │ +_1_7_2 typedef _C_o_r_n_e_r_I_t_e_r_a_t_o_r _P_o_i_n_t_I_t_e_r_a_t_o_r; │ │ │ │ │ +173 │ │ │ │ │ +_1_7_4 typedef _N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_C_e_l_l_> _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r; │ │ │ │ │ +_1_7_5 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +176 │ │ │ │ │ +_1_7_7 explicit _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y(const GV& gv_) │ │ │ │ │ +178 : gv(gv_) │ │ │ │ │ +179 { } │ │ │ │ │ +180 │ │ │ │ │ +_1_8_1 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ │ +182 return _C_e_l_l_I_t_e_r_a_t_o_r(gv); │ │ │ │ │ +183 } │ │ │ │ │ +_1_8_4 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ │ +185 return _C_e_l_l_I_t_e_r_a_t_o_r(gv, true); │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +_1_8_8 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _b_e_g_i_n_C_o_r_n_e_r_s() const { │ │ │ │ │ +189 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_b_e_g_i_n_C_e_l_l_s(), _e_n_d_C_e_l_l_s()); │ │ │ │ │ +190 } │ │ │ │ │ +_1_9_1 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _e_n_d_C_o_r_n_e_r_s() const { │ │ │ │ │ +192 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ +193 } │ │ │ │ │ +194 │ │ │ │ │ +_1_9_5 _P_o_i_n_t_I_t_e_r_a_t_o_r _b_e_g_i_n_P_o_i_n_t_s() const { return _b_e_g_i_n_C_o_r_n_e_r_s(); } │ │ │ │ │ +_1_9_6 _P_o_i_n_t_I_t_e_r_a_t_o_r _e_n_d_P_o_i_n_t_s() const { return _e_n_d_C_o_r_n_e_r_s(); } │ │ │ │ │ +197 │ │ │ │ │ +_1_9_8 _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r _m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y() const { │ │ │ │ │ +199 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(); │ │ │ │ │ +200 } │ │ │ │ │ +_2_0_1 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ │ +202 return gv.comm(); │ │ │ │ │ +203 } │ │ │ │ │ +204 }; │ │ │ │ │ +205 │ │ │ │ │ +206 } // namespace VTK │ │ │ │ │ +207 │ │ │ │ │ +209 │ │ │ │ │ +210} // namespace Dune │ │ │ │ │ +211 │ │ │ │ │ +212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ +_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ +_c_o_r_n_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn vertex.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std ::vector< std ::vector< double > > &vtx, std ::vector< std :: │ │ │ │ │ -vector< double > > ¶m, int &nofp) │ │ │ │ │ -DDeeffiinniittiioonn vertex.cc:63 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k_:_:_o_f_f_s_e_t │ │ │ │ │ -int offset() const │ │ │ │ │ -DDeeffiinniittiioonn vertex.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() const │ │ │ │ │ -DDeeffiinniittiioonn vertex.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ +iterate over the GridViews boundary intersections │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_e_d_T_y_p_e │ │ │ │ │ +BoundaryIterator< GV > DerivedType │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ +BoundaryIterator(const GV &gv_, const ElementIterator &eit_) │ │ │ │ │ +construct a BoundaryIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Reference dereference() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ +const GV::Intersection Value │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ +BoundaryIterator(const GV &gv_, bool end=false) │ │ │ │ │ +construct a BoundaryIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ +BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const │ │ │ │ │ +IntersectionIterator &iit_) │ │ │ │ │ +construct a BoundaryIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +GV::template Codim< 0 >::Iterator ElementIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_R_e_f_e_r_e_n_c_e │ │ │ │ │ +Value & Reference │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +GV::IntersectionIterator IntersectionIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const DerivedType &other) const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_D_i_f_f_e_r_e_n_c_e_T_y_p_e │ │ │ │ │ +std::iterator_traits< ElementIterator >::difference_type DifferenceType │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t │ │ │ │ │ +IntersectionIndexSet(const ElementIndexSet &eis_) │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +PointIterator beginPoints() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y │ │ │ │ │ +ConnectivityWriter makeConnectivity() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:198 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +GV::Communication Communication │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:175 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_d_i_m_C_e_l_l │ │ │ │ │ +static const unsigned dimCell │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +VTK::CornerIterator< CellIterator > CornerIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:169 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +BoundaryIterator< GV > CellIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_P_o_i_n_t │ │ │ │ │ +Corner Point │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_C_o_r_n_e_r_s │ │ │ │ │ +CornerIterator beginCorners() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:188 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +CellIterator beginCells() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:181 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +NonConformingConnectivityWriter< Cell > ConnectivityWriter │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_e_n_d_C_o_r_n_e_r_s │ │ │ │ │ +CornerIterator endCorners() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_r_n_e_r │ │ │ │ │ +VTK::Corner< Cell > Corner │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l │ │ │ │ │ +GV::Intersection Cell │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +CornerIterator PointIterator │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:172 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ +NonConformingBoundaryIteratorFactory(const GV &gv_) │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +CellIterator endCells() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:184 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:201 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +PointIterator endPoints() const │ │ │ │ │ +DDeeffiinniittiioonn boundaryiterators.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ +simple class representing a corner of a cell │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +iterate over the corners of some cell range │ │ │ │ │ +DDeeffiinniittiioonn corneriterator.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +writer for the connectivity array in nonconforming mode │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:261 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplexgeneration.hh File Reference │ │ │ │ +dune-grid: dataarraywriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,78 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplexgeneration.hh File Reference
│ │ │ │ +
dataarraywriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ + │ │ │ │ +

Data array writers for the VTKWriter. │ │ │ │ +More...

│ │ │ │ +
#include <cstdint>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <cmath>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/indent.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/streams.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::SimplexGenerationBlock
class  Dune::VTK::DataArrayWriter
 base class for data array writers More...
 
class  Dune::VTK::AsciiDataArrayWriter
 a streaming writer for data array tags, uses ASCII inline format More...
 
class  Dune::VTK::BinaryDataArrayWriter
 a streaming writer for data array tags, uses binary inline format More...
 
class  Dune::VTK::AppendedRawDataArrayWriter
 a streaming writer for data array tags, uses appended raw format More...
 
class  Dune::VTK::AppendedBase64DataArrayWriter
 a streaming writer for data array tags, uses appended base64 format More...
 
class  Dune::VTK::NakedBase64DataArrayWriter
 a streaming writer for appended data array tags, uses base64 format More...
 
class  Dune::VTK::NakedRawDataArrayWriter
 a streaming writer for appended data arrays, uses raw format More...
 
class  Dune::VTK::DataArrayWriterFactory
 a factory for DataArrayWriters More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Data array writers for the VTKWriter.

│ │ │ │ +
Author
Peter Bastian, Christian Engwer
│ │ │ │ +

This file contains classes to help writing data in the difeerent VTK output modes

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +2,65 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -simplexgeneration.hh File Reference │ │ │ │ │ +dataarraywriter.hh File Reference │ │ │ │ │ +Data array writers for the VTKWriter. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  base class for data array writers _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  a streaming writer for data array tags, uses ASCII inline format │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  a streaming writer for data array tags, uses binary inline format │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  a streaming writer for data array tags, uses appended raw format │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  a streaming writer for data array tags, uses appended base64 format │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  a streaming writer for appended data array tags, uses base64 format │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +  a streaming writer for appended data arrays, uses raw format _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ +  a factory for DataArrayWriters _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Data array writers for the VTKWriter. │ │ │ │ │ + Author │ │ │ │ │ + Peter Bastian, Christian Engwer │ │ │ │ │ +This file contains classes to help writing data in the difeerent VTK output │ │ │ │ │ +modes │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplexgeneration.hh Source File │ │ │ │ +dune-grid: dataarraywriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,156 +70,526 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
simplexgeneration.hh
│ │ │ │ +
dataarraywriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 namespace dgf
│ │ │ │ -
16 {
│ │ │ │ -
17
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 : public BasicBlock
│ │ │ │ -
20 {
│ │ │ │ -
21 double area_;
│ │ │ │ -
22 double angle_;
│ │ │ │ -
23 bool display_;
│ │ │ │ -
24 std::string path_;
│ │ │ │ -
25 bool haspath_;
│ │ │ │ -
26 std::string filename_;
│ │ │ │ -
27 std::string filetype_;
│ │ │ │ -
28 std::string parameter_;
│ │ │ │ -
29 std::string dumpfilename_;
│ │ │ │ -
30 bool hasfile_;
│ │ │ │ -
31 int dimension_;
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ -
34 SimplexGenerationBlock ( std :: istream &in );
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ -
36 double maxArea ()
│ │ │ │ -
37 {
│ │ │ │ -
38 return area_;
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
41 double minAngle ()
│ │ │ │ -
42 {
│ │ │ │ -
43 return angle_;
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
46 bool display ()
│ │ │ │ -
47 {
│ │ │ │ -
48 return display_;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 bool haspath ()
│ │ │ │ -
52 {
│ │ │ │ -
53 return haspath_;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
56 std :: string path ()
│ │ │ │ -
57 {
│ │ │ │ -
58 return path_;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
61 bool hasfile ()
│ │ │ │ -
62 {
│ │ │ │ -
63 return hasfile_;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
66 std :: string filename ()
│ │ │ │ -
67 {
│ │ │ │ -
68 return filename_;
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ -
71 std :: string filetype ()
│ │ │ │ -
72 {
│ │ │ │ -
73 return filetype_;
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
│ │ │ │ -
76 int dimension ()
│ │ │ │ -
77 {
│ │ │ │ -
78 return dimension_;
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
│ │ │ │ -
81 std :: string parameter ()
│ │ │ │ -
82 {
│ │ │ │ -
83 return parameter_;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
│ │ │ │ -
86 const std::string dumpFileName ( ) const
│ │ │ │ -
87 {
│ │ │ │ -
88 return dumpfilename_;
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90 };
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92 } // end namespace dgf
│ │ │ │ -
93
│ │ │ │ -
94} // end namespace Dune
│ │ │ │ -
95
│ │ │ │ -
96#endif
│ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstdint>
│ │ │ │ +
10#include <iostream>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <iomanip>
│ │ │ │ +
13#include <cstdint>
│ │ │ │ +
14#include <cmath>
│ │ │ │ +
15
│ │ │ │ +
16#include <dune/common/exceptions.hh>
│ │ │ │ +
17#include <dune/common/indent.hh>
│ │ │ │ +
18
│ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
30namespace Dune
│ │ │ │ +
31{
│ │ │ │ +
34
│ │ │ │ +
35 namespace VTK {
│ │ │ │ +
36
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 public:
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 : prec(_prec)
│ │ │ │ +
65 {}
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
68 template<class T>
│ │ │ │ +
│ │ │ │ +
69 void write(T data)
│ │ │ │ +
70 {
│ │ │ │ +
71 switch(prec)
│ │ │ │ +
72 {
│ │ │ │ + │ │ │ │ +
74 writeFloat32(data); break;
│ │ │ │ + │ │ │ │ +
76 writeFloat64(data); break;
│ │ │ │ + │ │ │ │ +
78 writeUInt32(data); break;
│ │ │ │ + │ │ │ │ +
80 writeUInt8(data); break;
│ │ │ │ + │ │ │ │ +
82 writeInt32(data); break;
│ │ │ │ +
83 default:
│ │ │ │ +
84 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
│ │ │ │ +
85 }
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
89 virtual bool writeIsNoop() const { return false; }
│ │ │ │ +
91 virtual ~DataArrayWriter () {}
│ │ │ │ +
92
│ │ │ │ +
93 private:
│ │ │ │ +
95 virtual void writeFloat32 (float data) = 0;
│ │ │ │ +
97 virtual void writeFloat64 (double data) = 0;
│ │ │ │ +
99 virtual void writeInt32 (std::int32_t data) = 0;
│ │ │ │ +
101 virtual void writeUInt8 (std::uint8_t data) = 0;
│ │ │ │ +
103 virtual void writeUInt32 (std::uint32_t data) = 0;
│ │ │ │ +
104
│ │ │ │ +
105 Precision prec;
│ │ │ │ +
106 };
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
110 {
│ │ │ │ +
111 public:
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
121 AsciiDataArrayWriter(std::ostream& theStream, std::string name,
│ │ │ │ +
122 int ncomps, const Indent& indent_, Precision prec_)
│ │ │ │ +
123 : DataArrayWriter(prec_), s(theStream), counter(0), numPerLine(12), indent(indent_)
│ │ │ │ +
124 {
│ │ │ │ +
125 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ +
126 << "Name=\"" << name << "\" ";
│ │ │ │ +
127 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ +
128 s << "format=\"ascii\">\n";
│ │ │ │ +
129 ++indent;
│ │ │ │ +
130 }
│ │ │ │ +
│ │ │ │ +
131
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
134 {
│ │ │ │ +
135 if (counter%numPerLine!=0) s << "\n";
│ │ │ │ +
136 --indent;
│ │ │ │ +
137 s << indent << "</DataArray>\n";
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
140 private:
│ │ │ │ +
142 void writeFloat64 (double data) final
│ │ │ │ +
143 { write_float(data); }
│ │ │ │ +
145 void writeFloat32 (float data) final
│ │ │ │ +
146 { write_float(data); }
│ │ │ │ +
148 void writeInt32 (std::int32_t data) final
│ │ │ │ +
149 { write_(data); }
│ │ │ │ +
151 void writeUInt32 (std::uint32_t data) final
│ │ │ │ +
152 { write_(data); }
│ │ │ │ +
154 void writeUInt8 (std::uint8_t data) final
│ │ │ │ +
155 { write_(data); }
│ │ │ │ +
156
│ │ │ │ +
157 template<class T>
│ │ │ │ +
158 void write_(T data)
│ │ │ │ +
159 {
│ │ │ │ +
160 typedef typename PrintType<T>::Type PT;
│ │ │ │ +
161 if(counter%numPerLine==0) s << indent;
│ │ │ │ +
162 else s << " ";
│ │ │ │ +
163 const auto original_precision = std::cout.precision();
│ │ │ │ +
164 s << std::setprecision(std::numeric_limits<PT>::digits10) << (PT) data;
│ │ │ │ +
165 std::cout.precision(original_precision);
│ │ │ │ +
166 counter++;
│ │ │ │ +
167 if (counter%numPerLine==0) s << "\n";
│ │ │ │ +
168 }
│ │ │ │ +
169
│ │ │ │ +
170 template<class T>
│ │ │ │ +
171 void write_float(T data)
│ │ │ │ +
172 {
│ │ │ │ +
173 typedef typename PrintType<T>::Type PT;
│ │ │ │ +
174 if(counter%numPerLine==0) s << indent;
│ │ │ │ +
175 else s << " ";
│ │ │ │ +
176 PT out_data = (PT) data;
│ │ │ │ +
177 if (std::fpclassify(out_data) == FP_SUBNORMAL)
│ │ │ │ +
178 {
│ │ │ │ +
179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS
│ │ │ │ +
180 out_data = 0;
│ │ │ │ +
181 }
│ │ │ │ +
182 const auto original_precision = std::cout.precision();
│ │ │ │ +
183 s << std::setprecision(std::numeric_limits<PT>::digits10) << out_data;
│ │ │ │ +
184 std::cout.precision(original_precision);
│ │ │ │ +
185 counter++;
│ │ │ │ +
186 if (counter%numPerLine==0) s << "\n";
│ │ │ │ +
187 }
│ │ │ │ +
188
│ │ │ │ +
189 std::ostream& s;
│ │ │ │ +
190 int counter;
│ │ │ │ +
191 int numPerLine;
│ │ │ │ +
192 Indent indent;
│ │ │ │ +
193 };
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
197 {
│ │ │ │ +
198 public:
│ │ │ │ +
200
│ │ │ │ +
│ │ │ │ +
210 BinaryDataArrayWriter(std::ostream& theStream, std::string name,
│ │ │ │ +
211 int ncomps, int nitems, const Indent& indent_, Precision prec_)
│ │ │ │ +
212 : DataArrayWriter(prec_), s(theStream), b64(theStream), indent(indent_)
│ │ │ │ +
213 {
│ │ │ │ +
214 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ +
215 << "Name=\"" << name << "\" ";
│ │ │ │ +
216 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ +
217 s << "format=\"binary\">\n";
│ │ │ │ +
218
│ │ │ │ +
219 // write indentation for the data chunk
│ │ │ │ +
220 s << indent+1;
│ │ │ │ +
221 // store size, needs to be exactly 32 bit
│ │ │ │ +
222 std::uint32_t size = ncomps*nitems*typeSize(prec_);
│ │ │ │ +
223 b64.write(size);
│ │ │ │ +
224 b64.flush();
│ │ │ │ +
225 }
│ │ │ │ +
│ │ │ │ +
226
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
229 {
│ │ │ │ +
230 b64.flush();
│ │ │ │ +
231 // append newline to written data
│ │ │ │ +
232 s << "\n";
│ │ │ │ +
233 s << indent << "</DataArray>\n";
│ │ │ │ +
234 s.flush();
│ │ │ │ +
235 }
│ │ │ │ +
│ │ │ │ +
236
│ │ │ │ +
237 private:
│ │ │ │ +
239 void writeFloat64 (double data) final
│ │ │ │ +
240 { write_(data); }
│ │ │ │ +
242 void writeFloat32 (float data) final
│ │ │ │ +
243 { write_(data); }
│ │ │ │ +
245 void writeInt32 (std::int32_t data) final
│ │ │ │ +
246 { write_(data); }
│ │ │ │ +
248 void writeUInt32 (std::uint32_t data) final
│ │ │ │ +
249 { write_(data); }
│ │ │ │ +
251 void writeUInt8 (std::uint8_t data) final
│ │ │ │ +
252 { write_(data); }
│ │ │ │ +
253
│ │ │ │ +
255 template<class T>
│ │ │ │ +
256 void write_(T data)
│ │ │ │ +
257 {
│ │ │ │ +
258 b64.write(data);
│ │ │ │ +
259 }
│ │ │ │ +
260
│ │ │ │ +
261 std::ostream& s;
│ │ │ │ +
262 Base64Stream b64;
│ │ │ │ +
263 const Indent& indent;
│ │ │ │ +
264 };
│ │ │ │ +
│ │ │ │ +
265
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
268 {
│ │ │ │ +
269 public:
│ │ │ │ +
271
│ │ │ │ +
│ │ │ │ +
283 AppendedRawDataArrayWriter(std::ostream& s, std::string name,
│ │ │ │ +
284 int ncomps, unsigned nitems, unsigned& offset,
│ │ │ │ +
285 const Indent& indent, Precision prec_)
│ │ │ │ +
286 : DataArrayWriter(prec_)
│ │ │ │ +
287 {
│ │ │ │ +
288 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ +
289 << "Name=\"" << name << "\" ";
│ │ │ │ +
290 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ +
291 s << "format=\"appended\" offset=\""<< offset << "\" />\n";
│ │ │ │ +
292 offset += 4; // header
│ │ │ │ +
293 offset += ncomps*nitems*typeSize(prec_);
│ │ │ │ +
294 }
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
297 bool writeIsNoop() const { return true; }
│ │ │ │ +
298
│ │ │ │ +
299 private:
│ │ │ │ +
301 void writeFloat64 (double) final {}
│ │ │ │ +
302 void writeFloat32 (float) final {}
│ │ │ │ +
303 void writeInt32 (std::int32_t) final {}
│ │ │ │ +
304 void writeUInt32 (std::uint32_t) final {}
│ │ │ │ +
305 void writeUInt8 (std::uint8_t) final {}
│ │ │ │ +
306 };
│ │ │ │ +
│ │ │ │ +
307
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
310 {
│ │ │ │ +
311 public:
│ │ │ │ +
313
│ │ │ │ +
│ │ │ │ +
325 AppendedBase64DataArrayWriter(std::ostream& s, std::string name,
│ │ │ │ +
326 int ncomps, unsigned nitems,
│ │ │ │ +
327 unsigned& offset, const Indent& indent, Precision prec_)
│ │ │ │ +
328 : DataArrayWriter(prec_)
│ │ │ │ +
329 {
│ │ │ │ +
330 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ +
331 << "Name=\"" << name << "\" ";
│ │ │ │ +
332 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ +
333 s << "format=\"appended\" offset=\""<< offset << "\" />\n";
│ │ │ │ +
334 offset += 8; // header
│ │ │ │ +
335 std::size_t bytes = ncomps*nitems*typeSize(prec_);
│ │ │ │ +
336 offset += bytes/3*4;
│ │ │ │ +
337 if(bytes%3 != 0)
│ │ │ │ +
338 offset += 4;
│ │ │ │ +
339 }
│ │ │ │ +
│ │ │ │ +
340
│ │ │ │ +
342 bool writeIsNoop() const { return true; }
│ │ │ │ +
343
│ │ │ │ +
344 private:
│ │ │ │ +
346 void writeFloat64 (double) final {}
│ │ │ │ +
347 void writeFloat32 (float) final {}
│ │ │ │ +
348 void writeInt32 (std::int32_t) final {}
│ │ │ │ +
349 void writeUInt32 (std::uint32_t) final {}
│ │ │ │ +
350 void writeUInt8 (std::uint8_t) final {}
│ │ │ │ +
351 };
│ │ │ │ +
│ │ │ │ +
352
│ │ │ │ +
354 //
│ │ │ │ +
355 // Naked ArrayWriters for the appended section
│ │ │ │ +
356 //
│ │ │ │ +
357
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
360 {
│ │ │ │ +
361 public:
│ │ │ │ +
363
│ │ │ │ +
│ │ │ │ +
369 NakedBase64DataArrayWriter(std::ostream& theStream, int ncomps,
│ │ │ │ +
370 int nitems, Precision prec_)
│ │ │ │ +
371 : DataArrayWriter(prec_), b64(theStream)
│ │ │ │ +
372 {
│ │ │ │ +
373 // store size
│ │ │ │ +
374 std::uint32_t size = ncomps*nitems*typeSize(prec_);
│ │ │ │ +
375 b64.write(size);
│ │ │ │ +
376 b64.flush();
│ │ │ │ +
377 }
│ │ │ │ +
│ │ │ │ +
378
│ │ │ │ +
379 private:
│ │ │ │ +
381 void writeFloat64 (double data) final
│ │ │ │ +
382 { write_(data); }
│ │ │ │ +
384 void writeFloat32 (float data) final
│ │ │ │ +
385 { write_(data); }
│ │ │ │ +
387 void writeInt32 (std::int32_t data) final
│ │ │ │ +
388 { write_(data); }
│ │ │ │ +
390 void writeUInt32 (std::uint32_t data) final
│ │ │ │ +
391 { write_(data); }
│ │ │ │ +
393 void writeUInt8 (std::uint8_t data) final
│ │ │ │ +
394 { write_(data); }
│ │ │ │ +
395
│ │ │ │ +
397 template<class T>
│ │ │ │ +
398 void write_(T data)
│ │ │ │ +
399 {
│ │ │ │ +
400 b64.write(data);
│ │ │ │ +
401 }
│ │ │ │ +
402
│ │ │ │ +
403 Base64Stream b64;
│ │ │ │ +
404 };
│ │ │ │ +
│ │ │ │ +
405
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
408 {
│ │ │ │ +
409 RawStream s;
│ │ │ │ +
410
│ │ │ │ +
411 public:
│ │ │ │ +
413
│ │ │ │ +
│ │ │ │ +
419 NakedRawDataArrayWriter(std::ostream& theStream, int ncomps,
│ │ │ │ +
420 int nitems, Precision prec_)
│ │ │ │ +
421 : DataArrayWriter(prec_), s(theStream)
│ │ │ │ +
422 {
│ │ │ │ +
423 s.write((unsigned int)(ncomps*nitems*typeSize(prec_)));
│ │ │ │ +
424 }
│ │ │ │ +
│ │ │ │ +
425
│ │ │ │ +
426 private:
│ │ │ │ +
428 void writeFloat64 (double data) final
│ │ │ │ +
429 { write_(data); }
│ │ │ │ +
431 void writeFloat32 (float data) final
│ │ │ │ +
432 { write_(data); }
│ │ │ │ +
434 void writeInt32 (std::int32_t data) final
│ │ │ │ +
435 { write_(data); }
│ │ │ │ +
437 void writeUInt32 (std::uint32_t data) final
│ │ │ │ +
438 { write_(data); }
│ │ │ │ +
440 void writeUInt8 (std::uint8_t data) final
│ │ │ │ +
441 { write_(data); }
│ │ │ │ +
442
│ │ │ │ +
444 template<class T>
│ │ │ │ +
445 void write_(T data)
│ │ │ │ +
446 {
│ │ │ │ +
447 s.write(data);
│ │ │ │ +
448 }
│ │ │ │ +
449 };
│ │ │ │ +
│ │ │ │ +
450
│ │ │ │ +
452 //
│ │ │ │ +
453 // Factory
│ │ │ │ +
454 //
│ │ │ │ +
455
│ │ │ │ +
457
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
463 enum Phase { main, appended };
│ │ │ │ +
464
│ │ │ │ +
465 OutputType type;
│ │ │ │ +
466 std::ostream& stream;
│ │ │ │ +
467 unsigned offset;
│ │ │ │ +
469 Phase phase;
│ │ │ │ +
470
│ │ │ │ +
471 public:
│ │ │ │ +
473
│ │ │ │ +
│ │ │ │ +
482 inline DataArrayWriterFactory(OutputType type_, std::ostream& stream_)
│ │ │ │ +
483 : type(type_), stream(stream_), offset(0), phase(main)
│ │ │ │ +
484 { }
│ │ │ │ +
│ │ │ │ +
485
│ │ │ │ +
487
│ │ │ │ +
│ │ │ │ +
497 inline bool beginAppended() {
│ │ │ │ +
498 phase = appended;
│ │ │ │ +
499 switch(type) {
│ │ │ │ +
500 case ascii : return false;
│ │ │ │ +
501 case base64 : return false;
│ │ │ │ +
502 case appendedraw : return true;
│ │ │ │ +
503 case appendedbase64 : return true;
│ │ │ │ +
504 }
│ │ │ │ +
505 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
│ │ │ │ +
506 "OutputType " << type);
│ │ │ │ +
507 }
│ │ │ │ +
│ │ │ │ +
508
│ │ │ │ +
│ │ │ │ +
510 const std::string& appendedEncoding() const {
│ │ │ │ +
511 static const std::string rawString = "raw";
│ │ │ │ +
512 static const std::string base64String = "base64";
│ │ │ │ +
513
│ │ │ │ +
514 switch(type) {
│ │ │ │ +
515 case ascii :
│ │ │ │ +
516 case base64 :
│ │ │ │ +
517 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): No "
│ │ │ │ +
518 "appended encoding for OutputType " << type);
│ │ │ │ +
519 case appendedraw : return rawString;
│ │ │ │ +
520 case appendedbase64 : return base64String;
│ │ │ │ +
521 }
│ │ │ │ +
522 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): "
│ │ │ │ +
523 "unsupported OutputType " << type);
│ │ │ │ +
524 }
│ │ │ │ +
│ │ │ │ +
525
│ │ │ │ +
527
│ │ │ │ +
│ │ │ │ +
541 DataArrayWriter* make(const std::string& name, unsigned ncomps,
│ │ │ │ +
542 unsigned nitems, const Indent& indent,
│ │ │ │ +
543 Precision prec)
│ │ │ │ +
544 {
│ │ │ │ +
545 switch(phase) {
│ │ │ │ +
546 case main :
│ │ │ │ +
547 switch(type) {
│ │ │ │ +
548 case ascii :
│ │ │ │ +
549 return new AsciiDataArrayWriter(stream, name, ncomps, indent, prec);
│ │ │ │ +
550 case base64 :
│ │ │ │ +
551 return new BinaryDataArrayWriter(stream, name, ncomps, nitems,
│ │ │ │ +
552 indent, prec);
│ │ │ │ +
553 case appendedraw :
│ │ │ │ +
554 return new AppendedRawDataArrayWriter(stream, name, ncomps,
│ │ │ │ +
555 nitems, offset, indent, prec);
│ │ │ │ +
556 case appendedbase64 :
│ │ │ │ +
557 return new AppendedBase64DataArrayWriter(stream, name, ncomps,
│ │ │ │ +
558 nitems, offset,
│ │ │ │ +
559 indent, prec);
│ │ │ │ +
560 }
│ │ │ │ +
561 break;
│ │ │ │ +
562 case appended :
│ │ │ │ +
563 switch(type) {
│ │ │ │ +
564 case ascii :
│ │ │ │ +
565 case base64 :
│ │ │ │ +
566 break; // invlid in appended mode
│ │ │ │ +
567 case appendedraw :
│ │ │ │ +
568 return new NakedRawDataArrayWriter(stream, ncomps, nitems, prec);
│ │ │ │ +
569 case appendedbase64 :
│ │ │ │ +
570 return new NakedBase64DataArrayWriter(stream, ncomps, nitems, prec);
│ │ │ │ +
571 }
│ │ │ │ +
572 break;
│ │ │ │ +
573 }
│ │ │ │ +
574 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
│ │ │ │ +
575 "OutputType " << type << " in phase " << phase);
│ │ │ │ +
576 }
│ │ │ │ +
│ │ │ │ +
577 };
│ │ │ │ +
│ │ │ │ +
578
│ │ │ │ +
579 } // namespace VTK
│ │ │ │ +
580
│ │ │ │ +
582
│ │ │ │ +
583} // namespace Dune
│ │ │ │ +
584
│ │ │ │ +
585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
│ │ │ │ + │ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
Definition simplexgeneration.hh:20
│ │ │ │ -
std::string filename()
Definition simplexgeneration.hh:66
│ │ │ │ -
double maxArea()
Definition simplexgeneration.hh:36
│ │ │ │ -
bool haspath()
Definition simplexgeneration.hh:51
│ │ │ │ -
std::string parameter()
Definition simplexgeneration.hh:81
│ │ │ │ -
int dimension()
Definition simplexgeneration.hh:76
│ │ │ │ -
std::string path()
Definition simplexgeneration.hh:56
│ │ │ │ -
const std::string dumpFileName() const
Definition simplexgeneration.hh:86
│ │ │ │ -
bool display()
Definition simplexgeneration.hh:46
│ │ │ │ -
double minAngle()
Definition simplexgeneration.hh:41
│ │ │ │ -
bool hasfile()
Definition simplexgeneration.hh:61
│ │ │ │ -
std::string filetype()
Definition simplexgeneration.hh:71
│ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ +
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ +
@ appendedraw
Output is to the file is appended raw binary.
Definition common.hh:49
│ │ │ │ +
@ appendedbase64
Output is to the file is appended base64 binary.
Definition common.hh:51
│ │ │ │ +
@ base64
Output to the file is inline base64 binary.
Definition common.hh:47
│ │ │ │ +
std::string toString(Precision p)
map precision to VTK type name
Definition common.hh:280
│ │ │ │ +
std::size_t typeSize(Precision p)
map precision to byte size
Definition common.hh:300
│ │ │ │ +
T Type
type to convert T to before putting it into a stream with <<
Definition common.hh:97
│ │ │ │ +
base class for data array writers
Definition dataarraywriter.hh:56
│ │ │ │ +
void write(T data)
write one element of data
Definition dataarraywriter.hh:69
│ │ │ │ +
DataArrayWriter(Precision _prec)
construct a data array writer
Definition dataarraywriter.hh:63
│ │ │ │ +
virtual bool writeIsNoop() const
whether calls to write may be skipped
Definition dataarraywriter.hh:89
│ │ │ │ +
virtual ~DataArrayWriter()
virtual destructor
Definition dataarraywriter.hh:91
│ │ │ │ +
a streaming writer for data array tags, uses ASCII inline format
Definition dataarraywriter.hh:110
│ │ │ │ +
~AsciiDataArrayWriter()
finish output; writes end tag
Definition dataarraywriter.hh:133
│ │ │ │ +
AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, const Indent &indent_, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:121
│ │ │ │ +
a streaming writer for data array tags, uses binary inline format
Definition dataarraywriter.hh:197
│ │ │ │ +
~BinaryDataArrayWriter()
finish output; writes end tag
Definition dataarraywriter.hh:228
│ │ │ │ +
BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, int nitems, const Indent &indent_, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:210
│ │ │ │ +
a streaming writer for data array tags, uses appended raw format
Definition dataarraywriter.hh:268
│ │ │ │ +
AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:283
│ │ │ │ +
bool writeIsNoop() const
whether calls to write may be skipped
Definition dataarraywriter.hh:297
│ │ │ │ +
a streaming writer for data array tags, uses appended base64 format
Definition dataarraywriter.hh:310
│ │ │ │ +
AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:325
│ │ │ │ +
bool writeIsNoop() const
whether calls to write may be skipped
Definition dataarraywriter.hh:342
│ │ │ │ +
a streaming writer for appended data array tags, uses base64 format
Definition dataarraywriter.hh:360
│ │ │ │ +
NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:369
│ │ │ │ +
a streaming writer for appended data arrays, uses raw format
Definition dataarraywriter.hh:408
│ │ │ │ +
NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:419
│ │ │ │ +
a factory for DataArrayWriters
Definition dataarraywriter.hh:462
│ │ │ │ +
bool beginAppended()
signal start of the appended section
Definition dataarraywriter.hh:497
│ │ │ │ +
DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
create a DataArrayWriter
Definition dataarraywriter.hh:541
│ │ │ │ +
DataArrayWriterFactory(OutputType type_, std::ostream &stream_)
create a DataArrayWriterFactory
Definition dataarraywriter.hh:482
│ │ │ │ +
const std::string & appendedEncoding() const
query encoding string for appended data
Definition dataarraywriter.hh:510
│ │ │ │ +
void write(X &data)
encode a data item
Definition streams.hh:42
│ │ │ │ +
void flush()
flush the current unwritten data to the stream.
Definition streams.hh:64
│ │ │ │ +
write out data in binary
Definition streams.hh:84
│ │ │ │ +
void write(T data)
write data to stream
Definition streams.hh:93
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,151 +2,598 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -simplexgeneration.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +dataarraywriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -15 namespace dgf │ │ │ │ │ -16 { │ │ │ │ │ -17 │ │ │ │ │ -_1_8 class _S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ -19 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -20 { │ │ │ │ │ -21 double area_; │ │ │ │ │ -22 double angle_; │ │ │ │ │ -23 bool display_; │ │ │ │ │ -24 std::string path_; │ │ │ │ │ -25 bool haspath_; │ │ │ │ │ -26 std::string filename_; │ │ │ │ │ -27 std::string filetype_; │ │ │ │ │ -28 std::string parameter_; │ │ │ │ │ -29 std::string dumpfilename_; │ │ │ │ │ -30 bool hasfile_; │ │ │ │ │ -31 int dimension_; │ │ │ │ │ -32 │ │ │ │ │ -33 public: │ │ │ │ │ -34 _S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k ( std :: istream &in ); │ │ │ │ │ -35 │ │ │ │ │ -_3_6 double _m_a_x_A_r_e_a () │ │ │ │ │ -37 { │ │ │ │ │ -38 return area_; │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -_4_1 double _m_i_n_A_n_g_l_e () │ │ │ │ │ -42 { │ │ │ │ │ -43 return angle_; │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -_4_6 bool _d_i_s_p_l_a_y () │ │ │ │ │ -47 { │ │ │ │ │ -48 return display_; │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -_5_1 bool _h_a_s_p_a_t_h () │ │ │ │ │ -52 { │ │ │ │ │ -53 return haspath_; │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -_5_6 std :: string _p_a_t_h () │ │ │ │ │ -57 { │ │ │ │ │ -58 return path_; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_1 bool _h_a_s_f_i_l_e () │ │ │ │ │ -62 { │ │ │ │ │ -63 return hasfile_; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_6 std :: string _f_i_l_e_n_a_m_e () │ │ │ │ │ -67 { │ │ │ │ │ -68 return filename_; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -_7_1 std :: string _f_i_l_e_t_y_p_e () │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18 │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +30namespace _D_u_n_e │ │ │ │ │ +31{ │ │ │ │ │ +34 │ │ │ │ │ +35 namespace VTK { │ │ │ │ │ +36 │ │ │ │ │ +38 │ │ │ │ │ +_5_5 class _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +56 { │ │ │ │ │ +57 public: │ │ │ │ │ +59 │ │ │ │ │ +_6_3 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(_P_r_e_c_i_s_i_o_n _prec) │ │ │ │ │ +64 : prec(_prec) │ │ │ │ │ +65 {} │ │ │ │ │ +66 │ │ │ │ │ +68 template │ │ │ │ │ +_6_9 void _w_r_i_t_e(T data) │ │ │ │ │ +70 { │ │ │ │ │ +71 switch(prec) │ │ │ │ │ 72 { │ │ │ │ │ -73 return filetype_; │ │ │ │ │ -74 } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 int _d_i_m_e_n_s_i_o_n () │ │ │ │ │ -77 { │ │ │ │ │ -78 return dimension_; │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -_8_1 std :: string _p_a_r_a_m_e_t_e_r () │ │ │ │ │ -82 { │ │ │ │ │ -83 return parameter_; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -_8_6 const std::string _d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ │ -87 { │ │ │ │ │ -88 return dumpfilename_; │ │ │ │ │ -89 } │ │ │ │ │ -90 }; │ │ │ │ │ -91 │ │ │ │ │ -92 } // end namespace dgf │ │ │ │ │ -93 │ │ │ │ │ -94} // end namespace Dune │ │ │ │ │ -95 │ │ │ │ │ -96#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +73 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2: │ │ │ │ │ +74 writeFloat32(data); break; │ │ │ │ │ +75 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4: │ │ │ │ │ +76 writeFloat64(data); break; │ │ │ │ │ +77 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2: │ │ │ │ │ +78 writeUInt32(data); break; │ │ │ │ │ +79 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8: │ │ │ │ │ +80 writeUInt8(data); break; │ │ │ │ │ +81 case _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2: │ │ │ │ │ +82 writeInt32(data); break; │ │ │ │ │ +83 default: │ │ │ │ │ +84 DUNE_THROW(Dune::NotImplemented, "Unknown precision type"); │ │ │ │ │ +85 } │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +_8_9 virtual bool _w_r_i_t_e_I_s_N_o_o_p() const { return false; } │ │ │ │ │ +_9_1 virtual _~_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r () {} │ │ │ │ │ +92 │ │ │ │ │ +93 private: │ │ │ │ │ +95 virtual void writeFloat32 (float data) = 0; │ │ │ │ │ +97 virtual void writeFloat64 (double data) = 0; │ │ │ │ │ +99 virtual void writeInt32 (std::int32_t data) = 0; │ │ │ │ │ +101 virtual void writeUInt8 (std::uint8_t data) = 0; │ │ │ │ │ +103 virtual void writeUInt32 (std::uint32_t data) = 0; │ │ │ │ │ +104 │ │ │ │ │ +105 _P_r_e_c_i_s_i_o_n prec; │ │ │ │ │ +106 }; │ │ │ │ │ +107 │ │ │ │ │ +_1_0_9 class _A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +110 { │ │ │ │ │ +111 public: │ │ │ │ │ +113 │ │ │ │ │ +_1_2_1 _A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, std::string name, │ │ │ │ │ +122 int ncomps, const Indent& indent_, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ +123 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), s(theStream), counter(0), numPerLine(12), indent │ │ │ │ │ +(indent_) │ │ │ │ │ +124 { │ │ │ │ │ +125 s << indent << "\n"; │ │ │ │ │ +129 ++indent; │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +_1_3_3 _~_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r () │ │ │ │ │ +134 { │ │ │ │ │ +135 if (counter%numPerLine!=0) s << "\n"; │ │ │ │ │ +136 --indent; │ │ │ │ │ +137 s << indent << "\n"; │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +140 private: │ │ │ │ │ +142 void writeFloat64 (double data) final │ │ │ │ │ +143 { write_float(data); } │ │ │ │ │ +145 void writeFloat32 (float data) final │ │ │ │ │ +146 { write_float(data); } │ │ │ │ │ +148 void writeInt32 (std::int32_t data) final │ │ │ │ │ +149 { write_(data); } │ │ │ │ │ +151 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ +152 { write_(data); } │ │ │ │ │ +154 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ +155 { write_(data); } │ │ │ │ │ +156 │ │ │ │ │ +157 template │ │ │ │ │ +158 void write_(T data) │ │ │ │ │ +159 { │ │ │ │ │ +160 typedef typename _P_r_i_n_t_T_y_p_e_<_T_>_:_:_T_y_p_e PT; │ │ │ │ │ +161 if(counter%numPerLine==0) s << indent; │ │ │ │ │ +162 else s << " "; │ │ │ │ │ +163 const auto original_precision = std::cout.precision(); │ │ │ │ │ +164 s << std::setprecision(std::numeric_limits::digits10) << (PT) data; │ │ │ │ │ +165 std::cout.precision(original_precision); │ │ │ │ │ +166 counter++; │ │ │ │ │ +167 if (counter%numPerLine==0) s << "\n"; │ │ │ │ │ +168 } │ │ │ │ │ +169 │ │ │ │ │ +170 template │ │ │ │ │ +171 void write_float(T data) │ │ │ │ │ +172 { │ │ │ │ │ +173 typedef typename _P_r_i_n_t_T_y_p_e_<_T_>_:_:_T_y_p_e PT; │ │ │ │ │ +174 if(counter%numPerLine==0) s << indent; │ │ │ │ │ +175 else s << " "; │ │ │ │ │ +176 PT out_data = (PT) data; │ │ │ │ │ +177 if (std::fpclassify(out_data) == FP_SUBNORMAL) │ │ │ │ │ +178 { │ │ │ │ │ +179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS │ │ │ │ │ +180 out_data = 0; │ │ │ │ │ +181 } │ │ │ │ │ +182 const auto original_precision = std::cout.precision(); │ │ │ │ │ +183 s << std::setprecision(std::numeric_limits::digits10) << out_data; │ │ │ │ │ +184 std::cout.precision(original_precision); │ │ │ │ │ +185 counter++; │ │ │ │ │ +186 if (counter%numPerLine==0) s << "\n"; │ │ │ │ │ +187 } │ │ │ │ │ +188 │ │ │ │ │ +189 std::ostream& s; │ │ │ │ │ +190 int counter; │ │ │ │ │ +191 int numPerLine; │ │ │ │ │ +192 Indent indent; │ │ │ │ │ +193 }; │ │ │ │ │ +194 │ │ │ │ │ +_1_9_6 class _B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +197 { │ │ │ │ │ +198 public: │ │ │ │ │ +200 │ │ │ │ │ +_2_1_0 _B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, std::string name, │ │ │ │ │ +211 int ncomps, int nitems, const Indent& indent_, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ +212 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), s(theStream), b64(theStream), indent(indent_) │ │ │ │ │ +213 { │ │ │ │ │ +214 s << indent << "\n"; │ │ │ │ │ +218 │ │ │ │ │ +219 // write indentation for the data chunk │ │ │ │ │ +220 s << indent+1; │ │ │ │ │ +221 // store size, needs to be exactly 32 bit │ │ │ │ │ +222 std::uint32_t size = ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ +223 b64._w_r_i_t_e(size); │ │ │ │ │ +224 b64._f_l_u_s_h(); │ │ │ │ │ +225 } │ │ │ │ │ +226 │ │ │ │ │ +_2_2_8 _~_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r () │ │ │ │ │ +229 { │ │ │ │ │ +230 b64._f_l_u_s_h(); │ │ │ │ │ +231 // append newline to written data │ │ │ │ │ +232 s << "\n"; │ │ │ │ │ +233 s << indent << "\n"; │ │ │ │ │ +234 s.flush(); │ │ │ │ │ +235 } │ │ │ │ │ +236 │ │ │ │ │ +237 private: │ │ │ │ │ +239 void writeFloat64 (double data) final │ │ │ │ │ +240 { write_(data); } │ │ │ │ │ +242 void writeFloat32 (float data) final │ │ │ │ │ +243 { write_(data); } │ │ │ │ │ +245 void writeInt32 (std::int32_t data) final │ │ │ │ │ +246 { write_(data); } │ │ │ │ │ +248 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ +249 { write_(data); } │ │ │ │ │ +251 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ +252 { write_(data); } │ │ │ │ │ +253 │ │ │ │ │ +255 template │ │ │ │ │ +256 void write_(T data) │ │ │ │ │ +257 { │ │ │ │ │ +258 b64._w_r_i_t_e(data); │ │ │ │ │ +259 } │ │ │ │ │ +260 │ │ │ │ │ +261 std::ostream& s; │ │ │ │ │ +262 Base64Stream b64; │ │ │ │ │ +263 const Indent& indent; │ │ │ │ │ +264 }; │ │ │ │ │ +265 │ │ │ │ │ +_2_6_7 class _A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +268 { │ │ │ │ │ +269 public: │ │ │ │ │ +271 │ │ │ │ │ +_2_8_3 _A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& s, std::string name, │ │ │ │ │ +284 int ncomps, unsigned nitems, unsigned& offset, │ │ │ │ │ +285 const Indent& indent, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ +286 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_) │ │ │ │ │ +287 { │ │ │ │ │ +288 s << indent << "\n"; │ │ │ │ │ +292 offset += 4; // header │ │ │ │ │ +293 offset += ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ +294 } │ │ │ │ │ +295 │ │ │ │ │ +_2_9_7 bool _w_r_i_t_e_I_s_N_o_o_p() const { return true; } │ │ │ │ │ +298 │ │ │ │ │ +299 private: │ │ │ │ │ +301 void writeFloat64 (double) final {} │ │ │ │ │ +302 void writeFloat32 (float) final {} │ │ │ │ │ +303 void writeInt32 (std::int32_t) final {} │ │ │ │ │ +304 void writeUInt32 (std::uint32_t) final {} │ │ │ │ │ +305 void writeUInt8 (std::uint8_t) final {} │ │ │ │ │ +306 }; │ │ │ │ │ +307 │ │ │ │ │ +_3_0_9 class _A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +310 { │ │ │ │ │ +311 public: │ │ │ │ │ +313 │ │ │ │ │ +_3_2_5 _A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& s, std::string name, │ │ │ │ │ +326 int ncomps, unsigned nitems, │ │ │ │ │ +327 unsigned& offset, const Indent& indent, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ +328 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_) │ │ │ │ │ +329 { │ │ │ │ │ +330 s << indent << "\n"; │ │ │ │ │ +334 offset += 8; // header │ │ │ │ │ +335 std::size_t bytes = ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ +336 offset += bytes/3*4; │ │ │ │ │ +337 if(bytes%3 != 0) │ │ │ │ │ +338 offset += 4; │ │ │ │ │ +339 } │ │ │ │ │ +340 │ │ │ │ │ +_3_4_2 bool _w_r_i_t_e_I_s_N_o_o_p() const { return true; } │ │ │ │ │ +343 │ │ │ │ │ +344 private: │ │ │ │ │ +346 void writeFloat64 (double) final {} │ │ │ │ │ +347 void writeFloat32 (float) final {} │ │ │ │ │ +348 void writeInt32 (std::int32_t) final {} │ │ │ │ │ +349 void writeUInt32 (std::uint32_t) final {} │ │ │ │ │ +350 void writeUInt8 (std::uint8_t) final {} │ │ │ │ │ +351 }; │ │ │ │ │ +352 │ │ │ │ │ +354 // │ │ │ │ │ +355 // Naked ArrayWriters for the appended section │ │ │ │ │ +356 // │ │ │ │ │ +357 │ │ │ │ │ +_3_5_9 class _N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +360 { │ │ │ │ │ +361 public: │ │ │ │ │ +363 │ │ │ │ │ +_3_6_9 _N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, int ncomps, │ │ │ │ │ +370 int nitems, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ +371 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), b64(theStream) │ │ │ │ │ +372 { │ │ │ │ │ +373 // store size │ │ │ │ │ +374 std::uint32_t size = ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ +375 b64._w_r_i_t_e(size); │ │ │ │ │ +376 b64._f_l_u_s_h(); │ │ │ │ │ +377 } │ │ │ │ │ +378 │ │ │ │ │ +379 private: │ │ │ │ │ +381 void writeFloat64 (double data) final │ │ │ │ │ +382 { write_(data); } │ │ │ │ │ +384 void writeFloat32 (float data) final │ │ │ │ │ +385 { write_(data); } │ │ │ │ │ +387 void writeInt32 (std::int32_t data) final │ │ │ │ │ +388 { write_(data); } │ │ │ │ │ +390 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ +391 { write_(data); } │ │ │ │ │ +393 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ +394 { write_(data); } │ │ │ │ │ +395 │ │ │ │ │ +397 template │ │ │ │ │ +398 void write_(T data) │ │ │ │ │ +399 { │ │ │ │ │ +400 b64._w_r_i_t_e(data); │ │ │ │ │ +401 } │ │ │ │ │ +402 │ │ │ │ │ +403 Base64Stream b64; │ │ │ │ │ +404 }; │ │ │ │ │ +405 │ │ │ │ │ +_4_0_7 class _N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +408 { │ │ │ │ │ +409 _R_a_w_S_t_r_e_a_m s; │ │ │ │ │ +410 │ │ │ │ │ +411 public: │ │ │ │ │ +413 │ │ │ │ │ +_4_1_9 _N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, int ncomps, │ │ │ │ │ +420 int nitems, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ +421 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), s(theStream) │ │ │ │ │ +422 { │ │ │ │ │ +423 s._w_r_i_t_e((unsigned int)(ncomps*nitems*_t_y_p_e_S_i_z_e(prec_))); │ │ │ │ │ +424 } │ │ │ │ │ +425 │ │ │ │ │ +426 private: │ │ │ │ │ +428 void writeFloat64 (double data) final │ │ │ │ │ +429 { write_(data); } │ │ │ │ │ +431 void writeFloat32 (float data) final │ │ │ │ │ +432 { write_(data); } │ │ │ │ │ +434 void writeInt32 (std::int32_t data) final │ │ │ │ │ +435 { write_(data); } │ │ │ │ │ +437 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ +438 { write_(data); } │ │ │ │ │ +440 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ +441 { write_(data); } │ │ │ │ │ +442 │ │ │ │ │ +444 template │ │ │ │ │ +445 void write_(T data) │ │ │ │ │ +446 { │ │ │ │ │ +447 s._w_r_i_t_e(data); │ │ │ │ │ +448 } │ │ │ │ │ +449 }; │ │ │ │ │ +450 │ │ │ │ │ +452 // │ │ │ │ │ +453 // Factory │ │ │ │ │ +454 // │ │ │ │ │ +455 │ │ │ │ │ +457 │ │ │ │ │ +_4_6_2 class _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y { │ │ │ │ │ +463 enum Phase { main, appended }; │ │ │ │ │ +464 │ │ │ │ │ +465 _O_u_t_p_u_t_T_y_p_e type; │ │ │ │ │ +466 std::ostream& stream; │ │ │ │ │ +467 unsigned offset; │ │ │ │ │ +469 Phase phase; │ │ │ │ │ +470 │ │ │ │ │ +471 public: │ │ │ │ │ +473 │ │ │ │ │ +_4_8_2 inline _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y(_O_u_t_p_u_t_T_y_p_e type_, std::ostream& stream_) │ │ │ │ │ +483 : type(type_), stream(stream_), offset(0), phase(main) │ │ │ │ │ +484 { } │ │ │ │ │ +485 │ │ │ │ │ +487 │ │ │ │ │ +_4_9_7 inline bool _b_e_g_i_n_A_p_p_e_n_d_e_d() { │ │ │ │ │ +498 phase = appended; │ │ │ │ │ +499 switch(type) { │ │ │ │ │ +500 case _a_s_c_i_i : return false; │ │ │ │ │ +501 case _b_a_s_e_6_4 : return false; │ │ │ │ │ +502 case _a_p_p_e_n_d_e_d_r_a_w : return true; │ │ │ │ │ +503 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : return true; │ │ │ │ │ +504 } │ │ │ │ │ +505 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported " │ │ │ │ │ +506 "OutputType " << type); │ │ │ │ │ +507 } │ │ │ │ │ +508 │ │ │ │ │ +_5_1_0 const std::string& _a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g() const { │ │ │ │ │ +511 static const std::string rawString = "raw"; │ │ │ │ │ +512 static const std::string base64String = "base64"; │ │ │ │ │ +513 │ │ │ │ │ +514 switch(type) { │ │ │ │ │ +515 case _a_s_c_i_i : │ │ │ │ │ +516 case _b_a_s_e_6_4 : │ │ │ │ │ +517 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): No " │ │ │ │ │ +518 "appended encoding for OutputType " << type); │ │ │ │ │ +519 case _a_p_p_e_n_d_e_d_r_a_w : return rawString; │ │ │ │ │ +520 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : return base64String; │ │ │ │ │ +521 } │ │ │ │ │ +522 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): " │ │ │ │ │ +523 "unsupported OutputType " << type); │ │ │ │ │ +524 } │ │ │ │ │ +525 │ │ │ │ │ +527 │ │ │ │ │ +_5_4_1 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r* _m_a_k_e(const std::string& name, unsigned ncomps, │ │ │ │ │ +542 unsigned nitems, const Indent& indent, │ │ │ │ │ +543 _P_r_e_c_i_s_i_o_n prec) │ │ │ │ │ +544 { │ │ │ │ │ +545 switch(phase) { │ │ │ │ │ +546 case main : │ │ │ │ │ +547 switch(type) { │ │ │ │ │ +548 case _a_s_c_i_i : │ │ │ │ │ +549 return new _A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, indent, prec); │ │ │ │ │ +550 case _b_a_s_e_6_4 : │ │ │ │ │ +551 return new _B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, nitems, │ │ │ │ │ +552 indent, prec); │ │ │ │ │ +553 case _a_p_p_e_n_d_e_d_r_a_w : │ │ │ │ │ +554 return new _A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, │ │ │ │ │ +555 nitems, offset, indent, prec); │ │ │ │ │ +556 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : │ │ │ │ │ +557 return new _A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, │ │ │ │ │ +558 nitems, offset, │ │ │ │ │ +559 indent, prec); │ │ │ │ │ +560 } │ │ │ │ │ +561 break; │ │ │ │ │ +562 case appended : │ │ │ │ │ +563 switch(type) { │ │ │ │ │ +564 case _a_s_c_i_i : │ │ │ │ │ +565 case _b_a_s_e_6_4 : │ │ │ │ │ +566 break; // invlid in appended mode │ │ │ │ │ +567 case _a_p_p_e_n_d_e_d_r_a_w : │ │ │ │ │ +568 return new _N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, ncomps, nitems, prec); │ │ │ │ │ +569 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : │ │ │ │ │ +570 return new _N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, ncomps, nitems, prec); │ │ │ │ │ +571 } │ │ │ │ │ +572 break; │ │ │ │ │ +573 } │ │ │ │ │ +574 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported " │ │ │ │ │ +575 "OutputType " << type << " in phase " << phase); │ │ │ │ │ +576 } │ │ │ │ │ +577 }; │ │ │ │ │ +578 │ │ │ │ │ +579 } // namespace VTK │ │ │ │ │ +580 │ │ │ │ │ +582 │ │ │ │ │ +583} // namespace Dune │ │ │ │ │ +584 │ │ │ │ │ +585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH │ │ │ │ │ +_s_t_r_e_a_m_s_._h_h │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_f_i_l_e_n_a_m_e │ │ │ │ │ -std::string filename() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_m_a_x_A_r_e_a │ │ │ │ │ -double maxArea() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_h_a_s_p_a_t_h │ │ │ │ │ -bool haspath() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::string parameter() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -int dimension() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_p_a_t_h │ │ │ │ │ -std::string path() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_d_u_m_p_F_i_l_e_N_a_m_e │ │ │ │ │ -const std::string dumpFileName() const │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_d_i_s_p_l_a_y │ │ │ │ │ -bool display() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_m_i_n_A_n_g_l_e │ │ │ │ │ -double minAngle() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_h_a_s_f_i_l_e │ │ │ │ │ -bool hasfile() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_f_i_l_e_t_y_p_e │ │ │ │ │ -std::string filetype() │ │ │ │ │ -DDeeffiinniittiioonn simplexgeneration.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ +@ int32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2 │ │ │ │ │ +@ uint32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ +@ uint8 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ +@ float32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4 │ │ │ │ │ +@ float64 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ +OutputType │ │ │ │ │ +How the bulk data should be stored in the file. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ +@ ascii │ │ │ │ │ +Output to the file is in ascii. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w │ │ │ │ │ +@ appendedraw │ │ │ │ │ +Output is to the file is appended raw binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ +@ appendedbase64 │ │ │ │ │ +Output is to the file is appended base64 binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 │ │ │ │ │ +@ base64 │ │ │ │ │ +Output to the file is inline base64 binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g │ │ │ │ │ +std::string toString(Precision p) │ │ │ │ │ +map precision to VTK type name │ │ │ │ │ +DDeeffiinniittiioonn common.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_y_p_e_S_i_z_e │ │ │ │ │ +std::size_t typeSize(Precision p) │ │ │ │ │ +map precision to byte size │ │ │ │ │ +DDeeffiinniittiioonn common.hh:300 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_:_:_T_y_p_e │ │ │ │ │ +T Type │ │ │ │ │ +type to convert T to before putting it into a stream with << │ │ │ │ │ +DDeeffiinniittiioonn common.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +base class for data array writers │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(T data) │ │ │ │ │ +write one element of data │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +DataArrayWriter(Precision _prec) │ │ │ │ │ +construct a data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e_I_s_N_o_o_p │ │ │ │ │ +virtual bool writeIsNoop() const │ │ │ │ │ +whether calls to write may be skipped │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_~_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +virtual ~DataArrayWriter() │ │ │ │ │ +virtual destructor │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +a streaming writer for data array tags, uses ASCII inline format │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_~_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +~AsciiDataArrayWriter() │ │ │ │ │ +finish output; writes end tag │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, │ │ │ │ │ +const Indent &indent_, Precision prec_) │ │ │ │ │ +make a new data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:121 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +a streaming writer for data array tags, uses binary inline format │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_~_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +~BinaryDataArrayWriter() │ │ │ │ │ +finish output; writes end tag │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:228 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, │ │ │ │ │ +int nitems, const Indent &indent_, Precision prec_) │ │ │ │ │ +make a new data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +a streaming writer for data array tags, uses appended raw format │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:268 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps, │ │ │ │ │ +unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_) │ │ │ │ │ +make a new data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:283 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e_I_s_N_o_o_p │ │ │ │ │ +bool writeIsNoop() const │ │ │ │ │ +whether calls to write may be skipped │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:297 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +a streaming writer for data array tags, uses appended base64 format │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps, │ │ │ │ │ +unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_) │ │ │ │ │ +make a new data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:325 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e_I_s_N_o_o_p │ │ │ │ │ +bool writeIsNoop() const │ │ │ │ │ +whether calls to write may be skipped │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:342 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +a streaming writer for appended data array tags, uses base64 format │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:360 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems, │ │ │ │ │ +Precision prec_) │ │ │ │ │ +make a new data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:369 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +a streaming writer for appended data arrays, uses raw format │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:408 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems, │ │ │ │ │ +Precision prec_) │ │ │ │ │ +make a new data array writer │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:419 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ +a factory for DataArrayWriters │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:462 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ +bool beginAppended() │ │ │ │ │ +signal start of the appended section │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:497 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ +DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned │ │ │ │ │ +nitems, const Indent &indent, Precision prec) │ │ │ │ │ +create a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:541 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ +DataArrayWriterFactory(OutputType type_, std::ostream &stream_) │ │ │ │ │ +create a DataArrayWriterFactory │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:482 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g │ │ │ │ │ +const std::string & appendedEncoding() const │ │ │ │ │ +query encoding string for appended data │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:510 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ │ +void write(X &data) │ │ │ │ │ +encode a data item │ │ │ │ │ +DDeeffiinniittiioonn streams.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_f_l_u_s_h │ │ │ │ │ +void flush() │ │ │ │ │ +flush the current unwritten data to the stream. │ │ │ │ │ +DDeeffiinniittiioonn streams.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ │ +write out data in binary │ │ │ │ │ +DDeeffiinniittiioonn streams.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ │ +void write(T data) │ │ │ │ │ +write data to stream │ │ │ │ │ +DDeeffiinniittiioonn streams.hh:93 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryseg.hh File Reference │ │ │ │ +dune-grid: pointiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundaryseg.hh File Reference
│ │ │ │ +
pointiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ +
#include <iterator>
│ │ │ │ #include <vector>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#include <dune/common/iteratorfacades.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corneriterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::BoundarySegBlock
class  Dune::VTK::PointIterator< CellIterator, IS >
 iterate over the points of some corner range More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundaryseg.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +pointiterator.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_<_ _C_e_l_l_I_t_e_r_a_t_o_r_,_ _I_S_ _> │ │ │ │ │ +  iterate over the points of some corner range _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryseg.hh Source File │ │ │ │ +dune-grid: pointiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,151 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundaryseg.hh
│ │ │ │ +
pointiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <string>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12#include <map>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <iterator>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/iteratorfacades.hh>
│ │ │ │ +
13#include <dune/common/typetraits.hh>
│ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │
17
│ │ │ │
18namespace Dune
│ │ │ │
19{
│ │ │ │ -
20
│ │ │ │ -
21 namespace dgf
│ │ │ │ -
22 {
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 : public BasicBlock
│ │ │ │ -
25 {
│ │ │ │ -
26 int dimworld; // the dimension of the vertices (is given from user)
│ │ │ │ -
27 bool goodline; // active line describes a vertex
│ │ │ │ -
28 std :: vector< unsigned int > p; // active vertex
│ │ │ │ -
29 int bndid;
│ │ │ │ -
30 typedef DGFBoundaryParameter::type BoundaryParameter;
│ │ │ │ -
31 BoundaryParameter parameter;
│ │ │ │ -
32 bool simplexgrid;
│ │ │ │ -
33
│ │ │ │ -
34 public:
│ │ │ │ - │ │ │ │ -
36 typedef std::pair < int, BoundaryParameter > BndParam;
│ │ │ │ -
37
│ │ │ │ -
38 // initialize vertex block and get first vertex
│ │ │ │ -
39 BoundarySegBlock ( std :: istream &in, int pnofvtx,
│ │ │ │ -
40 int pdimworld, bool psimplexgrid );
│ │ │ │ -
41
│ │ │ │ -
42 // some information
│ │ │ │ -
43 int get( std :: map< EntityKey, BndParam > & facemap,
│ │ │ │ -
44 bool fixedsize,
│ │ │ │ -
45 int vtxoffset
│ │ │ │ -
46 );
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 bool ok()
│ │ │ │ -
49 {
│ │ │ │ -
50 return goodline;
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 {
│ │ │ │ -
55 return noflines();
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
58 private:
│ │ │ │ -
59 bool next();
│ │ │ │ -
60
│ │ │ │ -
61 // get coordinates of active vertex
│ │ │ │ -
62 int operator[] (int i)
│ │ │ │ -
63 {
│ │ │ │ -
64 assert(ok());
│ │ │ │ -
65 assert(linenumber()>=0);
│ │ │ │ -
66 assert(0<=i && i<dimworld+1);
│ │ │ │ -
67 return p[i];
│ │ │ │ -
68 }
│ │ │ │ +
22
│ │ │ │ +
23 namespace VTK {
│ │ │ │ +
24
│ │ │ │ +
26
│ │ │ │ +
49 template<typename CellIterator, typename IS>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 : public ForwardIteratorFacade
│ │ │ │ +
52 < PointIterator<CellIterator, IS>,
│ │ │ │ +
53 const Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ +
54 CellIterator>::value_type>::type>,
│ │ │ │ +
55 const Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ +
56 CellIterator>::value_type>::type>&,
│ │ │ │ +
57 typename std::iterator_traits<CellIterator>::difference_type>
│ │ │ │ +
58 {
│ │ │ │ +
59 public:
│ │ │ │ +
60 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ +
61 CellIterator>::value_type>::type> Corner;
│ │ │ │ +
62
│ │ │ │ +
63 // reiterate the facades typedefs here
│ │ │ │ + │ │ │ │ +
65 typedef const Corner Value;
│ │ │ │ +
66 typedef Value& Reference;
│ │ │ │ +
67 typedef typename std::iterator_traits<CellIterator>::difference_type
│ │ │ │ + │ │ │ │
69
│ │ │ │ -
70 int size()
│ │ │ │ -
71 {
│ │ │ │ -
72 return p.size();
│ │ │ │ -
73 }
│ │ │ │ -
74
│ │ │ │ -
75 };
│ │ │ │ -
│ │ │ │ +
70 static const unsigned mydim = std::iterator_traits<CellIterator>::
│ │ │ │ +
71 value_type::mydimension;
│ │ │ │ +
72
│ │ │ │ +
73 private:
│ │ │ │ +
74 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
│ │ │ │ +
75 DifferenceType> Facade;
│ │ │ │
76
│ │ │ │ -
77 } // end namespace dgf
│ │ │ │ -
78
│ │ │ │ -
79} // end namespace Dune
│ │ │ │ + │ │ │ │ +
78 const IS* is;
│ │ │ │ +
79 std::vector<bool> seen;
│ │ │ │
80
│ │ │ │ -
81#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
81 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
83 return *cornerit;
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
│ │ │ │ +
86 bool isDereferencable() const {
│ │ │ │ +
87 return cornerit.isDereferencable();
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ +
90 bool equals(const DerivedType& other) const {
│ │ │ │ +
91 return cornerit == other.cornerit;
│ │ │ │ +
92 }
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
│ │ │ │ +
94 void increment() {
│ │ │ │ +
95 for(++cornerit; isDereferencable(); ++cornerit) {
│ │ │ │ +
96 typename IS::IndexType index =
│ │ │ │ +
97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);
│ │ │ │ +
98
│ │ │ │ +
99 if(!seen[index]) {
│ │ │ │ +
100 seen[index] = true;
│ │ │ │ +
101 break;
│ │ │ │ +
102 }
│ │ │ │ +
103 }
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ +
112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,
│ │ │ │ +
113 const IS& is_)
│ │ │ │ +
114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)
│ │ │ │ +
115 { }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ +
120 PointIterator(const CellIterator& cellend_)
│ │ │ │ +
121 : cornerit(cellend_), is(0)
│ │ │ │ +
122 { }
│ │ │ │ +
│ │ │ │ +
123 };
│ │ │ │ +
│ │ │ │ +
124
│ │ │ │ +
125 } // namespace VTK
│ │ │ │ +
126
│ │ │ │ +
128
│ │ │ │ +
129} // namespace Dune
│ │ │ │ +
130
│ │ │ │ +
131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
int & noflines()
Definition basic.hh:87
│ │ │ │ -
int linenumber()
Definition basic.hh:92
│ │ │ │ -
Definition boundaryseg.hh:25
│ │ │ │ -
bool ok()
Definition boundaryseg.hh:48
│ │ │ │ -
int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int vtxoffset)
Definition boundaryseg.cc:35
│ │ │ │ -
std::pair< int, BoundaryParameter > BndParam
Definition boundaryseg.hh:36
│ │ │ │ -
DGFEntityKey< unsigned int > EntityKey
Definition boundaryseg.hh:35
│ │ │ │ -
int nofbound()
Definition boundaryseg.hh:53
│ │ │ │ -
Definition entitykey.hh:21
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ +
iterate over the corners of some cell range
Definition corneriterator.hh:39
│ │ │ │ +
bool isDereferencable() const
Definition corneriterator.hh:69
│ │ │ │ +
iterate over the points of some corner range
Definition pointiterator.hh:58
│ │ │ │ +
PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS &is_)
construct a CornerIterator
Definition pointiterator.hh:112
│ │ │ │ +
void increment()
Definition pointiterator.hh:94
│ │ │ │ +
VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
Definition pointiterator.hh:61
│ │ │ │ +
Reference dereference() const
Definition pointiterator.hh:82
│ │ │ │ +
std::iterator_traits< CellIterator >::difference_type DifferenceType
Definition pointiterator.hh:68
│ │ │ │ +
static const unsigned mydim
Definition pointiterator.hh:70
│ │ │ │ +
PointIterator(const CellIterator &cellend_)
construct a CornerIterator
Definition pointiterator.hh:120
│ │ │ │ +
bool equals(const DerivedType &other) const
Definition pointiterator.hh:90
│ │ │ │ +
PointIterator< CellIterator, IS > DerivedType
Definition pointiterator.hh:64
│ │ │ │ +
const Corner Value
Definition pointiterator.hh:65
│ │ │ │ +
Value & Reference
Definition pointiterator.hh:66
│ │ │ │ +
bool isDereferencable() const
Definition pointiterator.hh:86
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,132 +2,168 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -boundaryseg.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +pointiterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -16 │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ 17 │ │ │ │ │ 18namespace _D_u_n_e │ │ │ │ │ 19{ │ │ │ │ │ -20 │ │ │ │ │ -21 namespace dgf │ │ │ │ │ -22 { │ │ │ │ │ -_2_3 class _B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k │ │ │ │ │ -24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -25 { │ │ │ │ │ -26 int dimworld; // the dimension of the vertices (is given from user) │ │ │ │ │ -27 bool goodline; // active line describes a vertex │ │ │ │ │ -28 std :: vector< unsigned int > p; // active vertex │ │ │ │ │ -29 int bndid; │ │ │ │ │ -30 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e BoundaryParameter; │ │ │ │ │ -31 BoundaryParameter parameter; │ │ │ │ │ -32 bool simplexgrid; │ │ │ │ │ -33 │ │ │ │ │ -34 public: │ │ │ │ │ -_3_5 typedef _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_> _E_n_t_i_t_y_K_e_y; │ │ │ │ │ -_3_6 typedef std::pair < int, BoundaryParameter > _B_n_d_P_a_r_a_m; │ │ │ │ │ -37 │ │ │ │ │ -38 // initialize vertex block and get first vertex │ │ │ │ │ -39 _B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k ( std :: istream &in, int pnofvtx, │ │ │ │ │ -40 int pdimworld, bool psimplexgrid ); │ │ │ │ │ -41 │ │ │ │ │ -42 // some information │ │ │ │ │ -43 int _g_e_t( std :: map< EntityKey, BndParam > & facemap, │ │ │ │ │ -44 bool fixedsize, │ │ │ │ │ -45 int vtxoffset │ │ │ │ │ -46 ); │ │ │ │ │ -47 │ │ │ │ │ -_4_8 bool _o_k() │ │ │ │ │ -49 { │ │ │ │ │ -50 return goodline; │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -_5_3 int _n_o_f_b_o_u_n_d() │ │ │ │ │ -54 { │ │ │ │ │ -55 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ -56 } │ │ │ │ │ -57 │ │ │ │ │ -58 private: │ │ │ │ │ -59 bool next(); │ │ │ │ │ -60 │ │ │ │ │ -61 // get coordinates of active vertex │ │ │ │ │ -62 int operator[] (int i) │ │ │ │ │ -63 { │ │ │ │ │ -64 assert(_o_k()); │ │ │ │ │ -65 assert(_l_i_n_e_n_u_m_b_e_r()>=0); │ │ │ │ │ -66 assert(0<=i && i │ │ │ │ │ +_5_0 class _P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +51 : public ForwardIteratorFacade │ │ │ │ │ +52 < PointIterator, │ │ │ │ │ +53 const Corner::value_type>::type>, │ │ │ │ │ +55 const Corner::value_type>::type>&, │ │ │ │ │ +57 typename std::iterator_traits::difference_type> │ │ │ │ │ +58 { │ │ │ │ │ +59 public: │ │ │ │ │ +60 typedef _V_T_K_:_:_C_o_r_n_e_r::value_type>::type> _C_o_r_n_e_r; │ │ │ │ │ +62 │ │ │ │ │ +63 // reiterate the facades typedefs here │ │ │ │ │ +_6_4 typedef _P_o_i_n_t_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_,_ _I_S_> _D_e_r_i_v_e_d_T_y_p_e; │ │ │ │ │ +_6_5 typedef const _C_o_r_n_e_r _V_a_l_u_e; │ │ │ │ │ +_6_6 typedef _V_a_l_u_e& _R_e_f_e_r_e_n_c_e; │ │ │ │ │ +67 typedef typename std::iterator_traits::difference_type │ │ │ │ │ +_6_8 _D_i_f_f_e_r_e_n_c_e_T_y_p_e; │ │ │ │ │ 69 │ │ │ │ │ -70 int size() │ │ │ │ │ -71 { │ │ │ │ │ -72 return p.size(); │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -75 }; │ │ │ │ │ +_7_0 static const unsigned _m_y_d_i_m = std::iterator_traits:: │ │ │ │ │ +71 value_type::mydimension; │ │ │ │ │ +72 │ │ │ │ │ +73 private: │ │ │ │ │ +74 typedef ForwardIteratorFacade<_D_e_r_i_v_e_d_T_y_p_e, _V_a_l_u_e, _R_e_f_e_r_e_n_c_e, │ │ │ │ │ +75 _D_i_f_f_e_r_e_n_c_e_T_y_p_e> Facade; │ │ │ │ │ 76 │ │ │ │ │ -77 } // end namespace dgf │ │ │ │ │ -78 │ │ │ │ │ -79} // end namespace Dune │ │ │ │ │ +77 _C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_> cornerit; │ │ │ │ │ +78 const IS* is; │ │ │ │ │ +79 std::vector seen; │ │ │ │ │ 80 │ │ │ │ │ -81#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ +81 public: │ │ │ │ │ +_8_2 _R_e_f_e_r_e_n_c_e _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ +83 return *cornerit; │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +_8_6 bool _i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e() const { │ │ │ │ │ +87 return cornerit._i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e(); │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +_9_0 bool _e_q_u_a_l_s(const _D_e_r_i_v_e_d_T_y_p_e& other) const { │ │ │ │ │ +91 return cornerit == other.cornerit; │ │ │ │ │ +92 } │ │ │ │ │ +93 │ │ │ │ │ +_9_4 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +95 for(++cornerit; _i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e(); ++cornerit) { │ │ │ │ │ +96 typename IS::IndexType index = │ │ │ │ │ +97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), _m_y_d_i_m); │ │ │ │ │ +98 │ │ │ │ │ +99 if(!seen[index]) { │ │ │ │ │ +100 seen[index] = true; │ │ │ │ │ +101 break; │ │ │ │ │ +102 } │ │ │ │ │ +103 } │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +107 │ │ │ │ │ +_1_1_2 _P_o_i_n_t_I_t_e_r_a_t_o_r(const CellIterator& cellit, const CellIterator& cellend, │ │ │ │ │ +113 const IS& is_) │ │ │ │ │ +114 : cornerit(cellit, cellend), is(&is_), seen(is->size(_m_y_d_i_m), false) │ │ │ │ │ +115 { } │ │ │ │ │ +117 │ │ │ │ │ +_1_2_0 _P_o_i_n_t_I_t_e_r_a_t_o_r(const CellIterator& cellend_) │ │ │ │ │ +121 : cornerit(cellend_), is(0) │ │ │ │ │ +122 { } │ │ │ │ │ +123 }; │ │ │ │ │ +124 │ │ │ │ │ +125 } // namespace VTK │ │ │ │ │ +126 │ │ │ │ │ +128 │ │ │ │ │ +129} // namespace Dune │ │ │ │ │ +130 │ │ │ │ │ +131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ │ +_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_c_o_r_n_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ -int & noflines() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_l_i_n_e_n_u_m_b_e_r │ │ │ │ │ -int linenumber() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn boundaryseg.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn boundaryseg.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int │ │ │ │ │ -vtxoffset) │ │ │ │ │ -DDeeffiinniittiioonn boundaryseg.cc:35 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_B_n_d_P_a_r_a_m │ │ │ │ │ -std::pair< int, BoundaryParameter > BndParam │ │ │ │ │ -DDeeffiinniittiioonn boundaryseg.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_E_n_t_i_t_y_K_e_y │ │ │ │ │ -DGFEntityKey< unsigned int > EntityKey │ │ │ │ │ -DDeeffiinniittiioonn boundaryseg.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_n_o_f_b_o_u_n_d │ │ │ │ │ -int nofbound() │ │ │ │ │ -DDeeffiinniittiioonn boundaryseg.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ +simple class representing a corner of a cell │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +iterate over the corners of some cell range │ │ │ │ │ +DDeeffiinniittiioonn corneriterator.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e │ │ │ │ │ +bool isDereferencable() const │ │ │ │ │ +DDeeffiinniittiioonn corneriterator.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +iterate over the points of some corner range │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS │ │ │ │ │ +&is_) │ │ │ │ │ +construct a CornerIterator │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_C_o_r_n_e_r │ │ │ │ │ +VTK::Corner< typename std::remove_const< typename std::iterator_traits< │ │ │ │ │ +CellIterator >::value_type >::type > Corner │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Reference dereference() const │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_D_i_f_f_e_r_e_n_c_e_T_y_p_e │ │ │ │ │ +std::iterator_traits< CellIterator >::difference_type DifferenceType │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_m_y_d_i_m │ │ │ │ │ +static const unsigned mydim │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +PointIterator(const CellIterator &cellend_) │ │ │ │ │ +construct a CornerIterator │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:120 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const DerivedType &other) const │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_e_d_T_y_p_e │ │ │ │ │ +PointIterator< CellIterator, IS > DerivedType │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ +const Corner Value │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_R_e_f_e_r_e_n_c_e │ │ │ │ │ +Value & Reference │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e │ │ │ │ │ +bool isDereferencable() const │ │ │ │ │ +DDeeffiinniittiioonn pointiterator.hh:86 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: periodicfacetrans.hh File Reference │ │ │ │ +dune-grid: subsamplingvtkwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
periodicfacetrans.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
subsamplingvtkwriter.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ + │ │ │ │ +

Provides subsampled file i/o for the visualization toolkit. │ │ │ │ +More...

│ │ │ │ +
#include <ostream>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <dune/common/indent.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/virtualrefinement.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtkwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::PeriodicFaceTransformationBlock
 
class  Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >
 
struct  Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation
class  Dune::SubsamplingVTKWriter< GridView >
 Writer for the output of subsampled grid functions in the vtk format. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const PeriodicFaceTransformationBlock::AffineTransformation &trafo)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Provides subsampled file i/o for the visualization toolkit.

│ │ │ │ +
Author
Jö Fahlke
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +2,34 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_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 │ │ │ │ │ -periodicfacetrans.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +subsamplingvtkwriter.hh File Reference │ │ │ │ │ +Provides subsampled file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_<_ _T_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +class   _D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Writer for the output of subsampled grid functions in the vtk format. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ - _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n &trafo) │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Provides subsampled file i/o for the visualization toolkit. │ │ │ │ │ + Author │ │ │ │ │ + Jö Fahlke │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: periodicfacetrans.hh Source File │ │ │ │ +dune-grid: subsamplingvtkwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,191 +70,408 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
periodicfacetrans.hh
│ │ │ │ +
subsamplingvtkwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace dgf
│ │ │ │ -
18 {
│ │ │ │ -
19
│ │ │ │ -
20 // PeriodicFaceTransformationBlock
│ │ │ │ -
21 // -------------------------------
│ │ │ │ -
22
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 : public BasicBlock
│ │ │ │ -
25 {
│ │ │ │ -
26 template< class T >
│ │ │ │ -
27 class Matrix;
│ │ │ │ -
28
│ │ │ │ - │ │ │ │ -
30
│ │ │ │ -
31 private:
│ │ │ │ -
32 std::vector< AffineTransformation > transformations_;
│ │ │ │ -
33
│ │ │ │ -
34 // copy not implemented
│ │ │ │ - │ │ │ │ -
36
│ │ │ │ -
37 public:
│ │ │ │ -
38 // initialize block and get dimension of world
│ │ │ │ -
39 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
41 const AffineTransformation &transformation ( int i ) const
│ │ │ │ -
42 {
│ │ │ │ -
43 assert( i < numTransformations() );
│ │ │ │ -
44 return transformations_[ i ];
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
47 int numTransformations () const
│ │ │ │ -
48 {
│ │ │ │ -
49 return transformations_.size();
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52 private:
│ │ │ │ -
53 void match ( char what );
│ │ │ │ -
54 };
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
56
│ │ │ │ -
57 // PeriodicFaceTransformationBlock::Matrix
│ │ │ │ -
58 // ---------------------------------------
│ │ │ │ -
59
│ │ │ │ -
60 template< class T >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
62 {
│ │ │ │ -
63 int rows_;
│ │ │ │ -
64 int cols_;
│ │ │ │ -
65 std::vector< T > fields_;
│ │ │ │ -
66
│ │ │ │ -
67 public:
│ │ │ │ -
│ │ │ │ -
68 Matrix ( int rows, int cols )
│ │ │ │ -
69 : rows_( rows ),
│ │ │ │ -
70 cols_( cols ),
│ │ │ │ -
71 fields_( rows * cols )
│ │ │ │ -
72 {}
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
74 const T &operator() ( int i, int j ) const
│ │ │ │ -
75 {
│ │ │ │ -
76 return fields_[ i * cols_ + j ];
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ -
79 T &operator() ( int i, int j )
│ │ │ │ -
80 {
│ │ │ │ -
81 return fields_[ i * cols_ + j ];
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ -
84 int rows () const
│ │ │ │ -
85 {
│ │ │ │ -
86 return rows_;
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ -
89 int cols () const
│ │ │ │ -
90 {
│ │ │ │ -
91 return cols_;
│ │ │ │ -
92 }
│ │ │ │ -
│ │ │ │ -
93 };
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95
│ │ │ │ -
96 // PeriodicFaceTransformationBlock::AffineTransformation
│ │ │ │ -
97 // -----------------------------------------------------
│ │ │ │ -
98
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
100 {
│ │ │ │ - │ │ │ │ -
102 std::vector< double > shift;
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
104 explicit AffineTransformation ( int dimworld )
│ │ │ │ -
105 : matrix( dimworld, dimworld ),
│ │ │ │ -
106 shift( dimworld )
│ │ │ │ -
107 {}
│ │ │ │ -
│ │ │ │ -
108 };
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_SUBSAMPLINGVTKWRITER_HH
│ │ │ │ +
7#define DUNE_SUBSAMPLINGVTKWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10#include <memory>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/indent.hh>
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │ +
14#include <dune/geometry/virtualrefinement.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
24namespace Dune
│ │ │ │ +
25{
│ │ │ │ +
37 template< class GridView >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 : public VTKWriter<GridView>
│ │ │ │ +
40 {
│ │ │ │ + │ │ │ │ +
42 constexpr static int dim = GridView::dimension;
│ │ │ │ +
43 constexpr static int dimw = GridView::dimensionworld;
│ │ │ │ +
44 typedef typename GridView::Grid::ctype ctype;
│ │ │ │ +
45 typedef typename GridView::template Codim< 0 >::Entity Entity;
│ │ │ │ +
46 typedef VirtualRefinement<dim, ctype> Refinement;
│ │ │ │ +
47 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ +
48 typedef typename Refinement::ElementIterator SubElementIterator;
│ │ │ │ +
49 typedef typename Refinement::VertexIterator SubVertexIterator;
│ │ │ │ +
50
│ │ │ │ +
51 typedef typename Base::CellIterator CellIterator;
│ │ │ │ +
52 typedef typename Base::FunctionIterator FunctionIterator;
│ │ │ │ +
53 using Base::cellBegin;
│ │ │ │ +
54 using Base::cellEnd;
│ │ │ │ +
55 using Base::celldata;
│ │ │ │ +
56 using Base::ncells;
│ │ │ │ +
57 using Base::ncorners;
│ │ │ │ +
58 using Base::nvertices;
│ │ │ │ +
59 using Base::outputtype;
│ │ │ │ + │ │ │ │ +
61 using Base::vertexEnd;
│ │ │ │ +
62 using Base::vertexdata;
│ │ │ │ +
63
│ │ │ │ +
64 public:
│ │ │ │ +
│ │ │ │ +
80 explicit SubsamplingVTKWriter (const GridView &gridView,
│ │ │ │ +
81 Dune::RefinementIntervals intervals_, bool coerceToSimplex_ = false,
│ │ │ │ + │ │ │ │ +
83 : Base(gridView, VTK::nonconforming, coordPrecision)
│ │ │ │ +
84 , intervals(intervals_), coerceToSimplex(coerceToSimplex_)
│ │ │ │ +
85 {
│ │ │ │ +
86 if(intervals_.intervals() < 1) {
│ │ │ │ +
87 DUNE_THROW(Dune::IOError,"SubsamplingVTKWriter: Refinement intervals must be larger than zero! (One interval means no subsampling)");
│ │ │ │ +
88 }
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
91 private:
│ │ │ │ +
92 GeometryType subsampledGeometryType(GeometryType geometryType)
│ │ │ │ +
93 {
│ │ │ │ +
94 return (geometryType.isCube() && !coerceToSimplex ? geometryType : GeometryTypes::simplex(dim));
│ │ │ │ +
95 }
│ │ │ │ +
96
│ │ │ │ +
97 template<typename SubIterator>
│ │ │ │ +
98 struct IteratorSelector
│ │ │ │ +
99 {};
│ │ │ │ +
100
│ │ │ │ +
101 SubElementIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
│ │ │ │ +
102 {
│ │ │ │ +
103 return refinement.eBegin(intervals);
│ │ │ │ +
104 }
│ │ │ │ +
105
│ │ │ │ +
106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
│ │ │ │ +
107 {
│ │ │ │ +
108 return refinement.vBegin(intervals);
│ │ │ │ +
109 }
│ │ │ │
110
│ │ │ │ -
│ │ │ │ -
111 inline std::ostream &
│ │ │ │ - │ │ │ │ -
113 {
│ │ │ │ -
114 for( int i = 0; i < trafo.matrix.rows(); ++i )
│ │ │ │ -
115 {
│ │ │ │ -
116 out << (i > 0 ? ", " : "");
│ │ │ │ -
117 for( int j = 0; j < trafo.matrix.cols(); ++j )
│ │ │ │ -
118 out << (j > 0 ? " " : "") << trafo.matrix( i, j );
│ │ │ │ -
119 }
│ │ │ │ -
120 out << " +";
│ │ │ │ -
121 for( unsigned int i = 0; i < trafo.shift.size(); ++i )
│ │ │ │ -
122 out << " " << trafo.shift[ i ];
│ │ │ │ -
123 return out;
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
126 } // end namespace dgf
│ │ │ │ -
127
│ │ │ │ -
128} // end namespace Dune
│ │ │ │ -
129
│ │ │ │ -
130#endif
│ │ │ │ - │ │ │ │ +
111 SubElementIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
│ │ │ │ +
112 {
│ │ │ │ +
113 return refinement.eEnd(intervals);
│ │ │ │ +
114 }
│ │ │ │ +
115
│ │ │ │ +
116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
│ │ │ │ +
117 {
│ │ │ │ +
118 return refinement.vEnd(intervals);
│ │ │ │ +
119 }
│ │ │ │ +
120
│ │ │ │ +
121 template<typename Data, typename Iterator, typename SubIterator>
│ │ │ │ +
122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries, IteratorSelector<SubIterator> sis)
│ │ │ │ +
123 {
│ │ │ │ +
124 for (auto it = data.begin(),
│ │ │ │ +
125 iend = data.end();
│ │ │ │ +
126 it != iend;
│ │ │ │ +
127 ++it)
│ │ │ │ +
128 {
│ │ │ │ +
129 const auto& f = *it;
│ │ │ │ +
130 VTK::FieldInfo fieldInfo = f.fieldInfo();
│ │ │ │ +
131 std::size_t writecomps = fieldInfo.size();
│ │ │ │ +
132 switch (fieldInfo.type())
│ │ │ │ +
133 {
│ │ │ │ + │ │ │ │ +
135 break;
│ │ │ │ + │ │ │ │ +
137 // vtk file format: a vector data always should have 3 comps (with
│ │ │ │ +
138 // 3rd comp = 0 in 2D case)
│ │ │ │ +
139 if (writecomps > 3)
│ │ │ │ +
140 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
│ │ │ │ +
141 writecomps = 3;
│ │ │ │ +
142 break;
│ │ │ │ + │ │ │ │ +
144 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet");
│ │ │ │ +
145 }
│ │ │ │ +
146 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ +
147 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision()));
│ │ │ │ +
148 if(!p->writeIsNoop())
│ │ │ │ +
149 for (Iterator eit = begin; eit!=end; ++eit)
│ │ │ │ +
150 {
│ │ │ │ +
151 const Entity & e = *eit;
│ │ │ │ +
152 f.bind(e);
│ │ │ │ +
153 Refinement &refinement =
│ │ │ │ +
154 buildRefinement<dim, ctype>(eit->type(),
│ │ │ │ +
155 subsampledGeometryType(eit->type()));
│ │ │ │ +
156 for(SubIterator sit = refinementBegin(refinement,intervals,sis),
│ │ │ │ +
157 send = refinementEnd(refinement,intervals,sis);
│ │ │ │ +
158 sit != send;
│ │ │ │ +
159 ++sit)
│ │ │ │ +
160 {
│ │ │ │ +
161 f.write(sit.coords(),*p);
│ │ │ │ +
162 // expand 2D-Vectors to 3D for VTK format
│ │ │ │ +
163 for(unsigned j = f.fieldInfo().size(); j < writecomps; j++)
│ │ │ │ +
164 p->write(0.0);
│ │ │ │ +
165 }
│ │ │ │ +
166 f.unbind();
│ │ │ │ +
167 }
│ │ │ │ +
168 }
│ │ │ │ +
169 }
│ │ │ │ +
170
│ │ │ │ +
171
│ │ │ │ +
172 protected:
│ │ │ │ +
174 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_);
│ │ │ │ +
175
│ │ │ │ +
177 virtual void writeCellData(VTK::VTUWriter& writer);
│ │ │ │ +
178
│ │ │ │ +
180 virtual void writeVertexData(VTK::VTUWriter& writer);
│ │ │ │ +
181
│ │ │ │ +
183 virtual void writeGridPoints(VTK::VTUWriter& writer);
│ │ │ │ +
184
│ │ │ │ +
186 virtual void writeGridCells(VTK::VTUWriter& writer);
│ │ │ │ +
187
│ │ │ │ +
188 public:
│ │ │ │ + │ │ │ │ +
190 using Base::addCellData;
│ │ │ │ +
191
│ │ │ │ +
192 private:
│ │ │ │ +
193 // hide addVertexData -- adding raw data directly without a VTKFunction
│ │ │ │ +
194 // currently does not make sense for subsampled meshes, as the higher order
│ │ │ │ +
195 // information is missing. See FS#676.
│ │ │ │ +
196 template<class V>
│ │ │ │ +
197 void addVertexData (const V& v, const std::string &name, int ncomps=1);
│ │ │ │ +
198 template<class V>
│ │ │ │ +
199 void addCellData (const V& v, const std::string &name, int ncomps=1);
│ │ │ │ +
200
│ │ │ │ +
201 Dune::RefinementIntervals intervals;
│ │ │ │ +
202 bool coerceToSimplex;
│ │ │ │ +
203 };
│ │ │ │ +
│ │ │ │ +
204
│ │ │ │ +
206 template <class GridView>
│ │ │ │ +
│ │ │ │ +
207 void SubsamplingVTKWriter<GridView>::countEntities(int &nvertices_, int &ncells_, int &ncorners_)
│ │ │ │ +
208 {
│ │ │ │ +
209 nvertices_ = 0;
│ │ │ │ +
210 ncells_ = 0;
│ │ │ │ +
211 ncorners_ = 0;
│ │ │ │ +
212 for (CellIterator it=this->cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
213 {
│ │ │ │ +
214 Refinement &refinement = buildRefinement<dim, ctype>(it->type(), subsampledGeometryType(it->type()));
│ │ │ │ +
215
│ │ │ │ +
216 ncells_ += refinement.nElements(intervals);
│ │ │ │ +
217 nvertices_ += refinement.nVertices(intervals);
│ │ │ │ +
218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin(intervals).vertexIndices().size();
│ │ │ │ +
219 }
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221
│ │ │ │ +
222
│ │ │ │ +
224 template <class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
226 {
│ │ │ │ +
227 if(celldata.size() == 0)
│ │ │ │ +
228 return;
│ │ │ │ +
229
│ │ │ │ +
230 // Find the names of the first scalar and vector data fields.
│ │ │ │ +
231 // These will be marked as the default fields (the ones that ParaView shows
│ │ │ │ +
232 // when the file has just been opened).
│ │ │ │ +
233 std::string defaultScalarField, defaultVectorField;
│ │ │ │ +
234 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames(celldata);
│ │ │ │ +
235
│ │ │ │ +
236 writer.beginCellData(defaultScalarField, defaultVectorField);
│ │ │ │ +
237 writeData(writer,celldata,cellBegin(),cellEnd(),ncells,IteratorSelector<SubElementIterator>());
│ │ │ │ +
238 writer.endCellData();
│ │ │ │ +
239 }
│ │ │ │ +
│ │ │ │ +
240
│ │ │ │ +
242 template <class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
244 {
│ │ │ │ +
245 if(vertexdata.size() == 0)
│ │ │ │ +
246 return;
│ │ │ │ +
247
│ │ │ │ +
248 // Find the names of the first scalar and vector data fields.
│ │ │ │ +
249 // These will be marked as the default fields (the ones that ParaView shows
│ │ │ │ +
250 // when the file has just been opened).
│ │ │ │ +
251 std::string defaultScalarField, defaultVectorField;
│ │ │ │ +
252 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames(vertexdata);
│ │ │ │ +
253
│ │ │ │ +
254 writer.beginPointData(defaultScalarField, defaultVectorField);
│ │ │ │ +
255 writeData(writer,vertexdata,cellBegin(),cellEnd(),nvertices,IteratorSelector<SubVertexIterator>());
│ │ │ │ +
256 writer.endPointData();
│ │ │ │ +
257 }
│ │ │ │ +
│ │ │ │ +
258
│ │ │ │ +
260 template <class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
262 {
│ │ │ │ +
263 writer.beginPoints();
│ │ │ │ +
264
│ │ │ │ +
265 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ +
266 (writer.makeArrayWriter("Coordinates", 3, nvertices, this->coordPrecision()));
│ │ │ │ +
267 if(!p->writeIsNoop())
│ │ │ │ +
268 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
│ │ │ │ +
269 {
│ │ │ │ +
270 Refinement &refinement =
│ │ │ │ +
271 buildRefinement<dim, ctype>(i->type(),
│ │ │ │ +
272 subsampledGeometryType(i->type()));
│ │ │ │ +
273 for(SubVertexIterator sit = refinement.vBegin(intervals),
│ │ │ │ +
274 send = refinement.vEnd(intervals);
│ │ │ │ +
275 sit != send; ++sit)
│ │ │ │ +
276 {
│ │ │ │ +
277 FieldVector<ctype, dimw> coords = i->geometry().global(sit.coords());
│ │ │ │ +
278 for (int j=0; j<std::min(int(dimw),3); j++)
│ │ │ │ +
279 p->write(coords[j]);
│ │ │ │ +
280 for (int j=std::min(int(dimw),3); j<3; j++)
│ │ │ │ +
281 p->write(0.0);
│ │ │ │ +
282 }
│ │ │ │ +
283 }
│ │ │ │ +
284 // free the VTK::DataArrayWriter before touching the stream
│ │ │ │ +
285 p.reset();
│ │ │ │ +
286
│ │ │ │ +
287 writer.endPoints();
│ │ │ │ +
288 }
│ │ │ │ +
│ │ │ │ +
289
│ │ │ │ +
291 template <class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
293 {
│ │ │ │ +
294 writer.beginCells();
│ │ │ │ +
295
│ │ │ │ +
296 // connectivity
│ │ │ │ +
297 {
│ │ │ │ +
298 std::shared_ptr<VTK::DataArrayWriter> p1
│ │ │ │ +
299 (writer.makeArrayWriter("connectivity", 1, ncorners, VTK::Precision::int32));
│ │ │ │ +
300 // The offset within the index numbering
│ │ │ │ +
301 if(!p1->writeIsNoop()) {
│ │ │ │ +
302 int offset = 0;
│ │ │ │ +
303 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
│ │ │ │ +
304 {
│ │ │ │ +
305 GeometryType coercedToType = subsampledGeometryType(i->type());
│ │ │ │ +
306 Refinement &refinement =
│ │ │ │ +
307 buildRefinement<dim, ctype>(i->type(), coercedToType);
│ │ │ │ +
308 for(SubElementIterator sit = refinement.eBegin(intervals),
│ │ │ │ +
309 send = refinement.eEnd(intervals);
│ │ │ │ +
310 sit != send; ++sit)
│ │ │ │ +
311 {
│ │ │ │ +
312 IndexVector indices = sit.vertexIndices();
│ │ │ │ +
313 for(unsigned int ii = 0; ii < indices.size(); ++ii)
│ │ │ │ +
314 p1->write(offset+indices[VTK::renumber(coercedToType, ii)]);
│ │ │ │ +
315 }
│ │ │ │ +
316 offset += refinement.nVertices(intervals);
│ │ │ │ +
317 }
│ │ │ │ +
318 }
│ │ │ │ +
319 }
│ │ │ │ +
320
│ │ │ │ +
321 // offsets
│ │ │ │ +
322 {
│ │ │ │ +
323 std::shared_ptr<VTK::DataArrayWriter> p2
│ │ │ │ +
324 (writer.makeArrayWriter("offsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ +
325 if(!p2->writeIsNoop()) {
│ │ │ │ +
326 // The offset into the connectivity array
│ │ │ │ +
327 int offset = 0;
│ │ │ │ +
328 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
│ │ │ │ +
329 {
│ │ │ │ +
330 Refinement &refinement =
│ │ │ │ +
331 buildRefinement<dim, ctype>(i->type(),
│ │ │ │ +
332 subsampledGeometryType(i->type()));
│ │ │ │ +
333 unsigned int verticesPerCell =
│ │ │ │ +
334 refinement.eBegin(intervals).vertexIndices().size();
│ │ │ │ +
335 for(int element = 0; element < refinement.nElements(intervals);
│ │ │ │ +
336 ++element)
│ │ │ │ +
337 {
│ │ │ │ +
338 offset += verticesPerCell;
│ │ │ │ +
339 p2->write(offset);
│ │ │ │ +
340 }
│ │ │ │ +
341 }
│ │ │ │ +
342 }
│ │ │ │ +
343 }
│ │ │ │ +
344
│ │ │ │ +
345 // types
│ │ │ │ +
346 if (dim>1)
│ │ │ │ +
347 {
│ │ │ │ +
348 std::shared_ptr<VTK::DataArrayWriter> p3
│ │ │ │ +
349 (writer.makeArrayWriter("types", 1, ncells, VTK::Precision::uint8));
│ │ │ │ +
350 if(!p3->writeIsNoop())
│ │ │ │ +
351 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
352 {
│ │ │ │ +
353 GeometryType coerceTo = subsampledGeometryType(it->type());
│ │ │ │ +
354 Refinement &refinement =
│ │ │ │ +
355 buildRefinement<dim, ctype>(it->type(), coerceTo);
│ │ │ │ +
356 int vtktype = VTK::geometryType(coerceTo);
│ │ │ │ +
357 for(int i = 0; i < refinement.nElements(intervals); ++i)
│ │ │ │ +
358 p3->write(vtktype);
│ │ │ │ +
359 }
│ │ │ │ +
360 }
│ │ │ │ +
361
│ │ │ │ +
362 writer.endCells();
│ │ │ │ +
363 }
│ │ │ │ +
│ │ │ │ +
364}
│ │ │ │ +
365
│ │ │ │ +
366#endif // DUNE_SUBSAMPLINGVTKWRITER_HH
│ │ │ │ +
Provides file i/o for the visualization toolkit.
│ │ │ │ + │ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:151
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
Definition interval.hh:123
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
Definition periodicfacetrans.hh:25
│ │ │ │ -
int numTransformations() const
Definition periodicfacetrans.hh:47
│ │ │ │ -
const AffineTransformation & transformation(int i) const
Definition periodicfacetrans.hh:41
│ │ │ │ -
Definition periodicfacetrans.hh:62
│ │ │ │ -
int rows() const
Definition periodicfacetrans.hh:84
│ │ │ │ -
const T & operator()(int i, int j) const
Definition periodicfacetrans.hh:74
│ │ │ │ -
int cols() const
Definition periodicfacetrans.hh:89
│ │ │ │ -
Matrix(int rows, int cols)
Definition periodicfacetrans.hh:68
│ │ │ │ - │ │ │ │ -
Matrix< double > matrix
Definition periodicfacetrans.hh:101
│ │ │ │ -
std::vector< double > shift
Definition periodicfacetrans.hh:102
│ │ │ │ -
AffineTransformation(int dimworld)
Definition periodicfacetrans.hh:104
│ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ +
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ +
@ tensor
tensor field (always 3x3)
│ │ │ │ +
@ vector
vector-valued field (always 3D, will be padded if necessary)
│ │ │ │ + │ │ │ │ +
Writer for the output of subsampled grid functions in the vtk format.
Definition subsamplingvtkwriter.hh:40
│ │ │ │ +
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition subsamplingvtkwriter.hh:261
│ │ │ │ +
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition subsamplingvtkwriter.hh:243
│ │ │ │ +
SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK::Precision::float32)
Construct a SubsamplingVTKWriter working on a specific GridView.
Definition subsamplingvtkwriter.hh:80
│ │ │ │ +
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition subsamplingvtkwriter.hh:207
│ │ │ │ +
virtual void writeCellData(VTK::VTUWriter &writer)
write cell data
Definition subsamplingvtkwriter.hh:225
│ │ │ │ +
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition subsamplingvtkwriter.hh:292
│ │ │ │ +
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ +
VertexIterator vertexBegin() const
Definition vtkwriter.hh:508
│ │ │ │ +
void addVertexData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the vertices of the grid to the visualization.
Definition vtkwriter.hh:713
│ │ │ │ +
CellIterator cellEnd() const
Definition vtkwriter.hh:402
│ │ │ │ +
std::list< VTKLocalFunction > vertexdata
Definition vtkwriter.hh:1585
│ │ │ │ +
void addCellData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the cells of the grid to the visualization.
Definition vtkwriter.hh:649
│ │ │ │ +
CellIterator cellBegin() const
Definition vtkwriter.hh:397
│ │ │ │ +
VTK::OutputType outputtype
Definition vtkwriter.hh:1609
│ │ │ │ +
std::list< VTKLocalFunction > celldata
Definition vtkwriter.hh:1584
│ │ │ │ +
VTK::Precision coordPrecision() const
get the precision with which coordinates are written out
Definition vtkwriter.hh:782
│ │ │ │ +
std::list< VTKLocalFunction >::const_iterator FunctionIterator
Definition vtkwriter.hh:376
│ │ │ │ +
int nvertices
Definition vtkwriter.hh:1592
│ │ │ │ +
int ncells
Definition vtkwriter.hh:1591
│ │ │ │ +
VertexIterator vertexEnd() const
Definition vtkwriter.hh:515
│ │ │ │ +
int ncorners
Definition vtkwriter.hh:1593
│ │ │ │ +
Iterator over the grids elements.
Definition vtkwriter.hh:385
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ +
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ +
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ +
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ +
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ +
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ +
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ +
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ +
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ +
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,189 +2,527 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -periodicfacetrans.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +subsamplingvtkwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 namespace dgf │ │ │ │ │ -18 { │ │ │ │ │ -19 │ │ │ │ │ -20 // PeriodicFaceTransformationBlock │ │ │ │ │ -21 // ------------------------------- │ │ │ │ │ -22 │ │ │ │ │ -_2_3 struct _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ -24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -25 { │ │ │ │ │ -26 template< class T > │ │ │ │ │ -27 class _M_a_t_r_i_x; │ │ │ │ │ -28 │ │ │ │ │ -29 struct _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n; │ │ │ │ │ -30 │ │ │ │ │ -31 private: │ │ │ │ │ -32 std::vector< AffineTransformation > transformations_; │ │ │ │ │ -33 │ │ │ │ │ -34 // copy not implemented │ │ │ │ │ -35 _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k ( const _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k & ); │ │ │ │ │ -36 │ │ │ │ │ -37 public: │ │ │ │ │ -38 // initialize block and get dimension of world │ │ │ │ │ -39 _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k ( std::istream &in, int dimworld ); │ │ │ │ │ -40 │ │ │ │ │ -_4_1 const _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n &_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int i ) const │ │ │ │ │ -42 { │ │ │ │ │ -43 assert( i < _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s() ); │ │ │ │ │ -44 return transformations_[ i ]; │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -_4_7 int _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s () const │ │ │ │ │ -48 { │ │ │ │ │ -49 return transformations_.size(); │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -52 private: │ │ │ │ │ -53 void match ( char what ); │ │ │ │ │ -54 }; │ │ │ │ │ -55 │ │ │ │ │ -56 │ │ │ │ │ -57 // PeriodicFaceTransformationBlock::Matrix │ │ │ │ │ -58 // --------------------------------------- │ │ │ │ │ -59 │ │ │ │ │ -60 template< class T > │ │ │ │ │ -_6_1 class _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x │ │ │ │ │ -62 { │ │ │ │ │ -63 int rows_; │ │ │ │ │ -64 int cols_; │ │ │ │ │ -65 std::vector< T > fields_; │ │ │ │ │ -66 │ │ │ │ │ -67 public: │ │ │ │ │ -_6_8 _M_a_t_r_i_x ( int _r_o_w_s, int _c_o_l_s ) │ │ │ │ │ -69 : rows_( _r_o_w_s ), │ │ │ │ │ -70 cols_( _c_o_l_s ), │ │ │ │ │ -71 fields_( _r_o_w_s * _c_o_l_s ) │ │ │ │ │ -72 {} │ │ │ │ │ -73 │ │ │ │ │ -_7_4 const T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) const │ │ │ │ │ -75 { │ │ │ │ │ -76 return fields_[ i * cols_ + j ]; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -_7_9 T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) │ │ │ │ │ -80 { │ │ │ │ │ -81 return fields_[ i * cols_ + j ]; │ │ │ │ │ -82 } │ │ │ │ │ -83 │ │ │ │ │ -_8_4 int _r_o_w_s () const │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_SUBSAMPLINGVTKWRITER_HH │ │ │ │ │ +7#define DUNE_SUBSAMPLINGVTKWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +24namespace _D_u_n_e │ │ │ │ │ +25{ │ │ │ │ │ +37 template< class GridView > │ │ │ │ │ +_3_8 class _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r │ │ │ │ │ +39 : public _V_T_K_W_r_i_t_e_r │ │ │ │ │ +40 { │ │ │ │ │ +41 typedef _V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> _B_a_s_e; │ │ │ │ │ +42 constexpr static int dim = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +43 constexpr static int dimw = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +44 typedef typename GridView::Grid::ctype ctype; │ │ │ │ │ +45 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Entity; │ │ │ │ │ +46 typedef VirtualRefinement Refinement; │ │ │ │ │ +47 typedef typename Refinement::IndexVector IndexVector; │ │ │ │ │ +48 typedef typename Refinement::ElementIterator SubElementIterator; │ │ │ │ │ +49 typedef typename Refinement::VertexIterator SubVertexIterator; │ │ │ │ │ +50 │ │ │ │ │ +51 typedef typename _B_a_s_e_:_:_C_e_l_l_I_t_e_r_a_t_o_r _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +52 typedef typename _B_a_s_e_:_:_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r FunctionIterator; │ │ │ │ │ +53 using _B_a_s_e_:_:_c_e_l_l_B_e_g_i_n; │ │ │ │ │ +54 using _B_a_s_e_:_:_c_e_l_l_E_n_d; │ │ │ │ │ +55 using _B_a_s_e_:_:_c_e_l_l_d_a_t_a; │ │ │ │ │ +56 using _B_a_s_e_:_:_n_c_e_l_l_s; │ │ │ │ │ +57 using _B_a_s_e_:_:_n_c_o_r_n_e_r_s; │ │ │ │ │ +58 using _B_a_s_e_:_:_n_v_e_r_t_i_c_e_s; │ │ │ │ │ +59 using _B_a_s_e_:_:_o_u_t_p_u_t_t_y_p_e; │ │ │ │ │ +60 using _B_a_s_e_:_:_v_e_r_t_e_x_B_e_g_i_n; │ │ │ │ │ +61 using _B_a_s_e_:_:_v_e_r_t_e_x_E_n_d; │ │ │ │ │ +62 using _B_a_s_e_:_:_v_e_r_t_e_x_d_a_t_a; │ │ │ │ │ +63 │ │ │ │ │ +64 public: │ │ │ │ │ +_8_0 explicit _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r (const _G_r_i_d_V_i_e_w &gridView, │ │ │ │ │ +81 Dune::RefinementIntervals intervals_, bool coerceToSimplex_ = false, │ │ │ │ │ +82 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _c_o_o_r_d_P_r_e_c_i_s_i_o_n = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +83 : _B_a_s_e(gridView, VTK::nonconforming, _c_o_o_r_d_P_r_e_c_i_s_i_o_n) │ │ │ │ │ +84 , intervals(intervals_), coerceToSimplex(coerceToSimplex_) │ │ │ │ │ 85 { │ │ │ │ │ -86 return rows_; │ │ │ │ │ -87 } │ │ │ │ │ -88 │ │ │ │ │ -_8_9 int _c_o_l_s () const │ │ │ │ │ -90 { │ │ │ │ │ -91 return cols_; │ │ │ │ │ -92 } │ │ │ │ │ -93 }; │ │ │ │ │ -94 │ │ │ │ │ -95 │ │ │ │ │ -96 // PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ -97 // ----------------------------------------------------- │ │ │ │ │ -98 │ │ │ │ │ -_9_9 struct _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -100 { │ │ │ │ │ -_1_0_1 _M_a_t_r_i_x_<_ _d_o_u_b_l_e_ _> _m_a_t_r_i_x; │ │ │ │ │ -_1_0_2 std::vector< double > _s_h_i_f_t; │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 explicit _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( int dimworld ) │ │ │ │ │ -105 : _m_a_t_r_i_x( dimworld, dimworld ), │ │ │ │ │ -106 _s_h_i_f_t( dimworld ) │ │ │ │ │ -107 {} │ │ │ │ │ -108 }; │ │ │ │ │ -109 │ │ │ │ │ +86 if(intervals_.intervals() < 1) { │ │ │ │ │ +87 DUNE_THROW(Dune::IOError,"SubsamplingVTKWriter: Refinement intervals must be │ │ │ │ │ +larger than zero! (One interval means no subsampling)"); │ │ │ │ │ +88 } │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +91 private: │ │ │ │ │ +92 GeometryType subsampledGeometryType(GeometryType geometryType) │ │ │ │ │ +93 { │ │ │ │ │ +94 return (geometryType.isCube() && !coerceToSimplex ? geometryType : │ │ │ │ │ +GeometryTypes::simplex(dim)); │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97 template │ │ │ │ │ +98 struct IteratorSelector │ │ │ │ │ +99 {}; │ │ │ │ │ +100 │ │ │ │ │ +101 SubElementIterator refinementBegin(const Refinement& refinement, Dune:: │ │ │ │ │ +RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ +102 { │ │ │ │ │ +103 return refinement.eBegin(intervals); │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune:: │ │ │ │ │ +RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ +107 { │ │ │ │ │ +108 return refinement.vBegin(intervals); │ │ │ │ │ +109 } │ │ │ │ │ 110 │ │ │ │ │ -_1_1_1 inline std::ostream & │ │ │ │ │ -112 _o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_: │ │ │ │ │ -_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n &trafo ) │ │ │ │ │ -113 { │ │ │ │ │ -114 for( int i = 0; i < trafo._m_a_t_r_i_x._r_o_w_s(); ++i ) │ │ │ │ │ -115 { │ │ │ │ │ -116 out << (i > 0 ? ", " : ""); │ │ │ │ │ -117 for( int j = 0; j < trafo._m_a_t_r_i_x._c_o_l_s(); ++j ) │ │ │ │ │ -118 out << (j > 0 ? " " : "") << trafo._m_a_t_r_i_x( i, j ); │ │ │ │ │ +111 SubElementIterator refinementEnd(const Refinement& refinement, Dune:: │ │ │ │ │ +RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ +112 { │ │ │ │ │ +113 return refinement.eEnd(intervals); │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune:: │ │ │ │ │ +RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ +117 { │ │ │ │ │ +118 return refinement.vEnd(intervals); │ │ │ │ │ 119 } │ │ │ │ │ -120 out << " +"; │ │ │ │ │ -121 for( unsigned int i = 0; i < trafo._s_h_i_f_t.size(); ++i ) │ │ │ │ │ -122 out << " " << trafo._s_h_i_f_t[ i ]; │ │ │ │ │ -123 return out; │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -126 } // end namespace dgf │ │ │ │ │ -127 │ │ │ │ │ -128} // end namespace Dune │ │ │ │ │ -129 │ │ │ │ │ -130#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +120 │ │ │ │ │ +121 template │ │ │ │ │ +122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator │ │ │ │ │ +begin, const Iterator end, int nentries, IteratorSelector sis) │ │ │ │ │ +123 { │ │ │ │ │ +124 for (auto it = data.begin(), │ │ │ │ │ +125 iend = data.end(); │ │ │ │ │ +126 it != iend; │ │ │ │ │ +127 ++it) │ │ │ │ │ +128 { │ │ │ │ │ +129 const auto& f = *it; │ │ │ │ │ +130 VTK::FieldInfo fieldInfo = f.fieldInfo(); │ │ │ │ │ +131 std::size_t writecomps = fieldInfo.size(); │ │ │ │ │ +132 switch (fieldInfo.type()) │ │ │ │ │ +133 { │ │ │ │ │ +134 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r: │ │ │ │ │ +135 break; │ │ │ │ │ +136 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r: │ │ │ │ │ +137 // vtk file format: a vector data always should have 3 comps (with │ │ │ │ │ +138 // 3rd comp = 0 in 2D case) │ │ │ │ │ +139 if (writecomps > 3) │ │ │ │ │ +140 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components │ │ │ │ │ +(components was " << writecomps << ")"); │ │ │ │ │ +141 writecomps = 3; │ │ │ │ │ +142 break; │ │ │ │ │ +143 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r: │ │ │ │ │ +144 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet"); │ │ │ │ │ +145 } │ │ │ │ │ +146 std::shared_ptr p │ │ │ │ │ +147 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision │ │ │ │ │ +())); │ │ │ │ │ +148 if(!p->writeIsNoop()) │ │ │ │ │ +149 for (Iterator eit = begin; eit!=end; ++eit) │ │ │ │ │ +150 { │ │ │ │ │ +151 const Entity & e = *eit; │ │ │ │ │ +152 f.bind(e); │ │ │ │ │ +153 Refinement &refinement = │ │ │ │ │ +154 buildRefinement(eit->type(), │ │ │ │ │ +155 subsampledGeometryType(eit->type())); │ │ │ │ │ +156 for(SubIterator sit = refinementBegin(refinement,intervals,sis), │ │ │ │ │ +157 send = refinementEnd(refinement,intervals,sis); │ │ │ │ │ +158 sit != send; │ │ │ │ │ +159 ++sit) │ │ │ │ │ +160 { │ │ │ │ │ +161 f.write(sit.coords(),*p); │ │ │ │ │ +162 // expand 2D-Vectors to 3D for VTK format │ │ │ │ │ +163 for(unsigned j = f.fieldInfo().size(); j < writecomps; j++) │ │ │ │ │ +164 p->write(0.0); │ │ │ │ │ +165 } │ │ │ │ │ +166 f.unbind(); │ │ │ │ │ +167 } │ │ │ │ │ +168 } │ │ │ │ │ +169 } │ │ │ │ │ +170 │ │ │ │ │ +171 │ │ │ │ │ +172 protected: │ │ │ │ │ +174 virtual void _c_o_u_n_t_E_n_t_i_t_i_e_s(int &nvertices_, int &ncells_, int &ncorners_); │ │ │ │ │ +175 │ │ │ │ │ +177 virtual void _w_r_i_t_e_C_e_l_l_D_a_t_a(VTK::VTUWriter& writer); │ │ │ │ │ +178 │ │ │ │ │ +180 virtual void _w_r_i_t_e_V_e_r_t_e_x_D_a_t_a(VTK::VTUWriter& writer); │ │ │ │ │ +181 │ │ │ │ │ +183 virtual void _w_r_i_t_e_G_r_i_d_P_o_i_n_t_s(VTK::VTUWriter& writer); │ │ │ │ │ +184 │ │ │ │ │ +186 virtual void _w_r_i_t_e_G_r_i_d_C_e_l_l_s(VTK::VTUWriter& writer); │ │ │ │ │ +187 │ │ │ │ │ +188 public: │ │ │ │ │ +189 using _B_a_s_e_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a; │ │ │ │ │ +190 using _B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a; │ │ │ │ │ +191 │ │ │ │ │ +192 private: │ │ │ │ │ +193 // hide addVertexData -- adding raw data directly without a VTKFunction │ │ │ │ │ +194 // currently does not make sense for subsampled meshes, as the higher order │ │ │ │ │ +195 // information is missing. See FS#676. │ │ │ │ │ +196 template │ │ │ │ │ +197 void addVertexData (const V& v, const std::string &name, int ncomps=1); │ │ │ │ │ +198 template │ │ │ │ │ +199 void addCellData (const V& v, const std::string &name, int ncomps=1); │ │ │ │ │ +200 │ │ │ │ │ +201 Dune::RefinementIntervals intervals; │ │ │ │ │ +202 bool coerceToSimplex; │ │ │ │ │ +203 }; │ │ │ │ │ +204 │ │ │ │ │ +206 template │ │ │ │ │ +_2_0_7 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_c_o_u_n_t_E_n_t_i_t_i_e_s(int &nvertices_, int │ │ │ │ │ +&ncells_, int &ncorners_) │ │ │ │ │ +208 { │ │ │ │ │ +209 nvertices_ = 0; │ │ │ │ │ +210 ncells_ = 0; │ │ │ │ │ +211 ncorners_ = 0; │ │ │ │ │ +212 for (_C_e_l_l_I_t_e_r_a_t_o_r it=this->cellBegin(); it!=cellEnd(); ++it) │ │ │ │ │ +213 { │ │ │ │ │ +214 Refinement &refinement = buildRefinement(it->type(), │ │ │ │ │ +subsampledGeometryType(it->type())); │ │ │ │ │ +215 │ │ │ │ │ +216 ncells_ += refinement.nElements(intervals); │ │ │ │ │ +217 nvertices_ += refinement.nVertices(intervals); │ │ │ │ │ +218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin │ │ │ │ │ +(intervals).vertexIndices().size(); │ │ │ │ │ +219 } │ │ │ │ │ +220 } │ │ │ │ │ +221 │ │ │ │ │ +222 │ │ │ │ │ +224 template │ │ │ │ │ +_2_2_5 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +226 { │ │ │ │ │ +227 if(celldata.size() == 0) │ │ │ │ │ +228 return; │ │ │ │ │ +229 │ │ │ │ │ +230 // Find the names of the first scalar and vector data fields. │ │ │ │ │ +231 // These will be marked as the default fields (the ones that ParaView shows │ │ │ │ │ +232 // when the file has just been opened). │ │ │ │ │ +233 std::string defaultScalarField, defaultVectorField; │ │ │ │ │ +234 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames │ │ │ │ │ +(celldata); │ │ │ │ │ +235 │ │ │ │ │ +236 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(defaultScalarField, defaultVectorField); │ │ │ │ │ +237 writeData(writer,celldata,cellBegin(),cellEnd │ │ │ │ │ +(),ncells,IteratorSelector()); │ │ │ │ │ +238 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +239 } │ │ │ │ │ +240 │ │ │ │ │ +242 template │ │ │ │ │ +_2_4_3 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_V_e_r_t_e_x_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& │ │ │ │ │ +writer) │ │ │ │ │ +244 { │ │ │ │ │ +245 if(vertexdata.size() == 0) │ │ │ │ │ +246 return; │ │ │ │ │ +247 │ │ │ │ │ +248 // Find the names of the first scalar and vector data fields. │ │ │ │ │ +249 // These will be marked as the default fields (the ones that ParaView shows │ │ │ │ │ +250 // when the file has just been opened). │ │ │ │ │ +251 std::string defaultScalarField, defaultVectorField; │ │ │ │ │ +252 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames │ │ │ │ │ +(vertexdata); │ │ │ │ │ +253 │ │ │ │ │ +254 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(defaultScalarField, defaultVectorField); │ │ │ │ │ +255 writeData(writer,vertexdata,cellBegin(),cellEnd │ │ │ │ │ +(),nvertices,IteratorSelector()); │ │ │ │ │ +256 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +257 } │ │ │ │ │ +258 │ │ │ │ │ +260 template │ │ │ │ │ +_2_6_1 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_G_r_i_d_P_o_i_n_t_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& │ │ │ │ │ +writer) │ │ │ │ │ +262 { │ │ │ │ │ +263 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +264 │ │ │ │ │ +265 std::shared_ptr p │ │ │ │ │ +266 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("Coordinates", 3, nvertices, this->coordPrecision │ │ │ │ │ +())); │ │ │ │ │ +267 if(!p->writeIsNoop()) │ │ │ │ │ +268 for (_C_e_l_l_I_t_e_r_a_t_o_r i=cellBegin(); i!=cellEnd(); ++i) │ │ │ │ │ +269 { │ │ │ │ │ +270 Refinement &refinement = │ │ │ │ │ +271 buildRefinement(i->type(), │ │ │ │ │ +272 subsampledGeometryType(i->type())); │ │ │ │ │ +273 for(SubVertexIterator sit = refinement.vBegin(intervals), │ │ │ │ │ +274 send = refinement.vEnd(intervals); │ │ │ │ │ +275 sit != send; ++sit) │ │ │ │ │ +276 { │ │ │ │ │ +277 FieldVector coords = i->geometry().global(sit.coords()); │ │ │ │ │ +278 for (int j=0; jwrite(coords[j]); │ │ │ │ │ +280 for (int j=std::min(int(dimw),3); j<3; j++) │ │ │ │ │ +281 p->write(0.0); │ │ │ │ │ +282 } │ │ │ │ │ +283 } │ │ │ │ │ +284 // free the VTK::DataArrayWriter before touching the stream │ │ │ │ │ +285 p.reset(); │ │ │ │ │ +286 │ │ │ │ │ +287 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +288 } │ │ │ │ │ +289 │ │ │ │ │ +291 template │ │ │ │ │ +_2_9_2 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_G_r_i_d_C_e_l_l_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ +293 { │ │ │ │ │ +294 writer._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ +295 │ │ │ │ │ +296 // connectivity │ │ │ │ │ +297 { │ │ │ │ │ +298 std::shared_ptr p1 │ │ │ │ │ +299 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("connectivity", 1, ncorners, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_: │ │ │ │ │ +_i_n_t_3_2)); │ │ │ │ │ +300 // The offset within the index numbering │ │ │ │ │ +301 if(!p1->writeIsNoop()) { │ │ │ │ │ +302 int offset = 0; │ │ │ │ │ +303 for (_C_e_l_l_I_t_e_r_a_t_o_r i=cellBegin(); i!=cellEnd(); ++i) │ │ │ │ │ +304 { │ │ │ │ │ +305 GeometryType coercedToType = subsampledGeometryType(i->type()); │ │ │ │ │ +306 Refinement &refinement = │ │ │ │ │ +307 buildRefinement(i->type(), coercedToType); │ │ │ │ │ +308 for(SubElementIterator sit = refinement.eBegin(intervals), │ │ │ │ │ +309 send = refinement.eEnd(intervals); │ │ │ │ │ +310 sit != send; ++sit) │ │ │ │ │ +311 { │ │ │ │ │ +312 IndexVector indices = sit.vertexIndices(); │ │ │ │ │ +313 for(unsigned int ii = 0; ii < indices.size(); ++ii) │ │ │ │ │ +314 p1->write(offset+indices[_V_T_K_:_:_r_e_n_u_m_b_e_r(coercedToType, ii)]); │ │ │ │ │ +315 } │ │ │ │ │ +316 offset += refinement.nVertices(intervals); │ │ │ │ │ +317 } │ │ │ │ │ +318 } │ │ │ │ │ +319 } │ │ │ │ │ +320 │ │ │ │ │ +321 // offsets │ │ │ │ │ +322 { │ │ │ │ │ +323 std::shared_ptr p2 │ │ │ │ │ +324 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("offsets", 1, ncells, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ +325 if(!p2->writeIsNoop()) { │ │ │ │ │ +326 // The offset into the connectivity array │ │ │ │ │ +327 int offset = 0; │ │ │ │ │ +328 for (_C_e_l_l_I_t_e_r_a_t_o_r i=cellBegin(); i!=cellEnd(); ++i) │ │ │ │ │ +329 { │ │ │ │ │ +330 Refinement &refinement = │ │ │ │ │ +331 buildRefinement(i->type(), │ │ │ │ │ +332 subsampledGeometryType(i->type())); │ │ │ │ │ +333 unsigned int verticesPerCell = │ │ │ │ │ +334 refinement.eBegin(intervals).vertexIndices().size(); │ │ │ │ │ +335 for(int element = 0; element < refinement.nElements(intervals); │ │ │ │ │ +336 ++element) │ │ │ │ │ +337 { │ │ │ │ │ +338 offset += verticesPerCell; │ │ │ │ │ +339 p2->write(offset); │ │ │ │ │ +340 } │ │ │ │ │ +341 } │ │ │ │ │ +342 } │ │ │ │ │ +343 } │ │ │ │ │ +344 │ │ │ │ │ +345 // types │ │ │ │ │ +346 if (dim>1) │ │ │ │ │ +347 { │ │ │ │ │ +348 std::shared_ptr p3 │ │ │ │ │ +349 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("types", 1, ncells, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8)); │ │ │ │ │ +350 if(!p3->writeIsNoop()) │ │ │ │ │ +351 for (_C_e_l_l_I_t_e_r_a_t_o_r it=cellBegin(); it!=cellEnd(); ++it) │ │ │ │ │ +352 { │ │ │ │ │ +353 GeometryType coerceTo = subsampledGeometryType(it->type()); │ │ │ │ │ +354 Refinement &refinement = │ │ │ │ │ +355 buildRefinement(it->type(), coerceTo); │ │ │ │ │ +356 int vtktype = _V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e(coerceTo); │ │ │ │ │ +357 for(int i = 0; i < refinement.nElements(intervals); ++i) │ │ │ │ │ +358 p3->write(vtktype); │ │ │ │ │ +359 } │ │ │ │ │ +360 } │ │ │ │ │ +361 │ │ │ │ │ +362 writer._e_n_d_C_e_l_l_s(); │ │ │ │ │ +363 } │ │ │ │ │ +364} │ │ │ │ │ +365 │ │ │ │ │ +366#endif // DUNE_SUBSAMPLINGVTKWRITER_HH │ │ │ │ │ +_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides file i/o for the visualization toolkit. │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static constexpr int dimensionworld │ │ │ │ │ +The dimension of the world the grid lives in. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:151 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval │ │ │ │ │ -&interval) │ │ │ │ │ -DDeeffiinniittiioonn interval.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s │ │ │ │ │ -int numTransformations() const │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -const AffineTransformation & transformation(int i) const │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ -int rows() const │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const T & operator()(int i, int j) const │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ │ -int cols() const │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_M_a_t_r_i_x │ │ │ │ │ -Matrix(int rows, int cols) │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_m_a_t_r_i_x │ │ │ │ │ -Matrix< double > matrix │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_s_h_i_f_t │ │ │ │ │ -std::vector< double > shift │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_: │ │ │ │ │ -_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -AffineTransformation(int dimworld) │ │ │ │ │ -DDeeffiinniittiioonn periodicfacetrans.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ +@ int32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ +@ uint8 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ +@ float32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r │ │ │ │ │ +int renumber(const Dune::GeometryType &t, int i) │ │ │ │ │ +renumber VTK <-> Dune │ │ │ │ │ +DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ +mapping from GeometryType to VTKGeometryType │ │ │ │ │ +DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +A struct that collects all associated types of one implementation from the │ │ │ │ │ +Traits class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r │ │ │ │ │ +@ tensor │ │ │ │ │ +tensor field (always 3x3) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r │ │ │ │ │ +@ vector │ │ │ │ │ +vector-valued field (always 3D, will be padded if necessary) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r │ │ │ │ │ +@ scalar │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r │ │ │ │ │ +Writer for the output of subsampled grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d_P_o_i_n_t_s │ │ │ │ │ +virtual void writeGridPoints(VTK::VTUWriter &writer) │ │ │ │ │ +write the positions of vertices │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:261 │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +virtual void writeVertexData(VTK::VTUWriter &writer) │ │ │ │ │ +write vertex data │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r │ │ │ │ │ +SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals │ │ │ │ │ +intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK:: │ │ │ │ │ +Precision::float32) │ │ │ │ │ +Construct a SubsamplingVTKWriter working on a specific GridView. │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_c_o_u_n_t_E_n_t_i_t_i_e_s │ │ │ │ │ +virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_) │ │ │ │ │ +count the vertices, cells and corners │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a │ │ │ │ │ +virtual void writeCellData(VTK::VTUWriter &writer) │ │ │ │ │ +write cell data │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:225 │ │ │ │ │ +_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d_C_e_l_l_s │ │ │ │ │ +virtual void writeGridCells(VTK::VTUWriter &writer) │ │ │ │ │ +write the connectivity array │ │ │ │ │ +DDeeffiinniittiioonn subsamplingvtkwriter.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ +Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_B_e_g_i_n │ │ │ │ │ +VertexIterator vertexBegin() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:508 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const std::shared_ptr< const VTKFunction > &p) │ │ │ │ │ +Add a grid function that lives on the vertices of the grid to the │ │ │ │ │ +visualization. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:713 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_E_n_d │ │ │ │ │ +CellIterator cellEnd() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:402 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_d_a_t_a │ │ │ │ │ +std::list< VTKLocalFunction > vertexdata │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1585 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< const VTKFunction > &p) │ │ │ │ │ +Add a grid function that lives on the cells of the grid to the visualization. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:649 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_B_e_g_i_n │ │ │ │ │ +CellIterator cellBegin() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:397 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_o_u_t_p_u_t_t_y_p_e │ │ │ │ │ +VTK::OutputType outputtype │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1609 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_d_a_t_a │ │ │ │ │ +std::list< VTKLocalFunction > celldata │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1584 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_o_o_r_d_P_r_e_c_i_s_i_o_n │ │ │ │ │ +VTK::Precision coordPrecision() const │ │ │ │ │ +get the precision with which coordinates are written out │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:782 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +std::list< VTKLocalFunction >::const_iterator FunctionIterator │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:376 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_v_e_r_t_i_c_e_s │ │ │ │ │ +int nvertices │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1592 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_e_l_l_s │ │ │ │ │ +int ncells │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1591 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_E_n_d │ │ │ │ │ +VertexIterator vertexEnd() const │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:515 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_o_r_n_e_r_s │ │ │ │ │ +int ncorners │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1593 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +Iterator over the grids elements. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:385 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ +unsigned nitems, Precision prec) │ │ │ │ │ +acquire a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void endCellData() │ │ │ │ │ +finish CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +void beginCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void endPointData() │ │ │ │ │ +finish PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ +void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +void endPoints() │ │ │ │ │ +finish section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +void endCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +void beginPoints() │ │ │ │ │ +start section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplex.hh File Reference │ │ │ │ +dune-grid: vtuwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplex.hh File Reference
│ │ │ │ +
vtuwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
#include <ostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/indent.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/dataarraywriter.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::SimplexBlock
class  Dune::VTK::VTUWriter
 Dump a .vtu/.vtp files contents to a stream. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -simplex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +vtuwriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +  Dump a .vtu/.vtp files contents to a stream. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplex.hh Source File │ │ │ │ +dune-grid: vtuwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,308 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
simplex.hh
│ │ │ │ +
vtuwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_SIMPLEXBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_SIMPLEXBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 namespace dgf
│ │ │ │ -
17 {
│ │ │ │ -
18 // SimplexBlock
│ │ │ │ -
19 // ------------
│ │ │ │ -
20
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public BasicBlock
│ │ │ │ -
23 {
│ │ │ │ -
24 unsigned int nofvtx;
│ │ │ │ -
25 int vtxoffset;
│ │ │ │ -
26 int dimgrid;
│ │ │ │ -
27 bool goodline; // active line describes a vertex
│ │ │ │ -
28 int nofparams; // nof parameters
│ │ │ │ -
29
│ │ │ │ -
30 public:
│ │ │ │ -
31 SimplexBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
│ │ │ │ -
32
│ │ │ │ -
33 int get ( std :: vector< std :: vector< unsigned int > > &simplex,
│ │ │ │ -
34 std :: vector< std :: vector< double > > &params,
│ │ │ │ -
35 int &nofp );
│ │ │ │ -
36
│ │ │ │ -
37 // cubes -> simplex
│ │ │ │ -
38 static int
│ │ │ │ -
39 cube2simplex ( std :: vector< std :: vector< double > > &vtx,
│ │ │ │ -
40 std :: vector< std :: vector< unsigned int > > &elements,
│ │ │ │ -
41 std :: vector< std :: vector< double > > &params );
│ │ │ │ -
42
│ │ │ │ -
43 // some information
│ │ │ │ -
│ │ │ │ -
44 bool ok ()
│ │ │ │ -
45 {
│ │ │ │ -
46 return goodline;
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 {
│ │ │ │ -
51 return noflines();
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
54 private:
│ │ │ │ -
55 // get the dimension of the grid
│ │ │ │ -
56 int getDimGrid ();
│ │ │ │ -
57 // get next simplex
│ │ │ │ -
58 bool next ( std :: vector< unsigned int > &simplex,
│ │ │ │ -
59 std :: vector< double > &param );
│ │ │ │ -
60 };
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62 } // end namespace dgf
│ │ │ │ -
63
│ │ │ │ -
64} // end namespace Dune
│ │ │ │ -
65
│ │ │ │ -
66#endif
│ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/exceptions.hh>
│ │ │ │ +
13#include <dune/common/indent.hh>
│ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
18namespace Dune {
│ │ │ │ +
19
│ │ │ │ +
22
│ │ │ │ +
23 namespace VTK {
│ │ │ │ +
24
│ │ │ │ +
26
│ │ │ │ +
│ │ │ │ +
98 class VTUWriter {
│ │ │ │ +
99 public:
│ │ │ │ +
100 std::ostream& stream;
│ │ │ │ + │ │ │ │ +
102
│ │ │ │ +
103 private:
│ │ │ │ + │ │ │ │ +
105 Indent indent;
│ │ │ │ +
106
│ │ │ │ +
107 std::string fileType;
│ │ │ │ +
108 std::string cellName;
│ │ │ │ +
109
│ │ │ │ +
110 bool doAppended;
│ │ │ │ +
111
│ │ │ │ +
112 public:
│ │ │ │ +
114
│ │ │ │ +
│ │ │ │ +
122 inline VTUWriter(std::ostream& stream_, OutputType outputType,
│ │ │ │ +
123 FileType fileType_)
│ │ │ │ +
124 : stream(stream_), factory(outputType, stream)
│ │ │ │ +
125 {
│ │ │ │ +
126 switch(fileType_) {
│ │ │ │ +
127 case polyData :
│ │ │ │ +
128 fileType = "PolyData";
│ │ │ │ +
129 cellName = "Lines";
│ │ │ │ +
130 break;
│ │ │ │ +
131 case unstructuredGrid :
│ │ │ │ +
132 fileType = "UnstructuredGrid";
│ │ │ │ +
133 cellName = "Cells";
│ │ │ │ +
134 break;
│ │ │ │ +
135 default :
│ │ │ │ +
136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_);
│ │ │ │ +
137 }
│ │ │ │ +
138 const std::string& byteOrder = getEndiannessString();
│ │ │ │ +
139
│ │ │ │ +
140 stream << indent << "<?xml version=\"1.0\"?>\n";
│ │ │ │ +
141 stream << indent << "<VTKFile"
│ │ │ │ +
142 << " type=\"" << fileType << "\""
│ │ │ │ +
143 << " version=\"0.1\""
│ │ │ │ +
144 << " byte_order=\"" << byteOrder << "\">\n";
│ │ │ │ +
145 ++indent;
│ │ │ │ +
146 }
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
│ │ │ │ +
149 inline ~VTUWriter() {
│ │ │ │ +
150 --indent;
│ │ │ │ +
151 stream << indent << "</VTKFile>\n"
│ │ │ │ +
152 << std::flush;
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154
│ │ │ │ +
156
│ │ │ │ +
│ │ │ │ +
167 inline void beginPointData(const std::string& scalars = "",
│ │ │ │ +
168 const std::string& vectors = "") {
│ │ │ │ +
169 switch(phase) {
│ │ │ │ +
170 case main :
│ │ │ │ +
171 stream << indent << "<PointData";
│ │ │ │ +
172 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ +
173 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ +
174 stream << ">\n";
│ │ │ │ +
175 ++indent;
│ │ │ │ +
176 break;
│ │ │ │ +
177 case appended :
│ │ │ │ +
178 break;
│ │ │ │ +
179 }
│ │ │ │ +
180 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
182 inline void endPointData() {
│ │ │ │ +
183 switch(phase) {
│ │ │ │ +
184 case main :
│ │ │ │ +
185 --indent;
│ │ │ │ +
186 stream << indent << "</PointData>\n";
│ │ │ │ +
187 break;
│ │ │ │ +
188 case appended :
│ │ │ │ +
189 break;
│ │ │ │ +
190 }
│ │ │ │ +
191 }
│ │ │ │ +
│ │ │ │ +
192
│ │ │ │ +
194
│ │ │ │ +
│ │ │ │ +
205 inline void beginCellData(const std::string& scalars = "",
│ │ │ │ +
206 const std::string& vectors = "") {
│ │ │ │ +
207 switch(phase) {
│ │ │ │ +
208 case main :
│ │ │ │ +
209 stream << indent << "<CellData";
│ │ │ │ +
210 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ +
211 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ +
212 stream << ">\n";
│ │ │ │ +
213 ++indent;
│ │ │ │ +
214 break;
│ │ │ │ +
215 case appended :
│ │ │ │ +
216 break;
│ │ │ │ +
217 }
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
220 inline void endCellData() {
│ │ │ │ +
221 switch(phase) {
│ │ │ │ +
222 case main :
│ │ │ │ +
223 --indent;
│ │ │ │ +
224 stream << indent << "</CellData>\n";
│ │ │ │ +
225 break;
│ │ │ │ +
226 case appended :
│ │ │ │ +
227 break;
│ │ │ │ +
228 }
│ │ │ │ +
229 }
│ │ │ │ +
│ │ │ │ +
230
│ │ │ │ +
232
│ │ │ │ +
│ │ │ │ +
238 inline void beginPoints() {
│ │ │ │ +
239 switch(phase) {
│ │ │ │ +
240 case main :
│ │ │ │ +
241 stream << indent << "<Points>\n";
│ │ │ │ +
242 ++indent;
│ │ │ │ +
243 break;
│ │ │ │ +
244 case appended :
│ │ │ │ +
245 break;
│ │ │ │ +
246 }
│ │ │ │ +
247 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
249 inline void endPoints() {
│ │ │ │ +
250 switch(phase) {
│ │ │ │ +
251 case main :
│ │ │ │ +
252 --indent;
│ │ │ │ +
253 stream << indent << "</Points>\n";
│ │ │ │ +
254 break;
│ │ │ │ +
255 case appended :
│ │ │ │ +
256 break;
│ │ │ │ +
257 }
│ │ │ │ +
258 }
│ │ │ │ +
│ │ │ │ +
259
│ │ │ │ +
261
│ │ │ │ +
│ │ │ │ +
274 inline void beginCells() {
│ │ │ │ +
275 switch(phase) {
│ │ │ │ +
276 case main :
│ │ │ │ +
277 stream << indent << "<" << cellName << ">\n";
│ │ │ │ +
278 ++indent;
│ │ │ │ +
279 break;
│ │ │ │ +
280 case appended :
│ │ │ │ +
281 break;
│ │ │ │ +
282 }
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
285 inline void endCells() {
│ │ │ │ +
286 switch(phase) {
│ │ │ │ +
287 case main :
│ │ │ │ +
288 --indent;
│ │ │ │ +
289 stream << indent << "</" << cellName << ">\n";
│ │ │ │ +
290 break;
│ │ │ │ +
291 case appended :
│ │ │ │ +
292 break;
│ │ │ │ +
293 }
│ │ │ │ +
294 }
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
297
│ │ │ │ +
│ │ │ │ +
310 inline void beginMain(unsigned ncells, unsigned npoints) {
│ │ │ │ +
311 stream << indent << "<" << fileType << ">\n";
│ │ │ │ +
312 ++indent;
│ │ │ │ +
313 stream << indent << "<Piece"
│ │ │ │ +
314 << " NumberOf" << cellName << "=\"" << ncells << "\""
│ │ │ │ +
315 << " NumberOfPoints=\"" << npoints << "\">\n";
│ │ │ │ +
316 ++indent;
│ │ │ │ +
317 phase = main;
│ │ │ │ +
318 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
320 inline void endMain() {
│ │ │ │ +
321 --indent;
│ │ │ │ +
322 stream << indent << "</Piece>\n";
│ │ │ │ +
323 --indent;
│ │ │ │ +
324 stream << indent << "</" << fileType << ">\n";
│ │ │ │ +
325 }
│ │ │ │ +
│ │ │ │ +
326
│ │ │ │ +
328
│ │ │ │ +
│ │ │ │ +
345 inline bool beginAppended() {
│ │ │ │ +
346 doAppended = factory.beginAppended();
│ │ │ │ +
347 if(doAppended) {
│ │ │ │ +
348 const std::string& encoding = factory.appendedEncoding();
│ │ │ │ +
349 stream << indent << "<AppendedData"
│ │ │ │ +
350 << " encoding=\"" << encoding << "\">\n";
│ │ │ │ +
351 ++indent;
│ │ │ │ +
352 // mark begin of data
│ │ │ │ +
353 stream << indent << "_";
│ │ │ │ +
354 }
│ │ │ │ +
355 phase = appended;
│ │ │ │ +
356 return doAppended;
│ │ │ │ +
357 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
359 inline void endAppended() {
│ │ │ │ +
360 if(doAppended) {
│ │ │ │ +
361 stream << "\n";
│ │ │ │ +
362 --indent;
│ │ │ │ +
363 stream << indent << "</AppendedData>\n";
│ │ │ │ +
364 }
│ │ │ │ +
365 }
│ │ │ │ +
│ │ │ │ +
366
│ │ │ │ +
368
│ │ │ │ +
│ │ │ │ +
380 DataArrayWriter* makeArrayWriter(const std::string& name,
│ │ │ │ +
381 unsigned ncomps, unsigned nitems,
│ │ │ │ +
382 Precision prec) {
│ │ │ │ +
383 return factory.make(name, ncomps, nitems, indent, prec);
│ │ │ │ +
384 }
│ │ │ │ +
│ │ │ │ +
385 };
│ │ │ │ +
│ │ │ │ +
386
│ │ │ │ +
387 } // namespace VTK
│ │ │ │ +
388
│ │ │ │ +
390
│ │ │ │ +
391} // namespace Dune
│ │ │ │ +
392
│ │ │ │ +
393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ │ +
Data array writers for the VTKWriter.
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
int & noflines()
Definition basic.hh:87
│ │ │ │ -
Definition simplex.hh:23
│ │ │ │ -
static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< double > > &params)
Definition simplex.cc:146
│ │ │ │ -
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition simplex.cc:69
│ │ │ │ -
int nofsimplex()
Definition simplex.hh:49
│ │ │ │ -
bool ok()
Definition simplex.hh:44
│ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ +
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ +
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ +
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ +
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ +
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ +
base class for data array writers
Definition dataarraywriter.hh:56
│ │ │ │ +
a factory for DataArrayWriters
Definition dataarraywriter.hh:462
│ │ │ │ +
bool beginAppended()
signal start of the appended section
Definition dataarraywriter.hh:497
│ │ │ │ +
DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
create a DataArrayWriter
Definition dataarraywriter.hh:541
│ │ │ │ +
const std::string & appendedEncoding() const
query encoding string for appended data
Definition dataarraywriter.hh:510
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ +
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ +
bool beginAppended()
start the appended data section
Definition vtuwriter.hh:345
│ │ │ │ +
void endAppended()
finish the appended data section
Definition vtuwriter.hh:359
│ │ │ │ +
VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)
create a VTUWriter object
Definition vtuwriter.hh:122
│ │ │ │ +
std::ostream & stream
Definition vtuwriter.hh:100
│ │ │ │ +
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ +
void beginMain(unsigned ncells, unsigned npoints)
start the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:310
│ │ │ │ +
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ +
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ +
Phase
Definition vtuwriter.hh:101
│ │ │ │ +
@ appended
Definition vtuwriter.hh:101
│ │ │ │ +
@ main
Definition vtuwriter.hh:101
│ │ │ │ +
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ +
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ +
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ +
~VTUWriter()
write footer
Definition vtuwriter.hh:149
│ │ │ │ +
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ +
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │ +
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:320
│ │ │ │ +
enum Dune::VTK::VTUWriter::Phase phase
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,107 +2,363 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -simplex.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +vtuwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_SIMPLEXBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_SIMPLEXBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 namespace dgf │ │ │ │ │ -17 { │ │ │ │ │ -18 // SimplexBlock │ │ │ │ │ -19 // ------------ │ │ │ │ │ -20 │ │ │ │ │ -_2_1 class _S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ │ -22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -23 { │ │ │ │ │ -24 unsigned int nofvtx; │ │ │ │ │ -25 int vtxoffset; │ │ │ │ │ -26 int dimgrid; │ │ │ │ │ -27 bool goodline; // active line describes a vertex │ │ │ │ │ -28 int nofparams; // nof parameters │ │ │ │ │ -29 │ │ │ │ │ -30 public: │ │ │ │ │ -31 _S_i_m_p_l_e_x_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int │ │ │ │ │ -&pdimgrid ); │ │ │ │ │ -32 │ │ │ │ │ -33 int _g_e_t ( std :: vector< std :: vector< unsigned int > > &simplex, │ │ │ │ │ -34 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ │ -35 int &nofp ); │ │ │ │ │ -36 │ │ │ │ │ -37 // cubes -> simplex │ │ │ │ │ -38 static int │ │ │ │ │ -39 _c_u_b_e_2_s_i_m_p_l_e_x ( std :: vector< std :: vector< double > > &vtx, │ │ │ │ │ -40 std :: vector< std :: vector< unsigned int > > &elements, │ │ │ │ │ -41 std :: vector< std :: vector< double > > ¶ms ); │ │ │ │ │ -42 │ │ │ │ │ -43 // some information │ │ │ │ │ -_4_4 bool _o_k () │ │ │ │ │ -45 { │ │ │ │ │ -46 return goodline; │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -_4_9 int _n_o_f_s_i_m_p_l_e_x () │ │ │ │ │ -50 { │ │ │ │ │ -51 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -54 private: │ │ │ │ │ -55 // get the dimension of the grid │ │ │ │ │ -56 int getDimGrid (); │ │ │ │ │ -57 // get next simplex │ │ │ │ │ -58 bool next ( std :: vector< unsigned int > &simplex, │ │ │ │ │ -59 std :: vector< double > ¶m ); │ │ │ │ │ -60 }; │ │ │ │ │ -61 │ │ │ │ │ -62 } // end namespace dgf │ │ │ │ │ -63 │ │ │ │ │ -64} // end namespace Dune │ │ │ │ │ -65 │ │ │ │ │ -66#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e { │ │ │ │ │ +19 │ │ │ │ │ +22 │ │ │ │ │ +23 namespace VTK { │ │ │ │ │ +24 │ │ │ │ │ +26 │ │ │ │ │ +_9_8 class _V_T_U_W_r_i_t_e_r { │ │ │ │ │ +99 public: │ │ │ │ │ +_1_0_0 std::ostream& _s_t_r_e_a_m; │ │ │ │ │ +_1_0_1 enum _P_h_a_s_e { _m_a_i_n, _a_p_p_e_n_d_e_d } _p_h_a_s_e; │ │ │ │ │ +102 │ │ │ │ │ +103 private: │ │ │ │ │ +104 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y factory; │ │ │ │ │ +105 Indent indent; │ │ │ │ │ +106 │ │ │ │ │ +107 std::string fileType; │ │ │ │ │ +108 std::string cellName; │ │ │ │ │ +109 │ │ │ │ │ +110 bool doAppended; │ │ │ │ │ +111 │ │ │ │ │ +112 public: │ │ │ │ │ +114 │ │ │ │ │ +_1_2_2 inline _V_T_U_W_r_i_t_e_r(std::ostream& stream_, _O_u_t_p_u_t_T_y_p_e outputType, │ │ │ │ │ +123 _F_i_l_e_T_y_p_e fileType_) │ │ │ │ │ +124 : _s_t_r_e_a_m(stream_), factory(outputType, _s_t_r_e_a_m) │ │ │ │ │ +125 { │ │ │ │ │ +126 switch(fileType_) { │ │ │ │ │ +127 case _p_o_l_y_D_a_t_a : │ │ │ │ │ +128 fileType = "PolyData"; │ │ │ │ │ +129 cellName = "Lines"; │ │ │ │ │ +130 break; │ │ │ │ │ +131 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : │ │ │ │ │ +132 fileType = "UnstructuredGrid"; │ │ │ │ │ +133 cellName = "Cells"; │ │ │ │ │ +134 break; │ │ │ │ │ +135 default : │ │ │ │ │ +136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_); │ │ │ │ │ +137 } │ │ │ │ │ +138 const std::string& byteOrder = _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g(); │ │ │ │ │ +139 │ │ │ │ │ +140 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +141 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +145 ++indent; │ │ │ │ │ +146 } │ │ │ │ │ +147 │ │ │ │ │ +_1_4_9 inline _~_V_T_U_W_r_i_t_e_r() { │ │ │ │ │ +150 --indent; │ │ │ │ │ +151 _s_t_r_e_a_m << indent << "\n" │ │ │ │ │ +152 << std::flush; │ │ │ │ │ +153 } │ │ │ │ │ +154 │ │ │ │ │ +156 │ │ │ │ │ +_1_6_7 inline void _b_e_g_i_n_P_o_i_n_t_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ +168 const std::string& vectors = "") { │ │ │ │ │ +169 switch(_p_h_a_s_e) { │ │ │ │ │ +170 case _m_a_i_n : │ │ │ │ │ +171 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +175 ++indent; │ │ │ │ │ +176 break; │ │ │ │ │ +177 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +178 break; │ │ │ │ │ +179 } │ │ │ │ │ +180 } │ │ │ │ │ +_1_8_2 inline void _e_n_d_P_o_i_n_t_D_a_t_a() { │ │ │ │ │ +183 switch(_p_h_a_s_e) { │ │ │ │ │ +184 case _m_a_i_n : │ │ │ │ │ +185 --indent; │ │ │ │ │ +186 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +187 break; │ │ │ │ │ +188 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +189 break; │ │ │ │ │ +190 } │ │ │ │ │ +191 } │ │ │ │ │ +192 │ │ │ │ │ +194 │ │ │ │ │ +_2_0_5 inline void _b_e_g_i_n_C_e_l_l_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ +206 const std::string& vectors = "") { │ │ │ │ │ +207 switch(_p_h_a_s_e) { │ │ │ │ │ +208 case _m_a_i_n : │ │ │ │ │ +209 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +213 ++indent; │ │ │ │ │ +214 break; │ │ │ │ │ +215 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +216 break; │ │ │ │ │ +217 } │ │ │ │ │ +218 } │ │ │ │ │ +_2_2_0 inline void _e_n_d_C_e_l_l_D_a_t_a() { │ │ │ │ │ +221 switch(_p_h_a_s_e) { │ │ │ │ │ +222 case _m_a_i_n : │ │ │ │ │ +223 --indent; │ │ │ │ │ +224 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +225 break; │ │ │ │ │ +226 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +227 break; │ │ │ │ │ +228 } │ │ │ │ │ +229 } │ │ │ │ │ +230 │ │ │ │ │ +232 │ │ │ │ │ +_2_3_8 inline void _b_e_g_i_n_P_o_i_n_t_s() { │ │ │ │ │ +239 switch(_p_h_a_s_e) { │ │ │ │ │ +240 case _m_a_i_n : │ │ │ │ │ +241 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +242 ++indent; │ │ │ │ │ +243 break; │ │ │ │ │ +244 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +245 break; │ │ │ │ │ +246 } │ │ │ │ │ +247 } │ │ │ │ │ +_2_4_9 inline void _e_n_d_P_o_i_n_t_s() { │ │ │ │ │ +250 switch(_p_h_a_s_e) { │ │ │ │ │ +251 case _m_a_i_n : │ │ │ │ │ +252 --indent; │ │ │ │ │ +253 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +254 break; │ │ │ │ │ +255 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +256 break; │ │ │ │ │ +257 } │ │ │ │ │ +258 } │ │ │ │ │ +259 │ │ │ │ │ +261 │ │ │ │ │ +_2_7_4 inline void _b_e_g_i_n_C_e_l_l_s() { │ │ │ │ │ +275 switch(_p_h_a_s_e) { │ │ │ │ │ +276 case _m_a_i_n : │ │ │ │ │ +277 _s_t_r_e_a_m << indent << "<" << cellName << ">\n"; │ │ │ │ │ +278 ++indent; │ │ │ │ │ +279 break; │ │ │ │ │ +280 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +281 break; │ │ │ │ │ +282 } │ │ │ │ │ +283 } │ │ │ │ │ +_2_8_5 inline void _e_n_d_C_e_l_l_s() { │ │ │ │ │ +286 switch(_p_h_a_s_e) { │ │ │ │ │ +287 case _m_a_i_n : │ │ │ │ │ +288 --indent; │ │ │ │ │ +289 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +290 break; │ │ │ │ │ +291 case _a_p_p_e_n_d_e_d : │ │ │ │ │ +292 break; │ │ │ │ │ +293 } │ │ │ │ │ +294 } │ │ │ │ │ +295 │ │ │ │ │ +297 │ │ │ │ │ +_3_1_0 inline void _b_e_g_i_n_M_a_i_n(unsigned ncells, unsigned npoints) { │ │ │ │ │ +311 _s_t_r_e_a_m << indent << "<" << fileType << ">\n"; │ │ │ │ │ +312 ++indent; │ │ │ │ │ +313 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +316 ++indent; │ │ │ │ │ +317 _p_h_a_s_e = _m_a_i_n; │ │ │ │ │ +318 } │ │ │ │ │ +_3_2_0 inline void _e_n_d_M_a_i_n() { │ │ │ │ │ +321 --indent; │ │ │ │ │ +322 _s_t_r_e_a_m << indent << "
\n"; │ │ │ │ │ +323 --indent; │ │ │ │ │ +324 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +325 } │ │ │ │ │ +326 │ │ │ │ │ +328 │ │ │ │ │ +_3_4_5 inline bool _b_e_g_i_n_A_p_p_e_n_d_e_d() { │ │ │ │ │ +346 doAppended = factory._b_e_g_i_n_A_p_p_e_n_d_e_d(); │ │ │ │ │ +347 if(doAppended) { │ │ │ │ │ +348 const std::string& encoding = factory._a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g(); │ │ │ │ │ +349 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +351 ++indent; │ │ │ │ │ +352 // mark begin of data │ │ │ │ │ +353 _s_t_r_e_a_m << indent << "_"; │ │ │ │ │ +354 } │ │ │ │ │ +355 _p_h_a_s_e = _a_p_p_e_n_d_e_d; │ │ │ │ │ +356 return doAppended; │ │ │ │ │ +357 } │ │ │ │ │ +_3_5_9 inline void _e_n_d_A_p_p_e_n_d_e_d() { │ │ │ │ │ +360 if(doAppended) { │ │ │ │ │ +361 _s_t_r_e_a_m << "\n"; │ │ │ │ │ +362 --indent; │ │ │ │ │ +363 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ +364 } │ │ │ │ │ +365 } │ │ │ │ │ +366 │ │ │ │ │ +368 │ │ │ │ │ +_3_8_0 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r* _m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(const std::string& name, │ │ │ │ │ +381 unsigned ncomps, unsigned nitems, │ │ │ │ │ +382 _P_r_e_c_i_s_i_o_n prec) { │ │ │ │ │ +383 return factory._m_a_k_e(name, ncomps, nitems, indent, prec); │ │ │ │ │ +384 } │ │ │ │ │ +385 }; │ │ │ │ │ +386 │ │ │ │ │ +387 } // namespace VTK │ │ │ │ │ +388 │ │ │ │ │ +390 │ │ │ │ │ +391} // namespace Dune │ │ │ │ │ +392 │ │ │ │ │ +393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ │ +_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ │ +Data array writers for the VTKWriter. │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ -int & noflines() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn simplex.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_c_u_b_e_2_s_i_m_p_l_e_x │ │ │ │ │ -static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std :: │ │ │ │ │ -vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< │ │ │ │ │ -double > > ¶ms) │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:146 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< │ │ │ │ │ -std ::vector< double > > ¶ms, int &nofp) │ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:69 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_n_o_f_s_i_m_p_l_e_x │ │ │ │ │ -int nofsimplex() │ │ │ │ │ -DDeeffiinniittiioonn simplex.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn simplex.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ +OutputType │ │ │ │ │ +How the bulk data should be stored in the file. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ +FileType │ │ │ │ │ +which type of VTK file to write │ │ │ │ │ +DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ +@ polyData │ │ │ │ │ +for .vtp files (PolyData) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ +@ unstructuredGrid │ │ │ │ │ +for .vtu files (UnstructuredGrid) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ +std::string getEndiannessString() │ │ │ │ │ +determine endianness of this C++ implementation │ │ │ │ │ +DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +base class for data array writers │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ +a factory for DataArrayWriters │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:462 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ +bool beginAppended() │ │ │ │ │ +signal start of the appended section │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:497 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ +DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned │ │ │ │ │ +nitems, const Indent &indent, Precision prec) │ │ │ │ │ +create a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:541 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g │ │ │ │ │ +const std::string & appendedEncoding() const │ │ │ │ │ +query encoding string for appended data │ │ │ │ │ +DDeeffiinniittiioonn dataarraywriter.hh:510 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ +unsigned nitems, Precision prec) │ │ │ │ │ +acquire a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ +bool beginAppended() │ │ │ │ │ +start the appended data section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:345 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_A_p_p_e_n_d_e_d │ │ │ │ │ +void endAppended() │ │ │ │ │ +finish the appended data section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_) │ │ │ │ │ +create a VTUWriter object │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_s_t_r_e_a_m │ │ │ │ │ +std::ostream & stream │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void endCellData() │ │ │ │ │ +finish CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ +void beginMain(unsigned ncells, unsigned npoints) │ │ │ │ │ +start the main PolyData/UnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +void beginCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void endPointData() │ │ │ │ │ +finish PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_P_h_a_s_e │ │ │ │ │ +Phase │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_a_p_p_e_n_d_e_d │ │ │ │ │ +@ appended │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_i_n │ │ │ │ │ +@ main │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ +void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +void endPoints() │ │ │ │ │ +finish section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_~_V_T_U_W_r_i_t_e_r │ │ │ │ │ +~VTUWriter() │ │ │ │ │ +write footer │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +void endCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +void beginPoints() │ │ │ │ │ +start section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ +void endMain() │ │ │ │ │ +finish the main PolyData/UnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:320 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_p_h_a_s_e │ │ │ │ │ +enum Dune::VTK::VTUWriter::Phase phase │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polyhedron.hh File Reference │ │ │ │ +dune-grid: volumewriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
polyhedron.hh File Reference
│ │ │ │ +
volumewriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │ │ +
#include <memory>
│ │ │ │ +#include <dune/grid/io/file/vtk/basicwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/function.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/volumeiterators.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::PolyhedronBlock
class  Dune::VTK::ConformingVolumeWriter< GV >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +2,27 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -polyhedron.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_o_l_y_g_o_n_._h_h> │ │ │ │ │ +volumewriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_<_ _G_V_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polyhedron.hh Source File │ │ │ │ +dune-grid: volumewriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,109 +70,136 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
polyhedron.hh
│ │ │ │ +
volumewriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=2 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_POLYHEDRON_HH
│ │ │ │ -
6#define DUNE_POLYHEDRON_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 namespace dgf
│ │ │ │ -
16 {
│ │ │ │ -
17
│ │ │ │ -
18 // PolyhedronBlock
│ │ │ │ -
19 // ---------------
│ │ │ │ -
20
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public BasicBlock
│ │ │ │ -
23 {
│ │ │ │ -
│ │ │ │ -
24 explicit PolyhedronBlock ( std::istream &in, int numPolys )
│ │ │ │ -
25 : BasicBlock( in, "Polyhedron" ), numPolys_( numPolys )
│ │ │ │ -
26 {}
│ │ │ │ -
│ │ │ │ -
27
│ │ │ │ -
│ │ │ │ -
28 int get ( std::vector< std::vector< int > > &polyhedra )
│ │ │ │ -
29 {
│ │ │ │ -
30 reset();
│ │ │ │ -
31 std::vector< int > polyhedron;
│ │ │ │ -
32 int minPolyId = 1;
│ │ │ │ -
33 while( getnextline() )
│ │ │ │ -
34 {
│ │ │ │ -
35 polyhedron.clear();
│ │ │ │ -
36 for( int polyIdx; getnextentry( polyIdx ); )
│ │ │ │ -
37 {
│ │ │ │ -
38 if( (polyIdx < 0) || (polyIdx > numPolys_) )
│ │ │ │ -
39 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid polygon index (" << polyIdx << " not int [0, " << numPolys_ << "])" );
│ │ │ │ -
40
│ │ │ │ -
41 minPolyId = std::min( minPolyId, polyIdx );
│ │ │ │ -
42 polyhedron.push_back( polyIdx );
│ │ │ │ -
43 }
│ │ │ │ -
44
│ │ │ │ -
45 polyhedra.push_back( polyhedron );
│ │ │ │ -
46 }
│ │ │ │ -
47
│ │ │ │ -
48 // subtract minimal number to have 0 starting numbering
│ │ │ │ -
49 if( minPolyId > 0 )
│ │ │ │ -
50 {
│ │ │ │ -
51 const size_t polySize = polyhedra.size();
│ │ │ │ -
52 for( size_t i=0; i<polySize; ++i )
│ │ │ │ -
53 {
│ │ │ │ -
54 const size_t pSize = polyhedra[ i ].size();
│ │ │ │ -
55 for( size_t j=0; j<pSize; ++j )
│ │ │ │ -
56 {
│ │ │ │ -
57 polyhedra[ i ][ j ] -= minPolyId;
│ │ │ │ -
58 }
│ │ │ │ -
59 }
│ │ │ │ -
60 }
│ │ │ │ -
61 return polyhedra.size();
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
64 protected:
│ │ │ │ -
65 const int numPolys_;
│ │ │ │ -
66 };
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68 } // namespace dgf
│ │ │ │ -
69} // end namespace Dune
│ │ │ │ -
70
│ │ │ │ -
71#endif // #ifndef DUNE_POLYHEDRON_HH
│ │ │ │ - │ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <memory>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
19
│ │ │ │ +
20 namespace VTK {
│ │ │ │ +
21
│ │ │ │ +
22 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
25 public BasicWriter<ConformingVolumeIteratorFactory<GV> >
│ │ │ │ +
26 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
29
│ │ │ │ +
30 const GV& gv;
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ + │ │ │ │ +
34 typedef std::shared_ptr<VTKFunction> VTKFunctionPtr;
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
│ │ │ │ +
38 { }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ + │ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
42 void addCellData(const VTKFunctionPtr& p) {
│ │ │ │ +
43 Base::addCellData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ + │ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51 template<typename V>
│ │ │ │ +
│ │ │ │ +
52 void addCellData(const V &v, const std::string &name, int ncomps=1) {
│ │ │ │ +
53 addCellData(new P0VTKFunction<GV, V>(gv, v, name, ncomps));
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 addPointData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ + │ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
65 template<typename V>
│ │ │ │ +
│ │ │ │ +
66 void addVertexData(const V &v, const std::string &name, int ncomps=1) {
│ │ │ │ +
67 addVertexData(new P1VTKFunction<GV, V>(gv, v, name, ncomps));
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72 } // namespace VTK
│ │ │ │ +
73
│ │ │ │ +
75
│ │ │ │ +
76} // namespace Dune
│ │ │ │ +
77
│ │ │ │ +
78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ + │ │ │ │ +
Functions for VTK output.
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
void reset()
Definition basic.hh:51
│ │ │ │ -
bool getnextline()
Definition basic.cc:94
│ │ │ │ -
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ -
Definition polyhedron.hh:23
│ │ │ │ -
const int numPolys_
Definition polyhedron.hh:65
│ │ │ │ -
PolyhedronBlock(std::istream &in, int numPolys)
Definition polyhedron.hh:24
│ │ │ │ -
int get(std::vector< std::vector< int > > &polyhedra)
Definition polyhedron.hh:28
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Definition basicwriter.hh:35
│ │ │ │ +
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:76
│ │ │ │ +
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ + │ │ │ │ +
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
│ │ │ │ +
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
│ │ │ │ +
Base class for function writers.
Definition functionwriter.hh:90
│ │ │ │ +
Definition volumeiterators.hh:23
│ │ │ │ +
Definition volumewriter.hh:26
│ │ │ │ +
std::shared_ptr< VTKFunction > VTKFunctionPtr
Definition volumewriter.hh:34
│ │ │ │ +
void addCellData(const VTKFunctionPtr &p)
Definition volumewriter.hh:42
│ │ │ │ +
void addVertexData(const VTKFunctionPtr &p)
Definition volumewriter.hh:56
│ │ │ │ +
void addCellData(VTKFunction *p)
Definition volumewriter.hh:47
│ │ │ │ +
void addVertexData(const V &v, const std::string &name, int ncomps=1)
Definition volumewriter.hh:66
│ │ │ │ +
void addVertexData(VTKFunction *p)
Definition volumewriter.hh:61
│ │ │ │ +
void addCellData(const V &v, const std::string &name, int ncomps=1)
Definition volumewriter.hh:52
│ │ │ │ +
ConformingVolumeWriter(const GV &gv_)
Definition volumewriter.hh:36
│ │ │ │ +
Dune::VTKFunction< GV > VTKFunction
Definition volumewriter.hh:33
│ │ │ │ +
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,115 +2,148 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -polyhedron.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +volumewriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=2 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_POLYHEDRON_HH │ │ │ │ │ -6#define DUNE_POLYHEDRON_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_o_l_y_g_o_n_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -15 namespace dgf │ │ │ │ │ -16 { │ │ │ │ │ -17 │ │ │ │ │ -18 // PolyhedronBlock │ │ │ │ │ -19 // --------------- │ │ │ │ │ -20 │ │ │ │ │ -_2_1 struct _P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ -22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -23 { │ │ │ │ │ -_2_4 explicit _P_o_l_y_h_e_d_r_o_n_B_l_o_c_k ( std::istream &in, int numPolys ) │ │ │ │ │ -25 : _B_a_s_i_c_B_l_o_c_k( in, "Polyhedron" ), _n_u_m_P_o_l_y_s__( numPolys ) │ │ │ │ │ -26 {} │ │ │ │ │ -27 │ │ │ │ │ -_2_8 int _g_e_t ( std::vector< std::vector< int > > &polyhedra ) │ │ │ │ │ -29 { │ │ │ │ │ -30 _r_e_s_e_t(); │ │ │ │ │ -31 std::vector< int > polyhedron; │ │ │ │ │ -32 int minPolyId = 1; │ │ │ │ │ -33 while( _g_e_t_n_e_x_t_l_i_n_e() ) │ │ │ │ │ -34 { │ │ │ │ │ -35 polyhedron.clear(); │ │ │ │ │ -36 for( int polyIdx; _g_e_t_n_e_x_t_e_n_t_r_y( polyIdx ); ) │ │ │ │ │ -37 { │ │ │ │ │ -38 if( (polyIdx < 0) || (polyIdx > _n_u_m_P_o_l_y_s__) ) │ │ │ │ │ -39 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error in " << *this << ": Invalid polygon index │ │ │ │ │ -(" << polyIdx << " not int [0, " << _n_u_m_P_o_l_y_s__ << "])" ); │ │ │ │ │ -40 │ │ │ │ │ -41 minPolyId = std::min( minPolyId, polyIdx ); │ │ │ │ │ -42 polyhedron.push_back( polyIdx ); │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -45 polyhedra.push_back( polyhedron ); │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -48 // subtract minimal number to have 0 starting numbering │ │ │ │ │ -49 if( minPolyId > 0 ) │ │ │ │ │ -50 { │ │ │ │ │ -51 const size_t polySize = polyhedra.size(); │ │ │ │ │ -52 for( size_t i=0; i │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ +19 │ │ │ │ │ +20 namespace VTK { │ │ │ │ │ +21 │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r │ │ │ │ │ +24 : public _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y, │ │ │ │ │ +25 public _B_a_s_i_c_W_r_i_t_e_r > │ │ │ │ │ +26 { │ │ │ │ │ +27 typedef _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_G_V_> _F_a_c_t_o_r_y; │ │ │ │ │ +28 typedef _B_a_s_i_c_W_r_i_t_e_r_<_F_a_c_t_o_r_y_> _B_a_s_e; │ │ │ │ │ +29 │ │ │ │ │ +30 const GV& gv; │ │ │ │ │ +31 │ │ │ │ │ +32 public: │ │ │ │ │ +_3_3 typedef _D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _V_T_K_F_u_n_c_t_i_o_n; │ │ │ │ │ +_3_4 typedef std::shared_ptr _V_T_K_F_u_n_c_t_i_o_n_P_t_r; │ │ │ │ │ +35 │ │ │ │ │ +_3_6 _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r(const GV& gv_) │ │ │ │ │ +37 : _F_a_c_t_o_r_y(gv_), _B_a_s_e(static_cast(*this)), gv(gv_) │ │ │ │ │ +38 { } │ │ │ │ │ +39 │ │ │ │ │ +40 using _B_a_s_e_:_:_a_d_d_P_o_i_n_t_D_a_t_a; │ │ │ │ │ +41 │ │ │ │ │ +_4_2 void _a_d_d_C_e_l_l_D_a_t_a(const _V_T_K_F_u_n_c_t_i_o_n_P_t_r& p) { │ │ │ │ │ +43 _B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr │ │ │ │ │ +44 (new _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_V_T_K_F_u_n_c_t_i_o_n_>(p))); │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +_4_7 void _a_d_d_C_e_l_l_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n* p) { │ │ │ │ │ +48 _a_d_d_C_e_l_l_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n_P_t_r(p)); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +51 template │ │ │ │ │ +_5_2 void _a_d_d_C_e_l_l_D_a_t_a(const V &v, const std::string &name, int ncomps=1) { │ │ │ │ │ +53 _a_d_d_C_e_l_l_D_a_t_a(new _P_0_V_T_K_F_u_n_c_t_i_o_n_<_G_V_,_ _V_>(gv, v, name, ncomps)); │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +_5_6 void _a_d_d_V_e_r_t_e_x_D_a_t_a(const _V_T_K_F_u_n_c_t_i_o_n_P_t_r& p) { │ │ │ │ │ +57 _a_d_d_P_o_i_n_t_D_a_t_a(std::shared_ptr │ │ │ │ │ +58 (new _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_V_T_K_F_u_n_c_t_i_o_n_>(p))); │ │ │ │ │ 59 } │ │ │ │ │ -60 } │ │ │ │ │ -61 return polyhedra.size(); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64 protected: │ │ │ │ │ -_6_5 const int _n_u_m_P_o_l_y_s__; │ │ │ │ │ -66 }; │ │ │ │ │ -67 │ │ │ │ │ -68 } // namespace dgf │ │ │ │ │ -69} // end namespace Dune │ │ │ │ │ -70 │ │ │ │ │ -71#endif // #ifndef DUNE_POLYHEDRON_HH │ │ │ │ │ -_p_o_l_y_g_o_n_._h_h │ │ │ │ │ +60 │ │ │ │ │ +_6_1 void _a_d_d_V_e_r_t_e_x_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n* p) { │ │ │ │ │ +62 _a_d_d_V_e_r_t_e_x_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n_P_t_r(p)); │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +65 template │ │ │ │ │ +_6_6 void _a_d_d_V_e_r_t_e_x_D_a_t_a(const V &v, const std::string &name, int ncomps=1) { │ │ │ │ │ +67 _a_d_d_V_e_r_t_e_x_D_a_t_a(new _P_1_V_T_K_F_u_n_c_t_i_o_n_<_G_V_,_ _V_>(gv, v, name, ncomps)); │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +70 }; │ │ │ │ │ +71 │ │ │ │ │ +72 } // namespace VTK │ │ │ │ │ +73 │ │ │ │ │ +75 │ │ │ │ │ +76} // namespace Dune │ │ │ │ │ +77 │ │ │ │ │ +78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH │ │ │ │ │ +_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ +_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ +Functions for VTK output. │ │ │ │ │ +_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h │ │ │ │ │ +_b_a_s_i_c_w_r_i_t_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ -void reset() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_l_i_n_e │ │ │ │ │ -bool getnextline() │ │ │ │ │ -DDeeffiinniittiioonn basic.cc:94 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ -bool getnextentry(ENTRY &entry) │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn polyhedron.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k_:_:_n_u_m_P_o_l_y_s__ │ │ │ │ │ -const int numPolys_ │ │ │ │ │ -DDeeffiinniittiioonn polyhedron.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ -PolyhedronBlock(std::istream &in, int numPolys) │ │ │ │ │ -DDeeffiinniittiioonn polyhedron.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std::vector< std::vector< int > > &polyhedra) │ │ │ │ │ -DDeeffiinniittiioonn polyhedron.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -exception class for IO errors in the DGF parser │ │ │ │ │ -DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +Base class for function writers. │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n_P_t_r │ │ │ │ │ +std::shared_ptr< VTKFunction > VTKFunctionPtr │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const VTKFunctionPtr &p) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const VTKFunctionPtr &p) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(VTKFunction *p) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(VTKFunction *p) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r │ │ │ │ │ +ConformingVolumeWriter(const GV &gv_) │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Dune::VTKFunction< GV > VTKFunction │ │ │ │ │ +DDeeffiinniittiioonn volumewriter.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basic.cc File Reference │ │ │ │ +dune-grid: skeletonfunction.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,59 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
basic.cc File Reference
│ │ │ │ +
skeletonfunction.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

Functions for VTK output on the skeleton. │ │ │ │ +More...

│ │ │ │ +
#include <memory>
│ │ │ │ +#include <string>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::VTK::SkeletonFunctionTraits< GV, RF >
 
class  Dune::VTK::SkeletonFunctionInterface< GV, RF >
 A prototype for VTKFunctions on the skeleton. More...
 
class  Dune::VTK::SkeletonFunctionWriter< Func >
 function writer for skeleton functions More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Functions for VTK output on the skeleton.

│ │ │ │ +
Author
Jö Fahlke
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,21 +2,41 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -basic.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +skeletonfunction.hh File Reference │ │ │ │ │ +_d_u_n_e_-_g_r_i_d » _I_/_O » _V_i_s_u_a_l_i_z_a_t_i_o_n_ _T_o_o_l_K_i_t_ _(_V_T_K_) │ │ │ │ │ +Functions for VTK output on the skeleton. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_<_ _G_V_,_ _R_F_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _G_V_,_ _R_F_ _> │ │ │ │ │ +  A prototype for VTKFunctions on the skeleton. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_ _F_u_n_c_ _> │ │ │ │ │ +  function writer for skeleton functions _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Functions for VTK output on the skeleton. │ │ │ │ │ + Author │ │ │ │ │ + Jö Fahlke │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: general.hh File Reference │ │ │ │ +dune-grid: vtksequencewriterbase.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
general.hh File Reference
│ │ │ │ +
vtksequencewriterbase.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <sstream>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <dune/common/path.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtkwriter.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::GeneralBlock
class  Dune::VTKSequenceWriterBase< GridView >
 Base class to write pvd-files which contains a list of all collected vtk-files. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,31 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -general.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +vtksequencewriterbase.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Base class to write pvd-files which contains a list of all collected │ │ │ │ │ + vtk-files. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: general.hh Source File │ │ │ │ +dune-grid: vtksequencewriterbase.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,98 +70,209 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
general.hh
│ │ │ │ +
vtksequencewriterbase.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
│ │ │ │ -
6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
│ │ │ │ +
8
│ │ │ │
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace dgf
│ │ │ │ -
18 {
│ │ │ │ -
19
│ │ │ │ -
20 // GeneralBlock
│ │ │ │ -
21 // ---------
│ │ │ │ +
10#include <iostream>
│ │ │ │ +
11#include <sstream>
│ │ │ │ +
12#include <fstream>
│ │ │ │ +
13#include <iomanip>
│ │ │ │ +
14#include <memory>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ +
17#include <dune/common/path.hh>
│ │ │ │ +
18
│ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21namespace Dune {
│ │ │ │
22
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 : public BasicBlock
│ │ │ │ -
25 {
│ │ │ │ -
26 unsigned int nofvtx;
│ │ │ │ -
27 int dimgrid;
│ │ │ │ -
28 bool goodline; // active line describes a vertex
│ │ │ │ -
29 std :: vector< unsigned int > map; // active vertex
│ │ │ │ -
30 int nofparams;
│ │ │ │ -
31 int vtxoffset;
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ -
34 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
│ │ │ │ -
35
│ │ │ │ -
36 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
│ │ │ │ -
37 std :: vector< std :: vector< double > > &params,
│ │ │ │ -
38 int &nofp );
│ │ │ │ -
39
│ │ │ │ -
40 // some information
│ │ │ │ -
│ │ │ │ -
41 bool ok ()
│ │ │ │ -
42 {
│ │ │ │ -
43 return goodline;
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 return noflines();
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51 private:
│ │ │ │ -
52 // get the dimension of the grid
│ │ │ │ -
53 int getDimGrid ();
│ │ │ │ -
54 // get next simplex
│ │ │ │ -
55 bool next ( std :: vector< unsigned int > &simplex,
│ │ │ │ -
56 std :: vector< double > &param );
│ │ │ │ -
57 };
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59 } // end namespace dgf
│ │ │ │ -
60
│ │ │ │ -
61} // end namespace Dune
│ │ │ │ -
62
│ │ │ │ -
63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
│ │ │ │ - │ │ │ │ +
32 template<class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
34 {
│ │ │ │ +
35 std::shared_ptr<VTKWriter<GridView> > vtkWriter_;
│ │ │ │ +
36 std::vector<double> timesteps_;
│ │ │ │ +
37 std::string name_,path_,extendpath_;
│ │ │ │ +
38 int rank_;
│ │ │ │ +
39 int size_;
│ │ │ │ +
40 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
48 const std::string& name,
│ │ │ │ +
49 const std::string& path,
│ │ │ │ +
50 const std::string& extendpath,
│ │ │ │ +
51 int rank,
│ │ │ │ +
52 int size)
│ │ │ │ +
53 : vtkWriter_(vtkWriter),
│ │ │ │ +
54 name_(name), path_(path),
│ │ │ │ +
55 extendpath_(extendpath),
│ │ │ │ +
56 rank_(rank),
│ │ │ │ +
57 size_(size)
│ │ │ │ +
58 {}
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ +
63 const std::shared_ptr< VTKWriter<GridView> >& vtkWriter() const
│ │ │ │ +
64 {
│ │ │ │ +
65 return vtkWriter_;
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
69 void addCellData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
│ │ │ │ +
70 {
│ │ │ │ +
71 vtkWriter_->addCellData(p);
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
79 template<class V >
│ │ │ │ +
│ │ │ │ +
80 void addCellData (const V &v, const std::string &name, int ncomps=1)
│ │ │ │ +
81 {
│ │ │ │ +
82 vtkWriter_->addCellData(v, name, ncomps);
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
86 void addVertexData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
│ │ │ │ +
87 {
│ │ │ │ +
88 vtkWriter_->addVertexData(p);
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
96 template<class V >
│ │ │ │ +
│ │ │ │ +
97 void addVertexData (const V &v, const std::string &name, int ncomps=1)
│ │ │ │ +
98 {
│ │ │ │ +
99 vtkWriter_->addVertexData(v, name, ncomps);
│ │ │ │ +
100 }
│ │ │ │ +
│ │ │ │ +
101
│ │ │ │ +
102
│ │ │ │ +
│ │ │ │ +
108 void write (double time, VTK::OutputType type = VTK::ascii)
│ │ │ │ +
109 {
│ │ │ │ +
110 /* remember current time step */
│ │ │ │ +
111 unsigned int count = timesteps_.size();
│ │ │ │ +
112 timesteps_.push_back(time);
│ │ │ │ +
113
│ │ │ │ +
114 /* write VTK file */
│ │ │ │ +
115 if(size_==1)
│ │ │ │ +
116 vtkWriter_->write(concatPaths(path_,seqName(count)),type);
│ │ │ │ +
117 else
│ │ │ │ +
118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type);
│ │ │ │ +
119
│ │ │ │ +
120 /* write pvd file ... only on rank 0 */
│ │ │ │ +
121 if (rank_==0) {
│ │ │ │ +
122 std::ofstream pvdFile;
│ │ │ │ +
123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
124 std::ios_base::eofbit);
│ │ │ │ +
125 std::string pvdname = name_ + ".pvd";
│ │ │ │ +
126 pvdFile.open(pvdname.c_str());
│ │ │ │ +
127 pvdFile << "<?xml version=\"1.0\"?> \n"
│ │ │ │ +
128 << "<VTKFile type=\"Collection\" version=\"0.1\" byte_order=\"" << VTK::getEndiannessString() << "\"> \n"
│ │ │ │ +
129 << "<Collection> \n";
│ │ │ │ +
130 for (unsigned int i=0; i<=count; i++)
│ │ │ │ +
131 {
│ │ │ │ +
132 // filename
│ │ │ │ +
133 std::string piecepath;
│ │ │ │ +
134 std::string fullname;
│ │ │ │ +
135 if(size_==1) {
│ │ │ │ +
136 piecepath = path_;
│ │ │ │ +
137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath);
│ │ │ │ +
138 }
│ │ │ │ +
139 else {
│ │ │ │ +
140 piecepath = concatPaths(path_, extendpath_);
│ │ │ │ +
141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath, size_);
│ │ │ │ +
142 }
│ │ │ │ +
143 pvdFile << "<DataSet timestep=\"" << timesteps_[i]
│ │ │ │ +
144 << "\" group=\"\" part=\"0\" name=\"\" file=\""
│ │ │ │ +
145 << fullname << "\"/> \n";
│ │ │ │ +
146 }
│ │ │ │ +
147 pvdFile << "</Collection> \n"
│ │ │ │ +
148 << "</VTKFile> \n" << std::flush;
│ │ │ │ +
149 pvdFile.close();
│ │ │ │ +
150 }
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │ +
152
│ │ │ │ +
│ │ │ │ +
156 void clear()
│ │ │ │ +
157 {
│ │ │ │ +
158 vtkWriter_->clear();
│ │ │ │ +
159 }
│ │ │ │ +
│ │ │ │ +
160
│ │ │ │ +
│ │ │ │ +
164 const std::vector<double>& getTimeSteps() const
│ │ │ │ +
165 {
│ │ │ │ +
166 return timesteps_;
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
│ │ │ │ +
174 void setTimeSteps(const std::vector<double>& timesteps)
│ │ │ │ +
175 {
│ │ │ │ +
176 timesteps_ = timesteps;
│ │ │ │ +
177 }
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
179 private:
│ │ │ │ +
180
│ │ │ │ +
181 // create sequence name
│ │ │ │ +
182 std::string seqName(unsigned int count) const
│ │ │ │ +
183 {
│ │ │ │ +
184 std::stringstream n;
│ │ │ │ +
185 n.fill('0');
│ │ │ │ +
186 n << name_ << "-" << std::setw(5) << count;
│ │ │ │ +
187 return n.str();
│ │ │ │ +
188 }
│ │ │ │ +
189 };
│ │ │ │ +
│ │ │ │ +
190
│ │ │ │ +
191} // end namespace Dune
│ │ │ │ +
192
│ │ │ │ +
193#endif
│ │ │ │ +
Provides file i/o for the visualization toolkit.
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
int & noflines()
Definition basic.hh:87
│ │ │ │ -
Definition general.hh:25
│ │ │ │ -
int nofsimplex()
Definition general.hh:46
│ │ │ │ -
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition general.cc:101
│ │ │ │ -
bool ok()
Definition general.hh:41
│ │ │ │ +
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ +
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ +
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ +
A base class for grid functions with any return type and dimension.
Definition function.hh:42
│ │ │ │ +
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition vtksequencewriterbase.hh:34
│ │ │ │ +
void addVertexData(const V &v, const std::string &name, int ncomps=1)
Adds a field of vertex data to the VTK file.
Definition vtksequencewriterbase.hh:97
│ │ │ │ +
const std::vector< double > & getTimeSteps() const
Retrieve the current list of time steps.
Definition vtksequencewriterbase.hh:164
│ │ │ │ +
const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
Definition vtksequencewriterbase.hh:63
│ │ │ │ +
void write(double time, VTK::OutputType type=VTK::ascii)
Writes VTK data for the given time,.
Definition vtksequencewriterbase.hh:108
│ │ │ │ +
void addVertexData(const std::shared_ptr< const typename VTKWriter< GridView >::VTKFunction > &p)
Adds a field of vertex data to the VTK file.
Definition vtksequencewriterbase.hh:86
│ │ │ │ +
void addCellData(const V &v, const std::string &name, int ncomps=1)
Adds a field of cell data to the VTK file.
Definition vtksequencewriterbase.hh:80
│ │ │ │ +
VTKSequenceWriterBase(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath, int rank, int size)
Set up the VTKSequenceWriterBase class.
Definition vtksequencewriterbase.hh:47
│ │ │ │ +
void addCellData(const std::shared_ptr< const typename VTKWriter< GridView >::VTKFunction > &p)
Adds a field of cell data to the VTK file.
Definition vtksequencewriterbase.hh:69
│ │ │ │ +
void setTimeSteps(const std::vector< double > &timesteps)
Set the current list of time steps.
Definition vtksequencewriterbase.hh:174
│ │ │ │ +
void clear()
Clears all VTK data added to the VTK writer.
Definition vtksequencewriterbase.hh:156
│ │ │ │ +
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,99 +2,235 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -general.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +vtksequencewriterbase.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH │ │ │ │ │ -6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH │ │ │ │ │ +8 │ │ │ │ │ 9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 namespace dgf │ │ │ │ │ -18 { │ │ │ │ │ -19 │ │ │ │ │ -20 // GeneralBlock │ │ │ │ │ -21 // --------- │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +17#include │ │ │ │ │ +18 │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +20 │ │ │ │ │ +21namespace _D_u_n_e { │ │ │ │ │ 22 │ │ │ │ │ -_2_3 class _G_e_n_e_r_a_l_B_l_o_c_k │ │ │ │ │ -24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -25 { │ │ │ │ │ -26 unsigned int nofvtx; │ │ │ │ │ -27 int dimgrid; │ │ │ │ │ -28 bool goodline; // active line describes a vertex │ │ │ │ │ -29 std :: vector< unsigned int > map; // active vertex │ │ │ │ │ -30 int nofparams; │ │ │ │ │ -31 int vtxoffset; │ │ │ │ │ -32 │ │ │ │ │ -33 public: │ │ │ │ │ -34 _G_e_n_e_r_a_l_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int │ │ │ │ │ -&pdimgrid ); │ │ │ │ │ -35 │ │ │ │ │ -36 int _g_e_t ( std :: vector< std :: vector< unsigned int> > &simplex, │ │ │ │ │ -37 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ │ -38 int &nofp ); │ │ │ │ │ -39 │ │ │ │ │ -40 // some information │ │ │ │ │ -_4_1 bool _o_k () │ │ │ │ │ -42 { │ │ │ │ │ -43 return goodline; │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -_4_6 int _n_o_f_s_i_m_p_l_e_x () │ │ │ │ │ -47 { │ │ │ │ │ -48 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -51 private: │ │ │ │ │ -52 // get the dimension of the grid │ │ │ │ │ -53 int getDimGrid (); │ │ │ │ │ -54 // get next simplex │ │ │ │ │ -55 bool next ( std :: vector< unsigned int > &simplex, │ │ │ │ │ -56 std :: vector< double > ¶m ); │ │ │ │ │ -57 }; │ │ │ │ │ -58 │ │ │ │ │ -59 } // end namespace dgf │ │ │ │ │ -60 │ │ │ │ │ -61} // end namespace Dune │ │ │ │ │ -62 │ │ │ │ │ -63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +32 template │ │ │ │ │ +_3_3 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +34 { │ │ │ │ │ +35 std::shared_ptr > vtkWriter_; │ │ │ │ │ +36 std::vector timesteps_; │ │ │ │ │ +37 std::string name_,path_,extendpath_; │ │ │ │ │ +38 int rank_; │ │ │ │ │ +39 int size_; │ │ │ │ │ +40 public: │ │ │ │ │ +_4_7 explicit _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > │ │ │ │ │ +_v_t_k_W_r_i_t_e_r, │ │ │ │ │ +48 const std::string& name, │ │ │ │ │ +49 const std::string& path, │ │ │ │ │ +50 const std::string& extendpath, │ │ │ │ │ +51 int rank, │ │ │ │ │ +52 int size) │ │ │ │ │ +53 : vtkWriter_(_v_t_k_W_r_i_t_e_r), │ │ │ │ │ +54 name_(name), path_(path), │ │ │ │ │ +55 extendpath_(extendpath), │ │ │ │ │ +56 rank_(rank), │ │ │ │ │ +57 size_(size) │ │ │ │ │ +58 {} │ │ │ │ │ +59 │ │ │ │ │ +_6_3 const std::shared_ptr< VTKWriter >& _v_t_k_W_r_i_t_e_r() const │ │ │ │ │ +64 { │ │ │ │ │ +65 return vtkWriter_; │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_9 void _a_d_d_C_e_l_l_D_a_t_a (const std::shared_ptr_:_: │ │ │ │ │ +_V_T_K_F_u_n_c_t_i_o_n> &p) │ │ │ │ │ +70 { │ │ │ │ │ +71 vtkWriter_->addCellData(p); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +79 template │ │ │ │ │ +_8_0 void _a_d_d_C_e_l_l_D_a_t_a (const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +81 { │ │ │ │ │ +82 vtkWriter_->addCellData(v, name, ncomps); │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_8_6 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const std::shared_ptr_:_:_V_T_K_F_u_n_c_t_i_o_n> &p) │ │ │ │ │ +87 { │ │ │ │ │ +88 vtkWriter_->addVertexData(p); │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +96 template │ │ │ │ │ +_9_7 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +98 { │ │ │ │ │ +99 vtkWriter_->addVertexData(v, name, ncomps); │ │ │ │ │ +100 } │ │ │ │ │ +101 │ │ │ │ │ +102 │ │ │ │ │ +_1_0_8 void _w_r_i_t_e (double time, _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type = _V_T_K_:_:_a_s_c_i_i) │ │ │ │ │ +109 { │ │ │ │ │ +110 /* remember current time step */ │ │ │ │ │ +111 unsigned int count = timesteps_.size(); │ │ │ │ │ +112 timesteps_.push_back(time); │ │ │ │ │ +113 │ │ │ │ │ +114 /* write VTK file */ │ │ │ │ │ +115 if(size_==1) │ │ │ │ │ +116 vtkWriter_->write(concatPaths(path_,seqName(count)),type); │ │ │ │ │ +117 else │ │ │ │ │ +118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type); │ │ │ │ │ +119 │ │ │ │ │ +120 /* write pvd file ... only on rank 0 */ │ │ │ │ │ +121 if (rank_==0) { │ │ │ │ │ +122 std::ofstream pvdFile; │ │ │ │ │ +123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +124 std::ios_base::eofbit); │ │ │ │ │ +125 std::string pvdname = name_ + ".pvd"; │ │ │ │ │ +126 pvdFile.open(pvdname.c_str()); │ │ │ │ │ +127 pvdFile << " \n" │ │ │ │ │ +128 << " \n" │ │ │ │ │ +129 << " \n"; │ │ │ │ │ +130 for (unsigned int i=0; i<=count; i++) │ │ │ │ │ +131 { │ │ │ │ │ +132 // filename │ │ │ │ │ +133 std::string piecepath; │ │ │ │ │ +134 std::string fullname; │ │ │ │ │ +135 if(size_==1) { │ │ │ │ │ +136 piecepath = path_; │ │ │ │ │ +137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath); │ │ │ │ │ +138 } │ │ │ │ │ +139 else { │ │ │ │ │ +140 piecepath = concatPaths(path_, extendpath_); │ │ │ │ │ +141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath, size_); │ │ │ │ │ +142 } │ │ │ │ │ +143 pvdFile << " \n"; │ │ │ │ │ +146 } │ │ │ │ │ +147 pvdFile << " \n" │ │ │ │ │ +148 << " \n" << std::flush; │ │ │ │ │ +149 pvdFile.close(); │ │ │ │ │ +150 } │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +_1_5_6 void _c_l_e_a_r() │ │ │ │ │ +157 { │ │ │ │ │ +158 vtkWriter_->clear(); │ │ │ │ │ +159 } │ │ │ │ │ +160 │ │ │ │ │ +_1_6_4 const std::vector& _g_e_t_T_i_m_e_S_t_e_p_s() const │ │ │ │ │ +165 { │ │ │ │ │ +166 return timesteps_; │ │ │ │ │ +167 } │ │ │ │ │ +168 │ │ │ │ │ +_1_7_4 void _s_e_t_T_i_m_e_S_t_e_p_s(const std::vector& timesteps) │ │ │ │ │ +175 { │ │ │ │ │ +176 timesteps_ = timesteps; │ │ │ │ │ +177 } │ │ │ │ │ +178 │ │ │ │ │ +179 private: │ │ │ │ │ +180 │ │ │ │ │ +181 // create sequence name │ │ │ │ │ +182 std::string seqName(unsigned int count) const │ │ │ │ │ +183 { │ │ │ │ │ +184 std::stringstream n; │ │ │ │ │ +185 n.fill('0'); │ │ │ │ │ +186 n << name_ << "-" << std::setw(5) << count; │ │ │ │ │ +187 return n.str(); │ │ │ │ │ +188 } │ │ │ │ │ +189 }; │ │ │ │ │ +190 │ │ │ │ │ +191} // end namespace Dune │ │ │ │ │ +192 │ │ │ │ │ +193#endif │ │ │ │ │ +_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides file i/o for the visualization toolkit. │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ -int & noflines() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn general.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k_:_:_n_o_f_s_i_m_p_l_e_x │ │ │ │ │ -int nofsimplex() │ │ │ │ │ -DDeeffiinniittiioonn general.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< │ │ │ │ │ -std ::vector< double > > ¶ms, int &nofp) │ │ │ │ │ -DDeeffiinniittiioonn general.cc:101 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn general.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ +OutputType │ │ │ │ │ +How the bulk data should be stored in the file. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ +@ ascii │ │ │ │ │ +Output to the file is in ascii. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ +std::string getEndiannessString() │ │ │ │ │ +determine endianness of this C++ implementation │ │ │ │ │ +DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +A base class for grid functions with any return type and dimension. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +Base class to write pvd-files which contains a list of all collected vtk-files. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +Adds a field of vertex data to the VTK file. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_g_e_t_T_i_m_e_S_t_e_p_s │ │ │ │ │ +const std::vector< double > & getTimeSteps() const │ │ │ │ │ +Retrieve the current list of time steps. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_v_t_k_W_r_i_t_e_r │ │ │ │ │ +const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ +void write(double time, VTK::OutputType type=VTK::ascii) │ │ │ │ │ +Writes VTK data for the given time,. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const std::shared_ptr< const typename VTKWriter< GridView │ │ │ │ │ +>::VTKFunction > &p) │ │ │ │ │ +Adds a field of vertex data to the VTK file. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +Adds a field of cell data to the VTK file. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +VTKSequenceWriterBase(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const │ │ │ │ │ +std::string &name, const std::string &path, const std::string &extendpath, int │ │ │ │ │ +rank, int size) │ │ │ │ │ +Set up the VTKSequenceWriterBase class. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< const typename VTKWriter< GridView >:: │ │ │ │ │ +VTKFunction > &p) │ │ │ │ │ +Adds a field of cell data to the VTK file. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_s_e_t_T_i_m_e_S_t_e_p_s │ │ │ │ │ +void setTimeSteps(const std::vector< double > ×teps) │ │ │ │ │ +Set the current list of time steps. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_c_l_e_a_r │ │ │ │ │ +void clear() │ │ │ │ │ +Clears all VTK data added to the VTK writer. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:156 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ +Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridparameter.hh File Reference │ │ │ │ +dune-grid: b64enc.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
gridparameter.hh File Reference
│ │ │ │ +
b64enc.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ + │ │ │ │ +

Simple base64 encode. │ │ │ │ +More...

│ │ │ │ +
#include <assert.h>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::GridParameterBlock
 Common Grid parameters. More...
struct  Dune::b64chunk
 struct representing the three byte text as well as the four 6 bit chunks More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Variables

const char Dune::base64table []
 endoing table
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Simple base64 encode.

│ │ │ │ +
Author
Christian Engwer
│ │ │ │ +

We implement the base64 encoding (c.f. RFC 4648 https://tools.ietf.org/html/rfc4648).

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,34 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -gridparameter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +b64enc.hh File Reference │ │ │ │ │ +Simple base64 encode. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -  Common _G_r_i_d parameters. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_b_6_4_c_h_u_n_k │ │ │ │ │ +  struct representing the three byte text as well as the four 6 bit │ │ │ │ │ + chunks _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +VVaarriiaabblleess │ │ │ │ │ +const char  _D_u_n_e_:_:_b_a_s_e_6_4_t_a_b_l_e [] │ │ │ │ │ +  endoing table │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Simple base64 encode. │ │ │ │ │ + Author │ │ │ │ │ + Christian Engwer │ │ │ │ │ +We implement the base64 encoding (c.f. RFC 4648 _h_t_t_p_s_:_/_/_t_o_o_l_s_._i_e_t_f_._o_r_g_/_h_t_m_l_/ │ │ │ │ │ +_r_f_c_4_6_4_8). │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridparameter.hh Source File │ │ │ │ +dune-grid: b64enc.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,134 +70,108 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridparameter.hh
│ │ │ │ +
b64enc.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <string>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <assert.h>
│ │ │ │
10
│ │ │ │ - │ │ │ │ +
11namespace Dune {
│ │ │ │
12
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace dgf
│ │ │ │ -
18 {
│ │ │ │ +
│ │ │ │ +
23 const char base64table[] =
│ │ │ │ +
24 {
│ │ │ │ +
25 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
│ │ │ │ +
26 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
│ │ │ │ +
27 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
│ │ │ │ +
28 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
│ │ │ │ +
29 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
│ │ │ │ +
30 };
│ │ │ │ +
│ │ │ │ +
31
│ │ │ │
│ │ │ │ - │ │ │ │ -
34 : public BasicBlock
│ │ │ │ -
35 {
│ │ │ │ -
36 public:
│ │ │ │ -
37 typedef unsigned int Flags;
│ │ │ │ +
33 struct b64chunk
│ │ │ │ +
34 {
│ │ │ │ +
35 using size_type = unsigned char;
│ │ │ │ + │ │ │ │ +
37 char txt[3];
│ │ │ │
38
│ │ │ │ -
39 static const Flags foundName = 1 << 0;
│ │ │ │ -
40 static const Flags foundDumpFileName = 1 << 1;
│ │ │ │ -
41 static const Flags foundLongestEdge = 1 << 5;
│ │ │ │ -
42
│ │ │ │ -
43 protected:
│ │ │ │ -
44 Flags foundFlags_; // supportFlags, this block was created with
│ │ │ │ -
45 std::string name_; // name of the grid
│ │ │ │ -
46 std::string dumpFileName_; // name of the grid
│ │ │ │ -
47 bool markLongestEdge_; // Mark longest edge for AlbertaGrid
│ │ │ │ -
48
│ │ │ │ -
49 private:
│ │ │ │ -
50 // copy not implemented
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
53 public:
│ │ │ │ -
55 GridParameterBlock ( std::istream &in );
│ │ │ │ -
56
│ │ │ │ -
│ │ │ │ -
58 const std::string &name ( const std::string &defaultValue ) const
│ │ │ │ -
59 {
│ │ │ │ -
60 if( (foundFlags_ & foundName) == 0 )
│ │ │ │ -
61 {
│ │ │ │ -
62 dwarn << "GridParameterBlock: Parameter 'name' not specified, "
│ │ │ │ -
63 << "defaulting to '" << defaultValue << "'." << std::endl;
│ │ │ │ -
64 return defaultValue;
│ │ │ │ -
65 }
│ │ │ │ -
66 else
│ │ │ │ -
67 return name_;
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
│ │ │ │ -
70 const std::string &dumpFileName ( ) const
│ │ │ │ -
71 {
│ │ │ │ -
72 if( (foundFlags_ & foundDumpFileName) != 0 )
│ │ │ │ -
73 {
│ │ │ │ -
74 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', "
│ │ │ │ -
75 << "dumping file to `" << dumpFileName_ << "'" << std::endl;
│ │ │ │ -
76 }
│ │ │ │ -
77 return dumpFileName_;
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 bool markLongestEdge () const
│ │ │ │ -
82 {
│ │ │ │ -
83 if( (foundFlags_ & foundLongestEdge) == 0 )
│ │ │ │ -
84 {
│ │ │ │ -
85 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, "
│ │ │ │ -
86 << "defaulting to 'ARBITRARY'." << std::endl;
│ │ │ │ -
87 }
│ │ │ │ -
88 return markLongestEdge_;
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
91 // some information
│ │ │ │ -
│ │ │ │ -
92 bool ok()
│ │ │ │ -
93 {
│ │ │ │ -
94 return true;
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96 };
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
98
│ │ │ │ -
99 } // end namespace dgf
│ │ │ │ -
100
│ │ │ │ -
101} // end namespace Dune
│ │ │ │ -
102
│ │ │ │ -
103#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
39 void reset()
│ │ │ │ +
40 {
│ │ │ │ +
41 size = 0;
│ │ │ │ +
42 txt[0] = txt[1] = txt[2] = 0;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
45 int read(const char* t, size_type s)
│ │ │ │ +
46 {
│ │ │ │ +
47 size = s>=3 ? 3 : s;
│ │ │ │ +
48 txt[0] = s>0 ? t[0] : 0;
│ │ │ │ +
49 txt[1] = s>1 ? t[1] : 0;
│ │ │ │ +
50 txt[2] = s>2 ? t[2] : 0;
│ │ │ │ +
51 return size;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
54 void put(const char c)
│ │ │ │ +
55 {
│ │ │ │ +
56 assert (size < 3);
│ │ │ │ +
57 txt[size++] = c;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ +
60 void write(char* t)
│ │ │ │ +
61 {
│ │ │ │ +
62 const unsigned A = (txt[0] & 0b1111'1100) >> 2;
│ │ │ │ +
63 const unsigned B = (txt[0] & 0b0000'0011) << 4 | (txt[1] & 0b1111'0000) >> 4;
│ │ │ │ +
64 const unsigned C = (txt[1] & 0b0000'1111) << 2 | (txt[2] & 0b1100'0000) >> 6;
│ │ │ │ +
65 const unsigned D = txt[2] & 0b0011'1111;
│ │ │ │ +
66 t[0] = size>0 ? base64table[A] : '=';
│ │ │ │ +
67 t[1] = size>0 ? base64table[B] : '=';
│ │ │ │ +
68 t[2] = size>1 ? base64table[C] : '=';
│ │ │ │ +
69 t[3] = size>2 ? base64table[D] : '=';
│ │ │ │ +
70 size = 0;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72 };
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
76} // namespace Dune
│ │ │ │ +
77
│ │ │ │ +
78#endif // DUNE_GRID_IO_FILE_VTK_B64ENC_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
Common Grid parameters.
Definition gridparameter.hh:35
│ │ │ │ -
static const Flags foundDumpFileName
Definition gridparameter.hh:40
│ │ │ │ -
const std::string & dumpFileName() const
Definition gridparameter.hh:70
│ │ │ │ -
static const Flags foundName
Definition gridparameter.hh:39
│ │ │ │ -
GridParameterBlock(std::istream &in)
constructor: read commmon parameters
│ │ │ │ -
unsigned int Flags
Definition gridparameter.hh:37
│ │ │ │ -
std::string dumpFileName_
Definition gridparameter.hh:46
│ │ │ │ -
bool ok()
Definition gridparameter.hh:92
│ │ │ │ -
Flags foundFlags_
Definition gridparameter.hh:44
│ │ │ │ -
const std::string & name(const std::string &defaultValue) const
return the name of the grid
Definition gridparameter.hh:58
│ │ │ │ -
std::string name_
Definition gridparameter.hh:45
│ │ │ │ -
bool markLongestEdge() const
returns true if longest edge should be marked for AlbertaGrid
Definition gridparameter.hh:81
│ │ │ │ -
static const Flags foundLongestEdge
Definition gridparameter.hh:41
│ │ │ │ -
bool markLongestEdge_
Definition gridparameter.hh:47
│ │ │ │ +
const char base64table[]
endoing table
Definition b64enc.hh:23
│ │ │ │ +
struct representing the three byte text as well as the four 6 bit chunks
Definition b64enc.hh:34
│ │ │ │ +
char txt[3]
Definition b64enc.hh:37
│ │ │ │ +
unsigned char size_type
Definition b64enc.hh:35
│ │ │ │ +
void write(char *t)
Definition b64enc.hh:60
│ │ │ │ +
size_type size
Definition b64enc.hh:36
│ │ │ │ +
int read(const char *t, size_type s)
Definition b64enc.hh:45
│ │ │ │ +
void put(const char c)
Definition b64enc.hh:54
│ │ │ │ +
void reset()
Definition b64enc.hh:39
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,150 +2,111 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -gridparameter.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +b64enc.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +11namespace _D_u_n_e { │ │ │ │ │ 12 │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 namespace dgf │ │ │ │ │ -18 { │ │ │ │ │ -_3_3 class _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -34 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -35 { │ │ │ │ │ -36 public: │ │ │ │ │ -_3_7 typedef unsigned int _F_l_a_g_s; │ │ │ │ │ +_2_3 const char _b_a_s_e_6_4_t_a_b_l_e[] = │ │ │ │ │ +24 { │ │ │ │ │ +25 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', │ │ │ │ │ +26 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', │ │ │ │ │ +27 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', │ │ │ │ │ +28 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', │ │ │ │ │ +29 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' │ │ │ │ │ +30 }; │ │ │ │ │ +31 │ │ │ │ │ +_3_3 struct _b_6_4_c_h_u_n_k │ │ │ │ │ +34 { │ │ │ │ │ +_3_5 using _s_i_z_e___t_y_p_e = unsigned char; │ │ │ │ │ +_3_6 _s_i_z_e___t_y_p_e _s_i_z_e; │ │ │ │ │ +_3_7 char _t_x_t[3]; │ │ │ │ │ 38 │ │ │ │ │ -_3_9 static const _F_l_a_g_s _f_o_u_n_d_N_a_m_e = 1 << 0; │ │ │ │ │ -_4_0 static const _F_l_a_g_s _f_o_u_n_d_D_u_m_p_F_i_l_e_N_a_m_e = 1 << 1; │ │ │ │ │ -_4_1 static const _F_l_a_g_s _f_o_u_n_d_L_o_n_g_e_s_t_E_d_g_e = 1 << 5; │ │ │ │ │ -42 │ │ │ │ │ -43 protected: │ │ │ │ │ -_4_4 _F_l_a_g_s _f_o_u_n_d_F_l_a_g_s__; // supportFlags, this block was created with │ │ │ │ │ -_4_5 std::string _n_a_m_e__; // name of the grid │ │ │ │ │ -_4_6 std::string _d_u_m_p_F_i_l_e_N_a_m_e__; // name of the grid │ │ │ │ │ -_4_7 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; // Mark longest edge for AlbertaGrid │ │ │ │ │ -48 │ │ │ │ │ -49 private: │ │ │ │ │ -50 // copy not implemented │ │ │ │ │ -51 _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k(const _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k&); │ │ │ │ │ -52 │ │ │ │ │ -53 public: │ │ │ │ │ -_5_5 _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &in ); │ │ │ │ │ -56 │ │ │ │ │ -_5_8 const std::string &_n_a_m_e ( const std::string &defaultValue ) const │ │ │ │ │ -59 { │ │ │ │ │ -60 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_N_a_m_e) == 0 ) │ │ │ │ │ +_3_9 void _r_e_s_e_t() │ │ │ │ │ +40 { │ │ │ │ │ +41 _s_i_z_e = 0; │ │ │ │ │ +42 _t_x_t[0] = _t_x_t[1] = _t_x_t[2] = 0; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_5 int _r_e_a_d(const char* t, _s_i_z_e___t_y_p_e s) │ │ │ │ │ +46 { │ │ │ │ │ +47 _s_i_z_e = s>=3 ? 3 : s; │ │ │ │ │ +48 _t_x_t[0] = s>0 ? t[0] : 0; │ │ │ │ │ +49 _t_x_t[1] = s>1 ? t[1] : 0; │ │ │ │ │ +50 _t_x_t[2] = s>2 ? t[2] : 0; │ │ │ │ │ +51 return _s_i_z_e; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 void _p_u_t(const char c) │ │ │ │ │ +55 { │ │ │ │ │ +56 assert (_s_i_z_e < 3); │ │ │ │ │ +57 _t_x_t[_s_i_z_e++] = c; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +_6_0 void _w_r_i_t_e(char* t) │ │ │ │ │ 61 { │ │ │ │ │ -62 dwarn << "GridParameterBlock: Parameter 'name' not specified, " │ │ │ │ │ -63 << "defaulting to '" << defaultValue << "'." << std::endl; │ │ │ │ │ -64 return defaultValue; │ │ │ │ │ -65 } │ │ │ │ │ -66 else │ │ │ │ │ -67 return _n_a_m_e__; │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -_7_0 const std::string &_d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ │ -71 { │ │ │ │ │ -72 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_D_u_m_p_F_i_l_e_N_a_m_e) != 0 ) │ │ │ │ │ -73 { │ │ │ │ │ -74 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', " │ │ │ │ │ -75 << "dumping file to `" << _d_u_m_p_F_i_l_e_N_a_m_e__ << "'" << std::endl; │ │ │ │ │ -76 } │ │ │ │ │ -77 return _d_u_m_p_F_i_l_e_N_a_m_e__; │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -_8_1 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e () const │ │ │ │ │ -82 { │ │ │ │ │ -83 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_L_o_n_g_e_s_t_E_d_g_e) == 0 ) │ │ │ │ │ -84 { │ │ │ │ │ -85 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, " │ │ │ │ │ -86 << "defaulting to 'ARBITRARY'." << std::endl; │ │ │ │ │ -87 } │ │ │ │ │ -88 return _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -91 // some information │ │ │ │ │ -_9_2 bool _o_k() │ │ │ │ │ -93 { │ │ │ │ │ -94 return true; │ │ │ │ │ -95 } │ │ │ │ │ -96 }; │ │ │ │ │ -97 │ │ │ │ │ -98 │ │ │ │ │ -99 } // end namespace dgf │ │ │ │ │ -100 │ │ │ │ │ -101} // end namespace Dune │ │ │ │ │ -102 │ │ │ │ │ -103#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +62 const unsigned A = (_t_x_t[0] & 0b1111'1100) >> 2; │ │ │ │ │ +63 const unsigned B = (_t_x_t[0] & 0b0000'0011) << 4 | (_t_x_t[1] & 0b1111'0000) >> │ │ │ │ │ +4; │ │ │ │ │ +64 const unsigned C = (_t_x_t[1] & 0b0000'1111) << 2 | (_t_x_t[2] & 0b1100'0000) >> │ │ │ │ │ +6; │ │ │ │ │ +65 const unsigned D = _t_x_t[2] & 0b0011'1111; │ │ │ │ │ +66 t[0] = _s_i_z_e>0 ? _b_a_s_e_6_4_t_a_b_l_e[A] : '='; │ │ │ │ │ +67 t[1] = _s_i_z_e>0 ? _b_a_s_e_6_4_t_a_b_l_e[B] : '='; │ │ │ │ │ +68 t[2] = _s_i_z_e>1 ? _b_a_s_e_6_4_t_a_b_l_e[C] : '='; │ │ │ │ │ +69 t[3] = _s_i_z_e>2 ? _b_a_s_e_6_4_t_a_b_l_e[D] : '='; │ │ │ │ │ +70 _s_i_z_e = 0; │ │ │ │ │ +71 } │ │ │ │ │ +72 }; │ │ │ │ │ +73 │ │ │ │ │ +76} // namespace Dune │ │ │ │ │ +77 │ │ │ │ │ +78#endif // DUNE_GRID_IO_FILE_VTK_B64ENC_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -Common Grid parameters. │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_D_u_m_p_F_i_l_e_N_a_m_e │ │ │ │ │ -static const Flags foundDumpFileName │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_d_u_m_p_F_i_l_e_N_a_m_e │ │ │ │ │ -const std::string & dumpFileName() const │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_N_a_m_e │ │ │ │ │ -static const Flags foundName │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -GridParameterBlock(std::istream &in) │ │ │ │ │ -constructor: read commmon parameters │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_F_l_a_g_s │ │ │ │ │ -unsigned int Flags │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_d_u_m_p_F_i_l_e_N_a_m_e__ │ │ │ │ │ -std::string dumpFileName_ │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_F_l_a_g_s__ │ │ │ │ │ -Flags foundFlags_ │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_a_m_e │ │ │ │ │ -const std::string & name(const std::string &defaultValue) const │ │ │ │ │ -return the name of the grid │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_a_m_e__ │ │ │ │ │ -std::string name_ │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ -bool markLongestEdge() const │ │ │ │ │ -returns true if longest edge should be marked for AlbertaGrid │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ -static const Flags foundLongestEdge │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__ │ │ │ │ │ -bool markLongestEdge_ │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_b_a_s_e_6_4_t_a_b_l_e │ │ │ │ │ +const char base64table[] │ │ │ │ │ +endoing table │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k │ │ │ │ │ +struct representing the three byte text as well as the four 6 bit chunks │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_t_x_t │ │ │ │ │ +char txt[3] │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ +unsigned char size_type │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_w_r_i_t_e │ │ │ │ │ +void write(char *t) │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_s_i_z_e │ │ │ │ │ +size_type size │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_r_e_a_d │ │ │ │ │ +int read(const char *t, size_type s) │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_p_u_t │ │ │ │ │ +void put(const char c) │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_r_e_s_e_t │ │ │ │ │ +void reset() │ │ │ │ │ +DDeeffiinniittiioonn b64enc.hh:39 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarydom.cc File Reference │ │ │ │ +dune-grid: function.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,59 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundarydom.cc File Reference
│ │ │ │ +
function.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

Functions for VTK output. │ │ │ │ +More...

│ │ │ │ +
#include <string>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/multilineargeometry.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::VTKFunction< GridView >
 A base class for grid functions with any return type and dimension. More...
 
class  Dune::P0VTKFunction< GV, V >
 Take a vector and interpret it as cell data for the VTKWriter. More...
 
class  Dune::P1VTKFunction< GV, V >
 Take a vector and interpret it as point data for the VTKWriter. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Functions for VTK output.

│ │ │ │ +
Author
Peter Bastian, Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,21 +2,41 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundarydom.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_o_u_n_d_a_r_y_d_o_m_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +function.hh File Reference │ │ │ │ │ +Functions for VTK output. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_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_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  A base class for grid functions with any return type and dimension. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_,_ _V_ _> │ │ │ │ │ +  Take a vector and interpret it as cell data for the _V_T_K_W_r_i_t_e_r. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_,_ _V_ _> │ │ │ │ │ +  Take a vector and interpret it as point data for the _V_T_K_W_r_i_t_e_r. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Functions for VTK output. │ │ │ │ │ + Author │ │ │ │ │ + Peter Bastian, Christian Engwer │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: interval.cc File Reference │ │ │ │ +dune-grid: volumeiterators.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
interval.cc File Reference
│ │ │ │ +
volumeiterators.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
│ │ │ │ -
│ │ │ │ +
#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/corneriterator.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/pointiterator.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::VTK::ConformingVolumeIteratorFactory< GV >
 
class  Dune::VTK::NonConformingVolumeIteratorFactory< GV >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,21 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -interval.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_i_n_t_e_r_v_a_l_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +volumeiterators.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_o_i_n_t_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_ _G_V_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_ _G_V_ _> │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: periodicfacetrans.cc File Reference │ │ │ │ +dune-grid: vtksequencewriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
periodicfacetrans.cc File Reference
│ │ │ │ +
vtksequencewriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>
│ │ │ │ -
│ │ │ │ +
#include <memory>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtkwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::VTKSequenceWriter< GridView >
 Writer for the ouput of grid functions in the vtk format. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,21 +2,25 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -periodicfacetrans.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_e_r_i_o_d_i_c_f_a_c_e_t_r_a_n_s_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +vtksequencewriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Writer for the ouput of grid functions in the vtk format. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dim.hh File Reference │ │ │ │ +dune-grid: corner.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dim.hh File Reference
│ │ │ │ +
corner.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::DimBlock
class  Dune::VTK::Corner< Cell >
 simple class representing a corner of a cell More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +2,24 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ + * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dim.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +corner.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ +  simple class representing a corner of a cell _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dim.hh Source File │ │ │ │ +dune-grid: corner.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,79 +70,87 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dim.hh
│ │ │ │ +
corner.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_DIMBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_DIMBLOCK_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
│ │ │ │ +
8
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │
15
│ │ │ │ -
16 namespace dgf
│ │ │ │ -
17 {
│ │ │ │ -
│ │ │ │ -
18 class DimBlock : public BasicBlock {
│ │ │ │ -
19 int _dimworld; // dimension of world
│ │ │ │ -
20 int _dim; // dimension of grid
│ │ │ │ -
21 public:
│ │ │ │ -
22 const static char* ID;
│ │ │ │ -
23 // initialize block and get dimension of world
│ │ │ │ -
24 DimBlock ( std :: istream &in );
│ │ │ │ -
25 // get dimension of world found in block
│ │ │ │ -
│ │ │ │ -
26 int dim() {
│ │ │ │ -
27 return _dim;
│ │ │ │ -
28 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
29 int dimworld() {
│ │ │ │ -
30 return _dimworld;
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32 // some information
│ │ │ │ -
│ │ │ │ -
33 bool ok() {
│ │ │ │ -
34 return true;
│ │ │ │ -
35 }
│ │ │ │ -
│ │ │ │ -
36 };
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
38 } // end namespace dgf
│ │ │ │ -
39
│ │ │ │ -
40} // end namespace Dune
│ │ │ │ +
16 namespace VTK {
│ │ │ │ +
17
│ │ │ │ +
19
│ │ │ │ +
24 template<typename Cell>
│ │ │ │ +
│ │ │ │ +
25 class Corner {
│ │ │ │ +
26 // store a pointer to the element
│ │ │ │ +
27 const Cell* cell_;
│ │ │ │ +
28 // store index of the corner within element (Dune numbering)
│ │ │ │ +
29 unsigned index;
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
38 Corner(const Cell& cell, unsigned duneIndex)
│ │ │ │ +
39 : cell_(&cell), index(duneIndex)
│ │ │ │ +
40 { }
│ │ │ │ +
│ │ │ │
41
│ │ │ │ -
42#endif
│ │ │ │ - │ │ │ │ +
43 Corner() { }
│ │ │ │ +
44
│ │ │ │ +
46 const Cell& cell() const { return *cell_; }
│ │ │ │ +
48
│ │ │ │ +
52 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }
│ │ │ │ +
53
│ │ │ │ +
55 unsigned duneIndex() const { return index; }
│ │ │ │ +
57 void duneIndex(unsigned i) { index = i; }
│ │ │ │ +
58
│ │ │ │ +
60
│ │ │ │ +
63 unsigned vtkIndex() const { return renumber(cell_->type(), index); }
│ │ │ │ +
65
│ │ │ │ +
68 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }
│ │ │ │ +
69 };
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
71 } // namespace VTK
│ │ │ │ +
72
│ │ │ │ +
74
│ │ │ │ +
75} // namespace Dune
│ │ │ │ +
76
│ │ │ │ +
77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
Definition dim.hh:18
│ │ │ │ -
int dimworld()
Definition dim.hh:29
│ │ │ │ -
static const char * ID
Definition dim.hh:22
│ │ │ │ -
bool ok()
Definition dim.hh:33
│ │ │ │ -
int dim()
Definition dim.hh:26
│ │ │ │ +
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ +
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ +
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition corner.hh:63
│ │ │ │ +
void vtkIndex(unsigned i)
set the index of the corner within the cell in VTK-numbering
Definition corner.hh:68
│ │ │ │ +
Corner(const Cell &cell, unsigned duneIndex)
construct a Corner
Definition corner.hh:38
│ │ │ │ +
void cell(const Cell &cell__)
set a new cell
Definition corner.hh:52
│ │ │ │ +
void duneIndex(unsigned i)
set the index of the corner within the cell in Dune-numbering
Definition corner.hh:57
│ │ │ │ +
unsigned duneIndex() const
get the index of the corner within the cell in Dune-numbering
Definition corner.hh:55
│ │ │ │ +
const Cell & cell() const
get reference to the cell
Definition corner.hh:46
│ │ │ │ +
Corner()
construct an invalid Corner
Definition corner.hh:43
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,76 +2,107 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -dim.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +corner.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_DIMBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_DIMBLOCK_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ 15 │ │ │ │ │ -16 namespace dgf │ │ │ │ │ -17 { │ │ │ │ │ -_1_8 class _D_i_m_B_l_o_c_k : public _B_a_s_i_c_B_l_o_c_k { │ │ │ │ │ -19 int _dimworld; // dimension of world │ │ │ │ │ -20 int _dim; // dimension of grid │ │ │ │ │ -21 public: │ │ │ │ │ -_2_2 const static char* _I_D; │ │ │ │ │ -23 // initialize block and get dimension of world │ │ │ │ │ -24 _D_i_m_B_l_o_c_k ( std :: istream &in ); │ │ │ │ │ -25 // get dimension of world found in block │ │ │ │ │ -_2_6 int _d_i_m() { │ │ │ │ │ -27 return _dim; │ │ │ │ │ -28 } │ │ │ │ │ -_2_9 int _d_i_m_w_o_r_l_d() { │ │ │ │ │ -30 return _dimworld; │ │ │ │ │ -31 } │ │ │ │ │ -32 // some information │ │ │ │ │ -_3_3 bool _o_k() { │ │ │ │ │ -34 return true; │ │ │ │ │ -35 } │ │ │ │ │ -36 }; │ │ │ │ │ -37 │ │ │ │ │ -38 } // end namespace dgf │ │ │ │ │ -39 │ │ │ │ │ -40} // end namespace Dune │ │ │ │ │ +16 namespace VTK { │ │ │ │ │ +17 │ │ │ │ │ +19 │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _C_o_r_n_e_r { │ │ │ │ │ +26 // store a pointer to the element │ │ │ │ │ +27 const Cell* cell_; │ │ │ │ │ +28 // store index of the corner within element (Dune numbering) │ │ │ │ │ +29 unsigned index; │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +33 │ │ │ │ │ +_3_8 _C_o_r_n_e_r(const Cell& _c_e_l_l, unsigned _d_u_n_e_I_n_d_e_x) │ │ │ │ │ +39 : cell_(&_c_e_l_l), index(_d_u_n_e_I_n_d_e_x) │ │ │ │ │ +40 { } │ │ │ │ │ 41 │ │ │ │ │ -42#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +_4_3 _C_o_r_n_e_r() { } │ │ │ │ │ +44 │ │ │ │ │ +_4_6 const Cell& _c_e_l_l() const { return *cell_; } │ │ │ │ │ +48 │ │ │ │ │ +_5_2 void _c_e_l_l(const Cell& cell__) { cell_ = &cell__; index = 0; } │ │ │ │ │ +53 │ │ │ │ │ +_5_5 unsigned _d_u_n_e_I_n_d_e_x() const { return index; } │ │ │ │ │ +_5_7 void _d_u_n_e_I_n_d_e_x(unsigned i) { index = i; } │ │ │ │ │ +58 │ │ │ │ │ +60 │ │ │ │ │ +_6_3 unsigned _v_t_k_I_n_d_e_x() const { return _r_e_n_u_m_b_e_r(cell_->type(), index); } │ │ │ │ │ +65 │ │ │ │ │ +_6_8 void _v_t_k_I_n_d_e_x(unsigned i) { index = _r_e_n_u_m_b_e_r(cell_->type(), i); } │ │ │ │ │ +69 }; │ │ │ │ │ +70 │ │ │ │ │ +71 } // namespace VTK │ │ │ │ │ +72 │ │ │ │ │ +74 │ │ │ │ │ +75} // namespace Dune │ │ │ │ │ +76 │ │ │ │ │ +77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn dim.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_d_i_m_w_o_r_l_d │ │ │ │ │ -int dimworld() │ │ │ │ │ -DDeeffiinniittiioonn dim.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_I_D │ │ │ │ │ -static const char * ID │ │ │ │ │ -DDeeffiinniittiioonn dim.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn dim.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_d_i_m │ │ │ │ │ -int dim() │ │ │ │ │ -DDeeffiinniittiioonn dim.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r │ │ │ │ │ +int renumber(const Dune::GeometryType &t, int i) │ │ │ │ │ +renumber VTK <-> Dune │ │ │ │ │ +DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ +simple class representing a corner of a cell │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_v_t_k_I_n_d_e_x │ │ │ │ │ +unsigned vtkIndex() const │ │ │ │ │ +get the index of the corner within the cell in VTK-numbering │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_v_t_k_I_n_d_e_x │ │ │ │ │ +void vtkIndex(unsigned i) │ │ │ │ │ +set the index of the corner within the cell in VTK-numbering │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_C_o_r_n_e_r │ │ │ │ │ +Corner(const Cell &cell, unsigned duneIndex) │ │ │ │ │ +construct a Corner │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_c_e_l_l │ │ │ │ │ +void cell(const Cell &cell__) │ │ │ │ │ +set a new cell │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_d_u_n_e_I_n_d_e_x │ │ │ │ │ +void duneIndex(unsigned i) │ │ │ │ │ +set the index of the corner within the cell in Dune-numbering │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_d_u_n_e_I_n_d_e_x │ │ │ │ │ +unsigned duneIndex() const │ │ │ │ │ +get the index of the corner within the cell in Dune-numbering │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_c_e_l_l │ │ │ │ │ +const Cell & cell() const │ │ │ │ │ +get reference to the cell │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_C_o_r_n_e_r │ │ │ │ │ +Corner() │ │ │ │ │ +construct an invalid Corner │ │ │ │ │ +DDeeffiinniittiioonn corner.hh:43 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplexgeneration.cc File Reference │ │ │ │ +dune-grid: common.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,136 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
simplexgeneration.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
common.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

Common stuff for the VTKWriter. │ │ │ │ +More...

│ │ │ │ +
#include <limits>
│ │ │ │ +#include <sstream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <cstdint>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::VTK::PrintType< T >
 determine a type to safely put another type into a stream More...
 
struct  Dune::VTK::PrintType< unsigned char >
 
struct  Dune::VTK::PrintType< signed char >
 
struct  Dune::VTK::PrintType< char >
 
class  Dune::VTK::FieldInfo
 Descriptor struct for VTK fields. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Enumerations

enum  Dune::VTK::OutputType { Dune::VTK::ascii │ │ │ │ +, Dune::VTK::base64 │ │ │ │ +, Dune::VTK::appendedraw │ │ │ │ +, Dune::VTK::appendedbase64 │ │ │ │ + }
 How the bulk data should be stored in the file. More...
 
enum  Dune::VTK::DataMode { Dune::VTK::conforming │ │ │ │ +, Dune::VTK::nonconforming │ │ │ │ + }
 Whether to produce conforming or non-conforming output. More...
 
enum  Dune::VTK::GeometryType {
│ │ │ │ +  Dune::VTK::vertex = 1 │ │ │ │ +, Dune::VTK::line = 3 │ │ │ │ +, Dune::VTK::triangle = 5 │ │ │ │ +, Dune::VTK::polygon = 7 │ │ │ │ +,
│ │ │ │ +  Dune::VTK::quadrilateral = 9 │ │ │ │ +, Dune::VTK::tetrahedron = 10 │ │ │ │ +, Dune::VTK::hexahedron = 12 │ │ │ │ +, Dune::VTK::prism = 13 │ │ │ │ +,
│ │ │ │ +  Dune::VTK::pyramid = 14 │ │ │ │ +, Dune::VTK::polyhedron = 42 │ │ │ │ +
│ │ │ │ + }
 Type representing VTK's entity geometry types. More...
 
enum  Dune::VTK::FileType { Dune::VTK::polyData │ │ │ │ +, Dune::VTK::unstructuredGrid │ │ │ │ + }
 which type of VTK file to write More...
 
enum class  Dune::VTK::Precision {
│ │ │ │ +  Dune::VTK::int32 │ │ │ │ +, Dune::VTK::uint8 │ │ │ │ +, Dune::VTK::uint32 │ │ │ │ +, Dune::VTK::float32 │ │ │ │ +,
│ │ │ │ +  Dune::VTK::float64 │ │ │ │ +
│ │ │ │ + }
 which precision to use when writing out data to vtk files More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

GeometryType Dune::VTK::geometryType (const Dune::GeometryType &t)
 mapping from GeometryType to VTKGeometryType
 
int Dune::VTK::renumber (const Dune::GeometryType &t, int i)
 renumber VTK <-> Dune
 
template<typename T >
int Dune::VTK::renumber (const T &t, int i)
 renumber VTK <-> Dune
 
std::string Dune::VTK::getEndiannessString ()
 determine endianness of this C++ implementation
 
std::string Dune::VTK::toString (Precision p)
 map precision to VTK type name
 
std::size_t Dune::VTK::typeSize (Precision p)
 map precision to byte size
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Common stuff for the VTKWriter.

│ │ │ │ +
Author
Peter Bastian, Christian Engwer
│ │ │ │ +

This file contains common stuff for all instances of VTKWriter.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,21 +2,94 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -simplexgeneration.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_s_i_m_p_l_e_x_g_e_n_e_r_a_t_i_o_n_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +common.hh File Reference │ │ │ │ │ +Common stuff for the VTKWriter. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _T_ _> │ │ │ │ │ +  determine a type to safely put another type into a stream _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _c_h_a_r_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ +  Descriptor struct for _V_T_K fields. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +  │ │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ │ + enum   _D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e { _D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i , _D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 , │ │ │ │ │ + _D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w , _D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 } │ │ │ │ │ +  How the bulk data should be stored in the file. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + enum   _D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e { _D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g , _D_u_n_e_:_:_V_T_K_:_: │ │ │ │ │ + _n_o_n_c_o_n_f_o_r_m_i_n_g } │ │ │ │ │ +  Whether to produce conforming or non-conforming output. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + enum   _D_u_n_e_:_:_V_T_K_:_:_G_e_o_m_e_t_r_y_T_y_p_e { │ │ │ │ │ +   _D_u_n_e_:_:_V_T_K_:_:_v_e_r_t_e_x = 1 , _D_u_n_e_:_:_V_T_K_:_:_l_i_n_e = 3 , _D_u_n_e_:_:_V_T_K_:_: │ │ │ │ │ + _t_r_i_a_n_g_l_e = 5 , _D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_g_o_n = 7 , │ │ │ │ │ +   _D_u_n_e_:_:_V_T_K_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l = 9 , _D_u_n_e_:_:_V_T_K_:_:_t_e_t_r_a_h_e_d_r_o_n = 10 , │ │ │ │ │ + _D_u_n_e_:_:_V_T_K_:_:_h_e_x_a_h_e_d_r_o_n = 12 , _D_u_n_e_:_:_V_T_K_:_:_p_r_i_s_m = 13 , │ │ │ │ │ +   _D_u_n_e_:_:_V_T_K_:_:_p_y_r_a_m_i_d = 14 , _D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_h_e_d_r_o_n = 42 │ │ │ │ │ + } │ │ │ │ │ +  Type representing VTK's entity geometry types. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + enum   _D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e { _D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a , _D_u_n_e_:_:_V_T_K_:_: │ │ │ │ │ + _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d } │ │ │ │ │ +  which type of VTK file to write _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +enum class   _D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n { │ │ │ │ │ +   _D_u_n_e_:_:_V_T_K_:_:_i_n_t_3_2 , _D_u_n_e_:_:_V_T_K_:_:_u_i_n_t_8 , _D_u_n_e_:_:_V_T_K_:_:_u_i_n_t_3_2 , _D_u_n_e_:_: │ │ │ │ │ + _V_T_K_:_:_f_l_o_a_t_3_2 , │ │ │ │ │ +   _D_u_n_e_:_:_V_T_K_:_:_f_l_o_a_t_6_4 │ │ │ │ │ + } │ │ │ │ │ +  which precision to use when writing out data to vtk files _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +_G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e (const Dune::GeometryType &t) │ │ │ │ │ +  mapping from GeometryType to VTKGeometryType │ │ │ │ │ +  │ │ │ │ │ + int  _D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r (const Dune::GeometryType &t, int i) │ │ │ │ │ +  renumber _V_T_K <-> _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + int  _D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r (const T &t, int i) │ │ │ │ │ +  renumber _V_T_K <-> _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ + std::string  _D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g () │ │ │ │ │ +  determine endianness of this C++ implementation │ │ │ │ │ +  │ │ │ │ │ + std::string  _D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g (_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ +  map precision to _V_T_K type name │ │ │ │ │ +  │ │ │ │ │ + std::size_t  _D_u_n_e_:_:_V_T_K_:_:_t_y_p_e_S_i_z_e (_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ +  map precision to byte size │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ + Author │ │ │ │ │ + Peter Bastian, Christian Engwer │ │ │ │ │ +This file contains common stuff for all instances of VTKWriter. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridparameter.cc File Reference │ │ │ │ +dune-grid: basicwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
gridparameter.cc File Reference
│ │ │ │ +
basicwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
│ │ │ │ -
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <iterator>
│ │ │ │ +#include <list>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <sstream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <dune/common/parallel/mpiguard.hh>
│ │ │ │ +#include <dune/common/path.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ +#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::VTK::BasicWriter< IteratorFactory >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,21 +2,36 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -gridparameter.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h> │ │ │ │ │ + * _v_t_k │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +basicwriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_<_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_ _> │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cube.hh File Reference │ │ │ │ +dune-grid: dgfidentitygrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cube.hh File Reference
│ │ │ │ +
dgfidentitygrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/identitygrid.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfparser.hh>
│ │ │ │ +#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::CubeBlock
struct  Dune::DGFGridFactory< IdentityGrid< HostGrid > >
 
struct  Dune::DGFGridInfo< IdentityGrid< HostGrid > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,26 +3,25 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +dgfidentitygrid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cube.hh Source File │ │ │ │ +dune-grid: dgfidentitygrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,96 +70,179 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cube.hh
│ │ │ │ +
dgfidentitygrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_CUBEBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_CUBEBLOCK_HH
│ │ │ │ +
5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │ +
6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
13
│ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
18 namespace dgf
│ │ │ │ -
19 {
│ │ │ │ -
20
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 // DGFGridFactory for IdentityGrid
│ │ │ │ +
18 // -------------------------------
│ │ │ │ +
19
│ │ │ │ +
20 template< class HostGrid >
│ │ │ │
│ │ │ │ - │ │ │ │ -
22 : public BasicBlock
│ │ │ │ -
23 {
│ │ │ │ -
24 unsigned int nofvtx;
│ │ │ │ -
25 int dimgrid;
│ │ │ │ -
26 bool goodline; // active line describes a vertex
│ │ │ │ -
27 std :: vector< unsigned int > map; // active vertex
│ │ │ │ -
28 int nofparams;
│ │ │ │ -
29 int vtxoffset;
│ │ │ │ -
30
│ │ │ │ -
31 public:
│ │ │ │ -
32 CubeBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
│ │ │ │ -
33
│ │ │ │ -
34 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
│ │ │ │ -
35 std :: vector< std :: vector< double > > &params,
│ │ │ │ -
36 int &nofp );
│ │ │ │ -
37
│ │ │ │ -
38 // some information
│ │ │ │ -
│ │ │ │ -
39 bool ok ()
│ │ │ │ -
40 {
│ │ │ │ -
41 return goodline;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 {
│ │ │ │ -
46 return noflines();
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49 private:
│ │ │ │ -
50 // get the dimension of the grid
│ │ │ │ -
51 int getDimGrid ();
│ │ │ │ -
52 // get next simplex
│ │ │ │ -
53 bool next ( std :: vector< unsigned int > &simplex,
│ │ │ │ -
54 std :: vector< double > &param );
│ │ │ │ -
55 };
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 } // end namespace dgf
│ │ │ │ -
58
│ │ │ │ -
59} // end namespace Dune
│ │ │ │ -
60
│ │ │ │ -
61#endif
│ │ │ │ - │ │ │ │ +
21 struct DGFGridFactory< IdentityGrid< HostGrid > >
│ │ │ │ +
22 {
│ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
25 const static int dimension = Grid::dimension;
│ │ │ │ +
26 typedef MPIHelper::MPICommunicator MPICommunicator;
│ │ │ │ +
27 typedef typename Grid::template Codim<0>::Entity Element;
│ │ │ │ +
28 typedef typename Grid::template Codim<dimension>::Entity Vertex;
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
30 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
31 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ +
32 : dgfHostFactory_( input, comm ),
│ │ │ │ +
33 grid_( 0 )
│ │ │ │ +
34 {
│ │ │ │ +
35 HostGrid *hostGrid = dgfHostFactory_.grid();
│ │ │ │ +
36 assert( hostGrid != 0 );
│ │ │ │ +
37 grid_ = new Grid( *hostGrid );
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
40 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
41 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ +
42 : dgfHostFactory_( filename, comm ),
│ │ │ │ +
43 grid_( 0 )
│ │ │ │ +
44 {
│ │ │ │ +
45 HostGrid *hostGrid = dgfHostFactory_.grid();
│ │ │ │ +
46 assert( hostGrid != 0 );
│ │ │ │ +
47 std::ifstream input( filename.c_str() );
│ │ │ │ +
48 grid_ = new Grid( *hostGrid );
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 Grid *grid () const
│ │ │ │ +
52 {
│ │ │ │ +
53 return grid_;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
56 template< class Intersection >
│ │ │ │ +
│ │ │ │ +
57 bool wasInserted ( const Intersection &intersection ) const
│ │ │ │ +
58 {
│ │ │ │ +
59 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
62 template< class Intersection >
│ │ │ │ +
│ │ │ │ +
63 int boundaryId ( const Intersection &intersection ) const
│ │ │ │ +
64 {
│ │ │ │ +
65 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
68 template< int codim >
│ │ │ │ +
│ │ │ │ +
69 int numParameters () const
│ │ │ │ +
70 {
│ │ │ │ +
71 return dgfHostFactory_.template numParameters< codim >();
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
74 template< class Entity >
│ │ │ │ +
│ │ │ │ +
75 std::vector< double > &parameter ( const Entity &entity )
│ │ │ │ +
76 {
│ │ │ │ +
77 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
80 private:
│ │ │ │ +
81 DGFGridFactory< HostGrid > dgfHostFactory_;
│ │ │ │ +
82 Grid *grid_;
│ │ │ │ +
83 };
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
85
│ │ │ │ +
86
│ │ │ │ +
87 // DGFGridInfo for IdGrid
│ │ │ │ +
88 // ----------------------
│ │ │ │ +
89
│ │ │ │ +
90 template< class HostGrid >
│ │ │ │ +
│ │ │ │ +
91 struct DGFGridInfo< IdentityGrid< HostGrid > >
│ │ │ │ +
92 {
│ │ │ │ +
│ │ │ │ +
93 static int refineStepsForHalf ()
│ │ │ │ +
94 {
│ │ │ │ + │ │ │ │ +
96 }
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
│ │ │ │ +
98 static double refineWeight ()
│ │ │ │ +
99 {
│ │ │ │ + │ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
102 };
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
104}
│ │ │ │ +
105
│ │ │ │ +
106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │ +
The IdentityGrid class.
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
int & noflines()
Definition basic.hh:87
│ │ │ │ -
Definition cube.hh:23
│ │ │ │ -
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition cube.cc:103
│ │ │ │ -
int nofsimplex()
Definition cube.hh:44
│ │ │ │ -
bool ok()
Definition cube.hh:39
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
Provides a meta grid that is identical to its host.
Definition identitygrid.hh:88
│ │ │ │ +
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ +
Grid::template Codim< dimension >::Entity Vertex
Definition dgfidentitygrid.hh:28
│ │ │ │ +
IdentityGrid< HostGrid > Grid
Definition dgfidentitygrid.hh:23
│ │ │ │ +
std::vector< double > & parameter(const Entity &entity)
Definition dgfidentitygrid.hh:75
│ │ │ │ +
int numParameters() const
Definition dgfidentitygrid.hh:69
│ │ │ │ +
Grid * grid() const
Definition dgfidentitygrid.hh:51
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfidentitygrid.hh:40
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfidentitygrid.hh:30
│ │ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfidentitygrid.hh:63
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicator
Definition dgfidentitygrid.hh:26
│ │ │ │ +
Grid::template Codim< 0 >::Entity Element
Definition dgfidentitygrid.hh:27
│ │ │ │ +
bool wasInserted(const Intersection &intersection) const
Definition dgfidentitygrid.hh:57
│ │ │ │ +
static int refineStepsForHalf()
Definition dgfidentitygrid.hh:93
│ │ │ │ +
static double refineWeight()
Definition dgfidentitygrid.hh:98
│ │ │ │ +
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ +
static double refineWeight()
│ │ │ │ +
static int refineStepsForHalf()
number of globalRefine steps needed to refuce h by 0.5
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,96 +3,208 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -cube.hh │ │ │ │ │ +dgfidentitygrid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_CUBEBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_CUBEBLOCK_HH │ │ │ │ │ +5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ │ +6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ 13 │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -18 namespace dgf │ │ │ │ │ -19 { │ │ │ │ │ -20 │ │ │ │ │ -_2_1 class _C_u_b_e_B_l_o_c_k │ │ │ │ │ -22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -23 { │ │ │ │ │ -24 unsigned int nofvtx; │ │ │ │ │ -25 int dimgrid; │ │ │ │ │ -26 bool goodline; // active line describes a vertex │ │ │ │ │ -27 std :: vector< unsigned int > map; // active vertex │ │ │ │ │ -28 int nofparams; │ │ │ │ │ -29 int vtxoffset; │ │ │ │ │ -30 │ │ │ │ │ -31 public: │ │ │ │ │ -32 _C_u_b_e_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid │ │ │ │ │ -); │ │ │ │ │ -33 │ │ │ │ │ -34 int _g_e_t ( std :: vector< std :: vector< unsigned int> > &simplex, │ │ │ │ │ -35 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ │ -36 int &nofp ); │ │ │ │ │ -37 │ │ │ │ │ -38 // some information │ │ │ │ │ -_3_9 bool _o_k () │ │ │ │ │ -40 { │ │ │ │ │ -41 return goodline; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_4 int _n_o_f_s_i_m_p_l_e_x () │ │ │ │ │ -45 { │ │ │ │ │ -46 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -49 private: │ │ │ │ │ -50 // get the dimension of the grid │ │ │ │ │ -51 int getDimGrid (); │ │ │ │ │ -52 // get next simplex │ │ │ │ │ -53 bool next ( std :: vector< unsigned int > &simplex, │ │ │ │ │ -54 std :: vector< double > ¶m ); │ │ │ │ │ -55 }; │ │ │ │ │ -56 │ │ │ │ │ -57 } // end namespace dgf │ │ │ │ │ -58 │ │ │ │ │ -59} // end namespace Dune │ │ │ │ │ -60 │ │ │ │ │ -61#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 // DGFGridFactory for IdentityGrid │ │ │ │ │ +18 // ------------------------------- │ │ │ │ │ +19 │ │ │ │ │ +20 template< class HostGrid > │ │ │ │ │ +_2_1 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _I_d_e_n_t_i_t_y_G_r_i_d< HostGrid > > │ │ │ │ │ +22 { │ │ │ │ │ +_2_3 typedef _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _> _G_r_i_d; │ │ │ │ │ +24 │ │ │ │ │ +_2_5 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_2_6 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r; │ │ │ │ │ +_2_7 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_2_8 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim::Entity _V_e_r_t_e_x; │ │ │ │ │ +29 │ │ │ │ │ +_3_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +31 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +32 : dgfHostFactory_( input, comm ), │ │ │ │ │ +33 grid_( 0 ) │ │ │ │ │ +34 { │ │ │ │ │ +35 HostGrid *hostGrid = dgfHostFactory_.grid(); │ │ │ │ │ +36 assert( hostGrid != 0 ); │ │ │ │ │ +37 grid_ = new _G_r_i_d( *hostGrid ); │ │ │ │ │ +38 } │ │ │ │ │ +39 │ │ │ │ │ +_4_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +41 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +42 : dgfHostFactory_( filename, comm ), │ │ │ │ │ +43 grid_( 0 ) │ │ │ │ │ +44 { │ │ │ │ │ +45 HostGrid *hostGrid = dgfHostFactory_.grid(); │ │ │ │ │ +46 assert( hostGrid != 0 ); │ │ │ │ │ +47 std::ifstream input( filename.c_str() ); │ │ │ │ │ +48 grid_ = new _G_r_i_d( *hostGrid ); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_1 _G_r_i_d *_g_r_i_d () const │ │ │ │ │ +52 { │ │ │ │ │ +53 return grid_; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +56 template< class Intersection > │ │ │ │ │ +_5_7 bool _w_a_s_I_n_s_e_r_t_e_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ +58 { │ │ │ │ │ +59 return dgfHostFactory_.wasInserted( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +( intersection ) ); │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +62 template< class Intersection > │ │ │ │ │ +_6_3 int _b_o_u_n_d_a_r_y_I_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ +64 { │ │ │ │ │ +65 return dgfHostFactory_.boundaryId( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +( intersection ) ); │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +68 template< int codim > │ │ │ │ │ +_6_9 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +70 { │ │ │ │ │ +71 return dgfHostFactory_.template numParameters< codim >(); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +74 template< class Entity > │ │ │ │ │ +_7_5 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +76 { │ │ │ │ │ +77 return dgfHostFactory_.parameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_E_n_t_i_t_y( entity │ │ │ │ │ +) ); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +80 private: │ │ │ │ │ +81 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_ _> dgfHostFactory_; │ │ │ │ │ +82 _G_r_i_d *grid_; │ │ │ │ │ +83 }; │ │ │ │ │ +84 │ │ │ │ │ +85 │ │ │ │ │ +86 │ │ │ │ │ +87 // DGFGridInfo for IdGrid │ │ │ │ │ +88 // ---------------------- │ │ │ │ │ +89 │ │ │ │ │ +90 template< class HostGrid > │ │ │ │ │ +_9_1 struct _D_G_F_G_r_i_d_I_n_f_o< _I_d_e_n_t_i_t_y_G_r_i_d< HostGrid > > │ │ │ │ │ +92 { │ │ │ │ │ +_9_3 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ +94 { │ │ │ │ │ +95 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f(); │ │ │ │ │ +96 } │ │ │ │ │ +97 │ │ │ │ │ +_9_8 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ +99 { │ │ │ │ │ +100 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t(); │ │ │ │ │ +101 } │ │ │ │ │ +102 }; │ │ │ │ │ +103 │ │ │ │ │ +104} │ │ │ │ │ +105 │ │ │ │ │ +106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_._h_h │ │ │ │ │ +The IdentityGrid class. │ │ │ │ │ +_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ -int & noflines() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn cube.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< │ │ │ │ │ -std ::vector< double > > ¶ms, int &nofp) │ │ │ │ │ -DDeeffiinniittiioonn cube.cc:103 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k_:_:_n_o_f_s_i_m_p_l_e_x │ │ │ │ │ -int nofsimplex() │ │ │ │ │ -DDeeffiinniittiioonn cube.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn cube.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d │ │ │ │ │ +Provides a meta grid that is identical to its host. │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ +provides access to host grid objects from GeometryGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_V_e_r_t_e_x │ │ │ │ │ +Grid::template Codim< dimension >::Entity Vertex │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ +IdentityGrid< HostGrid > Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() const │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicator │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_E_l_e_m_e_n_t │ │ │ │ │ +Grid::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ +static double refineWeight() │ │ │ │ │ +DDeeffiinniittiioonn dgfidentitygrid.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ +Some simple static information for a given GridType. │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ +static double refineWeight() │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +number of globalRefine steps needed to refuce h by 0.5 │ │ │ │ │ +_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplex.cc File Reference │ │ │ │ +dune-grid: macrogrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplex.cc File Reference
│ │ │ │ +
macrogrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
│ │ │ │ -
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::MacroGrid
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,20 +3,22 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -simplex.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +macrogrid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basic.hh File Reference │ │ │ │ +dune-grid: gridptr.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,62 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
basic.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
gridptr.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <cassert>
│ │ │ │ #include <cctype>
│ │ │ │ +#include <array>
│ │ │ │ #include <iostream>
│ │ │ │ +#include <map>
│ │ │ │ +#include <memory>
│ │ │ │ #include <string>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <dune/common/stdstreams.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/common/shared_ptr.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ │ +#include <dune/grid/common/partitionset.hh>
│ │ │ │ +#include <dune/grid/common/rangegenerators.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::BasicBlock
struct  Dune::GridPtr< GridType >
 Class for constructing grids from DGF files. More...
 
class  Dune::GridPtr< GridType >::mygrid_ptr
 
struct  Dune::GridPtr< GridType >::DataHandle
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

void Dune::dgf::makeupcase (std ::string &s)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,33 +3,44 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_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 │ │ │ │ │ -basic.hh File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +gridptr.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_d_a_t_a_h_a_n_d_l_e_i_f_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_p_a_r_t_i_t_i_o_n_s_e_t_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ #include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +struct   _D_u_n_e_:_:_G_r_i_d_P_t_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ +  Class for constructing grids from DGF files. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_G_r_i_d_P_t_r_<_ _G_r_i_d_T_y_p_e_ _>_:_:_m_y_g_r_i_d___p_t_r │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_G_r_i_d_P_t_r_<_ _G_r_i_d_T_y_p_e_ _>_:_:_D_a_t_a_H_a_n_d_l_e │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -void  _D_u_n_e_:_:_d_g_f_:_:_m_a_k_e_u_p_c_a_s_e (std ::string &s) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basic.hh Source File │ │ │ │ +dune-grid: gridptr.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,172 +70,964 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basic.hh
│ │ │ │ +
gridptr.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_BASICBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_BASICBLOCK_HH
│ │ │ │ +
5#ifndef DUNE_DGF_GRIDPTR_HH
│ │ │ │ +
6#define DUNE_DGF_GRIDPTR_HH
│ │ │ │
7
│ │ │ │
8#include <cassert>
│ │ │ │
9#include <cctype>
│ │ │ │ -
10#include <iostream>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <sstream>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/stdstreams.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
20
│ │ │ │ -
21 namespace dgf
│ │ │ │ -
22 {
│ │ │ │ -
23
│ │ │ │ -
│ │ │ │ -
24 inline void makeupcase( std :: string &s )
│ │ │ │ -
25 {
│ │ │ │ -
26 for (size_t i=0; i<s.size(); i++)
│ │ │ │ -
27 s[i]=std::toupper(s[i]);
│ │ │ │ -
28 }
│ │ │ │ -
│ │ │ │ -
29
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 int pos; // line number
│ │ │ │ -
33 bool active; // block was found
│ │ │ │ -
34 bool empty; // block was found but was empty
│ │ │ │ -
35 std::string identifier; // identifier of this block
│ │ │ │ -
36 int linecount; // total number of lines in the block
│ │ │ │ -
37 std::stringstream block_; // the block itself
│ │ │ │ -
38 std::string oneline; // the active line in the block
│ │ │ │ -
39
│ │ │ │ -
40 // get the block (if it exists)
│ │ │ │ -
41 void getblock ( std::istream &in );
│ │ │ │ -
42
│ │ │ │ -
43 // count the number of lines in the block
│ │ │ │ -
44 // int countlines ();
│ │ │ │ -
45
│ │ │ │ -
46 protected:
│ │ │ │ -
47 std::stringstream line; // the active line as string buffer
│ │ │ │ -
48 // for use in the derived classes
│ │ │ │ -
49
│ │ │ │ -
50 // go back to beginning of block
│ │ │ │ -
│ │ │ │ -
51 void reset ()
│ │ │ │ -
52 {
│ │ │ │ -
53 pos = -1;
│ │ │ │ -
54 block_.clear();
│ │ │ │ -
55 block_.seekg( 0 );
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
58 // get next line and store in string stream
│ │ │ │ -
59 bool getnextline ();
│ │ │ │ -
60
│ │ │ │ -
61 // get next entry in line
│ │ │ │ -
62 template< class ENTRY >
│ │ │ │ -
│ │ │ │ -
63 bool getnextentry( ENTRY &entry )
│ │ │ │ -
64 {
│ │ │ │ -
65 line >> entry;
│ │ │ │ -
66 return static_cast< bool >( line );
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69 bool gettokenparam ( std :: string token, std :: string &entry );
│ │ │ │ -
70 bool findtoken( std :: string token );
│ │ │ │ -
71
│ │ │ │ -
72 public:
│ │ │ │ -
73 // search for block in file and store in buffer
│ │ │ │ -
74 BasicBlock ( std::istream &in, const char* id );
│ │ │ │ -
75
│ │ │ │ -
76 // some information on this block
│ │ │ │ -
│ │ │ │ -
77 bool isactive ()
│ │ │ │ -
78 {
│ │ │ │ -
79 return active;
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
82 bool isempty ()
│ │ │ │ -
83 {
│ │ │ │ -
84 return empty;
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
│ │ │ │ -
87 int &noflines ()
│ │ │ │ -
88 {
│ │ │ │ -
89 return linecount;
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
93 {
│ │ │ │ -
94 return pos;
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
│ │ │ │ -
97 const std::string & id () const
│ │ │ │ -
98 {
│ │ │ │ -
99 return identifier;
│ │ │ │ -
100 }
│ │ │ │ -
│ │ │ │ -
101
│ │ │ │ -
102 // for error messages
│ │ │ │ -
│ │ │ │ -
103 friend std :: ostream &operator<< ( std :: ostream &os, const BasicBlock &b )
│ │ │ │ -
104 {
│ │ │ │ -
105 return os << "block " << b.identifier << " (line " << b.pos << ")";
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
108 };
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
110 } // end namespace dgf
│ │ │ │ -
111
│ │ │ │ -
112} // end namespace Dune
│ │ │ │ -
113
│ │ │ │ -
114#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
10
│ │ │ │ +
11#include <array>
│ │ │ │ +
12#include <iostream>
│ │ │ │ +
13#include <map>
│ │ │ │ +
14#include <memory>
│ │ │ │ +
15#include <string>
│ │ │ │ +
16#include <type_traits>
│ │ │ │ +
17#include <vector>
│ │ │ │ +
18
│ │ │ │ +
19//- Dune includes
│ │ │ │ +
20#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +
21#include <dune/common/shared_ptr.hh>
│ │ │ │ +
22
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
28
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
32
│ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
35namespace Dune
│ │ │ │ +
36{
│ │ │ │ +
37
│ │ │ │ +
38 // External Forward Declarations
│ │ │ │ +
39 // -----------------------------
│ │ │ │ +
40
│ │ │ │ +
41 template < class G >
│ │ │ │ +
42 struct DGFGridFactory;
│ │ │ │ +
43
│ │ │ │ +
44 template< class GridImp, class IntersectionImp >
│ │ │ │ +
45 class Intersection;
│ │ │ │ +
46
│ │ │ │ +
47
│ │ │ │ +
48
│ │ │ │ +
49 // GridPtr
│ │ │ │ +
50 // -------
│ │ │ │ +
51
│ │ │ │ +
64 template< class GridType >
│ │ │ │ +
│ │ │ │ +
65 struct GridPtr
│ │ │ │ +
66 {
│ │ │ │ +
│ │ │ │ +
67 class mygrid_ptr : public std::shared_ptr< GridType >
│ │ │ │ +
68 {
│ │ │ │ +
69 typedef std::shared_ptr< GridType > base_t ;
│ │ │ │ +
70 // empty deleter to avoid deletion on release
│ │ │ │ +
71 typedef null_deleter< GridType > emptydeleter_t ;
│ │ │ │ +
72
│ │ │ │ +
73 void removeObj()
│ │ │ │ +
74 {
│ │ │ │ +
75 // if use count is only 1 delete object
│ │ │ │ +
76 if( use_count() == 1 )
│ │ │ │ +
77 {
│ │ │ │ +
78 // delete point here, since we use the empty deleter
│ │ │ │ +
79 GridType* grd = release();
│ │ │ │ +
80 if( grd ) delete grd ;
│ │ │ │ +
81 }
│ │ │ │ +
82 }
│ │ │ │ +
83
│ │ │ │ +
84 void assignObj( const mygrid_ptr& other )
│ │ │ │ +
85 {
│ │ │ │ +
86 removeObj();
│ │ │ │ +
87 base_t :: operator = ( other );
│ │ │ │ +
88 }
│ │ │ │ +
89 public:
│ │ │ │ +
90 using base_t :: get ;
│ │ │ │ +
91 using base_t :: swap ;
│ │ │ │ +
92 using base_t :: use_count ;
│ │ │ │ +
93
│ │ │ │ +
94 // default constructor
│ │ │ │ +
95 mygrid_ptr() : base_t( ( GridType * ) 0, emptydeleter_t() ) {}
│ │ │ │ +
96 // copy constructor
│ │ │ │ +
97 mygrid_ptr( const mygrid_ptr& other ) : base_t(nullptr) { assignObj( other ); }
│ │ │ │ +
98 // constructor taking pointer
│ │ │ │ +
99 explicit mygrid_ptr( GridType* grd ) : base_t( grd, emptydeleter_t() ) {}
│ │ │ │ +
100
│ │ │ │ +
101 // destructor
│ │ │ │ +
102 ~mygrid_ptr() { removeObj(); }
│ │ │ │ +
103
│ │ │ │ +
104 // assigment operator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
106 {
│ │ │ │ +
107 assignObj( other );
│ │ │ │ +
108 return *this;
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
111 // release pointer
│ │ │ │ +
│ │ │ │ +
112 GridType* release()
│ │ │ │ +
113 {
│ │ │ │ +
114 GridType* grd = this->get();
│ │ │ │ +
115 base_t ptr(( GridType * ) 0, emptydeleter_t() );
│ │ │ │ +
116 this->swap( ptr );
│ │ │ │ +
117 return grd ;
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119 };
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
121 protected:
│ │ │ │ +
│ │ │ │ +
122 std::string getFileExtension( const std::string& filename ) const
│ │ │ │ +
123 {
│ │ │ │ +
124 // extract file extension
│ │ │ │ +
125 auto extpos = filename.find_last_of(".");
│ │ │ │ +
126 std::string ext;
│ │ │ │ +
127 if( extpos != std::string::npos)
│ │ │ │ +
128 ext = filename.substr( extpos + 1 );
│ │ │ │ +
129
│ │ │ │ +
130 // convert all letters to lower case
│ │ │ │ +
131 for( auto& item : ext )
│ │ │ │ +
132 item = std::tolower( item );
│ │ │ │ +
133 return ext;
│ │ │ │ +
134 }
│ │ │ │ +
│ │ │ │ +
135
│ │ │ │ +
136 // read gmsh file if dimension world <= 3
│ │ │ │ +
│ │ │ │ +
137 void readGmsh( const std::string& filename, std::integral_constant< bool, true > )
│ │ │ │ +
138 {
│ │ │ │ +
139 GridFactory<GridType> gridFactory;
│ │ │ │ +
140 std::vector<int> boundaryIDs;
│ │ │ │ +
141 std::vector<int> elementsIDs;
│ │ │ │ +
142 GmshReader<GridType>::read(gridFactory,filename,boundaryIDs,elementsIDs);
│ │ │ │ +
143 initialize( gridFactory, boundaryIDs,elementsIDs);
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │ +
145
│ │ │ │ +
146 // if dimension world > 3 throw GridError
│ │ │ │ +
│ │ │ │ +
147 void readGmsh( const std::string& filename, std::integral_constant< bool, false > )
│ │ │ │ +
148 {
│ │ │ │ +
149 DUNE_THROW(GridError, "GmshReader requires dimWorld <= 3." );
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
152 public:
│ │ │ │ +
153
│ │ │ │ +
154 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
155 static const int dimension = GridType::dimension;
│ │ │ │ +
156
│ │ │ │ +
│ │ │ │ +
158 explicit GridPtr ( const std::string &filename,
│ │ │ │ +
159 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
160 : gridPtr_(),
│ │ │ │ +
161 elParam_(),
│ │ │ │ +
162 vtxParam_(),
│ │ │ │ +
163 bndParam_(),
│ │ │ │ +
164 bndId_(),
│ │ │ │ +
165 emptyParam_(),
│ │ │ │ +
166 nofElParam_( 0 ),
│ │ │ │ +
167 nofVtxParam_( 0 ),
│ │ │ │ +
168 haveBndParam_( false )
│ │ │ │ +
169 {
│ │ │ │ +
170 std::string fileExt = getFileExtension( filename );
│ │ │ │ +
171
│ │ │ │ +
172 if( fileExt == "dgf" )
│ │ │ │ +
173 {
│ │ │ │ +
174 DGFGridFactory< GridType > dgfFactory( filename, comm );
│ │ │ │ +
175 initialize( dgfFactory );
│ │ │ │ +
176 }
│ │ │ │ +
177 else if( fileExt == "msh" )
│ │ │ │ +
178 {
│ │ │ │ +
179 // Gmsh reader only compiles for dimworld <= 3
│ │ │ │ +
180 readGmsh( filename, std::integral_constant< bool, GridType::dimensionworld <= 3 > () );
│ │ │ │ +
181 }
│ │ │ │ +
182 else if( fileExt == "amc" || fileExt == "2d" || fileExt == "3d" )
│ │ │ │ +
183 {
│ │ │ │ +
184 // TODO: AlbertaReader
│ │ │ │ +
185 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not supported yet!" );
│ │ │ │ +
186 }
│ │ │ │ +
187 else if( fileExt == "vtu" )
│ │ │ │ +
188 {
│ │ │ │ +
189 // TODO: vtu/vtk reader
│ │ │ │ +
190 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not supported yet!" );
│ │ │ │ +
191 }
│ │ │ │ +
192 else
│ │ │ │ +
193 {
│ │ │ │ +
194 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not supported yet!" );
│ │ │ │ +
195 }
│ │ │ │ +
196 }
│ │ │ │ +
│ │ │ │ +
197
│ │ │ │ +
│ │ │ │ +
199 explicit GridPtr ( std::istream &input,
│ │ │ │ +
200 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
201 : gridPtr_(),
│ │ │ │ +
202 elParam_(),
│ │ │ │ +
203 vtxParam_(),
│ │ │ │ +
204 bndParam_(),
│ │ │ │ +
205 bndId_(),
│ │ │ │ +
206 emptyParam_(),
│ │ │ │ +
207 nofElParam_( 0 ),
│ │ │ │ +
208 nofVtxParam_( 0 ),
│ │ │ │ +
209 haveBndParam_( false )
│ │ │ │ +
210 {
│ │ │ │ +
211 // input stream only works for DGF format right now
│ │ │ │ +
212 DGFGridFactory< GridType > dgfFactory( input, comm );
│ │ │ │ +
213 initialize( dgfFactory );
│ │ │ │ +
214 }
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
218 : gridPtr_(),
│ │ │ │ +
219 elParam_(),
│ │ │ │ +
220 vtxParam_(),
│ │ │ │ +
221 bndParam_(),
│ │ │ │ +
222 bndId_(),
│ │ │ │ +
223 emptyParam_(),
│ │ │ │ +
224 nofElParam_(0),
│ │ │ │ +
225 nofVtxParam_(0),
│ │ │ │ +
226 haveBndParam_( false )
│ │ │ │ +
227 {}
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
│ │ │ │ +
230 explicit GridPtr( GridType *grd )
│ │ │ │ +
231 : gridPtr_(grd),
│ │ │ │ +
232 elParam_(),
│ │ │ │ +
233 vtxParam_(),
│ │ │ │ +
234 bndParam_(),
│ │ │ │ +
235 bndId_(),
│ │ │ │ +
236 emptyParam_(),
│ │ │ │ +
237 nofElParam_(0),
│ │ │ │ +
238 nofVtxParam_(0),
│ │ │ │ +
239 haveBndParam_( false )
│ │ │ │ +
240 {}
│ │ │ │ +
│ │ │ │ +
241
│ │ │ │ +
243 GridPtr( const GridPtr &org ) = default;
│ │ │ │ +
244
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
247 {
│ │ │ │ +
248 gridPtr_ = org.gridPtr_;
│ │ │ │ +
249 elParam_ = org.elParam_;
│ │ │ │ +
250 vtxParam_ = org.vtxParam_;
│ │ │ │ +
251 bndParam_ = org.bndParam_;
│ │ │ │ +
252 bndId_ = org.bndId_;
│ │ │ │ + │ │ │ │ +
254
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
258 return *this;
│ │ │ │ +
259 }
│ │ │ │ +
│ │ │ │ +
260
│ │ │ │ +
│ │ │ │ +
262 GridPtr& operator = (GridType * grd)
│ │ │ │ +
263 {
│ │ │ │ +
264 gridPtr_ = mygrid_ptr( grd );
│ │ │ │ +
265 elParam_.resize(0);
│ │ │ │ +
266 vtxParam_.resize(0);
│ │ │ │ +
267 bndParam_.resize(0);
│ │ │ │ +
268 bndId_.resize(0);
│ │ │ │ +
269 emptyParam_.resize(0);
│ │ │ │ +
270
│ │ │ │ +
271 nofVtxParam_ = 0;
│ │ │ │ +
272 nofElParam_ = 0;
│ │ │ │ +
273 haveBndParam_ = false;
│ │ │ │ +
274 return *this;
│ │ │ │ +
275 }
│ │ │ │ +
│ │ │ │ +
276
│ │ │ │ +
│ │ │ │ +
278 GridType& operator*() {
│ │ │ │ +
279 return *gridPtr_;
│ │ │ │ +
280 }
│ │ │ │ +
│ │ │ │ +
281
│ │ │ │ +
│ │ │ │ +
283 GridType* operator->() {
│ │ │ │ +
284 return gridPtr_.operator -> ();
│ │ │ │ +
285 }
│ │ │ │ +
│ │ │ │ +
286
│ │ │ │ +
│ │ │ │ +
288 const GridType& operator*() const {
│ │ │ │ +
289 return *gridPtr_;
│ │ │ │ +
290 }
│ │ │ │ +
│ │ │ │ +
291
│ │ │ │ +
│ │ │ │ +
293 const GridType* operator->() const {
│ │ │ │ +
294 return gridPtr_.operator -> ();
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
296
│ │ │ │ +
298 GridType* release () { return gridPtr_.release(); }
│ │ │ │ +
299
│ │ │ │ +
│ │ │ │ +
301 int nofParameters(int cdim) const {
│ │ │ │ +
302 switch (cdim) {
│ │ │ │ +
303 case 0 : return nofElParam_; break;
│ │ │ │ +
304 case GridType::dimension : return nofVtxParam_; break;
│ │ │ │ +
305 }
│ │ │ │ +
306 return 0;
│ │ │ │ +
307 }
│ │ │ │ +
│ │ │ │ +
308
│ │ │ │ +
310 template <class Entity>
│ │ │ │ +
│ │ │ │ +
311 int nofParameters ( const Entity & ) const
│ │ │ │ +
312 {
│ │ │ │ +
313 return nofParameters( (int) Entity::codimension );
│ │ │ │ +
314 }
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
317 template< class GridImp, class IntersectionImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
319 {
│ │ │ │ +
320 return parameters( intersection ).size();
│ │ │ │ +
321 }
│ │ │ │ +
│ │ │ │ +
322
│ │ │ │ +
324 template <class Entity>
│ │ │ │ +
│ │ │ │ +
325 const std::vector< double > &parameters ( const Entity &entity ) const
│ │ │ │ +
326 {
│ │ │ │ +
327 typedef typename GridType::LevelGridView GridView;
│ │ │ │ +
328 GridView gridView = gridPtr_->levelGridView( 0 );
│ │ │ │ +
329 switch( (int)Entity::codimension )
│ │ │ │ +
330 {
│ │ │ │ +
331 case 0 :
│ │ │ │ +
332 if( nofElParam_ > 0 )
│ │ │ │ +
333 {
│ │ │ │ +
334 assert( (unsigned int)gridView.indexSet().index( entity ) < elParam_.size() );
│ │ │ │ +
335 return elParam_[ gridView.indexSet().index( entity ) ];
│ │ │ │ +
336 }
│ │ │ │ +
337 break;
│ │ │ │ +
338 case GridType::dimension :
│ │ │ │ +
339 if( nofVtxParam_ > 0 )
│ │ │ │ +
340 {
│ │ │ │ +
341 assert( (unsigned int)gridView.indexSet().index( entity ) < vtxParam_.size() );
│ │ │ │ +
342 return vtxParam_[ gridView.indexSet().index( entity ) ];
│ │ │ │ +
343 }
│ │ │ │ +
344 break;
│ │ │ │ +
345 }
│ │ │ │ +
346 return emptyParam_;
│ │ │ │ +
347 }
│ │ │ │ +
│ │ │ │ +
348
│ │ │ │ +
350 template< class GridImp, class IntersectionImp >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
352 {
│ │ │ │ +
353 // if no parameters given return empty vector
│ │ │ │ +
354 if ( !haveBndParam_ )
│ │ │ │ + │ │ │ │ +
356
│ │ │ │ +
357 return bndParam_[ intersection.boundarySegmentIndex() ];
│ │ │ │ +
358 }
│ │ │ │ +
│ │ │ │ +
359
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
361 {
│ │ │ │ +
362 if( gridPtr_->comm().size() > 1 )
│ │ │ │ +
363 {
│ │ │ │ +
364 DataHandle dh(*this);
│ │ │ │ +
365 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
│ │ │ │ +
366 }
│ │ │ │ +
367 }
│ │ │ │ +
│ │ │ │ +
368
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
370 {
│ │ │ │ +
371 if( gridPtr_->comm().size() > 1 )
│ │ │ │ +
372 {
│ │ │ │ +
373 DataHandle dh(*this);
│ │ │ │ +
374 gridPtr_->loadBalance( dh.interface() );
│ │ │ │ +
375 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
│ │ │ │ +
376 }
│ │ │ │ +
377 }
│ │ │ │ +
│ │ │ │ +
378
│ │ │ │ +
379 protected:
│ │ │ │ +
380 template< class Range >
│ │ │ │ +
│ │ │ │ +
381 static bool isEmpty ( Range &&range )
│ │ │ │ +
382 {
│ │ │ │ +
383 return range.begin() == range.end();
│ │ │ │ +
384 }
│ │ │ │ +
│ │ │ │ +
385
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
387 {
│ │ │ │ +
388 gridPtr_ = mygrid_ptr( dgfFactory.grid() );
│ │ │ │ +
389
│ │ │ │ +
390 const auto gridView = gridPtr_->levelGridView( 0 );
│ │ │ │ +
391 const auto &indexSet = gridView.indexSet();
│ │ │ │ +
392
│ │ │ │ +
393 nofElParam_ = dgfFactory.template numParameters< 0 >();
│ │ │ │ +
394 nofVtxParam_ = dgfFactory.template numParameters< dimension >();
│ │ │ │ + │ │ │ │ +
396
│ │ │ │ +
397 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
│ │ │ │ +
398 gridView.comm().max( nofParams.data(), nofParams.size() );
│ │ │ │ +
399
│ │ │ │ +
400 // empty grids have no parameters associated
│ │ │ │ +
401 if( isEmpty( elements( gridView, Partitions::interiorBorder ) ) )
│ │ │ │ +
402 {
│ │ │ │ +
403 nofElParam_ = nofParams[ 0 ];
│ │ │ │ +
404 nofVtxParam_ = nofParams[ 1 ];
│ │ │ │ +
405 }
│ │ │ │ +
406
│ │ │ │ +
407 // boundary parameters may be empty
│ │ │ │ +
408 haveBndParam_ = static_cast< bool >( nofParams[ 2 ] );
│ │ │ │ +
409
│ │ │ │ +
410 if( (nofElParam_ != nofParams[ 0 ]) || (nofVtxParam_ != nofParams[ 1 ]) )
│ │ │ │ +
411 DUNE_THROW( DGFException, "Number of parameters differs between processes" );
│ │ │ │ +
412
│ │ │ │ +
413 elParam_.resize( nofElParam_ > 0 ? indexSet.size( 0 ) : 0 );
│ │ │ │ +
414 vtxParam_.resize( nofVtxParam_ > 0 ? indexSet.size( dimension ) : 0 );
│ │ │ │ +
415
│ │ │ │ +
416 bndId_.resize( indexSet.size( 1 ) );
│ │ │ │ +
417 if( haveBndParam_ )
│ │ │ │ +
418 bndParam_.resize( gridPtr_->numBoundarySegments() );
│ │ │ │ +
419
│ │ │ │ +
420 for( const auto &element : elements( gridView, Partitions::interiorBorder ) )
│ │ │ │ +
421 {
│ │ │ │ +
422 if( nofElParam_ > 0 )
│ │ │ │ +
423 {
│ │ │ │ +
424 std::swap( elParam_[ indexSet.index( element ) ], dgfFactory.parameter( element ) );
│ │ │ │ +
425 assert( elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( nofElParam_ ) );
│ │ │ │ +
426 }
│ │ │ │ +
427
│ │ │ │ +
428 if( nofVtxParam_ > 0 )
│ │ │ │ +
429 {
│ │ │ │ +
430 for( unsigned int v = 0, n = element.subEntities( dimension ); v < n; ++v )
│ │ │ │ +
431 {
│ │ │ │ +
432 const auto index = indexSet.subIndex( element, v, dimension );
│ │ │ │ +
433 if( vtxParam_[ index ].empty() )
│ │ │ │ +
434 std::swap( vtxParam_[ index ], dgfFactory.parameter( element.template subEntity< dimension >( v ) ) );
│ │ │ │ +
435 assert( vtxParam_[ index ].size() == static_cast< std::size_t >( nofVtxParam_ ) );
│ │ │ │ +
436 }
│ │ │ │ +
437 }
│ │ │ │ +
438
│ │ │ │ +
439 if( element.hasBoundaryIntersections() )
│ │ │ │ +
440 {
│ │ │ │ +
441 for( const auto &intersection : intersections( gridView, element ) )
│ │ │ │ +
442 {
│ │ │ │ +
443 // dirty hack: check for "none" to make corner point grid work
│ │ │ │ +
444 if( !intersection.boundary() || intersection.type().isNone() )
│ │ │ │ +
445 continue;
│ │ │ │ +
446
│ │ │ │ +
447 const auto k = indexSet.subIndex( element, intersection.indexInInside(), 1 );
│ │ │ │ +
448 bndId_[ k ] = dgfFactory.boundaryId( intersection );
│ │ │ │ +
449 if( haveBndParam_ )
│ │ │ │ +
450 bndParam_[ intersection.boundarySegmentIndex() ] = dgfFactory.boundaryParameter( intersection );
│ │ │ │ +
451 }
│ │ │ │ +
452 }
│ │ │ │ +
453 }
│ │ │ │ +
454 }
│ │ │ │ +
│ │ │ │ +
455
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
457 std::vector<int>& boundaryIds,
│ │ │ │ +
458 std::vector<int>& elementIds )
│ │ │ │ +
459 {
│ │ │ │ +
460 gridPtr_ = mygrid_ptr( factory.createGrid().release() );
│ │ │ │ +
461
│ │ │ │ +
462 const auto& gridView = gridPtr_->leafGridView();
│ │ │ │ +
463 const auto& indexSet = gridView.indexSet();
│ │ │ │ +
464
│ │ │ │ +
465 nofElParam_ = elementIds.empty() ? 0 : 1 ;
│ │ │ │ +
466 nofVtxParam_ = 0;
│ │ │ │ +
467 haveBndParam_ = boundaryIds.empty() ? 0 : 1 ;
│ │ │ │ +
468
│ │ │ │ +
469 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
│ │ │ │ +
470 gridView.comm().max( nofParams.data(), nofParams.size() );
│ │ │ │ +
471
│ │ │ │ +
472 // empty grids have no parameters associated
│ │ │ │ +
473 if( isEmpty( elements( gridView, Partitions::interiorBorder ) ) )
│ │ │ │ +
474 {
│ │ │ │ +
475 nofElParam_ = nofParams[ 0 ];
│ │ │ │ +
476 }
│ │ │ │ +
477
│ │ │ │ +
478 // boundary parameters may be empty
│ │ │ │ +
479 haveBndParam_ = static_cast< bool >( nofParams[ 2 ] );
│ │ │ │ +
480
│ │ │ │ +
481 // Reorder boundary IDs according to the insertion index
│ │ │ │ +
482 if(!boundaryIds.empty() || !elementIds.empty() )
│ │ │ │ +
483 {
│ │ │ │ +
484 bndParam_.resize( boundaryIds.size() );
│ │ │ │ +
485 elParam_.resize( elementIds.size(), std::vector<double>(1) );
│ │ │ │ +
486 for(const auto& entity : elements( gridView ))
│ │ │ │ +
487 {
│ │ │ │ +
488 elParam_[ indexSet.index( entity ) ][ 0 ] = elementIds[ factory.insertionIndex( entity ) ];
│ │ │ │ +
489 if( haveBndParam_ )
│ │ │ │ +
490 {
│ │ │ │ +
491 for(const auto& intersection : intersections( gridView,entity) )
│ │ │ │ +
492 {
│ │ │ │ +
493 if(intersection.boundary())
│ │ │ │ +
494 {
│ │ │ │ +
495 // DGFBoundaryParameter::type is of type string.
│ │ │ │ +
496 bndParam_[intersection.boundarySegmentIndex()] = std::to_string(boundaryIds[factory.insertionIndex(intersection)]);
│ │ │ │ +
497 }
│ │ │ │ +
498 }
│ │ │ │ +
499 }
│ │ │ │ +
500 }
│ │ │ │ +
501 }
│ │ │ │ +
502 }
│ │ │ │ +
│ │ │ │ +
503
│ │ │ │ +
504 template <class Entity>
│ │ │ │ +
│ │ │ │ +
505 std::vector< double > &params ( const Entity &entity )
│ │ │ │ +
506 {
│ │ │ │ +
507 const auto gridView = gridPtr_->levelGridView( 0 );
│ │ │ │ +
508 switch( (int)Entity::codimension )
│ │ │ │ +
509 {
│ │ │ │ +
510 case 0 :
│ │ │ │ +
511 if( nofElParam_ > 0 ) {
│ │ │ │ +
512 if ( gridView.indexSet().index( entity ) >= elParam_.size() )
│ │ │ │ +
513 elParam_.resize( gridView.indexSet().index( entity ) );
│ │ │ │ +
514 return elParam_[ gridView.indexSet().index( entity ) ];
│ │ │ │ +
515 }
│ │ │ │ +
516 break;
│ │ │ │ +
517 case GridType::dimension :
│ │ │ │ +
518 if( nofVtxParam_ > 0 ) {
│ │ │ │ +
519 if ( gridView.indexSet().index( entity ) >= vtxParam_.size() )
│ │ │ │ +
520 vtxParam_.resize( gridView.indexSet().index( entity ) );
│ │ │ │ +
521 return vtxParam_[ gridView.indexSet().index( entity ) ];
│ │ │ │ +
522 }
│ │ │ │ +
523 break;
│ │ │ │ +
524 }
│ │ │ │ +
525 return emptyParam_;
│ │ │ │ +
526 }
│ │ │ │ +
│ │ │ │ +
527
│ │ │ │ +
│ │ │ │ +
528 void setNofParams( int cdim, int nofP )
│ │ │ │ +
529 {
│ │ │ │ +
530 switch (cdim) {
│ │ │ │ +
531 case 0 : nofElParam_ = nofP; break;
│ │ │ │ +
532 case GridType::dimension : nofVtxParam_ = nofP; break;
│ │ │ │ +
533 }
│ │ │ │ +
534 }
│ │ │ │ +
│ │ │ │ +
535
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
537 : public CommDataHandleIF< DataHandle, char >
│ │ │ │ +
538 {
│ │ │ │ +
│ │ │ │ +
539 explicit DataHandle ( GridPtr &gridPtr )
│ │ │ │ +
540 : gridPtr_( gridPtr ), idSet_( gridPtr->localIdSet() )
│ │ │ │ +
541 {
│ │ │ │ +
542 const auto gridView = gridPtr_->levelGridView( 0 );
│ │ │ │ +
543 const auto &indexSet = gridView.indexSet();
│ │ │ │ +
544
│ │ │ │ +
545 for( const auto &element : elements( gridView, Partitions::interiorBorder ) )
│ │ │ │ +
546 {
│ │ │ │ +
547 if( gridPtr_.nofElParam_ > 0 )
│ │ │ │ +
548 std::swap( gridPtr_.elParam_[ indexSet.index( element ) ], elData_[ idSet_.id( element ) ] );
│ │ │ │ +
549
│ │ │ │ +
550 if( gridPtr_.nofVtxParam_ > 0 )
│ │ │ │ +
551 {
│ │ │ │ +
552 for( unsigned int v = 0, n = element.subEntities( dimension ); v < n; ++v )
│ │ │ │ +
553 {
│ │ │ │ +
554 const auto index = indexSet.subIndex( element, v, dimension );
│ │ │ │ +
555 if ( !gridPtr_.vtxParam_[ index ].empty() )
│ │ │ │ +
556 std::swap( gridPtr_.vtxParam_[ index ], vtxData_[ idSet_.subId( element, v, dimension ) ] );
│ │ │ │ +
557 }
│ │ │ │ +
558 }
│ │ │ │ +
559
│ │ │ │ +
560 if( element.hasBoundaryIntersections() )
│ │ │ │ +
561 {
│ │ │ │ +
562 for( const auto &intersection : intersections( gridView, element ) )
│ │ │ │ +
563 {
│ │ │ │ +
564 // dirty hack: check for "none" to make corner point grid work
│ │ │ │ +
565 if( !intersection.boundary() || intersection.type().isNone() )
│ │ │ │ +
566 continue;
│ │ │ │ +
567
│ │ │ │ +
568 const int i = intersection.indexInInside();
│ │ │ │ +
569 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ];
│ │ │ │ +
570 bndData.first = gridPtr_.bndId_[ indexSet.subIndex( element, i, 1 ) ];
│ │ │ │ +
571 if( gridPtr_.haveBndParam_ )
│ │ │ │ +
572 std::swap( bndData.second, gridPtr_.bndParam_[ intersection.boundarySegmentIndex() ] );
│ │ │ │ +
573 }
│ │ │ │ +
574 }
│ │ │ │ +
575 }
│ │ │ │ +
576 }
│ │ │ │ +
│ │ │ │ +
577
│ │ │ │ +
578 DataHandle ( const DataHandle & ) = delete;
│ │ │ │ +
579 DataHandle ( DataHandle && ) = delete;
│ │ │ │ +
580
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
582 {
│ │ │ │ +
583 const auto gridView = gridPtr_->levelGridView( 0 );
│ │ │ │ +
584 const auto &indexSet = gridView.indexSet();
│ │ │ │ +
585
│ │ │ │ +
586 if( gridPtr_.nofElParam_ > 0 )
│ │ │ │ +
587 gridPtr_.elParam_.resize( indexSet.size( 0 ) );
│ │ │ │ +
588 if( gridPtr_.nofVtxParam_ > 0 )
│ │ │ │ +
589 gridPtr_.vtxParam_.resize( indexSet.size( dimension ) );
│ │ │ │ +
590 gridPtr_.bndId_.resize( indexSet.size( 1 ) );
│ │ │ │ +
591 if( gridPtr_.haveBndParam_ )
│ │ │ │ +
592 gridPtr_.bndParam_.resize( gridPtr_->numBoundarySegments() );
│ │ │ │ +
593
│ │ │ │ +
594 for( const auto &element : elements( gridView, Partitions::all ) )
│ │ │ │ +
595 {
│ │ │ │ +
596 if( gridPtr_.nofElParam_ > 0 )
│ │ │ │ +
597 {
│ │ │ │ +
598 std::swap( gridPtr_.elParam_[ indexSet.index( element ) ], elData_[ idSet_.id( element ) ] );
│ │ │ │ +
599 assert( gridPtr_.elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
│ │ │ │ +
600 }
│ │ │ │ +
601
│ │ │ │ +
602 if( gridPtr_.nofVtxParam_ > 0 )
│ │ │ │ +
603 {
│ │ │ │ +
604 for( unsigned int v = 0; v < element.subEntities( dimension ); ++v )
│ │ │ │ +
605 {
│ │ │ │ +
606 const auto index = indexSet.subIndex( element, v, dimension );
│ │ │ │ +
607 if( gridPtr_.vtxParam_[ index ].empty() )
│ │ │ │ +
608 std::swap( gridPtr_.vtxParam_[ index ], vtxData_[ idSet_.subId( element, v, dimension ) ] );
│ │ │ │ +
609 assert( gridPtr_.vtxParam_[ index ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
│ │ │ │ +
610 }
│ │ │ │ +
611 }
│ │ │ │ +
612
│ │ │ │ +
613 if( element.hasBoundaryIntersections() )
│ │ │ │ +
614 {
│ │ │ │ +
615 for( const auto &intersection : intersections( gridView, element ) )
│ │ │ │ +
616 {
│ │ │ │ +
617 // dirty hack: check for "none" to make corner point grid work
│ │ │ │ +
618 if( !intersection.boundary() || intersection.type().isNone() )
│ │ │ │ +
619 continue;
│ │ │ │ +
620
│ │ │ │ +
621 const int i = intersection.indexInInside();
│ │ │ │ +
622 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ];
│ │ │ │ +
623 gridPtr_.bndId_[ indexSet.subIndex( element, i, 1 ) ] = bndData.first;
│ │ │ │ +
624 if( gridPtr_.haveBndParam_ )
│ │ │ │ +
625 std::swap( bndData.second, gridPtr_.bndParam_[ intersection.boundarySegmentIndex() ] );
│ │ │ │ +
626 }
│ │ │ │ +
627 }
│ │ │ │ +
628 }
│ │ │ │ +
629 }
│ │ │ │ +
630
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
632
│ │ │ │ +
│ │ │ │ +
633 bool contains ( int dim, int codim ) const
│ │ │ │ +
634 {
│ │ │ │ +
635 assert( dim == dimension );
│ │ │ │ +
636 // do not use a switch statement, because dimension == 1 is possible
│ │ │ │ +
637 return (codim == 1) || ((codim == dimension) && (gridPtr_.nofVtxParam_ > 0)) || ((codim == 0) && (gridPtr_.nofElParam_ > 0));
│ │ │ │ +
638 }
│ │ │ │ +
│ │ │ │ +
639
│ │ │ │ +
640 bool fixedSize (int /* dim */, int /* codim */) const { return false; }
│ │ │ │ +
641
│ │ │ │ +
642 template< class Entity >
│ │ │ │ +
│ │ │ │ +
643 std::size_t size ( const Entity &entity ) const
│ │ │ │ +
644 {
│ │ │ │ +
645 std::size_t totalSize = 0;
│ │ │ │ +
646
│ │ │ │ +
647 // do not use a switch statement, because dimension == 1 is possible
│ │ │ │ +
648 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )
│ │ │ │ +
649 {
│ │ │ │ +
650 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
│ │ │ │ +
651 for( double &v : elData_[ idSet_.id( entity ) ] )
│ │ │ │ +
652 totalSize += dataSize( v );
│ │ │ │ +
653 }
│ │ │ │ +
654
│ │ │ │ +
655 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )
│ │ │ │ +
656 {
│ │ │ │ +
657 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
│ │ │ │ +
658 for( double &v : vtxData_[ idSet_.id( entity ) ] )
│ │ │ │ +
659 totalSize += dataSize( v );
│ │ │ │ +
660 }
│ │ │ │ +
661
│ │ │ │ +
662 if( Entity::codimension == 1 )
│ │ │ │ +
663 {
│ │ │ │ +
664 const auto bndData = bndData_.find( idSet_.id( entity ) );
│ │ │ │ +
665 if( bndData != bndData_.end() )
│ │ │ │ +
666 totalSize += dataSize( bndData->second.first ) + dataSize( bndData->second.second );
│ │ │ │ +
667 }
│ │ │ │ +
668
│ │ │ │ +
669 return totalSize;
│ │ │ │ +
670 }
│ │ │ │ +
│ │ │ │ +
671
│ │ │ │ +
672 template< class Buffer, class Entity >
│ │ │ │ +
│ │ │ │ +
673 void gather ( Buffer &buffer, const Entity &entity ) const
│ │ │ │ +
674 {
│ │ │ │ +
675 // do not use a switch statement, because dimension == 1 is possible
│ │ │ │ +
676 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )
│ │ │ │ +
677 {
│ │ │ │ +
678 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
│ │ │ │ +
679 for( double &v : elData_[ idSet_.id( entity ) ] )
│ │ │ │ +
680 write( buffer, v );
│ │ │ │ +
681 }
│ │ │ │ +
682
│ │ │ │ +
683 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )
│ │ │ │ +
684 {
│ │ │ │ +
685 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
│ │ │ │ +
686 for( double &v : vtxData_[ idSet_.id( entity ) ] )
│ │ │ │ +
687 write( buffer, v );
│ │ │ │ +
688 }
│ │ │ │ +
689
│ │ │ │ +
690 if( Entity::codimension == 1 )
│ │ │ │ +
691 {
│ │ │ │ +
692 const auto bndData = bndData_.find( idSet_.id( entity ) );
│ │ │ │ +
693 if( bndData != bndData_.end() )
│ │ │ │ +
694 {
│ │ │ │ +
695 write( buffer, bndData->second.first );
│ │ │ │ +
696 write( buffer, bndData->second.second );
│ │ │ │ +
697 }
│ │ │ │ +
698 }
│ │ │ │ +
699 }
│ │ │ │ +
│ │ │ │ +
700
│ │ │ │ +
701 template< class Buffer, class Entity >
│ │ │ │ +
│ │ │ │ +
702 void scatter ( Buffer &buffer, const Entity &entity, std::size_t n )
│ │ │ │ +
703 {
│ │ │ │ +
704 // do not use a switch statement, because dimension == 1 is possible
│ │ │ │ +
705 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )
│ │ │ │ +
706 {
│ │ │ │ +
707 auto &p = elData_[ idSet_.id( entity ) ];
│ │ │ │ +
708 p.resize( gridPtr_.nofElParam_ );
│ │ │ │ +
709 for( double &v : p )
│ │ │ │ +
710 read( buffer, v, n );
│ │ │ │ +
711 }
│ │ │ │ +
712
│ │ │ │ +
713 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )
│ │ │ │ +
714 {
│ │ │ │ +
715 auto &p = vtxData_[ idSet_.id( entity ) ];
│ │ │ │ +
716 p.resize( gridPtr_.nofVtxParam_ );
│ │ │ │ +
717 for( double &v : p )
│ │ │ │ +
718 read( buffer, v, n );
│ │ │ │ +
719 }
│ │ │ │ +
720
│ │ │ │ +
721 if( (Entity::codimension == 1) && (n > 0) )
│ │ │ │ +
722 {
│ │ │ │ +
723 auto &bndData = bndData_[ idSet_.id( entity ) ];
│ │ │ │ +
724 read( buffer, bndData.first, n );
│ │ │ │ +
725 read( buffer, bndData.second, n );
│ │ │ │ +
726 }
│ │ │ │ +
727
│ │ │ │ +
728 assert( n == 0 );
│ │ │ │ +
729 }
│ │ │ │ +
│ │ │ │ +
730
│ │ │ │ +
731 private:
│ │ │ │ +
732 template< class T >
│ │ │ │ +
733 static std::enable_if_t< std::is_trivially_copyable< T >::value, std::size_t > dataSize ( const T & /* value */ )
│ │ │ │ +
734 {
│ │ │ │ +
735 return sizeof( T );
│ │ │ │ +
736 }
│ │ │ │ +
737
│ │ │ │ +
738 static std::size_t dataSize ( const std::string &s )
│ │ │ │ +
739 {
│ │ │ │ +
740 return dataSize( s.size() ) + s.size();
│ │ │ │ +
741 }
│ │ │ │ +
742
│ │ │ │ +
743 template< class Buffer, class T >
│ │ │ │ +
744 static std::enable_if_t< std::is_trivially_copyable< T >::value > write ( Buffer &buffer, const T &value )
│ │ │ │ +
745 {
│ │ │ │ +
746 std::array< char, sizeof( T ) > bytes;
│ │ │ │ +
747 std::memcpy( bytes.data(), &value, sizeof( T ) );
│ │ │ │ +
748 for( char &b : bytes )
│ │ │ │ +
749 buffer.write( b );
│ │ │ │ +
750 }
│ │ │ │ +
751
│ │ │ │ +
752 template< class Buffer >
│ │ │ │ +
753 static void write ( Buffer &buffer, const std::string &s )
│ │ │ │ +
754 {
│ │ │ │ +
755 write( buffer, s.size() );
│ │ │ │ +
756 for( const char &c : s )
│ │ │ │ +
757 buffer.write( c );
│ │ │ │ +
758 }
│ │ │ │ +
759
│ │ │ │ +
760 template< class Buffer, class T >
│ │ │ │ +
761 static std::enable_if_t< std::is_trivially_copyable< T >::value > read ( Buffer &buffer, T &value, std::size_t &n )
│ │ │ │ +
762 {
│ │ │ │ +
763 assert( n >= sizeof( T ) );
│ │ │ │ +
764 n -= sizeof( T );
│ │ │ │ +
765
│ │ │ │ +
766 std::array< char, sizeof( T ) > bytes;
│ │ │ │ +
767 for( char &b : bytes )
│ │ │ │ +
768 buffer.read( b );
│ │ │ │ +
769 std::memcpy( &value, bytes.data(), sizeof( T ) );
│ │ │ │ +
770 }
│ │ │ │ +
771
│ │ │ │ +
772 template< class Buffer >
│ │ │ │ +
773 static void read ( Buffer &buffer, std::string &s, std::size_t &n )
│ │ │ │ +
774 {
│ │ │ │ +
775 std::size_t size;
│ │ │ │ +
776 read( buffer, size, n );
│ │ │ │ +
777 s.resize( size );
│ │ │ │ +
778
│ │ │ │ +
779 assert( n >= size );
│ │ │ │ +
780 n -= size;
│ │ │ │ +
781
│ │ │ │ +
782 for( char &c : s )
│ │ │ │ +
783 buffer.read( c );
│ │ │ │ +
784 }
│ │ │ │ +
785
│ │ │ │ +
786 GridPtr &gridPtr_;
│ │ │ │ +
787 const typename GridType::LocalIdSet &idSet_;
│ │ │ │ +
788 mutable std::map< typename GridType::LocalIdSet::IdType, std::vector< double > > elData_, vtxData_;
│ │ │ │ +
789 mutable std::map< typename GridType::LocalIdSet::IdType, std::pair< int, DGFBoundaryParameter::type > > bndData_;
│ │ │ │ +
790 };
│ │ │ │ +
│ │ │ │ +
791
│ │ │ │ +
792 // grid auto pointer
│ │ │ │ + │ │ │ │ +
794 // element and vertex parameters
│ │ │ │ +
795 std::vector< std::vector< double > > elParam_;
│ │ │ │ +
796 std::vector< std::vector< double > > vtxParam_;
│ │ │ │ +
797 std::vector< DGFBoundaryParameter::type > bndParam_;
│ │ │ │ +
798 std::vector< int > bndId_;
│ │ │ │ +
799 std::vector< double > emptyParam_;
│ │ │ │ +
800
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
804 }; // end of class GridPtr
│ │ │ │ +
│ │ │ │ +
805
│ │ │ │ +
806} // end namespace Dune
│ │ │ │ +
807
│ │ │ │ +
808#endif
│ │ │ │ + │ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
│ │ │ │ +
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
│ │ │ │ +
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:191
│ │ │ │ +
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
void makeupcase(std ::string &s)
Definition basic.hh:24
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
void reset()
Definition basic.hh:51
│ │ │ │ -
bool getnextline()
Definition basic.cc:94
│ │ │ │ -
bool findtoken(std ::string token)
Definition basic.cc:123
│ │ │ │ -
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ -
const std::string & id() const
Definition basic.hh:97
│ │ │ │ -
int & noflines()
Definition basic.hh:87
│ │ │ │ -
friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b)
Definition basic.hh:103
│ │ │ │ -
bool isempty()
Definition basic.hh:82
│ │ │ │ -
bool isactive()
Definition basic.hh:77
│ │ │ │ -
int linenumber()
Definition basic.hh:92
│ │ │ │ -
std::stringstream line
Definition basic.hh:47
│ │ │ │ -
bool gettokenparam(std ::string token, std ::string &entry)
Definition basic.cc:104
│ │ │ │ +
constexpr All all
PartitionSet for all partitions.
Definition partitionset.hh:296
│ │ │ │ +
constexpr InteriorBorder interiorBorder
PartitionSet for the interior and border partitions.
Definition partitionset.hh:287
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfgridfactory.hh:102
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfgridfactory.hh:158
│ │ │ │ +
Grid * grid()
Definition dgfgridfactory.hh:90
│ │ │ │ +
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
│ │ │ │ +
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:236
│ │ │ │ +
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition common/gridfactory.hh:220
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:314
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:372
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Class for constructing grids from DGF files.
Definition gridptr.hh:66
│ │ │ │ +
GridPtr(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor given a std::istream
Definition gridptr.hh:199
│ │ │ │ +
const std::vector< double > & parameters(const Entity &entity) const
get parameters defined for each codim 0 und dim entity on the grid through the grid file
Definition gridptr.hh:325
│ │ │ │ +
GridPtr()
Default constructor, creating empty GridPtr.
Definition gridptr.hh:217
│ │ │ │ +
const GridType & operator*() const
return const reference to GridType instance
Definition gridptr.hh:288
│ │ │ │ +
bool haveBndParam_
Definition gridptr.hh:803
│ │ │ │ +
static const int dimension
Definition gridptr.hh:155
│ │ │ │ +
std::vector< int > bndId_
Definition gridptr.hh:798
│ │ │ │ +
void setNofParams(int cdim, int nofP)
Definition gridptr.hh:528
│ │ │ │ +
void loadBalance()
Definition gridptr.hh:369
│ │ │ │ +
std::vector< DGFBoundaryParameter::type > bndParam_
Definition gridptr.hh:797
│ │ │ │ +
void initialize(GridFactory< GridType > &factory, std::vector< int > &boundaryIds, std::vector< int > &elementIds)
Definition gridptr.hh:456
│ │ │ │ +
GridPtr(GridType *grd)
Constructor storing given pointer to internal auto pointer.
Definition gridptr.hh:230
│ │ │ │ +
int nofElParam_
Definition gridptr.hh:801
│ │ │ │ +
const DGFBoundaryParameter::type & parameters(const Intersection< GridImp, IntersectionImp > &intersection) const
get parameters for intersection
Definition gridptr.hh:351
│ │ │ │ +
GridType & operator*()
return reference to GridType instance
Definition gridptr.hh:278
│ │ │ │ +
static bool isEmpty(Range &&range)
Definition gridptr.hh:381
│ │ │ │ +
int nofParameters(const Entity &) const
get parameters defined for given entity
Definition gridptr.hh:311
│ │ │ │ +
GridPtr(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition gridptr.hh:158
│ │ │ │ +
std::vector< std::vector< double > > elParam_
Definition gridptr.hh:795
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition gridptr.hh:154
│ │ │ │ +
GridPtr & operator=(const GridPtr &org)
assignment of grid pointer
Definition gridptr.hh:246
│ │ │ │ +
int nofParameters(int cdim) const
get number of parameters defined for a given codimension
Definition gridptr.hh:301
│ │ │ │ +
int nofParameters(const Intersection< GridImp, IntersectionImp > &intersection) const
get number of parameters defined for a given intersection
Definition gridptr.hh:318
│ │ │ │ +
std::vector< double > emptyParam_
Definition gridptr.hh:799
│ │ │ │ +
mygrid_ptr gridPtr_
Definition gridptr.hh:793
│ │ │ │ +
void readGmsh(const std::string &filename, std::integral_constant< bool, false >)
Definition gridptr.hh:147
│ │ │ │ +
void readGmsh(const std::string &filename, std::integral_constant< bool, true >)
Definition gridptr.hh:137
│ │ │ │ +
std::vector< double > & params(const Entity &entity)
Definition gridptr.hh:505
│ │ │ │ +
void initialize(DGFGridFactory< GridType > &dgfFactory)
Definition gridptr.hh:386
│ │ │ │ +
GridPtr(const GridPtr &org)=default
Copy constructor, copies internal auto pointer.
│ │ │ │ +
std::string getFileExtension(const std::string &filename) const
Definition gridptr.hh:122
│ │ │ │ +
const GridType * operator->() const
return const pointer to GridType instance
Definition gridptr.hh:293
│ │ │ │ +
GridType * release()
release pointer from internal ownership
Definition gridptr.hh:298
│ │ │ │ +
void communicate()
Definition gridptr.hh:360
│ │ │ │ +
std::vector< std::vector< double > > vtxParam_
Definition gridptr.hh:796
│ │ │ │ +
GridType * operator->()
return pointer to GridType instance
Definition gridptr.hh:283
│ │ │ │ +
int nofVtxParam_
Definition gridptr.hh:802
│ │ │ │ +
Definition gridptr.hh:68
│ │ │ │ +
mygrid_ptr(GridType *grd)
Definition gridptr.hh:99
│ │ │ │ +
~mygrid_ptr()
Definition gridptr.hh:102
│ │ │ │ +
GridType * release()
Definition gridptr.hh:112
│ │ │ │ +
mygrid_ptr(const mygrid_ptr &other)
Definition gridptr.hh:97
│ │ │ │ +
mygrid_ptr & operator=(const mygrid_ptr &other)
Definition gridptr.hh:105
│ │ │ │ +
mygrid_ptr()
Definition gridptr.hh:95
│ │ │ │ +
Definition gridptr.hh:538
│ │ │ │ +
CommDataHandleIF< DataHandle, char > & interface()
Definition gridptr.hh:631
│ │ │ │ +
DataHandle(const DataHandle &)=delete
│ │ │ │ +
~DataHandle()
Definition gridptr.hh:581
│ │ │ │ +
DataHandle(GridPtr &gridPtr)
Definition gridptr.hh:539
│ │ │ │ +
void gather(Buffer &buffer, const Entity &entity) const
Definition gridptr.hh:673
│ │ │ │ +
bool fixedSize(int, int) const
Definition gridptr.hh:640
│ │ │ │ +
std::size_t size(const Entity &entity) const
Definition gridptr.hh:643
│ │ │ │ +
DataHandle(DataHandle &&)=delete
│ │ │ │ +
void scatter(Buffer &buffer, const Entity &entity, std::size_t n)
Definition gridptr.hh:702
│ │ │ │ +
bool contains(int dim, int codim) const
Definition gridptr.hh:633
│ │ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:904
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,174 +3,1131 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -basic.hh │ │ │ │ │ +gridptr.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_BASICBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_BASICBLOCK_HH │ │ │ │ │ +5#ifndef DUNE_DGF_GRIDPTR_HH │ │ │ │ │ +6#define DUNE_DGF_GRIDPTR_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -20 │ │ │ │ │ -21 namespace dgf │ │ │ │ │ -22 { │ │ │ │ │ -23 │ │ │ │ │ -_2_4 inline void _m_a_k_e_u_p_c_a_s_e( std :: string &s ) │ │ │ │ │ -25 { │ │ │ │ │ -26 for (size_t i=0; i │ │ │ │ │ -_6_3 bool _g_e_t_n_e_x_t_e_n_t_r_y( ENTRY &entry ) │ │ │ │ │ -64 { │ │ │ │ │ -65 _l_i_n_e >> entry; │ │ │ │ │ -66 return static_cast< bool >( _l_i_n_e ); │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -69 bool _g_e_t_t_o_k_e_n_p_a_r_a_m ( std :: string token, std :: string &entry ); │ │ │ │ │ -70 bool _f_i_n_d_t_o_k_e_n( std :: string token ); │ │ │ │ │ -71 │ │ │ │ │ -72 public: │ │ │ │ │ -73 // search for block in file and store in buffer │ │ │ │ │ -74 _B_a_s_i_c_B_l_o_c_k ( std::istream &in, const char* id ); │ │ │ │ │ -75 │ │ │ │ │ -76 // some information on this block │ │ │ │ │ -_7_7 bool _i_s_a_c_t_i_v_e () │ │ │ │ │ -78 { │ │ │ │ │ -79 return active; │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -_8_2 bool _i_s_e_m_p_t_y () │ │ │ │ │ -83 { │ │ │ │ │ -84 return empty; │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -_8_7 int &_n_o_f_l_i_n_e_s () │ │ │ │ │ -88 { │ │ │ │ │ -89 return linecount; │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -_9_2 int _l_i_n_e_n_u_m_b_e_r () │ │ │ │ │ -93 { │ │ │ │ │ -94 return pos; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -_9_7 const std::string & _i_d () const │ │ │ │ │ -98 { │ │ │ │ │ -99 return identifier; │ │ │ │ │ -100 } │ │ │ │ │ -101 │ │ │ │ │ -102 // for error messages │ │ │ │ │ -_1_0_3 friend std :: ostream &_o_p_e_r_a_t_o_r_<_<_ ( std :: ostream &os, const _B_a_s_i_c_B_l_o_c_k &b │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18 │ │ │ │ │ +19//- Dune includes │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ +22 │ │ │ │ │ +23#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +24#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_d_a_t_a_h_a_n_d_l_e_i_f_._h_h> │ │ │ │ │ +25#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +26#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_p_a_r_t_i_t_i_o_n_s_e_t_._h_h> │ │ │ │ │ +27#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +28 │ │ │ │ │ +29#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +30#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +31#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +32 │ │ │ │ │ +33#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ +34 │ │ │ │ │ +35namespace _D_u_n_e │ │ │ │ │ +36{ │ │ │ │ │ +37 │ │ │ │ │ +38 // External Forward Declarations │ │ │ │ │ +39 // ----------------------------- │ │ │ │ │ +40 │ │ │ │ │ +41 template < class G > │ │ │ │ │ +42 struct DGFGridFactory; │ │ │ │ │ +43 │ │ │ │ │ +44 template< class GridImp, class IntersectionImp > │ │ │ │ │ +45 class Intersection; │ │ │ │ │ +46 │ │ │ │ │ +47 │ │ │ │ │ +48 │ │ │ │ │ +49 // GridPtr │ │ │ │ │ +50 // ------- │ │ │ │ │ +51 │ │ │ │ │ +64 template< class GridType > │ │ │ │ │ +_6_5 struct _G_r_i_d_P_t_r │ │ │ │ │ +66 { │ │ │ │ │ +_6_7 class _m_y_g_r_i_d___p_t_r : public std::shared_ptr< GridType > │ │ │ │ │ +68 { │ │ │ │ │ +69 typedef std::shared_ptr< GridType > base_t ; │ │ │ │ │ +70 // empty deleter to avoid deletion on release │ │ │ │ │ +71 typedef null_deleter< GridType > emptydeleter_t ; │ │ │ │ │ +72 │ │ │ │ │ +73 void removeObj() │ │ │ │ │ +74 { │ │ │ │ │ +75 // if use count is only 1 delete object │ │ │ │ │ +76 if( use_count() == 1 ) │ │ │ │ │ +77 { │ │ │ │ │ +78 // delete point here, since we use the empty deleter │ │ │ │ │ +79 GridType* grd = _r_e_l_e_a_s_e(); │ │ │ │ │ +80 if( grd ) delete grd ; │ │ │ │ │ +81 } │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +84 void assignObj( const _m_y_g_r_i_d___p_t_r& other ) │ │ │ │ │ +85 { │ │ │ │ │ +86 removeObj(); │ │ │ │ │ +87 base_t :: operator = ( other ); │ │ │ │ │ +88 } │ │ │ │ │ +89 public: │ │ │ │ │ +90 using base_t :: get ; │ │ │ │ │ +91 using base_t :: swap ; │ │ │ │ │ +92 using base_t :: use_count ; │ │ │ │ │ +93 │ │ │ │ │ +94 // default constructor │ │ │ │ │ +_9_5 _m_y_g_r_i_d___p_t_r() : base_t( ( GridType * ) 0, emptydeleter_t() ) {} │ │ │ │ │ +96 // copy constructor │ │ │ │ │ +_9_7 _m_y_g_r_i_d___p_t_r( const _m_y_g_r_i_d___p_t_r& other ) : base_t(nullptr) { assignObj( other │ │ │ │ │ +); } │ │ │ │ │ +98 // constructor taking pointer │ │ │ │ │ +_9_9 explicit _m_y_g_r_i_d___p_t_r( GridType* grd ) : base_t( grd, emptydeleter_t() ) {} │ │ │ │ │ +100 │ │ │ │ │ +101 // destructor │ │ │ │ │ +_1_0_2 _~_m_y_g_r_i_d___p_t_r() { removeObj(); } │ │ │ │ │ +103 │ │ │ │ │ +104 // assigment operator │ │ │ │ │ +_1_0_5 _m_y_g_r_i_d___p_t_r& _o_p_e_r_a_t_o_r_ _=_ ( const _m_y_g_r_i_d___p_t_r& other ) │ │ │ │ │ +106 { │ │ │ │ │ +107 assignObj( other ); │ │ │ │ │ +108 return *this; │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +111 // release pointer │ │ │ │ │ +_1_1_2 GridType* _r_e_l_e_a_s_e() │ │ │ │ │ +113 { │ │ │ │ │ +114 GridType* grd = this->get(); │ │ │ │ │ +115 base_t ptr(( GridType * ) 0, emptydeleter_t() ); │ │ │ │ │ +116 this->swap( ptr ); │ │ │ │ │ +117 return grd ; │ │ │ │ │ +118 } │ │ │ │ │ +119 }; │ │ │ │ │ +120 │ │ │ │ │ +121 protected: │ │ │ │ │ +_1_2_2 std::string _g_e_t_F_i_l_e_E_x_t_e_n_s_i_o_n( const std::string& filename ) const │ │ │ │ │ +123 { │ │ │ │ │ +124 // extract file extension │ │ │ │ │ +125 auto extpos = filename.find_last_of("."); │ │ │ │ │ +126 std::string ext; │ │ │ │ │ +127 if( extpos != std::string::npos) │ │ │ │ │ +128 ext = filename.substr( extpos + 1 ); │ │ │ │ │ +129 │ │ │ │ │ +130 // convert all letters to lower case │ │ │ │ │ +131 for( auto& item : ext ) │ │ │ │ │ +132 item = std::tolower( item ); │ │ │ │ │ +133 return ext; │ │ │ │ │ +134 } │ │ │ │ │ +135 │ │ │ │ │ +136 // read gmsh file if dimension world <= 3 │ │ │ │ │ +_1_3_7 void _r_e_a_d_G_m_s_h( const std::string& filename, std::integral_constant< bool, │ │ │ │ │ +true > ) │ │ │ │ │ +138 { │ │ │ │ │ +139 _G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_T_y_p_e_> gridFactory; │ │ │ │ │ +140 std::vector boundaryIDs; │ │ │ │ │ +141 std::vector elementsIDs; │ │ │ │ │ +142 _G_m_s_h_R_e_a_d_e_r_<_G_r_i_d_T_y_p_e_>_:_:_r_e_a_d(gridFactory,filename,boundaryIDs,elementsIDs); │ │ │ │ │ +143 _i_n_i_t_i_a_l_i_z_e( gridFactory, boundaryIDs,elementsIDs); │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +146 // if dimension world > 3 throw GridError │ │ │ │ │ +_1_4_7 void _r_e_a_d_G_m_s_h( const std::string& filename, std::integral_constant< bool, │ │ │ │ │ +false > ) │ │ │ │ │ +148 { │ │ │ │ │ +149 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "GmshReader requires dimWorld <= 3." ); │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +152 public: │ │ │ │ │ +153 │ │ │ │ │ +_1_5_4 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +_1_5_5 static const int _d_i_m_e_n_s_i_o_n = GridType::dimension; │ │ │ │ │ +156 │ │ │ │ │ +_1_5_8 explicit _G_r_i_d_P_t_r ( const std::string &filename, │ │ │ │ │ +159 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +160 : _g_r_i_d_P_t_r__(), │ │ │ │ │ +161 _e_l_P_a_r_a_m__(), │ │ │ │ │ +162 _v_t_x_P_a_r_a_m__(), │ │ │ │ │ +163 _b_n_d_P_a_r_a_m__(), │ │ │ │ │ +164 _b_n_d_I_d__(), │ │ │ │ │ +165 _e_m_p_t_y_P_a_r_a_m__(), │ │ │ │ │ +166 _n_o_f_E_l_P_a_r_a_m__( 0 ), │ │ │ │ │ +167 _n_o_f_V_t_x_P_a_r_a_m__( 0 ), │ │ │ │ │ +168 _h_a_v_e_B_n_d_P_a_r_a_m__( false ) │ │ │ │ │ +169 { │ │ │ │ │ +170 std::string fileExt = _g_e_t_F_i_l_e_E_x_t_e_n_s_i_o_n( filename ); │ │ │ │ │ +171 │ │ │ │ │ +172 if( fileExt == "dgf" ) │ │ │ │ │ +173 { │ │ │ │ │ +174 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_T_y_p_e_ _> dgfFactory( filename, comm ); │ │ │ │ │ +175 _i_n_i_t_i_a_l_i_z_e( dgfFactory ); │ │ │ │ │ +176 } │ │ │ │ │ +177 else if( fileExt == "msh" ) │ │ │ │ │ +178 { │ │ │ │ │ +179 // Gmsh reader only compiles for dimworld <= 3 │ │ │ │ │ +180 _r_e_a_d_G_m_s_h( filename, std::integral_constant< bool, GridType::dimensionworld │ │ │ │ │ +<= 3 > () ); │ │ │ │ │ +181 } │ │ │ │ │ +182 else if( fileExt == "amc" || fileExt == "2d" || fileExt == "3d" ) │ │ │ │ │ +183 { │ │ │ │ │ +184 // TODO: AlbertaReader │ │ │ │ │ +185 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not │ │ │ │ │ +supported yet!" ); │ │ │ │ │ +186 } │ │ │ │ │ +187 else if( fileExt == "vtu" ) │ │ │ │ │ +188 { │ │ │ │ │ +189 // TODO: vtu/vtk reader │ │ │ │ │ +190 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not │ │ │ │ │ +supported yet!" ); │ │ │ │ │ +191 } │ │ │ │ │ +192 else │ │ │ │ │ +193 { │ │ │ │ │ +194 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not │ │ │ │ │ +supported yet!" ); │ │ │ │ │ +195 } │ │ │ │ │ +196 } │ │ │ │ │ +197 │ │ │ │ │ +_1_9_9 explicit _G_r_i_d_P_t_r ( std::istream &input, │ │ │ │ │ +200 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +201 : _g_r_i_d_P_t_r__(), │ │ │ │ │ +202 _e_l_P_a_r_a_m__(), │ │ │ │ │ +203 _v_t_x_P_a_r_a_m__(), │ │ │ │ │ +204 _b_n_d_P_a_r_a_m__(), │ │ │ │ │ +205 _b_n_d_I_d__(), │ │ │ │ │ +206 _e_m_p_t_y_P_a_r_a_m__(), │ │ │ │ │ +207 _n_o_f_E_l_P_a_r_a_m__( 0 ), │ │ │ │ │ +208 _n_o_f_V_t_x_P_a_r_a_m__( 0 ), │ │ │ │ │ +209 _h_a_v_e_B_n_d_P_a_r_a_m__( false ) │ │ │ │ │ +210 { │ │ │ │ │ +211 // input stream only works for DGF format right now │ │ │ │ │ +212 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_T_y_p_e_ _> dgfFactory( input, comm ); │ │ │ │ │ +213 _i_n_i_t_i_a_l_i_z_e( dgfFactory ); │ │ │ │ │ +214 } │ │ │ │ │ +215 │ │ │ │ │ +_2_1_7 _G_r_i_d_P_t_r() │ │ │ │ │ +218 : _g_r_i_d_P_t_r__(), │ │ │ │ │ +219 _e_l_P_a_r_a_m__(), │ │ │ │ │ +220 _v_t_x_P_a_r_a_m__(), │ │ │ │ │ +221 _b_n_d_P_a_r_a_m__(), │ │ │ │ │ +222 _b_n_d_I_d__(), │ │ │ │ │ +223 _e_m_p_t_y_P_a_r_a_m__(), │ │ │ │ │ +224 _n_o_f_E_l_P_a_r_a_m__(0), │ │ │ │ │ +225 _n_o_f_V_t_x_P_a_r_a_m__(0), │ │ │ │ │ +226 _h_a_v_e_B_n_d_P_a_r_a_m__( false ) │ │ │ │ │ +227 {} │ │ │ │ │ +228 │ │ │ │ │ +_2_3_0 explicit _G_r_i_d_P_t_r( GridType *grd ) │ │ │ │ │ +231 : _g_r_i_d_P_t_r__(grd), │ │ │ │ │ +232 _e_l_P_a_r_a_m__(), │ │ │ │ │ +233 _v_t_x_P_a_r_a_m__(), │ │ │ │ │ +234 _b_n_d_P_a_r_a_m__(), │ │ │ │ │ +235 _b_n_d_I_d__(), │ │ │ │ │ +236 _e_m_p_t_y_P_a_r_a_m__(), │ │ │ │ │ +237 _n_o_f_E_l_P_a_r_a_m__(0), │ │ │ │ │ +238 _n_o_f_V_t_x_P_a_r_a_m__(0), │ │ │ │ │ +239 _h_a_v_e_B_n_d_P_a_r_a_m__( false ) │ │ │ │ │ +240 {} │ │ │ │ │ +241 │ │ │ │ │ +_2_4_3 _G_r_i_d_P_t_r( const _G_r_i_d_P_t_r &org ) = default; │ │ │ │ │ +244 │ │ │ │ │ +_2_4_6 _G_r_i_d_P_t_r& _o_p_e_r_a_t_o_r_=_ ( const _G_r_i_d_P_t_r &org ) │ │ │ │ │ +247 { │ │ │ │ │ +248 _g_r_i_d_P_t_r__ = org._g_r_i_d_P_t_r__; │ │ │ │ │ +249 _e_l_P_a_r_a_m__ = org._e_l_P_a_r_a_m__; │ │ │ │ │ +250 _v_t_x_P_a_r_a_m__ = org._v_t_x_P_a_r_a_m__; │ │ │ │ │ +251 _b_n_d_P_a_r_a_m__ = org._b_n_d_P_a_r_a_m__; │ │ │ │ │ +252 _b_n_d_I_d__ = org._b_n_d_I_d__; │ │ │ │ │ +253 _e_m_p_t_y_P_a_r_a_m__ = org._e_m_p_t_y_P_a_r_a_m__; │ │ │ │ │ +254 │ │ │ │ │ +255 _n_o_f_E_l_P_a_r_a_m__ = org._n_o_f_E_l_P_a_r_a_m__; │ │ │ │ │ +256 _n_o_f_V_t_x_P_a_r_a_m__ = org._n_o_f_V_t_x_P_a_r_a_m__; │ │ │ │ │ +257 _h_a_v_e_B_n_d_P_a_r_a_m__ = org._h_a_v_e_B_n_d_P_a_r_a_m__; │ │ │ │ │ +258 return *this; │ │ │ │ │ +259 } │ │ │ │ │ +260 │ │ │ │ │ +_2_6_2 _G_r_i_d_P_t_r& _o_p_e_r_a_t_o_r_ _=_ (GridType * grd) │ │ │ │ │ +263 { │ │ │ │ │ +264 _g_r_i_d_P_t_r__ = _m_y_g_r_i_d___p_t_r( grd ); │ │ │ │ │ +265 _e_l_P_a_r_a_m__.resize(0); │ │ │ │ │ +266 _v_t_x_P_a_r_a_m__.resize(0); │ │ │ │ │ +267 _b_n_d_P_a_r_a_m__.resize(0); │ │ │ │ │ +268 _b_n_d_I_d__.resize(0); │ │ │ │ │ +269 _e_m_p_t_y_P_a_r_a_m__.resize(0); │ │ │ │ │ +270 │ │ │ │ │ +271 _n_o_f_V_t_x_P_a_r_a_m__ = 0; │ │ │ │ │ +272 _n_o_f_E_l_P_a_r_a_m__ = 0; │ │ │ │ │ +273 _h_a_v_e_B_n_d_P_a_r_a_m__ = false; │ │ │ │ │ +274 return *this; │ │ │ │ │ +275 } │ │ │ │ │ +276 │ │ │ │ │ +_2_7_8 GridType& _o_p_e_r_a_t_o_r_*() { │ │ │ │ │ +279 return *_g_r_i_d_P_t_r__; │ │ │ │ │ +280 } │ │ │ │ │ +281 │ │ │ │ │ +_2_8_3 GridType* _o_p_e_r_a_t_o_r_-_>() { │ │ │ │ │ +284 return _g_r_i_d_P_t_r__.operator -> (); │ │ │ │ │ +285 } │ │ │ │ │ +286 │ │ │ │ │ +_2_8_8 const GridType& _o_p_e_r_a_t_o_r_*() const { │ │ │ │ │ +289 return *_g_r_i_d_P_t_r__; │ │ │ │ │ +290 } │ │ │ │ │ +291 │ │ │ │ │ +_2_9_3 const GridType* _o_p_e_r_a_t_o_r_-_>() const { │ │ │ │ │ +294 return _g_r_i_d_P_t_r__.operator -> (); │ │ │ │ │ +295 } │ │ │ │ │ +296 │ │ │ │ │ +_2_9_8 GridType* _r_e_l_e_a_s_e () { return _g_r_i_d_P_t_r__._r_e_l_e_a_s_e(); } │ │ │ │ │ +299 │ │ │ │ │ +_3_0_1 int _n_o_f_P_a_r_a_m_e_t_e_r_s(int cdim) const { │ │ │ │ │ +302 switch (cdim) { │ │ │ │ │ +303 case 0 : return _n_o_f_E_l_P_a_r_a_m__; break; │ │ │ │ │ +304 case GridType::dimension : return _n_o_f_V_t_x_P_a_r_a_m__; break; │ │ │ │ │ +305 } │ │ │ │ │ +306 return 0; │ │ │ │ │ +307 } │ │ │ │ │ +308 │ │ │ │ │ +310 template │ │ │ │ │ +_3_1_1 int _n_o_f_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ +312 { │ │ │ │ │ +313 return _n_o_f_P_a_r_a_m_e_t_e_r_s( (int) _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +314 } │ │ │ │ │ +315 │ │ │ │ │ +317 template< class GridImp, class IntersectionImp > │ │ │ │ │ +_3_1_8 int _n_o_f_P_a_r_a_m_e_t_e_r_s ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_,_ _I_n_t_e_r_s_e_c_t_i_o_n_I_m_p_ _> & │ │ │ │ │ +intersection ) const │ │ │ │ │ +319 { │ │ │ │ │ +320 return _p_a_r_a_m_e_t_e_r_s( intersection ).size(); │ │ │ │ │ +321 } │ │ │ │ │ +322 │ │ │ │ │ +324 template │ │ │ │ │ +_3_2_5 const std::vector< double > &_p_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ +326 { │ │ │ │ │ +327 typedef typename GridType::LevelGridView _G_r_i_d_V_i_e_w; │ │ │ │ │ +328 _G_r_i_d_V_i_e_w gridView = _g_r_i_d_P_t_r__->levelGridView( 0 ); │ │ │ │ │ +329 switch( (int)_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n ) │ │ │ │ │ +330 { │ │ │ │ │ +331 case 0 : │ │ │ │ │ +332 if( _n_o_f_E_l_P_a_r_a_m__ > 0 ) │ │ │ │ │ +333 { │ │ │ │ │ +334 assert( (unsigned int)gridView._i_n_d_e_x_S_e_t().index( entity ) < _e_l_P_a_r_a_m__.size() │ │ │ │ │ +); │ │ │ │ │ +335 return _e_l_P_a_r_a_m__[ gridView._i_n_d_e_x_S_e_t().index( entity ) ]; │ │ │ │ │ +336 } │ │ │ │ │ +337 break; │ │ │ │ │ +338 case GridType::dimension : │ │ │ │ │ +339 if( _n_o_f_V_t_x_P_a_r_a_m__ > 0 ) │ │ │ │ │ +340 { │ │ │ │ │ +341 assert( (unsigned int)gridView._i_n_d_e_x_S_e_t().index( entity ) < _v_t_x_P_a_r_a_m__.size │ │ │ │ │ +() ); │ │ │ │ │ +342 return _v_t_x_P_a_r_a_m__[ gridView._i_n_d_e_x_S_e_t().index( entity ) ]; │ │ │ │ │ +343 } │ │ │ │ │ +344 break; │ │ │ │ │ +345 } │ │ │ │ │ +346 return _e_m_p_t_y_P_a_r_a_m__; │ │ │ │ │ +347 } │ │ │ │ │ +348 │ │ │ │ │ +350 template< class GridImp, class IntersectionImp > │ │ │ │ │ +_3_5_1 const _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & _p_a_r_a_m_e_t_e_r_s ( const _I_n_t_e_r_s_e_c_t_i_o_n_< │ │ │ │ │ +_G_r_i_d_I_m_p_,_ _I_n_t_e_r_s_e_c_t_i_o_n_I_m_p_ _> & intersection ) const │ │ │ │ │ +352 { │ │ │ │ │ +353 // if no parameters given return empty vector │ │ │ │ │ +354 if ( !_h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +355 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +356 │ │ │ │ │ +357 return _b_n_d_P_a_r_a_m__[ intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() ]; │ │ │ │ │ +358 } │ │ │ │ │ +359 │ │ │ │ │ +_3_6_0 void _c_o_m_m_u_n_i_c_a_t_e () │ │ │ │ │ +361 { │ │ │ │ │ +362 if( _g_r_i_d_P_t_r__->comm().size() > 1 ) │ │ │ │ │ +363 { │ │ │ │ │ +364 _D_a_t_a_H_a_n_d_l_e dh(*this); │ │ │ │ │ +365 _g_r_i_d_P_t_r__->levelGridView( 0 ).communicate( dh._i_n_t_e_r_f_a_c_e(), │ │ │ │ │ +_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e,_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n ); │ │ │ │ │ +366 } │ │ │ │ │ +367 } │ │ │ │ │ +368 │ │ │ │ │ +_3_6_9 void _l_o_a_d_B_a_l_a_n_c_e () │ │ │ │ │ +370 { │ │ │ │ │ +371 if( _g_r_i_d_P_t_r__->comm().size() > 1 ) │ │ │ │ │ +372 { │ │ │ │ │ +373 _D_a_t_a_H_a_n_d_l_e dh(*this); │ │ │ │ │ +374 _g_r_i_d_P_t_r__->loadBalance( dh._i_n_t_e_r_f_a_c_e() ); │ │ │ │ │ +375 _g_r_i_d_P_t_r__->levelGridView( 0 ).communicate( dh._i_n_t_e_r_f_a_c_e(), │ │ │ │ │ +_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e,_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n ); │ │ │ │ │ +376 } │ │ │ │ │ +377 } │ │ │ │ │ +378 │ │ │ │ │ +379 protected: │ │ │ │ │ +380 template< class Range > │ │ │ │ │ +_3_8_1 static bool _i_s_E_m_p_t_y ( Range &&range ) │ │ │ │ │ +382 { │ │ │ │ │ +383 return range.begin() == range.end(); │ │ │ │ │ +384 } │ │ │ │ │ +385 │ │ │ │ │ +_3_8_6 void _i_n_i_t_i_a_l_i_z_e ( _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_T_y_p_e_ _> &dgfFactory ) │ │ │ │ │ +387 { │ │ │ │ │ +388 _g_r_i_d_P_t_r__ = _m_y_g_r_i_d___p_t_r( dgfFactory._g_r_i_d() ); │ │ │ │ │ +389 │ │ │ │ │ +390 const auto gridView = _g_r_i_d_P_t_r__->levelGridView( 0 ); │ │ │ │ │ +391 const auto &indexSet = gridView.indexSet(); │ │ │ │ │ +392 │ │ │ │ │ +393 _n_o_f_E_l_P_a_r_a_m__ = dgfFactory.template numParameters< 0 >(); │ │ │ │ │ +394 _n_o_f_V_t_x_P_a_r_a_m__ = dgfFactory.template numParameters< dimension >(); │ │ │ │ │ +395 _h_a_v_e_B_n_d_P_a_r_a_m__ = dgfFactory._h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s(); │ │ │ │ │ +396 │ │ │ │ │ +397 std::array< int, 3 > nofParams = {{ _n_o_f_E_l_P_a_r_a_m__, _n_o_f_V_t_x_P_a_r_a_m__, static_cast< │ │ │ │ │ +int >( _h_a_v_e_B_n_d_P_a_r_a_m__ ) }}; │ │ │ │ │ +398 gridView.comm().max( nofParams.data(), nofParams.size() ); │ │ │ │ │ +399 │ │ │ │ │ +400 // empty grids have no parameters associated │ │ │ │ │ +401 if( _i_s_E_m_p_t_y( elements( gridView, _P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r_B_o_r_d_e_r ) ) ) │ │ │ │ │ +402 { │ │ │ │ │ +403 _n_o_f_E_l_P_a_r_a_m__ = nofParams[ 0 ]; │ │ │ │ │ +404 _n_o_f_V_t_x_P_a_r_a_m__ = nofParams[ 1 ]; │ │ │ │ │ +405 } │ │ │ │ │ +406 │ │ │ │ │ +407 // boundary parameters may be empty │ │ │ │ │ +408 _h_a_v_e_B_n_d_P_a_r_a_m__ = static_cast< bool >( nofParams[ 2 ] ); │ │ │ │ │ +409 │ │ │ │ │ +410 if( (_n_o_f_E_l_P_a_r_a_m__ != nofParams[ 0 ]) || (_n_o_f_V_t_x_P_a_r_a_m__ != nofParams[ 1 ]) ) │ │ │ │ │ +411 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Number of parameters differs between processes" │ │ │ │ │ +); │ │ │ │ │ +412 │ │ │ │ │ +413 _e_l_P_a_r_a_m__.resize( _n_o_f_E_l_P_a_r_a_m__ > 0 ? indexSet.size( 0 ) : 0 ); │ │ │ │ │ +414 _v_t_x_P_a_r_a_m__.resize( _n_o_f_V_t_x_P_a_r_a_m__ > 0 ? indexSet.size( _d_i_m_e_n_s_i_o_n ) : 0 ); │ │ │ │ │ +415 │ │ │ │ │ +416 _b_n_d_I_d__.resize( indexSet.size( 1 ) ); │ │ │ │ │ +417 if( _h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +418 _b_n_d_P_a_r_a_m__.resize( _g_r_i_d_P_t_r__->numBoundarySegments() ); │ │ │ │ │ +419 │ │ │ │ │ +420 for( const auto &element : elements( gridView, _P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r_B_o_r_d_e_r ) │ │ │ │ │ ) │ │ │ │ │ -104 { │ │ │ │ │ -105 return os << "block " << b.identifier << " (line " << b.pos << ")"; │ │ │ │ │ -106 } │ │ │ │ │ -107 │ │ │ │ │ -108 }; │ │ │ │ │ -109 │ │ │ │ │ -110 } // end namespace dgf │ │ │ │ │ -111 │ │ │ │ │ -112} // end namespace Dune │ │ │ │ │ -113 │ │ │ │ │ -114#endif │ │ │ │ │ +421 { │ │ │ │ │ +422 if( _n_o_f_E_l_P_a_r_a_m__ > 0 ) │ │ │ │ │ +423 { │ │ │ │ │ +424 _s_t_d_:_:_s_w_a_p( _e_l_P_a_r_a_m__[ indexSet.index( element ) ], dgfFactory._p_a_r_a_m_e_t_e_r │ │ │ │ │ +( element ) ); │ │ │ │ │ +425 assert( _e_l_P_a_r_a_m__[ indexSet.index( element ) ].size() == static_cast< std:: │ │ │ │ │ +size_t >( _n_o_f_E_l_P_a_r_a_m__ ) ); │ │ │ │ │ +426 } │ │ │ │ │ +427 │ │ │ │ │ +428 if( _n_o_f_V_t_x_P_a_r_a_m__ > 0 ) │ │ │ │ │ +429 { │ │ │ │ │ +430 for( unsigned int v = 0, n = element.subEntities( _d_i_m_e_n_s_i_o_n ); v < n; ++v ) │ │ │ │ │ +431 { │ │ │ │ │ +432 const auto index = indexSet.subIndex( element, v, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +433 if( _v_t_x_P_a_r_a_m__[ index ].empty() ) │ │ │ │ │ +434 _s_t_d_:_:_s_w_a_p( _v_t_x_P_a_r_a_m__[ index ], dgfFactory._p_a_r_a_m_e_t_e_r( element.template │ │ │ │ │ +subEntity< dimension >( v ) ) ); │ │ │ │ │ +435 assert( _v_t_x_P_a_r_a_m__[ index ].size() == static_cast< std::size_t > │ │ │ │ │ +( _n_o_f_V_t_x_P_a_r_a_m__ ) ); │ │ │ │ │ +436 } │ │ │ │ │ +437 } │ │ │ │ │ +438 │ │ │ │ │ +439 if( element.hasBoundaryIntersections() ) │ │ │ │ │ +440 { │ │ │ │ │ +441 for( const auto &intersection : intersections( gridView, element ) ) │ │ │ │ │ +442 { │ │ │ │ │ +443 // dirty hack: check for "none" to make corner point grid work │ │ │ │ │ +444 if( !intersection.boundary() || intersection.type().isNone() ) │ │ │ │ │ +445 continue; │ │ │ │ │ +446 │ │ │ │ │ +447 const auto k = indexSet.subIndex( element, intersection.indexInInside(), 1 │ │ │ │ │ +); │ │ │ │ │ +448 _b_n_d_I_d__[ k ] = dgfFactory._b_o_u_n_d_a_r_y_I_d( intersection ); │ │ │ │ │ +449 if( _h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +450 _b_n_d_P_a_r_a_m__[ intersection.boundarySegmentIndex() ] = │ │ │ │ │ +dgfFactory._b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r( intersection ); │ │ │ │ │ +451 } │ │ │ │ │ +452 } │ │ │ │ │ +453 } │ │ │ │ │ +454 } │ │ │ │ │ +455 │ │ │ │ │ +_4_5_6 void _i_n_i_t_i_a_l_i_z_e ( _G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_T_y_p_e_ _> &factory, │ │ │ │ │ +457 std::vector& boundaryIds, │ │ │ │ │ +458 std::vector& elementIds ) │ │ │ │ │ +459 { │ │ │ │ │ +460 _g_r_i_d_P_t_r__ = _m_y_g_r_i_d___p_t_r( factory._c_r_e_a_t_e_G_r_i_d().release() ); │ │ │ │ │ +461 │ │ │ │ │ +462 const auto& gridView = _g_r_i_d_P_t_r__->leafGridView(); │ │ │ │ │ +463 const auto& indexSet = gridView.indexSet(); │ │ │ │ │ +464 │ │ │ │ │ +465 _n_o_f_E_l_P_a_r_a_m__ = elementIds.empty() ? 0 : 1 ; │ │ │ │ │ +466 _n_o_f_V_t_x_P_a_r_a_m__ = 0; │ │ │ │ │ +467 _h_a_v_e_B_n_d_P_a_r_a_m__ = boundaryIds.empty() ? 0 : 1 ; │ │ │ │ │ +468 │ │ │ │ │ +469 std::array< int, 3 > nofParams = {{ _n_o_f_E_l_P_a_r_a_m__, _n_o_f_V_t_x_P_a_r_a_m__, static_cast< │ │ │ │ │ +int >( _h_a_v_e_B_n_d_P_a_r_a_m__ ) }}; │ │ │ │ │ +470 gridView.comm().max( nofParams.data(), nofParams.size() ); │ │ │ │ │ +471 │ │ │ │ │ +472 // empty grids have no parameters associated │ │ │ │ │ +473 if( _i_s_E_m_p_t_y( elements( gridView, _P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r_B_o_r_d_e_r ) ) ) │ │ │ │ │ +474 { │ │ │ │ │ +475 _n_o_f_E_l_P_a_r_a_m__ = nofParams[ 0 ]; │ │ │ │ │ +476 } │ │ │ │ │ +477 │ │ │ │ │ +478 // boundary parameters may be empty │ │ │ │ │ +479 _h_a_v_e_B_n_d_P_a_r_a_m__ = static_cast< bool >( nofParams[ 2 ] ); │ │ │ │ │ +480 │ │ │ │ │ +481 // Reorder boundary IDs according to the insertion index │ │ │ │ │ +482 if(!boundaryIds.empty() || !elementIds.empty() ) │ │ │ │ │ +483 { │ │ │ │ │ +484 _b_n_d_P_a_r_a_m__.resize( boundaryIds.size() ); │ │ │ │ │ +485 _e_l_P_a_r_a_m__.resize( elementIds.size(), std::vector(1) ); │ │ │ │ │ +486 for(const auto& entity : elements( gridView )) │ │ │ │ │ +487 { │ │ │ │ │ +488 _e_l_P_a_r_a_m__[ indexSet.index( entity ) ][ 0 ] = elementIds │ │ │ │ │ +[ factory._i_n_s_e_r_t_i_o_n_I_n_d_e_x( entity ) ]; │ │ │ │ │ +489 if( _h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +490 { │ │ │ │ │ +491 for(const auto& intersection : intersections( gridView,entity) ) │ │ │ │ │ +492 { │ │ │ │ │ +493 if(intersection.boundary()) │ │ │ │ │ +494 { │ │ │ │ │ +495 // DGFBoundaryParameter::type is of type string. │ │ │ │ │ +496 _b_n_d_P_a_r_a_m__[intersection.boundarySegmentIndex()] = std::to_string(boundaryIds │ │ │ │ │ +[factory._i_n_s_e_r_t_i_o_n_I_n_d_e_x(intersection)]); │ │ │ │ │ +497 } │ │ │ │ │ +498 } │ │ │ │ │ +499 } │ │ │ │ │ +500 } │ │ │ │ │ +501 } │ │ │ │ │ +502 } │ │ │ │ │ +503 │ │ │ │ │ +504 template │ │ │ │ │ +_5_0_5 std::vector< double > &_p_a_r_a_m_s ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +506 { │ │ │ │ │ +507 const auto gridView = _g_r_i_d_P_t_r__->levelGridView( 0 ); │ │ │ │ │ +508 switch( (int)_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n ) │ │ │ │ │ +509 { │ │ │ │ │ +510 case 0 : │ │ │ │ │ +511 if( _n_o_f_E_l_P_a_r_a_m__ > 0 ) { │ │ │ │ │ +512 if ( gridView.indexSet().index( entity ) >= _e_l_P_a_r_a_m__.size() ) │ │ │ │ │ +513 _e_l_P_a_r_a_m__.resize( gridView.indexSet().index( entity ) ); │ │ │ │ │ +514 return _e_l_P_a_r_a_m__[ gridView.indexSet().index( entity ) ]; │ │ │ │ │ +515 } │ │ │ │ │ +516 break; │ │ │ │ │ +517 case GridType::dimension : │ │ │ │ │ +518 if( _n_o_f_V_t_x_P_a_r_a_m__ > 0 ) { │ │ │ │ │ +519 if ( gridView.indexSet().index( entity ) >= _v_t_x_P_a_r_a_m__.size() ) │ │ │ │ │ +520 _v_t_x_P_a_r_a_m__.resize( gridView.indexSet().index( entity ) ); │ │ │ │ │ +521 return _v_t_x_P_a_r_a_m__[ gridView.indexSet().index( entity ) ]; │ │ │ │ │ +522 } │ │ │ │ │ +523 break; │ │ │ │ │ +524 } │ │ │ │ │ +525 return _e_m_p_t_y_P_a_r_a_m__; │ │ │ │ │ +526 } │ │ │ │ │ +527 │ │ │ │ │ +_5_2_8 void _s_e_t_N_o_f_P_a_r_a_m_s( int cdim, int nofP ) │ │ │ │ │ +529 { │ │ │ │ │ +530 switch (cdim) { │ │ │ │ │ +531 case 0 : _n_o_f_E_l_P_a_r_a_m__ = nofP; break; │ │ │ │ │ +532 case GridType::dimension : _n_o_f_V_t_x_P_a_r_a_m__ = nofP; break; │ │ │ │ │ +533 } │ │ │ │ │ +534 } │ │ │ │ │ +535 │ │ │ │ │ +_5_3_6 struct _D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +537 : public _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F< DataHandle, char > │ │ │ │ │ +538 { │ │ │ │ │ +_5_3_9 explicit _D_a_t_a_H_a_n_d_l_e ( _G_r_i_d_P_t_r &gridPtr ) │ │ │ │ │ +540 : gridPtr_( gridPtr ), idSet_( gridPtr->localIdSet() ) │ │ │ │ │ +541 { │ │ │ │ │ +542 const auto gridView = gridPtr_->levelGridView( 0 ); │ │ │ │ │ +543 const auto &indexSet = gridView.indexSet(); │ │ │ │ │ +544 │ │ │ │ │ +545 for( const auto &element : elements( gridView, _P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r_B_o_r_d_e_r ) │ │ │ │ │ +) │ │ │ │ │ +546 { │ │ │ │ │ +547 if( gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0 ) │ │ │ │ │ +548 _s_t_d_:_:_s_w_a_p( gridPtr_._e_l_P_a_r_a_m__[ indexSet.index( element ) ], elData_ │ │ │ │ │ +[ idSet_.id( element ) ] ); │ │ │ │ │ +549 │ │ │ │ │ +550 if( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > 0 ) │ │ │ │ │ +551 { │ │ │ │ │ +552 for( unsigned int v = 0, n = element.subEntities( _d_i_m_e_n_s_i_o_n ); v < n; ++v ) │ │ │ │ │ +553 { │ │ │ │ │ +554 const auto index = indexSet.subIndex( element, v, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +555 if ( !gridPtr_._v_t_x_P_a_r_a_m__[ index ].empty() ) │ │ │ │ │ +556 _s_t_d_:_:_s_w_a_p( gridPtr_._v_t_x_P_a_r_a_m__[ index ], vtxData_[ idSet_.subId( element, v, │ │ │ │ │ +_d_i_m_e_n_s_i_o_n ) ] ); │ │ │ │ │ +557 } │ │ │ │ │ +558 } │ │ │ │ │ +559 │ │ │ │ │ +560 if( element.hasBoundaryIntersections() ) │ │ │ │ │ +561 { │ │ │ │ │ +562 for( const auto &intersection : intersections( gridView, element ) ) │ │ │ │ │ +563 { │ │ │ │ │ +564 // dirty hack: check for "none" to make corner point grid work │ │ │ │ │ +565 if( !intersection.boundary() || intersection.type().isNone() ) │ │ │ │ │ +566 continue; │ │ │ │ │ +567 │ │ │ │ │ +568 const int i = intersection.indexInInside(); │ │ │ │ │ +569 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ]; │ │ │ │ │ +570 bndData.first = gridPtr_._b_n_d_I_d__[ indexSet.subIndex( element, i, 1 ) ]; │ │ │ │ │ +571 if( gridPtr_._h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +572 _s_t_d_:_:_s_w_a_p( bndData.second, gridPtr_._b_n_d_P_a_r_a_m__ │ │ │ │ │ +[ intersection.boundarySegmentIndex() ] ); │ │ │ │ │ +573 } │ │ │ │ │ +574 } │ │ │ │ │ +575 } │ │ │ │ │ +576 } │ │ │ │ │ +577 │ │ │ │ │ +_5_7_8 _D_a_t_a_H_a_n_d_l_e ( const _D_a_t_a_H_a_n_d_l_e & ) = delete; │ │ │ │ │ +_5_7_9 _D_a_t_a_H_a_n_d_l_e ( _D_a_t_a_H_a_n_d_l_e && ) = delete; │ │ │ │ │ +580 │ │ │ │ │ +_5_8_1 _~_D_a_t_a_H_a_n_d_l_e () │ │ │ │ │ +582 { │ │ │ │ │ +583 const auto gridView = gridPtr_->levelGridView( 0 ); │ │ │ │ │ +584 const auto &indexSet = gridView.indexSet(); │ │ │ │ │ +585 │ │ │ │ │ +586 if( gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0 ) │ │ │ │ │ +587 gridPtr_._e_l_P_a_r_a_m__.resize( indexSet.size( 0 ) ); │ │ │ │ │ +588 if( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > 0 ) │ │ │ │ │ +589 gridPtr_._v_t_x_P_a_r_a_m__.resize( indexSet.size( _d_i_m_e_n_s_i_o_n ) ); │ │ │ │ │ +590 gridPtr_._b_n_d_I_d__.resize( indexSet.size( 1 ) ); │ │ │ │ │ +591 if( gridPtr_._h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +592 gridPtr_._b_n_d_P_a_r_a_m__.resize( gridPtr_->numBoundarySegments() ); │ │ │ │ │ +593 │ │ │ │ │ +594 for( const auto &element : elements( gridView, _P_a_r_t_i_t_i_o_n_s_:_:_a_l_l ) ) │ │ │ │ │ +595 { │ │ │ │ │ +596 if( gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0 ) │ │ │ │ │ +597 { │ │ │ │ │ +598 _s_t_d_:_:_s_w_a_p( gridPtr_._e_l_P_a_r_a_m__[ indexSet.index( element ) ], elData_ │ │ │ │ │ +[ idSet_.id( element ) ] ); │ │ │ │ │ +599 assert( gridPtr_._e_l_P_a_r_a_m__[ indexSet.index( element ) ].size() == │ │ │ │ │ +static_cast< std::size_t >( gridPtr_._n_o_f_E_l_P_a_r_a_m__ ) ); │ │ │ │ │ +600 } │ │ │ │ │ +601 │ │ │ │ │ +602 if( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > 0 ) │ │ │ │ │ +603 { │ │ │ │ │ +604 for( unsigned int v = 0; v < element.subEntities( _d_i_m_e_n_s_i_o_n ); ++v ) │ │ │ │ │ +605 { │ │ │ │ │ +606 const auto index = indexSet.subIndex( element, v, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +607 if( gridPtr_._v_t_x_P_a_r_a_m__[ index ].empty() ) │ │ │ │ │ +608 _s_t_d_:_:_s_w_a_p( gridPtr_._v_t_x_P_a_r_a_m__[ index ], vtxData_[ idSet_.subId( element, v, │ │ │ │ │ +_d_i_m_e_n_s_i_o_n ) ] ); │ │ │ │ │ +609 assert( gridPtr_._v_t_x_P_a_r_a_m__[ index ].size() == static_cast< std::size_t > │ │ │ │ │ +( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ ) ); │ │ │ │ │ +610 } │ │ │ │ │ +611 } │ │ │ │ │ +612 │ │ │ │ │ +613 if( element.hasBoundaryIntersections() ) │ │ │ │ │ +614 { │ │ │ │ │ +615 for( const auto &intersection : intersections( gridView, element ) ) │ │ │ │ │ +616 { │ │ │ │ │ +617 // dirty hack: check for "none" to make corner point grid work │ │ │ │ │ +618 if( !intersection.boundary() || intersection.type().isNone() ) │ │ │ │ │ +619 continue; │ │ │ │ │ +620 │ │ │ │ │ +621 const int i = intersection.indexInInside(); │ │ │ │ │ +622 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ]; │ │ │ │ │ +623 gridPtr_._b_n_d_I_d__[ indexSet.subIndex( element, i, 1 ) ] = bndData.first; │ │ │ │ │ +624 if( gridPtr_._h_a_v_e_B_n_d_P_a_r_a_m__ ) │ │ │ │ │ +625 _s_t_d_:_:_s_w_a_p( bndData.second, gridPtr_._b_n_d_P_a_r_a_m__ │ │ │ │ │ +[ intersection.boundarySegmentIndex() ] ); │ │ │ │ │ +626 } │ │ │ │ │ +627 } │ │ │ │ │ +628 } │ │ │ │ │ +629 } │ │ │ │ │ +630 │ │ │ │ │ +631 _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_,_ _c_h_a_r_ _> &_i_n_t_e_r_f_a_c_e () { return *this; } │ │ │ │ │ +632 │ │ │ │ │ +_6_3_3 bool _c_o_n_t_a_i_n_s ( int dim, int codim ) const │ │ │ │ │ +634 { │ │ │ │ │ +635 assert( dim == _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +636 // do not use a switch statement, because dimension == 1 is possible │ │ │ │ │ +637 return (codim == 1) || ((codim == _d_i_m_e_n_s_i_o_n) && (gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > │ │ │ │ │ +0)) || ((codim == 0) && (gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0)); │ │ │ │ │ +638 } │ │ │ │ │ +639 │ │ │ │ │ +_6_4_0 bool _f_i_x_e_d_S_i_z_e (int /* dim */, int /* codim */) const { return false; } │ │ │ │ │ +641 │ │ │ │ │ +642 template< class Entity > │ │ │ │ │ +_6_4_3 std::size_t _s_i_z_e ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ +644 { │ │ │ │ │ +645 std::size_t totalSize = 0; │ │ │ │ │ +646 │ │ │ │ │ +647 // do not use a switch statement, because dimension == 1 is possible │ │ │ │ │ +648 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == 0) && (gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0) ) │ │ │ │ │ +649 { │ │ │ │ │ +650 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t > │ │ │ │ │ +( gridPtr_._n_o_f_E_l_P_a_r_a_m__ ) ); │ │ │ │ │ +651 for( double &v : elData_[ idSet_.id( entity ) ] ) │ │ │ │ │ +652 totalSize += dataSize( v ); │ │ │ │ │ +653 } │ │ │ │ │ +654 │ │ │ │ │ +655 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _d_i_m_e_n_s_i_o_n) && (gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > 0) ) │ │ │ │ │ +656 { │ │ │ │ │ +657 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t │ │ │ │ │ +>( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ ) ); │ │ │ │ │ +658 for( double &v : vtxData_[ idSet_.id( entity ) ] ) │ │ │ │ │ +659 totalSize += dataSize( v ); │ │ │ │ │ +660 } │ │ │ │ │ +661 │ │ │ │ │ +662 if( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == 1 ) │ │ │ │ │ +663 { │ │ │ │ │ +664 const auto bndData = bndData_.find( idSet_.id( entity ) ); │ │ │ │ │ +665 if( bndData != bndData_.end() ) │ │ │ │ │ +666 totalSize += dataSize( bndData->second.first ) + dataSize( bndData- │ │ │ │ │ +>second.second ); │ │ │ │ │ +667 } │ │ │ │ │ +668 │ │ │ │ │ +669 return totalSize; │ │ │ │ │ +670 } │ │ │ │ │ +671 │ │ │ │ │ +672 template< class Buffer, class Entity > │ │ │ │ │ +_6_7_3 void _g_a_t_h_e_r ( Buffer &buffer, const _E_n_t_i_t_y &entity ) const │ │ │ │ │ +674 { │ │ │ │ │ +675 // do not use a switch statement, because dimension == 1 is possible │ │ │ │ │ +676 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == 0) && (gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0) ) │ │ │ │ │ +677 { │ │ │ │ │ +678 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t > │ │ │ │ │ +( gridPtr_._n_o_f_E_l_P_a_r_a_m__ ) ); │ │ │ │ │ +679 for( double &v : elData_[ idSet_.id( entity ) ] ) │ │ │ │ │ +680 write( buffer, v ); │ │ │ │ │ +681 } │ │ │ │ │ +682 │ │ │ │ │ +683 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _d_i_m_e_n_s_i_o_n) && (gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > 0) ) │ │ │ │ │ +684 { │ │ │ │ │ +685 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t │ │ │ │ │ +>( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ ) ); │ │ │ │ │ +686 for( double &v : vtxData_[ idSet_.id( entity ) ] ) │ │ │ │ │ +687 write( buffer, v ); │ │ │ │ │ +688 } │ │ │ │ │ +689 │ │ │ │ │ +690 if( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == 1 ) │ │ │ │ │ +691 { │ │ │ │ │ +692 const auto bndData = bndData_.find( idSet_.id( entity ) ); │ │ │ │ │ +693 if( bndData != bndData_.end() ) │ │ │ │ │ +694 { │ │ │ │ │ +695 write( buffer, bndData->second.first ); │ │ │ │ │ +696 write( buffer, bndData->second.second ); │ │ │ │ │ +697 } │ │ │ │ │ +698 } │ │ │ │ │ +699 } │ │ │ │ │ +700 │ │ │ │ │ +701 template< class Buffer, class Entity > │ │ │ │ │ +_7_0_2 void _s_c_a_t_t_e_r ( Buffer &buffer, const _E_n_t_i_t_y &entity, std::size_t n ) │ │ │ │ │ +703 { │ │ │ │ │ +704 // do not use a switch statement, because dimension == 1 is possible │ │ │ │ │ +705 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == 0) && (gridPtr_._n_o_f_E_l_P_a_r_a_m__ > 0) ) │ │ │ │ │ +706 { │ │ │ │ │ +707 auto &p = elData_[ idSet_.id( entity ) ]; │ │ │ │ │ +708 p.resize( gridPtr_._n_o_f_E_l_P_a_r_a_m__ ); │ │ │ │ │ +709 for( double &v : p ) │ │ │ │ │ +710 read( buffer, v, n ); │ │ │ │ │ +711 } │ │ │ │ │ +712 │ │ │ │ │ +713 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _d_i_m_e_n_s_i_o_n) && (gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ > 0) ) │ │ │ │ │ +714 { │ │ │ │ │ +715 auto &p = vtxData_[ idSet_.id( entity ) ]; │ │ │ │ │ +716 p.resize( gridPtr_._n_o_f_V_t_x_P_a_r_a_m__ ); │ │ │ │ │ +717 for( double &v : p ) │ │ │ │ │ +718 read( buffer, v, n ); │ │ │ │ │ +719 } │ │ │ │ │ +720 │ │ │ │ │ +721 if( (_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == 1) && (n > 0) ) │ │ │ │ │ +722 { │ │ │ │ │ +723 auto &bndData = bndData_[ idSet_.id( entity ) ]; │ │ │ │ │ +724 read( buffer, bndData.first, n ); │ │ │ │ │ +725 read( buffer, bndData.second, n ); │ │ │ │ │ +726 } │ │ │ │ │ +727 │ │ │ │ │ +728 assert( n == 0 ); │ │ │ │ │ +729 } │ │ │ │ │ +730 │ │ │ │ │ +731 private: │ │ │ │ │ +732 template< class T > │ │ │ │ │ +733 static std::enable_if_t< std::is_trivially_copyable< T >::value, std:: │ │ │ │ │ +size_t > dataSize ( const T & /* value */ ) │ │ │ │ │ +734 { │ │ │ │ │ +735 return sizeof( T ); │ │ │ │ │ +736 } │ │ │ │ │ +737 │ │ │ │ │ +738 static std::size_t dataSize ( const std::string &s ) │ │ │ │ │ +739 { │ │ │ │ │ +740 return dataSize( s.size() ) + s.size(); │ │ │ │ │ +741 } │ │ │ │ │ +742 │ │ │ │ │ +743 template< class Buffer, class T > │ │ │ │ │ +744 static std::enable_if_t< std::is_trivially_copyable< T >::value > write │ │ │ │ │ +( Buffer &buffer, const T &value ) │ │ │ │ │ +745 { │ │ │ │ │ +746 std::array< char, sizeof( T ) > bytes; │ │ │ │ │ +747 std::memcpy( bytes.data(), &value, sizeof( T ) ); │ │ │ │ │ +748 for( char &b : bytes ) │ │ │ │ │ +749 buffer.write( b ); │ │ │ │ │ +750 } │ │ │ │ │ +751 │ │ │ │ │ +752 template< class Buffer > │ │ │ │ │ +753 static void write ( Buffer &buffer, const std::string &s ) │ │ │ │ │ +754 { │ │ │ │ │ +755 write( buffer, s.size() ); │ │ │ │ │ +756 for( const char &c : s ) │ │ │ │ │ +757 buffer.write( c ); │ │ │ │ │ +758 } │ │ │ │ │ +759 │ │ │ │ │ +760 template< class Buffer, class T > │ │ │ │ │ +761 static std::enable_if_t< std::is_trivially_copyable< T >::value > read │ │ │ │ │ +( Buffer &buffer, T &value, std::size_t &n ) │ │ │ │ │ +762 { │ │ │ │ │ +763 assert( n >= sizeof( T ) ); │ │ │ │ │ +764 n -= sizeof( T ); │ │ │ │ │ +765 │ │ │ │ │ +766 std::array< char, sizeof( T ) > bytes; │ │ │ │ │ +767 for( char &b : bytes ) │ │ │ │ │ +768 buffer.read( b ); │ │ │ │ │ +769 std::memcpy( &value, bytes.data(), sizeof( T ) ); │ │ │ │ │ +770 } │ │ │ │ │ +771 │ │ │ │ │ +772 template< class Buffer > │ │ │ │ │ +773 static void read ( Buffer &buffer, std::string &s, std::size_t &n ) │ │ │ │ │ +774 { │ │ │ │ │ +775 std::size_t _s_i_z_e; │ │ │ │ │ +776 read( buffer, _s_i_z_e, n ); │ │ │ │ │ +777 s.resize( _s_i_z_e ); │ │ │ │ │ +778 │ │ │ │ │ +779 assert( n >= _s_i_z_e ); │ │ │ │ │ +780 n -= _s_i_z_e; │ │ │ │ │ +781 │ │ │ │ │ +782 for( char &c : s ) │ │ │ │ │ +783 buffer.read( c ); │ │ │ │ │ +784 } │ │ │ │ │ +785 │ │ │ │ │ +786 _G_r_i_d_P_t_r &gridPtr_; │ │ │ │ │ +787 const typename GridType::LocalIdSet &idSet_; │ │ │ │ │ +788 mutable std::map< typename GridType::LocalIdSet::IdType, std::vector< │ │ │ │ │ +double > > elData_, vtxData_; │ │ │ │ │ +789 mutable std::map< typename GridType::LocalIdSet::IdType, std::pair< int, │ │ │ │ │ +DGFBoundaryParameter::type > > bndData_; │ │ │ │ │ +790 }; │ │ │ │ │ +791 │ │ │ │ │ +792 // grid auto pointer │ │ │ │ │ +_7_9_3 mutable _m_y_g_r_i_d___p_t_r _g_r_i_d_P_t_r__; │ │ │ │ │ +794 // element and vertex parameters │ │ │ │ │ +_7_9_5 std::vector< std::vector< double > > _e_l_P_a_r_a_m__; │ │ │ │ │ +_7_9_6 std::vector< std::vector< double > > _v_t_x_P_a_r_a_m__; │ │ │ │ │ +_7_9_7 std::vector< DGFBoundaryParameter::type > _b_n_d_P_a_r_a_m__; │ │ │ │ │ +_7_9_8 std::vector< int > _b_n_d_I_d__; │ │ │ │ │ +_7_9_9 std::vector< double > _e_m_p_t_y_P_a_r_a_m__; │ │ │ │ │ +800 │ │ │ │ │ +_8_0_1 int _n_o_f_E_l_P_a_r_a_m__; │ │ │ │ │ +_8_0_2 int _n_o_f_V_t_x_P_a_r_a_m__; │ │ │ │ │ +_8_0_3 bool _h_a_v_e_B_n_d_P_a_r_a_m__; │ │ │ │ │ +804 }; // end of class GridPtr │ │ │ │ │ +805 │ │ │ │ │ +806} // end namespace Dune │ │ │ │ │ +807 │ │ │ │ │ +808#endif │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ +Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ +DataHandles. │ │ │ │ │ +_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h │ │ │ │ │ +_p_a_r_t_i_t_i_o_n_s_e_t_._h_h │ │ │ │ │ _d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ _e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ +_g_m_s_h_r_e_a_d_e_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +@ ForwardCommunication │ │ │ │ │ +communicate as given in InterfaceType │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ InteriorBorder_All_Interface │ │ │ │ │ +send interior and border, receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ +const IndexSet & indexSet() const │ │ │ │ │ +obtain the index set │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:191 │ │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ │ +void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ +> &b) │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_m_a_k_e_u_p_c_a_s_e │ │ │ │ │ -void makeupcase(std ::string &s) │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ -void reset() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_l_i_n_e │ │ │ │ │ -bool getnextline() │ │ │ │ │ -DDeeffiinniittiioonn basic.cc:94 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_f_i_n_d_t_o_k_e_n │ │ │ │ │ -bool findtoken(std ::string token) │ │ │ │ │ -DDeeffiinniittiioonn basic.cc:123 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ -bool getnextentry(ENTRY &entry) │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_i_d │ │ │ │ │ -const std::string & id() const │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ -int & noflines() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b) │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_i_s_e_m_p_t_y │ │ │ │ │ -bool isempty() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_i_s_a_c_t_i_v_e │ │ │ │ │ -bool isactive() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_l_i_n_e_n_u_m_b_e_r │ │ │ │ │ -int linenumber() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_l_i_n_e │ │ │ │ │ -std::stringstream line │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_t_o_k_e_n_p_a_r_a_m │ │ │ │ │ -bool gettokenparam(std ::string token, std ::string &entry) │ │ │ │ │ -DDeeffiinniittiioonn basic.cc:104 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_s_:_:_a_l_l │ │ │ │ │ +constexpr All all │ │ │ │ │ +PartitionSet for all partitions. │ │ │ │ │ +DDeeffiinniittiioonn partitionset.hh:296 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r_B_o_r_d_e_r │ │ │ │ │ +constexpr InteriorBorder interiorBorder │ │ │ │ │ +PartitionSet for the interior and border partitions. │ │ │ │ │ +DDeeffiinniittiioonn partitionset.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ +> &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Element &element) │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ │ +index of the boundary segment within the macro grid │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ │ +CommDataHandleIF describes the features of a data handle for communication in │ │ │ │ │ +parallel runs using the... │ │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +Know your own codimension. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ +Base class for exceptions in Dune grid modules. │ │ │ │ │ +DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_:_:_i_n_s_e_r_t_i_o_n_I_n_d_e_x │ │ │ │ │ +virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) │ │ │ │ │ +const │ │ │ │ │ +obtain an element's insertion index │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +virtual std::unique_ptr< GridType > createGrid() │ │ │ │ │ +Finalize grid creation and hand over the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:372 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r │ │ │ │ │ +Class for constructing grids from DGF files. │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_G_r_i_d_P_t_r │ │ │ │ │ +GridPtr(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +constructor given a std::istream │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_p_a_r_a_m_e_t_e_r_s │ │ │ │ │ +const std::vector< double > & parameters(const Entity &entity) const │ │ │ │ │ +get parameters defined for each codim 0 und dim entity on the grid through the │ │ │ │ │ +grid file │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:325 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_G_r_i_d_P_t_r │ │ │ │ │ +GridPtr() │ │ │ │ │ +Default constructor, creating empty GridPtr. │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:217 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +const GridType & operator*() const │ │ │ │ │ +return const reference to GridType instance │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:288 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_h_a_v_e_B_n_d_P_a_r_a_m__ │ │ │ │ │ +bool haveBndParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:803 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_b_n_d_I_d__ │ │ │ │ │ +std::vector< int > bndId_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:798 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_s_e_t_N_o_f_P_a_r_a_m_s │ │ │ │ │ +void setNofParams(int cdim, int nofP) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:528 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_l_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ +void loadBalance() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:369 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_b_n_d_P_a_r_a_m__ │ │ │ │ │ +std::vector< DGFBoundaryParameter::type > bndParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:797 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_i_n_i_t_i_a_l_i_z_e │ │ │ │ │ +void initialize(GridFactory< GridType > &factory, std::vector< int > │ │ │ │ │ +&boundaryIds, std::vector< int > &elementIds) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:456 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_G_r_i_d_P_t_r │ │ │ │ │ +GridPtr(GridType *grd) │ │ │ │ │ +Constructor storing given pointer to internal auto pointer. │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:230 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_n_o_f_E_l_P_a_r_a_m__ │ │ │ │ │ +int nofElParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:801 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_p_a_r_a_m_e_t_e_r_s │ │ │ │ │ +const DGFBoundaryParameter::type & parameters(const Intersection< GridImp, │ │ │ │ │ +IntersectionImp > &intersection) const │ │ │ │ │ +get parameters for intersection │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:351 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +GridType & operator*() │ │ │ │ │ +return reference to GridType instance │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:278 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_i_s_E_m_p_t_y │ │ │ │ │ +static bool isEmpty(Range &&range) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:381 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_n_o_f_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int nofParameters(const Entity &) const │ │ │ │ │ +get parameters defined for given entity │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:311 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_G_r_i_d_P_t_r │ │ │ │ │ +GridPtr(const std::string &filename, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +constructor given the name of a DGF file │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_e_l_P_a_r_a_m__ │ │ │ │ │ +std::vector< std::vector< double > > elParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:795 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +GridPtr & operator=(const GridPtr &org) │ │ │ │ │ +assignment of grid pointer │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_n_o_f_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int nofParameters(int cdim) const │ │ │ │ │ +get number of parameters defined for a given codimension │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:301 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_n_o_f_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int nofParameters(const Intersection< GridImp, IntersectionImp > &intersection) │ │ │ │ │ +const │ │ │ │ │ +get number of parameters defined for a given intersection │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:318 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_e_m_p_t_y_P_a_r_a_m__ │ │ │ │ │ +std::vector< double > emptyParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:799 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_g_r_i_d_P_t_r__ │ │ │ │ │ +mygrid_ptr gridPtr_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:793 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_r_e_a_d_G_m_s_h │ │ │ │ │ +void readGmsh(const std::string &filename, std::integral_constant< bool, false │ │ │ │ │ +>) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_r_e_a_d_G_m_s_h │ │ │ │ │ +void readGmsh(const std::string &filename, std::integral_constant< bool, true │ │ │ │ │ +>) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_p_a_r_a_m_s │ │ │ │ │ +std::vector< double > & params(const Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:505 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_i_n_i_t_i_a_l_i_z_e │ │ │ │ │ +void initialize(DGFGridFactory< GridType > &dgfFactory) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:386 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_G_r_i_d_P_t_r │ │ │ │ │ +GridPtr(const GridPtr &org)=default │ │ │ │ │ +Copy constructor, copies internal auto pointer. │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_g_e_t_F_i_l_e_E_x_t_e_n_s_i_o_n │ │ │ │ │ +std::string getFileExtension(const std::string &filename) const │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ │ +const GridType * operator->() const │ │ │ │ │ +return const pointer to GridType instance │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:293 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +GridType * release() │ │ │ │ │ +release pointer from internal ownership │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:298 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_c_o_m_m_u_n_i_c_a_t_e │ │ │ │ │ +void communicate() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:360 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_v_t_x_P_a_r_a_m__ │ │ │ │ │ +std::vector< std::vector< double > > vtxParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:796 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ │ +GridType * operator->() │ │ │ │ │ +return pointer to GridType instance │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:283 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_n_o_f_V_t_x_P_a_r_a_m__ │ │ │ │ │ +int nofVtxParam_ │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:802 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r_:_:_m_y_g_r_i_d___p_t_r │ │ │ │ │ +mygrid_ptr(GridType *grd) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r_:_:_~_m_y_g_r_i_d___p_t_r │ │ │ │ │ +~mygrid_ptr() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +GridType * release() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r_:_:_m_y_g_r_i_d___p_t_r │ │ │ │ │ +mygrid_ptr(const mygrid_ptr &other) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +mygrid_ptr & operator=(const mygrid_ptr &other) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_m_y_g_r_i_d___p_t_r_:_:_m_y_g_r_i_d___p_t_r │ │ │ │ │ +mygrid_ptr() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:538 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_i_n_t_e_r_f_a_c_e │ │ │ │ │ +CommDataHandleIF< DataHandle, char > & interface() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:631 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +DataHandle(const DataHandle &)=delete │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_~_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +~DataHandle() │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:581 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +DataHandle(GridPtr &gridPtr) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:539 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_g_a_t_h_e_r │ │ │ │ │ +void gather(Buffer &buffer, const Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:673 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_f_i_x_e_d_S_i_z_e │ │ │ │ │ +bool fixedSize(int, int) const │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:640 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(const Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:643 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +DataHandle(DataHandle &&)=delete │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_s_c_a_t_t_e_r │ │ │ │ │ +void scatter(Buffer &buffer, const Entity &entity, std::size_t n) │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:702 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_P_t_r_:_:_D_a_t_a_H_a_n_d_l_e_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(int dim, int codim) const │ │ │ │ │ +DDeeffiinniittiioonn gridptr.hh:633 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ +static const type & defaultValue() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static std::unique_ptr< Grid > read(const std::string &fileName, bool │ │ │ │ │ +verbose=true, bool insertBoundarySegments=true) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:904 │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polygon.hh File Reference │ │ │ │ +dune-grid: basic.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,37 +71,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
polygon.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
basic.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <cctype>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <sstream>
│ │ │ │ +#include <dune/common/stdstreams.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::PolygonBlock
class  Dune::dgf::BasicBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

void Dune::dgf::makeupcase (std ::string &s)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,25 +4,32 @@ │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -polygon.hh File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +basic.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +void  _D_u_n_e_:_:_d_g_f_:_:_m_a_k_e_u_p_c_a_s_e (std ::string &s) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polygon.hh Source File │ │ │ │ +dune-grid: basic.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,91 +74,168 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
polygon.hh
│ │ │ │ +
basic.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=2 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_POLYGON_HH
│ │ │ │ -
6#define DUNE_POLYGON_HH
│ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
5#ifndef DUNE_DGF_BASICBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_BASICBLOCK_HH
│ │ │ │
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/typetraits.hh>
│ │ │ │ - │ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <cctype>
│ │ │ │ +
10#include <iostream>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <sstream>
│ │ │ │
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace dgf
│ │ │ │ -
18 {
│ │ │ │ -
19
│ │ │ │ -
20 // PolygonBlock
│ │ │ │ -
21 // ------------
│ │ │ │ -
22
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 : public BasicBlock
│ │ │ │ +
14#include <dune/common/stdstreams.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
20
│ │ │ │ +
21 namespace dgf
│ │ │ │ +
22 {
│ │ │ │ +
23
│ │ │ │ +
│ │ │ │ +
24 inline void makeupcase( std :: string &s )
│ │ │ │
25 {
│ │ │ │ -
│ │ │ │ -
26 PolygonBlock ( std::istream &in, int numVtx, int vtxOfs )
│ │ │ │ -
27 : BasicBlock( in, "Polygon" ), vtxBegin_( vtxOfs ), vtxEnd_( vtxOfs + numVtx )
│ │ │ │ -
28 {}
│ │ │ │ +
26 for (size_t i=0; i<s.size(); i++)
│ │ │ │ +
27 s[i]=std::toupper(s[i]);
│ │ │ │ +
28 }
│ │ │ │
│ │ │ │
29
│ │ │ │ -
│ │ │ │ -
30 int get ( std::vector< std::vector< int > > &polygons )
│ │ │ │ -
31 {
│ │ │ │ -
32 reset();
│ │ │ │ -
33 std::vector< int > polygon;
│ │ │ │ -
34 while( getnextline() )
│ │ │ │ -
35 {
│ │ │ │ -
36 polygon.clear();
│ │ │ │ -
37 for( int vtxIdx; getnextentry( vtxIdx ); )
│ │ │ │ -
38 {
│ │ │ │ -
39 if( (vtxBegin_ > vtxIdx) || (vtxIdx >= vtxEnd_) )
│ │ │ │ -
40 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid vertex index (" << vtxIdx << " not int [" << vtxBegin_ << ", " << vtxEnd_ << "[)" );
│ │ │ │ -
41 polygon.push_back( vtxIdx - vtxBegin_ );
│ │ │ │ -
42 }
│ │ │ │ -
43
│ │ │ │ -
44 polygons.push_back( polygon );
│ │ │ │ -
45 }
│ │ │ │ -
46 return polygons.size();
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49 protected:
│ │ │ │ - │ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
53 } // namespace dgf
│ │ │ │ -
54} // end namespace Dune
│ │ │ │ -
55
│ │ │ │ -
56#endif // #ifndef DUNE_POLYGON_HH
│ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 int pos; // line number
│ │ │ │ +
33 bool active; // block was found
│ │ │ │ +
34 bool empty; // block was found but was empty
│ │ │ │ +
35 std::string identifier; // identifier of this block
│ │ │ │ +
36 int linecount; // total number of lines in the block
│ │ │ │ +
37 std::stringstream block_; // the block itself
│ │ │ │ +
38 std::string oneline; // the active line in the block
│ │ │ │ +
39
│ │ │ │ +
40 // get the block (if it exists)
│ │ │ │ +
41 void getblock ( std::istream &in );
│ │ │ │ +
42
│ │ │ │ +
43 // count the number of lines in the block
│ │ │ │ +
44 // int countlines ();
│ │ │ │ +
45
│ │ │ │ +
46 protected:
│ │ │ │ +
47 std::stringstream line; // the active line as string buffer
│ │ │ │ +
48 // for use in the derived classes
│ │ │ │ +
49
│ │ │ │ +
50 // go back to beginning of block
│ │ │ │ +
│ │ │ │ +
51 void reset ()
│ │ │ │ +
52 {
│ │ │ │ +
53 pos = -1;
│ │ │ │ +
54 block_.clear();
│ │ │ │ +
55 block_.seekg( 0 );
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 // get next line and store in string stream
│ │ │ │ +
59 bool getnextline ();
│ │ │ │ +
60
│ │ │ │ +
61 // get next entry in line
│ │ │ │ +
62 template< class ENTRY >
│ │ │ │ +
│ │ │ │ +
63 bool getnextentry( ENTRY &entry )
│ │ │ │ +
64 {
│ │ │ │ +
65 line >> entry;
│ │ │ │ +
66 return static_cast< bool >( line );
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
69 bool gettokenparam ( std :: string token, std :: string &entry );
│ │ │ │ +
70 bool findtoken( std :: string token );
│ │ │ │ +
71
│ │ │ │ +
72 public:
│ │ │ │ +
73 // search for block in file and store in buffer
│ │ │ │ +
74 BasicBlock ( std::istream &in, const char* id );
│ │ │ │ +
75
│ │ │ │ +
76 // some information on this block
│ │ │ │ +
│ │ │ │ +
77 bool isactive ()
│ │ │ │ +
78 {
│ │ │ │ +
79 return active;
│ │ │ │ +
80 }
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
82 bool isempty ()
│ │ │ │ +
83 {
│ │ │ │ +
84 return empty;
│ │ │ │ +
85 }
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
│ │ │ │ +
87 int &noflines ()
│ │ │ │ +
88 {
│ │ │ │ +
89 return linecount;
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
93 {
│ │ │ │ +
94 return pos;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ +
97 const std::string & id () const
│ │ │ │ +
98 {
│ │ │ │ +
99 return identifier;
│ │ │ │ +
100 }
│ │ │ │ +
│ │ │ │ +
101
│ │ │ │ +
102 // for error messages
│ │ │ │ +
│ │ │ │ +
103 friend std :: ostream &operator<< ( std :: ostream &os, const BasicBlock &b )
│ │ │ │ +
104 {
│ │ │ │ +
105 return os << "block " << b.identifier << " (line " << b.pos << ")";
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
108 };
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
110 } // end namespace dgf
│ │ │ │ +
111
│ │ │ │ +
112} // end namespace Dune
│ │ │ │ +
113
│ │ │ │ +
114#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
void makeupcase(std ::string &s)
Definition basic.hh:24
│ │ │ │
Definition basic.hh:31
│ │ │ │
void reset()
Definition basic.hh:51
│ │ │ │
bool getnextline()
Definition basic.cc:94
│ │ │ │ +
bool findtoken(std ::string token)
Definition basic.cc:123
│ │ │ │
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ -
Definition polygon.hh:25
│ │ │ │ -
PolygonBlock(std::istream &in, int numVtx, int vtxOfs)
Definition polygon.hh:26
│ │ │ │ -
int get(std::vector< std::vector< int > > &polygons)
Definition polygon.hh:30
│ │ │ │ -
int vtxEnd_
Definition polygon.hh:50
│ │ │ │ -
int vtxBegin_
Definition polygon.hh:50
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
const std::string & id() const
Definition basic.hh:97
│ │ │ │ +
int & noflines()
Definition basic.hh:87
│ │ │ │ +
friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b)
Definition basic.hh:103
│ │ │ │ +
bool isempty()
Definition basic.hh:82
│ │ │ │ +
bool isactive()
Definition basic.hh:77
│ │ │ │ +
int linenumber()
Definition basic.hh:92
│ │ │ │ +
std::stringstream line
Definition basic.hh:47
│ │ │ │ +
bool gettokenparam(std ::string token, std ::string &entry)
Definition basic.cc:104
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,102 +4,173 @@ │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ -polygon.hh │ │ │ │ │ +basic.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=2 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_POLYGON_HH │ │ │ │ │ -6#define DUNE_POLYGON_HH │ │ │ │ │ +3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ +5#ifndef DUNE_DGF_BASICBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_BASICBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 namespace dgf │ │ │ │ │ -18 { │ │ │ │ │ -19 │ │ │ │ │ -20 // PolygonBlock │ │ │ │ │ -21 // ------------ │ │ │ │ │ -22 │ │ │ │ │ -_2_3 struct _P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ -24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +14#include │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +20 │ │ │ │ │ +21 namespace dgf │ │ │ │ │ +22 { │ │ │ │ │ +23 │ │ │ │ │ +_2_4 inline void _m_a_k_e_u_p_c_a_s_e( std :: string &s ) │ │ │ │ │ 25 { │ │ │ │ │ -_2_6 _P_o_l_y_g_o_n_B_l_o_c_k ( std::istream &in, int numVtx, int vtxOfs ) │ │ │ │ │ -27 : _B_a_s_i_c_B_l_o_c_k( in, "Polygon" ), _v_t_x_B_e_g_i_n__( vtxOfs ), _v_t_x_E_n_d__( vtxOfs + numVtx │ │ │ │ │ -) │ │ │ │ │ -28 {} │ │ │ │ │ +26 for (size_t i=0; i > &polygons ) │ │ │ │ │ +_3_0 class _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ 31 { │ │ │ │ │ -32 _r_e_s_e_t(); │ │ │ │ │ -33 std::vector< int > polygon; │ │ │ │ │ -34 while( _g_e_t_n_e_x_t_l_i_n_e() ) │ │ │ │ │ -35 { │ │ │ │ │ -36 polygon.clear(); │ │ │ │ │ -37 for( int vtxIdx; _g_e_t_n_e_x_t_e_n_t_r_y( vtxIdx ); ) │ │ │ │ │ -38 { │ │ │ │ │ -39 if( (_v_t_x_B_e_g_i_n__ > vtxIdx) || (vtxIdx >= _v_t_x_E_n_d__) ) │ │ │ │ │ -40 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error in " << *this << ": Invalid vertex index (" │ │ │ │ │ -<< vtxIdx << " not int [" << _v_t_x_B_e_g_i_n__ << ", " << _v_t_x_E_n_d__ << "[)" ); │ │ │ │ │ -41 polygon.push_back( vtxIdx - _v_t_x_B_e_g_i_n__ ); │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -44 polygons.push_back( polygon ); │ │ │ │ │ -45 } │ │ │ │ │ -46 return polygons.size(); │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -49 protected: │ │ │ │ │ -_5_0 int _v_t_x_B_e_g_i_n__, _v_t_x_E_n_d__; │ │ │ │ │ -51 }; │ │ │ │ │ -52 │ │ │ │ │ -53 } // namespace dgf │ │ │ │ │ -54} // end namespace Dune │ │ │ │ │ -55 │ │ │ │ │ -56#endif // #ifndef DUNE_POLYGON_HH │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +32 int pos; // line number │ │ │ │ │ +33 bool active; // block was found │ │ │ │ │ +34 bool empty; // block was found but was empty │ │ │ │ │ +35 std::string identifier; // identifier of this block │ │ │ │ │ +36 int linecount; // total number of lines in the block │ │ │ │ │ +37 std::stringstream block_; // the block itself │ │ │ │ │ +38 std::string oneline; // the active line in the block │ │ │ │ │ +39 │ │ │ │ │ +40 // get the block (if it exists) │ │ │ │ │ +41 void getblock ( std::istream &in ); │ │ │ │ │ +42 │ │ │ │ │ +43 // count the number of lines in the block │ │ │ │ │ +44 // int countlines (); │ │ │ │ │ +45 │ │ │ │ │ +46 protected: │ │ │ │ │ +_4_7 std::stringstream _l_i_n_e; // the active line as string buffer │ │ │ │ │ +48 // for use in the derived classes │ │ │ │ │ +49 │ │ │ │ │ +50 // go back to beginning of block │ │ │ │ │ +_5_1 void _r_e_s_e_t () │ │ │ │ │ +52 { │ │ │ │ │ +53 pos = -1; │ │ │ │ │ +54 block_.clear(); │ │ │ │ │ +55 block_.seekg( 0 ); │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +58 // get next line and store in string stream │ │ │ │ │ +59 bool _g_e_t_n_e_x_t_l_i_n_e (); │ │ │ │ │ +60 │ │ │ │ │ +61 // get next entry in line │ │ │ │ │ +62 template< class ENTRY > │ │ │ │ │ +_6_3 bool _g_e_t_n_e_x_t_e_n_t_r_y( ENTRY &entry ) │ │ │ │ │ +64 { │ │ │ │ │ +65 _l_i_n_e >> entry; │ │ │ │ │ +66 return static_cast< bool >( _l_i_n_e ); │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +69 bool _g_e_t_t_o_k_e_n_p_a_r_a_m ( std :: string token, std :: string &entry ); │ │ │ │ │ +70 bool _f_i_n_d_t_o_k_e_n( std :: string token ); │ │ │ │ │ +71 │ │ │ │ │ +72 public: │ │ │ │ │ +73 // search for block in file and store in buffer │ │ │ │ │ +74 _B_a_s_i_c_B_l_o_c_k ( std::istream &in, const char* id ); │ │ │ │ │ +75 │ │ │ │ │ +76 // some information on this block │ │ │ │ │ +_7_7 bool _i_s_a_c_t_i_v_e () │ │ │ │ │ +78 { │ │ │ │ │ +79 return active; │ │ │ │ │ +80 } │ │ │ │ │ +81 │ │ │ │ │ +_8_2 bool _i_s_e_m_p_t_y () │ │ │ │ │ +83 { │ │ │ │ │ +84 return empty; │ │ │ │ │ +85 } │ │ │ │ │ +86 │ │ │ │ │ +_8_7 int &_n_o_f_l_i_n_e_s () │ │ │ │ │ +88 { │ │ │ │ │ +89 return linecount; │ │ │ │ │ +90 } │ │ │ │ │ +91 │ │ │ │ │ +_9_2 int _l_i_n_e_n_u_m_b_e_r () │ │ │ │ │ +93 { │ │ │ │ │ +94 return pos; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +_9_7 const std::string & _i_d () const │ │ │ │ │ +98 { │ │ │ │ │ +99 return identifier; │ │ │ │ │ +100 } │ │ │ │ │ +101 │ │ │ │ │ +102 // for error messages │ │ │ │ │ +_1_0_3 friend std :: ostream &_o_p_e_r_a_t_o_r_<_<_ ( std :: ostream &os, const _B_a_s_i_c_B_l_o_c_k &b │ │ │ │ │ +) │ │ │ │ │ +104 { │ │ │ │ │ +105 return os << "block " << b.identifier << " (line " << b.pos << ")"; │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +108 }; │ │ │ │ │ +109 │ │ │ │ │ +110 } // end namespace dgf │ │ │ │ │ +111 │ │ │ │ │ +112} // end namespace Dune │ │ │ │ │ +113 │ │ │ │ │ +114#endif │ │ │ │ │ +_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ +_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_m_a_k_e_u_p_c_a_s_e │ │ │ │ │ +void makeupcase(std ::string &s) │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:24 │ │ │ │ │ _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ void reset() │ │ │ │ │ DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_l_i_n_e │ │ │ │ │ bool getnextline() │ │ │ │ │ DDeeffiinniittiioonn basic.cc:94 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_f_i_n_d_t_o_k_e_n │ │ │ │ │ +bool findtoken(std ::string token) │ │ │ │ │ +DDeeffiinniittiioonn basic.cc:123 │ │ │ │ │ _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ bool getnextentry(ENTRY &entry) │ │ │ │ │ DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn polygon.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ -PolygonBlock(std::istream &in, int numVtx, int vtxOfs) │ │ │ │ │ -DDeeffiinniittiioonn polygon.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ -int get(std::vector< std::vector< int > > &polygons) │ │ │ │ │ -DDeeffiinniittiioonn polygon.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_v_t_x_E_n_d__ │ │ │ │ │ -int vtxEnd_ │ │ │ │ │ -DDeeffiinniittiioonn polygon.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_v_t_x_B_e_g_i_n__ │ │ │ │ │ -int vtxBegin_ │ │ │ │ │ -DDeeffiinniittiioonn polygon.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -exception class for IO errors in the DGF parser │ │ │ │ │ -DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_i_d │ │ │ │ │ +const std::string & id() const │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ +int & noflines() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b) │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_i_s_e_m_p_t_y │ │ │ │ │ +bool isempty() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_i_s_a_c_t_i_v_e │ │ │ │ │ +bool isactive() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:77 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_l_i_n_e_n_u_m_b_e_r │ │ │ │ │ +int linenumber() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_l_i_n_e │ │ │ │ │ +std::stringstream line │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_t_o_k_e_n_p_a_r_a_m │ │ │ │ │ +bool gettokenparam(std ::string token, std ::string &entry) │ │ │ │ │ +DDeeffiinniittiioonn basic.cc:104 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: general.cc File Reference │ │ │ │ +dune-grid: boundarydom.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,21 +70,36 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
general.cc File Reference
│ │ │ │ +
boundarydom.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/general.hh>
│ │ │ │ -
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::dgf::DomainData
 
struct  Dune::dgf::Domain
 
class  Dune::dgf::BoundaryDomBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,18 +4,29 @@ │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -general.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_g_e_n_e_r_a_l_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +boundarydom.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryseg.cc File Reference │ │ │ │ +dune-grid: gridparameter.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,19 +71,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
boundaryseg.cc File Reference
│ │ │ │ +
gridparameter.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,17 +5,17 @@ │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundaryseg.cc File Reference │ │ │ │ │ +gridparameter.cc File Reference │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_o_u_n_d_a_r_y_s_e_g_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarydom.hh File Reference │ │ │ │ +dune-grid: vertex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundarydom.hh File Reference
│ │ │ │ +
vertex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::dgf::DomainData
 
struct  Dune::dgf::Domain
 
class  Dune::dgf::BoundaryDomBlock
class  Dune::dgf::VertexBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,27 +5,21 @@ │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundarydom.hh File Reference │ │ │ │ │ +vertex.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarydom.hh Source File │ │ │ │ +dune-grid: vertex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,415 +74,89 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundarydom.hh
│ │ │ │ +
vertex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ │ -
6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ │ +
5#ifndef DUNE_DGF_VERTEXBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_VERTEXBLOCK_HH
│ │ │ │
7
│ │ │ │
8#include <iostream>
│ │ │ │ -
9#include <string>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ +
16 namespace dgf
│ │ │ │ +
17 {
│ │ │ │
18
│ │ │ │ -
19 namespace dgf
│ │ │ │ -
20 {
│ │ │ │ -
21
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ - │ │ │ │ -
25
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 : id_( 0 ),
│ │ │ │ -
28 parameter_( DGFBoundaryParameter::defaultValue() ),
│ │ │ │ -
29 defaultData_( false )
│ │ │ │ -
30 { }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
20 : public BasicBlock
│ │ │ │ +
21 {
│ │ │ │ +
22 int dimvertex; // the dimension of the vertices (determined from DGF file)
│ │ │ │ +
23 int dimworld; // the dimension of the world (either dimvertex or given by user)
│ │ │ │ +
24 bool goodline; // active line describes a vertex
│ │ │ │ +
25 int vtxoffset;
│ │ │ │ +
26 int nofParam;
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
29 // initialize vertex block
│ │ │ │ +
30 VertexBlock ( std :: istream &in, int &pdimworld );
│ │ │ │
31
│ │ │ │ - │ │ │ │ -
33
│ │ │ │ -
34 // constructor
│ │ │ │ -
│ │ │ │ -
35 DomainData ( int id, BoundaryParameter parameter, bool defaultData = false )
│ │ │ │ -
36 : id_( id ),
│ │ │ │ -
37 parameter_( parameter ),
│ │ │ │ -
38 defaultData_( defaultData )
│ │ │ │ -
39 { }
│ │ │ │ +
32 int get ( std :: vector< std :: vector< double > > &vtx,
│ │ │ │ +
33 std :: vector< std :: vector< double > > &param,
│ │ │ │ +
34 int &nofp );
│ │ │ │ +
35
│ │ │ │ +
36 // some information
│ │ │ │ +
│ │ │ │ +
37 bool ok () const
│ │ │ │ +
38 {
│ │ │ │ +
39 return goodline;
│ │ │ │ +
40 }
│ │ │ │
│ │ │ │ -
40
│ │ │ │ -
41 // return id
│ │ │ │ +
41
│ │ │ │
│ │ │ │ -
42 int id () const
│ │ │ │ +
42 int offset () const
│ │ │ │
43 {
│ │ │ │ -
44 return id_;
│ │ │ │ +
44 return vtxoffset;
│ │ │ │
45 }
│ │ │ │
│ │ │ │
46
│ │ │ │ -
47 // return true, if additional parameters given
│ │ │ │ -
│ │ │ │ -
48 bool hasParameter () const
│ │ │ │ -
49 {
│ │ │ │ -
50 return (!parameter_.empty());
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
53 // return additional parameters
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 {
│ │ │ │ -
56 return parameter_;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ +
47 private:
│ │ │ │ +
48 // get dimworld
│ │ │ │ +
49 int getDimWorld ();
│ │ │ │ +
50
│ │ │ │ +
51 // get next vertex
│ │ │ │ +
52 bool next ( std :: vector< double > &point, std :: vector< double > &param );
│ │ │ │ +
53 };
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55 } // end namespace dgf
│ │ │ │ +
56
│ │ │ │ +
57} // end namespace Dune
│ │ │ │
58
│ │ │ │ -
59 // reset data
│ │ │ │ -
│ │ │ │ -
60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )
│ │ │ │ -
61 {
│ │ │ │ -
62 id_ = id;
│ │ │ │ -
63 parameter_ = parameter;
│ │ │ │ -
64 defaultData_ = defaultData;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 // returns true if data origins from default boundary domain
│ │ │ │ -
│ │ │ │ -
68 bool isDefault () const
│ │ │ │ -
69 {
│ │ │ │ -
70 return defaultData_;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
73 friend std::ostream & operator<< ( std :: ostream & os, const DomainData & ddata )
│ │ │ │ -
74 {
│ │ │ │ -
75 os << "domain data: id = " << ddata.id();
│ │ │ │ -
76 if( ddata.hasParameter() )
│ │ │ │ -
77 os << ", parameter = " << ddata.parameter();
│ │ │ │ -
78 return os;
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81 private:
│ │ │ │ -
82 int id_;
│ │ │ │ -
83 BoundaryParameter parameter_;
│ │ │ │ -
84 bool defaultData_;
│ │ │ │ -
85
│ │ │ │ -
86 }; // end struct DomainData
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ -
89 struct Domain
│ │ │ │ -
90 {
│ │ │ │ -
91 // dimension of world coordinates
│ │ │ │ -
92 const int dimensionworld;
│ │ │ │ -
93
│ │ │ │ - │ │ │ │ -
95
│ │ │ │ -
96 // constructor
│ │ │ │ -
│ │ │ │ -
97 Domain( std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter & parameter )
│ │ │ │ -
98 : dimensionworld( p1.size() ),
│ │ │ │ -
99 left_( p1 ),
│ │ │ │ -
100 right_( p2 ),
│ │ │ │ -
101 data_( id, parameter )
│ │ │ │ -
102 {
│ │ │ │ -
103 if( int( p2.size() ) != dimensionworld )
│ │ │ │ -
104 {
│ │ │ │ -
105 DUNE_THROW(DGFException,
│ │ │ │ -
106 "ERROR in " << *this << "!");
│ │ │ │ -
107 }
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
110 // constructor
│ │ │ │ -
│ │ │ │ -
111 Domain( std::vector< double > p1, std::vector< double > p2, DomainData & data )
│ │ │ │ -
112 : dimensionworld( p1.size() ),
│ │ │ │ -
113 left_( p1 ),
│ │ │ │ -
114 right_( p2 ),
│ │ │ │ -
115 data_( data )
│ │ │ │ -
116 {
│ │ │ │ -
117 if( int( p2.size() ) != dimensionworld )
│ │ │ │ -
118 {
│ │ │ │ -
119 DUNE_THROW(DGFException,
│ │ │ │ -
120 "ERROR in " << *this << "!");
│ │ │ │ -
121 }
│ │ │ │ -
122 }
│ │ │ │ -
│ │ │ │ -
123
│ │ │ │ -
124 // copy constructor
│ │ │ │ -
│ │ │ │ -
125 Domain ( const Domain & other )
│ │ │ │ - │ │ │ │ -
127 left_( other.left_ ),
│ │ │ │ -
128 right_( other.right_ ),
│ │ │ │ -
129 data_( other.data_ )
│ │ │ │ -
130 {
│ │ │ │ -
131 if( dimensionworld != other.dimensionworld )
│ │ │ │ -
132 {
│ │ │ │ -
133 DUNE_THROW(DGFException,
│ │ │ │ -
134 "ERROR in " << *this << "!");
│ │ │ │ -
135 }
│ │ │ │ -
136 }
│ │ │ │ -
│ │ │ │ -
137
│ │ │ │ -
138 // assignment
│ │ │ │ -
│ │ │ │ -
139 Domain & operator = ( const Domain & other )
│ │ │ │ -
140 {
│ │ │ │ -
141 if( dimensionworld != other.dimensionworld )
│ │ │ │ -
142 {
│ │ │ │ -
143 DUNE_THROW(DGFException,
│ │ │ │ -
144 "ERROR in " << *this << "!");
│ │ │ │ -
145 }
│ │ │ │ -
146
│ │ │ │ -
147 left_ = other.left_;
│ │ │ │ -
148 right_= other.right_;
│ │ │ │ -
149 data_= other.data_;
│ │ │ │ -
150 return *this;
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
153 // return true if point is contained in boundary domain
│ │ │ │ -
154 template< class Vector >
│ │ │ │ -
│ │ │ │ -
155 bool contains ( const Vector & x ) const
│ │ │ │ -
156 {
│ │ │ │ -
157 bool ret = true;
│ │ │ │ -
158 for( int i = 0; i < dimensionworld; ++i )
│ │ │ │ -
159 {
│ │ │ │ -
160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] )
│ │ │ │ -
161 ret = false;
│ │ │ │ -
162 }
│ │ │ │ -
163 return ret;
│ │ │ │ -
164 }
│ │ │ │ -
│ │ │ │ -
165
│ │ │ │ -
│ │ │ │ -
166 const DomainData & data () const
│ │ │ │ -
167 {
│ │ │ │ -
168 return data_;
│ │ │ │ -
169 }
│ │ │ │ -
│ │ │ │ -
170
│ │ │ │ -
171 // for error messages
│ │ │ │ -
│ │ │ │ -
172 friend std::ostream & operator<< ( std :: ostream &os, const Domain & domain )
│ │ │ │ -
173 {
│ │ │ │ -
174 os << "domain: " << std::endl;
│ │ │ │ -
175 os << "left = ";
│ │ │ │ -
176 for( int i = 0; i < domain.dimensionworld; ++i )
│ │ │ │ -
177 os << domain.left_[ i ] << " ";
│ │ │ │ -
178 os << std::endl;
│ │ │ │ -
179 os << "right = ";
│ │ │ │ -
180 for( int i = 0; i < domain.dimensionworld; ++i )
│ │ │ │ -
181 os << domain.right_[ i ] << " ";
│ │ │ │ -
182 os << std::endl;
│ │ │ │ -
183 os << domain.data();
│ │ │ │ -
184 return os;
│ │ │ │ -
185 }
│ │ │ │ -
│ │ │ │ -
186
│ │ │ │ -
187 private:
│ │ │ │ -
188 std::vector< double > left_, right_;
│ │ │ │ -
189 DomainData data_;
│ │ │ │ -
190
│ │ │ │ -
191 };
│ │ │ │ -
│ │ │ │ -
192
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
194 : public BasicBlock
│ │ │ │ -
195 {
│ │ │ │ -
196 typedef DGFBoundaryParameter::type BoundaryParameter;
│ │ │ │ -
197
│ │ │ │ -
198 // the dimension of the vertices (is given from user)
│ │ │ │ -
199 int dimworld_;
│ │ │ │ -
200
│ │ │ │ -
201 // internal counter
│ │ │ │ -
202 int counter_;
│ │ │ │ -
203
│ │ │ │ -
204 // default values if given
│ │ │ │ -
205 DomainData * default_;
│ │ │ │ -
206
│ │ │ │ -
207 // storage for all domains;
│ │ │ │ -
208 int ndomains_;
│ │ │ │ -
209 std::vector< Domain > domains_;
│ │ │ │ -
210
│ │ │ │ -
211 public:
│ │ │ │ -
212 // initialize vertex block and get first vertex
│ │ │ │ -
213 BoundaryDomBlock ( std::istream & in, int cdimworld );
│ │ │ │ -
214
│ │ │ │ -
215 // destructor
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
217 {
│ │ │ │ -
218 if( default_ )
│ │ │ │ -
219 delete default_;
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
222 // go to next domain in block
│ │ │ │ -
│ │ │ │ -
223 bool next ()
│ │ │ │ -
224 {
│ │ │ │ -
225 counter_++;
│ │ │ │ -
226 return ( counter_ < ndomains_ );
│ │ │ │ -
227 }
│ │ │ │ -
│ │ │ │ -
228
│ │ │ │ -
229 // return domain
│ │ │ │ -
│ │ │ │ -
230 const Domain & domain () const
│ │ │ │ -
231 {
│ │ │ │ -
232 return domains_.at( counter_ );
│ │ │ │ -
233 }
│ │ │ │ -
│ │ │ │ -
234
│ │ │ │ -
235 // return true if default is given
│ │ │ │ -
│ │ │ │ -
236 bool hasDefaultData () const
│ │ │ │ -
237 {
│ │ │ │ -
238 return bool( default_ );
│ │ │ │ -
239 }
│ │ │ │ -
│ │ │ │ -
240
│ │ │ │ -
241 // return default data
│ │ │ │ -
│ │ │ │ -
242 const DomainData * defaultData () const
│ │ │ │ -
243 {
│ │ │ │ -
244 return default_;
│ │ │ │ -
245 }
│ │ │ │ -
│ │ │ │ -
246
│ │ │ │ -
247 // return true if any boundary domain block has
│ │ │ │ -
248 // additional parameters
│ │ │ │ -
249 bool hasParameter () const;
│ │ │ │ -
250
│ │ │ │ -
│ │ │ │ -
251 void reset ()
│ │ │ │ -
252 {
│ │ │ │ - │ │ │ │ -
254 counter_ = -1;
│ │ │ │ -
255 }
│ │ │ │ -
│ │ │ │ -
256
│ │ │ │ -
257 // return true while block is active
│ │ │ │ -
│ │ │ │ -
258 bool ok ()
│ │ │ │ -
259 {
│ │ │ │ -
260 return ( counter_ <= ndomains_ );
│ │ │ │ -
261 }
│ │ │ │ -
│ │ │ │ -
262
│ │ │ │ -
263 // return data if all vectors in array are contained within
│ │ │ │ -
264 // a single domain
│ │ │ │ -
265 template< class Vector >
│ │ │ │ -
│ │ │ │ -
266 const DomainData * contains ( const std::vector< Vector > & v ) const
│ │ │ │ -
267 {
│ │ │ │ -
268 std::vector< int > index( ndomains_ );
│ │ │ │ -
269 for( int i = 0; i < ndomains_; ++i)
│ │ │ │ -
270 index[ i ] = i;
│ │ │ │ -
271
│ │ │ │ -
272 size_t N = v.size();
│ │ │ │ -
273 for( size_t i = 0; i < N; ++i )
│ │ │ │ -
274 {
│ │ │ │ -
275 if( index.empty() )
│ │ │ │ -
276 break;
│ │ │ │ -
277
│ │ │ │ -
278 const int n = index.size();
│ │ │ │ -
279 assert( n > 0 );
│ │ │ │ -
280 for( int j = n-1; j >= 0; --j )
│ │ │ │ -
281 {
│ │ │ │ -
282 bool inside = domains_[ index[ j ] ].contains( v[ i ] );
│ │ │ │ -
283 if( !inside )
│ │ │ │ -
284 index.erase( index.begin() + j );
│ │ │ │ -
285 }
│ │ │ │ -
286 }
│ │ │ │ -
287
│ │ │ │ -
288 // check wheter no boundary domain found
│ │ │ │ -
289 if( index.empty() )
│ │ │ │ -
290 return default_;
│ │ │ │ -
291
│ │ │ │ -
292 // check for ambiguity
│ │ │ │ -
293 if( index.size() > 1 )
│ │ │ │ -
294 dwarn << "WARNING: ambiguous boundary domain assignment, use first boundary domain in list" << std::endl;
│ │ │ │ -
295
│ │ │ │ -
296 return &domains_[ index[ 0 ] ].data();
│ │ │ │ -
297 }
│ │ │ │ -
│ │ │ │ -
298
│ │ │ │ -
299 private:
│ │ │ │ -
300 void readBlock ();
│ │ │ │ -
301 };
│ │ │ │ -
│ │ │ │ -
302
│ │ │ │ -
303 } // end namespace dgf
│ │ │ │ -
304
│ │ │ │ -
305} // end namespace Dune
│ │ │ │ -
306
│ │ │ │ -
307#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
59#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Definition basic.hh:31
│ │ │ │ -
void reset()
Definition basic.hh:51
│ │ │ │ -
Definition boundarydom.hh:23
│ │ │ │ -
void reset(int id, BoundaryParameter parameter, bool defaultData=false)
Definition boundarydom.hh:60
│ │ │ │ -
~DomainData()
Definition boundarydom.hh:32
│ │ │ │ -
DGFBoundaryParameter::type BoundaryParameter
Definition boundarydom.hh:24
│ │ │ │ -
DomainData()
Definition boundarydom.hh:26
│ │ │ │ -
int id() const
Definition boundarydom.hh:42
│ │ │ │ -
const BoundaryParameter & parameter() const
Definition boundarydom.hh:54
│ │ │ │ -
friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata)
Definition boundarydom.hh:73
│ │ │ │ -
bool hasParameter() const
Definition boundarydom.hh:48
│ │ │ │ -
DomainData(int id, BoundaryParameter parameter, bool defaultData=false)
Definition boundarydom.hh:35
│ │ │ │ -
bool isDefault() const
Definition boundarydom.hh:68
│ │ │ │ -
Definition boundarydom.hh:90
│ │ │ │ -
Domain(std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter &parameter)
Definition boundarydom.hh:97
│ │ │ │ -
Domain(const Domain &other)
Definition boundarydom.hh:125
│ │ │ │ -
const int dimensionworld
Definition boundarydom.hh:92
│ │ │ │ -
bool contains(const Vector &x) const
Definition boundarydom.hh:155
│ │ │ │ -
DGFBoundaryParameter::type BoundaryParameter
Definition boundarydom.hh:94
│ │ │ │ -
friend std::ostream & operator<<(std ::ostream &os, const Domain &domain)
Definition boundarydom.hh:172
│ │ │ │ -
Domain & operator=(const Domain &other)
Definition boundarydom.hh:139
│ │ │ │ -
const DomainData & data() const
Definition boundarydom.hh:166
│ │ │ │ -
Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data)
Definition boundarydom.hh:111
│ │ │ │ -
Definition boundarydom.hh:195
│ │ │ │ -
~BoundaryDomBlock()
Definition boundarydom.hh:216
│ │ │ │ -
bool hasParameter() const
Definition boundarydom.cc:138
│ │ │ │ -
const Domain & domain() const
Definition boundarydom.hh:230
│ │ │ │ -
const DomainData * contains(const std::vector< Vector > &v) const
Definition boundarydom.hh:266
│ │ │ │ -
bool next()
Definition boundarydom.hh:223
│ │ │ │ -
void reset()
Definition boundarydom.hh:251
│ │ │ │ -
bool ok()
Definition boundarydom.hh:258
│ │ │ │ -
bool hasDefaultData() const
Definition boundarydom.hh:236
│ │ │ │ -
const DomainData * defaultData() const
Definition boundarydom.hh:242
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ -
Contains types for additional features.
Definition parser.hh:23
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
Definition vertex.hh:21
│ │ │ │ +
int get(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< double > > &param, int &nofp)
Definition vertex.cc:63
│ │ │ │ +
int offset() const
Definition vertex.hh:42
│ │ │ │ +
bool ok() const
Definition vertex.hh:37
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,435 +4,91 @@ │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ -boundarydom.hh │ │ │ │ │ +vertex.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ │ -6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ │ +5#ifndef DUNE_DGF_VERTEXBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_VERTEXBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -14 │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ +16 namespace dgf │ │ │ │ │ +17 { │ │ │ │ │ 18 │ │ │ │ │ -19 namespace dgf │ │ │ │ │ -20 { │ │ │ │ │ -21 │ │ │ │ │ -_2_2 struct _D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -23 { │ │ │ │ │ -_2_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ │ -25 │ │ │ │ │ -_2_6 _D_o_m_a_i_n_D_a_t_a () │ │ │ │ │ -27 : id_( 0 ), │ │ │ │ │ -28 parameter_( _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r::defaultValue() ), │ │ │ │ │ -29 defaultData_( false ) │ │ │ │ │ -30 { } │ │ │ │ │ +_1_9 class _V_e_r_t_e_x_B_l_o_c_k │ │ │ │ │ +20 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +21 { │ │ │ │ │ +22 int dimvertex; // the dimension of the vertices (determined from DGF file) │ │ │ │ │ +23 int dimworld; // the dimension of the world (either dimvertex or given by │ │ │ │ │ +user) │ │ │ │ │ +24 bool goodline; // active line describes a vertex │ │ │ │ │ +25 int vtxoffset; │ │ │ │ │ +26 int nofParam; │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +29 // initialize vertex block │ │ │ │ │ +30 _V_e_r_t_e_x_B_l_o_c_k ( std :: istream &in, int &pdimworld ); │ │ │ │ │ 31 │ │ │ │ │ -_3_2 _~_D_o_m_a_i_n_D_a_t_a () { } │ │ │ │ │ -33 │ │ │ │ │ -34 // constructor │ │ │ │ │ -_3_5 _D_o_m_a_i_n_D_a_t_a ( int id, _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r _p_a_r_a_m_e_t_e_r, bool defaultData = false ) │ │ │ │ │ -36 : id_( _i_d ), │ │ │ │ │ -37 parameter_( _p_a_r_a_m_e_t_e_r ), │ │ │ │ │ -38 defaultData_( defaultData ) │ │ │ │ │ -39 { } │ │ │ │ │ -40 │ │ │ │ │ -41 // return id │ │ │ │ │ -_4_2 int _i_d () const │ │ │ │ │ +32 int _g_e_t ( std :: vector< std :: vector< double > > &vtx, │ │ │ │ │ +33 std :: vector< std :: vector< double > > ¶m, │ │ │ │ │ +34 int &nofp ); │ │ │ │ │ +35 │ │ │ │ │ +36 // some information │ │ │ │ │ +_3_7 bool _o_k () const │ │ │ │ │ +38 { │ │ │ │ │ +39 return goodline; │ │ │ │ │ +40 } │ │ │ │ │ +41 │ │ │ │ │ +_4_2 int _o_f_f_s_e_t () const │ │ │ │ │ 43 { │ │ │ │ │ -44 return id_; │ │ │ │ │ +44 return vtxoffset; │ │ │ │ │ 45 } │ │ │ │ │ 46 │ │ │ │ │ -47 // return true, if additional parameters given │ │ │ │ │ -_4_8 bool _h_a_s_P_a_r_a_m_e_t_e_r () const │ │ │ │ │ -49 { │ │ │ │ │ -50 return (!parameter_.empty()); │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -53 // return additional parameters │ │ │ │ │ -_5_4 const _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r & _p_a_r_a_m_e_t_e_r () const │ │ │ │ │ -55 { │ │ │ │ │ -56 return parameter_; │ │ │ │ │ -57 } │ │ │ │ │ +47 private: │ │ │ │ │ +48 // get dimworld │ │ │ │ │ +49 int getDimWorld (); │ │ │ │ │ +50 │ │ │ │ │ +51 // get next vertex │ │ │ │ │ +52 bool next ( std :: vector< double > &point, std :: vector< double > ¶m │ │ │ │ │ +); │ │ │ │ │ +53 }; │ │ │ │ │ +54 │ │ │ │ │ +55 } // end namespace dgf │ │ │ │ │ +56 │ │ │ │ │ +57} // end namespace Dune │ │ │ │ │ 58 │ │ │ │ │ -59 // reset data │ │ │ │ │ -_6_0 void _r_e_s_e_t ( int id, _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r _p_a_r_a_m_e_t_e_r, bool defaultData = false ) │ │ │ │ │ -61 { │ │ │ │ │ -62 id_ = _i_d; │ │ │ │ │ -63 parameter_ = _p_a_r_a_m_e_t_e_r; │ │ │ │ │ -64 defaultData_ = defaultData; │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 // returns true if data origins from default boundary domain │ │ │ │ │ -_6_8 bool _i_s_D_e_f_a_u_l_t () const │ │ │ │ │ -69 { │ │ │ │ │ -70 return defaultData_; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -_7_3 friend std::ostream & _o_p_e_r_a_t_o_r_<_<_ ( std :: ostream & os, const _D_o_m_a_i_n_D_a_t_a & │ │ │ │ │ -ddata ) │ │ │ │ │ -74 { │ │ │ │ │ -75 os << "domain data: id = " << ddata._i_d(); │ │ │ │ │ -76 if( ddata._h_a_s_P_a_r_a_m_e_t_e_r() ) │ │ │ │ │ -77 os << ", parameter = " << ddata._p_a_r_a_m_e_t_e_r(); │ │ │ │ │ -78 return os; │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -81 private: │ │ │ │ │ -82 int id_; │ │ │ │ │ -83 _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r parameter_; │ │ │ │ │ -84 bool defaultData_; │ │ │ │ │ -85 │ │ │ │ │ -86 }; // end struct DomainData │ │ │ │ │ -87 │ │ │ │ │ -88 │ │ │ │ │ -_8_9 struct _D_o_m_a_i_n │ │ │ │ │ -90 { │ │ │ │ │ -91 // dimension of world coordinates │ │ │ │ │ -_9_2 const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -93 │ │ │ │ │ -_9_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ │ -95 │ │ │ │ │ -96 // constructor │ │ │ │ │ -_9_7 _D_o_m_a_i_n( std::vector< double > p1, std::vector< double > p2, int id, │ │ │ │ │ -_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r & parameter ) │ │ │ │ │ -98 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( p1.size() ), │ │ │ │ │ -99 left_( p1 ), │ │ │ │ │ -100 right_( p2 ), │ │ │ │ │ -101 data_( id, parameter ) │ │ │ │ │ -102 { │ │ │ │ │ -103 if( int( p2.size() ) != _d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ -104 { │ │ │ │ │ -105 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ -106 "ERROR in " << *this << "!"); │ │ │ │ │ -107 } │ │ │ │ │ -108 } │ │ │ │ │ -109 │ │ │ │ │ -110 // constructor │ │ │ │ │ -_1_1_1 _D_o_m_a_i_n( std::vector< double > p1, std::vector< double > p2, _D_o_m_a_i_n_D_a_t_a & │ │ │ │ │ -_d_a_t_a ) │ │ │ │ │ -112 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( p1.size() ), │ │ │ │ │ -113 left_( p1 ), │ │ │ │ │ -114 right_( p2 ), │ │ │ │ │ -115 data_( _d_a_t_a ) │ │ │ │ │ -116 { │ │ │ │ │ -117 if( int( p2.size() ) != _d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ -118 { │ │ │ │ │ -119 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ -120 "ERROR in " << *this << "!"); │ │ │ │ │ -121 } │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -124 // copy constructor │ │ │ │ │ -_1_2_5 _D_o_m_a_i_n ( const _D_o_m_a_i_n & other ) │ │ │ │ │ -126 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( other._d_i_m_e_n_s_i_o_n_w_o_r_l_d ), │ │ │ │ │ -127 left_( other.left_ ), │ │ │ │ │ -128 right_( other.right_ ), │ │ │ │ │ -129 data_( other.data_ ) │ │ │ │ │ -130 { │ │ │ │ │ -131 if( _d_i_m_e_n_s_i_o_n_w_o_r_l_d != other._d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ -132 { │ │ │ │ │ -133 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ -134 "ERROR in " << *this << "!"); │ │ │ │ │ -135 } │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 // assignment │ │ │ │ │ -_1_3_9 _D_o_m_a_i_n & _o_p_e_r_a_t_o_r_ _=_ ( const _D_o_m_a_i_n & other ) │ │ │ │ │ -140 { │ │ │ │ │ -141 if( _d_i_m_e_n_s_i_o_n_w_o_r_l_d != other._d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ -142 { │ │ │ │ │ -143 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ -144 "ERROR in " << *this << "!"); │ │ │ │ │ -145 } │ │ │ │ │ -146 │ │ │ │ │ -147 left_ = other.left_; │ │ │ │ │ -148 right_= other.right_; │ │ │ │ │ -149 data_= other.data_; │ │ │ │ │ -150 return *this; │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -153 // return true if point is contained in boundary domain │ │ │ │ │ -154 template< class Vector > │ │ │ │ │ -_1_5_5 bool _c_o_n_t_a_i_n_s ( const Vector & x ) const │ │ │ │ │ -156 { │ │ │ │ │ -157 bool ret = true; │ │ │ │ │ -158 for( int i = 0; i < _d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++i ) │ │ │ │ │ -159 { │ │ │ │ │ -160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] ) │ │ │ │ │ -161 ret = false; │ │ │ │ │ -162 } │ │ │ │ │ -163 return ret; │ │ │ │ │ -164 } │ │ │ │ │ -165 │ │ │ │ │ -_1_6_6 const _D_o_m_a_i_n_D_a_t_a & _d_a_t_a () const │ │ │ │ │ -167 { │ │ │ │ │ -168 return data_; │ │ │ │ │ -169 } │ │ │ │ │ -170 │ │ │ │ │ -171 // for error messages │ │ │ │ │ -_1_7_2 friend std::ostream & _o_p_e_r_a_t_o_r_<_<_ ( std :: ostream &os, const _D_o_m_a_i_n & │ │ │ │ │ -domain ) │ │ │ │ │ -173 { │ │ │ │ │ -174 os << "domain: " << std::endl; │ │ │ │ │ -175 os << "left = "; │ │ │ │ │ -176 for( int i = 0; i < domain._d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++i ) │ │ │ │ │ -177 os << domain.left_[ i ] << " "; │ │ │ │ │ -178 os << std::endl; │ │ │ │ │ -179 os << "right = "; │ │ │ │ │ -180 for( int i = 0; i < domain._d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++i ) │ │ │ │ │ -181 os << domain.right_[ i ] << " "; │ │ │ │ │ -182 os << std::endl; │ │ │ │ │ -183 os << domain._d_a_t_a(); │ │ │ │ │ -184 return os; │ │ │ │ │ -185 } │ │ │ │ │ -186 │ │ │ │ │ -187 private: │ │ │ │ │ -188 std::vector< double > left_, right_; │ │ │ │ │ -189 _D_o_m_a_i_n_D_a_t_a data_; │ │ │ │ │ -190 │ │ │ │ │ -191 }; │ │ │ │ │ -192 │ │ │ │ │ -_1_9_3 class _B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ -194 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ -195 { │ │ │ │ │ -196 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e BoundaryParameter; │ │ │ │ │ -197 │ │ │ │ │ -198 // the dimension of the vertices (is given from user) │ │ │ │ │ -199 int dimworld_; │ │ │ │ │ -200 │ │ │ │ │ -201 // internal counter │ │ │ │ │ -202 int counter_; │ │ │ │ │ -203 │ │ │ │ │ -204 // default values if given │ │ │ │ │ -205 _D_o_m_a_i_n_D_a_t_a * default_; │ │ │ │ │ -206 │ │ │ │ │ -207 // storage for all domains; │ │ │ │ │ -208 int ndomains_; │ │ │ │ │ -209 std::vector< Domain > domains_; │ │ │ │ │ -210 │ │ │ │ │ -211 public: │ │ │ │ │ -212 // initialize vertex block and get first vertex │ │ │ │ │ -213 _B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k ( std::istream & in, int cdimworld ); │ │ │ │ │ -214 │ │ │ │ │ -215 // destructor │ │ │ │ │ -_2_1_6 _~_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k () │ │ │ │ │ -217 { │ │ │ │ │ -218 if( default_ ) │ │ │ │ │ -219 delete default_; │ │ │ │ │ -220 } │ │ │ │ │ -221 │ │ │ │ │ -222 // go to next domain in block │ │ │ │ │ -_2_2_3 bool _n_e_x_t () │ │ │ │ │ -224 { │ │ │ │ │ -225 counter_++; │ │ │ │ │ -226 return ( counter_ < ndomains_ ); │ │ │ │ │ -227 } │ │ │ │ │ -228 │ │ │ │ │ -229 // return domain │ │ │ │ │ -_2_3_0 const _D_o_m_a_i_n & _d_o_m_a_i_n () const │ │ │ │ │ -231 { │ │ │ │ │ -232 return domains_.at( counter_ ); │ │ │ │ │ -233 } │ │ │ │ │ -234 │ │ │ │ │ -235 // return true if default is given │ │ │ │ │ -_2_3_6 bool _h_a_s_D_e_f_a_u_l_t_D_a_t_a () const │ │ │ │ │ -237 { │ │ │ │ │ -238 return bool( default_ ); │ │ │ │ │ -239 } │ │ │ │ │ -240 │ │ │ │ │ -241 // return default data │ │ │ │ │ -_2_4_2 const _D_o_m_a_i_n_D_a_t_a * _d_e_f_a_u_l_t_D_a_t_a () const │ │ │ │ │ -243 { │ │ │ │ │ -244 return default_; │ │ │ │ │ -245 } │ │ │ │ │ -246 │ │ │ │ │ -247 // return true if any boundary domain block has │ │ │ │ │ -248 // additional parameters │ │ │ │ │ -249 bool _h_a_s_P_a_r_a_m_e_t_e_r () const; │ │ │ │ │ -250 │ │ │ │ │ -_2_5_1 void _r_e_s_e_t () │ │ │ │ │ -252 { │ │ │ │ │ -253 _B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t(); │ │ │ │ │ -254 counter_ = -1; │ │ │ │ │ -255 } │ │ │ │ │ -256 │ │ │ │ │ -257 // return true while block is active │ │ │ │ │ -_2_5_8 bool _o_k () │ │ │ │ │ -259 { │ │ │ │ │ -260 return ( counter_ <= ndomains_ ); │ │ │ │ │ -261 } │ │ │ │ │ -262 │ │ │ │ │ -263 // return data if all vectors in array are contained within │ │ │ │ │ -264 // a single domain │ │ │ │ │ -265 template< class Vector > │ │ │ │ │ -_2_6_6 const _D_o_m_a_i_n_D_a_t_a * _c_o_n_t_a_i_n_s ( const std::vector< Vector > & v ) const │ │ │ │ │ -267 { │ │ │ │ │ -268 std::vector< int > index( ndomains_ ); │ │ │ │ │ -269 for( int i = 0; i < ndomains_; ++i) │ │ │ │ │ -270 index[ i ] = i; │ │ │ │ │ -271 │ │ │ │ │ -272 size_t N = v.size(); │ │ │ │ │ -273 for( size_t i = 0; i < N; ++i ) │ │ │ │ │ -274 { │ │ │ │ │ -275 if( index.empty() ) │ │ │ │ │ -276 break; │ │ │ │ │ -277 │ │ │ │ │ -278 const int n = index.size(); │ │ │ │ │ -279 assert( n > 0 ); │ │ │ │ │ -280 for( int j = n-1; j >= 0; --j ) │ │ │ │ │ -281 { │ │ │ │ │ -282 bool inside = domains_[ index[ j ] ].contains( v[ i ] ); │ │ │ │ │ -283 if( !inside ) │ │ │ │ │ -284 index.erase( index.begin() + j ); │ │ │ │ │ -285 } │ │ │ │ │ -286 } │ │ │ │ │ -287 │ │ │ │ │ -288 // check wheter no boundary domain found │ │ │ │ │ -289 if( index.empty() ) │ │ │ │ │ -290 return default_; │ │ │ │ │ -291 │ │ │ │ │ -292 // check for ambiguity │ │ │ │ │ -293 if( index.size() > 1 ) │ │ │ │ │ -294 dwarn << "WARNING: ambiguous boundary domain assignment, use first boundary │ │ │ │ │ -domain in list" << std::endl; │ │ │ │ │ -295 │ │ │ │ │ -296 return &domains_[ index[ 0 ] ].data(); │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -299 private: │ │ │ │ │ -300 void readBlock (); │ │ │ │ │ -301 }; │ │ │ │ │ -302 │ │ │ │ │ -303 } // end namespace dgf │ │ │ │ │ -304 │ │ │ │ │ -305} // end namespace Dune │ │ │ │ │ -306 │ │ │ │ │ -307#endif │ │ │ │ │ +59#endif │ │ │ │ │ _b_a_s_i_c_._h_h │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ -void reset() │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_r_e_s_e_t │ │ │ │ │ -void reset(int id, BoundaryParameter parameter, bool defaultData=false) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_~_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -~DomainData() │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -DGFBoundaryParameter::type BoundaryParameter │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -DomainData() │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_i_d │ │ │ │ │ -int id() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -const BoundaryParameter & parameter() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_h_a_s_P_a_r_a_m_e_t_e_r │ │ │ │ │ -bool hasParameter() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -DomainData(int id, BoundaryParameter parameter, bool defaultData=false) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_i_s_D_e_f_a_u_l_t │ │ │ │ │ -bool isDefault() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_D_o_m_a_i_n │ │ │ │ │ -Domain(std::vector< double > p1, std::vector< double > p2, int id, │ │ │ │ │ -BoundaryParameter ¶meter) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_D_o_m_a_i_n │ │ │ │ │ -Domain(const Domain &other) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -const int dimensionworld │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const Vector &x) const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -DGFBoundaryParameter::type BoundaryParameter │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -friend std::ostream & operator<<(std ::ostream &os, const Domain &domain) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:172 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -Domain & operator=(const Domain &other) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_d_a_t_a │ │ │ │ │ -const DomainData & data() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_D_o_m_a_i_n │ │ │ │ │ -Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data) │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_~_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ -~BoundaryDomBlock() │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:216 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_h_a_s_P_a_r_a_m_e_t_e_r │ │ │ │ │ -bool hasParameter() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.cc:138 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_d_o_m_a_i_n │ │ │ │ │ -const Domain & domain() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:230 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -const DomainData * contains(const std::vector< Vector > &v) const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:266 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_n_e_x_t │ │ │ │ │ -bool next() │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:223 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ -void reset() │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:251 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_o_k │ │ │ │ │ -bool ok() │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:258 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_h_a_s_D_e_f_a_u_l_t_D_a_t_a │ │ │ │ │ -bool hasDefaultData() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_d_e_f_a_u_l_t_D_a_t_a │ │ │ │ │ -const DomainData * defaultData() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:242 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -exception class for IO errors in the DGF parser │ │ │ │ │ -DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -Contains types for additional features. │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn vertex.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +int get(std ::vector< std ::vector< double > > &vtx, std ::vector< std :: │ │ │ │ │ +vector< double > > ¶m, int &nofp) │ │ │ │ │ +DDeeffiinniittiioonn vertex.cc:63 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k_:_:_o_f_f_s_e_t │ │ │ │ │ +int offset() const │ │ │ │ │ +DDeeffiinniittiioonn vertex.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k_:_:_o_k │ │ │ │ │ +bool ok() const │ │ │ │ │ +DDeeffiinniittiioonn vertex.hh:37 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dim.cc File Reference │ │ │ │ +dune-grid: simplexgeneration.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,19 +71,19 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
dim.cc File Reference
│ │ │ │ +
simplexgeneration.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>
│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,17 +5,17 @@ │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dim.cc File Reference │ │ │ │ │ +simplexgeneration.cc File Reference │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_d_i_m_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_s_i_m_p_l_e_x_g_e_n_e_r_a_t_i_o_n_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cube.cc File Reference │ │ │ │ +dune-grid: general.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,21 +70,30 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
cube.cc File Reference
│ │ │ │ +
general.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
│ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::dgf::GeneralBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,18 +4,23 @@ │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cube.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_c_u_b_e_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +general.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vertex.cc File Reference │ │ │ │ +dune-grid: boundaryseg.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,19 +71,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
vertex.cc File Reference
│ │ │ │ +
boundaryseg.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <config.h>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/vertex.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,17 +5,17 @@ │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vertex.cc File Reference │ │ │ │ │ +boundaryseg.cc File Reference │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_v_e_r_t_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_o_u_n_d_a_r_y_s_e_g_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: projection.cc File Reference │ │ │ │ +dune-grid: cube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,70 +71,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
projection.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
cube.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <config.h>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
│ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::Expr::ConstantExpression
 
struct  Dune::dgf::Expr::VariableExpression
 
struct  Dune::dgf::Expr::FunctionCallExpression
 
struct  Dune::dgf::Expr::VectorExpression
 
struct  Dune::dgf::Expr::BracketExpression
 
struct  Dune::dgf::Expr::MinusExpression
 
struct  Dune::dgf::Expr::NormExpression
 
struct  Dune::dgf::Expr::SqrtExpression
 
struct  Dune::dgf::Expr::SinExpression
 
struct  Dune::dgf::Expr::CosExpression
 
struct  Dune::dgf::Expr::PowerExpression
 
struct  Dune::dgf::Expr::SumExpression
 
struct  Dune::dgf::Expr::DifferenceExpression
 
struct  Dune::dgf::Expr::ProductExpression
 
struct  Dune::dgf::Expr::QuotientExpression
class  Dune::dgf::CubeBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
namespace  Dune::dgf::Expr
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const ProjectionBlock::Token &token)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,57 +4,25 @@ │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ * _b_l_o_c_k_s │ │ │ │ │ -_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 │ │ │ │ │ -projection.cc File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +cube.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_C_o_n_s_t_a_n_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_V_a_r_i_a_b_l_e_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_F_u_n_c_t_i_o_n_C_a_l_l_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_V_e_c_t_o_r_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_B_r_a_c_k_e_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_M_i_n_u_s_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_N_o_r_m_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_S_q_r_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_S_i_n_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_C_o_s_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_P_o_w_e_r_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_S_u_m_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_D_i_f_f_e_r_e_n_c_e_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_P_r_o_d_u_c_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_Q_u_o_t_i_e_n_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ - ProjectionBlock::Token &token) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfug.hh File Reference │ │ │ │ +dune-grid: simplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfug.hh File Reference
│ │ │ │ +
simplex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <istream>
│ │ │ │ -#include <string>
│ │ │ │ +
#include <iostream>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/uggrid.hh>
│ │ │ │ -#include "dgfparser.hh"
│ │ │ │ -#include "blocks/gridparameter.hh"
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::UGGridParameterBlock
 
struct  Dune::DGFGridInfo< UGGrid< dim > >
 
struct  Dune::DGFGridFactory< UGGrid< dim > >
class  Dune::dgf::SimplexBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,34 +3,23 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfug.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +simplex.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_g_g_r_i_d_._h_h> │ │ │ │ │ -#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ -#include "_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfug.hh Source File │ │ │ │ +dune-grid: simplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,316 +70,102 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfug.hh
│ │ │ │ +
simplex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ -
6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ +
5#ifndef DUNE_DGF_SIMPLEXBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_SIMPLEXBLOCK_HH
│ │ │ │
7
│ │ │ │ -
8//- C++ includes
│ │ │ │ -
9#include <fstream>
│ │ │ │ -
10#include <istream>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <vector>
│ │ │ │ -
13
│ │ │ │ -
14//- dune-common includes
│ │ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ │ -
16#include <dune/common/fvector.hh>
│ │ │ │ -
17#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -
18
│ │ │ │ -
19//- dune-grid includes
│ │ │ │ - │ │ │ │ -
21#include <dune/grid/uggrid.hh>
│ │ │ │ -
22
│ │ │ │ -
23//- local includes
│ │ │ │ -
24#include "dgfparser.hh"
│ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27
│ │ │ │ -
28namespace Dune
│ │ │ │ -
29{
│ │ │ │ -
30
│ │ │ │ -
31 namespace dgf
│ │ │ │ -
32 {
│ │ │ │ -
33
│ │ │ │ -
34 // UGGridParameterBlock
│ │ │ │ -
35 // --------------------
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 namespace dgf
│ │ │ │ +
17 {
│ │ │ │ +
18 // SimplexBlock
│ │ │ │ +
19 // ------------
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : public BasicBlock
│ │ │ │ +
23 {
│ │ │ │ +
24 unsigned int nofvtx;
│ │ │ │ +
25 int vtxoffset;
│ │ │ │ +
26 int dimgrid;
│ │ │ │ +
27 bool goodline; // active line describes a vertex
│ │ │ │ +
28 int nofparams; // nof parameters
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 SimplexBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
│ │ │ │ +
32
│ │ │ │ +
33 int get ( std :: vector< std :: vector< unsigned int > > &simplex,
│ │ │ │ +
34 std :: vector< std :: vector< double > > &params,
│ │ │ │ +
35 int &nofp );
│ │ │ │
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 : public GridParameterBlock
│ │ │ │ -
39 {
│ │ │ │ -
41 explicit UGGridParameterBlock ( std::istream &input );
│ │ │ │ +
37 // cubes -> simplex
│ │ │ │ +
38 static int
│ │ │ │ +
39 cube2simplex ( std :: vector< std :: vector< double > > &vtx,
│ │ │ │ +
40 std :: vector< std :: vector< unsigned int > > &elements,
│ │ │ │ +
41 std :: vector< std :: vector< double > > &params );
│ │ │ │
42
│ │ │ │ -
44 bool noClosure () const { return noClosure_; }
│ │ │ │ -
46 bool noCopy () const { return noCopy_; }
│ │ │ │ -
48 size_t heapSize () const { return heapSize_; }
│ │ │ │ -
49
│ │ │ │ -
50 protected:
│ │ │ │ -
51 bool noClosure_; // no closure for UGGrid
│ │ │ │ -
52 bool noCopy_; // no copies for UGGrid
│ │ │ │ -
53 size_t heapSize_; // heap size for UGGrid
│ │ │ │ -
54 };
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
56 } // namespace dgf
│ │ │ │ -
57
│ │ │ │ -
58
│ │ │ │ -
59
│ │ │ │ -
60#if HAVE_DUNE_UGGRID
│ │ │ │ -
61 template< int dim >
│ │ │ │ -
│ │ │ │ -
62 struct DGFGridInfo< UGGrid< dim > >
│ │ │ │ -
63 {
│ │ │ │ -
│ │ │ │ -
64 static int refineStepsForHalf ()
│ │ │ │ -
65 {
│ │ │ │ -
66 return 1;
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
69 static double refineWeight ()
│ │ │ │ -
70 {
│ │ │ │ -
71 return -1.;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73 };
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75
│ │ │ │ -
76
│ │ │ │ -
77 // DGFGridFactory< UGGrid< dim > >
│ │ │ │ -
78 // -------------------------------
│ │ │ │ -
79
│ │ │ │ -
80 template< int dim >
│ │ │ │ -
│ │ │ │ -
81 struct DGFGridFactory< UGGrid< dim > >
│ │ │ │ -
82 {
│ │ │ │ - │ │ │ │ -
86 static const int dimension = dim;
│ │ │ │ -
88 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ -
91 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
92 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
93 : grid_( 0 ),
│ │ │ │ -
94 factory_(),
│ │ │ │ -
95 dgf_( rank( comm ), size( comm ) )
│ │ │ │ -
96 {
│ │ │ │ -
97 generate( input );
│ │ │ │ -
98 }
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ -
101 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
102 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
103 : grid_( 0 ),
│ │ │ │ -
104 factory_(),
│ │ │ │ -
105 dgf_( rank( comm ), size( comm ) )
│ │ │ │ -
106 {
│ │ │ │ -
107 std::ifstream input( filename.c_str() );
│ │ │ │ -
108 if ( !input )
│ │ │ │ -
109 DUNE_THROW( DGFException, "Error: Macrofile " << filename << " not found" );
│ │ │ │ -
110 generate( input );
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
115 {
│ │ │ │ -
116 return grid_;
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
120 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
121 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
122 {
│ │ │ │ -
123 return factory_.wasInserted( intersection );
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
127 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
128 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
129 {
│ │ │ │ -
130 return intersection.boundarySegmentIndex();
│ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
134 template< int codim >
│ │ │ │ -
│ │ │ │ -
135 int numParameters () const
│ │ │ │ -
136 {
│ │ │ │ -
137 if( codim == 0 )
│ │ │ │ -
138 return dgf_.nofelparams;
│ │ │ │ -
139 else if( codim == dimension )
│ │ │ │ -
140 return dgf_.nofvtxparams;
│ │ │ │ -
141 else
│ │ │ │ -
142 return 0;
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
146 template< class Entity >
│ │ │ │ -
│ │ │ │ -
147 int numParameters ( const Entity & ) const
│ │ │ │ -
148 {
│ │ │ │ -
149 return numParameters< Entity::codimension >();
│ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
153 std::vector< double > &parameter ( const typename Grid::template Codim< 0 >::Entity &element )
│ │ │ │ -
154 {
│ │ │ │ -
155 if( numParameters< 0 >() <= 0 )
│ │ │ │ -
156 {
│ │ │ │ -
157 DUNE_THROW( InvalidStateException,
│ │ │ │ -
158 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ -
159 }
│ │ │ │ -
160 return dgf_.elParams[ factory_.insertionIndex( element ) ];
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
│ │ │ │ -
164 std::vector< double > &parameter ( const typename Grid::template Codim< dimension >::Entity &vertex )
│ │ │ │ -
165 {
│ │ │ │ -
166 if( numParameters< dimension >() <= 0 )
│ │ │ │ -
167 {
│ │ │ │ -
168 DUNE_THROW( InvalidStateException,
│ │ │ │ -
169 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ -
170 }
│ │ │ │ -
171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
176 {
│ │ │ │ -
177 return dgf_.haveBndParameters;
│ │ │ │ -
178 }
│ │ │ │ -
│ │ │ │ -
179
│ │ │ │ -
181 template< class GG, class II >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
183 {
│ │ │ │ - │ │ │ │ -
185 typename Intersection::Entity entity = intersection.inside();
│ │ │ │ -
186 const int face = intersection.indexInInside();
│ │ │ │ -
187
│ │ │ │ -
188 auto refElem = referenceElement< double, dimension >( entity.type() );
│ │ │ │ -
189 int corners = refElem.size( face, 1, dimension );
│ │ │ │ -
190 std::vector< unsigned int > bound( corners );
│ │ │ │ -
191 for( int i = 0; i < corners; ++i )
│ │ │ │ -
192 {
│ │ │ │ -
193 const int k = refElem.subEntity( face, 1, i, dimension );
│ │ │ │ -
194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension >( k ) );
│ │ │ │ -
195 }
│ │ │ │ -
196
│ │ │ │ -
197 DuneGridFormatParser::facemap_t::key_type key( bound, false );
│ │ │ │ -
198 const DuneGridFormatParser::facemap_t::const_iterator pos = dgf_.facemap.find( key );
│ │ │ │ -
199 if( pos != dgf_.facemap.end() )
│ │ │ │ -
200 return dgf_.facemap.find( key )->second.second;
│ │ │ │ -
201 else
│ │ │ │ - │ │ │ │ -
203 }
│ │ │ │ -
│ │ │ │ -
204
│ │ │ │ -
205 private:
│ │ │ │ -
206 // create grid
│ │ │ │ -
207 void generate ( std::istream &input );
│ │ │ │ -
208
│ │ │ │ -
209 // return rank
│ │ │ │ -
210 static int rank( MPICommunicatorType MPICOMM )
│ │ │ │ -
211 {
│ │ │ │ -
212 int rank = 0;
│ │ │ │ -
213#if HAVE_MPI
│ │ │ │ -
214 MPI_Comm_rank( MPICOMM, &rank );
│ │ │ │ -
215#endif
│ │ │ │ -
216 return rank;
│ │ │ │ -
217 }
│ │ │ │ -
218
│ │ │ │ -
219 // return size
│ │ │ │ -
220 static int size( MPICommunicatorType MPICOMM )
│ │ │ │ -
221 {
│ │ │ │ -
222 int size = 1;
│ │ │ │ -
223#if HAVE_MPI
│ │ │ │ -
224 MPI_Comm_size( MPICOMM, &size );
│ │ │ │ -
225#endif
│ │ │ │ -
226 return size;
│ │ │ │ -
227 }
│ │ │ │ -
228
│ │ │ │ -
229 Grid *grid_;
│ │ │ │ -
230 GridFactory< UGGrid< dim > > factory_;
│ │ │ │ -
231 DuneGridFormatParser dgf_;
│ │ │ │ -
232 };
│ │ │ │ -
│ │ │ │ -
233#endif // #if HAVE_DUNE_UGGRID
│ │ │ │ -
234
│ │ │ │ -
235} // namespace Dune
│ │ │ │ -
236
│ │ │ │ -
237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ - │ │ │ │ -
The UGGrid class.
│ │ │ │ +
43 // some information
│ │ │ │ +
│ │ │ │ +
44 bool ok ()
│ │ │ │ +
45 {
│ │ │ │ +
46 return goodline;
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
50 {
│ │ │ │ +
51 return noflines();
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54 private:
│ │ │ │ +
55 // get the dimension of the grid
│ │ │ │ +
56 int getDimGrid ();
│ │ │ │ +
57 // get next simplex
│ │ │ │ +
58 bool next ( std :: vector< unsigned int > &simplex,
│ │ │ │ +
59 std :: vector< double > &param );
│ │ │ │ +
60 };
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
62 } // end namespace dgf
│ │ │ │ +
63
│ │ │ │ +
64} // end namespace Dune
│ │ │ │ +
65
│ │ │ │ +
66#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ -
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ -
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │ -
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:236
│ │ │ │ -
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition common/intersection.hh:250
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition common/intersection.hh:192
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
Common Grid parameters.
Definition gridparameter.hh:35
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ -
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ -
Definition dgfug.hh:39
│ │ │ │ -
size_t heapSize() const
returns heap size used on construction of the grid
Definition dgfug.hh:48
│ │ │ │ -
bool noCopy_
Definition dgfug.hh:52
│ │ │ │ -
size_t heapSize_
Definition dgfug.hh:53
│ │ │ │ -
bool noClosure_
Definition dgfug.hh:51
│ │ │ │ -
bool noCopy() const
returns true if no copies are made for UGGrid elements
Definition dgfug.hh:46
│ │ │ │ -
bool noClosure() const
returns true if no closure should be used for UGGrid
Definition dgfug.hh:44
│ │ │ │ -
static double refineWeight()
Definition dgfug.hh:69
│ │ │ │ -
static int refineStepsForHalf()
Definition dgfug.hh:64
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
return invalid value
Definition dgfug.hh:182
│ │ │ │ -
std::vector< double > & parameter(const typename Grid::template Codim< dimension >::Entity &vertex)
return parameter for vertex
Definition dgfug.hh:164
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking filename
Definition dgfug.hh:101
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
MPI communicator type.
Definition dgfug.hh:88
│ │ │ │ -
int numParameters(const Entity &) const
return number of parameters
Definition dgfug.hh:147
│ │ │ │ -
int boundaryId(const Dune::Intersection< GG, II > &intersection) const
will return boundary segment index
Definition dgfug.hh:128
│ │ │ │ -
UGGrid< dim > Grid
grid type
Definition dgfug.hh:84
│ │ │ │ -
bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
please doc me
Definition dgfug.hh:121
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking istream
Definition dgfug.hh:91
│ │ │ │ -
int numParameters() const
return number of parameters
Definition dgfug.hh:135
│ │ │ │ -
bool haveBoundaryParameters() const
UGGrid does not support boundary parameters.
Definition dgfug.hh:175
│ │ │ │ -
std::vector< double > & parameter(const typename Grid::template Codim< 0 >::Entity &element)
return parameter for codim 0 entity
Definition dgfug.hh:153
│ │ │ │ -
Grid * grid()
return grid
Definition dgfug.hh:114
│ │ │ │ -
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ -
Front-end for the grid manager of the finite element toolbox UG3.
Definition uggrid.hh:207
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
int & noflines()
Definition basic.hh:87
│ │ │ │ +
Definition simplex.hh:23
│ │ │ │ +
static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< double > > &params)
Definition simplex.cc:146
│ │ │ │ +
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition simplex.cc:69
│ │ │ │ +
int nofsimplex()
Definition simplex.hh:49
│ │ │ │ +
bool ok()
Definition simplex.hh:44
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,392 +3,106 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfug.hh │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +simplex.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH │ │ │ │ │ -6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH │ │ │ │ │ +5#ifndef DUNE_DGF_SIMPLEXBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_SIMPLEXBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -8//- C++ includes │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14//- dune-common includes │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ -18 │ │ │ │ │ -19//- dune-grid includes │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_g_r_i_d_/_u_g_g_r_i_d_._h_h> │ │ │ │ │ -22 │ │ │ │ │ -23//- local includes │ │ │ │ │ -24#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ -25#include "_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h" │ │ │ │ │ -26 │ │ │ │ │ -27 │ │ │ │ │ -28namespace _D_u_n_e │ │ │ │ │ -29{ │ │ │ │ │ -30 │ │ │ │ │ -31 namespace dgf │ │ │ │ │ -32 { │ │ │ │ │ -33 │ │ │ │ │ -34 // UGGridParameterBlock │ │ │ │ │ -35 // -------------------- │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 namespace dgf │ │ │ │ │ +17 { │ │ │ │ │ +18 // SimplexBlock │ │ │ │ │ +19 // ------------ │ │ │ │ │ +20 │ │ │ │ │ +_2_1 class _S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ │ +22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +23 { │ │ │ │ │ +24 unsigned int nofvtx; │ │ │ │ │ +25 int vtxoffset; │ │ │ │ │ +26 int dimgrid; │ │ │ │ │ +27 bool goodline; // active line describes a vertex │ │ │ │ │ +28 int nofparams; // nof parameters │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 _S_i_m_p_l_e_x_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int │ │ │ │ │ +&pdimgrid ); │ │ │ │ │ +32 │ │ │ │ │ +33 int _g_e_t ( std :: vector< std :: vector< unsigned int > > &simplex, │ │ │ │ │ +34 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ │ +35 int &nofp ); │ │ │ │ │ 36 │ │ │ │ │ -_3_7 struct _U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -38 : public _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -39 { │ │ │ │ │ -41 explicit _U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &input ); │ │ │ │ │ +37 // cubes -> simplex │ │ │ │ │ +38 static int │ │ │ │ │ +39 _c_u_b_e_2_s_i_m_p_l_e_x ( std :: vector< std :: vector< double > > &vtx, │ │ │ │ │ +40 std :: vector< std :: vector< unsigned int > > &elements, │ │ │ │ │ +41 std :: vector< std :: vector< double > > ¶ms ); │ │ │ │ │ 42 │ │ │ │ │ -_4_4 bool _n_o_C_l_o_s_u_r_e () const { return _n_o_C_l_o_s_u_r_e__; } │ │ │ │ │ -_4_6 bool _n_o_C_o_p_y () const { return _n_o_C_o_p_y__; } │ │ │ │ │ -_4_8 size_t _h_e_a_p_S_i_z_e () const { return _h_e_a_p_S_i_z_e__; } │ │ │ │ │ -49 │ │ │ │ │ -50 protected: │ │ │ │ │ -_5_1 bool _n_o_C_l_o_s_u_r_e__; // no closure for UGGrid │ │ │ │ │ -_5_2 bool _n_o_C_o_p_y__; // no copies for UGGrid │ │ │ │ │ -_5_3 size_t _h_e_a_p_S_i_z_e__; // heap size for UGGrid │ │ │ │ │ -54 }; │ │ │ │ │ -55 │ │ │ │ │ -56 } // namespace dgf │ │ │ │ │ -57 │ │ │ │ │ -58 │ │ │ │ │ -59 │ │ │ │ │ -60#if HAVE_DUNE_UGGRID │ │ │ │ │ -61 template< int dim > │ │ │ │ │ -_6_2 struct _D_G_F_G_r_i_d_I_n_f_o< _U_G_G_r_i_d< dim > > │ │ │ │ │ -63 { │ │ │ │ │ -_6_4 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ -65 { │ │ │ │ │ -66 return 1; │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_6_9 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ -70 { │ │ │ │ │ -71 return -1.; │ │ │ │ │ -72 } │ │ │ │ │ -73 }; │ │ │ │ │ -74 │ │ │ │ │ -75 │ │ │ │ │ -76 │ │ │ │ │ -77 // DGFGridFactory< UGGrid< dim > > │ │ │ │ │ -78 // ------------------------------- │ │ │ │ │ -79 │ │ │ │ │ -80 template< int dim > │ │ │ │ │ -_8_1 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _U_G_G_r_i_d< dim > > │ │ │ │ │ -82 { │ │ │ │ │ -_8_4 typedef _U_G_G_r_i_d_<_ _d_i_m_ _> _G_r_i_d; │ │ │ │ │ -_8_6 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_8_8 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ -89 │ │ │ │ │ -_9_1 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -92 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -93 : grid_( 0 ), │ │ │ │ │ -94 factory_(), │ │ │ │ │ -95 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ -96 { │ │ │ │ │ -97 generate( input ); │ │ │ │ │ -98 } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_1 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -102 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -103 : grid_( 0 ), │ │ │ │ │ -104 factory_(), │ │ │ │ │ -105 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ -106 { │ │ │ │ │ -107 std::ifstream input( filename.c_str() ); │ │ │ │ │ -108 if ( !input ) │ │ │ │ │ -109 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error: Macrofile " << filename << " not found" │ │ │ │ │ -); │ │ │ │ │ -110 generate( input ); │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_4 _G_r_i_d *_g_r_i_d () │ │ │ │ │ -115 { │ │ │ │ │ -116 return grid_; │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -120 template< class GG, class II > │ │ │ │ │ -_1_2_1 bool _w_a_s_I_n_s_e_r_t_e_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ -122 { │ │ │ │ │ -123 return factory_.wasInserted( intersection ); │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -127 template< class GG, class II > │ │ │ │ │ -_1_2_8 int _b_o_u_n_d_a_r_y_I_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ -129 { │ │ │ │ │ -130 return intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x(); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -134 template< int codim > │ │ │ │ │ -_1_3_5 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -136 { │ │ │ │ │ -137 if( codim == 0 ) │ │ │ │ │ -138 return dgf_.nofelparams; │ │ │ │ │ -139 else if( codim == _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ -140 return dgf_.nofvtxparams; │ │ │ │ │ -141 else │ │ │ │ │ -142 return 0; │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -146 template< class Entity > │ │ │ │ │ -_1_4_7 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ -148 { │ │ │ │ │ -149 return numParameters< Entity::codimension >(); │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -_1_5_3 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 │ │ │ │ │ ->::Entity &element ) │ │ │ │ │ -154 { │ │ │ │ │ -155 if( numParameters< 0 >() <= 0 ) │ │ │ │ │ -156 { │ │ │ │ │ -157 DUNE_THROW( InvalidStateException, │ │ │ │ │ -158 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ -parameters." ); │ │ │ │ │ -159 } │ │ │ │ │ -160 return dgf_.elParams[ factory_.insertionIndex( element ) ]; │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -_1_6_4 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< │ │ │ │ │ -dimension >::Entity &vertex ) │ │ │ │ │ -165 { │ │ │ │ │ -166 if( numParameters< dimension >() <= 0 ) │ │ │ │ │ -167 { │ │ │ │ │ -168 DUNE_THROW( InvalidStateException, │ │ │ │ │ -169 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ -parameters." ); │ │ │ │ │ -170 } │ │ │ │ │ -171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ]; │ │ │ │ │ -172 } │ │ │ │ │ -173 │ │ │ │ │ -_1_7_5 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -176 { │ │ │ │ │ -177 return dgf_.haveBndParameters; │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -181 template< class GG, class II > │ │ │ │ │ -_1_8_2 const _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e &_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _D_u_n_e_:_: │ │ │ │ │ -_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ -183 { │ │ │ │ │ -184 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -185 typename _I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y entity = intersection._i_n_s_i_d_e(); │ │ │ │ │ -186 const int face = intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ -187 │ │ │ │ │ -188 auto refElem = referenceElement< double, dimension >( entity.type() ); │ │ │ │ │ -189 int corners = refElem.size( face, 1, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ -190 std::vector< unsigned int > bound( corners ); │ │ │ │ │ -191 for( int i = 0; i < corners; ++i ) │ │ │ │ │ -192 { │ │ │ │ │ -193 const int k = refElem.subEntity( face, 1, i, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ -194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension │ │ │ │ │ ->( k ) ); │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -197 DuneGridFormatParser::facemap_t::key_type key( bound, false ); │ │ │ │ │ -198 const DuneGridFormatParser::facemap_t::const_iterator pos = │ │ │ │ │ -dgf_.facemap.find( key ); │ │ │ │ │ -199 if( pos != dgf_.facemap.end() ) │ │ │ │ │ -200 return dgf_.facemap.find( key )->second.second; │ │ │ │ │ -201 else │ │ │ │ │ -202 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -203 } │ │ │ │ │ -204 │ │ │ │ │ -205 private: │ │ │ │ │ -206 // create grid │ │ │ │ │ -207 void generate ( std::istream &input ); │ │ │ │ │ -208 │ │ │ │ │ -209 // return rank │ │ │ │ │ -210 static int rank( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ -211 { │ │ │ │ │ -212 int rank = 0; │ │ │ │ │ -213#if HAVE_MPI │ │ │ │ │ -214 MPI_Comm_rank( MPICOMM, &rank ); │ │ │ │ │ -215#endif │ │ │ │ │ -216 return rank; │ │ │ │ │ -217 } │ │ │ │ │ -218 │ │ │ │ │ -219 // return size │ │ │ │ │ -220 static int size( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ -221 { │ │ │ │ │ -222 int size = 1; │ │ │ │ │ -223#if HAVE_MPI │ │ │ │ │ -224 MPI_Comm_size( MPICOMM, &size ); │ │ │ │ │ -225#endif │ │ │ │ │ -226 return size; │ │ │ │ │ -227 } │ │ │ │ │ -228 │ │ │ │ │ -229 _G_r_i_d *grid_; │ │ │ │ │ -230 GridFactory< UGGrid< dim > > factory_; │ │ │ │ │ -231 DuneGridFormatParser dgf_; │ │ │ │ │ -232 }; │ │ │ │ │ -233#endif // #if HAVE_DUNE_UGGRID │ │ │ │ │ -234 │ │ │ │ │ -235} // namespace Dune │ │ │ │ │ -236 │ │ │ │ │ -237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH │ │ │ │ │ -_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h │ │ │ │ │ -_u_g_g_r_i_d_._h_h │ │ │ │ │ -The UGGrid class. │ │ │ │ │ +43 // some information │ │ │ │ │ +_4_4 bool _o_k () │ │ │ │ │ +45 { │ │ │ │ │ +46 return goodline; │ │ │ │ │ +47 } │ │ │ │ │ +48 │ │ │ │ │ +_4_9 int _n_o_f_s_i_m_p_l_e_x () │ │ │ │ │ +50 { │ │ │ │ │ +51 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +54 private: │ │ │ │ │ +55 // get the dimension of the grid │ │ │ │ │ +56 int getDimGrid (); │ │ │ │ │ +57 // get next simplex │ │ │ │ │ +58 bool next ( std :: vector< unsigned int > &simplex, │ │ │ │ │ +59 std :: vector< double > ¶m ); │ │ │ │ │ +60 }; │ │ │ │ │ +61 │ │ │ │ │ +62 } // end namespace dgf │ │ │ │ │ +63 │ │ │ │ │ +64} // end namespace Dune │ │ │ │ │ +65 │ │ │ │ │ +66#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ -int indexInInside() const │ │ │ │ │ -Local index of codim 1 entity in the inside() entity where intersection is │ │ │ │ │ -contained in. │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ -size_t boundarySegmentIndex() const │ │ │ │ │ -index of the boundary segment within the macro grid │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ -Entity inside() const │ │ │ │ │ -return Entity on the inside of this intersection. That is the Entity where we │ │ │ │ │ -started this. │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:250 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ -Type of entity that this Intersection belongs to. │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -Common Grid parameters. │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -exception class for IO errors in the DGF parser │ │ │ │ │ -DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ -Some simple static information for a given GridType. │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_h_e_a_p_S_i_z_e │ │ │ │ │ -size_t heapSize() const │ │ │ │ │ -returns heap size used on construction of the grid │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_o_p_y__ │ │ │ │ │ -bool noCopy_ │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_h_e_a_p_S_i_z_e__ │ │ │ │ │ -size_t heapSize_ │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_l_o_s_u_r_e__ │ │ │ │ │ -bool noClosure_ │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_o_p_y │ │ │ │ │ -bool noCopy() const │ │ │ │ │ -returns true if no copies are made for UGGrid elements │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_l_o_s_u_r_e │ │ │ │ │ -bool noClosure() const │ │ │ │ │ -returns true if no closure should be used for UGGrid │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ -static double refineWeight() │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< │ │ │ │ │ -GG, II > &intersection) const │ │ │ │ │ -return invalid value │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const typename Grid::template Codim< │ │ │ │ │ -dimension >::Entity &vertex) │ │ │ │ │ -return parameter for vertex │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ -comm=MPIHelper::getCommunicator()) │ │ │ │ │ -constructor taking filename │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -MPI communicator type. │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters(const Entity &) const │ │ │ │ │ -return number of parameters │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ -will return boundary segment index │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ -UGGrid< dim > Grid │ │ │ │ │ -grid type │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ -please doc me │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -constructor taking istream │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -return number of parameters │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -UGGrid does not support boundary parameters. │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const typename Grid::template Codim< 0 >:: │ │ │ │ │ -Entity &element) │ │ │ │ │ -return parameter for codim 0 entity │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ -Grid * grid() │ │ │ │ │ -return grid │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ -static const type & defaultValue() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_U_G_G_r_i_d │ │ │ │ │ -Front-end for the grid manager of the finite element toolbox UG3. │ │ │ │ │ -DDeeffiinniittiioonn uggrid.hh:207 │ │ │ │ │ -_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ +int & noflines() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn simplex.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_c_u_b_e_2_s_i_m_p_l_e_x │ │ │ │ │ +static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std :: │ │ │ │ │ +vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< │ │ │ │ │ +double > > ¶ms) │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:146 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< │ │ │ │ │ +std ::vector< double > > ¶ms, int &nofp) │ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:69 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_n_o_f_s_i_m_p_l_e_x │ │ │ │ │ +int nofsimplex() │ │ │ │ │ +DDeeffiinniittiioonn simplex.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_B_l_o_c_k_:_:_o_k │ │ │ │ │ +bool ok() │ │ │ │ │ +DDeeffiinniittiioonn simplex.hh:44 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfoned.hh File Reference │ │ │ │ +dune-grid: general.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfoned.hh File Reference
│ │ │ │ +
general.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <istream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/onedgrid.hh>
│ │ │ │ -#include "dgfparser.hh"
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

struct  Dune::DGFGridInfo< OneDGrid >
 
struct  Dune::DGFGridFactory< OneDGrid >
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/general.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,30 +3,20 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfoned.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_o_n_e_d_g_r_i_d_._h_h> │ │ │ │ │ -#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _O_n_e_D_G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +general.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_g_e_n_e_r_a_l_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfug.cc File Reference │ │ │ │ +dune-grid: projection.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,76 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
dgfug.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
projection.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <config.h>
│ │ │ │ -#include <dune/geometry/utility/typefromvertexcount.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfug.hh>
│ │ │ │ +#include <dune/common/math.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
│ │ │ │
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

struct  Dune::dgf::Expr::ConstantExpression
 
struct  Dune::dgf::Expr::VariableExpression
 
struct  Dune::dgf::Expr::FunctionCallExpression
 
struct  Dune::dgf::Expr::VectorExpression
 
struct  Dune::dgf::Expr::BracketExpression
 
struct  Dune::dgf::Expr::MinusExpression
 
struct  Dune::dgf::Expr::NormExpression
 
struct  Dune::dgf::Expr::SqrtExpression
 
struct  Dune::dgf::Expr::SinExpression
 
struct  Dune::dgf::Expr::CosExpression
 
struct  Dune::dgf::Expr::PowerExpression
 
struct  Dune::dgf::Expr::SumExpression
 
struct  Dune::dgf::Expr::DifferenceExpression
 
struct  Dune::dgf::Expr::ProductExpression
 
struct  Dune::dgf::Expr::QuotientExpression
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
namespace  Dune::dgf::Expr
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const ProjectionBlock::Token &token)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,20 +3,58 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfug.cc File Reference │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_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 │ │ │ │ │ +projection.cc File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_u_g_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_C_o_n_s_t_a_n_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_V_a_r_i_a_b_l_e_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_F_u_n_c_t_i_o_n_C_a_l_l_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_V_e_c_t_o_r_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_B_r_a_c_k_e_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_M_i_n_u_s_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_N_o_r_m_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_S_q_r_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_S_i_n_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_C_o_s_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_P_o_w_e_r_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_S_u_m_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_D_i_f_f_e_r_e_n_c_e_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_P_r_o_d_u_c_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r_:_:_Q_u_o_t_i_e_n_t_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f_:_:_E_x_p_r │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ + ProjectionBlock::Token &token) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey.hh File Reference │ │ │ │ +dune-grid: interval.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
entitykey.hh File Reference
│ │ │ │ +
interval.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ -#include "entitykey_inline.hh"
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::DGFEntityKey< A >
 
struct  Dune::ElementFaceUtil
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,25 +3,20 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -entitykey.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ -#include "_e_n_t_i_t_y_k_e_y___i_n_l_i_n_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_:_:_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l │ │ │ │ │ -  │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +interval.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_i_n_t_e_r_v_a_l_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgeogrid.hh File Reference │ │ │ │ +dune-grid: polygon.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfgeogrid.hh File Reference
│ │ │ │ +
polygon.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/geometrygrid.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfparser.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
│ │ │ │ -#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::DGFCoordFunction< dimD, dimR >
 
struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
 
struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
 
struct  Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
 
struct  Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
 
struct  Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
struct  Dune::dgf::PolygonBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,39 +3,26 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfgeogrid.hh File Reference │ │ │ │ │ +polygon.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _f_a_l_s_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _t_r_u_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R │ │ │ │ │ - _>_,_ _f_a_l_s_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r │ │ │ │ │ - _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _> │ │ │ │ │ - _> │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgeogrid.hh Source File │ │ │ │ +dune-grid: polygon.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,348 +70,95 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfgeogrid.hh
│ │ │ │ +
polygon.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGFGEOGRID_HH
│ │ │ │ -
6#define DUNE_DGFGEOGRID_HH
│ │ │ │ +
3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=2 sw=2 sts=2:
│ │ │ │ +
5#ifndef DUNE_POLYGON_HH
│ │ │ │ +
6#define DUNE_POLYGON_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/typetraits.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21
│ │ │ │ -
22 /************************************************************************
│ │ │ │ -
23 * Warning:
│ │ │ │ -
24 * Reading DGF files directly into a GeometryGrid is a dirty hack for
│ │ │ │ -
25 * two reasons:
│ │ │ │ -
26 * 1) The host grid and coordinate function are never deleted (dangling
│ │ │ │ -
27 * pointers).
│ │ │ │ -
28 * 2) The coordinate function has to provide a default constructor
│ │ │ │ -
29 ************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31 // External Forward Declarations
│ │ │ │ -
32 // -----------------------------
│ │ │ │ -
33
│ │ │ │ -
34 template< class GridImp, class IntersectionImp >
│ │ │ │ -
35 class Intersection;
│ │ │ │ -
36
│ │ │ │ -
37
│ │ │ │ -
38
│ │ │ │ -
39 // DGFCoordFunction
│ │ │ │ -
40 // ----------------
│ │ │ │ -
41
│ │ │ │ -
42 template< int dimD, int dimR >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction< dimD, dimR > >
│ │ │ │ -
45 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
48
│ │ │ │ -
49 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
52
│ │ │ │ - │ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
55 DGFCoordFunction ( const Expression *expression )
│ │ │ │ -
56 : expression_( expression )
│ │ │ │ -
57 {}
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
59 void evaluate ( const DomainVector &x, RangeVector &y ) const
│ │ │ │ -
60 {
│ │ │ │ -
61 std::vector< double > vx( dimD );
│ │ │ │ -
62 std::vector< double > vy;
│ │ │ │ -
63 for( int i = 0; i < dimD; ++i )
│ │ │ │ -
64 vx[ i ] = x[ i ];
│ │ │ │ -
65 expression_->evaluate( vx, vy );
│ │ │ │ -
66 assert( vy.size() == size_t( dimR ) );
│ │ │ │ -
67 for( int i = 0; i < dimR; ++i )
│ │ │ │ -
68 y[ i ] = vy[ i ];
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
71 private:
│ │ │ │ -
72 const Expression *expression_;
│ │ │ │ -
73 };
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75
│ │ │ │ -
76
│ │ │ │ -
77 // DGFCoordFunctionFactory
│ │ │ │ -
78 // -----------------------
│ │ │ │ -
79
│ │ │ │ -
80 template< class HostGrid, class CoordFunction,
│ │ │ │ -
81 bool discrete = GeoGrid::isDiscreteCoordFunctionInterface< typename CoordFunction::Interface >::value >
│ │ │ │ - │ │ │ │ -
83
│ │ │ │ -
84
│ │ │ │ -
85 template< class HostGrid, class CoordFunction >
│ │ │ │ -
│ │ │ │ -
86 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
│ │ │ │ -
87 {
│ │ │ │ -
│ │ │ │ -
88 static CoordFunction *create ( std::istream &, const HostGrid & )
│ │ │ │ -
89 {
│ │ │ │ -
90 return new CoordFunction;
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92 };
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
94
│ │ │ │ -
95 template< class HostGrid, class CoordFunction >
│ │ │ │ -
│ │ │ │ -
96 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
│ │ │ │ -
97 {
│ │ │ │ -
│ │ │ │ -
98 static CoordFunction *create ( std::istream &, const HostGrid &hostGrid )
│ │ │ │ -
99 {
│ │ │ │ -
100 return new CoordFunction( hostGrid );
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102 };
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
104
│ │ │ │ -
105 template< class HostGrid, int dimD, int dimR >
│ │ │ │ -
│ │ │ │ -
106 struct DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
│ │ │ │ -
107 {
│ │ │ │ - │ │ │ │ -
109
│ │ │ │ -
│ │ │ │ -
110 static CoordFunction *create ( std::istream &input, const HostGrid &hostGrid )
│ │ │ │ -
111 {
│ │ │ │ -
112 dgf::ProjectionBlock projectionBlock( input, dimR );
│ │ │ │ -
113 const typename CoordFunction::Expression *expression = projectionBlock.function( "coordfunction" );
│ │ │ │ -
114 if( expression == 0 )
│ │ │ │ -
115 DUNE_THROW( DGFException, "no coordfunction specified in DGF file." );
│ │ │ │ -
116 return new CoordFunction( expression );
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118 };
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120
│ │ │ │ -
121
│ │ │ │ -
122 // DGFGridFactory for GeometryGrid
│ │ │ │ -
123 // -------------------------------
│ │ │ │ -
124
│ │ │ │ -
125 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ -
│ │ │ │ -
126 struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
│ │ │ │ -
127 {
│ │ │ │ - │ │ │ │ -
129
│ │ │ │ -
130 const static int dimension = Grid::dimension;
│ │ │ │ -
131 typedef MPIHelper::MPICommunicator MPICommunicator;
│ │ │ │ -
132 typedef typename Grid::template Codim<0>::Entity Element;
│ │ │ │ -
133 typedef typename Grid::template Codim<dimension>::Entity Vertex;
│ │ │ │ -
134
│ │ │ │ - │ │ │ │ -
136
│ │ │ │ -
│ │ │ │ -
137 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
138 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ -
139 : dgfHostFactory_( input, comm ),
│ │ │ │ -
140 grid_( 0 )
│ │ │ │ -
141 {
│ │ │ │ -
142 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
│ │ │ │ -
143 assert( hostGrid != 0 );
│ │ │ │ -
144 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
│ │ │ │ -
145 grid_ = new Grid( hostGrid, coordFunction );
│ │ │ │ -
146 }
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
│ │ │ │ -
148 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
149 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ -
150 : dgfHostFactory_( filename, comm ),
│ │ │ │ -
151 grid_( 0 )
│ │ │ │ -
152 {
│ │ │ │ -
153 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
│ │ │ │ -
154 assert( hostGrid != 0 );
│ │ │ │ -
155 std::ifstream input( filename.c_str() );
│ │ │ │ -
156 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
│ │ │ │ -
157 grid_ = new Grid( hostGrid, coordFunction );
│ │ │ │ -
158 }
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/typetraits.hh>
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 namespace dgf
│ │ │ │ +
18 {
│ │ │ │ +
19
│ │ │ │ +
20 // PolygonBlock
│ │ │ │ +
21 // ------------
│ │ │ │ +
22
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 : public BasicBlock
│ │ │ │ +
25 {
│ │ │ │ +
│ │ │ │ +
26 PolygonBlock ( std::istream &in, int numVtx, int vtxOfs )
│ │ │ │ +
27 : BasicBlock( in, "Polygon" ), vtxBegin_( vtxOfs ), vtxEnd_( vtxOfs + numVtx )
│ │ │ │ +
28 {}
│ │ │ │ +
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
30 int get ( std::vector< std::vector< int > > &polygons )
│ │ │ │ +
31 {
│ │ │ │ +
32 reset();
│ │ │ │ +
33 std::vector< int > polygon;
│ │ │ │ +
34 while( getnextline() )
│ │ │ │ +
35 {
│ │ │ │ +
36 polygon.clear();
│ │ │ │ +
37 for( int vtxIdx; getnextentry( vtxIdx ); )
│ │ │ │ +
38 {
│ │ │ │ +
39 if( (vtxBegin_ > vtxIdx) || (vtxIdx >= vtxEnd_) )
│ │ │ │ +
40 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid vertex index (" << vtxIdx << " not int [" << vtxBegin_ << ", " << vtxEnd_ << "[)" );
│ │ │ │ +
41 polygon.push_back( vtxIdx - vtxBegin_ );
│ │ │ │ +
42 }
│ │ │ │ +
43
│ │ │ │ +
44 polygons.push_back( polygon );
│ │ │ │ +
45 }
│ │ │ │ +
46 return polygons.size();
│ │ │ │ +
47 }
│ │ │ │
│ │ │ │ -
159
│ │ │ │ -
│ │ │ │ -
160 Grid *grid () const
│ │ │ │ -
161 {
│ │ │ │ -
162 return grid_;
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
165 template< class Intersection >
│ │ │ │ -
│ │ │ │ -
166 bool wasInserted ( const Intersection &intersection ) const
│ │ │ │ -
167 {
│ │ │ │ -
168 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ -
169 }
│ │ │ │ -
│ │ │ │ -
170
│ │ │ │ -
171 template< class Intersection >
│ │ │ │ -
│ │ │ │ -
172 int boundaryId ( const Intersection &intersection ) const
│ │ │ │ -
173 {
│ │ │ │ -
174 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ -
175 }
│ │ │ │ -
│ │ │ │ -
176
│ │ │ │ -
177 template< int codim >
│ │ │ │ -
│ │ │ │ -
178 int numParameters () const
│ │ │ │ -
179 {
│ │ │ │ -
180 return dgfHostFactory_.template numParameters< codim >();
│ │ │ │ -
181 }
│ │ │ │ -
│ │ │ │ -
182
│ │ │ │ -
183 // return true if boundary parameters found
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
185 {
│ │ │ │ -
186 return dgfHostFactory_.haveBoundaryParameters();
│ │ │ │ -
187 }
│ │ │ │ -
│ │ │ │ -
188
│ │ │ │ -
189 template< class GG, class II >
│ │ │ │ -
190 const typename DGFBoundaryParameter::type &
│ │ │ │ -
│ │ │ │ -
191 boundaryParameter ( const Dune::Intersection< GG, II > & intersection ) const
│ │ │ │ -
192 {
│ │ │ │ -
193 return dgfHostFactory_.boundaryParameter( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
196 template< class Entity >
│ │ │ │ -
│ │ │ │ -
197 std::vector< double > &parameter ( const Entity &entity )
│ │ │ │ -
198 {
│ │ │ │ -
199 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
202 private:
│ │ │ │ -
203 DGFGridFactory< HostGrid > dgfHostFactory_;
│ │ │ │ -
204 Grid *grid_;
│ │ │ │ -
205 };
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
207
│ │ │ │ -
208
│ │ │ │ -
209 // DGFGridInfo for GeometryGrid
│ │ │ │ -
210 // ----------------------------
│ │ │ │ -
211
│ │ │ │ -
212 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ -
│ │ │ │ -
213 struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
│ │ │ │ -
214 {
│ │ │ │ -
│ │ │ │ -
215 static int refineStepsForHalf ()
│ │ │ │ -
216 {
│ │ │ │ - │ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
│ │ │ │ -
220 static double refineWeight ()
│ │ │ │ -
221 {
│ │ │ │ -
222 return -1.0;
│ │ │ │ -
223 }
│ │ │ │ -
│ │ │ │ -
224 };
│ │ │ │ +
48
│ │ │ │ +
49 protected:
│ │ │ │ + │ │ │ │ +
51 };
│ │ │ │
│ │ │ │ -
225
│ │ │ │ -
226}
│ │ │ │ -
227
│ │ │ │ -
228#endif // #ifndef DUNE_DGFGEOGRID_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
52
│ │ │ │ +
53 } // namespace dgf
│ │ │ │ +
54} // end namespace Dune
│ │ │ │ +
55
│ │ │ │ +
56#endif // #ifndef DUNE_POLYGON_HH
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ -
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
Derive an implementation of an analytical coordinate function from this class.
Definition coordfunction.hh:134
│ │ │ │ -
Base::DomainVector DomainVector
Definition coordfunction.hh:139
│ │ │ │ -
Base::RangeVector RangeVector
Definition coordfunction.hh:140
│ │ │ │ -
grid wrapper replacing the geometries
Definition geometrygrid/grid.hh:86
│ │ │ │ -
traits structure containing types for a codimension
Definition geometrygrid/grid.hh:611
│ │ │ │ -
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ -
Definition io/file/dgfparser/blocks/projection.hh:24
│ │ │ │ -
ExpressionPointer function(const std::string &name) const
Definition io/file/dgfparser/blocks/projection.hh:100
│ │ │ │ -
Definition io/file/dgfparser/blocks/projection.hh:160
│ │ │ │ -
virtual void evaluate(const Vector &argument, Vector &result) const =0
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
void reset()
Definition basic.hh:51
│ │ │ │ +
bool getnextline()
Definition basic.cc:94
│ │ │ │ +
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ +
Definition polygon.hh:25
│ │ │ │ +
PolygonBlock(std::istream &in, int numVtx, int vtxOfs)
Definition polygon.hh:26
│ │ │ │ +
int get(std::vector< std::vector< int > > &polygons)
Definition polygon.hh:30
│ │ │ │ +
int vtxEnd_
Definition polygon.hh:50
│ │ │ │ +
int vtxBegin_
Definition polygon.hh:50
│ │ │ │
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ -
Definition dgfgeogrid.hh:45
│ │ │ │ -
Base::DomainVector DomainVector
Definition dgfgeogrid.hh:50
│ │ │ │ -
void evaluate(const DomainVector &x, RangeVector &y) const
Definition dgfgeogrid.hh:59
│ │ │ │ -
dgf::ProjectionBlock::Expression Expression
Definition dgfgeogrid.hh:53
│ │ │ │ -
DGFCoordFunction(const Expression *expression)
Definition dgfgeogrid.hh:55
│ │ │ │ -
Base::RangeVector RangeVector
Definition dgfgeogrid.hh:51
│ │ │ │ -
Definition dgfgeogrid.hh:82
│ │ │ │ -
static CoordFunction * create(std::istream &, const HostGrid &)
Definition dgfgeogrid.hh:88
│ │ │ │ -
static CoordFunction * create(std::istream &, const HostGrid &hostGrid)
Definition dgfgeogrid.hh:98
│ │ │ │ -
static CoordFunction * create(std::istream &input, const HostGrid &hostGrid)
Definition dgfgeogrid.hh:110
│ │ │ │ -
DGFCoordFunction< dimD, dimR > CoordFunction
Definition dgfgeogrid.hh:108
│ │ │ │ -
Grid::template Codim< dimension >::Entity Vertex
Definition dgfgeogrid.hh:133
│ │ │ │ -
int boundaryId(const Intersection &intersection) const
Definition dgfgeogrid.hh:172
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicator
Definition dgfgeogrid.hh:131
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
Definition dgfgeogrid.hh:191
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfgeogrid.hh:137
│ │ │ │ -
Grid::template Codim< 0 >::Entity Element
Definition dgfgeogrid.hh:132
│ │ │ │ - │ │ │ │ -
DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory
Definition dgfgeogrid.hh:135
│ │ │ │ -
GeometryGrid< HostGrid, CoordFunction, Allocator > Grid
Definition dgfgeogrid.hh:128
│ │ │ │ - │ │ │ │ -
std::vector< double > & parameter(const Entity &entity)
Definition dgfgeogrid.hh:197
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfgeogrid.hh:148
│ │ │ │ -
bool wasInserted(const Intersection &intersection) const
Definition dgfgeogrid.hh:166
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ -
static int refineStepsForHalf()
number of globalRefine steps needed to refuce h by 0.5
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,424 +3,103 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfgeogrid.hh │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +polygon.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGFGEOGRID_HH │ │ │ │ │ -6#define DUNE_DGFGEOGRID_HH │ │ │ │ │ +3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=2 sw=2 sts=2: │ │ │ │ │ +5#ifndef DUNE_POLYGON_HH │ │ │ │ │ +6#define DUNE_POLYGON_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 │ │ │ │ │ -22 /************************************************************************ │ │ │ │ │ -23 * Warning: │ │ │ │ │ -24 * Reading DGF files directly into a GeometryGrid is a dirty hack for │ │ │ │ │ -25 * two reasons: │ │ │ │ │ -26 * 1) The host grid and coordinate function are never deleted (dangling │ │ │ │ │ -27 * pointers). │ │ │ │ │ -28 * 2) The coordinate function has to provide a default constructor │ │ │ │ │ -29 ************************************************************************/ │ │ │ │ │ -30 │ │ │ │ │ -31 // External Forward Declarations │ │ │ │ │ -32 // ----------------------------- │ │ │ │ │ -33 │ │ │ │ │ -34 template< class GridImp, class IntersectionImp > │ │ │ │ │ -35 class Intersection; │ │ │ │ │ -36 │ │ │ │ │ -37 │ │ │ │ │ -38 │ │ │ │ │ -39 // DGFCoordFunction │ │ │ │ │ -40 // ---------------- │ │ │ │ │ -41 │ │ │ │ │ -42 template< int dimD, int dimR > │ │ │ │ │ -_4_3 class _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -44 : public _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n< double, dimD, dimR, DGFCoordFunction< │ │ │ │ │ -dimD, dimR > > │ │ │ │ │ -45 { │ │ │ │ │ -46 typedef _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> _T_h_i_s; │ │ │ │ │ -47 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_o_u_b_l_e_,_ _d_i_m_D_,_ _d_i_m_R_,_ _T_h_i_s_ _> _B_a_s_e; │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 namespace dgf │ │ │ │ │ +18 { │ │ │ │ │ +19 │ │ │ │ │ +20 // PolygonBlock │ │ │ │ │ +21 // ------------ │ │ │ │ │ +22 │ │ │ │ │ +_2_3 struct _P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ +24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +25 { │ │ │ │ │ +_2_6 _P_o_l_y_g_o_n_B_l_o_c_k ( std::istream &in, int numVtx, int vtxOfs ) │ │ │ │ │ +27 : _B_a_s_i_c_B_l_o_c_k( in, "Polygon" ), _v_t_x_B_e_g_i_n__( vtxOfs ), _v_t_x_E_n_d__( vtxOfs + numVtx │ │ │ │ │ +) │ │ │ │ │ +28 {} │ │ │ │ │ +29 │ │ │ │ │ +_3_0 int _g_e_t ( std::vector< std::vector< int > > &polygons ) │ │ │ │ │ +31 { │ │ │ │ │ +32 _r_e_s_e_t(); │ │ │ │ │ +33 std::vector< int > polygon; │ │ │ │ │ +34 while( _g_e_t_n_e_x_t_l_i_n_e() ) │ │ │ │ │ +35 { │ │ │ │ │ +36 polygon.clear(); │ │ │ │ │ +37 for( int vtxIdx; _g_e_t_n_e_x_t_e_n_t_r_y( vtxIdx ); ) │ │ │ │ │ +38 { │ │ │ │ │ +39 if( (_v_t_x_B_e_g_i_n__ > vtxIdx) || (vtxIdx >= _v_t_x_E_n_d__) ) │ │ │ │ │ +40 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error in " << *this << ": Invalid vertex index (" │ │ │ │ │ +<< vtxIdx << " not int [" << _v_t_x_B_e_g_i_n__ << ", " << _v_t_x_E_n_d__ << "[)" ); │ │ │ │ │ +41 polygon.push_back( vtxIdx - _v_t_x_B_e_g_i_n__ ); │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +44 polygons.push_back( polygon ); │ │ │ │ │ +45 } │ │ │ │ │ +46 return polygons.size(); │ │ │ │ │ +47 } │ │ │ │ │ 48 │ │ │ │ │ -49 public: │ │ │ │ │ -_5_0 typedef typename _B_a_s_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -_5_1 typedef typename _B_a_s_e_:_:_R_a_n_g_e_V_e_c_t_o_r _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +49 protected: │ │ │ │ │ +_5_0 int _v_t_x_B_e_g_i_n__, _v_t_x_E_n_d__; │ │ │ │ │ +51 }; │ │ │ │ │ 52 │ │ │ │ │ -_5_3 typedef _d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_E_x_p_r_e_s_s_i_o_n _E_x_p_r_e_s_s_i_o_n; │ │ │ │ │ -54 │ │ │ │ │ -_5_5 _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n ( const _E_x_p_r_e_s_s_i_o_n *expression ) │ │ │ │ │ -56 : expression_( expression ) │ │ │ │ │ -57 {} │ │ │ │ │ -58 │ │ │ │ │ -_5_9 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ -60 { │ │ │ │ │ -61 std::vector< double > vx( dimD ); │ │ │ │ │ -62 std::vector< double > vy; │ │ │ │ │ -63 for( int i = 0; i < dimD; ++i ) │ │ │ │ │ -64 vx[ i ] = x[ i ]; │ │ │ │ │ -65 expression_->_e_v_a_l_u_a_t_e( vx, vy ); │ │ │ │ │ -66 assert( vy.size() == size_t( dimR ) ); │ │ │ │ │ -67 for( int i = 0; i < dimR; ++i ) │ │ │ │ │ -68 y[ i ] = vy[ i ]; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -71 private: │ │ │ │ │ -72 const _E_x_p_r_e_s_s_i_o_n *expression_; │ │ │ │ │ -73 }; │ │ │ │ │ -74 │ │ │ │ │ -75 │ │ │ │ │ -76 │ │ │ │ │ -77 // DGFCoordFunctionFactory │ │ │ │ │ -78 // ----------------------- │ │ │ │ │ -79 │ │ │ │ │ -80 template< class HostGrid, class CoordFunction, │ │ │ │ │ -81 bool discrete = GeoGrid::isDiscreteCoordFunctionInterface< typename │ │ │ │ │ -CoordFunction::Interface >::value > │ │ │ │ │ -_8_2 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ -83 │ │ │ │ │ -84 │ │ │ │ │ -85 template< class HostGrid, class CoordFunction > │ │ │ │ │ -_8_6 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y< HostGrid, CoordFunction, false > │ │ │ │ │ -87 { │ │ │ │ │ -_8_8 static CoordFunction *_c_r_e_a_t_e ( std::istream &, const HostGrid & ) │ │ │ │ │ -89 { │ │ │ │ │ -90 return new CoordFunction; │ │ │ │ │ -91 } │ │ │ │ │ -92 }; │ │ │ │ │ -93 │ │ │ │ │ -94 │ │ │ │ │ -95 template< class HostGrid, class CoordFunction > │ │ │ │ │ -_9_6 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y< HostGrid, CoordFunction, true > │ │ │ │ │ -97 { │ │ │ │ │ -_9_8 static CoordFunction *_c_r_e_a_t_e ( std::istream &, const HostGrid &hostGrid ) │ │ │ │ │ -99 { │ │ │ │ │ -100 return new CoordFunction( hostGrid ); │ │ │ │ │ -101 } │ │ │ │ │ -102 }; │ │ │ │ │ -103 │ │ │ │ │ -104 │ │ │ │ │ -105 template< class HostGrid, int dimD, int dimR > │ │ │ │ │ -_1_0_6 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y< HostGrid, _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n< dimD, dimR >, │ │ │ │ │ -false > │ │ │ │ │ -107 { │ │ │ │ │ -_1_0_8 typedef _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> _C_o_o_r_d_F_u_n_c_t_i_o_n; │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 static _C_o_o_r_d_F_u_n_c_t_i_o_n *_c_r_e_a_t_e ( std::istream &input, const HostGrid │ │ │ │ │ -&hostGrid ) │ │ │ │ │ -111 { │ │ │ │ │ -112 _d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k projectionBlock( input, dimR ); │ │ │ │ │ -113 const typename _C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_E_x_p_r_e_s_s_i_o_n *expression = │ │ │ │ │ -projectionBlock._f_u_n_c_t_i_o_n( "coordfunction" ); │ │ │ │ │ -114 if( expression == 0 ) │ │ │ │ │ -115 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "no coordfunction specified in DGF file." ); │ │ │ │ │ -116 return new _C_o_o_r_d_F_u_n_c_t_i_o_n( expression ); │ │ │ │ │ -117 } │ │ │ │ │ -118 }; │ │ │ │ │ -119 │ │ │ │ │ -120 │ │ │ │ │ -121 │ │ │ │ │ -122 // DGFGridFactory for GeometryGrid │ │ │ │ │ -123 // ------------------------------- │ │ │ │ │ -124 │ │ │ │ │ -125 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ -_1_2_6 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _G_e_o_m_e_t_r_y_G_r_i_d< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ -127 { │ │ │ │ │ -_1_2_8 typedef _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _> _G_r_i_d; │ │ │ │ │ -129 │ │ │ │ │ -_1_3_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_1_3_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r; │ │ │ │ │ -_1_3_2 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_1_3_3 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim::Entity _V_e_r_t_e_x; │ │ │ │ │ -134 │ │ │ │ │ -_1_3_5 typedef _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> │ │ │ │ │ -_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ -136 │ │ │ │ │ -_1_3_7 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -138 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -139 : dgfHostFactory_( input, comm ), │ │ │ │ │ -140 grid_( 0 ) │ │ │ │ │ -141 { │ │ │ │ │ -142 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid()); │ │ │ │ │ -143 assert( hostGrid != 0 ); │ │ │ │ │ -144 auto coordFunction = std::shared_ptr(CoordFunctionFactory:: │ │ │ │ │ -create( input, *hostGrid )); │ │ │ │ │ -145 grid_ = new _G_r_i_d( hostGrid, coordFunction ); │ │ │ │ │ -146 } │ │ │ │ │ -147 │ │ │ │ │ -_1_4_8 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -149 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -150 : dgfHostFactory_( filename, comm ), │ │ │ │ │ -151 grid_( 0 ) │ │ │ │ │ -152 { │ │ │ │ │ -153 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid()); │ │ │ │ │ -154 assert( hostGrid != 0 ); │ │ │ │ │ -155 std::ifstream input( filename.c_str() ); │ │ │ │ │ -156 auto coordFunction = std::shared_ptr(CoordFunctionFactory:: │ │ │ │ │ -create( input, *hostGrid )); │ │ │ │ │ -157 grid_ = new _G_r_i_d( hostGrid, coordFunction ); │ │ │ │ │ -158 } │ │ │ │ │ -159 │ │ │ │ │ -_1_6_0 _G_r_i_d *_g_r_i_d () const │ │ │ │ │ -161 { │ │ │ │ │ -162 return grid_; │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -165 template< class Intersection > │ │ │ │ │ -_1_6_6 bool _w_a_s_I_n_s_e_r_t_e_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ -167 { │ │ │ │ │ -168 return dgfHostFactory_.wasInserted( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n( intersection ) ); │ │ │ │ │ -169 } │ │ │ │ │ -170 │ │ │ │ │ -171 template< class Intersection > │ │ │ │ │ -_1_7_2 int _b_o_u_n_d_a_r_y_I_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ -173 { │ │ │ │ │ -174 return dgfHostFactory_.boundaryId( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -( intersection ) ); │ │ │ │ │ -175 } │ │ │ │ │ -176 │ │ │ │ │ -177 template< int codim > │ │ │ │ │ -_1_7_8 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -179 { │ │ │ │ │ -180 return dgfHostFactory_.template numParameters< codim >(); │ │ │ │ │ -181 } │ │ │ │ │ -182 │ │ │ │ │ -183 // return true if boundary parameters found │ │ │ │ │ -_1_8_4 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -185 { │ │ │ │ │ -186 return dgfHostFactory_.haveBoundaryParameters(); │ │ │ │ │ -187 } │ │ │ │ │ -188 │ │ │ │ │ -189 template< class GG, class II > │ │ │ │ │ -190 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ -_1_9_1 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) │ │ │ │ │ -const │ │ │ │ │ -192 { │ │ │ │ │ -193 return dgfHostFactory_.boundaryParameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n( intersection ) ); │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -196 template< class Entity > │ │ │ │ │ -_1_9_7 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -198 { │ │ │ │ │ -199 return dgfHostFactory_.parameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -( entity ) ); │ │ │ │ │ -200 } │ │ │ │ │ -201 │ │ │ │ │ -202 private: │ │ │ │ │ -203 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_ _> dgfHostFactory_; │ │ │ │ │ -204 _G_r_i_d *grid_; │ │ │ │ │ -205 }; │ │ │ │ │ -206 │ │ │ │ │ -207 │ │ │ │ │ -208 │ │ │ │ │ -209 // DGFGridInfo for GeometryGrid │ │ │ │ │ -210 // ---------------------------- │ │ │ │ │ -211 │ │ │ │ │ -212 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ -_2_1_3 struct _D_G_F_G_r_i_d_I_n_f_o< _G_e_o_m_e_t_r_y_G_r_i_d< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ -214 { │ │ │ │ │ -_2_1_5 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ -216 { │ │ │ │ │ -217 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f(); │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -_2_2_0 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ -221 { │ │ │ │ │ -222 return -1.0; │ │ │ │ │ -223 } │ │ │ │ │ -224 }; │ │ │ │ │ -225 │ │ │ │ │ -226} │ │ │ │ │ -227 │ │ │ │ │ -228#endif // #ifndef DUNE_DGFGEOGRID_HH │ │ │ │ │ -_g_e_o_m_e_t_r_y_g_r_i_d_._h_h │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ -_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ │ +53 } // namespace dgf │ │ │ │ │ +54} // end namespace Dune │ │ │ │ │ +55 │ │ │ │ │ +56#endif // #ifndef DUNE_POLYGON_HH │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -Derive an implementation of an analytical coordinate function from this class. │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -Base::RangeVector RangeVector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ -grid wrapper replacing the geometries │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/grid.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -traits structure containing types for a codimension │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/grid.hh:611 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ -provides access to host grid objects from GeometryGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/blocks/projection.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_f_u_n_c_t_i_o_n │ │ │ │ │ -ExpressionPointer function(const std::string &name) const │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/blocks/projection.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/blocks/projection.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_E_x_p_r_e_s_s_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -virtual void evaluate(const Vector &argument, Vector &result) const =0 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ +void reset() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_l_i_n_e │ │ │ │ │ +bool getnextline() │ │ │ │ │ +DDeeffiinniittiioonn basic.cc:94 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ +bool getnextentry(ENTRY &entry) │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn polygon.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ +PolygonBlock(std::istream &in, int numVtx, int vtxOfs) │ │ │ │ │ +DDeeffiinniittiioonn polygon.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +int get(std::vector< std::vector< int > > &polygons) │ │ │ │ │ +DDeeffiinniittiioonn polygon.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_v_t_x_E_n_d__ │ │ │ │ │ +int vtxEnd_ │ │ │ │ │ +DDeeffiinniittiioonn polygon.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k_:_:_v_t_x_B_e_g_i_n__ │ │ │ │ │ +int vtxBegin_ │ │ │ │ │ +DDeeffiinniittiioonn polygon.hh:50 │ │ │ │ │ _D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ exception class for IO errors in the DGF parser │ │ │ │ │ DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, RangeVector &y) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ -dgf::ProjectionBlock::Expression Expression │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DGFCoordFunction(const Expression *expression) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -Base::RangeVector RangeVector │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _f_a_l_s_e_ _>_:_:_c_r_e_a_t_e │ │ │ │ │ -static CoordFunction * create(std::istream &, const HostGrid &) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _t_r_u_e_ _>_:_:_c_r_e_a_t_e │ │ │ │ │ -static CoordFunction * create(std::istream &, const HostGrid &hostGrid) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _>_,_ _f_a_l_s_e │ │ │ │ │ -_>_:_:_c_r_e_a_t_e │ │ │ │ │ -static CoordFunction * create(std::istream &input, const HostGrid &hostGrid) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _>_,_ _f_a_l_s_e │ │ │ │ │ -_>_:_:_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DGFCoordFunction< dimD, dimR > CoordFunction │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_V_e_r_t_e_x │ │ │ │ │ -Grid::template Codim< dimension >::Entity Vertex │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:172 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicator │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< │ │ │ │ │ -GG, II > &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_E_l_e_m_e_n_t │ │ │ │ │ -Grid::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_g_r_i_d │ │ │ │ │ -Grid * grid() const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_G_r_i_d │ │ │ │ │ -GeometryGrid< HostGrid, CoordFunction, Allocator > Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:178 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:184 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ -static double refineWeight() │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -DDeeffiinniittiioonn dgfgeogrid.hh:215 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ -Some simple static information for a given GridType. │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -number of globalRefine steps needed to refuce h by 0.5 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ -_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ -_p_r_o_j_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridptr.hh File Reference │ │ │ │ +dune-grid: cube.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,62 +65,33 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
gridptr.hh File Reference
│ │ │ │ +
cube.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cctype>
│ │ │ │ -#include <array>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <map>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <string>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/common/shared_ptr.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/common/partitionset.hh>
│ │ │ │ -#include <dune/grid/common/rangegenerators.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ -#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::GridPtr< GridType >
 Class for constructing grids from DGF files. More...
 
class  Dune::GridPtr< GridType >::mygrid_ptr
 
struct  Dune::GridPtr< GridType >::DataHandle
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,44 +3,20 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -gridptr.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_d_a_t_a_h_a_n_d_l_e_i_f_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_p_a_r_t_i_t_i_o_n_s_e_t_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_G_r_i_d_P_t_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ -  Class for constructing grids from DGF files. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_G_r_i_d_P_t_r_<_ _G_r_i_d_T_y_p_e_ _>_:_:_m_y_g_r_i_d___p_t_r │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_G_r_i_d_P_t_r_<_ _G_r_i_d_T_y_p_e_ _>_:_:_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ -  │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +cube.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_c_u_b_e_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrogrid.hh File Reference │ │ │ │ +dune-grid: basic.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
macrogrid.hh File Reference
│ │ │ │ +
basic.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::MacroGrid
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,22 +3,20 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -macrogrid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ -  │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +basic.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfidentitygrid.hh File Reference │ │ │ │ +dune-grid: dim.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfidentitygrid.hh File Reference
│ │ │ │ +
dim.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/identitygrid.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfparser.hh>
│ │ │ │ -#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::DGFGridFactory< IdentityGrid< HostGrid > >
 
struct  Dune::DGFGridInfo< IdentityGrid< HostGrid > >
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,25 +3,20 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfidentitygrid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +dim.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_d_i_m_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfwriter.hh File Reference │ │ │ │ +dune-grid: dim.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfwriter.hh File Reference
│ │ │ │ +
dim.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

write a GridView to a DGF file │ │ │ │ -More...

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <algorithm>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/rangeutilities.hh>
│ │ │ │ -#include <dune/common/typeutilities.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/common/rangegenerators.hh>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::DGFWriter< GV >
 write a GridView to a DGF file More...
class  Dune::dgf::DimBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

write a GridView to a DGF file

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,39 +3,24 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfwriter.hh File Reference │ │ │ │ │ -write a GridView to a DGF file _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +dim.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_<_ _G_V_ _> │ │ │ │ │ -  write a _G_r_i_d_V_i_e_w to a DGF file _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -write a GridView to a DGF file │ │ │ │ │ - Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfwriter.hh Source File │ │ │ │ +dune-grid: dim.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,466 +70,79 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfwriter.hh
│ │ │ │ +
dim.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ -
6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ +
5#ifndef DUNE_DGF_DIMBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_DIMBLOCK_HH
│ │ │ │
7
│ │ │ │ -
13#include <cassert>
│ │ │ │ -
14#include <cstddef>
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ -
16#include <algorithm>
│ │ │ │ -
17#include <fstream>
│ │ │ │ -
18#include <string>
│ │ │ │ -
19#include <type_traits>
│ │ │ │ -
20#include <utility>
│ │ │ │ -
21#include <vector>
│ │ │ │ -
22
│ │ │ │ -
23#include <dune/common/rangeutilities.hh>
│ │ │ │ -
24#include <dune/common/typeutilities.hh>
│ │ │ │ -
25
│ │ │ │ -
26#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
27#include <dune/geometry/type.hh>
│ │ │ │ -
28
│ │ │ │ - │ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
32namespace Dune
│ │ │ │ -
33{
│ │ │ │ -
34
│ │ │ │ -
44 template< class GV >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
46 {
│ │ │ │ -
47 typedef DGFWriter< GV > This;
│ │ │ │ -
48
│ │ │ │ -
49 public:
│ │ │ │ -
51 typedef GV GridView;
│ │ │ │ -
53 typedef typename GridView::Grid Grid;
│ │ │ │ -
54
│ │ │ │ -
56 static const int dimGrid = GridView::dimension;
│ │ │ │ -
57
│ │ │ │ -
58 private:
│ │ │ │ -
59 typedef typename GridView::IndexSet IndexSet;
│ │ │ │ -
60 typedef typename GridView::template Codim< 0 >::Entity Element;
│ │ │ │ -
61 typedef typename GridView::Intersection Intersection;
│ │ │ │ -
62
│ │ │ │ -
63 typedef typename Element::EntitySeed ElementSeed;
│ │ │ │ -
64
│ │ │ │ -
65 typedef typename IndexSet::IndexType Index;
│ │ │ │ -
66
│ │ │ │ -
67 public:
│ │ │ │ -
│ │ │ │ -
72 DGFWriter ( const GridView &gridView )
│ │ │ │ -
73 : gridView_( gridView )
│ │ │ │ -
74 {}
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
85 template< class BoundaryData >
│ │ │ │ -
86 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
│ │ │ │ -
87
│ │ │ │ -
96 template< class BoundaryData >
│ │ │ │ -
97 void write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
│ │ │ │ -
98
│ │ │ │ -
│ │ │ │ -
107 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams = std::stringstream() ) const
│ │ │ │ -
108 {
│ │ │ │ -
109 write( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
│ │ │ │ -
119 void write ( std::ostream &gridout, const std::stringstream &addParams = std::stringstream() ) const
│ │ │ │ -
120 {
│ │ │ │ -
121 write( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
│ │ │ │ -
122 }
│ │ │ │ -
│ │ │ │ -
123
│ │ │ │ -
130 template< class... Args >
│ │ │ │ -
│ │ │ │ -
131 auto write ( const std::string &fileName, Args &&... args ) const
│ │ │ │ -
132 -> std::void_t< decltype( this->write( std::declval< std::ostream & >(), std::declval< Args >()... ) ) >
│ │ │ │ -
133 {
│ │ │ │ -
134 std::ofstream gridout( fileName );
│ │ │ │ -
135 if( gridout )
│ │ │ │ -
136 write( gridout, std::forward< Args >( args )... );
│ │ │ │ -
137 else
│ │ │ │ -
138 std::cerr << "Couldn't open file `"<< fileName << "'!"<< std::endl;
│ │ │ │ -
139 }
│ │ │ │ -
│ │ │ │ -
140
│ │ │ │ -
141 protected:
│ │ │ │ -
142 auto elementsSeeds ( const std::vector< Index > &newElemOrder ) const
│ │ │ │ -
143 -> std::vector< ElementSeed >;
│ │ │ │ -
144
│ │ │ │ -
145 void writeHeader ( std::ostream &gridout ) const;
│ │ │ │ -
146 void writeFooter ( std::ostream &gridout ) const;
│ │ │ │ -
147
│ │ │ │ -
148 auto writeVertices ( std::ostream &gridout ) const
│ │ │ │ -
149 -> std::vector< Index >;
│ │ │ │ -
150
│ │ │ │ -
151 void writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const;
│ │ │ │ -
152
│ │ │ │ -
153 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
│ │ │ │ -
154 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
│ │ │ │ -
155
│ │ │ │ -
156 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
│ │ │ │ -
157 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
│ │ │ │ -
158
│ │ │ │ -
159 template< class... Args >
│ │ │ │ -
160 void writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const;
│ │ │ │ -
161
│ │ │ │ -
162 private:
│ │ │ │ -
163 template< class I >
│ │ │ │ -
164 static auto boundaryId ( const I &i, PriorityTag< 1 > )
│ │ │ │ -
165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl().boundaryId() ) >, int >::value, int >
│ │ │ │ -
166 {
│ │ │ │ -
167 return i.impl().boundaryId();
│ │ │ │ -
168 }
│ │ │ │ -
169
│ │ │ │ -
170 template< class I >
│ │ │ │ -
171 static int boundaryId ( const I &i, PriorityTag< 0 > )
│ │ │ │ -
172 {
│ │ │ │ -
173 return 1;
│ │ │ │ -
174 }
│ │ │ │ -
175
│ │ │ │ -
176 protected:
│ │ │ │ -
177 static int boundaryId ( const Intersection &i ) { return boundaryId( i, PriorityTag< 42 >() ); }
│ │ │ │ -
178
│ │ │ │ -
179 private:
│ │ │ │ -
180 static int boundaryId ( const Intersection &, int bndId ) { return bndId; }
│ │ │ │ -
181 static int boundaryId ( const Intersection &i, const std::string & ) { return boundaryId( i ); }
│ │ │ │ -
182 static int boundaryId ( const Intersection &i, const std::pair< int, std::string > &data ) { return boundrayId( i, data.first ); }
│ │ │ │ -
183
│ │ │ │ -
184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout << std::endl; }
│ │ │ │ -
185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int, std::string > &data ) { appendBoundaryData( gridout, data.second ); }
│ │ │ │ -
186 static void appendBoundaryData ( std::ostream &gridout, const std::string &s ) { gridout << " : " << s << std::endl; }
│ │ │ │ -
187
│ │ │ │ -
188 protected:
│ │ │ │ -
189 template< class BoundaryData >
│ │ │ │ -
190 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const;
│ │ │ │ -
191
│ │ │ │ -
│ │ │ │ -
192 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
│ │ │ │ -
193 {
│ │ │ │ -
194 writeBoundaries( gridout, dgfIndices, [] ( const Intersection &i ) -> int { return boundaryId( i ); } );
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
197 protected:
│ │ │ │ - │ │ │ │ -
199 };
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201
│ │ │ │ -
202 template< class GV >
│ │ │ │ -
│ │ │ │ -
203 inline auto DGFWriter< GV >::elementsSeeds ( const std::vector< Index > &newElemOrder ) const
│ │ │ │ -
204 -> std::vector< ElementSeed >
│ │ │ │ -
205 {
│ │ │ │ -
206 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
207
│ │ │ │ -
208 const std::size_t orderSize = newElemOrder.size() ;
│ │ │ │ -
209 std::vector< ElementSeed > elementSeeds( orderSize );
│ │ │ │ -
210
│ │ │ │ -
211 for( const Element &element : elements( gridView_ ) )
│ │ │ │ -
212 {
│ │ │ │ -
213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize );
│ │ │ │ -
214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed();
│ │ │ │ -
215 }
│ │ │ │ -
216
│ │ │ │ -
217 return elementSeeds;
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
220
│ │ │ │ -
221 template< class GV >
│ │ │ │ -
│ │ │ │ -
222 inline void DGFWriter< GV >::writeHeader ( std::ostream &gridout ) const
│ │ │ │ -
223 {
│ │ │ │ -
224 // set the stream to full double precision
│ │ │ │ -
225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield );
│ │ │ │ -
226 gridout.precision( 16 );
│ │ │ │ -
227
│ │ │ │ -
228 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
229
│ │ │ │ -
230 // write DGF header
│ │ │ │ -
231 gridout << "DGF" << std::endl;
│ │ │ │ -
232 gridout << "%" << " Elements = " << indexSet.size( 0 ) << " | Vertices = " << indexSet.size( dimGrid ) << std::endl;
│ │ │ │ -
233 }
│ │ │ │ -
│ │ │ │ -
234
│ │ │ │ -
235
│ │ │ │ -
236 template< class GV >
│ │ │ │ -
│ │ │ │ -
237 inline void DGFWriter< GV >::writeFooter ( std::ostream &gridout ) const
│ │ │ │ -
238 {
│ │ │ │ -
239 gridout << std::endl << "#" << std::endl;
│ │ │ │ -
240 }
│ │ │ │ -
│ │ │ │ -
241
│ │ │ │ -
242
│ │ │ │ -
243 template< class GV >
│ │ │ │ -
│ │ │ │ -
244 inline auto DGFWriter< GV >::writeVertices ( std::ostream &gridout ) const
│ │ │ │ -
245 -> std::vector< Index >
│ │ │ │ -
246 {
│ │ │ │ -
247 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
248
│ │ │ │ -
249 const Index vxSize = indexSet.size( dimGrid );
│ │ │ │ -
250 std::vector< Index > dgfIndices( vxSize, vxSize );
│ │ │ │ -
251
│ │ │ │ -
252 // write all vertices into the "vertex" block
│ │ │ │ -
253 gridout << std::endl << "VERTEX" << std::endl;
│ │ │ │ -
254 Index vertexCount = 0;
│ │ │ │ -
255 for( const Element &element : elements( gridView_ ) )
│ │ │ │ -
256 {
│ │ │ │ -
257 for( auto i : range( element.subEntities( dimGrid ) ) )
│ │ │ │ -
258 {
│ │ │ │ -
259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid );
│ │ │ │ -
260 assert( vxIndex < vxSize );
│ │ │ │ -
261 if( dgfIndices[ vxIndex ] == vxSize )
│ │ │ │ -
262 {
│ │ │ │ -
263 dgfIndices[ vxIndex ] = vertexCount++;
│ │ │ │ -
264 gridout << element.geometry().corner( i ) << std::endl;
│ │ │ │ -
265 }
│ │ │ │ -
266 }
│ │ │ │ -
267 }
│ │ │ │ -
268 gridout << "#" << std::endl;
│ │ │ │ -
269
│ │ │ │ -
270 if( vertexCount != vxSize )
│ │ │ │ -
271 DUNE_THROW( GridError, "IndexSet reports wrong number of vertices." );
│ │ │ │ -
272 return dgfIndices;
│ │ │ │ -
273 }
│ │ │ │ -
│ │ │ │ -
274
│ │ │ │ -
275
│ │ │ │ -
276 template< class GV >
│ │ │ │ -
│ │ │ │ -
277 inline void DGFWriter< GV >::writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const
│ │ │ │ -
278 {
│ │ │ │ -
279 // if element's type is not the same as the type to write the return
│ │ │ │ -
280 if( element.type() != elementType )
│ │ │ │ -
281 return;
│ │ │ │ -
282
│ │ │ │ -
283 // write vertex numbers of the element
│ │ │ │ -
284 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
285 for( auto i : range( element.subEntities( Element::dimension ) ) )
│ │ │ │ -
286 gridout << (i > 0 ? " " : "") << dgfIndices[ indexSet.subIndex( element, i, dimGrid ) ];
│ │ │ │ -
287 gridout << std::endl;
│ │ │ │ -
288 }
│ │ │ │ -
│ │ │ │ -
289
│ │ │ │ -
290
│ │ │ │ -
291 template< class GV >
│ │ │ │ -
│ │ │ │ -
292 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
│ │ │ │ -
293 {
│ │ │ │ -
294 // write all simplices to the "simplex" block
│ │ │ │ -
295 gridout << std::endl << "SIMPLEX" << std::endl;
│ │ │ │ -
296
│ │ │ │ -
297 // write all simplex elements
│ │ │ │ -
298 for( const Element &element : elements( gridView_ ) )
│ │ │ │ -
299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex( dimGrid ) );
│ │ │ │ -
300
│ │ │ │ -
301 // write end marker for block
│ │ │ │ -
302 gridout << "#" << std::endl;
│ │ │ │ -
303 }
│ │ │ │ -
│ │ │ │ -
304
│ │ │ │ -
305
│ │ │ │ -
306 template< class GV >
│ │ │ │ -
│ │ │ │ -
307 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
│ │ │ │ -
308 {
│ │ │ │ -
309 // write all simplices to the "simplex" block
│ │ │ │ -
310 gridout << std::endl << "SIMPLEX" << std::endl;
│ │ │ │ -
311
│ │ │ │ -
312 // write all simplex elements
│ │ │ │ -
313 for( const ElementSeed &seed : elementSeeds )
│ │ │ │ -
314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::simplex( dimGrid ) );
│ │ │ │ -
315
│ │ │ │ -
316 // write end marker for block
│ │ │ │ -
317 gridout << "#" << std::endl;
│ │ │ │ -
318 }
│ │ │ │ -
│ │ │ │ -
319
│ │ │ │ -
320
│ │ │ │ -
321 template< class GV >
│ │ │ │ -
│ │ │ │ -
322 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
│ │ │ │ -
323 {
│ │ │ │ -
324 // write all cubes to the "cube" block
│ │ │ │ -
325 gridout << std::endl << "CUBE" << std::endl;
│ │ │ │ -
326
│ │ │ │ -
327 // write all cube elements
│ │ │ │ -
328 for( const Element &element : elements( gridView_ ) )
│ │ │ │ -
329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid ) );
│ │ │ │ -
330
│ │ │ │ -
331 // write end marker for block
│ │ │ │ -
332 gridout << "#" << std::endl;
│ │ │ │ -
333 }
│ │ │ │ -
│ │ │ │ -
334
│ │ │ │ -
335
│ │ │ │ -
336 template< class GV >
│ │ │ │ -
│ │ │ │ -
337 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
│ │ │ │ -
338 {
│ │ │ │ -
339 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
340
│ │ │ │ -
341 // write all cubes to the "cube" block
│ │ │ │ -
342 gridout << std::endl << "CUBE" << std::endl;
│ │ │ │ -
343
│ │ │ │ -
344 // write all cube elements
│ │ │ │ -
345 for( const ElementSeed &seed : elementSeeds )
│ │ │ │ -
346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::cube( dimGrid ) );
│ │ │ │ -
347
│ │ │ │ -
348 // write end marker for block
│ │ │ │ -
349 gridout << "#" << std::endl;
│ │ │ │ -
350 }
│ │ │ │ -
│ │ │ │ -
351
│ │ │ │ -
352
│ │ │ │ -
353 template< class GV >
│ │ │ │ -
354 template< class... Args >
│ │ │ │ -
│ │ │ │ -
355 inline void DGFWriter< GV >::writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const
│ │ │ │ -
356 {
│ │ │ │ -
357 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
358
│ │ │ │ -
359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) > 0) )
│ │ │ │ -
360 writeSimplices( gridout, dgfIndices, args... );
│ │ │ │ -
361
│ │ │ │ -
362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 )
│ │ │ │ -
363 writeCubes( gridout, dgfIndices, args... );
│ │ │ │ -
364 }
│ │ │ │ -
│ │ │ │ -
365
│ │ │ │ -
366
│ │ │ │ -
367 template< class GV >
│ │ │ │ -
368 template< class BoundaryData >
│ │ │ │ -
│ │ │ │ -
369 inline void DGFWriter< GV >::writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const
│ │ │ │ -
370 {
│ │ │ │ -
371 using std::max;
│ │ │ │ -
372
│ │ │ │ -
373 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ -
374
│ │ │ │ -
375 // write all boundaries to the "boundarysegments" block
│ │ │ │ -
376 gridout << std::endl << "BOUNDARYSEGMENTS" << std::endl;
│ │ │ │ -
377
│ │ │ │ -
378 for( const Element &element : elements( gridView_ ) )
│ │ │ │ -
379 {
│ │ │ │ -
380 if( !element.hasBoundaryIntersections() )
│ │ │ │ -
381 continue;
│ │ │ │ -
382
│ │ │ │ -
383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid >::general( element.type() );
│ │ │ │ -
384 for( const Intersection &intersection : intersections( gridView_, element ) )
│ │ │ │ -
385 {
│ │ │ │ -
386 if( !intersection.boundary() )
│ │ │ │ -
387 continue;
│ │ │ │ -
388
│ │ │ │ -
389 const auto data = boundaryData( intersection );
│ │ │ │ -
390 const int bndId = max( boundaryId( intersection, data ), 1 );
│ │ │ │ -
391
│ │ │ │ -
392 const int faceNumber = intersection.indexInInside();
│ │ │ │ -
393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid );
│ │ │ │ -
394 gridout << bndId << " ";
│ │ │ │ -
395 for( auto i : range( faceSize ) )
│ │ │ │ -
396 {
│ │ │ │ -
397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid );
│ │ │ │ -
398 gridout << " " << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ];
│ │ │ │ -
399 }
│ │ │ │ -
400 appendBoundaryData( gridout, data );
│ │ │ │ -
401 }
│ │ │ │ -
402 }
│ │ │ │ -
403 gridout << "#" << std::endl;
│ │ │ │ -
404 }
│ │ │ │ -
│ │ │ │ -
405
│ │ │ │ -
406
│ │ │ │ -
407 template< class GV >
│ │ │ │ -
408 template< class BoundaryData >
│ │ │ │ -
│ │ │ │ -
409 inline void DGFWriter< GV >::write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
│ │ │ │ -
410 {
│ │ │ │ -
411 writeHeader( gridout );
│ │ │ │ -
412 auto dgfIndices = writeVertices( gridout );
│ │ │ │ -
413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) );
│ │ │ │ -
414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
│ │ │ │ -
415 gridout << addParams.str();
│ │ │ │ -
416 writeFooter( gridout );
│ │ │ │ -
417 }
│ │ │ │ -
│ │ │ │ -
418
│ │ │ │ -
419
│ │ │ │ -
420 template< class GV >
│ │ │ │ -
421 template< class BoundaryData >
│ │ │ │ -
│ │ │ │ -
422 inline void DGFWriter< GV >::write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
│ │ │ │ -
423 {
│ │ │ │ -
424 writeHeader( gridout );
│ │ │ │ -
425 auto dgfIndices = writeVertices( gridout );
│ │ │ │ -
426 writeElements( gridout, dgfIndices );
│ │ │ │ -
427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
│ │ │ │ -
428 gridout << addParams.str();
│ │ │ │ -
429 writeFooter( gridout );
│ │ │ │ -
430 }
│ │ │ │ -
│ │ │ │ -
431
│ │ │ │ -
432} // namespace Dune
│ │ │ │ -
433
│ │ │ │ -
434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ - │ │ │ │ -
Traits::Grid Grid
type of the grid
Definition common/gridview.hh:83
│ │ │ │ -
Traits::IndexSet IndexSet
type of the index set
Definition common/gridview.hh:86
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ -
Traits::Intersection Intersection
type of the intersection
Definition common/gridview.hh:89
│ │ │ │ +
16 namespace dgf
│ │ │ │ +
17 {
│ │ │ │ +
│ │ │ │ +
18 class DimBlock : public BasicBlock {
│ │ │ │ +
19 int _dimworld; // dimension of world
│ │ │ │ +
20 int _dim; // dimension of grid
│ │ │ │ +
21 public:
│ │ │ │ +
22 const static char* ID;
│ │ │ │ +
23 // initialize block and get dimension of world
│ │ │ │ +
24 DimBlock ( std :: istream &in );
│ │ │ │ +
25 // get dimension of world found in block
│ │ │ │ +
│ │ │ │ +
26 int dim() {
│ │ │ │ +
27 return _dim;
│ │ │ │ +
28 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
29 int dimworld() {
│ │ │ │ +
30 return _dimworld;
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32 // some information
│ │ │ │ +
│ │ │ │ +
33 bool ok() {
│ │ │ │ +
34 return true;
│ │ │ │ +
35 }
│ │ │ │ +
│ │ │ │ +
36 };
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
38 } // end namespace dgf
│ │ │ │ +
39
│ │ │ │ +
40} // end namespace Dune
│ │ │ │ +
41
│ │ │ │ +
42#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ -
IndexTypeImp IndexType
The type used for the indices.
Definition indexidset.hh:92
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ -
write a GridView to a DGF file
Definition dgfwriter.hh:46
│ │ │ │ -
static const int dimGrid
dimension of the grid
Definition dgfwriter.hh:56
│ │ │ │ -
DGFWriter(const GridView &gridView)
constructor
Definition dgfwriter.hh:72
│ │ │ │ -
void write(std::ostream &gridout, const std::stringstream &addParams=std::stringstream()) const
write the GridView into a std::ostream
Definition dgfwriter.hh:119
│ │ │ │ -
auto write(const std::string &fileName, Args &&... args) const -> std::void_t< decltype(this->write(std::declval< std::ostream & >(), std::declval< Args >()...)) >
write the GridView to a file
Definition dgfwriter.hh:131
│ │ │ │ -
void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData) const
Definition dgfwriter.hh:369
│ │ │ │ -
static int boundaryId(const Intersection &i)
Definition dgfwriter.hh:177
│ │ │ │ -
void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams=std::stringstream()) const
write the GridView into a std::ostream
Definition dgfwriter.hh:107
│ │ │ │ -
void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams=std::stringstream()) const
write the GridView into a std::ostream
Definition dgfwriter.hh:409
│ │ │ │ -
GridView gridView_
Definition dgfwriter.hh:198
│ │ │ │ -
void writeElement(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType) const
Definition dgfwriter.hh:277
│ │ │ │ -
GV GridView
type of grid view
Definition dgfwriter.hh:51
│ │ │ │ -
void writeFooter(std::ostream &gridout) const
Definition dgfwriter.hh:237
│ │ │ │ -
GridView::Grid Grid
type of underlying hierarchical grid
Definition dgfwriter.hh:53
│ │ │ │ -
auto writeVertices(std::ostream &gridout) const -> std::vector< Index >
Definition dgfwriter.hh:244
│ │ │ │ -
void writeElements(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args) const
Definition dgfwriter.hh:355
│ │ │ │ -
void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
Definition dgfwriter.hh:192
│ │ │ │ -
void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
Definition dgfwriter.hh:322
│ │ │ │ -
void writeSimplices(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
Definition dgfwriter.hh:292
│ │ │ │ -
void writeHeader(std::ostream &gridout) const
Definition dgfwriter.hh:222
│ │ │ │ -
auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std::vector< ElementSeed >
Definition dgfwriter.hh:203
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
Definition dim.hh:18
│ │ │ │ +
int dimworld()
Definition dim.hh:29
│ │ │ │ +
static const char * ID
Definition dim.hh:22
│ │ │ │ +
bool ok()
Definition dim.hh:33
│ │ │ │ +
int dim()
Definition dim.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,557 +3,75 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfwriter.hh │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +dim.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ -6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ +5#ifndef DUNE_DGF_DIMBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_DIMBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 15 │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ -18#include │ │ │ │ │ -19#include │ │ │ │ │ -20#include │ │ │ │ │ -21#include │ │ │ │ │ -22 │ │ │ │ │ -23#include │ │ │ │ │ -24#include │ │ │ │ │ -25 │ │ │ │ │ -26#include │ │ │ │ │ -27#include │ │ │ │ │ -28 │ │ │ │ │ -29#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -30#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ -31 │ │ │ │ │ -32namespace _D_u_n_e │ │ │ │ │ -33{ │ │ │ │ │ -34 │ │ │ │ │ -44 template< class GV > │ │ │ │ │ -_4_5 class _D_G_F_W_r_i_t_e_r │ │ │ │ │ -46 { │ │ │ │ │ -47 typedef _D_G_F_W_r_i_t_e_r_<_ _G_V_ _> _T_h_i_s; │ │ │ │ │ -48 │ │ │ │ │ -49 public: │ │ │ │ │ -_5_1 typedef GV _G_r_i_d_V_i_e_w; │ │ │ │ │ -_5_3 typedef typename _G_r_i_d_V_i_e_w_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ -54 │ │ │ │ │ -_5_6 static const int _d_i_m_G_r_i_d = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -57 │ │ │ │ │ -58 private: │ │ │ │ │ -59 typedef typename _G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t IndexSet; │ │ │ │ │ -60 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Element; │ │ │ │ │ -61 typedef typename _G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n Intersection; │ │ │ │ │ -62 │ │ │ │ │ -63 typedef typename Element::EntitySeed ElementSeed; │ │ │ │ │ -64 │ │ │ │ │ -65 typedef typename _I_n_d_e_x_S_e_t_:_:_I_n_d_e_x_T_y_p_e Index; │ │ │ │ │ -66 │ │ │ │ │ -67 public: │ │ │ │ │ -_7_2 _D_G_F_W_r_i_t_e_r ( const _G_r_i_d_V_i_e_w &gridView ) │ │ │ │ │ -73 : _g_r_i_d_V_i_e_w__( gridView ) │ │ │ │ │ -74 {} │ │ │ │ │ -75 │ │ │ │ │ -85 template< class BoundaryData > │ │ │ │ │ -86 void _w_r_i_t_e ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams │ │ │ │ │ -= std::stringstream() ) const; │ │ │ │ │ -87 │ │ │ │ │ -96 template< class BoundaryData > │ │ │ │ │ -97 void _w_r_i_t_e ( std::ostream &gridout, BoundaryData &&boundaryData, const std:: │ │ │ │ │ -stringstream &addParams = std::stringstream() ) const; │ │ │ │ │ -98 │ │ │ │ │ -_1_0_7 void _w_r_i_t_e ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&newElemOrder, const std::stringstream &addParams = std::stringstream() ) const │ │ │ │ │ -108 { │ │ │ │ │ -109 _w_r_i_t_e( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return │ │ │ │ │ -boundaryId( i ); }, addParams ); │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -_1_1_9 void _w_r_i_t_e ( std::ostream &gridout, const std::stringstream &addParams = │ │ │ │ │ -std::stringstream() ) const │ │ │ │ │ -120 { │ │ │ │ │ -121 _w_r_i_t_e( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i │ │ │ │ │ -); }, addParams ); │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -130 template< class... Args > │ │ │ │ │ -_1_3_1 auto _w_r_i_t_e ( const std::string &fileName, Args &&... args ) const │ │ │ │ │ -132 -> std::void_t< decltype( this->_w_r_i_t_e( std::declval< std::ostream & >(), │ │ │ │ │ -std::declval< Args >()... ) ) > │ │ │ │ │ -133 { │ │ │ │ │ -134 std::ofstream gridout( fileName ); │ │ │ │ │ -135 if( gridout ) │ │ │ │ │ -136 _w_r_i_t_e( gridout, std::forward< Args >( args )... ); │ │ │ │ │ -137 else │ │ │ │ │ -138 std::cerr << "Couldn't open file `"<< fileName << "'!"<< std::endl; │ │ │ │ │ -139 } │ │ │ │ │ -140 │ │ │ │ │ -141 protected: │ │ │ │ │ -142 auto _e_l_e_m_e_n_t_s_S_e_e_d_s ( const std::vector< Index > &newElemOrder ) const │ │ │ │ │ -143 -> std::vector< ElementSeed >; │ │ │ │ │ -144 │ │ │ │ │ -145 void _w_r_i_t_e_H_e_a_d_e_r ( std::ostream &gridout ) const; │ │ │ │ │ -146 void _w_r_i_t_e_F_o_o_t_e_r ( std::ostream &gridout ) const; │ │ │ │ │ -147 │ │ │ │ │ -148 auto _w_r_i_t_e_V_e_r_t_i_c_e_s ( std::ostream &gridout ) const │ │ │ │ │ -149 -> std::vector< Index >; │ │ │ │ │ -150 │ │ │ │ │ -151 void _w_r_i_t_e_E_l_e_m_e_n_t ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, const Element &element, const GeometryType &elementType ) const; │ │ │ │ │ -152 │ │ │ │ │ -153 void _w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices ) const; │ │ │ │ │ -154 void _w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const; │ │ │ │ │ -155 │ │ │ │ │ -156 void _w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices ) const; │ │ │ │ │ -157 void _w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const; │ │ │ │ │ -158 │ │ │ │ │ -159 template< class... Args > │ │ │ │ │ -160 void _w_r_i_t_e_E_l_e_m_e_n_t_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, const Args &... args ) const; │ │ │ │ │ -161 │ │ │ │ │ -162 private: │ │ │ │ │ -163 template< class I > │ │ │ │ │ -164 static auto boundaryId ( const I &i, PriorityTag< 1 > ) │ │ │ │ │ -165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl │ │ │ │ │ -().boundaryId() ) >, int >::value, int > │ │ │ │ │ -166 { │ │ │ │ │ -167 return i.impl().boundaryId(); │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -170 template< class I > │ │ │ │ │ -171 static int boundaryId ( const I &i, PriorityTag< 0 > ) │ │ │ │ │ -172 { │ │ │ │ │ -173 return 1; │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 protected: │ │ │ │ │ -_1_7_7 static int _b_o_u_n_d_a_r_y_I_d ( const Intersection &i ) { return _b_o_u_n_d_a_r_y_I_d( i, │ │ │ │ │ -PriorityTag< 42 >() ); } │ │ │ │ │ -178 │ │ │ │ │ -179 private: │ │ │ │ │ -180 static int boundaryId ( const _I_n_t_e_r_s_e_c_t_i_o_n &, int bndId ) { return bndId; } │ │ │ │ │ -181 static int boundaryId ( const Intersection &i, const std::string & ) │ │ │ │ │ -{ return boundaryId( i ); } │ │ │ │ │ -182 static int boundaryId ( const Intersection &i, const std::pair< int, std:: │ │ │ │ │ -string > &data ) { return boundrayId( i, data.first ); } │ │ │ │ │ -183 │ │ │ │ │ -184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout << │ │ │ │ │ -std::endl; } │ │ │ │ │ -185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int, │ │ │ │ │ -std::string > &data ) { appendBoundaryData( gridout, data.second ); } │ │ │ │ │ -186 static void appendBoundaryData ( std::ostream &gridout, const std::string │ │ │ │ │ -&s ) { gridout << " : " << s << std::endl; } │ │ │ │ │ -187 │ │ │ │ │ -188 protected: │ │ │ │ │ -189 template< class BoundaryData > │ │ │ │ │ -190 void _w_r_i_t_e_B_o_u_n_d_a_r_i_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, BoundaryData &&boundaryData ) const; │ │ │ │ │ -191 │ │ │ │ │ -_1_9_2 void _w_r_i_t_e_B_o_u_n_d_a_r_i_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices ) const │ │ │ │ │ -193 { │ │ │ │ │ -194 _w_r_i_t_e_B_o_u_n_d_a_r_i_e_s( gridout, dgfIndices, [] ( const Intersection &i ) -> int │ │ │ │ │ -{ return boundaryId( i ); } ); │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -197 protected: │ │ │ │ │ -_1_9_8 _G_r_i_d_V_i_e_w _g_r_i_d_V_i_e_w__; │ │ │ │ │ -199 }; │ │ │ │ │ -200 │ │ │ │ │ -201 │ │ │ │ │ -202 template< class GV > │ │ │ │ │ -_2_0_3 inline auto _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_e_l_e_m_e_n_t_s_S_e_e_d_s ( const std::vector< Index > │ │ │ │ │ -&newElemOrder ) const │ │ │ │ │ -204 -> std::vector< ElementSeed > │ │ │ │ │ -205 { │ │ │ │ │ -206 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -207 │ │ │ │ │ -208 const std::size_t orderSize = newElemOrder.size() ; │ │ │ │ │ -209 std::vector< ElementSeed > elementSeeds( orderSize ); │ │ │ │ │ -210 │ │ │ │ │ -211 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ -212 { │ │ │ │ │ -213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize ); │ │ │ │ │ -214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed(); │ │ │ │ │ -215 } │ │ │ │ │ -216 │ │ │ │ │ -217 return elementSeeds; │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -220 │ │ │ │ │ -221 template< class GV > │ │ │ │ │ -_2_2_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_H_e_a_d_e_r ( std::ostream &gridout ) const │ │ │ │ │ -223 { │ │ │ │ │ -224 // set the stream to full double precision │ │ │ │ │ -225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield ); │ │ │ │ │ -226 gridout.precision( 16 ); │ │ │ │ │ -227 │ │ │ │ │ -228 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -229 │ │ │ │ │ -230 // write DGF header │ │ │ │ │ -231 gridout << "DGF" << std::endl; │ │ │ │ │ -232 gridout << "%" << " Elements = " << indexSet.size( 0 ) << " | Vertices = " │ │ │ │ │ -<< indexSet.size( dimGrid ) << std::endl; │ │ │ │ │ -233 } │ │ │ │ │ -234 │ │ │ │ │ -235 │ │ │ │ │ -236 template< class GV > │ │ │ │ │ -_2_3_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_F_o_o_t_e_r ( std::ostream &gridout ) const │ │ │ │ │ -238 { │ │ │ │ │ -239 gridout << std::endl << "#" << std::endl; │ │ │ │ │ -240 } │ │ │ │ │ -241 │ │ │ │ │ -242 │ │ │ │ │ -243 template< class GV > │ │ │ │ │ -_2_4_4 inline auto _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_V_e_r_t_i_c_e_s ( std::ostream &gridout ) const │ │ │ │ │ -245 -> std::vector< Index > │ │ │ │ │ -246 { │ │ │ │ │ -247 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -248 │ │ │ │ │ -249 const Index vxSize = indexSet.size( dimGrid ); │ │ │ │ │ -250 std::vector< Index > dgfIndices( vxSize, vxSize ); │ │ │ │ │ -251 │ │ │ │ │ -252 // write all vertices into the "vertex" block │ │ │ │ │ -253 gridout << std::endl << "VERTEX" << std::endl; │ │ │ │ │ -254 Index vertexCount = 0; │ │ │ │ │ -255 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ -256 { │ │ │ │ │ -257 for( auto i : range( element.subEntities( dimGrid ) ) ) │ │ │ │ │ -258 { │ │ │ │ │ -259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid ); │ │ │ │ │ -260 assert( vxIndex < vxSize ); │ │ │ │ │ -261 if( dgfIndices[ vxIndex ] == vxSize ) │ │ │ │ │ -262 { │ │ │ │ │ -263 dgfIndices[ vxIndex ] = vertexCount++; │ │ │ │ │ -264 gridout << element.geometry().corner( i ) << std::endl; │ │ │ │ │ -265 } │ │ │ │ │ -266 } │ │ │ │ │ -267 } │ │ │ │ │ -268 gridout << "#" << std::endl; │ │ │ │ │ -269 │ │ │ │ │ -270 if( vertexCount != vxSize ) │ │ │ │ │ -271 DUNE_THROW( _G_r_i_d_E_r_r_o_r, "IndexSet reports wrong number of vertices." ); │ │ │ │ │ -272 return dgfIndices; │ │ │ │ │ -273 } │ │ │ │ │ -274 │ │ │ │ │ -275 │ │ │ │ │ -276 template< class GV > │ │ │ │ │ -_2_7_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_E_l_e_m_e_n_t ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices, const Element &element, const GeometryType │ │ │ │ │ -&elementType ) const │ │ │ │ │ -278 { │ │ │ │ │ -279 // if element's type is not the same as the type to write the return │ │ │ │ │ -280 if( element.type() != elementType ) │ │ │ │ │ -281 return; │ │ │ │ │ -282 │ │ │ │ │ -283 // write vertex numbers of the element │ │ │ │ │ -284 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -285 for( auto i : range( element.subEntities( Element::dimension ) ) ) │ │ │ │ │ -286 gridout << (i > 0 ? " " : "") << dgfIndices[ indexSet.subIndex( element, i, │ │ │ │ │ -dimGrid ) ]; │ │ │ │ │ -287 gridout << std::endl; │ │ │ │ │ -288 } │ │ │ │ │ -289 │ │ │ │ │ -290 │ │ │ │ │ -291 template< class GV > │ │ │ │ │ -_2_9_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices ) const │ │ │ │ │ -293 { │ │ │ │ │ -294 // write all simplices to the "simplex" block │ │ │ │ │ -295 gridout << std::endl << "SIMPLEX" << std::endl; │ │ │ │ │ -296 │ │ │ │ │ -297 // write all simplex elements │ │ │ │ │ -298 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ -299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex( dimGrid │ │ │ │ │ -) ); │ │ │ │ │ -300 │ │ │ │ │ -301 // write end marker for block │ │ │ │ │ -302 gridout << "#" << std::endl; │ │ │ │ │ -303 } │ │ │ │ │ -304 │ │ │ │ │ -305 │ │ │ │ │ -306 template< class GV > │ │ │ │ │ -_3_0_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices, const std::vector< ElementSeed > │ │ │ │ │ -&elementSeeds ) const │ │ │ │ │ -308 { │ │ │ │ │ -309 // write all simplices to the "simplex" block │ │ │ │ │ -310 gridout << std::endl << "SIMPLEX" << std::endl; │ │ │ │ │ -311 │ │ │ │ │ -312 // write all simplex elements │ │ │ │ │ -313 for( const ElementSeed &seed : elementSeeds ) │ │ │ │ │ -314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), │ │ │ │ │ -GeometryTypes::simplex( dimGrid ) ); │ │ │ │ │ -315 │ │ │ │ │ -316 // write end marker for block │ │ │ │ │ -317 gridout << "#" << std::endl; │ │ │ │ │ -318 } │ │ │ │ │ -319 │ │ │ │ │ -320 │ │ │ │ │ -321 template< class GV > │ │ │ │ │ -_3_2_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices ) const │ │ │ │ │ -323 { │ │ │ │ │ -324 // write all cubes to the "cube" block │ │ │ │ │ -325 gridout << std::endl << "CUBE" << std::endl; │ │ │ │ │ -326 │ │ │ │ │ -327 // write all cube elements │ │ │ │ │ -328 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ -329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid ) │ │ │ │ │ -); │ │ │ │ │ -330 │ │ │ │ │ -331 // write end marker for block │ │ │ │ │ -332 gridout << "#" << std::endl; │ │ │ │ │ -333 } │ │ │ │ │ -334 │ │ │ │ │ -335 │ │ │ │ │ -336 template< class GV > │ │ │ │ │ -_3_3_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices, const std::vector< ElementSeed > │ │ │ │ │ -&elementSeeds ) const │ │ │ │ │ -338 { │ │ │ │ │ -339 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -340 │ │ │ │ │ -341 // write all cubes to the "cube" block │ │ │ │ │ -342 gridout << std::endl << "CUBE" << std::endl; │ │ │ │ │ -343 │ │ │ │ │ -344 // write all cube elements │ │ │ │ │ -345 for( const ElementSeed &seed : elementSeeds ) │ │ │ │ │ -346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), │ │ │ │ │ -GeometryTypes::cube( dimGrid ) ); │ │ │ │ │ -347 │ │ │ │ │ -348 // write end marker for block │ │ │ │ │ -349 gridout << "#" << std::endl; │ │ │ │ │ -350 } │ │ │ │ │ -351 │ │ │ │ │ -352 │ │ │ │ │ -353 template< class GV > │ │ │ │ │ -354 template< class... Args > │ │ │ │ │ -_3_5_5 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_E_l_e_m_e_n_t_s ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices, const Args &... args ) const │ │ │ │ │ -356 { │ │ │ │ │ -357 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -358 │ │ │ │ │ -359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) > │ │ │ │ │ -0) ) │ │ │ │ │ -360 writeSimplices( gridout, dgfIndices, args... ); │ │ │ │ │ -361 │ │ │ │ │ -362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 ) │ │ │ │ │ -363 writeCubes( gridout, dgfIndices, args... ); │ │ │ │ │ -364 } │ │ │ │ │ -365 │ │ │ │ │ -366 │ │ │ │ │ -367 template< class GV > │ │ │ │ │ -368 template< class BoundaryData > │ │ │ │ │ -_3_6_9 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_B_o_u_n_d_a_r_i_e_s ( std::ostream &gridout, const │ │ │ │ │ -std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const │ │ │ │ │ -370 { │ │ │ │ │ -371 using std::max; │ │ │ │ │ -372 │ │ │ │ │ -373 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ -374 │ │ │ │ │ -375 // write all boundaries to the "boundarysegments" block │ │ │ │ │ -376 gridout << std::endl << "BOUNDARYSEGMENTS" << std::endl; │ │ │ │ │ -377 │ │ │ │ │ -378 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ -379 { │ │ │ │ │ -380 if( !element.hasBoundaryIntersections() ) │ │ │ │ │ -381 continue; │ │ │ │ │ -382 │ │ │ │ │ -383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid │ │ │ │ │ ->::general( element.type() ); │ │ │ │ │ -384 for( const Intersection &intersection : intersections( gridView_, element ) │ │ │ │ │ -) │ │ │ │ │ -385 { │ │ │ │ │ -386 if( !intersection.boundary() ) │ │ │ │ │ -387 continue; │ │ │ │ │ -388 │ │ │ │ │ -389 const auto data = boundaryData( intersection ); │ │ │ │ │ -390 const int bndId = max( boundaryId( intersection, data ), 1 ); │ │ │ │ │ -391 │ │ │ │ │ -392 const int faceNumber = intersection.indexInInside(); │ │ │ │ │ -393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid ); │ │ │ │ │ -394 gridout << bndId << " "; │ │ │ │ │ -395 for( auto i : range( faceSize ) ) │ │ │ │ │ -396 { │ │ │ │ │ -397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid ); │ │ │ │ │ -398 gridout << " " << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ]; │ │ │ │ │ -399 } │ │ │ │ │ -400 appendBoundaryData( gridout, data ); │ │ │ │ │ -401 } │ │ │ │ │ -402 } │ │ │ │ │ -403 gridout << "#" << std::endl; │ │ │ │ │ -404 } │ │ │ │ │ -405 │ │ │ │ │ -406 │ │ │ │ │ -407 template< class GV > │ │ │ │ │ -408 template< class BoundaryData > │ │ │ │ │ -_4_0_9 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e ( std::ostream &gridout, const std:: │ │ │ │ │ -vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std:: │ │ │ │ │ -stringstream &addParams ) const │ │ │ │ │ -410 { │ │ │ │ │ -411 writeHeader( gridout ); │ │ │ │ │ -412 auto dgfIndices = writeVertices( gridout ); │ │ │ │ │ -413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) ); │ │ │ │ │ -414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData > │ │ │ │ │ -( boundaryData ) ); │ │ │ │ │ -415 gridout << addParams.str(); │ │ │ │ │ -416 writeFooter( gridout ); │ │ │ │ │ -417 } │ │ │ │ │ -418 │ │ │ │ │ -419 │ │ │ │ │ -420 template< class GV > │ │ │ │ │ -421 template< class BoundaryData > │ │ │ │ │ -_4_2_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e ( std::ostream &gridout, BoundaryData │ │ │ │ │ -&&boundaryData, const std::stringstream &addParams ) const │ │ │ │ │ -423 { │ │ │ │ │ -424 writeHeader( gridout ); │ │ │ │ │ -425 auto dgfIndices = writeVertices( gridout ); │ │ │ │ │ -426 writeElements( gridout, dgfIndices ); │ │ │ │ │ -427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData > │ │ │ │ │ -( boundaryData ) ); │ │ │ │ │ -428 gridout << addParams.str(); │ │ │ │ │ -429 writeFooter( gridout ); │ │ │ │ │ -430 } │ │ │ │ │ -431 │ │ │ │ │ -432} // namespace Dune │ │ │ │ │ -433 │ │ │ │ │ -434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ -_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ -Traits::Grid Grid │ │ │ │ │ -type of the grid │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Traits::IndexSet IndexSet │ │ │ │ │ -type of the index set │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Traits::Intersection Intersection │ │ │ │ │ -type of the intersection │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:89 │ │ │ │ │ +16 namespace dgf │ │ │ │ │ +17 { │ │ │ │ │ +_1_8 class _D_i_m_B_l_o_c_k : public _B_a_s_i_c_B_l_o_c_k { │ │ │ │ │ +19 int _dimworld; // dimension of world │ │ │ │ │ +20 int _dim; // dimension of grid │ │ │ │ │ +21 public: │ │ │ │ │ +_2_2 const static char* _I_D; │ │ │ │ │ +23 // initialize block and get dimension of world │ │ │ │ │ +24 _D_i_m_B_l_o_c_k ( std :: istream &in ); │ │ │ │ │ +25 // get dimension of world found in block │ │ │ │ │ +_2_6 int _d_i_m() { │ │ │ │ │ +27 return _dim; │ │ │ │ │ +28 } │ │ │ │ │ +_2_9 int _d_i_m_w_o_r_l_d() { │ │ │ │ │ +30 return _dimworld; │ │ │ │ │ +31 } │ │ │ │ │ +32 // some information │ │ │ │ │ +_3_3 bool _o_k() { │ │ │ │ │ +34 return true; │ │ │ │ │ +35 } │ │ │ │ │ +36 }; │ │ │ │ │ +37 │ │ │ │ │ +38 } // end namespace dgf │ │ │ │ │ +39 │ │ │ │ │ +40} // end namespace Dune │ │ │ │ │ +41 │ │ │ │ │ +42#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ -Base class for exceptions in Dune grid modules. │ │ │ │ │ -DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_I_n_d_e_x_T_y_p_e │ │ │ │ │ -IndexTypeImp IndexType │ │ │ │ │ -The type used for the indices. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -A struct that collects all associated types of one implementation from the │ │ │ │ │ -Traits class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r │ │ │ │ │ -write a GridView to a DGF file │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_d_i_m_G_r_i_d │ │ │ │ │ -static const int dimGrid │ │ │ │ │ -dimension of the grid │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_D_G_F_W_r_i_t_e_r │ │ │ │ │ -DGFWriter(const GridView &gridView) │ │ │ │ │ -constructor │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -void write(std::ostream &gridout, const std::stringstream &addParams=std:: │ │ │ │ │ -stringstream()) const │ │ │ │ │ -write the GridView into a std::ostream │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -auto write(const std::string &fileName, Args &&... args) const -> std::void_t< │ │ │ │ │ -decltype(this->write(std::declval< std::ostream & >(), std::declval< Args > │ │ │ │ │ -()...)) > │ │ │ │ │ -write the GridView to a file │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_B_o_u_n_d_a_r_i_e_s │ │ │ │ │ -void writeBoundaries(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, BoundaryData &&boundaryData) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:369 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -static int boundaryId(const Intersection &i) │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, │ │ │ │ │ -const std::stringstream &addParams=std::stringstream()) const │ │ │ │ │ -write the GridView into a std::ostream │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, │ │ │ │ │ -BoundaryData &&boundaryData, const std::stringstream &addParams=std:: │ │ │ │ │ -stringstream()) const │ │ │ │ │ -write the GridView into a std::ostream │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:409 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_g_r_i_d_V_i_e_w__ │ │ │ │ │ -GridView gridView_ │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:198 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -void writeElement(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, const Element &element, const GeometryType &elementType) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:277 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ -GV GridView │ │ │ │ │ -type of grid view │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_F_o_o_t_e_r │ │ │ │ │ -void writeFooter(std::ostream &gridout) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:237 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_G_r_i_d │ │ │ │ │ -GridView::Grid Grid │ │ │ │ │ -type of underlying hierarchical grid │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_V_e_r_t_i_c_e_s │ │ │ │ │ -auto writeVertices(std::ostream &gridout) const -> std::vector< Index > │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:244 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_E_l_e_m_e_n_t_s │ │ │ │ │ -void writeElements(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices, const Args &... args) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:355 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_B_o_u_n_d_a_r_i_e_s │ │ │ │ │ -void writeBoundaries(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_C_u_b_e_s │ │ │ │ │ -void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices) │ │ │ │ │ -const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:322 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_S_i_m_p_l_i_c_e_s │ │ │ │ │ -void writeSimplices(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ -&dgfIndices) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_H_e_a_d_e_r │ │ │ │ │ -void writeHeader(std::ostream &gridout) const │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:222 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_e_l_e_m_e_n_t_s_S_e_e_d_s │ │ │ │ │ -auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std:: │ │ │ │ │ -vector< ElementSeed > │ │ │ │ │ -DDeeffiinniittiioonn dgfwriter.hh:203 │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn dim.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_d_i_m_w_o_r_l_d │ │ │ │ │ +int dimworld() │ │ │ │ │ +DDeeffiinniittiioonn dim.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_I_D │ │ │ │ │ +static const char * ID │ │ │ │ │ +DDeeffiinniittiioonn dim.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_o_k │ │ │ │ │ +bool ok() │ │ │ │ │ +DDeeffiinniittiioonn dim.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_i_m_B_l_o_c_k_:_:_d_i_m │ │ │ │ │ +int dim() │ │ │ │ │ +DDeeffiinniittiioonn dim.hh:26 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey_inline.hh File Reference │ │ │ │ +dune-grid: interval.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
entitykey_inline.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
interval.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <array>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::dgf::IntervalBlock
 
struct  Dune::dgf::IntervalBlock::Interval
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,19 +3,32 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -entitykey_inline.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_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 │ │ │ │ │ +interval.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _I_n_t_e_r_v_a_l_B_l_o_c_k_:_: │ │ │ │ │ + _I_n_t_e_r_v_a_l &interval) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey_inline.hh Source File │ │ │ │ +dune-grid: interval.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,230 +70,210 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entitykey_inline.hh
│ │ │ │ +
interval.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ -
6#define DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ +
5#ifndef DUNE_DGF_INTERVALBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_INTERVALBLOCK_HH
│ │ │ │
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <dune/geometry/referenceelements.hh>
│ │ │ │ - │ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10#include <array>
│ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ + │ │ │ │ +
13
│ │ │ │
14
│ │ │ │ -
15 // DGFEntityKey
│ │ │ │ -
16 // ------------
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │
17
│ │ │ │ -
18 template< class A >
│ │ │ │ -
│ │ │ │ -
19 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey )
│ │ │ │ -
20 : key_( key.size() ),
│ │ │ │ -
21 origKey_( key.size() ),
│ │ │ │ -
│ │ │ │ -
22 origKeySet_( setOrigKey )
│ │ │ │ -
23 {
│ │ │ │ -
24 for (size_t i=0; i<key_.size(); i++)
│ │ │ │ -
│ │ │ │ -
25 {
│ │ │ │ -
26 key_[i]=key[i];
│ │ │ │ +
18 namespace dgf
│ │ │ │ +
19 {
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : public BasicBlock
│ │ │ │ +
23 {
│ │ │ │ +
│ │ │ │ +
24 struct Interval
│ │ │ │ +
25 {
│ │ │ │ + │ │ │ │
│ │ │ │ -
27 origKey_[i]=key_[i];
│ │ │ │ -
28 }
│ │ │ │ -
29 std :: sort( key_.begin(), key_.end() );
│ │ │ │ -
30 }
│ │ │ │ -
31
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
33 template< class A >
│ │ │ │ -
34 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key,
│ │ │ │ -
35 int N, int offset, bool setOrigKey )
│ │ │ │ -
36 : key_( N ),
│ │ │ │ -
37 origKey_( N ),
│ │ │ │ -
38 origKeySet_( setOrigKey )
│ │ │ │ -
39 {
│ │ │ │ -
40 for (size_t i=0; i<key_.size(); i++)
│ │ │ │ -
41 {
│ │ │ │ -
42 key_[i]=key[(i+offset)%key.size()];
│ │ │ │ -
43 origKey_[i]=key[(i+offset)%key.size()];
│ │ │ │ -
44 }
│ │ │ │ -
45 std :: sort( key_.begin(), key_.end() );
│ │ │ │ -
46 }
│ │ │ │ -
47
│ │ │ │ -
48
│ │ │ │ -
49 template< class A >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51 : key_( k.key_.size() ),
│ │ │ │ -
52 origKey_( k.key_.size() ),
│ │ │ │ -
53 origKeySet_( k. origKeySet_ )
│ │ │ │ -
54 {
│ │ │ │ -
55 for (size_t i=0; i<key_.size(); i++)
│ │ │ │ -
56 {
│ │ │ │ -
57 key_[i]=k.key_[i];
│ │ │ │ -
58 origKey_[i]=k.origKey_[i];
│ │ │ │ -
59 }
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62
│ │ │ │ -
63 template< class A >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
65 {
│ │ │ │ -
66 assert(key_.size()==k.key_.size());
│ │ │ │ -
67 for (size_t i=0; i<key_.size(); i++) {
│ │ │ │ -
68 key_[i]=k.key_[i];
│ │ │ │ -
69 origKey_[i]=k.origKey_[i];
│ │ │ │ -
70 }
│ │ │ │ -
71 origKeySet_ = k.origKeySet_;
│ │ │ │ -
72 return *this;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75
│ │ │ │ -
76 template< class A >
│ │ │ │ -
77 inline void DGFEntityKey< A >
│ │ │ │ -
│ │ │ │ -
78 :: orientation ( int base, std::vector< std :: vector< double > > &vtx )
│ │ │ │ -
79 {
│ │ │ │ -
80 if (key_.size()==3) {
│ │ │ │ -
81 assert( (size_t) origKey_[0] < vtx.size() );
│ │ │ │ -
82 std::vector<double>& p0 = vtx[origKey_[0]];
│ │ │ │ -
83 assert( (size_t) origKey_[1] < vtx.size() );
│ │ │ │ -
84 std::vector<double>& p1 = vtx[origKey_[1]];
│ │ │ │ -
85 assert( (size_t) origKey_[2] < vtx.size() );
│ │ │ │ -
86 std::vector<double>& p2 = vtx[origKey_[2]];
│ │ │ │ -
87 assert( (size_t) base < vtx.size() );
│ │ │ │ -
88 std::vector<double>& q = vtx[base];
│ │ │ │ -
89 double n[3];
│ │ │ │ -
90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]);
│ │ │ │ -
91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]);
│ │ │ │ -
92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]);
│ │ │ │ -
93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]);
│ │ │ │ -
94 bool reorient = (test>0);
│ │ │ │ -
95 if (reorient) {
│ │ │ │ -
96 A key1=origKey_[1];
│ │ │ │ -
97 origKey_[1]=origKey_[2];
│ │ │ │ -
98 origKey_[2]=key1;
│ │ │ │ -
99 }
│ │ │ │ -
100 }
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
103
│ │ │ │ -
104 template< class A >
│ │ │ │ -
│ │ │ │ -
105 inline void DGFEntityKey< A > :: print ( std :: ostream &out ) const
│ │ │ │ -
106 {
│ │ │ │ -
107 for( size_t i = 0; i < key_.size(); ++i )
│ │ │ │ -
108 out << key_[ i ] << " ";
│ │ │ │ -
109 out << std :: endl;
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
112
│ │ │ │ -
113 // ElementFaceUtil
│ │ │ │ -
114 // ---------------
│ │ │ │ -
115
│ │ │ │ -
116 template< int dim >
│ │ │ │ - │ │ │ │ -
118 ElementFaceUtil::generateCubeFace
│ │ │ │ -
119 ( const std::vector< unsigned int > &element, int f )
│ │ │ │ -
120 {
│ │ │ │ -
121 auto refCube = ReferenceElements< double, dim >::cube();
│ │ │ │ -
122 const unsigned int size = refCube.size( f, 1, dim );
│ │ │ │ -
123 std::vector< unsigned int > k( size );
│ │ │ │ -
124 for( unsigned int i = 0; i < size; ++ i )
│ │ │ │ -
125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ];
│ │ │ │ - │ │ │ │ -
127 }
│ │ │ │ -
128
│ │ │ │ -
129
│ │ │ │ -
130 template< int dim >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
132 ElementFaceUtil :: generateSimplexFace
│ │ │ │ -
133 ( const std :: vector< unsigned int > &element, int f )
│ │ │ │ -
134 {
│ │ │ │ -
135 auto refSimplex = ReferenceElements< double, dim >::simplex();
│ │ │ │ -
136 const unsigned int size = refSimplex.size( f, 1, dim );
│ │ │ │ -
137 std :: vector< unsigned int > k( size );
│ │ │ │ -
138 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ -
139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ];
│ │ │ │ - │ │ │ │ -
141 }
│ │ │ │ +
27 Interval( const Interval& interval, const std::vector<int>& map )
│ │ │ │ +
28 {
│ │ │ │ +
29 copy( interval, map );
│ │ │ │ +
30 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
31 void copy(const Interval& interval, const std::vector<int>& map )
│ │ │ │ +
32 {
│ │ │ │ +
33 const int size = map.size();
│ │ │ │ +
34 p[0].resize( size );
│ │ │ │ +
35 p[1].resize( size );
│ │ │ │ +
36 n.resize( size );
│ │ │ │ +
37 h.resize( size );
│ │ │ │ +
38 assert( size == int(interval.n.size()) );
│ │ │ │ +
39 for( int i=0; i<size; ++i )
│ │ │ │ +
40 {
│ │ │ │ +
41 p[ 0 ][ i ] = interval.p[ 0 ][ map[ i ] ];
│ │ │ │ +
42 p[ 1 ][ i ] = interval.p[ 1 ][ map[ i ] ];
│ │ │ │ +
43 n[ i ] = interval.n[ map[ i ] ];
│ │ │ │ +
44 h[ i ] = interval.h[ map[ i ] ];
│ │ │ │ +
45 }
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47 std::array< std::vector< double >, 2 > p; // lower and upper boundary points
│ │ │ │ +
48 std::vector< double > h; // width of the cells in each direction
│ │ │ │ +
49 std::vector< int > n; // number of cells in each direction
│ │ │ │ +
50 };
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 private:
│ │ │ │ +
53 std::vector< Interval > intervals_;
│ │ │ │ +
54 std::vector< int > map_;
│ │ │ │ +
55 bool good_; //data read correctly
│ │ │ │ +
56 int dimw_; //dimension of world
│ │ │ │ +
57
│ │ │ │ +
58 public:
│ │ │ │ +
59 explicit IntervalBlock ( std::istream &in );
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
61 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx,
│ │ │ │ +
62 std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl )
│ │ │ │ +
63 {
│ │ │ │ +
64 for( size_t i = 0; i < intervals_.size(); ++i )
│ │ │ │ +
65 {
│ │ │ │ +
66 int oldvtx = nofvtx;
│ │ │ │ +
67 nofvtx += getVtx( i, vtx );
│ │ │ │ +
68 nofsimpl += getHexa( i, simplex, oldvtx );
│ │ │ │ +
69 }
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
72 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx )
│ │ │ │ +
73 {
│ │ │ │ +
74 for( size_t i = 0; i < intervals_.size(); ++i )
│ │ │ │ +
75 nofvtx += getVtx( i, vtx );
│ │ │ │ +
76 }
│ │ │ │
│ │ │ │ -
142
│ │ │ │ +
77
│ │ │ │ +
│ │ │ │ +
78 const Interval &get ( int block ) const
│ │ │ │ +
79 {
│ │ │ │ +
80 return intervals_[ block ];
│ │ │ │ +
81 }
│ │ │ │ +
│ │ │ │ +
82
│ │ │ │ +
│ │ │ │ +
83 int numIntervals () const
│ │ │ │ +
84 {
│ │ │ │ +
85 return intervals_.size();
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
│ │ │ │ +
88 int dimw () const
│ │ │ │ +
89 {
│ │ │ │ +
90 return dimw_;
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93 int getVtx ( int block, std::vector< std::vector< double > > &vtx ) const;
│ │ │ │ +
94 int getHexa ( int block, std::vector< std::vector< unsigned int > > &cubes,
│ │ │ │ +
95 int offset = 0 ) const;
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ +
97 int nofvtx ( int block ) const
│ │ │ │ +
98 {
│ │ │ │ +
99 const Interval &interval = get( block );
│ │ │ │ +
100 int n = 1;
│ │ │ │ +
101 for( int i = 0; i < dimw_; ++i )
│ │ │ │ +
102 n *= (interval.n[ i ] + 1);
│ │ │ │ +
103 return n;
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
106 int nofhexa ( int block ) const
│ │ │ │ +
107 {
│ │ │ │ +
108 const Interval &interval = get( block );
│ │ │ │ +
109 int n = 1;
│ │ │ │ +
110 for( int i = 0; i < dimw_; ++i )
│ │ │ │ +
111 n *= interval.n[ i ];
│ │ │ │ +
112 return n;
│ │ │ │ +
113 }
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
115 private:
│ │ │ │ +
116 template< class T >
│ │ │ │ +
117 void parseLine ( std::vector< T > &v );
│ │ │ │ +
118
│ │ │ │ +
119 bool next ();
│ │ │ │ +
120 };
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ +
122 inline std::ostream &
│ │ │ │ +
123 operator<< ( std::ostream &out, const IntervalBlock::Interval &interval )
│ │ │ │ +
124 {
│ │ │ │ +
125 if( interval.p[ 0 ].empty() || interval.p[ 1 ].empty() || interval.n.empty() )
│ │ │ │ +
126 return out << "Interval {}";
│ │ │ │ +
127
│ │ │ │ +
128 out << "Interval { p0 = (" << interval.p[ 0 ][ 0 ];
│ │ │ │ +
129 for( size_t i = 1; i < interval.p[ 0 ].size(); ++i )
│ │ │ │ +
130 out << ", " << interval.p[ 0 ][ i ];
│ │ │ │ +
131 out << "), p1 = (" << interval.p[ 1 ][ 0 ];
│ │ │ │ +
132 for( size_t i = 1; i < interval.p[ 1 ].size(); ++i )
│ │ │ │ +
133 out << ", " << interval.p[ 1 ][ i ];
│ │ │ │ +
134 out << "), n = (" << interval.n[ 0 ];
│ │ │ │ +
135 for( size_t i = 1; i < interval.n.size(); ++i )
│ │ │ │ +
136 out << ", " << interval.n[ i ];
│ │ │ │ +
137 return out << ") }";
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
140 } // end namespace dgf
│ │ │ │ +
141
│ │ │ │ +
142} // end namespace Dune
│ │ │ │
143
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
145 ElementFaceUtil::generateFace ( int dim, const std::vector< unsigned int > &element, int f )
│ │ │ │ -
146 {
│ │ │ │ -
147 if( element.size() == size_t(dim+1) )
│ │ │ │ -
148 {
│ │ │ │ -
149 // Simplex element
│ │ │ │ -
150 switch( dim )
│ │ │ │ -
151 {
│ │ │ │ -
152 case 3 :
│ │ │ │ -
153 return generateSimplexFace< 3 >( element, f );
│ │ │ │ -
154 case 2 :
│ │ │ │ -
155 return generateSimplexFace< 2 >( element, f );
│ │ │ │ -
156 case 1 :
│ │ │ │ -
157 return generateSimplexFace< 1 >( element, f );
│ │ │ │ -
158 default :
│ │ │ │ -
159 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
│ │ │ │ -
160 }
│ │ │ │ -
161 }
│ │ │ │ -
162 else
│ │ │ │ -
163 {
│ │ │ │ -
164 // Cube element
│ │ │ │ -
165 switch( dim )
│ │ │ │ -
166 {
│ │ │ │ -
167 case 3 :
│ │ │ │ -
168 return generateCubeFace< 3 >( element, f );
│ │ │ │ -
169 case 2 :
│ │ │ │ -
170 return generateCubeFace< 2 >( element, f );
│ │ │ │ -
171 case 1 :
│ │ │ │ -
172 return generateCubeFace< 1 >( element, f );
│ │ │ │ -
173 default :
│ │ │ │ -
174 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
│ │ │ │ -
175 }
│ │ │ │ -
176 }
│ │ │ │ -
177 }
│ │ │ │ -
│ │ │ │ -
178
│ │ │ │ -
179} // end namespace Dune
│ │ │ │ -
180
│ │ │ │ -
181#endif // DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
144#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition entitykey.hh:21
│ │ │ │ -
static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
Definition entitykey_inline.hh:145
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
Definition interval.hh:123
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
Definition interval.hh:23
│ │ │ │ +
void get(std::vector< std::vector< double > > &vtx, int &nofvtx, std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl)
Definition interval.hh:61
│ │ │ │ +
int numIntervals() const
Definition interval.hh:83
│ │ │ │ +
int getVtx(int block, std::vector< std::vector< double > > &vtx) const
Definition interval.cc:84
│ │ │ │ +
const Interval & get(int block) const
Definition interval.hh:78
│ │ │ │ +
int getHexa(int block, std::vector< std::vector< unsigned int > > &cubes, int offset=0) const
Definition interval.cc:122
│ │ │ │ +
int nofhexa(int block) const
Definition interval.hh:106
│ │ │ │ +
int dimw() const
Definition interval.hh:88
│ │ │ │ +
int nofvtx(int block) const
Definition interval.hh:97
│ │ │ │ +
void get(std::vector< std::vector< double > > &vtx, int &nofvtx)
Definition interval.hh:72
│ │ │ │ +
Definition interval.hh:25
│ │ │ │ +
Interval()
Definition interval.hh:26
│ │ │ │ +
std::array< std::vector< double >, 2 > p
Definition interval.hh:47
│ │ │ │ +
std::vector< int > n
Definition interval.hh:49
│ │ │ │ +
Interval(const Interval &interval, const std::vector< int > &map)
Definition interval.hh:27
│ │ │ │ +
void copy(const Interval &interval, const std::vector< int > &map)
Definition interval.hh:31
│ │ │ │ +
std::vector< double > h
Definition interval.hh:48
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,208 +3,219 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -entitykey_inline.hh │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +interval.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ -6#define DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ +5#ifndef DUNE_DGF_INTERVALBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_INTERVALBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +13 │ │ │ │ │ 14 │ │ │ │ │ -15 // DGFEntityKey │ │ │ │ │ -16 // ------------ │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ 17 │ │ │ │ │ -18 template< class A > │ │ │ │ │ -_1_9 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _D_G_F_E_n_t_i_t_y_K_e_y ( const std :: vector< A > &key, │ │ │ │ │ -bool setOrigKey ) │ │ │ │ │ -20 : key_( key.size() ), │ │ │ │ │ -21 origKey_( key.size() ), │ │ │ │ │ -_2_2 origKeySet_( setOrigKey ) │ │ │ │ │ +18 namespace dgf │ │ │ │ │ +19 { │ │ │ │ │ +20 │ │ │ │ │ +_2_1 struct _I_n_t_e_r_v_a_l_B_l_o_c_k │ │ │ │ │ +22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ 23 { │ │ │ │ │ -24 for (size_t i=0; i& map ) │ │ │ │ │ +28 { │ │ │ │ │ +29 _c_o_p_y( interval, map ); │ │ │ │ │ 30 } │ │ │ │ │ -31 │ │ │ │ │ -_3_2 │ │ │ │ │ -_3_3 template< class A > │ │ │ │ │ -34 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _D_G_F_E_n_t_i_t_y_K_e_y ( const std :: vector< A > &key, │ │ │ │ │ -35 int N, int offset, bool setOrigKey ) │ │ │ │ │ -36 : key_( N ), │ │ │ │ │ -37 origKey_( N ), │ │ │ │ │ -38 origKeySet_( setOrigKey ) │ │ │ │ │ -39 { │ │ │ │ │ -40 for (size_t i=0; i& map ) │ │ │ │ │ +32 { │ │ │ │ │ +33 const int size = map.size(); │ │ │ │ │ +34 _p[0].resize( size ); │ │ │ │ │ +35 _p[1].resize( size ); │ │ │ │ │ +36 _n.resize( size ); │ │ │ │ │ +37 _h.resize( size ); │ │ │ │ │ +38 assert( size == int(interval._n.size()) ); │ │ │ │ │ +39 for( int i=0; i │ │ │ │ │ -_5_0 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _D_G_F_E_n_t_i_t_y_K_e_y ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) │ │ │ │ │ -51 : key_( k.key_.size() ), │ │ │ │ │ -52 origKey_( k.key_.size() ), │ │ │ │ │ -53 origKeySet_( k. origKeySet_ ) │ │ │ │ │ -54 { │ │ │ │ │ -55 for (size_t i=0; i │ │ │ │ │ -_6_4 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_p_e_r_a_t_o_r_=_ ( const │ │ │ │ │ -_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) │ │ │ │ │ +_4_7 std::array< std::vector< double >, 2 > _p; // lower and upper boundary points │ │ │ │ │ +_4_8 std::vector< double > _h; // width of the cells in each direction │ │ │ │ │ +_4_9 std::vector< int > _n; // number of cells in each direction │ │ │ │ │ +50 }; │ │ │ │ │ +51 │ │ │ │ │ +52 private: │ │ │ │ │ +53 std::vector< Interval > intervals_; │ │ │ │ │ +54 std::vector< int > map_; │ │ │ │ │ +55 bool good_; //data read correctly │ │ │ │ │ +56 int dimw_; //dimension of world │ │ │ │ │ +57 │ │ │ │ │ +58 public: │ │ │ │ │ +59 explicit _I_n_t_e_r_v_a_l_B_l_o_c_k ( std::istream &in ); │ │ │ │ │ +60 │ │ │ │ │ +_6_1 void _g_e_t ( std::vector< std::vector< double > > &vtx, int &_n_o_f_v_t_x, │ │ │ │ │ +62 std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl ) │ │ │ │ │ +63 { │ │ │ │ │ +64 for( size_t i = 0; i < intervals_.size(); ++i ) │ │ │ │ │ 65 { │ │ │ │ │ -66 assert(key_.size()==k.key_.size()); │ │ │ │ │ -67 for (size_t i=0; i │ │ │ │ │ -77 inline void _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> │ │ │ │ │ -_7_8_ _:_:_ _o_r_i_e_n_t_a_t_i_o_n ( int base, std::vector< std :: vector< double > > &vtx ) │ │ │ │ │ +71 │ │ │ │ │ +_7_2 void _g_e_t ( std::vector< std::vector< double > > &vtx, int &_n_o_f_v_t_x ) │ │ │ │ │ +73 { │ │ │ │ │ +74 for( size_t i = 0; i < intervals_.size(); ++i ) │ │ │ │ │ +75 _n_o_f_v_t_x += _g_e_t_V_t_x( i, vtx ); │ │ │ │ │ +76 } │ │ │ │ │ +77 │ │ │ │ │ +_7_8 const _I_n_t_e_r_v_a_l &_g_e_t ( int block ) const │ │ │ │ │ 79 { │ │ │ │ │ -80 if (key_.size()==3) { │ │ │ │ │ -81 assert( (size_t) origKey_[0] < vtx.size() ); │ │ │ │ │ -82 std::vector& p0 = vtx[origKey_[0]]; │ │ │ │ │ -83 assert( (size_t) origKey_[1] < vtx.size() ); │ │ │ │ │ -84 std::vector& p1 = vtx[origKey_[1]]; │ │ │ │ │ -85 assert( (size_t) origKey_[2] < vtx.size() ); │ │ │ │ │ -86 std::vector& p2 = vtx[origKey_[2]]; │ │ │ │ │ -87 assert( (size_t) base < vtx.size() ); │ │ │ │ │ -88 std::vector& q = vtx[base]; │ │ │ │ │ -89 double n[3]; │ │ │ │ │ -90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]); │ │ │ │ │ -91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]); │ │ │ │ │ -92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]); │ │ │ │ │ -93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]); │ │ │ │ │ -94 bool reorient = (test>0); │ │ │ │ │ -95 if (reorient) { │ │ │ │ │ -96 A key1=origKey_[1]; │ │ │ │ │ -97 origKey_[1]=origKey_[2]; │ │ │ │ │ -98 origKey_[2]=key1; │ │ │ │ │ -99 } │ │ │ │ │ -100 } │ │ │ │ │ -101 } │ │ │ │ │ -102 │ │ │ │ │ -103 │ │ │ │ │ -104 template< class A > │ │ │ │ │ -_1_0_5 inline void _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _p_r_i_n_t ( std :: ostream &out ) const │ │ │ │ │ -106 { │ │ │ │ │ -107 for( size_t i = 0; i < key_.size(); ++i ) │ │ │ │ │ -108 out << key_[ i ] << " "; │ │ │ │ │ -109 out << std :: endl; │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -112 │ │ │ │ │ -113 // ElementFaceUtil │ │ │ │ │ -114 // --------------- │ │ │ │ │ -115 │ │ │ │ │ -116 template< int dim > │ │ │ │ │ -117 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ -118 ElementFaceUtil::generateCubeFace │ │ │ │ │ -119 ( const std::vector< unsigned int > &element, int f ) │ │ │ │ │ -120 { │ │ │ │ │ -121 auto refCube = ReferenceElements< double, dim >::cube(); │ │ │ │ │ -122 const unsigned int size = refCube.size( f, 1, dim ); │ │ │ │ │ -123 std::vector< unsigned int > k( size ); │ │ │ │ │ -124 for( unsigned int i = 0; i < size; ++ i ) │ │ │ │ │ -125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ]; │ │ │ │ │ -126 return _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _>( k ); │ │ │ │ │ -127 } │ │ │ │ │ -128 │ │ │ │ │ -129 │ │ │ │ │ -130 template< int dim > │ │ │ │ │ -131 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ -_1_3_2 ElementFaceUtil :: generateSimplexFace │ │ │ │ │ -133 ( const std :: vector< unsigned int > &element, int f ) │ │ │ │ │ -134 { │ │ │ │ │ -135 auto refSimplex = ReferenceElements< double, dim >::simplex(); │ │ │ │ │ -136 const unsigned int size = refSimplex.size( f, 1, dim ); │ │ │ │ │ -137 std :: vector< unsigned int > k( size ); │ │ │ │ │ -138 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ -139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ]; │ │ │ │ │ -140 return _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _>( k ); │ │ │ │ │ -141 } │ │ │ │ │ -142 │ │ │ │ │ +80 return intervals_[ block ]; │ │ │ │ │ +81 } │ │ │ │ │ +82 │ │ │ │ │ +_8_3 int _n_u_m_I_n_t_e_r_v_a_l_s () const │ │ │ │ │ +84 { │ │ │ │ │ +85 return intervals_.size(); │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +_8_8 int _d_i_m_w () const │ │ │ │ │ +89 { │ │ │ │ │ +90 return dimw_; │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +93 int _g_e_t_V_t_x ( int block, std::vector< std::vector< double > > &vtx ) const; │ │ │ │ │ +94 int _g_e_t_H_e_x_a ( int block, std::vector< std::vector< unsigned int > > &cubes, │ │ │ │ │ +95 int offset = 0 ) const; │ │ │ │ │ +96 │ │ │ │ │ +_9_7 int _n_o_f_v_t_x ( int block ) const │ │ │ │ │ +98 { │ │ │ │ │ +99 const _I_n_t_e_r_v_a_l &interval = _g_e_t( block ); │ │ │ │ │ +100 int n = 1; │ │ │ │ │ +101 for( int i = 0; i < dimw_; ++i ) │ │ │ │ │ +102 n *= (interval._n[ i ] + 1); │ │ │ │ │ +103 return n; │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 int _n_o_f_h_e_x_a ( int block ) const │ │ │ │ │ +107 { │ │ │ │ │ +108 const _I_n_t_e_r_v_a_l &interval = _g_e_t( block ); │ │ │ │ │ +109 int n = 1; │ │ │ │ │ +110 for( int i = 0; i < dimw_; ++i ) │ │ │ │ │ +111 n *= interval._n[ i ]; │ │ │ │ │ +112 return n; │ │ │ │ │ +113 } │ │ │ │ │ +114 │ │ │ │ │ +115 private: │ │ │ │ │ +116 template< class T > │ │ │ │ │ +117 void parseLine ( std::vector< T > &v ); │ │ │ │ │ +118 │ │ │ │ │ +119 bool next (); │ │ │ │ │ +120 }; │ │ │ │ │ +121 │ │ │ │ │ +_1_2_2 inline std::ostream & │ │ │ │ │ +123 _o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l &interval ) │ │ │ │ │ +124 { │ │ │ │ │ +125 if( interval._p[ 0 ].empty() || interval._p[ 1 ].empty() || interval._n.empty │ │ │ │ │ +() ) │ │ │ │ │ +126 return out << "Interval {}"; │ │ │ │ │ +127 │ │ │ │ │ +128 out << "Interval { p0 = (" << interval._p[ 0 ][ 0 ]; │ │ │ │ │ +129 for( size_t i = 1; i < interval._p[ 0 ].size(); ++i ) │ │ │ │ │ +130 out << ", " << interval._p[ 0 ][ i ]; │ │ │ │ │ +131 out << "), p1 = (" << interval._p[ 1 ][ 0 ]; │ │ │ │ │ +132 for( size_t i = 1; i < interval._p[ 1 ].size(); ++i ) │ │ │ │ │ +133 out << ", " << interval._p[ 1 ][ i ]; │ │ │ │ │ +134 out << "), n = (" << interval._n[ 0 ]; │ │ │ │ │ +135 for( size_t i = 1; i < interval._n.size(); ++i ) │ │ │ │ │ +136 out << ", " << interval._n[ i ]; │ │ │ │ │ +137 return out << ") }"; │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +140 } // end namespace dgf │ │ │ │ │ +141 │ │ │ │ │ +142} // end namespace Dune │ │ │ │ │ 143 │ │ │ │ │ -144 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ -_1_4_5 _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_g_e_n_e_r_a_t_e_F_a_c_e ( int dim, const std::vector< unsigned int > │ │ │ │ │ -&element, int f ) │ │ │ │ │ -146 { │ │ │ │ │ -147 if( element.size() == size_t(dim+1) ) │ │ │ │ │ -148 { │ │ │ │ │ -149 // Simplex element │ │ │ │ │ -150 switch( dim ) │ │ │ │ │ -151 { │ │ │ │ │ -152 case 3 : │ │ │ │ │ -153 return generateSimplexFace< 3 >( element, f ); │ │ │ │ │ -154 case 2 : │ │ │ │ │ -155 return generateSimplexFace< 2 >( element, f ); │ │ │ │ │ -156 case 1 : │ │ │ │ │ -157 return generateSimplexFace< 1 >( element, f ); │ │ │ │ │ -158 default : │ │ │ │ │ -159 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for │ │ │ │ │ -dim = " << dim << "." ); │ │ │ │ │ -160 } │ │ │ │ │ -161 } │ │ │ │ │ -162 else │ │ │ │ │ -163 { │ │ │ │ │ -164 // Cube element │ │ │ │ │ -165 switch( dim ) │ │ │ │ │ -166 { │ │ │ │ │ -167 case 3 : │ │ │ │ │ -168 return generateCubeFace< 3 >( element, f ); │ │ │ │ │ -169 case 2 : │ │ │ │ │ -170 return generateCubeFace< 2 >( element, f ); │ │ │ │ │ -171 case 1 : │ │ │ │ │ -172 return generateCubeFace< 1 >( element, f ); │ │ │ │ │ -173 default : │ │ │ │ │ -174 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for │ │ │ │ │ -dim = " << dim << "." ); │ │ │ │ │ -175 } │ │ │ │ │ -176 } │ │ │ │ │ -177 } │ │ │ │ │ -178 │ │ │ │ │ -179} // end namespace Dune │ │ │ │ │ -180 │ │ │ │ │ -181#endif // DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ -_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ +144#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_g_e_n_e_r_a_t_e_F_a_c_e │ │ │ │ │ -static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< │ │ │ │ │ -unsigned int > &element, int f) │ │ │ │ │ -DDeeffiinniittiioonn entitykey_inline.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval │ │ │ │ │ +&interval) │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +void get(std::vector< std::vector< double > > &vtx, int &nofvtx, std::vector< │ │ │ │ │ +std::vector< unsigned int > > &simplex, int &nofsimpl) │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_n_u_m_I_n_t_e_r_v_a_l_s │ │ │ │ │ +int numIntervals() const │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t_V_t_x │ │ │ │ │ +int getVtx(int block, std::vector< std::vector< double > > &vtx) const │ │ │ │ │ +DDeeffiinniittiioonn interval.cc:84 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +const Interval & get(int block) const │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t_H_e_x_a │ │ │ │ │ +int getHexa(int block, std::vector< std::vector< unsigned int > > &cubes, int │ │ │ │ │ +offset=0) const │ │ │ │ │ +DDeeffiinniittiioonn interval.cc:122 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_n_o_f_h_e_x_a │ │ │ │ │ +int nofhexa(int block) const │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_d_i_m_w │ │ │ │ │ +int dimw() const │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_n_o_f_v_t_x │ │ │ │ │ +int nofvtx(int block) const │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +void get(std::vector< std::vector< double > > &vtx, int &nofvtx) │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ +Interval() │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_p │ │ │ │ │ +std::array< std::vector< double >, 2 > p │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_n │ │ │ │ │ +std::vector< int > n │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_I_n_t_e_r_v_a_l │ │ │ │ │ +Interval(const Interval &interval, const std::vector< int > &map) │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_c_o_p_y │ │ │ │ │ +void copy(const Interval &interval, const std::vector< int > &map) │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_I_n_t_e_r_v_a_l_B_l_o_c_k_:_:_I_n_t_e_r_v_a_l_:_:_h │ │ │ │ │ +std::vector< double > h │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:48 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfyasp.hh File Reference │ │ │ │ +dune-grid: boundaryseg.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfyasp.hh File Reference
│ │ │ │ +
boundaryseg.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/yaspgrid.hh>
│ │ │ │ -#include "dgfparser.hh"
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <map>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::YaspGridParameterBlock
 Grid parameters for YaspGrid. More...
 
struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Grid factory for YaspGrid with equidistant coordinates. More...
 
struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Grid factory for YaspGrid with equidistant coordinates. More...
 
class  Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >
 Placeholder for grid factory for YaspGrid with tensor product coordinates. More...
 
struct  Dune::DGFGridInfo< YaspGrid< dim, Coordinates > >
class  Dune::dgf::BoundarySegBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,38 +3,27 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfyasp.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ -#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ +boundaryseg.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -  _G_r_i_d parameters for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ - _d_i_m_ _>_ _>_ _> │ │ │ │ │ -  _G_r_i_d factory for _Y_a_s_p_G_r_i_d with equidistant coordinates. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ - _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ -  _G_r_i_d factory for _Y_a_s_p_G_r_i_d with equidistant coordinates. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _D_u_n_e_:_: │ │ │ │ │ - _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ -  Placeholder for grid factory for _Y_a_s_p_G_r_i_d with tensor product │ │ │ │ │ - coordinates. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_i_n_a_t_e_s_ _>_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfyasp.hh Source File │ │ │ │ +dune-grid: boundaryseg.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,619 +70,122 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfyasp.hh
│ │ │ │ +
boundaryseg.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGFPARSERYASP_HH
│ │ │ │ -
6#define DUNE_DGFPARSERYASP_HH
│ │ │ │ +
5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10#include "dgfparser.hh"
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 // External Forward Declarations
│ │ │ │ -
16 // -----------------------------
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12#include <map>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │
17
│ │ │ │ -
18 template< class GridImp, class IntersectionImp >
│ │ │ │ -
19 class Intersection;
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │
20
│ │ │ │ -
21
│ │ │ │ -
22 namespace dgf
│ │ │ │ -
23 {
│ │ │ │ -
24
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 : public GridParameterBlock
│ │ │ │ -
40 {
│ │ │ │ -
41 protected:
│ │ │ │ -
42 int _overlap; // overlap for YaspGrid
│ │ │ │ -
43
│ │ │ │ -
44 public:
│ │ │ │ -
│ │ │ │ -
46 YaspGridParameterBlock( std::istream &in )
│ │ │ │ -
47 : GridParameterBlock( in ),
│ │ │ │ -
48 _overlap( 0 ) // default value
│ │ │ │ +
21 namespace dgf
│ │ │ │ +
22 {
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 : public BasicBlock
│ │ │ │ +
25 {
│ │ │ │ +
26 int dimworld; // the dimension of the vertices (is given from user)
│ │ │ │ +
27 bool goodline; // active line describes a vertex
│ │ │ │ +
28 std :: vector< unsigned int > p; // active vertex
│ │ │ │ +
29 int bndid;
│ │ │ │ +
30 typedef DGFBoundaryParameter::type BoundaryParameter;
│ │ │ │ +
31 BoundaryParameter parameter;
│ │ │ │ +
32 bool simplexgrid;
│ │ │ │ +
33
│ │ │ │ +
34 public:
│ │ │ │ + │ │ │ │ +
36 typedef std::pair < int, BoundaryParameter > BndParam;
│ │ │ │ +
37
│ │ │ │ +
38 // initialize vertex block and get first vertex
│ │ │ │ +
39 BoundarySegBlock ( std :: istream &in, int pnofvtx,
│ │ │ │ +
40 int pdimworld, bool psimplexgrid );
│ │ │ │ +
41
│ │ │ │ +
42 // some information
│ │ │ │ +
43 int get( std :: map< EntityKey, BndParam > & facemap,
│ │ │ │ +
44 bool fixedsize,
│ │ │ │ +
45 int vtxoffset
│ │ │ │ +
46 );
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 bool ok()
│ │ │ │
49 {
│ │ │ │ -
50 // check overlap
│ │ │ │ -
51 if( findtoken( "overlap" ) )
│ │ │ │ -
52 {
│ │ │ │ -
53 int x;
│ │ │ │ -
54 if( getnextentry(x) ) _overlap = x;
│ │ │ │ -
55 else
│ │ │ │ -
56 {
│ │ │ │ -
57 dwarn << "GridParameterBlock: found keyword `overlap' but no value, defaulting to `" << _overlap <<"' !\n";
│ │ │ │ -
58 }
│ │ │ │ -
59
│ │ │ │ -
60 if (_overlap < 0)
│ │ │ │ -
61 {
│ │ │ │ -
62 DUNE_THROW(DGFException,"Negative overlap specified!");
│ │ │ │ -
63 }
│ │ │ │ -
64 }
│ │ │ │ -
65 else
│ │ │ │ -
66 {
│ │ │ │ -
67 dwarn << "YaspGridParameterBlock: Parameter 'overlap' not specified, "
│ │ │ │ -
68 << "defaulting to '" << _overlap << "'." << std::endl;
│ │ │ │ -
69 }
│ │ │ │ -
70
│ │ │ │ -
71 }
│ │ │ │ +
50 return goodline;
│ │ │ │ +
51 }
│ │ │ │
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
74 int overlap () const
│ │ │ │ -
75 {
│ │ │ │ -
76 return _overlap;
│ │ │ │ -
77 }
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 return noflines();
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 private:
│ │ │ │ +
59 bool next();
│ │ │ │ +
60
│ │ │ │ +
61 // get coordinates of active vertex
│ │ │ │ +
62 int operator[] (int i)
│ │ │ │ +
63 {
│ │ │ │ +
64 assert(ok());
│ │ │ │ +
65 assert(linenumber()>=0);
│ │ │ │ +
66 assert(0<=i && i<dimworld+1);
│ │ │ │ +
67 return p[i];
│ │ │ │ +
68 }
│ │ │ │ +
69
│ │ │ │ +
70 int size()
│ │ │ │ +
71 {
│ │ │ │ +
72 return p.size();
│ │ │ │ +
73 }
│ │ │ │ +
74
│ │ │ │ +
75 };
│ │ │ │
│ │ │ │ +
76
│ │ │ │ +
77 } // end namespace dgf
│ │ │ │
78
│ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ +
79} // end namespace Dune
│ │ │ │
80
│ │ │ │ -
81 }
│ │ │ │ -
82
│ │ │ │ -
86 template <typename ctype, int dim>
│ │ │ │ -
│ │ │ │ -
87 struct DGFGridFactory< YaspGrid<dim, EquidistantCoordinates<ctype, dim> > >
│ │ │ │ -
88 {
│ │ │ │ - │ │ │ │ -
90 const static int dimension = Grid::dimension;
│ │ │ │ -
91 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ -
92
│ │ │ │ -
93 private:
│ │ │ │ -
94 typedef FieldVector< ctype, dimension > Point;
│ │ │ │ - │ │ │ │ -
96
│ │ │ │ -
97 public:
│ │ │ │ -
│ │ │ │ -
98 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
99 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
100 {
│ │ │ │ -
101 generate( input, comm );
│ │ │ │ -
102 }
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
104 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
105 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
106 {
│ │ │ │ -
107 std::ifstream input( filename.c_str() );
│ │ │ │ -
108 if( !input )
│ │ │ │ -
109 DUNE_THROW( DGFException, "Error: Macrofile '" << filename << "' not found" );
│ │ │ │ -
110 generate( input, comm );
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
114 {
│ │ │ │ -
115 delete boundaryDomainBlock_;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ -
118 Grid *grid() const
│ │ │ │ -
119 {
│ │ │ │ -
120 return grid_;
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
123 template <class Intersection>
│ │ │ │ -
│ │ │ │ -
124 bool wasInserted(const Intersection &intersection) const
│ │ │ │ -
125 {
│ │ │ │ -
126 return false;
│ │ │ │ -
127 }
│ │ │ │ -
│ │ │ │ -
128
│ │ │ │ -
129 template <class Intersection>
│ │ │ │ -
│ │ │ │ -
130 int boundaryId(const Intersection &intersection) const
│ │ │ │ -
131 {
│ │ │ │ -
132 if( boundaryDomainBlock_->isactive() )
│ │ │ │ -
133 {
│ │ │ │ -
134 std::vector< Point > corners;
│ │ │ │ -
135 getCorners( intersection.geometry(), corners );
│ │ │ │ -
136 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ -
137 if( data )
│ │ │ │ -
138 return data->id();
│ │ │ │ -
139 else
│ │ │ │ -
140 return intersection.indexInInside();
│ │ │ │ -
141 }
│ │ │ │ -
142 else
│ │ │ │ -
143 return intersection.indexInInside();
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
146 template< int codim >
│ │ │ │ -
│ │ │ │ -
147 int numParameters () const
│ │ │ │ -
148 {
│ │ │ │ -
149 return 0;
│ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
152 // return true if boundary parameters found
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
154 {
│ │ │ │ -
155 return boundaryDomainBlock_->hasParameter();
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158 template< class GG, class II >
│ │ │ │ -
159 const typename DGFBoundaryParameter::type &
│ │ │ │ -
│ │ │ │ -
160 boundaryParameter ( const Intersection< GG, II > & intersection ) const
│ │ │ │ -
161 {
│ │ │ │ - │ │ │ │ -
163 {
│ │ │ │ -
164 std::vector< Point > corners;
│ │ │ │ -
165 getCorners( intersection.geometry(), corners );
│ │ │ │ -
166 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ -
167 if( data )
│ │ │ │ -
168 return data->parameter();
│ │ │ │ -
169 else
│ │ │ │ - │ │ │ │ -
171 }
│ │ │ │ -
172 else
│ │ │ │ - │ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
176 template< class Entity >
│ │ │ │ -
│ │ │ │ -
177 std::vector<double> &parameter ( const Entity & )
│ │ │ │ -
178 {
│ │ │ │ -
179 return emptyParam;
│ │ │ │ -
180 }
│ │ │ │ -
│ │ │ │ -
181
│ │ │ │ -
182 private:
│ │ │ │ -
183 void generate( std::istream &gridin, MPICommunicatorType comm );
│ │ │ │ -
184
│ │ │ │ -
185 template< class Geometry >
│ │ │ │ -
186 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
│ │ │ │ -
187 {
│ │ │ │ -
188 corners.resize( geometry.corners() );
│ │ │ │ -
189 for( int i = 0; i < geometry.corners(); ++i )
│ │ │ │ -
190 {
│ │ │ │ -
191 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
│ │ │ │ -
192 for( int j = 0; j < dimension; ++j )
│ │ │ │ -
193 corners[ i ][ j ] = corner[ j ];
│ │ │ │ -
194 }
│ │ │ │ -
195 }
│ │ │ │ -
196
│ │ │ │ -
197 Grid *grid_;
│ │ │ │ -
198 dgf::BoundaryDomBlock *boundaryDomainBlock_;
│ │ │ │ -
199 std::vector<double> emptyParam;
│ │ │ │ -
200 };
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
202 // generate YaspGrid from the provided DGF
│ │ │ │ -
203 template< typename ctype, int dim >
│ │ │ │ -
204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates<ctype, dim> > >
│ │ │ │ -
205 ::generate ( std::istream &gridin, MPICommunicatorType comm )
│ │ │ │ -
206 {
│ │ │ │ -
207 using std::abs;
│ │ │ │ -
208 dgf::IntervalBlock intervalBlock( gridin );
│ │ │ │ -
209
│ │ │ │ -
210 if( !intervalBlock.isactive() )
│ │ │ │ -
211 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
│ │ │ │ -
212
│ │ │ │ -
213 if( intervalBlock.numIntervals() != 1 )
│ │ │ │ -
214 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
│ │ │ │ -
215
│ │ │ │ -
216 if( intervalBlock.dimw() != dim )
│ │ │ │ -
217 {
│ │ │ │ -
218 DUNE_THROW( DGFException,
│ │ │ │ -
219 "Cannot read an interval of dimension " << intervalBlock.dimw()
│ │ │ │ -
220 << " into a YaspGrid< " << dim << " >." );
│ │ │ │ -
221 }
│ │ │ │ -
222
│ │ │ │ -
223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
│ │ │ │ -
224
│ │ │ │ -
225 FieldVector<ctype, dim> lang;
│ │ │ │ -
226 std::array<int,dim> anz;
│ │ │ │ -
227 for( int i = 0; i < dim; ++i )
│ │ │ │ -
228 {
│ │ │ │ -
229 // check that start point is 0.0
│ │ │ │ -
230 if( abs( interval.p[ 0 ][ i ] ) > 1e-10 )
│ │ │ │ -
231 {
│ │ │ │ -
232 DUNE_THROW( DGFException,
│ │ │ │ -
233 "YaspGrid cannot handle grids with non-zero left lower corner." );
│ │ │ │ -
234 }
│ │ │ │ -
235
│ │ │ │ -
236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ];
│ │ │ │ -
237 anz[ i ] = interval.n[ i ];
│ │ │ │ -
238 }
│ │ │ │ -
239
│ │ │ │ -
240 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation Transformation;
│ │ │ │ -
241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
│ │ │ │ -
242 std::bitset< dim > per;
│ │ │ │ -
243 const int numTrafos = trafoBlock.numTransformations();
│ │ │ │ -
244 for( int k = 0; k < numTrafos; ++k )
│ │ │ │ -
245 {
│ │ │ │ -
246 const Transformation &trafo = trafoBlock.transformation( k );
│ │ │ │ -
247
│ │ │ │ -
248 bool identity = true;
│ │ │ │ -
249 for( int i = 0; i < dim; ++i )
│ │ │ │ -
250 for( int j = 0; j < dim; ++j )
│ │ │ │ -
251 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
│ │ │ │ -
252 if( !identity )
│ │ │ │ -
253 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
│ │ │ │ -
254
│ │ │ │ -
255 int numDirs = 0;
│ │ │ │ -
256 int dir = -1;
│ │ │ │ -
257 for( int i = 0; i < dim; ++i )
│ │ │ │ -
258 {
│ │ │ │ -
259 if( abs( trafo.shift[ i ] ) < 1e-10 )
│ │ │ │ -
260 continue;
│ │ │ │ -
261 dir = i;
│ │ │ │ -
262 ++numDirs;
│ │ │ │ -
263 }
│ │ │ │ -
264 if( (numDirs != 1) || (abs( abs( trafo.shift[ dir ] ) - lang[ dir ] ) >= 1e-10) )
│ │ │ │ -
265 {
│ │ │ │ -
266 std::cerr << "Tranformation '" << trafo
│ │ │ │ -
267 << "' does not map boundaries on boundaries." << std::endl;
│ │ │ │ -
268 }
│ │ │ │ -
269 else
│ │ │ │ -
270 per[ dir ] = true;
│ │ │ │ -
271 }
│ │ │ │ -
272
│ │ │ │ -
273 // get grid parameters
│ │ │ │ -
274 dgf::YaspGridParameterBlock grdParam( gridin );
│ │ │ │ -
275
│ │ │ │ -
276 grid_ = new YaspGrid< dim , EquidistantCoordinates<ctype, dim> >( lang, anz, per, grdParam.overlap(), comm );
│ │ │ │ -
277
│ │ │ │ -
278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
│ │ │ │ -
279 }
│ │ │ │ -
280
│ │ │ │ -
284 template <typename ctype, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
286 {
│ │ │ │ - │ │ │ │ -
288 const static int dimension = Grid::dimension;
│ │ │ │ -
289 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ -
290
│ │ │ │ -
291 private:
│ │ │ │ -
292 typedef FieldVector< ctype, dimension > Point;
│ │ │ │ - │ │ │ │ -
294
│ │ │ │ -
295 public:
│ │ │ │ -
│ │ │ │ -
296 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
297 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
298 {
│ │ │ │ -
299 generate( input, comm );
│ │ │ │ -
300 }
│ │ │ │ -
│ │ │ │ -
301
│ │ │ │ -
│ │ │ │ -
302 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
303 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
304 {
│ │ │ │ -
305 std::ifstream input( filename.c_str() );
│ │ │ │ -
306 generate( input, comm );
│ │ │ │ -
307 }
│ │ │ │ -
│ │ │ │ -
308
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
310 {
│ │ │ │ -
311 delete boundaryDomainBlock_;
│ │ │ │ -
312 }
│ │ │ │ -
│ │ │ │ -
313
│ │ │ │ -
│ │ │ │ -
314 Grid *grid() const
│ │ │ │ -
315 {
│ │ │ │ -
316 return grid_;
│ │ │ │ -
317 }
│ │ │ │ -
│ │ │ │ -
318
│ │ │ │ -
319 template <class Intersection>
│ │ │ │ -
│ │ │ │ -
320 bool wasInserted(const Intersection &intersection) const
│ │ │ │ -
321 {
│ │ │ │ -
322 return false;
│ │ │ │ -
323 }
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ -
325 template <class Intersection>
│ │ │ │ -
│ │ │ │ -
326 int boundaryId(const Intersection &intersection) const
│ │ │ │ -
327 {
│ │ │ │ -
328 if( boundaryDomainBlock_->isactive() )
│ │ │ │ -
329 {
│ │ │ │ -
330 std::vector< Point > corners;
│ │ │ │ -
331 getCorners( intersection.geometry(), corners );
│ │ │ │ -
332 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ -
333 if( data )
│ │ │ │ -
334 return data->id();
│ │ │ │ -
335 else
│ │ │ │ -
336 return intersection.indexInInside();
│ │ │ │ -
337 }
│ │ │ │ -
338 else
│ │ │ │ -
339 return intersection.indexInInside();
│ │ │ │ -
340 }
│ │ │ │ -
│ │ │ │ -
341
│ │ │ │ -
342 template< int codim >
│ │ │ │ -
│ │ │ │ -
343 int numParameters () const
│ │ │ │ -
344 {
│ │ │ │ -
345 return 0;
│ │ │ │ -
346 }
│ │ │ │ -
│ │ │ │ -
347
│ │ │ │ -
348 // return true if boundary parameters found
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
350 {
│ │ │ │ -
351 return boundaryDomainBlock_->hasParameter();
│ │ │ │ -
352 }
│ │ │ │ -
│ │ │ │ -
353
│ │ │ │ -
354 template< class GG, class II >
│ │ │ │ -
355 const typename DGFBoundaryParameter::type &
│ │ │ │ -
│ │ │ │ -
356 boundaryParameter ( const Intersection< GG, II > & intersection ) const
│ │ │ │ -
357 {
│ │ │ │ - │ │ │ │ -
359 {
│ │ │ │ -
360 std::vector< Point > corners;
│ │ │ │ -
361 getCorners( intersection.geometry(), corners );
│ │ │ │ -
362 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ -
363 if( data )
│ │ │ │ -
364 return data->parameter();
│ │ │ │ -
365 else
│ │ │ │ - │ │ │ │ -
367 }
│ │ │ │ -
368 else
│ │ │ │ - │ │ │ │ -
370 }
│ │ │ │ -
│ │ │ │ -
371
│ │ │ │ -
372 template< class Entity >
│ │ │ │ -
│ │ │ │ -
373 std::vector<double> &parameter ( [[maybe_unused]] const Entity &entity )
│ │ │ │ -
374 {
│ │ │ │ -
375 return emptyParam;
│ │ │ │ -
376 }
│ │ │ │ -
│ │ │ │ -
377
│ │ │ │ -
378 private:
│ │ │ │ -
379 void generate( std::istream &gridin, MPICommunicatorType comm );
│ │ │ │ -
380
│ │ │ │ -
381 template< class Geometry >
│ │ │ │ -
382 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
│ │ │ │ -
383 {
│ │ │ │ -
384 corners.resize( geometry.corners() );
│ │ │ │ -
385 for( int i = 0; i < geometry.corners(); ++i )
│ │ │ │ -
386 {
│ │ │ │ -
387 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
│ │ │ │ -
388 for( int j = 0; j < dimension; ++j )
│ │ │ │ -
389 corners[ i ][ j ] = corner[ j ];
│ │ │ │ -
390 }
│ │ │ │ -
391 }
│ │ │ │ -
392
│ │ │ │ -
393 Grid *grid_;
│ │ │ │ -
394 dgf::BoundaryDomBlock *boundaryDomainBlock_;
│ │ │ │ -
395 std::vector<double> emptyParam;
│ │ │ │ -
396 };
│ │ │ │ -
│ │ │ │ -
397
│ │ │ │ -
398 // generate YaspGrid from the provided DGF
│ │ │ │ -
399 template< typename ctype, int dim >
│ │ │ │ -
400 inline void DGFGridFactory< YaspGrid<dim, EquidistantOffsetCoordinates<ctype, dim> > >
│ │ │ │ -
401 ::generate ( std::istream &gridin, MPICommunicatorType comm )
│ │ │ │ -
402 {
│ │ │ │ -
403 using std::abs;
│ │ │ │ -
404 dgf::IntervalBlock intervalBlock( gridin );
│ │ │ │ -
405
│ │ │ │ -
406 if( !intervalBlock.isactive() )
│ │ │ │ -
407 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
│ │ │ │ -
408
│ │ │ │ -
409 if( intervalBlock.numIntervals() != 1 )
│ │ │ │ -
410 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
│ │ │ │ -
411
│ │ │ │ -
412 if( intervalBlock.dimw() != dim )
│ │ │ │ -
413 {
│ │ │ │ -
414 DUNE_THROW( DGFException,
│ │ │ │ -
415 "Cannot read an interval of dimension "
│ │ │ │ -
416 << intervalBlock.dimw()
│ │ │ │ -
417 << " into a YaspGrid< " << dim << " >." );
│ │ │ │ -
418 }
│ │ │ │ -
419
│ │ │ │ -
420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
│ │ │ │ -
421
│ │ │ │ -
422 FieldVector<ctype, dim> lower;
│ │ │ │ -
423 FieldVector<ctype, dim> upper;
│ │ │ │ -
424 std::array<int,dim> anz;
│ │ │ │ -
425 for( int i = 0; i < dim; ++i )
│ │ │ │ -
426 {
│ │ │ │ -
427 lower[ i ] = interval.p[ 0 ][ i ];
│ │ │ │ -
428 upper[ i ] = interval.p[ 1 ][ i ];
│ │ │ │ -
429 anz[ i ] = interval.n[ i ];
│ │ │ │ -
430 }
│ │ │ │ -
431
│ │ │ │ -
432 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation Transformation;
│ │ │ │ -
433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
│ │ │ │ -
434 std::bitset< dim > periodic;
│ │ │ │ -
435 const int numTrafos = trafoBlock.numTransformations();
│ │ │ │ -
436 for( int k = 0; k < numTrafos; ++k )
│ │ │ │ -
437 {
│ │ │ │ -
438 const Transformation &trafo = trafoBlock.transformation( k );
│ │ │ │ -
439
│ │ │ │ -
440 bool identity = true;
│ │ │ │ -
441 for( int i = 0; i < dim; ++i )
│ │ │ │ -
442 for( int j = 0; j < dim; ++j )
│ │ │ │ -
443 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
│ │ │ │ -
444 if( !identity )
│ │ │ │ -
445 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
│ │ │ │ -
446
│ │ │ │ -
447 int numDirs = 0;
│ │ │ │ -
448 int dir = -1;
│ │ │ │ -
449 for( int currentDir = 0; currentDir < dim; ++currentDir )
│ │ │ │ -
450 {
│ │ │ │ -
451 if( abs( trafo.shift[ currentDir ] ) > 1e-10 )
│ │ │ │ -
452 {
│ │ │ │ -
453 dir = currentDir;
│ │ │ │ -
454 ++numDirs;
│ │ │ │ -
455 }
│ │ │ │ -
456 }
│ │ │ │ -
457 if ( (numDirs != 1)
│ │ │ │ -
458 || (abs( abs( trafo.shift[ dir ] ) - abs( upper[ dir ] - lower[ dir ] ) ) >= 1e-10) )
│ │ │ │ -
459 {
│ │ │ │ -
460 std::cerr << "Tranformation '" << trafo
│ │ │ │ -
461 << "' does not map boundaries on boundaries." << std::endl;
│ │ │ │ -
462 }
│ │ │ │ -
463 else
│ │ │ │ -
464 {
│ │ │ │ -
465 periodic[ dir ] = true;
│ │ │ │ -
466 }
│ │ │ │ -
467 }
│ │ │ │ -
468
│ │ │ │ -
469 // get grid parameters
│ │ │ │ -
470 dgf::YaspGridParameterBlock grdParam( gridin );
│ │ │ │ -
471
│ │ │ │ -
472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates<ctype, dim> >
│ │ │ │ -
473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );
│ │ │ │ -
474
│ │ │ │ -
475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
│ │ │ │ -
476 }
│ │ │ │ -
477
│ │ │ │ -
483 template< class ctype, int dim >
│ │ │ │ -
│ │ │ │ -
484 class DGFGridFactory< Dune::YaspGrid<dim, Dune::TensorProductCoordinates<ctype, dim> > >
│ │ │ │ -
485 {
│ │ │ │ - │ │ │ │ -
487 public:
│ │ │ │ -
488 template< typename In >
│ │ │ │ -
489 DGFGridFactory ( const In & ) {}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
491 {
│ │ │ │ -
492 throw std::invalid_argument( "Tensor product coordinates for YaspGrid are currently not supported via the DGFGridFactory" );
│ │ │ │ -
493 }
│ │ │ │ -
│ │ │ │ -
494 };
│ │ │ │ -
│ │ │ │ -
495
│ │ │ │ -
496 template <typename Coordinates, int dim>
│ │ │ │ -
│ │ │ │ -
497 struct DGFGridInfo< YaspGrid<dim , Coordinates> > {
│ │ │ │ -
498 static int refineStepsForHalf() {return 1;}
│ │ │ │ -
499 static double refineWeight() {return std::pow(0.5,dim);}
│ │ │ │ -
500 };
│ │ │ │ -
│ │ │ │ -
501
│ │ │ │ -
502}
│ │ │ │ -
503#endif // #ifndef DUNE_DGFPARSERYASP_HH
│ │ │ │ - │ │ │ │ +
81#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
void abs(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:328
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ -
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ -
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ -
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition common/intersection.hh:323
│ │ │ │ -
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Wrapper class for geometries.
Definition common/geometry.hh:71
│ │ │ │ -
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition common/geometry.hh:106
│ │ │ │ -
GlobalCoordinate corner(int i) const
Obtain a corner of the geometry.
Definition common/geometry.hh:219
│ │ │ │ -
int corners() const
Return the number of corners of the reference element.
Definition common/geometry.hh:205
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
bool findtoken(std ::string token)
Definition basic.cc:123
│ │ │ │ -
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ -
Definition boundarydom.hh:23
│ │ │ │ -
int id() const
Definition boundarydom.hh:42
│ │ │ │ -
const BoundaryParameter & parameter() const
Definition boundarydom.hh:54
│ │ │ │ -
Definition boundarydom.hh:195
│ │ │ │ -
Common Grid parameters.
Definition gridparameter.hh:35
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ -
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ -
Grid parameters for YaspGrid.
Definition dgfyasp.hh:40
│ │ │ │ -
int _overlap
Definition dgfyasp.hh:42
│ │ │ │ -
YaspGridParameterBlock(std::istream &in)
constructor taking istream
Definition dgfyasp.hh:46
│ │ │ │ -
int overlap() const
get dimension of world found in block
Definition dgfyasp.hh:74
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:98
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:104
│ │ │ │ -
bool wasInserted(const Intersection &intersection) const
Definition dgfyasp.hh:124
│ │ │ │ - │ │ │ │ -
std::vector< double > & parameter(const Entity &)
Definition dgfyasp.hh:177
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfyasp.hh:91
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfyasp.hh:160
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid
Definition dgfyasp.hh:89
│ │ │ │ -
int boundaryId(const Intersection &intersection) const
Definition dgfyasp.hh:130
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfyasp.hh:356
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:302
│ │ │ │ - │ │ │ │ -
int boundaryId(const Intersection &intersection) const
Definition dgfyasp.hh:326
│ │ │ │ -
YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid
Definition dgfyasp.hh:287
│ │ │ │ -
bool wasInserted(const Intersection &intersection) const
Definition dgfyasp.hh:320
│ │ │ │ -
std::vector< double > & parameter(const Entity &entity)
Definition dgfyasp.hh:373
│ │ │ │ - │ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfyasp.hh:289
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:296
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static double refineWeight()
Definition dgfyasp.hh:499
│ │ │ │ -
static int refineStepsForHalf()
Definition dgfyasp.hh:498
│ │ │ │ -
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
int & noflines()
Definition basic.hh:87
│ │ │ │ +
int linenumber()
Definition basic.hh:92
│ │ │ │ +
Definition boundaryseg.hh:25
│ │ │ │ +
bool ok()
Definition boundaryseg.hh:48
│ │ │ │ +
int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int vtxoffset)
Definition boundaryseg.cc:35
│ │ │ │ +
std::pair< int, BoundaryParameter > BndParam
Definition boundaryseg.hh:36
│ │ │ │ +
DGFEntityKey< unsigned int > EntityKey
Definition boundaryseg.hh:35
│ │ │ │ +
int nofbound()
Definition boundaryseg.hh:53
│ │ │ │ +
Definition entitykey.hh:21
│ │ │ │
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ -
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ -
Container for equidistant coordinates in a YaspGrid.
Definition coordinates.hh:29
│ │ │ │ -
Container for equidistant coordinates in a YaspGrid with non-trivial origin.
Definition coordinates.hh:131
│ │ │ │ - │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,738 +3,131 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfyasp.hh │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +boundaryseg.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGFPARSERYASP_HH │ │ │ │ │ -6#define DUNE_DGFPARSERYASP_HH │ │ │ │ │ +5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ -10#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -15 // External Forward Declarations │ │ │ │ │ -16 // ----------------------------- │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +16 │ │ │ │ │ 17 │ │ │ │ │ -18 template< class GridImp, class IntersectionImp > │ │ │ │ │ -19 class Intersection; │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ 20 │ │ │ │ │ -21 │ │ │ │ │ -22 namespace dgf │ │ │ │ │ -23 { │ │ │ │ │ -24 │ │ │ │ │ -_3_8 class _Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -39 : public _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -40 { │ │ │ │ │ -41 protected: │ │ │ │ │ -_4_2 int ___o_v_e_r_l_a_p; // overlap for YaspGrid │ │ │ │ │ -43 │ │ │ │ │ -44 public: │ │ │ │ │ -_4_6 _Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k( std::istream &in ) │ │ │ │ │ -47 : _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k( in ), │ │ │ │ │ -48 ___o_v_e_r_l_a_p( 0 ) // default value │ │ │ │ │ +21 namespace dgf │ │ │ │ │ +22 { │ │ │ │ │ +_2_3 class _B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k │ │ │ │ │ +24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +25 { │ │ │ │ │ +26 int dimworld; // the dimension of the vertices (is given from user) │ │ │ │ │ +27 bool goodline; // active line describes a vertex │ │ │ │ │ +28 std :: vector< unsigned int > p; // active vertex │ │ │ │ │ +29 int bndid; │ │ │ │ │ +30 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e BoundaryParameter; │ │ │ │ │ +31 BoundaryParameter parameter; │ │ │ │ │ +32 bool simplexgrid; │ │ │ │ │ +33 │ │ │ │ │ +34 public: │ │ │ │ │ +_3_5 typedef _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_> _E_n_t_i_t_y_K_e_y; │ │ │ │ │ +_3_6 typedef std::pair < int, BoundaryParameter > _B_n_d_P_a_r_a_m; │ │ │ │ │ +37 │ │ │ │ │ +38 // initialize vertex block and get first vertex │ │ │ │ │ +39 _B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k ( std :: istream &in, int pnofvtx, │ │ │ │ │ +40 int pdimworld, bool psimplexgrid ); │ │ │ │ │ +41 │ │ │ │ │ +42 // some information │ │ │ │ │ +43 int _g_e_t( std :: map< EntityKey, BndParam > & facemap, │ │ │ │ │ +44 bool fixedsize, │ │ │ │ │ +45 int vtxoffset │ │ │ │ │ +46 ); │ │ │ │ │ +47 │ │ │ │ │ +_4_8 bool _o_k() │ │ │ │ │ 49 { │ │ │ │ │ -50 // check overlap │ │ │ │ │ -51 if( _f_i_n_d_t_o_k_e_n( "overlap" ) ) │ │ │ │ │ -52 { │ │ │ │ │ -53 int x; │ │ │ │ │ -54 if( _g_e_t_n_e_x_t_e_n_t_r_y(x) ) ___o_v_e_r_l_a_p = x; │ │ │ │ │ -55 else │ │ │ │ │ -56 { │ │ │ │ │ -57 dwarn << "GridParameterBlock: found keyword `overlap' but no value, │ │ │ │ │ -defaulting to `" << ___o_v_e_r_l_a_p <<"' !\n"; │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 if (___o_v_e_r_l_a_p < 0) │ │ │ │ │ -61 { │ │ │ │ │ -62 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n,"Negative overlap specified!"); │ │ │ │ │ -63 } │ │ │ │ │ -64 } │ │ │ │ │ -65 else │ │ │ │ │ -66 { │ │ │ │ │ -67 dwarn << "YaspGridParameterBlock: Parameter 'overlap' not specified, " │ │ │ │ │ -68 << "defaulting to '" << ___o_v_e_r_l_a_p << "'." << std::endl; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -_7_4 int _o_v_e_r_l_a_p () const │ │ │ │ │ -75 { │ │ │ │ │ -76 return ___o_v_e_r_l_a_p; │ │ │ │ │ -77 } │ │ │ │ │ +50 return goodline; │ │ │ │ │ +51 } │ │ │ │ │ +52 │ │ │ │ │ +_5_3 int _n_o_f_b_o_u_n_d() │ │ │ │ │ +54 { │ │ │ │ │ +55 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +58 private: │ │ │ │ │ +59 bool next(); │ │ │ │ │ +60 │ │ │ │ │ +61 // get coordinates of active vertex │ │ │ │ │ +62 int operator[] (int i) │ │ │ │ │ +63 { │ │ │ │ │ +64 assert(_o_k()); │ │ │ │ │ +65 assert(_l_i_n_e_n_u_m_b_e_r()>=0); │ │ │ │ │ +66 assert(0<=i && i │ │ │ │ │ -_8_7 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _Y_a_s_p_G_r_i_d > > │ │ │ │ │ -88 { │ │ │ │ │ -_8_9 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> > _G_r_i_d; │ │ │ │ │ -_9_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_9_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ -92 │ │ │ │ │ -93 private: │ │ │ │ │ -94 typedef FieldVector< ctype, dimension > Point; │ │ │ │ │ -95 typedef _d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k _B_o_u_n_d_a_r_y_D_o_m_a_i_n_B_l_o_c_k; │ │ │ │ │ -96 │ │ │ │ │ -97 public: │ │ │ │ │ -_9_8 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -99 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -100 { │ │ │ │ │ -101 generate( input, comm ); │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -105 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -106 { │ │ │ │ │ -107 std::ifstream input( filename.c_str() ); │ │ │ │ │ -108 if( !input ) │ │ │ │ │ -109 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error: Macrofile '" << filename << "' not found" │ │ │ │ │ -); │ │ │ │ │ -110 generate( input, comm ); │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_3 _~_D_G_F_G_r_i_d_F_a_c_t_o_r_y () │ │ │ │ │ -114 { │ │ │ │ │ -115 delete boundaryDomainBlock_; │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_1_8 _G_r_i_d *_g_r_i_d() const │ │ │ │ │ -119 { │ │ │ │ │ -120 return grid_; │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -123 template │ │ │ │ │ -_1_2_4 bool _w_a_s_I_n_s_e_r_t_e_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ -125 { │ │ │ │ │ -126 return false; │ │ │ │ │ -127 } │ │ │ │ │ -128 │ │ │ │ │ -129 template │ │ │ │ │ -_1_3_0 int _b_o_u_n_d_a_r_y_I_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ -131 { │ │ │ │ │ -132 if( boundaryDomainBlock_->isactive() ) │ │ │ │ │ -133 { │ │ │ │ │ -134 std::vector< Point > corners; │ │ │ │ │ -135 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ -136 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ -137 if( data ) │ │ │ │ │ -138 return data->_i_d(); │ │ │ │ │ -139 else │ │ │ │ │ -140 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ -141 } │ │ │ │ │ -142 else │ │ │ │ │ -143 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146 template< int codim > │ │ │ │ │ -_1_4_7 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -148 { │ │ │ │ │ -149 return 0; │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -152 // return true if boundary parameters found │ │ │ │ │ -_1_5_3 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -154 { │ │ │ │ │ -155 return boundaryDomainBlock_->hasParameter(); │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 template< class GG, class II > │ │ │ │ │ -159 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ -_1_6_0 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) const │ │ │ │ │ -161 { │ │ │ │ │ -162 if( _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s() ) │ │ │ │ │ -163 { │ │ │ │ │ -164 std::vector< Point > corners; │ │ │ │ │ -165 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ -166 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ -167 if( data ) │ │ │ │ │ -168 return data->_p_a_r_a_m_e_t_e_r(); │ │ │ │ │ -169 else │ │ │ │ │ -170 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -171 } │ │ │ │ │ -172 else │ │ │ │ │ -173 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 template< class Entity > │ │ │ │ │ -_1_7_7 std::vector &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y & ) │ │ │ │ │ -178 { │ │ │ │ │ -179 return emptyParam; │ │ │ │ │ -180 } │ │ │ │ │ -181 │ │ │ │ │ -182 private: │ │ │ │ │ -183 void generate( std::istream &gridin, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm ); │ │ │ │ │ -184 │ │ │ │ │ -185 template< class Geometry > │ │ │ │ │ -186 static void getCorners ( const _G_e_o_m_e_t_r_y &geometry, std::vector< Point > │ │ │ │ │ -&corners ) │ │ │ │ │ -187 { │ │ │ │ │ -188 corners.resize( geometry._c_o_r_n_e_r_s() ); │ │ │ │ │ -189 for( int i = 0; i < geometry._c_o_r_n_e_r_s(); ++i ) │ │ │ │ │ -190 { │ │ │ │ │ -191 const typename _G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e corner = geometry._c_o_r_n_e_r( i ); │ │ │ │ │ -192 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ -193 corners[ i ][ j ] = corner[ j ]; │ │ │ │ │ -194 } │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -197 _G_r_i_d *grid_; │ │ │ │ │ -198 dgf::BoundaryDomBlock *boundaryDomainBlock_; │ │ │ │ │ -199 std::vector emptyParam; │ │ │ │ │ -200 }; │ │ │ │ │ -201 │ │ │ │ │ -202 // generate YaspGrid from the provided DGF │ │ │ │ │ -203 template< typename ctype, int dim > │ │ │ │ │ -204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates > > │ │ │ │ │ -205 ::generate ( std::istream &gridin, MPICommunicatorType comm ) │ │ │ │ │ -206 { │ │ │ │ │ -207 using std::abs; │ │ │ │ │ -208 dgf::IntervalBlock intervalBlock( gridin ); │ │ │ │ │ -209 │ │ │ │ │ -210 if( !intervalBlock.isactive() ) │ │ │ │ │ -211 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval │ │ │ │ │ -block." ); │ │ │ │ │ -212 │ │ │ │ │ -213 if( intervalBlock.numIntervals() != 1 ) │ │ │ │ │ -214 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." ); │ │ │ │ │ -215 │ │ │ │ │ -216 if( intervalBlock.dimw() != dim ) │ │ │ │ │ -217 { │ │ │ │ │ -218 DUNE_THROW( DGFException, │ │ │ │ │ -219 "Cannot read an interval of dimension " << intervalBlock.dimw() │ │ │ │ │ -220 << " into a YaspGrid< " << dim << " >." ); │ │ │ │ │ -221 } │ │ │ │ │ -222 │ │ │ │ │ -223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 ); │ │ │ │ │ -224 │ │ │ │ │ -225 FieldVector lang; │ │ │ │ │ -226 std::array anz; │ │ │ │ │ -227 for( int i = 0; i < dim; ++i ) │ │ │ │ │ -228 { │ │ │ │ │ -229 // check that start point is 0.0 │ │ │ │ │ -230 if( _a_b_s( interval.p[ 0 ][ i ] ) > 1e-10 ) │ │ │ │ │ -231 { │ │ │ │ │ -232 DUNE_THROW( DGFException, │ │ │ │ │ -233 "YaspGrid cannot handle grids with non-zero left lower corner." ); │ │ │ │ │ -234 } │ │ │ │ │ -235 │ │ │ │ │ -236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ]; │ │ │ │ │ -237 anz[ i ] = interval.n[ i ]; │ │ │ │ │ -238 } │ │ │ │ │ -239 │ │ │ │ │ -240 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ -Transformation; │ │ │ │ │ -241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim ); │ │ │ │ │ -242 std::bitset< dim > per; │ │ │ │ │ -243 const int numTrafos = trafoBlock.numTransformations(); │ │ │ │ │ -244 for( int k = 0; k < numTrafos; ++k ) │ │ │ │ │ -245 { │ │ │ │ │ -246 const Transformation &trafo = trafoBlock.transformation( k ); │ │ │ │ │ -247 │ │ │ │ │ -248 bool identity = true; │ │ │ │ │ -249 for( int i = 0; i < dim; ++i ) │ │ │ │ │ -250 for( int j = 0; j < dim; ++j ) │ │ │ │ │ -251 identity &= (_a_b_s( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10); │ │ │ │ │ -252 if( !identity ) │ │ │ │ │ -253 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face │ │ │ │ │ -transformations." ); │ │ │ │ │ -254 │ │ │ │ │ -255 int numDirs = 0; │ │ │ │ │ -256 int dir = -1; │ │ │ │ │ -257 for( int i = 0; i < dim; ++i ) │ │ │ │ │ -258 { │ │ │ │ │ -259 if( _a_b_s( trafo.shift[ i ] ) < 1e-10 ) │ │ │ │ │ -260 continue; │ │ │ │ │ -261 dir = i; │ │ │ │ │ -262 ++numDirs; │ │ │ │ │ -263 } │ │ │ │ │ -264 if( (numDirs != 1) || (_a_b_s( _a_b_s( trafo.shift[ dir ] ) - lang[ dir ] ) >= │ │ │ │ │ -1e-10) ) │ │ │ │ │ -265 { │ │ │ │ │ -266 std::cerr << "Tranformation '" << trafo │ │ │ │ │ -267 << "' does not map boundaries on boundaries." << std::endl; │ │ │ │ │ -268 } │ │ │ │ │ -269 else │ │ │ │ │ -270 per[ dir ] = true; │ │ │ │ │ -271 } │ │ │ │ │ -272 │ │ │ │ │ -273 // get grid parameters │ │ │ │ │ -274 dgf::YaspGridParameterBlock grdParam( gridin ); │ │ │ │ │ -275 │ │ │ │ │ -276 grid_ = new YaspGrid< dim , EquidistantCoordinates >( lang, │ │ │ │ │ -anz, per, grdParam.overlap(), comm ); │ │ │ │ │ -277 │ │ │ │ │ -278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension ); │ │ │ │ │ -279 } │ │ │ │ │ -280 │ │ │ │ │ -284 template │ │ │ │ │ -_2_8_5 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _Y_a_s_p_G_r_i_d > > │ │ │ │ │ -286 { │ │ │ │ │ -_2_8_7 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> > _G_r_i_d; │ │ │ │ │ -_2_8_8 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_2_8_9 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ -290 │ │ │ │ │ -291 private: │ │ │ │ │ -292 typedef FieldVector< ctype, dimension > Point; │ │ │ │ │ -293 typedef _d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k _B_o_u_n_d_a_r_y_D_o_m_a_i_n_B_l_o_c_k; │ │ │ │ │ -294 │ │ │ │ │ -295 public: │ │ │ │ │ -_2_9_6 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -297 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -298 { │ │ │ │ │ -299 generate( input, comm ); │ │ │ │ │ -300 } │ │ │ │ │ -301 │ │ │ │ │ -_3_0_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -303 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -304 { │ │ │ │ │ -305 std::ifstream input( filename.c_str() ); │ │ │ │ │ -306 generate( input, comm ); │ │ │ │ │ -307 } │ │ │ │ │ -308 │ │ │ │ │ -_3_0_9 _~_D_G_F_G_r_i_d_F_a_c_t_o_r_y () │ │ │ │ │ -310 { │ │ │ │ │ -311 delete boundaryDomainBlock_; │ │ │ │ │ -312 } │ │ │ │ │ -313 │ │ │ │ │ -_3_1_4 _G_r_i_d *_g_r_i_d() const │ │ │ │ │ -315 { │ │ │ │ │ -316 return grid_; │ │ │ │ │ -317 } │ │ │ │ │ -318 │ │ │ │ │ -319 template │ │ │ │ │ -_3_2_0 bool _w_a_s_I_n_s_e_r_t_e_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ -321 { │ │ │ │ │ -322 return false; │ │ │ │ │ -323 } │ │ │ │ │ -324 │ │ │ │ │ -325 template │ │ │ │ │ -_3_2_6 int _b_o_u_n_d_a_r_y_I_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ -327 { │ │ │ │ │ -328 if( boundaryDomainBlock_->isactive() ) │ │ │ │ │ -329 { │ │ │ │ │ -330 std::vector< Point > corners; │ │ │ │ │ -331 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ -332 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ -333 if( data ) │ │ │ │ │ -334 return data->_i_d(); │ │ │ │ │ -335 else │ │ │ │ │ -336 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ -337 } │ │ │ │ │ -338 else │ │ │ │ │ -339 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ -340 } │ │ │ │ │ -341 │ │ │ │ │ -342 template< int codim > │ │ │ │ │ -_3_4_3 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -344 { │ │ │ │ │ -345 return 0; │ │ │ │ │ -346 } │ │ │ │ │ -347 │ │ │ │ │ -348 // return true if boundary parameters found │ │ │ │ │ -_3_4_9 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -350 { │ │ │ │ │ -351 return boundaryDomainBlock_->hasParameter(); │ │ │ │ │ -352 } │ │ │ │ │ -353 │ │ │ │ │ -354 template< class GG, class II > │ │ │ │ │ -355 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ -_3_5_6 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) const │ │ │ │ │ -357 { │ │ │ │ │ -358 if( _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s() ) │ │ │ │ │ -359 { │ │ │ │ │ -360 std::vector< Point > corners; │ │ │ │ │ -361 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ -362 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ -363 if( data ) │ │ │ │ │ -364 return data->_p_a_r_a_m_e_t_e_r(); │ │ │ │ │ -365 else │ │ │ │ │ -366 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -367 } │ │ │ │ │ -368 else │ │ │ │ │ -369 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -370 } │ │ │ │ │ -371 │ │ │ │ │ -372 template< class Entity > │ │ │ │ │ -_3_7_3 std::vector &_p_a_r_a_m_e_t_e_r ( [[maybe_unused]] const _E_n_t_i_t_y &entity ) │ │ │ │ │ -374 { │ │ │ │ │ -375 return emptyParam; │ │ │ │ │ -376 } │ │ │ │ │ -377 │ │ │ │ │ -378 private: │ │ │ │ │ -379 void generate( std::istream &gridin, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm ); │ │ │ │ │ -380 │ │ │ │ │ -381 template< class Geometry > │ │ │ │ │ -382 static void getCorners ( const _G_e_o_m_e_t_r_y &geometry, std::vector< Point > │ │ │ │ │ -&corners ) │ │ │ │ │ -383 { │ │ │ │ │ -384 corners.resize( geometry._c_o_r_n_e_r_s() ); │ │ │ │ │ -385 for( int i = 0; i < geometry._c_o_r_n_e_r_s(); ++i ) │ │ │ │ │ -386 { │ │ │ │ │ -387 const typename _G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e corner = geometry._c_o_r_n_e_r( i ); │ │ │ │ │ -388 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ -389 corners[ i ][ j ] = corner[ j ]; │ │ │ │ │ -390 } │ │ │ │ │ -391 } │ │ │ │ │ -392 │ │ │ │ │ -393 _G_r_i_d *grid_; │ │ │ │ │ -394 dgf::BoundaryDomBlock *boundaryDomainBlock_; │ │ │ │ │ -395 std::vector emptyParam; │ │ │ │ │ -396 }; │ │ │ │ │ -397 │ │ │ │ │ -398 // generate YaspGrid from the provided DGF │ │ │ │ │ -399 template< typename ctype, int dim > │ │ │ │ │ -400 inline void DGFGridFactory< YaspGrid > > │ │ │ │ │ -401 ::generate ( std::istream &gridin, MPICommunicatorType comm ) │ │ │ │ │ -402 { │ │ │ │ │ -403 using std::abs; │ │ │ │ │ -404 dgf::IntervalBlock intervalBlock( gridin ); │ │ │ │ │ -405 │ │ │ │ │ -406 if( !intervalBlock.isactive() ) │ │ │ │ │ -407 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval │ │ │ │ │ -block." ); │ │ │ │ │ -408 │ │ │ │ │ -409 if( intervalBlock.numIntervals() != 1 ) │ │ │ │ │ -410 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." ); │ │ │ │ │ -411 │ │ │ │ │ -412 if( intervalBlock.dimw() != dim ) │ │ │ │ │ -413 { │ │ │ │ │ -414 DUNE_THROW( DGFException, │ │ │ │ │ -415 "Cannot read an interval of dimension " │ │ │ │ │ -416 << intervalBlock.dimw() │ │ │ │ │ -417 << " into a YaspGrid< " << dim << " >." ); │ │ │ │ │ -418 } │ │ │ │ │ -419 │ │ │ │ │ -420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 ); │ │ │ │ │ -421 │ │ │ │ │ -422 FieldVector lower; │ │ │ │ │ -423 FieldVector upper; │ │ │ │ │ -424 std::array anz; │ │ │ │ │ -425 for( int i = 0; i < dim; ++i ) │ │ │ │ │ -426 { │ │ │ │ │ -427 lower[ i ] = interval.p[ 0 ][ i ]; │ │ │ │ │ -428 upper[ i ] = interval.p[ 1 ][ i ]; │ │ │ │ │ -429 anz[ i ] = interval.n[ i ]; │ │ │ │ │ -430 } │ │ │ │ │ -431 │ │ │ │ │ -432 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ -Transformation; │ │ │ │ │ -433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim ); │ │ │ │ │ -434 std::bitset< dim > periodic; │ │ │ │ │ -435 const int numTrafos = trafoBlock.numTransformations(); │ │ │ │ │ -436 for( int k = 0; k < numTrafos; ++k ) │ │ │ │ │ -437 { │ │ │ │ │ -438 const Transformation &trafo = trafoBlock.transformation( k ); │ │ │ │ │ -439 │ │ │ │ │ -440 bool identity = true; │ │ │ │ │ -441 for( int i = 0; i < dim; ++i ) │ │ │ │ │ -442 for( int j = 0; j < dim; ++j ) │ │ │ │ │ -443 identity &= (_a_b_s( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10); │ │ │ │ │ -444 if( !identity ) │ │ │ │ │ -445 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face │ │ │ │ │ -transformations." ); │ │ │ │ │ -446 │ │ │ │ │ -447 int numDirs = 0; │ │ │ │ │ -448 int dir = -1; │ │ │ │ │ -449 for( int currentDir = 0; currentDir < dim; ++currentDir ) │ │ │ │ │ -450 { │ │ │ │ │ -451 if( _a_b_s( trafo.shift[ currentDir ] ) > 1e-10 ) │ │ │ │ │ -452 { │ │ │ │ │ -453 dir = currentDir; │ │ │ │ │ -454 ++numDirs; │ │ │ │ │ -455 } │ │ │ │ │ -456 } │ │ │ │ │ -457 if ( (numDirs != 1) │ │ │ │ │ -458 || (_a_b_s( _a_b_s( trafo.shift[ dir ] ) - _a_b_s( upper[ dir ] - lower[ dir ] ) ) │ │ │ │ │ ->= 1e-10) ) │ │ │ │ │ -459 { │ │ │ │ │ -460 std::cerr << "Tranformation '" << trafo │ │ │ │ │ -461 << "' does not map boundaries on boundaries." << std::endl; │ │ │ │ │ -462 } │ │ │ │ │ -463 else │ │ │ │ │ -464 { │ │ │ │ │ -465 periodic[ dir ] = true; │ │ │ │ │ -466 } │ │ │ │ │ -467 } │ │ │ │ │ -468 │ │ │ │ │ -469 // get grid parameters │ │ │ │ │ -470 dgf::YaspGridParameterBlock grdParam( gridin ); │ │ │ │ │ -471 │ │ │ │ │ -472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates > │ │ │ │ │ -473 ( lower, upper, anz, periodic, grdParam.overlap(), comm ); │ │ │ │ │ -474 │ │ │ │ │ -475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension ); │ │ │ │ │ -476 } │ │ │ │ │ -477 │ │ │ │ │ -483 template< class ctype, int dim > │ │ │ │ │ -_4_8_4 class _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _D_u_n_e::_Y_a_s_p_G_r_i_d > > │ │ │ │ │ -485 { │ │ │ │ │ -486 using _G_r_i_d = _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_d_i_m_,_ _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> │ │ │ │ │ ->; │ │ │ │ │ -487 public: │ │ │ │ │ -488 template< typename In > │ │ │ │ │ -_4_8_9 _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const In & ) {} │ │ │ │ │ -_4_9_0 _G_r_i_d *_g_r_i_d() │ │ │ │ │ -491 { │ │ │ │ │ -492 throw std::invalid_argument( "Tensor product coordinates for YaspGrid are │ │ │ │ │ -currently not supported via the DGFGridFactory" ); │ │ │ │ │ -493 } │ │ │ │ │ -494 }; │ │ │ │ │ -495 │ │ │ │ │ -496 template │ │ │ │ │ -_4_9_7 struct _D_G_F_G_r_i_d_I_n_f_o< _Y_a_s_p_G_r_i_d > { │ │ │ │ │ -_4_9_8 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f() {return 1;} │ │ │ │ │ -_4_9_9 static double _r_e_f_i_n_e_W_e_i_g_h_t() {return std::pow(0.5,dim);} │ │ │ │ │ -500 }; │ │ │ │ │ -501 │ │ │ │ │ -502} │ │ │ │ │ -503#endif // #ifndef DUNE_DGFPARSERYASP_HH │ │ │ │ │ -_y_a_s_p_g_r_i_d_._h_h │ │ │ │ │ +81#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s │ │ │ │ │ -void abs(const DofVectorPointer< int > &dofVector) │ │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:328 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -geometrical information about the intersection in global coordinates. │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:323 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ -int indexInInside() const │ │ │ │ │ -Local index of codim 1 entity in the inside() entity where intersection is │ │ │ │ │ -contained in. │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Wrapper class for geometries. │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:71 │ │ │ │ │ -_D_u_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, cdim > GlobalCoordinate │ │ │ │ │ -type of the global coordinates │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ │ -Obtain a corner of the geometry. │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:219 │ │ │ │ │ -_D_u_n_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 reference element. │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_f_i_n_d_t_o_k_e_n │ │ │ │ │ -bool findtoken(std ::string token) │ │ │ │ │ -DDeeffiinniittiioonn basic.cc:123 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ -bool getnextentry(ENTRY &entry) │ │ │ │ │ -DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_i_d │ │ │ │ │ -int id() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -const BoundaryParameter & parameter() const │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ -DDeeffiinniittiioonn boundarydom.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -Common Grid parameters. │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ -exception class for IO errors in the DGF parser │ │ │ │ │ -DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ -Some simple static information for a given GridType. │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -Grid parameters for YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:___o_v_e_r_l_a_p │ │ │ │ │ -int _overlap │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ -YaspGridParameterBlock(std::istream &in) │ │ │ │ │ -constructor taking istream │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_o_v_e_r_l_a_p │ │ │ │ │ -int overlap() const │ │ │ │ │ -get dimension of world found in block │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ -comm=MPIHelper::getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:104 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Entity &) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ -> &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_~_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -~DGFGridFactory() │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_g_r_i_d │ │ │ │ │ -Grid * grid() const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_G_r_i_d │ │ │ │ │ -YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ -_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ -> &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:356 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ -comm=MPIHelper::getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:302 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_g_r_i_d │ │ │ │ │ -Grid * grid() const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:326 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_G_r_i_d │ │ │ │ │ -YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:287 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:320 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:373 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:349 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:289 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:296 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_~_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -~DGFGridFactory() │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:309 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -_>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:343 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ -_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ -Grid * grid() │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:490 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ -_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const In &) │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:489 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_i_n_a_t_e_s_ _>_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ -static double refineWeight() │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:499 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_i_n_a_t_e_s_ _>_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -DDeeffiinniittiioonn dgfyasp.hh:498 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ -static const type & defaultValue() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_n_o_f_l_i_n_e_s │ │ │ │ │ +int & noflines() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_l_i_n_e_n_u_m_b_e_r │ │ │ │ │ +int linenumber() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn boundaryseg.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_o_k │ │ │ │ │ +bool ok() │ │ │ │ │ +DDeeffiinniittiioonn boundaryseg.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int │ │ │ │ │ +vtxoffset) │ │ │ │ │ +DDeeffiinniittiioonn boundaryseg.cc:35 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_B_n_d_P_a_r_a_m │ │ │ │ │ +std::pair< int, BoundaryParameter > BndParam │ │ │ │ │ +DDeeffiinniittiioonn boundaryseg.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_E_n_t_i_t_y_K_e_y │ │ │ │ │ +DGFEntityKey< unsigned int > EntityKey │ │ │ │ │ +DDeeffiinniittiioonn boundaryseg.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_S_e_g_B_l_o_c_k_:_:_n_o_f_b_o_u_n_d │ │ │ │ │ +int nofbound() │ │ │ │ │ +DDeeffiinniittiioonn boundaryseg.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:21 │ │ │ │ │ _D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ std::string type │ │ │ │ │ type of additional boundary parameters │ │ │ │ │ DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ -[ provides Dune::Grid ] │ │ │ │ │ -DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Container for equidistant coordinates in a YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:131 │ │ │ │ │ -_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parser.hh File Reference │ │ │ │ +dune-grid: gridparameter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,43 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
parser.hh File Reference
│ │ │ │ +
gridparameter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <iostream>
│ │ │ │ #include <string>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::DGFBoundaryParameter
 Contains types for additional features. More...
 
class  Dune::DuneGridFormatParser
 The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. More...
class  Dune::dgf::GridParameterBlock
 Common Grid parameters. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,29 +3,26 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -parser.hh File Reference │ │ │ │ │ +gridparameter.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -  Contains types for additional features. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ -  The DuneGridFormatParser class: reads a DGF file and stores build │ │ │ │ │ - information in vector structures used by the _M_a_c_r_o_G_r_i_d class. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +  Common _G_r_i_d parameters. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parser.hh Source File │ │ │ │ +dune-grid: gridparameter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,230 +70,134 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
parser.hh
│ │ │ │ +
gridparameter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ │ -
6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ │ +
5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ │
7
│ │ │ │
8#include <iostream>
│ │ │ │
9#include <string>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11#include <map>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │
12
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
18 class DGFPrintInfo;
│ │ │ │ -
19
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
25 typedef std::string type;
│ │ │ │ -
26
│ │ │ │ -
│ │ │ │ -
28 static const type &defaultValue ()
│ │ │ │ -
29 {
│ │ │ │ -
30 static type value;
│ │ │ │ -
31 return value;
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 static type convert ( const std::string & parameter )
│ │ │ │ -
36 {
│ │ │ │ -
37 return parameter;
│ │ │ │ -
38 }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
41 static const char delimiter = ':';
│ │ │ │ -
42 };
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 public:
│ │ │ │ -
49 typedef enum {Simplex,Cube,General} element_t;
│ │ │ │ -
50
│ │ │ │ - │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 namespace dgf
│ │ │ │ +
18 {
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
34 : public BasicBlock
│ │ │ │ +
35 {
│ │ │ │ +
36 public:
│ │ │ │ +
37 typedef unsigned int Flags;
│ │ │ │ +
38
│ │ │ │ +
39 static const Flags foundName = 1 << 0;
│ │ │ │ +
40 static const Flags foundDumpFileName = 1 << 1;
│ │ │ │ +
41 static const Flags foundLongestEdge = 1 << 5;
│ │ │ │ +
42
│ │ │ │ +
43 protected:
│ │ │ │ +
44 Flags foundFlags_; // supportFlags, this block was created with
│ │ │ │ +
45 std::string name_; // name of the grid
│ │ │ │ +
46 std::string dumpFileName_; // name of the grid
│ │ │ │ +
47 bool markLongestEdge_; // Mark longest edge for AlbertaGrid
│ │ │ │ +
48
│ │ │ │ +
49 private:
│ │ │ │ +
50 // copy not implemented
│ │ │ │ + │ │ │ │
52
│ │ │ │ -
54 DuneGridFormatParser ( int rank, int size );
│ │ │ │ -
55
│ │ │ │ -
66 static bool isDuneGridFormat ( std::istream &input );
│ │ │ │ -
67
│ │ │ │ -
77 static bool isDuneGridFormat ( const std::string &filename );
│ │ │ │ -
78
│ │ │ │ -
91 bool readDuneGrid( std::istream &input, int dimG, int dimW );
│ │ │ │ -
92
│ │ │ │ -
94 void writeTetgenPoly ( const std::string &, std::string &, std::string & );
│ │ │ │ -
95
│ │ │ │ -
96 void writeTetgenPoly ( std::ostream & out, const bool writeSegments = true );
│ │ │ │ +
53 public:
│ │ │ │ +
55 GridParameterBlock ( std::istream &in );
│ │ │ │ +
56
│ │ │ │ +
│ │ │ │ +
58 const std::string &name ( const std::string &defaultValue ) const
│ │ │ │ +
59 {
│ │ │ │ +
60 if( (foundFlags_ & foundName) == 0 )
│ │ │ │ +
61 {
│ │ │ │ +
62 dwarn << "GridParameterBlock: Parameter 'name' not specified, "
│ │ │ │ +
63 << "defaulting to '" << defaultValue << "'." << std::endl;
│ │ │ │ +
64 return defaultValue;
│ │ │ │ +
65 }
│ │ │ │ +
66 else
│ │ │ │ +
67 return name_;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 const std::string &dumpFileName ( ) const
│ │ │ │ +
71 {
│ │ │ │ +
72 if( (foundFlags_ & foundDumpFileName) != 0 )
│ │ │ │ +
73 {
│ │ │ │ +
74 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', "
│ │ │ │ +
75 << "dumping file to `" << dumpFileName_ << "'" << std::endl;
│ │ │ │ +
76 }
│ │ │ │ +
77 return dumpFileName_;
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
81 bool markLongestEdge () const
│ │ │ │ +
82 {
│ │ │ │ +
83 if( (foundFlags_ & foundLongestEdge) == 0 )
│ │ │ │ +
84 {
│ │ │ │ +
85 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, "
│ │ │ │ +
86 << "defaulting to 'ARBITRARY'." << std::endl;
│ │ │ │ +
87 }
│ │ │ │ +
88 return markLongestEdge_;
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
91 // some information
│ │ │ │ +
│ │ │ │ +
92 bool ok()
│ │ │ │ +
93 {
│ │ │ │ +
94 return true;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96 };
│ │ │ │ +
│ │ │ │
97
│ │ │ │ -
98 protected:
│ │ │ │ -
99 void generateBoundaries ( std::istream &, bool );
│ │ │ │ +
98
│ │ │ │ +
99 } // end namespace dgf
│ │ │ │
100
│ │ │ │ -
101 // call to tetgen/triangle
│ │ │ │ -
102 void generateSimplexGrid ( std::istream & );
│ │ │ │ -
103 void readTetgenTriangle ( const std::string & );
│ │ │ │ -
104
│ │ │ │ -
105 // helper methods
│ │ │ │ -
106 void removeCopies ();
│ │ │ │ -
107
│ │ │ │ -
108 void setOrientation ( int use1, int use2,
│ │ │ │ -
109 orientation_t orientation=counterclockwise );
│ │ │ │ -
110
│ │ │ │ -
111 void setRefinement ( int use1, int use2, int is1=-1, int is2=-1 );
│ │ │ │ -
112
│ │ │ │ -
113 double testTriang ( int snr );
│ │ │ │ -
114
│ │ │ │ -
115 std::vector< double > & getElParam ( int i, std::vector< double > & coord );
│ │ │ │ -
116
│ │ │ │ -
117 std::vector< double > & getVtxParam ( int i, std::vector< double > & coord );
│ │ │ │ -
118
│ │ │ │ -
119 static std::string temporaryFileName ();
│ │ │ │ -
120
│ │ │ │ -
121 // dimension of world and problem: set through the readDuneGrid() method
│ │ │ │ - │ │ │ │ -
123
│ │ │ │ -
124 // vector of vertex coordinates
│ │ │ │ -
125 std::vector < std::vector < double > > vtx;
│ │ │ │ -
126
│ │ │ │ - │ │ │ │ -
128
│ │ │ │ - │ │ │ │ -
130
│ │ │ │ -
131 double minVertexDistance; // min. L^1 distance of distinct points
│ │ │ │ -
132
│ │ │ │ -
133 // vector of elements
│ │ │ │ -
134 std :: vector< std :: vector< unsigned int > > elements;
│ │ │ │ -
135
│ │ │ │ - │ │ │ │ -
137
│ │ │ │ -
138 // vector of boundary segments + identifier
│ │ │ │ -
139 std::vector < std::vector < int > > bound;
│ │ │ │ -
140
│ │ │ │ - │ │ │ │ -
142
│ │ │ │ -
143 // map to generate and find boundary segments
│ │ │ │ - │ │ │ │ -
145 typedef std::pair < int, BoundaryParameter > BndParam;
│ │ │ │ -
146 typedef std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t;
│ │ │ │ - │ │ │ │ -
148
│ │ │ │ -
149 // true if parameters on a boundary found
│ │ │ │ - │ │ │ │ -
151
│ │ │ │ -
152 // set by generator depending on element type wanted
│ │ │ │ - │ │ │ │ -
154
│ │ │ │ -
155 // set by the readDuneGrid method depending
│ │ │ │ -
156 // on what type the elements were generated
│ │ │ │ - │ │ │ │ -
158
│ │ │ │ -
159 // true if grid is generated using the intervall Block
│ │ │ │ - │ │ │ │ -
161
│ │ │ │ -
162 // parameters on elements
│ │ │ │ - │ │ │ │ -
164
│ │ │ │ -
165 std::vector< std::vector< double > > vtxParams,elParams;
│ │ │ │ -
166
│ │ │ │ -
167 // write information about generation process
│ │ │ │ - │ │ │ │ -
169
│ │ │ │ -
170 std::vector < double > emptyParam_;
│ │ │ │ -
171
│ │ │ │ -
172
│ │ │ │ -
173 private:
│ │ │ │ -
174 int rank_;
│ │ │ │ -
175 int size_;
│ │ │ │ -
176
│ │ │ │ -
177 template< class GridType >
│ │ │ │ -
178 friend struct DGFGridFactory;
│ │ │ │ -
179
│ │ │ │ -
180 template< class GridType >
│ │ │ │ -
181 friend struct DGFBaseFactory;
│ │ │ │ -
182
│ │ │ │ -
183 };
│ │ │ │ -
│ │ │ │ -
184
│ │ │ │ -
185} // end namespace Dune
│ │ │ │ -
186
│ │ │ │ -
187#endif
│ │ │ │ - │ │ │ │ +
101} // end namespace Dune
│ │ │ │ +
102
│ │ │ │ +
103#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
Definition io/file/dgfparser/dgfparser.cc:26
│ │ │ │ -
Contains types for additional features.
Definition parser.hh:23
│ │ │ │ -
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ -
static const char delimiter
delimiter
Definition parser.hh:41
│ │ │ │ -
static type convert(const std::string &parameter)
copy from string
Definition parser.hh:35
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ -
The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures us...
Definition parser.hh:47
│ │ │ │ -
int nofvtxparams
Definition parser.hh:163
│ │ │ │ -
int nofbound
Definition parser.hh:141
│ │ │ │ -
std::pair< int, BoundaryParameter > BndParam
Definition parser.hh:145
│ │ │ │ -
void readTetgenTriangle(const std::string &)
Definition io/file/dgfparser/dgfparser.cc:795
│ │ │ │ -
static bool isDuneGridFormat(std::istream &input)
check whether a stream is in DUNE grid format
Definition io/file/dgfparser/dgfparser.cc:271
│ │ │ │ -
void setOrientation(int use1, int use2, orientation_t orientation=counterclockwise)
Definition io/file/dgfparser/dgfparser.cc:910
│ │ │ │ -
std::vector< std::vector< double > > vtxParams
Definition parser.hh:165
│ │ │ │ -
void setRefinement(int use1, int use2, int is1=-1, int is2=-1)
Definition io/file/dgfparser/dgfparser.cc:989
│ │ │ │ -
friend struct DGFBaseFactory
Definition parser.hh:181
│ │ │ │ -
static std::string temporaryFileName()
Definition io/file/dgfparser/dgfparser.cc:1096
│ │ │ │ -
void removeCopies()
Definition io/file/dgfparser/dgfparser.cc:464
│ │ │ │ -
int dimw
Definition parser.hh:122
│ │ │ │ -
int dimgrid
Definition parser.hh:122
│ │ │ │ -
element_t element
Definition parser.hh:153
│ │ │ │ -
DGFBoundaryParameter::type BoundaryParameter
Definition parser.hh:144
│ │ │ │ -
int nofelements
Definition parser.hh:136
│ │ │ │ -
orientation_t
Definition parser.hh:51
│ │ │ │ -
@ clockwise
Definition parser.hh:51
│ │ │ │ -
@ counterclockwise
Definition parser.hh:51
│ │ │ │ -
double testTriang(int snr)
Definition io/file/dgfparser/dgfparser.cc:1050
│ │ │ │ -
double minVertexDistance
Definition parser.hh:131
│ │ │ │ -
bool simplexgrid
Definition parser.hh:157
│ │ │ │ -
std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t
Definition parser.hh:146
│ │ │ │ -
std::vector< std::vector< int > > bound
Definition parser.hh:139
│ │ │ │ -
void generateSimplexGrid(std::istream &)
Definition io/file/dgfparser/dgfparser.cc:624
│ │ │ │ -
std::vector< double > emptyParam_
Definition parser.hh:170
│ │ │ │ -
int nofelparams
Definition parser.hh:163
│ │ │ │ -
std::vector< std::vector< double > > elParams
Definition parser.hh:165
│ │ │ │ -
facemap_t facemap
Definition parser.hh:147
│ │ │ │ -
element_t
Definition parser.hh:49
│ │ │ │ -
@ General
Definition parser.hh:49
│ │ │ │ -
@ Cube
Definition parser.hh:49
│ │ │ │ -
@ Simplex
Definition parser.hh:49
│ │ │ │ -
bool cube2simplex
Definition parser.hh:160
│ │ │ │ -
int nofvtx
Definition parser.hh:127
│ │ │ │ -
void writeTetgenPoly(const std::string &, std::string &, std::string &)
method to write in Tetgen/Triangle Poly Format
Definition io/file/dgfparser/dgfparser.cc:123
│ │ │ │ -
std::vector< std::vector< double > > vtx
Definition parser.hh:125
│ │ │ │ -
int vtxoffset
Definition parser.hh:129
│ │ │ │ -
bool readDuneGrid(std::istream &input, int dimG, int dimW)
parse dune grid format from stream
Definition io/file/dgfparser/dgfparser.cc:298
│ │ │ │ -
std ::vector< std ::vector< unsigned int > > elements
Definition parser.hh:134
│ │ │ │ -
bool haveBndParameters
Definition parser.hh:150
│ │ │ │ -
DGFPrintInfo * info
Definition parser.hh:168
│ │ │ │ -
void generateBoundaries(std::istream &, bool)
Definition io/file/dgfparser/dgfparser.cc:502
│ │ │ │ -
std::vector< double > & getVtxParam(int i, std::vector< double > &coord)
Definition io/file/dgfparser/dgfparser.cc:1086
│ │ │ │ -
std::vector< double > & getElParam(int i, std::vector< double > &coord)
Definition io/file/dgfparser/dgfparser.cc:1070
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
Common Grid parameters.
Definition gridparameter.hh:35
│ │ │ │ +
static const Flags foundDumpFileName
Definition gridparameter.hh:40
│ │ │ │ +
const std::string & dumpFileName() const
Definition gridparameter.hh:70
│ │ │ │ +
static const Flags foundName
Definition gridparameter.hh:39
│ │ │ │ +
GridParameterBlock(std::istream &in)
constructor: read commmon parameters
│ │ │ │ +
unsigned int Flags
Definition gridparameter.hh:37
│ │ │ │ +
std::string dumpFileName_
Definition gridparameter.hh:46
│ │ │ │ +
bool ok()
Definition gridparameter.hh:92
│ │ │ │ +
Flags foundFlags_
Definition gridparameter.hh:44
│ │ │ │ +
const std::string & name(const std::string &defaultValue) const
return the name of the grid
Definition gridparameter.hh:58
│ │ │ │ +
std::string name_
Definition gridparameter.hh:45
│ │ │ │ +
bool markLongestEdge() const
returns true if longest edge should be marked for AlbertaGrid
Definition gridparameter.hh:81
│ │ │ │ +
static const Flags foundLongestEdge
Definition gridparameter.hh:41
│ │ │ │ +
bool markLongestEdge_
Definition gridparameter.hh:47
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,331 +3,149 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -parser.hh │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +gridparameter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ │ -6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ │ +5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ 12 │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -18 class DGFPrintInfo; │ │ │ │ │ -19 │ │ │ │ │ -_2_2 struct _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -23 { │ │ │ │ │ -_2_5 typedef std::string _t_y_p_e; │ │ │ │ │ -26 │ │ │ │ │ -_2_8 static const _t_y_p_e &_d_e_f_a_u_l_t_V_a_l_u_e () │ │ │ │ │ -29 { │ │ │ │ │ -30 static _t_y_p_e value; │ │ │ │ │ -31 return value; │ │ │ │ │ -32 } │ │ │ │ │ -33 │ │ │ │ │ -_3_5 static _t_y_p_e _c_o_n_v_e_r_t ( const std::string & parameter ) │ │ │ │ │ -36 { │ │ │ │ │ -37 return parameter; │ │ │ │ │ -38 } │ │ │ │ │ -39 │ │ │ │ │ -_4_1 static const char _d_e_l_i_m_i_t_e_r = ':'; │ │ │ │ │ -42 }; │ │ │ │ │ -43 │ │ │ │ │ -_4_6 class _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ -47 { │ │ │ │ │ -48 public: │ │ │ │ │ -_4_9 typedef enum {_S_i_m_p_l_e_x,_C_u_b_e,_G_e_n_e_r_a_l} _e_l_e_m_e_n_t___t; │ │ │ │ │ -50 │ │ │ │ │ -_5_1 typedef enum {_c_o_u_n_t_e_r_c_l_o_c_k_w_i_s_e=1,_c_l_o_c_k_w_i_s_e=-1} _o_r_i_e_n_t_a_t_i_o_n___t; │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 namespace dgf │ │ │ │ │ +18 { │ │ │ │ │ +_3_3 class _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +34 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +35 { │ │ │ │ │ +36 public: │ │ │ │ │ +_3_7 typedef unsigned int _F_l_a_g_s; │ │ │ │ │ +38 │ │ │ │ │ +_3_9 static const _F_l_a_g_s _f_o_u_n_d_N_a_m_e = 1 << 0; │ │ │ │ │ +_4_0 static const _F_l_a_g_s _f_o_u_n_d_D_u_m_p_F_i_l_e_N_a_m_e = 1 << 1; │ │ │ │ │ +_4_1 static const _F_l_a_g_s _f_o_u_n_d_L_o_n_g_e_s_t_E_d_g_e = 1 << 5; │ │ │ │ │ +42 │ │ │ │ │ +43 protected: │ │ │ │ │ +_4_4 _F_l_a_g_s _f_o_u_n_d_F_l_a_g_s__; // supportFlags, this block was created with │ │ │ │ │ +_4_5 std::string _n_a_m_e__; // name of the grid │ │ │ │ │ +_4_6 std::string _d_u_m_p_F_i_l_e_N_a_m_e__; // name of the grid │ │ │ │ │ +_4_7 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; // Mark longest edge for AlbertaGrid │ │ │ │ │ +48 │ │ │ │ │ +49 private: │ │ │ │ │ +50 // copy not implemented │ │ │ │ │ +51 _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k(const _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k&); │ │ │ │ │ 52 │ │ │ │ │ -54 _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r ( int rank, int size ); │ │ │ │ │ -55 │ │ │ │ │ -66 static bool _i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t ( std::istream &input ); │ │ │ │ │ -67 │ │ │ │ │ -77 static bool _i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t ( const std::string &filename ); │ │ │ │ │ -78 │ │ │ │ │ -91 bool _r_e_a_d_D_u_n_e_G_r_i_d( std::istream &input, int dimG, int dimW ); │ │ │ │ │ -92 │ │ │ │ │ -94 void _w_r_i_t_e_T_e_t_g_e_n_P_o_l_y ( const std::string &, std::string &, std::string & ); │ │ │ │ │ -95 │ │ │ │ │ -96 void _w_r_i_t_e_T_e_t_g_e_n_P_o_l_y ( std::ostream & out, const bool writeSegments = true │ │ │ │ │ -); │ │ │ │ │ +53 public: │ │ │ │ │ +_5_5 _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &in ); │ │ │ │ │ +56 │ │ │ │ │ +_5_8 const std::string &_n_a_m_e ( const std::string &defaultValue ) const │ │ │ │ │ +59 { │ │ │ │ │ +60 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_N_a_m_e) == 0 ) │ │ │ │ │ +61 { │ │ │ │ │ +62 dwarn << "GridParameterBlock: Parameter 'name' not specified, " │ │ │ │ │ +63 << "defaulting to '" << defaultValue << "'." << std::endl; │ │ │ │ │ +64 return defaultValue; │ │ │ │ │ +65 } │ │ │ │ │ +66 else │ │ │ │ │ +67 return _n_a_m_e__; │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_0 const std::string &_d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ │ +71 { │ │ │ │ │ +72 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_D_u_m_p_F_i_l_e_N_a_m_e) != 0 ) │ │ │ │ │ +73 { │ │ │ │ │ +74 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', " │ │ │ │ │ +75 << "dumping file to `" << _d_u_m_p_F_i_l_e_N_a_m_e__ << "'" << std::endl; │ │ │ │ │ +76 } │ │ │ │ │ +77 return _d_u_m_p_F_i_l_e_N_a_m_e__; │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +_8_1 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e () const │ │ │ │ │ +82 { │ │ │ │ │ +83 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_L_o_n_g_e_s_t_E_d_g_e) == 0 ) │ │ │ │ │ +84 { │ │ │ │ │ +85 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, " │ │ │ │ │ +86 << "defaulting to 'ARBITRARY'." << std::endl; │ │ │ │ │ +87 } │ │ │ │ │ +88 return _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +91 // some information │ │ │ │ │ +_9_2 bool _o_k() │ │ │ │ │ +93 { │ │ │ │ │ +94 return true; │ │ │ │ │ +95 } │ │ │ │ │ +96 }; │ │ │ │ │ 97 │ │ │ │ │ -98 protected: │ │ │ │ │ -99 void _g_e_n_e_r_a_t_e_B_o_u_n_d_a_r_i_e_s ( std::istream &, bool ); │ │ │ │ │ +98 │ │ │ │ │ +99 } // end namespace dgf │ │ │ │ │ 100 │ │ │ │ │ -101 // call to tetgen/triangle │ │ │ │ │ -102 void _g_e_n_e_r_a_t_e_S_i_m_p_l_e_x_G_r_i_d ( std::istream & ); │ │ │ │ │ -103 void _r_e_a_d_T_e_t_g_e_n_T_r_i_a_n_g_l_e ( const std::string & ); │ │ │ │ │ -104 │ │ │ │ │ -105 // helper methods │ │ │ │ │ -106 void _r_e_m_o_v_e_C_o_p_i_e_s (); │ │ │ │ │ -107 │ │ │ │ │ -108 void _s_e_t_O_r_i_e_n_t_a_t_i_o_n ( int use1, int use2, │ │ │ │ │ -109 _o_r_i_e_n_t_a_t_i_o_n___t orientation=_c_o_u_n_t_e_r_c_l_o_c_k_w_i_s_e ); │ │ │ │ │ -110 │ │ │ │ │ -111 void _s_e_t_R_e_f_i_n_e_m_e_n_t ( int use1, int use2, int is1=-1, int is2=-1 ); │ │ │ │ │ -112 │ │ │ │ │ -113 double _t_e_s_t_T_r_i_a_n_g ( int snr ); │ │ │ │ │ -114 │ │ │ │ │ -115 std::vector< double > & _g_e_t_E_l_P_a_r_a_m ( int i, std::vector< double > & coord │ │ │ │ │ -); │ │ │ │ │ -116 │ │ │ │ │ -117 std::vector< double > & _g_e_t_V_t_x_P_a_r_a_m ( int i, std::vector< double > & coord │ │ │ │ │ -); │ │ │ │ │ -118 │ │ │ │ │ -119 static std::string _t_e_m_p_o_r_a_r_y_F_i_l_e_N_a_m_e (); │ │ │ │ │ -120 │ │ │ │ │ -121 // dimension of world and problem: set through the readDuneGrid() method │ │ │ │ │ -_1_2_2 int _d_i_m_w, _d_i_m_g_r_i_d; │ │ │ │ │ -123 │ │ │ │ │ -124 // vector of vertex coordinates │ │ │ │ │ -_1_2_5 std::vector < std::vector < double > > _v_t_x; │ │ │ │ │ -126 │ │ │ │ │ -_1_2_7 int _n_o_f_v_t_x; │ │ │ │ │ -128 │ │ │ │ │ -_1_2_9 int _v_t_x_o_f_f_s_e_t; │ │ │ │ │ -130 │ │ │ │ │ -_1_3_1 double _m_i_n_V_e_r_t_e_x_D_i_s_t_a_n_c_e; // min. L^1 distance of distinct points │ │ │ │ │ -132 │ │ │ │ │ -133 // vector of elements │ │ │ │ │ -_1_3_4 std :: vector< std :: vector< unsigned int > > _e_l_e_m_e_n_t_s; │ │ │ │ │ -135 │ │ │ │ │ -_1_3_6 int _n_o_f_e_l_e_m_e_n_t_s; │ │ │ │ │ -137 │ │ │ │ │ -138 // vector of boundary segments + identifier │ │ │ │ │ -_1_3_9 std::vector < std::vector < int > > _b_o_u_n_d; │ │ │ │ │ -140 │ │ │ │ │ -_1_4_1 int _n_o_f_b_o_u_n_d; │ │ │ │ │ -142 │ │ │ │ │ -143 // map to generate and find boundary segments │ │ │ │ │ -_1_4_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ │ -_1_4_5 typedef std::pair < int, BoundaryParameter > _B_n_d_P_a_r_a_m; │ │ │ │ │ -_1_4_6 typedef std::map< DGFEntityKey< unsigned int >, _B_n_d_P_a_r_a_m > _f_a_c_e_m_a_p___t; │ │ │ │ │ -_1_4_7 _f_a_c_e_m_a_p___t _f_a_c_e_m_a_p; │ │ │ │ │ -148 │ │ │ │ │ -149 // true if parameters on a boundary found │ │ │ │ │ -_1_5_0 bool _h_a_v_e_B_n_d_P_a_r_a_m_e_t_e_r_s; │ │ │ │ │ -151 │ │ │ │ │ -152 // set by generator depending on element type wanted │ │ │ │ │ -_1_5_3 _e_l_e_m_e_n_t___t _e_l_e_m_e_n_t; │ │ │ │ │ -154 │ │ │ │ │ -155 // set by the readDuneGrid method depending │ │ │ │ │ -156 // on what type the elements were generated │ │ │ │ │ -_1_5_7 bool _s_i_m_p_l_e_x_g_r_i_d; │ │ │ │ │ -158 │ │ │ │ │ -159 // true if grid is generated using the intervall Block │ │ │ │ │ -_1_6_0 bool _c_u_b_e_2_s_i_m_p_l_e_x; │ │ │ │ │ -161 │ │ │ │ │ -162 // parameters on elements │ │ │ │ │ -_1_6_3 int _n_o_f_v_t_x_p_a_r_a_m_s,_n_o_f_e_l_p_a_r_a_m_s; │ │ │ │ │ -164 │ │ │ │ │ -_1_6_5 std::vector< std::vector< double > > _v_t_x_P_a_r_a_m_s,_e_l_P_a_r_a_m_s; │ │ │ │ │ -166 │ │ │ │ │ -167 // write information about generation process │ │ │ │ │ -_1_6_8 _D_G_F_P_r_i_n_t_I_n_f_o * _i_n_f_o; │ │ │ │ │ -169 │ │ │ │ │ -_1_7_0 std::vector < double > _e_m_p_t_y_P_a_r_a_m__; │ │ │ │ │ -171 │ │ │ │ │ -172 │ │ │ │ │ -173 private: │ │ │ │ │ -174 int rank_; │ │ │ │ │ -175 int size_; │ │ │ │ │ -176 │ │ │ │ │ -177 template< class GridType > │ │ │ │ │ -_1_7_8 friend struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ -179 │ │ │ │ │ -180 template< class GridType > │ │ │ │ │ -_1_8_1 friend struct _D_G_F_B_a_s_e_F_a_c_t_o_r_y; │ │ │ │ │ -182 │ │ │ │ │ -183 }; │ │ │ │ │ -184 │ │ │ │ │ -185} // end namespace Dune │ │ │ │ │ -186 │ │ │ │ │ -187#endif │ │ │ │ │ -_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ +101} // end namespace Dune │ │ │ │ │ +102 │ │ │ │ │ +103#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_P_r_i_n_t_I_n_f_o │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:26 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -Contains types for additional features. │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ -static const type & defaultValue() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_l_i_m_i_t_e_r │ │ │ │ │ -static const char delimiter │ │ │ │ │ -delimiter │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_c_o_n_v_e_r_t │ │ │ │ │ -static type convert(const std::string ¶meter) │ │ │ │ │ -copy from string │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ -The DuneGridFormatParser class: reads a DGF file and stores build information │ │ │ │ │ -in vector structures us... │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_v_t_x_p_a_r_a_m_s │ │ │ │ │ -int nofvtxparams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_b_o_u_n_d │ │ │ │ │ -int nofbound │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_B_n_d_P_a_r_a_m │ │ │ │ │ -std::pair< int, BoundaryParameter > BndParam │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_r_e_a_d_T_e_t_g_e_n_T_r_i_a_n_g_l_e │ │ │ │ │ -void readTetgenTriangle(const std::string &) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:795 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t │ │ │ │ │ -static bool isDuneGridFormat(std::istream &input) │ │ │ │ │ -check whether a stream is in DUNE grid format │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:271 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ -void setOrientation(int use1, int use2, orientation_t │ │ │ │ │ -orientation=counterclockwise) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:910 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x_P_a_r_a_m_s │ │ │ │ │ -std::vector< std::vector< double > > vtxParams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_s_e_t_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -void setRefinement(int use1, int use2, int is1=-1, int is2=-1) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:989 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_D_G_F_B_a_s_e_F_a_c_t_o_r_y │ │ │ │ │ -friend struct DGFBaseFactory │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:181 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_t_e_m_p_o_r_a_r_y_F_i_l_e_N_a_m_e │ │ │ │ │ -static std::string temporaryFileName() │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1096 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_r_e_m_o_v_e_C_o_p_i_e_s │ │ │ │ │ -void removeCopies() │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:464 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_d_i_m_w │ │ │ │ │ -int dimw │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_d_i_m_g_r_i_d │ │ │ │ │ -int dimgrid │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t │ │ │ │ │ -element_t element │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -DGFBoundaryParameter::type BoundaryParameter │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_e_l_e_m_e_n_t_s │ │ │ │ │ -int nofelements │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_o_r_i_e_n_t_a_t_i_o_n___t │ │ │ │ │ -orientation_t │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_c_l_o_c_k_w_i_s_e │ │ │ │ │ -@ clockwise │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_c_o_u_n_t_e_r_c_l_o_c_k_w_i_s_e │ │ │ │ │ -@ counterclockwise │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_t_e_s_t_T_r_i_a_n_g │ │ │ │ │ -double testTriang(int snr) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1050 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_m_i_n_V_e_r_t_e_x_D_i_s_t_a_n_c_e │ │ │ │ │ -double minVertexDistance │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_s_i_m_p_l_e_x_g_r_i_d │ │ │ │ │ -bool simplexgrid │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_f_a_c_e_m_a_p___t │ │ │ │ │ -std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_b_o_u_n_d │ │ │ │ │ -std::vector< std::vector< int > > bound │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_n_e_r_a_t_e_S_i_m_p_l_e_x_G_r_i_d │ │ │ │ │ -void generateSimplexGrid(std::istream &) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:624 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_m_p_t_y_P_a_r_a_m__ │ │ │ │ │ -std::vector< double > emptyParam_ │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_e_l_p_a_r_a_m_s │ │ │ │ │ -int nofelparams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_P_a_r_a_m_s │ │ │ │ │ -std::vector< std::vector< double > > elParams │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_f_a_c_e_m_a_p │ │ │ │ │ -facemap_t facemap │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t___t │ │ │ │ │ -element_t │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_G_e_n_e_r_a_l │ │ │ │ │ -@ General │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_C_u_b_e │ │ │ │ │ -@ Cube │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_S_i_m_p_l_e_x │ │ │ │ │ -@ Simplex │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_c_u_b_e_2_s_i_m_p_l_e_x │ │ │ │ │ -bool cube2simplex │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_v_t_x │ │ │ │ │ -int nofvtx │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_w_r_i_t_e_T_e_t_g_e_n_P_o_l_y │ │ │ │ │ -void writeTetgenPoly(const std::string &, std::string &, std::string &) │ │ │ │ │ -method to write in Tetgen/Triangle Poly Format │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:123 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x │ │ │ │ │ -std::vector< std::vector< double > > vtx │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x_o_f_f_s_e_t │ │ │ │ │ -int vtxoffset │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_r_e_a_d_D_u_n_e_G_r_i_d │ │ │ │ │ -bool readDuneGrid(std::istream &input, int dimG, int dimW) │ │ │ │ │ -parse dune grid format from stream │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:298 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t_s │ │ │ │ │ -std ::vector< std ::vector< unsigned int > > elements │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_h_a_v_e_B_n_d_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBndParameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_i_n_f_o │ │ │ │ │ -DGFPrintInfo * info │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_n_e_r_a_t_e_B_o_u_n_d_a_r_i_e_s │ │ │ │ │ -void generateBoundaries(std::istream &, bool) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:502 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_t_V_t_x_P_a_r_a_m │ │ │ │ │ -std::vector< double > & getVtxParam(int i, std::vector< double > &coord) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1086 │ │ │ │ │ -_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_t_E_l_P_a_r_a_m │ │ │ │ │ -std::vector< double > & getElParam(int i, std::vector< double > &coord) │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1070 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +Common Grid parameters. │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_D_u_m_p_F_i_l_e_N_a_m_e │ │ │ │ │ +static const Flags foundDumpFileName │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_d_u_m_p_F_i_l_e_N_a_m_e │ │ │ │ │ +const std::string & dumpFileName() const │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_N_a_m_e │ │ │ │ │ +static const Flags foundName │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +GridParameterBlock(std::istream &in) │ │ │ │ │ +constructor: read commmon parameters │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_F_l_a_g_s │ │ │ │ │ +unsigned int Flags │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_d_u_m_p_F_i_l_e_N_a_m_e__ │ │ │ │ │ +std::string dumpFileName_ │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_o_k │ │ │ │ │ +bool ok() │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_F_l_a_g_s__ │ │ │ │ │ +Flags foundFlags_ │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_a_m_e │ │ │ │ │ +const std::string & name(const std::string &defaultValue) const │ │ │ │ │ +return the name of the grid │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_a_m_e__ │ │ │ │ │ +std::string name_ │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ +bool markLongestEdge() const │ │ │ │ │ +returns true if longest edge should be marked for AlbertaGrid │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_f_o_u_n_d_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ +static const Flags foundLongestEdge │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__ │ │ │ │ │ +bool markLongestEdge_ │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:47 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtk.hh File Reference │ │ │ │ +dune-grid: simplexgeneration.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtk.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
simplexgeneration.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Convenience header which includes all available VTK writers. │ │ │ │ -More...

│ │ │ │ -
#include "vtk/boundarywriter.hh"
│ │ │ │ -#include "vtk/subsamplingvtkwriter.hh"
│ │ │ │ -#include "vtk/vtksequencewriter.hh"
│ │ │ │ -#include "vtk/vtkwriter.hh"
│ │ │ │ -#include "vtk/volumewriter.hh"
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Convenience header which includes all available VTK writers.

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

│ │ │ │ +Classes

class  Dune::dgf::SimplexGenerationBlock
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,19 +2,25 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -vtk.hh File Reference │ │ │ │ │ -Convenience header which includes all available VTK writers. _M_o_r_e_._._. │ │ │ │ │ -#include "_v_t_k_/_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h" │ │ │ │ │ -#include "_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ -#include "_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ -#include "_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ -#include "_v_t_k_/_v_o_l_u_m_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +simplexgeneration.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Convenience header which includes all available VTK writers. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtk.hh Source File │ │ │ │ +dune-grid: simplexgeneration.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,41 +70,156 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtk.hh
│ │ │ │ +
simplexgeneration.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_HH
│ │ │ │ -
8
│ │ │ │ -
13#include "vtk/boundarywriter.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16#include "vtk/vtkwriter.hh"
│ │ │ │ -
17#include "vtk/volumewriter.hh"
│ │ │ │ -
18
│ │ │ │ -
19#endif // DUNE_GRID_IO_FILE_VTK_HH
│ │ │ │ -
Provides subsampled file i/o for the visualization toolkit.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Provides file i/o for the visualization toolkit.
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
15 namespace dgf
│ │ │ │ +
16 {
│ │ │ │ +
17
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
19 : public BasicBlock
│ │ │ │ +
20 {
│ │ │ │ +
21 double area_;
│ │ │ │ +
22 double angle_;
│ │ │ │ +
23 bool display_;
│ │ │ │ +
24 std::string path_;
│ │ │ │ +
25 bool haspath_;
│ │ │ │ +
26 std::string filename_;
│ │ │ │ +
27 std::string filetype_;
│ │ │ │ +
28 std::string parameter_;
│ │ │ │ +
29 std::string dumpfilename_;
│ │ │ │ +
30 bool hasfile_;
│ │ │ │ +
31 int dimension_;
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ +
34 SimplexGenerationBlock ( std :: istream &in );
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ +
36 double maxArea ()
│ │ │ │ +
37 {
│ │ │ │ +
38 return area_;
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
41 double minAngle ()
│ │ │ │ +
42 {
│ │ │ │ +
43 return angle_;
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
46 bool display ()
│ │ │ │ +
47 {
│ │ │ │ +
48 return display_;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 bool haspath ()
│ │ │ │ +
52 {
│ │ │ │ +
53 return haspath_;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
56 std :: string path ()
│ │ │ │ +
57 {
│ │ │ │ +
58 return path_;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
61 bool hasfile ()
│ │ │ │ +
62 {
│ │ │ │ +
63 return hasfile_;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
66 std :: string filename ()
│ │ │ │ +
67 {
│ │ │ │ +
68 return filename_;
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 std :: string filetype ()
│ │ │ │ +
72 {
│ │ │ │ +
73 return filetype_;
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
│ │ │ │ +
76 int dimension ()
│ │ │ │ +
77 {
│ │ │ │ +
78 return dimension_;
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
81 std :: string parameter ()
│ │ │ │ +
82 {
│ │ │ │ +
83 return parameter_;
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
│ │ │ │ +
86 const std::string dumpFileName ( ) const
│ │ │ │ +
87 {
│ │ │ │ +
88 return dumpfilename_;
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90 };
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
92 } // end namespace dgf
│ │ │ │ +
93
│ │ │ │ +
94} // end namespace Dune
│ │ │ │ +
95
│ │ │ │ +
96#endif
│ │ │ │ + │ │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
Definition simplexgeneration.hh:20
│ │ │ │ +
std::string filename()
Definition simplexgeneration.hh:66
│ │ │ │ +
double maxArea()
Definition simplexgeneration.hh:36
│ │ │ │ +
bool haspath()
Definition simplexgeneration.hh:51
│ │ │ │ +
std::string parameter()
Definition simplexgeneration.hh:81
│ │ │ │ +
int dimension()
Definition simplexgeneration.hh:76
│ │ │ │ +
std::string path()
Definition simplexgeneration.hh:56
│ │ │ │ +
const std::string dumpFileName() const
Definition simplexgeneration.hh:86
│ │ │ │ +
bool display()
Definition simplexgeneration.hh:46
│ │ │ │ +
double minAngle()
Definition simplexgeneration.hh:41
│ │ │ │ +
bool hasfile()
Definition simplexgeneration.hh:61
│ │ │ │ +
std::string filetype()
Definition simplexgeneration.hh:71
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +2,151 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -vtk.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +simplexgeneration.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ │ -8 │ │ │ │ │ -13#include "_v_t_k_/_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h" │ │ │ │ │ -14#include "_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ -15#include "_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ -16#include "_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ -17#include "_v_t_k_/_v_o_l_u_m_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ -18 │ │ │ │ │ -19#endif // DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ │ -_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ -Provides subsampled file i/o for the visualization toolkit. │ │ │ │ │ -_v_o_l_u_m_e_w_r_i_t_e_r_._h_h │ │ │ │ │ -_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h │ │ │ │ │ -_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ │ -_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h │ │ │ │ │ +5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +15 namespace dgf │ │ │ │ │ +16 { │ │ │ │ │ +17 │ │ │ │ │ +_1_8 class _S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ +19 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +20 { │ │ │ │ │ +21 double area_; │ │ │ │ │ +22 double angle_; │ │ │ │ │ +23 bool display_; │ │ │ │ │ +24 std::string path_; │ │ │ │ │ +25 bool haspath_; │ │ │ │ │ +26 std::string filename_; │ │ │ │ │ +27 std::string filetype_; │ │ │ │ │ +28 std::string parameter_; │ │ │ │ │ +29 std::string dumpfilename_; │ │ │ │ │ +30 bool hasfile_; │ │ │ │ │ +31 int dimension_; │ │ │ │ │ +32 │ │ │ │ │ +33 public: │ │ │ │ │ +34 _S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k ( std :: istream &in ); │ │ │ │ │ +35 │ │ │ │ │ +_3_6 double _m_a_x_A_r_e_a () │ │ │ │ │ +37 { │ │ │ │ │ +38 return area_; │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +_4_1 double _m_i_n_A_n_g_l_e () │ │ │ │ │ +42 { │ │ │ │ │ +43 return angle_; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +_4_6 bool _d_i_s_p_l_a_y () │ │ │ │ │ +47 { │ │ │ │ │ +48 return display_; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_1 bool _h_a_s_p_a_t_h () │ │ │ │ │ +52 { │ │ │ │ │ +53 return haspath_; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +_5_6 std :: string _p_a_t_h () │ │ │ │ │ +57 { │ │ │ │ │ +58 return path_; │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +_6_1 bool _h_a_s_f_i_l_e () │ │ │ │ │ +62 { │ │ │ │ │ +63 return hasfile_; │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +_6_6 std :: string _f_i_l_e_n_a_m_e () │ │ │ │ │ +67 { │ │ │ │ │ +68 return filename_; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 std :: string _f_i_l_e_t_y_p_e () │ │ │ │ │ +72 { │ │ │ │ │ +73 return filetype_; │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 int _d_i_m_e_n_s_i_o_n () │ │ │ │ │ +77 { │ │ │ │ │ +78 return dimension_; │ │ │ │ │ +79 } │ │ │ │ │ +80 │ │ │ │ │ +_8_1 std :: string _p_a_r_a_m_e_t_e_r () │ │ │ │ │ +82 { │ │ │ │ │ +83 return parameter_; │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +_8_6 const std::string _d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ │ +87 { │ │ │ │ │ +88 return dumpfilename_; │ │ │ │ │ +89 } │ │ │ │ │ +90 }; │ │ │ │ │ +91 │ │ │ │ │ +92 } // end namespace dgf │ │ │ │ │ +93 │ │ │ │ │ +94} // end namespace Dune │ │ │ │ │ +95 │ │ │ │ │ +96#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +Include standard header files. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_f_i_l_e_n_a_m_e │ │ │ │ │ +std::string filename() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_m_a_x_A_r_e_a │ │ │ │ │ +double maxArea() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_h_a_s_p_a_t_h │ │ │ │ │ +bool haspath() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::string parameter() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +int dimension() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_p_a_t_h │ │ │ │ │ +std::string path() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_d_u_m_p_F_i_l_e_N_a_m_e │ │ │ │ │ +const std::string dumpFileName() const │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_d_i_s_p_l_a_y │ │ │ │ │ +bool display() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_m_i_n_A_n_g_l_e │ │ │ │ │ +double minAngle() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_h_a_s_f_i_l_e │ │ │ │ │ +bool hasfile() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k_:_:_f_i_l_e_t_y_p_e │ │ │ │ │ +std::string filetype() │ │ │ │ │ +DDeeffiinniittiioonn simplexgeneration.hh:71 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshreader.hh File Reference │ │ │ │ +dune-grid: simplex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,83 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Enumerations | │ │ │ │ -Functions
│ │ │ │ -
gmshreader.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
simplex.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstdarg>
│ │ │ │ -#include <cstdio>
│ │ │ │ -#include <cstring>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <map>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <string>
│ │ │ │ -#include <tuple>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::GmshReaderOptions
 Options for read operation. More...
 
class  Dune::GmshReaderParser< GridType >
 dimension independent parts for GmshReaderParser More...
 
class  Dune::GmshReader< GridType >
 Read Gmsh mesh file. More...
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Gmsh
namespace  Dune::dgf
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Enumerations

enum class  Dune::Gmsh::ReaderOptions { Dune::Gmsh::ReaderOptions::verbose = 1 │ │ │ │ -, Dune::Gmsh::ReaderOptions::insertBoundarySegments = 2 │ │ │ │ -, Dune::Gmsh::ReaderOptions::readElementData = 4 │ │ │ │ -, Dune::Gmsh::ReaderOptions::readBoundaryData = 8 │ │ │ │ - }
 Option for the Gmsh mesh file reader. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

constexpr ReaderOptions Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions b)
 composition operator for reader options
 
constexpr bool Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions b)
 query operator for reader options (is b set in a)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,60 +2,21 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -gmshreader.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ -  Options for read operation. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ -  dimension independent parts for _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ -  Read _G_m_s_h mesh file. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +simplex.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_G_m_s_h │ │ │ │ │ -  │ │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ │ -enum class   _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s { _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_v_e_r_b_o_s_e = 1 │ │ │ │ │ - , _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = 2 , _D_u_n_e_:_: │ │ │ │ │ - _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = 4 , _D_u_n_e_:_:_G_m_s_h_:_: │ │ │ │ │ - _R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = 8 } │ │ │ │ │ -  Option for the Gmsh mesh file reader. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -constexpr _R_e_a_d_e_r_O_p_t_i_o_n_s  _D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_| (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ - b) │ │ │ │ │ -  composition operator for reader options │ │ │ │ │ -  │ │ │ │ │ - constexpr bool  _D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_& (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ - b) │ │ │ │ │ -  query operator for reader options (is b set in a) │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: subsamplingvtkwriter.hh File Reference │ │ │ │ +dune-grid: periodicfacetrans.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,52 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
subsamplingvtkwriter.hh File Reference
│ │ │ │ +
periodicfacetrans.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Provides subsampled file i/o for the visualization toolkit. │ │ │ │ -More...

│ │ │ │ -
#include <ostream>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <dune/common/indent.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/virtualrefinement.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtkwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::SubsamplingVTKWriter< GridView >
 Writer for the output of subsampled grid functions in the vtk format. More...
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Provides subsampled file i/o for the visualization toolkit.

│ │ │ │ -
Author
Jö Fahlke
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +2,21 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -subsamplingvtkwriter.hh File Reference │ │ │ │ │ -Provides subsampled file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  Writer for the output of subsampled grid functions in the vtk format. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +periodicfacetrans.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_e_r_i_o_d_i_c_f_a_c_e_t_r_a_n_s_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides subsampled file i/o for the visualization toolkit. │ │ │ │ │ - Author │ │ │ │ │ - Jö Fahlke │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corner.hh File Reference │ │ │ │ +dune-grid: polyhedron.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
corner.hh File Reference
│ │ │ │ +
polyhedron.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::Corner< Cell >
 simple class representing a corner of a cell More...
struct  Dune::dgf::PolyhedronBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,24 +2,25 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -corner.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +polyhedron.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_o_l_y_g_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_:_:_V_T_K_:_:_C_o_r_n_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ -  simple class representing a corner of a cell _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00902_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corner.hh Source File │ │ │ │ +dune-grid: polyhedron.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,87 +70,109 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
corner.hh
│ │ │ │ +
polyhedron.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
│ │ │ │ -
8
│ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
15
│ │ │ │ -
16 namespace VTK {
│ │ │ │ +
3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=2 sw=2 sts=2:
│ │ │ │ +
5#ifndef DUNE_POLYHEDRON_HH
│ │ │ │ +
6#define DUNE_POLYHEDRON_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
15 namespace dgf
│ │ │ │ +
16 {
│ │ │ │
17
│ │ │ │ -
19
│ │ │ │ -
24 template<typename Cell>
│ │ │ │ -
│ │ │ │ -
25 class Corner {
│ │ │ │ -
26 // store a pointer to the element
│ │ │ │ -
27 const Cell* cell_;
│ │ │ │ -
28 // store index of the corner within element (Dune numbering)
│ │ │ │ -
29 unsigned index;
│ │ │ │ -
30
│ │ │ │ -
31 public:
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
38 Corner(const Cell& cell, unsigned duneIndex)
│ │ │ │ -
39 : cell_(&cell), index(duneIndex)
│ │ │ │ -
40 { }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
43 Corner() { }
│ │ │ │ +
18 // PolyhedronBlock
│ │ │ │ +
19 // ---------------
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : public BasicBlock
│ │ │ │ +
23 {
│ │ │ │ +
│ │ │ │ +
24 explicit PolyhedronBlock ( std::istream &in, int numPolys )
│ │ │ │ +
25 : BasicBlock( in, "Polyhedron" ), numPolys_( numPolys )
│ │ │ │ +
26 {}
│ │ │ │ +
│ │ │ │ +
27
│ │ │ │ +
│ │ │ │ +
28 int get ( std::vector< std::vector< int > > &polyhedra )
│ │ │ │ +
29 {
│ │ │ │ +
30 reset();
│ │ │ │ +
31 std::vector< int > polyhedron;
│ │ │ │ +
32 int minPolyId = 1;
│ │ │ │ +
33 while( getnextline() )
│ │ │ │ +
34 {
│ │ │ │ +
35 polyhedron.clear();
│ │ │ │ +
36 for( int polyIdx; getnextentry( polyIdx ); )
│ │ │ │ +
37 {
│ │ │ │ +
38 if( (polyIdx < 0) || (polyIdx > numPolys_) )
│ │ │ │ +
39 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid polygon index (" << polyIdx << " not int [0, " << numPolys_ << "])" );
│ │ │ │ +
40
│ │ │ │ +
41 minPolyId = std::min( minPolyId, polyIdx );
│ │ │ │ +
42 polyhedron.push_back( polyIdx );
│ │ │ │ +
43 }
│ │ │ │
44
│ │ │ │ -
46 const Cell& cell() const { return *cell_; }
│ │ │ │ -
48
│ │ │ │ -
52 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }
│ │ │ │ -
53
│ │ │ │ -
55 unsigned duneIndex() const { return index; }
│ │ │ │ -
57 void duneIndex(unsigned i) { index = i; }
│ │ │ │ -
58
│ │ │ │ -
60
│ │ │ │ -
63 unsigned vtkIndex() const { return renumber(cell_->type(), index); }
│ │ │ │ -
65
│ │ │ │ -
68 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }
│ │ │ │ -
69 };
│ │ │ │ -
│ │ │ │ +
45 polyhedra.push_back( polyhedron );
│ │ │ │ +
46 }
│ │ │ │ +
47
│ │ │ │ +
48 // subtract minimal number to have 0 starting numbering
│ │ │ │ +
49 if( minPolyId > 0 )
│ │ │ │ +
50 {
│ │ │ │ +
51 const size_t polySize = polyhedra.size();
│ │ │ │ +
52 for( size_t i=0; i<polySize; ++i )
│ │ │ │ +
53 {
│ │ │ │ +
54 const size_t pSize = polyhedra[ i ].size();
│ │ │ │ +
55 for( size_t j=0; j<pSize; ++j )
│ │ │ │ +
56 {
│ │ │ │ +
57 polyhedra[ i ][ j ] -= minPolyId;
│ │ │ │ +
58 }
│ │ │ │ +
59 }
│ │ │ │ +
60 }
│ │ │ │ +
61 return polyhedra.size();
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64 protected:
│ │ │ │ +
65 const int numPolys_;
│ │ │ │ +
66 };
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
68 } // namespace dgf
│ │ │ │ +
69} // end namespace Dune
│ │ │ │
70
│ │ │ │ -
71 } // namespace VTK
│ │ │ │ -
72
│ │ │ │ -
74
│ │ │ │ -
75} // namespace Dune
│ │ │ │ -
76
│ │ │ │ -
77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ +
71#endif // #ifndef DUNE_POLYHEDRON_HH
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ -
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ -
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition corner.hh:63
│ │ │ │ -
void vtkIndex(unsigned i)
set the index of the corner within the cell in VTK-numbering
Definition corner.hh:68
│ │ │ │ -
Corner(const Cell &cell, unsigned duneIndex)
construct a Corner
Definition corner.hh:38
│ │ │ │ -
void cell(const Cell &cell__)
set a new cell
Definition corner.hh:52
│ │ │ │ -
void duneIndex(unsigned i)
set the index of the corner within the cell in Dune-numbering
Definition corner.hh:57
│ │ │ │ -
unsigned duneIndex() const
get the index of the corner within the cell in Dune-numbering
Definition corner.hh:55
│ │ │ │ -
const Cell & cell() const
get reference to the cell
Definition corner.hh:46
│ │ │ │ -
Corner()
construct an invalid Corner
Definition corner.hh:43
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
void reset()
Definition basic.hh:51
│ │ │ │ +
bool getnextline()
Definition basic.cc:94
│ │ │ │ +
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ +
Definition polyhedron.hh:23
│ │ │ │ +
const int numPolys_
Definition polyhedron.hh:65
│ │ │ │ +
PolyhedronBlock(std::istream &in, int numPolys)
Definition polyhedron.hh:24
│ │ │ │ +
int get(std::vector< std::vector< int > > &polyhedra)
Definition polyhedron.hh:28
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,107 +2,115 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -corner.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +polyhedron.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -15 │ │ │ │ │ -16 namespace VTK { │ │ │ │ │ +3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=2 sw=2 sts=2: │ │ │ │ │ +5#ifndef DUNE_POLYHEDRON_HH │ │ │ │ │ +6#define DUNE_POLYHEDRON_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_o_l_y_g_o_n_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +15 namespace dgf │ │ │ │ │ +16 { │ │ │ │ │ 17 │ │ │ │ │ -19 │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 class _C_o_r_n_e_r { │ │ │ │ │ -26 // store a pointer to the element │ │ │ │ │ -27 const Cell* cell_; │ │ │ │ │ -28 // store index of the corner within element (Dune numbering) │ │ │ │ │ -29 unsigned index; │ │ │ │ │ -30 │ │ │ │ │ -31 public: │ │ │ │ │ -33 │ │ │ │ │ -_3_8 _C_o_r_n_e_r(const Cell& _c_e_l_l, unsigned _d_u_n_e_I_n_d_e_x) │ │ │ │ │ -39 : cell_(&_c_e_l_l), index(_d_u_n_e_I_n_d_e_x) │ │ │ │ │ -40 { } │ │ │ │ │ -41 │ │ │ │ │ -_4_3 _C_o_r_n_e_r() { } │ │ │ │ │ +18 // PolyhedronBlock │ │ │ │ │ +19 // --------------- │ │ │ │ │ +20 │ │ │ │ │ +_2_1 struct _P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ +22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +23 { │ │ │ │ │ +_2_4 explicit _P_o_l_y_h_e_d_r_o_n_B_l_o_c_k ( std::istream &in, int numPolys ) │ │ │ │ │ +25 : _B_a_s_i_c_B_l_o_c_k( in, "Polyhedron" ), _n_u_m_P_o_l_y_s__( numPolys ) │ │ │ │ │ +26 {} │ │ │ │ │ +27 │ │ │ │ │ +_2_8 int _g_e_t ( std::vector< std::vector< int > > &polyhedra ) │ │ │ │ │ +29 { │ │ │ │ │ +30 _r_e_s_e_t(); │ │ │ │ │ +31 std::vector< int > polyhedron; │ │ │ │ │ +32 int minPolyId = 1; │ │ │ │ │ +33 while( _g_e_t_n_e_x_t_l_i_n_e() ) │ │ │ │ │ +34 { │ │ │ │ │ +35 polyhedron.clear(); │ │ │ │ │ +36 for( int polyIdx; _g_e_t_n_e_x_t_e_n_t_r_y( polyIdx ); ) │ │ │ │ │ +37 { │ │ │ │ │ +38 if( (polyIdx < 0) || (polyIdx > _n_u_m_P_o_l_y_s__) ) │ │ │ │ │ +39 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error in " << *this << ": Invalid polygon index │ │ │ │ │ +(" << polyIdx << " not int [0, " << _n_u_m_P_o_l_y_s__ << "])" ); │ │ │ │ │ +40 │ │ │ │ │ +41 minPolyId = std::min( minPolyId, polyIdx ); │ │ │ │ │ +42 polyhedron.push_back( polyIdx ); │ │ │ │ │ +43 } │ │ │ │ │ 44 │ │ │ │ │ -_4_6 const Cell& _c_e_l_l() const { return *cell_; } │ │ │ │ │ -48 │ │ │ │ │ -_5_2 void _c_e_l_l(const Cell& cell__) { cell_ = &cell__; index = 0; } │ │ │ │ │ -53 │ │ │ │ │ -_5_5 unsigned _d_u_n_e_I_n_d_e_x() const { return index; } │ │ │ │ │ -_5_7 void _d_u_n_e_I_n_d_e_x(unsigned i) { index = i; } │ │ │ │ │ -58 │ │ │ │ │ -60 │ │ │ │ │ -_6_3 unsigned _v_t_k_I_n_d_e_x() const { return _r_e_n_u_m_b_e_r(cell_->type(), index); } │ │ │ │ │ -65 │ │ │ │ │ -_6_8 void _v_t_k_I_n_d_e_x(unsigned i) { index = _r_e_n_u_m_b_e_r(cell_->type(), i); } │ │ │ │ │ -69 }; │ │ │ │ │ +45 polyhedra.push_back( polyhedron ); │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +48 // subtract minimal number to have 0 starting numbering │ │ │ │ │ +49 if( minPolyId > 0 ) │ │ │ │ │ +50 { │ │ │ │ │ +51 const size_t polySize = polyhedra.size(); │ │ │ │ │ +52 for( size_t i=0; i Dune │ │ │ │ │ -DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ -simple class representing a corner of a cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_v_t_k_I_n_d_e_x │ │ │ │ │ -unsigned vtkIndex() const │ │ │ │ │ -get the index of the corner within the cell in VTK-numbering │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_v_t_k_I_n_d_e_x │ │ │ │ │ -void vtkIndex(unsigned i) │ │ │ │ │ -set the index of the corner within the cell in VTK-numbering │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_C_o_r_n_e_r │ │ │ │ │ -Corner(const Cell &cell, unsigned duneIndex) │ │ │ │ │ -construct a Corner │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_c_e_l_l │ │ │ │ │ -void cell(const Cell &cell__) │ │ │ │ │ -set a new cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_d_u_n_e_I_n_d_e_x │ │ │ │ │ -void duneIndex(unsigned i) │ │ │ │ │ -set the index of the corner within the cell in Dune-numbering │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_d_u_n_e_I_n_d_e_x │ │ │ │ │ -unsigned duneIndex() const │ │ │ │ │ -get the index of the corner within the cell in Dune-numbering │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_c_e_l_l │ │ │ │ │ -const Cell & cell() const │ │ │ │ │ -get reference to the cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_C_o_r_n_e_r │ │ │ │ │ -Corner() │ │ │ │ │ -construct an invalid Corner │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ +void reset() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_l_i_n_e │ │ │ │ │ +bool getnextline() │ │ │ │ │ +DDeeffiinniittiioonn basic.cc:94 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ +bool getnextentry(ENTRY &entry) │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn polyhedron.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k_:_:_n_u_m_P_o_l_y_s__ │ │ │ │ │ +const int numPolys_ │ │ │ │ │ +DDeeffiinniittiioonn polyhedron.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k │ │ │ │ │ +PolyhedronBlock(std::istream &in, int numPolys) │ │ │ │ │ +DDeeffiinniittiioonn polyhedron.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_o_l_y_h_e_d_r_o_n_B_l_o_c_k_:_:_g_e_t │ │ │ │ │ +int get(std::vector< std::vector< int > > &polyhedra) │ │ │ │ │ +DDeeffiinniittiioonn polyhedron.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: streams.hh File Reference │ │ │ │ +dune-grid: periodicfacetrans.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
streams.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
periodicfacetrans.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <ostream>
│ │ │ │ -#include <dune/grid/io/file/vtk/b64enc.hh>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Base64Stream
 class to base64 encode a stream of data More...
struct  Dune::dgf::PeriodicFaceTransformationBlock
 
class  Dune::RawStream
 write out data in binary More...
class  Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >
 
struct  Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const PeriodicFaceTransformationBlock::AffineTransformation &trafo)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,34 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -streams.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_6_4_e_n_c_._h_h> │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_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 │ │ │ │ │ +periodicfacetrans.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ │ -  class to base64 encode a stream of data _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ │ -  write out data in binary _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_<_ _T_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ + _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n &trafo) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: streams.hh Source File │ │ │ │ +dune-grid: periodicfacetrans.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,132 +70,191 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
streams.hh
│ │ │ │ +
periodicfacetrans.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <ostream>
│ │ │ │ +
5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ - │ │ │ │ + │ │ │ │
12
│ │ │ │ -
13namespace Dune {
│ │ │ │ -
14
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
17 std::ostream& s;
│ │ │ │ -
18 b64chunk chunk;
│ │ │ │ -
19 char obuf[4];
│ │ │ │ -
20
│ │ │ │ -
21 public:
│ │ │ │ -
23
│ │ │ │ -
│ │ │ │ -
27 Base64Stream(std::ostream& s_)
│ │ │ │ -
28 : s(s_)
│ │ │ │ -
29 {
│ │ │ │ -
30 // reset chunk
│ │ │ │ -
31 chunk.reset();
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 namespace dgf
│ │ │ │ +
18 {
│ │ │ │ +
19
│ │ │ │ +
20 // PeriodicFaceTransformationBlock
│ │ │ │ +
21 // -------------------------------
│ │ │ │ +
22
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 : public BasicBlock
│ │ │ │ +
25 {
│ │ │ │ +
26 template< class T >
│ │ │ │ +
27 class Matrix;
│ │ │ │ +
28
│ │ │ │ + │ │ │ │ +
30
│ │ │ │ +
31 private:
│ │ │ │ +
32 std::vector< AffineTransformation > transformations_;
│ │ │ │
33
│ │ │ │ -
35
│ │ │ │ -
41 template <class X>
│ │ │ │ -
│ │ │ │ -
42 void write(X & data)
│ │ │ │ -
43 {
│ │ │ │ -
44 char* p = reinterpret_cast<char*>(&data);
│ │ │ │ -
45 for (size_t len = sizeof(X); len > 0; len--,p++)
│ │ │ │ -
46 {
│ │ │ │ -
47 chunk.put(*p);
│ │ │ │ -
48 if (chunk.size == 3)
│ │ │ │ -
49 {
│ │ │ │ -
50 chunk.write(obuf);
│ │ │ │ -
51 s.write(obuf,4);
│ │ │ │ -
52 }
│ │ │ │ -
53 }
│ │ │ │ -
54 }
│ │ │ │ +
34 // copy not implemented
│ │ │ │ + │ │ │ │ +
36
│ │ │ │ +
37 public:
│ │ │ │ +
38 // initialize block and get dimension of world
│ │ │ │ +
39 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
41 const AffineTransformation &transformation ( int i ) const
│ │ │ │ +
42 {
│ │ │ │ +
43 assert( i < numTransformations() );
│ │ │ │ +
44 return transformations_[ i ];
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
│ │ │ │ +
47 int numTransformations () const
│ │ │ │ +
48 {
│ │ │ │ +
49 return transformations_.size();
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 private:
│ │ │ │ +
53 void match ( char what );
│ │ │ │ +
54 };
│ │ │ │
│ │ │ │
55
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
64 void flush()
│ │ │ │ -
65 {
│ │ │ │ -
66 if (chunk.size > 0)
│ │ │ │ -
67 {
│ │ │ │ -
68 chunk.write(obuf);
│ │ │ │ -
69 s.write(obuf,4);
│ │ │ │ -
70 }
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
74
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
78 flush();
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80 };
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 {
│ │ │ │ -
85 public:
│ │ │ │ -
│ │ │ │ -
87 inline RawStream (std::ostream& theStream)
│ │ │ │ -
88 : s(theStream)
│ │ │ │ -
89 {}
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
92 template<class T>
│ │ │ │ -
│ │ │ │ -
93 void write (T data)
│ │ │ │ -
94 {
│ │ │ │ -
95 char* p = reinterpret_cast<char*>(&data);
│ │ │ │ -
96 s.write(p,sizeof(T));
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98 private:
│ │ │ │ -
99 std::ostream& s;
│ │ │ │ -
100 };
│ │ │ │ -
│ │ │ │ -
101
│ │ │ │ -
102} // namespace Dune
│ │ │ │ +
56
│ │ │ │ +
57 // PeriodicFaceTransformationBlock::Matrix
│ │ │ │ +
58 // ---------------------------------------
│ │ │ │ +
59
│ │ │ │ +
60 template< class T >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
62 {
│ │ │ │ +
63 int rows_;
│ │ │ │ +
64 int cols_;
│ │ │ │ +
65 std::vector< T > fields_;
│ │ │ │ +
66
│ │ │ │ +
67 public:
│ │ │ │ +
│ │ │ │ +
68 Matrix ( int rows, int cols )
│ │ │ │ +
69 : rows_( rows ),
│ │ │ │ +
70 cols_( cols ),
│ │ │ │ +
71 fields_( rows * cols )
│ │ │ │ +
72 {}
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
74 const T &operator() ( int i, int j ) const
│ │ │ │ +
75 {
│ │ │ │ +
76 return fields_[ i * cols_ + j ];
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ +
79 T &operator() ( int i, int j )
│ │ │ │ +
80 {
│ │ │ │ +
81 return fields_[ i * cols_ + j ];
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
│ │ │ │ +
84 int rows () const
│ │ │ │ +
85 {
│ │ │ │ +
86 return rows_;
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
89 int cols () const
│ │ │ │ +
90 {
│ │ │ │ +
91 return cols_;
│ │ │ │ +
92 }
│ │ │ │ +
│ │ │ │ +
93 };
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95
│ │ │ │ +
96 // PeriodicFaceTransformationBlock::AffineTransformation
│ │ │ │ +
97 // -----------------------------------------------------
│ │ │ │ +
98
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
100 {
│ │ │ │ + │ │ │ │ +
102 std::vector< double > shift;
│ │ │ │
103
│ │ │ │ -
104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ -
Simple base64 encode.
│ │ │ │ +
│ │ │ │ +
104 explicit AffineTransformation ( int dimworld )
│ │ │ │ +
105 : matrix( dimworld, dimworld ),
│ │ │ │ +
106 shift( dimworld )
│ │ │ │ +
107 {}
│ │ │ │ +
│ │ │ │ +
108 };
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
111 inline std::ostream &
│ │ │ │ + │ │ │ │ +
113 {
│ │ │ │ +
114 for( int i = 0; i < trafo.matrix.rows(); ++i )
│ │ │ │ +
115 {
│ │ │ │ +
116 out << (i > 0 ? ", " : "");
│ │ │ │ +
117 for( int j = 0; j < trafo.matrix.cols(); ++j )
│ │ │ │ +
118 out << (j > 0 ? " " : "") << trafo.matrix( i, j );
│ │ │ │ +
119 }
│ │ │ │ +
120 out << " +";
│ │ │ │ +
121 for( unsigned int i = 0; i < trafo.shift.size(); ++i )
│ │ │ │ +
122 out << " " << trafo.shift[ i ];
│ │ │ │ +
123 return out;
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
126 } // end namespace dgf
│ │ │ │ +
127
│ │ │ │ +
128} // end namespace Dune
│ │ │ │ +
129
│ │ │ │ +
130#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
struct representing the three byte text as well as the four 6 bit chunks
Definition b64enc.hh:34
│ │ │ │ -
void write(char *t)
Definition b64enc.hh:60
│ │ │ │ -
size_type size
Definition b64enc.hh:36
│ │ │ │ -
void put(const char c)
Definition b64enc.hh:54
│ │ │ │ -
void reset()
Definition b64enc.hh:39
│ │ │ │ -
class to base64 encode a stream of data
Definition streams.hh:16
│ │ │ │ -
void write(X &data)
encode a data item
Definition streams.hh:42
│ │ │ │ -
void flush()
flush the current unwritten data to the stream.
Definition streams.hh:64
│ │ │ │ -
Base64Stream(std::ostream &s_)
Construct a Base64Stream.
Definition streams.hh:27
│ │ │ │ -
~Base64Stream()
destroy the object
Definition streams.hh:77
│ │ │ │ -
write out data in binary
Definition streams.hh:84
│ │ │ │ -
void write(T data)
write data to stream
Definition streams.hh:93
│ │ │ │ -
RawStream(std::ostream &theStream)
make a new stream
Definition streams.hh:87
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
Definition interval.hh:123
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
Definition periodicfacetrans.hh:25
│ │ │ │ +
int numTransformations() const
Definition periodicfacetrans.hh:47
│ │ │ │ +
const AffineTransformation & transformation(int i) const
Definition periodicfacetrans.hh:41
│ │ │ │ +
Definition periodicfacetrans.hh:62
│ │ │ │ +
int rows() const
Definition periodicfacetrans.hh:84
│ │ │ │ +
const T & operator()(int i, int j) const
Definition periodicfacetrans.hh:74
│ │ │ │ +
int cols() const
Definition periodicfacetrans.hh:89
│ │ │ │ +
Matrix(int rows, int cols)
Definition periodicfacetrans.hh:68
│ │ │ │ + │ │ │ │ +
Matrix< double > matrix
Definition periodicfacetrans.hh:101
│ │ │ │ +
std::vector< double > shift
Definition periodicfacetrans.hh:102
│ │ │ │ +
AffineTransformation(int dimworld)
Definition periodicfacetrans.hh:104
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,143 +2,189 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -streams.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +periodicfacetrans.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ +5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_6_4_e_n_c_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ 12 │ │ │ │ │ -13namespace _D_u_n_e { │ │ │ │ │ -14 │ │ │ │ │ -_1_6 class _B_a_s_e_6_4_S_t_r_e_a_m { │ │ │ │ │ -17 std::ostream& s; │ │ │ │ │ -18 _b_6_4_c_h_u_n_k chunk; │ │ │ │ │ -19 char obuf[4]; │ │ │ │ │ -20 │ │ │ │ │ -21 public: │ │ │ │ │ -23 │ │ │ │ │ -_2_7 _B_a_s_e_6_4_S_t_r_e_a_m(std::ostream& s_) │ │ │ │ │ -28 : s(s_) │ │ │ │ │ -29 { │ │ │ │ │ -30 // reset chunk │ │ │ │ │ -31 chunk._r_e_s_e_t(); │ │ │ │ │ -32 } │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 namespace dgf │ │ │ │ │ +18 { │ │ │ │ │ +19 │ │ │ │ │ +20 // PeriodicFaceTransformationBlock │ │ │ │ │ +21 // ------------------------------- │ │ │ │ │ +22 │ │ │ │ │ +_2_3 struct _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ +24 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +25 { │ │ │ │ │ +26 template< class T > │ │ │ │ │ +27 class _M_a_t_r_i_x; │ │ │ │ │ +28 │ │ │ │ │ +29 struct _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n; │ │ │ │ │ +30 │ │ │ │ │ +31 private: │ │ │ │ │ +32 std::vector< AffineTransformation > transformations_; │ │ │ │ │ 33 │ │ │ │ │ -35 │ │ │ │ │ -41 template │ │ │ │ │ -_4_2 void _w_r_i_t_e(X & data) │ │ │ │ │ -43 { │ │ │ │ │ -44 char* p = reinterpret_cast(&data); │ │ │ │ │ -45 for (size_t len = sizeof(X); len > 0; len--,p++) │ │ │ │ │ -46 { │ │ │ │ │ -47 chunk._p_u_t(*p); │ │ │ │ │ -48 if (chunk._s_i_z_e == 3) │ │ │ │ │ -49 { │ │ │ │ │ -50 chunk._w_r_i_t_e(obuf); │ │ │ │ │ -51 s.write(obuf,4); │ │ │ │ │ -52 } │ │ │ │ │ -53 } │ │ │ │ │ -54 } │ │ │ │ │ +34 // copy not implemented │ │ │ │ │ +35 _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k ( const _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k & ); │ │ │ │ │ +36 │ │ │ │ │ +37 public: │ │ │ │ │ +38 // initialize block and get dimension of world │ │ │ │ │ +39 _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k ( std::istream &in, int dimworld ); │ │ │ │ │ +40 │ │ │ │ │ +_4_1 const _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n &_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int i ) const │ │ │ │ │ +42 { │ │ │ │ │ +43 assert( i < _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s() ); │ │ │ │ │ +44 return transformations_[ i ]; │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +_4_7 int _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s () const │ │ │ │ │ +48 { │ │ │ │ │ +49 return transformations_.size(); │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +52 private: │ │ │ │ │ +53 void match ( char what ); │ │ │ │ │ +54 }; │ │ │ │ │ 55 │ │ │ │ │ -57 │ │ │ │ │ -_6_4 void _f_l_u_s_h() │ │ │ │ │ -65 { │ │ │ │ │ -66 if (chunk._s_i_z_e > 0) │ │ │ │ │ -67 { │ │ │ │ │ -68 chunk._w_r_i_t_e(obuf); │ │ │ │ │ -69 s.write(obuf,4); │ │ │ │ │ -70 } │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -74 │ │ │ │ │ -_7_7 _~_B_a_s_e_6_4_S_t_r_e_a_m() { │ │ │ │ │ -78 _f_l_u_s_h(); │ │ │ │ │ -79 } │ │ │ │ │ -80 }; │ │ │ │ │ -81 │ │ │ │ │ -_8_3 class _R_a_w_S_t_r_e_a_m │ │ │ │ │ -84 { │ │ │ │ │ -85 public: │ │ │ │ │ -_8_7 inline _R_a_w_S_t_r_e_a_m (std::ostream& theStream) │ │ │ │ │ -88 : s(theStream) │ │ │ │ │ -89 {} │ │ │ │ │ -90 │ │ │ │ │ -92 template │ │ │ │ │ -_9_3 void _w_r_i_t_e (T data) │ │ │ │ │ -94 { │ │ │ │ │ -95 char* p = reinterpret_cast(&data); │ │ │ │ │ -96 s.write(p,sizeof(T)); │ │ │ │ │ -97 } │ │ │ │ │ -98 private: │ │ │ │ │ -99 std::ostream& s; │ │ │ │ │ -100 }; │ │ │ │ │ -101 │ │ │ │ │ -102} // namespace Dune │ │ │ │ │ +56 │ │ │ │ │ +57 // PeriodicFaceTransformationBlock::Matrix │ │ │ │ │ +58 // --------------------------------------- │ │ │ │ │ +59 │ │ │ │ │ +60 template< class T > │ │ │ │ │ +_6_1 class _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x │ │ │ │ │ +62 { │ │ │ │ │ +63 int rows_; │ │ │ │ │ +64 int cols_; │ │ │ │ │ +65 std::vector< T > fields_; │ │ │ │ │ +66 │ │ │ │ │ +67 public: │ │ │ │ │ +_6_8 _M_a_t_r_i_x ( int _r_o_w_s, int _c_o_l_s ) │ │ │ │ │ +69 : rows_( _r_o_w_s ), │ │ │ │ │ +70 cols_( _c_o_l_s ), │ │ │ │ │ +71 fields_( _r_o_w_s * _c_o_l_s ) │ │ │ │ │ +72 {} │ │ │ │ │ +73 │ │ │ │ │ +_7_4 const T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) const │ │ │ │ │ +75 { │ │ │ │ │ +76 return fields_[ i * cols_ + j ]; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +_7_9 T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) │ │ │ │ │ +80 { │ │ │ │ │ +81 return fields_[ i * cols_ + j ]; │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +_8_4 int _r_o_w_s () const │ │ │ │ │ +85 { │ │ │ │ │ +86 return rows_; │ │ │ │ │ +87 } │ │ │ │ │ +88 │ │ │ │ │ +_8_9 int _c_o_l_s () const │ │ │ │ │ +90 { │ │ │ │ │ +91 return cols_; │ │ │ │ │ +92 } │ │ │ │ │ +93 }; │ │ │ │ │ +94 │ │ │ │ │ +95 │ │ │ │ │ +96 // PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ +97 // ----------------------------------------------------- │ │ │ │ │ +98 │ │ │ │ │ +_9_9 struct _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +100 { │ │ │ │ │ +_1_0_1 _M_a_t_r_i_x_<_ _d_o_u_b_l_e_ _> _m_a_t_r_i_x; │ │ │ │ │ +_1_0_2 std::vector< double > _s_h_i_f_t; │ │ │ │ │ 103 │ │ │ │ │ -104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ │ -_b_6_4_e_n_c_._h_h │ │ │ │ │ -Simple base64 encode. │ │ │ │ │ +_1_0_4 explicit _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( int dimworld ) │ │ │ │ │ +105 : _m_a_t_r_i_x( dimworld, dimworld ), │ │ │ │ │ +106 _s_h_i_f_t( dimworld ) │ │ │ │ │ +107 {} │ │ │ │ │ +108 }; │ │ │ │ │ +109 │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 inline std::ostream & │ │ │ │ │ +112 _o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_: │ │ │ │ │ +_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n &trafo ) │ │ │ │ │ +113 { │ │ │ │ │ +114 for( int i = 0; i < trafo._m_a_t_r_i_x._r_o_w_s(); ++i ) │ │ │ │ │ +115 { │ │ │ │ │ +116 out << (i > 0 ? ", " : ""); │ │ │ │ │ +117 for( int j = 0; j < trafo._m_a_t_r_i_x._c_o_l_s(); ++j ) │ │ │ │ │ +118 out << (j > 0 ? " " : "") << trafo._m_a_t_r_i_x( i, j ); │ │ │ │ │ +119 } │ │ │ │ │ +120 out << " +"; │ │ │ │ │ +121 for( unsigned int i = 0; i < trafo._s_h_i_f_t.size(); ++i ) │ │ │ │ │ +122 out << " " << trafo._s_h_i_f_t[ i ]; │ │ │ │ │ +123 return out; │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +126 } // end namespace dgf │ │ │ │ │ +127 │ │ │ │ │ +128} // end namespace Dune │ │ │ │ │ +129 │ │ │ │ │ +130#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k │ │ │ │ │ -struct representing the three byte text as well as the four 6 bit chunks │ │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_w_r_i_t_e │ │ │ │ │ -void write(char *t) │ │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_s_i_z_e │ │ │ │ │ -size_type size │ │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_p_u_t │ │ │ │ │ -void put(const char c) │ │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_r_e_s_e_t │ │ │ │ │ -void reset() │ │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ │ -class to base64 encode a stream of data │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ │ -void write(X &data) │ │ │ │ │ -encode a data item │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_f_l_u_s_h │ │ │ │ │ -void flush() │ │ │ │ │ -flush the current unwritten data to the stream. │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ │ -Base64Stream(std::ostream &s_) │ │ │ │ │ -Construct a Base64Stream. │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_~_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ │ -~Base64Stream() │ │ │ │ │ -destroy the object │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ │ -write out data in binary │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ │ -void write(T data) │ │ │ │ │ -write data to stream │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ │ -RawStream(std::ostream &theStream) │ │ │ │ │ -make a new stream │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval │ │ │ │ │ +&interval) │ │ │ │ │ +DDeeffiinniittiioonn interval.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s │ │ │ │ │ +int numTransformations() const │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +const AffineTransformation & transformation(int i) const │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ +int rows() const │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const T & operator()(int i, int j) const │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ │ +int cols() const │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_M_a_t_r_i_x_:_:_M_a_t_r_i_x │ │ │ │ │ +Matrix(int rows, int cols) │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_m_a_t_r_i_x │ │ │ │ │ +Matrix< double > matrix │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_s_h_i_f_t │ │ │ │ │ +std::vector< double > shift │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_e_r_i_o_d_i_c_F_a_c_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_B_l_o_c_k_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_: │ │ │ │ │ +_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +AffineTransformation(int dimworld) │ │ │ │ │ +DDeeffiinniittiioonn periodicfacetrans.hh:104 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumeiterators.hh File Reference │ │ │ │ +dune-grid: vertex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,32 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
volumeiterators.hh File Reference
│ │ │ │ +
vertex.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corneriterator.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/pointiterator.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::VTK::ConformingVolumeIteratorFactory< GV >
 
class  Dune::VTK::NonConformingVolumeIteratorFactory< GV >
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/vertex.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,21 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -volumeiterators.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_o_i_n_t_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_ _G_V_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_ _G_V_ _> │ │ │ │ │ -  │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +vertex.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_v_e_r_t_e_x_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: function.hh File Reference │ │ │ │ +dune-grid: boundarydom.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
function.hh File Reference
│ │ │ │ +
boundarydom.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Functions for VTK output. │ │ │ │ -More...

│ │ │ │ -
#include <string>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/multilineargeometry.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::VTKFunction< GridView >
 A base class for grid functions with any return type and dimension. More...
 
class  Dune::P0VTKFunction< GV, V >
 Take a vector and interpret it as cell data for the VTKWriter. More...
 
class  Dune::P1VTKFunction< GV, V >
 Take a vector and interpret it as point data for the VTKWriter. More...
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Functions for VTK output.

│ │ │ │ -
Author
Peter Bastian, Christian Engwer
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,41 +2,21 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -function.hh File Reference │ │ │ │ │ -Functions for VTK output. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_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_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  A base class for grid functions with any return type and dimension. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_,_ _V_ _> │ │ │ │ │ -  Take a vector and interpret it as cell data for the _V_T_K_W_r_i_t_e_r. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_,_ _V_ _> │ │ │ │ │ -  Take a vector and interpret it as point data for the _V_T_K_W_r_i_t_e_r. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +boundarydom.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_o_u_n_d_a_r_y_d_o_m_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Functions for VTK output. │ │ │ │ │ - Author │ │ │ │ │ - Peter Bastian, Christian Engwer │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumewriter.hh File Reference │ │ │ │ +dune-grid: dgfyasp.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
volumewriter.hh File Reference
│ │ │ │ +
dgfyasp.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <memory>
│ │ │ │ -#include <dune/grid/io/file/vtk/basicwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/function.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/volumeiterators.hh>
│ │ │ │ +
#include <dune/grid/common/intersection.hh>
│ │ │ │ +#include <dune/grid/yaspgrid.hh>
│ │ │ │ +#include "dgfparser.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::ConformingVolumeWriter< GV >
class  Dune::dgf::YaspGridParameterBlock
 Grid parameters for YaspGrid. More...
 
struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Grid factory for YaspGrid with equidistant coordinates. More...
 
struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Grid factory for YaspGrid with equidistant coordinates. More...
 
class  Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >
 Placeholder for grid factory for YaspGrid with tensor product coordinates. More...
 
struct  Dune::DGFGridInfo< YaspGrid< dim, Coordinates > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,41 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -volumewriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +dgfyasp.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ +#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_<_ _G_V_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +  _G_r_i_d parameters for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ + _d_i_m_ _>_ _>_ _> │ │ │ │ │ +  _G_r_i_d factory for _Y_a_s_p_G_r_i_d with equidistant coordinates. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ + _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ +  _G_r_i_d factory for _Y_a_s_p_G_r_i_d with equidistant coordinates. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _D_u_n_e_:_: │ │ │ │ │ + _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ +  Placeholder for grid factory for _Y_a_s_p_G_r_i_d with tensor product │ │ │ │ │ + coordinates. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_i_n_a_t_e_s_ _>_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumewriter.hh Source File │ │ │ │ +dune-grid: dgfyasp.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,136 +70,619 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
volumewriter.hh
│ │ │ │ +
dgfyasp.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <memory>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ -
19
│ │ │ │ -
20 namespace VTK {
│ │ │ │ +
5#ifndef DUNE_DGFPARSERYASP_HH
│ │ │ │ +
6#define DUNE_DGFPARSERYASP_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10#include "dgfparser.hh"
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
15 // External Forward Declarations
│ │ │ │ +
16 // -----------------------------
│ │ │ │ +
17
│ │ │ │ +
18 template< class GridImp, class IntersectionImp >
│ │ │ │ +
19 class Intersection;
│ │ │ │ +
20
│ │ │ │
21
│ │ │ │ -
22 template<typename GV>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
25 public BasicWriter<ConformingVolumeIteratorFactory<GV> >
│ │ │ │ -
26 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
29
│ │ │ │ -
30 const GV& gv;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ - │ │ │ │ -
34 typedef std::shared_ptr<VTKFunction> VTKFunctionPtr;
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
│ │ │ │ -
38 { }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ - │ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
42 void addCellData(const VTKFunctionPtr& p) {
│ │ │ │ -
43 Base::addCellData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ - │ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51 template<typename V>
│ │ │ │ -
│ │ │ │ -
52 void addCellData(const V &v, const std::string &name, int ncomps=1) {
│ │ │ │ -
53 addCellData(new P0VTKFunction<GV, V>(gv, v, name, ncomps));
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 addPointData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ - │ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
65 template<typename V>
│ │ │ │ -
│ │ │ │ -
66 void addVertexData(const V &v, const std::string &name, int ncomps=1) {
│ │ │ │ -
67 addVertexData(new P1VTKFunction<GV, V>(gv, v, name, ncomps));
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72 } // namespace VTK
│ │ │ │ -
73
│ │ │ │ -
75
│ │ │ │ -
76} // namespace Dune
│ │ │ │ -
77
│ │ │ │ -
78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ - │ │ │ │ -
Functions for VTK output.
│ │ │ │ - │ │ │ │ - │ │ │ │ +
22 namespace dgf
│ │ │ │ +
23 {
│ │ │ │ +
24
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 : public GridParameterBlock
│ │ │ │ +
40 {
│ │ │ │ +
41 protected:
│ │ │ │ +
42 int _overlap; // overlap for YaspGrid
│ │ │ │ +
43
│ │ │ │ +
44 public:
│ │ │ │ +
│ │ │ │ +
46 YaspGridParameterBlock( std::istream &in )
│ │ │ │ +
47 : GridParameterBlock( in ),
│ │ │ │ +
48 _overlap( 0 ) // default value
│ │ │ │ +
49 {
│ │ │ │ +
50 // check overlap
│ │ │ │ +
51 if( findtoken( "overlap" ) )
│ │ │ │ +
52 {
│ │ │ │ +
53 int x;
│ │ │ │ +
54 if( getnextentry(x) ) _overlap = x;
│ │ │ │ +
55 else
│ │ │ │ +
56 {
│ │ │ │ +
57 dwarn << "GridParameterBlock: found keyword `overlap' but no value, defaulting to `" << _overlap <<"' !\n";
│ │ │ │ +
58 }
│ │ │ │ +
59
│ │ │ │ +
60 if (_overlap < 0)
│ │ │ │ +
61 {
│ │ │ │ +
62 DUNE_THROW(DGFException,"Negative overlap specified!");
│ │ │ │ +
63 }
│ │ │ │ +
64 }
│ │ │ │ +
65 else
│ │ │ │ +
66 {
│ │ │ │ +
67 dwarn << "YaspGridParameterBlock: Parameter 'overlap' not specified, "
│ │ │ │ +
68 << "defaulting to '" << _overlap << "'." << std::endl;
│ │ │ │ +
69 }
│ │ │ │ +
70
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
74 int overlap () const
│ │ │ │ +
75 {
│ │ │ │ +
76 return _overlap;
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81 }
│ │ │ │ +
82
│ │ │ │ +
86 template <typename ctype, int dim>
│ │ │ │ +
│ │ │ │ +
87 struct DGFGridFactory< YaspGrid<dim, EquidistantCoordinates<ctype, dim> > >
│ │ │ │ +
88 {
│ │ │ │ + │ │ │ │ +
90 const static int dimension = Grid::dimension;
│ │ │ │ +
91 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
92
│ │ │ │ +
93 private:
│ │ │ │ +
94 typedef FieldVector< ctype, dimension > Point;
│ │ │ │ + │ │ │ │ +
96
│ │ │ │ +
97 public:
│ │ │ │ +
│ │ │ │ +
98 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
99 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
100 {
│ │ │ │ +
101 generate( input, comm );
│ │ │ │ +
102 }
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
104 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
105 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
106 {
│ │ │ │ +
107 std::ifstream input( filename.c_str() );
│ │ │ │ +
108 if( !input )
│ │ │ │ +
109 DUNE_THROW( DGFException, "Error: Macrofile '" << filename << "' not found" );
│ │ │ │ +
110 generate( input, comm );
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
114 {
│ │ │ │ +
115 delete boundaryDomainBlock_;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ +
118 Grid *grid() const
│ │ │ │ +
119 {
│ │ │ │ +
120 return grid_;
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122
│ │ │ │ +
123 template <class Intersection>
│ │ │ │ +
│ │ │ │ +
124 bool wasInserted(const Intersection &intersection) const
│ │ │ │ +
125 {
│ │ │ │ +
126 return false;
│ │ │ │ +
127 }
│ │ │ │ +
│ │ │ │ +
128
│ │ │ │ +
129 template <class Intersection>
│ │ │ │ +
│ │ │ │ +
130 int boundaryId(const Intersection &intersection) const
│ │ │ │ +
131 {
│ │ │ │ +
132 if( boundaryDomainBlock_->isactive() )
│ │ │ │ +
133 {
│ │ │ │ +
134 std::vector< Point > corners;
│ │ │ │ +
135 getCorners( intersection.geometry(), corners );
│ │ │ │ +
136 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ +
137 if( data )
│ │ │ │ +
138 return data->id();
│ │ │ │ +
139 else
│ │ │ │ +
140 return intersection.indexInInside();
│ │ │ │ +
141 }
│ │ │ │ +
142 else
│ │ │ │ +
143 return intersection.indexInInside();
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │ +
145
│ │ │ │ +
146 template< int codim >
│ │ │ │ +
│ │ │ │ +
147 int numParameters () const
│ │ │ │ +
148 {
│ │ │ │ +
149 return 0;
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
152 // return true if boundary parameters found
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
154 {
│ │ │ │ +
155 return boundaryDomainBlock_->hasParameter();
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
158 template< class GG, class II >
│ │ │ │ +
159 const typename DGFBoundaryParameter::type &
│ │ │ │ +
│ │ │ │ +
160 boundaryParameter ( const Intersection< GG, II > & intersection ) const
│ │ │ │ +
161 {
│ │ │ │ + │ │ │ │ +
163 {
│ │ │ │ +
164 std::vector< Point > corners;
│ │ │ │ +
165 getCorners( intersection.geometry(), corners );
│ │ │ │ +
166 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ +
167 if( data )
│ │ │ │ +
168 return data->parameter();
│ │ │ │ +
169 else
│ │ │ │ + │ │ │ │ +
171 }
│ │ │ │ +
172 else
│ │ │ │ + │ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
176 template< class Entity >
│ │ │ │ +
│ │ │ │ +
177 std::vector<double> &parameter ( const Entity & )
│ │ │ │ +
178 {
│ │ │ │ +
179 return emptyParam;
│ │ │ │ +
180 }
│ │ │ │ +
│ │ │ │ +
181
│ │ │ │ +
182 private:
│ │ │ │ +
183 void generate( std::istream &gridin, MPICommunicatorType comm );
│ │ │ │ +
184
│ │ │ │ +
185 template< class Geometry >
│ │ │ │ +
186 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
│ │ │ │ +
187 {
│ │ │ │ +
188 corners.resize( geometry.corners() );
│ │ │ │ +
189 for( int i = 0; i < geometry.corners(); ++i )
│ │ │ │ +
190 {
│ │ │ │ +
191 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
│ │ │ │ +
192 for( int j = 0; j < dimension; ++j )
│ │ │ │ +
193 corners[ i ][ j ] = corner[ j ];
│ │ │ │ +
194 }
│ │ │ │ +
195 }
│ │ │ │ +
196
│ │ │ │ +
197 Grid *grid_;
│ │ │ │ +
198 dgf::BoundaryDomBlock *boundaryDomainBlock_;
│ │ │ │ +
199 std::vector<double> emptyParam;
│ │ │ │ +
200 };
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
202 // generate YaspGrid from the provided DGF
│ │ │ │ +
203 template< typename ctype, int dim >
│ │ │ │ +
204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates<ctype, dim> > >
│ │ │ │ +
205 ::generate ( std::istream &gridin, MPICommunicatorType comm )
│ │ │ │ +
206 {
│ │ │ │ +
207 using std::abs;
│ │ │ │ +
208 dgf::IntervalBlock intervalBlock( gridin );
│ │ │ │ +
209
│ │ │ │ +
210 if( !intervalBlock.isactive() )
│ │ │ │ +
211 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
│ │ │ │ +
212
│ │ │ │ +
213 if( intervalBlock.numIntervals() != 1 )
│ │ │ │ +
214 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
│ │ │ │ +
215
│ │ │ │ +
216 if( intervalBlock.dimw() != dim )
│ │ │ │ +
217 {
│ │ │ │ +
218 DUNE_THROW( DGFException,
│ │ │ │ +
219 "Cannot read an interval of dimension " << intervalBlock.dimw()
│ │ │ │ +
220 << " into a YaspGrid< " << dim << " >." );
│ │ │ │ +
221 }
│ │ │ │ +
222
│ │ │ │ +
223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
│ │ │ │ +
224
│ │ │ │ +
225 FieldVector<ctype, dim> lang;
│ │ │ │ +
226 std::array<int,dim> anz;
│ │ │ │ +
227 for( int i = 0; i < dim; ++i )
│ │ │ │ +
228 {
│ │ │ │ +
229 // check that start point is 0.0
│ │ │ │ +
230 if( abs( interval.p[ 0 ][ i ] ) > 1e-10 )
│ │ │ │ +
231 {
│ │ │ │ +
232 DUNE_THROW( DGFException,
│ │ │ │ +
233 "YaspGrid cannot handle grids with non-zero left lower corner." );
│ │ │ │ +
234 }
│ │ │ │ +
235
│ │ │ │ +
236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ];
│ │ │ │ +
237 anz[ i ] = interval.n[ i ];
│ │ │ │ +
238 }
│ │ │ │ +
239
│ │ │ │ +
240 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation Transformation;
│ │ │ │ +
241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
│ │ │ │ +
242 std::bitset< dim > per;
│ │ │ │ +
243 const int numTrafos = trafoBlock.numTransformations();
│ │ │ │ +
244 for( int k = 0; k < numTrafos; ++k )
│ │ │ │ +
245 {
│ │ │ │ +
246 const Transformation &trafo = trafoBlock.transformation( k );
│ │ │ │ +
247
│ │ │ │ +
248 bool identity = true;
│ │ │ │ +
249 for( int i = 0; i < dim; ++i )
│ │ │ │ +
250 for( int j = 0; j < dim; ++j )
│ │ │ │ +
251 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
│ │ │ │ +
252 if( !identity )
│ │ │ │ +
253 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
│ │ │ │ +
254
│ │ │ │ +
255 int numDirs = 0;
│ │ │ │ +
256 int dir = -1;
│ │ │ │ +
257 for( int i = 0; i < dim; ++i )
│ │ │ │ +
258 {
│ │ │ │ +
259 if( abs( trafo.shift[ i ] ) < 1e-10 )
│ │ │ │ +
260 continue;
│ │ │ │ +
261 dir = i;
│ │ │ │ +
262 ++numDirs;
│ │ │ │ +
263 }
│ │ │ │ +
264 if( (numDirs != 1) || (abs( abs( trafo.shift[ dir ] ) - lang[ dir ] ) >= 1e-10) )
│ │ │ │ +
265 {
│ │ │ │ +
266 std::cerr << "Tranformation '" << trafo
│ │ │ │ +
267 << "' does not map boundaries on boundaries." << std::endl;
│ │ │ │ +
268 }
│ │ │ │ +
269 else
│ │ │ │ +
270 per[ dir ] = true;
│ │ │ │ +
271 }
│ │ │ │ +
272
│ │ │ │ +
273 // get grid parameters
│ │ │ │ +
274 dgf::YaspGridParameterBlock grdParam( gridin );
│ │ │ │ +
275
│ │ │ │ +
276 grid_ = new YaspGrid< dim , EquidistantCoordinates<ctype, dim> >( lang, anz, per, grdParam.overlap(), comm );
│ │ │ │ +
277
│ │ │ │ +
278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
│ │ │ │ +
279 }
│ │ │ │ +
280
│ │ │ │ +
284 template <typename ctype, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
286 {
│ │ │ │ + │ │ │ │ +
288 const static int dimension = Grid::dimension;
│ │ │ │ +
289 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
290
│ │ │ │ +
291 private:
│ │ │ │ +
292 typedef FieldVector< ctype, dimension > Point;
│ │ │ │ + │ │ │ │ +
294
│ │ │ │ +
295 public:
│ │ │ │ +
│ │ │ │ +
296 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
297 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
298 {
│ │ │ │ +
299 generate( input, comm );
│ │ │ │ +
300 }
│ │ │ │ +
│ │ │ │ +
301
│ │ │ │ +
│ │ │ │ +
302 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
303 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
304 {
│ │ │ │ +
305 std::ifstream input( filename.c_str() );
│ │ │ │ +
306 generate( input, comm );
│ │ │ │ +
307 }
│ │ │ │ +
│ │ │ │ +
308
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
310 {
│ │ │ │ +
311 delete boundaryDomainBlock_;
│ │ │ │ +
312 }
│ │ │ │ +
│ │ │ │ +
313
│ │ │ │ +
│ │ │ │ +
314 Grid *grid() const
│ │ │ │ +
315 {
│ │ │ │ +
316 return grid_;
│ │ │ │ +
317 }
│ │ │ │ +
│ │ │ │ +
318
│ │ │ │ +
319 template <class Intersection>
│ │ │ │ +
│ │ │ │ +
320 bool wasInserted(const Intersection &intersection) const
│ │ │ │ +
321 {
│ │ │ │ +
322 return false;
│ │ │ │ +
323 }
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
325 template <class Intersection>
│ │ │ │ +
│ │ │ │ +
326 int boundaryId(const Intersection &intersection) const
│ │ │ │ +
327 {
│ │ │ │ +
328 if( boundaryDomainBlock_->isactive() )
│ │ │ │ +
329 {
│ │ │ │ +
330 std::vector< Point > corners;
│ │ │ │ +
331 getCorners( intersection.geometry(), corners );
│ │ │ │ +
332 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ +
333 if( data )
│ │ │ │ +
334 return data->id();
│ │ │ │ +
335 else
│ │ │ │ +
336 return intersection.indexInInside();
│ │ │ │ +
337 }
│ │ │ │ +
338 else
│ │ │ │ +
339 return intersection.indexInInside();
│ │ │ │ +
340 }
│ │ │ │ +
│ │ │ │ +
341
│ │ │ │ +
342 template< int codim >
│ │ │ │ +
│ │ │ │ +
343 int numParameters () const
│ │ │ │ +
344 {
│ │ │ │ +
345 return 0;
│ │ │ │ +
346 }
│ │ │ │ +
│ │ │ │ +
347
│ │ │ │ +
348 // return true if boundary parameters found
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
350 {
│ │ │ │ +
351 return boundaryDomainBlock_->hasParameter();
│ │ │ │ +
352 }
│ │ │ │ +
│ │ │ │ +
353
│ │ │ │ +
354 template< class GG, class II >
│ │ │ │ +
355 const typename DGFBoundaryParameter::type &
│ │ │ │ +
│ │ │ │ +
356 boundaryParameter ( const Intersection< GG, II > & intersection ) const
│ │ │ │ +
357 {
│ │ │ │ + │ │ │ │ +
359 {
│ │ │ │ +
360 std::vector< Point > corners;
│ │ │ │ +
361 getCorners( intersection.geometry(), corners );
│ │ │ │ +
362 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
│ │ │ │ +
363 if( data )
│ │ │ │ +
364 return data->parameter();
│ │ │ │ +
365 else
│ │ │ │ + │ │ │ │ +
367 }
│ │ │ │ +
368 else
│ │ │ │ + │ │ │ │ +
370 }
│ │ │ │ +
│ │ │ │ +
371
│ │ │ │ +
372 template< class Entity >
│ │ │ │ +
│ │ │ │ +
373 std::vector<double> &parameter ( [[maybe_unused]] const Entity &entity )
│ │ │ │ +
374 {
│ │ │ │ +
375 return emptyParam;
│ │ │ │ +
376 }
│ │ │ │ +
│ │ │ │ +
377
│ │ │ │ +
378 private:
│ │ │ │ +
379 void generate( std::istream &gridin, MPICommunicatorType comm );
│ │ │ │ +
380
│ │ │ │ +
381 template< class Geometry >
│ │ │ │ +
382 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
│ │ │ │ +
383 {
│ │ │ │ +
384 corners.resize( geometry.corners() );
│ │ │ │ +
385 for( int i = 0; i < geometry.corners(); ++i )
│ │ │ │ +
386 {
│ │ │ │ +
387 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
│ │ │ │ +
388 for( int j = 0; j < dimension; ++j )
│ │ │ │ +
389 corners[ i ][ j ] = corner[ j ];
│ │ │ │ +
390 }
│ │ │ │ +
391 }
│ │ │ │ +
392
│ │ │ │ +
393 Grid *grid_;
│ │ │ │ +
394 dgf::BoundaryDomBlock *boundaryDomainBlock_;
│ │ │ │ +
395 std::vector<double> emptyParam;
│ │ │ │ +
396 };
│ │ │ │ +
│ │ │ │ +
397
│ │ │ │ +
398 // generate YaspGrid from the provided DGF
│ │ │ │ +
399 template< typename ctype, int dim >
│ │ │ │ +
400 inline void DGFGridFactory< YaspGrid<dim, EquidistantOffsetCoordinates<ctype, dim> > >
│ │ │ │ +
401 ::generate ( std::istream &gridin, MPICommunicatorType comm )
│ │ │ │ +
402 {
│ │ │ │ +
403 using std::abs;
│ │ │ │ +
404 dgf::IntervalBlock intervalBlock( gridin );
│ │ │ │ +
405
│ │ │ │ +
406 if( !intervalBlock.isactive() )
│ │ │ │ +
407 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
│ │ │ │ +
408
│ │ │ │ +
409 if( intervalBlock.numIntervals() != 1 )
│ │ │ │ +
410 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
│ │ │ │ +
411
│ │ │ │ +
412 if( intervalBlock.dimw() != dim )
│ │ │ │ +
413 {
│ │ │ │ +
414 DUNE_THROW( DGFException,
│ │ │ │ +
415 "Cannot read an interval of dimension "
│ │ │ │ +
416 << intervalBlock.dimw()
│ │ │ │ +
417 << " into a YaspGrid< " << dim << " >." );
│ │ │ │ +
418 }
│ │ │ │ +
419
│ │ │ │ +
420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
│ │ │ │ +
421
│ │ │ │ +
422 FieldVector<ctype, dim> lower;
│ │ │ │ +
423 FieldVector<ctype, dim> upper;
│ │ │ │ +
424 std::array<int,dim> anz;
│ │ │ │ +
425 for( int i = 0; i < dim; ++i )
│ │ │ │ +
426 {
│ │ │ │ +
427 lower[ i ] = interval.p[ 0 ][ i ];
│ │ │ │ +
428 upper[ i ] = interval.p[ 1 ][ i ];
│ │ │ │ +
429 anz[ i ] = interval.n[ i ];
│ │ │ │ +
430 }
│ │ │ │ +
431
│ │ │ │ +
432 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation Transformation;
│ │ │ │ +
433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
│ │ │ │ +
434 std::bitset< dim > periodic;
│ │ │ │ +
435 const int numTrafos = trafoBlock.numTransformations();
│ │ │ │ +
436 for( int k = 0; k < numTrafos; ++k )
│ │ │ │ +
437 {
│ │ │ │ +
438 const Transformation &trafo = trafoBlock.transformation( k );
│ │ │ │ +
439
│ │ │ │ +
440 bool identity = true;
│ │ │ │ +
441 for( int i = 0; i < dim; ++i )
│ │ │ │ +
442 for( int j = 0; j < dim; ++j )
│ │ │ │ +
443 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
│ │ │ │ +
444 if( !identity )
│ │ │ │ +
445 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
│ │ │ │ +
446
│ │ │ │ +
447 int numDirs = 0;
│ │ │ │ +
448 int dir = -1;
│ │ │ │ +
449 for( int currentDir = 0; currentDir < dim; ++currentDir )
│ │ │ │ +
450 {
│ │ │ │ +
451 if( abs( trafo.shift[ currentDir ] ) > 1e-10 )
│ │ │ │ +
452 {
│ │ │ │ +
453 dir = currentDir;
│ │ │ │ +
454 ++numDirs;
│ │ │ │ +
455 }
│ │ │ │ +
456 }
│ │ │ │ +
457 if ( (numDirs != 1)
│ │ │ │ +
458 || (abs( abs( trafo.shift[ dir ] ) - abs( upper[ dir ] - lower[ dir ] ) ) >= 1e-10) )
│ │ │ │ +
459 {
│ │ │ │ +
460 std::cerr << "Tranformation '" << trafo
│ │ │ │ +
461 << "' does not map boundaries on boundaries." << std::endl;
│ │ │ │ +
462 }
│ │ │ │ +
463 else
│ │ │ │ +
464 {
│ │ │ │ +
465 periodic[ dir ] = true;
│ │ │ │ +
466 }
│ │ │ │ +
467 }
│ │ │ │ +
468
│ │ │ │ +
469 // get grid parameters
│ │ │ │ +
470 dgf::YaspGridParameterBlock grdParam( gridin );
│ │ │ │ +
471
│ │ │ │ +
472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates<ctype, dim> >
│ │ │ │ +
473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );
│ │ │ │ +
474
│ │ │ │ +
475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
│ │ │ │ +
476 }
│ │ │ │ +
477
│ │ │ │ +
483 template< class ctype, int dim >
│ │ │ │ +
│ │ │ │ +
484 class DGFGridFactory< Dune::YaspGrid<dim, Dune::TensorProductCoordinates<ctype, dim> > >
│ │ │ │ +
485 {
│ │ │ │ + │ │ │ │ +
487 public:
│ │ │ │ +
488 template< typename In >
│ │ │ │ +
489 DGFGridFactory ( const In & ) {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
491 {
│ │ │ │ +
492 throw std::invalid_argument( "Tensor product coordinates for YaspGrid are currently not supported via the DGFGridFactory" );
│ │ │ │ +
493 }
│ │ │ │ +
│ │ │ │ +
494 };
│ │ │ │ +
│ │ │ │ +
495
│ │ │ │ +
496 template <typename Coordinates, int dim>
│ │ │ │ +
│ │ │ │ +
497 struct DGFGridInfo< YaspGrid<dim , Coordinates> > {
│ │ │ │ +
498 static int refineStepsForHalf() {return 1;}
│ │ │ │ +
499 static double refineWeight() {return std::pow(0.5,dim);}
│ │ │ │ +
500 };
│ │ │ │ +
│ │ │ │ +
501
│ │ │ │ +
502}
│ │ │ │ +
503#endif // #ifndef DUNE_DGFPARSERYASP_HH
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basicwriter.hh:35
│ │ │ │ -
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:76
│ │ │ │ -
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ - │ │ │ │ -
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
│ │ │ │ -
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
│ │ │ │ -
Base class for function writers.
Definition functionwriter.hh:90
│ │ │ │ -
Definition volumeiterators.hh:23
│ │ │ │ -
Definition volumewriter.hh:26
│ │ │ │ -
std::shared_ptr< VTKFunction > VTKFunctionPtr
Definition volumewriter.hh:34
│ │ │ │ -
void addCellData(const VTKFunctionPtr &p)
Definition volumewriter.hh:42
│ │ │ │ -
void addVertexData(const VTKFunctionPtr &p)
Definition volumewriter.hh:56
│ │ │ │ -
void addCellData(VTKFunction *p)
Definition volumewriter.hh:47
│ │ │ │ -
void addVertexData(const V &v, const std::string &name, int ncomps=1)
Definition volumewriter.hh:66
│ │ │ │ -
void addVertexData(VTKFunction *p)
Definition volumewriter.hh:61
│ │ │ │ -
void addCellData(const V &v, const std::string &name, int ncomps=1)
Definition volumewriter.hh:52
│ │ │ │ -
ConformingVolumeWriter(const GV &gv_)
Definition volumewriter.hh:36
│ │ │ │ -
Dune::VTKFunction< GV > VTKFunction
Definition volumewriter.hh:33
│ │ │ │ -
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ +
void abs(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:328
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ +
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ +
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition common/intersection.hh:323
│ │ │ │ +
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Wrapper class for geometries.
Definition common/geometry.hh:71
│ │ │ │ +
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition common/geometry.hh:106
│ │ │ │ +
GlobalCoordinate corner(int i) const
Obtain a corner of the geometry.
Definition common/geometry.hh:219
│ │ │ │ +
int corners() const
Return the number of corners of the reference element.
Definition common/geometry.hh:205
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
bool findtoken(std ::string token)
Definition basic.cc:123
│ │ │ │ +
bool getnextentry(ENTRY &entry)
Definition basic.hh:63
│ │ │ │ +
Definition boundarydom.hh:23
│ │ │ │ +
int id() const
Definition boundarydom.hh:42
│ │ │ │ +
const BoundaryParameter & parameter() const
Definition boundarydom.hh:54
│ │ │ │ +
Definition boundarydom.hh:195
│ │ │ │ +
Common Grid parameters.
Definition gridparameter.hh:35
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ +
Grid parameters for YaspGrid.
Definition dgfyasp.hh:40
│ │ │ │ +
int _overlap
Definition dgfyasp.hh:42
│ │ │ │ +
YaspGridParameterBlock(std::istream &in)
constructor taking istream
Definition dgfyasp.hh:46
│ │ │ │ +
int overlap() const
get dimension of world found in block
Definition dgfyasp.hh:74
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:98
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:104
│ │ │ │ +
bool wasInserted(const Intersection &intersection) const
Definition dgfyasp.hh:124
│ │ │ │ + │ │ │ │ +
std::vector< double > & parameter(const Entity &)
Definition dgfyasp.hh:177
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfyasp.hh:91
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfyasp.hh:160
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid
Definition dgfyasp.hh:89
│ │ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfyasp.hh:130
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfyasp.hh:356
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:302
│ │ │ │ + │ │ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfyasp.hh:326
│ │ │ │ +
YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid
Definition dgfyasp.hh:287
│ │ │ │ +
bool wasInserted(const Intersection &intersection) const
Definition dgfyasp.hh:320
│ │ │ │ +
std::vector< double > & parameter(const Entity &entity)
Definition dgfyasp.hh:373
│ │ │ │ + │ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfyasp.hh:289
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfyasp.hh:296
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static double refineWeight()
Definition dgfyasp.hh:499
│ │ │ │ +
static int refineStepsForHalf()
Definition dgfyasp.hh:498
│ │ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ +
Container for equidistant coordinates in a YaspGrid.
Definition coordinates.hh:29
│ │ │ │ +
Container for equidistant coordinates in a YaspGrid with non-trivial origin.
Definition coordinates.hh:131
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,148 +2,739 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -volumewriter.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfyasp.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ │ -19 │ │ │ │ │ -20 namespace VTK { │ │ │ │ │ +5#ifndef DUNE_DGFPARSERYASP_HH │ │ │ │ │ +6#define DUNE_DGFPARSERYASP_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ +10#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +15 // External Forward Declarations │ │ │ │ │ +16 // ----------------------------- │ │ │ │ │ +17 │ │ │ │ │ +18 template< class GridImp, class IntersectionImp > │ │ │ │ │ +19 class Intersection; │ │ │ │ │ +20 │ │ │ │ │ 21 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 class _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r │ │ │ │ │ -24 : public _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y, │ │ │ │ │ -25 public _B_a_s_i_c_W_r_i_t_e_r > │ │ │ │ │ -26 { │ │ │ │ │ -27 typedef _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_G_V_> _F_a_c_t_o_r_y; │ │ │ │ │ -28 typedef _B_a_s_i_c_W_r_i_t_e_r_<_F_a_c_t_o_r_y_> _B_a_s_e; │ │ │ │ │ -29 │ │ │ │ │ -30 const GV& gv; │ │ │ │ │ -31 │ │ │ │ │ -32 public: │ │ │ │ │ -_3_3 typedef _D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _V_T_K_F_u_n_c_t_i_o_n; │ │ │ │ │ -_3_4 typedef std::shared_ptr _V_T_K_F_u_n_c_t_i_o_n_P_t_r; │ │ │ │ │ -35 │ │ │ │ │ -_3_6 _C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r(const GV& gv_) │ │ │ │ │ -37 : _F_a_c_t_o_r_y(gv_), _B_a_s_e(static_cast(*this)), gv(gv_) │ │ │ │ │ -38 { } │ │ │ │ │ -39 │ │ │ │ │ -40 using _B_a_s_e_:_:_a_d_d_P_o_i_n_t_D_a_t_a; │ │ │ │ │ -41 │ │ │ │ │ -_4_2 void _a_d_d_C_e_l_l_D_a_t_a(const _V_T_K_F_u_n_c_t_i_o_n_P_t_r& p) { │ │ │ │ │ -43 _B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr │ │ │ │ │ -44 (new _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_V_T_K_F_u_n_c_t_i_o_n_>(p))); │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -_4_7 void _a_d_d_C_e_l_l_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n* p) { │ │ │ │ │ -48 _a_d_d_C_e_l_l_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n_P_t_r(p)); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -51 template │ │ │ │ │ -_5_2 void _a_d_d_C_e_l_l_D_a_t_a(const V &v, const std::string &name, int ncomps=1) { │ │ │ │ │ -53 _a_d_d_C_e_l_l_D_a_t_a(new _P_0_V_T_K_F_u_n_c_t_i_o_n_<_G_V_,_ _V_>(gv, v, name, ncomps)); │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -_5_6 void _a_d_d_V_e_r_t_e_x_D_a_t_a(const _V_T_K_F_u_n_c_t_i_o_n_P_t_r& p) { │ │ │ │ │ -57 _a_d_d_P_o_i_n_t_D_a_t_a(std::shared_ptr │ │ │ │ │ -58 (new _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_V_T_K_F_u_n_c_t_i_o_n_>(p))); │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_1 void _a_d_d_V_e_r_t_e_x_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n* p) { │ │ │ │ │ -62 _a_d_d_V_e_r_t_e_x_D_a_t_a(_V_T_K_F_u_n_c_t_i_o_n_P_t_r(p)); │ │ │ │ │ +22 namespace dgf │ │ │ │ │ +23 { │ │ │ │ │ +24 │ │ │ │ │ +_3_8 class _Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +39 : public _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +40 { │ │ │ │ │ +41 protected: │ │ │ │ │ +_4_2 int ___o_v_e_r_l_a_p; // overlap for YaspGrid │ │ │ │ │ +43 │ │ │ │ │ +44 public: │ │ │ │ │ +_4_6 _Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k( std::istream &in ) │ │ │ │ │ +47 : _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k( in ), │ │ │ │ │ +48 ___o_v_e_r_l_a_p( 0 ) // default value │ │ │ │ │ +49 { │ │ │ │ │ +50 // check overlap │ │ │ │ │ +51 if( _f_i_n_d_t_o_k_e_n( "overlap" ) ) │ │ │ │ │ +52 { │ │ │ │ │ +53 int x; │ │ │ │ │ +54 if( _g_e_t_n_e_x_t_e_n_t_r_y(x) ) ___o_v_e_r_l_a_p = x; │ │ │ │ │ +55 else │ │ │ │ │ +56 { │ │ │ │ │ +57 dwarn << "GridParameterBlock: found keyword `overlap' but no value, │ │ │ │ │ +defaulting to `" << ___o_v_e_r_l_a_p <<"' !\n"; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +60 if (___o_v_e_r_l_a_p < 0) │ │ │ │ │ +61 { │ │ │ │ │ +62 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n,"Negative overlap specified!"); │ │ │ │ │ 63 } │ │ │ │ │ -64 │ │ │ │ │ -65 template │ │ │ │ │ -_6_6 void _a_d_d_V_e_r_t_e_x_D_a_t_a(const V &v, const std::string &name, int ncomps=1) { │ │ │ │ │ -67 _a_d_d_V_e_r_t_e_x_D_a_t_a(new _P_1_V_T_K_F_u_n_c_t_i_o_n_<_G_V_,_ _V_>(gv, v, name, ncomps)); │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72 } // namespace VTK │ │ │ │ │ -73 │ │ │ │ │ -75 │ │ │ │ │ -76} // namespace Dune │ │ │ │ │ -77 │ │ │ │ │ -78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH │ │ │ │ │ -_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h │ │ │ │ │ -_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ -Functions for VTK output. │ │ │ │ │ -_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ -_b_a_s_i_c_w_r_i_t_e_r_._h_h │ │ │ │ │ +64 } │ │ │ │ │ +65 else │ │ │ │ │ +66 { │ │ │ │ │ +67 dwarn << "YaspGridParameterBlock: Parameter 'overlap' not specified, " │ │ │ │ │ +68 << "defaulting to '" << ___o_v_e_r_l_a_p << "'." << std::endl; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +_7_4 int _o_v_e_r_l_a_p () const │ │ │ │ │ +75 { │ │ │ │ │ +76 return ___o_v_e_r_l_a_p; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +79 }; │ │ │ │ │ +80 │ │ │ │ │ +81 } │ │ │ │ │ +82 │ │ │ │ │ +86 template │ │ │ │ │ +_8_7 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _Y_a_s_p_G_r_i_d > > │ │ │ │ │ +88 { │ │ │ │ │ +_8_9 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> > _G_r_i_d; │ │ │ │ │ +_9_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_9_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +92 │ │ │ │ │ +93 private: │ │ │ │ │ +94 typedef FieldVector< ctype, dimension > Point; │ │ │ │ │ +95 typedef _d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k _B_o_u_n_d_a_r_y_D_o_m_a_i_n_B_l_o_c_k; │ │ │ │ │ +96 │ │ │ │ │ +97 public: │ │ │ │ │ +_9_8 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +99 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +100 { │ │ │ │ │ +101 generate( input, comm ); │ │ │ │ │ +102 } │ │ │ │ │ +103 │ │ │ │ │ +_1_0_4 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +105 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +106 { │ │ │ │ │ +107 std::ifstream input( filename.c_str() ); │ │ │ │ │ +108 if( !input ) │ │ │ │ │ +109 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error: Macrofile '" << filename << "' not found" │ │ │ │ │ +); │ │ │ │ │ +110 generate( input, comm ); │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 _~_D_G_F_G_r_i_d_F_a_c_t_o_r_y () │ │ │ │ │ +114 { │ │ │ │ │ +115 delete boundaryDomainBlock_; │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_1_8 _G_r_i_d *_g_r_i_d() const │ │ │ │ │ +119 { │ │ │ │ │ +120 return grid_; │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +123 template │ │ │ │ │ +_1_2_4 bool _w_a_s_I_n_s_e_r_t_e_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ +125 { │ │ │ │ │ +126 return false; │ │ │ │ │ +127 } │ │ │ │ │ +128 │ │ │ │ │ +129 template │ │ │ │ │ +_1_3_0 int _b_o_u_n_d_a_r_y_I_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ +131 { │ │ │ │ │ +132 if( boundaryDomainBlock_->isactive() ) │ │ │ │ │ +133 { │ │ │ │ │ +134 std::vector< Point > corners; │ │ │ │ │ +135 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ +136 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ +137 if( data ) │ │ │ │ │ +138 return data->_i_d(); │ │ │ │ │ +139 else │ │ │ │ │ +140 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ +141 } │ │ │ │ │ +142 else │ │ │ │ │ +143 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +146 template< int codim > │ │ │ │ │ +_1_4_7 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +148 { │ │ │ │ │ +149 return 0; │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +152 // return true if boundary parameters found │ │ │ │ │ +_1_5_3 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +154 { │ │ │ │ │ +155 return boundaryDomainBlock_->hasParameter(); │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +158 template< class GG, class II > │ │ │ │ │ +159 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ +_1_6_0 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) const │ │ │ │ │ +161 { │ │ │ │ │ +162 if( _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s() ) │ │ │ │ │ +163 { │ │ │ │ │ +164 std::vector< Point > corners; │ │ │ │ │ +165 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ +166 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ +167 if( data ) │ │ │ │ │ +168 return data->_p_a_r_a_m_e_t_e_r(); │ │ │ │ │ +169 else │ │ │ │ │ +170 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +171 } │ │ │ │ │ +172 else │ │ │ │ │ +173 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +176 template< class Entity > │ │ │ │ │ +_1_7_7 std::vector &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y & ) │ │ │ │ │ +178 { │ │ │ │ │ +179 return emptyParam; │ │ │ │ │ +180 } │ │ │ │ │ +181 │ │ │ │ │ +182 private: │ │ │ │ │ +183 void generate( std::istream &gridin, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm ); │ │ │ │ │ +184 │ │ │ │ │ +185 template< class Geometry > │ │ │ │ │ +186 static void getCorners ( const _G_e_o_m_e_t_r_y &geometry, std::vector< Point > │ │ │ │ │ +&corners ) │ │ │ │ │ +187 { │ │ │ │ │ +188 corners.resize( geometry._c_o_r_n_e_r_s() ); │ │ │ │ │ +189 for( int i = 0; i < geometry._c_o_r_n_e_r_s(); ++i ) │ │ │ │ │ +190 { │ │ │ │ │ +191 const typename _G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e corner = geometry._c_o_r_n_e_r( i ); │ │ │ │ │ +192 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ +193 corners[ i ][ j ] = corner[ j ]; │ │ │ │ │ +194 } │ │ │ │ │ +195 } │ │ │ │ │ +196 │ │ │ │ │ +197 _G_r_i_d *grid_; │ │ │ │ │ +198 dgf::BoundaryDomBlock *boundaryDomainBlock_; │ │ │ │ │ +199 std::vector emptyParam; │ │ │ │ │ +200 }; │ │ │ │ │ +201 │ │ │ │ │ +202 // generate YaspGrid from the provided DGF │ │ │ │ │ +203 template< typename ctype, int dim > │ │ │ │ │ +204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates > > │ │ │ │ │ +205 ::generate ( std::istream &gridin, MPICommunicatorType comm ) │ │ │ │ │ +206 { │ │ │ │ │ +207 using std::abs; │ │ │ │ │ +208 dgf::IntervalBlock intervalBlock( gridin ); │ │ │ │ │ +209 │ │ │ │ │ +210 if( !intervalBlock.isactive() ) │ │ │ │ │ +211 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval │ │ │ │ │ +block." ); │ │ │ │ │ +212 │ │ │ │ │ +213 if( intervalBlock.numIntervals() != 1 ) │ │ │ │ │ +214 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." ); │ │ │ │ │ +215 │ │ │ │ │ +216 if( intervalBlock.dimw() != dim ) │ │ │ │ │ +217 { │ │ │ │ │ +218 DUNE_THROW( DGFException, │ │ │ │ │ +219 "Cannot read an interval of dimension " << intervalBlock.dimw() │ │ │ │ │ +220 << " into a YaspGrid< " << dim << " >." ); │ │ │ │ │ +221 } │ │ │ │ │ +222 │ │ │ │ │ +223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 ); │ │ │ │ │ +224 │ │ │ │ │ +225 FieldVector lang; │ │ │ │ │ +226 std::array anz; │ │ │ │ │ +227 for( int i = 0; i < dim; ++i ) │ │ │ │ │ +228 { │ │ │ │ │ +229 // check that start point is 0.0 │ │ │ │ │ +230 if( _a_b_s( interval.p[ 0 ][ i ] ) > 1e-10 ) │ │ │ │ │ +231 { │ │ │ │ │ +232 DUNE_THROW( DGFException, │ │ │ │ │ +233 "YaspGrid cannot handle grids with non-zero left lower corner." ); │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ]; │ │ │ │ │ +237 anz[ i ] = interval.n[ i ]; │ │ │ │ │ +238 } │ │ │ │ │ +239 │ │ │ │ │ +240 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ +Transformation; │ │ │ │ │ +241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim ); │ │ │ │ │ +242 std::bitset< dim > per; │ │ │ │ │ +243 const int numTrafos = trafoBlock.numTransformations(); │ │ │ │ │ +244 for( int k = 0; k < numTrafos; ++k ) │ │ │ │ │ +245 { │ │ │ │ │ +246 const Transformation &trafo = trafoBlock.transformation( k ); │ │ │ │ │ +247 │ │ │ │ │ +248 bool identity = true; │ │ │ │ │ +249 for( int i = 0; i < dim; ++i ) │ │ │ │ │ +250 for( int j = 0; j < dim; ++j ) │ │ │ │ │ +251 identity &= (_a_b_s( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10); │ │ │ │ │ +252 if( !identity ) │ │ │ │ │ +253 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face │ │ │ │ │ +transformations." ); │ │ │ │ │ +254 │ │ │ │ │ +255 int numDirs = 0; │ │ │ │ │ +256 int dir = -1; │ │ │ │ │ +257 for( int i = 0; i < dim; ++i ) │ │ │ │ │ +258 { │ │ │ │ │ +259 if( _a_b_s( trafo.shift[ i ] ) < 1e-10 ) │ │ │ │ │ +260 continue; │ │ │ │ │ +261 dir = i; │ │ │ │ │ +262 ++numDirs; │ │ │ │ │ +263 } │ │ │ │ │ +264 if( (numDirs != 1) || (_a_b_s( _a_b_s( trafo.shift[ dir ] ) - lang[ dir ] ) >= │ │ │ │ │ +1e-10) ) │ │ │ │ │ +265 { │ │ │ │ │ +266 std::cerr << "Tranformation '" << trafo │ │ │ │ │ +267 << "' does not map boundaries on boundaries." << std::endl; │ │ │ │ │ +268 } │ │ │ │ │ +269 else │ │ │ │ │ +270 per[ dir ] = true; │ │ │ │ │ +271 } │ │ │ │ │ +272 │ │ │ │ │ +273 // get grid parameters │ │ │ │ │ +274 dgf::YaspGridParameterBlock grdParam( gridin ); │ │ │ │ │ +275 │ │ │ │ │ +276 grid_ = new YaspGrid< dim , EquidistantCoordinates >( lang, │ │ │ │ │ +anz, per, grdParam.overlap(), comm ); │ │ │ │ │ +277 │ │ │ │ │ +278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension ); │ │ │ │ │ +279 } │ │ │ │ │ +280 │ │ │ │ │ +284 template │ │ │ │ │ +_2_8_5 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _Y_a_s_p_G_r_i_d > > │ │ │ │ │ +286 { │ │ │ │ │ +_2_8_7 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> > _G_r_i_d; │ │ │ │ │ +_2_8_8 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_2_8_9 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +290 │ │ │ │ │ +291 private: │ │ │ │ │ +292 typedef FieldVector< ctype, dimension > Point; │ │ │ │ │ +293 typedef _d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k _B_o_u_n_d_a_r_y_D_o_m_a_i_n_B_l_o_c_k; │ │ │ │ │ +294 │ │ │ │ │ +295 public: │ │ │ │ │ +_2_9_6 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +297 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +298 { │ │ │ │ │ +299 generate( input, comm ); │ │ │ │ │ +300 } │ │ │ │ │ +301 │ │ │ │ │ +_3_0_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +303 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +304 { │ │ │ │ │ +305 std::ifstream input( filename.c_str() ); │ │ │ │ │ +306 generate( input, comm ); │ │ │ │ │ +307 } │ │ │ │ │ +308 │ │ │ │ │ +_3_0_9 _~_D_G_F_G_r_i_d_F_a_c_t_o_r_y () │ │ │ │ │ +310 { │ │ │ │ │ +311 delete boundaryDomainBlock_; │ │ │ │ │ +312 } │ │ │ │ │ +313 │ │ │ │ │ +_3_1_4 _G_r_i_d *_g_r_i_d() const │ │ │ │ │ +315 { │ │ │ │ │ +316 return grid_; │ │ │ │ │ +317 } │ │ │ │ │ +318 │ │ │ │ │ +319 template │ │ │ │ │ +_3_2_0 bool _w_a_s_I_n_s_e_r_t_e_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ +321 { │ │ │ │ │ +322 return false; │ │ │ │ │ +323 } │ │ │ │ │ +324 │ │ │ │ │ +325 template │ │ │ │ │ +_3_2_6 int _b_o_u_n_d_a_r_y_I_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ +327 { │ │ │ │ │ +328 if( boundaryDomainBlock_->isactive() ) │ │ │ │ │ +329 { │ │ │ │ │ +330 std::vector< Point > corners; │ │ │ │ │ +331 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ +332 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ +333 if( data ) │ │ │ │ │ +334 return data->_i_d(); │ │ │ │ │ +335 else │ │ │ │ │ +336 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ +337 } │ │ │ │ │ +338 else │ │ │ │ │ +339 return intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ +340 } │ │ │ │ │ +341 │ │ │ │ │ +342 template< int codim > │ │ │ │ │ +_3_4_3 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +344 { │ │ │ │ │ +345 return 0; │ │ │ │ │ +346 } │ │ │ │ │ +347 │ │ │ │ │ +348 // return true if boundary parameters found │ │ │ │ │ +_3_4_9 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +350 { │ │ │ │ │ +351 return boundaryDomainBlock_->hasParameter(); │ │ │ │ │ +352 } │ │ │ │ │ +353 │ │ │ │ │ +354 template< class GG, class II > │ │ │ │ │ +355 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ +_3_5_6 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) const │ │ │ │ │ +357 { │ │ │ │ │ +358 if( _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s() ) │ │ │ │ │ +359 { │ │ │ │ │ +360 std::vector< Point > corners; │ │ │ │ │ +361 getCorners( intersection._g_e_o_m_e_t_r_y(), corners ); │ │ │ │ │ +362 const _d_g_f_:_:_D_o_m_a_i_n_D_a_t_a *data = boundaryDomainBlock_->contains( corners ); │ │ │ │ │ +363 if( data ) │ │ │ │ │ +364 return data->_p_a_r_a_m_e_t_e_r(); │ │ │ │ │ +365 else │ │ │ │ │ +366 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +367 } │ │ │ │ │ +368 else │ │ │ │ │ +369 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +370 } │ │ │ │ │ +371 │ │ │ │ │ +372 template< class Entity > │ │ │ │ │ +_3_7_3 std::vector &_p_a_r_a_m_e_t_e_r ( [[maybe_unused]] const _E_n_t_i_t_y &entity ) │ │ │ │ │ +374 { │ │ │ │ │ +375 return emptyParam; │ │ │ │ │ +376 } │ │ │ │ │ +377 │ │ │ │ │ +378 private: │ │ │ │ │ +379 void generate( std::istream &gridin, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm ); │ │ │ │ │ +380 │ │ │ │ │ +381 template< class Geometry > │ │ │ │ │ +382 static void getCorners ( const _G_e_o_m_e_t_r_y &geometry, std::vector< Point > │ │ │ │ │ +&corners ) │ │ │ │ │ +383 { │ │ │ │ │ +384 corners.resize( geometry._c_o_r_n_e_r_s() ); │ │ │ │ │ +385 for( int i = 0; i < geometry._c_o_r_n_e_r_s(); ++i ) │ │ │ │ │ +386 { │ │ │ │ │ +387 const typename _G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e corner = geometry._c_o_r_n_e_r( i ); │ │ │ │ │ +388 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ +389 corners[ i ][ j ] = corner[ j ]; │ │ │ │ │ +390 } │ │ │ │ │ +391 } │ │ │ │ │ +392 │ │ │ │ │ +393 _G_r_i_d *grid_; │ │ │ │ │ +394 dgf::BoundaryDomBlock *boundaryDomainBlock_; │ │ │ │ │ +395 std::vector emptyParam; │ │ │ │ │ +396 }; │ │ │ │ │ +397 │ │ │ │ │ +398 // generate YaspGrid from the provided DGF │ │ │ │ │ +399 template< typename ctype, int dim > │ │ │ │ │ +400 inline void DGFGridFactory< YaspGrid > > │ │ │ │ │ +401 ::generate ( std::istream &gridin, MPICommunicatorType comm ) │ │ │ │ │ +402 { │ │ │ │ │ +403 using std::abs; │ │ │ │ │ +404 dgf::IntervalBlock intervalBlock( gridin ); │ │ │ │ │ +405 │ │ │ │ │ +406 if( !intervalBlock.isactive() ) │ │ │ │ │ +407 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval │ │ │ │ │ +block." ); │ │ │ │ │ +408 │ │ │ │ │ +409 if( intervalBlock.numIntervals() != 1 ) │ │ │ │ │ +410 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." ); │ │ │ │ │ +411 │ │ │ │ │ +412 if( intervalBlock.dimw() != dim ) │ │ │ │ │ +413 { │ │ │ │ │ +414 DUNE_THROW( DGFException, │ │ │ │ │ +415 "Cannot read an interval of dimension " │ │ │ │ │ +416 << intervalBlock.dimw() │ │ │ │ │ +417 << " into a YaspGrid< " << dim << " >." ); │ │ │ │ │ +418 } │ │ │ │ │ +419 │ │ │ │ │ +420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 ); │ │ │ │ │ +421 │ │ │ │ │ +422 FieldVector lower; │ │ │ │ │ +423 FieldVector upper; │ │ │ │ │ +424 std::array anz; │ │ │ │ │ +425 for( int i = 0; i < dim; ++i ) │ │ │ │ │ +426 { │ │ │ │ │ +427 lower[ i ] = interval.p[ 0 ][ i ]; │ │ │ │ │ +428 upper[ i ] = interval.p[ 1 ][ i ]; │ │ │ │ │ +429 anz[ i ] = interval.n[ i ]; │ │ │ │ │ +430 } │ │ │ │ │ +431 │ │ │ │ │ +432 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ +Transformation; │ │ │ │ │ +433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim ); │ │ │ │ │ +434 std::bitset< dim > periodic; │ │ │ │ │ +435 const int numTrafos = trafoBlock.numTransformations(); │ │ │ │ │ +436 for( int k = 0; k < numTrafos; ++k ) │ │ │ │ │ +437 { │ │ │ │ │ +438 const Transformation &trafo = trafoBlock.transformation( k ); │ │ │ │ │ +439 │ │ │ │ │ +440 bool identity = true; │ │ │ │ │ +441 for( int i = 0; i < dim; ++i ) │ │ │ │ │ +442 for( int j = 0; j < dim; ++j ) │ │ │ │ │ +443 identity &= (_a_b_s( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10); │ │ │ │ │ +444 if( !identity ) │ │ │ │ │ +445 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face │ │ │ │ │ +transformations." ); │ │ │ │ │ +446 │ │ │ │ │ +447 int numDirs = 0; │ │ │ │ │ +448 int dir = -1; │ │ │ │ │ +449 for( int currentDir = 0; currentDir < dim; ++currentDir ) │ │ │ │ │ +450 { │ │ │ │ │ +451 if( _a_b_s( trafo.shift[ currentDir ] ) > 1e-10 ) │ │ │ │ │ +452 { │ │ │ │ │ +453 dir = currentDir; │ │ │ │ │ +454 ++numDirs; │ │ │ │ │ +455 } │ │ │ │ │ +456 } │ │ │ │ │ +457 if ( (numDirs != 1) │ │ │ │ │ +458 || (_a_b_s( _a_b_s( trafo.shift[ dir ] ) - _a_b_s( upper[ dir ] - lower[ dir ] ) ) │ │ │ │ │ +>= 1e-10) ) │ │ │ │ │ +459 { │ │ │ │ │ +460 std::cerr << "Tranformation '" << trafo │ │ │ │ │ +461 << "' does not map boundaries on boundaries." << std::endl; │ │ │ │ │ +462 } │ │ │ │ │ +463 else │ │ │ │ │ +464 { │ │ │ │ │ +465 periodic[ dir ] = true; │ │ │ │ │ +466 } │ │ │ │ │ +467 } │ │ │ │ │ +468 │ │ │ │ │ +469 // get grid parameters │ │ │ │ │ +470 dgf::YaspGridParameterBlock grdParam( gridin ); │ │ │ │ │ +471 │ │ │ │ │ +472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates > │ │ │ │ │ +473 ( lower, upper, anz, periodic, grdParam.overlap(), comm ); │ │ │ │ │ +474 │ │ │ │ │ +475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension ); │ │ │ │ │ +476 } │ │ │ │ │ +477 │ │ │ │ │ +483 template< class ctype, int dim > │ │ │ │ │ +_4_8_4 class _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _D_u_n_e::_Y_a_s_p_G_r_i_d > > │ │ │ │ │ +485 { │ │ │ │ │ +486 using _G_r_i_d = _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_d_i_m_,_ _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> │ │ │ │ │ +>; │ │ │ │ │ +487 public: │ │ │ │ │ +488 template< typename In > │ │ │ │ │ +_4_8_9 _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const In & ) {} │ │ │ │ │ +_4_9_0 _G_r_i_d *_g_r_i_d() │ │ │ │ │ +491 { │ │ │ │ │ +492 throw std::invalid_argument( "Tensor product coordinates for YaspGrid are │ │ │ │ │ +currently not supported via the DGFGridFactory" ); │ │ │ │ │ +493 } │ │ │ │ │ +494 }; │ │ │ │ │ +495 │ │ │ │ │ +496 template │ │ │ │ │ +_4_9_7 struct _D_G_F_G_r_i_d_I_n_f_o< _Y_a_s_p_G_r_i_d > { │ │ │ │ │ +_4_9_8 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f() {return 1;} │ │ │ │ │ +_4_9_9 static double _r_e_f_i_n_e_W_e_i_g_h_t() {return std::pow(0.5,dim);} │ │ │ │ │ +500 }; │ │ │ │ │ +501 │ │ │ │ │ +502} │ │ │ │ │ +503#endif // #ifndef DUNE_DGFPARSERYASP_HH │ │ │ │ │ +_y_a_s_p_g_r_i_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ │ -DDeeffiinniittiioonn function.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ │ -DDeeffiinniittiioonn function.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -Base class for function writers. │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n_P_t_r │ │ │ │ │ -std::shared_ptr< VTKFunction > VTKFunctionPtr │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const VTKFunctionPtr &p) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(const VTKFunctionPtr &p) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(VTKFunction *p) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(VTKFunction *p) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r │ │ │ │ │ -ConformingVolumeWriter(const GV &gv_) │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -Dune::VTKFunction< GV > VTKFunction │ │ │ │ │ -DDeeffiinniittiioonn volumewriter.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_V_o_l_u_m_e_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s │ │ │ │ │ +void abs(const DofVectorPointer< int > &dofVector) │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:328 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +geometrical information about the intersection in global coordinates. │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:323 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ +int indexInInside() const │ │ │ │ │ +Local index of codim 1 entity in the inside() entity where intersection is │ │ │ │ │ +contained in. │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ +Wrapper class for geometries. │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:71 │ │ │ │ │ +_D_u_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, cdim > GlobalCoordinate │ │ │ │ │ +type of the global coordinates │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ │ +Obtain a corner of the geometry. │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:219 │ │ │ │ │ +_D_u_n_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 reference element. │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_f_i_n_d_t_o_k_e_n │ │ │ │ │ +bool findtoken(std ::string token) │ │ │ │ │ +DDeeffiinniittiioonn basic.cc:123 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_g_e_t_n_e_x_t_e_n_t_r_y │ │ │ │ │ +bool getnextentry(ENTRY &entry) │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_i_d │ │ │ │ │ +int id() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +const BoundaryParameter & parameter() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +Common Grid parameters. │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ +Some simple static information for a given GridType. │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +Grid parameters for YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:___o_v_e_r_l_a_p │ │ │ │ │ +int _overlap │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +YaspGridParameterBlock(std::istream &in) │ │ │ │ │ +constructor taking istream │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_Y_a_s_p_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_o_v_e_r_l_a_p │ │ │ │ │ +int overlap() const │ │ │ │ │ +get dimension of world found in block │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ +comm=MPIHelper::getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Entity &) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ +> &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_~_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +~DGFGridFactory() │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_g_r_i_d │ │ │ │ │ +Grid * grid() const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_G_r_i_d │ │ │ │ │ +YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_: │ │ │ │ │ +_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ +> &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:356 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ +comm=MPIHelper::getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:302 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:326 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_G_r_i_d │ │ │ │ │ +YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:320 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:373 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:349 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:289 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:296 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_~_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +~DGFGridFactory() │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:309 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ +_>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:343 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ +_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:490 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _D_u_n_e_:_:_Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_< │ │ │ │ │ +_c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const In &) │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:489 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_i_n_a_t_e_s_ _>_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ +static double refineWeight() │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:499 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_i_n_a_t_e_s_ _>_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +DDeeffiinniittiioonn dgfyasp.hh:498 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ +static const type & defaultValue() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ +[ provides Dune::Grid ] │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Container for equidistant coordinates in a YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:131 │ │ │ │ │ +_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriter.hh File Reference │ │ │ │ +dune-grid: entitykey_inline.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
vtksequencewriter.hh File Reference
│ │ │ │ +
entitykey_inline.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <memory>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtkwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::VTKSequenceWriter< GridView >
 Writer for the ouput of grid functions in the vtk format. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +2,20 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vtksequencewriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +entitykey_inline.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  Writer for the ouput of grid functions in the vtk format. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriter.hh Source File │ │ │ │ +dune-grid: entitykey_inline.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,230 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtksequencewriter.hh
│ │ │ │ +
entitykey_inline.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_VTKSEQUENCE_HH
│ │ │ │ -
7#define DUNE_VTKSEQUENCE_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <memory>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ +
5#ifndef DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ +
6#define DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
15 // DGFEntityKey
│ │ │ │ +
16 // ------------
│ │ │ │
17
│ │ │ │ -
26 template< class GridView >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
28 public VTKSequenceWriterBase<GridView>
│ │ │ │ -
29 {
│ │ │ │ -
30 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
43 const std::string& name )
│ │ │ │ - │ │ │ │ -
45 name,
│ │ │ │ -
46 "",
│ │ │ │ -
47 "",
│ │ │ │ -
48 vtkWriter->gridView_.comm().rank(),
│ │ │ │ -
49 vtkWriter->gridView_.comm().size())
│ │ │ │ -
50 {}
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
70 const std::string& name,
│ │ │ │ -
71 const std::string& path,
│ │ │ │ -
72 const std::string& extendpath )
│ │ │ │ - │ │ │ │ -
74 name,
│ │ │ │ -
75 path,
│ │ │ │ -
76 extendpath,
│ │ │ │ -
77 vtkWriter->gridView_.comm().rank(),
│ │ │ │ -
78 vtkWriter->gridView_.comm().size())
│ │ │ │ -
79 {}
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
│ │ │ │ -
87 explicit VTKSequenceWriter ( const GridView &gridView,
│ │ │ │ -
88 const std::string& name,
│ │ │ │ -
89 const std::string& path,
│ │ │ │ -
90 const std::string& extendpath,
│ │ │ │ - │ │ │ │ -
92 : VTKSequenceWriterBase<GridView>(std::make_shared<VTKWriter<GridView> >(gridView,dm),
│ │ │ │ -
93 name,path,extendpath,
│ │ │ │ -
94 gridView.comm().rank(), gridView.comm().size())
│ │ │ │ -
95 {}
│ │ │ │ -
│ │ │ │ -
96 };
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
98} // end namespace Dune
│ │ │ │ -
99
│ │ │ │ -
100#endif
│ │ │ │ -
Provides subsampled file i/o for the visualization toolkit.
│ │ │ │ -
Provides file i/o for the visualization toolkit.
│ │ │ │ - │ │ │ │ -
STL namespace.
│ │ │ │ +
18 template< class A >
│ │ │ │ +
│ │ │ │ +
19 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey )
│ │ │ │ +
20 : key_( key.size() ),
│ │ │ │ +
21 origKey_( key.size() ),
│ │ │ │ +
│ │ │ │ +
22 origKeySet_( setOrigKey )
│ │ │ │ +
23 {
│ │ │ │ +
24 for (size_t i=0; i<key_.size(); i++)
│ │ │ │ +
│ │ │ │ +
25 {
│ │ │ │ +
26 key_[i]=key[i];
│ │ │ │ +
│ │ │ │ +
27 origKey_[i]=key_[i];
│ │ │ │ +
28 }
│ │ │ │ +
29 std :: sort( key_.begin(), key_.end() );
│ │ │ │ +
30 }
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
33 template< class A >
│ │ │ │ +
34 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key,
│ │ │ │ +
35 int N, int offset, bool setOrigKey )
│ │ │ │ +
36 : key_( N ),
│ │ │ │ +
37 origKey_( N ),
│ │ │ │ +
38 origKeySet_( setOrigKey )
│ │ │ │ +
39 {
│ │ │ │ +
40 for (size_t i=0; i<key_.size(); i++)
│ │ │ │ +
41 {
│ │ │ │ +
42 key_[i]=key[(i+offset)%key.size()];
│ │ │ │ +
43 origKey_[i]=key[(i+offset)%key.size()];
│ │ │ │ +
44 }
│ │ │ │ +
45 std :: sort( key_.begin(), key_.end() );
│ │ │ │ +
46 }
│ │ │ │ +
47
│ │ │ │ +
48
│ │ │ │ +
49 template< class A >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 : key_( k.key_.size() ),
│ │ │ │ +
52 origKey_( k.key_.size() ),
│ │ │ │ +
53 origKeySet_( k. origKeySet_ )
│ │ │ │ +
54 {
│ │ │ │ +
55 for (size_t i=0; i<key_.size(); i++)
│ │ │ │ +
56 {
│ │ │ │ +
57 key_[i]=k.key_[i];
│ │ │ │ +
58 origKey_[i]=k.origKey_[i];
│ │ │ │ +
59 }
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
62
│ │ │ │ +
63 template< class A >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
65 {
│ │ │ │ +
66 assert(key_.size()==k.key_.size());
│ │ │ │ +
67 for (size_t i=0; i<key_.size(); i++) {
│ │ │ │ +
68 key_[i]=k.key_[i];
│ │ │ │ +
69 origKey_[i]=k.origKey_[i];
│ │ │ │ +
70 }
│ │ │ │ +
71 origKeySet_ = k.origKeySet_;
│ │ │ │ +
72 return *this;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75
│ │ │ │ +
76 template< class A >
│ │ │ │ +
77 inline void DGFEntityKey< A >
│ │ │ │ +
│ │ │ │ +
78 :: orientation ( int base, std::vector< std :: vector< double > > &vtx )
│ │ │ │ +
79 {
│ │ │ │ +
80 if (key_.size()==3) {
│ │ │ │ +
81 assert( (size_t) origKey_[0] < vtx.size() );
│ │ │ │ +
82 std::vector<double>& p0 = vtx[origKey_[0]];
│ │ │ │ +
83 assert( (size_t) origKey_[1] < vtx.size() );
│ │ │ │ +
84 std::vector<double>& p1 = vtx[origKey_[1]];
│ │ │ │ +
85 assert( (size_t) origKey_[2] < vtx.size() );
│ │ │ │ +
86 std::vector<double>& p2 = vtx[origKey_[2]];
│ │ │ │ +
87 assert( (size_t) base < vtx.size() );
│ │ │ │ +
88 std::vector<double>& q = vtx[base];
│ │ │ │ +
89 double n[3];
│ │ │ │ +
90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]);
│ │ │ │ +
91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]);
│ │ │ │ +
92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]);
│ │ │ │ +
93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]);
│ │ │ │ +
94 bool reorient = (test>0);
│ │ │ │ +
95 if (reorient) {
│ │ │ │ +
96 A key1=origKey_[1];
│ │ │ │ +
97 origKey_[1]=origKey_[2];
│ │ │ │ +
98 origKey_[2]=key1;
│ │ │ │ +
99 }
│ │ │ │ +
100 }
│ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
103
│ │ │ │ +
104 template< class A >
│ │ │ │ +
│ │ │ │ +
105 inline void DGFEntityKey< A > :: print ( std :: ostream &out ) const
│ │ │ │ +
106 {
│ │ │ │ +
107 for( size_t i = 0; i < key_.size(); ++i )
│ │ │ │ +
108 out << key_[ i ] << " ";
│ │ │ │ +
109 out << std :: endl;
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
112
│ │ │ │ +
113 // ElementFaceUtil
│ │ │ │ +
114 // ---------------
│ │ │ │ +
115
│ │ │ │ +
116 template< int dim >
│ │ │ │ + │ │ │ │ +
118 ElementFaceUtil::generateCubeFace
│ │ │ │ +
119 ( const std::vector< unsigned int > &element, int f )
│ │ │ │ +
120 {
│ │ │ │ +
121 auto refCube = ReferenceElements< double, dim >::cube();
│ │ │ │ +
122 const unsigned int size = refCube.size( f, 1, dim );
│ │ │ │ +
123 std::vector< unsigned int > k( size );
│ │ │ │ +
124 for( unsigned int i = 0; i < size; ++ i )
│ │ │ │ +
125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ];
│ │ │ │ + │ │ │ │ +
127 }
│ │ │ │ +
128
│ │ │ │ +
129
│ │ │ │ +
130 template< int dim >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
132 ElementFaceUtil :: generateSimplexFace
│ │ │ │ +
133 ( const std :: vector< unsigned int > &element, int f )
│ │ │ │ +
134 {
│ │ │ │ +
135 auto refSimplex = ReferenceElements< double, dim >::simplex();
│ │ │ │ +
136 const unsigned int size = refSimplex.size( f, 1, dim );
│ │ │ │ +
137 std :: vector< unsigned int > k( size );
│ │ │ │ +
138 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ +
139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ];
│ │ │ │ + │ │ │ │ +
141 }
│ │ │ │ +
│ │ │ │ +
142
│ │ │ │ +
143
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
145 ElementFaceUtil::generateFace ( int dim, const std::vector< unsigned int > &element, int f )
│ │ │ │ +
146 {
│ │ │ │ +
147 if( element.size() == size_t(dim+1) )
│ │ │ │ +
148 {
│ │ │ │ +
149 // Simplex element
│ │ │ │ +
150 switch( dim )
│ │ │ │ +
151 {
│ │ │ │ +
152 case 3 :
│ │ │ │ +
153 return generateSimplexFace< 3 >( element, f );
│ │ │ │ +
154 case 2 :
│ │ │ │ +
155 return generateSimplexFace< 2 >( element, f );
│ │ │ │ +
156 case 1 :
│ │ │ │ +
157 return generateSimplexFace< 1 >( element, f );
│ │ │ │ +
158 default :
│ │ │ │ +
159 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
│ │ │ │ +
160 }
│ │ │ │ +
161 }
│ │ │ │ +
162 else
│ │ │ │ +
163 {
│ │ │ │ +
164 // Cube element
│ │ │ │ +
165 switch( dim )
│ │ │ │ +
166 {
│ │ │ │ +
167 case 3 :
│ │ │ │ +
168 return generateCubeFace< 3 >( element, f );
│ │ │ │ +
169 case 2 :
│ │ │ │ +
170 return generateCubeFace< 2 >( element, f );
│ │ │ │ +
171 case 1 :
│ │ │ │ +
172 return generateCubeFace< 1 >( element, f );
│ │ │ │ +
173 default :
│ │ │ │ +
174 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
│ │ │ │ +
175 }
│ │ │ │ +
176 }
│ │ │ │ +
177 }
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
179} // end namespace Dune
│ │ │ │ +
180
│ │ │ │ +
181#endif // DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
DataMode
Whether to produce conforming or non-conforming output.
Definition common.hh:67
│ │ │ │ -
@ conforming
Output conforming data.
Definition common.hh:73
│ │ │ │ -
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ -
Writer for the ouput of grid functions in the vtk format.
Definition vtksequencewriter.hh:29
│ │ │ │ -
VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath)
Constructor with a given VTKWriter or SubsamplingVTKWriter.
Definition vtksequencewriter.hh:69
│ │ │ │ -
VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name)
Constructor with a given VTKWriter or SubsamplingVTKWriter.
Definition vtksequencewriter.hh:42
│ │ │ │ -
VTKSequenceWriter(const GridView &gridView, const std::string &name, const std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::conforming)
Constructor creating its own VTKWriter object.
Definition vtksequencewriter.hh:87
│ │ │ │ -
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition vtksequencewriterbase.hh:34
│ │ │ │ -
const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
Definition vtksequencewriterbase.hh:63
│ │ │ │ -
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ +
Definition entitykey.hh:21
│ │ │ │ +
static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
Definition entitykey_inline.hh:145
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,121 +2,209 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -vtksequencewriter.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +entitykey_inline.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_VTKSEQUENCE_HH │ │ │ │ │ -7#define DUNE_VTKSEQUENCE_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ │ +5#ifndef DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ +6#define DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +15 // DGFEntityKey │ │ │ │ │ +16 // ------------ │ │ │ │ │ 17 │ │ │ │ │ -26 template< class GridView > │ │ │ │ │ -_2_7 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r : │ │ │ │ │ -28 public _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -29 { │ │ │ │ │ -30 public: │ │ │ │ │ -_4_2 _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r ( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > _v_t_k_W_r_i_t_e_r, │ │ │ │ │ -43 const std::string& name ) │ │ │ │ │ -44 : _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>(_v_t_k_W_r_i_t_e_r, │ │ │ │ │ -45 name, │ │ │ │ │ -46 "", │ │ │ │ │ -47 "", │ │ │ │ │ -48 _v_t_k_W_r_i_t_e_r->gridView_.comm().rank(), │ │ │ │ │ -49 _v_t_k_W_r_i_t_e_r->gridView_.comm().size()) │ │ │ │ │ -50 {} │ │ │ │ │ -51 │ │ │ │ │ -_6_9 _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r ( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > _v_t_k_W_r_i_t_e_r, │ │ │ │ │ -70 const std::string& name, │ │ │ │ │ -71 const std::string& path, │ │ │ │ │ -72 const std::string& extendpath ) │ │ │ │ │ -73 : _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>(_v_t_k_W_r_i_t_e_r, │ │ │ │ │ -74 name, │ │ │ │ │ -75 path, │ │ │ │ │ -76 extendpath, │ │ │ │ │ -77 _v_t_k_W_r_i_t_e_r->gridView_.comm().rank(), │ │ │ │ │ -78 _v_t_k_W_r_i_t_e_r->gridView_.comm().size()) │ │ │ │ │ -79 {} │ │ │ │ │ -80 │ │ │ │ │ -_8_7 explicit _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r ( const _G_r_i_d_V_i_e_w &gridView, │ │ │ │ │ -88 const std::string& name, │ │ │ │ │ -89 const std::string& path, │ │ │ │ │ -90 const std::string& extendpath, │ │ │ │ │ -91 _V_T_K_:_:_D_a_t_a_M_o_d_e dm = _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g ) │ │ │ │ │ -92 : _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>(_s_t_d::make_shared<_V_T_K_W_r_i_t_e_r<_G_r_i_d_V_i_e_w> > │ │ │ │ │ -(gridView,dm), │ │ │ │ │ -93 name,path,extendpath, │ │ │ │ │ -94 gridView.comm().rank(), gridView.comm().size()) │ │ │ │ │ -95 {} │ │ │ │ │ -96 }; │ │ │ │ │ -97 │ │ │ │ │ -98} // end namespace Dune │ │ │ │ │ -99 │ │ │ │ │ -100#endif │ │ │ │ │ -_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ -Provides subsampled file i/o for the visualization toolkit. │ │ │ │ │ -_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ │ -_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h │ │ │ │ │ -_s_t_d │ │ │ │ │ -STL namespace. │ │ │ │ │ +18 template< class A > │ │ │ │ │ +_1_9 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _D_G_F_E_n_t_i_t_y_K_e_y ( const std :: vector< A > &key, │ │ │ │ │ +bool setOrigKey ) │ │ │ │ │ +20 : key_( key.size() ), │ │ │ │ │ +21 origKey_( key.size() ), │ │ │ │ │ +_2_2 origKeySet_( setOrigKey ) │ │ │ │ │ +23 { │ │ │ │ │ +24 for (size_t i=0; i │ │ │ │ │ +34 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _D_G_F_E_n_t_i_t_y_K_e_y ( const std :: vector< A > &key, │ │ │ │ │ +35 int N, int offset, bool setOrigKey ) │ │ │ │ │ +36 : key_( N ), │ │ │ │ │ +37 origKey_( N ), │ │ │ │ │ +38 origKeySet_( setOrigKey ) │ │ │ │ │ +39 { │ │ │ │ │ +40 for (size_t i=0; i │ │ │ │ │ +_5_0 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _D_G_F_E_n_t_i_t_y_K_e_y ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) │ │ │ │ │ +51 : key_( k.key_.size() ), │ │ │ │ │ +52 origKey_( k.key_.size() ), │ │ │ │ │ +53 origKeySet_( k. origKeySet_ ) │ │ │ │ │ +54 { │ │ │ │ │ +55 for (size_t i=0; i │ │ │ │ │ +_6_4 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_p_e_r_a_t_o_r_=_ ( const │ │ │ │ │ +_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) │ │ │ │ │ +65 { │ │ │ │ │ +66 assert(key_.size()==k.key_.size()); │ │ │ │ │ +67 for (size_t i=0; i │ │ │ │ │ +77 inline void _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> │ │ │ │ │ +_7_8_ _:_:_ _o_r_i_e_n_t_a_t_i_o_n ( int base, std::vector< std :: vector< double > > &vtx ) │ │ │ │ │ +79 { │ │ │ │ │ +80 if (key_.size()==3) { │ │ │ │ │ +81 assert( (size_t) origKey_[0] < vtx.size() ); │ │ │ │ │ +82 std::vector& p0 = vtx[origKey_[0]]; │ │ │ │ │ +83 assert( (size_t) origKey_[1] < vtx.size() ); │ │ │ │ │ +84 std::vector& p1 = vtx[origKey_[1]]; │ │ │ │ │ +85 assert( (size_t) origKey_[2] < vtx.size() ); │ │ │ │ │ +86 std::vector& p2 = vtx[origKey_[2]]; │ │ │ │ │ +87 assert( (size_t) base < vtx.size() ); │ │ │ │ │ +88 std::vector& q = vtx[base]; │ │ │ │ │ +89 double n[3]; │ │ │ │ │ +90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]); │ │ │ │ │ +91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]); │ │ │ │ │ +92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]); │ │ │ │ │ +93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]); │ │ │ │ │ +94 bool reorient = (test>0); │ │ │ │ │ +95 if (reorient) { │ │ │ │ │ +96 A key1=origKey_[1]; │ │ │ │ │ +97 origKey_[1]=origKey_[2]; │ │ │ │ │ +98 origKey_[2]=key1; │ │ │ │ │ +99 } │ │ │ │ │ +100 } │ │ │ │ │ +101 } │ │ │ │ │ +102 │ │ │ │ │ +103 │ │ │ │ │ +104 template< class A > │ │ │ │ │ +_1_0_5 inline void _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _p_r_i_n_t ( std :: ostream &out ) const │ │ │ │ │ +106 { │ │ │ │ │ +107 for( size_t i = 0; i < key_.size(); ++i ) │ │ │ │ │ +108 out << key_[ i ] << " "; │ │ │ │ │ +109 out << std :: endl; │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +112 │ │ │ │ │ +113 // ElementFaceUtil │ │ │ │ │ +114 // --------------- │ │ │ │ │ +115 │ │ │ │ │ +116 template< int dim > │ │ │ │ │ +117 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ +118 ElementFaceUtil::generateCubeFace │ │ │ │ │ +119 ( const std::vector< unsigned int > &element, int f ) │ │ │ │ │ +120 { │ │ │ │ │ +121 auto refCube = ReferenceElements< double, dim >::cube(); │ │ │ │ │ +122 const unsigned int size = refCube.size( f, 1, dim ); │ │ │ │ │ +123 std::vector< unsigned int > k( size ); │ │ │ │ │ +124 for( unsigned int i = 0; i < size; ++ i ) │ │ │ │ │ +125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ]; │ │ │ │ │ +126 return _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _>( k ); │ │ │ │ │ +127 } │ │ │ │ │ +128 │ │ │ │ │ +129 │ │ │ │ │ +130 template< int dim > │ │ │ │ │ +131 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ +_1_3_2 ElementFaceUtil :: generateSimplexFace │ │ │ │ │ +133 ( const std :: vector< unsigned int > &element, int f ) │ │ │ │ │ +134 { │ │ │ │ │ +135 auto refSimplex = ReferenceElements< double, dim >::simplex(); │ │ │ │ │ +136 const unsigned int size = refSimplex.size( f, 1, dim ); │ │ │ │ │ +137 std :: vector< unsigned int > k( size ); │ │ │ │ │ +138 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ +139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ]; │ │ │ │ │ +140 return _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _>( k ); │ │ │ │ │ +141 } │ │ │ │ │ +142 │ │ │ │ │ +143 │ │ │ │ │ +144 inline _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ +_1_4_5 _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_g_e_n_e_r_a_t_e_F_a_c_e ( int dim, const std::vector< unsigned int > │ │ │ │ │ +&element, int f ) │ │ │ │ │ +146 { │ │ │ │ │ +147 if( element.size() == size_t(dim+1) ) │ │ │ │ │ +148 { │ │ │ │ │ +149 // Simplex element │ │ │ │ │ +150 switch( dim ) │ │ │ │ │ +151 { │ │ │ │ │ +152 case 3 : │ │ │ │ │ +153 return generateSimplexFace< 3 >( element, f ); │ │ │ │ │ +154 case 2 : │ │ │ │ │ +155 return generateSimplexFace< 2 >( element, f ); │ │ │ │ │ +156 case 1 : │ │ │ │ │ +157 return generateSimplexFace< 1 >( element, f ); │ │ │ │ │ +158 default : │ │ │ │ │ +159 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for │ │ │ │ │ +dim = " << dim << "." ); │ │ │ │ │ +160 } │ │ │ │ │ +161 } │ │ │ │ │ +162 else │ │ │ │ │ +163 { │ │ │ │ │ +164 // Cube element │ │ │ │ │ +165 switch( dim ) │ │ │ │ │ +166 { │ │ │ │ │ +167 case 3 : │ │ │ │ │ +168 return generateCubeFace< 3 >( element, f ); │ │ │ │ │ +169 case 2 : │ │ │ │ │ +170 return generateCubeFace< 2 >( element, f ); │ │ │ │ │ +171 case 1 : │ │ │ │ │ +172 return generateCubeFace< 1 >( element, f ); │ │ │ │ │ +173 default : │ │ │ │ │ +174 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for │ │ │ │ │ +dim = " << dim << "." ); │ │ │ │ │ +175 } │ │ │ │ │ +176 } │ │ │ │ │ +177 } │ │ │ │ │ +178 │ │ │ │ │ +179} // end namespace Dune │ │ │ │ │ +180 │ │ │ │ │ +181#endif // DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ +_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e │ │ │ │ │ -DataMode │ │ │ │ │ -Whether to produce conforming or non-conforming output. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -@ conforming │ │ │ │ │ -Output conforming data. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid view abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ -Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriter.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ -VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const │ │ │ │ │ -std::string &name, const std::string &path, const std::string &extendpath) │ │ │ │ │ -Constructor with a given VTKWriter or SubsamplingVTKWriter. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriter.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ -VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const │ │ │ │ │ -std::string &name) │ │ │ │ │ -Constructor with a given VTKWriter or SubsamplingVTKWriter. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriter.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ -VTKSequenceWriter(const GridView &gridView, const std::string &name, const │ │ │ │ │ -std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK:: │ │ │ │ │ -conforming) │ │ │ │ │ -Constructor creating its own VTKWriter object. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriter.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -Base class to write pvd-files which contains a list of all collected vtk-files. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_v_t_k_W_r_i_t_e_r │ │ │ │ │ -const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ -Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_g_e_n_e_r_a_t_e_F_a_c_e │ │ │ │ │ +static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< │ │ │ │ │ +unsigned int > &element, int f) │ │ │ │ │ +DDeeffiinniittiioonn entitykey_inline.hh:145 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corneriterator.hh File Reference │ │ │ │ +dune-grid: dgfexception.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
corneriterator.hh File Reference
│ │ │ │ +
dgfexception.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iterator>
│ │ │ │ -#include <dune/common/iteratorfacades.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ +
#include <dune/common/exceptions.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::CornerIterator< CellIterator >
 iterate over the corners of some cell range More...
class  Dune::DGFException
 exception class for IO errors in the DGF parser More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,28 +2,22 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -corneriterator.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +dgfexception.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_ _C_e_l_l_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ -  iterate over the corners of some cell range _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +  exception class for IO errors in the DGF parser _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corneriterator.hh Source File │ │ │ │ +dune-grid: dgfexception.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,170 +70,44 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
corneriterator.hh
│ │ │ │ +
dgfexception.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <iterator>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/iteratorfacades.hh>
│ │ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_GRID_DGFEXCEPTION_HH
│ │ │ │ +
6#define DUNE_GRID_DGFEXCEPTION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/common/exceptions.hh>
│ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
15 : public IOError
│ │ │ │ +
16 {};
│ │ │ │ +
│ │ │ │
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
22
│ │ │ │ -
23 namespace VTK {
│ │ │ │ -
24
│ │ │ │ -
26
│ │ │ │ -
30 template<typename CellIterator>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 : public ForwardIteratorFacade
│ │ │ │ -
33 < CornerIterator<CellIterator>,
│ │ │ │ -
34 const Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ -
35 CellIterator>::value_type>::type>,
│ │ │ │ -
36 const Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ -
37 CellIterator>::value_type>::type>&,
│ │ │ │ -
38 typename std::iterator_traits<CellIterator>::difference_type>
│ │ │ │ -
39 {
│ │ │ │ -
40 public:
│ │ │ │ -
41 // reiterate the facades typedefs here
│ │ │ │ - │ │ │ │ -
43 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ -
44 CellIterator>::value_type>::type> Corner;
│ │ │ │ -
45 typedef const Corner Value;
│ │ │ │ -
46 typedef Value& Reference;
│ │ │ │ -
47 typedef typename std::iterator_traits<CellIterator>::difference_type
│ │ │ │ - │ │ │ │ -
49
│ │ │ │ -
50 typedef typename std::iterator_traits<CellIterator>::value_type::Geometry::ctype
│ │ │ │ - │ │ │ │ -
52 static const unsigned dim = std::iterator_traits<CellIterator>::
│ │ │ │ -
53 value_type::mydimension;
│ │ │ │ -
54 typedef ReferenceElements<ctype, dim> Refelems;
│ │ │ │ -
55
│ │ │ │ -
56 private:
│ │ │ │ -
57 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
│ │ │ │ -
58 DifferenceType> Facade;
│ │ │ │ -
59
│ │ │ │ -
60 CellIterator cellit;
│ │ │ │ -
61 CellIterator cellend;
│ │ │ │ -
62 Corner corner;
│ │ │ │ -
63
│ │ │ │ -
64 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 return corner;
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
69 bool isDereferencable() const {
│ │ │ │ -
70 return cellit != cellend;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
73 bool equals(const DerivedType& other) const {
│ │ │ │ -
74 bool mePassedTheEnd = !isDereferencable();
│ │ │ │ -
75 bool otherPassedTheEnd = !other.isDereferencable();
│ │ │ │ -
76 // both are passed the end => return true
│ │ │ │ -
77 if(mePassedTheEnd && otherPassedTheEnd) return true;
│ │ │ │ -
78 // one is passed the end => return false
│ │ │ │ -
79 if(mePassedTheEnd || otherPassedTheEnd) return false;
│ │ │ │ -
80 // none is passed the end, do their iterators and indices match?
│ │ │ │ -
81 return cellit == other.cellit &&
│ │ │ │ -
82 corner.duneIndex() == other.corner.duneIndex();
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
85 void increment() {
│ │ │ │ -
86 int index = corner.vtkIndex();
│ │ │ │ -
87 ++index;
│ │ │ │ -
88 if(index == Refelems::general(cellit->type()).size(dim)) {
│ │ │ │ -
89 ++cellit;
│ │ │ │ -
90 if(cellit != cellend) {
│ │ │ │ -
91 corner.cell(*cellit);
│ │ │ │ -
92 corner.vtkIndex(0);
│ │ │ │ -
93 }
│ │ │ │ -
94 }
│ │ │ │ -
95 else
│ │ │ │ -
96 corner.vtkIndex(index);
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
105 CornerIterator(const CellIterator& cellit_, const CellIterator& cellend_,
│ │ │ │ -
106 unsigned vtkIndex = 0)
│ │ │ │ -
107 : cellit(cellit_), cellend(cellend_)
│ │ │ │ -
108 {
│ │ │ │ -
109 if(cellit != cellend) {
│ │ │ │ -
110 corner.cell(*cellit);
│ │ │ │ -
111 corner.vtkIndex(vtkIndex);
│ │ │ │ -
112 }
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
115
│ │ │ │ -
│ │ │ │ -
118 CornerIterator(const CellIterator& cellend_)
│ │ │ │ -
119 : cellit(cellend_), cellend(cellend_)
│ │ │ │ -
120 { }
│ │ │ │ -
│ │ │ │ -
121 };
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
123 } // namespace VTK
│ │ │ │ -
124
│ │ │ │ -
126
│ │ │ │ -
127} // namespace Dune
│ │ │ │ -
128
│ │ │ │ -
129#endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
│ │ │ │ - │ │ │ │ +
18}
│ │ │ │ +
19
│ │ │ │ +
20#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ -
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition corner.hh:63
│ │ │ │ -
unsigned duneIndex() const
get the index of the corner within the cell in Dune-numbering
Definition corner.hh:55
│ │ │ │ -
const Cell & cell() const
get reference to the cell
Definition corner.hh:46
│ │ │ │ -
iterate over the corners of some cell range
Definition corneriterator.hh:39
│ │ │ │ -
Value & Reference
Definition corneriterator.hh:46
│ │ │ │ -
VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
Definition corneriterator.hh:44
│ │ │ │ -
void increment()
Definition corneriterator.hh:85
│ │ │ │ -
Reference dereference() const
Definition corneriterator.hh:65
│ │ │ │ -
std::iterator_traits< CellIterator >::difference_type DifferenceType
Definition corneriterator.hh:48
│ │ │ │ -
static const unsigned dim
Definition corneriterator.hh:52
│ │ │ │ -
ReferenceElements< ctype, dim > Refelems
Definition corneriterator.hh:54
│ │ │ │ -
const Corner Value
Definition corneriterator.hh:45
│ │ │ │ -
CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_, unsigned vtkIndex=0)
construct a CornerIterator
Definition corneriterator.hh:105
│ │ │ │ -
CornerIterator(const CellIterator &cellend_)
construct a CornerIterator
Definition corneriterator.hh:118
│ │ │ │ -
bool equals(const DerivedType &other) const
Definition corneriterator.hh:73
│ │ │ │ -
CornerIterator< CellIterator > DerivedType
Definition corneriterator.hh:42
│ │ │ │ -
std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype
Definition corneriterator.hh:51
│ │ │ │ -
bool isDereferencable() const
Definition corneriterator.hh:69
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,197 +2,38 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -corneriterator.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfexception.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ +5#ifndef DUNE_GRID_DGFEXCEPTION_HH │ │ │ │ │ +6#define DUNE_GRID_DGFEXCEPTION_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ +12 │ │ │ │ │ +_1_4 class _D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +15 : public IOError │ │ │ │ │ +16 {}; │ │ │ │ │ 17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -22 │ │ │ │ │ -23 namespace VTK { │ │ │ │ │ -24 │ │ │ │ │ -26 │ │ │ │ │ -30 template │ │ │ │ │ -_3_1 class _C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -32 : public ForwardIteratorFacade │ │ │ │ │ -33 < CornerIterator, │ │ │ │ │ -34 const Corner::value_type>::type>, │ │ │ │ │ -36 const Corner::value_type>::type>&, │ │ │ │ │ -38 typename std::iterator_traits::difference_type> │ │ │ │ │ -39 { │ │ │ │ │ -40 public: │ │ │ │ │ -41 // reiterate the facades typedefs here │ │ │ │ │ -_4_2 typedef _C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_> _D_e_r_i_v_e_d_T_y_p_e; │ │ │ │ │ -43 typedef _V_T_K_:_:_C_o_r_n_e_r::value_type>::type> _C_o_r_n_e_r; │ │ │ │ │ -_4_5 typedef const _C_o_r_n_e_r _V_a_l_u_e; │ │ │ │ │ -_4_6 typedef _V_a_l_u_e& _R_e_f_e_r_e_n_c_e; │ │ │ │ │ -47 typedef typename std::iterator_traits::difference_type │ │ │ │ │ -_4_8 _D_i_f_f_e_r_e_n_c_e_T_y_p_e; │ │ │ │ │ -49 │ │ │ │ │ -50 typedef typename std::iterator_traits::value_type::Geometry:: │ │ │ │ │ -ctype │ │ │ │ │ -_5_1 _c_t_y_p_e; │ │ │ │ │ -_5_2 static const unsigned _d_i_m = std::iterator_traits:: │ │ │ │ │ -53 value_type::mydimension; │ │ │ │ │ -_5_4 typedef ReferenceElements _R_e_f_e_l_e_m_s; │ │ │ │ │ -55 │ │ │ │ │ -56 private: │ │ │ │ │ -57 typedef ForwardIteratorFacade<_D_e_r_i_v_e_d_T_y_p_e, _V_a_l_u_e, _R_e_f_e_r_e_n_c_e, │ │ │ │ │ -58 _D_i_f_f_e_r_e_n_c_e_T_y_p_e> Facade; │ │ │ │ │ -59 │ │ │ │ │ -60 CellIterator cellit; │ │ │ │ │ -61 CellIterator cellend; │ │ │ │ │ -62 _C_o_r_n_e_r corner; │ │ │ │ │ -63 │ │ │ │ │ -64 public: │ │ │ │ │ -_6_5 _R_e_f_e_r_e_n_c_e _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -66 return corner; │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_6_9 bool _i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e() const { │ │ │ │ │ -70 return cellit != cellend; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -_7_3 bool _e_q_u_a_l_s(const _D_e_r_i_v_e_d_T_y_p_e& other) const { │ │ │ │ │ -74 bool mePassedTheEnd = !_i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e(); │ │ │ │ │ -75 bool otherPassedTheEnd = !other._i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e(); │ │ │ │ │ -76 // both are passed the end => return true │ │ │ │ │ -77 if(mePassedTheEnd && otherPassedTheEnd) return true; │ │ │ │ │ -78 // one is passed the end => return false │ │ │ │ │ -79 if(mePassedTheEnd || otherPassedTheEnd) return false; │ │ │ │ │ -80 // none is passed the end, do their iterators and indices match? │ │ │ │ │ -81 return cellit == other.cellit && │ │ │ │ │ -82 corner._d_u_n_e_I_n_d_e_x() == other.corner._d_u_n_e_I_n_d_e_x(); │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_5 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -86 int index = corner._v_t_k_I_n_d_e_x(); │ │ │ │ │ -87 ++index; │ │ │ │ │ -88 if(index == Refelems::general(cellit->type()).size(_d_i_m)) { │ │ │ │ │ -89 ++cellit; │ │ │ │ │ -90 if(cellit != cellend) { │ │ │ │ │ -91 corner._c_e_l_l(*cellit); │ │ │ │ │ -92 corner._v_t_k_I_n_d_e_x(0); │ │ │ │ │ -93 } │ │ │ │ │ -94 } │ │ │ │ │ -95 else │ │ │ │ │ -96 corner._v_t_k_I_n_d_e_x(index); │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -100 │ │ │ │ │ -_1_0_5 _C_o_r_n_e_r_I_t_e_r_a_t_o_r(const CellIterator& cellit_, const CellIterator& cellend_, │ │ │ │ │ -106 unsigned vtkIndex = 0) │ │ │ │ │ -107 : cellit(cellit_), cellend(cellend_) │ │ │ │ │ -108 { │ │ │ │ │ -109 if(cellit != cellend) { │ │ │ │ │ -110 corner._c_e_l_l(*cellit); │ │ │ │ │ -111 corner._v_t_k_I_n_d_e_x(vtkIndex); │ │ │ │ │ -112 } │ │ │ │ │ -113 } │ │ │ │ │ -115 │ │ │ │ │ -_1_1_8 _C_o_r_n_e_r_I_t_e_r_a_t_o_r(const CellIterator& cellend_) │ │ │ │ │ -119 : cellit(cellend_), cellend(cellend_) │ │ │ │ │ -120 { } │ │ │ │ │ -121 }; │ │ │ │ │ -122 │ │ │ │ │ -123 } // namespace VTK │ │ │ │ │ -124 │ │ │ │ │ -126 │ │ │ │ │ -127} // namespace Dune │ │ │ │ │ -128 │ │ │ │ │ -129#endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH │ │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ │ +18} │ │ │ │ │ +19 │ │ │ │ │ +20#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ -simple class representing a corner of a cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_v_t_k_I_n_d_e_x │ │ │ │ │ -unsigned vtkIndex() const │ │ │ │ │ -get the index of the corner within the cell in VTK-numbering │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_d_u_n_e_I_n_d_e_x │ │ │ │ │ -unsigned duneIndex() const │ │ │ │ │ -get the index of the corner within the cell in Dune-numbering │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_:_:_c_e_l_l │ │ │ │ │ -const Cell & cell() const │ │ │ │ │ -get reference to the cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -iterate over the corners of some cell range │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_R_e_f_e_r_e_n_c_e │ │ │ │ │ -Value & Reference │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_C_o_r_n_e_r │ │ │ │ │ -VTK::Corner< typename std::remove_const< typename std::iterator_traits< │ │ │ │ │ -CellIterator >::value_type >::type > Corner │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Reference dereference() const │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_D_i_f_f_e_r_e_n_c_e_T_y_p_e │ │ │ │ │ -std::iterator_traits< CellIterator >::difference_type DifferenceType │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_d_i_m │ │ │ │ │ -static const unsigned dim │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_R_e_f_e_l_e_m_s │ │ │ │ │ -ReferenceElements< ctype, dim > Refelems │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ -const Corner Value │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_, │ │ │ │ │ -unsigned vtkIndex=0) │ │ │ │ │ -construct a CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -CornerIterator(const CellIterator &cellend_) │ │ │ │ │ -construct a CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const DerivedType &other) const │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_e_d_T_y_p_e │ │ │ │ │ -CornerIterator< CellIterator > DerivedType │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_c_t_y_p_e │ │ │ │ │ -std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e │ │ │ │ │ -bool isDereferencable() const │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtkwriter.hh File Reference │ │ │ │ +dune-grid: gmsh2dgf.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,95 +65,71 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
vtkwriter.hh File Reference
│ │ │ │ +Functions
│ │ │ │ +
gmsh2dgf.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Provides file i/o for the visualization toolkit. │ │ │ │ +

a small program converting a gmsh file into a DGF file │ │ │ │ More...

│ │ │ │ -
#include <cstring>
│ │ │ │ +
#include <config.h>
│ │ │ │ #include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <iomanip>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <list>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/common/visibility.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/indent.hh>
│ │ │ │ -#include <dune/common/iteratorfacades.hh>
│ │ │ │ -#include <dune/common/path.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/dataarraywriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/function.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/streams.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::VTKWriter< GridView >
 Writer for the ouput of grid functions in the vtk format. More...
 
class  Dune::VTKWriter< GridView >::VTKLocalFunction
 Type erasure wrapper for VTK data sets. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase
 Base class for polymorphic container of underlying data set. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F >
 Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F >
 Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordinates. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper
 Type erasure implementation for legacy VTKFunctions. More...
 
class  Dune::VTKWriter< GridView >::CellIterator
 Iterator over the grids elements. More...
 
class  Dune::VTKWriter< GridView >::VertexIterator
 Iterate over the grid's vertices. More...
 
class  Dune::VTKWriter< GridView >::CornerIterator
 Iterate over the elements' corners. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
│ │ │ │ +

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

int main (int argc, char *argv[])
 
│ │ │ │

Detailed Description

│ │ │ │ -

Provides file i/o for the visualization toolkit.

│ │ │ │ -
Author
Peter Bastian, Christian Engwer
│ │ │ │ -
│ │ │ │ +

a small program converting a gmsh file into a DGF file

│ │ │ │ +
Author
Matrin Nolte
│ │ │ │ +

gmsh2dgf is a small example program for the DGFWriter. It reads a gmsh file into any grid (selected by gridtype.hh) and writes it back as a DGF file.

│ │ │ │ +

The program's usage is as follows:

./gmsh2dgf <gmshfile>
│ │ │ │ +

Function Documentation

│ │ │ │ + │ │ │ │ +

◆ main()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int main (int argc,
char * argv[] 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,79 +2,35 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vtkwriter.hh File Reference │ │ │ │ │ -Provides file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _u_t_i_l_s │ │ │ │ │ +_F_u_n_c_t_i_o_n_s │ │ │ │ │ +gmsh2dgf.cc File Reference │ │ │ │ │ +a small program converting a gmsh file into a DGF file _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  Writer for the ouput of grid functions in the vtk format. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ -  Type erasure wrapper for _V_T_K data sets. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ │ -  Base class for polymorphic container of underlying data set. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_<_ _F_ _> │ │ │ │ │ -  Type erasure implementation for functions conforming to the dune- │ │ │ │ │ - functions LocalFunction interface. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_< │ │ │ │ │ - _F_ _> │ │ │ │ │ -  Type erasure implementation for C++ functions, i.e., functions that │ │ │ │ │ - can be evaluated in global coordinates. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ │ -  Type erasure implementation for legacy VTKFunctions. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ -  Iterator over the grids elements. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ │ -  Iterate over the grid's vertices. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -  Iterate over the elements' corners. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_w_r_i_t_e_r_._h_h> │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +int  _m_a_i_n (int argc, char *argv[]) │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ │ +a small program converting a gmsh file into a DGF file │ │ │ │ │ Author │ │ │ │ │ - Peter Bastian, Christian Engwer │ │ │ │ │ + Matrin Nolte │ │ │ │ │ +gmsh2dgf is a small example program for the DGFWriter. It reads a gmsh file │ │ │ │ │ +into any grid (selected by _g_r_i_d_t_y_p_e_._h_h) and writes it back as a DGF file. │ │ │ │ │ +The program's usage is as follows: │ │ │ │ │ +./gmsh2dgf │ │ │ │ │ +********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? mmaaiinn(()) ********** │ │ │ │ │ +int main ( int  aarrggcc, │ │ │ │ │ + char *  aarrggvv[]  │ │ │ │ │ + ) │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: functionwriter.hh File Reference │ │ │ │ +dune-grid: dgf2dgf.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,71 +65,75 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
functionwriter.hh File Reference
│ │ │ │ +Functions
│ │ │ │ +
dgf2dgf.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <string>
│ │ │ │ -#include <typeinfo>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/dataarraywriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::VTK::FunctionWriterBase< Cell_ >
 Base class for function writers. More...
 
class  Dune::VTK::VTKFunctionWriter< Func >
 Base class for function writers. More...
 
class  Dune::VTK::CoordinatesWriter< Cell >
 writer for the Coordinates array More...
 
class  Dune::VTK::ConformingConnectivityWriter< IteratorFactory >
 writer for the connectivity array in conforming mode More...
 
class  Dune::VTK::NonConformingConnectivityWriter< Cell >
 writer for the connectivity array in nonconforming mode More...
 
class  Dune::VTK::OffsetsWriter< Cell >
 writer for the offsets array More...
 
class  Dune::VTK::TypesWriter< Cell >
 writer for the types array More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +

a small program converting a DGF file into a DGF file │ │ │ │ +More...

│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
│ │ │ │ +

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

int main (int argc, char *argv[])
 
│ │ │ │ +

Detailed Description

│ │ │ │ +

a small program converting a DGF file into a DGF file

│ │ │ │ +
Author
Matrin Nolte
│ │ │ │ +

dgf2dgf is a small example program for the DGFWriter. It reads a DGF file into any grid, optionally refining the grid globally. The leaf grid is then written back as a DGF file.

│ │ │ │ +

The program's usage is as follows:

./dgf2dgf <dgffile> [refinement level]
│ │ │ │ +

While the program may seem completely useless, it has the following usages:

    │ │ │ │ +
  • Convert an interval block into a simplex or cube grid (depending on the grid implementation used).
  • │ │ │ │ +
  • Resolve the simplex generator block into a vertex and a simplex block, so that it can be used without triangle or tetgen.
  • │ │ │ │ +
  • Construct a refined macro grid, which is very useful when setting up parallel computations with dune-ALUGrid.
  • │ │ │ │ +
│ │ │ │ +

The source code of this program also demonstrates the easy use of the DGF parser and the DGFWriter.

│ │ │ │ +

Function Documentation

│ │ │ │ + │ │ │ │ +

◆ main()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int main (int argc,
char * argv[] 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,53 +2,43 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -functionwriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_ _C_e_l_l___ _> │ │ │ │ │ -  Base class for function writers. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_ _F_u_n_c_ _> │ │ │ │ │ -  Base class for function writers. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ -  writer for the Coordinates array _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_ _> │ │ │ │ │ -  writer for the connectivity array in conforming mode _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ -  writer for the connectivity array in nonconforming mode _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ -  writer for the offsets array _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_<_ _C_e_l_l_ _> │ │ │ │ │ -  writer for the types array _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _u_t_i_l_s │ │ │ │ │ +_F_u_n_c_t_i_o_n_s │ │ │ │ │ +dgf2dgf.cc File Reference │ │ │ │ │ +a small program converting a DGF file into a DGF file _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_w_r_i_t_e_r_._h_h> │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +int  _m_a_i_n (int argc, char *argv[]) │ │ │ │ │ +  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +a small program converting a DGF file into a DGF file │ │ │ │ │ + Author │ │ │ │ │ + Matrin Nolte │ │ │ │ │ +dgf2dgf is a small example program for the DGFWriter. It reads a DGF file into │ │ │ │ │ +any grid, optionally refining the grid globally. The leaf grid is then written │ │ │ │ │ +back as a DGF file. │ │ │ │ │ +The program's usage is as follows: │ │ │ │ │ +./dgf2dgf [refinement level] │ │ │ │ │ +While the program may seem completely useless, it has the following usages: │ │ │ │ │ + * Convert an interval block into a simplex or cube grid (depending on the │ │ │ │ │ + grid implementation used). │ │ │ │ │ + * Resolve the simplex generator block into a vertex and a simplex block, so │ │ │ │ │ + that it can be used without triangle or tetgen. │ │ │ │ │ + * Construct a refined macro grid, which is very useful when setting up │ │ │ │ │ + parallel computations with dune-ALUGrid. │ │ │ │ │ +The source code of this program also demonstrates the easy use of the DGF │ │ │ │ │ +parser and the DGFWriter. │ │ │ │ │ +********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ │ +********** _?◆_? mmaaiinn(()) ********** │ │ │ │ │ +int main ( int  aarrggcc, │ │ │ │ │ + char *  aarrggvv[]  │ │ │ │ │ + ) │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basicwriter.hh File Reference │ │ │ │ +dune-grid: entitykey.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basicwriter.hh File Reference
│ │ │ │ +
entitykey.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <iomanip>
│ │ │ │ -#include <iterator>
│ │ │ │ -#include <list>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/common/parallel/mpiguard.hh>
│ │ │ │ -#include <dune/common/path.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ +#include "entitykey_inline.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::BasicWriter< IteratorFactory >
struct  Dune::DGFEntityKey< A >
 
struct  Dune::ElementFaceUtil
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,36 +2,26 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -basicwriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +entitykey.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +#include "_e_n_t_i_t_y_k_e_y___i_n_l_i_n_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_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_<_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basicwriter.hh Source File │ │ │ │ +dune-grid: entitykey.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,496 +70,221 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basicwriter.hh
│ │ │ │ +
entitykey.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <fstream>
│ │ │ │ -
10#include <iomanip>
│ │ │ │ -
11#include <iterator>
│ │ │ │ -
12#include <list>
│ │ │ │ -
13#include <memory>
│ │ │ │ -
14#include <sstream>
│ │ │ │ -
15#include <string>
│ │ │ │ -
16
│ │ │ │ -
17#include <dune/common/parallel/mpiguard.hh>
│ │ │ │ -
18#include <dune/common/path.hh>
│ │ │ │ -
19
│ │ │ │ -
20#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
21
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
5#ifndef DUNE_DGFEnTITYKEY_HH
│ │ │ │ +
6#define DUNE_DGFEnTITYKEY_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 // DGFEntityKey
│ │ │ │ +
17 // ------------
│ │ │ │ +
18
│ │ │ │ +
19 template< class A >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
21 {
│ │ │ │ +
22 DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey = true );
│ │ │ │ +
23 DGFEntityKey ( const std::vector< A > &key,
│ │ │ │ +
24 int N, int offset, bool setOrigKey = true );
│ │ │ │ + │ │ │ │
26
│ │ │ │ -
27namespace Dune
│ │ │ │ -
28{
│ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
│ │ │ │ +
29 inline const A &operator[] ( int i ) const;
│ │ │ │ +
│ │ │ │ +
30 inline bool operator < ( const DGFEntityKey< A > &k ) const;
│ │ │ │
31
│ │ │ │ -
│ │ │ │ -
32 namespace VTK {
│ │ │ │ -
33
│ │ │ │ -
34 template<typename IteratorFactory>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 typedef typename IteratorFactory::CellIterator CellIterator;
│ │ │ │ -
37 typedef typename IteratorFactory::CornerIterator CornerIterator;
│ │ │ │ -
38 typedef typename IteratorFactory::PointIterator PointIterator;
│ │ │ │ -
39
│ │ │ │ -
40 typedef typename IteratorFactory::Cell Cell;
│ │ │ │ -
41
│ │ │ │ -
42 public:
│ │ │ │ - │ │ │ │ +
32 void orientation ( int base, std :: vector< std :: vector< double > > &vtx );
│ │ │ │ +
33 void print( std :: ostream &out = std :: cerr ) const;
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
35 inline bool origKeySet () const;
│ │ │ │ +
│ │ │ │ +
36 inline const A &origKey ( int i ) const;
│ │ │ │ +
│ │ │ │ +
37 inline int size () const;
│ │ │ │ +
38
│ │ │ │ +
39 private:
│ │ │ │ +
40 std :: vector< A > key_, origKey_;
│ │ │ │ +
41 bool origKeySet_;
│ │ │ │ +
42 };
│ │ │ │ +
43
│ │ │ │
44
│ │ │ │ -
45 private:
│ │ │ │ -
46 typedef std::list<std::shared_ptr<FunctionWriter> > WriterList;
│ │ │ │ -
47 typedef typename WriterList::const_iterator WIterator;
│ │ │ │ -
48
│ │ │ │ -
49 typedef typename Cell::Geometry::ctype ctype;
│ │ │ │ -
50 static const unsigned celldim = Cell::mydimension;
│ │ │ │ -
51 typedef ReferenceElements<ctype, celldim> Refelems;
│ │ │ │ -
52
│ │ │ │ -
53 static const FileType fileType = celldim == 1
│ │ │ │ - │ │ │ │ -
55
│ │ │ │ -
56 const IteratorFactory& factory;
│ │ │ │ -
57
│ │ │ │ -
58 WriterList cellData;
│ │ │ │ -
59 WriterList pointData;
│ │ │ │ -
60
│ │ │ │ - │ │ │ │ -
62 typename IteratorFactory::ConnectivityWriter connectivity;
│ │ │ │ -
63 OffsetsWriter<Cell> offsets;
│ │ │ │ - │ │ │ │ +
45 template< class A >
│ │ │ │ +
│ │ │ │ +
46 inline const A &DGFEntityKey< A > :: operator[] ( int i ) const
│ │ │ │ +
47 {
│ │ │ │ +
48 return key_[ i ];
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51
│ │ │ │ +
52 template< class A >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 // assert(k.key_.size()==key_.size());
│ │ │ │ +
56 return key_ < k.key_;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
59
│ │ │ │ +
60 template< class A >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
62 {
│ │ │ │ +
63 return origKeySet_;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │
65
│ │ │ │ -
66 public:
│ │ │ │ -
│ │ │ │ -
67 BasicWriter(const IteratorFactory& factory_)
│ │ │ │ -
68 : factory(factory_), connectivity(factory.makeConnectivity())
│ │ │ │ -
69 { }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
72 //
│ │ │ │ -
73 // Methods for adding data
│ │ │ │ -
74 //
│ │ │ │ -
75
│ │ │ │ -
│ │ │ │ -
76 void addCellData(const std::shared_ptr<FunctionWriter>& writer) {
│ │ │ │ -
77 cellData.push_back(writer);
│ │ │ │ -
78 }
│ │ │ │ +
66
│ │ │ │ +
67 template< class A >
│ │ │ │ +
│ │ │ │ +
68 inline const A &DGFEntityKey< A > :: origKey ( int i ) const
│ │ │ │ +
69 {
│ │ │ │ +
70 return origKey_[ i ];
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73
│ │ │ │ +
74 template< class A >
│ │ │ │ +
│ │ │ │ +
75 inline int DGFEntityKey< A > :: size () const
│ │ │ │ +
76 {
│ │ │ │ +
77 return key_.size();
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │
│ │ │ │
79
│ │ │ │ -
│ │ │ │ -
80 void addPointData(const std::shared_ptr<FunctionWriter>& writer) {
│ │ │ │ -
81 pointData.push_back(writer);
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ -
84 void clear() {
│ │ │ │ -
85 cellData.clear();
│ │ │ │ -
86 pointData.clear();
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
89 protected:
│ │ │ │ -
91 //
│ │ │ │ -
92 // Methods for writing single functions
│ │ │ │ -
93 //
│ │ │ │ -
94
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
96 FunctionWriter& functionWriter,
│ │ │ │ -
97 unsigned ncells) const
│ │ │ │ -
98 {
│ │ │ │ -
99 if(functionWriter.beginWrite(vtuWriter, ncells)) {
│ │ │ │ -
100 const CellIterator& cellend = factory.endCells();
│ │ │ │ -
101 for(CellIterator cellit = factory.beginCells(); cellit != cellend;
│ │ │ │ -
102 ++cellit)
│ │ │ │ -
103 functionWriter.write(*cellit, Refelems::general(cellit->type()).
│ │ │ │ -
104 position(0,0));
│ │ │ │ -
105 }
│ │ │ │ -
106 functionWriter.endWrite();
│ │ │ │ -
107 }
│ │ │ │ -
│ │ │ │ -
108
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
110 FunctionWriter& functionWriter,
│ │ │ │ -
111 unsigned npoints) const
│ │ │ │ -
112 {
│ │ │ │ -
113 if(functionWriter.beginWrite(vtuWriter, npoints)) {
│ │ │ │ -
114 const PointIterator& pend = factory.endPoints();
│ │ │ │ -
115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit)
│ │ │ │ -
116 functionWriter.write(pit->cell(), pit->duneIndex());
│ │ │ │ -
117 }
│ │ │ │ -
118 functionWriter.endWrite();
│ │ │ │ +
80
│ │ │ │ +
81
│ │ │ │ +
82 // ElementFaceUtil
│ │ │ │ +
83 // ---------------
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
86 {
│ │ │ │ +
87 inline static int nofFaces ( int dim, const std::vector< unsigned int > &element );
│ │ │ │ +
88 inline static int faceSize ( int dim, bool simpl );
│ │ │ │ +
89
│ │ │ │ + │ │ │ │ +
91 generateFace ( int dim, const std::vector< unsigned int > &element, int f );
│ │ │ │ +
92
│ │ │ │ +
93 private:
│ │ │ │ +
94 template< int dim >
│ │ │ │ + │ │ │ │ +
96 generateCubeFace( const std::vector< unsigned int > &element, int f );
│ │ │ │ +
97
│ │ │ │ +
98 template< int dim >
│ │ │ │ + │ │ │ │ +
100 generateSimplexFace ( const std::vector< unsigned int > &element, int f );
│ │ │ │ +
101 };
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
104 inline int ElementFaceUtil::nofFaces ( int dim, const std::vector< unsigned int > &element )
│ │ │ │ +
105 {
│ │ │ │ +
106 switch( dim )
│ │ │ │ +
107 {
│ │ │ │ +
108 case 1 :
│ │ │ │ +
109 return 2;
│ │ │ │ +
110 case 2 :
│ │ │ │ +
111 switch( element.size() )
│ │ │ │ +
112 {
│ │ │ │ +
113 case 3 :
│ │ │ │ +
114 return 3;
│ │ │ │ +
115 case 4 :
│ │ │ │ +
116 return 4;
│ │ │ │ +
117 default :
│ │ │ │ +
118 return -1;
│ │ │ │
119 }
│ │ │ │ +
120 case 3 :
│ │ │ │ +
121 switch( element.size() )
│ │ │ │ +
122 {
│ │ │ │ +
123 case 4 :
│ │ │ │ +
124 return 4;
│ │ │ │ +
125 case 8 :
│ │ │ │ +
126 return 6;
│ │ │ │ +
127 default :
│ │ │ │ +
128 return -1;
│ │ │ │ +
129 }
│ │ │ │ +
130 default :
│ │ │ │ +
131 return -1;
│ │ │ │ +
132 }
│ │ │ │ +
133 }
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
135
│ │ │ │ +
│ │ │ │ +
136 inline int ElementFaceUtil::faceSize( int dim, bool simpl )
│ │ │ │ +
137 {
│ │ │ │ +
138 switch( dim )
│ │ │ │ +
139 {
│ │ │ │ +
140 case 1 :
│ │ │ │ +
141 return 1;
│ │ │ │ +
142 case 2 :
│ │ │ │ +
143 return 2;
│ │ │ │ +
144 case 3 :
│ │ │ │ +
145 return (simpl ? 3 : 4);
│ │ │ │ +
146 default :
│ │ │ │ +
147 return -1;
│ │ │ │ +
148 }
│ │ │ │ +
149 }
│ │ │ │ +
│ │ │ │ +
150
│ │ │ │ +
151} //end namespace Dune
│ │ │ │ +
152
│ │ │ │ +
153// inlcude inline implementation
│ │ │ │ +
154#include "entitykey_inline.hh"
│ │ │ │ +
155#endif
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
120
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
122 FunctionWriter& functionWriter,
│ │ │ │ -
123 unsigned ncorners) const
│ │ │ │ -
124 {
│ │ │ │ -
125 if(functionWriter.beginWrite(vtuWriter, ncorners)) {
│ │ │ │ -
126 const CornerIterator& cend = factory.endCorners();
│ │ │ │ -
127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit)
│ │ │ │ -
128 functionWriter.write(cit->cell(), cit->duneIndex());
│ │ │ │ -
129 }
│ │ │ │ -
130 functionWriter.endWrite();
│ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
134 //
│ │ │ │ -
135 // Methods for writing whole sections
│ │ │ │ -
136 //
│ │ │ │ -
137
│ │ │ │ -
│ │ │ │ -
138 static std::string getFirstScalar(const WriterList& data) {
│ │ │ │ -
139 const WIterator& wend = data.end();
│ │ │ │ -
140 for(WIterator wit = data.begin(); wit != wend; ++wit)
│ │ │ │ -
141 if((*wit)->ncomps() == 1)
│ │ │ │ -
142 return (*wit)->name();
│ │ │ │ -
143 return "";
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
│ │ │ │ -
146 static std::string getFirstVector(const WriterList& data) {
│ │ │ │ -
147 const WIterator& wend = data.end();
│ │ │ │ -
148 for(WIterator wit = data.begin(); wit != wend; ++wit)
│ │ │ │ -
149 if((*wit)->ncomps() == 3)
│ │ │ │ -
150 return (*wit)->name();
│ │ │ │ -
151 return "";
│ │ │ │ -
152 }
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
│ │ │ │ -
154 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {
│ │ │ │ -
155 if(cellData.empty()) return;
│ │ │ │ -
156
│ │ │ │ -
157 vtuWriter.beginCellData(getFirstScalar(cellData),
│ │ │ │ -
158 getFirstVector(cellData));
│ │ │ │ -
159 const WIterator& wend = cellData.end();
│ │ │ │ -
160 for(WIterator wit = cellData.begin(); wit != wend; ++wit)
│ │ │ │ -
161 writeCellFunction(vtuWriter, **wit, ncells);
│ │ │ │ -
162 vtuWriter.endCellData();
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
│ │ │ │ -
165 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {
│ │ │ │ -
166 if(pointData.empty()) return;
│ │ │ │ -
167
│ │ │ │ -
168 vtuWriter.beginPointData(getFirstScalar(pointData),
│ │ │ │ -
169 getFirstVector(pointData));
│ │ │ │ -
170 const WIterator& wend = pointData.end();
│ │ │ │ -
171 for(WIterator wit = pointData.begin(); wit != wend; ++wit)
│ │ │ │ -
172 writePointFunction(vtuWriter, **wit, npoints);
│ │ │ │ -
173 vtuWriter.endPointData();
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
│ │ │ │ -
176 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ -
177 unsigned ncorners) {
│ │ │ │ -
178 vtuWriter.beginPoints();
│ │ │ │ -
179 writePointFunction(vtuWriter, coords, npoints);
│ │ │ │ -
180 vtuWriter.endPoints();
│ │ │ │ -
181
│ │ │ │ -
182 vtuWriter.beginCells();
│ │ │ │ -
183 writeCornerFunction(vtuWriter, connectivity, ncorners);
│ │ │ │ -
184 writeCellFunction(vtuWriter, offsets, ncells);
│ │ │ │ -
185 if(fileType != polyData)
│ │ │ │ -
186 writeCellFunction(vtuWriter, types, ncells);
│ │ │ │ -
187 vtuWriter.endCells();
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189
│ │ │ │ -
│ │ │ │ -
190 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ -
191 unsigned ncorners) {
│ │ │ │ -
192 writeCellData(vtuWriter, ncells);
│ │ │ │ -
193 writePointData(vtuWriter, npoints);
│ │ │ │ -
194 writeGrid(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
197 public:
│ │ │ │ -
│ │ │ │ -
198 void writePiece(const std::string& filename, OutputType outputType) {
│ │ │ │ -
199 std::ofstream stream;
│ │ │ │ -
200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
201 std::ios_base::eofbit);
│ │ │ │ -
202 stream.open(filename.c_str(), std::ios::binary);
│ │ │ │ -
203
│ │ │ │ -
204 VTUWriter vtuWriter(stream, outputType, fileType);
│ │ │ │ -
205
│ │ │ │ -
206 unsigned ncells = std::distance(factory.beginCells(),
│ │ │ │ -
207 factory.endCells());
│ │ │ │ -
208 unsigned npoints = std::distance(factory.beginPoints(),
│ │ │ │ -
209 factory.endPoints());
│ │ │ │ -
210 unsigned ncorners = std::distance(factory.beginCorners(),
│ │ │ │ -
211 factory.endCorners());
│ │ │ │ -
212
│ │ │ │ -
213 vtuWriter.beginMain(ncells, npoints);
│ │ │ │ -
214 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ -
215 vtuWriter.endMain();
│ │ │ │ -
216
│ │ │ │ -
217 if(vtuWriter.beginAppended())
│ │ │ │ -
218 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ -
219 vtuWriter.endAppended();
│ │ │ │ -
220
│ │ │ │ -
221 }
│ │ │ │ -
│ │ │ │ -
222
│ │ │ │ -
224
│ │ │ │ -
│ │ │ │ -
240 void writeCollection(const std::string name,
│ │ │ │ -
241 const std::string& piecename,
│ │ │ │ -
242 const std::string& piecepath)
│ │ │ │ -
243 {
│ │ │ │ -
244 std::ofstream stream;
│ │ │ │ -
245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
246 std::ios_base::eofbit);
│ │ │ │ -
247 stream.open(name.c_str(), std::ios::binary);
│ │ │ │ -
248
│ │ │ │ -
249 PVTUWriter writer(stream, fileType);
│ │ │ │ -
250
│ │ │ │ -
251 writer.beginMain();
│ │ │ │ -
252
│ │ │ │ -
253 // PPointData
│ │ │ │ -
254 writer.beginPointData(getFirstScalar(pointData),
│ │ │ │ -
255 getFirstVector(pointData));
│ │ │ │ -
256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)
│ │ │ │ -
257 (*it)->addArray(writer);
│ │ │ │ -
258 writer.endPointData();
│ │ │ │ -
259
│ │ │ │ -
260 // PCellData
│ │ │ │ -
261 writer.beginCellData(getFirstScalar(cellData),
│ │ │ │ -
262 getFirstVector(cellData));
│ │ │ │ -
263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)
│ │ │ │ -
264 (*it)->addArray(writer);
│ │ │ │ -
265 writer.endCellData();
│ │ │ │ -
266
│ │ │ │ -
267 // PPoints
│ │ │ │ -
268 writer.beginPoints();
│ │ │ │ -
269 coords.addArray(writer);
│ │ │ │ -
270 writer.endPoints();
│ │ │ │ -
271
│ │ │ │ -
272 // Pieces
│ │ │ │ -
273 for( int i = 0; i < factory.comm().size(); ++i )
│ │ │ │ -
274 writer.addPiece(getParallelPieceName(piecename, piecepath, i));
│ │ │ │ -
275
│ │ │ │ -
276 writer.endMain();
│ │ │ │ -
277 }
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
280 //
│ │ │ │ -
281 // Filename generators
│ │ │ │ -
282 //
│ │ │ │ -
283
│ │ │ │ -
285
│ │ │ │ -
│ │ │ │ -
295 std::string getParallelPieceName(const std::string& name,
│ │ │ │ -
296 const std::string& path, int rank) const
│ │ │ │ -
297 {
│ │ │ │ -
298 std::ostringstream s;
│ │ │ │ -
299 if(path.size() > 0) {
│ │ │ │ -
300 s << path;
│ │ │ │ -
301 if(path[path.size()-1] != '/')
│ │ │ │ -
302 s << '/';
│ │ │ │ -
303 }
│ │ │ │ -
304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ -
305 << ':';
│ │ │ │ -
306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';
│ │ │ │ -
307 s << name;
│ │ │ │ -
308 switch(fileType) {
│ │ │ │ -
309 case polyData : s << ".vtp"; break;
│ │ │ │ -
310 case unstructuredGrid : s << ".vtu"; break;
│ │ │ │ -
311 }
│ │ │ │ -
312 return s.str();
│ │ │ │ -
313 }
│ │ │ │ -
│ │ │ │ -
314
│ │ │ │ -
316
│ │ │ │ -
│ │ │ │ -
325 std::string getParallelHeaderName(const std::string& name,
│ │ │ │ -
326 const std::string& path) const
│ │ │ │ -
327 {
│ │ │ │ -
328 std::ostringstream s;
│ │ │ │ -
329 if(path.size() > 0) {
│ │ │ │ -
330 s << path;
│ │ │ │ -
331 if(path[path.size()-1] != '/')
│ │ │ │ -
332 s << '/';
│ │ │ │ -
333 }
│ │ │ │ -
334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ -
335 << ':';
│ │ │ │ -
336 s << name;
│ │ │ │ -
337 switch(fileType) {
│ │ │ │ -
338 case polyData : s << ".pvtp"; break;
│ │ │ │ -
339 case unstructuredGrid : s << ".pvtu"; break;
│ │ │ │ -
340 }
│ │ │ │ -
341 return s.str();
│ │ │ │ -
342 }
│ │ │ │ -
│ │ │ │ -
343
│ │ │ │ -
345
│ │ │ │ -
│ │ │ │ -
357 std::string getSerialPieceName(const std::string& name,
│ │ │ │ -
358 const std::string& path) const
│ │ │ │ -
359 {
│ │ │ │ -
360 switch(fileType) {
│ │ │ │ -
361 case polyData : return concatPaths(path, name+".vtp");
│ │ │ │ -
362 case unstructuredGrid : return concatPaths(path, name+".vtu");
│ │ │ │ -
363 }
│ │ │ │ -
364 return concatPaths(path, name); // unknown fileType
│ │ │ │ -
365 }
│ │ │ │ -
│ │ │ │ -
366
│ │ │ │ -
368 //
│ │ │ │ -
369 // User interface functions for writing
│ │ │ │ -
370 //
│ │ │ │ -
371
│ │ │ │ -
373
│ │ │ │ -
│ │ │ │ -
395 std::string pwrite(const std::string& name, const std::string& path,
│ │ │ │ -
396 const std::string& extendpath, OutputType outputType)
│ │ │ │ -
397 {
│ │ │ │ -
398 MPIGuard guard(factory.comm());
│ │ │ │ -
399
│ │ │ │ -
400 // do some magic because paraview can only cope with relative paths to
│ │ │ │ -
401 // piece files
│ │ │ │ -
402 std::ofstream file;
│ │ │ │ -
403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
404 std::ios_base::eofbit);
│ │ │ │ -
405 std::string piecepath = concatPaths(path, extendpath);
│ │ │ │ -
406 std::string relpiecepath = relativePath(path, piecepath);
│ │ │ │ -
407
│ │ │ │ -
408 // write this processes .vtu/.vtp piece file
│ │ │ │ -
409 std::string fullname = getParallelPieceName(name, piecepath,
│ │ │ │ -
410 factory.comm().rank());
│ │ │ │ -
411 writePiece(fullname, outputType);
│ │ │ │ -
412
│ │ │ │ -
413 // if we are rank 0, write .pvtu/.pvtp parallel header
│ │ │ │ -
414 fullname = getParallelHeaderName(name, path);
│ │ │ │ -
415 if(factory.comm().rank() == 0)
│ │ │ │ -
416 writeCollection(fullname, name, relpiecepath);
│ │ │ │ -
417
│ │ │ │ -
418 guard.finalize();
│ │ │ │ -
419
│ │ │ │ -
420 return fullname;
│ │ │ │ -
421 }
│ │ │ │ -
│ │ │ │ -
422
│ │ │ │ -
│ │ │ │ -
436 std::string write(const std::string &name, OutputType outputType)
│ │ │ │ -
437 {
│ │ │ │ -
438 // in the parallel case, just use pwrite, it has all the necessary
│ │ │ │ -
439 // stuff, so we don't need to reimplement it here.
│ │ │ │ -
440 if(factory.comm().size() > 1)
│ │ │ │ -
441 return pwrite(name, "", "", outputType);
│ │ │ │ -
442
│ │ │ │ -
443 // generate filename for process data
│ │ │ │ -
444 std::string pieceName = getSerialPieceName(name, "");
│ │ │ │ -
445
│ │ │ │ -
446 writePiece(pieceName, outputType);
│ │ │ │ -
447
│ │ │ │ -
448 return pieceName;
│ │ │ │ -
449 }
│ │ │ │ -
│ │ │ │ -
450
│ │ │ │ -
451 };
│ │ │ │ -
│ │ │ │ -
452
│ │ │ │ -
453 } // namespace VTK
│ │ │ │ -
│ │ │ │ -
454
│ │ │ │ -
456
│ │ │ │ -
457} // namespace Dune
│ │ │ │ -
458
│ │ │ │ -
459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ - │ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ -
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ -
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ -
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ -
Definition basicwriter.hh:35
│ │ │ │ -
void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const
Definition basicwriter.hh:154
│ │ │ │ -
BasicWriter(const IteratorFactory &factory_)
Definition basicwriter.hh:67
│ │ │ │ -
std::string getSerialPieceName(const std::string &name, const std::string &path) const
return name of a serial piece file
Definition basicwriter.hh:357
│ │ │ │ -
void writeCollection(const std::string name, const std::string &piecename, const std::string &piecepath)
write header file in parallel case to stream
Definition basicwriter.hh:240
│ │ │ │ -
void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:176
│ │ │ │ -
void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:190
│ │ │ │ -
std::string pwrite(const std::string &name, const std::string &path, const std::string &extendpath, OutputType outputType)
write output; interface might change later
Definition basicwriter.hh:395
│ │ │ │ -
void clear()
Definition basicwriter.hh:84
│ │ │ │ -
void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncells) const
Definition basicwriter.hh:95
│ │ │ │ -
void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncorners) const
Definition basicwriter.hh:121
│ │ │ │ -
std::string getParallelHeaderName(const std::string &name, const std::string &path) const
return name of a parallel header file
Definition basicwriter.hh:325
│ │ │ │ -
void writePointData(VTUWriter &vtuWriter, unsigned npoints) const
Definition basicwriter.hh:165
│ │ │ │ -
static std::string getFirstVector(const WriterList &data)
Definition basicwriter.hh:146
│ │ │ │ -
FunctionWriterBase< Cell > FunctionWriter
Definition basicwriter.hh:43
│ │ │ │ -
void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned npoints) const
Definition basicwriter.hh:109
│ │ │ │ -
void writePiece(const std::string &filename, OutputType outputType)
Definition basicwriter.hh:198
│ │ │ │ -
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:76
│ │ │ │ -
static std::string getFirstScalar(const WriterList &data)
Definition basicwriter.hh:138
│ │ │ │ -
std::string getParallelPieceName(const std::string &name, const std::string &path, int rank) const
return name of a parallel piece file
Definition basicwriter.hh:295
│ │ │ │ -
std::string write(const std::string &name, OutputType outputType)
write output (interface might change later)
Definition basicwriter.hh:436
│ │ │ │ -
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ -
Base class for function writers.
Definition functionwriter.hh:34
│ │ │ │ -
virtual void write(const Cell &, const Domain &)
write at the given position
Definition functionwriter.hh:59
│ │ │ │ -
virtual void endWrite()=0
signal end of writing
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
start writing with the given writer
│ │ │ │ -
writer for the Coordinates array
Definition functionwriter.hh:147
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:165
│ │ │ │ -
writer for the offsets array
Definition functionwriter.hh:300
│ │ │ │ -
writer for the types array
Definition functionwriter.hh:340
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ -
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition pvtuwriter.hh:195
│ │ │ │ -
void endCellData()
finish CellData section
Definition pvtuwriter.hh:155
│ │ │ │ -
void beginMain(unsigned ghostLevel=0)
start the main PPolyData/PUnstructuredGrid section
Definition pvtuwriter.hh:189
│ │ │ │ -
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition pvtuwriter.hh:146
│ │ │ │ -
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition pvtuwriter.hh:120
│ │ │ │ -
void addPiece(const std::string &filename)
Add a serial piece to the output file.
Definition pvtuwriter.hh:215
│ │ │ │ -
void endPointData()
finish PointData section
Definition pvtuwriter.hh:129
│ │ │ │ -
void endPoints()
finish section for the point coordinates
Definition pvtuwriter.hh:171
│ │ │ │ -
void beginPoints()
start section for the point coordinates
Definition pvtuwriter.hh:166
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ -
bool beginAppended()
start the appended data section
Definition vtuwriter.hh:345
│ │ │ │ -
void endAppended()
finish the appended data section
Definition vtuwriter.hh:359
│ │ │ │ -
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ -
void beginMain(unsigned ncells, unsigned npoints)
start the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:310
│ │ │ │ -
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ -
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ -
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ -
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ -
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ -
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ -
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │ -
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:320
│ │ │ │ +
Definition entitykey.hh:21
│ │ │ │ +
bool operator<(const DGFEntityKey< A > &k) const
Definition entitykey.hh:53
│ │ │ │ +
DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)
Definition entitykey_inline.hh:64
│ │ │ │ +
bool origKeySet() const
Definition entitykey.hh:61
│ │ │ │ +
int size() const
Definition entitykey.hh:75
│ │ │ │ +
void orientation(int base, std ::vector< std ::vector< double > > &vtx)
Definition entitykey_inline.hh:78
│ │ │ │ +
const A & origKey(int i) const
Definition entitykey.hh:68
│ │ │ │ +
DGFEntityKey(const std::vector< A > &key, int N, int offset, bool setOrigKey=true)
│ │ │ │ +
void print(std ::ostream &out=std ::cerr) const
Definition entitykey_inline.hh:105
│ │ │ │ +
const A & operator[](int i) const
Definition entitykey.hh:46
│ │ │ │ +
Definition entitykey.hh:86
│ │ │ │ +
static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
Definition entitykey_inline.hh:145
│ │ │ │ +
static int faceSize(int dim, bool simpl)
Definition entitykey.hh:136
│ │ │ │ +
static int nofFaces(int dim, const std::vector< unsigned int > &element)
Definition entitykey.hh:104
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,607 +2,218 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -basicwriter.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +entitykey.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include │ │ │ │ │ -18#include │ │ │ │ │ -19 │ │ │ │ │ -20#include │ │ │ │ │ -21 │ │ │ │ │ -22#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -23#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -24#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -25#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +5#ifndef DUNE_DGFEnTITYKEY_HH │ │ │ │ │ +6#define DUNE_DGFEnTITYKEY_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 // DGFEntityKey │ │ │ │ │ +17 // ------------ │ │ │ │ │ +18 │ │ │ │ │ +19 template< class A > │ │ │ │ │ +_2_0 struct _D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ +21 { │ │ │ │ │ +22 _D_G_F_E_n_t_i_t_y_K_e_y ( const std :: vector< A > &key, bool setOrigKey = true ); │ │ │ │ │ +_2_3 _D_G_F_E_n_t_i_t_y_K_e_y ( const std::vector< A > &key, │ │ │ │ │ +24 int N, int offset, bool setOrigKey = true ); │ │ │ │ │ +25 _D_G_F_E_n_t_i_t_y_K_e_y ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ); │ │ │ │ │ 26 │ │ │ │ │ -27namespace _D_u_n_e │ │ │ │ │ -28{ │ │ │ │ │ +27 _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &_o_p_e_r_a_t_o_r_=_ ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ); │ │ │ │ │ +28 │ │ │ │ │ +_2_9 inline const A &_o_p_e_r_a_t_o_r_[_]_ ( int i ) const; │ │ │ │ │ +_3_0 inline bool _o_p_e_r_a_t_o_r_ _<_ ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) const; │ │ │ │ │ 31 │ │ │ │ │ -_3_2 namespace VTK { │ │ │ │ │ -33 │ │ │ │ │ -34 template │ │ │ │ │ -_3_5 class _B_a_s_i_c_W_r_i_t_e_r { │ │ │ │ │ -36 typedef typename IteratorFactory::CellIterator CellIterator; │ │ │ │ │ -37 typedef typename IteratorFactory::CornerIterator CornerIterator; │ │ │ │ │ -38 typedef typename IteratorFactory::PointIterator PointIterator; │ │ │ │ │ -39 │ │ │ │ │ -40 typedef typename IteratorFactory::Cell Cell; │ │ │ │ │ -41 │ │ │ │ │ -42 public: │ │ │ │ │ -_4_3 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _F_u_n_c_t_i_o_n_W_r_i_t_e_r; │ │ │ │ │ +32 void _o_r_i_e_n_t_a_t_i_o_n ( int base, std :: vector< std :: vector< double > > &vtx │ │ │ │ │ +); │ │ │ │ │ +33 void _p_r_i_n_t( std :: ostream &out = std :: cerr ) const; │ │ │ │ │ +34 │ │ │ │ │ +_3_5 inline bool _o_r_i_g_K_e_y_S_e_t () const; │ │ │ │ │ +_3_6 inline const A &_o_r_i_g_K_e_y ( int i ) const; │ │ │ │ │ +_3_7 inline int _s_i_z_e () const; │ │ │ │ │ +38 │ │ │ │ │ +39 private: │ │ │ │ │ +40 std :: vector< A > key_, origKey_; │ │ │ │ │ +41 bool origKeySet_; │ │ │ │ │ +42 }; │ │ │ │ │ +43 │ │ │ │ │ 44 │ │ │ │ │ -45 private: │ │ │ │ │ -46 typedef std::list > WriterList; │ │ │ │ │ -47 typedef typename WriterList::const_iterator WIterator; │ │ │ │ │ -48 │ │ │ │ │ -49 typedef typename Cell::Geometry::ctype ctype; │ │ │ │ │ -50 static const unsigned celldim = Cell::mydimension; │ │ │ │ │ -51 typedef ReferenceElements Refelems; │ │ │ │ │ -52 │ │ │ │ │ -53 static const _F_i_l_e_T_y_p_e fileType = celldim == 1 │ │ │ │ │ -54 ? _p_o_l_y_D_a_t_a : _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d; │ │ │ │ │ -55 │ │ │ │ │ -56 const IteratorFactory& factory; │ │ │ │ │ -57 │ │ │ │ │ -58 WriterList cellData; │ │ │ │ │ -59 WriterList pointData; │ │ │ │ │ -60 │ │ │ │ │ -61 _C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_<_C_e_l_l_> coords; │ │ │ │ │ -62 typename IteratorFactory::ConnectivityWriter connectivity; │ │ │ │ │ -63 _O_f_f_s_e_t_s_W_r_i_t_e_r_<_C_e_l_l_> offsets; │ │ │ │ │ -64 _T_y_p_e_s_W_r_i_t_e_r_<_C_e_l_l_> types; │ │ │ │ │ +45 template< class A > │ │ │ │ │ +_4_6 inline const A &_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_p_e_r_a_t_o_r_[_]_ ( int i ) const │ │ │ │ │ +47 { │ │ │ │ │ +48 return key_[ i ]; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +51 │ │ │ │ │ +52 template< class A > │ │ │ │ │ +_5_3 inline bool _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_p_e_r_a_t_o_r_<_ ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) │ │ │ │ │ +const │ │ │ │ │ +54 { │ │ │ │ │ +55 // assert(k.key_.size()==key_.size()); │ │ │ │ │ +56 return key_ < k.key_; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +59 │ │ │ │ │ +60 template< class A > │ │ │ │ │ +_6_1 inline bool _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_r_i_g_K_e_y_S_e_t () const │ │ │ │ │ +62 { │ │ │ │ │ +63 return origKeySet_; │ │ │ │ │ +64 } │ │ │ │ │ 65 │ │ │ │ │ -66 public: │ │ │ │ │ -_6_7 _B_a_s_i_c_W_r_i_t_e_r(const IteratorFactory& factory_) │ │ │ │ │ -68 : factory(factory_), connectivity(factory.makeConnectivity()) │ │ │ │ │ -69 { } │ │ │ │ │ -70 │ │ │ │ │ -72 // │ │ │ │ │ -73 // Methods for adding data │ │ │ │ │ -74 // │ │ │ │ │ -75 │ │ │ │ │ -_7_6 void _a_d_d_C_e_l_l_D_a_t_a(const std::shared_ptr& writer) { │ │ │ │ │ -77 cellData.push_back(writer); │ │ │ │ │ +66 │ │ │ │ │ +67 template< class A > │ │ │ │ │ +_6_8 inline const A &_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_r_i_g_K_e_y ( int i ) const │ │ │ │ │ +69 { │ │ │ │ │ +70 return origKey_[ i ]; │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +73 │ │ │ │ │ +74 template< class A > │ │ │ │ │ +_7_5 inline int _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _s_i_z_e () const │ │ │ │ │ +76 { │ │ │ │ │ +77 return key_._s_i_z_e(); │ │ │ │ │ 78 } │ │ │ │ │ 79 │ │ │ │ │ -_8_0 void _a_d_d_P_o_i_n_t_D_a_t_a(const std::shared_ptr& writer) { │ │ │ │ │ -81 pointData.push_back(writer); │ │ │ │ │ -82 } │ │ │ │ │ -83 │ │ │ │ │ -_8_4 void _c_l_e_a_r() { │ │ │ │ │ -85 cellData.clear(); │ │ │ │ │ -86 pointData.clear(); │ │ │ │ │ -87 } │ │ │ │ │ -88 │ │ │ │ │ -89 protected: │ │ │ │ │ -91 // │ │ │ │ │ -92 // Methods for writing single functions │ │ │ │ │ -93 // │ │ │ │ │ -94 │ │ │ │ │ -_9_5 void _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(_V_T_U_W_r_i_t_e_r& vtuWriter, │ │ │ │ │ -96 _F_u_n_c_t_i_o_n_W_r_i_t_e_r& functionWriter, │ │ │ │ │ -97 unsigned ncells) const │ │ │ │ │ -98 { │ │ │ │ │ -99 if(functionWriter._b_e_g_i_n_W_r_i_t_e(vtuWriter, ncells)) { │ │ │ │ │ -100 const CellIterator& cellend = factory.endCells(); │ │ │ │ │ -101 for(CellIterator cellit = factory.beginCells(); cellit != cellend; │ │ │ │ │ -102 ++cellit) │ │ │ │ │ -103 functionWriter._w_r_i_t_e(*cellit, Refelems::general(cellit->type()). │ │ │ │ │ -104 position(0,0)); │ │ │ │ │ -105 } │ │ │ │ │ -106 functionWriter._e_n_d_W_r_i_t_e(); │ │ │ │ │ -107 } │ │ │ │ │ -108 │ │ │ │ │ -_1_0_9 void _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(_V_T_U_W_r_i_t_e_r& vtuWriter, │ │ │ │ │ -110 _F_u_n_c_t_i_o_n_W_r_i_t_e_r& functionWriter, │ │ │ │ │ -111 unsigned npoints) const │ │ │ │ │ +80 │ │ │ │ │ +81 │ │ │ │ │ +82 // ElementFaceUtil │ │ │ │ │ +83 // --------------- │ │ │ │ │ +84 │ │ │ │ │ +_8_5 struct _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l │ │ │ │ │ +86 { │ │ │ │ │ +87 inline static int _n_o_f_F_a_c_e_s ( int dim, const std::vector< unsigned int > │ │ │ │ │ +&element ); │ │ │ │ │ +88 inline static int _f_a_c_e_S_i_z_e ( int dim, bool simpl ); │ │ │ │ │ +89 │ │ │ │ │ +90 static _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ +91 _g_e_n_e_r_a_t_e_F_a_c_e ( int dim, const std::vector< unsigned int > &element, int f ); │ │ │ │ │ +92 │ │ │ │ │ +93 private: │ │ │ │ │ +94 template< int dim > │ │ │ │ │ +95 static _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ +96 generateCubeFace( const std::vector< unsigned int > &element, int f ); │ │ │ │ │ +97 │ │ │ │ │ +98 template< int dim > │ │ │ │ │ +99 static _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ +100 generateSimplexFace ( const std::vector< unsigned int > &element, int f ); │ │ │ │ │ +101 }; │ │ │ │ │ +102 │ │ │ │ │ +103 │ │ │ │ │ +_1_0_4 inline int _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_n_o_f_F_a_c_e_s ( int dim, const std::vector< unsigned │ │ │ │ │ +int > &element ) │ │ │ │ │ +105 { │ │ │ │ │ +106 switch( dim ) │ │ │ │ │ +107 { │ │ │ │ │ +108 case 1 : │ │ │ │ │ +109 return 2; │ │ │ │ │ +110 case 2 : │ │ │ │ │ +111 switch( element.size() ) │ │ │ │ │ 112 { │ │ │ │ │ -113 if(functionWriter._b_e_g_i_n_W_r_i_t_e(vtuWriter, npoints)) { │ │ │ │ │ -114 const PointIterator& pend = factory.endPoints(); │ │ │ │ │ -115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit) │ │ │ │ │ -116 functionWriter._w_r_i_t_e(pit->cell(), pit->duneIndex()); │ │ │ │ │ -117 } │ │ │ │ │ -118 functionWriter._e_n_d_W_r_i_t_e(); │ │ │ │ │ +113 case 3 : │ │ │ │ │ +114 return 3; │ │ │ │ │ +115 case 4 : │ │ │ │ │ +116 return 4; │ │ │ │ │ +117 default : │ │ │ │ │ +118 return -1; │ │ │ │ │ 119 } │ │ │ │ │ -120 │ │ │ │ │ -_1_2_1 void _w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n(_V_T_U_W_r_i_t_e_r& vtuWriter, │ │ │ │ │ -122 _F_u_n_c_t_i_o_n_W_r_i_t_e_r& functionWriter, │ │ │ │ │ -123 unsigned ncorners) const │ │ │ │ │ -124 { │ │ │ │ │ -125 if(functionWriter._b_e_g_i_n_W_r_i_t_e(vtuWriter, ncorners)) { │ │ │ │ │ -126 const CornerIterator& cend = factory.endCorners(); │ │ │ │ │ -127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit) │ │ │ │ │ -128 functionWriter._w_r_i_t_e(cit->cell(), cit->duneIndex()); │ │ │ │ │ +120 case 3 : │ │ │ │ │ +121 switch( element.size() ) │ │ │ │ │ +122 { │ │ │ │ │ +123 case 4 : │ │ │ │ │ +124 return 4; │ │ │ │ │ +125 case 8 : │ │ │ │ │ +126 return 6; │ │ │ │ │ +127 default : │ │ │ │ │ +128 return -1; │ │ │ │ │ 129 } │ │ │ │ │ -130 functionWriter._e_n_d_W_r_i_t_e(); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -134 // │ │ │ │ │ -135 // Methods for writing whole sections │ │ │ │ │ -136 // │ │ │ │ │ -137 │ │ │ │ │ -_1_3_8 static std::string _g_e_t_F_i_r_s_t_S_c_a_l_a_r(const WriterList& data) { │ │ │ │ │ -139 const WIterator& wend = data.end(); │ │ │ │ │ -140 for(WIterator wit = data.begin(); wit != wend; ++wit) │ │ │ │ │ -141 if((*wit)->ncomps() == 1) │ │ │ │ │ -142 return (*wit)->name(); │ │ │ │ │ -143 return ""; │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -_1_4_6 static std::string _g_e_t_F_i_r_s_t_V_e_c_t_o_r(const WriterList& data) { │ │ │ │ │ -147 const WIterator& wend = data.end(); │ │ │ │ │ -148 for(WIterator wit = data.begin(); wit != wend; ++wit) │ │ │ │ │ -149 if((*wit)->ncomps() == 3) │ │ │ │ │ -150 return (*wit)->name(); │ │ │ │ │ -151 return ""; │ │ │ │ │ -152 } │ │ │ │ │ -153 │ │ │ │ │ -_1_5_4 void _w_r_i_t_e_C_e_l_l_D_a_t_a(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells) const { │ │ │ │ │ -155 if(cellData.empty()) return; │ │ │ │ │ -156 │ │ │ │ │ -157 vtuWriter._b_e_g_i_n_C_e_l_l_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(cellData), │ │ │ │ │ -158 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ -159 const WIterator& wend = cellData.end(); │ │ │ │ │ -160 for(WIterator wit = cellData.begin(); wit != wend; ++wit) │ │ │ │ │ -161 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, **wit, ncells); │ │ │ │ │ -162 vtuWriter._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -_1_6_5 void _w_r_i_t_e_P_o_i_n_t_D_a_t_a(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned npoints) const { │ │ │ │ │ -166 if(pointData.empty()) return; │ │ │ │ │ -167 │ │ │ │ │ -168 vtuWriter._b_e_g_i_n_P_o_i_n_t_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(pointData), │ │ │ │ │ -169 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ -170 const WIterator& wend = pointData.end(); │ │ │ │ │ -171 for(WIterator wit = pointData.begin(); wit != wend; ++wit) │ │ │ │ │ -172 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, **wit, npoints); │ │ │ │ │ -173 vtuWriter._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -_1_7_6 void _w_r_i_t_e_G_r_i_d(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ -177 unsigned ncorners) { │ │ │ │ │ -178 vtuWriter._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ -179 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, coords, npoints); │ │ │ │ │ -180 vtuWriter._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ -181 │ │ │ │ │ -182 vtuWriter._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ -183 _w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n(vtuWriter, connectivity, ncorners); │ │ │ │ │ -184 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, offsets, ncells); │ │ │ │ │ -185 if(fileType != _p_o_l_y_D_a_t_a) │ │ │ │ │ -186 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, types, ncells); │ │ │ │ │ -187 vtuWriter._e_n_d_C_e_l_l_s(); │ │ │ │ │ -188 } │ │ │ │ │ -189 │ │ │ │ │ -_1_9_0 void _w_r_i_t_e_A_l_l(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ -191 unsigned ncorners) { │ │ │ │ │ -192 _w_r_i_t_e_C_e_l_l_D_a_t_a(vtuWriter, ncells); │ │ │ │ │ -193 _w_r_i_t_e_P_o_i_n_t_D_a_t_a(vtuWriter, npoints); │ │ │ │ │ -194 _w_r_i_t_e_G_r_i_d(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -197 public: │ │ │ │ │ -_1_9_8 void _w_r_i_t_e_P_i_e_c_e(const std::string& filename, _O_u_t_p_u_t_T_y_p_e outputType) { │ │ │ │ │ -199 std::ofstream stream; │ │ │ │ │ -200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -201 std::ios_base::eofbit); │ │ │ │ │ -202 stream.open(filename.c_str(), std::ios::binary); │ │ │ │ │ -203 │ │ │ │ │ -204 _V_T_U_W_r_i_t_e_r vtuWriter(stream, outputType, fileType); │ │ │ │ │ -205 │ │ │ │ │ -206 unsigned ncells = std::distance(factory.beginCells(), │ │ │ │ │ -207 factory.endCells()); │ │ │ │ │ -208 unsigned npoints = std::distance(factory.beginPoints(), │ │ │ │ │ -209 factory.endPoints()); │ │ │ │ │ -210 unsigned ncorners = std::distance(factory.beginCorners(), │ │ │ │ │ -211 factory.endCorners()); │ │ │ │ │ -212 │ │ │ │ │ -213 vtuWriter._b_e_g_i_n_M_a_i_n(ncells, npoints); │ │ │ │ │ -214 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ -215 vtuWriter._e_n_d_M_a_i_n(); │ │ │ │ │ -216 │ │ │ │ │ -217 if(vtuWriter._b_e_g_i_n_A_p_p_e_n_d_e_d()) │ │ │ │ │ -218 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ -219 vtuWriter._e_n_d_A_p_p_e_n_d_e_d(); │ │ │ │ │ -220 │ │ │ │ │ -221 } │ │ │ │ │ -222 │ │ │ │ │ -224 │ │ │ │ │ -_2_4_0 void _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(const std::string name, │ │ │ │ │ -241 const std::string& piecename, │ │ │ │ │ -242 const std::string& piecepath) │ │ │ │ │ -243 { │ │ │ │ │ -244 std::ofstream stream; │ │ │ │ │ -245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -246 std::ios_base::eofbit); │ │ │ │ │ -247 stream.open(name.c_str(), std::ios::binary); │ │ │ │ │ -248 │ │ │ │ │ -249 _P_V_T_U_W_r_i_t_e_r writer(stream, fileType); │ │ │ │ │ -250 │ │ │ │ │ -251 writer._b_e_g_i_n_M_a_i_n(); │ │ │ │ │ -252 │ │ │ │ │ -253 // PPointData │ │ │ │ │ -254 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(pointData), │ │ │ │ │ -255 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ -256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it) │ │ │ │ │ -257 (*it)->addArray(writer); │ │ │ │ │ -258 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ -259 │ │ │ │ │ -260 // PCellData │ │ │ │ │ -261 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(cellData), │ │ │ │ │ -262 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ -263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it) │ │ │ │ │ -264 (*it)->addArray(writer); │ │ │ │ │ -265 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ -266 │ │ │ │ │ -267 // PPoints │ │ │ │ │ -268 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ -269 coords._a_d_d_A_r_r_a_y(writer); │ │ │ │ │ -270 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ -271 │ │ │ │ │ -272 // Pieces │ │ │ │ │ -273 for( int i = 0; i < factory.comm().size(); ++i ) │ │ │ │ │ -274 writer._a_d_d_P_i_e_c_e(_g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(piecename, piecepath, i)); │ │ │ │ │ -275 │ │ │ │ │ -276 writer._e_n_d_M_a_i_n(); │ │ │ │ │ -277 } │ │ │ │ │ -278 │ │ │ │ │ -280 // │ │ │ │ │ -281 // Filename generators │ │ │ │ │ -282 // │ │ │ │ │ -283 │ │ │ │ │ -285 │ │ │ │ │ -_2_9_5 std::string _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ -296 const std::string& path, int rank) const │ │ │ │ │ -297 { │ │ │ │ │ -298 std::ostringstream s; │ │ │ │ │ -299 if(path.size() > 0) { │ │ │ │ │ -300 s << path; │ │ │ │ │ -301 if(path[path.size()-1] != '/') │ │ │ │ │ -302 s << '/'; │ │ │ │ │ -303 } │ │ │ │ │ -304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ -305 << ':'; │ │ │ │ │ -306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':'; │ │ │ │ │ -307 s << name; │ │ │ │ │ -308 switch(fileType) { │ │ │ │ │ -309 case _p_o_l_y_D_a_t_a : s << ".vtp"; break; │ │ │ │ │ -310 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".vtu"; break; │ │ │ │ │ -311 } │ │ │ │ │ -312 return s.str(); │ │ │ │ │ -313 } │ │ │ │ │ -314 │ │ │ │ │ -316 │ │ │ │ │ -_3_2_5 std::string _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(const std::string& name, │ │ │ │ │ -326 const std::string& path) const │ │ │ │ │ -327 { │ │ │ │ │ -328 std::ostringstream s; │ │ │ │ │ -329 if(path.size() > 0) { │ │ │ │ │ -330 s << path; │ │ │ │ │ -331 if(path[path.size()-1] != '/') │ │ │ │ │ -332 s << '/'; │ │ │ │ │ -333 } │ │ │ │ │ -334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ -335 << ':'; │ │ │ │ │ -336 s << name; │ │ │ │ │ -337 switch(fileType) { │ │ │ │ │ -338 case _p_o_l_y_D_a_t_a : s << ".pvtp"; break; │ │ │ │ │ -339 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".pvtu"; break; │ │ │ │ │ -340 } │ │ │ │ │ -341 return s.str(); │ │ │ │ │ -342 } │ │ │ │ │ -343 │ │ │ │ │ -345 │ │ │ │ │ -_3_5_7 std::string _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ -358 const std::string& path) const │ │ │ │ │ -359 { │ │ │ │ │ -360 switch(fileType) { │ │ │ │ │ -361 case _p_o_l_y_D_a_t_a : return concatPaths(path, name+".vtp"); │ │ │ │ │ -362 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : return concatPaths(path, name+".vtu"); │ │ │ │ │ -363 } │ │ │ │ │ -364 return concatPaths(path, name); // unknown fileType │ │ │ │ │ -365 } │ │ │ │ │ -366 │ │ │ │ │ -368 // │ │ │ │ │ -369 // User interface functions for writing │ │ │ │ │ -370 // │ │ │ │ │ -371 │ │ │ │ │ -373 │ │ │ │ │ -_3_9_5 std::string _p_w_r_i_t_e(const std::string& name, const std::string& path, │ │ │ │ │ -396 const std::string& extendpath, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ -397 { │ │ │ │ │ -398 MPIGuard guard(factory.comm()); │ │ │ │ │ -399 │ │ │ │ │ -400 // do some magic because paraview can only cope with relative paths to │ │ │ │ │ -401 // piece files │ │ │ │ │ -402 std::ofstream file; │ │ │ │ │ -403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -404 std::ios_base::eofbit); │ │ │ │ │ -405 std::string piecepath = concatPaths(path, extendpath); │ │ │ │ │ -406 std::string relpiecepath = relativePath(path, piecepath); │ │ │ │ │ -407 │ │ │ │ │ -408 // write this processes .vtu/.vtp piece file │ │ │ │ │ -409 std::string fullname = _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(name, piecepath, │ │ │ │ │ -410 factory.comm().rank()); │ │ │ │ │ -411 _w_r_i_t_e_P_i_e_c_e(fullname, outputType); │ │ │ │ │ -412 │ │ │ │ │ -413 // if we are rank 0, write .pvtu/.pvtp parallel header │ │ │ │ │ -414 fullname = _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(name, path); │ │ │ │ │ -415 if(factory.comm().rank() == 0) │ │ │ │ │ -416 _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(fullname, name, relpiecepath); │ │ │ │ │ -417 │ │ │ │ │ -418 guard.finalize(); │ │ │ │ │ -419 │ │ │ │ │ -420 return fullname; │ │ │ │ │ -421 } │ │ │ │ │ -422 │ │ │ │ │ -_4_3_6 std::string _w_r_i_t_e(const std::string &name, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ -437 { │ │ │ │ │ -438 // in the parallel case, just use pwrite, it has all the necessary │ │ │ │ │ -439 // stuff, so we don't need to reimplement it here. │ │ │ │ │ -440 if(factory.comm().size() > 1) │ │ │ │ │ -441 return _p_w_r_i_t_e(name, "", "", outputType); │ │ │ │ │ -442 │ │ │ │ │ -443 // generate filename for process data │ │ │ │ │ -444 std::string pieceName = _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(name, ""); │ │ │ │ │ -445 │ │ │ │ │ -446 _w_r_i_t_e_P_i_e_c_e(pieceName, outputType); │ │ │ │ │ -447 │ │ │ │ │ -448 return pieceName; │ │ │ │ │ -449 } │ │ │ │ │ -450 │ │ │ │ │ -451 }; │ │ │ │ │ -452 │ │ │ │ │ -453 } // namespace VTK │ │ │ │ │ -454 │ │ │ │ │ -456 │ │ │ │ │ -457} // namespace Dune │ │ │ │ │ -458 │ │ │ │ │ -459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ -_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ -_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +130 default : │ │ │ │ │ +131 return -1; │ │ │ │ │ +132 } │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +135 │ │ │ │ │ +_1_3_6 inline int _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_f_a_c_e_S_i_z_e( int dim, bool simpl ) │ │ │ │ │ +137 { │ │ │ │ │ +138 switch( dim ) │ │ │ │ │ +139 { │ │ │ │ │ +140 case 1 : │ │ │ │ │ +141 return 1; │ │ │ │ │ +142 case 2 : │ │ │ │ │ +143 return 2; │ │ │ │ │ +144 case 3 : │ │ │ │ │ +145 return (simpl ? 3 : 4); │ │ │ │ │ +146 default : │ │ │ │ │ +147 return -1; │ │ │ │ │ +148 } │ │ │ │ │ +149 } │ │ │ │ │ +150 │ │ │ │ │ +151} //end namespace Dune │ │ │ │ │ +152 │ │ │ │ │ +153// inlcude inline implementation │ │ │ │ │ +154#include "_e_n_t_i_t_y_k_e_y___i_n_l_i_n_e_._h_h" │ │ │ │ │ +155#endif │ │ │ │ │ +_e_n_t_i_t_y_k_e_y___i_n_l_i_n_e_._h_h │ │ │ │ │ +_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ -OutputType │ │ │ │ │ -How the bulk data should be stored in the file. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ -FileType │ │ │ │ │ -which type of VTK file to write │ │ │ │ │ -DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ -@ polyData │ │ │ │ │ -for .vtp files (PolyData) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ -@ unstructuredGrid │ │ │ │ │ -for .vtu files (UnstructuredGrid) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a │ │ │ │ │ -void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ -BasicWriter(const IteratorFactory &factory_) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e │ │ │ │ │ -std::string getSerialPieceName(const std::string &name, const std::string │ │ │ │ │ -&path) const │ │ │ │ │ -return name of a serial piece file │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:357 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_o_l_l_e_c_t_i_o_n │ │ │ │ │ -void writeCollection(const std::string name, const std::string &piecename, │ │ │ │ │ -const std::string &piecepath) │ │ │ │ │ -write header file in parallel case to stream │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d │ │ │ │ │ -void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ -unsigned ncorners) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:176 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_A_l_l │ │ │ │ │ -void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned │ │ │ │ │ -ncorners) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:190 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_p_w_r_i_t_e │ │ │ │ │ -std::string pwrite(const std::string &name, const std::string &path, const │ │ │ │ │ -std::string &extendpath, OutputType outputType) │ │ │ │ │ -write output; interface might change later │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:395 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_c_l_e_a_r │ │ │ │ │ -void clear() │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n │ │ │ │ │ -void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, │ │ │ │ │ -unsigned ncells) const │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n │ │ │ │ │ -void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, │ │ │ │ │ -unsigned ncorners) const │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e │ │ │ │ │ -std::string getParallelHeaderName(const std::string &name, const std::string │ │ │ │ │ -&path) const │ │ │ │ │ -return name of a parallel header file │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:325 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void writePointData(VTUWriter &vtuWriter, unsigned npoints) const │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_F_i_r_s_t_V_e_c_t_o_r │ │ │ │ │ -static std::string getFirstVector(const WriterList &data) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -FunctionWriterBase< Cell > FunctionWriter │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n │ │ │ │ │ -void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, │ │ │ │ │ -unsigned npoints) const │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_P_i_e_c_e │ │ │ │ │ -void writePiece(const std::string &filename, OutputType outputType) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:198 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_F_i_r_s_t_S_c_a_l_a_r │ │ │ │ │ -static std::string getFirstScalar(const WriterList &data) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e │ │ │ │ │ -std::string getParallelPieceName(const std::string &name, const std::string │ │ │ │ │ -&path, int rank) const │ │ │ │ │ -return name of a parallel piece file │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:295 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -std::string write(const std::string &name, OutputType outputType) │ │ │ │ │ -write output (interface might change later) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:436 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -Base class for function writers. │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const Cell &, const Domain &) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite()=0 │ │ │ │ │ -signal end of writing │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0 │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ -writer for the Coordinates array │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ │ -writer for the offsets array │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:300 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r │ │ │ │ │ -writer for the types array │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:340 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ -void endMain() │ │ │ │ │ -finish the main PolyData/UnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void endCellData() │ │ │ │ │ -finish CellData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ -void beginMain(unsigned ghostLevel=0) │ │ │ │ │ -start the main PPolyData/PUnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ -void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start CellData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start PointData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:120 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_P_i_e_c_e │ │ │ │ │ -void addPiece(const std::string &filename) │ │ │ │ │ -Add a serial piece to the output file. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:215 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void endPointData() │ │ │ │ │ -finish PointData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -void endPoints() │ │ │ │ │ -finish section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -void beginPoints() │ │ │ │ │ -start section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ -bool beginAppended() │ │ │ │ │ -start the appended data section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:345 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_A_p_p_e_n_d_e_d │ │ │ │ │ -void endAppended() │ │ │ │ │ -finish the appended data section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:359 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void endCellData() │ │ │ │ │ -finish CellData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ -void beginMain(unsigned ncells, unsigned npoints) │ │ │ │ │ -start the main PolyData/UnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:310 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ -void beginCells() │ │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void endPointData() │ │ │ │ │ -finish PointData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ -void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start CellData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start PointData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -void endPoints() │ │ │ │ │ -finish section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ -void endCells() │ │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -void beginPoints() │ │ │ │ │ -start section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ -void endMain() │ │ │ │ │ -finish the main PolyData/UnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:320 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ +bool operator<(const DGFEntityKey< A > &k) const │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k) │ │ │ │ │ +DDeeffiinniittiioonn entitykey_inline.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_r_i_g_K_e_y_S_e_t │ │ │ │ │ +bool origKeySet() const │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_s_i_z_e │ │ │ │ │ +int size() const │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ +void orientation(int base, std ::vector< std ::vector< double > > &vtx) │ │ │ │ │ +DDeeffiinniittiioonn entitykey_inline.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_r_i_g_K_e_y │ │ │ │ │ +const A & origKey(int i) const │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ +DGFEntityKey(const std::vector< A > &key, int N, int offset, bool │ │ │ │ │ +setOrigKey=true) │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_p_r_i_n_t │ │ │ │ │ +void print(std ::ostream &out=std ::cerr) const │ │ │ │ │ +DDeeffiinniittiioonn entitykey_inline.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const A & operator[](int i) const │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_g_e_n_e_r_a_t_e_F_a_c_e │ │ │ │ │ +static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< │ │ │ │ │ +unsigned int > &element, int f) │ │ │ │ │ +DDeeffiinniittiioonn entitykey_inline.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_f_a_c_e_S_i_z_e │ │ │ │ │ +static int faceSize(int dim, bool simpl) │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_n_o_f_F_a_c_e_s │ │ │ │ │ +static int nofFaces(int dim, const std::vector< unsigned int > &element) │ │ │ │ │ +DDeeffiinniittiioonn entitykey.hh:104 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: skeletonfunction.hh File Reference │ │ │ │ +dune-grid: dgfwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,59 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
skeletonfunction.hh File Reference
│ │ │ │ +
dgfwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Functions for VTK output on the skeleton. │ │ │ │ +

write a GridView to a DGF file │ │ │ │ More...

│ │ │ │ -
#include <memory>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <algorithm>
│ │ │ │ +#include <fstream>
│ │ │ │ #include <string>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <utility>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ │ +#include <dune/common/rangeutilities.hh>
│ │ │ │ +#include <dune/common/typeutilities.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ │ +#include <dune/grid/common/rangegenerators.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::VTK::SkeletonFunctionTraits< GV, RF >
 
class  Dune::VTK::SkeletonFunctionInterface< GV, RF >
 A prototype for VTKFunctions on the skeleton. More...
 
class  Dune::VTK::SkeletonFunctionWriter< Func >
 function writer for skeleton functions More...
class  Dune::DGFWriter< GV >
 write a GridView to a DGF file More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │

Detailed Description

│ │ │ │ -

Functions for VTK output on the skeleton.

│ │ │ │ -
Author
Jö Fahlke
│ │ │ │ +

write a GridView to a DGF file

│ │ │ │ +
Author
Martin Nolte
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,41 +2,40 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -skeletonfunction.hh File Reference │ │ │ │ │ -_d_u_n_e_-_g_r_i_d » _I_/_O » _V_i_s_u_a_l_i_z_a_t_i_o_n_ _T_o_o_l_K_i_t_ _(_V_T_K_) │ │ │ │ │ -Functions for VTK output on the skeleton. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ +dgfwriter.hh File Reference │ │ │ │ │ +write a GridView to a DGF file _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_<_ _G_V_,_ _R_F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _G_V_,_ _R_F_ _> │ │ │ │ │ -  A prototype for VTKFunctions on the skeleton. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_ _F_u_n_c_ _> │ │ │ │ │ -  function writer for skeleton functions _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_<_ _G_V_ _> │ │ │ │ │ +  write a _G_r_i_d_V_i_e_w to a DGF file _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Functions for VTK output on the skeleton. │ │ │ │ │ +write a GridView to a DGF file │ │ │ │ │ Author │ │ │ │ │ - Jö Fahlke │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: skeletonfunction.hh Source File │ │ │ │ +dune-grid: dgfwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,189 +70,466 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
skeletonfunction.hh
│ │ │ │ +
dgfwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <memory>
│ │ │ │ -
10#include <string>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19namespace Dune {
│ │ │ │ -
20
│ │ │ │ -
23
│ │ │ │ -
29 namespace VTK {
│ │ │ │ -
30
│ │ │ │ -
32 //
│ │ │ │ -
33 // Prototype for VTKFunktions on the skeleton
│ │ │ │ -
34 //
│ │ │ │ -
35
│ │ │ │ -
36 template<typename GV, typename RF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 typedef GV GridView;
│ │ │ │ -
39 typedef typename GV::Intersection Cell;
│ │ │ │ -
40
│ │ │ │ -
41 typedef typename GV::ctype DomainField;
│ │ │ │ -
42 static const unsigned dimDomain = GV::dimension-1;
│ │ │ │ -
43 typedef FieldVector<DomainField, dimDomain> Domain;
│ │ │ │ -
44
│ │ │ │ -
45 typedef RF RangeField;
│ │ │ │ -
46 typedef std::vector<RangeField> Range;
│ │ │ │ -
47 };
│ │ │ │ -
│ │ │ │ +
5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ +
6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ +
7
│ │ │ │ +
13#include <cassert>
│ │ │ │ +
14#include <cstddef>
│ │ │ │ +
15
│ │ │ │ +
16#include <algorithm>
│ │ │ │ +
17#include <fstream>
│ │ │ │ +
18#include <string>
│ │ │ │ +
19#include <type_traits>
│ │ │ │ +
20#include <utility>
│ │ │ │ +
21#include <vector>
│ │ │ │ +
22
│ │ │ │ +
23#include <dune/common/rangeutilities.hh>
│ │ │ │ +
24#include <dune/common/typeutilities.hh>
│ │ │ │ +
25
│ │ │ │ +
26#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
27#include <dune/geometry/type.hh>
│ │ │ │ +
28
│ │ │ │ + │ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
32namespace Dune
│ │ │ │ +
33{
│ │ │ │ +
34
│ │ │ │ +
44 template< class GV >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 {
│ │ │ │ +
47 typedef DGFWriter< GV > This;
│ │ │ │
48
│ │ │ │ -
50 template <typename GV, typename RF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 public:
│ │ │ │ - │ │ │ │ +
49 public:
│ │ │ │ +
51 typedef GV GridView;
│ │ │ │ +
53 typedef typename GridView::Grid Grid;
│ │ │ │
54
│ │ │ │ -
56 unsigned dimRange() const;
│ │ │ │ +
56 static const int dimGrid = GridView::dimension;
│ │ │ │
57
│ │ │ │ -
59
│ │ │ │ -
65 void evaluate(const typename Traits::Cell& c,
│ │ │ │ -
66 const typename Traits::Domain& xl,
│ │ │ │ -
67 typename Traits::Range& result) const;
│ │ │ │ -
68 };
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
71 //
│ │ │ │ -
72 // Class for writing SkeletonFunctions
│ │ │ │ -
73 //
│ │ │ │ -
74
│ │ │ │ -
76
│ │ │ │ -
80 template<typename Func>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
82 : public FunctionWriterBase<typename Func::Traits::Cell>
│ │ │ │ -
83 {
│ │ │ │ -
84 typedef typename Func::Traits::RangeField RF;
│ │ │ │ -
85
│ │ │ │ -
86 std::shared_ptr<const Func> func;
│ │ │ │ -
87 std::string name_;
│ │ │ │ -
88 unsigned dimR;
│ │ │ │ -
89 VTK::Precision precision_;
│ │ │ │ -
90 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ -
91
│ │ │ │ -
92 public:
│ │ │ │ -
│ │ │ │ -
93 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ │ -
94 const std::string& name, unsigned dimR_,
│ │ │ │ - │ │ │ │ -
96 : func(func_), name_(name), dimR(dimR_), precision_(prec)
│ │ │ │ -
97 { }
│ │ │ │ -
│ │ │ │ +
58 private:
│ │ │ │ +
59 typedef typename GridView::IndexSet IndexSet;
│ │ │ │ +
60 typedef typename GridView::template Codim< 0 >::Entity Element;
│ │ │ │ +
61 typedef typename GridView::Intersection Intersection;
│ │ │ │ +
62
│ │ │ │ +
63 typedef typename Element::EntitySeed ElementSeed;
│ │ │ │ +
64
│ │ │ │ +
65 typedef typename IndexSet::IndexType Index;
│ │ │ │ +
66
│ │ │ │ +
67 public:
│ │ │ │ +
│ │ │ │ +
72 DGFWriter ( const GridView &gridView )
│ │ │ │ +
73 : gridView_( gridView )
│ │ │ │ +
74 {}
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
85 template< class BoundaryData >
│ │ │ │ +
86 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
│ │ │ │ +
87
│ │ │ │ +
96 template< class BoundaryData >
│ │ │ │ +
97 void write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
│ │ │ │
98
│ │ │ │ -
│ │ │ │ -
99 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ │ -
100 const std::string& name,
│ │ │ │ - │ │ │ │ -
102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)
│ │ │ │ -
103 { }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
106 virtual std::string name() const { return name_; }
│ │ │ │ -
107
│ │ │ │ -
109 virtual unsigned ncomps() const { return dimR; }
│ │ │ │ -
110
│ │ │ │ -
│ │ │ │ -
112 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
113 writer.addArray(name(), ncomps(), precision_);
│ │ │ │ -
114 }
│ │ │ │ -
│ │ │ │ -
115
│ │ │ │ -
│ │ │ │ -
117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ -
119 nitems, precision_));
│ │ │ │ -
120 return !arraywriter->writeIsNoop();
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
│ │ │ │ -
124 virtual void write(const typename Func::Traits::Cell& cell,
│ │ │ │ -
125 const typename Func::Traits::Domain& xl) {
│ │ │ │ -
126 typename Func::Traits::Range result;
│ │ │ │ -
127 func->evaluate(cell, xl, result);
│ │ │ │ -
128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)
│ │ │ │ -
129 arraywriter->write(result[d]);
│ │ │ │ -
130 for(unsigned d = result.size(); d < dimR; ++d)
│ │ │ │ -
131 arraywriter->write(0);
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
133
│ │ │ │ -
│ │ │ │ -
135 virtual void endWrite() {
│ │ │ │ -
136 arraywriter.reset();
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138 };
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
140 } // namespace VTK
│ │ │ │ -
141
│ │ │ │ -
143
│ │ │ │ -
144} // namespace Dune
│ │ │ │ -
145
│ │ │ │ -
146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
107 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams = std::stringstream() ) const
│ │ │ │ +
108 {
│ │ │ │ +
109 write( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
│ │ │ │ +
119 void write ( std::ostream &gridout, const std::stringstream &addParams = std::stringstream() ) const
│ │ │ │ +
120 {
│ │ │ │ +
121 write( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
│ │ │ │ +
122 }
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
130 template< class... Args >
│ │ │ │ +
│ │ │ │ +
131 auto write ( const std::string &fileName, Args &&... args ) const
│ │ │ │ +
132 -> std::void_t< decltype( this->write( std::declval< std::ostream & >(), std::declval< Args >()... ) ) >
│ │ │ │ +
133 {
│ │ │ │ +
134 std::ofstream gridout( fileName );
│ │ │ │ +
135 if( gridout )
│ │ │ │ +
136 write( gridout, std::forward< Args >( args )... );
│ │ │ │ +
137 else
│ │ │ │ +
138 std::cerr << "Couldn't open file `"<< fileName << "'!"<< std::endl;
│ │ │ │ +
139 }
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │ +
141 protected:
│ │ │ │ +
142 auto elementsSeeds ( const std::vector< Index > &newElemOrder ) const
│ │ │ │ +
143 -> std::vector< ElementSeed >;
│ │ │ │ +
144
│ │ │ │ +
145 void writeHeader ( std::ostream &gridout ) const;
│ │ │ │ +
146 void writeFooter ( std::ostream &gridout ) const;
│ │ │ │ +
147
│ │ │ │ +
148 auto writeVertices ( std::ostream &gridout ) const
│ │ │ │ +
149 -> std::vector< Index >;
│ │ │ │ +
150
│ │ │ │ +
151 void writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const;
│ │ │ │ +
152
│ │ │ │ +
153 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
│ │ │ │ +
154 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
│ │ │ │ +
155
│ │ │ │ +
156 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
│ │ │ │ +
157 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
│ │ │ │ +
158
│ │ │ │ +
159 template< class... Args >
│ │ │ │ +
160 void writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const;
│ │ │ │ +
161
│ │ │ │ +
162 private:
│ │ │ │ +
163 template< class I >
│ │ │ │ +
164 static auto boundaryId ( const I &i, PriorityTag< 1 > )
│ │ │ │ +
165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl().boundaryId() ) >, int >::value, int >
│ │ │ │ +
166 {
│ │ │ │ +
167 return i.impl().boundaryId();
│ │ │ │ +
168 }
│ │ │ │ +
169
│ │ │ │ +
170 template< class I >
│ │ │ │ +
171 static int boundaryId ( const I &i, PriorityTag< 0 > )
│ │ │ │ +
172 {
│ │ │ │ +
173 return 1;
│ │ │ │ +
174 }
│ │ │ │ +
175
│ │ │ │ +
176 protected:
│ │ │ │ +
177 static int boundaryId ( const Intersection &i ) { return boundaryId( i, PriorityTag< 42 >() ); }
│ │ │ │ +
178
│ │ │ │ +
179 private:
│ │ │ │ +
180 static int boundaryId ( const Intersection &, int bndId ) { return bndId; }
│ │ │ │ +
181 static int boundaryId ( const Intersection &i, const std::string & ) { return boundaryId( i ); }
│ │ │ │ +
182 static int boundaryId ( const Intersection &i, const std::pair< int, std::string > &data ) { return boundrayId( i, data.first ); }
│ │ │ │ +
183
│ │ │ │ +
184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout << std::endl; }
│ │ │ │ +
185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int, std::string > &data ) { appendBoundaryData( gridout, data.second ); }
│ │ │ │ +
186 static void appendBoundaryData ( std::ostream &gridout, const std::string &s ) { gridout << " : " << s << std::endl; }
│ │ │ │ +
187
│ │ │ │ +
188 protected:
│ │ │ │ +
189 template< class BoundaryData >
│ │ │ │ +
190 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const;
│ │ │ │ +
191
│ │ │ │ +
│ │ │ │ +
192 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
│ │ │ │ +
193 {
│ │ │ │ +
194 writeBoundaries( gridout, dgfIndices, [] ( const Intersection &i ) -> int { return boundaryId( i ); } );
│ │ │ │ +
195 }
│ │ │ │ +
│ │ │ │ +
196
│ │ │ │ +
197 protected:
│ │ │ │ + │ │ │ │ +
199 };
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
201
│ │ │ │ +
202 template< class GV >
│ │ │ │ +
│ │ │ │ +
203 inline auto DGFWriter< GV >::elementsSeeds ( const std::vector< Index > &newElemOrder ) const
│ │ │ │ +
204 -> std::vector< ElementSeed >
│ │ │ │ +
205 {
│ │ │ │ +
206 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
207
│ │ │ │ +
208 const std::size_t orderSize = newElemOrder.size() ;
│ │ │ │ +
209 std::vector< ElementSeed > elementSeeds( orderSize );
│ │ │ │ +
210
│ │ │ │ +
211 for( const Element &element : elements( gridView_ ) )
│ │ │ │ +
212 {
│ │ │ │ +
213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize );
│ │ │ │ +
214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed();
│ │ │ │ +
215 }
│ │ │ │ +
216
│ │ │ │ +
217 return elementSeeds;
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219
│ │ │ │ +
220
│ │ │ │ +
221 template< class GV >
│ │ │ │ +
│ │ │ │ +
222 inline void DGFWriter< GV >::writeHeader ( std::ostream &gridout ) const
│ │ │ │ +
223 {
│ │ │ │ +
224 // set the stream to full double precision
│ │ │ │ +
225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield );
│ │ │ │ +
226 gridout.precision( 16 );
│ │ │ │ +
227
│ │ │ │ +
228 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
229
│ │ │ │ +
230 // write DGF header
│ │ │ │ +
231 gridout << "DGF" << std::endl;
│ │ │ │ +
232 gridout << "%" << " Elements = " << indexSet.size( 0 ) << " | Vertices = " << indexSet.size( dimGrid ) << std::endl;
│ │ │ │ +
233 }
│ │ │ │ +
│ │ │ │ +
234
│ │ │ │ +
235
│ │ │ │ +
236 template< class GV >
│ │ │ │ +
│ │ │ │ +
237 inline void DGFWriter< GV >::writeFooter ( std::ostream &gridout ) const
│ │ │ │ +
238 {
│ │ │ │ +
239 gridout << std::endl << "#" << std::endl;
│ │ │ │ +
240 }
│ │ │ │ +
│ │ │ │ +
241
│ │ │ │ +
242
│ │ │ │ +
243 template< class GV >
│ │ │ │ +
│ │ │ │ +
244 inline auto DGFWriter< GV >::writeVertices ( std::ostream &gridout ) const
│ │ │ │ +
245 -> std::vector< Index >
│ │ │ │ +
246 {
│ │ │ │ +
247 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
248
│ │ │ │ +
249 const Index vxSize = indexSet.size( dimGrid );
│ │ │ │ +
250 std::vector< Index > dgfIndices( vxSize, vxSize );
│ │ │ │ +
251
│ │ │ │ +
252 // write all vertices into the "vertex" block
│ │ │ │ +
253 gridout << std::endl << "VERTEX" << std::endl;
│ │ │ │ +
254 Index vertexCount = 0;
│ │ │ │ +
255 for( const Element &element : elements( gridView_ ) )
│ │ │ │ +
256 {
│ │ │ │ +
257 for( auto i : range( element.subEntities( dimGrid ) ) )
│ │ │ │ +
258 {
│ │ │ │ +
259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid );
│ │ │ │ +
260 assert( vxIndex < vxSize );
│ │ │ │ +
261 if( dgfIndices[ vxIndex ] == vxSize )
│ │ │ │ +
262 {
│ │ │ │ +
263 dgfIndices[ vxIndex ] = vertexCount++;
│ │ │ │ +
264 gridout << element.geometry().corner( i ) << std::endl;
│ │ │ │ +
265 }
│ │ │ │ +
266 }
│ │ │ │ +
267 }
│ │ │ │ +
268 gridout << "#" << std::endl;
│ │ │ │ +
269
│ │ │ │ +
270 if( vertexCount != vxSize )
│ │ │ │ +
271 DUNE_THROW( GridError, "IndexSet reports wrong number of vertices." );
│ │ │ │ +
272 return dgfIndices;
│ │ │ │ +
273 }
│ │ │ │ +
│ │ │ │ +
274
│ │ │ │ +
275
│ │ │ │ +
276 template< class GV >
│ │ │ │ +
│ │ │ │ +
277 inline void DGFWriter< GV >::writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const
│ │ │ │ +
278 {
│ │ │ │ +
279 // if element's type is not the same as the type to write the return
│ │ │ │ +
280 if( element.type() != elementType )
│ │ │ │ +
281 return;
│ │ │ │ +
282
│ │ │ │ +
283 // write vertex numbers of the element
│ │ │ │ +
284 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
285 for( auto i : range( element.subEntities( Element::dimension ) ) )
│ │ │ │ +
286 gridout << (i > 0 ? " " : "") << dgfIndices[ indexSet.subIndex( element, i, dimGrid ) ];
│ │ │ │ +
287 gridout << std::endl;
│ │ │ │ +
288 }
│ │ │ │ +
│ │ │ │ +
289
│ │ │ │ +
290
│ │ │ │ +
291 template< class GV >
│ │ │ │ +
│ │ │ │ +
292 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
│ │ │ │ +
293 {
│ │ │ │ +
294 // write all simplices to the "simplex" block
│ │ │ │ +
295 gridout << std::endl << "SIMPLEX" << std::endl;
│ │ │ │ +
296
│ │ │ │ +
297 // write all simplex elements
│ │ │ │ +
298 for( const Element &element : elements( gridView_ ) )
│ │ │ │ +
299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex( dimGrid ) );
│ │ │ │ +
300
│ │ │ │ +
301 // write end marker for block
│ │ │ │ +
302 gridout << "#" << std::endl;
│ │ │ │ +
303 }
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
305
│ │ │ │ +
306 template< class GV >
│ │ │ │ +
│ │ │ │ +
307 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
│ │ │ │ +
308 {
│ │ │ │ +
309 // write all simplices to the "simplex" block
│ │ │ │ +
310 gridout << std::endl << "SIMPLEX" << std::endl;
│ │ │ │ +
311
│ │ │ │ +
312 // write all simplex elements
│ │ │ │ +
313 for( const ElementSeed &seed : elementSeeds )
│ │ │ │ +
314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::simplex( dimGrid ) );
│ │ │ │ +
315
│ │ │ │ +
316 // write end marker for block
│ │ │ │ +
317 gridout << "#" << std::endl;
│ │ │ │ +
318 }
│ │ │ │ +
│ │ │ │ +
319
│ │ │ │ +
320
│ │ │ │ +
321 template< class GV >
│ │ │ │ +
│ │ │ │ +
322 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
│ │ │ │ +
323 {
│ │ │ │ +
324 // write all cubes to the "cube" block
│ │ │ │ +
325 gridout << std::endl << "CUBE" << std::endl;
│ │ │ │ +
326
│ │ │ │ +
327 // write all cube elements
│ │ │ │ +
328 for( const Element &element : elements( gridView_ ) )
│ │ │ │ +
329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid ) );
│ │ │ │ +
330
│ │ │ │ +
331 // write end marker for block
│ │ │ │ +
332 gridout << "#" << std::endl;
│ │ │ │ +
333 }
│ │ │ │ +
│ │ │ │ +
334
│ │ │ │ +
335
│ │ │ │ +
336 template< class GV >
│ │ │ │ +
│ │ │ │ +
337 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
│ │ │ │ +
338 {
│ │ │ │ +
339 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
340
│ │ │ │ +
341 // write all cubes to the "cube" block
│ │ │ │ +
342 gridout << std::endl << "CUBE" << std::endl;
│ │ │ │ +
343
│ │ │ │ +
344 // write all cube elements
│ │ │ │ +
345 for( const ElementSeed &seed : elementSeeds )
│ │ │ │ +
346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::cube( dimGrid ) );
│ │ │ │ +
347
│ │ │ │ +
348 // write end marker for block
│ │ │ │ +
349 gridout << "#" << std::endl;
│ │ │ │ +
350 }
│ │ │ │ +
│ │ │ │ +
351
│ │ │ │ +
352
│ │ │ │ +
353 template< class GV >
│ │ │ │ +
354 template< class... Args >
│ │ │ │ +
│ │ │ │ +
355 inline void DGFWriter< GV >::writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const
│ │ │ │ +
356 {
│ │ │ │ +
357 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
358
│ │ │ │ +
359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) > 0) )
│ │ │ │ +
360 writeSimplices( gridout, dgfIndices, args... );
│ │ │ │ +
361
│ │ │ │ +
362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 )
│ │ │ │ +
363 writeCubes( gridout, dgfIndices, args... );
│ │ │ │ +
364 }
│ │ │ │ +
│ │ │ │ +
365
│ │ │ │ +
366
│ │ │ │ +
367 template< class GV >
│ │ │ │ +
368 template< class BoundaryData >
│ │ │ │ +
│ │ │ │ +
369 inline void DGFWriter< GV >::writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const
│ │ │ │ +
370 {
│ │ │ │ +
371 using std::max;
│ │ │ │ +
372
│ │ │ │ +
373 const IndexSet &indexSet = gridView_.indexSet();
│ │ │ │ +
374
│ │ │ │ +
375 // write all boundaries to the "boundarysegments" block
│ │ │ │ +
376 gridout << std::endl << "BOUNDARYSEGMENTS" << std::endl;
│ │ │ │ +
377
│ │ │ │ +
378 for( const Element &element : elements( gridView_ ) )
│ │ │ │ +
379 {
│ │ │ │ +
380 if( !element.hasBoundaryIntersections() )
│ │ │ │ +
381 continue;
│ │ │ │ +
382
│ │ │ │ +
383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid >::general( element.type() );
│ │ │ │ +
384 for( const Intersection &intersection : intersections( gridView_, element ) )
│ │ │ │ +
385 {
│ │ │ │ +
386 if( !intersection.boundary() )
│ │ │ │ +
387 continue;
│ │ │ │ +
388
│ │ │ │ +
389 const auto data = boundaryData( intersection );
│ │ │ │ +
390 const int bndId = max( boundaryId( intersection, data ), 1 );
│ │ │ │ +
391
│ │ │ │ +
392 const int faceNumber = intersection.indexInInside();
│ │ │ │ +
393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid );
│ │ │ │ +
394 gridout << bndId << " ";
│ │ │ │ +
395 for( auto i : range( faceSize ) )
│ │ │ │ +
396 {
│ │ │ │ +
397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid );
│ │ │ │ +
398 gridout << " " << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ];
│ │ │ │ +
399 }
│ │ │ │ +
400 appendBoundaryData( gridout, data );
│ │ │ │ +
401 }
│ │ │ │ +
402 }
│ │ │ │ +
403 gridout << "#" << std::endl;
│ │ │ │ +
404 }
│ │ │ │ +
│ │ │ │ +
405
│ │ │ │ +
406
│ │ │ │ +
407 template< class GV >
│ │ │ │ +
408 template< class BoundaryData >
│ │ │ │ +
│ │ │ │ +
409 inline void DGFWriter< GV >::write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
│ │ │ │ +
410 {
│ │ │ │ +
411 writeHeader( gridout );
│ │ │ │ +
412 auto dgfIndices = writeVertices( gridout );
│ │ │ │ +
413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) );
│ │ │ │ +
414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
│ │ │ │ +
415 gridout << addParams.str();
│ │ │ │ +
416 writeFooter( gridout );
│ │ │ │ +
417 }
│ │ │ │ +
│ │ │ │ +
418
│ │ │ │ +
419
│ │ │ │ +
420 template< class GV >
│ │ │ │ +
421 template< class BoundaryData >
│ │ │ │ +
│ │ │ │ +
422 inline void DGFWriter< GV >::write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
│ │ │ │ +
423 {
│ │ │ │ +
424 writeHeader( gridout );
│ │ │ │ +
425 auto dgfIndices = writeVertices( gridout );
│ │ │ │ +
426 writeElements( gridout, dgfIndices );
│ │ │ │ +
427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
│ │ │ │ +
428 gridout << addParams.str();
│ │ │ │ +
429 writeFooter( gridout );
│ │ │ │ +
430 }
│ │ │ │ +
│ │ │ │ +
431
│ │ │ │ +
432} // namespace Dune
│ │ │ │ +
433
│ │ │ │ +
434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ + │ │ │ │ +
Traits::Grid Grid
type of the grid
Definition common/gridview.hh:83
│ │ │ │ +
Traits::IndexSet IndexSet
type of the index set
Definition common/gridview.hh:86
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ +
Traits::Intersection Intersection
type of the intersection
Definition common/gridview.hh:89
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ - │ │ │ │ -
Base class for function writers.
Definition functionwriter.hh:34
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ -
void addArray(const std::string &name, unsigned ncomps, Precision prec)
Add an array to the output file.
Definition pvtuwriter.hh:207
│ │ │ │ -
Definition skeletonfunction.hh:37
│ │ │ │ -
RF RangeField
Definition skeletonfunction.hh:45
│ │ │ │ -
FieldVector< DomainField, dimDomain > Domain
Definition skeletonfunction.hh:43
│ │ │ │ -
GV GridView
Definition skeletonfunction.hh:38
│ │ │ │ -
std::vector< RangeField > Range
Definition skeletonfunction.hh:46
│ │ │ │ -
GV::Intersection Cell
Definition skeletonfunction.hh:39
│ │ │ │ -
GV::ctype DomainField
Definition skeletonfunction.hh:41
│ │ │ │ -
static const unsigned dimDomain
Definition skeletonfunction.hh:42
│ │ │ │ -
A prototype for VTKFunctions on the skeleton.
Definition skeletonfunction.hh:51
│ │ │ │ -
unsigned dimRange() const
get dimension of the Range
│ │ │ │ -
SkeletonFunctionTraits< GV, RF > Traits
Definition skeletonfunction.hh:53
│ │ │ │ -
void evaluate(const typename Traits::Cell &c, const typename Traits::Domain &xl, typename Traits::Range &result) const
evaluate at local point xl in Cell c, store in result
│ │ │ │ -
function writer for skeleton functions
Definition skeletonfunction.hh:83
│ │ │ │ -
virtual std::string name() const
return name
Definition skeletonfunction.hh:106
│ │ │ │ -
SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, VTK::Precision prec=VTK::Precision::float32)
Definition skeletonfunction.hh:99
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition skeletonfunction.hh:112
│ │ │ │ -
virtual void write(const typename Func::Traits::Cell &cell, const typename Func::Traits::Domain &xl)
write at the given position
Definition skeletonfunction.hh:124
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition skeletonfunction.hh:117
│ │ │ │ -
SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32)
Definition skeletonfunction.hh:93
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition skeletonfunction.hh:135
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition skeletonfunction.hh:109
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ -
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
IndexTypeImp IndexType
The type used for the indices.
Definition indexidset.hh:92
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ +
write a GridView to a DGF file
Definition dgfwriter.hh:46
│ │ │ │ +
static const int dimGrid
dimension of the grid
Definition dgfwriter.hh:56
│ │ │ │ +
DGFWriter(const GridView &gridView)
constructor
Definition dgfwriter.hh:72
│ │ │ │ +
void write(std::ostream &gridout, const std::stringstream &addParams=std::stringstream()) const
write the GridView into a std::ostream
Definition dgfwriter.hh:119
│ │ │ │ +
auto write(const std::string &fileName, Args &&... args) const -> std::void_t< decltype(this->write(std::declval< std::ostream & >(), std::declval< Args >()...)) >
write the GridView to a file
Definition dgfwriter.hh:131
│ │ │ │ +
void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData) const
Definition dgfwriter.hh:369
│ │ │ │ +
static int boundaryId(const Intersection &i)
Definition dgfwriter.hh:177
│ │ │ │ +
void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams=std::stringstream()) const
write the GridView into a std::ostream
Definition dgfwriter.hh:107
│ │ │ │ +
void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams=std::stringstream()) const
write the GridView into a std::ostream
Definition dgfwriter.hh:409
│ │ │ │ +
GridView gridView_
Definition dgfwriter.hh:198
│ │ │ │ +
void writeElement(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType) const
Definition dgfwriter.hh:277
│ │ │ │ +
GV GridView
type of grid view
Definition dgfwriter.hh:51
│ │ │ │ +
void writeFooter(std::ostream &gridout) const
Definition dgfwriter.hh:237
│ │ │ │ +
GridView::Grid Grid
type of underlying hierarchical grid
Definition dgfwriter.hh:53
│ │ │ │ +
auto writeVertices(std::ostream &gridout) const -> std::vector< Index >
Definition dgfwriter.hh:244
│ │ │ │ +
void writeElements(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args) const
Definition dgfwriter.hh:355
│ │ │ │ +
void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
Definition dgfwriter.hh:192
│ │ │ │ +
void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
Definition dgfwriter.hh:322
│ │ │ │ +
void writeSimplices(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
Definition dgfwriter.hh:292
│ │ │ │ +
void writeHeader(std::ostream &gridout) const
Definition dgfwriter.hh:222
│ │ │ │ +
auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std::vector< ElementSeed >
Definition dgfwriter.hh:203
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,233 +2,558 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -skeletonfunction.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e { │ │ │ │ │ -20 │ │ │ │ │ -23 │ │ │ │ │ -29 namespace VTK { │ │ │ │ │ -30 │ │ │ │ │ -32 // │ │ │ │ │ -33 // Prototype for VTKFunktions on the skeleton │ │ │ │ │ -34 // │ │ │ │ │ -35 │ │ │ │ │ -36 template │ │ │ │ │ -_3_7 struct _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s { │ │ │ │ │ -_3_8 typedef GV _G_r_i_d_V_i_e_w; │ │ │ │ │ -_3_9 typedef typename GV::Intersection _C_e_l_l; │ │ │ │ │ -40 │ │ │ │ │ -_4_1 typedef typename GV::ctype _D_o_m_a_i_n_F_i_e_l_d; │ │ │ │ │ -_4_2 static const unsigned _d_i_m_D_o_m_a_i_n = GV::dimension-1; │ │ │ │ │ -_4_3 typedef FieldVector _D_o_m_a_i_n; │ │ │ │ │ -44 │ │ │ │ │ -_4_5 typedef RF _R_a_n_g_e_F_i_e_l_d; │ │ │ │ │ -_4_6 typedef std::vector _R_a_n_g_e; │ │ │ │ │ -47 }; │ │ │ │ │ +5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ +6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ +7 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ +22 │ │ │ │ │ +23#include │ │ │ │ │ +24#include │ │ │ │ │ +25 │ │ │ │ │ +26#include │ │ │ │ │ +27#include │ │ │ │ │ +28 │ │ │ │ │ +29#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +30#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +31 │ │ │ │ │ +32namespace _D_u_n_e │ │ │ │ │ +33{ │ │ │ │ │ +34 │ │ │ │ │ +44 template< class GV > │ │ │ │ │ +_4_5 class _D_G_F_W_r_i_t_e_r │ │ │ │ │ +46 { │ │ │ │ │ +47 typedef _D_G_F_W_r_i_t_e_r_<_ _G_V_ _> _T_h_i_s; │ │ │ │ │ 48 │ │ │ │ │ -50 template │ │ │ │ │ -_5_1 class _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e { │ │ │ │ │ -52 public: │ │ │ │ │ -_5_3 typedef _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_<_G_V_,_ _R_F_> _T_r_a_i_t_s; │ │ │ │ │ +49 public: │ │ │ │ │ +_5_1 typedef GV _G_r_i_d_V_i_e_w; │ │ │ │ │ +_5_3 typedef typename _G_r_i_d_V_i_e_w_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ 54 │ │ │ │ │ -_5_6 unsigned _d_i_m_R_a_n_g_e() const; │ │ │ │ │ +_5_6 static const int _d_i_m_G_r_i_d = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ 57 │ │ │ │ │ -59 │ │ │ │ │ -_6_5 void _e_v_a_l_u_a_t_e(const typename _T_r_a_i_t_s_:_:_C_e_l_l& c, │ │ │ │ │ -66 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n& xl, │ │ │ │ │ -67 typename _T_r_a_i_t_s_:_:_R_a_n_g_e& result) const; │ │ │ │ │ -68 }; │ │ │ │ │ -69 │ │ │ │ │ -71 // │ │ │ │ │ -72 // Class for writing SkeletonFunctions │ │ │ │ │ -73 // │ │ │ │ │ -74 │ │ │ │ │ -76 │ │ │ │ │ -80 template │ │ │ │ │ -_8_1 class _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -82 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -83 { │ │ │ │ │ -84 typedef typename Func::Traits::RangeField RF; │ │ │ │ │ -85 │ │ │ │ │ -86 std::shared_ptr func; │ │ │ │ │ -87 std::string name_; │ │ │ │ │ -88 unsigned dimR; │ │ │ │ │ -89 _V_T_K_:_:_P_r_e_c_i_s_i_o_n precision_; │ │ │ │ │ -90 std::shared_ptr arraywriter; │ │ │ │ │ -91 │ │ │ │ │ -92 public: │ │ │ │ │ -_9_3 _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ │ -94 const std::string& _n_a_m_e, unsigned dimR_, │ │ │ │ │ -95 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -96 : func(func_), name_(_n_a_m_e), dimR(dimR_), precision_(prec) │ │ │ │ │ -97 { } │ │ │ │ │ +58 private: │ │ │ │ │ +59 typedef typename _G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t IndexSet; │ │ │ │ │ +60 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Element; │ │ │ │ │ +61 typedef typename _G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n Intersection; │ │ │ │ │ +62 │ │ │ │ │ +63 typedef typename Element::EntitySeed ElementSeed; │ │ │ │ │ +64 │ │ │ │ │ +65 typedef typename _I_n_d_e_x_S_e_t_:_:_I_n_d_e_x_T_y_p_e Index; │ │ │ │ │ +66 │ │ │ │ │ +67 public: │ │ │ │ │ +_7_2 _D_G_F_W_r_i_t_e_r ( const _G_r_i_d_V_i_e_w &gridView ) │ │ │ │ │ +73 : _g_r_i_d_V_i_e_w__( gridView ) │ │ │ │ │ +74 {} │ │ │ │ │ +75 │ │ │ │ │ +85 template< class BoundaryData > │ │ │ │ │ +86 void _w_r_i_t_e ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams │ │ │ │ │ += std::stringstream() ) const; │ │ │ │ │ +87 │ │ │ │ │ +96 template< class BoundaryData > │ │ │ │ │ +97 void _w_r_i_t_e ( std::ostream &gridout, BoundaryData &&boundaryData, const std:: │ │ │ │ │ +stringstream &addParams = std::stringstream() ) const; │ │ │ │ │ 98 │ │ │ │ │ -_9_9 _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ │ -100 const std::string& _n_a_m_e, │ │ │ │ │ -101 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -102 : func(func_), name_(_n_a_m_e), dimR(func->dimRange()), precision_(prec) │ │ │ │ │ -103 { } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_6 virtual std::string _n_a_m_e() const { return name_; } │ │ │ │ │ -107 │ │ │ │ │ -_1_0_9 virtual unsigned _n_c_o_m_p_s() const { return dimR; } │ │ │ │ │ -110 │ │ │ │ │ -_1_1_2 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -113 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -_1_1_7 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -118 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ -119 nitems, precision_)); │ │ │ │ │ -120 return !arraywriter->writeIsNoop(); │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -_1_2_4 virtual void _w_r_i_t_e(const typename Func::Traits::Cell& cell, │ │ │ │ │ -125 const typename Func::Traits::Domain& xl) { │ │ │ │ │ -126 typename Func::Traits::Range result; │ │ │ │ │ -127 func->evaluate(cell, xl, result); │ │ │ │ │ -128 for(unsigned d = 0; d < result.size() && d < dimR; ++d) │ │ │ │ │ -129 arraywriter->write(result[d]); │ │ │ │ │ -130 for(unsigned d = result.size(); d < dimR; ++d) │ │ │ │ │ -131 arraywriter->write(0); │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -_1_3_5 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -136 arraywriter.reset(); │ │ │ │ │ -137 } │ │ │ │ │ -138 }; │ │ │ │ │ -139 │ │ │ │ │ -140 } // namespace VTK │ │ │ │ │ -141 │ │ │ │ │ -143 │ │ │ │ │ -144} // namespace Dune │ │ │ │ │ -145 │ │ │ │ │ -146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ -_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ -_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_1_0_7 void _w_r_i_t_e ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&newElemOrder, const std::stringstream &addParams = std::stringstream() ) const │ │ │ │ │ +108 { │ │ │ │ │ +109 _w_r_i_t_e( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return │ │ │ │ │ +boundaryId( i ); }, addParams ); │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +_1_1_9 void _w_r_i_t_e ( std::ostream &gridout, const std::stringstream &addParams = │ │ │ │ │ +std::stringstream() ) const │ │ │ │ │ +120 { │ │ │ │ │ +121 _w_r_i_t_e( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i │ │ │ │ │ +); }, addParams ); │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +130 template< class... Args > │ │ │ │ │ +_1_3_1 auto _w_r_i_t_e ( const std::string &fileName, Args &&... args ) const │ │ │ │ │ +132 -> std::void_t< decltype( this->_w_r_i_t_e( std::declval< std::ostream & >(), │ │ │ │ │ +std::declval< Args >()... ) ) > │ │ │ │ │ +133 { │ │ │ │ │ +134 std::ofstream gridout( fileName ); │ │ │ │ │ +135 if( gridout ) │ │ │ │ │ +136 _w_r_i_t_e( gridout, std::forward< Args >( args )... ); │ │ │ │ │ +137 else │ │ │ │ │ +138 std::cerr << "Couldn't open file `"<< fileName << "'!"<< std::endl; │ │ │ │ │ +139 } │ │ │ │ │ +140 │ │ │ │ │ +141 protected: │ │ │ │ │ +142 auto _e_l_e_m_e_n_t_s_S_e_e_d_s ( const std::vector< Index > &newElemOrder ) const │ │ │ │ │ +143 -> std::vector< ElementSeed >; │ │ │ │ │ +144 │ │ │ │ │ +145 void _w_r_i_t_e_H_e_a_d_e_r ( std::ostream &gridout ) const; │ │ │ │ │ +146 void _w_r_i_t_e_F_o_o_t_e_r ( std::ostream &gridout ) const; │ │ │ │ │ +147 │ │ │ │ │ +148 auto _w_r_i_t_e_V_e_r_t_i_c_e_s ( std::ostream &gridout ) const │ │ │ │ │ +149 -> std::vector< Index >; │ │ │ │ │ +150 │ │ │ │ │ +151 void _w_r_i_t_e_E_l_e_m_e_n_t ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, const Element &element, const GeometryType &elementType ) const; │ │ │ │ │ +152 │ │ │ │ │ +153 void _w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices ) const; │ │ │ │ │ +154 void _w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const; │ │ │ │ │ +155 │ │ │ │ │ +156 void _w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices ) const; │ │ │ │ │ +157 void _w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const; │ │ │ │ │ +158 │ │ │ │ │ +159 template< class... Args > │ │ │ │ │ +160 void _w_r_i_t_e_E_l_e_m_e_n_t_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, const Args &... args ) const; │ │ │ │ │ +161 │ │ │ │ │ +162 private: │ │ │ │ │ +163 template< class I > │ │ │ │ │ +164 static auto boundaryId ( const I &i, PriorityTag< 1 > ) │ │ │ │ │ +165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl │ │ │ │ │ +().boundaryId() ) >, int >::value, int > │ │ │ │ │ +166 { │ │ │ │ │ +167 return i.impl().boundaryId(); │ │ │ │ │ +168 } │ │ │ │ │ +169 │ │ │ │ │ +170 template< class I > │ │ │ │ │ +171 static int boundaryId ( const I &i, PriorityTag< 0 > ) │ │ │ │ │ +172 { │ │ │ │ │ +173 return 1; │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +176 protected: │ │ │ │ │ +_1_7_7 static int _b_o_u_n_d_a_r_y_I_d ( const Intersection &i ) { return _b_o_u_n_d_a_r_y_I_d( i, │ │ │ │ │ +PriorityTag< 42 >() ); } │ │ │ │ │ +178 │ │ │ │ │ +179 private: │ │ │ │ │ +180 static int boundaryId ( const _I_n_t_e_r_s_e_c_t_i_o_n &, int bndId ) { return bndId; } │ │ │ │ │ +181 static int boundaryId ( const Intersection &i, const std::string & ) │ │ │ │ │ +{ return boundaryId( i ); } │ │ │ │ │ +182 static int boundaryId ( const Intersection &i, const std::pair< int, std:: │ │ │ │ │ +string > &data ) { return boundrayId( i, data.first ); } │ │ │ │ │ +183 │ │ │ │ │ +184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout << │ │ │ │ │ +std::endl; } │ │ │ │ │ +185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int, │ │ │ │ │ +std::string > &data ) { appendBoundaryData( gridout, data.second ); } │ │ │ │ │ +186 static void appendBoundaryData ( std::ostream &gridout, const std::string │ │ │ │ │ +&s ) { gridout << " : " << s << std::endl; } │ │ │ │ │ +187 │ │ │ │ │ +188 protected: │ │ │ │ │ +189 template< class BoundaryData > │ │ │ │ │ +190 void _w_r_i_t_e_B_o_u_n_d_a_r_i_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, BoundaryData &&boundaryData ) const; │ │ │ │ │ +191 │ │ │ │ │ +_1_9_2 void _w_r_i_t_e_B_o_u_n_d_a_r_i_e_s ( std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices ) const │ │ │ │ │ +193 { │ │ │ │ │ +194 _w_r_i_t_e_B_o_u_n_d_a_r_i_e_s( gridout, dgfIndices, [] ( const Intersection &i ) -> int │ │ │ │ │ +{ return boundaryId( i ); } ); │ │ │ │ │ +195 } │ │ │ │ │ +196 │ │ │ │ │ +197 protected: │ │ │ │ │ +_1_9_8 _G_r_i_d_V_i_e_w _g_r_i_d_V_i_e_w__; │ │ │ │ │ +199 }; │ │ │ │ │ +200 │ │ │ │ │ +201 │ │ │ │ │ +202 template< class GV > │ │ │ │ │ +_2_0_3 inline auto _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_e_l_e_m_e_n_t_s_S_e_e_d_s ( const std::vector< Index > │ │ │ │ │ +&newElemOrder ) const │ │ │ │ │ +204 -> std::vector< ElementSeed > │ │ │ │ │ +205 { │ │ │ │ │ +206 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +207 │ │ │ │ │ +208 const std::size_t orderSize = newElemOrder.size() ; │ │ │ │ │ +209 std::vector< ElementSeed > elementSeeds( orderSize ); │ │ │ │ │ +210 │ │ │ │ │ +211 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ +212 { │ │ │ │ │ +213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize ); │ │ │ │ │ +214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed(); │ │ │ │ │ +215 } │ │ │ │ │ +216 │ │ │ │ │ +217 return elementSeeds; │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +220 │ │ │ │ │ +221 template< class GV > │ │ │ │ │ +_2_2_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_H_e_a_d_e_r ( std::ostream &gridout ) const │ │ │ │ │ +223 { │ │ │ │ │ +224 // set the stream to full double precision │ │ │ │ │ +225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield ); │ │ │ │ │ +226 gridout.precision( 16 ); │ │ │ │ │ +227 │ │ │ │ │ +228 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +229 │ │ │ │ │ +230 // write DGF header │ │ │ │ │ +231 gridout << "DGF" << std::endl; │ │ │ │ │ +232 gridout << "%" << " Elements = " << indexSet.size( 0 ) << " | Vertices = " │ │ │ │ │ +<< indexSet.size( dimGrid ) << std::endl; │ │ │ │ │ +233 } │ │ │ │ │ +234 │ │ │ │ │ +235 │ │ │ │ │ +236 template< class GV > │ │ │ │ │ +_2_3_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_F_o_o_t_e_r ( std::ostream &gridout ) const │ │ │ │ │ +238 { │ │ │ │ │ +239 gridout << std::endl << "#" << std::endl; │ │ │ │ │ +240 } │ │ │ │ │ +241 │ │ │ │ │ +242 │ │ │ │ │ +243 template< class GV > │ │ │ │ │ +_2_4_4 inline auto _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_V_e_r_t_i_c_e_s ( std::ostream &gridout ) const │ │ │ │ │ +245 -> std::vector< Index > │ │ │ │ │ +246 { │ │ │ │ │ +247 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +248 │ │ │ │ │ +249 const Index vxSize = indexSet.size( dimGrid ); │ │ │ │ │ +250 std::vector< Index > dgfIndices( vxSize, vxSize ); │ │ │ │ │ +251 │ │ │ │ │ +252 // write all vertices into the "vertex" block │ │ │ │ │ +253 gridout << std::endl << "VERTEX" << std::endl; │ │ │ │ │ +254 Index vertexCount = 0; │ │ │ │ │ +255 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ +256 { │ │ │ │ │ +257 for( auto i : range( element.subEntities( dimGrid ) ) ) │ │ │ │ │ +258 { │ │ │ │ │ +259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid ); │ │ │ │ │ +260 assert( vxIndex < vxSize ); │ │ │ │ │ +261 if( dgfIndices[ vxIndex ] == vxSize ) │ │ │ │ │ +262 { │ │ │ │ │ +263 dgfIndices[ vxIndex ] = vertexCount++; │ │ │ │ │ +264 gridout << element.geometry().corner( i ) << std::endl; │ │ │ │ │ +265 } │ │ │ │ │ +266 } │ │ │ │ │ +267 } │ │ │ │ │ +268 gridout << "#" << std::endl; │ │ │ │ │ +269 │ │ │ │ │ +270 if( vertexCount != vxSize ) │ │ │ │ │ +271 DUNE_THROW( _G_r_i_d_E_r_r_o_r, "IndexSet reports wrong number of vertices." ); │ │ │ │ │ +272 return dgfIndices; │ │ │ │ │ +273 } │ │ │ │ │ +274 │ │ │ │ │ +275 │ │ │ │ │ +276 template< class GV > │ │ │ │ │ +_2_7_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_E_l_e_m_e_n_t ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices, const Element &element, const GeometryType │ │ │ │ │ +&elementType ) const │ │ │ │ │ +278 { │ │ │ │ │ +279 // if element's type is not the same as the type to write the return │ │ │ │ │ +280 if( element.type() != elementType ) │ │ │ │ │ +281 return; │ │ │ │ │ +282 │ │ │ │ │ +283 // write vertex numbers of the element │ │ │ │ │ +284 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +285 for( auto i : range( element.subEntities( Element::dimension ) ) ) │ │ │ │ │ +286 gridout << (i > 0 ? " " : "") << dgfIndices[ indexSet.subIndex( element, i, │ │ │ │ │ +dimGrid ) ]; │ │ │ │ │ +287 gridout << std::endl; │ │ │ │ │ +288 } │ │ │ │ │ +289 │ │ │ │ │ +290 │ │ │ │ │ +291 template< class GV > │ │ │ │ │ +_2_9_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices ) const │ │ │ │ │ +293 { │ │ │ │ │ +294 // write all simplices to the "simplex" block │ │ │ │ │ +295 gridout << std::endl << "SIMPLEX" << std::endl; │ │ │ │ │ +296 │ │ │ │ │ +297 // write all simplex elements │ │ │ │ │ +298 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ +299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex( dimGrid │ │ │ │ │ +) ); │ │ │ │ │ +300 │ │ │ │ │ +301 // write end marker for block │ │ │ │ │ +302 gridout << "#" << std::endl; │ │ │ │ │ +303 } │ │ │ │ │ +304 │ │ │ │ │ +305 │ │ │ │ │ +306 template< class GV > │ │ │ │ │ +_3_0_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_S_i_m_p_l_i_c_e_s ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices, const std::vector< ElementSeed > │ │ │ │ │ +&elementSeeds ) const │ │ │ │ │ +308 { │ │ │ │ │ +309 // write all simplices to the "simplex" block │ │ │ │ │ +310 gridout << std::endl << "SIMPLEX" << std::endl; │ │ │ │ │ +311 │ │ │ │ │ +312 // write all simplex elements │ │ │ │ │ +313 for( const ElementSeed &seed : elementSeeds ) │ │ │ │ │ +314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), │ │ │ │ │ +GeometryTypes::simplex( dimGrid ) ); │ │ │ │ │ +315 │ │ │ │ │ +316 // write end marker for block │ │ │ │ │ +317 gridout << "#" << std::endl; │ │ │ │ │ +318 } │ │ │ │ │ +319 │ │ │ │ │ +320 │ │ │ │ │ +321 template< class GV > │ │ │ │ │ +_3_2_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices ) const │ │ │ │ │ +323 { │ │ │ │ │ +324 // write all cubes to the "cube" block │ │ │ │ │ +325 gridout << std::endl << "CUBE" << std::endl; │ │ │ │ │ +326 │ │ │ │ │ +327 // write all cube elements │ │ │ │ │ +328 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ +329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid ) │ │ │ │ │ +); │ │ │ │ │ +330 │ │ │ │ │ +331 // write end marker for block │ │ │ │ │ +332 gridout << "#" << std::endl; │ │ │ │ │ +333 } │ │ │ │ │ +334 │ │ │ │ │ +335 │ │ │ │ │ +336 template< class GV > │ │ │ │ │ +_3_3_7 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_C_u_b_e_s ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices, const std::vector< ElementSeed > │ │ │ │ │ +&elementSeeds ) const │ │ │ │ │ +338 { │ │ │ │ │ +339 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +340 │ │ │ │ │ +341 // write all cubes to the "cube" block │ │ │ │ │ +342 gridout << std::endl << "CUBE" << std::endl; │ │ │ │ │ +343 │ │ │ │ │ +344 // write all cube elements │ │ │ │ │ +345 for( const ElementSeed &seed : elementSeeds ) │ │ │ │ │ +346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), │ │ │ │ │ +GeometryTypes::cube( dimGrid ) ); │ │ │ │ │ +347 │ │ │ │ │ +348 // write end marker for block │ │ │ │ │ +349 gridout << "#" << std::endl; │ │ │ │ │ +350 } │ │ │ │ │ +351 │ │ │ │ │ +352 │ │ │ │ │ +353 template< class GV > │ │ │ │ │ +354 template< class... Args > │ │ │ │ │ +_3_5_5 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_E_l_e_m_e_n_t_s ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices, const Args &... args ) const │ │ │ │ │ +356 { │ │ │ │ │ +357 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +358 │ │ │ │ │ +359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) > │ │ │ │ │ +0) ) │ │ │ │ │ +360 writeSimplices( gridout, dgfIndices, args... ); │ │ │ │ │ +361 │ │ │ │ │ +362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 ) │ │ │ │ │ +363 writeCubes( gridout, dgfIndices, args... ); │ │ │ │ │ +364 } │ │ │ │ │ +365 │ │ │ │ │ +366 │ │ │ │ │ +367 template< class GV > │ │ │ │ │ +368 template< class BoundaryData > │ │ │ │ │ +_3_6_9 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e_B_o_u_n_d_a_r_i_e_s ( std::ostream &gridout, const │ │ │ │ │ +std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const │ │ │ │ │ +370 { │ │ │ │ │ +371 using std::max; │ │ │ │ │ +372 │ │ │ │ │ +373 const IndexSet &indexSet = gridView_.indexSet(); │ │ │ │ │ +374 │ │ │ │ │ +375 // write all boundaries to the "boundarysegments" block │ │ │ │ │ +376 gridout << std::endl << "BOUNDARYSEGMENTS" << std::endl; │ │ │ │ │ +377 │ │ │ │ │ +378 for( const Element &element : elements( gridView_ ) ) │ │ │ │ │ +379 { │ │ │ │ │ +380 if( !element.hasBoundaryIntersections() ) │ │ │ │ │ +381 continue; │ │ │ │ │ +382 │ │ │ │ │ +383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid │ │ │ │ │ +>::general( element.type() ); │ │ │ │ │ +384 for( const Intersection &intersection : intersections( gridView_, element ) │ │ │ │ │ +) │ │ │ │ │ +385 { │ │ │ │ │ +386 if( !intersection.boundary() ) │ │ │ │ │ +387 continue; │ │ │ │ │ +388 │ │ │ │ │ +389 const auto data = boundaryData( intersection ); │ │ │ │ │ +390 const int bndId = max( boundaryId( intersection, data ), 1 ); │ │ │ │ │ +391 │ │ │ │ │ +392 const int faceNumber = intersection.indexInInside(); │ │ │ │ │ +393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid ); │ │ │ │ │ +394 gridout << bndId << " "; │ │ │ │ │ +395 for( auto i : range( faceSize ) ) │ │ │ │ │ +396 { │ │ │ │ │ +397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid ); │ │ │ │ │ +398 gridout << " " << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ]; │ │ │ │ │ +399 } │ │ │ │ │ +400 appendBoundaryData( gridout, data ); │ │ │ │ │ +401 } │ │ │ │ │ +402 } │ │ │ │ │ +403 gridout << "#" << std::endl; │ │ │ │ │ +404 } │ │ │ │ │ +405 │ │ │ │ │ +406 │ │ │ │ │ +407 template< class GV > │ │ │ │ │ +408 template< class BoundaryData > │ │ │ │ │ +_4_0_9 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e ( std::ostream &gridout, const std:: │ │ │ │ │ +vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std:: │ │ │ │ │ +stringstream &addParams ) const │ │ │ │ │ +410 { │ │ │ │ │ +411 writeHeader( gridout ); │ │ │ │ │ +412 auto dgfIndices = writeVertices( gridout ); │ │ │ │ │ +413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) ); │ │ │ │ │ +414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData > │ │ │ │ │ +( boundaryData ) ); │ │ │ │ │ +415 gridout << addParams.str(); │ │ │ │ │ +416 writeFooter( gridout ); │ │ │ │ │ +417 } │ │ │ │ │ +418 │ │ │ │ │ +419 │ │ │ │ │ +420 template< class GV > │ │ │ │ │ +421 template< class BoundaryData > │ │ │ │ │ +_4_2_2 inline void _D_G_F_W_r_i_t_e_r_<_ _G_V_ _>_:_:_w_r_i_t_e ( std::ostream &gridout, BoundaryData │ │ │ │ │ +&&boundaryData, const std::stringstream &addParams ) const │ │ │ │ │ +423 { │ │ │ │ │ +424 writeHeader( gridout ); │ │ │ │ │ +425 auto dgfIndices = writeVertices( gridout ); │ │ │ │ │ +426 writeElements( gridout, dgfIndices ); │ │ │ │ │ +427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData > │ │ │ │ │ +( boundaryData ) ); │ │ │ │ │ +428 gridout << addParams.str(); │ │ │ │ │ +429 writeFooter( gridout ); │ │ │ │ │ +430 } │ │ │ │ │ +431 │ │ │ │ │ +432} // namespace Dune │ │ │ │ │ +433 │ │ │ │ │ +434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ +_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ +Traits::Grid Grid │ │ │ │ │ +type of the grid │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Traits::IndexSet IndexSet │ │ │ │ │ +type of the index set │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Traits::Intersection Intersection │ │ │ │ │ +type of the intersection │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:89 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision │ │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ -@ float32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -Base class for function writers. │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -void addArray(const std::string &name, unsigned ncomps, Precision prec) │ │ │ │ │ -Add an array to the output file. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_R_a_n_g_e_F_i_e_l_d │ │ │ │ │ -RF RangeField │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_D_o_m_a_i_n │ │ │ │ │ -FieldVector< DomainField, dimDomain > Domain │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ +Base class for exceptions in Dune grid modules. │ │ │ │ │ +DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_I_n_d_e_x_T_y_p_e │ │ │ │ │ +IndexTypeImp IndexType │ │ │ │ │ +The type used for the indices. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +A struct that collects all associated types of one implementation from the │ │ │ │ │ +Traits class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r │ │ │ │ │ +write a GridView to a DGF file │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_d_i_m_G_r_i_d │ │ │ │ │ +static const int dimGrid │ │ │ │ │ +dimension of the grid │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_D_G_F_W_r_i_t_e_r │ │ │ │ │ +DGFWriter(const GridView &gridView) │ │ │ │ │ +constructor │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(std::ostream &gridout, const std::stringstream &addParams=std:: │ │ │ │ │ +stringstream()) const │ │ │ │ │ +write the GridView into a std::ostream │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +auto write(const std::string &fileName, Args &&... args) const -> std::void_t< │ │ │ │ │ +decltype(this->write(std::declval< std::ostream & >(), std::declval< Args > │ │ │ │ │ +()...)) > │ │ │ │ │ +write the GridView to a file │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_B_o_u_n_d_a_r_i_e_s │ │ │ │ │ +void writeBoundaries(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, BoundaryData &&boundaryData) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:369 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +static int boundaryId(const Intersection &i) │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, │ │ │ │ │ +const std::stringstream &addParams=std::stringstream()) const │ │ │ │ │ +write the GridView into a std::ostream │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, │ │ │ │ │ +BoundaryData &&boundaryData, const std::stringstream &addParams=std:: │ │ │ │ │ +stringstream()) const │ │ │ │ │ +write the GridView into a std::ostream │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:409 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_g_r_i_d_V_i_e_w__ │ │ │ │ │ +GridView gridView_ │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:198 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +void writeElement(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, const Element &element, const GeometryType &elementType) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:277 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ GV GridView │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_R_a_n_g_e │ │ │ │ │ -std::vector< RangeField > Range │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_C_e_l_l │ │ │ │ │ -GV::Intersection Cell │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_D_o_m_a_i_n_F_i_e_l_d │ │ │ │ │ -GV::ctype DomainField │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_d_i_m_D_o_m_a_i_n │ │ │ │ │ -static const unsigned dimDomain │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ -A prototype for VTKFunctions on the skeleton. │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -unsigned dimRange() const │ │ │ │ │ -get dimension of the Range │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_T_r_a_i_t_s │ │ │ │ │ -SkeletonFunctionTraits< GV, RF > Traits │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const typename Traits::Cell &c, const typename Traits::Domain │ │ │ │ │ -&xl, typename Traits::Range &result) const │ │ │ │ │ -evaluate at local point xl in Cell c, store in result │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -function writer for skeleton functions │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std:: │ │ │ │ │ -string &name, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const typename Func::Traits::Cell &cell, const typename │ │ │ │ │ -Func::Traits::Domain &xl) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:117 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std:: │ │ │ │ │ -string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ -unsigned nitems, Precision prec) │ │ │ │ │ -acquire a DataArrayWriter │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ +type of grid view │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_F_o_o_t_e_r │ │ │ │ │ +void writeFooter(std::ostream &gridout) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:237 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_G_r_i_d │ │ │ │ │ +GridView::Grid Grid │ │ │ │ │ +type of underlying hierarchical grid │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_V_e_r_t_i_c_e_s │ │ │ │ │ +auto writeVertices(std::ostream &gridout) const -> std::vector< Index > │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:244 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_E_l_e_m_e_n_t_s │ │ │ │ │ +void writeElements(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices, const Args &... args) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:355 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_B_o_u_n_d_a_r_i_e_s │ │ │ │ │ +void writeBoundaries(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_C_u_b_e_s │ │ │ │ │ +void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices) │ │ │ │ │ +const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:322 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_S_i_m_p_l_i_c_e_s │ │ │ │ │ +void writeSimplices(std::ostream &gridout, const std::vector< Index > │ │ │ │ │ +&dgfIndices) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_w_r_i_t_e_H_e_a_d_e_r │ │ │ │ │ +void writeHeader(std::ostream &gridout) const │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:222 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_W_r_i_t_e_r_:_:_e_l_e_m_e_n_t_s_S_e_e_d_s │ │ │ │ │ +auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std:: │ │ │ │ │ +vector< ElementSeed > │ │ │ │ │ +DDeeffiinniittiioonn dgfwriter.hh:203 │ │ │ │ │ +_g_r_i_d_._h_h │ │ │ │ │ +Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: b64enc.hh File Reference │ │ │ │ +dune-grid: dgfug.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
b64enc.hh File Reference
│ │ │ │ +
dgfug.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Simple base64 encode. │ │ │ │ -More...

│ │ │ │ -
#include <assert.h>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::b64chunk
 struct representing the three byte text as well as the four 6 bit chunks More...
 
│ │ │ │ +
#include <config.h>
│ │ │ │ +#include <dune/geometry/utility/typefromvertexcount.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfug.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Variables

const char Dune::base64table []
 endoing table
 
namespace  Dune::dgf
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Simple base64 encode.

│ │ │ │ -
Author
Christian Engwer
│ │ │ │ -

We implement the base64 encoding (c.f. RFC 4648 https://tools.ietf.org/html/rfc4648).

│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +2,21 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -b64enc.hh File Reference │ │ │ │ │ -Simple base64 encode. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_b_6_4_c_h_u_n_k │ │ │ │ │ -  struct representing the three byte text as well as the four 6 bit │ │ │ │ │ - chunks _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +dgfug.cc File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_u_g_._h_h> │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -VVaarriiaabblleess │ │ │ │ │ -const char  _D_u_n_e_:_:_b_a_s_e_6_4_t_a_b_l_e [] │ │ │ │ │ -  endoing table │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Simple base64 encode. │ │ │ │ │ - Author │ │ │ │ │ - Christian Engwer │ │ │ │ │ -We implement the base64 encoding (c.f. RFC 4648 _h_t_t_p_s_:_/_/_t_o_o_l_s_._i_e_t_f_._o_r_g_/_h_t_m_l_/ │ │ │ │ │ -_r_f_c_4_6_4_8). │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dataarraywriter.hh File Reference │ │ │ │ +dune-grid: dgfug.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,78 +65,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dataarraywriter.hh File Reference
│ │ │ │ +
dgfug.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Data array writers for the VTKWriter. │ │ │ │ -More...

│ │ │ │ -
#include <cstdint>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <istream>
│ │ │ │ #include <string>
│ │ │ │ -#include <iomanip>
│ │ │ │ -#include <cmath>
│ │ │ │ +#include <vector>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/indent.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/streams.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ │ +#include <dune/grid/uggrid.hh>
│ │ │ │ +#include "dgfparser.hh"
│ │ │ │ +#include "blocks/gridparameter.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::DataArrayWriter
 base class for data array writers More...
 
class  Dune::VTK::AsciiDataArrayWriter
 a streaming writer for data array tags, uses ASCII inline format More...
 
class  Dune::VTK::BinaryDataArrayWriter
 a streaming writer for data array tags, uses binary inline format More...
 
class  Dune::VTK::AppendedRawDataArrayWriter
 a streaming writer for data array tags, uses appended raw format More...
 
class  Dune::VTK::AppendedBase64DataArrayWriter
 a streaming writer for data array tags, uses appended base64 format More...
 
class  Dune::VTK::NakedBase64DataArrayWriter
 a streaming writer for appended data array tags, uses base64 format More...
struct  Dune::dgf::UGGridParameterBlock
 
class  Dune::VTK::NakedRawDataArrayWriter
 a streaming writer for appended data arrays, uses raw format More...
struct  Dune::DGFGridInfo< UGGrid< dim > >
 
class  Dune::VTK::DataArrayWriterFactory
 a factory for DataArrayWriters More...
struct  Dune::DGFGridFactory< UGGrid< dim > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Data array writers for the VTKWriter.

│ │ │ │ -
Author
Peter Bastian, Christian Engwer
│ │ │ │ -

This file contains classes to help writing data in the difeerent VTK output modes

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,65 +2,37 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dataarraywriter.hh File Reference │ │ │ │ │ -Data array writers for the VTKWriter. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dgfug.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_g_g_r_i_d_._h_h> │ │ │ │ │ +#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ +#include "_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  base class for data array writers _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  a streaming writer for data array tags, uses ASCII inline format │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  a streaming writer for data array tags, uses binary inline format │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  a streaming writer for data array tags, uses appended raw format │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  a streaming writer for data array tags, uses appended base64 format │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  a streaming writer for appended data array tags, uses base64 format │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -  a streaming writer for appended data arrays, uses raw format _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ -  a factory for DataArrayWriters _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Data array writers for the VTKWriter. │ │ │ │ │ - Author │ │ │ │ │ - Peter Bastian, Christian Engwer │ │ │ │ │ -This file contains classes to help writing data in the difeerent VTK output │ │ │ │ │ -modes │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dataarraywriter.hh Source File │ │ │ │ +dune-grid: dgfug.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,526 +70,316 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dataarraywriter.hh
│ │ │ │ +
dgfug.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstdint>
│ │ │ │ -
10#include <iostream>
│ │ │ │ +
5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ +
6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ +
7
│ │ │ │ +
8//- C++ includes
│ │ │ │ +
9#include <fstream>
│ │ │ │ +
10#include <istream>
│ │ │ │
11#include <string>
│ │ │ │ -
12#include <iomanip>
│ │ │ │ -
13#include <cstdint>
│ │ │ │ -
14#include <cmath>
│ │ │ │ -
15
│ │ │ │ -
16#include <dune/common/exceptions.hh>
│ │ │ │ -
17#include <dune/common/indent.hh>
│ │ │ │ +
12#include <vector>
│ │ │ │ +
13
│ │ │ │ +
14//- dune-common includes
│ │ │ │ +
15#include <dune/common/exceptions.hh>
│ │ │ │ +
16#include <dune/common/fvector.hh>
│ │ │ │ +
17#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
18
│ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
30namespace Dune
│ │ │ │ -
31{
│ │ │ │ -
34
│ │ │ │ -
35 namespace VTK {
│ │ │ │ +
19//- dune-grid includes
│ │ │ │ + │ │ │ │ +
21#include <dune/grid/uggrid.hh>
│ │ │ │ +
22
│ │ │ │ +
23//- local includes
│ │ │ │ +
24#include "dgfparser.hh"
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27
│ │ │ │ +
28namespace Dune
│ │ │ │ +
29{
│ │ │ │ +
30
│ │ │ │ +
31 namespace dgf
│ │ │ │ +
32 {
│ │ │ │ +
33
│ │ │ │ +
34 // UGGridParameterBlock
│ │ │ │ +
35 // --------------------
│ │ │ │
36
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 {
│ │ │ │ -
57 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 : public GridParameterBlock
│ │ │ │ +
39 {
│ │ │ │ +
41 explicit UGGridParameterBlock ( std::istream &input );
│ │ │ │ +
42
│ │ │ │ +
44 bool noClosure () const { return noClosure_; }
│ │ │ │ +
46 bool noCopy () const { return noCopy_; }
│ │ │ │ +
48 size_t heapSize () const { return heapSize_; }
│ │ │ │ +
49
│ │ │ │ +
50 protected:
│ │ │ │ +
51 bool noClosure_; // no closure for UGGrid
│ │ │ │ +
52 bool noCopy_; // no copies for UGGrid
│ │ │ │ +
53 size_t heapSize_; // heap size for UGGrid
│ │ │ │ +
54 };
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
56 } // namespace dgf
│ │ │ │ +
57
│ │ │ │ +
58
│ │ │ │
59
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 : prec(_prec)
│ │ │ │ -
65 {}
│ │ │ │ +
60#if HAVE_DUNE_UGGRID
│ │ │ │ +
61 template< int dim >
│ │ │ │ +
│ │ │ │ +
62 struct DGFGridInfo< UGGrid< dim > >
│ │ │ │ +
63 {
│ │ │ │ +
│ │ │ │ +
64 static int refineStepsForHalf ()
│ │ │ │ +
65 {
│ │ │ │ +
66 return 1;
│ │ │ │ +
67 }
│ │ │ │
│ │ │ │ -
66
│ │ │ │ -
68 template<class T>
│ │ │ │ +
68
│ │ │ │
│ │ │ │ -
69 void write(T data)
│ │ │ │ -
70 {
│ │ │ │ -
71 switch(prec)
│ │ │ │ -
72 {
│ │ │ │ - │ │ │ │ -
74 writeFloat32(data); break;
│ │ │ │ - │ │ │ │ -
76 writeFloat64(data); break;
│ │ │ │ - │ │ │ │ -
78 writeUInt32(data); break;
│ │ │ │ - │ │ │ │ -
80 writeUInt8(data); break;
│ │ │ │ - │ │ │ │ -
82 writeInt32(data); break;
│ │ │ │ -
83 default:
│ │ │ │ -
84 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
│ │ │ │ -
85 }
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
89 virtual bool writeIsNoop() const { return false; }
│ │ │ │ -
91 virtual ~DataArrayWriter () {}
│ │ │ │ -
92
│ │ │ │ -
93 private:
│ │ │ │ -
95 virtual void writeFloat32 (float data) = 0;
│ │ │ │ -
97 virtual void writeFloat64 (double data) = 0;
│ │ │ │ -
99 virtual void writeInt32 (std::int32_t data) = 0;
│ │ │ │ -
101 virtual void writeUInt8 (std::uint8_t data) = 0;
│ │ │ │ -
103 virtual void writeUInt32 (std::uint32_t data) = 0;
│ │ │ │ -
104
│ │ │ │ -
105 Precision prec;
│ │ │ │ -
106 };
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
110 {
│ │ │ │ -
111 public:
│ │ │ │ -
113
│ │ │ │ +
69 static double refineWeight ()
│ │ │ │ +
70 {
│ │ │ │ +
71 return -1.;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73 };
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75
│ │ │ │ +
76
│ │ │ │ +
77 // DGFGridFactory< UGGrid< dim > >
│ │ │ │ +
78 // -------------------------------
│ │ │ │ +
79
│ │ │ │ +
80 template< int dim >
│ │ │ │ +
│ │ │ │ +
81 struct DGFGridFactory< UGGrid< dim > >
│ │ │ │ +
82 {
│ │ │ │ + │ │ │ │ +
86 static const int dimension = dim;
│ │ │ │ +
88 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ +
91 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
92 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
93 : grid_( 0 ),
│ │ │ │ +
94 factory_(),
│ │ │ │ +
95 dgf_( rank( comm ), size( comm ) )
│ │ │ │ +
96 {
│ │ │ │ +
97 generate( input );
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
│ │ │ │ +
101 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
102 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
103 : grid_( 0 ),
│ │ │ │ +
104 factory_(),
│ │ │ │ +
105 dgf_( rank( comm ), size( comm ) )
│ │ │ │ +
106 {
│ │ │ │ +
107 std::ifstream input( filename.c_str() );
│ │ │ │ +
108 if ( !input )
│ │ │ │ +
109 DUNE_THROW( DGFException, "Error: Macrofile " << filename << " not found" );
│ │ │ │ +
110 generate( input );
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
115 {
│ │ │ │ +
116 return grid_;
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
120 template< class GG, class II >
│ │ │ │
│ │ │ │ -
121 AsciiDataArrayWriter(std::ostream& theStream, std::string name,
│ │ │ │ -
122 int ncomps, const Indent& indent_, Precision prec_)
│ │ │ │ -
123 : DataArrayWriter(prec_), s(theStream), counter(0), numPerLine(12), indent(indent_)
│ │ │ │ -
124 {
│ │ │ │ -
125 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ -
126 << "Name=\"" << name << "\" ";
│ │ │ │ -
127 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ -
128 s << "format=\"ascii\">\n";
│ │ │ │ -
129 ++indent;
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
134 {
│ │ │ │ -
135 if (counter%numPerLine!=0) s << "\n";
│ │ │ │ -
136 --indent;
│ │ │ │ -
137 s << indent << "</DataArray>\n";
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
140 private:
│ │ │ │ -
142 void writeFloat64 (double data) final
│ │ │ │ -
143 { write_float(data); }
│ │ │ │ -
145 void writeFloat32 (float data) final
│ │ │ │ -
146 { write_float(data); }
│ │ │ │ -
148 void writeInt32 (std::int32_t data) final
│ │ │ │ -
149 { write_(data); }
│ │ │ │ -
151 void writeUInt32 (std::uint32_t data) final
│ │ │ │ -
152 { write_(data); }
│ │ │ │ -
154 void writeUInt8 (std::uint8_t data) final
│ │ │ │ -
155 { write_(data); }
│ │ │ │ -
156
│ │ │ │ -
157 template<class T>
│ │ │ │ -
158 void write_(T data)
│ │ │ │ -
159 {
│ │ │ │ -
160 typedef typename PrintType<T>::Type PT;
│ │ │ │ -
161 if(counter%numPerLine==0) s << indent;
│ │ │ │ -
162 else s << " ";
│ │ │ │ -
163 const auto original_precision = std::cout.precision();
│ │ │ │ -
164 s << std::setprecision(std::numeric_limits<PT>::digits10) << (PT) data;
│ │ │ │ -
165 std::cout.precision(original_precision);
│ │ │ │ -
166 counter++;
│ │ │ │ -
167 if (counter%numPerLine==0) s << "\n";
│ │ │ │ -
168 }
│ │ │ │ -
169
│ │ │ │ -
170 template<class T>
│ │ │ │ -
171 void write_float(T data)
│ │ │ │ -
172 {
│ │ │ │ -
173 typedef typename PrintType<T>::Type PT;
│ │ │ │ -
174 if(counter%numPerLine==0) s << indent;
│ │ │ │ -
175 else s << " ";
│ │ │ │ -
176 PT out_data = (PT) data;
│ │ │ │ -
177 if (std::fpclassify(out_data) == FP_SUBNORMAL)
│ │ │ │ -
178 {
│ │ │ │ -
179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS
│ │ │ │ -
180 out_data = 0;
│ │ │ │ -
181 }
│ │ │ │ -
182 const auto original_precision = std::cout.precision();
│ │ │ │ -
183 s << std::setprecision(std::numeric_limits<PT>::digits10) << out_data;
│ │ │ │ -
184 std::cout.precision(original_precision);
│ │ │ │ -
185 counter++;
│ │ │ │ -
186 if (counter%numPerLine==0) s << "\n";
│ │ │ │ -
187 }
│ │ │ │ -
188
│ │ │ │ -
189 std::ostream& s;
│ │ │ │ -
190 int counter;
│ │ │ │ -
191 int numPerLine;
│ │ │ │ -
192 Indent indent;
│ │ │ │ -
193 };
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
197 {
│ │ │ │ -
198 public:
│ │ │ │ -
200
│ │ │ │ -
│ │ │ │ -
210 BinaryDataArrayWriter(std::ostream& theStream, std::string name,
│ │ │ │ -
211 int ncomps, int nitems, const Indent& indent_, Precision prec_)
│ │ │ │ -
212 : DataArrayWriter(prec_), s(theStream), b64(theStream), indent(indent_)
│ │ │ │ -
213 {
│ │ │ │ -
214 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ -
215 << "Name=\"" << name << "\" ";
│ │ │ │ -
216 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ -
217 s << "format=\"binary\">\n";
│ │ │ │ +
121 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
122 {
│ │ │ │ +
123 return factory_.wasInserted( intersection );
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
127 template< class GG, class II >
│ │ │ │ +
│ │ │ │ +
128 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
129 {
│ │ │ │ +
130 return intersection.boundarySegmentIndex();
│ │ │ │ +
131 }
│ │ │ │ +
│ │ │ │ +
132
│ │ │ │ +
134 template< int codim >
│ │ │ │ +
│ │ │ │ +
135 int numParameters () const
│ │ │ │ +
136 {
│ │ │ │ +
137 if( codim == 0 )
│ │ │ │ +
138 return dgf_.nofelparams;
│ │ │ │ +
139 else if( codim == dimension )
│ │ │ │ +
140 return dgf_.nofvtxparams;
│ │ │ │ +
141 else
│ │ │ │ +
142 return 0;
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
146 template< class Entity >
│ │ │ │ +
│ │ │ │ +
147 int numParameters ( const Entity & ) const
│ │ │ │ +
148 {
│ │ │ │ +
149 return numParameters< Entity::codimension >();
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
│ │ │ │ +
153 std::vector< double > &parameter ( const typename Grid::template Codim< 0 >::Entity &element )
│ │ │ │ +
154 {
│ │ │ │ +
155 if( numParameters< 0 >() <= 0 )
│ │ │ │ +
156 {
│ │ │ │ +
157 DUNE_THROW( InvalidStateException,
│ │ │ │ +
158 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ +
159 }
│ │ │ │ +
160 return dgf_.elParams[ factory_.insertionIndex( element ) ];
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
│ │ │ │ +
164 std::vector< double > &parameter ( const typename Grid::template Codim< dimension >::Entity &vertex )
│ │ │ │ +
165 {
│ │ │ │ +
166 if( numParameters< dimension >() <= 0 )
│ │ │ │ +
167 {
│ │ │ │ +
168 DUNE_THROW( InvalidStateException,
│ │ │ │ +
169 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ +
170 }
│ │ │ │ +
171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
176 {
│ │ │ │ +
177 return dgf_.haveBndParameters;
│ │ │ │ +
178 }
│ │ │ │ +
│ │ │ │ +
179
│ │ │ │ +
181 template< class GG, class II >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
183 {
│ │ │ │ + │ │ │ │ +
185 typename Intersection::Entity entity = intersection.inside();
│ │ │ │ +
186 const int face = intersection.indexInInside();
│ │ │ │ +
187
│ │ │ │ +
188 auto refElem = referenceElement< double, dimension >( entity.type() );
│ │ │ │ +
189 int corners = refElem.size( face, 1, dimension );
│ │ │ │ +
190 std::vector< unsigned int > bound( corners );
│ │ │ │ +
191 for( int i = 0; i < corners; ++i )
│ │ │ │ +
192 {
│ │ │ │ +
193 const int k = refElem.subEntity( face, 1, i, dimension );
│ │ │ │ +
194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension >( k ) );
│ │ │ │ +
195 }
│ │ │ │ +
196
│ │ │ │ +
197 DuneGridFormatParser::facemap_t::key_type key( bound, false );
│ │ │ │ +
198 const DuneGridFormatParser::facemap_t::const_iterator pos = dgf_.facemap.find( key );
│ │ │ │ +
199 if( pos != dgf_.facemap.end() )
│ │ │ │ +
200 return dgf_.facemap.find( key )->second.second;
│ │ │ │ +
201 else
│ │ │ │ + │ │ │ │ +
203 }
│ │ │ │ +
│ │ │ │ +
204
│ │ │ │ +
205 private:
│ │ │ │ +
206 // create grid
│ │ │ │ +
207 void generate ( std::istream &input );
│ │ │ │ +
208
│ │ │ │ +
209 // return rank
│ │ │ │ +
210 static int rank( MPICommunicatorType MPICOMM )
│ │ │ │ +
211 {
│ │ │ │ +
212 int rank = 0;
│ │ │ │ +
213#if HAVE_MPI
│ │ │ │ +
214 MPI_Comm_rank( MPICOMM, &rank );
│ │ │ │ +
215#endif
│ │ │ │ +
216 return rank;
│ │ │ │ +
217 }
│ │ │ │
218
│ │ │ │ -
219 // write indentation for the data chunk
│ │ │ │ -
220 s << indent+1;
│ │ │ │ -
221 // store size, needs to be exactly 32 bit
│ │ │ │ -
222 std::uint32_t size = ncomps*nitems*typeSize(prec_);
│ │ │ │ -
223 b64.write(size);
│ │ │ │ -
224 b64.flush();
│ │ │ │ -
225 }
│ │ │ │ -
│ │ │ │ -
226
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
229 {
│ │ │ │ -
230 b64.flush();
│ │ │ │ -
231 // append newline to written data
│ │ │ │ -
232 s << "\n";
│ │ │ │ -
233 s << indent << "</DataArray>\n";
│ │ │ │ -
234 s.flush();
│ │ │ │ -
235 }
│ │ │ │ -
│ │ │ │ +
219 // return size
│ │ │ │ +
220 static int size( MPICommunicatorType MPICOMM )
│ │ │ │ +
221 {
│ │ │ │ +
222 int size = 1;
│ │ │ │ +
223#if HAVE_MPI
│ │ │ │ +
224 MPI_Comm_size( MPICOMM, &size );
│ │ │ │ +
225#endif
│ │ │ │ +
226 return size;
│ │ │ │ +
227 }
│ │ │ │ +
228
│ │ │ │ +
229 Grid *grid_;
│ │ │ │ +
230 GridFactory< UGGrid< dim > > factory_;
│ │ │ │ +
231 DuneGridFormatParser dgf_;
│ │ │ │ +
232 };
│ │ │ │ +
│ │ │ │ +
233#endif // #if HAVE_DUNE_UGGRID
│ │ │ │ +
234
│ │ │ │ +
235} // namespace Dune
│ │ │ │
236
│ │ │ │ -
237 private:
│ │ │ │ -
239 void writeFloat64 (double data) final
│ │ │ │ -
240 { write_(data); }
│ │ │ │ -
242 void writeFloat32 (float data) final
│ │ │ │ -
243 { write_(data); }
│ │ │ │ -
245 void writeInt32 (std::int32_t data) final
│ │ │ │ -
246 { write_(data); }
│ │ │ │ -
248 void writeUInt32 (std::uint32_t data) final
│ │ │ │ -
249 { write_(data); }
│ │ │ │ -
251 void writeUInt8 (std::uint8_t data) final
│ │ │ │ -
252 { write_(data); }
│ │ │ │ -
253
│ │ │ │ -
255 template<class T>
│ │ │ │ -
256 void write_(T data)
│ │ │ │ -
257 {
│ │ │ │ -
258 b64.write(data);
│ │ │ │ -
259 }
│ │ │ │ -
260
│ │ │ │ -
261 std::ostream& s;
│ │ │ │ -
262 Base64Stream b64;
│ │ │ │ -
263 const Indent& indent;
│ │ │ │ -
264 };
│ │ │ │ -
│ │ │ │ -
265
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
268 {
│ │ │ │ -
269 public:
│ │ │ │ -
271
│ │ │ │ -
│ │ │ │ -
283 AppendedRawDataArrayWriter(std::ostream& s, std::string name,
│ │ │ │ -
284 int ncomps, unsigned nitems, unsigned& offset,
│ │ │ │ -
285 const Indent& indent, Precision prec_)
│ │ │ │ -
286 : DataArrayWriter(prec_)
│ │ │ │ -
287 {
│ │ │ │ -
288 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ -
289 << "Name=\"" << name << "\" ";
│ │ │ │ -
290 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ -
291 s << "format=\"appended\" offset=\""<< offset << "\" />\n";
│ │ │ │ -
292 offset += 4; // header
│ │ │ │ -
293 offset += ncomps*nitems*typeSize(prec_);
│ │ │ │ -
294 }
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
297 bool writeIsNoop() const { return true; }
│ │ │ │ -
298
│ │ │ │ -
299 private:
│ │ │ │ -
301 void writeFloat64 (double) final {}
│ │ │ │ -
302 void writeFloat32 (float) final {}
│ │ │ │ -
303 void writeInt32 (std::int32_t) final {}
│ │ │ │ -
304 void writeUInt32 (std::uint32_t) final {}
│ │ │ │ -
305 void writeUInt8 (std::uint8_t) final {}
│ │ │ │ -
306 };
│ │ │ │ -
│ │ │ │ -
307
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
310 {
│ │ │ │ -
311 public:
│ │ │ │ -
313
│ │ │ │ -
│ │ │ │ -
325 AppendedBase64DataArrayWriter(std::ostream& s, std::string name,
│ │ │ │ -
326 int ncomps, unsigned nitems,
│ │ │ │ -
327 unsigned& offset, const Indent& indent, Precision prec_)
│ │ │ │ -
328 : DataArrayWriter(prec_)
│ │ │ │ -
329 {
│ │ │ │ -
330 s << indent << "<DataArray type=\"" << toString(prec_) << "\" "
│ │ │ │ -
331 << "Name=\"" << name << "\" ";
│ │ │ │ -
332 s << "NumberOfComponents=\"" << ncomps << "\" ";
│ │ │ │ -
333 s << "format=\"appended\" offset=\""<< offset << "\" />\n";
│ │ │ │ -
334 offset += 8; // header
│ │ │ │ -
335 std::size_t bytes = ncomps*nitems*typeSize(prec_);
│ │ │ │ -
336 offset += bytes/3*4;
│ │ │ │ -
337 if(bytes%3 != 0)
│ │ │ │ -
338 offset += 4;
│ │ │ │ -
339 }
│ │ │ │ -
│ │ │ │ -
340
│ │ │ │ -
342 bool writeIsNoop() const { return true; }
│ │ │ │ -
343
│ │ │ │ -
344 private:
│ │ │ │ -
346 void writeFloat64 (double) final {}
│ │ │ │ -
347 void writeFloat32 (float) final {}
│ │ │ │ -
348 void writeInt32 (std::int32_t) final {}
│ │ │ │ -
349 void writeUInt32 (std::uint32_t) final {}
│ │ │ │ -
350 void writeUInt8 (std::uint8_t) final {}
│ │ │ │ -
351 };
│ │ │ │ -
│ │ │ │ -
352
│ │ │ │ -
354 //
│ │ │ │ -
355 // Naked ArrayWriters for the appended section
│ │ │ │ -
356 //
│ │ │ │ -
357
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
360 {
│ │ │ │ -
361 public:
│ │ │ │ -
363
│ │ │ │ -
│ │ │ │ -
369 NakedBase64DataArrayWriter(std::ostream& theStream, int ncomps,
│ │ │ │ -
370 int nitems, Precision prec_)
│ │ │ │ -
371 : DataArrayWriter(prec_), b64(theStream)
│ │ │ │ -
372 {
│ │ │ │ -
373 // store size
│ │ │ │ -
374 std::uint32_t size = ncomps*nitems*typeSize(prec_);
│ │ │ │ -
375 b64.write(size);
│ │ │ │ -
376 b64.flush();
│ │ │ │ -
377 }
│ │ │ │ -
│ │ │ │ -
378
│ │ │ │ -
379 private:
│ │ │ │ -
381 void writeFloat64 (double data) final
│ │ │ │ -
382 { write_(data); }
│ │ │ │ -
384 void writeFloat32 (float data) final
│ │ │ │ -
385 { write_(data); }
│ │ │ │ -
387 void writeInt32 (std::int32_t data) final
│ │ │ │ -
388 { write_(data); }
│ │ │ │ -
390 void writeUInt32 (std::uint32_t data) final
│ │ │ │ -
391 { write_(data); }
│ │ │ │ -
393 void writeUInt8 (std::uint8_t data) final
│ │ │ │ -
394 { write_(data); }
│ │ │ │ -
395
│ │ │ │ -
397 template<class T>
│ │ │ │ -
398 void write_(T data)
│ │ │ │ -
399 {
│ │ │ │ -
400 b64.write(data);
│ │ │ │ -
401 }
│ │ │ │ -
402
│ │ │ │ -
403 Base64Stream b64;
│ │ │ │ -
404 };
│ │ │ │ -
│ │ │ │ -
405
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
408 {
│ │ │ │ -
409 RawStream s;
│ │ │ │ -
410
│ │ │ │ -
411 public:
│ │ │ │ -
413
│ │ │ │ -
│ │ │ │ -
419 NakedRawDataArrayWriter(std::ostream& theStream, int ncomps,
│ │ │ │ -
420 int nitems, Precision prec_)
│ │ │ │ -
421 : DataArrayWriter(prec_), s(theStream)
│ │ │ │ -
422 {
│ │ │ │ -
423 s.write((unsigned int)(ncomps*nitems*typeSize(prec_)));
│ │ │ │ -
424 }
│ │ │ │ -
│ │ │ │ -
425
│ │ │ │ -
426 private:
│ │ │ │ -
428 void writeFloat64 (double data) final
│ │ │ │ -
429 { write_(data); }
│ │ │ │ -
431 void writeFloat32 (float data) final
│ │ │ │ -
432 { write_(data); }
│ │ │ │ -
434 void writeInt32 (std::int32_t data) final
│ │ │ │ -
435 { write_(data); }
│ │ │ │ -
437 void writeUInt32 (std::uint32_t data) final
│ │ │ │ -
438 { write_(data); }
│ │ │ │ -
440 void writeUInt8 (std::uint8_t data) final
│ │ │ │ -
441 { write_(data); }
│ │ │ │ -
442
│ │ │ │ -
444 template<class T>
│ │ │ │ -
445 void write_(T data)
│ │ │ │ -
446 {
│ │ │ │ -
447 s.write(data);
│ │ │ │ -
448 }
│ │ │ │ -
449 };
│ │ │ │ -
│ │ │ │ -
450
│ │ │ │ -
452 //
│ │ │ │ -
453 // Factory
│ │ │ │ -
454 //
│ │ │ │ -
455
│ │ │ │ -
457
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
463 enum Phase { main, appended };
│ │ │ │ -
464
│ │ │ │ -
465 OutputType type;
│ │ │ │ -
466 std::ostream& stream;
│ │ │ │ -
467 unsigned offset;
│ │ │ │ -
469 Phase phase;
│ │ │ │ -
470
│ │ │ │ -
471 public:
│ │ │ │ -
473
│ │ │ │ -
│ │ │ │ -
482 inline DataArrayWriterFactory(OutputType type_, std::ostream& stream_)
│ │ │ │ -
483 : type(type_), stream(stream_), offset(0), phase(main)
│ │ │ │ -
484 { }
│ │ │ │ -
│ │ │ │ -
485
│ │ │ │ -
487
│ │ │ │ -
│ │ │ │ -
497 inline bool beginAppended() {
│ │ │ │ -
498 phase = appended;
│ │ │ │ -
499 switch(type) {
│ │ │ │ -
500 case ascii : return false;
│ │ │ │ -
501 case base64 : return false;
│ │ │ │ -
502 case appendedraw : return true;
│ │ │ │ -
503 case appendedbase64 : return true;
│ │ │ │ -
504 }
│ │ │ │ -
505 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
│ │ │ │ -
506 "OutputType " << type);
│ │ │ │ -
507 }
│ │ │ │ -
│ │ │ │ -
508
│ │ │ │ -
│ │ │ │ -
510 const std::string& appendedEncoding() const {
│ │ │ │ -
511 static const std::string rawString = "raw";
│ │ │ │ -
512 static const std::string base64String = "base64";
│ │ │ │ -
513
│ │ │ │ -
514 switch(type) {
│ │ │ │ -
515 case ascii :
│ │ │ │ -
516 case base64 :
│ │ │ │ -
517 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): No "
│ │ │ │ -
518 "appended encoding for OutputType " << type);
│ │ │ │ -
519 case appendedraw : return rawString;
│ │ │ │ -
520 case appendedbase64 : return base64String;
│ │ │ │ -
521 }
│ │ │ │ -
522 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): "
│ │ │ │ -
523 "unsupported OutputType " << type);
│ │ │ │ -
524 }
│ │ │ │ -
│ │ │ │ -
525
│ │ │ │ -
527
│ │ │ │ -
│ │ │ │ -
541 DataArrayWriter* make(const std::string& name, unsigned ncomps,
│ │ │ │ -
542 unsigned nitems, const Indent& indent,
│ │ │ │ -
543 Precision prec)
│ │ │ │ -
544 {
│ │ │ │ -
545 switch(phase) {
│ │ │ │ -
546 case main :
│ │ │ │ -
547 switch(type) {
│ │ │ │ -
548 case ascii :
│ │ │ │ -
549 return new AsciiDataArrayWriter(stream, name, ncomps, indent, prec);
│ │ │ │ -
550 case base64 :
│ │ │ │ -
551 return new BinaryDataArrayWriter(stream, name, ncomps, nitems,
│ │ │ │ -
552 indent, prec);
│ │ │ │ -
553 case appendedraw :
│ │ │ │ -
554 return new AppendedRawDataArrayWriter(stream, name, ncomps,
│ │ │ │ -
555 nitems, offset, indent, prec);
│ │ │ │ -
556 case appendedbase64 :
│ │ │ │ -
557 return new AppendedBase64DataArrayWriter(stream, name, ncomps,
│ │ │ │ -
558 nitems, offset,
│ │ │ │ -
559 indent, prec);
│ │ │ │ -
560 }
│ │ │ │ -
561 break;
│ │ │ │ -
562 case appended :
│ │ │ │ -
563 switch(type) {
│ │ │ │ -
564 case ascii :
│ │ │ │ -
565 case base64 :
│ │ │ │ -
566 break; // invlid in appended mode
│ │ │ │ -
567 case appendedraw :
│ │ │ │ -
568 return new NakedRawDataArrayWriter(stream, ncomps, nitems, prec);
│ │ │ │ -
569 case appendedbase64 :
│ │ │ │ -
570 return new NakedBase64DataArrayWriter(stream, ncomps, nitems, prec);
│ │ │ │ -
571 }
│ │ │ │ -
572 break;
│ │ │ │ -
573 }
│ │ │ │ -
574 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
│ │ │ │ -
575 "OutputType " << type << " in phase " << phase);
│ │ │ │ -
576 }
│ │ │ │ -
│ │ │ │ -
577 };
│ │ │ │ -
│ │ │ │ -
578
│ │ │ │ -
579 } // namespace VTK
│ │ │ │ -
580
│ │ │ │ -
582
│ │ │ │ -
583} // namespace Dune
│ │ │ │ -
584
│ │ │ │ -
585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
│ │ │ │ - │ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ +
237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ + │ │ │ │ +
The UGGrid class.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ -
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ -
@ appendedraw
Output is to the file is appended raw binary.
Definition common.hh:49
│ │ │ │ -
@ appendedbase64
Output is to the file is appended base64 binary.
Definition common.hh:51
│ │ │ │ -
@ base64
Output to the file is inline base64 binary.
Definition common.hh:47
│ │ │ │ -
std::string toString(Precision p)
map precision to VTK type name
Definition common.hh:280
│ │ │ │ -
std::size_t typeSize(Precision p)
map precision to byte size
Definition common.hh:300
│ │ │ │ -
T Type
type to convert T to before putting it into a stream with <<
Definition common.hh:97
│ │ │ │ -
base class for data array writers
Definition dataarraywriter.hh:56
│ │ │ │ -
void write(T data)
write one element of data
Definition dataarraywriter.hh:69
│ │ │ │ -
DataArrayWriter(Precision _prec)
construct a data array writer
Definition dataarraywriter.hh:63
│ │ │ │ -
virtual bool writeIsNoop() const
whether calls to write may be skipped
Definition dataarraywriter.hh:89
│ │ │ │ -
virtual ~DataArrayWriter()
virtual destructor
Definition dataarraywriter.hh:91
│ │ │ │ -
a streaming writer for data array tags, uses ASCII inline format
Definition dataarraywriter.hh:110
│ │ │ │ -
~AsciiDataArrayWriter()
finish output; writes end tag
Definition dataarraywriter.hh:133
│ │ │ │ -
AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, const Indent &indent_, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:121
│ │ │ │ -
a streaming writer for data array tags, uses binary inline format
Definition dataarraywriter.hh:197
│ │ │ │ -
~BinaryDataArrayWriter()
finish output; writes end tag
Definition dataarraywriter.hh:228
│ │ │ │ -
BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, int nitems, const Indent &indent_, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:210
│ │ │ │ -
a streaming writer for data array tags, uses appended raw format
Definition dataarraywriter.hh:268
│ │ │ │ -
AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:283
│ │ │ │ -
bool writeIsNoop() const
whether calls to write may be skipped
Definition dataarraywriter.hh:297
│ │ │ │ -
a streaming writer for data array tags, uses appended base64 format
Definition dataarraywriter.hh:310
│ │ │ │ -
AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:325
│ │ │ │ -
bool writeIsNoop() const
whether calls to write may be skipped
Definition dataarraywriter.hh:342
│ │ │ │ -
a streaming writer for appended data array tags, uses base64 format
Definition dataarraywriter.hh:360
│ │ │ │ -
NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:369
│ │ │ │ -
a streaming writer for appended data arrays, uses raw format
Definition dataarraywriter.hh:408
│ │ │ │ -
NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
make a new data array writer
Definition dataarraywriter.hh:419
│ │ │ │ -
a factory for DataArrayWriters
Definition dataarraywriter.hh:462
│ │ │ │ -
bool beginAppended()
signal start of the appended section
Definition dataarraywriter.hh:497
│ │ │ │ -
DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
create a DataArrayWriter
Definition dataarraywriter.hh:541
│ │ │ │ -
DataArrayWriterFactory(OutputType type_, std::ostream &stream_)
create a DataArrayWriterFactory
Definition dataarraywriter.hh:482
│ │ │ │ -
const std::string & appendedEncoding() const
query encoding string for appended data
Definition dataarraywriter.hh:510
│ │ │ │ -
void write(X &data)
encode a data item
Definition streams.hh:42
│ │ │ │ -
void flush()
flush the current unwritten data to the stream.
Definition streams.hh:64
│ │ │ │ -
write out data in binary
Definition streams.hh:84
│ │ │ │ -
void write(T data)
write data to stream
Definition streams.hh:93
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ +
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │ +
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:236
│ │ │ │ +
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition common/intersection.hh:250
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition common/intersection.hh:192
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
Common Grid parameters.
Definition gridparameter.hh:35
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ +
Definition dgfug.hh:39
│ │ │ │ +
size_t heapSize() const
returns heap size used on construction of the grid
Definition dgfug.hh:48
│ │ │ │ +
bool noCopy_
Definition dgfug.hh:52
│ │ │ │ +
size_t heapSize_
Definition dgfug.hh:53
│ │ │ │ +
bool noClosure_
Definition dgfug.hh:51
│ │ │ │ +
bool noCopy() const
returns true if no copies are made for UGGrid elements
Definition dgfug.hh:46
│ │ │ │ +
bool noClosure() const
returns true if no closure should be used for UGGrid
Definition dgfug.hh:44
│ │ │ │ +
static double refineWeight()
Definition dgfug.hh:69
│ │ │ │ +
static int refineStepsForHalf()
Definition dgfug.hh:64
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
return invalid value
Definition dgfug.hh:182
│ │ │ │ +
std::vector< double > & parameter(const typename Grid::template Codim< dimension >::Entity &vertex)
return parameter for vertex
Definition dgfug.hh:164
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking filename
Definition dgfug.hh:101
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
MPI communicator type.
Definition dgfug.hh:88
│ │ │ │ +
int numParameters(const Entity &) const
return number of parameters
Definition dgfug.hh:147
│ │ │ │ +
int boundaryId(const Dune::Intersection< GG, II > &intersection) const
will return boundary segment index
Definition dgfug.hh:128
│ │ │ │ +
UGGrid< dim > Grid
grid type
Definition dgfug.hh:84
│ │ │ │ +
bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
please doc me
Definition dgfug.hh:121
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking istream
Definition dgfug.hh:91
│ │ │ │ +
int numParameters() const
return number of parameters
Definition dgfug.hh:135
│ │ │ │ +
bool haveBoundaryParameters() const
UGGrid does not support boundary parameters.
Definition dgfug.hh:175
│ │ │ │ +
std::vector< double > & parameter(const typename Grid::template Codim< 0 >::Entity &element)
return parameter for codim 0 entity
Definition dgfug.hh:153
│ │ │ │ +
Grid * grid()
return grid
Definition dgfug.hh:114
│ │ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
Front-end for the grid manager of the finite element toolbox UG3.
Definition uggrid.hh:207
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,598 +2,393 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -dataarraywriter.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfug.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ +5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH │ │ │ │ │ +6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH │ │ │ │ │ +7 │ │ │ │ │ +8//- C++ includes │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14//- dune-common includes │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ 18 │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -30namespace _D_u_n_e │ │ │ │ │ -31{ │ │ │ │ │ -34 │ │ │ │ │ -35 namespace VTK { │ │ │ │ │ +19//- dune-grid includes │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +21#include <_d_u_n_e_/_g_r_i_d_/_u_g_g_r_i_d_._h_h> │ │ │ │ │ +22 │ │ │ │ │ +23//- local includes │ │ │ │ │ +24#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ +25#include "_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h" │ │ │ │ │ +26 │ │ │ │ │ +27 │ │ │ │ │ +28namespace _D_u_n_e │ │ │ │ │ +29{ │ │ │ │ │ +30 │ │ │ │ │ +31 namespace dgf │ │ │ │ │ +32 { │ │ │ │ │ +33 │ │ │ │ │ +34 // UGGridParameterBlock │ │ │ │ │ +35 // -------------------- │ │ │ │ │ 36 │ │ │ │ │ -38 │ │ │ │ │ -_5_5 class _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -56 { │ │ │ │ │ -57 public: │ │ │ │ │ +_3_7 struct _U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +38 : public _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +39 { │ │ │ │ │ +41 explicit _U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &input ); │ │ │ │ │ +42 │ │ │ │ │ +_4_4 bool _n_o_C_l_o_s_u_r_e () const { return _n_o_C_l_o_s_u_r_e__; } │ │ │ │ │ +_4_6 bool _n_o_C_o_p_y () const { return _n_o_C_o_p_y__; } │ │ │ │ │ +_4_8 size_t _h_e_a_p_S_i_z_e () const { return _h_e_a_p_S_i_z_e__; } │ │ │ │ │ +49 │ │ │ │ │ +50 protected: │ │ │ │ │ +_5_1 bool _n_o_C_l_o_s_u_r_e__; // no closure for UGGrid │ │ │ │ │ +_5_2 bool _n_o_C_o_p_y__; // no copies for UGGrid │ │ │ │ │ +_5_3 size_t _h_e_a_p_S_i_z_e__; // heap size for UGGrid │ │ │ │ │ +54 }; │ │ │ │ │ +55 │ │ │ │ │ +56 } // namespace dgf │ │ │ │ │ +57 │ │ │ │ │ +58 │ │ │ │ │ 59 │ │ │ │ │ -_6_3 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(_P_r_e_c_i_s_i_o_n _prec) │ │ │ │ │ -64 : prec(_prec) │ │ │ │ │ -65 {} │ │ │ │ │ -66 │ │ │ │ │ -68 template │ │ │ │ │ -_6_9 void _w_r_i_t_e(T data) │ │ │ │ │ +60#if HAVE_DUNE_UGGRID │ │ │ │ │ +61 template< int dim > │ │ │ │ │ +_6_2 struct _D_G_F_G_r_i_d_I_n_f_o< _U_G_G_r_i_d< dim > > │ │ │ │ │ +63 { │ │ │ │ │ +_6_4 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ +65 { │ │ │ │ │ +66 return 1; │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +_6_9 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ 70 { │ │ │ │ │ -71 switch(prec) │ │ │ │ │ -72 { │ │ │ │ │ -73 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2: │ │ │ │ │ -74 writeFloat32(data); break; │ │ │ │ │ -75 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4: │ │ │ │ │ -76 writeFloat64(data); break; │ │ │ │ │ -77 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2: │ │ │ │ │ -78 writeUInt32(data); break; │ │ │ │ │ -79 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8: │ │ │ │ │ -80 writeUInt8(data); break; │ │ │ │ │ -81 case _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2: │ │ │ │ │ -82 writeInt32(data); break; │ │ │ │ │ -83 default: │ │ │ │ │ -84 DUNE_THROW(Dune::NotImplemented, "Unknown precision type"); │ │ │ │ │ -85 } │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -_8_9 virtual bool _w_r_i_t_e_I_s_N_o_o_p() const { return false; } │ │ │ │ │ -_9_1 virtual _~_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r () {} │ │ │ │ │ -92 │ │ │ │ │ -93 private: │ │ │ │ │ -95 virtual void writeFloat32 (float data) = 0; │ │ │ │ │ -97 virtual void writeFloat64 (double data) = 0; │ │ │ │ │ -99 virtual void writeInt32 (std::int32_t data) = 0; │ │ │ │ │ -101 virtual void writeUInt8 (std::uint8_t data) = 0; │ │ │ │ │ -103 virtual void writeUInt32 (std::uint32_t data) = 0; │ │ │ │ │ -104 │ │ │ │ │ -105 _P_r_e_c_i_s_i_o_n prec; │ │ │ │ │ -106 }; │ │ │ │ │ -107 │ │ │ │ │ -_1_0_9 class _A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -110 { │ │ │ │ │ -111 public: │ │ │ │ │ -113 │ │ │ │ │ -_1_2_1 _A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, std::string name, │ │ │ │ │ -122 int ncomps, const Indent& indent_, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ -123 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), s(theStream), counter(0), numPerLine(12), indent │ │ │ │ │ -(indent_) │ │ │ │ │ -124 { │ │ │ │ │ -125 s << indent << "\n"; │ │ │ │ │ -129 ++indent; │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -_1_3_3 _~_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r () │ │ │ │ │ -134 { │ │ │ │ │ -135 if (counter%numPerLine!=0) s << "\n"; │ │ │ │ │ -136 --indent; │ │ │ │ │ -137 s << indent << "\n"; │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -140 private: │ │ │ │ │ -142 void writeFloat64 (double data) final │ │ │ │ │ -143 { write_float(data); } │ │ │ │ │ -145 void writeFloat32 (float data) final │ │ │ │ │ -146 { write_float(data); } │ │ │ │ │ -148 void writeInt32 (std::int32_t data) final │ │ │ │ │ -149 { write_(data); } │ │ │ │ │ -151 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ -152 { write_(data); } │ │ │ │ │ -154 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ -155 { write_(data); } │ │ │ │ │ -156 │ │ │ │ │ -157 template │ │ │ │ │ -158 void write_(T data) │ │ │ │ │ -159 { │ │ │ │ │ -160 typedef typename _P_r_i_n_t_T_y_p_e_<_T_>_:_:_T_y_p_e PT; │ │ │ │ │ -161 if(counter%numPerLine==0) s << indent; │ │ │ │ │ -162 else s << " "; │ │ │ │ │ -163 const auto original_precision = std::cout.precision(); │ │ │ │ │ -164 s << std::setprecision(std::numeric_limits::digits10) << (PT) data; │ │ │ │ │ -165 std::cout.precision(original_precision); │ │ │ │ │ -166 counter++; │ │ │ │ │ -167 if (counter%numPerLine==0) s << "\n"; │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -170 template │ │ │ │ │ -171 void write_float(T data) │ │ │ │ │ -172 { │ │ │ │ │ -173 typedef typename _P_r_i_n_t_T_y_p_e_<_T_>_:_:_T_y_p_e PT; │ │ │ │ │ -174 if(counter%numPerLine==0) s << indent; │ │ │ │ │ -175 else s << " "; │ │ │ │ │ -176 PT out_data = (PT) data; │ │ │ │ │ -177 if (std::fpclassify(out_data) == FP_SUBNORMAL) │ │ │ │ │ -178 { │ │ │ │ │ -179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS │ │ │ │ │ -180 out_data = 0; │ │ │ │ │ -181 } │ │ │ │ │ -182 const auto original_precision = std::cout.precision(); │ │ │ │ │ -183 s << std::setprecision(std::numeric_limits::digits10) << out_data; │ │ │ │ │ -184 std::cout.precision(original_precision); │ │ │ │ │ -185 counter++; │ │ │ │ │ -186 if (counter%numPerLine==0) s << "\n"; │ │ │ │ │ -187 } │ │ │ │ │ -188 │ │ │ │ │ -189 std::ostream& s; │ │ │ │ │ -190 int counter; │ │ │ │ │ -191 int numPerLine; │ │ │ │ │ -192 Indent indent; │ │ │ │ │ -193 }; │ │ │ │ │ -194 │ │ │ │ │ -_1_9_6 class _B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -197 { │ │ │ │ │ -198 public: │ │ │ │ │ -200 │ │ │ │ │ -_2_1_0 _B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, std::string name, │ │ │ │ │ -211 int ncomps, int nitems, const Indent& indent_, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ -212 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), s(theStream), b64(theStream), indent(indent_) │ │ │ │ │ -213 { │ │ │ │ │ -214 s << indent << "\n"; │ │ │ │ │ +71 return -1.; │ │ │ │ │ +72 } │ │ │ │ │ +73 }; │ │ │ │ │ +74 │ │ │ │ │ +75 │ │ │ │ │ +76 │ │ │ │ │ +77 // DGFGridFactory< UGGrid< dim > > │ │ │ │ │ +78 // ------------------------------- │ │ │ │ │ +79 │ │ │ │ │ +80 template< int dim > │ │ │ │ │ +_8_1 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _U_G_G_r_i_d< dim > > │ │ │ │ │ +82 { │ │ │ │ │ +_8_4 typedef _U_G_G_r_i_d_<_ _d_i_m_ _> _G_r_i_d; │ │ │ │ │ +_8_6 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_8_8 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +89 │ │ │ │ │ +_9_1 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +92 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +93 : grid_( 0 ), │ │ │ │ │ +94 factory_(), │ │ │ │ │ +95 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ +96 { │ │ │ │ │ +97 generate( input ); │ │ │ │ │ +98 } │ │ │ │ │ +99 │ │ │ │ │ +_1_0_1 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +102 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +103 : grid_( 0 ), │ │ │ │ │ +104 factory_(), │ │ │ │ │ +105 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ +106 { │ │ │ │ │ +107 std::ifstream input( filename.c_str() ); │ │ │ │ │ +108 if ( !input ) │ │ │ │ │ +109 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error: Macrofile " << filename << " not found" │ │ │ │ │ +); │ │ │ │ │ +110 generate( input ); │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +_1_1_4 _G_r_i_d *_g_r_i_d () │ │ │ │ │ +115 { │ │ │ │ │ +116 return grid_; │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +120 template< class GG, class II > │ │ │ │ │ +_1_2_1 bool _w_a_s_I_n_s_e_r_t_e_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ +122 { │ │ │ │ │ +123 return factory_.wasInserted( intersection ); │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +127 template< class GG, class II > │ │ │ │ │ +_1_2_8 int _b_o_u_n_d_a_r_y_I_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ +129 { │ │ │ │ │ +130 return intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x(); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +134 template< int codim > │ │ │ │ │ +_1_3_5 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +136 { │ │ │ │ │ +137 if( codim == 0 ) │ │ │ │ │ +138 return dgf_.nofelparams; │ │ │ │ │ +139 else if( codim == _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ +140 return dgf_.nofvtxparams; │ │ │ │ │ +141 else │ │ │ │ │ +142 return 0; │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +146 template< class Entity > │ │ │ │ │ +_1_4_7 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ +148 { │ │ │ │ │ +149 return numParameters< Entity::codimension >(); │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +_1_5_3 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 │ │ │ │ │ +>::Entity &element ) │ │ │ │ │ +154 { │ │ │ │ │ +155 if( numParameters< 0 >() <= 0 ) │ │ │ │ │ +156 { │ │ │ │ │ +157 DUNE_THROW( InvalidStateException, │ │ │ │ │ +158 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ +parameters." ); │ │ │ │ │ +159 } │ │ │ │ │ +160 return dgf_.elParams[ factory_.insertionIndex( element ) ]; │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +_1_6_4 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< │ │ │ │ │ +dimension >::Entity &vertex ) │ │ │ │ │ +165 { │ │ │ │ │ +166 if( numParameters< dimension >() <= 0 ) │ │ │ │ │ +167 { │ │ │ │ │ +168 DUNE_THROW( InvalidStateException, │ │ │ │ │ +169 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ +parameters." ); │ │ │ │ │ +170 } │ │ │ │ │ +171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ]; │ │ │ │ │ +172 } │ │ │ │ │ +173 │ │ │ │ │ +_1_7_5 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +176 { │ │ │ │ │ +177 return dgf_.haveBndParameters; │ │ │ │ │ +178 } │ │ │ │ │ +179 │ │ │ │ │ +181 template< class GG, class II > │ │ │ │ │ +_1_8_2 const _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e &_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _D_u_n_e_:_: │ │ │ │ │ +_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ +183 { │ │ │ │ │ +184 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +185 typename _I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y entity = intersection._i_n_s_i_d_e(); │ │ │ │ │ +186 const int face = intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ +187 │ │ │ │ │ +188 auto refElem = referenceElement< double, dimension >( entity.type() ); │ │ │ │ │ +189 int corners = refElem.size( face, 1, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +190 std::vector< unsigned int > bound( corners ); │ │ │ │ │ +191 for( int i = 0; i < corners; ++i ) │ │ │ │ │ +192 { │ │ │ │ │ +193 const int k = refElem.subEntity( face, 1, i, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension │ │ │ │ │ +>( k ) ); │ │ │ │ │ +195 } │ │ │ │ │ +196 │ │ │ │ │ +197 DuneGridFormatParser::facemap_t::key_type key( bound, false ); │ │ │ │ │ +198 const DuneGridFormatParser::facemap_t::const_iterator pos = │ │ │ │ │ +dgf_.facemap.find( key ); │ │ │ │ │ +199 if( pos != dgf_.facemap.end() ) │ │ │ │ │ +200 return dgf_.facemap.find( key )->second.second; │ │ │ │ │ +201 else │ │ │ │ │ +202 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +203 } │ │ │ │ │ +204 │ │ │ │ │ +205 private: │ │ │ │ │ +206 // create grid │ │ │ │ │ +207 void generate ( std::istream &input ); │ │ │ │ │ +208 │ │ │ │ │ +209 // return rank │ │ │ │ │ +210 static int rank( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ +211 { │ │ │ │ │ +212 int rank = 0; │ │ │ │ │ +213#if HAVE_MPI │ │ │ │ │ +214 MPI_Comm_rank( MPICOMM, &rank ); │ │ │ │ │ +215#endif │ │ │ │ │ +216 return rank; │ │ │ │ │ +217 } │ │ │ │ │ 218 │ │ │ │ │ -219 // write indentation for the data chunk │ │ │ │ │ -220 s << indent+1; │ │ │ │ │ -221 // store size, needs to be exactly 32 bit │ │ │ │ │ -222 std::uint32_t size = ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ -223 b64._w_r_i_t_e(size); │ │ │ │ │ -224 b64._f_l_u_s_h(); │ │ │ │ │ -225 } │ │ │ │ │ -226 │ │ │ │ │ -_2_2_8 _~_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r () │ │ │ │ │ -229 { │ │ │ │ │ -230 b64._f_l_u_s_h(); │ │ │ │ │ -231 // append newline to written data │ │ │ │ │ -232 s << "\n"; │ │ │ │ │ -233 s << indent << "\n"; │ │ │ │ │ -234 s.flush(); │ │ │ │ │ -235 } │ │ │ │ │ +219 // return size │ │ │ │ │ +220 static int size( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ +221 { │ │ │ │ │ +222 int size = 1; │ │ │ │ │ +223#if HAVE_MPI │ │ │ │ │ +224 MPI_Comm_size( MPICOMM, &size ); │ │ │ │ │ +225#endif │ │ │ │ │ +226 return size; │ │ │ │ │ +227 } │ │ │ │ │ +228 │ │ │ │ │ +229 _G_r_i_d *grid_; │ │ │ │ │ +230 GridFactory< UGGrid< dim > > factory_; │ │ │ │ │ +231 DuneGridFormatParser dgf_; │ │ │ │ │ +232 }; │ │ │ │ │ +233#endif // #if HAVE_DUNE_UGGRID │ │ │ │ │ +234 │ │ │ │ │ +235} // namespace Dune │ │ │ │ │ 236 │ │ │ │ │ -237 private: │ │ │ │ │ -239 void writeFloat64 (double data) final │ │ │ │ │ -240 { write_(data); } │ │ │ │ │ -242 void writeFloat32 (float data) final │ │ │ │ │ -243 { write_(data); } │ │ │ │ │ -245 void writeInt32 (std::int32_t data) final │ │ │ │ │ -246 { write_(data); } │ │ │ │ │ -248 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ -249 { write_(data); } │ │ │ │ │ -251 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ -252 { write_(data); } │ │ │ │ │ -253 │ │ │ │ │ -255 template │ │ │ │ │ -256 void write_(T data) │ │ │ │ │ -257 { │ │ │ │ │ -258 b64._w_r_i_t_e(data); │ │ │ │ │ -259 } │ │ │ │ │ -260 │ │ │ │ │ -261 std::ostream& s; │ │ │ │ │ -262 Base64Stream b64; │ │ │ │ │ -263 const Indent& indent; │ │ │ │ │ -264 }; │ │ │ │ │ -265 │ │ │ │ │ -_2_6_7 class _A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -268 { │ │ │ │ │ -269 public: │ │ │ │ │ -271 │ │ │ │ │ -_2_8_3 _A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& s, std::string name, │ │ │ │ │ -284 int ncomps, unsigned nitems, unsigned& offset, │ │ │ │ │ -285 const Indent& indent, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ -286 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_) │ │ │ │ │ -287 { │ │ │ │ │ -288 s << indent << "\n"; │ │ │ │ │ -292 offset += 4; // header │ │ │ │ │ -293 offset += ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ -294 } │ │ │ │ │ -295 │ │ │ │ │ -_2_9_7 bool _w_r_i_t_e_I_s_N_o_o_p() const { return true; } │ │ │ │ │ -298 │ │ │ │ │ -299 private: │ │ │ │ │ -301 void writeFloat64 (double) final {} │ │ │ │ │ -302 void writeFloat32 (float) final {} │ │ │ │ │ -303 void writeInt32 (std::int32_t) final {} │ │ │ │ │ -304 void writeUInt32 (std::uint32_t) final {} │ │ │ │ │ -305 void writeUInt8 (std::uint8_t) final {} │ │ │ │ │ -306 }; │ │ │ │ │ -307 │ │ │ │ │ -_3_0_9 class _A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -310 { │ │ │ │ │ -311 public: │ │ │ │ │ -313 │ │ │ │ │ -_3_2_5 _A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& s, std::string name, │ │ │ │ │ -326 int ncomps, unsigned nitems, │ │ │ │ │ -327 unsigned& offset, const Indent& indent, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ -328 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_) │ │ │ │ │ -329 { │ │ │ │ │ -330 s << indent << "\n"; │ │ │ │ │ -334 offset += 8; // header │ │ │ │ │ -335 std::size_t bytes = ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ -336 offset += bytes/3*4; │ │ │ │ │ -337 if(bytes%3 != 0) │ │ │ │ │ -338 offset += 4; │ │ │ │ │ -339 } │ │ │ │ │ -340 │ │ │ │ │ -_3_4_2 bool _w_r_i_t_e_I_s_N_o_o_p() const { return true; } │ │ │ │ │ -343 │ │ │ │ │ -344 private: │ │ │ │ │ -346 void writeFloat64 (double) final {} │ │ │ │ │ -347 void writeFloat32 (float) final {} │ │ │ │ │ -348 void writeInt32 (std::int32_t) final {} │ │ │ │ │ -349 void writeUInt32 (std::uint32_t) final {} │ │ │ │ │ -350 void writeUInt8 (std::uint8_t) final {} │ │ │ │ │ -351 }; │ │ │ │ │ -352 │ │ │ │ │ -354 // │ │ │ │ │ -355 // Naked ArrayWriters for the appended section │ │ │ │ │ -356 // │ │ │ │ │ -357 │ │ │ │ │ -_3_5_9 class _N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -360 { │ │ │ │ │ -361 public: │ │ │ │ │ -363 │ │ │ │ │ -_3_6_9 _N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, int ncomps, │ │ │ │ │ -370 int nitems, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ -371 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), b64(theStream) │ │ │ │ │ -372 { │ │ │ │ │ -373 // store size │ │ │ │ │ -374 std::uint32_t size = ncomps*nitems*_t_y_p_e_S_i_z_e(prec_); │ │ │ │ │ -375 b64._w_r_i_t_e(size); │ │ │ │ │ -376 b64._f_l_u_s_h(); │ │ │ │ │ -377 } │ │ │ │ │ -378 │ │ │ │ │ -379 private: │ │ │ │ │ -381 void writeFloat64 (double data) final │ │ │ │ │ -382 { write_(data); } │ │ │ │ │ -384 void writeFloat32 (float data) final │ │ │ │ │ -385 { write_(data); } │ │ │ │ │ -387 void writeInt32 (std::int32_t data) final │ │ │ │ │ -388 { write_(data); } │ │ │ │ │ -390 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ -391 { write_(data); } │ │ │ │ │ -393 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ -394 { write_(data); } │ │ │ │ │ -395 │ │ │ │ │ -397 template │ │ │ │ │ -398 void write_(T data) │ │ │ │ │ -399 { │ │ │ │ │ -400 b64._w_r_i_t_e(data); │ │ │ │ │ -401 } │ │ │ │ │ -402 │ │ │ │ │ -403 Base64Stream b64; │ │ │ │ │ -404 }; │ │ │ │ │ -405 │ │ │ │ │ -_4_0_7 class _N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r : public _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -408 { │ │ │ │ │ -409 _R_a_w_S_t_r_e_a_m s; │ │ │ │ │ -410 │ │ │ │ │ -411 public: │ │ │ │ │ -413 │ │ │ │ │ -_4_1_9 _N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(std::ostream& theStream, int ncomps, │ │ │ │ │ -420 int nitems, _P_r_e_c_i_s_i_o_n prec_) │ │ │ │ │ -421 : _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(prec_), s(theStream) │ │ │ │ │ -422 { │ │ │ │ │ -423 s._w_r_i_t_e((unsigned int)(ncomps*nitems*_t_y_p_e_S_i_z_e(prec_))); │ │ │ │ │ -424 } │ │ │ │ │ -425 │ │ │ │ │ -426 private: │ │ │ │ │ -428 void writeFloat64 (double data) final │ │ │ │ │ -429 { write_(data); } │ │ │ │ │ -431 void writeFloat32 (float data) final │ │ │ │ │ -432 { write_(data); } │ │ │ │ │ -434 void writeInt32 (std::int32_t data) final │ │ │ │ │ -435 { write_(data); } │ │ │ │ │ -437 void writeUInt32 (std::uint32_t data) final │ │ │ │ │ -438 { write_(data); } │ │ │ │ │ -440 void writeUInt8 (std::uint8_t data) final │ │ │ │ │ -441 { write_(data); } │ │ │ │ │ -442 │ │ │ │ │ -444 template │ │ │ │ │ -445 void write_(T data) │ │ │ │ │ -446 { │ │ │ │ │ -447 s._w_r_i_t_e(data); │ │ │ │ │ -448 } │ │ │ │ │ -449 }; │ │ │ │ │ -450 │ │ │ │ │ -452 // │ │ │ │ │ -453 // Factory │ │ │ │ │ -454 // │ │ │ │ │ -455 │ │ │ │ │ -457 │ │ │ │ │ -_4_6_2 class _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y { │ │ │ │ │ -463 enum Phase { main, appended }; │ │ │ │ │ -464 │ │ │ │ │ -465 _O_u_t_p_u_t_T_y_p_e type; │ │ │ │ │ -466 std::ostream& stream; │ │ │ │ │ -467 unsigned offset; │ │ │ │ │ -469 Phase phase; │ │ │ │ │ -470 │ │ │ │ │ -471 public: │ │ │ │ │ -473 │ │ │ │ │ -_4_8_2 inline _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y(_O_u_t_p_u_t_T_y_p_e type_, std::ostream& stream_) │ │ │ │ │ -483 : type(type_), stream(stream_), offset(0), phase(main) │ │ │ │ │ -484 { } │ │ │ │ │ -485 │ │ │ │ │ -487 │ │ │ │ │ -_4_9_7 inline bool _b_e_g_i_n_A_p_p_e_n_d_e_d() { │ │ │ │ │ -498 phase = appended; │ │ │ │ │ -499 switch(type) { │ │ │ │ │ -500 case _a_s_c_i_i : return false; │ │ │ │ │ -501 case _b_a_s_e_6_4 : return false; │ │ │ │ │ -502 case _a_p_p_e_n_d_e_d_r_a_w : return true; │ │ │ │ │ -503 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : return true; │ │ │ │ │ -504 } │ │ │ │ │ -505 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported " │ │ │ │ │ -506 "OutputType " << type); │ │ │ │ │ -507 } │ │ │ │ │ -508 │ │ │ │ │ -_5_1_0 const std::string& _a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g() const { │ │ │ │ │ -511 static const std::string rawString = "raw"; │ │ │ │ │ -512 static const std::string base64String = "base64"; │ │ │ │ │ -513 │ │ │ │ │ -514 switch(type) { │ │ │ │ │ -515 case _a_s_c_i_i : │ │ │ │ │ -516 case _b_a_s_e_6_4 : │ │ │ │ │ -517 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): No " │ │ │ │ │ -518 "appended encoding for OutputType " << type); │ │ │ │ │ -519 case _a_p_p_e_n_d_e_d_r_a_w : return rawString; │ │ │ │ │ -520 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : return base64String; │ │ │ │ │ -521 } │ │ │ │ │ -522 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): " │ │ │ │ │ -523 "unsupported OutputType " << type); │ │ │ │ │ -524 } │ │ │ │ │ -525 │ │ │ │ │ -527 │ │ │ │ │ -_5_4_1 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r* _m_a_k_e(const std::string& name, unsigned ncomps, │ │ │ │ │ -542 unsigned nitems, const Indent& indent, │ │ │ │ │ -543 _P_r_e_c_i_s_i_o_n prec) │ │ │ │ │ -544 { │ │ │ │ │ -545 switch(phase) { │ │ │ │ │ -546 case main : │ │ │ │ │ -547 switch(type) { │ │ │ │ │ -548 case _a_s_c_i_i : │ │ │ │ │ -549 return new _A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, indent, prec); │ │ │ │ │ -550 case _b_a_s_e_6_4 : │ │ │ │ │ -551 return new _B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, nitems, │ │ │ │ │ -552 indent, prec); │ │ │ │ │ -553 case _a_p_p_e_n_d_e_d_r_a_w : │ │ │ │ │ -554 return new _A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, │ │ │ │ │ -555 nitems, offset, indent, prec); │ │ │ │ │ -556 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : │ │ │ │ │ -557 return new _A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, name, ncomps, │ │ │ │ │ -558 nitems, offset, │ │ │ │ │ -559 indent, prec); │ │ │ │ │ -560 } │ │ │ │ │ -561 break; │ │ │ │ │ -562 case appended : │ │ │ │ │ -563 switch(type) { │ │ │ │ │ -564 case _a_s_c_i_i : │ │ │ │ │ -565 case _b_a_s_e_6_4 : │ │ │ │ │ -566 break; // invlid in appended mode │ │ │ │ │ -567 case _a_p_p_e_n_d_e_d_r_a_w : │ │ │ │ │ -568 return new _N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, ncomps, nitems, prec); │ │ │ │ │ -569 case _a_p_p_e_n_d_e_d_b_a_s_e_6_4 : │ │ │ │ │ -570 return new _N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r(stream, ncomps, nitems, prec); │ │ │ │ │ -571 } │ │ │ │ │ -572 break; │ │ │ │ │ -573 } │ │ │ │ │ -574 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported " │ │ │ │ │ -575 "OutputType " << type << " in phase " << phase); │ │ │ │ │ -576 } │ │ │ │ │ -577 }; │ │ │ │ │ -578 │ │ │ │ │ -579 } // namespace VTK │ │ │ │ │ -580 │ │ │ │ │ -582 │ │ │ │ │ -583} // namespace Dune │ │ │ │ │ -584 │ │ │ │ │ -585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH │ │ │ │ │ -_s_t_r_e_a_m_s_._h_h │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ +237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH │ │ │ │ │ +_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h │ │ │ │ │ +_u_g_g_r_i_d_._h_h │ │ │ │ │ +The UGGrid class. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision │ │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ -@ int32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2 │ │ │ │ │ -@ uint32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ -@ uint8 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ -@ float32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4 │ │ │ │ │ -@ float64 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ -OutputType │ │ │ │ │ -How the bulk data should be stored in the file. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ -@ ascii │ │ │ │ │ -Output to the file is in ascii. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w │ │ │ │ │ -@ appendedraw │ │ │ │ │ -Output is to the file is appended raw binary. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ -@ appendedbase64 │ │ │ │ │ -Output is to the file is appended base64 binary. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 │ │ │ │ │ -@ base64 │ │ │ │ │ -Output to the file is inline base64 binary. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g │ │ │ │ │ -std::string toString(Precision p) │ │ │ │ │ -map precision to VTK type name │ │ │ │ │ -DDeeffiinniittiioonn common.hh:280 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_y_p_e_S_i_z_e │ │ │ │ │ -std::size_t typeSize(Precision p) │ │ │ │ │ -map precision to byte size │ │ │ │ │ -DDeeffiinniittiioonn common.hh:300 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_:_:_T_y_p_e │ │ │ │ │ -T Type │ │ │ │ │ -type to convert T to before putting it into a stream with << │ │ │ │ │ -DDeeffiinniittiioonn common.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -base class for data array writers │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -void write(T data) │ │ │ │ │ -write one element of data │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -DataArrayWriter(Precision _prec) │ │ │ │ │ -construct a data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e_I_s_N_o_o_p │ │ │ │ │ -virtual bool writeIsNoop() const │ │ │ │ │ -whether calls to write may be skipped │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_~_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -virtual ~DataArrayWriter() │ │ │ │ │ -virtual destructor │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -a streaming writer for data array tags, uses ASCII inline format │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_~_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -~AsciiDataArrayWriter() │ │ │ │ │ -finish output; writes end tag │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_A_s_c_i_i_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, │ │ │ │ │ -const Indent &indent_, Precision prec_) │ │ │ │ │ -make a new data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -a streaming writer for data array tags, uses binary inline format │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_~_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -~BinaryDataArrayWriter() │ │ │ │ │ -finish output; writes end tag │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:228 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_B_i_n_a_r_y_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, │ │ │ │ │ -int nitems, const Indent &indent_, Precision prec_) │ │ │ │ │ -make a new data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -a streaming writer for data array tags, uses appended raw format │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:268 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps, │ │ │ │ │ -unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_) │ │ │ │ │ -make a new data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:283 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e_I_s_N_o_o_p │ │ │ │ │ -bool writeIsNoop() const │ │ │ │ │ -whether calls to write may be skipped │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:297 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -a streaming writer for data array tags, uses appended base64 format │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:310 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps, │ │ │ │ │ -unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_) │ │ │ │ │ -make a new data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:325 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_A_p_p_e_n_d_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_w_r_i_t_e_I_s_N_o_o_p │ │ │ │ │ -bool writeIsNoop() const │ │ │ │ │ -whether calls to write may be skipped │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:342 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -a streaming writer for appended data array tags, uses base64 format │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:360 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_N_a_k_e_d_B_a_s_e_6_4_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems, │ │ │ │ │ -Precision prec_) │ │ │ │ │ -make a new data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:369 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -a streaming writer for appended data arrays, uses raw format │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:408 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_:_:_N_a_k_e_d_R_a_w_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems, │ │ │ │ │ -Precision prec_) │ │ │ │ │ -make a new data array writer │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:419 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ -a factory for DataArrayWriters │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:462 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ -bool beginAppended() │ │ │ │ │ -signal start of the appended section │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:497 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned │ │ │ │ │ -nitems, const Indent &indent, Precision prec) │ │ │ │ │ -create a DataArrayWriter │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:541 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ -DataArrayWriterFactory(OutputType type_, std::ostream &stream_) │ │ │ │ │ -create a DataArrayWriterFactory │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:482 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g │ │ │ │ │ -const std::string & appendedEncoding() const │ │ │ │ │ -query encoding string for appended data │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:510 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ │ -void write(X &data) │ │ │ │ │ -encode a data item │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_f_l_u_s_h │ │ │ │ │ -void flush() │ │ │ │ │ -flush the current unwritten data to the stream. │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ │ -write out data in binary │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ │ -void write(T data) │ │ │ │ │ -write data to stream │ │ │ │ │ -DDeeffiinniittiioonn streams.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ +int indexInInside() const │ │ │ │ │ +Local index of codim 1 entity in the inside() entity where intersection is │ │ │ │ │ +contained in. │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ │ +index of the boundary segment within the macro grid │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ +Entity inside() const │ │ │ │ │ +return Entity on the inside of this intersection. That is the Entity where we │ │ │ │ │ +started this. │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:250 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ │ +Type of entity that this Intersection belongs to. │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +Common Grid parameters. │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ +Some simple static information for a given GridType. │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_h_e_a_p_S_i_z_e │ │ │ │ │ +size_t heapSize() const │ │ │ │ │ +returns heap size used on construction of the grid │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_o_p_y__ │ │ │ │ │ +bool noCopy_ │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_h_e_a_p_S_i_z_e__ │ │ │ │ │ +size_t heapSize_ │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_l_o_s_u_r_e__ │ │ │ │ │ +bool noClosure_ │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_o_p_y │ │ │ │ │ +bool noCopy() const │ │ │ │ │ +returns true if no copies are made for UGGrid elements │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k_:_:_n_o_C_l_o_s_u_r_e │ │ │ │ │ +bool noClosure() const │ │ │ │ │ +returns true if no closure should be used for UGGrid │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ +static double refineWeight() │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< │ │ │ │ │ +GG, II > &intersection) const │ │ │ │ │ +return invalid value │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const typename Grid::template Codim< │ │ │ │ │ +dimension >::Entity &vertex) │ │ │ │ │ +return parameter for vertex │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ +comm=MPIHelper::getCommunicator()) │ │ │ │ │ +constructor taking filename │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +MPI communicator type. │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters(const Entity &) const │ │ │ │ │ +return number of parameters │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ +will return boundary segment index │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ +UGGrid< dim > Grid │ │ │ │ │ +grid type │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ +please doc me │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:121 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +constructor taking istream │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +return number of parameters │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +UGGrid does not support boundary parameters. │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:175 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const typename Grid::template Codim< 0 >:: │ │ │ │ │ +Entity &element) │ │ │ │ │ +return parameter for codim 0 entity │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _U_G_G_r_i_d_<_ _d_i_m_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() │ │ │ │ │ +return grid │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ +static const type & defaultValue() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_U_G_G_r_i_d │ │ │ │ │ +Front-end for the grid manager of the finite element toolbox UG3. │ │ │ │ │ +DDeeffiinniittiioonn uggrid.hh:207 │ │ │ │ │ +_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: common.hh File Reference │ │ │ │ +dune-grid: dgfgeogrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,136 +65,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Enumerations | │ │ │ │ -Functions
│ │ │ │ -
common.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
dgfgeogrid.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

Common stuff for the VTKWriter. │ │ │ │ -More...

│ │ │ │ -
#include <limits>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <cstdint>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ +
#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/geometrygrid.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfparser.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
│ │ │ │ +#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::VTK::PrintType< T >
 determine a type to safely put another type into a stream More...
class  Dune::DGFCoordFunction< dimD, dimR >
 
struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
 
struct  Dune::VTK::PrintType< unsigned char >
struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
 
struct  Dune::VTK::PrintType< signed char >
struct  Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
 
struct  Dune::VTK::PrintType< char >
struct  Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
 
class  Dune::VTK::FieldInfo
 Descriptor struct for VTK fields. More...
struct  Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Enumerations

enum  Dune::VTK::OutputType { Dune::VTK::ascii │ │ │ │ -, Dune::VTK::base64 │ │ │ │ -, Dune::VTK::appendedraw │ │ │ │ -, Dune::VTK::appendedbase64 │ │ │ │ - }
 How the bulk data should be stored in the file. More...
 
enum  Dune::VTK::DataMode { Dune::VTK::conforming │ │ │ │ -, Dune::VTK::nonconforming │ │ │ │ - }
 Whether to produce conforming or non-conforming output. More...
 
enum  Dune::VTK::GeometryType {
│ │ │ │ -  Dune::VTK::vertex = 1 │ │ │ │ -, Dune::VTK::line = 3 │ │ │ │ -, Dune::VTK::triangle = 5 │ │ │ │ -, Dune::VTK::polygon = 7 │ │ │ │ -,
│ │ │ │ -  Dune::VTK::quadrilateral = 9 │ │ │ │ -, Dune::VTK::tetrahedron = 10 │ │ │ │ -, Dune::VTK::hexahedron = 12 │ │ │ │ -, Dune::VTK::prism = 13 │ │ │ │ -,
│ │ │ │ -  Dune::VTK::pyramid = 14 │ │ │ │ -, Dune::VTK::polyhedron = 42 │ │ │ │ -
│ │ │ │ - }
 Type representing VTK's entity geometry types. More...
 
enum  Dune::VTK::FileType { Dune::VTK::polyData │ │ │ │ -, Dune::VTK::unstructuredGrid │ │ │ │ - }
 which type of VTK file to write More...
 
enum class  Dune::VTK::Precision {
│ │ │ │ -  Dune::VTK::int32 │ │ │ │ -, Dune::VTK::uint8 │ │ │ │ -, Dune::VTK::uint32 │ │ │ │ -, Dune::VTK::float32 │ │ │ │ -,
│ │ │ │ -  Dune::VTK::float64 │ │ │ │ -
│ │ │ │ - }
 which precision to use when writing out data to vtk files More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

GeometryType Dune::VTK::geometryType (const Dune::GeometryType &t)
 mapping from GeometryType to VTKGeometryType
 
int Dune::VTK::renumber (const Dune::GeometryType &t, int i)
 renumber VTK <-> Dune
 
template<typename T >
int Dune::VTK::renumber (const T &t, int i)
 renumber VTK <-> Dune
 
std::string Dune::VTK::getEndiannessString ()
 determine endianness of this C++ implementation
 
std::string Dune::VTK::toString (Precision p)
 map precision to VTK type name
 
std::size_t Dune::VTK::typeSize (Precision p)
 map precision to byte size
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Common stuff for the VTKWriter.

│ │ │ │ -
Author
Peter Bastian, Christian Engwer
│ │ │ │ -

This file contains common stuff for all instances of VTKWriter.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,94 +2,40 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -common.hh File Reference │ │ │ │ │ -Common stuff for the VTKWriter. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +dgfgeogrid.hh File Reference │ │ │ │ │ #include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _T_ _> │ │ │ │ │ -  determine a type to safely put another type into a stream _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _f_a_l_s_e_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _t_r_u_e_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _c_h_a_r_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R │ │ │ │ │ + _>_,_ _f_a_l_s_e_ _> │ │ │ │ │   │ │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ -  Descriptor struct for _V_T_K fields. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r │ │ │ │ │ + _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _> │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ │ - enum   _D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e { _D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i , _D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 , │ │ │ │ │ - _D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w , _D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 } │ │ │ │ │ -  How the bulk data should be stored in the file. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - enum   _D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e { _D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g , _D_u_n_e_:_:_V_T_K_:_: │ │ │ │ │ - _n_o_n_c_o_n_f_o_r_m_i_n_g } │ │ │ │ │ -  Whether to produce conforming or non-conforming output. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - enum   _D_u_n_e_:_:_V_T_K_:_:_G_e_o_m_e_t_r_y_T_y_p_e { │ │ │ │ │ -   _D_u_n_e_:_:_V_T_K_:_:_v_e_r_t_e_x = 1 , _D_u_n_e_:_:_V_T_K_:_:_l_i_n_e = 3 , _D_u_n_e_:_:_V_T_K_:_: │ │ │ │ │ - _t_r_i_a_n_g_l_e = 5 , _D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_g_o_n = 7 , │ │ │ │ │ -   _D_u_n_e_:_:_V_T_K_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l = 9 , _D_u_n_e_:_:_V_T_K_:_:_t_e_t_r_a_h_e_d_r_o_n = 10 , │ │ │ │ │ - _D_u_n_e_:_:_V_T_K_:_:_h_e_x_a_h_e_d_r_o_n = 12 , _D_u_n_e_:_:_V_T_K_:_:_p_r_i_s_m = 13 , │ │ │ │ │ -   _D_u_n_e_:_:_V_T_K_:_:_p_y_r_a_m_i_d = 14 , _D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_h_e_d_r_o_n = 42 │ │ │ │ │ - } │ │ │ │ │ -  Type representing VTK's entity geometry types. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - enum   _D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e { _D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a , _D_u_n_e_:_:_V_T_K_:_: │ │ │ │ │ - _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d } │ │ │ │ │ -  which type of VTK file to write _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -enum class   _D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n { │ │ │ │ │ -   _D_u_n_e_:_:_V_T_K_:_:_i_n_t_3_2 , _D_u_n_e_:_:_V_T_K_:_:_u_i_n_t_8 , _D_u_n_e_:_:_V_T_K_:_:_u_i_n_t_3_2 , _D_u_n_e_:_: │ │ │ │ │ - _V_T_K_:_:_f_l_o_a_t_3_2 , │ │ │ │ │ -   _D_u_n_e_:_:_V_T_K_:_:_f_l_o_a_t_6_4 │ │ │ │ │ - } │ │ │ │ │ -  which precision to use when writing out data to vtk files _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -_G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e (const Dune::GeometryType &t) │ │ │ │ │ -  mapping from GeometryType to VTKGeometryType │ │ │ │ │ -  │ │ │ │ │ - int  _D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r (const Dune::GeometryType &t, int i) │ │ │ │ │ -  renumber _V_T_K <-> _D_u_n_e │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - int  _D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r (const T &t, int i) │ │ │ │ │ -  renumber _V_T_K <-> _D_u_n_e │ │ │ │ │ -  │ │ │ │ │ - std::string  _D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g () │ │ │ │ │ -  determine endianness of this C++ implementation │ │ │ │ │ -  │ │ │ │ │ - std::string  _D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g (_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ -  map precision to _V_T_K type name │ │ │ │ │ -  │ │ │ │ │ - std::size_t  _D_u_n_e_:_:_V_T_K_:_:_t_y_p_e_S_i_z_e (_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ -  map precision to byte size │ │ │ │ │ -  │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ - Author │ │ │ │ │ - Peter Bastian, Christian Engwer │ │ │ │ │ -This file contains common stuff for all instances of VTKWriter. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: common.hh Source File │ │ │ │ +dune-grid: dgfgeogrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,384 +70,348 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
common.hh
│ │ │ │ +
dgfgeogrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <limits>
│ │ │ │ -
10#include <sstream>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <cstdint>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/exceptions.hh>
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16#include <dune/common/typetraits.hh>
│ │ │ │ +
5#ifndef DUNE_DGFGEOGRID_HH
│ │ │ │ +
6#define DUNE_DGFGEOGRID_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ + │ │ │ │
17
│ │ │ │ -
25namespace Dune
│ │ │ │ -
26{
│ │ │ │ -
29
│ │ │ │ -
30 namespace VTK {
│ │ │ │ -
31
│ │ │ │ -
33 //
│ │ │ │ -
34 // VTKOptions
│ │ │ │ -
35 //
│ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
22 /************************************************************************
│ │ │ │ +
23 * Warning:
│ │ │ │ +
24 * Reading DGF files directly into a GeometryGrid is a dirty hack for
│ │ │ │ +
25 * two reasons:
│ │ │ │ +
26 * 1) The host grid and coordinate function are never deleted (dangling
│ │ │ │ +
27 * pointers).
│ │ │ │ +
28 * 2) The coordinate function has to provide a default constructor
│ │ │ │ +
29 ************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31 // External Forward Declarations
│ │ │ │ +
32 // -----------------------------
│ │ │ │ +
33
│ │ │ │ +
34 template< class GridImp, class IntersectionImp >
│ │ │ │ +
35 class Intersection;
│ │ │ │
36
│ │ │ │ +
37
│ │ │ │
38
│ │ │ │ +
39 // DGFCoordFunction
│ │ │ │ +
40 // ----------------
│ │ │ │ +
41
│ │ │ │ +
42 template< int dimD, int dimR >
│ │ │ │
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
52 // //! Output to the file is compressed inline binary.
│ │ │ │ -
53 // binarycompressed,
│ │ │ │ -
54 // //! Output is compressed and appended to the file.
│ │ │ │ -
55 // compressedappended
│ │ │ │ -
56 };
│ │ │ │ + │ │ │ │ +
44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction< dimD, dimR > >
│ │ │ │ +
45 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
48
│ │ │ │ +
49 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
52
│ │ │ │ + │ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
55 DGFCoordFunction ( const Expression *expression )
│ │ │ │ +
56 : expression_( expression )
│ │ │ │ +
57 {}
│ │ │ │
│ │ │ │
58
│ │ │ │ -
│ │ │ │ -
67 enum DataMode {
│ │ │ │ -
69
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ - │ │ │ │ -
82 };
│ │ │ │ +
│ │ │ │ +
59 void evaluate ( const DomainVector &x, RangeVector &y ) const
│ │ │ │ +
60 {
│ │ │ │ +
61 std::vector< double > vx( dimD );
│ │ │ │ +
62 std::vector< double > vy;
│ │ │ │ +
63 for( int i = 0; i < dimD; ++i )
│ │ │ │ +
64 vx[ i ] = x[ i ];
│ │ │ │ +
65 expression_->evaluate( vx, vy );
│ │ │ │ +
66 assert( vy.size() == size_t( dimR ) );
│ │ │ │ +
67 for( int i = 0; i < dimR; ++i )
│ │ │ │ +
68 y[ i ] = vy[ i ];
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
71 private:
│ │ │ │ +
72 const Expression *expression_;
│ │ │ │ +
73 };
│ │ │ │
│ │ │ │ +
74
│ │ │ │ +
75
│ │ │ │ +
76
│ │ │ │ +
77 // DGFCoordFunctionFactory
│ │ │ │ +
78 // -----------------------
│ │ │ │ +
79
│ │ │ │ +
80 template< class HostGrid, class CoordFunction,
│ │ │ │ +
81 bool discrete = GeoGrid::isDiscreteCoordFunctionInterface< typename CoordFunction::Interface >::value >
│ │ │ │ + │ │ │ │
83
│ │ │ │ -
85 //
│ │ │ │ -
86 // PrintType
│ │ │ │ -
87 //
│ │ │ │ -
88
│ │ │ │ -
90
│ │ │ │ -
94 template<typename T>
│ │ │ │ -
│ │ │ │ -
95 struct PrintType {
│ │ │ │ -
97 typedef T Type;
│ │ │ │ -
98 };
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
100 template<>
│ │ │ │ -
│ │ │ │ -
101 struct PrintType<unsigned char> {
│ │ │ │ -
102 typedef unsigned Type;
│ │ │ │ -
103 };
│ │ │ │ +
84
│ │ │ │ +
85 template< class HostGrid, class CoordFunction >
│ │ │ │ +
│ │ │ │ +
86 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
│ │ │ │ +
87 {
│ │ │ │ +
│ │ │ │ +
88 static CoordFunction *create ( std::istream &, const HostGrid & )
│ │ │ │ +
89 {
│ │ │ │ +
90 return new CoordFunction;
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92 };
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
94
│ │ │ │ +
95 template< class HostGrid, class CoordFunction >
│ │ │ │ +
│ │ │ │ +
96 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
│ │ │ │ +
97 {
│ │ │ │ +
│ │ │ │ +
98 static CoordFunction *create ( std::istream &, const HostGrid &hostGrid )
│ │ │ │ +
99 {
│ │ │ │ +
100 return new CoordFunction( hostGrid );
│ │ │ │ +
101 }
│ │ │ │
│ │ │ │ +
102 };
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │
104
│ │ │ │ -
105 template<>
│ │ │ │ +
105 template< class HostGrid, int dimD, int dimR >
│ │ │ │
│ │ │ │ -
106 struct PrintType<signed char> {
│ │ │ │ -
107 typedef int Type;
│ │ │ │ -
108 };
│ │ │ │ -
│ │ │ │ +
106 struct DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
│ │ │ │ +
107 {
│ │ │ │ + │ │ │ │
109
│ │ │ │ -
110 template<>
│ │ │ │ -
│ │ │ │ -
111 struct PrintType<char> {
│ │ │ │ -
112 typedef std::conditional<std::numeric_limits<char>::is_signed,
│ │ │ │ -
113 int, unsigned>::type
│ │ │ │ - │ │ │ │ -
115 };
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
118 //
│ │ │ │ -
119 // VTK::GeometryType related stuff
│ │ │ │ -
120 //
│ │ │ │ +
│ │ │ │ +
110 static CoordFunction *create ( std::istream &input, const HostGrid &hostGrid )
│ │ │ │ +
111 {
│ │ │ │ +
112 dgf::ProjectionBlock projectionBlock( input, dimR );
│ │ │ │ +
113 const typename CoordFunction::Expression *expression = projectionBlock.function( "coordfunction" );
│ │ │ │ +
114 if( expression == 0 )
│ │ │ │ +
115 DUNE_THROW( DGFException, "no coordfunction specified in DGF file." );
│ │ │ │ +
116 return new CoordFunction( expression );
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118 };
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120
│ │ │ │
121
│ │ │ │ -
123
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
134 line = 3,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
140 prism = 13,
│ │ │ │ - │ │ │ │ -
142 polyhedron = 42
│ │ │ │ -
143 };
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
151 inline GeometryType geometryType(const Dune::GeometryType& t)
│ │ │ │ +
122 // DGFGridFactory for GeometryGrid
│ │ │ │ +
123 // -------------------------------
│ │ │ │ +
124
│ │ │ │ +
125 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ +
│ │ │ │ +
126 struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
│ │ │ │ +
127 {
│ │ │ │ + │ │ │ │ +
129
│ │ │ │ +
130 const static int dimension = Grid::dimension;
│ │ │ │ +
131 typedef MPIHelper::MPICommunicator MPICommunicator;
│ │ │ │ +
132 typedef typename Grid::template Codim<0>::Entity Element;
│ │ │ │ +
133 typedef typename Grid::template Codim<dimension>::Entity Vertex;
│ │ │ │ +
134
│ │ │ │ + │ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
137 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
138 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ +
139 : dgfHostFactory_( input, comm ),
│ │ │ │ +
140 grid_( 0 )
│ │ │ │ +
141 {
│ │ │ │ +
142 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
│ │ │ │ +
143 assert( hostGrid != 0 );
│ │ │ │ +
144 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
│ │ │ │ +
145 grid_ = new Grid( hostGrid, coordFunction );
│ │ │ │ +
146 }
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
│ │ │ │ +
148 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
149 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ +
150 : dgfHostFactory_( filename, comm ),
│ │ │ │ +
151 grid_( 0 )
│ │ │ │
152 {
│ │ │ │ -
153 if (t.isVertex()) return vertex;
│ │ │ │ -
154 if (t.isLine()) return line;
│ │ │ │ -
155 if (t.isTriangle()) return triangle;
│ │ │ │ -
156 if (t.isQuadrilateral()) return quadrilateral;
│ │ │ │ -
157 if (t.isTetrahedron()) return tetrahedron;
│ │ │ │ -
158 if (t.isPyramid()) return pyramid;
│ │ │ │ -
159 if (t.isPrism()) return prism;
│ │ │ │ -
160 if (t.isHexahedron()) return hexahedron;
│ │ │ │ -
161
│ │ │ │ -
162 if (t.isNone() )
│ │ │ │ -
163 {
│ │ │ │ -
164 if( t.dim() == 2 ) return polygon;
│ │ │ │ -
165 if( t.dim() == 3 ) return polyhedron;
│ │ │ │ -
166 }
│ │ │ │ -
167
│ │ │ │ -
168 DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t);
│ │ │ │ +
153 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
│ │ │ │ +
154 assert( hostGrid != 0 );
│ │ │ │ +
155 std::ifstream input( filename.c_str() );
│ │ │ │ +
156 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
│ │ │ │ +
157 grid_ = new Grid( hostGrid, coordFunction );
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ +
160 Grid *grid () const
│ │ │ │ +
161 {
│ │ │ │ +
162 return grid_;
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │ +
164
│ │ │ │ +
165 template< class Intersection >
│ │ │ │ +
│ │ │ │ +
166 bool wasInserted ( const Intersection &intersection ) const
│ │ │ │ +
167 {
│ │ │ │ +
168 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │
169 }
│ │ │ │
│ │ │ │
170
│ │ │ │ -
172 //
│ │ │ │ -
173 // Functions for transforming the index of a corner inside an entity
│ │ │ │ -
174 // between Dune and VTK
│ │ │ │ -
175 //
│ │ │ │ +
171 template< class Intersection >
│ │ │ │ +
│ │ │ │ +
172 int boundaryId ( const Intersection &intersection ) const
│ │ │ │ +
173 {
│ │ │ │ +
174 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ +
175 }
│ │ │ │ +
│ │ │ │
176
│ │ │ │ -
178
│ │ │ │ -
│ │ │ │ -
186 inline int renumber(const Dune::GeometryType &t, int i)
│ │ │ │ -
187 {
│ │ │ │ -
188 static const int quadRenumbering[4] = {0,1,3,2};
│ │ │ │ -
189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6};
│ │ │ │ -
190 static const int prismRenumbering[6] = {0,2,1,3,5,4};
│ │ │ │ -
191 static const int pyramidRenumbering[5] = {0,1,3,2,4};
│ │ │ │ -
192
│ │ │ │ -
193 if (t.isQuadrilateral()) return quadRenumbering[i];
│ │ │ │ -
194 if (t.isPyramid()) return pyramidRenumbering[i];
│ │ │ │ -
195 if (t.isPrism()) return prismRenumbering[i];
│ │ │ │ -
196 if (t.isHexahedron()) return cubeRenumbering[i];
│ │ │ │ -
197
│ │ │ │ -
198 return i;
│ │ │ │ -
199 }
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
202
│ │ │ │ -
216 template<typename T>
│ │ │ │ -
│ │ │ │ -
217 int renumber(const T& t, int i)
│ │ │ │ -
218 {
│ │ │ │ -
219 return renumber(t.type(), i);
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
223 //
│ │ │ │ -
224 // Determine Endianness
│ │ │ │ -
225 //
│ │ │ │ -
226
│ │ │ │ -
228
│ │ │ │ -
│ │ │ │ -
232 inline std::string getEndiannessString()
│ │ │ │ -
233 {
│ │ │ │ -
234 short i = 1;
│ │ │ │ -
235 if (reinterpret_cast<char*>(&i)[1] == 1)
│ │ │ │ -
236 return "BigEndian";
│ │ │ │ -
237 else
│ │ │ │ -
238 return "LittleEndian";
│ │ │ │ -
239 }
│ │ │ │ -
│ │ │ │ -
240
│ │ │ │ -
242 //
│ │ │ │ -
243 // which type of vtkfile to write
│ │ │ │ -
244 //
│ │ │ │ -
245
│ │ │ │ -
247
│ │ │ │ -
│ │ │ │ -
252 enum FileType {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
257 };
│ │ │ │ -
│ │ │ │ -
258
│ │ │ │ -
259
│ │ │ │ -
261 //
│ │ │ │ -
262 // which precision to use when writing out data
│ │ │ │ -
263 //
│ │ │ │ -
264
│ │ │ │ -
266
│ │ │ │ -
│ │ │ │ -
271 enum class Precision {
│ │ │ │ -
272 int32,
│ │ │ │ -
273 uint8,
│ │ │ │ -
274 uint32,
│ │ │ │ -
275 float32,
│ │ │ │ -
276 float64
│ │ │ │ -
277 };
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
│ │ │ │ -
280 inline std::string toString(Precision p)
│ │ │ │ -
281 {
│ │ │ │ -
282 switch(p)
│ │ │ │ -
283 {
│ │ │ │ - │ │ │ │ -
285 return "Float32";
│ │ │ │ - │ │ │ │ -
287 return "Float64";
│ │ │ │ - │ │ │ │ -
289 return "UInt32";
│ │ │ │ -
290 case Precision::uint8:
│ │ │ │ -
291 return "UInt8";
│ │ │ │ -
292 case Precision::int32:
│ │ │ │ -
293 return "Int32";
│ │ │ │ -
294 default:
│ │ │ │ -
295 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
│ │ │ │ -
296 }
│ │ │ │ -
297 }
│ │ │ │ -
│ │ │ │ -
298
│ │ │ │ -
│ │ │ │ -
300 inline std::size_t typeSize(Precision p)
│ │ │ │ -
301 {
│ │ │ │ -
302 switch(p)
│ │ │ │ -
303 {
│ │ │ │ - │ │ │ │ -
305 return sizeof(float);
│ │ │ │ - │ │ │ │ -
307 return sizeof(double);
│ │ │ │ - │ │ │ │ -
309 return sizeof(std::uint32_t);
│ │ │ │ -
310 case Precision::uint8:
│ │ │ │ -
311 return sizeof(std::uint8_t);
│ │ │ │ -
312 case Precision::int32:
│ │ │ │ -
313 return sizeof(std::int32_t);
│ │ │ │ -
314 default:
│ │ │ │ -
315 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
│ │ │ │ -
316 }
│ │ │ │ -
317 }
│ │ │ │ -
│ │ │ │ -
318
│ │ │ │ -
320
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
328 {
│ │ │ │ -
329
│ │ │ │ -
330 public:
│ │ │ │ -
331
│ │ │ │ -
│ │ │ │ -
333 enum class Type {
│ │ │ │ -
336 scalar,
│ │ │ │ -
338 vector,
│ │ │ │ -
340 tensor
│ │ │ │ -
341 };
│ │ │ │ -
│ │ │ │ -
342
│ │ │ │ -
│ │ │ │ -
344 FieldInfo(std::string name, Type type, std::size_t size, Precision prec = Precision::float32)
│ │ │ │ -
345 : _name(name)
│ │ │ │ -
346 , _type(type)
│ │ │ │ -
347 , _size(size)
│ │ │ │ -
348 , _prec(prec)
│ │ │ │ -
349 {}
│ │ │ │ -
│ │ │ │ -
350
│ │ │ │ -
│ │ │ │ -
352 std::string name() const
│ │ │ │ -
353 {
│ │ │ │ -
354 return _name;
│ │ │ │ -
355 }
│ │ │ │ -
│ │ │ │ -
356
│ │ │ │ -
│ │ │ │ -
358 Type type() const
│ │ │ │ -
359 {
│ │ │ │ -
360 return _type;
│ │ │ │ -
361 }
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
│ │ │ │ -
364 std::size_t size() const
│ │ │ │ -
365 {
│ │ │ │ -
366 return _size;
│ │ │ │ -
367 }
│ │ │ │ -
│ │ │ │ -
368
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
371 {
│ │ │ │ -
372 return _prec;
│ │ │ │ -
373 }
│ │ │ │ -
│ │ │ │ -
374
│ │ │ │ -
375 private:
│ │ │ │ -
376
│ │ │ │ -
377 std::string _name;
│ │ │ │ -
378 Type _type;
│ │ │ │ -
379 std::size_t _size;
│ │ │ │ -
380 Precision _prec;
│ │ │ │ -
381
│ │ │ │ -
382 };
│ │ │ │ -
│ │ │ │ -
383
│ │ │ │ -
384
│ │ │ │ -
385 } // namespace VTK
│ │ │ │ -
386
│ │ │ │ -
388
│ │ │ │ -
389} // namespace Dune
│ │ │ │ -
390
│ │ │ │ -
391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH
│ │ │ │ +
177 template< int codim >
│ │ │ │ +
│ │ │ │ +
178 int numParameters () const
│ │ │ │ +
179 {
│ │ │ │ +
180 return dgfHostFactory_.template numParameters< codim >();
│ │ │ │ +
181 }
│ │ │ │ +
│ │ │ │ +
182
│ │ │ │ +
183 // return true if boundary parameters found
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
185 {
│ │ │ │ +
186 return dgfHostFactory_.haveBoundaryParameters();
│ │ │ │ +
187 }
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
189 template< class GG, class II >
│ │ │ │ +
190 const typename DGFBoundaryParameter::type &
│ │ │ │ +
│ │ │ │ +
191 boundaryParameter ( const Dune::Intersection< GG, II > & intersection ) const
│ │ │ │ +
192 {
│ │ │ │ +
193 return dgfHostFactory_.boundaryParameter( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
196 template< class Entity >
│ │ │ │ +
│ │ │ │ +
197 std::vector< double > &parameter ( const Entity &entity )
│ │ │ │ +
198 {
│ │ │ │ +
199 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
202 private:
│ │ │ │ +
203 DGFGridFactory< HostGrid > dgfHostFactory_;
│ │ │ │ +
204 Grid *grid_;
│ │ │ │ +
205 };
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
207
│ │ │ │ +
208
│ │ │ │ +
209 // DGFGridInfo for GeometryGrid
│ │ │ │ +
210 // ----------------------------
│ │ │ │ +
211
│ │ │ │ +
212 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ +
│ │ │ │ +
213 struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
│ │ │ │ +
214 {
│ │ │ │ +
│ │ │ │ +
215 static int refineStepsForHalf ()
│ │ │ │ +
216 {
│ │ │ │ + │ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219
│ │ │ │ +
│ │ │ │ +
220 static double refineWeight ()
│ │ │ │ +
221 {
│ │ │ │ +
222 return -1.0;
│ │ │ │ +
223 }
│ │ │ │ +
│ │ │ │ +
224 };
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
226}
│ │ │ │ +
227
│ │ │ │ +
228#endif // #ifndef DUNE_DGFGEOGRID_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ -
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ -
@ appendedraw
Output is to the file is appended raw binary.
Definition common.hh:49
│ │ │ │ -
@ appendedbase64
Output is to the file is appended base64 binary.
Definition common.hh:51
│ │ │ │ -
@ base64
Output to the file is inline base64 binary.
Definition common.hh:47
│ │ │ │ -
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ -
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ -
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ -
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ -
std::string toString(Precision p)
map precision to VTK type name
Definition common.hh:280
│ │ │ │ -
DataMode
Whether to produce conforming or non-conforming output.
Definition common.hh:67
│ │ │ │ -
@ conforming
Output conforming data.
Definition common.hh:73
│ │ │ │ -
@ nonconforming
Output non-conforming data.
Definition common.hh:81
│ │ │ │ -
std::size_t typeSize(Precision p)
map precision to byte size
Definition common.hh:300
│ │ │ │ -
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ -
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ -
GeometryType
Type representing VTK's entity geometry types.
Definition common.hh:132
│ │ │ │ -
@ line
Definition common.hh:134
│ │ │ │ -
@ pyramid
Definition common.hh:141
│ │ │ │ -
@ polyhedron
Definition common.hh:142
│ │ │ │ -
@ quadrilateral
Definition common.hh:137
│ │ │ │ -
@ vertex
Definition common.hh:133
│ │ │ │ -
@ tetrahedron
Definition common.hh:138
│ │ │ │ -
@ prism
Definition common.hh:140
│ │ │ │ -
@ hexahedron
Definition common.hh:139
│ │ │ │ -
@ triangle
Definition common.hh:135
│ │ │ │ -
@ polygon
Definition common.hh:136
│ │ │ │ -
determine a type to safely put another type into a stream
Definition common.hh:95
│ │ │ │ -
T Type
type to convert T to before putting it into a stream with <<
Definition common.hh:97
│ │ │ │ -
unsigned Type
Definition common.hh:102
│ │ │ │ -
int Type
Definition common.hh:107
│ │ │ │ -
std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type Type
Definition common.hh:114
│ │ │ │ -
Descriptor struct for VTK fields.
Definition common.hh:328
│ │ │ │ -
std::size_t size() const
The number of components in the data field.
Definition common.hh:364
│ │ │ │ -
Precision precision() const
The precision used for the output of the data field.
Definition common.hh:370
│ │ │ │ -
Type
VTK data type.
Definition common.hh:333
│ │ │ │ -
@ tensor
tensor field (always 3x3)
│ │ │ │ -
@ vector
vector-valued field (always 3D, will be padded if necessary)
│ │ │ │ - │ │ │ │ -
FieldInfo(std::string name, Type type, std::size_t size, Precision prec=Precision::float32)
Create a FieldInfo instance with the given name, type and size.
Definition common.hh:344
│ │ │ │ -
Type type() const
The type of the data field.
Definition common.hh:358
│ │ │ │ -
std::string name() const
The name of the data field.
Definition common.hh:352
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
Derive an implementation of an analytical coordinate function from this class.
Definition coordfunction.hh:134
│ │ │ │ +
Base::DomainVector DomainVector
Definition coordfunction.hh:139
│ │ │ │ +
Base::RangeVector RangeVector
Definition coordfunction.hh:140
│ │ │ │ +
grid wrapper replacing the geometries
Definition geometrygrid/grid.hh:86
│ │ │ │ +
traits structure containing types for a codimension
Definition geometrygrid/grid.hh:611
│ │ │ │ +
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ +
Definition io/file/dgfparser/blocks/projection.hh:24
│ │ │ │ +
ExpressionPointer function(const std::string &name) const
Definition io/file/dgfparser/blocks/projection.hh:100
│ │ │ │ +
Definition io/file/dgfparser/blocks/projection.hh:160
│ │ │ │ +
virtual void evaluate(const Vector &argument, Vector &result) const =0
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Definition dgfgeogrid.hh:45
│ │ │ │ +
Base::DomainVector DomainVector
Definition dgfgeogrid.hh:50
│ │ │ │ +
void evaluate(const DomainVector &x, RangeVector &y) const
Definition dgfgeogrid.hh:59
│ │ │ │ +
dgf::ProjectionBlock::Expression Expression
Definition dgfgeogrid.hh:53
│ │ │ │ +
DGFCoordFunction(const Expression *expression)
Definition dgfgeogrid.hh:55
│ │ │ │ +
Base::RangeVector RangeVector
Definition dgfgeogrid.hh:51
│ │ │ │ +
Definition dgfgeogrid.hh:82
│ │ │ │ +
static CoordFunction * create(std::istream &, const HostGrid &)
Definition dgfgeogrid.hh:88
│ │ │ │ +
static CoordFunction * create(std::istream &, const HostGrid &hostGrid)
Definition dgfgeogrid.hh:98
│ │ │ │ +
static CoordFunction * create(std::istream &input, const HostGrid &hostGrid)
Definition dgfgeogrid.hh:110
│ │ │ │ +
DGFCoordFunction< dimD, dimR > CoordFunction
Definition dgfgeogrid.hh:108
│ │ │ │ +
Grid::template Codim< dimension >::Entity Vertex
Definition dgfgeogrid.hh:133
│ │ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfgeogrid.hh:172
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicator
Definition dgfgeogrid.hh:131
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
Definition dgfgeogrid.hh:191
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfgeogrid.hh:137
│ │ │ │ +
Grid::template Codim< 0 >::Entity Element
Definition dgfgeogrid.hh:132
│ │ │ │ + │ │ │ │ +
DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory
Definition dgfgeogrid.hh:135
│ │ │ │ +
GeometryGrid< HostGrid, CoordFunction, Allocator > Grid
Definition dgfgeogrid.hh:128
│ │ │ │ + │ │ │ │ +
std::vector< double > & parameter(const Entity &entity)
Definition dgfgeogrid.hh:197
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfgeogrid.hh:148
│ │ │ │ +
bool wasInserted(const Intersection &intersection) const
Definition dgfgeogrid.hh:166
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ +
static int refineStepsForHalf()
number of globalRefine steps needed to refuce h by 0.5
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,452 +2,425 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -common.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfgeogrid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ +5#ifndef DUNE_DGFGEOGRID_HH │ │ │ │ │ +6#define DUNE_DGFGEOGRID_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ 17 │ │ │ │ │ -25namespace _D_u_n_e │ │ │ │ │ -26{ │ │ │ │ │ -29 │ │ │ │ │ -30 namespace VTK { │ │ │ │ │ -31 │ │ │ │ │ -33 // │ │ │ │ │ -34 // VTKOptions │ │ │ │ │ -35 // │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 │ │ │ │ │ +22 /************************************************************************ │ │ │ │ │ +23 * Warning: │ │ │ │ │ +24 * Reading DGF files directly into a GeometryGrid is a dirty hack for │ │ │ │ │ +25 * two reasons: │ │ │ │ │ +26 * 1) The host grid and coordinate function are never deleted (dangling │ │ │ │ │ +27 * pointers). │ │ │ │ │ +28 * 2) The coordinate function has to provide a default constructor │ │ │ │ │ +29 ************************************************************************/ │ │ │ │ │ +30 │ │ │ │ │ +31 // External Forward Declarations │ │ │ │ │ +32 // ----------------------------- │ │ │ │ │ +33 │ │ │ │ │ +34 template< class GridImp, class IntersectionImp > │ │ │ │ │ +35 class Intersection; │ │ │ │ │ 36 │ │ │ │ │ +37 │ │ │ │ │ 38 │ │ │ │ │ -_4_3 enum _O_u_t_p_u_t_T_y_p_e { │ │ │ │ │ -_4_5 _a_s_c_i_i, │ │ │ │ │ -_4_7 _b_a_s_e_6_4, │ │ │ │ │ -_4_9 _a_p_p_e_n_d_e_d_r_a_w, │ │ │ │ │ -51 _a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ -52 // //! Output to the file is compressed inline binary. │ │ │ │ │ -53 // binarycompressed, │ │ │ │ │ -54 // //! Output is compressed and appended to the file. │ │ │ │ │ -55 // compressedappended │ │ │ │ │ -_5_6 }; │ │ │ │ │ +39 // DGFCoordFunction │ │ │ │ │ +40 // ---------------- │ │ │ │ │ +41 │ │ │ │ │ +42 template< int dimD, int dimR > │ │ │ │ │ +_4_3 class _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +44 : public _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n< double, dimD, dimR, DGFCoordFunction< │ │ │ │ │ +dimD, dimR > > │ │ │ │ │ +45 { │ │ │ │ │ +46 typedef _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> _T_h_i_s; │ │ │ │ │ +47 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_o_u_b_l_e_,_ _d_i_m_D_,_ _d_i_m_R_,_ _T_h_i_s_ _> _B_a_s_e; │ │ │ │ │ +48 │ │ │ │ │ +49 public: │ │ │ │ │ +_5_0 typedef typename _B_a_s_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_5_1 typedef typename _B_a_s_e_:_:_R_a_n_g_e_V_e_c_t_o_r _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +52 │ │ │ │ │ +_5_3 typedef _d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_E_x_p_r_e_s_s_i_o_n _E_x_p_r_e_s_s_i_o_n; │ │ │ │ │ +54 │ │ │ │ │ +_5_5 _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n ( const _E_x_p_r_e_s_s_i_o_n *expression ) │ │ │ │ │ +56 : expression_( expression ) │ │ │ │ │ +57 {} │ │ │ │ │ 58 │ │ │ │ │ -_6_7 enum _D_a_t_a_M_o_d_e { │ │ │ │ │ -69 │ │ │ │ │ -_7_3 _c_o_n_f_o_r_m_i_n_g, │ │ │ │ │ +_5_9 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ +60 { │ │ │ │ │ +61 std::vector< double > vx( dimD ); │ │ │ │ │ +62 std::vector< double > vy; │ │ │ │ │ +63 for( int i = 0; i < dimD; ++i ) │ │ │ │ │ +64 vx[ i ] = x[ i ]; │ │ │ │ │ +65 expression_->_e_v_a_l_u_a_t_e( vx, vy ); │ │ │ │ │ +66 assert( vy.size() == size_t( dimR ) ); │ │ │ │ │ +67 for( int i = 0; i < dimR; ++i ) │ │ │ │ │ +68 y[ i ] = vy[ i ]; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +71 private: │ │ │ │ │ +72 const _E_x_p_r_e_s_s_i_o_n *expression_; │ │ │ │ │ +73 }; │ │ │ │ │ +74 │ │ │ │ │ 75 │ │ │ │ │ -81 _n_o_n_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -_8_2 }; │ │ │ │ │ +76 │ │ │ │ │ +77 // DGFCoordFunctionFactory │ │ │ │ │ +78 // ----------------------- │ │ │ │ │ +79 │ │ │ │ │ +80 template< class HostGrid, class CoordFunction, │ │ │ │ │ +81 bool discrete = GeoGrid::isDiscreteCoordFunctionInterface< typename │ │ │ │ │ +CoordFunction::Interface >::value > │ │ │ │ │ +_8_2 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ 83 │ │ │ │ │ -85 // │ │ │ │ │ -86 // PrintType │ │ │ │ │ -87 // │ │ │ │ │ -88 │ │ │ │ │ -90 │ │ │ │ │ -94 template │ │ │ │ │ -_9_5 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ -_9_7 typedef T _T_y_p_e; │ │ │ │ │ -98 }; │ │ │ │ │ -99 │ │ │ │ │ -100 template<> │ │ │ │ │ -_1_0_1 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ -_1_0_2 typedef unsigned _T_y_p_e; │ │ │ │ │ -103 }; │ │ │ │ │ +84 │ │ │ │ │ +85 template< class HostGrid, class CoordFunction > │ │ │ │ │ +_8_6 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y< HostGrid, CoordFunction, false > │ │ │ │ │ +87 { │ │ │ │ │ +_8_8 static CoordFunction *_c_r_e_a_t_e ( std::istream &, const HostGrid & ) │ │ │ │ │ +89 { │ │ │ │ │ +90 return new CoordFunction; │ │ │ │ │ +91 } │ │ │ │ │ +92 }; │ │ │ │ │ +93 │ │ │ │ │ +94 │ │ │ │ │ +95 template< class HostGrid, class CoordFunction > │ │ │ │ │ +_9_6 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y< HostGrid, CoordFunction, true > │ │ │ │ │ +97 { │ │ │ │ │ +_9_8 static CoordFunction *_c_r_e_a_t_e ( std::istream &, const HostGrid &hostGrid ) │ │ │ │ │ +99 { │ │ │ │ │ +100 return new CoordFunction( hostGrid ); │ │ │ │ │ +101 } │ │ │ │ │ +102 }; │ │ │ │ │ +103 │ │ │ │ │ 104 │ │ │ │ │ -105 template<> │ │ │ │ │ -_1_0_6 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ -_1_0_7 typedef int _T_y_p_e; │ │ │ │ │ -108 }; │ │ │ │ │ +105 template< class HostGrid, int dimD, int dimR > │ │ │ │ │ +_1_0_6 struct _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y< HostGrid, _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n< dimD, dimR >, │ │ │ │ │ +false > │ │ │ │ │ +107 { │ │ │ │ │ +_1_0_8 typedef _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> _C_o_o_r_d_F_u_n_c_t_i_o_n; │ │ │ │ │ 109 │ │ │ │ │ -110 template<> │ │ │ │ │ -_1_1_1 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ -112 typedef std::conditional::is_signed, │ │ │ │ │ -113 int, unsigned>::type │ │ │ │ │ -_1_1_4 _T_y_p_e; │ │ │ │ │ -115 }; │ │ │ │ │ -116 │ │ │ │ │ -118 // │ │ │ │ │ -119 // VTK::GeometryType related stuff │ │ │ │ │ -120 // │ │ │ │ │ +_1_1_0 static _C_o_o_r_d_F_u_n_c_t_i_o_n *_c_r_e_a_t_e ( std::istream &input, const HostGrid │ │ │ │ │ +&hostGrid ) │ │ │ │ │ +111 { │ │ │ │ │ +112 _d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k projectionBlock( input, dimR ); │ │ │ │ │ +113 const typename _C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_E_x_p_r_e_s_s_i_o_n *expression = │ │ │ │ │ +projectionBlock._f_u_n_c_t_i_o_n( "coordfunction" ); │ │ │ │ │ +114 if( expression == 0 ) │ │ │ │ │ +115 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "no coordfunction specified in DGF file." ); │ │ │ │ │ +116 return new _C_o_o_r_d_F_u_n_c_t_i_o_n( expression ); │ │ │ │ │ +117 } │ │ │ │ │ +118 }; │ │ │ │ │ +119 │ │ │ │ │ +120 │ │ │ │ │ 121 │ │ │ │ │ -123 │ │ │ │ │ -_1_3_2 enum _G_e_o_m_e_t_r_y_T_y_p_e { │ │ │ │ │ -_1_3_3 _v_e_r_t_e_x = 1, │ │ │ │ │ -_1_3_4 _l_i_n_e = 3, │ │ │ │ │ -_1_3_5 _t_r_i_a_n_g_l_e = 5, │ │ │ │ │ -_1_3_6 _p_o_l_y_g_o_n = 7, │ │ │ │ │ -_1_3_7 _q_u_a_d_r_i_l_a_t_e_r_a_l = 9, │ │ │ │ │ -_1_3_8 _t_e_t_r_a_h_e_d_r_o_n = 10, │ │ │ │ │ -_1_3_9 _h_e_x_a_h_e_d_r_o_n = 12, │ │ │ │ │ -_1_4_0 _p_r_i_s_m = 13, │ │ │ │ │ -_1_4_1 _p_y_r_a_m_i_d = 14, │ │ │ │ │ -142 _p_o_l_y_h_e_d_r_o_n = 42 │ │ │ │ │ -_1_4_3 }; │ │ │ │ │ -144 │ │ │ │ │ -146 │ │ │ │ │ -_1_5_1 inline _G_e_o_m_e_t_r_y_T_y_p_e _g_e_o_m_e_t_r_y_T_y_p_e(const Dune::GeometryType& t) │ │ │ │ │ +122 // DGFGridFactory for GeometryGrid │ │ │ │ │ +123 // ------------------------------- │ │ │ │ │ +124 │ │ │ │ │ +125 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ +_1_2_6 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _G_e_o_m_e_t_r_y_G_r_i_d< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ +127 { │ │ │ │ │ +_1_2_8 typedef _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _> _G_r_i_d; │ │ │ │ │ +129 │ │ │ │ │ +_1_3_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_1_3_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r; │ │ │ │ │ +_1_3_2 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ +_1_3_3 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim::Entity _V_e_r_t_e_x; │ │ │ │ │ +134 │ │ │ │ │ +_1_3_5 typedef _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> │ │ │ │ │ +_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ +136 │ │ │ │ │ +_1_3_7 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +138 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +139 : dgfHostFactory_( input, comm ), │ │ │ │ │ +140 grid_( 0 ) │ │ │ │ │ +141 { │ │ │ │ │ +142 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid()); │ │ │ │ │ +143 assert( hostGrid != 0 ); │ │ │ │ │ +144 auto coordFunction = std::shared_ptr(CoordFunctionFactory:: │ │ │ │ │ +create( input, *hostGrid )); │ │ │ │ │ +145 grid_ = new _G_r_i_d( hostGrid, coordFunction ); │ │ │ │ │ +146 } │ │ │ │ │ +147 │ │ │ │ │ +_1_4_8 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +149 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +150 : dgfHostFactory_( filename, comm ), │ │ │ │ │ +151 grid_( 0 ) │ │ │ │ │ 152 { │ │ │ │ │ -153 if (t.isVertex()) return _v_e_r_t_e_x; │ │ │ │ │ -154 if (t.isLine()) return _l_i_n_e; │ │ │ │ │ -155 if (t.isTriangle()) return _t_r_i_a_n_g_l_e; │ │ │ │ │ -156 if (t.isQuadrilateral()) return _q_u_a_d_r_i_l_a_t_e_r_a_l; │ │ │ │ │ -157 if (t.isTetrahedron()) return _t_e_t_r_a_h_e_d_r_o_n; │ │ │ │ │ -158 if (t.isPyramid()) return _p_y_r_a_m_i_d; │ │ │ │ │ -159 if (t.isPrism()) return _p_r_i_s_m; │ │ │ │ │ -160 if (t.isHexahedron()) return _h_e_x_a_h_e_d_r_o_n; │ │ │ │ │ -161 │ │ │ │ │ -162 if (t.isNone() ) │ │ │ │ │ -163 { │ │ │ │ │ -164 if( t.dim() == 2 ) return _p_o_l_y_g_o_n; │ │ │ │ │ -165 if( t.dim() == 3 ) return _p_o_l_y_h_e_d_r_o_n; │ │ │ │ │ -166 } │ │ │ │ │ -167 │ │ │ │ │ -168 DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t); │ │ │ │ │ +153 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid()); │ │ │ │ │ +154 assert( hostGrid != 0 ); │ │ │ │ │ +155 std::ifstream input( filename.c_str() ); │ │ │ │ │ +156 auto coordFunction = std::shared_ptr(CoordFunctionFactory:: │ │ │ │ │ +create( input, *hostGrid )); │ │ │ │ │ +157 grid_ = new _G_r_i_d( hostGrid, coordFunction ); │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +_1_6_0 _G_r_i_d *_g_r_i_d () const │ │ │ │ │ +161 { │ │ │ │ │ +162 return grid_; │ │ │ │ │ +163 } │ │ │ │ │ +164 │ │ │ │ │ +165 template< class Intersection > │ │ │ │ │ +_1_6_6 bool _w_a_s_I_n_s_e_r_t_e_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ +167 { │ │ │ │ │ +168 return dgfHostFactory_.wasInserted( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n( intersection ) ); │ │ │ │ │ 169 } │ │ │ │ │ 170 │ │ │ │ │ -172 // │ │ │ │ │ -173 // Functions for transforming the index of a corner inside an entity │ │ │ │ │ -174 // between Dune and VTK │ │ │ │ │ -175 // │ │ │ │ │ +171 template< class Intersection > │ │ │ │ │ +_1_7_2 int _b_o_u_n_d_a_r_y_I_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ +173 { │ │ │ │ │ +174 return dgfHostFactory_.boundaryId( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +( intersection ) ); │ │ │ │ │ +175 } │ │ │ │ │ 176 │ │ │ │ │ -178 │ │ │ │ │ -_1_8_6 inline int _r_e_n_u_m_b_e_r(const Dune::GeometryType &t, int i) │ │ │ │ │ -187 { │ │ │ │ │ -188 static const int quadRenumbering[4] = {0,1,3,2}; │ │ │ │ │ -189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6}; │ │ │ │ │ -190 static const int prismRenumbering[6] = {0,2,1,3,5,4}; │ │ │ │ │ -191 static const int pyramidRenumbering[5] = {0,1,3,2,4}; │ │ │ │ │ -192 │ │ │ │ │ -193 if (t.isQuadrilateral()) return quadRenumbering[i]; │ │ │ │ │ -194 if (t.isPyramid()) return pyramidRenumbering[i]; │ │ │ │ │ -195 if (t.isPrism()) return prismRenumbering[i]; │ │ │ │ │ -196 if (t.isHexahedron()) return cubeRenumbering[i]; │ │ │ │ │ -197 │ │ │ │ │ -198 return i; │ │ │ │ │ -199 } │ │ │ │ │ -200 │ │ │ │ │ -202 │ │ │ │ │ -216 template │ │ │ │ │ -_2_1_7 int _r_e_n_u_m_b_e_r(const T& t, int i) │ │ │ │ │ -218 { │ │ │ │ │ -219 return _r_e_n_u_m_b_e_r(t.type(), i); │ │ │ │ │ -220 } │ │ │ │ │ -221 │ │ │ │ │ -223 // │ │ │ │ │ -224 // Determine Endianness │ │ │ │ │ -225 // │ │ │ │ │ -226 │ │ │ │ │ -228 │ │ │ │ │ -_2_3_2 inline std::string _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g() │ │ │ │ │ -233 { │ │ │ │ │ -234 short i = 1; │ │ │ │ │ -235 if (reinterpret_cast(&i)[1] == 1) │ │ │ │ │ -236 return "BigEndian"; │ │ │ │ │ -237 else │ │ │ │ │ -238 return "LittleEndian"; │ │ │ │ │ -239 } │ │ │ │ │ -240 │ │ │ │ │ -242 // │ │ │ │ │ -243 // which type of vtkfile to write │ │ │ │ │ -244 // │ │ │ │ │ -245 │ │ │ │ │ -247 │ │ │ │ │ -_2_5_2 enum _F_i_l_e_T_y_p_e { │ │ │ │ │ -_2_5_4 _p_o_l_y_D_a_t_a, │ │ │ │ │ -256 _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ -_2_5_7 }; │ │ │ │ │ -258 │ │ │ │ │ -259 │ │ │ │ │ -261 // │ │ │ │ │ -262 // which precision to use when writing out data │ │ │ │ │ -263 // │ │ │ │ │ -264 │ │ │ │ │ -266 │ │ │ │ │ -_2_7_1 enum class _P_r_e_c_i_s_i_o_n { │ │ │ │ │ -272 _i_n_t_3_2, │ │ │ │ │ -273 _u_i_n_t_8, │ │ │ │ │ -274 _u_i_n_t_3_2, │ │ │ │ │ -275 _f_l_o_a_t_3_2, │ │ │ │ │ -276 _f_l_o_a_t_6_4 │ │ │ │ │ -277 }; │ │ │ │ │ -278 │ │ │ │ │ -_2_8_0 inline std::string _t_o_S_t_r_i_n_g(_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ -281 { │ │ │ │ │ -282 switch(p) │ │ │ │ │ -283 { │ │ │ │ │ -284 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2: │ │ │ │ │ -285 return "Float32"; │ │ │ │ │ -286 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4: │ │ │ │ │ -287 return "Float64"; │ │ │ │ │ -288 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2: │ │ │ │ │ -289 return "UInt32"; │ │ │ │ │ -290 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8: │ │ │ │ │ -291 return "UInt8"; │ │ │ │ │ -292 case _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2: │ │ │ │ │ -293 return "Int32"; │ │ │ │ │ -294 default: │ │ │ │ │ -295 DUNE_THROW(Dune::NotImplemented, "Unknown precision type"); │ │ │ │ │ -296 } │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -_3_0_0 inline std::size_t _t_y_p_e_S_i_z_e(_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ -301 { │ │ │ │ │ -302 switch(p) │ │ │ │ │ -303 { │ │ │ │ │ -304 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2: │ │ │ │ │ -305 return sizeof(float); │ │ │ │ │ -306 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4: │ │ │ │ │ -307 return sizeof(double); │ │ │ │ │ -308 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2: │ │ │ │ │ -309 return sizeof(std::uint32_t); │ │ │ │ │ -310 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8: │ │ │ │ │ -311 return sizeof(std::uint8_t); │ │ │ │ │ -312 case _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2: │ │ │ │ │ -313 return sizeof(std::int32_t); │ │ │ │ │ -314 default: │ │ │ │ │ -315 DUNE_THROW(Dune::NotImplemented, "Unknown precision type"); │ │ │ │ │ -316 } │ │ │ │ │ -317 } │ │ │ │ │ -318 │ │ │ │ │ -320 │ │ │ │ │ -_3_2_7 class _F_i_e_l_d_I_n_f_o │ │ │ │ │ -328 { │ │ │ │ │ -329 │ │ │ │ │ -330 public: │ │ │ │ │ -331 │ │ │ │ │ -_3_3_3 enum class _T_y_p_e { │ │ │ │ │ -336 _s_c_a_l_a_r, │ │ │ │ │ -338 _v_e_c_t_o_r, │ │ │ │ │ -340 _t_e_n_s_o_r │ │ │ │ │ -341 }; │ │ │ │ │ -342 │ │ │ │ │ -_3_4_4 _F_i_e_l_d_I_n_f_o(std::string _n_a_m_e, _T_y_p_e _t_y_p_e, std::size_t _s_i_z_e, _P_r_e_c_i_s_i_o_n prec = │ │ │ │ │ -_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -345 : _name(_n_a_m_e) │ │ │ │ │ -346 , _type(_t_y_p_e) │ │ │ │ │ -347 , _size(_s_i_z_e) │ │ │ │ │ -348 , _prec(prec) │ │ │ │ │ -349 {} │ │ │ │ │ -350 │ │ │ │ │ -_3_5_2 std::string _n_a_m_e() const │ │ │ │ │ -353 { │ │ │ │ │ -354 return _name; │ │ │ │ │ -355 } │ │ │ │ │ -356 │ │ │ │ │ -_3_5_8 _T_y_p_e _t_y_p_e() const │ │ │ │ │ -359 { │ │ │ │ │ -360 return _type; │ │ │ │ │ -361 } │ │ │ │ │ -362 │ │ │ │ │ -_3_6_4 std::size_t _s_i_z_e() const │ │ │ │ │ -365 { │ │ │ │ │ -366 return _size; │ │ │ │ │ -367 } │ │ │ │ │ -368 │ │ │ │ │ -_3_7_0 _P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const │ │ │ │ │ -371 { │ │ │ │ │ -372 return _prec; │ │ │ │ │ -373 } │ │ │ │ │ -374 │ │ │ │ │ -375 private: │ │ │ │ │ -376 │ │ │ │ │ -377 std::string _name; │ │ │ │ │ -378 _T_y_p_e _type; │ │ │ │ │ -379 std::size_t _size; │ │ │ │ │ -380 _P_r_e_c_i_s_i_o_n _prec; │ │ │ │ │ -381 │ │ │ │ │ -382 }; │ │ │ │ │ -383 │ │ │ │ │ -384 │ │ │ │ │ -385 } // namespace VTK │ │ │ │ │ -386 │ │ │ │ │ -388 │ │ │ │ │ -389} // namespace Dune │ │ │ │ │ -390 │ │ │ │ │ -391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH │ │ │ │ │ +177 template< int codim > │ │ │ │ │ +_1_7_8 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +179 { │ │ │ │ │ +180 return dgfHostFactory_.template numParameters< codim >(); │ │ │ │ │ +181 } │ │ │ │ │ +182 │ │ │ │ │ +183 // return true if boundary parameters found │ │ │ │ │ +_1_8_4 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +185 { │ │ │ │ │ +186 return dgfHostFactory_.haveBoundaryParameters(); │ │ │ │ │ +187 } │ │ │ │ │ +188 │ │ │ │ │ +189 template< class GG, class II > │ │ │ │ │ +190 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ +_1_9_1 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) │ │ │ │ │ +const │ │ │ │ │ +192 { │ │ │ │ │ +193 return dgfHostFactory_.boundaryParameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_: │ │ │ │ │ +_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n( intersection ) ); │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +196 template< class Entity > │ │ │ │ │ +_1_9_7 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +198 { │ │ │ │ │ +199 return dgfHostFactory_.parameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +( entity ) ); │ │ │ │ │ +200 } │ │ │ │ │ +201 │ │ │ │ │ +202 private: │ │ │ │ │ +203 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_ _> dgfHostFactory_; │ │ │ │ │ +204 _G_r_i_d *grid_; │ │ │ │ │ +205 }; │ │ │ │ │ +206 │ │ │ │ │ +207 │ │ │ │ │ +208 │ │ │ │ │ +209 // DGFGridInfo for GeometryGrid │ │ │ │ │ +210 // ---------------------------- │ │ │ │ │ +211 │ │ │ │ │ +212 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ +_2_1_3 struct _D_G_F_G_r_i_d_I_n_f_o< _G_e_o_m_e_t_r_y_G_r_i_d< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ +214 { │ │ │ │ │ +_2_1_5 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ +216 { │ │ │ │ │ +217 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f(); │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +_2_2_0 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ +221 { │ │ │ │ │ +222 return -1.0; │ │ │ │ │ +223 } │ │ │ │ │ +224 }; │ │ │ │ │ +225 │ │ │ │ │ +226} │ │ │ │ │ +227 │ │ │ │ │ +228#endif // #ifndef DUNE_DGFGEOGRID_HH │ │ │ │ │ +_g_e_o_m_e_t_r_y_g_r_i_d_._h_h │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ +_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision │ │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ -@ int32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2 │ │ │ │ │ -@ uint32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ -@ uint8 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ -@ float32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4 │ │ │ │ │ -@ float64 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ -OutputType │ │ │ │ │ -How the bulk data should be stored in the file. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ -@ ascii │ │ │ │ │ -Output to the file is in ascii. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w │ │ │ │ │ -@ appendedraw │ │ │ │ │ -Output is to the file is appended raw binary. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ -@ appendedbase64 │ │ │ │ │ -Output is to the file is appended base64 binary. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 │ │ │ │ │ -@ base64 │ │ │ │ │ -Output to the file is inline base64 binary. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r │ │ │ │ │ -int renumber(const Dune::GeometryType &t, int i) │ │ │ │ │ -renumber VTK <-> Dune │ │ │ │ │ -DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ -FileType │ │ │ │ │ -which type of VTK file to write │ │ │ │ │ -DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ -@ polyData │ │ │ │ │ -for .vtp files (PolyData) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ -@ unstructuredGrid │ │ │ │ │ -for .vtu files (UnstructuredGrid) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g │ │ │ │ │ -std::string toString(Precision p) │ │ │ │ │ -map precision to VTK type name │ │ │ │ │ -DDeeffiinniittiioonn common.hh:280 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e │ │ │ │ │ -DataMode │ │ │ │ │ -Whether to produce conforming or non-conforming output. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -@ conforming │ │ │ │ │ -Output conforming data. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -@ nonconforming │ │ │ │ │ -Output non-conforming data. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_y_p_e_S_i_z_e │ │ │ │ │ -std::size_t typeSize(Precision p) │ │ │ │ │ -map precision to byte size │ │ │ │ │ -DDeeffiinniittiioonn common.hh:300 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ -mapping from GeometryType to VTKGeometryType │ │ │ │ │ -DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ -std::string getEndiannessString() │ │ │ │ │ -determine endianness of this C++ implementation │ │ │ │ │ -DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GeometryType │ │ │ │ │ -Type representing VTK's entity geometry types. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_l_i_n_e │ │ │ │ │ -@ line │ │ │ │ │ -DDeeffiinniittiioonn common.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_y_r_a_m_i_d │ │ │ │ │ -@ pyramid │ │ │ │ │ -DDeeffiinniittiioonn common.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_h_e_d_r_o_n │ │ │ │ │ -@ polyhedron │ │ │ │ │ -DDeeffiinniittiioonn common.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l │ │ │ │ │ -@ quadrilateral │ │ │ │ │ -DDeeffiinniittiioonn common.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_v_e_r_t_e_x │ │ │ │ │ -@ vertex │ │ │ │ │ -DDeeffiinniittiioonn common.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_e_t_r_a_h_e_d_r_o_n │ │ │ │ │ -@ tetrahedron │ │ │ │ │ -DDeeffiinniittiioonn common.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_r_i_s_m │ │ │ │ │ -@ prism │ │ │ │ │ -DDeeffiinniittiioonn common.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_h_e_x_a_h_e_d_r_o_n │ │ │ │ │ -@ hexahedron │ │ │ │ │ -DDeeffiinniittiioonn common.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_r_i_a_n_g_l_e │ │ │ │ │ -@ triangle │ │ │ │ │ -DDeeffiinniittiioonn common.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_g_o_n │ │ │ │ │ -@ polygon │ │ │ │ │ -DDeeffiinniittiioonn common.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e │ │ │ │ │ -determine a type to safely put another type into a stream │ │ │ │ │ -DDeeffiinniittiioonn common.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_:_:_T_y_p_e │ │ │ │ │ -T Type │ │ │ │ │ -type to convert T to before putting it into a stream with << │ │ │ │ │ -DDeeffiinniittiioonn common.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_T_y_p_e │ │ │ │ │ -unsigned Type │ │ │ │ │ -DDeeffiinniittiioonn common.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_T_y_p_e │ │ │ │ │ -int Type │ │ │ │ │ -DDeeffiinniittiioonn common.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _c_h_a_r_ _>_:_:_T_y_p_e │ │ │ │ │ -std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type │ │ │ │ │ -Type │ │ │ │ │ -DDeeffiinniittiioonn common.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ -Descriptor struct for VTK fields. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:328 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -The number of components in the data field. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:364 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision precision() const │ │ │ │ │ -The precision used for the output of the data field. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:370 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -VTK data type. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:333 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r │ │ │ │ │ -@ tensor │ │ │ │ │ -tensor field (always 3x3) │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r │ │ │ │ │ -@ vector │ │ │ │ │ -vector-valued field (always 3D, will be padded if necessary) │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r │ │ │ │ │ -@ scalar │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ -FieldInfo(std::string name, Type type, std::size_t size, Precision │ │ │ │ │ -prec=Precision::float32) │ │ │ │ │ -Create a FieldInfo instance with the given name, type and size. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:344 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_t_y_p_e │ │ │ │ │ -Type type() const │ │ │ │ │ -The type of the data field. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:358 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_n_a_m_e │ │ │ │ │ -std::string name() const │ │ │ │ │ -The name of the data field. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:352 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +Derive an implementation of an analytical coordinate function from this class. │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Base::RangeVector RangeVector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ +grid wrapper replacing the geometries │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/grid.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +traits structure containing types for a codimension │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/grid.hh:611 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ +provides access to host grid objects from GeometryGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/blocks/projection.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_f_u_n_c_t_i_o_n │ │ │ │ │ +ExpressionPointer function(const std::string &name) const │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/blocks/projection.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/blocks/projection.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_P_r_o_j_e_c_t_i_o_n_B_l_o_c_k_:_:_E_x_p_r_e_s_s_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +virtual void evaluate(const Vector &argument, Vector &result) const =0 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, RangeVector &y) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_E_x_p_r_e_s_s_i_o_n │ │ │ │ │ +dgf::ProjectionBlock::Expression Expression │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DGFCoordFunction(const Expression *expression) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Base::RangeVector RangeVector │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _f_a_l_s_e_ _>_:_:_c_r_e_a_t_e │ │ │ │ │ +static CoordFunction * create(std::istream &, const HostGrid &) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _t_r_u_e_ _>_:_:_c_r_e_a_t_e │ │ │ │ │ +static CoordFunction * create(std::istream &, const HostGrid &hostGrid) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _>_,_ _f_a_l_s_e │ │ │ │ │ +_>_:_:_c_r_e_a_t_e │ │ │ │ │ +static CoordFunction * create(std::istream &input, const HostGrid &hostGrid) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_,_ _D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _>_,_ _f_a_l_s_e │ │ │ │ │ +_>_:_:_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DGFCoordFunction< dimD, dimR > CoordFunction │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_V_e_r_t_e_x │ │ │ │ │ +Grid::template Codim< dimension >::Entity Vertex │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:172 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicator │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< │ │ │ │ │ +GG, II > &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_E_l_e_m_e_n_t │ │ │ │ │ +Grid::template Codim< 0 >::Entity Element │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_g_r_i_d │ │ │ │ │ +Grid * grid() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_C_o_o_r_d_F_u_n_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_G_r_i_d │ │ │ │ │ +GeometryGrid< HostGrid, CoordFunction, Allocator > Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:178 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:184 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ +static double refineWeight() │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +DDeeffiinniittiioonn dgfgeogrid.hh:215 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ +Some simple static information for a given GridType. │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +number of globalRefine steps needed to refuce h by 0.5 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_p_r_o_j_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarywriter.hh File Reference │ │ │ │ +dune-grid: dgfoned.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,48 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundarywriter.hh File Reference
│ │ │ │ +
dgfoned.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <memory>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/grid/io/file/vtk/basicwriter.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/boundaryiterators.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/skeletonfunction.hh>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <istream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ │ +#include <dune/grid/onedgrid.hh>
│ │ │ │ +#include "dgfparser.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::NonConformingBoundaryWriter< GV >
struct  Dune::DGFGridInfo< OneDGrid >
 
struct  Dune::DGFGridFactory< OneDGrid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,31 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundarywriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_o_u_n_d_a_r_y_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_k_e_l_e_t_o_n_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +dgfoned.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_o_n_e_d_g_r_i_d_._h_h> │ │ │ │ │ +#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_<_ _G_V_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _O_n_e_D_G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarywriter.hh Source File │ │ │ │ +dune-grid: dgfoned.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,116 +70,295 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundarywriter.hh
│ │ │ │ +
dgfoned.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <memory>
│ │ │ │ -
10#include <string>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ -
19
│ │ │ │ -
20 namespace VTK {
│ │ │ │ +
5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ +
6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ +
7
│ │ │ │ +
8//- C++ includes
│ │ │ │ +
9#include <algorithm>
│ │ │ │ +
10#include <fstream>
│ │ │ │ +
11#include <iostream>
│ │ │ │ +
12#include <istream>
│ │ │ │ +
13#include <vector>
│ │ │ │ +
14
│ │ │ │ +
15//- dune-common includes
│ │ │ │ +
16#include <dune/common/exceptions.hh>
│ │ │ │ +
17
│ │ │ │ +
18//- dune-grid includes
│ │ │ │ + │ │ │ │ +
20#include <dune/grid/onedgrid.hh>
│ │ │ │
21
│ │ │ │ -
22 template<typename GV>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
│ │ │ │ -
26 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
29
│ │ │ │ -
30 const GV& gv;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
│ │ │ │ -
35 { }
│ │ │ │ -
│ │ │ │ +
22//- local includes
│ │ │ │ +
23#include "dgfparser.hh"
│ │ │ │ +
24
│ │ │ │ +
25
│ │ │ │ +
26namespace
│ │ │ │ +
27{
│ │ │ │ +
28 // helper method used below
│ │ │ │ +
29 double getfirst ( std::vector< double > v )
│ │ │ │ +
30 {
│ │ │ │ +
31 return v[ 0 ];
│ │ │ │ +
32 }
│ │ │ │ +
33} // end anonymous namespace
│ │ │ │ +
34
│ │ │ │ +
35
│ │ │ │
36
│ │ │ │ - │ │ │ │ -
38
│ │ │ │ -
39 template<typename Func>
│ │ │ │ -
│ │ │ │ -
40 void addCellData(const std::shared_ptr<Func>& p, const std::string& name) {
│ │ │ │ -
41 addCellData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ -
42 (new SkeletonFunctionWriter<Func>(p, name)));
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
45 template<typename Func>
│ │ │ │ +
37namespace Dune
│ │ │ │ +
38{
│ │ │ │ +
39
│ │ │ │ +
40 // DGFGridInfo
│ │ │ │ +
41 // -----------
│ │ │ │ +
42
│ │ │ │ +
43 template< >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 {
│ │ │ │
│ │ │ │ -
46 void addCellData(Func* p, const std::string& name) {
│ │ │ │ -
47 addCellData(std::shared_ptr<Func>(p), name);
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ - │ │ │ │ -
51
│ │ │ │ -
52 template<typename Func>
│ │ │ │ -
│ │ │ │ -
53 void addPointData(const std::shared_ptr<Func>& p, const std::string& name) {
│ │ │ │ -
54 addPointData(std::shared_ptr<typename Base::FunctionWriter>
│ │ │ │ -
55 (new SkeletonFunctionWriter<Func>(p, name)));
│ │ │ │ -
56 }
│ │ │ │ +
46 static int refineStepsForHalf ()
│ │ │ │ +
47 {
│ │ │ │ +
48 return 1;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 static double refineWeight ()
│ │ │ │ +
52 {
│ │ │ │ +
53 return 0.5;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55 };
│ │ │ │
│ │ │ │ +
56
│ │ │ │
57
│ │ │ │ -
58 template<typename Func>
│ │ │ │ -
│ │ │ │ -
59 void addPointData(Func* p, const std::string& name) {
│ │ │ │ -
60 addPointData(std::shared_ptr<Func>(p), name);
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
63 };
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
65 } // namespace VTK
│ │ │ │ -
66
│ │ │ │ -
68
│ │ │ │ -
69} // namespace Dune
│ │ │ │ -
70
│ │ │ │ -
71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
│ │ │ │ - │ │ │ │ -
Functions for VTK output on the skeleton.
│ │ │ │ -
Functions for VTK output on the skeleton.
│ │ │ │ +
58
│ │ │ │ +
59 // DGFGridFactory< OneDGrid >
│ │ │ │ +
60 // --------------------------
│ │ │ │ +
61
│ │ │ │ +
62 template< >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 {
│ │ │ │ +
66 typedef OneDGrid Grid;
│ │ │ │ +
68 const static int dimension = Grid::dimension;
│ │ │ │ +
70 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
73 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
74 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
75 : grid_( 0 ),
│ │ │ │ +
76 emptyParameters_( 0 )
│ │ │ │ +
77 {
│ │ │ │ +
78 generate( input, comm );
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
82 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
83 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
84 : grid_( 0 ),
│ │ │ │ +
85 emptyParameters_( 0 )
│ │ │ │ +
86 {
│ │ │ │ +
87 std::ifstream input( filename.c_str() );
│ │ │ │ +
88 generate( input, comm );
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
│ │ │ │ +
92 Grid *grid () const
│ │ │ │ +
93 {
│ │ │ │ +
94 return grid_;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
98 template< class GG, class II >
│ │ │ │ +
│ │ │ │ +
99 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
100 {
│ │ │ │ +
101 return false;
│ │ │ │ +
102 }
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
104 template< class GG, class II >
│ │ │ │ +
│ │ │ │ +
105 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
106 {
│ │ │ │ +
107 // OneDGrid returns boundary segment index;
│ │ │ │ +
108 // we return the index as the method boundaryId is deprecated
│ │ │ │ +
109 return intersection.boundarySegmentIndex();
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
113 template< class Entity >
│ │ │ │ +
│ │ │ │ +
114 int numParameters ( const Entity & ) const
│ │ │ │ +
115 {
│ │ │ │ +
116 return 0;
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
120 template< int codim >
│ │ │ │ +
│ │ │ │ +
121 int numParameters () const
│ │ │ │ +
122 {
│ │ │ │ +
123 return 0;
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
126 template< class Entity >
│ │ │ │ +
│ │ │ │ +
127 std::vector< double >& parameter ( const Entity &entity )
│ │ │ │ +
128 {
│ │ │ │ +
129 return parameter< Entity::codimension >( entity );
│ │ │ │ +
130 }
│ │ │ │ +
│ │ │ │ +
131
│ │ │ │ +
133 template< int codim >
│ │ │ │ +
│ │ │ │ +
134 std::vector< double > &parameter ( [[maybe_unused]] const typename Grid::Codim< codim >::Entity &element )
│ │ │ │ +
135 {
│ │ │ │ +
136 return emptyParameters_;
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
141 {
│ │ │ │ +
142 return false;
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
146 template< class GG, class II >
│ │ │ │ +
│ │ │ │ +
147 const DGFBoundaryParameter::type &boundaryParameter ( [[maybe_unused]] const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
148 {
│ │ │ │ + │ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
152 private:
│ │ │ │ +
153 // generate grid
│ │ │ │ +
154 void generate ( std::istream &input, MPICommunicatorType comm );
│ │ │ │ +
155
│ │ │ │ +
156 Grid *grid_;
│ │ │ │ +
157 std::vector< double > emptyParameters_;
│ │ │ │ +
158 };
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
160
│ │ │ │ +
161
│ │ │ │ +
162 // Implementation of DGFGridFactory< OneDGrid >
│ │ │ │ +
163 // --------------------------------------------
│ │ │ │ +
164
│ │ │ │ +
165 inline void DGFGridFactory< OneDGrid >::generate ( std::istream &input, [[maybe_unused]] MPICommunicatorType comm )
│ │ │ │ +
166 {
│ │ │ │ +
167 // try to open interval block
│ │ │ │ +
168 dgf::IntervalBlock intervalBlock( input );
│ │ │ │ +
169
│ │ │ │ +
170 // try to open vertex block
│ │ │ │ +
171 int dimensionworld = Grid::dimensionworld;
│ │ │ │ +
172 dgf::VertexBlock vertexBlock( input, dimensionworld );
│ │ │ │ +
173
│ │ │ │ +
174 // check at least one block is active
│ │ │ │ +
175 if( !( vertexBlock.isactive() || intervalBlock.isactive() ))
│ │ │ │ +
176 DUNE_THROW( DGFException, "No readable block found" );
│ │ │ │ +
177
│ │ │ │ +
178 std::vector< std::vector< double > > vertices;
│ │ │ │ +
179
│ │ │ │ +
180 // read vertices first
│ │ │ │ +
181 if( vertexBlock.isactive() )
│ │ │ │ +
182 {
│ │ │ │ +
183 int nparameter = 0;
│ │ │ │ +
184 std::vector< std::vector< double > > parameter;
│ │ │ │ +
185 vertexBlock.get( vertices, parameter, nparameter );
│ │ │ │ +
186
│ │ │ │ +
187 if( nparameter > 0 )
│ │ │ │ +
188 std::cerr << "Warning: vertex parameters will be ignored" << std::endl;
│ │ │ │ +
189 }
│ │ │ │ +
190
│ │ │ │ +
191 // get vertices from interval block
│ │ │ │ +
192 if ( intervalBlock.isactive() )
│ │ │ │ +
193 {
│ │ │ │ +
194 if( intervalBlock.dimw() != dimensionworld )
│ │ │ │ +
195 {
│ │ │ │ +
196 DUNE_THROW( DGFException, "Error: wrong coordinate dimension in interval block \
│ │ │ │ +
197 (got " << intervalBlock.dimw() << ", expected " << dimensionworld << ")" );
│ │ │ │ +
198 }
│ │ │ │ +
199
│ │ │ │ +
200 int nintervals = intervalBlock.numIntervals();
│ │ │ │ +
201 for( int i = 0; i < nintervals; ++i )
│ │ │ │ +
202 intervalBlock.getVtx( i, vertices );
│ │ │ │ +
203 }
│ │ │ │ +
204
│ │ │ │ +
205 // copy to vector of doubles
│ │ │ │ +
206 std::vector< double > vtx( vertices.size() );
│ │ │ │ +
207 transform( vertices.begin(), vertices.end(), vtx.begin(), getfirst );
│ │ │ │ +
208
│ │ │ │ +
209 // remove duplicates
│ │ │ │ +
210 std::sort( vtx.begin(), vtx.end() );
│ │ │ │ +
211 std::vector< double >::iterator it = std::unique( vtx.begin(), vtx.end() );
│ │ │ │ +
212 vtx.erase( it, vtx.end() );
│ │ │ │ +
213 if( vertices.size() != vtx.size() )
│ │ │ │ +
214 std::cerr << "Warning: removed duplicate vertices" << std::endl;
│ │ │ │ +
215
│ │ │ │ +
216 // create grid
│ │ │ │ +
217 grid_ = new OneDGrid( vtx );
│ │ │ │ +
218 }
│ │ │ │ +
219
│ │ │ │ +
220} // end namespace Dune
│ │ │ │ +
221
│ │ │ │ +
222#endif // #ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ +
The OneDGrid class.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition basicwriter.hh:35
│ │ │ │ -
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:76
│ │ │ │ -
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ -
Definition boundaryiterators.hh:159
│ │ │ │ -
Definition boundarywriter.hh:26
│ │ │ │ -
void addPointData(const std::shared_ptr< Func > &p, const std::string &name)
Definition boundarywriter.hh:53
│ │ │ │ -
void addCellData(Func *p, const std::string &name)
Definition boundarywriter.hh:46
│ │ │ │ -
void addPointData(Func *p, const std::string &name)
Definition boundarywriter.hh:59
│ │ │ │ -
NonConformingBoundaryWriter(const GV &gv_)
Definition boundarywriter.hh:33
│ │ │ │ -
void addCellData(const std::shared_ptr< Func > &p, const std::string &name)
Definition boundarywriter.hh:40
│ │ │ │ -
function writer for skeleton functions
Definition skeletonfunction.hh:83
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ +
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:236
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ +
GridFamily::Traits::template Codim< cd >::Entity Entity
A type that is a model of a Dune::Entity<cd,dim,...>.
Definition common/grid.hh:419
│ │ │ │ +
static double refineWeight()
Definition dgfoned.hh:51
│ │ │ │ +
static int refineStepsForHalf()
Definition dgfoned.hh:46
│ │ │ │ +
OneDGrid Grid
grid type
Definition dgfoned.hh:66
│ │ │ │ +
std::vector< double > & parameter(const typename Grid::Codim< codim >::Entity &element)
return empty vector
Definition dgfoned.hh:134
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
MPI communicator type.
Definition dgfoned.hh:70
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
return invalid default value
Definition dgfoned.hh:147
│ │ │ │ +
std::vector< double > & parameter(const Entity &entity)
Definition dgfoned.hh:127
│ │ │ │ +
int boundaryId(const Dune::Intersection< GG, II > &intersection) const
Definition dgfoned.hh:105
│ │ │ │ +
Grid * grid() const
get grid
Definition dgfoned.hh:92
│ │ │ │ +
bool haveBoundaryParameters() const
OneDGrid does not support boundary parameters.
Definition dgfoned.hh:140
│ │ │ │ +
int numParameters(const Entity &) const
OneDGrid does not support parameters, returns 0.
Definition dgfoned.hh:114
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking filename
Definition dgfoned.hh:82
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking istream
Definition dgfoned.hh:73
│ │ │ │ +
int numParameters() const
OneDGrid does not support parameters, returns 0.
Definition dgfoned.hh:121
│ │ │ │ +
bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
always returns false
Definition dgfoned.hh:99
│ │ │ │ +
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
One-dimensional adaptive grid.
Definition onedgrid.hh:94
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,119 +2,345 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -boundarywriter.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfoned.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_o_u_n_d_a_r_y_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_k_e_l_e_t_o_n_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ │ -19 │ │ │ │ │ -20 namespace VTK { │ │ │ │ │ +5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ +6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ +7 │ │ │ │ │ +8//- C++ includes │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15//- dune-common includes │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18//- dune-grid includes │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_o_n_e_d_g_r_i_d_._h_h> │ │ │ │ │ 21 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 class _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r │ │ │ │ │ -24 : public _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y, │ │ │ │ │ -25 public _B_a_s_i_c_W_r_i_t_e_r > │ │ │ │ │ -26 { │ │ │ │ │ -27 typedef _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_G_V_> _F_a_c_t_o_r_y; │ │ │ │ │ -28 typedef _B_a_s_i_c_W_r_i_t_e_r_<_F_a_c_t_o_r_y_> _B_a_s_e; │ │ │ │ │ -29 │ │ │ │ │ -30 const GV& gv; │ │ │ │ │ -31 │ │ │ │ │ -32 public: │ │ │ │ │ -_3_3 _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r(const GV& gv_) │ │ │ │ │ -34 : _F_a_c_t_o_r_y(gv_), _B_a_s_e(static_cast(*this)), gv(gv_) │ │ │ │ │ -35 { } │ │ │ │ │ +22//- local includes │ │ │ │ │ +23#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ +24 │ │ │ │ │ +25 │ │ │ │ │ +26namespace │ │ │ │ │ +27{ │ │ │ │ │ +28 // helper method used below │ │ │ │ │ +29 double getfirst ( std::vector< double > v ) │ │ │ │ │ +30 { │ │ │ │ │ +31 return v[ 0 ]; │ │ │ │ │ +32 } │ │ │ │ │ +33} // end anonymous namespace │ │ │ │ │ +34 │ │ │ │ │ +35 │ │ │ │ │ 36 │ │ │ │ │ -37 using _B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a; │ │ │ │ │ -38 │ │ │ │ │ -39 template │ │ │ │ │ -_4_0 void _a_d_d_C_e_l_l_D_a_t_a(const std::shared_ptr& p, const std::string& name) { │ │ │ │ │ -41 _a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr │ │ │ │ │ -42 (new _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_F_u_n_c_>(p, name))); │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -45 template │ │ │ │ │ -_4_6 void _a_d_d_C_e_l_l_D_a_t_a(Func* p, const std::string& name) { │ │ │ │ │ -47 _a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr(p), name); │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -50 using _B_a_s_e_:_:_a_d_d_P_o_i_n_t_D_a_t_a; │ │ │ │ │ -51 │ │ │ │ │ -52 template │ │ │ │ │ -_5_3 void _a_d_d_P_o_i_n_t_D_a_t_a(const std::shared_ptr& p, const std::string& name) { │ │ │ │ │ -54 _a_d_d_P_o_i_n_t_D_a_t_a(std::shared_ptr │ │ │ │ │ -55 (new _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_<_F_u_n_c_>(p, name))); │ │ │ │ │ -56 } │ │ │ │ │ +37namespace _D_u_n_e │ │ │ │ │ +38{ │ │ │ │ │ +39 │ │ │ │ │ +40 // DGFGridInfo │ │ │ │ │ +41 // ----------- │ │ │ │ │ +42 │ │ │ │ │ +43 template< > │ │ │ │ │ +_4_4 struct _D_G_F_G_r_i_d_I_n_f_o< _O_n_e_D_G_r_i_d > │ │ │ │ │ +45 { │ │ │ │ │ +_4_6 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ +47 { │ │ │ │ │ +48 return 1; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_1 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ +52 { │ │ │ │ │ +53 return 0.5; │ │ │ │ │ +54 } │ │ │ │ │ +55 }; │ │ │ │ │ +56 │ │ │ │ │ 57 │ │ │ │ │ -58 template │ │ │ │ │ -_5_9 void _a_d_d_P_o_i_n_t_D_a_t_a(Func* p, const std::string& name) { │ │ │ │ │ -60 _a_d_d_P_o_i_n_t_D_a_t_a(std::shared_ptr(p), name); │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -63 }; │ │ │ │ │ -64 │ │ │ │ │ -65 } // namespace VTK │ │ │ │ │ -66 │ │ │ │ │ -68 │ │ │ │ │ -69} // namespace Dune │ │ │ │ │ -70 │ │ │ │ │ -71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ -_b_a_s_i_c_w_r_i_t_e_r_._h_h │ │ │ │ │ -_s_k_e_l_e_t_o_n_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ -Functions for VTK output on the skeleton. │ │ │ │ │ -_b_o_u_n_d_a_r_y_i_t_e_r_a_t_o_r_s_._h_h │ │ │ │ │ -Functions for VTK output on the skeleton. │ │ │ │ │ +58 │ │ │ │ │ +59 // DGFGridFactory< OneDGrid > │ │ │ │ │ +60 // -------------------------- │ │ │ │ │ +61 │ │ │ │ │ +62 template< > │ │ │ │ │ +_6_3 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _O_n_e_D_G_r_i_d > │ │ │ │ │ +64 { │ │ │ │ │ +_6_6 typedef _O_n_e_D_G_r_i_d _G_r_i_d; │ │ │ │ │ +_6_8 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_7_0 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +71 │ │ │ │ │ +_7_3 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +74 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +75 : grid_( 0 ), │ │ │ │ │ +76 emptyParameters_( 0 ) │ │ │ │ │ +77 { │ │ │ │ │ +78 generate( input, comm ); │ │ │ │ │ +79 } │ │ │ │ │ +80 │ │ │ │ │ +_8_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +83 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +84 : grid_( 0 ), │ │ │ │ │ +85 emptyParameters_( 0 ) │ │ │ │ │ +86 { │ │ │ │ │ +87 std::ifstream input( filename.c_str() ); │ │ │ │ │ +88 generate( input, comm ); │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +_9_2 _G_r_i_d *_g_r_i_d () const │ │ │ │ │ +93 { │ │ │ │ │ +94 return grid_; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +98 template< class GG, class II > │ │ │ │ │ +_9_9 bool _w_a_s_I_n_s_e_r_t_e_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ +100 { │ │ │ │ │ +101 return false; │ │ │ │ │ +102 } │ │ │ │ │ +103 │ │ │ │ │ +104 template< class GG, class II > │ │ │ │ │ +_1_0_5 int _b_o_u_n_d_a_r_y_I_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ +106 { │ │ │ │ │ +107 // OneDGrid returns boundary segment index; │ │ │ │ │ +108 // we return the index as the method boundaryId is deprecated │ │ │ │ │ +109 return intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x(); │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +113 template< class Entity > │ │ │ │ │ +_1_1_4 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ +115 { │ │ │ │ │ +116 return 0; │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +120 template< int codim > │ │ │ │ │ +_1_2_1 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +122 { │ │ │ │ │ +123 return 0; │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +126 template< class Entity > │ │ │ │ │ +_1_2_7 std::vector< double >& _p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +128 { │ │ │ │ │ +129 return parameter< Entity::codimension >( entity ); │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +133 template< int codim > │ │ │ │ │ +_1_3_4 std::vector< double > &_p_a_r_a_m_e_t_e_r ( [[maybe_unused]] const typename _G_r_i_d_:_: │ │ │ │ │ +_C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &element ) │ │ │ │ │ +135 { │ │ │ │ │ +136 return emptyParameters_; │ │ │ │ │ +137 } │ │ │ │ │ +138 │ │ │ │ │ +_1_4_0 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +141 { │ │ │ │ │ +142 return false; │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +146 template< class GG, class II > │ │ │ │ │ +_1_4_7 const _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e &_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( [[maybe_unused]] │ │ │ │ │ +const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ +148 { │ │ │ │ │ +149 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +152 private: │ │ │ │ │ +153 // generate grid │ │ │ │ │ +154 void generate ( std::istream &input, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm ); │ │ │ │ │ +155 │ │ │ │ │ +156 _G_r_i_d *grid_; │ │ │ │ │ +157 std::vector< double > emptyParameters_; │ │ │ │ │ +158 }; │ │ │ │ │ +159 │ │ │ │ │ +160 │ │ │ │ │ +161 │ │ │ │ │ +162 // Implementation of DGFGridFactory< OneDGrid > │ │ │ │ │ +163 // -------------------------------------------- │ │ │ │ │ +164 │ │ │ │ │ +165 inline void DGFGridFactory< OneDGrid >::generate ( std::istream &input, [ │ │ │ │ │ +[maybe_unused]] MPICommunicatorType comm ) │ │ │ │ │ +166 { │ │ │ │ │ +167 // try to open interval block │ │ │ │ │ +168 dgf::IntervalBlock intervalBlock( input ); │ │ │ │ │ +169 │ │ │ │ │ +170 // try to open vertex block │ │ │ │ │ +171 int dimensionworld = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +172 dgf::VertexBlock vertexBlock( input, dimensionworld ); │ │ │ │ │ +173 │ │ │ │ │ +174 // check at least one block is active │ │ │ │ │ +175 if( !( vertexBlock.isactive() || intervalBlock.isactive() )) │ │ │ │ │ +176 DUNE_THROW( DGFException, "No readable block found" ); │ │ │ │ │ +177 │ │ │ │ │ +178 std::vector< std::vector< double > > vertices; │ │ │ │ │ +179 │ │ │ │ │ +180 // read vertices first │ │ │ │ │ +181 if( vertexBlock.isactive() ) │ │ │ │ │ +182 { │ │ │ │ │ +183 int nparameter = 0; │ │ │ │ │ +184 std::vector< std::vector< double > > _p_a_r_a_m_e_t_e_r; │ │ │ │ │ +185 vertexBlock.get( vertices, _p_a_r_a_m_e_t_e_r, nparameter ); │ │ │ │ │ +186 │ │ │ │ │ +187 if( nparameter > 0 ) │ │ │ │ │ +188 std::cerr << "Warning: vertex parameters will be ignored" << std::endl; │ │ │ │ │ +189 } │ │ │ │ │ +190 │ │ │ │ │ +191 // get vertices from interval block │ │ │ │ │ +192 if ( intervalBlock.isactive() ) │ │ │ │ │ +193 { │ │ │ │ │ +194 if( intervalBlock.dimw() != dimensionworld ) │ │ │ │ │ +195 { │ │ │ │ │ +196 DUNE_THROW( DGFException, "Error: wrong coordinate dimension in interval │ │ │ │ │ +block \ │ │ │ │ │ +197 (got " << intervalBlock.dimw() << ", expected " << dimensionworld << ")" ); │ │ │ │ │ +198 } │ │ │ │ │ +199 │ │ │ │ │ +200 int nintervals = intervalBlock.numIntervals(); │ │ │ │ │ +201 for( int i = 0; i < nintervals; ++i ) │ │ │ │ │ +202 intervalBlock.getVtx( i, vertices ); │ │ │ │ │ +203 } │ │ │ │ │ +204 │ │ │ │ │ +205 // copy to vector of doubles │ │ │ │ │ +206 std::vector< double > vtx( vertices.size() ); │ │ │ │ │ +207 transform( vertices.begin(), vertices.end(), vtx.begin(), getfirst ); │ │ │ │ │ +208 │ │ │ │ │ +209 // remove duplicates │ │ │ │ │ +210 std::sort( vtx.begin(), vtx.end() ); │ │ │ │ │ +211 std::vector< double >::iterator it = std::unique( vtx.begin(), vtx.end() ); │ │ │ │ │ +212 vtx.erase( it, vtx.end() ); │ │ │ │ │ +213 if( vertices.size() != vtx.size() ) │ │ │ │ │ +214 std::cerr << "Warning: removed duplicate vertices" << std::endl; │ │ │ │ │ +215 │ │ │ │ │ +216 // create grid │ │ │ │ │ +217 grid_ = new OneDGrid( vtx ); │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +220} // end namespace Dune │ │ │ │ │ +221 │ │ │ │ │ +222#endif // #ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ +_o_n_e_d_g_r_i_d_._h_h │ │ │ │ │ +The OneDGrid class. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ -DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn boundarywriter.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void addPointData(const std::shared_ptr< Func > &p, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn boundarywriter.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(Func *p, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn boundarywriter.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void addPointData(Func *p, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn boundarywriter.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r │ │ │ │ │ -NonConformingBoundaryWriter(const GV &gv_) │ │ │ │ │ -DDeeffiinniittiioonn boundarywriter.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const std::shared_ptr< Func > &p, const std::string &name) │ │ │ │ │ -DDeeffiinniittiioonn boundarywriter.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -function writer for skeleton functions │ │ │ │ │ -DDeeffiinniittiioonn skeletonfunction.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Element &element) │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ │ +index of the boundary segment within the macro grid │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static constexpr int dimensionworld │ │ │ │ │ +The dimension of the world the grid lives in. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ +GridFamily::Traits::template Codim< cd >::Entity Entity │ │ │ │ │ +A type that is a model of a Dune::Entity. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:419 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _O_n_e_D_G_r_i_d_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ +static double refineWeight() │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _O_n_e_D_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ +static int refineStepsForHalf() │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_G_r_i_d │ │ │ │ │ +OneDGrid Grid │ │ │ │ │ +grid type │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const typename Grid::Codim< codim >::Entity │ │ │ │ │ +&element) │ │ │ │ │ +return empty vector │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +MPI communicator type. │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< │ │ │ │ │ +GG, II > &intersection) const │ │ │ │ │ +return invalid default value │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() const │ │ │ │ │ +get grid │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +OneDGrid does not support boundary parameters. │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters(const Entity &) const │ │ │ │ │ +OneDGrid does not support parameters, returns 0. │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ +comm=MPIHelper::getCommunicator()) │ │ │ │ │ +constructor taking filename │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +constructor taking istream │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +OneDGrid does not support parameters, returns 0. │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:121 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ +always returns false │ │ │ │ │ +DDeeffiinniittiioonn dgfoned.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ +Some simple static information for a given GridType. │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ +static const type & defaultValue() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_O_n_e_D_G_r_i_d │ │ │ │ │ +One-dimensional adaptive grid. │ │ │ │ │ +DDeeffiinniittiioonn onedgrid.hh:94 │ │ │ │ │ +_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pointiterator.hh File Reference │ │ │ │ +dune-grid: dgfgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pointiterator.hh File Reference
│ │ │ │ +
dgfgridfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iterator>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/iteratorfacades.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corneriterator.hh>
│ │ │ │ +#include <map>
│ │ │ │ +#include <assert.h>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/macrogrid.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::PointIterator< CellIterator, IS >
 iterate over the points of some corner range More...
struct  Dune::DGFGridFactory< G >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,30 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -pointiterator.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +dgfgridfactory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_m_a_c_r_o_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_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_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_<_ _C_e_l_l_I_t_e_r_a_t_o_r_,_ _I_S_ _> │ │ │ │ │ -  iterate over the points of some corner range _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _G_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pointiterator.hh Source File │ │ │ │ +dune-grid: dgfgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,151 +70,271 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pointiterator.hh
│ │ │ │ +
dgfgridfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <iterator>
│ │ │ │ +
5#ifndef DUNE_DGF_GRIDFACTORY_HH
│ │ │ │ +
6#define DUNE_DGF_GRIDFACTORY_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/iteratorfacades.hh>
│ │ │ │ -
13#include <dune/common/typetraits.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ +
11#include <map>
│ │ │ │ +
12#include <assert.h>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
22
│ │ │ │ -
23 namespace VTK {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │
24
│ │ │ │ -
26
│ │ │ │ -
49 template<typename CellIterator, typename IS>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51 : public ForwardIteratorFacade
│ │ │ │ -
52 < PointIterator<CellIterator, IS>,
│ │ │ │ -
53 const Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ -
54 CellIterator>::value_type>::type>,
│ │ │ │ -
55 const Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ -
56 CellIterator>::value_type>::type>&,
│ │ │ │ -
57 typename std::iterator_traits<CellIterator>::difference_type>
│ │ │ │ -
58 {
│ │ │ │ -
59 public:
│ │ │ │ -
60 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
│ │ │ │ -
61 CellIterator>::value_type>::type> Corner;
│ │ │ │ +
25 // External Forward Declarations
│ │ │ │ +
26 // -----------------------------
│ │ │ │ +
27
│ │ │ │ +
28 template < class GridImp, class IntersectionImp >
│ │ │ │ +
29 class Intersection;
│ │ │ │ +
30
│ │ │ │ +
31
│ │ │ │ +
32
│ │ │ │ +
33 // DGFGridFactory
│ │ │ │ +
34 // --------------
│ │ │ │ +
35
│ │ │ │ +
36 template < class G >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {
│ │ │ │ +
39 typedef G Grid;
│ │ │ │ +
40 const static int dimension = Grid::dimension;
│ │ │ │ +
41 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
42
│ │ │ │ +
43 private:
│ │ │ │ +
44 typedef typename Grid::template Codim< 0 >::Entity Element;
│ │ │ │ +
45
│ │ │ │ +
46 typedef typename Grid::template Codim< dimension >::Entity Vertex;
│ │ │ │ +
47
│ │ │ │ +
48 public:
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
50 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
51 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
52 : macroGrid_( filename.c_str(), comm )
│ │ │ │ +
53 {
│ │ │ │ +
54 grid_ = macroGrid_.template createGrid< Grid >();
│ │ │ │ +
55
│ │ │ │ +
56 if( macroGrid_.nofelparams > 0 )
│ │ │ │ +
57 {
│ │ │ │ +
58 const size_t nofElements = macroGrid_.elements.size();
│ │ │ │ +
59 for( size_t i = 0; i < nofElements; ++i )
│ │ │ │ +
60 {
│ │ │ │ +
61 std::vector< double > coord;
│ │ │ │
62
│ │ │ │ -
63 // reiterate the facades typedefs here
│ │ │ │ - │ │ │ │ -
65 typedef const Corner Value;
│ │ │ │ -
66 typedef Value& Reference;
│ │ │ │ -
67 typedef typename std::iterator_traits<CellIterator>::difference_type
│ │ │ │ - │ │ │ │ +
63 DomainType p(0);
│ │ │ │ +
64 const size_t nofCorners = macroGrid_.elements[i].size();
│ │ │ │ +
65 for (size_t k=0; k<nofCorners; ++k)
│ │ │ │ +
66 for (int j=0; j<DomainType::dimension; ++j)
│ │ │ │ +
67 p[j]+=macroGrid_.vtx[macroGrid_.elements[i][k]][j];
│ │ │ │ +
68 p/=double(nofCorners);
│ │ │ │
69
│ │ │ │ -
70 static const unsigned mydim = std::iterator_traits<CellIterator>::
│ │ │ │ -
71 value_type::mydimension;
│ │ │ │ -
72
│ │ │ │ -
73 private:
│ │ │ │ -
74 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
│ │ │ │ -
75 DifferenceType> Facade;
│ │ │ │ -
76
│ │ │ │ - │ │ │ │ -
78 const IS* is;
│ │ │ │ -
79 std::vector<bool> seen;
│ │ │ │ +
70 elInsertOrder_.insert( std::make_pair( p, i ) );
│ │ │ │ +
71 }
│ │ │ │ +
72 }
│ │ │ │ +
73
│ │ │ │ +
74 if( macroGrid_.nofvtxparams > 0 )
│ │ │ │ +
75 {
│ │ │ │ +
76 const size_t nofVertices = macroGrid_.vtx.size();
│ │ │ │ +
77 for( size_t i = 0; i < nofVertices; ++i )
│ │ │ │ +
78 {
│ │ │ │ +
79 std::vector< double > coord;
│ │ │ │
80
│ │ │ │ -
81 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
83 return *cornerit;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
│ │ │ │ -
86 bool isDereferencable() const {
│ │ │ │ -
87 return cornerit.isDereferencable();
│ │ │ │ -
88 }
│ │ │ │ +
81 DomainType p;
│ │ │ │ +
82 for( int k = 0; k < DomainType::dimension; ++k )
│ │ │ │ +
83 p[ k ] = macroGrid_.vtx[i][k];
│ │ │ │ +
84
│ │ │ │ +
85 vtxInsertOrder_.insert( std::make_pair( p, i ) );
│ │ │ │ +
86 }
│ │ │ │ +
87 }
│ │ │ │ +
88 }
│ │ │ │
│ │ │ │
89
│ │ │ │
│ │ │ │ -
90 bool equals(const DerivedType& other) const {
│ │ │ │ -
91 return cornerit == other.cornerit;
│ │ │ │ -
92 }
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
│ │ │ │ -
94 void increment() {
│ │ │ │ -
95 for(++cornerit; isDereferencable(); ++cornerit) {
│ │ │ │ -
96 typename IS::IndexType index =
│ │ │ │ -
97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);
│ │ │ │ -
98
│ │ │ │ -
99 if(!seen[index]) {
│ │ │ │ -
100 seen[index] = true;
│ │ │ │ -
101 break;
│ │ │ │ -
102 }
│ │ │ │ -
103 }
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
107
│ │ │ │ -
│ │ │ │ -
112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,
│ │ │ │ -
113 const IS& is_)
│ │ │ │ -
114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)
│ │ │ │ -
115 { }
│ │ │ │ + │ │ │ │ +
91 {
│ │ │ │ +
92 return grid_;
│ │ │ │ +
93 }
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95 template <class Intersection>
│ │ │ │ +
│ │ │ │ +
96 bool wasInserted(const Intersection &intersection) const
│ │ │ │ +
97 {
│ │ │ │ +
98 return intersection.boundary();
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
101 template <class Intersection>
│ │ │ │ +
│ │ │ │ +
102 int boundaryId(const Intersection &intersection) const
│ │ │ │ +
103 {
│ │ │ │ +
104 return (intersection.boundary()) ? int(intersection.indexInInside()+1) : int(0);
│ │ │ │ +
105 }
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
107 template< int codim >
│ │ │ │ +
│ │ │ │ +
108 int numParameters () const
│ │ │ │ +
109 {
│ │ │ │ +
110 if( codim == 0 )
│ │ │ │ +
111 return macroGrid_.nofelparams;
│ │ │ │ +
112 else if( codim == dimension )
│ │ │ │ +
113 return macroGrid_.nofvtxparams;
│ │ │ │ +
114 else
│ │ │ │ +
115 return 0;
│ │ │ │ +
116 }
│ │ │ │
│ │ │ │
117
│ │ │ │ -
│ │ │ │ -
120 PointIterator(const CellIterator& cellend_)
│ │ │ │ -
121 : cornerit(cellend_), is(0)
│ │ │ │ -
122 { }
│ │ │ │ -
│ │ │ │ -
123 };
│ │ │ │ -
│ │ │ │ -
124
│ │ │ │ -
125 } // namespace VTK
│ │ │ │ -
126
│ │ │ │ -
128
│ │ │ │ -
129} // namespace Dune
│ │ │ │ -
130
│ │ │ │ -
131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
118 template < class Entity >
│ │ │ │ +
│ │ │ │ +
119 int numParameters ( const Entity & ) const
│ │ │ │ +
120 {
│ │ │ │ +
121 return numParameters< Entity::codimension >();
│ │ │ │ +
122 }
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
│ │ │ │ +
124 std::vector<double>& parameter(const Element &element)
│ │ │ │ +
125 {
│ │ │ │ +
126 const typename Element::Geometry &geo = element.geometry();
│ │ │ │ +
127 DomainType coord( geo.corner( 0 ) );
│ │ │ │ +
128 for( int i = 1; i < geo.corners(); ++i )
│ │ │ │ +
129 coord += geo.corner( i );
│ │ │ │ +
130 coord /= double( geo.corners() );
│ │ │ │ +
131
│ │ │ │ +
132 InsertOrderIterator it = elInsertOrder_.find( coord );
│ │ │ │ +
133 if( it != elInsertOrder_.end() )
│ │ │ │ +
134 return macroGrid_.elParams[ it->second ];
│ │ │ │ +
135 assert(0);
│ │ │ │ +
136 return emptyParam;
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
│ │ │ │ +
139 std::vector<double>& parameter(const Vertex &vertex)
│ │ │ │ +
140 {
│ │ │ │ +
141 const typename Vertex::Geometry &geo = vertex.geometry();
│ │ │ │ +
142 DomainType coord( geo.corner( 0 ) );
│ │ │ │ +
143
│ │ │ │ +
144 InsertOrderIterator it = vtxInsertOrder_.find( coord );
│ │ │ │ +
145 if( it != vtxInsertOrder_.end() )
│ │ │ │ +
146 return macroGrid_.vtxParams[ it->second ];
│ │ │ │ +
147 return emptyParam;
│ │ │ │ +
148 }
│ │ │ │ +
│ │ │ │ +
149
│ │ │ │ +
150 // return true if boundary parameters found
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
152 {
│ │ │ │ +
153 return false;
│ │ │ │ +
154 }
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
156 template< class GG, class II >
│ │ │ │ +
157 const typename DGFBoundaryParameter::type &
│ │ │ │ +
│ │ │ │ +
158 boundaryParameter ( const Intersection< GG, II > & intersection ) const
│ │ │ │ +
159 {
│ │ │ │ + │ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
163 private:
│ │ │ │ +
164 typedef FieldVector<typename Grid::ctype,Grid::dimensionworld> DomainType;
│ │ │ │ +
165 struct Compare
│ │ │ │ +
166 {
│ │ │ │ +
167 bool operator() ( const DomainType &a, const DomainType &b ) const
│ │ │ │ +
168 {
│ │ │ │ +
169 // returns true, if a < b; c[i] < -eps;
│ │ │ │ +
170 const DomainType c = a - b;
│ │ │ │ +
171 const double eps = 1e-8;
│ │ │ │ +
172
│ │ │ │ +
173 for( int i = 0; i < DomainType::dimension; ++i )
│ │ │ │ +
174 {
│ │ │ │ +
175 if( c[ i ] <= -eps )
│ │ │ │ +
176 return true;
│ │ │ │ +
177 if( c[ i ] >= eps )
│ │ │ │ +
178 return false;
│ │ │ │ +
179 }
│ │ │ │ +
180 return false;
│ │ │ │ +
181 }
│ │ │ │ +
182 };
│ │ │ │ +
183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap;
│ │ │ │ +
184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator;
│ │ │ │ +
185
│ │ │ │ +
186 MacroGrid macroGrid_;
│ │ │ │ +
187 Grid *grid_;
│ │ │ │ +
188 InsertOrderMap elInsertOrder_;
│ │ │ │ +
189 InsertOrderMap vtxInsertOrder_;
│ │ │ │ +
190 std::vector<double> emptyParam;
│ │ │ │ +
191 };
│ │ │ │ +
│ │ │ │ +
192
│ │ │ │ +
193} // end namespace Dune
│ │ │ │ +
194
│ │ │ │ +
195#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ -
iterate over the corners of some cell range
Definition corneriterator.hh:39
│ │ │ │ -
bool isDereferencable() const
Definition corneriterator.hh:69
│ │ │ │ -
iterate over the points of some corner range
Definition pointiterator.hh:58
│ │ │ │ -
PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS &is_)
construct a CornerIterator
Definition pointiterator.hh:112
│ │ │ │ -
void increment()
Definition pointiterator.hh:94
│ │ │ │ -
VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
Definition pointiterator.hh:61
│ │ │ │ -
Reference dereference() const
Definition pointiterator.hh:82
│ │ │ │ -
std::iterator_traits< CellIterator >::difference_type DifferenceType
Definition pointiterator.hh:68
│ │ │ │ -
static const unsigned mydim
Definition pointiterator.hh:70
│ │ │ │ -
PointIterator(const CellIterator &cellend_)
construct a CornerIterator
Definition pointiterator.hh:120
│ │ │ │ -
bool equals(const DerivedType &other) const
Definition pointiterator.hh:90
│ │ │ │ -
PointIterator< CellIterator, IS > DerivedType
Definition pointiterator.hh:64
│ │ │ │ -
const Corner Value
Definition pointiterator.hh:65
│ │ │ │ -
Value & Reference
Definition pointiterator.hh:66
│ │ │ │ -
bool isDereferencable() const
Definition pointiterator.hh:86
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
int numParameters() const
Definition dgfgridfactory.hh:108
│ │ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfgridfactory.hh:102
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfgridfactory.hh:158
│ │ │ │ +
std::vector< double > & parameter(const Vertex &vertex)
Definition dgfgridfactory.hh:139
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ +
int numParameters(const Entity &) const
Definition dgfgridfactory.hh:119
│ │ │ │ +
bool wasInserted(const Intersection &intersection) const
Definition dgfgridfactory.hh:96
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfgridfactory.hh:50
│ │ │ │ +
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ +
Grid * grid()
Definition dgfgridfactory.hh:90
│ │ │ │ +
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
│ │ │ │ +
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition common/intersection.hh:216
│ │ │ │ +
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
int nofvtxparams
Definition parser.hh:163
│ │ │ │ +
std::vector< std::vector< double > > vtxParams
Definition parser.hh:165
│ │ │ │ +
int nofelparams
Definition parser.hh:163
│ │ │ │ +
std::vector< std::vector< double > > elParams
Definition parser.hh:165
│ │ │ │ +
std::vector< std::vector< double > > vtx
Definition parser.hh:125
│ │ │ │ +
std ::vector< std ::vector< unsigned int > > elements
Definition parser.hh:134
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,168 +2,309 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -pointiterator.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +dgfgridfactory.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ +5#ifndef DUNE_DGF_GRIDFACTORY_HH │ │ │ │ │ +6#define DUNE_DGF_GRIDFACTORY_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_m_a_c_r_o_g_r_i_d_._h_h> │ │ │ │ │ 17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -22 │ │ │ │ │ -23 namespace VTK { │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +20 │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e │ │ │ │ │ +23{ │ │ │ │ │ 24 │ │ │ │ │ -26 │ │ │ │ │ -49 template │ │ │ │ │ -_5_0 class _P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -51 : public ForwardIteratorFacade │ │ │ │ │ -52 < PointIterator, │ │ │ │ │ -53 const Corner::value_type>::type>, │ │ │ │ │ -55 const Corner::value_type>::type>&, │ │ │ │ │ -57 typename std::iterator_traits::difference_type> │ │ │ │ │ -58 { │ │ │ │ │ -59 public: │ │ │ │ │ -60 typedef _V_T_K_:_:_C_o_r_n_e_r::value_type>::type> _C_o_r_n_e_r; │ │ │ │ │ +25 // External Forward Declarations │ │ │ │ │ +26 // ----------------------------- │ │ │ │ │ +27 │ │ │ │ │ +28 template < class GridImp, class IntersectionImp > │ │ │ │ │ +29 class Intersection; │ │ │ │ │ +30 │ │ │ │ │ +31 │ │ │ │ │ +32 │ │ │ │ │ +33 // DGFGridFactory │ │ │ │ │ +34 // -------------- │ │ │ │ │ +35 │ │ │ │ │ +36 template < class G > │ │ │ │ │ +_3_7 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +38 { │ │ │ │ │ +_3_9 typedef G _G_r_i_d; │ │ │ │ │ +_4_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_4_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +42 │ │ │ │ │ +43 private: │ │ │ │ │ +44 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Element; │ │ │ │ │ +45 │ │ │ │ │ +46 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< dimension >::Entity Vertex; │ │ │ │ │ +47 │ │ │ │ │ +48 public: │ │ │ │ │ +49 │ │ │ │ │ +_5_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +51 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +52 : macroGrid_( filename.c_str(), comm ) │ │ │ │ │ +53 { │ │ │ │ │ +54 grid_ = macroGrid_.template createGrid< Grid >(); │ │ │ │ │ +55 │ │ │ │ │ +56 if( macroGrid_._n_o_f_e_l_p_a_r_a_m_s > 0 ) │ │ │ │ │ +57 { │ │ │ │ │ +58 const size_t nofElements = macroGrid_._e_l_e_m_e_n_t_s.size(); │ │ │ │ │ +59 for( size_t i = 0; i < nofElements; ++i ) │ │ │ │ │ +60 { │ │ │ │ │ +61 std::vector< double > coord; │ │ │ │ │ 62 │ │ │ │ │ -63 // reiterate the facades typedefs here │ │ │ │ │ -_6_4 typedef _P_o_i_n_t_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_,_ _I_S_> _D_e_r_i_v_e_d_T_y_p_e; │ │ │ │ │ -_6_5 typedef const _C_o_r_n_e_r _V_a_l_u_e; │ │ │ │ │ -_6_6 typedef _V_a_l_u_e& _R_e_f_e_r_e_n_c_e; │ │ │ │ │ -67 typedef typename std::iterator_traits::difference_type │ │ │ │ │ -_6_8 _D_i_f_f_e_r_e_n_c_e_T_y_p_e; │ │ │ │ │ +63 DomainType p(0); │ │ │ │ │ +64 const size_t nofCorners = macroGrid_._e_l_e_m_e_n_t_s[i].size(); │ │ │ │ │ +65 for (size_t k=0; k:: │ │ │ │ │ -71 value_type::mydimension; │ │ │ │ │ -72 │ │ │ │ │ -73 private: │ │ │ │ │ -74 typedef ForwardIteratorFacade<_D_e_r_i_v_e_d_T_y_p_e, _V_a_l_u_e, _R_e_f_e_r_e_n_c_e, │ │ │ │ │ -75 _D_i_f_f_e_r_e_n_c_e_T_y_p_e> Facade; │ │ │ │ │ -76 │ │ │ │ │ -77 _C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_> cornerit; │ │ │ │ │ -78 const IS* is; │ │ │ │ │ -79 std::vector seen; │ │ │ │ │ +70 elInsertOrder_.insert( std::make_pair( p, i ) ); │ │ │ │ │ +71 } │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +74 if( macroGrid_._n_o_f_v_t_x_p_a_r_a_m_s > 0 ) │ │ │ │ │ +75 { │ │ │ │ │ +76 const size_t nofVertices = macroGrid_._v_t_x.size(); │ │ │ │ │ +77 for( size_t i = 0; i < nofVertices; ++i ) │ │ │ │ │ +78 { │ │ │ │ │ +79 std::vector< double > coord; │ │ │ │ │ 80 │ │ │ │ │ -81 public: │ │ │ │ │ -_8_2 _R_e_f_e_r_e_n_c_e _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -83 return *cornerit; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -_8_6 bool _i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e() const { │ │ │ │ │ -87 return cornerit._i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e(); │ │ │ │ │ +81 DomainType p; │ │ │ │ │ +82 for( int k = 0; k < DomainType::dimension; ++k ) │ │ │ │ │ +83 p[ k ] = macroGrid_._v_t_x[i][k]; │ │ │ │ │ +84 │ │ │ │ │ +85 vtxInsertOrder_.insert( std::make_pair( p, i ) ); │ │ │ │ │ +86 } │ │ │ │ │ +87 } │ │ │ │ │ 88 } │ │ │ │ │ 89 │ │ │ │ │ -_9_0 bool _e_q_u_a_l_s(const _D_e_r_i_v_e_d_T_y_p_e& other) const { │ │ │ │ │ -91 return cornerit == other.cornerit; │ │ │ │ │ -92 } │ │ │ │ │ -93 │ │ │ │ │ -_9_4 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -95 for(++cornerit; _i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e(); ++cornerit) { │ │ │ │ │ -96 typename IS::IndexType index = │ │ │ │ │ -97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), _m_y_d_i_m); │ │ │ │ │ -98 │ │ │ │ │ -99 if(!seen[index]) { │ │ │ │ │ -100 seen[index] = true; │ │ │ │ │ -101 break; │ │ │ │ │ -102 } │ │ │ │ │ -103 } │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -107 │ │ │ │ │ -_1_1_2 _P_o_i_n_t_I_t_e_r_a_t_o_r(const CellIterator& cellit, const CellIterator& cellend, │ │ │ │ │ -113 const IS& is_) │ │ │ │ │ -114 : cornerit(cellit, cellend), is(&is_), seen(is->size(_m_y_d_i_m), false) │ │ │ │ │ -115 { } │ │ │ │ │ +_9_0 _G_r_i_d *_g_r_i_d() │ │ │ │ │ +91 { │ │ │ │ │ +92 return grid_; │ │ │ │ │ +93 } │ │ │ │ │ +94 │ │ │ │ │ +95 template │ │ │ │ │ +_9_6 bool _w_a_s_I_n_s_e_r_t_e_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ +97 { │ │ │ │ │ +98 return intersection._b_o_u_n_d_a_r_y(); │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +101 template │ │ │ │ │ +_1_0_2 int _b_o_u_n_d_a_r_y_I_d(const _I_n_t_e_r_s_e_c_t_i_o_n &intersection) const │ │ │ │ │ +103 { │ │ │ │ │ +104 return (intersection._b_o_u_n_d_a_r_y()) ? int(intersection._i_n_d_e_x_I_n_I_n_s_i_d_e()+1) : │ │ │ │ │ +int(0); │ │ │ │ │ +105 } │ │ │ │ │ +106 │ │ │ │ │ +107 template< int codim > │ │ │ │ │ +_1_0_8 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +109 { │ │ │ │ │ +110 if( codim == 0 ) │ │ │ │ │ +111 return macroGrid_._n_o_f_e_l_p_a_r_a_m_s; │ │ │ │ │ +112 else if( codim == _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ +113 return macroGrid_._n_o_f_v_t_x_p_a_r_a_m_s; │ │ │ │ │ +114 else │ │ │ │ │ +115 return 0; │ │ │ │ │ +116 } │ │ │ │ │ 117 │ │ │ │ │ -_1_2_0 _P_o_i_n_t_I_t_e_r_a_t_o_r(const CellIterator& cellend_) │ │ │ │ │ -121 : cornerit(cellend_), is(0) │ │ │ │ │ -122 { } │ │ │ │ │ -123 }; │ │ │ │ │ -124 │ │ │ │ │ -125 } // namespace VTK │ │ │ │ │ -126 │ │ │ │ │ -128 │ │ │ │ │ -129} // namespace Dune │ │ │ │ │ -130 │ │ │ │ │ -131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ │ -_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +118 template < class Entity > │ │ │ │ │ +_1_1_9 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ +120 { │ │ │ │ │ +121 return numParameters< Entity::codimension >(); │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +_1_2_4 std::vector& _p_a_r_a_m_e_t_e_r(const Element &element) │ │ │ │ │ +125 { │ │ │ │ │ +126 const typename Element::Geometry &geo = element.geometry(); │ │ │ │ │ +127 DomainType coord( geo.corner( 0 ) ); │ │ │ │ │ +128 for( int i = 1; i < geo.corners(); ++i ) │ │ │ │ │ +129 coord += geo.corner( i ); │ │ │ │ │ +130 coord /= double( geo.corners() ); │ │ │ │ │ +131 │ │ │ │ │ +132 InsertOrderIterator it = elInsertOrder_.find( coord ); │ │ │ │ │ +133 if( it != elInsertOrder_.end() ) │ │ │ │ │ +134 return macroGrid_._e_l_P_a_r_a_m_s[ it->second ]; │ │ │ │ │ +135 assert(0); │ │ │ │ │ +136 return emptyParam; │ │ │ │ │ +137 } │ │ │ │ │ +138 │ │ │ │ │ +_1_3_9 std::vector& _p_a_r_a_m_e_t_e_r(const Vertex &vertex) │ │ │ │ │ +140 { │ │ │ │ │ +141 const typename Vertex::Geometry &geo = vertex.geometry(); │ │ │ │ │ +142 DomainType coord( geo.corner( 0 ) ); │ │ │ │ │ +143 │ │ │ │ │ +144 InsertOrderIterator it = vtxInsertOrder_.find( coord ); │ │ │ │ │ +145 if( it != vtxInsertOrder_.end() ) │ │ │ │ │ +146 return macroGrid_._v_t_x_P_a_r_a_m_s[ it->second ]; │ │ │ │ │ +147 return emptyParam; │ │ │ │ │ +148 } │ │ │ │ │ +149 │ │ │ │ │ +150 // return true if boundary parameters found │ │ │ │ │ +_1_5_1 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +152 { │ │ │ │ │ +153 return false; │ │ │ │ │ +154 } │ │ │ │ │ +155 │ │ │ │ │ +156 template< class GG, class II > │ │ │ │ │ +157 const typename _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e & │ │ │ │ │ +_1_5_8 _b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( const _I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> & intersection ) const │ │ │ │ │ +159 { │ │ │ │ │ +160 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +163 private: │ │ │ │ │ +164 typedef FieldVector DomainType; │ │ │ │ │ +165 struct Compare │ │ │ │ │ +166 { │ │ │ │ │ +167 bool operator() ( const DomainType &a, const DomainType &b ) const │ │ │ │ │ +168 { │ │ │ │ │ +169 // returns true, if a < b; c[i] < -eps; │ │ │ │ │ +170 const DomainType c = a - b; │ │ │ │ │ +171 const double eps = 1e-8; │ │ │ │ │ +172 │ │ │ │ │ +173 for( int i = 0; i < DomainType::dimension; ++i ) │ │ │ │ │ +174 { │ │ │ │ │ +175 if( c[ i ] <= -eps ) │ │ │ │ │ +176 return true; │ │ │ │ │ +177 if( c[ i ] >= eps ) │ │ │ │ │ +178 return false; │ │ │ │ │ +179 } │ │ │ │ │ +180 return false; │ │ │ │ │ +181 } │ │ │ │ │ +182 }; │ │ │ │ │ +183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap; │ │ │ │ │ +184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator; │ │ │ │ │ +185 │ │ │ │ │ +186 MacroGrid macroGrid_; │ │ │ │ │ +187 _G_r_i_d *grid_; │ │ │ │ │ +188 InsertOrderMap elInsertOrder_; │ │ │ │ │ +189 InsertOrderMap vtxInsertOrder_; │ │ │ │ │ +190 std::vector emptyParam; │ │ │ │ │ +191 }; │ │ │ │ │ +192 │ │ │ │ │ +193} // end namespace Dune │ │ │ │ │ +194 │ │ │ │ │ +195#endif │ │ │ │ │ +_m_a_c_r_o_g_r_i_d_._h_h │ │ │ │ │ +_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ -simple class representing a corner of a cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -iterate over the corners of some cell range │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_:_:_i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e │ │ │ │ │ -bool isDereferencable() const │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -iterate over the points of some corner range │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS │ │ │ │ │ -&is_) │ │ │ │ │ -construct a CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_C_o_r_n_e_r │ │ │ │ │ -VTK::Corner< typename std::remove_const< typename std::iterator_traits< │ │ │ │ │ -CellIterator >::value_type >::type > Corner │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Reference dereference() const │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_D_i_f_f_e_r_e_n_c_e_T_y_p_e │ │ │ │ │ -std::iterator_traits< CellIterator >::difference_type DifferenceType │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_m_y_d_i_m │ │ │ │ │ -static const unsigned mydim │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -PointIterator(const CellIterator &cellend_) │ │ │ │ │ -construct a CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:120 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const DerivedType &other) const │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_e_d_T_y_p_e │ │ │ │ │ -PointIterator< CellIterator, IS > DerivedType │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ -const Corner Value │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_R_e_f_e_r_e_n_c_e │ │ │ │ │ -Value & Reference │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r_:_:_i_s_D_e_r_e_f_e_r_e_n_c_a_b_l_e │ │ │ │ │ -bool isDereferencable() const │ │ │ │ │ -DDeeffiinniittiioonn pointiterator.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ +int boundaryId(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II │ │ │ │ │ +> &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Vertex &vertex) │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ +MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +int numParameters(const Entity &) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ +bool wasInserted(const Intersection &intersection) const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:96 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ +comm=MPIHelper::getCommunicator()) │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_g_r_i_d │ │ │ │ │ +Grid * grid() │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +std::vector< double > & parameter(const Element &element) │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBoundaryParameters() const │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ +bool boundary() const │ │ │ │ │ +Return true if intersection is with interior or exterior boundary (see the │ │ │ │ │ +cases above) │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:216 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ │ +int indexInInside() const │ │ │ │ │ +Local index of codim 1 entity in the inside() entity where intersection is │ │ │ │ │ +contained in. │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ +static const type & defaultValue() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_v_t_x_p_a_r_a_m_s │ │ │ │ │ +int nofvtxparams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x_P_a_r_a_m_s │ │ │ │ │ +std::vector< std::vector< double > > vtxParams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_e_l_p_a_r_a_m_s │ │ │ │ │ +int nofelparams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_P_a_r_a_m_s │ │ │ │ │ +std::vector< std::vector< double > > elParams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x │ │ │ │ │ +std::vector< std::vector< double > > vtx │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t_s │ │ │ │ │ +std ::vector< std ::vector< unsigned int > > elements │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:134 │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pvtuwriter.hh File Reference │ │ │ │ +dune-grid: parser.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pvtuwriter.hh File Reference
│ │ │ │ +
parser.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <ostream>
│ │ │ │ +
#include <iostream>
│ │ │ │ #include <string>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/indent.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <map>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::PVTUWriter
 Dump a .vtu/.vtp files contents to a stream. More...
struct  Dune::DGFBoundaryParameter
 Contains types for additional features. More...
 
class  Dune::DuneGridFormatParser
 The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,28 +2,30 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -pvtuwriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +parser.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -  Dump a .vtu/.vtp files contents to a stream. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +  Contains types for additional features. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ +  The DuneGridFormatParser class: reads a DGF file and stores build │ │ │ │ │ + information in vector structures used by the _M_a_c_r_o_G_r_i_d class. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00950_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pvtuwriter.hh Source File │ │ │ │ +dune-grid: parser.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,197 +70,230 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pvtuwriter.hh
│ │ │ │ +
parser.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <ostream>
│ │ │ │ -
10#include <string>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/exceptions.hh>
│ │ │ │ -
13#include <dune/common/indent.hh>
│ │ │ │ +
5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ │ +
6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11#include <map>
│ │ │ │ +
12
│ │ │ │ + │ │ │ │
14
│ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune {
│ │ │ │ -
18
│ │ │ │ -
21
│ │ │ │ -
22 namespace VTK {
│ │ │ │ -
23
│ │ │ │ -
25
│ │ │ │ -
│ │ │ │ -
62 class PVTUWriter {
│ │ │ │ -
63 std::ostream& stream;
│ │ │ │ -
64
│ │ │ │ -
65 std::string fileType;
│ │ │ │ -
66
│ │ │ │ -
67 Indent indent;
│ │ │ │ -
68
│ │ │ │ -
69 public:
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ -
78 inline PVTUWriter(std::ostream& stream_, FileType fileType_)
│ │ │ │ -
79 : stream(stream_)
│ │ │ │ -
80 {
│ │ │ │ -
81 switch(fileType_) {
│ │ │ │ -
82 case polyData :
│ │ │ │ -
83 fileType = "PPolyData";
│ │ │ │ -
84 break;
│ │ │ │ -
85 case unstructuredGrid :
│ │ │ │ -
86 fileType = "PUnstructuredGrid";
│ │ │ │ -
87 break;
│ │ │ │ -
88 default :
│ │ │ │ -
89 DUNE_THROW(IOError, "PVTUWriter: Unknown fileType: " << fileType_);
│ │ │ │ -
90 }
│ │ │ │ -
91 const std::string& byteOrder = getEndiannessString();
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
18 class DGFPrintInfo;
│ │ │ │ +
19
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
25 typedef std::string type;
│ │ │ │ +
26
│ │ │ │ +
│ │ │ │ +
28 static const type &defaultValue ()
│ │ │ │ +
29 {
│ │ │ │ +
30 static type value;
│ │ │ │ +
31 return value;
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 static type convert ( const std::string & parameter )
│ │ │ │ +
36 {
│ │ │ │ +
37 return parameter;
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
41 static const char delimiter = ':';
│ │ │ │ +
42 };
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 {
│ │ │ │ +
48 public:
│ │ │ │ +
49 typedef enum {Simplex,Cube,General} element_t;
│ │ │ │ +
50
│ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
54 DuneGridFormatParser ( int rank, int size );
│ │ │ │ +
55
│ │ │ │ +
66 static bool isDuneGridFormat ( std::istream &input );
│ │ │ │ +
67
│ │ │ │ +
77 static bool isDuneGridFormat ( const std::string &filename );
│ │ │ │ +
78
│ │ │ │ +
91 bool readDuneGrid( std::istream &input, int dimG, int dimW );
│ │ │ │
92
│ │ │ │ -
93 stream << indent << "<?xml version=\"1.0\"?>\n";
│ │ │ │ -
94 stream << indent << "<VTKFile"
│ │ │ │ -
95 << " type=\"" << fileType << "\""
│ │ │ │ -
96 << " version=\"0.1\""
│ │ │ │ -
97 << " byte_order=\"" << byteOrder << "\">\n";
│ │ │ │ -
98 ++indent;
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ +
94 void writeTetgenPoly ( const std::string &, std::string &, std::string & );
│ │ │ │ +
95
│ │ │ │ +
96 void writeTetgenPoly ( std::ostream & out, const bool writeSegments = true );
│ │ │ │ +
97
│ │ │ │ +
98 protected:
│ │ │ │ +
99 void generateBoundaries ( std::istream &, bool );
│ │ │ │
100
│ │ │ │ -
│ │ │ │ -
102 inline ~PVTUWriter() {
│ │ │ │ -
103 --indent;
│ │ │ │ -
104 stream << indent << "</VTKFile>\n"
│ │ │ │ -
105 << std::flush;
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ +
101 // call to tetgen/triangle
│ │ │ │ +
102 void generateSimplexGrid ( std::istream & );
│ │ │ │ +
103 void readTetgenTriangle ( const std::string & );
│ │ │ │ +
104
│ │ │ │ +
105 // helper methods
│ │ │ │ +
106 void removeCopies ();
│ │ │ │
107
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ -
120 inline void beginPointData(const std::string& scalars = "",
│ │ │ │ -
121 const std::string& vectors = "") {
│ │ │ │ -
122 stream << indent << "<PPointData";
│ │ │ │ -
123 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ -
124 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ -
125 stream << ">\n";
│ │ │ │ -
126 ++indent;
│ │ │ │ -
127 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
129 inline void endPointData() {
│ │ │ │ -
130 --indent;
│ │ │ │ -
131 stream << indent << "</PPointData>\n";
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
133
│ │ │ │ +
108 void setOrientation ( int use1, int use2,
│ │ │ │ +
109 orientation_t orientation=counterclockwise );
│ │ │ │ +
110
│ │ │ │ +
111 void setRefinement ( int use1, int use2, int is1=-1, int is2=-1 );
│ │ │ │ +
112
│ │ │ │ +
113 double testTriang ( int snr );
│ │ │ │ +
114
│ │ │ │ +
115 std::vector< double > & getElParam ( int i, std::vector< double > & coord );
│ │ │ │ +
116
│ │ │ │ +
117 std::vector< double > & getVtxParam ( int i, std::vector< double > & coord );
│ │ │ │ +
118
│ │ │ │ +
119 static std::string temporaryFileName ();
│ │ │ │ +
120
│ │ │ │ +
121 // dimension of world and problem: set through the readDuneGrid() method
│ │ │ │ + │ │ │ │ +
123
│ │ │ │ +
124 // vector of vertex coordinates
│ │ │ │ +
125 std::vector < std::vector < double > > vtx;
│ │ │ │ +
126
│ │ │ │ + │ │ │ │ +
128
│ │ │ │ + │ │ │ │ +
130
│ │ │ │ +
131 double minVertexDistance; // min. L^1 distance of distinct points
│ │ │ │ +
132
│ │ │ │ +
133 // vector of elements
│ │ │ │ +
134 std :: vector< std :: vector< unsigned int > > elements;
│ │ │ │
135
│ │ │ │ -
│ │ │ │ -
146 inline void beginCellData(const std::string& scalars = "",
│ │ │ │ -
147 const std::string& vectors = "") {
│ │ │ │ -
148 stream << indent << "<PCellData";
│ │ │ │ -
149 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ -
150 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ -
151 stream << ">\n";
│ │ │ │ -
152 ++indent;
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
155 inline void endCellData() {
│ │ │ │ -
156 --indent;
│ │ │ │ -
157 stream << indent << "</PCellData>\n";
│ │ │ │ -
158 }
│ │ │ │ -
│ │ │ │ -
159
│ │ │ │ + │ │ │ │ +
137
│ │ │ │ +
138 // vector of boundary segments + identifier
│ │ │ │ +
139 std::vector < std::vector < int > > bound;
│ │ │ │ +
140
│ │ │ │ + │ │ │ │ +
142
│ │ │ │ +
143 // map to generate and find boundary segments
│ │ │ │ + │ │ │ │ +
145 typedef std::pair < int, BoundaryParameter > BndParam;
│ │ │ │ +
146 typedef std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t;
│ │ │ │ + │ │ │ │ +
148
│ │ │ │ +
149 // true if parameters on a boundary found
│ │ │ │ + │ │ │ │ +
151
│ │ │ │ +
152 // set by generator depending on element type wanted
│ │ │ │ + │ │ │ │ +
154
│ │ │ │ +
155 // set by the readDuneGrid method depending
│ │ │ │ +
156 // on what type the elements were generated
│ │ │ │ + │ │ │ │ +
158
│ │ │ │ +
159 // true if grid is generated using the intervall Block
│ │ │ │ + │ │ │ │
161
│ │ │ │ -
│ │ │ │ -
166 inline void beginPoints() {
│ │ │ │ -
167 stream << indent << "<PPoints>\n";
│ │ │ │ -
168 ++indent;
│ │ │ │ -
169 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
171 inline void endPoints() {
│ │ │ │ -
172 --indent;
│ │ │ │ -
173 stream << indent << "</PPoints>\n";
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
177
│ │ │ │ -
│ │ │ │ -
189 inline void beginMain(unsigned ghostLevel = 0) {
│ │ │ │ -
190 stream << indent << "<" << fileType
│ │ │ │ -
191 << " GhostLevel=\"" << ghostLevel << "\">\n";
│ │ │ │ -
192 ++indent;
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
195 inline void endMain() {
│ │ │ │ -
196 --indent;
│ │ │ │ -
197 stream << indent << "</" << fileType << ">\n";
│ │ │ │ -
198 }
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
201
│ │ │ │ -
│ │ │ │ -
207 void addArray(const std::string& name, unsigned ncomps, Precision prec) {
│ │ │ │ -
208 stream << indent << "<PDataArray"
│ │ │ │ -
209 << " type=\"" << toString(prec) << "\""
│ │ │ │ -
210 << " Name=\"" << name << "\""
│ │ │ │ -
211 << " NumberOfComponents=\"" << ncomps << "\"/>\n";
│ │ │ │ -
212 }
│ │ │ │ -
│ │ │ │ -
213
│ │ │ │ -
│ │ │ │ -
215 inline void addPiece(const std::string& filename) {
│ │ │ │ -
216 stream << indent << "<Piece "
│ │ │ │ -
217 << " Source=\"" << filename << "\"/>\n";
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219 };
│ │ │ │ -
│ │ │ │ -
220
│ │ │ │ -
221 } // namespace VTK
│ │ │ │ -
222
│ │ │ │ -
224
│ │ │ │ -
225} // namespace Dune
│ │ │ │ -
226
│ │ │ │ -
227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ +
162 // parameters on elements
│ │ │ │ + │ │ │ │ +
164
│ │ │ │ +
165 std::vector< std::vector< double > > vtxParams,elParams;
│ │ │ │ +
166
│ │ │ │ +
167 // write information about generation process
│ │ │ │ + │ │ │ │ +
169
│ │ │ │ +
170 std::vector < double > emptyParam_;
│ │ │ │ +
171
│ │ │ │ +
172
│ │ │ │ +
173 private:
│ │ │ │ +
174 int rank_;
│ │ │ │ +
175 int size_;
│ │ │ │ +
176
│ │ │ │ +
177 template< class GridType >
│ │ │ │ +
178 friend struct DGFGridFactory;
│ │ │ │ +
179
│ │ │ │ +
180 template< class GridType >
│ │ │ │ +
181 friend struct DGFBaseFactory;
│ │ │ │ +
182
│ │ │ │ +
183 };
│ │ │ │ +
│ │ │ │ +
184
│ │ │ │ +
185} // end namespace Dune
│ │ │ │ +
186
│ │ │ │ +
187#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ -
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ -
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ -
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ -
std::string toString(Precision p)
map precision to VTK type name
Definition common.hh:280
│ │ │ │ -
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ -
~PVTUWriter()
write footer
Definition pvtuwriter.hh:102
│ │ │ │ -
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition pvtuwriter.hh:195
│ │ │ │ -
void endCellData()
finish CellData section
Definition pvtuwriter.hh:155
│ │ │ │ -
void addArray(const std::string &name, unsigned ncomps, Precision prec)
Add an array to the output file.
Definition pvtuwriter.hh:207
│ │ │ │ -
void beginMain(unsigned ghostLevel=0)
start the main PPolyData/PUnstructuredGrid section
Definition pvtuwriter.hh:189
│ │ │ │ -
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition pvtuwriter.hh:146
│ │ │ │ -
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition pvtuwriter.hh:120
│ │ │ │ -
void addPiece(const std::string &filename)
Add a serial piece to the output file.
Definition pvtuwriter.hh:215
│ │ │ │ -
PVTUWriter(std::ostream &stream_, FileType fileType_)
create a PVTUWriter object
Definition pvtuwriter.hh:78
│ │ │ │ -
void endPointData()
finish PointData section
Definition pvtuwriter.hh:129
│ │ │ │ -
void endPoints()
finish section for the point coordinates
Definition pvtuwriter.hh:171
│ │ │ │ -
void beginPoints()
start section for the point coordinates
Definition pvtuwriter.hh:166
│ │ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ │ +
Definition io/file/dgfparser/dgfparser.cc:26
│ │ │ │ +
Contains types for additional features.
Definition parser.hh:23
│ │ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ +
static const char delimiter
delimiter
Definition parser.hh:41
│ │ │ │ +
static type convert(const std::string &parameter)
copy from string
Definition parser.hh:35
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ +
The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures us...
Definition parser.hh:47
│ │ │ │ +
int nofvtxparams
Definition parser.hh:163
│ │ │ │ +
int nofbound
Definition parser.hh:141
│ │ │ │ +
std::pair< int, BoundaryParameter > BndParam
Definition parser.hh:145
│ │ │ │ +
void readTetgenTriangle(const std::string &)
Definition io/file/dgfparser/dgfparser.cc:795
│ │ │ │ +
static bool isDuneGridFormat(std::istream &input)
check whether a stream is in DUNE grid format
Definition io/file/dgfparser/dgfparser.cc:271
│ │ │ │ +
void setOrientation(int use1, int use2, orientation_t orientation=counterclockwise)
Definition io/file/dgfparser/dgfparser.cc:910
│ │ │ │ +
std::vector< std::vector< double > > vtxParams
Definition parser.hh:165
│ │ │ │ +
void setRefinement(int use1, int use2, int is1=-1, int is2=-1)
Definition io/file/dgfparser/dgfparser.cc:989
│ │ │ │ +
friend struct DGFBaseFactory
Definition parser.hh:181
│ │ │ │ +
static std::string temporaryFileName()
Definition io/file/dgfparser/dgfparser.cc:1096
│ │ │ │ +
void removeCopies()
Definition io/file/dgfparser/dgfparser.cc:464
│ │ │ │ +
int dimw
Definition parser.hh:122
│ │ │ │ +
int dimgrid
Definition parser.hh:122
│ │ │ │ +
element_t element
Definition parser.hh:153
│ │ │ │ +
DGFBoundaryParameter::type BoundaryParameter
Definition parser.hh:144
│ │ │ │ +
int nofelements
Definition parser.hh:136
│ │ │ │ +
orientation_t
Definition parser.hh:51
│ │ │ │ +
@ clockwise
Definition parser.hh:51
│ │ │ │ +
@ counterclockwise
Definition parser.hh:51
│ │ │ │ +
double testTriang(int snr)
Definition io/file/dgfparser/dgfparser.cc:1050
│ │ │ │ +
double minVertexDistance
Definition parser.hh:131
│ │ │ │ +
bool simplexgrid
Definition parser.hh:157
│ │ │ │ +
std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t
Definition parser.hh:146
│ │ │ │ +
std::vector< std::vector< int > > bound
Definition parser.hh:139
│ │ │ │ +
void generateSimplexGrid(std::istream &)
Definition io/file/dgfparser/dgfparser.cc:624
│ │ │ │ +
std::vector< double > emptyParam_
Definition parser.hh:170
│ │ │ │ +
int nofelparams
Definition parser.hh:163
│ │ │ │ +
std::vector< std::vector< double > > elParams
Definition parser.hh:165
│ │ │ │ +
facemap_t facemap
Definition parser.hh:147
│ │ │ │ +
element_t
Definition parser.hh:49
│ │ │ │ +
@ General
Definition parser.hh:49
│ │ │ │ +
@ Cube
Definition parser.hh:49
│ │ │ │ +
@ Simplex
Definition parser.hh:49
│ │ │ │ +
bool cube2simplex
Definition parser.hh:160
│ │ │ │ +
int nofvtx
Definition parser.hh:127
│ │ │ │ +
void writeTetgenPoly(const std::string &, std::string &, std::string &)
method to write in Tetgen/Triangle Poly Format
Definition io/file/dgfparser/dgfparser.cc:123
│ │ │ │ +
std::vector< std::vector< double > > vtx
Definition parser.hh:125
│ │ │ │ +
int vtxoffset
Definition parser.hh:129
│ │ │ │ +
bool readDuneGrid(std::istream &input, int dimG, int dimW)
parse dune grid format from stream
Definition io/file/dgfparser/dgfparser.cc:298
│ │ │ │ +
std ::vector< std ::vector< unsigned int > > elements
Definition parser.hh:134
│ │ │ │ +
bool haveBndParameters
Definition parser.hh:150
│ │ │ │ +
DGFPrintInfo * info
Definition parser.hh:168
│ │ │ │ +
void generateBoundaries(std::istream &, bool)
Definition io/file/dgfparser/dgfparser.cc:502
│ │ │ │ +
std::vector< double > & getVtxParam(int i, std::vector< double > &coord)
Definition io/file/dgfparser/dgfparser.cc:1086
│ │ │ │ +
std::vector< double > & getElParam(int i, std::vector< double > &coord)
Definition io/file/dgfparser/dgfparser.cc:1070
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,224 +2,332 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -pvtuwriter.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +parser.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ │ +6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_e_n_t_i_t_y_k_e_y_._h_h> │ │ │ │ │ 14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e { │ │ │ │ │ -18 │ │ │ │ │ -21 │ │ │ │ │ -22 namespace VTK { │ │ │ │ │ -23 │ │ │ │ │ -25 │ │ │ │ │ -_6_2 class _P_V_T_U_W_r_i_t_e_r { │ │ │ │ │ -63 std::ostream& stream; │ │ │ │ │ -64 │ │ │ │ │ -65 std::string fileType; │ │ │ │ │ -66 │ │ │ │ │ -67 Indent indent; │ │ │ │ │ -68 │ │ │ │ │ -69 public: │ │ │ │ │ -71 │ │ │ │ │ -_7_8 inline _P_V_T_U_W_r_i_t_e_r(std::ostream& stream_, _F_i_l_e_T_y_p_e fileType_) │ │ │ │ │ -79 : stream(stream_) │ │ │ │ │ -80 { │ │ │ │ │ -81 switch(fileType_) { │ │ │ │ │ -82 case _p_o_l_y_D_a_t_a : │ │ │ │ │ -83 fileType = "PPolyData"; │ │ │ │ │ -84 break; │ │ │ │ │ -85 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : │ │ │ │ │ -86 fileType = "PUnstructuredGrid"; │ │ │ │ │ -87 break; │ │ │ │ │ -88 default : │ │ │ │ │ -89 DUNE_THROW(IOError, "PVTUWriter: Unknown fileType: " << fileType_); │ │ │ │ │ -90 } │ │ │ │ │ -91 const std::string& byteOrder = _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g(); │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 │ │ │ │ │ +18 class DGFPrintInfo; │ │ │ │ │ +19 │ │ │ │ │ +_2_2 struct _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +23 { │ │ │ │ │ +_2_5 typedef std::string _t_y_p_e; │ │ │ │ │ +26 │ │ │ │ │ +_2_8 static const _t_y_p_e &_d_e_f_a_u_l_t_V_a_l_u_e () │ │ │ │ │ +29 { │ │ │ │ │ +30 static _t_y_p_e value; │ │ │ │ │ +31 return value; │ │ │ │ │ +32 } │ │ │ │ │ +33 │ │ │ │ │ +_3_5 static _t_y_p_e _c_o_n_v_e_r_t ( const std::string & parameter ) │ │ │ │ │ +36 { │ │ │ │ │ +37 return parameter; │ │ │ │ │ +38 } │ │ │ │ │ +39 │ │ │ │ │ +_4_1 static const char _d_e_l_i_m_i_t_e_r = ':'; │ │ │ │ │ +42 }; │ │ │ │ │ +43 │ │ │ │ │ +_4_6 class _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ +47 { │ │ │ │ │ +48 public: │ │ │ │ │ +_4_9 typedef enum {_S_i_m_p_l_e_x,_C_u_b_e,_G_e_n_e_r_a_l} _e_l_e_m_e_n_t___t; │ │ │ │ │ +50 │ │ │ │ │ +_5_1 typedef enum {_c_o_u_n_t_e_r_c_l_o_c_k_w_i_s_e=1,_c_l_o_c_k_w_i_s_e=-1} _o_r_i_e_n_t_a_t_i_o_n___t; │ │ │ │ │ +52 │ │ │ │ │ +54 _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r ( int rank, int size ); │ │ │ │ │ +55 │ │ │ │ │ +66 static bool _i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t ( std::istream &input ); │ │ │ │ │ +67 │ │ │ │ │ +77 static bool _i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t ( const std::string &filename ); │ │ │ │ │ +78 │ │ │ │ │ +91 bool _r_e_a_d_D_u_n_e_G_r_i_d( std::istream &input, int dimG, int dimW ); │ │ │ │ │ 92 │ │ │ │ │ -93 stream << indent << "\n"; │ │ │ │ │ -94 stream << indent << "\n"; │ │ │ │ │ -98 ++indent; │ │ │ │ │ -99 } │ │ │ │ │ +94 void _w_r_i_t_e_T_e_t_g_e_n_P_o_l_y ( const std::string &, std::string &, std::string & ); │ │ │ │ │ +95 │ │ │ │ │ +96 void _w_r_i_t_e_T_e_t_g_e_n_P_o_l_y ( std::ostream & out, const bool writeSegments = true │ │ │ │ │ +); │ │ │ │ │ +97 │ │ │ │ │ +98 protected: │ │ │ │ │ +99 void _g_e_n_e_r_a_t_e_B_o_u_n_d_a_r_i_e_s ( std::istream &, bool ); │ │ │ │ │ 100 │ │ │ │ │ -_1_0_2 inline _~_P_V_T_U_W_r_i_t_e_r() { │ │ │ │ │ -103 --indent; │ │ │ │ │ -104 stream << indent << "\n" │ │ │ │ │ -105 << std::flush; │ │ │ │ │ -106 } │ │ │ │ │ +101 // call to tetgen/triangle │ │ │ │ │ +102 void _g_e_n_e_r_a_t_e_S_i_m_p_l_e_x_G_r_i_d ( std::istream & ); │ │ │ │ │ +103 void _r_e_a_d_T_e_t_g_e_n_T_r_i_a_n_g_l_e ( const std::string & ); │ │ │ │ │ +104 │ │ │ │ │ +105 // helper methods │ │ │ │ │ +106 void _r_e_m_o_v_e_C_o_p_i_e_s (); │ │ │ │ │ 107 │ │ │ │ │ -109 │ │ │ │ │ -_1_2_0 inline void _b_e_g_i_n_P_o_i_n_t_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ -121 const std::string& vectors = "") { │ │ │ │ │ -122 stream << indent << "\n"; │ │ │ │ │ -126 ++indent; │ │ │ │ │ -127 } │ │ │ │ │ -_1_2_9 inline void _e_n_d_P_o_i_n_t_D_a_t_a() { │ │ │ │ │ -130 --indent; │ │ │ │ │ -131 stream << indent << "\n"; │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ +108 void _s_e_t_O_r_i_e_n_t_a_t_i_o_n ( int use1, int use2, │ │ │ │ │ +109 _o_r_i_e_n_t_a_t_i_o_n___t orientation=_c_o_u_n_t_e_r_c_l_o_c_k_w_i_s_e ); │ │ │ │ │ +110 │ │ │ │ │ +111 void _s_e_t_R_e_f_i_n_e_m_e_n_t ( int use1, int use2, int is1=-1, int is2=-1 ); │ │ │ │ │ +112 │ │ │ │ │ +113 double _t_e_s_t_T_r_i_a_n_g ( int snr ); │ │ │ │ │ +114 │ │ │ │ │ +115 std::vector< double > & _g_e_t_E_l_P_a_r_a_m ( int i, std::vector< double > & coord │ │ │ │ │ +); │ │ │ │ │ +116 │ │ │ │ │ +117 std::vector< double > & _g_e_t_V_t_x_P_a_r_a_m ( int i, std::vector< double > & coord │ │ │ │ │ +); │ │ │ │ │ +118 │ │ │ │ │ +119 static std::string _t_e_m_p_o_r_a_r_y_F_i_l_e_N_a_m_e (); │ │ │ │ │ +120 │ │ │ │ │ +121 // dimension of world and problem: set through the readDuneGrid() method │ │ │ │ │ +_1_2_2 int _d_i_m_w, _d_i_m_g_r_i_d; │ │ │ │ │ +123 │ │ │ │ │ +124 // vector of vertex coordinates │ │ │ │ │ +_1_2_5 std::vector < std::vector < double > > _v_t_x; │ │ │ │ │ +126 │ │ │ │ │ +_1_2_7 int _n_o_f_v_t_x; │ │ │ │ │ +128 │ │ │ │ │ +_1_2_9 int _v_t_x_o_f_f_s_e_t; │ │ │ │ │ +130 │ │ │ │ │ +_1_3_1 double _m_i_n_V_e_r_t_e_x_D_i_s_t_a_n_c_e; // min. L^1 distance of distinct points │ │ │ │ │ +132 │ │ │ │ │ +133 // vector of elements │ │ │ │ │ +_1_3_4 std :: vector< std :: vector< unsigned int > > _e_l_e_m_e_n_t_s; │ │ │ │ │ 135 │ │ │ │ │ -_1_4_6 inline void _b_e_g_i_n_C_e_l_l_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ -147 const std::string& vectors = "") { │ │ │ │ │ -148 stream << indent << "\n"; │ │ │ │ │ -152 ++indent; │ │ │ │ │ -153 } │ │ │ │ │ -_1_5_5 inline void _e_n_d_C_e_l_l_D_a_t_a() { │ │ │ │ │ -156 --indent; │ │ │ │ │ -157 stream << indent << "\n"; │ │ │ │ │ -158 } │ │ │ │ │ -159 │ │ │ │ │ +_1_3_6 int _n_o_f_e_l_e_m_e_n_t_s; │ │ │ │ │ +137 │ │ │ │ │ +138 // vector of boundary segments + identifier │ │ │ │ │ +_1_3_9 std::vector < std::vector < int > > _b_o_u_n_d; │ │ │ │ │ +140 │ │ │ │ │ +_1_4_1 int _n_o_f_b_o_u_n_d; │ │ │ │ │ +142 │ │ │ │ │ +143 // map to generate and find boundary segments │ │ │ │ │ +_1_4_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ │ +_1_4_5 typedef std::pair < int, BoundaryParameter > _B_n_d_P_a_r_a_m; │ │ │ │ │ +_1_4_6 typedef std::map< DGFEntityKey< unsigned int >, _B_n_d_P_a_r_a_m > _f_a_c_e_m_a_p___t; │ │ │ │ │ +_1_4_7 _f_a_c_e_m_a_p___t _f_a_c_e_m_a_p; │ │ │ │ │ +148 │ │ │ │ │ +149 // true if parameters on a boundary found │ │ │ │ │ +_1_5_0 bool _h_a_v_e_B_n_d_P_a_r_a_m_e_t_e_r_s; │ │ │ │ │ +151 │ │ │ │ │ +152 // set by generator depending on element type wanted │ │ │ │ │ +_1_5_3 _e_l_e_m_e_n_t___t _e_l_e_m_e_n_t; │ │ │ │ │ +154 │ │ │ │ │ +155 // set by the readDuneGrid method depending │ │ │ │ │ +156 // on what type the elements were generated │ │ │ │ │ +_1_5_7 bool _s_i_m_p_l_e_x_g_r_i_d; │ │ │ │ │ +158 │ │ │ │ │ +159 // true if grid is generated using the intervall Block │ │ │ │ │ +_1_6_0 bool _c_u_b_e_2_s_i_m_p_l_e_x; │ │ │ │ │ 161 │ │ │ │ │ -_1_6_6 inline void _b_e_g_i_n_P_o_i_n_t_s() { │ │ │ │ │ -167 stream << indent << "\n"; │ │ │ │ │ -168 ++indent; │ │ │ │ │ -169 } │ │ │ │ │ -_1_7_1 inline void _e_n_d_P_o_i_n_t_s() { │ │ │ │ │ -172 --indent; │ │ │ │ │ -173 stream << indent << "\n"; │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -177 │ │ │ │ │ -_1_8_9 inline void _b_e_g_i_n_M_a_i_n(unsigned ghostLevel = 0) { │ │ │ │ │ -190 stream << indent << "<" << fileType │ │ │ │ │ -191 << " GhostLevel=\"" << ghostLevel << "\">\n"; │ │ │ │ │ -192 ++indent; │ │ │ │ │ -193 } │ │ │ │ │ -_1_9_5 inline void _e_n_d_M_a_i_n() { │ │ │ │ │ -196 --indent; │ │ │ │ │ -197 stream << indent << "\n"; │ │ │ │ │ -198 } │ │ │ │ │ -199 │ │ │ │ │ -201 │ │ │ │ │ -_2_0_7 void _a_d_d_A_r_r_a_y(const std::string& name, unsigned ncomps, _P_r_e_c_i_s_i_o_n prec) { │ │ │ │ │ -208 stream << indent << "\n"; │ │ │ │ │ -212 } │ │ │ │ │ -213 │ │ │ │ │ -_2_1_5 inline void _a_d_d_P_i_e_c_e(const std::string& filename) { │ │ │ │ │ -216 stream << indent << "\n"; │ │ │ │ │ -218 } │ │ │ │ │ -219 }; │ │ │ │ │ -220 │ │ │ │ │ -221 } // namespace VTK │ │ │ │ │ -222 │ │ │ │ │ -224 │ │ │ │ │ -225} // namespace Dune │ │ │ │ │ -226 │ │ │ │ │ -227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ +162 // parameters on elements │ │ │ │ │ +_1_6_3 int _n_o_f_v_t_x_p_a_r_a_m_s,_n_o_f_e_l_p_a_r_a_m_s; │ │ │ │ │ +164 │ │ │ │ │ +_1_6_5 std::vector< std::vector< double > > _v_t_x_P_a_r_a_m_s,_e_l_P_a_r_a_m_s; │ │ │ │ │ +166 │ │ │ │ │ +167 // write information about generation process │ │ │ │ │ +_1_6_8 _D_G_F_P_r_i_n_t_I_n_f_o * _i_n_f_o; │ │ │ │ │ +169 │ │ │ │ │ +_1_7_0 std::vector < double > _e_m_p_t_y_P_a_r_a_m__; │ │ │ │ │ +171 │ │ │ │ │ +172 │ │ │ │ │ +173 private: │ │ │ │ │ +174 int rank_; │ │ │ │ │ +175 int size_; │ │ │ │ │ +176 │ │ │ │ │ +177 template< class GridType > │ │ │ │ │ +_1_7_8 friend struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ +179 │ │ │ │ │ +180 template< class GridType > │ │ │ │ │ +_1_8_1 friend struct _D_G_F_B_a_s_e_F_a_c_t_o_r_y; │ │ │ │ │ +182 │ │ │ │ │ +183 }; │ │ │ │ │ +184 │ │ │ │ │ +185} // end namespace Dune │ │ │ │ │ +186 │ │ │ │ │ +187#endif │ │ │ │ │ +_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision │ │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ -FileType │ │ │ │ │ -which type of VTK file to write │ │ │ │ │ -DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ -@ polyData │ │ │ │ │ -for .vtp files (PolyData) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ -@ unstructuredGrid │ │ │ │ │ -for .vtu files (UnstructuredGrid) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g │ │ │ │ │ -std::string toString(Precision p) │ │ │ │ │ -map precision to VTK type name │ │ │ │ │ -DDeeffiinniittiioonn common.hh:280 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ -std::string getEndiannessString() │ │ │ │ │ -determine endianness of this C++ implementation │ │ │ │ │ -DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_~_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -~PVTUWriter() │ │ │ │ │ -write footer │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ -void endMain() │ │ │ │ │ -finish the main PolyData/UnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void endCellData() │ │ │ │ │ -finish CellData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -void addArray(const std::string &name, unsigned ncomps, Precision prec) │ │ │ │ │ -Add an array to the output file. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ -void beginMain(unsigned ghostLevel=0) │ │ │ │ │ -start the main PPolyData/PUnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ -void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start CellData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start PointData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:120 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_P_i_e_c_e │ │ │ │ │ -void addPiece(const std::string &filename) │ │ │ │ │ -Add a serial piece to the output file. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:215 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -PVTUWriter(std::ostream &stream_, FileType fileType_) │ │ │ │ │ -create a PVTUWriter object │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void endPointData() │ │ │ │ │ -finish PointData section │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -void endPoints() │ │ │ │ │ -finish section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -void beginPoints() │ │ │ │ │ -start section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_P_r_i_n_t_I_n_f_o │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:26 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +Contains types for additional features. │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ +static const type & defaultValue() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_l_i_m_i_t_e_r │ │ │ │ │ +static const char delimiter │ │ │ │ │ +delimiter │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_c_o_n_v_e_r_t │ │ │ │ │ +static type convert(const std::string ¶meter) │ │ │ │ │ +copy from string │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ +The DuneGridFormatParser class: reads a DGF file and stores build information │ │ │ │ │ +in vector structures us... │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_v_t_x_p_a_r_a_m_s │ │ │ │ │ +int nofvtxparams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_b_o_u_n_d │ │ │ │ │ +int nofbound │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_B_n_d_P_a_r_a_m │ │ │ │ │ +std::pair< int, BoundaryParameter > BndParam │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_r_e_a_d_T_e_t_g_e_n_T_r_i_a_n_g_l_e │ │ │ │ │ +void readTetgenTriangle(const std::string &) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:795 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t │ │ │ │ │ +static bool isDuneGridFormat(std::istream &input) │ │ │ │ │ +check whether a stream is in DUNE grid format │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:271 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ +void setOrientation(int use1, int use2, orientation_t │ │ │ │ │ +orientation=counterclockwise) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:910 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x_P_a_r_a_m_s │ │ │ │ │ +std::vector< std::vector< double > > vtxParams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_s_e_t_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +void setRefinement(int use1, int use2, int is1=-1, int is2=-1) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:989 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_D_G_F_B_a_s_e_F_a_c_t_o_r_y │ │ │ │ │ +friend struct DGFBaseFactory │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:181 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_t_e_m_p_o_r_a_r_y_F_i_l_e_N_a_m_e │ │ │ │ │ +static std::string temporaryFileName() │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1096 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_r_e_m_o_v_e_C_o_p_i_e_s │ │ │ │ │ +void removeCopies() │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:464 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_d_i_m_w │ │ │ │ │ +int dimw │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_d_i_m_g_r_i_d │ │ │ │ │ +int dimgrid │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t │ │ │ │ │ +element_t element │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +DGFBoundaryParameter::type BoundaryParameter │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_e_l_e_m_e_n_t_s │ │ │ │ │ +int nofelements │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_o_r_i_e_n_t_a_t_i_o_n___t │ │ │ │ │ +orientation_t │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_c_l_o_c_k_w_i_s_e │ │ │ │ │ +@ clockwise │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_c_o_u_n_t_e_r_c_l_o_c_k_w_i_s_e │ │ │ │ │ +@ counterclockwise │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_t_e_s_t_T_r_i_a_n_g │ │ │ │ │ +double testTriang(int snr) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1050 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_m_i_n_V_e_r_t_e_x_D_i_s_t_a_n_c_e │ │ │ │ │ +double minVertexDistance │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_s_i_m_p_l_e_x_g_r_i_d │ │ │ │ │ +bool simplexgrid │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_f_a_c_e_m_a_p___t │ │ │ │ │ +std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_b_o_u_n_d │ │ │ │ │ +std::vector< std::vector< int > > bound │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_n_e_r_a_t_e_S_i_m_p_l_e_x_G_r_i_d │ │ │ │ │ +void generateSimplexGrid(std::istream &) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:624 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_m_p_t_y_P_a_r_a_m__ │ │ │ │ │ +std::vector< double > emptyParam_ │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_e_l_p_a_r_a_m_s │ │ │ │ │ +int nofelparams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_P_a_r_a_m_s │ │ │ │ │ +std::vector< std::vector< double > > elParams │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_f_a_c_e_m_a_p │ │ │ │ │ +facemap_t facemap │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t___t │ │ │ │ │ +element_t │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_G_e_n_e_r_a_l │ │ │ │ │ +@ General │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_C_u_b_e │ │ │ │ │ +@ Cube │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_S_i_m_p_l_e_x │ │ │ │ │ +@ Simplex │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_c_u_b_e_2_s_i_m_p_l_e_x │ │ │ │ │ +bool cube2simplex │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_n_o_f_v_t_x │ │ │ │ │ +int nofvtx │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_w_r_i_t_e_T_e_t_g_e_n_P_o_l_y │ │ │ │ │ +void writeTetgenPoly(const std::string &, std::string &, std::string &) │ │ │ │ │ +method to write in Tetgen/Triangle Poly Format │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:123 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x │ │ │ │ │ +std::vector< std::vector< double > > vtx │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_v_t_x_o_f_f_s_e_t │ │ │ │ │ +int vtxoffset │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_r_e_a_d_D_u_n_e_G_r_i_d │ │ │ │ │ +bool readDuneGrid(std::istream &input, int dimG, int dimW) │ │ │ │ │ +parse dune grid format from stream │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:298 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t_s │ │ │ │ │ +std ::vector< std ::vector< unsigned int > > elements │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_h_a_v_e_B_n_d_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ +bool haveBndParameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_i_n_f_o │ │ │ │ │ +DGFPrintInfo * info │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_n_e_r_a_t_e_B_o_u_n_d_a_r_i_e_s │ │ │ │ │ +void generateBoundaries(std::istream &, bool) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:502 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_t_V_t_x_P_a_r_a_m │ │ │ │ │ +std::vector< double > & getVtxParam(int i, std::vector< double > &coord) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1086 │ │ │ │ │ +_D_u_n_e_:_:_D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r_:_:_g_e_t_E_l_P_a_r_a_m │ │ │ │ │ +std::vector< double > & getElParam(int i, std::vector< double > &coord) │ │ │ │ │ +DDeeffiinniittiioonn io/file/dgfparser/dgfparser.cc:1070 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtuwriter.hh File Reference │ │ │ │ +dune-grid: gmshwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vtuwriter.hh File Reference
│ │ │ │ +
gmshwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <ostream>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <iomanip>
│ │ │ │ #include <string>
│ │ │ │ +#include <vector>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/indent.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/dataarraywriter.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::VTUWriter
 Dump a .vtu/.vtp files contents to a stream. More...
class  Dune::GmshWriter< GridView >
 Write Gmsh mesh file. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,30 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vtuwriter.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +gmshwriter.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -  Dump a .vtu/.vtp files contents to a stream. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Write _G_m_s_h mesh file. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtuwriter.hh Source File │ │ │ │ +dune-grid: gmshwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,308 +70,240 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtuwriter.hh
│ │ │ │ +
gmshwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <ostream>
│ │ │ │ -
10#include <string>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/exceptions.hh>
│ │ │ │ -
13#include <dune/common/indent.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune {
│ │ │ │ +
5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ +
6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <iomanip>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <vector>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/common/exceptions.hh>
│ │ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ │ +
16#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │
19
│ │ │ │ -
22
│ │ │ │ -
23 namespace VTK {
│ │ │ │ -
24
│ │ │ │ -
26
│ │ │ │ -
│ │ │ │ -
98 class VTUWriter {
│ │ │ │ -
99 public:
│ │ │ │ -
100 std::ostream& stream;
│ │ │ │ - │ │ │ │ -
102
│ │ │ │ -
103 private:
│ │ │ │ - │ │ │ │ -
105 Indent indent;
│ │ │ │ -
106
│ │ │ │ -
107 std::string fileType;
│ │ │ │ -
108 std::string cellName;
│ │ │ │ -
109
│ │ │ │ -
110 bool doAppended;
│ │ │ │ -
111
│ │ │ │ -
112 public:
│ │ │ │ -
114
│ │ │ │ -
│ │ │ │ -
122 inline VTUWriter(std::ostream& stream_, OutputType outputType,
│ │ │ │ -
123 FileType fileType_)
│ │ │ │ -
124 : stream(stream_), factory(outputType, stream)
│ │ │ │ -
125 {
│ │ │ │ -
126 switch(fileType_) {
│ │ │ │ -
127 case polyData :
│ │ │ │ -
128 fileType = "PolyData";
│ │ │ │ -
129 cellName = "Lines";
│ │ │ │ -
130 break;
│ │ │ │ -
131 case unstructuredGrid :
│ │ │ │ -
132 fileType = "UnstructuredGrid";
│ │ │ │ -
133 cellName = "Cells";
│ │ │ │ -
134 break;
│ │ │ │ -
135 default :
│ │ │ │ -
136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_);
│ │ │ │ -
137 }
│ │ │ │ -
138 const std::string& byteOrder = getEndiannessString();
│ │ │ │ -
139
│ │ │ │ -
140 stream << indent << "<?xml version=\"1.0\"?>\n";
│ │ │ │ -
141 stream << indent << "<VTKFile"
│ │ │ │ -
142 << " type=\"" << fileType << "\""
│ │ │ │ -
143 << " version=\"0.1\""
│ │ │ │ -
144 << " byte_order=\"" << byteOrder << "\">\n";
│ │ │ │ -
145 ++indent;
│ │ │ │ -
146 }
│ │ │ │ +
20namespace Dune {
│ │ │ │ +
21
│ │ │ │ +
35 template <class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {
│ │ │ │ +
38 private:
│ │ │ │ +
39 const GridView gv;
│ │ │ │ +
40 int precision;
│ │ │ │ +
41
│ │ │ │ +
42 static const unsigned int dim = GridView::dimension;
│ │ │ │ +
43 static const unsigned int dimWorld = GridView::dimensionworld;
│ │ │ │ +
44 static_assert( (dimWorld <= 3), "GmshWriter requires dimWorld <= 3." );
│ │ │ │ +
45
│ │ │ │ +
47 template<typename Entity>
│ │ │ │ +
48 std::size_t nodeIndexFromEntity(const Entity& entity, int i) const {
│ │ │ │ +
49 return gv.indexSet().subIndex(entity, i, dim)+1;
│ │ │ │ +
50 }
│ │ │ │ +
51
│ │ │ │ +
55 static std::size_t translateDuneToGmshType(const GeometryType& type) {
│ │ │ │ +
56 std::size_t element_type;
│ │ │ │ +
57
│ │ │ │ +
58 if (type.isLine())
│ │ │ │ +
59 element_type = 1;
│ │ │ │ +
60 else if (type.isTriangle())
│ │ │ │ +
61 element_type = 2;
│ │ │ │ +
62 else if (type.isQuadrilateral())
│ │ │ │ +
63 element_type = 3;
│ │ │ │ +
64 else if (type.isTetrahedron())
│ │ │ │ +
65 element_type = 4;
│ │ │ │ +
66 else if (type.isHexahedron())
│ │ │ │ +
67 element_type = 5;
│ │ │ │ +
68 else if (type.isPrism())
│ │ │ │ +
69 element_type = 6;
│ │ │ │ +
70 else if (type.isPyramid())
│ │ │ │ +
71 element_type = 7;
│ │ │ │ +
72 else if (type.isVertex())
│ │ │ │ +
73 element_type = 15;
│ │ │ │ +
74 else
│ │ │ │ +
75 DUNE_THROW(Dune::IOError, "GeometryType " << type << " is not supported by gmsh.");
│ │ │ │ +
76
│ │ │ │ +
77 return element_type;
│ │ │ │ +
78 }
│ │ │ │ +
79
│ │ │ │ +
94 void outputElements(std::ofstream& file, const std::vector<int>& physicalEntities, const std::vector<int>& physicalBoundaries) const {
│ │ │ │ + │ │ │ │ +
96 std::size_t counter(1);
│ │ │ │ +
97 for (const auto& entity : elements(gv)) {
│ │ │ │ +
98 // Check whether the type is compatible. If not, close file and rethrow exception.
│ │ │ │ +
99 try {
│ │ │ │ +
100 std::size_t element_type = translateDuneToGmshType(entity.type());
│ │ │ │ +
101
│ │ │ │ +
102 file << counter << " " << element_type;
│ │ │ │ +
103 // If present, set the first tag to the physical entity
│ │ │ │ +
104 if (!physicalEntities.empty())
│ │ │ │ +
105 file << " " << 1 << " " << physicalEntities[elementMapper.index(entity)];
│ │ │ │ +
106 else
│ │ │ │ +
107 file << " " << 0; // "0" for "I do not use any tags."
│ │ │ │ +
108
│ │ │ │ +
109 // Output list of nodes.
│ │ │ │ +
110 // 3, 5 and 7 got different vertex numbering compared to Dune
│ │ │ │ +
111 if (3 == element_type)
│ │ │ │ +
112 file << " "
│ │ │ │ +
113 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
│ │ │ │ +
114 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2);
│ │ │ │ +
115 else if (5 == element_type)
│ │ │ │ +
116 file << " "
│ │ │ │ +
117 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
│ │ │ │ +
118 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
│ │ │ │ +
119 << nodeIndexFromEntity(entity, 4) << " " << nodeIndexFromEntity(entity, 5) << " "
│ │ │ │ +
120 << nodeIndexFromEntity(entity, 7) << " " << nodeIndexFromEntity(entity, 6);
│ │ │ │ +
121 else if (7 == element_type)
│ │ │ │ +
122 file << " "
│ │ │ │ +
123 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
│ │ │ │ +
124 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
│ │ │ │ +
125 << nodeIndexFromEntity(entity, 4);
│ │ │ │ +
126 else {
│ │ │ │ +
127 for (int k = 0; k < entity.geometry().corners(); ++k)
│ │ │ │ +
128 file << " " << nodeIndexFromEntity(entity, k);
│ │ │ │ +
129 }
│ │ │ │ +
130 ++counter;
│ │ │ │ +
131
│ │ │ │ +
132 file << std::endl;
│ │ │ │ +
133
│ │ │ │ +
134 // Write boundaries
│ │ │ │ +
135 if (!physicalBoundaries.empty()) {
│ │ │ │ +
136 auto refElement = referenceElement<typename GridView::ctype,dim>(entity.type());
│ │ │ │ +
137 for(const auto& intersection : intersections(gv, entity)) {
│ │ │ │ +
138 if(intersection.boundary()) {
│ │ │ │ +
139 const auto faceLocalIndex(intersection.indexInInside());
│ │ │ │ +
140 file << counter << " " << translateDuneToGmshType(intersection.type())
│ │ │ │ +
141 << " " << 1 << " " << physicalBoundaries[intersection.boundarySegmentIndex()];
│ │ │ │ +
142 for (int k = 0; k < intersection.geometry().corners(); ++k)
│ │ │ │ +
143 {
│ │ │ │ +
144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim));
│ │ │ │ +
145 file << " " << nodeIndexFromEntity(entity, vtxLocalIndex);
│ │ │ │ +
146 }
│ │ │ │ +
147 ++counter;
│ │ │ │ +
148 file << std::endl;
│ │ │ │ +
149 }
│ │ │ │ +
150 }
│ │ │ │ +
151 }
│ │ │ │ +
152
│ │ │ │ +
153 } catch(Exception& e) {
│ │ │ │ +
154 file.close();
│ │ │ │ +
155 throw;
│ │ │ │ +
156 }
│ │ │ │ +
157 }
│ │ │ │ +
158 }
│ │ │ │ +
159
│ │ │ │ +
160
│ │ │ │ +
167 void outputNodes(std::ofstream& file) const {
│ │ │ │ +
168 for (const auto& vertex : vertices(gv)) {
│ │ │ │ +
169 const auto globalCoord = vertex.geometry().center();
│ │ │ │ +
170 const auto nodeIndex = gv.indexSet().index(vertex)+1; // Start counting indices by "1".
│ │ │ │ +
171
│ │ │ │ +
172 if (1 == dimWorld)
│ │ │ │ +
173 file << nodeIndex << " " << globalCoord[0] << " " << 0 << " " << 0 << std::endl;
│ │ │ │ +
174 else if (2 == dimWorld)
│ │ │ │ +
175 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << 0 << std::endl;
│ │ │ │ +
176 else // (3 == dimWorld)
│ │ │ │ +
177 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << globalCoord[2] << std::endl;
│ │ │ │ +
178 }
│ │ │ │ +
179 }
│ │ │ │ +
180
│ │ │ │ +
181 public:
│ │ │ │ +
187 GmshWriter(const GridView& gridView, int numDigits=6) : gv(gridView), precision(numDigits) {}
│ │ │ │ +
188
│ │ │ │ +
│ │ │ │ +
193 void setPrecision(int numDigits) {
│ │ │ │ +
194 precision = numDigits;
│ │ │ │ +
195 }
│ │ │ │ +
│ │ │ │ +
196
│ │ │ │ +
│ │ │ │ +
218 void write(const std::string& fileName,
│ │ │ │ +
219 const std::vector<int>& physicalEntities=std::vector<int>(),
│ │ │ │ +
220 const std::vector<int>& physicalBoundaries=std::vector<int>()) const {
│ │ │ │ +
221 // Open file
│ │ │ │ +
222 std::ofstream file(fileName.c_str());
│ │ │ │ +
223 if (!file.is_open())
│ │ │ │ +
224 DUNE_THROW(Dune::IOError, "Could not open " << fileName << " with write access.");
│ │ │ │ +
225
│ │ │ │ +
226 // Set precision
│ │ │ │ +
227 file << std::setprecision( precision );
│ │ │ │ +
228
│ │ │ │ +
229 // Output Header
│ │ │ │ +
230 file << "$MeshFormat" << std::endl
│ │ │ │ +
231 << "2.0 0 " << sizeof(double) << std::endl // "2.0" for "version 2.0", "0" for ASCII
│ │ │ │ +
232 << "$EndMeshFormat" << std::endl;
│ │ │ │ +
233
│ │ │ │ +
234 // Output Nodes
│ │ │ │ +
235 file << "$Nodes" << std::endl
│ │ │ │ +
236 << gv.size(dim) << std::endl;
│ │ │ │ +
237
│ │ │ │ +
238 outputNodes(file);
│ │ │ │ +
239
│ │ │ │ +
240 file << "$EndNodes" << std::endl;
│ │ │ │ +
241
│ │ │ │ +
242 // Output Elements;
│ │ │ │ +
243 int boundariesSize(0);
│ │ │ │ +
244 if(!physicalBoundaries.empty())
│ │ │ │ +
245 for(const auto& entity : elements(gv))
│ │ │ │ +
246 for(const auto& intersection : intersections(gv, entity))
│ │ │ │ +
247 if(intersection.boundary())
│ │ │ │ +
248 ++boundariesSize;
│ │ │ │ +
249
│ │ │ │ +
250 file << "$Elements" << std::endl
│ │ │ │ +
251 << gv.size(0) + boundariesSize<< std::endl;
│ │ │ │ +
252
│ │ │ │ +
253 outputElements(file, physicalEntities, physicalBoundaries);
│ │ │ │ +
254
│ │ │ │ +
255 file << "$EndElements" << std::endl;
│ │ │ │ +
256 }
│ │ │ │
│ │ │ │ -
147
│ │ │ │ -
│ │ │ │ -
149 inline ~VTUWriter() {
│ │ │ │ -
150 --indent;
│ │ │ │ -
151 stream << indent << "</VTKFile>\n"
│ │ │ │ -
152 << std::flush;
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154
│ │ │ │ -
156
│ │ │ │ -
│ │ │ │ -
167 inline void beginPointData(const std::string& scalars = "",
│ │ │ │ -
168 const std::string& vectors = "") {
│ │ │ │ -
169 switch(phase) {
│ │ │ │ -
170 case main :
│ │ │ │ -
171 stream << indent << "<PointData";
│ │ │ │ -
172 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ -
173 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ -
174 stream << ">\n";
│ │ │ │ -
175 ++indent;
│ │ │ │ -
176 break;
│ │ │ │ -
177 case appended :
│ │ │ │ -
178 break;
│ │ │ │ -
179 }
│ │ │ │ -
180 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
182 inline void endPointData() {
│ │ │ │ -
183 switch(phase) {
│ │ │ │ -
184 case main :
│ │ │ │ -
185 --indent;
│ │ │ │ -
186 stream << indent << "</PointData>\n";
│ │ │ │ -
187 break;
│ │ │ │ -
188 case appended :
│ │ │ │ -
189 break;
│ │ │ │ -
190 }
│ │ │ │ -
191 }
│ │ │ │ -
│ │ │ │ -
192
│ │ │ │ -
194
│ │ │ │ -
│ │ │ │ -
205 inline void beginCellData(const std::string& scalars = "",
│ │ │ │ -
206 const std::string& vectors = "") {
│ │ │ │ -
207 switch(phase) {
│ │ │ │ -
208 case main :
│ │ │ │ -
209 stream << indent << "<CellData";
│ │ │ │ -
210 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ │ -
211 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ │ -
212 stream << ">\n";
│ │ │ │ -
213 ++indent;
│ │ │ │ -
214 break;
│ │ │ │ -
215 case appended :
│ │ │ │ -
216 break;
│ │ │ │ -
217 }
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
220 inline void endCellData() {
│ │ │ │ -
221 switch(phase) {
│ │ │ │ -
222 case main :
│ │ │ │ -
223 --indent;
│ │ │ │ -
224 stream << indent << "</CellData>\n";
│ │ │ │ -
225 break;
│ │ │ │ -
226 case appended :
│ │ │ │ -
227 break;
│ │ │ │ -
228 }
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230
│ │ │ │ -
232
│ │ │ │ -
│ │ │ │ -
238 inline void beginPoints() {
│ │ │ │ -
239 switch(phase) {
│ │ │ │ -
240 case main :
│ │ │ │ -
241 stream << indent << "<Points>\n";
│ │ │ │ -
242 ++indent;
│ │ │ │ -
243 break;
│ │ │ │ -
244 case appended :
│ │ │ │ -
245 break;
│ │ │ │ -
246 }
│ │ │ │ -
247 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
249 inline void endPoints() {
│ │ │ │ -
250 switch(phase) {
│ │ │ │ -
251 case main :
│ │ │ │ -
252 --indent;
│ │ │ │ -
253 stream << indent << "</Points>\n";
│ │ │ │ -
254 break;
│ │ │ │ -
255 case appended :
│ │ │ │ -
256 break;
│ │ │ │ -
257 }
│ │ │ │ -
258 }
│ │ │ │ +
257
│ │ │ │ +
258 };
│ │ │ │
│ │ │ │
259
│ │ │ │ +
260} // namespace Dune
│ │ │ │
261
│ │ │ │ -
│ │ │ │ -
274 inline void beginCells() {
│ │ │ │ -
275 switch(phase) {
│ │ │ │ -
276 case main :
│ │ │ │ -
277 stream << indent << "<" << cellName << ">\n";
│ │ │ │ -
278 ++indent;
│ │ │ │ -
279 break;
│ │ │ │ -
280 case appended :
│ │ │ │ -
281 break;
│ │ │ │ -
282 }
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
285 inline void endCells() {
│ │ │ │ -
286 switch(phase) {
│ │ │ │ -
287 case main :
│ │ │ │ -
288 --indent;
│ │ │ │ -
289 stream << indent << "</" << cellName << ">\n";
│ │ │ │ -
290 break;
│ │ │ │ -
291 case appended :
│ │ │ │ -
292 break;
│ │ │ │ -
293 }
│ │ │ │ -
294 }
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
297
│ │ │ │ -
│ │ │ │ -
310 inline void beginMain(unsigned ncells, unsigned npoints) {
│ │ │ │ -
311 stream << indent << "<" << fileType << ">\n";
│ │ │ │ -
312 ++indent;
│ │ │ │ -
313 stream << indent << "<Piece"
│ │ │ │ -
314 << " NumberOf" << cellName << "=\"" << ncells << "\""
│ │ │ │ -
315 << " NumberOfPoints=\"" << npoints << "\">\n";
│ │ │ │ -
316 ++indent;
│ │ │ │ -
317 phase = main;
│ │ │ │ -
318 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
320 inline void endMain() {
│ │ │ │ -
321 --indent;
│ │ │ │ -
322 stream << indent << "</Piece>\n";
│ │ │ │ -
323 --indent;
│ │ │ │ -
324 stream << indent << "</" << fileType << ">\n";
│ │ │ │ -
325 }
│ │ │ │ -
│ │ │ │ -
326
│ │ │ │ -
328
│ │ │ │ -
│ │ │ │ -
345 inline bool beginAppended() {
│ │ │ │ -
346 doAppended = factory.beginAppended();
│ │ │ │ -
347 if(doAppended) {
│ │ │ │ -
348 const std::string& encoding = factory.appendedEncoding();
│ │ │ │ -
349 stream << indent << "<AppendedData"
│ │ │ │ -
350 << " encoding=\"" << encoding << "\">\n";
│ │ │ │ -
351 ++indent;
│ │ │ │ -
352 // mark begin of data
│ │ │ │ -
353 stream << indent << "_";
│ │ │ │ -
354 }
│ │ │ │ -
355 phase = appended;
│ │ │ │ -
356 return doAppended;
│ │ │ │ -
357 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
359 inline void endAppended() {
│ │ │ │ -
360 if(doAppended) {
│ │ │ │ -
361 stream << "\n";
│ │ │ │ -
362 --indent;
│ │ │ │ -
363 stream << indent << "</AppendedData>\n";
│ │ │ │ -
364 }
│ │ │ │ -
365 }
│ │ │ │ -
│ │ │ │ -
366
│ │ │ │ -
368
│ │ │ │ -
│ │ │ │ -
380 DataArrayWriter* makeArrayWriter(const std::string& name,
│ │ │ │ -
381 unsigned ncomps, unsigned nitems,
│ │ │ │ -
382 Precision prec) {
│ │ │ │ -
383 return factory.make(name, ncomps, nitems, indent, prec);
│ │ │ │ -
384 }
│ │ │ │ -
│ │ │ │ -
385 };
│ │ │ │ -
│ │ │ │ -
386
│ │ │ │ -
387 } // namespace VTK
│ │ │ │ -
388
│ │ │ │ -
390
│ │ │ │ -
391} // namespace Dune
│ │ │ │ -
392
│ │ │ │ -
393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ │ -
Data array writers for the VTKWriter.
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ +
262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │ +
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:191
│ │ │ │ +
int size(int codim) const
obtain number of entities in a given codimension
Definition common/gridview.hh:197
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:151
│ │ │ │ +
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ -
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ -
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ -
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ -
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ -
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ -
base class for data array writers
Definition dataarraywriter.hh:56
│ │ │ │ -
a factory for DataArrayWriters
Definition dataarraywriter.hh:462
│ │ │ │ -
bool beginAppended()
signal start of the appended section
Definition dataarraywriter.hh:497
│ │ │ │ -
DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
create a DataArrayWriter
Definition dataarraywriter.hh:541
│ │ │ │ -
const std::string & appendedEncoding() const
query encoding string for appended data
Definition dataarraywriter.hh:510
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ -
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ -
bool beginAppended()
start the appended data section
Definition vtuwriter.hh:345
│ │ │ │ -
void endAppended()
finish the appended data section
Definition vtuwriter.hh:359
│ │ │ │ -
VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)
create a VTUWriter object
Definition vtuwriter.hh:122
│ │ │ │ -
std::ostream & stream
Definition vtuwriter.hh:100
│ │ │ │ -
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ -
void beginMain(unsigned ncells, unsigned npoints)
start the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:310
│ │ │ │ -
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ -
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ -
Phase
Definition vtuwriter.hh:101
│ │ │ │ -
@ appended
Definition vtuwriter.hh:101
│ │ │ │ -
@ main
Definition vtuwriter.hh:101
│ │ │ │ -
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ -
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ -
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ -
~VTUWriter()
write footer
Definition vtuwriter.hh:149
│ │ │ │ -
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ -
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │ -
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:320
│ │ │ │ -
enum Dune::VTK::VTUWriter::Phase phase
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Geometry geometry() const
obtain geometric realization of the entity
Definition common/entity.hh:141
│ │ │ │ +
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition common/entity.hh:146
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ +
Index index(const EntityType &e) const
Map entity to starting index in array for dof block.
Definition mcmgmapper.hh:171
│ │ │ │ +
Write Gmsh mesh file.
Definition gmshwriter.hh:37
│ │ │ │ +
GmshWriter(const GridView &gridView, int numDigits=6)
Constructor expecting GridView of Grid to be written.
Definition gmshwriter.hh:187
│ │ │ │ +
void setPrecision(int numDigits)
Set the number of digits to be used when writing the vertices. By default is 6.
Definition gmshwriter.hh:193
│ │ │ │ +
void write(const std::string &fileName, const std::vector< int > &physicalEntities=std::vector< int >(), const std::vector< int > &physicalBoundaries=std::vector< int >()) const
Write given grid in Gmsh 2.0 compatible ASCII file.
Definition gmshwriter.hh:218
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,363 +2,292 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -vtuwriter.hh │ │ │ │ │ +gmshwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e { │ │ │ │ │ +5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ +6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ 19 │ │ │ │ │ -22 │ │ │ │ │ -23 namespace VTK { │ │ │ │ │ -24 │ │ │ │ │ -26 │ │ │ │ │ -_9_8 class _V_T_U_W_r_i_t_e_r { │ │ │ │ │ -99 public: │ │ │ │ │ -_1_0_0 std::ostream& _s_t_r_e_a_m; │ │ │ │ │ -_1_0_1 enum _P_h_a_s_e { _m_a_i_n, _a_p_p_e_n_d_e_d } _p_h_a_s_e; │ │ │ │ │ -102 │ │ │ │ │ -103 private: │ │ │ │ │ -104 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y factory; │ │ │ │ │ -105 Indent indent; │ │ │ │ │ -106 │ │ │ │ │ -107 std::string fileType; │ │ │ │ │ -108 std::string cellName; │ │ │ │ │ -109 │ │ │ │ │ -110 bool doAppended; │ │ │ │ │ -111 │ │ │ │ │ -112 public: │ │ │ │ │ -114 │ │ │ │ │ -_1_2_2 inline _V_T_U_W_r_i_t_e_r(std::ostream& stream_, _O_u_t_p_u_t_T_y_p_e outputType, │ │ │ │ │ -123 _F_i_l_e_T_y_p_e fileType_) │ │ │ │ │ -124 : _s_t_r_e_a_m(stream_), factory(outputType, _s_t_r_e_a_m) │ │ │ │ │ -125 { │ │ │ │ │ -126 switch(fileType_) { │ │ │ │ │ -127 case _p_o_l_y_D_a_t_a : │ │ │ │ │ -128 fileType = "PolyData"; │ │ │ │ │ -129 cellName = "Lines"; │ │ │ │ │ -130 break; │ │ │ │ │ -131 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : │ │ │ │ │ -132 fileType = "UnstructuredGrid"; │ │ │ │ │ -133 cellName = "Cells"; │ │ │ │ │ -134 break; │ │ │ │ │ -135 default : │ │ │ │ │ -136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_); │ │ │ │ │ -137 } │ │ │ │ │ -138 const std::string& byteOrder = _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g(); │ │ │ │ │ -139 │ │ │ │ │ -140 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -141 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -145 ++indent; │ │ │ │ │ +20namespace _D_u_n_e { │ │ │ │ │ +21 │ │ │ │ │ +35 template │ │ │ │ │ +_3_6 class _G_m_s_h_W_r_i_t_e_r │ │ │ │ │ +37 { │ │ │ │ │ +38 private: │ │ │ │ │ +39 const _G_r_i_d_V_i_e_w gv; │ │ │ │ │ +40 int precision; │ │ │ │ │ +41 │ │ │ │ │ +42 static const unsigned int dim = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +43 static const unsigned int dimWorld = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +44 static_assert( (dimWorld <= 3), "GmshWriter requires dimWorld <= 3." ); │ │ │ │ │ +45 │ │ │ │ │ +47 template │ │ │ │ │ +48 std::size_t nodeIndexFromEntity(const _E_n_t_i_t_y& entity, int i) const { │ │ │ │ │ +49 return gv._i_n_d_e_x_S_e_t().subIndex(entity, i, dim)+1; │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +55 static std::size_t translateDuneToGmshType(const GeometryType& type) { │ │ │ │ │ +56 std::size_t element_type; │ │ │ │ │ +57 │ │ │ │ │ +58 if (type.isLine()) │ │ │ │ │ +59 element_type = 1; │ │ │ │ │ +60 else if (type.isTriangle()) │ │ │ │ │ +61 element_type = 2; │ │ │ │ │ +62 else if (type.isQuadrilateral()) │ │ │ │ │ +63 element_type = 3; │ │ │ │ │ +64 else if (type.isTetrahedron()) │ │ │ │ │ +65 element_type = 4; │ │ │ │ │ +66 else if (type.isHexahedron()) │ │ │ │ │ +67 element_type = 5; │ │ │ │ │ +68 else if (type.isPrism()) │ │ │ │ │ +69 element_type = 6; │ │ │ │ │ +70 else if (type.isPyramid()) │ │ │ │ │ +71 element_type = 7; │ │ │ │ │ +72 else if (type.isVertex()) │ │ │ │ │ +73 element_type = 15; │ │ │ │ │ +74 else │ │ │ │ │ +75 DUNE_THROW(Dune::IOError, "GeometryType " << type << " is not supported by │ │ │ │ │ +gmsh."); │ │ │ │ │ +76 │ │ │ │ │ +77 return element_type; │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +94 void outputElements(std::ofstream& file, const std::vector& │ │ │ │ │ +physicalEntities, const std::vector& physicalBoundaries) const { │ │ │ │ │ +95 _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_r_i_d_V_i_e_w_> elementMapper(gv, │ │ │ │ │ +_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t()); │ │ │ │ │ +96 std::size_t counter(1); │ │ │ │ │ +97 for (const auto& entity : elements(gv)) { │ │ │ │ │ +98 // Check whether the type is compatible. If not, close file and rethrow │ │ │ │ │ +exception. │ │ │ │ │ +99 try { │ │ │ │ │ +100 std::size_t element_type = translateDuneToGmshType(entity._t_y_p_e()); │ │ │ │ │ +101 │ │ │ │ │ +102 file << counter << " " << element_type; │ │ │ │ │ +103 // If present, set the first tag to the physical entity │ │ │ │ │ +104 if (!physicalEntities.empty()) │ │ │ │ │ +105 file << " " << 1 << " " << physicalEntities[elementMapper._i_n_d_e_x(entity)]; │ │ │ │ │ +106 else │ │ │ │ │ +107 file << " " << 0; // "0" for "I do not use any tags." │ │ │ │ │ +108 │ │ │ │ │ +109 // Output list of nodes. │ │ │ │ │ +110 // 3, 5 and 7 got different vertex numbering compared to Dune │ │ │ │ │ +111 if (3 == element_type) │ │ │ │ │ +112 file << " " │ │ │ │ │ +113 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) │ │ │ │ │ +<< " " │ │ │ │ │ +114 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2); │ │ │ │ │ +115 else if (5 == element_type) │ │ │ │ │ +116 file << " " │ │ │ │ │ +117 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) │ │ │ │ │ +<< " " │ │ │ │ │ +118 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) │ │ │ │ │ +<< " " │ │ │ │ │ +119 << nodeIndexFromEntity(entity, 4) << " " << nodeIndexFromEntity(entity, 5) │ │ │ │ │ +<< " " │ │ │ │ │ +120 << nodeIndexFromEntity(entity, 7) << " " << nodeIndexFromEntity(entity, 6); │ │ │ │ │ +121 else if (7 == element_type) │ │ │ │ │ +122 file << " " │ │ │ │ │ +123 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) │ │ │ │ │ +<< " " │ │ │ │ │ +124 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) │ │ │ │ │ +<< " " │ │ │ │ │ +125 << nodeIndexFromEntity(entity, 4); │ │ │ │ │ +126 else { │ │ │ │ │ +127 for (int k = 0; k < entity._g_e_o_m_e_t_r_y().corners(); ++k) │ │ │ │ │ +128 file << " " << nodeIndexFromEntity(entity, k); │ │ │ │ │ +129 } │ │ │ │ │ +130 ++counter; │ │ │ │ │ +131 │ │ │ │ │ +132 file << std::endl; │ │ │ │ │ +133 │ │ │ │ │ +134 // Write boundaries │ │ │ │ │ +135 if (!physicalBoundaries.empty()) { │ │ │ │ │ +136 auto refElement = referenceElement │ │ │ │ │ +(entity._t_y_p_e()); │ │ │ │ │ +137 for(const auto& intersection : intersections(gv, entity)) { │ │ │ │ │ +138 if(intersection.boundary()) { │ │ │ │ │ +139 const auto faceLocalIndex(intersection.indexInInside()); │ │ │ │ │ +140 file << counter << " " << translateDuneToGmshType(intersection.type()) │ │ │ │ │ +141 << " " << 1 << " " << physicalBoundaries[intersection.boundarySegmentIndex │ │ │ │ │ +()]; │ │ │ │ │ +142 for (int k = 0; k < intersection.geometry().corners(); ++k) │ │ │ │ │ +143 { │ │ │ │ │ +144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim)); │ │ │ │ │ +145 file << " " << nodeIndexFromEntity(entity, vtxLocalIndex); │ │ │ │ │ 146 } │ │ │ │ │ -147 │ │ │ │ │ -_1_4_9 inline _~_V_T_U_W_r_i_t_e_r() { │ │ │ │ │ -150 --indent; │ │ │ │ │ -151 _s_t_r_e_a_m << indent << "\n" │ │ │ │ │ -152 << std::flush; │ │ │ │ │ -153 } │ │ │ │ │ -154 │ │ │ │ │ -156 │ │ │ │ │ -_1_6_7 inline void _b_e_g_i_n_P_o_i_n_t_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ -168 const std::string& vectors = "") { │ │ │ │ │ -169 switch(_p_h_a_s_e) { │ │ │ │ │ -170 case _m_a_i_n : │ │ │ │ │ -171 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -175 ++indent; │ │ │ │ │ -176 break; │ │ │ │ │ -177 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -178 break; │ │ │ │ │ +147 ++counter; │ │ │ │ │ +148 file << std::endl; │ │ │ │ │ +149 } │ │ │ │ │ +150 } │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +153 } catch(Exception& e) { │ │ │ │ │ +154 file.close(); │ │ │ │ │ +155 throw; │ │ │ │ │ +156 } │ │ │ │ │ +157 } │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +160 │ │ │ │ │ +167 void outputNodes(std::ofstream& file) const { │ │ │ │ │ +168 for (const auto& vertex : vertices(gv)) { │ │ │ │ │ +169 const auto globalCoord = vertex.geometry().center(); │ │ │ │ │ +170 const auto nodeIndex = gv._i_n_d_e_x_S_e_t().index(vertex)+1; // Start counting │ │ │ │ │ +indices by "1". │ │ │ │ │ +171 │ │ │ │ │ +172 if (1 == dimWorld) │ │ │ │ │ +173 file << nodeIndex << " " << globalCoord[0] << " " << 0 << " " << 0 << std:: │ │ │ │ │ +endl; │ │ │ │ │ +174 else if (2 == dimWorld) │ │ │ │ │ +175 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " │ │ │ │ │ +<< 0 << std::endl; │ │ │ │ │ +176 else // (3 == dimWorld) │ │ │ │ │ +177 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " │ │ │ │ │ +<< globalCoord[2] << std::endl; │ │ │ │ │ +178 } │ │ │ │ │ 179 } │ │ │ │ │ -180 } │ │ │ │ │ -_1_8_2 inline void _e_n_d_P_o_i_n_t_D_a_t_a() { │ │ │ │ │ -183 switch(_p_h_a_s_e) { │ │ │ │ │ -184 case _m_a_i_n : │ │ │ │ │ -185 --indent; │ │ │ │ │ -186 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -187 break; │ │ │ │ │ -188 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -189 break; │ │ │ │ │ -190 } │ │ │ │ │ -191 } │ │ │ │ │ -192 │ │ │ │ │ -194 │ │ │ │ │ -_2_0_5 inline void _b_e_g_i_n_C_e_l_l_D_a_t_a(const std::string& scalars = "", │ │ │ │ │ -206 const std::string& vectors = "") { │ │ │ │ │ -207 switch(_p_h_a_s_e) { │ │ │ │ │ -208 case _m_a_i_n : │ │ │ │ │ -209 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -213 ++indent; │ │ │ │ │ -214 break; │ │ │ │ │ -215 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -216 break; │ │ │ │ │ -217 } │ │ │ │ │ -218 } │ │ │ │ │ -_2_2_0 inline void _e_n_d_C_e_l_l_D_a_t_a() { │ │ │ │ │ -221 switch(_p_h_a_s_e) { │ │ │ │ │ -222 case _m_a_i_n : │ │ │ │ │ -223 --indent; │ │ │ │ │ -224 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -225 break; │ │ │ │ │ -226 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -227 break; │ │ │ │ │ -228 } │ │ │ │ │ -229 } │ │ │ │ │ -230 │ │ │ │ │ -232 │ │ │ │ │ -_2_3_8 inline void _b_e_g_i_n_P_o_i_n_t_s() { │ │ │ │ │ -239 switch(_p_h_a_s_e) { │ │ │ │ │ -240 case _m_a_i_n : │ │ │ │ │ -241 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -242 ++indent; │ │ │ │ │ -243 break; │ │ │ │ │ -244 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -245 break; │ │ │ │ │ -246 } │ │ │ │ │ -247 } │ │ │ │ │ -_2_4_9 inline void _e_n_d_P_o_i_n_t_s() { │ │ │ │ │ -250 switch(_p_h_a_s_e) { │ │ │ │ │ -251 case _m_a_i_n : │ │ │ │ │ -252 --indent; │ │ │ │ │ -253 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -254 break; │ │ │ │ │ -255 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -256 break; │ │ │ │ │ -257 } │ │ │ │ │ -258 } │ │ │ │ │ +180 │ │ │ │ │ +181 public: │ │ │ │ │ +_1_8_7 _G_m_s_h_W_r_i_t_e_r(const _G_r_i_d_V_i_e_w& gridView, int numDigits=6) : gv(gridView), │ │ │ │ │ +precision(numDigits) {} │ │ │ │ │ +188 │ │ │ │ │ +_1_9_3 void _s_e_t_P_r_e_c_i_s_i_o_n(int numDigits) { │ │ │ │ │ +194 precision = numDigits; │ │ │ │ │ +195 } │ │ │ │ │ +196 │ │ │ │ │ +_2_1_8 void _w_r_i_t_e(const std::string& fileName, │ │ │ │ │ +219 const std::vector& physicalEntities=std::vector(), │ │ │ │ │ +220 const std::vector& physicalBoundaries=std::vector()) const { │ │ │ │ │ +221 // Open file │ │ │ │ │ +222 std::ofstream file(fileName.c_str()); │ │ │ │ │ +223 if (!file.is_open()) │ │ │ │ │ +224 DUNE_THROW(Dune::IOError, "Could not open " << fileName << " with write │ │ │ │ │ +access."); │ │ │ │ │ +225 │ │ │ │ │ +226 // Set precision │ │ │ │ │ +227 file << std::setprecision( precision ); │ │ │ │ │ +228 │ │ │ │ │ +229 // Output Header │ │ │ │ │ +230 file << "$MeshFormat" << std::endl │ │ │ │ │ +231 << "2.0 0 " << sizeof(double) << std::endl // "2.0" for "version 2.0", "0" │ │ │ │ │ +for ASCII │ │ │ │ │ +232 << "$EndMeshFormat" << std::endl; │ │ │ │ │ +233 │ │ │ │ │ +234 // Output Nodes │ │ │ │ │ +235 file << "$Nodes" << std::endl │ │ │ │ │ +236 << gv._s_i_z_e(dim) << std::endl; │ │ │ │ │ +237 │ │ │ │ │ +238 outputNodes(file); │ │ │ │ │ +239 │ │ │ │ │ +240 file << "$EndNodes" << std::endl; │ │ │ │ │ +241 │ │ │ │ │ +242 // Output Elements; │ │ │ │ │ +243 int boundariesSize(0); │ │ │ │ │ +244 if(!physicalBoundaries.empty()) │ │ │ │ │ +245 for(const auto& entity : elements(gv)) │ │ │ │ │ +246 for(const auto& intersection : intersections(gv, entity)) │ │ │ │ │ +247 if(intersection.boundary()) │ │ │ │ │ +248 ++boundariesSize; │ │ │ │ │ +249 │ │ │ │ │ +250 file << "$Elements" << std::endl │ │ │ │ │ +251 << gv._s_i_z_e(0) + boundariesSize<< std::endl; │ │ │ │ │ +252 │ │ │ │ │ +253 outputElements(file, physicalEntities, physicalBoundaries); │ │ │ │ │ +254 │ │ │ │ │ +255 file << "$EndElements" << std::endl; │ │ │ │ │ +256 } │ │ │ │ │ +257 │ │ │ │ │ +258 }; │ │ │ │ │ 259 │ │ │ │ │ +260} // namespace Dune │ │ │ │ │ 261 │ │ │ │ │ -_2_7_4 inline void _b_e_g_i_n_C_e_l_l_s() { │ │ │ │ │ -275 switch(_p_h_a_s_e) { │ │ │ │ │ -276 case _m_a_i_n : │ │ │ │ │ -277 _s_t_r_e_a_m << indent << "<" << cellName << ">\n"; │ │ │ │ │ -278 ++indent; │ │ │ │ │ -279 break; │ │ │ │ │ -280 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -281 break; │ │ │ │ │ -282 } │ │ │ │ │ -283 } │ │ │ │ │ -_2_8_5 inline void _e_n_d_C_e_l_l_s() { │ │ │ │ │ -286 switch(_p_h_a_s_e) { │ │ │ │ │ -287 case _m_a_i_n : │ │ │ │ │ -288 --indent; │ │ │ │ │ -289 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -290 break; │ │ │ │ │ -291 case _a_p_p_e_n_d_e_d : │ │ │ │ │ -292 break; │ │ │ │ │ -293 } │ │ │ │ │ -294 } │ │ │ │ │ -295 │ │ │ │ │ -297 │ │ │ │ │ -_3_1_0 inline void _b_e_g_i_n_M_a_i_n(unsigned ncells, unsigned npoints) { │ │ │ │ │ -311 _s_t_r_e_a_m << indent << "<" << fileType << ">\n"; │ │ │ │ │ -312 ++indent; │ │ │ │ │ -313 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -316 ++indent; │ │ │ │ │ -317 _p_h_a_s_e = _m_a_i_n; │ │ │ │ │ -318 } │ │ │ │ │ -_3_2_0 inline void _e_n_d_M_a_i_n() { │ │ │ │ │ -321 --indent; │ │ │ │ │ -322 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -323 --indent; │ │ │ │ │ -324 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -325 } │ │ │ │ │ -326 │ │ │ │ │ -328 │ │ │ │ │ -_3_4_5 inline bool _b_e_g_i_n_A_p_p_e_n_d_e_d() { │ │ │ │ │ -346 doAppended = factory._b_e_g_i_n_A_p_p_e_n_d_e_d(); │ │ │ │ │ -347 if(doAppended) { │ │ │ │ │ -348 const std::string& encoding = factory._a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g(); │ │ │ │ │ -349 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -351 ++indent; │ │ │ │ │ -352 // mark begin of data │ │ │ │ │ -353 _s_t_r_e_a_m << indent << "_"; │ │ │ │ │ -354 } │ │ │ │ │ -355 _p_h_a_s_e = _a_p_p_e_n_d_e_d; │ │ │ │ │ -356 return doAppended; │ │ │ │ │ -357 } │ │ │ │ │ -_3_5_9 inline void _e_n_d_A_p_p_e_n_d_e_d() { │ │ │ │ │ -360 if(doAppended) { │ │ │ │ │ -361 _s_t_r_e_a_m << "\n"; │ │ │ │ │ -362 --indent; │ │ │ │ │ -363 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ │ -364 } │ │ │ │ │ -365 } │ │ │ │ │ -366 │ │ │ │ │ -368 │ │ │ │ │ -_3_8_0 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r* _m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(const std::string& name, │ │ │ │ │ -381 unsigned ncomps, unsigned nitems, │ │ │ │ │ -382 _P_r_e_c_i_s_i_o_n prec) { │ │ │ │ │ -383 return factory._m_a_k_e(name, ncomps, nitems, indent, prec); │ │ │ │ │ -384 } │ │ │ │ │ -385 }; │ │ │ │ │ -386 │ │ │ │ │ -387 } // namespace VTK │ │ │ │ │ -388 │ │ │ │ │ -390 │ │ │ │ │ -391} // namespace Dune │ │ │ │ │ -392 │ │ │ │ │ -393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ │ -_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ │ -Data array writers for the VTKWriter. │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ +262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ +_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ +Mapper for multiple codim and multiple geometry types. │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ +const IndexSet & indexSet() const │ │ │ │ │ +obtain the index set │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ +int size(int codim) const │ │ │ │ │ +obtain number of entities in a given codimension │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static constexpr int dimensionworld │ │ │ │ │ +The dimension of the world the grid lives in. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgElementLayout() │ │ │ │ │ +layout for elements (codim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision │ │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ -OutputType │ │ │ │ │ -How the bulk data should be stored in the file. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ -FileType │ │ │ │ │ -which type of VTK file to write │ │ │ │ │ -DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ -@ polyData │ │ │ │ │ -for .vtp files (PolyData) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ -@ unstructuredGrid │ │ │ │ │ -for .vtu files (UnstructuredGrid) │ │ │ │ │ -DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ -std::string getEndiannessString() │ │ │ │ │ -determine endianness of this C++ implementation │ │ │ │ │ -DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -base class for data array writers │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ │ -a factory for DataArrayWriters │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:462 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ -bool beginAppended() │ │ │ │ │ -signal start of the appended section │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:497 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned │ │ │ │ │ -nitems, const Indent &indent, Precision prec) │ │ │ │ │ -create a DataArrayWriter │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:541 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g │ │ │ │ │ -const std::string & appendedEncoding() const │ │ │ │ │ -query encoding string for appended data │ │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:510 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ -unsigned nitems, Precision prec) │ │ │ │ │ -acquire a DataArrayWriter │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ -bool beginAppended() │ │ │ │ │ -start the appended data section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:345 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_A_p_p_e_n_d_e_d │ │ │ │ │ -void endAppended() │ │ │ │ │ -finish the appended data section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:359 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_) │ │ │ │ │ -create a VTUWriter object │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_s_t_r_e_a_m │ │ │ │ │ -std::ostream & stream │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void endCellData() │ │ │ │ │ -finish CellData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ -void beginMain(unsigned ncells, unsigned npoints) │ │ │ │ │ -start the main PolyData/UnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:310 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ -void beginCells() │ │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void endPointData() │ │ │ │ │ -finish PointData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_P_h_a_s_e │ │ │ │ │ -Phase │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_a_p_p_e_n_d_e_d │ │ │ │ │ -@ appended │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_i_n │ │ │ │ │ -@ main │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ -void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start CellData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start PointData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -void endPoints() │ │ │ │ │ -finish section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_~_V_T_U_W_r_i_t_e_r │ │ │ │ │ -~VTUWriter() │ │ │ │ │ -write footer │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ -void endCells() │ │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -void beginPoints() │ │ │ │ │ -start section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ -void endMain() │ │ │ │ │ -finish the main PolyData/UnstructuredGrid section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:320 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_p_h_a_s_e │ │ │ │ │ -enum Dune::VTK::VTUWriter::Phase phase │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +obtain geometric realization of the entity │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Return the name of the reference element. The type can be used to access the │ │ │ │ │ +Dune::ReferenceElement. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ +Index index(const EntityType &e) const │ │ │ │ │ +Map entity to starting index in array for dof block. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r │ │ │ │ │ +Write Gmsh mesh file. │ │ │ │ │ +DDeeffiinniittiioonn gmshwriter.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_:_:_G_m_s_h_W_r_i_t_e_r │ │ │ │ │ +GmshWriter(const GridView &gridView, int numDigits=6) │ │ │ │ │ +Constructor expecting GridView of Grid to be written. │ │ │ │ │ +DDeeffiinniittiioonn gmshwriter.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_:_:_s_e_t_P_r_e_c_i_s_i_o_n │ │ │ │ │ +void setPrecision(int numDigits) │ │ │ │ │ +Set the number of digits to be used when writing the vertices. By default is 6. │ │ │ │ │ +DDeeffiinniittiioonn gmshwriter.hh:193 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(const std::string &fileName, const std::vector< int > │ │ │ │ │ +&physicalEntities=std::vector< int >(), const std::vector< int > │ │ │ │ │ +&physicalBoundaries=std::vector< int >()) const │ │ │ │ │ +Write given grid in Gmsh 2.0 compatible ASCII file. │ │ │ │ │ +DDeeffiinniittiioonn gmshwriter.hh:218 │ │ │ │ │ +_g_r_i_d_._h_h │ │ │ │ │ +Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryiterators.hh File Reference │ │ │ │ +dune-grid: vtk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,33 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
boundaryiterators.hh File Reference
│ │ │ │ +
vtk.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Functions for VTK output on the skeleton. │ │ │ │ +

Convenience header which includes all available VTK writers. │ │ │ │ More...

│ │ │ │ -
#include <iterator>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <dune/common/iteratorfacades.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corner.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/corneriterator.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ │ +
#include "vtk/boundarywriter.hh"
│ │ │ │ +#include "vtk/subsamplingvtkwriter.hh"
│ │ │ │ +#include "vtk/vtksequencewriter.hh"
│ │ │ │ +#include "vtk/vtkwriter.hh"
│ │ │ │ +#include "vtk/volumewriter.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::VTK::BoundaryIterator< GV >
 iterate over the GridViews boundary intersections More...
 
class  Dune::VTK::IntersectionIndexSet< ElementIndexSet >
 
class  Dune::VTK::NonConformingBoundaryIteratorFactory< GV >
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │

Detailed Description

│ │ │ │ -

Functions for VTK output on the skeleton.

│ │ │ │ -
Author
Jö Fahlke
│ │ │ │ +

Convenience header which includes all available VTK writers.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,39 +2,19 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundaryiterators.hh File Reference │ │ │ │ │ -_d_u_n_e_-_g_r_i_d » _I_/_O » _V_i_s_u_a_l_i_z_a_t_i_o_n_ _T_o_o_l_K_i_t_ _(_V_T_K_) │ │ │ │ │ -Functions for VTK output on the skeleton. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +vtk.hh File Reference │ │ │ │ │ +Convenience header which includes all available VTK writers. _M_o_r_e_._._. │ │ │ │ │ +#include "_v_t_k_/_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h" │ │ │ │ │ +#include "_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ +#include "_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ +#include "_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ +#include "_v_t_k_/_v_o_l_u_m_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_ _G_V_ _> │ │ │ │ │ -  iterate over the GridViews boundary intersections _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t_<_ _E_l_e_m_e_n_t_I_n_d_e_x_S_e_t_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_ _G_V_ _> │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Functions for VTK output on the skeleton. │ │ │ │ │ - Author │ │ │ │ │ - Jö Fahlke │ │ │ │ │ +Convenience header which includes all available VTK writers. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryiterators.hh Source File │ │ │ │ +dune-grid: vtk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,283 +70,41 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundaryiterators.hh
│ │ │ │ +
vtk.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_HH
│ │ │ │
8
│ │ │ │ -
9#include <iterator>
│ │ │ │ -
10#include <memory>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/iteratorfacades.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune {
│ │ │ │ -
19
│ │ │ │ -
22
│ │ │ │ -
28 namespace VTK {
│ │ │ │ -
29
│ │ │ │ -
31
│ │ │ │ -
35 template<typename GV>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 : public ForwardIteratorFacade
│ │ │ │ -
38 < BoundaryIterator<GV>,
│ │ │ │ -
39 const typename GV::Intersection,
│ │ │ │ -
40 const typename GV::Intersection&,
│ │ │ │ -
41 typename std::iterator_traits<typename GV::template Codim<0>::
│ │ │ │ -
42 Iterator>::difference_type>
│ │ │ │ -
43 {
│ │ │ │ -
44 public:
│ │ │ │ -
45 // reiterator the facades typedefs here
│ │ │ │ - │ │ │ │ -
47 typedef const typename GV::Intersection Value;
│ │ │ │ -
48 typedef Value& Reference;
│ │ │ │ -
49 typedef typename GV::template Codim<0>::Iterator ElementIterator;
│ │ │ │ -
50 typedef typename GV::IntersectionIterator IntersectionIterator;
│ │ │ │ -
51 typedef typename std::iterator_traits<ElementIterator>::difference_type
│ │ │ │ - │ │ │ │ -
53
│ │ │ │ -
54 private:
│ │ │ │ -
55 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
│ │ │ │ -
56 DifferenceType> Facade;
│ │ │ │ -
57
│ │ │ │ -
58 const GV* gv;
│ │ │ │ - │ │ │ │ -
60 std::shared_ptr<IntersectionIterator> iit;
│ │ │ │ -
61
│ │ │ │ -
62 bool valid() const {
│ │ │ │ -
63 // we're valid if we're passed-the-end
│ │ │ │ -
64 if(eit == gv->template end<0>()) return true;
│ │ │ │ -
65 // or if we're on a boundary
│ │ │ │ -
66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;
│ │ │ │ -
67 // otherwise we're invalid
│ │ │ │ -
68 return false;
│ │ │ │ -
69 }
│ │ │ │ -
70
│ │ │ │ -
71 void basic_increment() {
│ │ │ │ -
72 ++*iit;
│ │ │ │ -
73 if(*iit == gv->iend(*eit)) {
│ │ │ │ -
74 iit.reset();
│ │ │ │ -
75 ++eit;
│ │ │ │ -
76 if(eit != gv->template end<0>())
│ │ │ │ -
77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ │ -
78 }
│ │ │ │ -
79 }
│ │ │ │ -
80
│ │ │ │ -
81 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
83 return **iit;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
85 bool equals(const DerivedType& other) const {
│ │ │ │ -
86 if(eit != other.eit) return false;
│ │ │ │ -
87
│ │ │ │ -
88 // this is a bit tricky, since we may not compare iit if we are
│ │ │ │ -
89 // passed-the-end
│ │ │ │ -
90 bool mePassedTheEnd = eit == gv->template end<0>();
│ │ │ │ -
91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();
│ │ │ │ -
92
│ │ │ │ -
93 // both passed-the-end => consider them equal
│ │ │ │ -
94 if(mePassedTheEnd && otherPassedTheEnd) return true;
│ │ │ │ -
95
│ │ │ │ -
96 // one passed the end => not equal
│ │ │ │ -
97 if(mePassedTheEnd || otherPassedTheEnd) return false;
│ │ │ │ -
98
│ │ │ │ -
99 // none passed-the-end => do their iit iterators match?
│ │ │ │ -
100 return *iit == *other.iit;
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
│ │ │ │ -
103 void increment() {
│ │ │ │ -
104 basic_increment();
│ │ │ │ -
105 while(!valid()) basic_increment();
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ -
113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,
│ │ │ │ -
114 const IntersectionIterator& iit_)
│ │ │ │ -
115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))
│ │ │ │ -
116 {
│ │ │ │ -
117 while(!valid()) basic_increment();
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
120
│ │ │ │ -
│ │ │ │ -
125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)
│ │ │ │ -
126 : gv(&gv_), eit(eit_)
│ │ │ │ -
127 {
│ │ │ │ -
128 if(eit != gv->template end<0>())
│ │ │ │ -
129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ │ -
130
│ │ │ │ -
131 while(!valid()) basic_increment();
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
│ │ │ │ -
138 BoundaryIterator(const GV& gv_, bool end = false)
│ │ │ │ -
139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())
│ │ │ │ -
140 {
│ │ │ │ -
141 if(eit != gv->template end<0>())
│ │ │ │ -
142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ │ -
143
│ │ │ │ -
144 while(!valid()) basic_increment();
│ │ │ │ -
145 }
│ │ │ │ -
│ │ │ │ -
146 };
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
148 template<typename ElementIndexSet>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
150 const ElementIndexSet& eis;
│ │ │ │ -
151
│ │ │ │ -
152 public:
│ │ │ │ -
│ │ │ │ -
153 IntersectionIndexSet(const ElementIndexSet& eis_)
│ │ │ │ -
154 : eis(eis_)
│ │ │ │ -
155 { }
│ │ │ │ -
│ │ │ │ -
156 };
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158 template<typename GV>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
160 const GV& gv;
│ │ │ │ -
161
│ │ │ │ -
162 public:
│ │ │ │ -
163 static const unsigned dimCell = GV::dimension-1;
│ │ │ │ -
164
│ │ │ │ -
165 typedef typename GV::Intersection Cell;
│ │ │ │ - │ │ │ │ -
167
│ │ │ │ - │ │ │ │ - │ │ │ │ -
170
│ │ │ │ -
171 typedef Corner Point;
│ │ │ │ - │ │ │ │ -
173
│ │ │ │ - │ │ │ │ -
175 typedef typename GV::Communication Communication;
│ │ │ │ -
176
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
178 : gv(gv_)
│ │ │ │ -
179 { }
│ │ │ │ -
│ │ │ │ -
180
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
182 return CellIterator(gv);
│ │ │ │ -
183 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
185 return CellIterator(gv, true);
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
190 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
192 return CornerIterator(endCells());
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ - │ │ │ │ -
196 PointIterator endPoints() const { return endCorners(); }
│ │ │ │ -
197
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
199 return ConnectivityWriter();
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
201 const Communication& comm() const {
│ │ │ │ -
202 return gv.comm();
│ │ │ │ -
203 }
│ │ │ │ -
│ │ │ │ -
204 };
│ │ │ │ -
│ │ │ │ -
205
│ │ │ │ -
206 } // namespace VTK
│ │ │ │ -
207
│ │ │ │ -
209
│ │ │ │ -
210} // namespace Dune
│ │ │ │ -
211
│ │ │ │ -
212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
iterate over the GridViews boundary intersections
Definition boundaryiterators.hh:43
│ │ │ │ -
BoundaryIterator< GV > DerivedType
Definition boundaryiterators.hh:46
│ │ │ │ -
BoundaryIterator(const GV &gv_, const ElementIterator &eit_)
construct a BoundaryIterator
Definition boundaryiterators.hh:125
│ │ │ │ -
Reference dereference() const
Definition boundaryiterators.hh:82
│ │ │ │ -
const GV::Intersection Value
Definition boundaryiterators.hh:47
│ │ │ │ -
BoundaryIterator(const GV &gv_, bool end=false)
construct a BoundaryIterator
Definition boundaryiterators.hh:138
│ │ │ │ -
BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const IntersectionIterator &iit_)
construct a BoundaryIterator
Definition boundaryiterators.hh:113
│ │ │ │ -
GV::template Codim< 0 >::Iterator ElementIterator
Definition boundaryiterators.hh:49
│ │ │ │ -
Value & Reference
Definition boundaryiterators.hh:48
│ │ │ │ -
GV::IntersectionIterator IntersectionIterator
Definition boundaryiterators.hh:50
│ │ │ │ -
bool equals(const DerivedType &other) const
Definition boundaryiterators.hh:85
│ │ │ │ -
std::iterator_traits< ElementIterator >::difference_type DifferenceType
Definition boundaryiterators.hh:52
│ │ │ │ -
void increment()
Definition boundaryiterators.hh:103
│ │ │ │ -
Definition boundaryiterators.hh:149
│ │ │ │ -
IntersectionIndexSet(const ElementIndexSet &eis_)
Definition boundaryiterators.hh:153
│ │ │ │ -
Definition boundaryiterators.hh:159
│ │ │ │ -
PointIterator beginPoints() const
Definition boundaryiterators.hh:195
│ │ │ │ -
ConnectivityWriter makeConnectivity() const
Definition boundaryiterators.hh:198
│ │ │ │ -
GV::Communication Communication
Definition boundaryiterators.hh:175
│ │ │ │ -
static const unsigned dimCell
Definition boundaryiterators.hh:163
│ │ │ │ -
VTK::CornerIterator< CellIterator > CornerIterator
Definition boundaryiterators.hh:169
│ │ │ │ -
BoundaryIterator< GV > CellIterator
Definition boundaryiterators.hh:166
│ │ │ │ -
Corner Point
Definition boundaryiterators.hh:171
│ │ │ │ -
CornerIterator beginCorners() const
Definition boundaryiterators.hh:188
│ │ │ │ -
CellIterator beginCells() const
Definition boundaryiterators.hh:181
│ │ │ │ -
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition boundaryiterators.hh:174
│ │ │ │ -
CornerIterator endCorners() const
Definition boundaryiterators.hh:191
│ │ │ │ -
VTK::Corner< Cell > Corner
Definition boundaryiterators.hh:168
│ │ │ │ -
GV::Intersection Cell
Definition boundaryiterators.hh:165
│ │ │ │ -
CornerIterator PointIterator
Definition boundaryiterators.hh:172
│ │ │ │ -
NonConformingBoundaryIteratorFactory(const GV &gv_)
Definition boundaryiterators.hh:177
│ │ │ │ -
CellIterator endCells() const
Definition boundaryiterators.hh:184
│ │ │ │ -
const Communication & comm() const
Definition boundaryiterators.hh:201
│ │ │ │ -
PointIterator endPoints() const
Definition boundaryiterators.hh:196
│ │ │ │ -
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │ -
iterate over the corners of some cell range
Definition corneriterator.hh:39
│ │ │ │ -
writer for the connectivity array in nonconforming mode
Definition functionwriter.hh:261
│ │ │ │ +
13#include "vtk/boundarywriter.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16#include "vtk/vtkwriter.hh"
│ │ │ │ +
17#include "vtk/volumewriter.hh"
│ │ │ │ +
18
│ │ │ │ +
19#endif // DUNE_GRID_IO_FILE_VTK_HH
│ │ │ │ + │ │ │ │ +
Provides file i/o for the visualization toolkit.
│ │ │ │ +
Provides subsampled file i/o for the visualization toolkit.
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,320 +2,34 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -boundaryiterators.hh │ │ │ │ │ +vtk.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ │ 8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e { │ │ │ │ │ -19 │ │ │ │ │ -22 │ │ │ │ │ -28 namespace VTK { │ │ │ │ │ -29 │ │ │ │ │ -31 │ │ │ │ │ -35 template │ │ │ │ │ -_3_6 class _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ -37 : public ForwardIteratorFacade │ │ │ │ │ -38 < BoundaryIterator, │ │ │ │ │ -39 const typename GV::Intersection, │ │ │ │ │ -40 const typename GV::Intersection&, │ │ │ │ │ -41 typename std::iterator_traits:: │ │ │ │ │ -42 Iterator>::difference_type> │ │ │ │ │ -43 { │ │ │ │ │ -44 public: │ │ │ │ │ -45 // reiterator the facades typedefs here │ │ │ │ │ -_4_6 typedef _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_G_V_> _D_e_r_i_v_e_d_T_y_p_e; │ │ │ │ │ -_4_7 typedef const typename GV::Intersection _V_a_l_u_e; │ │ │ │ │ -_4_8 typedef _V_a_l_u_e& _R_e_f_e_r_e_n_c_e; │ │ │ │ │ -_4_9 typedef typename GV::template Codim<0>::Iterator _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -_5_0 typedef typename GV::IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -51 typedef typename std::iterator_traits::difference_type │ │ │ │ │ -_5_2 _D_i_f_f_e_r_e_n_c_e_T_y_p_e; │ │ │ │ │ -53 │ │ │ │ │ -54 private: │ │ │ │ │ -55 typedef ForwardIteratorFacade<_D_e_r_i_v_e_d_T_y_p_e, _V_a_l_u_e, _R_e_f_e_r_e_n_c_e, │ │ │ │ │ -56 _D_i_f_f_e_r_e_n_c_e_T_y_p_e> Facade; │ │ │ │ │ -57 │ │ │ │ │ -58 const GV* gv; │ │ │ │ │ -59 _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r eit; │ │ │ │ │ -60 std::shared_ptr iit; │ │ │ │ │ -61 │ │ │ │ │ -62 bool valid() const { │ │ │ │ │ -63 // we're valid if we're passed-the-end │ │ │ │ │ -64 if(eit == gv->template end<0>()) return true; │ │ │ │ │ -65 // or if we're on a boundary │ │ │ │ │ -66 if((*iit)->boundary() && !(*iit)->neighbor()) return true; │ │ │ │ │ -67 // otherwise we're invalid │ │ │ │ │ -68 return false; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -71 void basic_increment() { │ │ │ │ │ -72 ++*iit; │ │ │ │ │ -73 if(*iit == gv->iend(*eit)) { │ │ │ │ │ -74 iit.reset(); │ │ │ │ │ -75 ++eit; │ │ │ │ │ -76 if(eit != gv->template end<0>()) │ │ │ │ │ -77 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ │ -78 } │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -81 public: │ │ │ │ │ -_8_2 _R_e_f_e_r_e_n_c_e _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ │ -83 return **iit; │ │ │ │ │ -84 } │ │ │ │ │ -_8_5 bool _e_q_u_a_l_s(const _D_e_r_i_v_e_d_T_y_p_e& other) const { │ │ │ │ │ -86 if(eit != other.eit) return false; │ │ │ │ │ -87 │ │ │ │ │ -88 // this is a bit tricky, since we may not compare iit if we are │ │ │ │ │ -89 // passed-the-end │ │ │ │ │ -90 bool mePassedTheEnd = eit == gv->template end<0>(); │ │ │ │ │ -91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>(); │ │ │ │ │ -92 │ │ │ │ │ -93 // both passed-the-end => consider them equal │ │ │ │ │ -94 if(mePassedTheEnd && otherPassedTheEnd) return true; │ │ │ │ │ -95 │ │ │ │ │ -96 // one passed the end => not equal │ │ │ │ │ -97 if(mePassedTheEnd || otherPassedTheEnd) return false; │ │ │ │ │ -98 │ │ │ │ │ -99 // none passed-the-end => do their iit iterators match? │ │ │ │ │ -100 return *iit == *other.iit; │ │ │ │ │ -101 } │ │ │ │ │ -102 │ │ │ │ │ -_1_0_3 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -104 basic_increment(); │ │ │ │ │ -105 while(!valid()) basic_increment(); │ │ │ │ │ -106 } │ │ │ │ │ -107 │ │ │ │ │ -109 │ │ │ │ │ -_1_1_3 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, const _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r& eit_, │ │ │ │ │ -114 const _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& iit_) │ │ │ │ │ -115 : gv(&gv_), eit(eit_), iit(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(iit_)) │ │ │ │ │ -116 { │ │ │ │ │ -117 while(!valid()) basic_increment(); │ │ │ │ │ -118 } │ │ │ │ │ -120 │ │ │ │ │ -_1_2_5 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, const _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r& eit_) │ │ │ │ │ -126 : gv(&gv_), eit(eit_) │ │ │ │ │ -127 { │ │ │ │ │ -128 if(eit != gv->template end<0>()) │ │ │ │ │ -129 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ │ -130 │ │ │ │ │ -131 while(!valid()) basic_increment(); │ │ │ │ │ -132 } │ │ │ │ │ -134 │ │ │ │ │ -_1_3_8 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, bool end = false) │ │ │ │ │ -139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>()) │ │ │ │ │ -140 { │ │ │ │ │ -141 if(eit != gv->template end<0>()) │ │ │ │ │ -142 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ │ -143 │ │ │ │ │ -144 while(!valid()) basic_increment(); │ │ │ │ │ -145 } │ │ │ │ │ -146 }; │ │ │ │ │ -147 │ │ │ │ │ -148 template │ │ │ │ │ -_1_4_9 class _I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t { │ │ │ │ │ -150 const ElementIndexSet& eis; │ │ │ │ │ -151 │ │ │ │ │ -152 public: │ │ │ │ │ -_1_5_3 _I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t(const ElementIndexSet& eis_) │ │ │ │ │ -154 : eis(eis_) │ │ │ │ │ -155 { } │ │ │ │ │ -156 }; │ │ │ │ │ -157 │ │ │ │ │ -158 template │ │ │ │ │ -_1_5_9 class _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y { │ │ │ │ │ -160 const GV& gv; │ │ │ │ │ -161 │ │ │ │ │ -162 public: │ │ │ │ │ -_1_6_3 static const unsigned _d_i_m_C_e_l_l = GV::dimension-1; │ │ │ │ │ -164 │ │ │ │ │ -_1_6_5 typedef typename GV::Intersection _C_e_l_l; │ │ │ │ │ -_1_6_6 typedef _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_G_V_> _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ -167 │ │ │ │ │ -_1_6_8 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ │ -_1_6_9 typedef _V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_> _C_o_r_n_e_r_I_t_e_r_a_t_o_r; │ │ │ │ │ -170 │ │ │ │ │ -_1_7_1 typedef _C_o_r_n_e_r _P_o_i_n_t; │ │ │ │ │ -_1_7_2 typedef _C_o_r_n_e_r_I_t_e_r_a_t_o_r _P_o_i_n_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -173 │ │ │ │ │ -_1_7_4 typedef _N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_C_e_l_l_> _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r; │ │ │ │ │ -_1_7_5 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -176 │ │ │ │ │ -_1_7_7 explicit _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y(const GV& gv_) │ │ │ │ │ -178 : gv(gv_) │ │ │ │ │ -179 { } │ │ │ │ │ -180 │ │ │ │ │ -_1_8_1 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ │ -182 return _C_e_l_l_I_t_e_r_a_t_o_r(gv); │ │ │ │ │ -183 } │ │ │ │ │ -_1_8_4 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ │ -185 return _C_e_l_l_I_t_e_r_a_t_o_r(gv, true); │ │ │ │ │ -186 } │ │ │ │ │ -187 │ │ │ │ │ -_1_8_8 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _b_e_g_i_n_C_o_r_n_e_r_s() const { │ │ │ │ │ -189 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_b_e_g_i_n_C_e_l_l_s(), _e_n_d_C_e_l_l_s()); │ │ │ │ │ -190 } │ │ │ │ │ -_1_9_1 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _e_n_d_C_o_r_n_e_r_s() const { │ │ │ │ │ -192 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -_1_9_5 _P_o_i_n_t_I_t_e_r_a_t_o_r _b_e_g_i_n_P_o_i_n_t_s() const { return _b_e_g_i_n_C_o_r_n_e_r_s(); } │ │ │ │ │ -_1_9_6 _P_o_i_n_t_I_t_e_r_a_t_o_r _e_n_d_P_o_i_n_t_s() const { return _e_n_d_C_o_r_n_e_r_s(); } │ │ │ │ │ -197 │ │ │ │ │ -_1_9_8 _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r _m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y() const { │ │ │ │ │ -199 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(); │ │ │ │ │ -200 } │ │ │ │ │ -_2_0_1 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ │ -202 return gv.comm(); │ │ │ │ │ -203 } │ │ │ │ │ -204 }; │ │ │ │ │ -205 │ │ │ │ │ -206 } // namespace VTK │ │ │ │ │ -207 │ │ │ │ │ -209 │ │ │ │ │ -210} // namespace Dune │ │ │ │ │ -211 │ │ │ │ │ -212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ │ -_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -Include standard header files. │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ -iterate over the GridViews boundary intersections │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_e_d_T_y_p_e │ │ │ │ │ -BoundaryIterator< GV > DerivedType │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ -BoundaryIterator(const GV &gv_, const ElementIterator &eit_) │ │ │ │ │ -construct a BoundaryIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Reference dereference() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ -const GV::Intersection Value │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ -BoundaryIterator(const GV &gv_, bool end=false) │ │ │ │ │ -construct a BoundaryIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ │ -BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const │ │ │ │ │ -IntersectionIterator &iit_) │ │ │ │ │ -construct a BoundaryIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -GV::template Codim< 0 >::Iterator ElementIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_R_e_f_e_r_e_n_c_e │ │ │ │ │ -Value & Reference │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -GV::IntersectionIterator IntersectionIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const DerivedType &other) const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_D_i_f_f_e_r_e_n_c_e_T_y_p_e │ │ │ │ │ -std::iterator_traits< ElementIterator >::difference_type DifferenceType │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t │ │ │ │ │ -IntersectionIndexSet(const ElementIndexSet &eis_) │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -PointIterator beginPoints() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y │ │ │ │ │ -ConnectivityWriter makeConnectivity() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:198 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -GV::Communication Communication │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_d_i_m_C_e_l_l │ │ │ │ │ -static const unsigned dimCell │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -VTK::CornerIterator< CellIterator > CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ -BoundaryIterator< GV > CellIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_P_o_i_n_t │ │ │ │ │ -Corner Point │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_C_o_r_n_e_r_s │ │ │ │ │ -CornerIterator beginCorners() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:188 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ -CellIterator beginCells() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:181 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -NonConformingConnectivityWriter< Cell > ConnectivityWriter │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:174 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_e_n_d_C_o_r_n_e_r_s │ │ │ │ │ -CornerIterator endCorners() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_o_r_n_e_r │ │ │ │ │ -VTK::Corner< Cell > Corner │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l │ │ │ │ │ -GV::Intersection Cell │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -CornerIterator PointIterator │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:172 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ -NonConformingBoundaryIteratorFactory(const GV &gv_) │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ -CellIterator endCells() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:184 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_c_o_m_m │ │ │ │ │ -const Communication & comm() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:201 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -PointIterator endPoints() const │ │ │ │ │ -DDeeffiinniittiioonn boundaryiterators.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ -simple class representing a corner of a cell │ │ │ │ │ -DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -iterate over the corners of some cell range │ │ │ │ │ -DDeeffiinniittiioonn corneriterator.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -writer for the connectivity array in nonconforming mode │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:261 │ │ │ │ │ +13#include "_v_t_k_/_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h" │ │ │ │ │ +14#include "_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ +15#include "_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ +16#include "_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ │ +17#include "_v_t_k_/_v_o_l_u_m_e_w_r_i_t_e_r_._h_h" │ │ │ │ │ +18 │ │ │ │ │ +19#endif // DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ │ +_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h │ │ │ │ │ +_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides file i/o for the visualization toolkit. │ │ │ │ │ +_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides subsampled file i/o for the visualization toolkit. │ │ │ │ │ +_v_o_l_u_m_e_w_r_i_t_e_r_._h_h │ │ │ │ │ +_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriterbase.hh File Reference │ │ │ │ +dune-grid: gmshreader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,83 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
vtksequencewriterbase.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
gmshreader.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <sstream>
│ │ │ │ +
#include <cstdarg>
│ │ │ │ +#include <cstdio>
│ │ │ │ +#include <cstring>
│ │ │ │ #include <fstream>
│ │ │ │ -#include <iomanip>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <map>
│ │ │ │ #include <memory>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -#include <dune/common/path.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/vtkwriter.hh>
│ │ │ │ +#include <string>
│ │ │ │ +#include <tuple>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ +#include <dune/grid/common/gridfactory.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTKSequenceWriterBase< GridView >
 Base class to write pvd-files which contains a list of all collected vtk-files. More...
struct  Dune::GmshReaderOptions
 Options for read operation. More...
 
class  Dune::GmshReaderParser< GridType >
 dimension independent parts for GmshReaderParser More...
 
class  Dune::GmshReader< GridType >
 Read Gmsh mesh file. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Gmsh
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Enumerations

enum class  Dune::Gmsh::ReaderOptions { Dune::Gmsh::ReaderOptions::verbose = 1 │ │ │ │ +, Dune::Gmsh::ReaderOptions::insertBoundarySegments = 2 │ │ │ │ +, Dune::Gmsh::ReaderOptions::readElementData = 4 │ │ │ │ +, Dune::Gmsh::ReaderOptions::readBoundaryData = 8 │ │ │ │ + }
 Option for the Gmsh mesh file reader. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

constexpr ReaderOptions Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions b)
 composition operator for reader options
 
constexpr bool Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions b)
 query operator for reader options (is b set in a)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,31 +2,60 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vtksequencewriterbase.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +gmshreader.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_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_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  Base class to write pvd-files which contains a list of all collected │ │ │ │ │ - vtk-files. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ +  Options for read operation. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ +  dimension independent parts for _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ +  Read _G_m_s_h mesh file. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_m_s_h │ │ │ │ │ +  │ │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ │ +enum class   _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s { _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_v_e_r_b_o_s_e = 1 │ │ │ │ │ + , _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = 2 , _D_u_n_e_:_: │ │ │ │ │ + _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = 4 , _D_u_n_e_:_:_G_m_s_h_:_: │ │ │ │ │ + _R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = 8 } │ │ │ │ │ +  Option for the Gmsh mesh file reader. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +constexpr _R_e_a_d_e_r_O_p_t_i_o_n_s  _D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_| (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ + b) │ │ │ │ │ +  composition operator for reader options │ │ │ │ │ +  │ │ │ │ │ + constexpr bool  _D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_& (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ + b) │ │ │ │ │ +  query operator for reader options (is b set in a) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriterbase.hh Source File │ │ │ │ +dune-grid: gmshreader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,209 +70,1167 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtksequencewriterbase.hh
│ │ │ │ +
gmshreader.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
│ │ │ │ +
6#ifndef DUNE_GMSHREADER_HH
│ │ │ │ +
7#define DUNE_GMSHREADER_HH
│ │ │ │
8
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <iostream>
│ │ │ │ -
11#include <sstream>
│ │ │ │ +
9#include <cstdarg>
│ │ │ │ +
10#include <cstdio>
│ │ │ │ +
11#include <cstring>
│ │ │ │
12#include <fstream>
│ │ │ │ -
13#include <iomanip>
│ │ │ │ -
14#include <memory>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ -
17#include <dune/common/path.hh>
│ │ │ │ -
18
│ │ │ │ - │ │ │ │ +
13#include <iostream>
│ │ │ │ +
14#include <map>
│ │ │ │ +
15#include <memory>
│ │ │ │ +
16#include <string>
│ │ │ │ +
17#include <tuple>
│ │ │ │ +
18#include <vector>
│ │ │ │ +
19#include <utility>
│ │ │ │
20
│ │ │ │ -
21namespace Dune {
│ │ │ │ -
22
│ │ │ │ -
32 template<class GridView>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 {
│ │ │ │ -
35 std::shared_ptr<VTKWriter<GridView> > vtkWriter_;
│ │ │ │ -
36 std::vector<double> timesteps_;
│ │ │ │ -
37 std::string name_,path_,extendpath_;
│ │ │ │ -
38 int rank_;
│ │ │ │ -
39 int size_;
│ │ │ │ -
40 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
48 const std::string& name,
│ │ │ │ -
49 const std::string& path,
│ │ │ │ -
50 const std::string& extendpath,
│ │ │ │ -
51 int rank,
│ │ │ │ -
52 int size)
│ │ │ │ -
53 : vtkWriter_(vtkWriter),
│ │ │ │ -
54 name_(name), path_(path),
│ │ │ │ -
55 extendpath_(extendpath),
│ │ │ │ -
56 rank_(rank),
│ │ │ │ -
57 size_(size)
│ │ │ │ -
58 {}
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ -
63 const std::shared_ptr< VTKWriter<GridView> >& vtkWriter() const
│ │ │ │ -
64 {
│ │ │ │ -
65 return vtkWriter_;
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
69 void addCellData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
│ │ │ │ -
70 {
│ │ │ │ -
71 vtkWriter_->addCellData(p);
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
79 template<class V >
│ │ │ │ -
│ │ │ │ -
80 void addCellData (const V &v, const std::string &name, int ncomps=1)
│ │ │ │ -
81 {
│ │ │ │ -
82 vtkWriter_->addCellData(v, name, ncomps);
│ │ │ │ -
83 }
│ │ │ │ +
21#include <dune/common/exceptions.hh>
│ │ │ │ +
22#include <dune/common/fvector.hh>
│ │ │ │ +
23
│ │ │ │ +
24#include <dune/geometry/type.hh>
│ │ │ │ +
25
│ │ │ │ + │ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29namespace Dune
│ │ │ │ +
30{
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
45 };
│ │ │ │
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
86 void addVertexData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
│ │ │ │ -
87 {
│ │ │ │ -
88 vtkWriter_->addVertexData(p);
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
96 template<class V >
│ │ │ │ -
│ │ │ │ -
97 void addVertexData (const V &v, const std::string &name, int ncomps=1)
│ │ │ │ -
98 {
│ │ │ │ -
99 vtkWriter_->addVertexData(v, name, ncomps);
│ │ │ │ -
100 }
│ │ │ │ +
46 };
│ │ │ │
│ │ │ │ -
101
│ │ │ │ +
47
│ │ │ │ +
48 namespace {
│ │ │ │ +
49
│ │ │ │ +
50 // arbitrary dimension, implementation is in specialization
│ │ │ │ +
51 template< int dimension, int dimWorld = dimension >
│ │ │ │ +
52 class GmshReaderQuadraticBoundarySegment
│ │ │ │ +
53 {
│ │ │ │ +
54 public:
│ │ │ │ +
55 // empty function since this class does not implement anything
│ │ │ │ +
56 static void registerFactory() {}
│ │ │ │ +
57 };
│ │ │ │ +
58
│ │ │ │ +
59 // quadratic boundary segments in 1d
│ │ │ │ +
60 /*
│ │ │ │ +
61 Note the points
│ │ │ │ +
62
│ │ │ │ +
63 (0) (alpha) (1)
│ │ │ │ +
64
│ │ │ │ +
65 are mapped to the points in global coordinates
│ │ │ │ +
66
│ │ │ │ +
67 p0 p2 p1
│ │ │ │ +
68
│ │ │ │ +
69 alpha is determined automatically from the given points.
│ │ │ │ +
70 */
│ │ │ │ +
71 template< int dimWorld >
│ │ │ │ +
72 struct GmshReaderQuadraticBoundarySegment< 2, dimWorld >
│ │ │ │ +
73 : public Dune::BoundarySegment< 2, dimWorld >
│ │ │ │ +
74 {
│ │ │ │ +
75 typedef GmshReaderQuadraticBoundarySegment< 2, dimWorld > ThisType;
│ │ │ │ +
76 typedef typename Dune::BoundarySegment< 2, dimWorld > :: ObjectStreamType ObjectStreamType;
│ │ │ │ +
77 typedef Dune::FieldVector< double, dimWorld > GlobalVector;
│ │ │ │ +
78
│ │ │ │ +
79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const GlobalVector &p1_, const GlobalVector &p2_)
│ │ │ │ +
80 : p0(p0_), p1(p1_), p2(p2_)
│ │ │ │ +
81 {
│ │ │ │ +
82 init();
│ │ │ │ +
83 }
│ │ │ │ +
84
│ │ │ │ +
85 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )
│ │ │ │ +
86 {
│ │ │ │ +
87 // key is read before by the factory
│ │ │ │ +
88 const int bytes = sizeof(double)*dimWorld;
│ │ │ │ +
89 in.read( (char *) &p0[ 0 ], bytes );
│ │ │ │ +
90 in.read( (char *) &p1[ 0 ], bytes );
│ │ │ │ +
91 in.read( (char *) &p2[ 0 ], bytes );
│ │ │ │ +
92 init();
│ │ │ │ +
93 }
│ │ │ │ +
94
│ │ │ │ +
95 static void registerFactory()
│ │ │ │ +
96 {
│ │ │ │ +
97 if( key() < 0 )
│ │ │ │ +
98 {
│ │ │ │ +
99 key() = Dune::BoundarySegment< 2, dimWorld >::template registerFactory< ThisType >();
│ │ │ │ +
100 }
│ │ │ │ +
101 }
│ │ │ │
102
│ │ │ │ -
│ │ │ │ -
108 void write (double time, VTK::OutputType type = VTK::ascii)
│ │ │ │ -
109 {
│ │ │ │ -
110 /* remember current time step */
│ │ │ │ -
111 unsigned int count = timesteps_.size();
│ │ │ │ -
112 timesteps_.push_back(time);
│ │ │ │ -
113
│ │ │ │ -
114 /* write VTK file */
│ │ │ │ -
115 if(size_==1)
│ │ │ │ -
116 vtkWriter_->write(concatPaths(path_,seqName(count)),type);
│ │ │ │ -
117 else
│ │ │ │ -
118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type);
│ │ │ │ -
119
│ │ │ │ -
120 /* write pvd file ... only on rank 0 */
│ │ │ │ -
121 if (rank_==0) {
│ │ │ │ -
122 std::ofstream pvdFile;
│ │ │ │ -
123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
124 std::ios_base::eofbit);
│ │ │ │ -
125 std::string pvdname = name_ + ".pvd";
│ │ │ │ -
126 pvdFile.open(pvdname.c_str());
│ │ │ │ -
127 pvdFile << "<?xml version=\"1.0\"?> \n"
│ │ │ │ -
128 << "<VTKFile type=\"Collection\" version=\"0.1\" byte_order=\"" << VTK::getEndiannessString() << "\"> \n"
│ │ │ │ -
129 << "<Collection> \n";
│ │ │ │ -
130 for (unsigned int i=0; i<=count; i++)
│ │ │ │ -
131 {
│ │ │ │ -
132 // filename
│ │ │ │ -
133 std::string piecepath;
│ │ │ │ -
134 std::string fullname;
│ │ │ │ -
135 if(size_==1) {
│ │ │ │ -
136 piecepath = path_;
│ │ │ │ -
137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath);
│ │ │ │ -
138 }
│ │ │ │ -
139 else {
│ │ │ │ -
140 piecepath = concatPaths(path_, extendpath_);
│ │ │ │ -
141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath, size_);
│ │ │ │ -
142 }
│ │ │ │ -
143 pvdFile << "<DataSet timestep=\"" << timesteps_[i]
│ │ │ │ -
144 << "\" group=\"\" part=\"0\" name=\"\" file=\""
│ │ │ │ -
145 << fullname << "\"/> \n";
│ │ │ │ -
146 }
│ │ │ │ -
147 pvdFile << "</Collection> \n"
│ │ │ │ -
148 << "</VTKFile> \n" << std::flush;
│ │ │ │ -
149 pvdFile.close();
│ │ │ │ -
150 }
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
│ │ │ │ -
156 void clear()
│ │ │ │ -
157 {
│ │ │ │ -
158 vtkWriter_->clear();
│ │ │ │ -
159 }
│ │ │ │ -
│ │ │ │ -
160
│ │ │ │ -
│ │ │ │ -
164 const std::vector<double>& getTimeSteps() const
│ │ │ │ -
165 {
│ │ │ │ -
166 return timesteps_;
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
│ │ │ │ -
174 void setTimeSteps(const std::vector<double>& timesteps)
│ │ │ │ -
175 {
│ │ │ │ -
176 timesteps_ = timesteps;
│ │ │ │ -
177 }
│ │ │ │ -
│ │ │ │ -
178
│ │ │ │ -
179 private:
│ │ │ │ -
180
│ │ │ │ -
181 // create sequence name
│ │ │ │ -
182 std::string seqName(unsigned int count) const
│ │ │ │ -
183 {
│ │ │ │ -
184 std::stringstream n;
│ │ │ │ -
185 n.fill('0');
│ │ │ │ -
186 n << name_ << "-" << std::setw(5) << count;
│ │ │ │ -
187 return n.str();
│ │ │ │ -
188 }
│ │ │ │ -
189 };
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
191} // end namespace Dune
│ │ │ │ -
192
│ │ │ │ -
193#endif
│ │ │ │ -
Provides file i/o for the visualization toolkit.
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ +
103 virtual GlobalVector operator() ( const Dune::FieldVector<double,1> &local ) const
│ │ │ │ +
104 {
│ │ │ │ +
105 GlobalVector y;
│ │ │ │ +
106 y = 0.0;
│ │ │ │ +
107 y.axpy((local[0]-alpha)*(local[0]-1.0)/alpha,p0);
│ │ │ │ +
108 y.axpy(local[0]*(local[0]-1.0)/(alpha*(alpha-1.0)),p1);
│ │ │ │ +
109 y.axpy(local[0]*(local[0]-alpha)/(1.0-alpha),p2);
│ │ │ │ +
110 return y;
│ │ │ │ +
111 }
│ │ │ │ +
112
│ │ │ │ +
113 void backup( ObjectStreamType& out ) const
│ │ │ │ +
114 {
│ │ │ │ +
115 // backup key to identify object
│ │ │ │ +
116 out.write( (const char *) &key(), sizeof( int ) );
│ │ │ │ +
117 // backup data
│ │ │ │ +
118 const int bytes = sizeof(double)*dimWorld;
│ │ │ │ +
119 out.write( (const char*) &p0[ 0 ], bytes );
│ │ │ │ +
120 out.write( (const char*) &p1[ 0 ], bytes );
│ │ │ │ +
121 out.write( (const char*) &p2[ 0 ], bytes );
│ │ │ │ +
122 }
│ │ │ │ +
123
│ │ │ │ +
124 protected:
│ │ │ │ +
125 void init()
│ │ │ │ +
126 {
│ │ │ │ +
127 GlobalVector d1 = p1;
│ │ │ │ +
128 d1 -= p0;
│ │ │ │ +
129 GlobalVector d2 = p2;
│ │ │ │ +
130 d2 -= p1;
│ │ │ │ +
131
│ │ │ │ +
132 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());
│ │ │ │ +
133 if (alpha<1E-6 || alpha>1-1E-6)
│ │ │ │ +
134 DUNE_THROW(Dune::IOError, "ration in quadratic boundary segment bad");
│ │ │ │ +
135 }
│ │ │ │ +
136
│ │ │ │ +
137 static int& key() {
│ │ │ │ +
138 static int k = -1;
│ │ │ │ +
139 return k;
│ │ │ │ +
140 }
│ │ │ │ +
141
│ │ │ │ +
142 private:
│ │ │ │ +
143 GlobalVector p0,p1,p2;
│ │ │ │ +
144 double alpha;
│ │ │ │ +
145 };
│ │ │ │ +
146
│ │ │ │ +
147
│ │ │ │ +
148 // quadratic boundary segments in 2d
│ │ │ │ +
149 /* numbering of points corresponding to gmsh:
│ │ │ │ +
150
│ │ │ │ +
151 2
│ │ │ │ +
152
│ │ │ │ +
153 5 4
│ │ │ │ +
154
│ │ │ │ +
155 0 3 1
│ │ │ │ +
156
│ │ │ │ +
157 Note: The vertices 3, 4, 5 are not necessarily at the edge midpoints but can
│ │ │ │ +
158 be placed with parameters alpha, beta , gamma at the following positions
│ │ │ │ +
159 in local coordinates:
│ │ │ │ +
160
│ │ │ │ +
161
│ │ │ │ +
162 2 = (0,1)
│ │ │ │ +
163
│ │ │ │ +
164 5 = (0,beta) 4 = (1-gamma/sqrt(2),gamma/sqrt(2))
│ │ │ │ +
165
│ │ │ │ +
166 0 = (0,0) 3 = (alpha,0) 1 = (1,0)
│ │ │ │ +
167
│ │ │ │ +
168 The parameters alpha, beta, gamma are determined from the given vertices in
│ │ │ │ +
169 global coordinates.
│ │ │ │ +
170 */
│ │ │ │ +
171 template<>
│ │ │ │ +
172 class GmshReaderQuadraticBoundarySegment< 3, 3 >
│ │ │ │ +
173 : public Dune::BoundarySegment< 3 >
│ │ │ │ +
174 {
│ │ │ │ +
175 typedef GmshReaderQuadraticBoundarySegment< 3, 3 > ThisType;
│ │ │ │ +
176 typedef typename Dune::BoundarySegment< 3 > :: ObjectStreamType ObjectStreamType;
│ │ │ │ +
177 public:
│ │ │ │ +
178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector<double,3> p0_, Dune::FieldVector<double,3> p1_,
│ │ │ │ +
179 Dune::FieldVector<double,3> p2_, Dune::FieldVector<double,3> p3_,
│ │ │ │ +
180 Dune::FieldVector<double,3> p4_, Dune::FieldVector<double,3> p5_)
│ │ │ │ +
181 : p0(p0_), p1(p1_), p2(p2_), p3(p3_), p4(p4_), p5(p5_)
│ │ │ │ +
182 {
│ │ │ │ +
183 init();
│ │ │ │ +
184 }
│ │ │ │ +
185
│ │ │ │ +
186 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )
│ │ │ │ +
187 {
│ │ │ │ +
188 const int bytes = sizeof(double)*3;
│ │ │ │ +
189 in.read( (char *) &p0[ 0 ], bytes );
│ │ │ │ +
190 in.read( (char *) &p1[ 0 ], bytes );
│ │ │ │ +
191 in.read( (char *) &p2[ 0 ], bytes );
│ │ │ │ +
192 in.read( (char *) &p3[ 0 ], bytes );
│ │ │ │ +
193 in.read( (char *) &p4[ 0 ], bytes );
│ │ │ │ +
194 in.read( (char *) &p5[ 0 ], bytes );
│ │ │ │ +
195 init();
│ │ │ │ +
196 }
│ │ │ │ +
197
│ │ │ │ +
198 static void registerFactory()
│ │ │ │ +
199 {
│ │ │ │ +
200 if( key() < 0 )
│ │ │ │ +
201 {
│ │ │ │ +
202 key() = Dune::BoundarySegment< 3 >::template registerFactory< ThisType >();
│ │ │ │ +
203 }
│ │ │ │ +
204 }
│ │ │ │ +
205
│ │ │ │ +
206 virtual Dune::FieldVector<double,3> operator() (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
207 {
│ │ │ │ +
208 Dune::FieldVector<double,3> y;
│ │ │ │ +
209 y = 0.0;
│ │ │ │ +
210 y.axpy(phi0(local),p0);
│ │ │ │ +
211 y.axpy(phi1(local),p1);
│ │ │ │ +
212 y.axpy(phi2(local),p2);
│ │ │ │ +
213 y.axpy(phi3(local),p3);
│ │ │ │ +
214 y.axpy(phi4(local),p4);
│ │ │ │ +
215 y.axpy(phi5(local),p5);
│ │ │ │ +
216 return y;
│ │ │ │ +
217 }
│ │ │ │ +
218
│ │ │ │ +
219 void backup( ObjectStreamType& out ) const
│ │ │ │ +
220 {
│ │ │ │ +
221 // backup key to identify object in factory
│ │ │ │ +
222 out.write( (const char*) &key(), sizeof( int ) );
│ │ │ │ +
223 // backup data
│ │ │ │ +
224 const int bytes = sizeof(double)*3;
│ │ │ │ +
225 out.write( (const char*) &p0[ 0 ], bytes );
│ │ │ │ +
226 out.write( (const char*) &p1[ 0 ], bytes );
│ │ │ │ +
227 out.write( (const char*) &p2[ 0 ], bytes );
│ │ │ │ +
228 out.write( (const char*) &p3[ 0 ], bytes );
│ │ │ │ +
229 out.write( (const char*) &p4[ 0 ], bytes );
│ │ │ │ +
230 out.write( (const char*) &p5[ 0 ], bytes );
│ │ │ │ +
231 }
│ │ │ │ +
232
│ │ │ │ +
233 protected:
│ │ │ │ +
234 void init()
│ │ │ │ +
235 {
│ │ │ │ +
236 using std::sqrt;
│ │ │ │ +
237 sqrt2 = sqrt(2.0);
│ │ │ │ +
238 Dune::FieldVector<double,3> d1,d2;
│ │ │ │ +
239
│ │ │ │ +
240 d1 = p3; d1 -= p0;
│ │ │ │ +
241 d2 = p1; d2 -= p3;
│ │ │ │ +
242 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());
│ │ │ │ +
243 if (alpha<1E-6 || alpha>1-1E-6)
│ │ │ │ +
244 DUNE_THROW(Dune::IOError, "alpha in quadratic boundary segment bad");
│ │ │ │ +
245
│ │ │ │ +
246 d1 = p5; d1 -= p0;
│ │ │ │ +
247 d2 = p2; d2 -= p5;
│ │ │ │ +
248 beta=d1.two_norm()/(d1.two_norm()+d2.two_norm());
│ │ │ │ +
249 if (beta<1E-6 || beta>1-1E-6)
│ │ │ │ +
250 DUNE_THROW(Dune::IOError, "beta in quadratic boundary segment bad");
│ │ │ │ +
251
│ │ │ │ +
252 d1 = p4; d1 -= p1;
│ │ │ │ +
253 d2 = p2; d2 -= p4;
│ │ │ │ +
254 gamma=sqrt2*(d1.two_norm()/(d1.two_norm()+d2.two_norm()));
│ │ │ │ +
255 if (gamma<1E-6 || gamma>1-1E-6)
│ │ │ │ +
256 DUNE_THROW(Dune::IOError, "gamma in quadratic boundary segment bad");
│ │ │ │ +
257 }
│ │ │ │ +
258
│ │ │ │ +
259 static int& key() {
│ │ │ │ +
260 static int k = -1;
│ │ │ │ +
261 return k;
│ │ │ │ +
262 }
│ │ │ │ +
263
│ │ │ │ +
264 private:
│ │ │ │ +
265 // The six Lagrange basis function on the reference element
│ │ │ │ +
266 // for the points given above
│ │ │ │ +
267
│ │ │ │ +
268 double phi0 (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
269 {
│ │ │ │ +
270 return (alpha*beta-beta*local[0]-alpha*local[1])*(1-local[0]-local[1])/(alpha*beta);
│ │ │ │ +
271 }
│ │ │ │ +
272 double phi3 (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
273 {
│ │ │ │ +
274 return local[0]*(1-local[0]-local[1])/(alpha*(1-alpha));
│ │ │ │ +
275 }
│ │ │ │ +
276 double phi1 (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
277 {
│ │ │ │ +
278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]-alpha*gamma)/(gamma*(1-alpha));
│ │ │ │ +
279 }
│ │ │ │ +
280 double phi5 (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
281 {
│ │ │ │ +
282 return local[1]*(1-local[0]-local[1])/(beta*(1-beta));
│ │ │ │ +
283 }
│ │ │ │ +
284 double phi4 (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
285 {
│ │ │ │ +
286 return local[0]*local[1]/((1-gamma/sqrt2)*gamma/sqrt2);
│ │ │ │ +
287 }
│ │ │ │ +
288 double phi2 (const Dune::FieldVector<double,2>& local) const
│ │ │ │ +
289 {
│ │ │ │ +
290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local[1]*(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1));
│ │ │ │ +
291 }
│ │ │ │ +
292
│ │ │ │ +
293 Dune::FieldVector<double,3> p0,p1,p2,p3,p4,p5;
│ │ │ │ +
294 double alpha,beta,gamma,sqrt2;
│ │ │ │ +
295 };
│ │ │ │ +
296
│ │ │ │ +
297 } // end empty namespace
│ │ │ │ +
298
│ │ │ │ +
300 template<typename GridType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
302 {
│ │ │ │ +
303 protected:
│ │ │ │ +
304 // private data
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
311 // read buffer
│ │ │ │ +
312 char buf[512];
│ │ │ │ +
313 std::string fileName;
│ │ │ │ +
314 // exported data
│ │ │ │ + │ │ │ │ + │ │ │ │ +
317
│ │ │ │ +
318 // static data
│ │ │ │ +
319 static const int dim = GridType::dimension;
│ │ │ │ +
320 static const int dimWorld = GridType::dimensionworld;
│ │ │ │ +
321 static_assert( (dimWorld <= 3), "GmshReader requires dimWorld <= 3." );
│ │ │ │ +
322
│ │ │ │ +
323 // typedefs
│ │ │ │ +
324 typedef FieldVector< double, dimWorld > GlobalVector;
│ │ │ │ +
325
│ │ │ │ +
326 // don't use something like
│ │ │ │ +
327 // readfile(file, 1, "%s\n", buf);
│ │ │ │ +
328 // to skip the rest of of the line -- that will only skip the next
│ │ │ │ +
329 // whitespace-separated word! Use skipline() instead.
│ │ │ │ +
│ │ │ │ +
330 void readfile(FILE * file, int cnt, const char * format,
│ │ │ │ +
331 void* t1, void* t2 = 0, void* t3 = 0, void* t4 = 0,
│ │ │ │ +
332 void* t5 = 0, void* t6 = 0, void* t7 = 0, void* t8 = 0,
│ │ │ │ +
333 void* t9 = 0, void* t10 = 0)
│ │ │ │ +
334 {
│ │ │ │ +
335 off_t pos = ftello(file);
│ │ │ │ +
336 int c = fscanf(file, format, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
│ │ │ │ +
337 if (c != cnt)
│ │ │ │ +
338 DUNE_THROW(Dune::IOError, "Error parsing " << fileName << " "
│ │ │ │ +
339 "file pos " << pos
│ │ │ │ +
340 << ": Expected '" << format << "', only read " << c << " entries instead of " << cnt << ".");
│ │ │ │ +
341 }
│ │ │ │ +
│ │ │ │ +
342
│ │ │ │ +
343 // skip over the rest of the line, including the terminating newline
│ │ │ │ +
│ │ │ │ +
344 void skipline(FILE * file)
│ │ │ │ +
345 {
│ │ │ │ +
346 int c;
│ │ │ │ +
347 do {
│ │ │ │ +
348 c = std::fgetc(file);
│ │ │ │ +
349 } while(c != '\n' && c != EOF);
│ │ │ │ +
350 }
│ │ │ │ +
│ │ │ │ +
351
│ │ │ │ +
352 public:
│ │ │ │ +
353
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
355 factory(_factory), verbose(v), insert_boundary_segments(i) {}
│ │ │ │ +
│ │ │ │ +
356
│ │ │ │ +
│ │ │ │ +
357 std::vector<int> & boundaryIdMap()
│ │ │ │ +
358 {
│ │ │ │ + │ │ │ │ +
360 }
│ │ │ │ +
│ │ │ │ +
361
│ │ │ │ +
│ │ │ │ +
362 std::vector<int> & elementIndexMap()
│ │ │ │ +
363 {
│ │ │ │ + │ │ │ │ +
365 }
│ │ │ │ +
│ │ │ │ +
366
│ │ │ │ +
│ │ │ │ +
367 void read (const std::string& f)
│ │ │ │ +
368 {
│ │ │ │ +
369 if (verbose) std::cout << "Reading " << dim << "d Gmsh grid..." << std::endl;
│ │ │ │ +
370
│ │ │ │ +
371 // open file name, we use C I/O
│ │ │ │ +
372 fileName = f;
│ │ │ │ +
373 FILE* file = fopen(fileName.c_str(),"rb");
│ │ │ │ +
374 if (file==0)
│ │ │ │ +
375 DUNE_THROW(Dune::IOError, "Could not open " << fileName);
│ │ │ │ +
376
│ │ │ │ +
377 //=========================================
│ │ │ │ +
378 // Header: Read vertices into vector
│ │ │ │ +
379 // Check vertices that are needed
│ │ │ │ +
380 //=========================================
│ │ │ │ +
381
│ │ │ │ + │ │ │ │ + │ │ │ │ +
384 element_count = 0;
│ │ │ │ +
385
│ │ │ │ +
386 // process header
│ │ │ │ +
387 double version_number;
│ │ │ │ +
388 int file_type, data_size;
│ │ │ │ +
389
│ │ │ │ +
390 readfile(file,1,"%s\n",buf);
│ │ │ │ +
391 if (strcmp(buf,"$MeshFormat")!=0)
│ │ │ │ +
392 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line");
│ │ │ │ +
393 readfile(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size);
│ │ │ │ +
394 // 2.2 is not representable as float and leads to problems on i386
│ │ │ │ +
395 // Hence we use >= 2.00001.
│ │ │ │ +
396 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not representable as float and leads to problems on i386
│ │ │ │ +
397 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files");
│ │ │ │ +
398 if (verbose) std::cout << "version " << version_number << " Gmsh file detected" << std::endl;
│ │ │ │ +
399 readfile(file,1,"%s\n",buf);
│ │ │ │ +
400 if (strcmp(buf,"$EndMeshFormat")!=0)
│ │ │ │ +
401 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");
│ │ │ │ +
402
│ │ │ │ +
403 // node section
│ │ │ │ +
404 int number_of_nodes;
│ │ │ │ +
405
│ │ │ │ +
406 readfile(file,1,"%s\n",buf);
│ │ │ │ +
407 if (strcmp(buf,"$Nodes")!=0)
│ │ │ │ +
408 DUNE_THROW(Dune::IOError, "expected $Nodes");
│ │ │ │ +
409 readfile(file,1,"%d\n",&number_of_nodes);
│ │ │ │ +
410 if (verbose) std::cout << "file contains " << number_of_nodes << " nodes" << std::endl;
│ │ │ │ +
411
│ │ │ │ +
412 // read nodes
│ │ │ │ +
413 // The '+1' is due to the fact that gmsh numbers node starting from 1 rather than from 0
│ │ │ │ +
414 std::vector< GlobalVector > nodes( number_of_nodes+1 );
│ │ │ │ +
415 {
│ │ │ │ +
416 int id;
│ │ │ │ +
417 double x[ 3 ];
│ │ │ │ +
418 for( int i = 1; i <= number_of_nodes; ++i )
│ │ │ │ +
419 {
│ │ │ │ +
420 readfile(file,4, "%d %lg %lg %lg\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );
│ │ │ │ +
421
│ │ │ │ +
422 if (id > number_of_nodes) {
│ │ │ │ +
423 DUNE_THROW(Dune::IOError,
│ │ │ │ +
424 "Only dense sequences of node indices are currently supported (node index "
│ │ │ │ +
425 << id << " is invalid).");
│ │ │ │ +
426 }
│ │ │ │ +
427
│ │ │ │ +
428 // just store node position
│ │ │ │ +
429 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ +
430 nodes[ id ][ j ] = x[ j ];
│ │ │ │ +
431 }
│ │ │ │ +
432 readfile(file,1,"%s\n",buf);
│ │ │ │ +
433 if (strcmp(buf,"$EndNodes")!=0)
│ │ │ │ +
434 DUNE_THROW(Dune::IOError, "expected $EndNodes");
│ │ │ │ +
435 }
│ │ │ │ +
436
│ │ │ │ +
437 // element section
│ │ │ │ +
438 readfile(file,1,"%s\n",buf);
│ │ │ │ +
439 if (strcmp(buf,"$Elements")!=0)
│ │ │ │ +
440 DUNE_THROW(Dune::IOError, "expected $Elements");
│ │ │ │ +
441 int number_of_elements;
│ │ │ │ +
442 readfile(file,1,"%d\n",&number_of_elements);
│ │ │ │ +
443 if (verbose) std::cout << "file contains " << number_of_elements << " elements" << std::endl;
│ │ │ │ +
444
│ │ │ │ +
445 //=========================================
│ │ │ │ +
446 // Pass 1: Select and insert those vertices in the file that
│ │ │ │ +
447 // actually occur as corners of an element.
│ │ │ │ +
448 //=========================================
│ │ │ │ +
449
│ │ │ │ +
450 off_t section_element_offset = ftello(file);
│ │ │ │ +
451 std::map<int,unsigned int> renumber;
│ │ │ │ +
452 for (int i=1; i<=number_of_elements; i++)
│ │ │ │ +
453 {
│ │ │ │ +
454 int id, elm_type, number_of_tags;
│ │ │ │ +
455 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
│ │ │ │ +
456 for (int k=1; k<=number_of_tags; k++)
│ │ │ │ +
457 {
│ │ │ │ +
458 int blub;
│ │ │ │ +
459 readfile(file,1,"%d ",&blub);
│ │ │ │ +
460 // k == 1: physical entity (not used here)
│ │ │ │ +
461 // k == 2: elementary entity (not used here either)
│ │ │ │ +
462 // if version_number < 2.2:
│ │ │ │ +
463 // k == 3: mesh partition 0
│ │ │ │ +
464 // else
│ │ │ │ +
465 // k == 3: number of mesh partitions
│ │ │ │ +
466 // k => 4: mesh partition k-4
│ │ │ │ +
467 }
│ │ │ │ +
468 pass1HandleElement(file, elm_type, renumber, nodes);
│ │ │ │ +
469 }
│ │ │ │ +
470 if (verbose) std::cout << "number of real vertices = " << number_of_real_vertices << std::endl;
│ │ │ │ +
471 if (verbose) std::cout << "number of boundary elements = " << boundary_element_count << std::endl;
│ │ │ │ +
472 if (verbose) std::cout << "number of elements = " << element_count << std::endl;
│ │ │ │ +
473 readfile(file,1,"%s\n",buf);
│ │ │ │ +
474 if (strcmp(buf,"$EndElements")!=0)
│ │ │ │ +
475 DUNE_THROW(Dune::IOError, "expected $EndElements");
│ │ │ │ + │ │ │ │ + │ │ │ │ +
478
│ │ │ │ +
479 //==============================================
│ │ │ │ +
480 // Pass 2: Insert boundary segments and elements
│ │ │ │ +
481 //==============================================
│ │ │ │ +
482
│ │ │ │ +
483 fseeko(file, section_element_offset, SEEK_SET);
│ │ │ │ + │ │ │ │ +
485 element_count = 0;
│ │ │ │ +
486 for (int i=1; i<=number_of_elements; i++)
│ │ │ │ +
487 {
│ │ │ │ +
488 int id, elm_type, number_of_tags;
│ │ │ │ +
489 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
│ │ │ │ +
490 int physical_entity = -1;
│ │ │ │ +
491
│ │ │ │ +
492 for (int k=1; k<=number_of_tags; k++)
│ │ │ │ +
493 {
│ │ │ │ +
494 int blub;
│ │ │ │ +
495 readfile(file,1,"%d ",&blub);
│ │ │ │ +
496 if (k==1) physical_entity = blub;
│ │ │ │ +
497 }
│ │ │ │ +
498 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);
│ │ │ │ +
499 }
│ │ │ │ +
500 readfile(file,1,"%s\n",buf);
│ │ │ │ +
501 if (strcmp(buf,"$EndElements")!=0)
│ │ │ │ +
502 DUNE_THROW(Dune::IOError, "expected $EndElements");
│ │ │ │ +
503
│ │ │ │ +
504 fclose(file);
│ │ │ │ +
505 }
│ │ │ │ +
│ │ │ │ +
506
│ │ │ │ +
│ │ │ │ +
512 void pass1HandleElement(FILE* file, const int elm_type,
│ │ │ │ +
513 std::map<int,unsigned int> & renumber,
│ │ │ │ +
514 const std::vector< GlobalVector > & nodes)
│ │ │ │ +
515 {
│ │ │ │ +
516 // some data about gmsh elements
│ │ │ │ +
517 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
│ │ │ │ +
518 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
│ │ │ │ +
519 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
│ │ │ │ +
520
│ │ │ │ +
521 // test whether we support the element type
│ │ │ │ +
522 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
│ │ │ │ +
523 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
│ │ │ │ +
524 {
│ │ │ │ +
525 skipline(file); // skip rest of line if element is unknown
│ │ │ │ +
526 return;
│ │ │ │ +
527 }
│ │ │ │ +
528
│ │ │ │ +
529 // The format string for parsing is n times '%d' in a row
│ │ │ │ +
530 std::string formatString = "%d";
│ │ │ │ +
531 for (int i=1; i<nDofs[elm_type]; i++)
│ │ │ │ +
532 formatString += " %d";
│ │ │ │ +
533 formatString += "\n";
│ │ │ │ +
534
│ │ │ │ +
535 // '10' is the largest number of dofs we may encounter in a .msh file
│ │ │ │ +
536 std::vector<int> elementDofs(10);
│ │ │ │ +
537
│ │ │ │ +
538 readfile(file,nDofs[elm_type], formatString.c_str(),
│ │ │ │ +
539 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
│ │ │ │ +
540 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
│ │ │ │ +
541 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
│ │ │ │ +
542 &(elementDofs[9]));
│ │ │ │ +
543
│ │ │ │ +
544 // insert each vertex if it hasn't been inserted already
│ │ │ │ +
545 for (int i=0; i<nVertices[elm_type]; i++)
│ │ │ │ +
546 if (renumber.find(elementDofs[i])==renumber.end())
│ │ │ │ +
547 {
│ │ │ │ +
548 renumber[elementDofs[i]] = number_of_real_vertices++;
│ │ │ │ +
549 factory.insertVertex(nodes[elementDofs[i]]);
│ │ │ │ +
550 }
│ │ │ │ +
551
│ │ │ │ +
552 // count elements and boundary elements
│ │ │ │ +
553 if (elementDim[elm_type] == dim)
│ │ │ │ + │ │ │ │ +
555 else
│ │ │ │ + │ │ │ │ +
557
│ │ │ │ +
558 }
│ │ │ │ +
│ │ │ │ +
559
│ │ │ │ +
560
│ │ │ │ +
561
│ │ │ │ +
562 // generic-case: This is not supposed to be used at runtime.
│ │ │ │ +
563 template <class E, class V, class V2>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
565 const V&,
│ │ │ │ +
566 const E&,
│ │ │ │ +
567 const V2&
│ │ │ │ +
568 )
│ │ │ │ +
569 {
│ │ │ │ +
570 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non-3D Grid");
│ │ │ │ +
571 }
│ │ │ │ +
│ │ │ │ +
572
│ │ │ │ +
573 // 3d-case:
│ │ │ │ +
574 template <class E, class V>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
576 const std::vector<FieldVector<double, 3> >& nodes,
│ │ │ │ +
577 const E& elementDofs,
│ │ │ │ +
578 const V& vertices
│ │ │ │ +
579 )
│ │ │ │ +
580 {
│ │ │ │ +
581 std::array<FieldVector<double,dimWorld>, 6> v;
│ │ │ │ +
582 for (int i=0; i<6; i++)
│ │ │ │ +
583 for (int j=0; j<dimWorld; j++)
│ │ │ │ +
584 v[i][j] = nodes[elementDofs[i]][j];
│ │ │ │ +
585
│ │ │ │ +
586 BoundarySegment<dim,dimWorld>* newBoundarySegment
│ │ │ │ +
587 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 3, 3 >( v[0], v[1], v[2],
│ │ │ │ +
588 v[3], v[4], v[5] );
│ │ │ │ +
589
│ │ │ │ +
590 factory.insertBoundarySegment( vertices,
│ │ │ │ +
591 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment) );
│ │ │ │ +
592 }
│ │ │ │ +
│ │ │ │ +
593
│ │ │ │ +
594
│ │ │ │ +
595
│ │ │ │ +
│ │ │ │ +
600 virtual void pass2HandleElement(FILE* file, const int elm_type,
│ │ │ │ +
601 std::map<int,unsigned int> & renumber,
│ │ │ │ +
602 const std::vector< GlobalVector > & nodes,
│ │ │ │ +
603 const int physical_entity)
│ │ │ │ +
604 {
│ │ │ │ +
605 // some data about gmsh elements
│ │ │ │ +
606 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
│ │ │ │ +
607 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
│ │ │ │ +
608 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
│ │ │ │ +
609
│ │ │ │ +
610 // test whether we support the element type
│ │ │ │ +
611 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
│ │ │ │ +
612 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
│ │ │ │ +
613 {
│ │ │ │ +
614 skipline(file); // skip rest of line if element is unknown
│ │ │ │ +
615 return;
│ │ │ │ +
616 }
│ │ │ │ +
617
│ │ │ │ +
618 // The format string for parsing is n times '%d' in a row
│ │ │ │ +
619 std::string formatString = "%d";
│ │ │ │ +
620 for (int i=1; i<nDofs[elm_type]; i++)
│ │ │ │ +
621 formatString += " %d";
│ │ │ │ +
622 formatString += "\n";
│ │ │ │ +
623
│ │ │ │ +
624 // '10' is the largest number of dofs we may encounter in a .msh file
│ │ │ │ +
625 std::vector<int> elementDofs(10);
│ │ │ │ +
626
│ │ │ │ +
627 readfile(file,nDofs[elm_type], formatString.c_str(),
│ │ │ │ +
628 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
│ │ │ │ +
629 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
│ │ │ │ +
630 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
│ │ │ │ +
631 &(elementDofs[9]));
│ │ │ │ +
632
│ │ │ │ +
633 // correct differences between gmsh and Dune in the local vertex numbering
│ │ │ │ +
634 switch (elm_type)
│ │ │ │ +
635 {
│ │ │ │ +
636 case 3 : // 4-node quadrilateral
│ │ │ │ +
637 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ +
638 break;
│ │ │ │ +
639 case 5 : // 8-node hexahedron
│ │ │ │ +
640 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ +
641 std::swap(elementDofs[6],elementDofs[7]);
│ │ │ │ +
642 break;
│ │ │ │ +
643 case 7 : // 5-node pyramid
│ │ │ │ +
644 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ +
645 break;
│ │ │ │ +
646 }
│ │ │ │ +
647
│ │ │ │ +
648 // renumber corners to account for the explicitly given vertex
│ │ │ │ +
649 // numbering in the file
│ │ │ │ +
650 std::vector<unsigned int> vertices(nVertices[elm_type]);
│ │ │ │ +
651
│ │ │ │ +
652 for (int i=0; i<nVertices[elm_type]; i++)
│ │ │ │ +
653 vertices[i] = renumber[elementDofs[i]];
│ │ │ │ +
654
│ │ │ │ +
655 // If it is an element, insert it as such
│ │ │ │ +
656 if (elementDim[elm_type] == dim) {
│ │ │ │ +
657
│ │ │ │ +
658 switch (elm_type)
│ │ │ │ +
659 {
│ │ │ │ +
660 case 1 : // 2-node line
│ │ │ │ +
661 factory.insertElement(Dune::GeometryTypes::line,vertices);
│ │ │ │ +
662 break;
│ │ │ │ +
663 case 2 : // 3-node triangle
│ │ │ │ +
664 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
│ │ │ │ +
665 break;
│ │ │ │ +
666 case 3 : // 4-node quadrilateral
│ │ │ │ +
667 factory.insertElement(Dune::GeometryTypes::quadrilateral,vertices);
│ │ │ │ +
668 break;
│ │ │ │ +
669 case 4 : // 4-node tetrahedron
│ │ │ │ +
670 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
│ │ │ │ +
671 break;
│ │ │ │ +
672 case 5 : // 8-node hexahedron
│ │ │ │ +
673 factory.insertElement(Dune::GeometryTypes::hexahedron,vertices);
│ │ │ │ +
674 break;
│ │ │ │ +
675 case 6 : // 6-node prism
│ │ │ │ +
676 factory.insertElement(Dune::GeometryTypes::prism,vertices);
│ │ │ │ +
677 break;
│ │ │ │ +
678 case 7 : // 5-node pyramid
│ │ │ │ +
679 factory.insertElement(Dune::GeometryTypes::pyramid,vertices);
│ │ │ │ +
680 break;
│ │ │ │ +
681 case 9 : // 6-node triangle
│ │ │ │ +
682 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
│ │ │ │ +
683 break;
│ │ │ │ +
684 case 11 : // 10-node tetrahedron
│ │ │ │ +
685 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
│ │ │ │ +
686 break;
│ │ │ │ +
687 }
│ │ │ │ +
688
│ │ │ │ +
689 } else {
│ │ │ │ +
690 // it must be a boundary segment then
│ │ │ │ + │ │ │ │ +
692
│ │ │ │ +
693 switch (elm_type)
│ │ │ │ +
694 {
│ │ │ │ +
695 case 1 : // 2-node line
│ │ │ │ +
696 factory.insertBoundarySegment(vertices);
│ │ │ │ +
697 break;
│ │ │ │ +
698
│ │ │ │ +
699 case 2 : // 3-node triangle
│ │ │ │ +
700 factory.insertBoundarySegment(vertices);
│ │ │ │ +
701 break;
│ │ │ │ +
702
│ │ │ │ +
703 case 3 : // 4-node quadrilateral
│ │ │ │ +
704 factory.insertBoundarySegment(vertices);
│ │ │ │ +
705 break;
│ │ │ │ +
706
│ │ │ │ +
707 case 15 : // 1-node point
│ │ │ │ +
708 factory.insertBoundarySegment(vertices);
│ │ │ │ +
709 break;
│ │ │ │ +
710
│ │ │ │ +
711 case 8 : { // 3-node line
│ │ │ │ +
712 std::array<FieldVector<double,dimWorld>, 3> v;
│ │ │ │ +
713 for (int i=0; i<dimWorld; i++) {
│ │ │ │ +
714 v[0][i] = nodes[elementDofs[0]][i];
│ │ │ │ +
715 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended!
│ │ │ │ +
716 v[2][i] = nodes[elementDofs[1]][i];
│ │ │ │ +
717 }
│ │ │ │ +
718 BoundarySegment<dim,dimWorld>* newBoundarySegment
│ │ │ │ +
719 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 2, dimWorld >(v[0], v[1], v[2]);
│ │ │ │ +
720 factory.insertBoundarySegment(vertices,
│ │ │ │ +
721 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment));
│ │ │ │ +
722 break;
│ │ │ │ +
723 }
│ │ │ │ +
724 case 9 : { // 6-node triangle
│ │ │ │ +
725 boundarysegment_insert(nodes, elementDofs, vertices);
│ │ │ │ +
726 break;
│ │ │ │ +
727 }
│ │ │ │ +
728 default: {
│ │ │ │ +
729 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " << elm_type << " for boundary segments");
│ │ │ │ +
730 break;
│ │ │ │ +
731 }
│ │ │ │ +
732
│ │ │ │ +
733 }
│ │ │ │ +
734
│ │ │ │ +
735 }
│ │ │ │ +
736 }
│ │ │ │ +
737
│ │ │ │ +
738 // count elements and boundary elements
│ │ │ │ +
739 if (elementDim[elm_type] == dim) {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
742 } else {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
745 }
│ │ │ │ +
746
│ │ │ │ +
747 }
│ │ │ │ +
│ │ │ │ +
748
│ │ │ │ +
749 };
│ │ │ │ +
│ │ │ │ +
750
│ │ │ │ +
│ │ │ │ +
751 namespace Gmsh {
│ │ │ │ +
│ │ │ │ +
757 enum class ReaderOptions
│ │ │ │ +
758 {
│ │ │ │ +
759 verbose = 1,
│ │ │ │ + │ │ │ │ +
761 readElementData = 4,
│ │ │ │ + │ │ │ │ +
763 };
│ │ │ │ +
│ │ │ │ +
764
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
767 {
│ │ │ │ +
768 return static_cast<ReaderOptions>(
│ │ │ │ +
769 static_cast<int>(a) | static_cast<int>(b)
│ │ │ │ +
770 );
│ │ │ │ +
771 }
│ │ │ │ +
│ │ │ │ +
772
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
775 {
│ │ │ │ +
776 return static_cast<int>(a) & static_cast<int>(b);
│ │ │ │ +
777 }
│ │ │ │ +
│ │ │ │ +
778
│ │ │ │ +
779 } // end namespace Gmsh
│ │ │ │ +
│ │ │ │ +
780
│ │ │ │ +
805 template<typename GridType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
807 {
│ │ │ │ +
809
│ │ │ │ +
828 static void doRead(Dune::GridFactory<GridType> &factory,
│ │ │ │ +
829 const std::string &fileName,
│ │ │ │ +
830 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ +
831 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ +
832 bool verbose, bool insertBoundarySegments)
│ │ │ │ +
833 {
│ │ │ │ +
834 // register boundary segment to boundary segment factory for possible load balancing
│ │ │ │ +
835 // this needs to be done on all cores since the type might not be known otherwise
│ │ │ │ +
836 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld >::registerFactory();
│ │ │ │ +
837
│ │ │ │ +
838#ifndef NDEBUG
│ │ │ │ +
839 // check that this method is called on all cores
│ │ │ │ +
840 factory.comm().barrier();
│ │ │ │ +
841#endif
│ │ │ │ +
842
│ │ │ │ +
843 // create parse object and read grid on process 0
│ │ │ │ +
844 if (factory.comm().rank() == 0)
│ │ │ │ +
845 {
│ │ │ │ +
846 GmshReaderParser<Grid> parser(factory,verbose,insertBoundarySegments);
│ │ │ │ +
847 parser.read(fileName);
│ │ │ │ +
848
│ │ │ │ +
849 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());
│ │ │ │ +
850 elementToPhysicalEntity = std::move(parser.elementIndexMap());
│ │ │ │ +
851 }
│ │ │ │ +
852 else
│ │ │ │ +
853 {
│ │ │ │ +
854 boundarySegmentToPhysicalEntity = {};
│ │ │ │ +
855 elementToPhysicalEntity = {};
│ │ │ │ +
856 }
│ │ │ │ +
857 }
│ │ │ │ +
858
│ │ │ │ +
860
│ │ │ │ +
879 template<class T>
│ │ │ │ +
880 static T &discarded(T &&value) { return value; }
│ │ │ │ +
881
│ │ │ │ +
882 struct DataArg {
│ │ │ │ +
883 std::vector<int> *data_ = nullptr;
│ │ │ │ +
884 DataArg(std::vector<int> &data) : data_(&data) {}
│ │ │ │ +
885 DataArg(const decltype(std::ignore)&) {}
│ │ │ │ +
886 DataArg() = default;
│ │ │ │ +
887 };
│ │ │ │ +
888
│ │ │ │ +
889 struct DataFlagArg : DataArg {
│ │ │ │ +
890 bool flag_ = false;
│ │ │ │ +
891 using DataArg::DataArg;
│ │ │ │ +
892 DataFlagArg(bool flag) : flag_(flag) {}
│ │ │ │ +
893 };
│ │ │ │ +
894
│ │ │ │ +
895 public:
│ │ │ │ +
896 typedef GridType Grid;
│ │ │ │ +
897
│ │ │ │ +
│ │ │ │ +
904 static std::unique_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ +
905 {
│ │ │ │ +
906 // make a grid factory
│ │ │ │ + │ │ │ │ +
908
│ │ │ │ +
909 read(factory, fileName, verbose, insertBoundarySegments);
│ │ │ │ +
910
│ │ │ │ +
911 return factory.createGrid();
│ │ │ │ +
912 }
│ │ │ │ +
│ │ │ │ +
913
│ │ │ │ +
│ │ │ │ +
933 static std::unique_ptr<Grid> read (const std::string& fileName,
│ │ │ │ +
934 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ +
935 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ +
936 bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ +
937 {
│ │ │ │ +
938 // make a grid factory
│ │ │ │ + │ │ │ │ +
940
│ │ │ │ +
941 doRead(
│ │ │ │ +
942 factory, fileName, boundarySegmentToPhysicalEntity,
│ │ │ │ +
943 elementToPhysicalEntity, verbose, insertBoundarySegments
│ │ │ │ +
944 );
│ │ │ │ +
945
│ │ │ │ +
946 return factory.createGrid();
│ │ │ │ +
947 }
│ │ │ │ +
│ │ │ │ +
948
│ │ │ │ +
│ │ │ │ +
950 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName,
│ │ │ │ +
951 bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ +
952 {
│ │ │ │ +
953 doRead(
│ │ │ │ +
954 factory, fileName, discarded(std::vector<int>{}),
│ │ │ │ +
955 discarded(std::vector<int>{}), verbose, insertBoundarySegments
│ │ │ │ +
956 );
│ │ │ │ +
957 }
│ │ │ │ +
│ │ │ │ +
958
│ │ │ │ +
960
│ │ │ │ +
│ │ │ │ +
983 static void read (Dune::GridFactory<Grid> &factory,
│ │ │ │ +
984 const std::string &fileName,
│ │ │ │ +
985 DataFlagArg boundarySegmentData,
│ │ │ │ +
986 DataArg elementData,
│ │ │ │ +
987 bool verbose=true)
│ │ │ │ +
988 {
│ │ │ │ +
989 doRead(
│ │ │ │ +
990 factory, fileName,
│ │ │ │ +
991 boundarySegmentData.data_
│ │ │ │ +
992 ? *boundarySegmentData.data_ : discarded(std::vector<int>{}),
│ │ │ │ +
993 elementData.data_
│ │ │ │ +
994 ? *elementData.data_ : discarded(std::vector<int>{}),
│ │ │ │ +
995 verbose,
│ │ │ │ +
996 boundarySegmentData.flag_ || boundarySegmentData.data_
│ │ │ │ +
997 );
│ │ │ │ +
998 }
│ │ │ │ +
│ │ │ │ +
999
│ │ │ │ +
│ │ │ │ +
1020 static void read (Dune::GridFactory<Grid>& factory,
│ │ │ │ +
1021 const std::string& fileName,
│ │ │ │ +
1022 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ +
1023 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ +
1024 bool verbose, bool insertBoundarySegments)
│ │ │ │ +
1025 {
│ │ │ │ +
1026 doRead(
│ │ │ │ +
1027 factory, fileName, boundarySegmentToPhysicalEntity,
│ │ │ │ +
1028 elementToPhysicalEntity, verbose, insertBoundarySegments
│ │ │ │ +
1029 );
│ │ │ │ +
1030 }
│ │ │ │ +
│ │ │ │ +
1031
│ │ │ │ +
1033 //\{
│ │ │ │ +
1034
│ │ │ │ +
1035 [[deprecated("Will be removed after 2.8. Either use other constructors or use static methods without constructing an object")]]
│ │ │ │ +
1036 GmshReader() = default;
│ │ │ │ +
1037
│ │ │ │ + │ │ │ │ +
1039
│ │ │ │ +
1040 static constexpr Opts defaultOpts =
│ │ │ │ +
1041 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData;
│ │ │ │ +
1042
│ │ │ │ +
1044
│ │ │ │ +
│ │ │ │ +
1067 GmshReader(const std::string& fileName,
│ │ │ │ + │ │ │ │ +
1069 {
│ │ │ │ +
1070 gridFactory_ = std::make_unique<Dune::GridFactory<Grid>>();
│ │ │ │ +
1071 readGridFile(fileName, *gridFactory_, options);
│ │ │ │ +
1072 }
│ │ │ │ +
│ │ │ │ +
1073
│ │ │ │ +
│ │ │ │ +
1081 GmshReader(const std::string& fileName, GridFactory<Grid>& factory,
│ │ │ │ + │ │ │ │ +
1083 {
│ │ │ │ +
1084 readGridFile(fileName, factory, options);
│ │ │ │ +
1085 }
│ │ │ │ +
│ │ │ │ +
1086
│ │ │ │ +
│ │ │ │ +
1088 const std::vector<int>& elementData () const
│ │ │ │ +
1089 {
│ │ │ │ +
1090 checkElementData();
│ │ │ │ +
1091 return elementIndexToGmshPhysicalEntity_;
│ │ │ │ +
1092 }
│ │ │ │ +
│ │ │ │ +
1093
│ │ │ │ +
│ │ │ │ +
1095 const std::vector<int>& boundaryData () const
│ │ │ │ +
1096 {
│ │ │ │ +
1097 checkBoundaryData();
│ │ │ │ +
1098 return boundarySegmentIndexToGmshPhysicalEntity_;
│ │ │ │ +
1099 }
│ │ │ │ +
│ │ │ │ +
1100
│ │ │ │ +
│ │ │ │ +
1105 bool hasElementData () const
│ │ │ │ +
1106 { return hasElementData_ && !extractedElementData_; }
│ │ │ │ +
│ │ │ │ +
1107
│ │ │ │ +
│ │ │ │ +
1112 bool hasBoundaryData () const
│ │ │ │ +
1113 { return hasBoundaryData_ && !extractedBoundaryData_; }
│ │ │ │ +
│ │ │ │ +
1114
│ │ │ │ +
│ │ │ │ +
1116 std::vector<int> extractElementData ()
│ │ │ │ +
1117 {
│ │ │ │ +
1118 checkElementData();
│ │ │ │ +
1119 extractedElementData_ = true;
│ │ │ │ +
1120 return std::move(elementIndexToGmshPhysicalEntity_);
│ │ │ │ +
1121 }
│ │ │ │ +
│ │ │ │ +
1122
│ │ │ │ +
│ │ │ │ +
1124 std::vector<int> extractBoundaryData ()
│ │ │ │ +
1125 {
│ │ │ │ +
1126 checkBoundaryData();
│ │ │ │ +
1127 extractedBoundaryData_ = true;
│ │ │ │ +
1128 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);
│ │ │ │ +
1129 }
│ │ │ │ +
│ │ │ │ +
1130
│ │ │ │ +
│ │ │ │ +
1132 std::unique_ptr<Grid> createGrid ()
│ │ │ │ +
1133 {
│ │ │ │ +
1134 if (!gridFactory_)
│ │ │ │ +
1135 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1136 "This GmshReader has been constructed with a Dune::GridFactory. "
│ │ │ │ +
1137 << "This grid factory has been filled with all information to create a grid. "
│ │ │ │ +
1138 << "Please use this factory to create the grid by calling factory.createGrid(). "
│ │ │ │ +
1139 << "Alternatively use the constructor without passing the factory in combination with this member function."
│ │ │ │ +
1140 );
│ │ │ │ +
1141
│ │ │ │ +
1142 return gridFactory_->createGrid();
│ │ │ │ +
1143 }
│ │ │ │ +
│ │ │ │ +
1144
│ │ │ │ +
1145 //\}
│ │ │ │ +
1146
│ │ │ │ +
1147 private:
│ │ │ │ +
1148 void checkElementData () const
│ │ │ │ +
1149 {
│ │ │ │ +
1150 if (!hasElementData_)
│ │ │ │ +
1151 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1152 "This GmshReader has been constructed without the option 'readElementData'. "
│ │ │ │ +
1153 << "Please enable reading element data by passing the option 'Gmsh::ReaderOpts::readElementData' "
│ │ │ │ +
1154 << "to the constructor of this class."
│ │ │ │ +
1155 );
│ │ │ │ +
1156
│ │ │ │ +
1157 if (extractedElementData_)
│ │ │ │ +
1158 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1159 "The element data has already been extracted from this GmshReader "
│ │ │ │ +
1160 << "via a function call to reader.extractElementData(). Use the extraced data or "
│ │ │ │ +
1161 << "read the grid data from file again by constructing a new reader."
│ │ │ │ +
1162 );
│ │ │ │ +
1163 }
│ │ │ │ +
1164
│ │ │ │ +
1165 void checkBoundaryData () const
│ │ │ │ +
1166 {
│ │ │ │ +
1167 if (!hasBoundaryData_)
│ │ │ │ +
1168 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1169 "This GmshReader has been constructed without the option 'readBoundaryData'. "
│ │ │ │ +
1170 << "Please enable reading boundary data by passing the option 'Gmsh::ReaderOpts::readBoundaryData' "
│ │ │ │ +
1171 << "to the constructor of this class."
│ │ │ │ +
1172 );
│ │ │ │ +
1173
│ │ │ │ +
1174 if (extractedBoundaryData_)
│ │ │ │ +
1175 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1176 "The boundary data has already been extracted from this GmshReader "
│ │ │ │ +
1177 << "via a function call to reader.extractBoundaryData(). Use the extraced data or "
│ │ │ │ +
1178 << "read the grid data from file again by constructing a new reader."
│ │ │ │ +
1179 );
│ │ │ │ +
1180 }
│ │ │ │ +
1181
│ │ │ │ +
1182 void readGridFile (const std::string& fileName, GridFactory<Grid>& factory, Gmsh::ReaderOptions options)
│ │ │ │ +
1183 {
│ │ │ │ +
1184 const bool verbose = options & Opts::verbose;
│ │ │ │ +
1185 const bool insertBoundarySegments = options & Opts::insertBoundarySegments;
│ │ │ │ +
1186 const bool readBoundaryData = options & Opts::readBoundaryData;
│ │ │ │ +
1187 const bool readElementData = options & Opts::readElementData;
│ │ │ │ +
1188
│ │ │ │ +
1189 doRead(
│ │ │ │ +
1190 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,
│ │ │ │ +
1191 elementIndexToGmshPhysicalEntity_, verbose,
│ │ │ │ +
1192 readBoundaryData || insertBoundarySegments
│ │ │ │ +
1193 );
│ │ │ │ +
1194
│ │ │ │ +
1195 // clear unwanted data
│ │ │ │ +
1196 if (!readBoundaryData)
│ │ │ │ +
1197 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector<int>{};
│ │ │ │ +
1198 if (!readElementData)
│ │ │ │ +
1199 elementIndexToGmshPhysicalEntity_ = std::vector<int>{};
│ │ │ │ +
1200
│ │ │ │ +
1201 hasElementData_ = readElementData;
│ │ │ │ +
1202 hasBoundaryData_ = readBoundaryData;
│ │ │ │ +
1203 }
│ │ │ │ +
1204
│ │ │ │ +
1205 std::unique_ptr<Dune::GridFactory<Grid>> gridFactory_;
│ │ │ │ +
1206
│ │ │ │ +
1207 std::vector<int> elementIndexToGmshPhysicalEntity_;
│ │ │ │ +
1208 std::vector<int> boundarySegmentIndexToGmshPhysicalEntity_;
│ │ │ │ +
1209
│ │ │ │ +
1210 bool hasElementData_;
│ │ │ │ +
1211 bool hasBoundaryData_;
│ │ │ │ +
1212
│ │ │ │ +
1213 // for better error messages, we keep track of these separately
│ │ │ │ +
1214 bool extractedElementData_ = false;
│ │ │ │ +
1215 bool extractedBoundaryData_ = false;
│ │ │ │ +
1216 };
│ │ │ │ +
│ │ │ │ +
1217
│ │ │ │ +
1220} // namespace Dune
│ │ │ │ +
1221
│ │ │ │ +
1222#endif
│ │ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ +
ReaderOptions
Option for the Gmsh mesh file reader.
Definition gmshreader.hh:758
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ -
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ -
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ -
A base class for grid functions with any return type and dimension.
Definition function.hh:42
│ │ │ │ -
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition vtksequencewriterbase.hh:34
│ │ │ │ -
void addVertexData(const V &v, const std::string &name, int ncomps=1)
Adds a field of vertex data to the VTK file.
Definition vtksequencewriterbase.hh:97
│ │ │ │ -
const std::vector< double > & getTimeSteps() const
Retrieve the current list of time steps.
Definition vtksequencewriterbase.hh:164
│ │ │ │ -
const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
Definition vtksequencewriterbase.hh:63
│ │ │ │ -
void write(double time, VTK::OutputType type=VTK::ascii)
Writes VTK data for the given time,.
Definition vtksequencewriterbase.hh:108
│ │ │ │ -
void addVertexData(const std::shared_ptr< const typename VTKWriter< GridView >::VTKFunction > &p)
Adds a field of vertex data to the VTK file.
Definition vtksequencewriterbase.hh:86
│ │ │ │ -
void addCellData(const V &v, const std::string &name, int ncomps=1)
Adds a field of cell data to the VTK file.
Definition vtksequencewriterbase.hh:80
│ │ │ │ -
VTKSequenceWriterBase(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath, int rank, int size)
Set up the VTKSequenceWriterBase class.
Definition vtksequencewriterbase.hh:47
│ │ │ │ -
void addCellData(const std::shared_ptr< const typename VTKWriter< GridView >::VTKFunction > &p)
Adds a field of cell data to the VTK file.
Definition vtksequencewriterbase.hh:69
│ │ │ │ -
void setTimeSteps(const std::vector< double > &timesteps)
Set the current list of time steps.
Definition vtksequencewriterbase.hh:174
│ │ │ │ -
void clear()
Clears all VTK data added to the VTK writer.
Definition vtksequencewriterbase.hh:156
│ │ │ │ -
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ +
constexpr bool operator&(ReaderOptions a, ReaderOptions b)
query operator for reader options (is b set in a)
Definition gmshreader.hh:774
│ │ │ │ +
constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)
composition operator for reader options
Definition gmshreader.hh:766
│ │ │ │ +
Base class for classes implementing geometries of boundary segments.
Definition boundarysegment.hh:94
│ │ │ │ +
Communication comm() const
Return the Communication used by the grid factory.
Definition common/gridfactory.hh:297
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:314
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:372
│ │ │ │ +
Options for read operation.
Definition gmshreader.hh:39
│ │ │ │ +
GeometryOrder
Definition gmshreader.hh:40
│ │ │ │ +
@ firstOrder
edges are straight lines.
Definition gmshreader.hh:42
│ │ │ │ +
@ secondOrder
quadratic boundary approximation.
Definition gmshreader.hh:44
│ │ │ │ +
dimension independent parts for GmshReaderParser
Definition gmshreader.hh:302
│ │ │ │ +
void pass1HandleElement(FILE *file, const int elm_type, std::map< int, unsigned int > &renumber, const std::vector< GlobalVector > &nodes)
Process one element during the first pass through the list of all elements.
Definition gmshreader.hh:512
│ │ │ │ +
static const int dimWorld
Definition gmshreader.hh:320
│ │ │ │ +
Dune::GridFactory< GridType > & factory
Definition gmshreader.hh:305
│ │ │ │ +
std::vector< int > & boundaryIdMap()
Definition gmshreader.hh:357
│ │ │ │ +
std::vector< int > & elementIndexMap()
Definition gmshreader.hh:362
│ │ │ │ +
unsigned int number_of_real_vertices
Definition gmshreader.hh:308
│ │ │ │ +
void boundarysegment_insert(const std::vector< FieldVector< double, 3 > > &nodes, const E &elementDofs, const V &vertices)
Definition gmshreader.hh:575
│ │ │ │ +
GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)
Definition gmshreader.hh:354
│ │ │ │ +
int element_count
Definition gmshreader.hh:310
│ │ │ │ +
void read(const std::string &f)
Definition gmshreader.hh:367
│ │ │ │ +
void skipline(FILE *file)
Definition gmshreader.hh:344
│ │ │ │ +
void readfile(FILE *file, int cnt, const char *format, void *t1, void *t2=0, void *t3=0, void *t4=0, void *t5=0, void *t6=0, void *t7=0, void *t8=0, void *t9=0, void *t10=0)
Definition gmshreader.hh:330
│ │ │ │ +
std::vector< int > element_index_to_physical_entity
Definition gmshreader.hh:316
│ │ │ │ +
virtual void pass2HandleElement(FILE *file, const int elm_type, std::map< int, unsigned int > &renumber, const std::vector< GlobalVector > &nodes, const int physical_entity)
Process one element during the second pass through the list of all elements.
Definition gmshreader.hh:600
│ │ │ │ +
static const int dim
Definition gmshreader.hh:319
│ │ │ │ +
FieldVector< double, dimWorld > GlobalVector
Definition gmshreader.hh:324
│ │ │ │ +
std::string fileName
Definition gmshreader.hh:313
│ │ │ │ +
int boundary_element_count
Definition gmshreader.hh:309
│ │ │ │ +
void boundarysegment_insert(const V &, const E &, const V2 &)
Definition gmshreader.hh:564
│ │ │ │ +
bool verbose
Definition gmshreader.hh:306
│ │ │ │ +
std::vector< int > boundary_id_to_physical_entity
Definition gmshreader.hh:315
│ │ │ │ +
char buf[512]
Definition gmshreader.hh:312
│ │ │ │ +
bool insert_boundary_segments
Definition gmshreader.hh:307
│ │ │ │ +
Read Gmsh mesh file.
Definition gmshreader.hh:807
│ │ │ │ +
static std::unique_ptr< Grid > read(const std::string &fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< int > &elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true)
Read Gmsh file, possibly with data.
Definition gmshreader.hh:933
│ │ │ │ +
const std::vector< int > & elementData() const
Access element data (maps element index to Gmsh physical entity)
Definition gmshreader.hh:1088
│ │ │ │ +
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, DataFlagArg boundarySegmentData, DataArg elementData, bool verbose=true)
read Gmsh file, possibly with data
Definition gmshreader.hh:983
│ │ │ │ +
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:904
│ │ │ │ +
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:950
│ │ │ │ +
GridType Grid
Definition gmshreader.hh:896
│ │ │ │ +
std::unique_ptr< Grid > createGrid()
Create the grid.
Definition gmshreader.hh:1132
│ │ │ │ +
std::vector< int > extractBoundaryData()
Erase boundary data from reader and return the data.
Definition gmshreader.hh:1124
│ │ │ │ +
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< int > &elementToPhysicalEntity, bool verbose, bool insertBoundarySegments)
Read Gmsh file, possibly with data.
Definition gmshreader.hh:1020
│ │ │ │ +
bool hasElementData() const
If element data is available.
Definition gmshreader.hh:1105
│ │ │ │ +
bool hasBoundaryData() const
If boundary data is available.
Definition gmshreader.hh:1112
│ │ │ │ +
static constexpr Opts defaultOpts
Definition gmshreader.hh:1040
│ │ │ │ +
GmshReader(const std::string &fileName, GridFactory< Grid > &factory, Gmsh::ReaderOptions options=defaultOpts)
Construct a Gmsh reader object from a file name and a grid factory.
Definition gmshreader.hh:1081
│ │ │ │ +
GmshReader(const std::string &fileName, Gmsh::ReaderOptions options=defaultOpts)
Construct a Gmsh reader object (alternatively use one of the static member functions)
Definition gmshreader.hh:1067
│ │ │ │ +
std::vector< int > extractElementData()
Erase element data from reader and return the data.
Definition gmshreader.hh:1116
│ │ │ │ +
const std::vector< int > & boundaryData() const
Access boundary data (maps boundary segment index to Gmsh physical entity)
Definition gmshreader.hh:1095
│ │ │ │ +
GmshReader()=default
Dynamic Gmsh reader interface.
│ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,235 +2,1302 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -vtksequencewriterbase.hh │ │ │ │ │ +gmshreader.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH │ │ │ │ │ +6#ifndef DUNE_GMSHREADER_HH │ │ │ │ │ +7#define DUNE_GMSHREADER_HH │ │ │ │ │ 8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ 12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -17#include │ │ │ │ │ -18 │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19#include │ │ │ │ │ 20 │ │ │ │ │ -21namespace _D_u_n_e { │ │ │ │ │ -22 │ │ │ │ │ -32 template │ │ │ │ │ -_3_3 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -34 { │ │ │ │ │ -35 std::shared_ptr > vtkWriter_; │ │ │ │ │ -36 std::vector timesteps_; │ │ │ │ │ -37 std::string name_,path_,extendpath_; │ │ │ │ │ -38 int rank_; │ │ │ │ │ -39 int size_; │ │ │ │ │ -40 public: │ │ │ │ │ -_4_7 explicit _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > │ │ │ │ │ -_v_t_k_W_r_i_t_e_r, │ │ │ │ │ -48 const std::string& name, │ │ │ │ │ -49 const std::string& path, │ │ │ │ │ -50 const std::string& extendpath, │ │ │ │ │ -51 int rank, │ │ │ │ │ -52 int size) │ │ │ │ │ -53 : vtkWriter_(_v_t_k_W_r_i_t_e_r), │ │ │ │ │ -54 name_(name), path_(path), │ │ │ │ │ -55 extendpath_(extendpath), │ │ │ │ │ -56 rank_(rank), │ │ │ │ │ -57 size_(size) │ │ │ │ │ -58 {} │ │ │ │ │ -59 │ │ │ │ │ -_6_3 const std::shared_ptr< VTKWriter >& _v_t_k_W_r_i_t_e_r() const │ │ │ │ │ -64 { │ │ │ │ │ -65 return vtkWriter_; │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_9 void _a_d_d_C_e_l_l_D_a_t_a (const std::shared_ptr_:_: │ │ │ │ │ -_V_T_K_F_u_n_c_t_i_o_n> &p) │ │ │ │ │ -70 { │ │ │ │ │ -71 vtkWriter_->addCellData(p); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -79 template │ │ │ │ │ -_8_0 void _a_d_d_C_e_l_l_D_a_t_a (const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +21#include │ │ │ │ │ +22#include │ │ │ │ │ +23 │ │ │ │ │ +24#include │ │ │ │ │ +25 │ │ │ │ │ +26#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h> │ │ │ │ │ +27#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +28 │ │ │ │ │ +29namespace _D_u_n_e │ │ │ │ │ +30{ │ │ │ │ │ +31 │ │ │ │ │ +_3_8 struct _G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ +39 { │ │ │ │ │ +_4_0 enum _G_e_o_m_e_t_r_y_O_r_d_e_r { │ │ │ │ │ +_4_2 _f_i_r_s_t_O_r_d_e_r, │ │ │ │ │ +44 _s_e_c_o_n_d_O_r_d_e_r │ │ │ │ │ +_4_5 }; │ │ │ │ │ +46 }; │ │ │ │ │ +47 │ │ │ │ │ +48 namespace { │ │ │ │ │ +49 │ │ │ │ │ +50 // arbitrary dimension, implementation is in specialization │ │ │ │ │ +51 template< int dimension, int dimWorld = dimension > │ │ │ │ │ +52 class GmshReaderQuadraticBoundarySegment │ │ │ │ │ +53 { │ │ │ │ │ +54 public: │ │ │ │ │ +55 // empty function since this class does not implement anything │ │ │ │ │ +56 static void registerFactory() {} │ │ │ │ │ +57 }; │ │ │ │ │ +58 │ │ │ │ │ +59 // quadratic boundary segments in 1d │ │ │ │ │ +60 /* │ │ │ │ │ +61 Note the points │ │ │ │ │ +62 │ │ │ │ │ +63 (0) (alpha) (1) │ │ │ │ │ +64 │ │ │ │ │ +65 are mapped to the points in global coordinates │ │ │ │ │ +66 │ │ │ │ │ +67 p0 p2 p1 │ │ │ │ │ +68 │ │ │ │ │ +69 alpha is determined automatically from the given points. │ │ │ │ │ +70 */ │ │ │ │ │ +71 template< int dimWorld > │ │ │ │ │ +72 struct GmshReaderQuadraticBoundarySegment< 2, dimWorld > │ │ │ │ │ +73 : public _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t< 2, dimWorld > │ │ │ │ │ +74 { │ │ │ │ │ +75 typedef GmshReaderQuadraticBoundarySegment< 2, dimWorld > ThisType; │ │ │ │ │ +76 typedef typename _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_ _2_,_ _d_i_m_W_o_r_l_d_ _> :: ObjectStreamType │ │ │ │ │ +ObjectStreamType; │ │ │ │ │ +77 typedef Dune::FieldVector< double, dimWorld > _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ │ +78 │ │ │ │ │ +79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const │ │ │ │ │ +GlobalVector &p1_, const GlobalVector &p2_) │ │ │ │ │ +80 : p0(p0_), p1(p1_), p2(p2_) │ │ │ │ │ 81 { │ │ │ │ │ -82 vtkWriter_->addCellData(v, name, ncomps); │ │ │ │ │ +82 init(); │ │ │ │ │ 83 } │ │ │ │ │ 84 │ │ │ │ │ -_8_6 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const std::shared_ptr_:_:_V_T_K_F_u_n_c_t_i_o_n> &p) │ │ │ │ │ -87 { │ │ │ │ │ -88 vtkWriter_->addVertexData(p); │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -96 template │ │ │ │ │ -_9_7 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ +85 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in ) │ │ │ │ │ +86 { │ │ │ │ │ +87 // key is read before by the factory │ │ │ │ │ +88 const int bytes = sizeof(double)*dimWorld; │ │ │ │ │ +89 in.read( (char *) &p0[ 0 ], bytes ); │ │ │ │ │ +90 in.read( (char *) &p1[ 0 ], bytes ); │ │ │ │ │ +91 in.read( (char *) &p2[ 0 ], bytes ); │ │ │ │ │ +92 init(); │ │ │ │ │ +93 } │ │ │ │ │ +94 │ │ │ │ │ +95 static void registerFactory() │ │ │ │ │ +96 { │ │ │ │ │ +97 if( key() < 0 ) │ │ │ │ │ 98 { │ │ │ │ │ -99 vtkWriter_->addVertexData(v, name, ncomps); │ │ │ │ │ +99 key() = _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_ _2_,_ _d_i_m_W_o_r_l_d_ _>_:_:_t_e_m_p_l_a_t_e registerFactory< │ │ │ │ │ +ThisType >(); │ │ │ │ │ 100 } │ │ │ │ │ -101 │ │ │ │ │ +101 } │ │ │ │ │ 102 │ │ │ │ │ -_1_0_8 void _w_r_i_t_e (double time, _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type = _V_T_K_:_:_a_s_c_i_i) │ │ │ │ │ -109 { │ │ │ │ │ -110 /* remember current time step */ │ │ │ │ │ -111 unsigned int count = timesteps_.size(); │ │ │ │ │ -112 timesteps_.push_back(time); │ │ │ │ │ -113 │ │ │ │ │ -114 /* write VTK file */ │ │ │ │ │ -115 if(size_==1) │ │ │ │ │ -116 vtkWriter_->write(concatPaths(path_,seqName(count)),type); │ │ │ │ │ -117 else │ │ │ │ │ -118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type); │ │ │ │ │ -119 │ │ │ │ │ -120 /* write pvd file ... only on rank 0 */ │ │ │ │ │ -121 if (rank_==0) { │ │ │ │ │ -122 std::ofstream pvdFile; │ │ │ │ │ -123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -124 std::ios_base::eofbit); │ │ │ │ │ -125 std::string pvdname = name_ + ".pvd"; │ │ │ │ │ -126 pvdFile.open(pvdname.c_str()); │ │ │ │ │ -127 pvdFile << " \n" │ │ │ │ │ -128 << " \n" │ │ │ │ │ -129 << " \n"; │ │ │ │ │ -130 for (unsigned int i=0; i<=count; i++) │ │ │ │ │ -131 { │ │ │ │ │ -132 // filename │ │ │ │ │ -133 std::string piecepath; │ │ │ │ │ -134 std::string fullname; │ │ │ │ │ -135 if(size_==1) { │ │ │ │ │ -136 piecepath = path_; │ │ │ │ │ -137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath); │ │ │ │ │ -138 } │ │ │ │ │ -139 else { │ │ │ │ │ -140 piecepath = concatPaths(path_, extendpath_); │ │ │ │ │ -141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath, size_); │ │ │ │ │ -142 } │ │ │ │ │ -143 pvdFile << " \n"; │ │ │ │ │ -146 } │ │ │ │ │ -147 pvdFile << " \n" │ │ │ │ │ -148 << " \n" << std::flush; │ │ │ │ │ -149 pvdFile.close(); │ │ │ │ │ -150 } │ │ │ │ │ -151 } │ │ │ │ │ +103 virtual _G_l_o_b_a_l_V_e_c_t_o_r operator() ( const Dune::FieldVector &local │ │ │ │ │ +) const │ │ │ │ │ +104 { │ │ │ │ │ +105 _G_l_o_b_a_l_V_e_c_t_o_r y; │ │ │ │ │ +106 y = 0.0; │ │ │ │ │ +107 y.axpy((local[0]-alpha)*(local[0]-1.0)/alpha,p0); │ │ │ │ │ +108 y.axpy(local[0]*(local[0]-1.0)/(alpha*(alpha-1.0)),p1); │ │ │ │ │ +109 y.axpy(local[0]*(local[0]-alpha)/(1.0-alpha),p2); │ │ │ │ │ +110 return y; │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +113 void backup( ObjectStreamType& out ) const │ │ │ │ │ +114 { │ │ │ │ │ +115 // backup key to identify object │ │ │ │ │ +116 out.write( (const char *) &key(), sizeof( int ) ); │ │ │ │ │ +117 // backup data │ │ │ │ │ +118 const int bytes = sizeof(double)*dimWorld; │ │ │ │ │ +119 out.write( (const char*) &p0[ 0 ], bytes ); │ │ │ │ │ +120 out.write( (const char*) &p1[ 0 ], bytes ); │ │ │ │ │ +121 out.write( (const char*) &p2[ 0 ], bytes ); │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +124 protected: │ │ │ │ │ +125 void init() │ │ │ │ │ +126 { │ │ │ │ │ +127 _G_l_o_b_a_l_V_e_c_t_o_r d1 = p1; │ │ │ │ │ +128 d1 -= p0; │ │ │ │ │ +129 _G_l_o_b_a_l_V_e_c_t_o_r d2 = p2; │ │ │ │ │ +130 d2 -= p1; │ │ │ │ │ +131 │ │ │ │ │ +132 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm()); │ │ │ │ │ +133 if (alpha<1E-6 || alpha>1-1E-6) │ │ │ │ │ +134 DUNE_THROW(Dune::IOError, "ration in quadratic boundary segment bad"); │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +137 static int& key() { │ │ │ │ │ +138 static int k = -1; │ │ │ │ │ +139 return k; │ │ │ │ │ +140 } │ │ │ │ │ +141 │ │ │ │ │ +142 private: │ │ │ │ │ +143 _G_l_o_b_a_l_V_e_c_t_o_r p0,p1,p2; │ │ │ │ │ +144 double alpha; │ │ │ │ │ +145 }; │ │ │ │ │ +146 │ │ │ │ │ +147 │ │ │ │ │ +148 // quadratic boundary segments in 2d │ │ │ │ │ +149 /* numbering of points corresponding to gmsh: │ │ │ │ │ +150 │ │ │ │ │ +151 2 │ │ │ │ │ 152 │ │ │ │ │ -_1_5_6 void _c_l_e_a_r() │ │ │ │ │ -157 { │ │ │ │ │ -158 vtkWriter_->clear(); │ │ │ │ │ -159 } │ │ │ │ │ +153 5 4 │ │ │ │ │ +154 │ │ │ │ │ +155 0 3 1 │ │ │ │ │ +156 │ │ │ │ │ +157 Note: The vertices 3, 4, 5 are not necessarily at the edge midpoints but │ │ │ │ │ +can │ │ │ │ │ +158 be placed with parameters alpha, beta , gamma at the following positions │ │ │ │ │ +159 in local coordinates: │ │ │ │ │ 160 │ │ │ │ │ -_1_6_4 const std::vector& _g_e_t_T_i_m_e_S_t_e_p_s() const │ │ │ │ │ -165 { │ │ │ │ │ -166 return timesteps_; │ │ │ │ │ -167 } │ │ │ │ │ -168 │ │ │ │ │ -_1_7_4 void _s_e_t_T_i_m_e_S_t_e_p_s(const std::vector& timesteps) │ │ │ │ │ -175 { │ │ │ │ │ -176 timesteps_ = timesteps; │ │ │ │ │ -177 } │ │ │ │ │ -178 │ │ │ │ │ -179 private: │ │ │ │ │ -180 │ │ │ │ │ -181 // create sequence name │ │ │ │ │ -182 std::string seqName(unsigned int count) const │ │ │ │ │ -183 { │ │ │ │ │ -184 std::stringstream n; │ │ │ │ │ -185 n.fill('0'); │ │ │ │ │ -186 n << name_ << "-" << std::setw(5) << count; │ │ │ │ │ -187 return n.str(); │ │ │ │ │ -188 } │ │ │ │ │ -189 }; │ │ │ │ │ -190 │ │ │ │ │ -191} // end namespace Dune │ │ │ │ │ -192 │ │ │ │ │ -193#endif │ │ │ │ │ -_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ +161 │ │ │ │ │ +162 2 = (0,1) │ │ │ │ │ +163 │ │ │ │ │ +164 5 = (0,beta) 4 = (1-gamma/sqrt(2),gamma/sqrt(2)) │ │ │ │ │ +165 │ │ │ │ │ +166 0 = (0,0) 3 = (alpha,0) 1 = (1,0) │ │ │ │ │ +167 │ │ │ │ │ +168 The parameters alpha, beta, gamma are determined from the given vertices in │ │ │ │ │ +169 global coordinates. │ │ │ │ │ +170 */ │ │ │ │ │ +171 template<> │ │ │ │ │ +172 class GmshReaderQuadraticBoundarySegment< 3, 3 > │ │ │ │ │ +173 : public _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t< 3 > │ │ │ │ │ +174 { │ │ │ │ │ +175 typedef GmshReaderQuadraticBoundarySegment< 3, 3 > ThisType; │ │ │ │ │ +176 typedef typename _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_ _3_ _> :: ObjectStreamType │ │ │ │ │ +ObjectStreamType; │ │ │ │ │ +177 public: │ │ │ │ │ +178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector p0_, Dune:: │ │ │ │ │ +FieldVector p1_, │ │ │ │ │ +179 Dune::FieldVector p2_, Dune::FieldVector p3_, │ │ │ │ │ +180 Dune::FieldVector p4_, Dune::FieldVector p5_) │ │ │ │ │ +181 : p0(p0_), p1(p1_), p2(p2_), p3(p3_), p4(p4_), p5(p5_) │ │ │ │ │ +182 { │ │ │ │ │ +183 init(); │ │ │ │ │ +184 } │ │ │ │ │ +185 │ │ │ │ │ +186 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in ) │ │ │ │ │ +187 { │ │ │ │ │ +188 const int bytes = sizeof(double)*3; │ │ │ │ │ +189 in.read( (char *) &p0[ 0 ], bytes ); │ │ │ │ │ +190 in.read( (char *) &p1[ 0 ], bytes ); │ │ │ │ │ +191 in.read( (char *) &p2[ 0 ], bytes ); │ │ │ │ │ +192 in.read( (char *) &p3[ 0 ], bytes ); │ │ │ │ │ +193 in.read( (char *) &p4[ 0 ], bytes ); │ │ │ │ │ +194 in.read( (char *) &p5[ 0 ], bytes ); │ │ │ │ │ +195 init(); │ │ │ │ │ +196 } │ │ │ │ │ +197 │ │ │ │ │ +198 static void registerFactory() │ │ │ │ │ +199 { │ │ │ │ │ +200 if( key() < 0 ) │ │ │ │ │ +201 { │ │ │ │ │ +202 key() = _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_ _3_ _>_:_:_t_e_m_p_l_a_t_e registerFactory< ThisType >(); │ │ │ │ │ +203 } │ │ │ │ │ +204 } │ │ │ │ │ +205 │ │ │ │ │ +206 virtual Dune::FieldVector operator() (const Dune:: │ │ │ │ │ +FieldVector& local) const │ │ │ │ │ +207 { │ │ │ │ │ +208 Dune::FieldVector y; │ │ │ │ │ +209 y = 0.0; │ │ │ │ │ +210 y.axpy(phi0(local),p0); │ │ │ │ │ +211 y.axpy(phi1(local),p1); │ │ │ │ │ +212 y.axpy(phi2(local),p2); │ │ │ │ │ +213 y.axpy(phi3(local),p3); │ │ │ │ │ +214 y.axpy(phi4(local),p4); │ │ │ │ │ +215 y.axpy(phi5(local),p5); │ │ │ │ │ +216 return y; │ │ │ │ │ +217 } │ │ │ │ │ +218 │ │ │ │ │ +219 void backup( ObjectStreamType& out ) const │ │ │ │ │ +220 { │ │ │ │ │ +221 // backup key to identify object in factory │ │ │ │ │ +222 out.write( (const char*) &key(), sizeof( int ) ); │ │ │ │ │ +223 // backup data │ │ │ │ │ +224 const int bytes = sizeof(double)*3; │ │ │ │ │ +225 out.write( (const char*) &p0[ 0 ], bytes ); │ │ │ │ │ +226 out.write( (const char*) &p1[ 0 ], bytes ); │ │ │ │ │ +227 out.write( (const char*) &p2[ 0 ], bytes ); │ │ │ │ │ +228 out.write( (const char*) &p3[ 0 ], bytes ); │ │ │ │ │ +229 out.write( (const char*) &p4[ 0 ], bytes ); │ │ │ │ │ +230 out.write( (const char*) &p5[ 0 ], bytes ); │ │ │ │ │ +231 } │ │ │ │ │ +232 │ │ │ │ │ +233 protected: │ │ │ │ │ +234 void init() │ │ │ │ │ +235 { │ │ │ │ │ +236 using std::sqrt; │ │ │ │ │ +237 sqrt2 = sqrt(2.0); │ │ │ │ │ +238 Dune::FieldVector d1,d2; │ │ │ │ │ +239 │ │ │ │ │ +240 d1 = p3; d1 -= p0; │ │ │ │ │ +241 d2 = p1; d2 -= p3; │ │ │ │ │ +242 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm()); │ │ │ │ │ +243 if (alpha<1E-6 || alpha>1-1E-6) │ │ │ │ │ +244 DUNE_THROW(Dune::IOError, "alpha in quadratic boundary segment bad"); │ │ │ │ │ +245 │ │ │ │ │ +246 d1 = p5; d1 -= p0; │ │ │ │ │ +247 d2 = p2; d2 -= p5; │ │ │ │ │ +248 beta=d1.two_norm()/(d1.two_norm()+d2.two_norm()); │ │ │ │ │ +249 if (beta<1E-6 || beta>1-1E-6) │ │ │ │ │ +250 DUNE_THROW(Dune::IOError, "beta in quadratic boundary segment bad"); │ │ │ │ │ +251 │ │ │ │ │ +252 d1 = p4; d1 -= p1; │ │ │ │ │ +253 d2 = p2; d2 -= p4; │ │ │ │ │ +254 gamma=sqrt2*(d1.two_norm()/(d1.two_norm()+d2.two_norm())); │ │ │ │ │ +255 if (gamma<1E-6 || gamma>1-1E-6) │ │ │ │ │ +256 DUNE_THROW(Dune::IOError, "gamma in quadratic boundary segment bad"); │ │ │ │ │ +257 } │ │ │ │ │ +258 │ │ │ │ │ +259 static int& key() { │ │ │ │ │ +260 static int k = -1; │ │ │ │ │ +261 return k; │ │ │ │ │ +262 } │ │ │ │ │ +263 │ │ │ │ │ +264 private: │ │ │ │ │ +265 // The six Lagrange basis function on the reference element │ │ │ │ │ +266 // for the points given above │ │ │ │ │ +267 │ │ │ │ │ +268 double phi0 (const Dune::FieldVector& local) const │ │ │ │ │ +269 { │ │ │ │ │ +270 return (alpha*beta-beta*local[0]-alpha*local[1])*(1-local[0]-local[1])/ │ │ │ │ │ +(alpha*beta); │ │ │ │ │ +271 } │ │ │ │ │ +272 double phi3 (const Dune::FieldVector& local) const │ │ │ │ │ +273 { │ │ │ │ │ +274 return local[0]*(1-local[0]-local[1])/(alpha*(1-alpha)); │ │ │ │ │ +275 } │ │ │ │ │ +276 double phi1 (const Dune::FieldVector& local) const │ │ │ │ │ +277 { │ │ │ │ │ +278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]- │ │ │ │ │ +alpha*gamma)/(gamma*(1-alpha)); │ │ │ │ │ +279 } │ │ │ │ │ +280 double phi5 (const Dune::FieldVector& local) const │ │ │ │ │ +281 { │ │ │ │ │ +282 return local[1]*(1-local[0]-local[1])/(beta*(1-beta)); │ │ │ │ │ +283 } │ │ │ │ │ +284 double phi4 (const Dune::FieldVector& local) const │ │ │ │ │ +285 { │ │ │ │ │ +286 return local[0]*local[1]/((1-gamma/sqrt2)*gamma/sqrt2); │ │ │ │ │ +287 } │ │ │ │ │ +288 double phi2 (const Dune::FieldVector& local) const │ │ │ │ │ +289 { │ │ │ │ │ +290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local[1]* │ │ │ │ │ +(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1)); │ │ │ │ │ +291 } │ │ │ │ │ +292 │ │ │ │ │ +293 Dune::FieldVector p0,p1,p2,p3,p4,p5; │ │ │ │ │ +294 double alpha,beta,gamma,sqrt2; │ │ │ │ │ +295 }; │ │ │ │ │ +296 │ │ │ │ │ +297 } // end empty namespace │ │ │ │ │ +298 │ │ │ │ │ +300 template │ │ │ │ │ +_3_0_1 class _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r │ │ │ │ │ +302 { │ │ │ │ │ +303 protected: │ │ │ │ │ +304 // private data │ │ │ │ │ +_3_0_5 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_T_y_p_e_>& _f_a_c_t_o_r_y; │ │ │ │ │ +_3_0_6 bool _v_e_r_b_o_s_e; │ │ │ │ │ +_3_0_7 bool _i_n_s_e_r_t___b_o_u_n_d_a_r_y___s_e_g_m_e_n_t_s; │ │ │ │ │ +_3_0_8 unsigned int _n_u_m_b_e_r___o_f___r_e_a_l___v_e_r_t_i_c_e_s; │ │ │ │ │ +_3_0_9 int _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t; │ │ │ │ │ +_3_1_0 int _e_l_e_m_e_n_t___c_o_u_n_t; │ │ │ │ │ +311 // read buffer │ │ │ │ │ +_3_1_2 char _b_u_f[512]; │ │ │ │ │ +_3_1_3 std::string _f_i_l_e_N_a_m_e; │ │ │ │ │ +314 // exported data │ │ │ │ │ +_3_1_5 std::vector _b_o_u_n_d_a_r_y___i_d___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y; │ │ │ │ │ +_3_1_6 std::vector _e_l_e_m_e_n_t___i_n_d_e_x___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y; │ │ │ │ │ +317 │ │ │ │ │ +318 // static data │ │ │ │ │ +_3_1_9 static const int _d_i_m = GridType::dimension; │ │ │ │ │ +_3_2_0 static const int _d_i_m_W_o_r_l_d = GridType::dimensionworld; │ │ │ │ │ +321 static_assert( (_d_i_m_W_o_r_l_d <= 3), "GmshReader requires dimWorld <= 3." ); │ │ │ │ │ +322 │ │ │ │ │ +323 // typedefs │ │ │ │ │ +_3_2_4 typedef FieldVector< double, dimWorld > _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ │ +325 │ │ │ │ │ +326 // don't use something like │ │ │ │ │ +327 // readfile(file, 1, "%s\n", buf); │ │ │ │ │ +328 // to skip the rest of of the line -- that will only skip the next │ │ │ │ │ +329 // whitespace-separated word! Use skipline() instead. │ │ │ │ │ +_3_3_0 void _r_e_a_d_f_i_l_e(FILE * file, int cnt, const char * format, │ │ │ │ │ +331 void* t1, void* t2 = 0, void* t3 = 0, void* t4 = 0, │ │ │ │ │ +332 void* t5 = 0, void* t6 = 0, void* t7 = 0, void* t8 = 0, │ │ │ │ │ +333 void* t9 = 0, void* t10 = 0) │ │ │ │ │ +334 { │ │ │ │ │ +335 off_t pos = ftello(file); │ │ │ │ │ +336 int c = fscanf(file, format, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); │ │ │ │ │ +337 if (c != cnt) │ │ │ │ │ +338 DUNE_THROW(Dune::IOError, "Error parsing " << _f_i_l_e_N_a_m_e << " " │ │ │ │ │ +339 "file pos " << pos │ │ │ │ │ +340 << ": Expected '" << format << "', only read " << c << " entries instead of │ │ │ │ │ +" << cnt << "."); │ │ │ │ │ +341 } │ │ │ │ │ +342 │ │ │ │ │ +343 // skip over the rest of the line, including the terminating newline │ │ │ │ │ +_3_4_4 void _s_k_i_p_l_i_n_e(FILE * file) │ │ │ │ │ +345 { │ │ │ │ │ +346 int c; │ │ │ │ │ +347 do { │ │ │ │ │ +348 c = std::fgetc(file); │ │ │ │ │ +349 } while(c != '\n' && c != EOF); │ │ │ │ │ +350 } │ │ │ │ │ +351 │ │ │ │ │ +352 public: │ │ │ │ │ +353 │ │ │ │ │ +_3_5_4 _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r(_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_T_y_p_e_>& _factory, bool v, bool i) : │ │ │ │ │ +355 _f_a_c_t_o_r_y(_factory), _v_e_r_b_o_s_e(v), _i_n_s_e_r_t___b_o_u_n_d_a_r_y___s_e_g_m_e_n_t_s(i) {} │ │ │ │ │ +356 │ │ │ │ │ +_3_5_7 std::vector & _b_o_u_n_d_a_r_y_I_d_M_a_p() │ │ │ │ │ +358 { │ │ │ │ │ +359 return _b_o_u_n_d_a_r_y___i_d___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y; │ │ │ │ │ +360 } │ │ │ │ │ +361 │ │ │ │ │ +_3_6_2 std::vector & _e_l_e_m_e_n_t_I_n_d_e_x_M_a_p() │ │ │ │ │ +363 { │ │ │ │ │ +364 return _e_l_e_m_e_n_t___i_n_d_e_x___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y; │ │ │ │ │ +365 } │ │ │ │ │ +366 │ │ │ │ │ +_3_6_7 void _r_e_a_d (const std::string& f) │ │ │ │ │ +368 { │ │ │ │ │ +369 if (_v_e_r_b_o_s_e) std::cout << "Reading " << _d_i_m << "d Gmsh grid..." << std:: │ │ │ │ │ +endl; │ │ │ │ │ +370 │ │ │ │ │ +371 // open file name, we use C I/O │ │ │ │ │ +372 _f_i_l_e_N_a_m_e = f; │ │ │ │ │ +373 FILE* file = fopen(_f_i_l_e_N_a_m_e.c_str(),"rb"); │ │ │ │ │ +374 if (file==0) │ │ │ │ │ +375 DUNE_THROW(Dune::IOError, "Could not open " << _f_i_l_e_N_a_m_e); │ │ │ │ │ +376 │ │ │ │ │ +377 //========================================= │ │ │ │ │ +378 // Header: Read vertices into vector │ │ │ │ │ +379 // Check vertices that are needed │ │ │ │ │ +380 //========================================= │ │ │ │ │ +381 │ │ │ │ │ +382 _n_u_m_b_e_r___o_f___r_e_a_l___v_e_r_t_i_c_e_s = 0; │ │ │ │ │ +383 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +384 _e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +385 │ │ │ │ │ +386 // process header │ │ │ │ │ +387 double version_number; │ │ │ │ │ +388 int file_type, data_size; │ │ │ │ │ +389 │ │ │ │ │ +390 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +391 if (strcmp(_b_u_f,"$MeshFormat")!=0) │ │ │ │ │ +392 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line"); │ │ │ │ │ +393 _r_e_a_d_f_i_l_e(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size); │ │ │ │ │ +394 // 2.2 is not representable as float and leads to problems on i386 │ │ │ │ │ +395 // Hence we use >= 2.00001. │ │ │ │ │ +396 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not │ │ │ │ │ +representable as float and leads to problems on i386 │ │ │ │ │ +397 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files"); │ │ │ │ │ +398 if (_v_e_r_b_o_s_e) std::cout << "version " << version_number << " Gmsh file │ │ │ │ │ +detected" << std::endl; │ │ │ │ │ +399 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +400 if (strcmp(_b_u_f,"$EndMeshFormat")!=0) │ │ │ │ │ +401 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat"); │ │ │ │ │ +402 │ │ │ │ │ +403 // node section │ │ │ │ │ +404 int number_of_nodes; │ │ │ │ │ +405 │ │ │ │ │ +406 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +407 if (strcmp(_b_u_f,"$Nodes")!=0) │ │ │ │ │ +408 DUNE_THROW(Dune::IOError, "expected $Nodes"); │ │ │ │ │ +409 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_nodes); │ │ │ │ │ +410 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_nodes << " nodes" │ │ │ │ │ +<< std::endl; │ │ │ │ │ +411 │ │ │ │ │ +412 // read nodes │ │ │ │ │ +413 // The '+1' is due to the fact that gmsh numbers node starting from 1 │ │ │ │ │ +rather than from 0 │ │ │ │ │ +414 std::vector< GlobalVector > nodes( number_of_nodes+1 ); │ │ │ │ │ +415 { │ │ │ │ │ +416 int id; │ │ │ │ │ +417 double x[ 3 ]; │ │ │ │ │ +418 for( int i = 1; i <= number_of_nodes; ++i ) │ │ │ │ │ +419 { │ │ │ │ │ +420 _r_e_a_d_f_i_l_e(file,4, "%d %lg %lg %lg\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] ); │ │ │ │ │ +421 │ │ │ │ │ +422 if (id > number_of_nodes) { │ │ │ │ │ +423 DUNE_THROW(Dune::IOError, │ │ │ │ │ +424 "Only dense sequences of node indices are currently supported (node index " │ │ │ │ │ +425 << id << " is invalid)."); │ │ │ │ │ +426 } │ │ │ │ │ +427 │ │ │ │ │ +428 // just store node position │ │ │ │ │ +429 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ +430 nodes[ id ][ j ] = x[ j ]; │ │ │ │ │ +431 } │ │ │ │ │ +432 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +433 if (strcmp(_b_u_f,"$EndNodes")!=0) │ │ │ │ │ +434 DUNE_THROW(Dune::IOError, "expected $EndNodes"); │ │ │ │ │ +435 } │ │ │ │ │ +436 │ │ │ │ │ +437 // element section │ │ │ │ │ +438 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +439 if (strcmp(_b_u_f,"$Elements")!=0) │ │ │ │ │ +440 DUNE_THROW(Dune::IOError, "expected $Elements"); │ │ │ │ │ +441 int number_of_elements; │ │ │ │ │ +442 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_elements); │ │ │ │ │ +443 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_elements << " │ │ │ │ │ +elements" << std::endl; │ │ │ │ │ +444 │ │ │ │ │ +445 //========================================= │ │ │ │ │ +446 // Pass 1: Select and insert those vertices in the file that │ │ │ │ │ +447 // actually occur as corners of an element. │ │ │ │ │ +448 //========================================= │ │ │ │ │ +449 │ │ │ │ │ +450 off_t section_element_offset = ftello(file); │ │ │ │ │ +451 std::map renumber; │ │ │ │ │ +452 for (int i=1; i<=number_of_elements; i++) │ │ │ │ │ +453 { │ │ │ │ │ +454 int id, elm_type, number_of_tags; │ │ │ │ │ +455 _r_e_a_d_f_i_l_e(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags); │ │ │ │ │ +456 for (int k=1; k<=number_of_tags; k++) │ │ │ │ │ +457 { │ │ │ │ │ +458 int blub; │ │ │ │ │ +459 _r_e_a_d_f_i_l_e(file,1,"%d ",&blub); │ │ │ │ │ +460 // k == 1: physical entity (not used here) │ │ │ │ │ +461 // k == 2: elementary entity (not used here either) │ │ │ │ │ +462 // if version_number < 2.2: │ │ │ │ │ +463 // k == 3: mesh partition 0 │ │ │ │ │ +464 // else │ │ │ │ │ +465 // k == 3: number of mesh partitions │ │ │ │ │ +466 // k => 4: mesh partition k-4 │ │ │ │ │ +467 } │ │ │ │ │ +468 _p_a_s_s_1_H_a_n_d_l_e_E_l_e_m_e_n_t(file, elm_type, renumber, nodes); │ │ │ │ │ +469 } │ │ │ │ │ +470 if (_v_e_r_b_o_s_e) std::cout << "number of real vertices = " << │ │ │ │ │ +_n_u_m_b_e_r___o_f___r_e_a_l___v_e_r_t_i_c_e_s << std::endl; │ │ │ │ │ +471 if (_v_e_r_b_o_s_e) std::cout << "number of boundary elements = " << │ │ │ │ │ +_b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t << std::endl; │ │ │ │ │ +472 if (_v_e_r_b_o_s_e) std::cout << "number of elements = " << _e_l_e_m_e_n_t___c_o_u_n_t << std:: │ │ │ │ │ +endl; │ │ │ │ │ +473 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +474 if (strcmp(_b_u_f,"$EndElements")!=0) │ │ │ │ │ +475 DUNE_THROW(Dune::IOError, "expected $EndElements"); │ │ │ │ │ +476 _b_o_u_n_d_a_r_y___i_d___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y.resize(_b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t); │ │ │ │ │ +477 _e_l_e_m_e_n_t___i_n_d_e_x___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y.resize(_e_l_e_m_e_n_t___c_o_u_n_t); │ │ │ │ │ +478 │ │ │ │ │ +479 //============================================== │ │ │ │ │ +480 // Pass 2: Insert boundary segments and elements │ │ │ │ │ +481 //============================================== │ │ │ │ │ +482 │ │ │ │ │ +483 fseeko(file, section_element_offset, SEEK_SET); │ │ │ │ │ +484 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +485 _e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +486 for (int i=1; i<=number_of_elements; i++) │ │ │ │ │ +487 { │ │ │ │ │ +488 int id, elm_type, number_of_tags; │ │ │ │ │ +489 _r_e_a_d_f_i_l_e(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags); │ │ │ │ │ +490 int physical_entity = -1; │ │ │ │ │ +491 │ │ │ │ │ +492 for (int k=1; k<=number_of_tags; k++) │ │ │ │ │ +493 { │ │ │ │ │ +494 int blub; │ │ │ │ │ +495 _r_e_a_d_f_i_l_e(file,1,"%d ",&blub); │ │ │ │ │ +496 if (k==1) physical_entity = blub; │ │ │ │ │ +497 } │ │ │ │ │ +498 _p_a_s_s_2_H_a_n_d_l_e_E_l_e_m_e_n_t(file, elm_type, renumber, nodes, physical_entity); │ │ │ │ │ +499 } │ │ │ │ │ +500 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +501 if (strcmp(_b_u_f,"$EndElements")!=0) │ │ │ │ │ +502 DUNE_THROW(Dune::IOError, "expected $EndElements"); │ │ │ │ │ +503 │ │ │ │ │ +504 fclose(file); │ │ │ │ │ +505 } │ │ │ │ │ +506 │ │ │ │ │ +_5_1_2 void _p_a_s_s_1_H_a_n_d_l_e_E_l_e_m_e_n_t(FILE* file, const int elm_type, │ │ │ │ │ +513 std::map & renumber, │ │ │ │ │ +514 const std::vector< GlobalVector > & nodes) │ │ │ │ │ +515 { │ │ │ │ │ +516 // some data about gmsh elements │ │ │ │ │ +517 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, │ │ │ │ │ +1}; │ │ │ │ │ +518 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, - │ │ │ │ │ +1, 1}; │ │ │ │ │ +519 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, - │ │ │ │ │ +1, 0}; │ │ │ │ │ +520 │ │ │ │ │ +521 // test whether we support the element type │ │ │ │ │ +522 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range? │ │ │ │ │ +523 && (elementDim[elm_type] == _d_i_m || elementDim[elm_type] == (_d_i_m-1) ) ) ) / │ │ │ │ │ +/ real element or boundary element? │ │ │ │ │ +524 { │ │ │ │ │ +525 _s_k_i_p_l_i_n_e(file); // skip rest of line if element is unknown │ │ │ │ │ +526 return; │ │ │ │ │ +527 } │ │ │ │ │ +528 │ │ │ │ │ +529 // The format string for parsing is n times '%d' in a row │ │ │ │ │ +530 std::string formatString = "%d"; │ │ │ │ │ +531 for (int i=1; i elementDofs(10); │ │ │ │ │ +537 │ │ │ │ │ +538 _r_e_a_d_f_i_l_e(file,nDofs[elm_type], formatString.c_str(), │ │ │ │ │ +539 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]), │ │ │ │ │ +540 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]), │ │ │ │ │ +541 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]), │ │ │ │ │ +542 &(elementDofs[9])); │ │ │ │ │ +543 │ │ │ │ │ +544 // insert each vertex if it hasn't been inserted already │ │ │ │ │ +545 for (int i=0; i │ │ │ │ │ +_5_6_4 void _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t( │ │ │ │ │ +565 const V&, │ │ │ │ │ +566 const E&, │ │ │ │ │ +567 const V2& │ │ │ │ │ +568 ) │ │ │ │ │ +569 { │ │ │ │ │ +570 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non- │ │ │ │ │ +3D Grid"); │ │ │ │ │ +571 } │ │ │ │ │ +572 │ │ │ │ │ +573 // 3d-case: │ │ │ │ │ +574 template │ │ │ │ │ +_5_7_5 void _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t( │ │ │ │ │ +576 const std::vector >& nodes, │ │ │ │ │ +577 const E& elementDofs, │ │ │ │ │ +578 const V& vertices │ │ │ │ │ +579 ) │ │ │ │ │ +580 { │ │ │ │ │ +581 std::array, 6> v; │ │ │ │ │ +582 for (int i=0; i<6; i++) │ │ │ │ │ +583 for (int j=0; j<_d_i_m_W_o_r_l_d; j++) │ │ │ │ │ +584 v[i][j] = nodes[elementDofs[i]][j]; │ │ │ │ │ +585 │ │ │ │ │ +586 _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_d_i_m_,_d_i_m_W_o_r_l_d_>* newBoundarySegment │ │ │ │ │ +587 = (_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_d_i_m_,_d_i_m_W_o_r_l_d_>*) new GmshReaderQuadraticBoundarySegment< │ │ │ │ │ +3, 3 >( v[0], v[1], v[2], │ │ │ │ │ +588 v[3], v[4], v[5] ); │ │ │ │ │ +589 │ │ │ │ │ +590 _f_a_c_t_o_r_y.insertBoundarySegment( vertices, │ │ │ │ │ +591 std::shared_ptr<_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_d_i_m_,_d_i_m_W_o_r_l_d_> >(newBoundarySegment) ); │ │ │ │ │ +592 } │ │ │ │ │ +593 │ │ │ │ │ +594 │ │ │ │ │ +595 │ │ │ │ │ +_6_0_0 virtual void _p_a_s_s_2_H_a_n_d_l_e_E_l_e_m_e_n_t(FILE* file, const int elm_type, │ │ │ │ │ +601 std::map & renumber, │ │ │ │ │ +602 const std::vector< GlobalVector > & nodes, │ │ │ │ │ +603 const int physical_entity) │ │ │ │ │ +604 { │ │ │ │ │ +605 // some data about gmsh elements │ │ │ │ │ +606 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, │ │ │ │ │ +1}; │ │ │ │ │ +607 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, - │ │ │ │ │ +1, 1}; │ │ │ │ │ +608 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, - │ │ │ │ │ +1, 0}; │ │ │ │ │ +609 │ │ │ │ │ +610 // test whether we support the element type │ │ │ │ │ +611 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range? │ │ │ │ │ +612 && (elementDim[elm_type] == _d_i_m || elementDim[elm_type] == (_d_i_m-1) ) ) ) / │ │ │ │ │ +/ real element or boundary element? │ │ │ │ │ +613 { │ │ │ │ │ +614 _s_k_i_p_l_i_n_e(file); // skip rest of line if element is unknown │ │ │ │ │ +615 return; │ │ │ │ │ +616 } │ │ │ │ │ +617 │ │ │ │ │ +618 // The format string for parsing is n times '%d' in a row │ │ │ │ │ +619 std::string formatString = "%d"; │ │ │ │ │ +620 for (int i=1; i elementDofs(10); │ │ │ │ │ +626 │ │ │ │ │ +627 _r_e_a_d_f_i_l_e(file,nDofs[elm_type], formatString.c_str(), │ │ │ │ │ +628 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]), │ │ │ │ │ +629 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]), │ │ │ │ │ +630 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]), │ │ │ │ │ +631 &(elementDofs[9])); │ │ │ │ │ +632 │ │ │ │ │ +633 // correct differences between gmsh and Dune in the local vertex numbering │ │ │ │ │ +634 switch (elm_type) │ │ │ │ │ +635 { │ │ │ │ │ +636 case 3 : // 4-node quadrilateral │ │ │ │ │ +637 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ +638 break; │ │ │ │ │ +639 case 5 : // 8-node hexahedron │ │ │ │ │ +640 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ +641 _s_t_d_:_:_s_w_a_p(elementDofs[6],elementDofs[7]); │ │ │ │ │ +642 break; │ │ │ │ │ +643 case 7 : // 5-node pyramid │ │ │ │ │ +644 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ +645 break; │ │ │ │ │ +646 } │ │ │ │ │ +647 │ │ │ │ │ +648 // renumber corners to account for the explicitly given vertex │ │ │ │ │ +649 // numbering in the file │ │ │ │ │ +650 std::vector vertices(nVertices[elm_type]); │ │ │ │ │ +651 │ │ │ │ │ +652 for (int i=0; i, 3> v; │ │ │ │ │ +713 for (int i=0; i<_d_i_m_W_o_r_l_d; i++) { │ │ │ │ │ +714 v[0][i] = nodes[elementDofs[0]][i]; │ │ │ │ │ +715 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended! │ │ │ │ │ +716 v[2][i] = nodes[elementDofs[1]][i]; │ │ │ │ │ +717 } │ │ │ │ │ +718 _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_d_i_m_,_d_i_m_W_o_r_l_d_>* newBoundarySegment │ │ │ │ │ +719 = (_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_d_i_m_,_d_i_m_W_o_r_l_d_>*) new GmshReaderQuadraticBoundarySegment< │ │ │ │ │ +2, dimWorld >(v[0], v[1], v[2]); │ │ │ │ │ +720 _f_a_c_t_o_r_y.insertBoundarySegment(vertices, │ │ │ │ │ +721 std::shared_ptr<_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_<_d_i_m_,_d_i_m_W_o_r_l_d_> >(newBoundarySegment)); │ │ │ │ │ +722 break; │ │ │ │ │ +723 } │ │ │ │ │ +724 case 9 : { // 6-node triangle │ │ │ │ │ +725 _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t(nodes, elementDofs, vertices); │ │ │ │ │ +726 break; │ │ │ │ │ +727 } │ │ │ │ │ +728 default: { │ │ │ │ │ +729 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " │ │ │ │ │ +<< elm_type << " for boundary segments"); │ │ │ │ │ +730 break; │ │ │ │ │ +731 } │ │ │ │ │ +732 │ │ │ │ │ +733 } │ │ │ │ │ +734 │ │ │ │ │ +735 } │ │ │ │ │ +736 } │ │ │ │ │ +737 │ │ │ │ │ +738 // count elements and boundary elements │ │ │ │ │ +739 if (elementDim[elm_type] == _d_i_m) { │ │ │ │ │ +740 _e_l_e_m_e_n_t___i_n_d_e_x___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y[_e_l_e_m_e_n_t___c_o_u_n_t] = physical_entity; │ │ │ │ │ +741 _e_l_e_m_e_n_t___c_o_u_n_t++; │ │ │ │ │ +742 } else { │ │ │ │ │ +743 _b_o_u_n_d_a_r_y___i_d___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y[_b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t] = physical_entity; │ │ │ │ │ +744 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t++; │ │ │ │ │ +745 } │ │ │ │ │ +746 │ │ │ │ │ +747 } │ │ │ │ │ +748 │ │ │ │ │ +749 }; │ │ │ │ │ +750 │ │ │ │ │ +_7_5_1 namespace Gmsh { │ │ │ │ │ +_7_5_7 enum class _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ +758 { │ │ │ │ │ +759 _v_e_r_b_o_s_e = 1, │ │ │ │ │ +760 _i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = 2, │ │ │ │ │ +761 _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = 4, │ │ │ │ │ +762 _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = 8 │ │ │ │ │ +763 }; │ │ │ │ │ +764 │ │ │ │ │ +_7_6_6 constexpr _R_e_a_d_e_r_O_p_t_i_o_n_s _o_p_e_r_a_t_o_r_ _|_ (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s b) │ │ │ │ │ +767 { │ │ │ │ │ +768 return static_cast<_R_e_a_d_e_r_O_p_t_i_o_n_s>( │ │ │ │ │ +769 static_cast(a) | static_cast(b) │ │ │ │ │ +770 ); │ │ │ │ │ +771 } │ │ │ │ │ +772 │ │ │ │ │ +_7_7_4 constexpr bool _o_p_e_r_a_t_o_r_ _&_ (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s b) │ │ │ │ │ +775 { │ │ │ │ │ +776 return static_cast(a) & static_cast(b); │ │ │ │ │ +777 } │ │ │ │ │ +778 │ │ │ │ │ +779 } // end namespace Gmsh │ │ │ │ │ +780 │ │ │ │ │ +805 template │ │ │ │ │ +_8_0_6 class _G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +807 { │ │ │ │ │ +809 │ │ │ │ │ +828 static void doRead(_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_T_y_p_e_> &factory, │ │ │ │ │ +829 const std::string &fileName, │ │ │ │ │ +830 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ +831 std::vector& elementToPhysicalEntity, │ │ │ │ │ +832 bool verbose, bool insertBoundarySegments) │ │ │ │ │ +833 { │ │ │ │ │ +834 // register boundary segment to boundary segment factory for possible load │ │ │ │ │ +balancing │ │ │ │ │ +835 // this needs to be done on all cores since the type might not be known │ │ │ │ │ +otherwise │ │ │ │ │ +836 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld │ │ │ │ │ +>::registerFactory(); │ │ │ │ │ +837 │ │ │ │ │ +838#ifndef NDEBUG │ │ │ │ │ +839 // check that this method is called on all cores │ │ │ │ │ +840 factory._c_o_m_m().barrier(); │ │ │ │ │ +841#endif │ │ │ │ │ +842 │ │ │ │ │ +843 // create parse object and read grid on process 0 │ │ │ │ │ +844 if (factory._c_o_m_m().rank() == 0) │ │ │ │ │ +845 { │ │ │ │ │ +846 _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_<_G_r_i_d_> parser(factory,verbose,insertBoundarySegments); │ │ │ │ │ +847 parser._r_e_a_d(fileName); │ │ │ │ │ +848 │ │ │ │ │ +849 boundarySegmentToPhysicalEntity = std::move(parser._b_o_u_n_d_a_r_y_I_d_M_a_p()); │ │ │ │ │ +850 elementToPhysicalEntity = std::move(parser._e_l_e_m_e_n_t_I_n_d_e_x_M_a_p()); │ │ │ │ │ +851 } │ │ │ │ │ +852 else │ │ │ │ │ +853 { │ │ │ │ │ +854 boundarySegmentToPhysicalEntity = {}; │ │ │ │ │ +855 elementToPhysicalEntity = {}; │ │ │ │ │ +856 } │ │ │ │ │ +857 } │ │ │ │ │ +858 │ │ │ │ │ +860 │ │ │ │ │ +879 template │ │ │ │ │ +880 static T &discarded(T &&value) { return value; } │ │ │ │ │ +881 │ │ │ │ │ +882 struct DataArg { │ │ │ │ │ +883 std::vector *data_ = nullptr; │ │ │ │ │ +884 DataArg(std::vector &data) : data_(&data) {} │ │ │ │ │ +885 DataArg(const decltype(std::ignore)&) {} │ │ │ │ │ +886 DataArg() = default; │ │ │ │ │ +887 }; │ │ │ │ │ +888 │ │ │ │ │ +889 struct DataFlagArg : DataArg { │ │ │ │ │ +890 bool flag_ = false; │ │ │ │ │ +891 using DataArg::DataArg; │ │ │ │ │ +892 DataFlagArg(bool flag) : flag_(flag) {} │ │ │ │ │ +893 }; │ │ │ │ │ +894 │ │ │ │ │ +895 public: │ │ │ │ │ +_8_9_6 typedef GridType _G_r_i_d; │ │ │ │ │ +897 │ │ │ │ │ +_9_0_4 static std::unique_ptr _r_e_a_d (const std::string& fileName, bool │ │ │ │ │ +verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ +905 { │ │ │ │ │ +906 // make a grid factory │ │ │ │ │ +907 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> factory; │ │ │ │ │ +908 │ │ │ │ │ +909 _r_e_a_d(factory, fileName, verbose, insertBoundarySegments); │ │ │ │ │ +910 │ │ │ │ │ +911 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ +912 } │ │ │ │ │ +913 │ │ │ │ │ +_9_3_3 static std::unique_ptr _r_e_a_d (const std::string& fileName, │ │ │ │ │ +934 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ +935 std::vector& elementToPhysicalEntity, │ │ │ │ │ +936 bool verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ +937 { │ │ │ │ │ +938 // make a grid factory │ │ │ │ │ +939 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> factory; │ │ │ │ │ +940 │ │ │ │ │ +941 doRead( │ │ │ │ │ +942 factory, fileName, boundarySegmentToPhysicalEntity, │ │ │ │ │ +943 elementToPhysicalEntity, verbose, insertBoundarySegments │ │ │ │ │ +944 ); │ │ │ │ │ +945 │ │ │ │ │ +946 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ +947 } │ │ │ │ │ +948 │ │ │ │ │ +_9_5_0 static void _r_e_a_d (_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory, const std::string& │ │ │ │ │ +fileName, │ │ │ │ │ +951 bool verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ +952 { │ │ │ │ │ +953 doRead( │ │ │ │ │ +954 factory, fileName, discarded(std::vector{}), │ │ │ │ │ +955 discarded(std::vector{}), verbose, insertBoundarySegments │ │ │ │ │ +956 ); │ │ │ │ │ +957 } │ │ │ │ │ +958 │ │ │ │ │ +960 │ │ │ │ │ +_9_8_3 static void _r_e_a_d (_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> &factory, │ │ │ │ │ +984 const std::string &fileName, │ │ │ │ │ +985 DataFlagArg boundarySegmentData, │ │ │ │ │ +986 DataArg _e_l_e_m_e_n_t_D_a_t_a, │ │ │ │ │ +987 bool verbose=true) │ │ │ │ │ +988 { │ │ │ │ │ +989 doRead( │ │ │ │ │ +990 factory, fileName, │ │ │ │ │ +991 boundarySegmentData.data_ │ │ │ │ │ +992 ? *boundarySegmentData.data_ : discarded(std::vector{}), │ │ │ │ │ +993 _e_l_e_m_e_n_t_D_a_t_a.data_ │ │ │ │ │ +994 ? *_e_l_e_m_e_n_t_D_a_t_a.data_ : discarded(std::vector{}), │ │ │ │ │ +995 verbose, │ │ │ │ │ +996 boundarySegmentData.flag_ || boundarySegmentData.data_ │ │ │ │ │ +997 ); │ │ │ │ │ +998 } │ │ │ │ │ +999 │ │ │ │ │ +_1_0_2_0 static void _r_e_a_d (_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory, │ │ │ │ │ +1021 const std::string& fileName, │ │ │ │ │ +1022 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ +1023 std::vector& elementToPhysicalEntity, │ │ │ │ │ +1024 bool verbose, bool insertBoundarySegments) │ │ │ │ │ +1025 { │ │ │ │ │ +1026 doRead( │ │ │ │ │ +1027 factory, fileName, boundarySegmentToPhysicalEntity, │ │ │ │ │ +1028 elementToPhysicalEntity, verbose, insertBoundarySegments │ │ │ │ │ +1029 ); │ │ │ │ │ +1030 } │ │ │ │ │ +1031 │ │ │ │ │ +1033 //\{ │ │ │ │ │ +1034 │ │ │ │ │ +1035 [[deprecated("Will be removed after 2.8. Either use other constructors or │ │ │ │ │ +use static methods without constructing an object")]] │ │ │ │ │ +_1_0_3_6 _G_m_s_h_R_e_a_d_e_r() = default; │ │ │ │ │ +1037 │ │ │ │ │ +_1_0_3_8 using _O_p_t_s = _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s; │ │ │ │ │ +1039 │ │ │ │ │ +_1_0_4_0 static constexpr _O_p_t_s _d_e_f_a_u_l_t_O_p_t_s = │ │ │ │ │ +1041 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | │ │ │ │ │ +Opts::readBoundaryData; │ │ │ │ │ +1042 │ │ │ │ │ +1044 │ │ │ │ │ +_1_0_6_7 _G_m_s_h_R_e_a_d_e_r(const std::string& fileName, │ │ │ │ │ +1068 _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s options = _d_e_f_a_u_l_t_O_p_t_s) │ │ │ │ │ +1069 { │ │ │ │ │ +1070 gridFactory_ = std::make_unique>(); │ │ │ │ │ +1071 readGridFile(fileName, *gridFactory_, options); │ │ │ │ │ +1072 } │ │ │ │ │ +1073 │ │ │ │ │ +_1_0_8_1 _G_m_s_h_R_e_a_d_e_r(const std::string& fileName, _G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory, │ │ │ │ │ +1082 _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s options = _d_e_f_a_u_l_t_O_p_t_s) │ │ │ │ │ +1083 { │ │ │ │ │ +1084 readGridFile(fileName, factory, options); │ │ │ │ │ +1085 } │ │ │ │ │ +1086 │ │ │ │ │ +_1_0_8_8 const std::vector& _e_l_e_m_e_n_t_D_a_t_a () const │ │ │ │ │ +1089 { │ │ │ │ │ +1090 checkElementData(); │ │ │ │ │ +1091 return elementIndexToGmshPhysicalEntity_; │ │ │ │ │ +1092 } │ │ │ │ │ +1093 │ │ │ │ │ +_1_0_9_5 const std::vector& _b_o_u_n_d_a_r_y_D_a_t_a () const │ │ │ │ │ +1096 { │ │ │ │ │ +1097 checkBoundaryData(); │ │ │ │ │ +1098 return boundarySegmentIndexToGmshPhysicalEntity_; │ │ │ │ │ +1099 } │ │ │ │ │ +1100 │ │ │ │ │ +_1_1_0_5 bool _h_a_s_E_l_e_m_e_n_t_D_a_t_a () const │ │ │ │ │ +1106 { return hasElementData_ && !extractedElementData_; } │ │ │ │ │ +1107 │ │ │ │ │ +_1_1_1_2 bool _h_a_s_B_o_u_n_d_a_r_y_D_a_t_a () const │ │ │ │ │ +1113 { return hasBoundaryData_ && !extractedBoundaryData_; } │ │ │ │ │ +1114 │ │ │ │ │ +_1_1_1_6 std::vector _e_x_t_r_a_c_t_E_l_e_m_e_n_t_D_a_t_a () │ │ │ │ │ +1117 { │ │ │ │ │ +1118 checkElementData(); │ │ │ │ │ +1119 extractedElementData_ = true; │ │ │ │ │ +1120 return std::move(elementIndexToGmshPhysicalEntity_); │ │ │ │ │ +1121 } │ │ │ │ │ +1122 │ │ │ │ │ +_1_1_2_4 std::vector _e_x_t_r_a_c_t_B_o_u_n_d_a_r_y_D_a_t_a () │ │ │ │ │ +1125 { │ │ │ │ │ +1126 checkBoundaryData(); │ │ │ │ │ +1127 extractedBoundaryData_ = true; │ │ │ │ │ +1128 return std::move(boundarySegmentIndexToGmshPhysicalEntity_); │ │ │ │ │ +1129 } │ │ │ │ │ +1130 │ │ │ │ │ +_1_1_3_2 std::unique_ptr _c_r_e_a_t_e_G_r_i_d () │ │ │ │ │ +1133 { │ │ │ │ │ +1134 if (!gridFactory_) │ │ │ │ │ +1135 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1136 "This GmshReader has been constructed with a Dune::GridFactory. " │ │ │ │ │ +1137 << "This grid factory has been filled with all information to create a │ │ │ │ │ +grid. " │ │ │ │ │ +1138 << "Please use this factory to create the grid by calling │ │ │ │ │ +factory.createGrid(). " │ │ │ │ │ +1139 << "Alternatively use the constructor without passing the factory in │ │ │ │ │ +combination with this member function." │ │ │ │ │ +1140 ); │ │ │ │ │ +1141 │ │ │ │ │ +1142 return gridFactory_->createGrid(); │ │ │ │ │ +1143 } │ │ │ │ │ +1144 │ │ │ │ │ +1145 //\} │ │ │ │ │ +1146 │ │ │ │ │ +1147 private: │ │ │ │ │ +1148 void checkElementData () const │ │ │ │ │ +1149 { │ │ │ │ │ +1150 if (!hasElementData_) │ │ │ │ │ +1151 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1152 "This GmshReader has been constructed without the option │ │ │ │ │ +'readElementData'. " │ │ │ │ │ +1153 << "Please enable reading element data by passing the option 'Gmsh:: │ │ │ │ │ +ReaderOpts::readElementData' " │ │ │ │ │ +1154 << "to the constructor of this class." │ │ │ │ │ +1155 ); │ │ │ │ │ +1156 │ │ │ │ │ +1157 if (extractedElementData_) │ │ │ │ │ +1158 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1159 "The element data has already been extracted from this GmshReader " │ │ │ │ │ +1160 << "via a function call to reader.extractElementData(). Use the extraced │ │ │ │ │ +data or " │ │ │ │ │ +1161 << "read the grid data from file again by constructing a new reader." │ │ │ │ │ +1162 ); │ │ │ │ │ +1163 } │ │ │ │ │ +1164 │ │ │ │ │ +1165 void checkBoundaryData () const │ │ │ │ │ +1166 { │ │ │ │ │ +1167 if (!hasBoundaryData_) │ │ │ │ │ +1168 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1169 "This GmshReader has been constructed without the option │ │ │ │ │ +'readBoundaryData'. " │ │ │ │ │ +1170 << "Please enable reading boundary data by passing the option 'Gmsh:: │ │ │ │ │ +ReaderOpts::readBoundaryData' " │ │ │ │ │ +1171 << "to the constructor of this class." │ │ │ │ │ +1172 ); │ │ │ │ │ +1173 │ │ │ │ │ +1174 if (extractedBoundaryData_) │ │ │ │ │ +1175 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1176 "The boundary data has already been extracted from this GmshReader " │ │ │ │ │ +1177 << "via a function call to reader.extractBoundaryData(). Use the extraced │ │ │ │ │ +data or " │ │ │ │ │ +1178 << "read the grid data from file again by constructing a new reader." │ │ │ │ │ +1179 ); │ │ │ │ │ +1180 } │ │ │ │ │ +1181 │ │ │ │ │ +1182 void readGridFile (const std::string& fileName, GridFactory& │ │ │ │ │ +factory, _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s options) │ │ │ │ │ +1183 { │ │ │ │ │ +1184 const bool _v_e_r_b_o_s_e = options & Opts::verbose; │ │ │ │ │ +1185 const bool _i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = options & Opts:: │ │ │ │ │ +insertBoundarySegments; │ │ │ │ │ +1186 const bool _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = options & Opts::readBoundaryData; │ │ │ │ │ +1187 const bool _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = options & Opts::readElementData; │ │ │ │ │ +1188 │ │ │ │ │ +1189 doRead( │ │ │ │ │ +1190 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_, │ │ │ │ │ +1191 elementIndexToGmshPhysicalEntity_, verbose, │ │ │ │ │ +1192 readBoundaryData || insertBoundarySegments │ │ │ │ │ +1193 ); │ │ │ │ │ +1194 │ │ │ │ │ +1195 // clear unwanted data │ │ │ │ │ +1196 if (!readBoundaryData) │ │ │ │ │ +1197 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector{}; │ │ │ │ │ +1198 if (!readElementData) │ │ │ │ │ +1199 elementIndexToGmshPhysicalEntity_ = std::vector{}; │ │ │ │ │ +1200 │ │ │ │ │ +1201 hasElementData_ = _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a; │ │ │ │ │ +1202 hasBoundaryData_ = _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a; │ │ │ │ │ +1203 } │ │ │ │ │ +1204 │ │ │ │ │ +1205 std::unique_ptr> gridFactory_; │ │ │ │ │ +1206 │ │ │ │ │ +1207 std::vector elementIndexToGmshPhysicalEntity_; │ │ │ │ │ +1208 std::vector boundarySegmentIndexToGmshPhysicalEntity_; │ │ │ │ │ +1209 │ │ │ │ │ +1210 bool hasElementData_; │ │ │ │ │ +1211 bool hasBoundaryData_; │ │ │ │ │ +1212 │ │ │ │ │ +1213 // for better error messages, we keep track of these separately │ │ │ │ │ +1214 bool extractedElementData_ = false; │ │ │ │ │ +1215 bool extractedBoundaryData_ = false; │ │ │ │ │ +1216 }; │ │ │ │ │ +1217 │ │ │ │ │ +1220} // namespace Dune │ │ │ │ │ +1221 │ │ │ │ │ +1222#endif │ │ │ │ │ +_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h │ │ │ │ │ +Base class for grid boundary segments of arbitrary geometry. │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ +ReaderOptions │ │ │ │ │ +Option for the Gmsh mesh file reader. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:758 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_v_e_r_b_o_s_e │ │ │ │ │ +@ verbose │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a │ │ │ │ │ +@ readBoundaryData │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_E_l_e_m_e_n_t_D_a_t_a │ │ │ │ │ +@ readElementData │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s │ │ │ │ │ +@ insertBoundarySegments │ │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ │ +void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ +> &b) │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ -OutputType │ │ │ │ │ -How the bulk data should be stored in the file. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ -@ ascii │ │ │ │ │ -Output to the file is in ascii. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ -std::string getEndiannessString() │ │ │ │ │ -determine endianness of this C++ implementation │ │ │ │ │ -DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -A base class for grid functions with any return type and dimension. │ │ │ │ │ -DDeeffiinniittiioonn function.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -Base class to write pvd-files which contains a list of all collected vtk-files. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ -Adds a field of vertex data to the VTK file. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_g_e_t_T_i_m_e_S_t_e_p_s │ │ │ │ │ -const std::vector< double > & getTimeSteps() const │ │ │ │ │ -Retrieve the current list of time steps. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_v_t_k_W_r_i_t_e_r │ │ │ │ │ -const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ -void write(double time, VTK::OutputType type=VTK::ascii) │ │ │ │ │ -Writes VTK data for the given time,. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(const std::shared_ptr< const typename VTKWriter< GridView │ │ │ │ │ ->::VTKFunction > &p) │ │ │ │ │ -Adds a field of vertex data to the VTK file. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const V &v, const std::string &name, int ncomps=1) │ │ │ │ │ -Adds a field of cell data to the VTK file. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -VTKSequenceWriterBase(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const │ │ │ │ │ -std::string &name, const std::string &path, const std::string &extendpath, int │ │ │ │ │ -rank, int size) │ │ │ │ │ -Set up the VTKSequenceWriterBase class. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const std::shared_ptr< const typename VTKWriter< GridView >:: │ │ │ │ │ -VTKFunction > &p) │ │ │ │ │ -Adds a field of cell data to the VTK file. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_s_e_t_T_i_m_e_S_t_e_p_s │ │ │ │ │ -void setTimeSteps(const std::vector< double > ×teps) │ │ │ │ │ -Set the current list of time steps. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:174 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_c_l_e_a_r │ │ │ │ │ -void clear() │ │ │ │ │ -Clears all VTK data added to the VTK writer. │ │ │ │ │ -DDeeffiinniittiioonn vtksequencewriterbase.hh:156 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ -Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_& │ │ │ │ │ +constexpr bool operator&(ReaderOptions a, ReaderOptions b) │ │ │ │ │ +query operator for reader options (is b set in a) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:774 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_| │ │ │ │ │ +constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b) │ │ │ │ │ +composition operator for reader options │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:766 │ │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t │ │ │ │ │ +Base class for classes implementing geometries of boundary segments. │ │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_:_:_c_o_m_m │ │ │ │ │ +Communication comm() const │ │ │ │ │ +Return the Communication used by the grid factory. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:297 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +virtual std::unique_ptr< GridType > createGrid() │ │ │ │ │ +Finalize grid creation and hand over the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:372 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ +Options for read operation. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_G_e_o_m_e_t_r_y_O_r_d_e_r │ │ │ │ │ +GeometryOrder │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_f_i_r_s_t_O_r_d_e_r │ │ │ │ │ +@ firstOrder │ │ │ │ │ +edges are straight lines. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_s_e_c_o_n_d_O_r_d_e_r │ │ │ │ │ +@ secondOrder │ │ │ │ │ +quadratic boundary approximation. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r │ │ │ │ │ +dimension independent parts for GmshReaderParser │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:302 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_p_a_s_s_1_H_a_n_d_l_e_E_l_e_m_e_n_t │ │ │ │ │ +void pass1HandleElement(FILE *file, const int elm_type, std::map< int, unsigned │ │ │ │ │ +int > &renumber, const std::vector< GlobalVector > &nodes) │ │ │ │ │ +Process one element during the first pass through the list of all elements. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:512 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:320 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_f_a_c_t_o_r_y │ │ │ │ │ +Dune::GridFactory< GridType > & factory │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:305 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_b_o_u_n_d_a_r_y_I_d_M_a_p │ │ │ │ │ +std::vector< int > & boundaryIdMap() │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:357 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t_I_n_d_e_x_M_a_p │ │ │ │ │ +std::vector< int > & elementIndexMap() │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:362 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_n_u_m_b_e_r___o_f___r_e_a_l___v_e_r_t_i_c_e_s │ │ │ │ │ +unsigned int number_of_real_vertices │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:308 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t │ │ │ │ │ +void boundarysegment_insert(const std::vector< FieldVector< double, 3 > > │ │ │ │ │ +&nodes, const E &elementDofs, const V &vertices) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:575 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r │ │ │ │ │ +GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:354 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t___c_o_u_n_t │ │ │ │ │ +int element_count │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_r_e_a_d │ │ │ │ │ +void read(const std::string &f) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:367 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_s_k_i_p_l_i_n_e │ │ │ │ │ +void skipline(FILE *file) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:344 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_r_e_a_d_f_i_l_e │ │ │ │ │ +void readfile(FILE *file, int cnt, const char *format, void *t1, void *t2=0, │ │ │ │ │ +void *t3=0, void *t4=0, void *t5=0, void *t6=0, void *t7=0, void *t8=0, void │ │ │ │ │ +*t9=0, void *t10=0) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:330 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_e_l_e_m_e_n_t___i_n_d_e_x___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y │ │ │ │ │ +std::vector< int > element_index_to_physical_entity │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:316 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_p_a_s_s_2_H_a_n_d_l_e_E_l_e_m_e_n_t │ │ │ │ │ +virtual void pass2HandleElement(FILE *file, const int elm_type, std::map< int, │ │ │ │ │ +unsigned int > &renumber, const std::vector< GlobalVector > &nodes, const int │ │ │ │ │ +physical_entity) │ │ │ │ │ +Process one element during the second pass through the list of all elements. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:600 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_d_i_m │ │ │ │ │ +static const int dim │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ +FieldVector< double, dimWorld > GlobalVector │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:324 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_f_i_l_e_N_a_m_e │ │ │ │ │ +std::string fileName │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:313 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t │ │ │ │ │ +int boundary_element_count │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:309 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t │ │ │ │ │ +void boundarysegment_insert(const V &, const E &, const V2 &) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:564 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_v_e_r_b_o_s_e │ │ │ │ │ +bool verbose │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:306 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_b_o_u_n_d_a_r_y___i_d___t_o___p_h_y_s_i_c_a_l___e_n_t_i_t_y │ │ │ │ │ +std::vector< int > boundary_id_to_physical_entity │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:315 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_b_u_f │ │ │ │ │ +char buf[512] │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:312 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_:_:_i_n_s_e_r_t___b_o_u_n_d_a_r_y___s_e_g_m_e_n_t_s │ │ │ │ │ +bool insert_boundary_segments │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:307 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +Read Gmsh mesh file. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:807 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static std::unique_ptr< Grid > read(const std::string &fileName, std::vector< │ │ │ │ │ +int > &boundarySegmentToPhysicalEntity, std::vector< int > │ │ │ │ │ +&elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true) │ │ │ │ │ +Read Gmsh file, possibly with data. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:933 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_e_l_e_m_e_n_t_D_a_t_a │ │ │ │ │ +const std::vector< int > & elementData() const │ │ │ │ │ +Access element data (maps element index to Gmsh physical entity) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1088 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static void read(Dune::GridFactory< Grid > &factory, const std::string │ │ │ │ │ +&fileName, DataFlagArg boundarySegmentData, DataArg elementData, bool │ │ │ │ │ +verbose=true) │ │ │ │ │ +read Gmsh file, possibly with data │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:983 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static std::unique_ptr< Grid > read(const std::string &fileName, bool │ │ │ │ │ +verbose=true, bool insertBoundarySegments=true) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:904 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static void read(Dune::GridFactory< Grid > &factory, const std::string │ │ │ │ │ +&fileName, bool verbose=true, bool insertBoundarySegments=true) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:950 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ +GridType Grid │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:896 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +std::unique_ptr< Grid > createGrid() │ │ │ │ │ +Create the grid. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1132 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_e_x_t_r_a_c_t_B_o_u_n_d_a_r_y_D_a_t_a │ │ │ │ │ +std::vector< int > extractBoundaryData() │ │ │ │ │ +Erase boundary data from reader and return the data. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1124 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static void read(Dune::GridFactory< Grid > &factory, const std::string │ │ │ │ │ +&fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< │ │ │ │ │ +int > &elementToPhysicalEntity, bool verbose, bool insertBoundarySegments) │ │ │ │ │ +Read Gmsh file, possibly with data. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1020 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_h_a_s_E_l_e_m_e_n_t_D_a_t_a │ │ │ │ │ +bool hasElementData() const │ │ │ │ │ +If element data is available. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1105 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_h_a_s_B_o_u_n_d_a_r_y_D_a_t_a │ │ │ │ │ +bool hasBoundaryData() const │ │ │ │ │ +If boundary data is available. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1112 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_d_e_f_a_u_l_t_O_p_t_s │ │ │ │ │ +static constexpr Opts defaultOpts │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1040 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +GmshReader(const std::string &fileName, GridFactory< Grid > &factory, Gmsh:: │ │ │ │ │ +ReaderOptions options=defaultOpts) │ │ │ │ │ +Construct a Gmsh reader object from a file name and a grid factory. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1081 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +GmshReader(const std::string &fileName, Gmsh::ReaderOptions │ │ │ │ │ +options=defaultOpts) │ │ │ │ │ +Construct a Gmsh reader object (alternatively use one of the static member │ │ │ │ │ +functions) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1067 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_e_x_t_r_a_c_t_E_l_e_m_e_n_t_D_a_t_a │ │ │ │ │ +std::vector< int > extractElementData() │ │ │ │ │ +Erase element data from reader and return the data. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1116 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_b_o_u_n_d_a_r_y_D_a_t_a │ │ │ │ │ +const std::vector< int > & boundaryData() const │ │ │ │ │ +Access boundary data (maps boundary segment index to Gmsh physical entity) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:1095 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +GmshReader()=default │ │ │ │ │ +Dynamic Gmsh reader interface. │ │ │ │ │ +_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: printgrid.hh File Reference │ │ │ │ +dune-grid: gnuplot.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,39 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
printgrid.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
gnuplot.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ + │ │ │ │ +

Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ +More...

│ │ │ │ +
#include "../gnuplot.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<typename GridType >
void Dune::printGrid (const GridType &grid, const Dune::MPIHelper &helper, std::string output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, bool local_corner_indices=true, bool local_intersection_indices=true, bool outer_normals=true)
 Print a grid as a gnuplot for testing and development.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Implementation of gnuplot output for 1D and 2D grids.

│ │ │ │ +
Author
Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,23 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -printgrid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ + * _g_n_u_p_l_o_t │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +gnuplot.cc File Reference │ │ │ │ │ +Implementation of gnuplot output for 1D and 2D grids. _M_o_r_e_._._. │ │ │ │ │ +#include "_._._/_g_n_u_p_l_o_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_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -void  _D_u_n_e_:_:_p_r_i_n_t_G_r_i_d (const GridType &grid, const Dune::MPIHelper &helper, │ │ │ │ │ - std::string output_file="printgrid", int size=2000, bool │ │ │ │ │ - execute_plot=true, bool png=true, bool local_corner_indices=true, bool │ │ │ │ │ - local_intersection_indices=true, bool outer_normals=true) │ │ │ │ │ -  Print a grid as a gnuplot for testing and development. │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ │ + Author │ │ │ │ │ + Christian Engwer │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: printgrid.hh Source File │ │ │ │ +dune-grid: gnuplot.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,226 +70,136 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
printgrid.hh
│ │ │ │ +
gnuplot.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_PRINTGRID_HH
│ │ │ │ -
6#define DUNE_PRINTGRID_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <string>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ -
12#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
17 namespace {
│ │ │ │ -
18
│ │ │ │ -
19 template<int dim>
│ │ │ │ -
20 struct ElementDataLayout
│ │ │ │ -
21 {
│ │ │ │ -
22 bool contains (Dune::GeometryType gt)
│ │ │ │ -
23 {
│ │ │ │ -
24 return gt.dim()==dim;
│ │ │ │ -
25 }
│ │ │ │ -
26 };
│ │ │ │ -
27
│ │ │ │ -
28 template<int dim>
│ │ │ │ -
29 struct NodeDataLayout
│ │ │ │ -
30 {
│ │ │ │ -
31 bool contains (Dune::GeometryType gt)
│ │ │ │ -
32 {
│ │ │ │ -
33 return gt.dim()==0;
│ │ │ │ -
34 }
│ │ │ │ -
35 };
│ │ │ │ -
36
│ │ │ │ -
37 // Move a point closer to basegeo's center by factor scale (used for drawing relative to the element)
│ │ │ │ -
38 template <typename B, typename C>
│ │ │ │ -
39 C centrify (const B& basegeo, const C& coords, const double scale) {
│ │ │ │ -
40 C ret = coords;
│ │ │ │ -
41 ret -= basegeo.center();
│ │ │ │ -
42 ret *= scale;
│ │ │ │ -
43 ret += basegeo.center();
│ │ │ │ -
44 return ret;
│ │ │ │ -
45 }
│ │ │ │ -
46
│ │ │ │ -
47 // Add a line to the plotfile from p1 to p2
│ │ │ │ -
48 template <typename Coord>
│ │ │ │ -
49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2, std::string options) {
│ │ │ │ -
50 plotfile << "set object poly from ";
│ │ │ │ -
51 plotfile << p1[0] << "," << p1[1] << " to ";
│ │ │ │ -
52 plotfile << p2[0] << "," << p2[1] << " to ";
│ │ │ │ -
53 plotfile << p1[0] << "," << p1[1];
│ │ │ │ -
54 plotfile << " " << options << std::endl;
│ │ │ │ -
55 }
│ │ │ │ -
56
│ │ │ │ -
57 }
│ │ │ │ -
58
│ │ │ │ -
72 template <typename GridType>
│ │ │ │ -
│ │ │ │ -
73 void printGrid (const GridType& grid, const Dune::MPIHelper& helper, std::string output_file = "printgrid",
│ │ │ │ -
74 int size = 2000, bool execute_plot = true, bool png = true, bool local_corner_indices = true,
│ │ │ │ -
75 bool local_intersection_indices = true, bool outer_normals = true)
│ │ │ │ -
76 {
│ │ │ │ -
77
│ │ │ │ -
78 // Create output file
│ │ │ │ -
79 output_file = output_file + "_" + std::to_string(helper.rank());
│ │ │ │ -
80 std::string plot_file_name = output_file + ".gnuplot";
│ │ │ │ -
81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc);
│ │ │ │ -
82 if (!plotfile.is_open()) {
│ │ │ │ -
83 DUNE_THROW(Dune::IOError, "Could not create plot file " << output_file << "!");
│ │ │ │ -
84 return;
│ │ │ │ -
85 }
│ │ │ │ -
86
│ │ │ │ -
87 // Basic plot settings
│ │ │ │ -
88 plotfile << "set size ratio -1" << std::endl;
│ │ │ │ -
89 if (png) {
│ │ │ │ -
90 plotfile << "set terminal png size " << size << "," << size << std::endl;
│ │ │ │ -
91 plotfile << "set output '" << output_file << ".png'" << std::endl;
│ │ │ │ -
92 } else {
│ │ │ │ -
93 plotfile << "set terminal svg size " << size << "," << size << " enhanced background rgb 'white'" << std::endl;
│ │ │ │ -
94 plotfile << "set output '" << output_file << ".svg'" << std::endl;
│ │ │ │ -
95 }
│ │ │ │ -
96
│ │ │ │ -
97 // Get GridView
│ │ │ │ -
98 typedef typename GridType::LeafGridView GV;
│ │ │ │ -
99 const GV gv = grid.leafGridView();
│ │ │ │ -
100
│ │ │ │ -
101 // Create mappers used to retrieve indices
│ │ │ │ - │ │ │ │ -
103 const Mapper elementmapper(gv, mcmgElementLayout());
│ │ │ │ -
104 const Mapper nodemapper(gv, mcmgVertexLayout());
│ │ │ │ -
105
│ │ │ │ -
106 // Create iterators
│ │ │ │ -
107 typedef typename GV::template Codim<0 >::Iterator LeafIterator;
│ │ │ │ -
108 typedef typename GV::IntersectionIterator IntersectionIterator;
│ │ │ │ -
109
│ │ │ │ -
110 LeafIterator it = gv.template begin<0>();
│ │ │ │ -
111
│ │ │ │ -
112 // Will contain min/max coordinates. Needed for scaling of the plot
│ │ │ │ -
113 Dune::FieldVector<typename GridType::ctype,2> max_coord (it->geometry().center()), min_coord (max_coord);
│ │ │ │ +
10#include "../gnuplot.hh"
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune {
│ │ │ │ +
13
│ │ │ │ +
17 template<class GridView>
│ │ │ │ +
18 void
│ │ │ │ +
│ │ │ │ +
19 GnuplotWriter<GridView>::write(const std::string& filename) const
│ │ │ │ +
20 {
│ │ │ │ +
21 // open file
│ │ │ │ +
22 std::ofstream file(filename.c_str());
│ │ │ │ +
23 // write all column names
│ │ │ │ +
24 file << "# coord\t";
│ │ │ │ +
25 for (size_t i=0; i<_names.size(); i++)
│ │ │ │ +
26 file << _names[i] << "\t";
│ │ │ │ +
27 file << "\n";
│ │ │ │ +
28
│ │ │ │ +
29 if (dimworld==1) {
│ │ │ │ +
30#if !NDEBUG
│ │ │ │ +
31 int counter = 0;
│ │ │ │ +
32#endif
│ │ │ │ +
33 typedef typename GridView::template Codim<0>::Iterator CellIterator;
│ │ │ │ +
34 CellIterator it = _gv.template begin<0>();
│ │ │ │ +
35 CellIterator end = _gv.template end<0>();
│ │ │ │ +
36 for (; it != end; ++it)
│ │ │ │ +
37 {
│ │ │ │ +
38 int i = _is.index(*it);
│ │ │ │ +
39 // check that the elements are numbered consecutively
│ │ │ │ +
40 assert (i == counter++);
│ │ │ │ +
41 // calc positions
│ │ │ │ +
42 assert(it->geometry().corners() == 2);
│ │ │ │ +
43 const FieldVector<ctype,dimworld>& left = it->geometry().corner(0);
│ │ │ │ +
44 const FieldVector<ctype,dimworld>& right = it->geometry().corner(1);
│ │ │ │ +
45 assert(left[0] < right[0]);
│ │ │ │ +
46 // write gnuplot rows for left & right vertex
│ │ │ │ +
47 writeRow(file, left, _data[2*i]);
│ │ │ │ +
48 writeRow(file, right, _data[2*i+1]);
│ │ │ │ +
49 }
│ │ │ │ +
50
│ │ │ │ +
51 } else {
│ │ │ │ +
52
│ │ │ │ +
53 typedef typename GridView::template Codim<dimworld>::Iterator VertexIterator;
│ │ │ │ +
54 VertexIterator it = _gv.template begin<dimworld>();
│ │ │ │ +
55 VertexIterator end = _gv.template end<dimworld>();
│ │ │ │ +
56 for (; it != end; ++it) {
│ │ │ │ +
57
│ │ │ │ +
58 // write gnuplot rows for vertex
│ │ │ │ +
59 writeRow(file, it->geometry().corner(0), _data[_is.index(*it)]);
│ │ │ │ +
60
│ │ │ │ +
61 }
│ │ │ │ +
62
│ │ │ │ +
63 }
│ │ │ │ +
64
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 template<class GridView>
│ │ │ │ +
68 void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
70 const FieldVector<ctype,dimworld>& position,
│ │ │ │ +
71 const std::vector<float> & data) const
│ │ │ │ +
72 {
│ │ │ │ +
73 assert (data.size() == _names.size());
│ │ │ │ +
74 // write position
│ │ │ │ +
75 file << position << "\t";
│ │ │ │ +
76 // write all data columns
│ │ │ │ +
77 for (size_t j=0; j<data.size(); j++)
│ │ │ │ +
78 file << data[j] << "\t";
│ │ │ │ +
79 file << "\n";
│ │ │ │ +
80 }
│ │ │ │ +
81
│ │ │ │ +
87 template<class GridView>
│ │ │ │ +
88 template<class DataContainer>
│ │ │ │ +
89 void
│ │ │ │ +
90 GnuplotWriter<GridView>::addData(DataType t, const DataContainer& data, const std::string & name)
│ │ │ │ +
91 {
│ │ │ │ +
92 assert((t == cellData && _is.size(0) == data.size())
│ │ │ │ +
93 || (t == vertexData && _is.size(GridView::dimension) == data.size()) );
│ │ │ │ +
94 _names.push_back(name);
│ │ │ │ +
95
│ │ │ │ +
96 // copy data to new container
│ │ │ │ +
97
│ │ │ │ +
98 if (dimworld==1) {
│ │ │ │ +
99
│ │ │ │ +
100 // data is transformed to nonconforming vertex data
│ │ │ │ +
101 int c = 0;
│ │ │ │ +
102 int shift = (t==vertexData ? 1 : 0);
│ │ │ │ +
103 for (size_t i=0; i<_is.size(0); i++)
│ │ │ │ +
104 {
│ │ │ │ +
105 _data[c++].push_back(data[i]);
│ │ │ │ +
106 _data[c++].push_back(data[i+shift]);
│ │ │ │ +
107 };
│ │ │ │ +
108
│ │ │ │ +
109 } else {
│ │ │ │ +
110
│ │ │ │ +
111 // 2d: only vertex data is allowed
│ │ │ │ +
112 for (size_t i=0; i<_is.size(dimworld); i++)
│ │ │ │ +
113 _data[i].push_back(data[i]);
│ │ │ │
114
│ │ │ │ -
115 // Iterate over elements
│ │ │ │ -
116 for (; it != gv.template end<0>(); ++it) {
│ │ │ │ -
117
│ │ │ │ -
118 const auto& entity = *it;
│ │ │ │ -
119 auto geo = entity.geometry();
│ │ │ │ -
120
│ │ │ │ -
121 // Plot element index
│ │ │ │ -
122 int element_id = elementmapper.index(entity);
│ │ │ │ -
123 plotfile << "set label at " << geo.center()[0] << "," << geo.center()[1] << " '"
│ │ │ │ -
124 << element_id << "' center" << std::endl;
│ │ │ │ -
125
│ │ │ │ -
126 for (int i = 0; i < geo.corners(); ++i) {
│ │ │ │ -
127 // Plot corner indices
│ │ │ │ -
128 const int globalNodeNumber1 = nodemapper.subIndex(entity, i, 2);
│ │ │ │ -
129 auto labelpos = centrify (geo, geo.corner(i), 0.7);
│ │ │ │ -
130 plotfile << "set label at " << labelpos[0] << "," << labelpos[1] << " '" << globalNodeNumber1;
│ │ │ │ -
131 if (local_corner_indices)
│ │ │ │ -
132 plotfile << "(" << i << ")";
│ │ │ │ -
133 plotfile << "' center" << std::endl;
│ │ │ │ -
134
│ │ │ │ -
135 // Adapt min / max coordinates
│ │ │ │ -
136 for (int dim = 0; dim < 2; ++dim) {
│ │ │ │ -
137 if (geo.corner(i)[dim] < min_coord[dim])
│ │ │ │ -
138 min_coord[dim] = geo.corner(i)[dim];
│ │ │ │ -
139 else if (geo.corner(i)[dim] > max_coord[dim])
│ │ │ │ -
140 max_coord[dim] = geo.corner(i)[dim];
│ │ │ │ -
141 }
│ │ │ │ -
142 }
│ │ │ │ -
143
│ │ │ │ -
144 // Iterate over intersections
│ │ │ │ -
145 for (IntersectionIterator is = gv.ibegin(entity); is != gv.iend(entity); ++is) {
│ │ │ │ -
146
│ │ │ │ -
147 const auto& intersection = *is;
│ │ │ │ -
148 auto igeo = intersection.geometry();
│ │ │ │ -
149
│ │ │ │ -
150 // Draw intersection line
│ │ │ │ -
151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), "fs empty border 1");
│ │ │ │ -
152
│ │ │ │ -
153 // Plot local intersection index
│ │ │ │ -
154 if (local_intersection_indices) {
│ │ │ │ -
155 auto label_pos = centrify (geo, igeo.center(), 0.8);
│ │ │ │ -
156 plotfile << "set label at " << label_pos[0] << "," << label_pos[1]
│ │ │ │ -
157 << " '" << intersection.indexInInside() << "' center" << std::endl;
│ │ │ │ -
158 }
│ │ │ │ -
159
│ │ │ │ -
160 // Plot outer normal
│ │ │ │ -
161 if (outer_normals) {
│ │ │ │ -
162 auto intersection_pos = igeo.center();
│ │ │ │ -
163 auto normal = intersection.centerUnitOuterNormal();
│ │ │ │ -
164 normal *= 0.15 * igeo.volume();
│ │ │ │ -
165 auto normal_end = intersection_pos + normal;
│ │ │ │ -
166 plotfile << "set arrow from " << intersection_pos[0] << "," << intersection_pos[1]
│ │ │ │ -
167 << " to " << normal_end[0] << "," << normal_end[1] << " lt rgb \"gray\"" << std::endl;
│ │ │ │ -
168 }
│ │ │ │ -
169
│ │ │ │ -
170 // Get corners for inner intersection representation
│ │ │ │ -
171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5);
│ │ │ │ -
172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5);
│ │ │ │ -
173
│ │ │ │ -
174 // Thick line in case of boundary()
│ │ │ │ -
175 if (intersection.boundary())
│ │ │ │ -
176 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 3 lw 4");
│ │ │ │ -
177
│ │ │ │ -
178 // Thin line with color according to neighbor()
│ │ │ │ -
179 if (intersection.neighbor())
│ │ │ │ -
180 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 2");
│ │ │ │ -
181 else
│ │ │ │ -
182 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 1");
│ │ │ │ -
183 }
│ │ │ │ -
184
│ │ │ │ -
185 }
│ │ │ │ -
186
│ │ │ │ -
187 // Finish plot, pass extend of the grid
│ │ │ │ -
188 Dune::FieldVector<typename GridType::ctype,2> extend (max_coord - min_coord);
│ │ │ │ -
189
│ │ │ │ -
190 extend *= 0.2;
│ │ │ │ -
191 min_coord -= extend;
│ │ │ │ -
192 max_coord += extend;
│ │ │ │ -
193 plotfile << "plot [" << min_coord[0] << ":" << max_coord[0] << "] [" << min_coord[1]
│ │ │ │ -
194 << ":" << max_coord[1] << "] NaN notitle" << std::endl;
│ │ │ │ -
195 plotfile.close();
│ │ │ │ -
196
│ │ │ │ -
197 if (execute_plot) {
│ │ │ │ -
198 std::string cmd = "gnuplot -p '" + plot_file_name + "'";
│ │ │ │ -
199 if (std::system (cmd.c_str()) != 0)
│ │ │ │ -
200 DUNE_THROW(Dune::Exception,"Error running GNUPlot: " << cmd);
│ │ │ │ -
201 }
│ │ │ │ -
202 }
│ │ │ │ +
115 }
│ │ │ │ +
116
│ │ │ │ +
117 }
│ │ │ │ +
118
│ │ │ │ +
119}
│ │ │ │
│ │ │ │ -
203
│ │ │ │ -
204}
│ │ │ │ -
205
│ │ │ │ -
206#endif // #ifndef DUNE_PRINTGRID_HH
│ │ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ │ -
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │ -
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, bool local_corner_indices=true, bool local_intersection_indices=true, bool outer_normals=true)
Print a grid as a gnuplot for testing and development.
Definition printgrid.hh:73
│ │ │ │ -
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
│ │ │ │ -
Mapper interface.
Definition mapper.hh:110
│ │ │ │ -
Index index(const EntityType &e) const
Map entity to array index.
Definition mapper.hh:122
│ │ │ │ -
Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity i of codim cc of a codim 0 entity to array index.
Definition mapper.hh:136
│ │ │ │ -
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ +
Writer for 1D grids in gnuplot format.
Definition gnuplot.hh:30
│ │ │ │ +
void write(const std::string &filename) const
Write Gnuplot file to disk.
Definition gnuplot.cc:19
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,259 +2,139 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -printgrid.hh │ │ │ │ │ + * _g_n_u_p_l_o_t │ │ │ │ │ +gnuplot.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// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_PRINTGRID_HH │ │ │ │ │ -6#define DUNE_PRINTGRID_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ │ -16 │ │ │ │ │ -17 namespace { │ │ │ │ │ -18 │ │ │ │ │ -19 template │ │ │ │ │ -20 struct ElementDataLayout │ │ │ │ │ -21 { │ │ │ │ │ -22 bool contains (Dune::GeometryType gt) │ │ │ │ │ -23 { │ │ │ │ │ -24 return gt.dim()==dim; │ │ │ │ │ -25 } │ │ │ │ │ -26 }; │ │ │ │ │ -27 │ │ │ │ │ -28 template │ │ │ │ │ -29 struct NodeDataLayout │ │ │ │ │ -30 { │ │ │ │ │ -31 bool contains (Dune::GeometryType gt) │ │ │ │ │ -32 { │ │ │ │ │ -33 return gt.dim()==0; │ │ │ │ │ -34 } │ │ │ │ │ -35 }; │ │ │ │ │ -36 │ │ │ │ │ -37 // Move a point closer to basegeo's center by factor scale (used for drawing │ │ │ │ │ -relative to the element) │ │ │ │ │ -38 template │ │ │ │ │ -39 C centrify (const B& basegeo, const C& coords, const double scale) { │ │ │ │ │ -40 C ret = coords; │ │ │ │ │ -41 ret -= basegeo.center(); │ │ │ │ │ -42 ret *= scale; │ │ │ │ │ -43 ret += basegeo.center(); │ │ │ │ │ -44 return ret; │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -47 // Add a line to the plotfile from p1 to p2 │ │ │ │ │ -48 template │ │ │ │ │ -49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2, │ │ │ │ │ -std::string options) { │ │ │ │ │ -50 plotfile << "set object poly from "; │ │ │ │ │ -51 plotfile << p1[0] << "," << p1[1] << " to "; │ │ │ │ │ -52 plotfile << p2[0] << "," << p2[1] << " to "; │ │ │ │ │ -53 plotfile << p1[0] << "," << p1[1]; │ │ │ │ │ -54 plotfile << " " << options << std::endl; │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -72 template │ │ │ │ │ -_7_3 void _p_r_i_n_t_G_r_i_d (const GridType& grid, const Dune::MPIHelper& helper, std:: │ │ │ │ │ -string output_file = "printgrid", │ │ │ │ │ -74 int size = 2000, bool execute_plot = true, bool png = true, bool │ │ │ │ │ -local_corner_indices = true, │ │ │ │ │ -75 bool local_intersection_indices = true, bool outer_normals = true) │ │ │ │ │ -76 { │ │ │ │ │ -77 │ │ │ │ │ -78 // Create output file │ │ │ │ │ -79 output_file = output_file + "_" + std::to_string(helper.rank()); │ │ │ │ │ -80 std::string plot_file_name = output_file + ".gnuplot"; │ │ │ │ │ -81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc); │ │ │ │ │ -82 if (!plotfile.is_open()) { │ │ │ │ │ -83 DUNE_THROW(Dune::IOError, "Could not create plot file " << output_file << │ │ │ │ │ -"!"); │ │ │ │ │ -84 return; │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -87 // Basic plot settings │ │ │ │ │ -88 plotfile << "set size ratio -1" << std::endl; │ │ │ │ │ -89 if (png) { │ │ │ │ │ -90 plotfile << "set terminal png size " << size << "," << size << std::endl; │ │ │ │ │ -91 plotfile << "set output '" << output_file << ".png'" << std::endl; │ │ │ │ │ -92 } else { │ │ │ │ │ -93 plotfile << "set terminal svg size " << size << "," << size << " enhanced │ │ │ │ │ -background rgb 'white'" << std::endl; │ │ │ │ │ -94 plotfile << "set output '" << output_file << ".svg'" << std::endl; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97 // Get GridView │ │ │ │ │ -98 typedef typename GridType::LeafGridView GV; │ │ │ │ │ -99 const GV gv = grid.leafGridView(); │ │ │ │ │ -100 │ │ │ │ │ -101 // Create mappers used to retrieve indices │ │ │ │ │ -102 typedef typename _D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ │ -103 const _M_a_p_p_e_r elementmapper(gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t()); │ │ │ │ │ -104 const _M_a_p_p_e_r nodemapper(gv, _m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t()); │ │ │ │ │ -105 │ │ │ │ │ -106 // Create iterators │ │ │ │ │ -107 typedef typename GV::template Codim<0 >::Iterator LeafIterator; │ │ │ │ │ -108 typedef typename GV::IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -109 │ │ │ │ │ -110 LeafIterator it = gv.template begin<0>(); │ │ │ │ │ -111 │ │ │ │ │ -112 // Will contain min/max coordinates. Needed for scaling of the plot │ │ │ │ │ -113 Dune::FieldVector max_coord (it->geometry │ │ │ │ │ -().center()), min_coord (max_coord); │ │ │ │ │ +10#include "../gnuplot.hh" │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ │ +13 │ │ │ │ │ +17 template │ │ │ │ │ +18 void │ │ │ │ │ +_1_9 _G_n_u_p_l_o_t_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e(const std::string& filename) const │ │ │ │ │ +20 { │ │ │ │ │ +21 // open file │ │ │ │ │ +22 std::ofstream file(filename.c_str()); │ │ │ │ │ +23 // write all column names │ │ │ │ │ +24 file << "# coord\t"; │ │ │ │ │ +25 for (size_t i=0; i<_names.size(); i++) │ │ │ │ │ +26 file << _names[i] << "\t"; │ │ │ │ │ +27 file << "\n"; │ │ │ │ │ +28 │ │ │ │ │ +29 if (dimworld==1) { │ │ │ │ │ +30#if !NDEBUG │ │ │ │ │ +31 int counter = 0; │ │ │ │ │ +32#endif │ │ │ │ │ +33 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim<0>::Iterator CellIterator; │ │ │ │ │ +34 CellIterator it = _gv.template begin<0>(); │ │ │ │ │ +35 CellIterator end = _gv.template end<0>(); │ │ │ │ │ +36 for (; it != end; ++it) │ │ │ │ │ +37 { │ │ │ │ │ +38 int i = _is.index(*it); │ │ │ │ │ +39 // check that the elements are numbered consecutively │ │ │ │ │ +40 assert (i == counter++); │ │ │ │ │ +41 // calc positions │ │ │ │ │ +42 assert(it->geometry().corners() == 2); │ │ │ │ │ +43 const FieldVector& left = it->geometry().corner(0); │ │ │ │ │ +44 const FieldVector& right = it->geometry().corner(1); │ │ │ │ │ +45 assert(left[0] < right[0]); │ │ │ │ │ +46 // write gnuplot rows for left & right vertex │ │ │ │ │ +47 writeRow(file, left, _data[2*i]); │ │ │ │ │ +48 writeRow(file, right, _data[2*i+1]); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +51 } else { │ │ │ │ │ +52 │ │ │ │ │ +53 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim::Iterator │ │ │ │ │ +VertexIterator; │ │ │ │ │ +54 VertexIterator it = _gv.template begin(); │ │ │ │ │ +55 VertexIterator end = _gv.template end(); │ │ │ │ │ +56 for (; it != end; ++it) { │ │ │ │ │ +57 │ │ │ │ │ +58 // write gnuplot rows for vertex │ │ │ │ │ +59 writeRow(file, it->geometry().corner(0), _data[_is.index(*it)]); │ │ │ │ │ +60 │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +67 template │ │ │ │ │ +68 void │ │ │ │ │ +_6_9 _G_n_u_p_l_o_t_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_R_o_w(std::ostream & file, │ │ │ │ │ +70 const FieldVector& position, │ │ │ │ │ +71 const std::vector & data) const │ │ │ │ │ +72 { │ │ │ │ │ +73 assert (data.size() == _names.size()); │ │ │ │ │ +74 // write position │ │ │ │ │ +75 file << position << "\t"; │ │ │ │ │ +76 // write all data columns │ │ │ │ │ +77 for (size_t j=0; j │ │ │ │ │ +88 template │ │ │ │ │ +89 void │ │ │ │ │ +90 _G_n_u_p_l_o_t_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_a_d_d_D_a_t_a(DataType t, const DataContainer& data, │ │ │ │ │ +const std::string & name) │ │ │ │ │ +91 { │ │ │ │ │ +92 assert((t == cellData && _is.size(0) == data.size()) │ │ │ │ │ +93 || (t == vertexData && _is.size(_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n) == data.size()) ); │ │ │ │ │ +94 _names.push_back(name); │ │ │ │ │ +95 │ │ │ │ │ +96 // copy data to new container │ │ │ │ │ +97 │ │ │ │ │ +98 if (dimworld==1) { │ │ │ │ │ +99 │ │ │ │ │ +100 // data is transformed to nonconforming vertex data │ │ │ │ │ +101 int c = 0; │ │ │ │ │ +102 int shift = (t==vertexData ? 1 : 0); │ │ │ │ │ +103 for (size_t i=0; i<_is.size(0); i++) │ │ │ │ │ +104 { │ │ │ │ │ +105 _data[c++].push_back(data[i]); │ │ │ │ │ +106 _data[c++].push_back(data[i+shift]); │ │ │ │ │ +107 }; │ │ │ │ │ +108 │ │ │ │ │ +109 } else { │ │ │ │ │ +110 │ │ │ │ │ +111 // 2d: only vertex data is allowed │ │ │ │ │ +112 for (size_t i=0; i<_is.size(dimworld); i++) │ │ │ │ │ +113 _data[i].push_back(data[i]); │ │ │ │ │ 114 │ │ │ │ │ -115 // Iterate over elements │ │ │ │ │ -116 for (; it != gv.template end<0>(); ++it) { │ │ │ │ │ -117 │ │ │ │ │ -118 const auto& entity = *it; │ │ │ │ │ -119 auto geo = entity.geometry(); │ │ │ │ │ -120 │ │ │ │ │ -121 // Plot element index │ │ │ │ │ -122 int element_id = elementmapper._i_n_d_e_x(entity); │ │ │ │ │ -123 plotfile << "set label at " << geo.center()[0] << "," << geo.center()[1] << │ │ │ │ │ -" '" │ │ │ │ │ -124 << element_id << "' center" << std::endl; │ │ │ │ │ -125 │ │ │ │ │ -126 for (int i = 0; i < geo.corners(); ++i) { │ │ │ │ │ -127 // Plot corner indices │ │ │ │ │ -128 const int globalNodeNumber1 = nodemapper._s_u_b_I_n_d_e_x(entity, i, 2); │ │ │ │ │ -129 auto labelpos = centrify (geo, geo.corner(i), 0.7); │ │ │ │ │ -130 plotfile << "set label at " << labelpos[0] << "," << labelpos[1] << " '" << │ │ │ │ │ -globalNodeNumber1; │ │ │ │ │ -131 if (local_corner_indices) │ │ │ │ │ -132 plotfile << "(" << i << ")"; │ │ │ │ │ -133 plotfile << "' center" << std::endl; │ │ │ │ │ -134 │ │ │ │ │ -135 // Adapt min / max coordinates │ │ │ │ │ -136 for (int dim = 0; dim < 2; ++dim) { │ │ │ │ │ -137 if (geo.corner(i)[dim] < min_coord[dim]) │ │ │ │ │ -138 min_coord[dim] = geo.corner(i)[dim]; │ │ │ │ │ -139 else if (geo.corner(i)[dim] > max_coord[dim]) │ │ │ │ │ -140 max_coord[dim] = geo.corner(i)[dim]; │ │ │ │ │ -141 } │ │ │ │ │ -142 } │ │ │ │ │ -143 │ │ │ │ │ -144 // Iterate over intersections │ │ │ │ │ -145 for (_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r is = gv.ibegin(entity); is != gv.iend(entity); │ │ │ │ │ -++is) { │ │ │ │ │ -146 │ │ │ │ │ -147 const auto& intersection = *is; │ │ │ │ │ -148 auto igeo = intersection.geometry(); │ │ │ │ │ -149 │ │ │ │ │ -150 // Draw intersection line │ │ │ │ │ -151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), "fs empty border 1"); │ │ │ │ │ -152 │ │ │ │ │ -153 // Plot local intersection index │ │ │ │ │ -154 if (local_intersection_indices) { │ │ │ │ │ -155 auto label_pos = centrify (geo, igeo.center(), 0.8); │ │ │ │ │ -156 plotfile << "set label at " << label_pos[0] << "," << label_pos[1] │ │ │ │ │ -157 << " '" << intersection.indexInInside() << "' center" << std::endl; │ │ │ │ │ -158 } │ │ │ │ │ -159 │ │ │ │ │ -160 // Plot outer normal │ │ │ │ │ -161 if (outer_normals) { │ │ │ │ │ -162 auto intersection_pos = igeo.center(); │ │ │ │ │ -163 auto normal = intersection.centerUnitOuterNormal(); │ │ │ │ │ -164 normal *= 0.15 * igeo.volume(); │ │ │ │ │ -165 auto normal_end = intersection_pos + normal; │ │ │ │ │ -166 plotfile << "set arrow from " << intersection_pos[0] << "," << │ │ │ │ │ -intersection_pos[1] │ │ │ │ │ -167 << " to " << normal_end[0] << "," << normal_end[1] << " lt rgb \"gray\"" << │ │ │ │ │ -std::endl; │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -170 // Get corners for inner intersection representation │ │ │ │ │ -171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5); │ │ │ │ │ -172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5); │ │ │ │ │ -173 │ │ │ │ │ -174 // Thick line in case of boundary() │ │ │ │ │ -175 if (intersection.boundary()) │ │ │ │ │ -176 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 3 lw │ │ │ │ │ -4"); │ │ │ │ │ -177 │ │ │ │ │ -178 // Thin line with color according to neighbor() │ │ │ │ │ -179 if (intersection.neighbor()) │ │ │ │ │ -180 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 2"); │ │ │ │ │ -181 else │ │ │ │ │ -182 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 1"); │ │ │ │ │ -183 } │ │ │ │ │ -184 │ │ │ │ │ -185 } │ │ │ │ │ -186 │ │ │ │ │ -187 // Finish plot, pass extend of the grid │ │ │ │ │ -188 Dune::FieldVector extend (max_coord - │ │ │ │ │ -min_coord); │ │ │ │ │ -189 │ │ │ │ │ -190 extend *= 0.2; │ │ │ │ │ -191 min_coord -= extend; │ │ │ │ │ -192 max_coord += extend; │ │ │ │ │ -193 plotfile << "plot [" << min_coord[0] << ":" << max_coord[0] << "] [" << │ │ │ │ │ -min_coord[1] │ │ │ │ │ -194 << ":" << max_coord[1] << "] NaN notitle" << std::endl; │ │ │ │ │ -195 plotfile.close(); │ │ │ │ │ -196 │ │ │ │ │ -197 if (execute_plot) { │ │ │ │ │ -198 std::string cmd = "gnuplot -p '" + plot_file_name + "'"; │ │ │ │ │ -199 if (std::system (cmd.c_str()) != 0) │ │ │ │ │ -200 DUNE_THROW(Dune::Exception,"Error running GNUPlot: " << cmd); │ │ │ │ │ -201 } │ │ │ │ │ -202 } │ │ │ │ │ -203 │ │ │ │ │ -204} │ │ │ │ │ -205 │ │ │ │ │ -206#endif // #ifndef DUNE_PRINTGRID_HH │ │ │ │ │ -_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ -Mapper for multiple codim and multiple geometry types. │ │ │ │ │ -_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ -MCMGLayout mcmgElementLayout() │ │ │ │ │ -layout for elements (codim-0 entities) │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t │ │ │ │ │ -MCMGLayout mcmgVertexLayout() │ │ │ │ │ -layout for vertices (dim-0 entities) │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:107 │ │ │ │ │ +115 } │ │ │ │ │ +116 │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +119} │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_p_r_i_n_t_G_r_i_d │ │ │ │ │ -void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string │ │ │ │ │ -output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, │ │ │ │ │ -bool local_corner_indices=true, bool local_intersection_indices=true, bool │ │ │ │ │ -outer_normals=true) │ │ │ │ │ -Print a grid as a gnuplot for testing and development. │ │ │ │ │ -DDeeffiinniittiioonn printgrid.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Mesh entities of codimension 0 ("elements") allow to visit all intersections │ │ │ │ │ -with "neighboring" eleme... │ │ │ │ │ -DDeeffiinniittiioonn common/intersectioniterator.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r │ │ │ │ │ -Mapper interface. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ │ -Map entity to array index. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ -unsigned int codim) const │ │ │ │ │ -Map subentity i of codim cc of a codim 0 entity to array index. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +A struct that collects all associated types of one implementation from the │ │ │ │ │ +Traits class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +Writer for 1D grids in gnuplot format. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +void write(const std::string &filename) const │ │ │ │ │ +Write Gnuplot file to disk. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.cc:19 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │ More...

│ │ │ │
#include <vector>
│ │ │ │ #include <string>
│ │ │ │ #include <iostream>
│ │ │ │ #include <fstream>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ -#include "gnuplot/gnuplot.cc"
│ │ │ │ +#include "gnuplot/gnuplot.cc"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html │ │ │ │ @@ -177,18 +177,18 @@ │ │ │ │
109 {}
│ │ │ │ │ │ │ │
110 };
│ │ │ │ │ │ │ │
111
│ │ │ │
112}
│ │ │ │
113
│ │ │ │ -
114#include "gnuplot/gnuplot.cc"
│ │ │ │ +
114#include "gnuplot/gnuplot.cc"
│ │ │ │
115
│ │ │ │
116#endif // DUNE_IO_GNUPLOT_HH
│ │ │ │ -
Implementation of gnuplot output for 1D and 2D grids.
│ │ │ │ +
Implementation of gnuplot output for 1D and 2D grids.
│ │ │ │
Traits::IndexSet IndexSet
type of the index set
Definition common/gridview.hh:86
│ │ │ │
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:151
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │
Writer for 1D grids in gnuplot format.
Definition gnuplot.hh:30
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00974.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │

The UGGrid class. │ │ │ │ More...

│ │ │ │
#include <memory>
│ │ │ │ #include <dune/common/classname.hh>
│ │ │ │ #include <dune/common/parallel/communication.hh>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ +#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ #include "uggrid/ugincludes.hh"
│ │ │ │ #include "uggrid/ugwrapper.hh"
│ │ │ │ #include "uggrid/ug_undefs.hh"
│ │ │ │ #include "uggrid/uggridgeometry.hh"
│ │ │ │ #include "uggrid/uggridlocalgeometry.hh"
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
13#include <memory>
│ │ │ │
14
│ │ │ │
15#include <dune/common/classname.hh>
│ │ │ │
16#include <dune/common/parallel/communication.hh>
│ │ │ │
17#include <dune/common/exceptions.hh>
│ │ │ │
18#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
19
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │
23
│ │ │ │
24#if HAVE_DUNE_UGGRID || DOXYGEN
│ │ │ │
25
│ │ │ │
26#ifdef ModelP
│ │ │ │
27#include <dune/common/parallel/mpicommunication.hh>
│ │ │ │ @@ -660,15 +660,15 @@ │ │ │ │
811
│ │ │ │
812 }
│ │ │ │
813
│ │ │ │
814} // namespace Dune
│ │ │ │
815
│ │ │ │
816#endif // HAVE_DUNE_UGGRID || DOXYGEN
│ │ │ │
817#endif // DUNE_UGGRID_HH
│ │ │ │ -
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │
The specialization of the generic GridFactory for UGGrid.
│ │ │ │
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Communication< No_Comm > UGCommunication
Definition uggrid.hh:137
│ │ │ │
Specialize with 'true' for all codims that a grid implements entities for. (default=false)
Definition common/capabilities.hh:58
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00977.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │ │ │ │ │

The specialization of the generic GridFactory for UGGrid. │ │ │ │ More...

│ │ │ │
#include <array>
│ │ │ │ #include <memory>
│ │ │ │ #include <vector>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ +#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ #include <dune/grid/common/gridfactory.hh>
│ │ │ │ #include <dune/grid/uggrid.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GnuplotWriter< GridView >
 Writer for 1D grids in gnuplot format. More...
│ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ │
8
│ │ │ │
14#include <array>
│ │ │ │
15#include <memory>
│ │ │ │
16#include <vector>
│ │ │ │
17
│ │ │ │
18#include <dune/common/fvector.hh>
│ │ │ │
19
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
22#include <dune/grid/uggrid.hh>
│ │ │ │
23
│ │ │ │
24namespace Dune {
│ │ │ │
25
│ │ │ │
26
│ │ │ │
162 template <int dimworld>
│ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │
303
│ │ │ │
304 };
│ │ │ │ │ │ │ │
305
│ │ │ │
306}
│ │ │ │
307
│ │ │ │
308#endif
│ │ │ │ -
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │
The UGGrid class.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Base class for classes implementing geometries of boundary segments.
Definition boundarysegment.hh:94
│ │ │ │
GridFamily::Traits::LeafIntersection LeafIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition common/grid.hh:456
│ │ │ │
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:73
│ │ │ │
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition common/gridfactory.hh:220
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00980.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: tensorgridfactory.hh File Reference │ │ │ │ +dune-grid: persistentcontainerwrapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,50 +72,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
tensorgridfactory.hh File Reference
│ │ │ │ +
persistentcontainerwrapper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

This file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series. │ │ │ │ -More...

│ │ │ │ -
#include <array>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <dune/grid/yaspgrid.hh>
│ │ │ │ -#include <dune/grid/utility/multiindex.hh>
│ │ │ │ +
#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │ +#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

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

│ │ │ │ Classes

class  Dune::TensorGridFactory< Grid >
 A factory class for conveniently creating tensorproduct grids. More...
 
class  Dune::TensorGridFactoryCreator< Grid >
 
class  Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >
class  Dune::PersistentContainerWrapper< G, T >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

This file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series.

│ │ │ │ -

The grid generation process is implemented for unstructured grids and for YaspGrid.

│ │ │ │ -
Author
Dominic Kempf
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,46 +2,20 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -tensorgridfactory.hh File Reference │ │ │ │ │ -This file provides a factory class for tensorproduct grids. This is a │ │ │ │ │ -collection of methods to generate monotonous sequences as needed for a │ │ │ │ │ -tensorproduct grid. Apart from easy ones for locally equidistant grids, there │ │ │ │ │ -are also more involved methods like splitting a range according to a geometric │ │ │ │ │ -series. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +persistentcontainerwrapper.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_ _> │ │ │ │ │ -  A factory class for conveniently creating tensorproduct grids. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_, │ │ │ │ │ - _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_<_ _G_,_ _T_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file provides a factory class for tensorproduct grids. This is a │ │ │ │ │ -collection of methods to generate monotonous sequences as needed for a │ │ │ │ │ -tensorproduct grid. Apart from easy ones for locally equidistant grids, there │ │ │ │ │ -are also more involved methods like splitting a range according to a geometric │ │ │ │ │ -series. │ │ │ │ │ -The grid generation process is implemented for unstructured grids and for │ │ │ │ │ -YaspGrid. │ │ │ │ │ - Author │ │ │ │ │ - Dominic Kempf │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: tensorgridfactory.hh Source File │ │ │ │ +dune-grid: persistentcontainerwrapper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,403 +74,150 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
tensorgridfactory.hh
│ │ │ │ +
persistentcontainerwrapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
│ │ │ │ -
4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
│ │ │ │ -
5
│ │ │ │ -
20#include<array>
│ │ │ │ -
21#include<memory>
│ │ │ │ -
22#include<vector>
│ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
13
│ │ │ │ +
14 // PersistentContainerWrapper
│ │ │ │ +
15 // --------------------------
│ │ │ │ +
16
│ │ │ │ +
17 template< class G, class T >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
19 {
│ │ │ │ + │ │ │ │ +
21
│ │ │ │ + │ │ │ │
23
│ │ │ │ -
24#include <dune/common/fvector.hh>
│ │ │ │ - │ │ │ │ -
26#include <dune/grid/yaspgrid.hh>
│ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29namespace Dune
│ │ │ │ -
30{
│ │ │ │ -
31 // forward declaration of TensorGridFactoryCreator, which is the real factory
│ │ │ │ -
32 // that should be specialized for each grid.
│ │ │ │ -
33 template<typename Grid>
│ │ │ │ -
34 class TensorGridFactoryCreator;
│ │ │ │ +
24 typedef typename HostGridAccess::HostGrid HostGrid;
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef G Grid;
│ │ │ │ +
29
│ │ │ │ + │ │ │ │ + │ │ │ │ +
32
│ │ │ │ + │ │ │ │ + │ │ │ │
35
│ │ │ │ -
40 template<typename Grid>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
42 {
│ │ │ │ -
43 public:
│ │ │ │ -
44 typedef typename Grid::Traits::Communication Comm;
│ │ │ │ -
45 typedef typename Grid::ctype ctype;
│ │ │ │ -
46 static const int dim = Grid::dimension;
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 std::unique_ptr<Grid> createGrid(Comm comm = Comm())
│ │ │ │ -
49 {
│ │ │ │ -
50 TensorGridFactoryCreator<Grid> creator(*this);
│ │ │ │ -
51 return creator.createGrid(comm);
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
54 std::array<std::vector<ctype> , dim> coords() const
│ │ │ │ -
55 {
│ │ │ │ -
56 return _coords;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 std::vector<ctype>& operator[](std::size_t d)
│ │ │ │ -
61 {
│ │ │ │ -
62 return _coords[d];
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
│ │ │ │ -
66 const std::vector<ctype>& operator[](std::size_t d) const
│ │ │ │ -
67 {
│ │ │ │ -
68 return _coords[d];
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
36 PersistentContainerWrapper ( const Grid &grid, int codim, const Value &value = Value() )
│ │ │ │ +
37 : hostContainer_( HostGridAccess::hostGrid( grid ), codim, value )
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
40 template< class Entity >
│ │ │ │ +
│ │ │ │ +
41 const Value &operator[] ( const Entity &entity ) const
│ │ │ │ +
42 {
│ │ │ │ +
43 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46 template< class Entity >
│ │ │ │ +
│ │ │ │ +
47 Value &operator[] ( const Entity &entity )
│ │ │ │ +
48 {
│ │ │ │ +
49 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 template< class Entity >
│ │ │ │ +
│ │ │ │ +
53 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ +
54 {
│ │ │ │ +
55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 template< class Entity >
│ │ │ │ +
│ │ │ │ +
59 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ +
60 {
│ │ │ │ +
61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64 Size size () const { return hostContainer_.size(); }
│ │ │ │ +
65
│ │ │ │ +
66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value ); }
│ │ │ │ + │ │ │ │ +
68
│ │ │ │ +
69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }
│ │ │ │
70
│ │ │ │ -
│ │ │ │ -
79 void setStart (int d, ctype value)
│ │ │ │ -
80 {
│ │ │ │ -
81 _coords[d].resize(1);
│ │ │ │ -
82 _coords[d][0] = value;
│ │ │ │ -
83 }
│ │ │ │ +
71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }
│ │ │ │ +
72
│ │ │ │ +
73 ConstIterator begin () const { return hostContainer_.begin(); }
│ │ │ │ + │ │ │ │ +
75
│ │ │ │ +
76 ConstIterator end () const { return hostContainer_.end(); }
│ │ │ │ +
77 Iterator end () { return hostContainer_.end(); }
│ │ │ │ +
78
│ │ │ │ +
79 int codimension () const { return hostContainer_.codimension(); }
│ │ │ │ +
80
│ │ │ │ +
81 protected:
│ │ │ │ + │ │ │ │ +
83 };
│ │ │ │
│ │ │ │
84
│ │ │ │ -
│ │ │ │ -
93 void fillIntervals (int d, int n, ctype h)
│ │ │ │ -
94 {
│ │ │ │ -
95 emptyCheck (d);
│ │ │ │ -
96 for (int i = 0; i < n; i++)
│ │ │ │ -
97 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ -
98 }
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ -
108 void fillRange (int d, int n, ctype end)
│ │ │ │ -
109 {
│ │ │ │ -
110 emptyCheck (d);
│ │ │ │ -
111 const ctype h = (end - _coords[d].back ()) / n;
│ │ │ │ -
112 for (int i = 0; i < n - 1; i++)
│ │ │ │ -
113 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ -
114 _coords[d].push_back (end);
│ │ │ │ -
115 }
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
│ │ │ │ -
125 void fillUntil (int d, ctype h, ctype end)
│ │ │ │ -
126 {
│ │ │ │ -
127 emptyCheck (d);
│ │ │ │ -
128 while (_coords[d].back () < end)
│ │ │ │ -
129 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
│ │ │ │ -
144 void geometricFillIntervals (int d, int n, ctype ratio, ctype h0 =
│ │ │ │ -
145 static_cast<ctype> (0))
│ │ │ │ -
146 {
│ │ │ │ -
147 emptyCheck (d);
│ │ │ │ -
148 ctype h = h0;
│ │ │ │ -
149 if (h0 == static_cast<ctype>(0))
│ │ │ │ -
150 h = lastInterval (d) * ratio;
│ │ │ │ -
151 for (int i = 0; i < n; i++)
│ │ │ │ -
152 {
│ │ │ │ -
153 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ -
154 h *= ratio;
│ │ │ │ -
155 }
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
│ │ │ │ -
170 void geometricFillUntil (int d, ctype ratio, ctype end, ctype h0 = static_cast<ctype> (0))
│ │ │ │ -
171 {
│ │ │ │ -
172 emptyCheck (d);
│ │ │ │ -
173 ctype h = h0;
│ │ │ │ -
174 if (h0 == static_cast<ctype>(0))
│ │ │ │ -
175 h = lastInterval (d) * ratio;
│ │ │ │ -
176 while (_coords[d].back () < end)
│ │ │ │ -
177 {
│ │ │ │ -
178 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ -
179 h *= ratio;
│ │ │ │ -
180 }
│ │ │ │ -
181 }
│ │ │ │ -
│ │ │ │ -
182
│ │ │ │ -
│ │ │ │ -
197 void geometricFillRange (int d, int n, ctype end, ctype h =
│ │ │ │ -
198 static_cast<ctype> (0),
│ │ │ │ -
199 bool first = true)
│ │ │ │ -
200 {
│ │ │ │ -
201 emptyCheck (d);
│ │ │ │ -
202 if (h < 1e-8)
│ │ │ │ -
203 h = lastInterval (d);
│ │ │ │ -
204 ctype ratio = newton (n, _coords[d].back (), end, h);
│ │ │ │ -
205 if (!first)
│ │ │ │ -
206 {
│ │ │ │ -
207 h = h * pow (ratio, n - 1);
│ │ │ │ -
208 ratio = 1 / ratio;
│ │ │ │ -
209 }
│ │ │ │ -
210 for (int i = 0; i < n - 1; i++)
│ │ │ │ -
211 {
│ │ │ │ -
212 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ -
213 h *= ratio;
│ │ │ │ -
214 }
│ │ │ │ -
215 _coords[d].push_back (end);
│ │ │ │ -
216 }
│ │ │ │ -
│ │ │ │ -
217
│ │ │ │ -
│ │ │ │ -
219 void print()
│ │ │ │ -
220 {
│ │ │ │ -
221 for (int i=0; i<dim; i++)
│ │ │ │ -
222 {
│ │ │ │ -
223 std::cout << "Container in direction " << i << ":" << std::endl << "Coordinates: ";
│ │ │ │ -
224 for (auto it = _coords[i].begin(); it != _coords[i].end(); ++it)
│ │ │ │ -
225 std::cout << *it << " ";
│ │ │ │ -
226 std::cout << std::endl << "Interval lengths: ";
│ │ │ │ -
227
│ │ │ │ -
228 std::vector<ctype> meshsize;
│ │ │ │ -
229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;)
│ │ │ │ -
230 {
│ │ │ │ -
231 meshsize.push_back(-1.*(*it));
│ │ │ │ -
232 ++it;
│ │ │ │ -
233 meshsize.back() += *it;
│ │ │ │ -
234 }
│ │ │ │ -
235
│ │ │ │ -
236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it)
│ │ │ │ -
237 std::cout << *it << " ";
│ │ │ │ -
238 std::cout << std::endl << "Ratios between interval lengths: ";
│ │ │ │ -
239
│ │ │ │ -
240 std::vector<ctype> ratios;
│ │ │ │ -
241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;)
│ │ │ │ -
242 ratios.push_back((1./(*it)) * *(++it));
│ │ │ │ -
243
│ │ │ │ -
244 for (auto it = ratios.begin(); it != ratios.end(); ++it)
│ │ │ │ -
245 std::cout << *it << " ";
│ │ │ │ -
246 std::cout << std::endl << std::endl << std::endl;
│ │ │ │ -
247 }
│ │ │ │ -
248 }
│ │ │ │ -
│ │ │ │ -
249
│ │ │ │ -
250 private:
│ │ │ │ -
251 // check whether the ith component is empty and add a 0.0 entry if so
│ │ │ │ -
252 void emptyCheck (int i)
│ │ │ │ -
253 {
│ │ │ │ -
254 if (_coords[i].empty ())
│ │ │ │ -
255 _coords[i].push_back (static_cast<ctype> (0));
│ │ │ │ -
256 }
│ │ │ │ -
257
│ │ │ │ -
258 // returns the last interval length in direction d
│ │ │ │ -
259 ctype lastInterval (int d)
│ │ │ │ -
260 {
│ │ │ │ -
261 if (_coords[d].size () < 2)
│ │ │ │ -
262 DUNE_THROW(
│ │ │ │ -
263 GridError,
│ │ │ │ -
264 "Not enough elements in coordinate container to deduce interval length in TensorYaspFactory");
│ │ │ │ -
265 else
│ │ │ │ -
266 return _coords[d].back () - _coords[d][_coords[d].size () - 2];
│ │ │ │ -
267 }
│ │ │ │ -
268
│ │ │ │ -
272 ctype newton (int n, ctype x_s, ctype x_e, ctype h)
│ │ │ │ -
273 {
│ │ │ │ -
274 ctype m = (x_e - x_s) / h;
│ │ │ │ -
275 ctype xold = 0.0;
│ │ │ │ -
276 ctype xnew = x_e - x_s;
│ │ │ │ -
277 while (std::abs (xnew - xold) > 1E-8)
│ │ │ │ -
278 {
│ │ │ │ -
279 xold = xnew;
│ │ │ │ -
280 xnew = xold
│ │ │ │ -
281 - (-pow (xold, n) + m * xold - m + 1)
│ │ │ │ -
282 / (-n * pow (xold, n - 1) + m);
│ │ │ │ -
283 }
│ │ │ │ -
284 if (std::abs (xnew - 1) < 1E-6)
│ │ │ │ -
285 {
│ │ │ │ -
286 xold = x_e - x_s;
│ │ │ │ -
287 xnew = 0.0;
│ │ │ │ -
288 while (std::abs (xnew - xold) > 1E-8)
│ │ │ │ -
289 {
│ │ │ │ -
290 xold = xnew;
│ │ │ │ -
291 xnew = xold
│ │ │ │ -
292 - (-pow (xold, n) + m * xold - m + 1)
│ │ │ │ -
293 / (-n * pow (xold, n - 1) + m);
│ │ │ │ -
294 }
│ │ │ │ -
295 }
│ │ │ │ -
296 return xnew;
│ │ │ │ -
297 }
│ │ │ │ -
298
│ │ │ │ -
299 std::array<std::vector<ctype>, dim> _coords;
│ │ │ │ -
300 };
│ │ │ │ -
│ │ │ │ -
301
│ │ │ │ -
302 // class that implements the actual grid creation process. The default is implementing
│ │ │ │ -
303 // standard creation for unstructured grids. Provide a specialization for other grids.
│ │ │ │ -
304 template<typename Grid>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
306 {
│ │ │ │ -
307 public:
│ │ │ │ -
308 typedef typename Grid::Traits::Communication Comm;
│ │ │ │ -
309 typedef typename Grid::ctype ctype;
│ │ │ │ -
310 static const int dim = Grid::dimension;
│ │ │ │ -
311
│ │ │ │ -
312 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
│ │ │ │ -
313
│ │ │ │ -
│ │ │ │ -
314 std::unique_ptr<Grid> createGrid(Comm comm)
│ │ │ │ -
315 {
│ │ │ │ -
316 // The grid factory
│ │ │ │ - │ │ │ │ -
318
│ │ │ │ -
319 if (comm.rank() == 0)
│ │ │ │ -
320 {
│ │ │ │ -
321 // determine the size of the grid
│ │ │ │ -
322 std::array<unsigned int, dim> vsizes, esizes;
│ │ │ │ -
323 std::size_t size = 1;
│ │ │ │ -
324 for (std::size_t i = 0; i<dim; ++i)
│ │ │ │ -
325 {
│ │ │ │ -
326 vsizes[i] = _factory[i].size();
│ │ │ │ -
327 esizes[i] = vsizes[i] - 1;
│ │ │ │ -
328 size *= vsizes[i];
│ │ │ │ -
329 }
│ │ │ │ -
330
│ │ │ │ -
331 // insert all vertices
│ │ │ │ - │ │ │ │ -
333 for (std::size_t i=0; i<size; ++i, ++index)
│ │ │ │ -
334 {
│ │ │ │ -
335 Dune::FieldVector<ctype, dim> position;
│ │ │ │ -
336 for (std::size_t j = 0; j<dim; ++j)
│ │ │ │ -
337 position[j] = _factory[j][index[j]];
│ │ │ │ -
338 fac.insertVertex(position);
│ │ │ │ -
339 }
│ │ │ │ -
340
│ │ │ │ -
341 // compute the offsets
│ │ │ │ -
342 std::array<std::size_t, dim> offsets;
│ │ │ │ -
343 offsets[0] = 1;
│ │ │ │ -
344 for (std::size_t i=1; i<dim; i++)
│ │ │ │ -
345 offsets[i] = offsets[i-1] * vsizes[i-1];
│ │ │ │ -
346
│ │ │ │ -
347 // Compute an element template (the cube at (0,...,0). All
│ │ │ │ -
348 // other cubes are constructed by moving this template around
│ │ │ │ -
349 unsigned int nCorners = 1<<dim;
│ │ │ │ -
350
│ │ │ │ -
351 std::vector<unsigned int> cornersTemplate(nCorners,0);
│ │ │ │ -
352
│ │ │ │ -
353 for (size_t i=0; i<nCorners; i++)
│ │ │ │ -
354 for (int j=0; j<dim; j++)
│ │ │ │ -
355 if ( i & (1<<j) )
│ │ │ │ -
356 cornersTemplate[i] += offsets[j];
│ │ │ │ -
357
│ │ │ │ -
358 // Insert elements
│ │ │ │ - │ │ │ │ -
360
│ │ │ │ -
361 // Compute the total number of elements to be created
│ │ │ │ -
362 int numElements = eindex.cycle();
│ │ │ │ -
363
│ │ │ │ -
364 for (int i=0; i<numElements; i++, ++eindex)
│ │ │ │ -
365 {
│ │ │ │ -
366 // 'base' is the index of the lower left element corner
│ │ │ │ -
367 unsigned int base = 0;
│ │ │ │ -
368 for (int j=0; j<dim; j++)
│ │ │ │ -
369 base += eindex[j] * offsets[j];
│ │ │ │ -
370
│ │ │ │ -
371 // insert new element
│ │ │ │ -
372 std::vector<unsigned int> corners = cornersTemplate;
│ │ │ │ -
373 for (size_t j=0; j<corners.size(); j++)
│ │ │ │ -
374 corners[j] += base;
│ │ │ │ -
375
│ │ │ │ -
376 fac.insertElement(GeometryTypes::cube(dim), corners);
│ │ │ │ -
377 }
│ │ │ │ -
378 }
│ │ │ │ -
379
│ │ │ │ -
380 return std::unique_ptr<Grid>(fac.createGrid());
│ │ │ │ -
381 }
│ │ │ │ -
│ │ │ │ -
382
│ │ │ │ -
383 private:
│ │ │ │ -
384 const TensorGridFactory<Grid>& _factory;
│ │ │ │ -
385 };
│ │ │ │ -
│ │ │ │ -
386
│ │ │ │ -
387 template<typename ctype, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
389 {
│ │ │ │ -
390 public:
│ │ │ │ - │ │ │ │ -
392 typedef typename Grid::Communication Comm;
│ │ │ │ -
393
│ │ │ │ -
394 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
│ │ │ │ -
395
│ │ │ │ -
│ │ │ │ -
396 std::unique_ptr<Grid> createGrid(Comm comm)
│ │ │ │ -
397 {
│ │ │ │ -
398 return std::make_unique<Grid>(_factory.coords(), std::bitset<dim>(0ULL), 1, comm);
│ │ │ │ -
399 }
│ │ │ │ -
│ │ │ │ -
400 private:
│ │ │ │ -
401 const TensorGridFactory<Grid>& _factory;
│ │ │ │ -
402 };
│ │ │ │ -
│ │ │ │ -
403}
│ │ │ │ -
404
│ │ │ │ -
405#endif
│ │ │ │ -
Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
│ │ │ │ - │ │ │ │ +
85} // namespace Dune
│ │ │ │ +
86
│ │ │ │ +
87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh:532
│ │ │ │ -
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:314
│ │ │ │ -
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:346
│ │ │ │ -
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:335
│ │ │ │ -
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:372
│ │ │ │ -
Definition multiindex.hh:19
│ │ │ │ -
size_t cycle() const
Compute how many times you can call operator++ before getting to (0,...,0) again.
Definition multiindex.hh:48
│ │ │ │ -
Definition tensorgridfactory.hh:306
│ │ │ │ -
Grid::ctype ctype
Definition tensorgridfactory.hh:309
│ │ │ │ -
Grid::Traits::Communication Comm
Definition tensorgridfactory.hh:308
│ │ │ │ -
TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
Definition tensorgridfactory.hh:312
│ │ │ │ -
std::unique_ptr< Grid > createGrid(Comm comm)
Definition tensorgridfactory.hh:314
│ │ │ │ -
static const int dim
Definition tensorgridfactory.hh:310
│ │ │ │ -
A factory class for conveniently creating tensorproduct grids.
Definition tensorgridfactory.hh:42
│ │ │ │ -
void fillRange(int d, int n, ctype end)
fills the range to end with n intervals in direction d
Definition tensorgridfactory.hh:108
│ │ │ │ -
void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype >(0), bool first=true)
fills a coordinate range in direction d with n intervals according to a geometric series
Definition tensorgridfactory.hh:197
│ │ │ │ -
Grid::ctype ctype
Definition tensorgridfactory.hh:45
│ │ │ │ -
void fillUntil(int d, ctype h, ctype end)
adds intervals in direction d until a given coordinate is reached
Definition tensorgridfactory.hh:125
│ │ │ │ -
void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast< ctype >(0))
adds intervals in direction d according with a given length ratio until a given coordinate is reached
Definition tensorgridfactory.hh:170
│ │ │ │ -
static const int dim
Definition tensorgridfactory.hh:46
│ │ │ │ -
void print()
print the coordinate information given to the factory so far
Definition tensorgridfactory.hh:219
│ │ │ │ -
void fillIntervals(int d, int n, ctype h)
pushs n intervals of length h in direction d
Definition tensorgridfactory.hh:93
│ │ │ │ -
void setStart(int d, ctype value)
set a starting value in a given direction d
Definition tensorgridfactory.hh:79
│ │ │ │ -
void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast< ctype >(0))
adds n intervals in direction d with a given length ratio and a given starting interval length.
Definition tensorgridfactory.hh:144
│ │ │ │ -
std::vector< ctype > & operator[](std::size_t d)
allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
Definition tensorgridfactory.hh:60
│ │ │ │ -
const std::vector< ctype > & operator[](std::size_t d) const
allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
Definition tensorgridfactory.hh:66
│ │ │ │ -
std::unique_ptr< Grid > createGrid(Comm comm=Comm())
Definition tensorgridfactory.hh:48
│ │ │ │ -
Grid::Traits::Communication Comm
Definition tensorgridfactory.hh:44
│ │ │ │ -
std::array< std::vector< ctype >, dim > coords() const
Definition tensorgridfactory.hh:54
│ │ │ │ -
std::unique_ptr< Grid > createGrid(Comm comm)
Definition tensorgridfactory.hh:396
│ │ │ │ -
TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
Definition tensorgridfactory.hh:394
│ │ │ │ - │ │ │ │ -
YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid
Definition tensorgridfactory.hh:391
│ │ │ │ -
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ -
typename Base::Communication Communication
Definition yaspgrid.hh:178
│ │ │ │ -
Coordinate container for a tensor product YaspGrid.
Definition coordinates.hh:245
│ │ │ │ -
Provide a generic factory class for unstructured grids.
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ + │ │ │ │ +
void swap(This &other)
Definition persistentcontainermap.hh:97
│ │ │ │ +
void fill(const Value &value)
Definition persistentcontainermap.hh:95
│ │ │ │ +
int codimension() const
Definition persistentcontainermap.hh:111
│ │ │ │ +
void resize(const Value &value=Value())
Definition persistentcontainermap.hh:87
│ │ │ │ +
ConstIterator begin() const
Definition persistentcontainermap.hh:175
│ │ │ │ +
ConstIterator end() const
Definition persistentcontainermap.hh:190
│ │ │ │ +
Size size() const
Definition persistentcontainermap.hh:85
│ │ │ │ +
void shrinkToFit()
Definition persistentcontainermap.hh:93
│ │ │ │ +
Definition persistentcontainerwrapper.hh:19
│ │ │ │ +
void fill(const Value &value=Value())
Definition persistentcontainerwrapper.hh:69
│ │ │ │ +
PersistentContainer< HostGrid, T >::ConstIterator ConstIterator
Definition persistentcontainerwrapper.hh:34
│ │ │ │ +
Size size() const
Definition persistentcontainerwrapper.hh:64
│ │ │ │ +
ConstIterator begin() const
Definition persistentcontainerwrapper.hh:73
│ │ │ │ +
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainerwrapper.hh:53
│ │ │ │ +
G Grid
Definition persistentcontainerwrapper.hh:28
│ │ │ │ +
const Value & operator[](const Entity &entity) const
Definition persistentcontainerwrapper.hh:41
│ │ │ │ +
void resize(const Value &value=Value())
Definition persistentcontainerwrapper.hh:66
│ │ │ │ +
PersistentContainer< HostGrid, T >::Size Size
Definition persistentcontainerwrapper.hh:31
│ │ │ │ +
int codimension() const
Definition persistentcontainerwrapper.hh:79
│ │ │ │ +
PersistentContainer< HostGrid, T >::Value Value
Definition persistentcontainerwrapper.hh:30
│ │ │ │ +
void swap(This &other)
Definition persistentcontainerwrapper.hh:71
│ │ │ │ +
ConstIterator end() const
Definition persistentcontainerwrapper.hh:76
│ │ │ │ +
PersistentContainerWrapper(const Grid &grid, int codim, const Value &value=Value())
Definition persistentcontainerwrapper.hh:36
│ │ │ │ +
PersistentContainer< HostGrid, T >::Iterator Iterator
Definition persistentcontainerwrapper.hh:33
│ │ │ │ +
void shrinkToFit()
Definition persistentcontainerwrapper.hh:67
│ │ │ │ +
Iterator begin()
Definition persistentcontainerwrapper.hh:74
│ │ │ │ +
PersistentContainer< HostGrid, T > hostContainer_
Definition persistentcontainerwrapper.hh:82
│ │ │ │ +
Iterator end()
Definition persistentcontainerwrapper.hh:77
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,481 +1,198 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -tensorgridfactory.hh │ │ │ │ │ +persistentcontainerwrapper.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH │ │ │ │ │ -4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH │ │ │ │ │ -5 │ │ │ │ │ -20#include │ │ │ │ │ -21#include │ │ │ │ │ -22#include │ │ │ │ │ +3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ +5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ +13 │ │ │ │ │ +14 // PersistentContainerWrapper │ │ │ │ │ +15 // -------------------------- │ │ │ │ │ +16 │ │ │ │ │ +17 template< class G, class T > │ │ │ │ │ +_1_8 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r │ │ │ │ │ +19 { │ │ │ │ │ +20 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_<_ _G_,_ _T_ _> _T_h_i_s; │ │ │ │ │ +21 │ │ │ │ │ +22 typedef _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_ _> _H_o_s_t_G_r_i_d_A_c_c_e_s_s; │ │ │ │ │ 23 │ │ │ │ │ -24#include │ │ │ │ │ -25#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -26#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ -27#include<_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -28 │ │ │ │ │ -29namespace _D_u_n_e │ │ │ │ │ -30{ │ │ │ │ │ -31 // forward declaration of TensorGridFactoryCreator, which is the real │ │ │ │ │ -factory │ │ │ │ │ -32 // that should be specialized for each grid. │ │ │ │ │ -33 template │ │ │ │ │ -34 class TensorGridFactoryCreator; │ │ │ │ │ +24 typedef typename HostGridAccess::HostGrid HostGrid; │ │ │ │ │ +25 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _> _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_H_o_s_t_G_r_i_d; │ │ │ │ │ +26 │ │ │ │ │ +27 public: │ │ │ │ │ +_2_8 typedef G _G_r_i_d; │ │ │ │ │ +29 │ │ │ │ │ +_3_0 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_V_a_l_u_e _V_a_l_u_e; │ │ │ │ │ +_3_1 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_S_i_z_e _S_i_z_e; │ │ │ │ │ +32 │ │ │ │ │ +_3_3 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_I_t_e_r_a_t_o_r _I_t_e_r_a_t_o_r; │ │ │ │ │ +_3_4 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +_C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ 35 │ │ │ │ │ -40 template │ │ │ │ │ -_4_1 class _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +_3_6 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r ( const _G_r_i_d &grid, int codim, const _V_a_l_u_e &value │ │ │ │ │ += _V_a_l_u_e() ) │ │ │ │ │ +37 : _h_o_s_t_C_o_n_t_a_i_n_e_r__( _H_o_s_t_G_r_i_d_A_c_c_e_s_s::hostGrid( grid ), codim, value ) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +40 template< class Entity > │ │ │ │ │ +_4_1 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ 42 { │ │ │ │ │ -43 public: │ │ │ │ │ -_4_4 typedef typename Grid::Traits::Communication _C_o_m_m; │ │ │ │ │ -_4_5 typedef typename _G_r_i_d_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -_4_6 static const int _d_i_m = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -47 │ │ │ │ │ -_4_8 std::unique_ptr _c_r_e_a_t_e_G_r_i_d(_C_o_m_m comm = _C_o_m_m()) │ │ │ │ │ -49 { │ │ │ │ │ -50 _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_G_r_i_d_> creator(*this); │ │ │ │ │ -51 return creator._c_r_e_a_t_e_G_r_i_d(comm); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_4 std::array , _d_i_m> _c_o_o_r_d_s() const │ │ │ │ │ -55 { │ │ │ │ │ -56 return _coords; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_0 std::vector& _o_p_e_r_a_t_o_r_[_](std::size_t d) │ │ │ │ │ -61 { │ │ │ │ │ -62 return _coords[d]; │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -_6_6 const std::vector& _o_p_e_r_a_t_o_r_[_](std::size_t d) const │ │ │ │ │ -67 { │ │ │ │ │ -68 return _coords[d]; │ │ │ │ │ -69 } │ │ │ │ │ +43 return _h_o_s_t_C_o_n_t_a_i_n_e_r__[ HostGridAccess::hostEntity( entity ) ]; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +46 template< class Entity > │ │ │ │ │ +_4_7 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +48 { │ │ │ │ │ +49 return _h_o_s_t_C_o_n_t_a_i_n_e_r__[ HostGridAccess::hostEntity( entity ) ]; │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +52 template< class Entity > │ │ │ │ │ +_5_3 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const │ │ │ │ │ +54 { │ │ │ │ │ +55 return _h_o_s_t_C_o_n_t_a_i_n_e_r__( HostGridAccess::hostEntity( entity ), subEntity ); │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +58 template< class Entity > │ │ │ │ │ +_5_9 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) │ │ │ │ │ +60 { │ │ │ │ │ +61 return _h_o_s_t_C_o_n_t_a_i_n_e_r__( HostGridAccess::hostEntity( entity ), subEntity ); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_4 _S_i_z_e _s_i_z_e () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._s_i_z_e(); } │ │ │ │ │ +65 │ │ │ │ │ +_6_6 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ) { _h_o_s_t_C_o_n_t_a_i_n_e_r__._r_e_s_i_z_e( value │ │ │ │ │ +); } │ │ │ │ │ +_6_7 void _s_h_r_i_n_k_T_o_F_i_t () { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._s_h_r_i_n_k_T_o_F_i_t(); } │ │ │ │ │ +68 │ │ │ │ │ +_6_9 void _f_i_l_l ( const _V_a_l_u_e &value = _V_a_l_u_e() ) { _h_o_s_t_C_o_n_t_a_i_n_e_r__._f_i_l_l( value ); } │ │ │ │ │ 70 │ │ │ │ │ -_7_9 void _s_e_t_S_t_a_r_t (int d, _c_t_y_p_e value) │ │ │ │ │ -80 { │ │ │ │ │ -81 _coords[d].resize(1); │ │ │ │ │ -82 _coords[d][0] = value; │ │ │ │ │ -83 } │ │ │ │ │ +_7_1 void _s_w_a_p ( _T_h_i_s &other ) { _h_o_s_t_C_o_n_t_a_i_n_e_r__._s_w_a_p( other._h_o_s_t_C_o_n_t_a_i_n_e_r__ ); } │ │ │ │ │ +72 │ │ │ │ │ +_7_3 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._b_e_g_i_n(); } │ │ │ │ │ +_7_4 _I_t_e_r_a_t_o_r _b_e_g_i_n () { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._b_e_g_i_n(); } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._e_n_d(); } │ │ │ │ │ +_7_7 _I_t_e_r_a_t_o_r _e_n_d () { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._e_n_d(); } │ │ │ │ │ +78 │ │ │ │ │ +_7_9 int _c_o_d_i_m_e_n_s_i_o_n () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._c_o_d_i_m_e_n_s_i_o_n(); } │ │ │ │ │ +80 │ │ │ │ │ +81 protected: │ │ │ │ │ +_8_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _> _h_o_s_t_C_o_n_t_a_i_n_e_r__; │ │ │ │ │ +83 }; │ │ │ │ │ 84 │ │ │ │ │ -_9_3 void _f_i_l_l_I_n_t_e_r_v_a_l_s (int d, int n, _c_t_y_p_e h) │ │ │ │ │ -94 { │ │ │ │ │ -95 emptyCheck (d); │ │ │ │ │ -96 for (int i = 0; i < n; i++) │ │ │ │ │ -97 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ -98 } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_8 void _f_i_l_l_R_a_n_g_e (int d, int n, _c_t_y_p_e end) │ │ │ │ │ -109 { │ │ │ │ │ -110 emptyCheck (d); │ │ │ │ │ -111 const _c_t_y_p_e h = (end - _coords[d].back ()) / n; │ │ │ │ │ -112 for (int i = 0; i < n - 1; i++) │ │ │ │ │ -113 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ -114 _coords[d].push_back (end); │ │ │ │ │ -115 } │ │ │ │ │ -116 │ │ │ │ │ -_1_2_5 void _f_i_l_l_U_n_t_i_l (int d, _c_t_y_p_e h, _c_t_y_p_e end) │ │ │ │ │ -126 { │ │ │ │ │ -127 emptyCheck (d); │ │ │ │ │ -128 while (_coords[d].back () < end) │ │ │ │ │ -129 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -_1_4_4 void _g_e_o_m_e_t_r_i_c_F_i_l_l_I_n_t_e_r_v_a_l_s (int d, int n, _c_t_y_p_e ratio, _c_t_y_p_e h0 = │ │ │ │ │ -145 static_cast<_c_t_y_p_e> (0)) │ │ │ │ │ -146 { │ │ │ │ │ -147 emptyCheck (d); │ │ │ │ │ -148 _c_t_y_p_e h = h0; │ │ │ │ │ -149 if (h0 == static_cast<_c_t_y_p_e>(0)) │ │ │ │ │ -150 h = lastInterval (d) * ratio; │ │ │ │ │ -151 for (int i = 0; i < n; i++) │ │ │ │ │ -152 { │ │ │ │ │ -153 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ -154 h *= ratio; │ │ │ │ │ -155 } │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -_1_7_0 void _g_e_o_m_e_t_r_i_c_F_i_l_l_U_n_t_i_l (int d, _c_t_y_p_e ratio, _c_t_y_p_e end, _c_t_y_p_e h0 = │ │ │ │ │ -static_cast<_c_t_y_p_e> (0)) │ │ │ │ │ -171 { │ │ │ │ │ -172 emptyCheck (d); │ │ │ │ │ -173 _c_t_y_p_e h = h0; │ │ │ │ │ -174 if (h0 == static_cast<_c_t_y_p_e>(0)) │ │ │ │ │ -175 h = lastInterval (d) * ratio; │ │ │ │ │ -176 while (_coords[d].back () < end) │ │ │ │ │ -177 { │ │ │ │ │ -178 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ -179 h *= ratio; │ │ │ │ │ -180 } │ │ │ │ │ -181 } │ │ │ │ │ -182 │ │ │ │ │ -_1_9_7 void _g_e_o_m_e_t_r_i_c_F_i_l_l_R_a_n_g_e (int d, int n, _c_t_y_p_e end, _c_t_y_p_e h = │ │ │ │ │ -198 static_cast<_c_t_y_p_e> (0), │ │ │ │ │ -199 bool first = true) │ │ │ │ │ -200 { │ │ │ │ │ -201 emptyCheck (d); │ │ │ │ │ -202 if (h < 1e-8) │ │ │ │ │ -203 h = lastInterval (d); │ │ │ │ │ -204 _c_t_y_p_e ratio = newton (n, _coords[d].back (), end, h); │ │ │ │ │ -205 if (!first) │ │ │ │ │ -206 { │ │ │ │ │ -207 h = h * pow (ratio, n - 1); │ │ │ │ │ -208 ratio = 1 / ratio; │ │ │ │ │ -209 } │ │ │ │ │ -210 for (int i = 0; i < n - 1; i++) │ │ │ │ │ -211 { │ │ │ │ │ -212 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ -213 h *= ratio; │ │ │ │ │ -214 } │ │ │ │ │ -215 _coords[d].push_back (end); │ │ │ │ │ -216 } │ │ │ │ │ -217 │ │ │ │ │ -_2_1_9 void _p_r_i_n_t() │ │ │ │ │ -220 { │ │ │ │ │ -221 for (int i=0; i<_d_i_m; i++) │ │ │ │ │ -222 { │ │ │ │ │ -223 std::cout << "Container in direction " << i << ":" << std::endl << │ │ │ │ │ -"Coordinates: "; │ │ │ │ │ -224 for (auto it = _coords[i].begin(); it != _coords[i].end(); ++it) │ │ │ │ │ -225 std::cout << *it << " "; │ │ │ │ │ -226 std::cout << std::endl << "Interval lengths: "; │ │ │ │ │ -227 │ │ │ │ │ -228 std::vector meshsize; │ │ │ │ │ -229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;) │ │ │ │ │ -230 { │ │ │ │ │ -231 meshsize.push_back(-1.*(*it)); │ │ │ │ │ -232 ++it; │ │ │ │ │ -233 meshsize.back() += *it; │ │ │ │ │ -234 } │ │ │ │ │ -235 │ │ │ │ │ -236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it) │ │ │ │ │ -237 std::cout << *it << " "; │ │ │ │ │ -238 std::cout << std::endl << "Ratios between interval lengths: "; │ │ │ │ │ -239 │ │ │ │ │ -240 std::vector ratios; │ │ │ │ │ -241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;) │ │ │ │ │ -242 ratios.push_back((1./(*it)) * *(++it)); │ │ │ │ │ -243 │ │ │ │ │ -244 for (auto it = ratios.begin(); it != ratios.end(); ++it) │ │ │ │ │ -245 std::cout << *it << " "; │ │ │ │ │ -246 std::cout << std::endl << std::endl << std::endl; │ │ │ │ │ -247 } │ │ │ │ │ -248 } │ │ │ │ │ -249 │ │ │ │ │ -250 private: │ │ │ │ │ -251 // check whether the ith component is empty and add a 0.0 entry if so │ │ │ │ │ -252 void emptyCheck (int i) │ │ │ │ │ -253 { │ │ │ │ │ -254 if (_coords[i].empty ()) │ │ │ │ │ -255 _coords[i].push_back (static_cast<_c_t_y_p_e> (0)); │ │ │ │ │ -256 } │ │ │ │ │ -257 │ │ │ │ │ -258 // returns the last interval length in direction d │ │ │ │ │ -259 _c_t_y_p_e lastInterval (int d) │ │ │ │ │ -260 { │ │ │ │ │ -261 if (_coords[d].size () < 2) │ │ │ │ │ -262 DUNE_THROW( │ │ │ │ │ -263 GridError, │ │ │ │ │ -264 "Not enough elements in coordinate container to deduce interval length in │ │ │ │ │ -TensorYaspFactory"); │ │ │ │ │ -265 else │ │ │ │ │ -266 return _coords[d].back () - _coords[d][_coords[d].size () - 2]; │ │ │ │ │ -267 } │ │ │ │ │ -268 │ │ │ │ │ -272 _c_t_y_p_e newton (int n, _c_t_y_p_e x_s, _c_t_y_p_e x_e, _c_t_y_p_e h) │ │ │ │ │ -273 { │ │ │ │ │ -274 _c_t_y_p_e m = (x_e - x_s) / h; │ │ │ │ │ -275 _c_t_y_p_e xold = 0.0; │ │ │ │ │ -276 _c_t_y_p_e xnew = x_e - x_s; │ │ │ │ │ -277 while (std::abs (xnew - xold) > 1E-8) │ │ │ │ │ -278 { │ │ │ │ │ -279 xold = xnew; │ │ │ │ │ -280 xnew = xold │ │ │ │ │ -281 - (-pow (xold, n) + m * xold - m + 1) │ │ │ │ │ -282 / (-n * pow (xold, n - 1) + m); │ │ │ │ │ -283 } │ │ │ │ │ -284 if (std::abs (xnew - 1) < 1E-6) │ │ │ │ │ -285 { │ │ │ │ │ -286 xold = x_e - x_s; │ │ │ │ │ -287 xnew = 0.0; │ │ │ │ │ -288 while (std::abs (xnew - xold) > 1E-8) │ │ │ │ │ -289 { │ │ │ │ │ -290 xold = xnew; │ │ │ │ │ -291 xnew = xold │ │ │ │ │ -292 - (-pow (xold, n) + m * xold - m + 1) │ │ │ │ │ -293 / (-n * pow (xold, n - 1) + m); │ │ │ │ │ -294 } │ │ │ │ │ -295 } │ │ │ │ │ -296 return xnew; │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -299 std::array, _d_i_m> _coords; │ │ │ │ │ -300 }; │ │ │ │ │ -301 │ │ │ │ │ -302 // class that implements the actual grid creation process. The default is │ │ │ │ │ -implementing │ │ │ │ │ -303 // standard creation for unstructured grids. Provide a specialization for │ │ │ │ │ -other grids. │ │ │ │ │ -304 template │ │ │ │ │ -_3_0_5 class _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ -306 { │ │ │ │ │ -307 public: │ │ │ │ │ -_3_0_8 typedef typename Grid::Traits::Communication _C_o_m_m; │ │ │ │ │ -_3_0_9 typedef typename _G_r_i_d_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -_3_1_0 static const int _d_i_m = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -311 │ │ │ │ │ -_3_1_2 _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r(const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory) : _factory │ │ │ │ │ -(factory) {} │ │ │ │ │ -313 │ │ │ │ │ -_3_1_4 std::unique_ptr _c_r_e_a_t_e_G_r_i_d(_C_o_m_m comm) │ │ │ │ │ -315 { │ │ │ │ │ -316 // The grid factory │ │ │ │ │ -317 _G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> fac; │ │ │ │ │ -318 │ │ │ │ │ -319 if (comm.rank() == 0) │ │ │ │ │ -320 { │ │ │ │ │ -321 // determine the size of the grid │ │ │ │ │ -322 std::array vsizes, esizes; │ │ │ │ │ -323 std::size_t size = 1; │ │ │ │ │ -324 for (std::size_t i = 0; i<_d_i_m; ++i) │ │ │ │ │ -325 { │ │ │ │ │ -326 vsizes[i] = _factory[i].size(); │ │ │ │ │ -327 esizes[i] = vsizes[i] - 1; │ │ │ │ │ -328 size *= vsizes[i]; │ │ │ │ │ -329 } │ │ │ │ │ -330 │ │ │ │ │ -331 // insert all vertices │ │ │ │ │ -332 _F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_<_d_i_m_> index(vsizes); │ │ │ │ │ -333 for (std::size_t i=0; i position; │ │ │ │ │ -336 for (std::size_t j = 0; j<_d_i_m; ++j) │ │ │ │ │ -337 position[j] = _factory[j][index[j]]; │ │ │ │ │ -338 fac._i_n_s_e_r_t_V_e_r_t_e_x(position); │ │ │ │ │ -339 } │ │ │ │ │ -340 │ │ │ │ │ -341 // compute the offsets │ │ │ │ │ -342 std::array offsets; │ │ │ │ │ -343 offsets[0] = 1; │ │ │ │ │ -344 for (std::size_t i=1; i<_d_i_m; i++) │ │ │ │ │ -345 offsets[i] = offsets[i-1] * vsizes[i-1]; │ │ │ │ │ -346 │ │ │ │ │ -347 // Compute an element template (the cube at (0,...,0). All │ │ │ │ │ -348 // other cubes are constructed by moving this template around │ │ │ │ │ -349 unsigned int nCorners = 1<<_d_i_m; │ │ │ │ │ -350 │ │ │ │ │ -351 std::vector cornersTemplate(nCorners,0); │ │ │ │ │ -352 │ │ │ │ │ -353 for (size_t i=0; i eindex(esizes); │ │ │ │ │ -360 │ │ │ │ │ -361 // Compute the total number of elements to be created │ │ │ │ │ -362 int numElements = eindex._c_y_c_l_e(); │ │ │ │ │ -363 │ │ │ │ │ -364 for (int i=0; i corners = cornersTemplate; │ │ │ │ │ -373 for (size_t j=0; j(fac._c_r_e_a_t_e_G_r_i_d()); │ │ │ │ │ -381 } │ │ │ │ │ -382 │ │ │ │ │ -383 private: │ │ │ │ │ -384 const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& _factory; │ │ │ │ │ -385 }; │ │ │ │ │ -386 │ │ │ │ │ -387 template │ │ │ │ │ -_3_8_8 class _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r<_Y_a_s_p_G_r_i_d > > │ │ │ │ │ -389 { │ │ │ │ │ -390 public: │ │ │ │ │ -_3_9_1 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> > _G_r_i_d; │ │ │ │ │ -_3_9_2 typedef typename _G_r_i_d_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_m_m; │ │ │ │ │ -393 │ │ │ │ │ -_3_9_4 _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r(const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory) : _factory │ │ │ │ │ -(factory) {} │ │ │ │ │ -395 │ │ │ │ │ -_3_9_6 std::unique_ptr _c_r_e_a_t_e_G_r_i_d(_C_o_m_m comm) │ │ │ │ │ -397 { │ │ │ │ │ -398 return std::make_unique(_factory.coords(), std::bitset(0ULL), 1, │ │ │ │ │ -comm); │ │ │ │ │ -399 } │ │ │ │ │ -400 private: │ │ │ │ │ -401 const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& _factory; │ │ │ │ │ -402 }; │ │ │ │ │ -403} │ │ │ │ │ -404 │ │ │ │ │ -405#endif │ │ │ │ │ -_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ -Implements a multiindex with arbitrary dimension and fixed index ranges This is │ │ │ │ │ -used by various facto... │ │ │ │ │ -_y_a_s_p_g_r_i_d_._h_h │ │ │ │ │ +85} // namespace Dune │ │ │ │ │ +86 │ │ │ │ │ +87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ +_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -Define type used for coordinates in grid module. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:532 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -Provide a generic factory class for unstructured grids. │ │ │ │ │ -DDeeffiinniittiioonn common/gridfactory.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ │ -virtual void insertElement(const GeometryType &type, const std::vector< │ │ │ │ │ -unsigned int > &vertices) │ │ │ │ │ -Insert an element into the coarse grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridfactory.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ -virtual void insertVertex(const FieldVector< ctype, dimworld > &pos) │ │ │ │ │ -Insert a vertex into the coarse grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridfactory.hh:335 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ -virtual std::unique_ptr< GridType > createGrid() │ │ │ │ │ -Finalize grid creation and hand over the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridfactory.hh:372 │ │ │ │ │ -_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_c_y_c_l_e │ │ │ │ │ -size_t cycle() const │ │ │ │ │ -Compute how many times you can call operator++ before getting to (0,...,0) │ │ │ │ │ -again. │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:306 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_c_t_y_p_e │ │ │ │ │ -Grid::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:309 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_C_o_m_m │ │ │ │ │ -Grid::Traits::Communication Comm │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:308 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ -TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory) │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:312 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ -std::unique_ptr< Grid > createGrid(Comm comm) │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_d_i_m │ │ │ │ │ -static const int dim │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:310 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -A factory class for conveniently creating tensorproduct grids. │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_f_i_l_l_R_a_n_g_e │ │ │ │ │ -void fillRange(int d, int n, ctype end) │ │ │ │ │ -fills the range to end with n intervals in direction d │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_g_e_o_m_e_t_r_i_c_F_i_l_l_R_a_n_g_e │ │ │ │ │ -void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype > │ │ │ │ │ -(0), bool first=true) │ │ │ │ │ -fills a coordinate range in direction d with n intervals according to a │ │ │ │ │ -geometric series │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_c_t_y_p_e │ │ │ │ │ -Grid::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_f_i_l_l_U_n_t_i_l │ │ │ │ │ -void fillUntil(int d, ctype h, ctype end) │ │ │ │ │ -adds intervals in direction d until a given coordinate is reached │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_g_e_o_m_e_t_r_i_c_F_i_l_l_U_n_t_i_l │ │ │ │ │ -void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast< │ │ │ │ │ -ctype >(0)) │ │ │ │ │ -adds intervals in direction d according with a given length ratio until a given │ │ │ │ │ -coordinate is reached │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m │ │ │ │ │ -static const int dim │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_p_r_i_n_t │ │ │ │ │ -void print() │ │ │ │ │ -print the coordinate information given to the factory so far │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:219 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_f_i_l_l_I_n_t_e_r_v_a_l_s │ │ │ │ │ -void fillIntervals(int d, int n, ctype h) │ │ │ │ │ -pushs n intervals of length h in direction d │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_s_e_t_S_t_a_r_t │ │ │ │ │ -void setStart(int d, ctype value) │ │ │ │ │ -set a starting value in a given direction d │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_g_e_o_m_e_t_r_i_c_F_i_l_l_I_n_t_e_r_v_a_l_s │ │ │ │ │ -void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast< │ │ │ │ │ -ctype >(0)) │ │ │ │ │ -adds n intervals in direction d with a given length ratio and a given starting │ │ │ │ │ -interval length. │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -std::vector< ctype > & operator[](std::size_t d) │ │ │ │ │ -allow to manually tune the factory by overloading operator[] to export the │ │ │ │ │ -coordinate vectors in the ... │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const std::vector< ctype > & operator[](std::size_t d) const │ │ │ │ │ -allow to manually tune the factory by overloading operator[] to export the │ │ │ │ │ -coordinate vectors in the ... │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ -std::unique_ptr< Grid > createGrid(Comm comm=Comm()) │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_C_o_m_m │ │ │ │ │ -Grid::Traits::Communication Comm │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_c_o_o_r_d_s │ │ │ │ │ -std::array< std::vector< ctype >, dim > coords() const │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ -_d_i_m_ _>_ _>_ _>_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ -std::unique_ptr< Grid > createGrid(Comm comm) │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:396 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ -_d_i_m_ _>_ _>_ _>_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ -TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory) │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:394 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ -_d_i_m_ _>_ _>_ _>_:_:_C_o_m_m │ │ │ │ │ -Grid::Communication Comm │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:392 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ -_d_i_m_ _>_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ -YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid │ │ │ │ │ -DDeeffiinniittiioonn tensorgridfactory.hh:391 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ -[ provides Dune::Grid ] │ │ │ │ │ -DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_r_i_d_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -typename Base::Communication Communication │ │ │ │ │ -DDeeffiinniittiioonn yaspgrid.hh:178 │ │ │ │ │ -_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ -Coordinate container for a tensor product YaspGrid. │ │ │ │ │ -DDeeffiinniittiioonn coordinates.hh:245 │ │ │ │ │ -_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ -Provide a generic factory class for unstructured grids. │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ +provides access to host grid objects from GeometryGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _> │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_w_a_p │ │ │ │ │ +void swap(This &other) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_f_i_l_l │ │ │ │ │ +void fill(const Value &value) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +int codimension() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const Value &value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_b_e_g_i_n │ │ │ │ │ +ConstIterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:175 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_e_n_d │ │ │ │ │ +ConstIterator end() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:190 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_i_z_e │ │ │ │ │ +Size size() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_f_i_l_l │ │ │ │ │ +void fill(const Value &value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +PersistentContainer< HostGrid, T >::ConstIterator ConstIterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ +Size size() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_b_e_g_i_n │ │ │ │ │ +ConstIterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const Value & operator[](const Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const Value &value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_S_i_z_e │ │ │ │ │ +PersistentContainer< HostGrid, T >::Size Size │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +int codimension() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_V_a_l_u_e │ │ │ │ │ +PersistentContainer< HostGrid, T >::Value Value │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_s_w_a_p │ │ │ │ │ +void swap(This &other) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_e_n_d │ │ │ │ │ +ConstIterator end() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r │ │ │ │ │ +PersistentContainerWrapper(const Grid &grid, int codim, const Value │ │ │ │ │ +&value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +PersistentContainer< HostGrid, T >::Iterator Iterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_h_o_s_t_C_o_n_t_a_i_n_e_r__ │ │ │ │ │ +PersistentContainer< HostGrid, T > hostContainer_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_e_n_d │ │ │ │ │ +Iterator end() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerwrapper.hh:77 │ │ │ │ │ +_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ │ @@ -85,16 +85,16 @@ │ │ │ │
#include <vector>
│ │ │ │ #include <iostream>
│ │ │ │ #include <fstream>
│ │ │ │ #include <memory>
│ │ │ │ #include <map>
│ │ │ │ #include <utility>
│ │ │ │ #include <algorithm>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ #include <dune/common/parallel/mpihelper.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html │ │ │ │ @@ -93,16 +93,16 @@ │ │ │ │
40#include <iostream>
│ │ │ │
41#include <fstream>
│ │ │ │
42#include <memory>
│ │ │ │
43#include <map>
│ │ │ │
44#include <utility>
│ │ │ │
45#include <algorithm>
│ │ │ │
46
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
50
│ │ │ │
52#if HAVE_MPI
│ │ │ │
53 #include <dune/common/parallel/mpihelper.hh>
│ │ │ │
54#endif
│ │ │ │
55
│ │ │ │
56namespace Dune
│ │ │ │
57{
│ │ │ │ @@ -500,16 +500,16 @@ │ │ │ │
512 MapId2Index globalIndex_;
│ │ │ │
513 };
│ │ │ │ │ │ │ │
514
│ │ │ │
515} // namespace Dune
│ │ │ │
516
│ │ │ │
517#endif /* DUNE_GRID_UTILITY_GLOBALINDEXSET_HH */
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ - │ │ │ │ + │ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
│ │ │ │
@ All_All_Interface
send all and receive all entities
Definition gridenums.hh:91
│ │ │ │
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:191
│ │ │ │
Traits::Grid Grid
type of the grid
Definition common/gridview.hh:83
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -443,18 +443,18 @@ │ │ │ │ │ 509 │ │ │ │ │ _5_1_2 MapId2Index _g_l_o_b_a_l_I_n_d_e_x__; │ │ │ │ │ 513 }; │ │ │ │ │ 514 │ │ │ │ │ 515} // namespace Dune │ │ │ │ │ 516 │ │ │ │ │ 517#endif /* DUNE_GRID_UTILITY_GLOBALINDEXSET_HH */ │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ _d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ DataHandles. │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ PartitionType │ │ │ │ │ Attributes used in the generic overlap model. │ │ │ │ │ DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ _D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ @ InteriorEntity │ │ │ │ │ all interior entities │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parmetisgridpartitioner.hh File Reference │ │ │ │ +dune-grid: gridtype.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,32 +69,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
parmetisgridpartitioner.hh File Reference
│ │ │ │ +
gridtype.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Compute a repartitioning of a Dune grid using ParMetis. │ │ │ │ +

This file can be included directly following config.h to test if a grid type was correctly selected. │ │ │ │ More...

│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/utility/globalindexset.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ -#include <dune/grid/common/rangegenerators.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │

Detailed Description

│ │ │ │ -

Compute a repartitioning of a Dune grid using ParMetis.

│ │ │ │ +

This file can be included directly following config.h to test if a grid type was correctly selected.

│ │ │ │ +
Author
Andreas Dedner
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,18 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -parmetisgridpartitioner.hh File Reference │ │ │ │ │ -Compute a repartitioning of a _D_u_n_e grid using ParMetis. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_l_o_b_a_l_i_n_d_e_x_s_e_t_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +gridtype.hh File Reference │ │ │ │ │ +This file can be included directly following config.h to test if a grid type │ │ │ │ │ +was correctly selected. _M_o_r_e_._._. │ │ │ │ │ _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 ********** │ │ │ │ │ -Compute a repartitioning of a _D_u_n_e grid using ParMetis. │ │ │ │ │ +This file can be included directly following config.h to test if a grid type │ │ │ │ │ +was correctly selected. │ │ │ │ │ + Author │ │ │ │ │ + Andreas Dedner │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parmetisgridpartitioner.hh Source File │ │ │ │ +dune-grid: gridtype.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,218 +74,42 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
parmetisgridpartitioner.hh
│ │ │ │ +
gridtype.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ -
4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ -
5
│ │ │ │ -
10#include <algorithm>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -
14#include <dune/common/exceptions.hh>
│ │ │ │ -
15
│ │ │ │ -
16#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22#if HAVE_PARMETIS
│ │ │ │ -
23
│ │ │ │ -
24#include <parmetis.h>
│ │ │ │ -
25
│ │ │ │ -
26// only enable for ParMETIS because the implementation uses functions that
│ │ │ │ -
27// are not emulated by scotch
│ │ │ │ -
28#ifdef PARMETIS_MAJOR_VERSION
│ │ │ │ -
29
│ │ │ │ -
30namespace Dune
│ │ │ │ -
31{
│ │ │ │ -
32
│ │ │ │ -
37 template<class GridView>
│ │ │ │ -
38 struct ParMetisGridPartitioner {
│ │ │ │ -
39
│ │ │ │ -
40 // define index type as provided by ParMETIS
│ │ │ │ -
41#if PARMETIS_MAJOR_VERSION > 3
│ │ │ │ -
42 typedef idx_t idx_type;
│ │ │ │ -
43 typedef ::real_t real_type;
│ │ │ │ -
44#else
│ │ │ │ -
45 typedef int idx_type;
│ │ │ │ -
46 typedef float real_type;
│ │ │ │ -
47#endif // PARMETIS_MAJOR_VERSION > 3
│ │ │ │ -
48
│ │ │ │ -
49 constexpr static int dimension = GridView::dimension;
│ │ │ │ -
50
│ │ │ │ -
51
│ │ │ │ -
62 static std::vector<unsigned> partition(const GridView& gv, const Dune::MPIHelper& mpihelper) {
│ │ │ │ -
63 const unsigned numElements = gv.size(0);
│ │ │ │ -
64
│ │ │ │ -
65 std::vector<unsigned> part(numElements);
│ │ │ │ -
66
│ │ │ │ -
67 // Setup parameters for ParMETIS
│ │ │ │ -
68 idx_type wgtflag = 0; // we don't use weights
│ │ │ │ -
69 idx_type numflag = 0; // we are using C-style arrays
│ │ │ │ -
70 idx_type ncon = 1; // number of balance constraints
│ │ │ │ -
71 idx_type ncommonnodes = 2; // number of nodes elements must have in common to be considered adjacent to each other
│ │ │ │ -
72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
│ │ │ │ -
73 idx_type edgecut; // will store number of edges cut by partition
│ │ │ │ -
74 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
│ │ │ │ -
75 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
│ │ │ │ -
76 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
│ │ │ │ -
77
│ │ │ │ -
78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are on process i
│ │ │ │ -
79 std::vector<idx_type> elmdist(nparts+1);
│ │ │ │ -
80 elmdist[0] = 0;
│ │ │ │ -
81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements are on process zero
│ │ │ │ -
82
│ │ │ │ -
83 // Create and fill arrays "eptr", where eptr[i] is the number of vertices that belong to the i-th element, and
│ │ │ │ -
84 // "eind" contains the vertex-numbers of the i-the element in eind[eptr[i]] to eind[eptr[i+1]-1]
│ │ │ │ -
85 std::vector<idx_type> eptr, eind;
│ │ │ │ -
86 int numVertices = 0;
│ │ │ │ -
87 eptr.push_back(numVertices);
│ │ │ │ -
88
│ │ │ │ -
89 for (const auto& element : elements(gv, Partitions::interior)) {
│ │ │ │ -
90 const size_t curNumVertices = referenceElement<double, dimension>(element.type()).size(dimension);
│ │ │ │ -
91
│ │ │ │ -
92 numVertices += curNumVertices;
│ │ │ │ -
93 eptr.push_back(numVertices);
│ │ │ │ -
94
│ │ │ │ -
95 for (size_t k = 0; k < curNumVertices; ++k)
│ │ │ │ -
96 eind.push_back(gv.indexSet().subIndex(element, k, dimension));
│ │ │ │ -
97 }
│ │ │ │ -
98
│ │ │ │ -
99 // Partition mesh using ParMETIS
│ │ │ │ -
100 if (0 == mpihelper.rank()) {
│ │ │ │ -
101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator();
│ │ │ │ -
102
│ │ │ │ -
103#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ -
104 const int OK =
│ │ │ │ -
105#endif
│ │ │ │ -
106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL, &wgtflag, &numflag,
│ │ │ │ -
107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(),
│ │ │ │ -
108 options, &edgecut, reinterpret_cast<idx_type*>(part.data()), &comm);
│ │ │ │ -
109
│ │ │ │ -
110#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ -
111 if (OK != METIS_OK)
│ │ │ │ -
112 DUNE_THROW(Dune::Exception, "ParMETIS returned an error code.");
│ │ │ │ -
113#endif
│ │ │ │ -
114 }
│ │ │ │ -
115
│ │ │ │ -
116 return part;
│ │ │ │ -
117 }
│ │ │ │ -
118
│ │ │ │ -
130 static std::vector<unsigned> repartition(const GridView& gv, const Dune::MPIHelper& mpihelper, real_type itr = 1000) {
│ │ │ │ -
131
│ │ │ │ -
132 // Create global index map
│ │ │ │ -
133 GlobalIndexSet<GridView> globalIndex(gv,0);
│ │ │ │ -
134
│ │ │ │ -
135 int numElements = std::distance(gv.template begin<0, Interior_Partition>(),
│ │ │ │ -
136 gv.template end<0, Interior_Partition>());
│ │ │ │ -
137
│ │ │ │ -
138 std::vector<unsigned> interiorPart(numElements);
│ │ │ │ -
139
│ │ │ │ -
140 // Setup parameters for ParMETIS
│ │ │ │ -
141 idx_type wgtflag = 0; // we don't use weights
│ │ │ │ -
142 idx_type numflag = 0; // we are using C-style arrays
│ │ │ │ -
143 idx_type ncon = 1; // number of balance constraints
│ │ │ │ -
144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
│ │ │ │ -
145 idx_type edgecut; // will store number of edges cut by partition
│ │ │ │ -
146 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
│ │ │ │ -
147 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
│ │ │ │ -
148 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
│ │ │ │ -
149
│ │ │ │ -
150 MPI_Comm comm = Dune::MPIHelper::getCommunicator();
│ │ │ │ -
151
│ │ │ │ -
152 // Make the number of interior elements of each processor available to all processors
│ │ │ │ -
153 std::vector<int> offset(gv.comm().size());
│ │ │ │ -
154 std::fill(offset.begin(), offset.end(), 0);
│ │ │ │ -
155
│ │ │ │ -
156 gv.comm().template allgather<int>(&numElements, 1, offset.data());
│ │ │ │ -
157
│ │ │ │ -
158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that are on process i
│ │ │ │ -
159 std::vector<idx_type> vtxdist(gv.comm().size()+1);
│ │ │ │ -
160 vtxdist[0] = 0;
│ │ │ │ -
161
│ │ │ │ -
162 for (unsigned int i=1; i<vtxdist.size(); ++i)
│ │ │ │ -
163 vtxdist[i] = vtxdist[i-1] + offset[i-1];
│ │ │ │ -
164
│ │ │ │ -
165 // Set up element adjacency lists
│ │ │ │ -
166 std::vector<idx_type> xadj, adjncy;
│ │ │ │ -
167 xadj.push_back(0);
│ │ │ │ -
168
│ │ │ │ -
169 for (const auto& element : elements(gv, Partitions::interior)) {
│ │ │ │ -
170 size_t numNeighbors = 0;
│ │ │ │ -
171
│ │ │ │ -
172 for (const auto& in : intersections(gv, element)) {
│ │ │ │ -
173 if (in.neighbor()) {
│ │ │ │ -
174 adjncy.push_back(globalIndex.index(in.outside()));
│ │ │ │ -
175
│ │ │ │ -
176 ++numNeighbors;
│ │ │ │ -
177 }
│ │ │ │ -
178 }
│ │ │ │ -
179
│ │ │ │ -
180 xadj.push_back(xadj.back() + numNeighbors);
│ │ │ │ -
181 }
│ │ │ │ -
182
│ │ │ │ -
183#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ -
184 const int OK =
│ │ │ │ -
185#endif
│ │ │ │ -
186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(), NULL, NULL, NULL,
│ │ │ │ -
187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(),
│ │ │ │ -
188 &itr, options, &edgecut, reinterpret_cast<idx_type*>(interiorPart.data()), &comm);
│ │ │ │ -
189
│ │ │ │ -
190#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ -
191 if (OK != METIS_OK)
│ │ │ │ -
192 DUNE_THROW(Dune::Exception, "ParMETIS returned error code " << OK);
│ │ │ │ -
193#endif
│ │ │ │ -
194
│ │ │ │ -
195 // At this point, interiorPart contains a target rank for each interior element, and they are sorted
│ │ │ │ -
196 // by the order in which the grid view traverses them. Now we need to do two things:
│ │ │ │ -
197 // a) Add additional dummy entries for the ghost elements
│ │ │ │ -
198 // b) Use the element index for the actual ordering. Since there may be different types of elements,
│ │ │ │ -
199 // we cannot use the index set directly, but have to go through a Mapper.
│ │ │ │ -
200
│ │ │ │ -
201 typedef MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
│ │ │ │ -
202 ElementMapper elementMapper(gv, mcmgElementLayout());
│ │ │ │ -
203
│ │ │ │ -
204 std::vector<unsigned int> part(gv.size(0));
│ │ │ │ -
205 std::fill(part.begin(), part.end(), 0);
│ │ │ │ -
206 unsigned int c = 0;
│ │ │ │ -
207 for (const auto& element : elements(gv, Partitions::interior))
│ │ │ │ -
208 part[elementMapper.index(element)] = interiorPart[c++];
│ │ │ │ -
209
│ │ │ │ -
210 return part;
│ │ │ │ -
211 }
│ │ │ │ -
212 };
│ │ │ │ -
213
│ │ │ │ -
214} // namespace Dune
│ │ │ │ -
215
│ │ │ │ -
216#else // PARMETIS_MAJOR_VERSION
│ │ │ │ -
217#warning "You seem to be using the ParMETIS emulation layer of scotch, which does not work with this file."
│ │ │ │ -
218#endif
│ │ │ │ -
219
│ │ │ │ -
220#else // HAVE_PARMETIS
│ │ │ │ -
221#warning "PARMETIS was not found, please check your configuration"
│ │ │ │ -
222#endif
│ │ │ │ -
223
│ │ │ │ -
224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ │ - │ │ │ │ -
Provides a globally unique index for all entities of a distributed Dune grid.
│ │ │ │ -
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │ -
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
constexpr Interior interior
PartitionSet for the interior partition.
Definition partitionset.hh:272
│ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
5#ifndef DUNE_GRIDTYPE_HH
│ │ │ │ +
6#define DUNE_GRIDTYPE_HH
│ │ │ │ +
7
│ │ │ │ +
17#ifndef HEADERCHECK
│ │ │ │ +
18
│ │ │ │ +
19// NOGRID is used to specify that no default was set during configure
│ │ │ │ +
20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected
│ │ │ │ +
21// and an error is produced
│ │ │ │ +
22#if defined NOGRID
│ │ │ │ +
23 #if ! HAVE_GRIDTYPE
│ │ │ │ +
24 #error "No grid type selected, use GRIDTYPE=..."
│ │ │ │ +
25 #endif
│ │ │ │ +
26#else
│ │ │ │ +
27 #if ! HAVE_GRIDTYPE
│ │ │ │ +
28 #error "No grid type selected, typo in GRIDTYPE=...?"
│ │ │ │ +
29 #endif
│ │ │ │ +
30#endif
│ │ │ │ +
31
│ │ │ │ +
32#endif // HEADERCHECK
│ │ │ │ +
33
│ │ │ │ +
34#endif // DUNE_GRIDTYPE_HH
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,248 +1,37 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -parmetisgridpartitioner.hh │ │ │ │ │ +gridtype.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ -4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ -5 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_l_o_b_a_l_i_n_d_e_x_s_e_t_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22#if HAVE_PARMETIS │ │ │ │ │ -23 │ │ │ │ │ -24#include │ │ │ │ │ -25 │ │ │ │ │ -26// only enable for ParMETIS because the implementation uses functions that │ │ │ │ │ -27// are not emulated by scotch │ │ │ │ │ -28#ifdef PARMETIS_MAJOR_VERSION │ │ │ │ │ -29 │ │ │ │ │ -30namespace _D_u_n_e │ │ │ │ │ -31{ │ │ │ │ │ -32 │ │ │ │ │ -37 template │ │ │ │ │ -38 struct ParMetisGridPartitioner { │ │ │ │ │ -39 │ │ │ │ │ -40 // define index type as provided by ParMETIS │ │ │ │ │ -41#if PARMETIS_MAJOR_VERSION > 3 │ │ │ │ │ -42 typedef idx_t idx_type; │ │ │ │ │ -43 typedef ::real_t real_type; │ │ │ │ │ -44#else │ │ │ │ │ -45 typedef int idx_type; │ │ │ │ │ -46 typedef float real_type; │ │ │ │ │ -47#endif // PARMETIS_MAJOR_VERSION > 3 │ │ │ │ │ -48 │ │ │ │ │ -49 constexpr static int dimension = GridView::dimension; │ │ │ │ │ -50 │ │ │ │ │ -51 │ │ │ │ │ -62 static std::vector partition(const GridView& gv, const Dune:: │ │ │ │ │ -MPIHelper& mpihelper) { │ │ │ │ │ -63 const unsigned numElements = gv.size(0); │ │ │ │ │ -64 │ │ │ │ │ -65 std::vector part(numElements); │ │ │ │ │ -66 │ │ │ │ │ -67 // Setup parameters for ParMETIS │ │ │ │ │ -68 idx_type wgtflag = 0; // we don't use weights │ │ │ │ │ -69 idx_type numflag = 0; // we are using C-style arrays │ │ │ │ │ -70 idx_type ncon = 1; // number of balance constraints │ │ │ │ │ -71 idx_type ncommonnodes = 2; // number of nodes elements must have in common │ │ │ │ │ -to be considered adjacent to each other │ │ │ │ │ -72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, │ │ │ │ │ -output and coupling │ │ │ │ │ -73 idx_type edgecut; // will store number of edges cut by partition │ │ │ │ │ -74 idx_type nparts = mpihelper.size(); // number of parts equals number of │ │ │ │ │ -processes │ │ │ │ │ -75 std::vector tpwgts(ncon*nparts, 1./nparts); // load per subdomain │ │ │ │ │ -and weight (same load on every process) │ │ │ │ │ -76 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight │ │ │ │ │ -tolerance for every weight there is) │ │ │ │ │ -77 │ │ │ │ │ -78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are │ │ │ │ │ -on process i │ │ │ │ │ -79 std::vector elmdist(nparts+1); │ │ │ │ │ -80 elmdist[0] = 0; │ │ │ │ │ -81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements are │ │ │ │ │ -on process zero │ │ │ │ │ -82 │ │ │ │ │ -83 // Create and fill arrays "eptr", where eptr[i] is the number of vertices │ │ │ │ │ -that belong to the i-th element, and │ │ │ │ │ -84 // "eind" contains the vertex-numbers of the i-the element in eind[eptr[i]] │ │ │ │ │ -to eind[eptr[i+1]-1] │ │ │ │ │ -85 std::vector eptr, eind; │ │ │ │ │ -86 int numVertices = 0; │ │ │ │ │ -87 eptr.push_back(numVertices); │ │ │ │ │ -88 │ │ │ │ │ -89 for (const auto& element : elements(gv, Partitions::_i_n_t_e_r_i_o_r)) { │ │ │ │ │ -90 const size_t curNumVertices = referenceElement │ │ │ │ │ -(element.type()).size(dimension); │ │ │ │ │ -91 │ │ │ │ │ -92 numVertices += curNumVertices; │ │ │ │ │ -93 eptr.push_back(numVertices); │ │ │ │ │ -94 │ │ │ │ │ -95 for (size_t k = 0; k < curNumVertices; ++k) │ │ │ │ │ -96 eind.push_back(gv.indexSet().subIndex(element, k, dimension)); │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -99 // Partition mesh using ParMETIS │ │ │ │ │ -100 if (0 == mpihelper.rank()) { │ │ │ │ │ -101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator(); │ │ │ │ │ -102 │ │ │ │ │ -103#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ -104 const int OK = │ │ │ │ │ -105#endif │ │ │ │ │ -106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL, │ │ │ │ │ -&wgtflag, &numflag, │ │ │ │ │ -107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(), │ │ │ │ │ -108 options, &edgecut, reinterpret_cast(part.data()), &comm); │ │ │ │ │ -109 │ │ │ │ │ -110#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ -111 if (OK != METIS_OK) │ │ │ │ │ -112 DUNE_THROW(Dune::Exception, "ParMETIS returned an error code."); │ │ │ │ │ -113#endif │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -116 return part; │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -130 static std::vector repartition(const GridView& gv, const Dune:: │ │ │ │ │ -MPIHelper& mpihelper, real_type itr = 1000) { │ │ │ │ │ -131 │ │ │ │ │ -132 // Create global index map │ │ │ │ │ -133 GlobalIndexSet globalIndex(gv,0); │ │ │ │ │ -134 │ │ │ │ │ -135 int numElements = std::distance(gv.template begin<0, Interior_Partition>(), │ │ │ │ │ -136 gv.template end<0, Interior_Partition>()); │ │ │ │ │ -137 │ │ │ │ │ -138 std::vector interiorPart(numElements); │ │ │ │ │ -139 │ │ │ │ │ -140 // Setup parameters for ParMETIS │ │ │ │ │ -141 idx_type wgtflag = 0; // we don't use weights │ │ │ │ │ -142 idx_type numflag = 0; // we are using C-style arrays │ │ │ │ │ -143 idx_type ncon = 1; // number of balance constraints │ │ │ │ │ -144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, │ │ │ │ │ -output and coupling │ │ │ │ │ -145 idx_type edgecut; // will store number of edges cut by partition │ │ │ │ │ -146 idx_type nparts = mpihelper.size(); // number of parts equals number of │ │ │ │ │ -processes │ │ │ │ │ -147 std::vector tpwgts(ncon*nparts, 1./nparts); // load per │ │ │ │ │ -subdomain and weight (same load on every process) │ │ │ │ │ -148 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight │ │ │ │ │ -tolerance for every weight there is) │ │ │ │ │ -149 │ │ │ │ │ -150 MPI_Comm comm = Dune::MPIHelper::getCommunicator(); │ │ │ │ │ -151 │ │ │ │ │ -152 // Make the number of interior elements of each processor available to all │ │ │ │ │ -processors │ │ │ │ │ -153 std::vector offset(gv.comm().size()); │ │ │ │ │ -154 std::fill(offset.begin(), offset.end(), 0); │ │ │ │ │ -155 │ │ │ │ │ -156 gv.comm().template allgather(&numElements, 1, offset.data()); │ │ │ │ │ -157 │ │ │ │ │ -158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that │ │ │ │ │ -are on process i │ │ │ │ │ -159 std::vector vtxdist(gv.comm().size()+1); │ │ │ │ │ -160 vtxdist[0] = 0; │ │ │ │ │ -161 │ │ │ │ │ -162 for (unsigned int i=1; i xadj, adjncy; │ │ │ │ │ -167 xadj.push_back(0); │ │ │ │ │ -168 │ │ │ │ │ -169 for (const auto& element : elements(gv, Partitions::_i_n_t_e_r_i_o_r)) { │ │ │ │ │ -170 size_t numNeighbors = 0; │ │ │ │ │ -171 │ │ │ │ │ -172 for (const auto& in : intersections(gv, element)) { │ │ │ │ │ -173 if (in.neighbor()) { │ │ │ │ │ -174 adjncy.push_back(globalIndex.index(in.outside())); │ │ │ │ │ -175 │ │ │ │ │ -176 ++numNeighbors; │ │ │ │ │ -177 } │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -180 xadj.push_back(xadj.back() + numNeighbors); │ │ │ │ │ -181 } │ │ │ │ │ -182 │ │ │ │ │ -183#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ -184 const int OK = │ │ │ │ │ -185#endif │ │ │ │ │ -186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(), │ │ │ │ │ -NULL, NULL, NULL, │ │ │ │ │ -187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(), │ │ │ │ │ -188 &itr, options, &edgecut, reinterpret_cast(interiorPart.data()), │ │ │ │ │ -&comm); │ │ │ │ │ -189 │ │ │ │ │ -190#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ -191 if (OK != METIS_OK) │ │ │ │ │ -192 DUNE_THROW(Dune::Exception, "ParMETIS returned error code " << OK); │ │ │ │ │ -193#endif │ │ │ │ │ -194 │ │ │ │ │ -195 // At this point, interiorPart contains a target rank for each interior │ │ │ │ │ -element, and they are sorted │ │ │ │ │ -196 // by the order in which the grid view traverses them. Now we need to do │ │ │ │ │ -two things: │ │ │ │ │ -197 // a) Add additional dummy entries for the ghost elements │ │ │ │ │ -198 // b) Use the element index for the actual ordering. Since there may be │ │ │ │ │ -different types of elements, │ │ │ │ │ -199 // we cannot use the index set directly, but have to go through a Mapper. │ │ │ │ │ -200 │ │ │ │ │ -201 typedef MultipleCodimMultipleGeomTypeMapper ElementMapper; │ │ │ │ │ -202 ElementMapper elementMapper(gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t()); │ │ │ │ │ -203 │ │ │ │ │ -204 std::vector part(gv.size(0)); │ │ │ │ │ -205 std::fill(part.begin(), part.end(), 0); │ │ │ │ │ -206 unsigned int c = 0; │ │ │ │ │ -207 for (const auto& element : elements(gv, Partitions::_i_n_t_e_r_i_o_r)) │ │ │ │ │ -208 part[elementMapper.index(element)] = interiorPart[c++]; │ │ │ │ │ -209 │ │ │ │ │ -210 return part; │ │ │ │ │ -211 } │ │ │ │ │ -212 }; │ │ │ │ │ -213 │ │ │ │ │ -214} // namespace Dune │ │ │ │ │ -215 │ │ │ │ │ -216#else // PARMETIS_MAJOR_VERSION │ │ │ │ │ -217#warning "You seem to be using the ParMETIS emulation layer of scotch, which │ │ │ │ │ -does not work with this file." │ │ │ │ │ -218#endif │ │ │ │ │ -219 │ │ │ │ │ -220#else // HAVE_PARMETIS │ │ │ │ │ -221#warning "PARMETIS was not found, please check your configuration" │ │ │ │ │ -222#endif │ │ │ │ │ -223 │ │ │ │ │ -224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ -_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ -Mapper for multiple codim and multiple geometry types. │ │ │ │ │ -_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h │ │ │ │ │ -_g_l_o_b_a_l_i_n_d_e_x_s_e_t_._h_h │ │ │ │ │ -Provides a globally unique index for all entities of a distributed Dune grid. │ │ │ │ │ -_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ -MCMGLayout mcmgElementLayout() │ │ │ │ │ -layout for elements (codim-0 entities) │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -Include standard header files. │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r │ │ │ │ │ -constexpr Interior interior │ │ │ │ │ -PartitionSet for the interior partition. │ │ │ │ │ -DDeeffiinniittiioonn partitionset.hh:272 │ │ │ │ │ +3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ +5#ifndef DUNE_GRIDTYPE_HH │ │ │ │ │ +6#define DUNE_GRIDTYPE_HH │ │ │ │ │ +7 │ │ │ │ │ +17#ifndef HEADERCHECK │ │ │ │ │ +18 │ │ │ │ │ +19// NOGRID is used to specify that no default was set during configure │ │ │ │ │ +20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected │ │ │ │ │ +21// and an error is produced │ │ │ │ │ +22#if defined NOGRID │ │ │ │ │ +23 #if ! HAVE_GRIDTYPE │ │ │ │ │ +24 #error "No grid type selected, use GRIDTYPE=..." │ │ │ │ │ +25 #endif │ │ │ │ │ +26#else │ │ │ │ │ +27 #if ! HAVE_GRIDTYPE │ │ │ │ │ +28 #error "No grid type selected, typo in GRIDTYPE=...?" │ │ │ │ │ +29 #endif │ │ │ │ │ +30#endif │ │ │ │ │ +31 │ │ │ │ │ +32#endif // HEADERCHECK │ │ │ │ │ +33 │ │ │ │ │ +34#endif // DUNE_GRIDTYPE_HH │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │ #include <sstream>
│ │ │ │ #include <string>
│ │ │ │ #include <utility>
│ │ │ │ #include <dune/common/classname.hh>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GlobalIndexSet< GridView >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │
18#include <utility>
│ │ │ │
19
│ │ │ │
20#include <dune/common/classname.hh>
│ │ │ │
21#include <dune/common/exceptions.hh>
│ │ │ │
22#include <dune/common/fvector.hh>
│ │ │ │
23
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
26
│ │ │ │
27namespace Dune
│ │ │ │
28{
│ │ │ │
29
│ │ │ │
33 template<class Grid, class IS>
│ │ │ │
│ │ │ │ │ │ │ │ @@ -222,15 +222,15 @@ │ │ │ │
176 const IS& indexSet_;
│ │ │ │
177 };
│ │ │ │
│ │ │ │
178
│ │ │ │
179} // end namespace Dune
│ │ │ │
180
│ │ │ │
181#endif // DUNE_GRID_HIERARCHICSEARCH_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition common/geometry.hh:558
│ │ │ │
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition common/entity.hh:100
│ │ │ │
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │
Wrapper class for geometries.
Definition common/geometry.hh:71
│ │ │ │
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the map .
Definition common/geometry.hh:228
│ │ │ │
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition common/geometry.hh:103
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainervector.hh File Reference │ │ │ │ +dune-grid: parmetisgridpartitioner.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,37 +69,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
persistentcontainervector.hh File Reference
│ │ │ │ +
parmetisgridpartitioner.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ + │ │ │ │ +

Compute a repartitioning of a Dune grid using ParMetis. │ │ │ │ +More...

│ │ │ │
#include <algorithm>
│ │ │ │ -#include <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/utility/globalindexset.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ +#include <dune/grid/common/rangegenerators.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

│ │ │ │ Classes

class  Dune::HierarchicSearch< Grid, IS >
 Search an IndexSet for an Entity containing a given point. More...
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::PersistentContainerVector< G, IndexSet, Vector >
 vector-based implementation of the PersistentContainer More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Compute a repartitioning of a Dune grid using ParMetis.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,22 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -persistentcontainervector.hh File Reference │ │ │ │ │ +parmetisgridpartitioner.hh File Reference │ │ │ │ │ +Compute a repartitioning of a _D_u_n_e grid using ParMetis. _M_o_r_e_._._. │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_l_o_b_a_l_i_n_d_e_x_s_e_t_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_<_ _G_,_ _I_n_d_e_x_S_e_t_,_ _V_e_c_t_o_r_ _> │ │ │ │ │ -  vector-based implementation of the _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Compute a repartitioning of a _D_u_n_e grid using ParMetis. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainervector.hh Source File │ │ │ │ +dune-grid: parmetisgridpartitioner.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,175 +74,218 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainervector.hh
│ │ │ │ +
parmetisgridpartitioner.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ -
6#define DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <cassert>
│ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13
│ │ │ │ -
14 // PersistentContainerVector
│ │ │ │ -
15 // -------------------------
│ │ │ │ -
16
│ │ │ │ -
49 template< class G, class IndexSet, class Vector >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51 {
│ │ │ │ - │ │ │ │ -
53
│ │ │ │ -
54 public:
│ │ │ │ -
55 typedef G Grid;
│ │ │ │ -
56
│ │ │ │ -
57 typedef typename Vector::value_type Value;
│ │ │ │ -
58 typedef typename Vector::size_type Size;
│ │ │ │ -
59 typedef typename Vector::const_iterator ConstIterator;
│ │ │ │ -
60 typedef typename Vector::iterator Iterator;
│ │ │ │ -
61
│ │ │ │ -
62 typedef typename Vector::allocator_type Allocator;
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
64 PersistentContainerVector ( const IndexSet &indexSet, int codim, const Value &value,
│ │ │ │ -
65 const Allocator &allocator = Allocator() )
│ │ │ │ -
66 : codim_( codim ),
│ │ │ │ - │ │ │ │ -
68 data_( indexSet.size( codim ), value, allocator )
│ │ │ │ -
69 {}
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
71 template< class Entity >
│ │ │ │ -
│ │ │ │ -
72 const Value &operator[] ( const Entity &entity ) const
│ │ │ │ -
73 {
│ │ │ │ -
74 assert( Entity::codimension == codimension() );
│ │ │ │ -
75 const Size index = indexSet().index( entity );
│ │ │ │ -
76 assert( index < data_.size() );
│ │ │ │ -
77 return data_[ index ];
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
80 template< class Entity >
│ │ │ │ -
│ │ │ │ -
81 Value &operator[] ( const Entity &entity )
│ │ │ │ -
82 {
│ │ │ │ -
83 assert( Entity::codimension == codimension() );
│ │ │ │ -
84 const Size index = indexSet().index( entity );
│ │ │ │ -
85 assert( index < data_.size() );
│ │ │ │ -
86 return data_[ index ];
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ +
3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ +
4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ +
5
│ │ │ │ +
10#include <algorithm>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +
14#include <dune/common/exceptions.hh>
│ │ │ │ +
15
│ │ │ │ +
16#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
17
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22#if HAVE_PARMETIS
│ │ │ │ +
23
│ │ │ │ +
24#include <parmetis.h>
│ │ │ │ +
25
│ │ │ │ +
26// only enable for ParMETIS because the implementation uses functions that
│ │ │ │ +
27// are not emulated by scotch
│ │ │ │ +
28#ifdef PARMETIS_MAJOR_VERSION
│ │ │ │ +
29
│ │ │ │ +
30namespace Dune
│ │ │ │ +
31{
│ │ │ │ +
32
│ │ │ │ +
37 template<class GridView>
│ │ │ │ +
38 struct ParMetisGridPartitioner {
│ │ │ │ +
39
│ │ │ │ +
40 // define index type as provided by ParMETIS
│ │ │ │ +
41#if PARMETIS_MAJOR_VERSION > 3
│ │ │ │ +
42 typedef idx_t idx_type;
│ │ │ │ +
43 typedef ::real_t real_type;
│ │ │ │ +
44#else
│ │ │ │ +
45 typedef int idx_type;
│ │ │ │ +
46 typedef float real_type;
│ │ │ │ +
47#endif // PARMETIS_MAJOR_VERSION > 3
│ │ │ │ +
48
│ │ │ │ +
49 constexpr static int dimension = GridView::dimension;
│ │ │ │ +
50
│ │ │ │ +
51
│ │ │ │ +
62 static std::vector<unsigned> partition(const GridView& gv, const Dune::MPIHelper& mpihelper) {
│ │ │ │ +
63 const unsigned numElements = gv.size(0);
│ │ │ │ +
64
│ │ │ │ +
65 std::vector<unsigned> part(numElements);
│ │ │ │ +
66
│ │ │ │ +
67 // Setup parameters for ParMETIS
│ │ │ │ +
68 idx_type wgtflag = 0; // we don't use weights
│ │ │ │ +
69 idx_type numflag = 0; // we are using C-style arrays
│ │ │ │ +
70 idx_type ncon = 1; // number of balance constraints
│ │ │ │ +
71 idx_type ncommonnodes = 2; // number of nodes elements must have in common to be considered adjacent to each other
│ │ │ │ +
72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
│ │ │ │ +
73 idx_type edgecut; // will store number of edges cut by partition
│ │ │ │ +
74 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
│ │ │ │ +
75 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
│ │ │ │ +
76 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
│ │ │ │ +
77
│ │ │ │ +
78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are on process i
│ │ │ │ +
79 std::vector<idx_type> elmdist(nparts+1);
│ │ │ │ +
80 elmdist[0] = 0;
│ │ │ │ +
81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements are on process zero
│ │ │ │ +
82
│ │ │ │ +
83 // Create and fill arrays "eptr", where eptr[i] is the number of vertices that belong to the i-th element, and
│ │ │ │ +
84 // "eind" contains the vertex-numbers of the i-the element in eind[eptr[i]] to eind[eptr[i+1]-1]
│ │ │ │ +
85 std::vector<idx_type> eptr, eind;
│ │ │ │ +
86 int numVertices = 0;
│ │ │ │ +
87 eptr.push_back(numVertices);
│ │ │ │
88
│ │ │ │ -
89 template< class Entity >
│ │ │ │ -
│ │ │ │ -
90 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ -
91 {
│ │ │ │ -
92 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
│ │ │ │ -
93 assert( index < data_.size() );
│ │ │ │ -
94 return data_[ index ];
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97 template< class Entity >
│ │ │ │ -
│ │ │ │ -
98 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ -
99 {
│ │ │ │ -
100 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
│ │ │ │ -
101 assert( index < data_.size() );
│ │ │ │ -
102 return data_[ index ];
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105 Size size () const { return data_.size(); }
│ │ │ │ -
106
│ │ │ │ -
│ │ │ │ -
107 void resize ( const Value &value = Value() )
│ │ │ │ -
108 {
│ │ │ │ -
109 const Size indexSetSize = indexSet().size( codimension() );
│ │ │ │ -
110 data_.resize( indexSetSize, value );
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
113 void shrinkToFit () {}
│ │ │ │ -
114
│ │ │ │ -
115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
│ │ │ │ -
116
│ │ │ │ -
│ │ │ │ -
117 void swap ( This &other )
│ │ │ │ -
118 {
│ │ │ │ -
119 std::swap( codim_, other.codim_ );
│ │ │ │ -
120 std::swap( indexSet_, other.indexSet_ );
│ │ │ │ -
121 std::swap( data_, other.data_ );
│ │ │ │ -
122 }
│ │ │ │ -
│ │ │ │ -
123
│ │ │ │ -
124 ConstIterator begin () const { return data_.begin(); }
│ │ │ │ -
125 Iterator begin () { return data_.begin(); }
│ │ │ │ -
126
│ │ │ │ -
127 ConstIterator end () const { return data_.end(); }
│ │ │ │ -
128 Iterator end () { return data_.end(); }
│ │ │ │ -
129
│ │ │ │ -
130 int codimension () const { return codim_; }
│ │ │ │ +
89 for (const auto& element : elements(gv, Partitions::interior)) {
│ │ │ │ +
90 const size_t curNumVertices = referenceElement<double, dimension>(element.type()).size(dimension);
│ │ │ │ +
91
│ │ │ │ +
92 numVertices += curNumVertices;
│ │ │ │ +
93 eptr.push_back(numVertices);
│ │ │ │ +
94
│ │ │ │ +
95 for (size_t k = 0; k < curNumVertices; ++k)
│ │ │ │ +
96 eind.push_back(gv.indexSet().subIndex(element, k, dimension));
│ │ │ │ +
97 }
│ │ │ │ +
98
│ │ │ │ +
99 // Partition mesh using ParMETIS
│ │ │ │ +
100 if (0 == mpihelper.rank()) {
│ │ │ │ +
101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator();
│ │ │ │ +
102
│ │ │ │ +
103#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ +
104 const int OK =
│ │ │ │ +
105#endif
│ │ │ │ +
106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL, &wgtflag, &numflag,
│ │ │ │ +
107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(),
│ │ │ │ +
108 options, &edgecut, reinterpret_cast<idx_type*>(part.data()), &comm);
│ │ │ │ +
109
│ │ │ │ +
110#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ +
111 if (OK != METIS_OK)
│ │ │ │ +
112 DUNE_THROW(Dune::Exception, "ParMETIS returned an error code.");
│ │ │ │ +
113#endif
│ │ │ │ +
114 }
│ │ │ │ +
115
│ │ │ │ +
116 return part;
│ │ │ │ +
117 }
│ │ │ │ +
118
│ │ │ │ +
130 static std::vector<unsigned> repartition(const GridView& gv, const Dune::MPIHelper& mpihelper, real_type itr = 1000) {
│ │ │ │
131
│ │ │ │ -
132 protected:
│ │ │ │ -
133 const IndexSet &indexSet () const { return *indexSet_; }
│ │ │ │ +
132 // Create global index map
│ │ │ │ +
133 GlobalIndexSet<GridView> globalIndex(gv,0);
│ │ │ │
134
│ │ │ │ - │ │ │ │ - │ │ │ │ -
137 Vector data_;
│ │ │ │ -
138 };
│ │ │ │ -
│ │ │ │ +
135 int numElements = std::distance(gv.template begin<0, Interior_Partition>(),
│ │ │ │ +
136 gv.template end<0, Interior_Partition>());
│ │ │ │ +
137
│ │ │ │ +
138 std::vector<unsigned> interiorPart(numElements);
│ │ │ │
139
│ │ │ │ -
140} // namespace Dune
│ │ │ │ -
141
│ │ │ │ -
142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ -
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │ +
140 // Setup parameters for ParMETIS
│ │ │ │ +
141 idx_type wgtflag = 0; // we don't use weights
│ │ │ │ +
142 idx_type numflag = 0; // we are using C-style arrays
│ │ │ │ +
143 idx_type ncon = 1; // number of balance constraints
│ │ │ │ +
144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
│ │ │ │ +
145 idx_type edgecut; // will store number of edges cut by partition
│ │ │ │ +
146 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
│ │ │ │ +
147 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
│ │ │ │ +
148 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
│ │ │ │ +
149
│ │ │ │ +
150 MPI_Comm comm = Dune::MPIHelper::getCommunicator();
│ │ │ │ +
151
│ │ │ │ +
152 // Make the number of interior elements of each processor available to all processors
│ │ │ │ +
153 std::vector<int> offset(gv.comm().size());
│ │ │ │ +
154 std::fill(offset.begin(), offset.end(), 0);
│ │ │ │ +
155
│ │ │ │ +
156 gv.comm().template allgather<int>(&numElements, 1, offset.data());
│ │ │ │ +
157
│ │ │ │ +
158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that are on process i
│ │ │ │ +
159 std::vector<idx_type> vtxdist(gv.comm().size()+1);
│ │ │ │ +
160 vtxdist[0] = 0;
│ │ │ │ +
161
│ │ │ │ +
162 for (unsigned int i=1; i<vtxdist.size(); ++i)
│ │ │ │ +
163 vtxdist[i] = vtxdist[i-1] + offset[i-1];
│ │ │ │ +
164
│ │ │ │ +
165 // Set up element adjacency lists
│ │ │ │ +
166 std::vector<idx_type> xadj, adjncy;
│ │ │ │ +
167 xadj.push_back(0);
│ │ │ │ +
168
│ │ │ │ +
169 for (const auto& element : elements(gv, Partitions::interior)) {
│ │ │ │ +
170 size_t numNeighbors = 0;
│ │ │ │ +
171
│ │ │ │ +
172 for (const auto& in : intersections(gv, element)) {
│ │ │ │ +
173 if (in.neighbor()) {
│ │ │ │ +
174 adjncy.push_back(globalIndex.index(in.outside()));
│ │ │ │ +
175
│ │ │ │ +
176 ++numNeighbors;
│ │ │ │ +
177 }
│ │ │ │ +
178 }
│ │ │ │ +
179
│ │ │ │ +
180 xadj.push_back(xadj.back() + numNeighbors);
│ │ │ │ +
181 }
│ │ │ │ +
182
│ │ │ │ +
183#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ +
184 const int OK =
│ │ │ │ +
185#endif
│ │ │ │ +
186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(), NULL, NULL, NULL,
│ │ │ │ +
187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(),
│ │ │ │ +
188 &itr, options, &edgecut, reinterpret_cast<idx_type*>(interiorPart.data()), &comm);
│ │ │ │ +
189
│ │ │ │ +
190#if PARMETIS_MAJOR_VERSION >= 4
│ │ │ │ +
191 if (OK != METIS_OK)
│ │ │ │ +
192 DUNE_THROW(Dune::Exception, "ParMETIS returned error code " << OK);
│ │ │ │ +
193#endif
│ │ │ │ +
194
│ │ │ │ +
195 // At this point, interiorPart contains a target rank for each interior element, and they are sorted
│ │ │ │ +
196 // by the order in which the grid view traverses them. Now we need to do two things:
│ │ │ │ +
197 // a) Add additional dummy entries for the ghost elements
│ │ │ │ +
198 // b) Use the element index for the actual ordering. Since there may be different types of elements,
│ │ │ │ +
199 // we cannot use the index set directly, but have to go through a Mapper.
│ │ │ │ +
200
│ │ │ │ +
201 typedef MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
│ │ │ │ +
202 ElementMapper elementMapper(gv, mcmgElementLayout());
│ │ │ │ +
203
│ │ │ │ +
204 std::vector<unsigned int> part(gv.size(0));
│ │ │ │ +
205 std::fill(part.begin(), part.end(), 0);
│ │ │ │ +
206 unsigned int c = 0;
│ │ │ │ +
207 for (const auto& element : elements(gv, Partitions::interior))
│ │ │ │ +
208 part[elementMapper.index(element)] = interiorPart[c++];
│ │ │ │ +
209
│ │ │ │ +
210 return part;
│ │ │ │ +
211 }
│ │ │ │ +
212 };
│ │ │ │ +
213
│ │ │ │ +
214} // namespace Dune
│ │ │ │ +
215
│ │ │ │ +
216#else // PARMETIS_MAJOR_VERSION
│ │ │ │ +
217#warning "You seem to be using the ParMETIS emulation layer of scotch, which does not work with this file."
│ │ │ │ +
218#endif
│ │ │ │ +
219
│ │ │ │ +
220#else // HAVE_PARMETIS
│ │ │ │ +
221#warning "PARMETIS was not found, please check your configuration"
│ │ │ │ +
222#endif
│ │ │ │ +
223
│ │ │ │ +
224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ + │ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │ +
Provides a globally unique index for all entities of a distributed Dune grid.
│ │ │ │ +
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ -
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │ -
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition indexidset.hh:223
│ │ │ │ -
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition indexidset.hh:153
│ │ │ │ -
IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition indexidset.hh:113
│ │ │ │ -
vector-based implementation of the PersistentContainer
Definition persistentcontainervector.hh:51
│ │ │ │ -
PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
Definition persistentcontainervector.hh:64
│ │ │ │ -
Iterator begin()
Definition persistentcontainervector.hh:125
│ │ │ │ -
Vector::size_type Size
Definition persistentcontainervector.hh:58
│ │ │ │ -
Vector::value_type Value
Definition persistentcontainervector.hh:57
│ │ │ │ -
Vector::allocator_type Allocator
Definition persistentcontainervector.hh:62
│ │ │ │ -
void fill(const Value &value)
Definition persistentcontainervector.hh:115
│ │ │ │ -
G Grid
Definition persistentcontainervector.hh:55
│ │ │ │ -
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainervector.hh:90
│ │ │ │ -
const IndexSet * indexSet_
Definition persistentcontainervector.hh:136
│ │ │ │ -
Vector::iterator Iterator
Definition persistentcontainervector.hh:60
│ │ │ │ -
ConstIterator begin() const
Definition persistentcontainervector.hh:124
│ │ │ │ -
ConstIterator end() const
Definition persistentcontainervector.hh:127
│ │ │ │ -
int codim_
Definition persistentcontainervector.hh:135
│ │ │ │ -
void shrinkToFit()
Definition persistentcontainervector.hh:113
│ │ │ │ -
Vector::const_iterator ConstIterator
Definition persistentcontainervector.hh:59
│ │ │ │ -
Vector data_
Definition persistentcontainervector.hh:137
│ │ │ │ -
Iterator end()
Definition persistentcontainervector.hh:128
│ │ │ │ -
const IndexSet & indexSet() const
Definition persistentcontainervector.hh:133
│ │ │ │ -
int codimension() const
Definition persistentcontainervector.hh:130
│ │ │ │ -
Size size() const
Definition persistentcontainervector.hh:105
│ │ │ │ -
void swap(This &other)
Definition persistentcontainervector.hh:117
│ │ │ │ -
const Value & operator[](const Entity &entity) const
Definition persistentcontainervector.hh:72
│ │ │ │ -
void resize(const Value &value=Value())
Definition persistentcontainervector.hh:107
│ │ │ │ +
constexpr Interior interior
PartitionSet for the interior partition.
Definition partitionset.hh:272
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,227 +1,248 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainervector.hh │ │ │ │ │ +parmetisgridpartitioner.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH │ │ │ │ │ -6#define DUNE_PERSISTENTCONTAINERVECTOR_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -13 │ │ │ │ │ -14 // PersistentContainerVector │ │ │ │ │ -15 // ------------------------- │ │ │ │ │ -16 │ │ │ │ │ -49 template< class G, class IndexSet, class Vector > │ │ │ │ │ -_5_0 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ -51 { │ │ │ │ │ -52 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_<_ _G_,_ _I_n_d_e_x_S_e_t_,_ _V_e_c_t_o_r_ _> _T_h_i_s; │ │ │ │ │ -53 │ │ │ │ │ -54 public: │ │ │ │ │ -_5_5 typedef G _G_r_i_d; │ │ │ │ │ -56 │ │ │ │ │ -_5_7 typedef typename Vector::value_type _V_a_l_u_e; │ │ │ │ │ -_5_8 typedef typename Vector::size_type _S_i_z_e; │ │ │ │ │ -_5_9 typedef typename Vector::const_iterator _C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -_6_0 typedef typename Vector::iterator _I_t_e_r_a_t_o_r; │ │ │ │ │ -61 │ │ │ │ │ -_6_2 typedef typename Vector::allocator_type _A_l_l_o_c_a_t_o_r; │ │ │ │ │ -63 │ │ │ │ │ -_6_4 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r ( const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t, int codim, const _V_a_l_u_e │ │ │ │ │ -&value, │ │ │ │ │ -65 const _A_l_l_o_c_a_t_o_r &allocator = _A_l_l_o_c_a_t_o_r() ) │ │ │ │ │ -66 : _c_o_d_i_m__( codim ), │ │ │ │ │ -67 _i_n_d_e_x_S_e_t__( &_i_n_d_e_x_S_e_t ), │ │ │ │ │ -68 _d_a_t_a__( _i_n_d_e_x_S_e_t._s_i_z_e( codim ), value, allocator ) │ │ │ │ │ -69 {} │ │ │ │ │ -70 │ │ │ │ │ -71 template< class Entity > │ │ │ │ │ -_7_2 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ -73 { │ │ │ │ │ -74 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -75 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._i_n_d_e_x( entity ); │ │ │ │ │ -76 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ -77 return _d_a_t_a__[ index ]; │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -80 template< class Entity > │ │ │ │ │ -_8_1 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -82 { │ │ │ │ │ -83 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -84 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._i_n_d_e_x( entity ); │ │ │ │ │ -85 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ -86 return _d_a_t_a__[ index ]; │ │ │ │ │ -87 } │ │ │ │ │ +3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ +4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ +5 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_l_o_b_a_l_i_n_d_e_x_s_e_t_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +22#if HAVE_PARMETIS │ │ │ │ │ +23 │ │ │ │ │ +24#include │ │ │ │ │ +25 │ │ │ │ │ +26// only enable for ParMETIS because the implementation uses functions that │ │ │ │ │ +27// are not emulated by scotch │ │ │ │ │ +28#ifdef PARMETIS_MAJOR_VERSION │ │ │ │ │ +29 │ │ │ │ │ +30namespace _D_u_n_e │ │ │ │ │ +31{ │ │ │ │ │ +32 │ │ │ │ │ +37 template │ │ │ │ │ +38 struct ParMetisGridPartitioner { │ │ │ │ │ +39 │ │ │ │ │ +40 // define index type as provided by ParMETIS │ │ │ │ │ +41#if PARMETIS_MAJOR_VERSION > 3 │ │ │ │ │ +42 typedef idx_t idx_type; │ │ │ │ │ +43 typedef ::real_t real_type; │ │ │ │ │ +44#else │ │ │ │ │ +45 typedef int idx_type; │ │ │ │ │ +46 typedef float real_type; │ │ │ │ │ +47#endif // PARMETIS_MAJOR_VERSION > 3 │ │ │ │ │ +48 │ │ │ │ │ +49 constexpr static int dimension = GridView::dimension; │ │ │ │ │ +50 │ │ │ │ │ +51 │ │ │ │ │ +62 static std::vector partition(const GridView& gv, const Dune:: │ │ │ │ │ +MPIHelper& mpihelper) { │ │ │ │ │ +63 const unsigned numElements = gv.size(0); │ │ │ │ │ +64 │ │ │ │ │ +65 std::vector part(numElements); │ │ │ │ │ +66 │ │ │ │ │ +67 // Setup parameters for ParMETIS │ │ │ │ │ +68 idx_type wgtflag = 0; // we don't use weights │ │ │ │ │ +69 idx_type numflag = 0; // we are using C-style arrays │ │ │ │ │ +70 idx_type ncon = 1; // number of balance constraints │ │ │ │ │ +71 idx_type ncommonnodes = 2; // number of nodes elements must have in common │ │ │ │ │ +to be considered adjacent to each other │ │ │ │ │ +72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, │ │ │ │ │ +output and coupling │ │ │ │ │ +73 idx_type edgecut; // will store number of edges cut by partition │ │ │ │ │ +74 idx_type nparts = mpihelper.size(); // number of parts equals number of │ │ │ │ │ +processes │ │ │ │ │ +75 std::vector tpwgts(ncon*nparts, 1./nparts); // load per subdomain │ │ │ │ │ +and weight (same load on every process) │ │ │ │ │ +76 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight │ │ │ │ │ +tolerance for every weight there is) │ │ │ │ │ +77 │ │ │ │ │ +78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are │ │ │ │ │ +on process i │ │ │ │ │ +79 std::vector elmdist(nparts+1); │ │ │ │ │ +80 elmdist[0] = 0; │ │ │ │ │ +81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements are │ │ │ │ │ +on process zero │ │ │ │ │ +82 │ │ │ │ │ +83 // Create and fill arrays "eptr", where eptr[i] is the number of vertices │ │ │ │ │ +that belong to the i-th element, and │ │ │ │ │ +84 // "eind" contains the vertex-numbers of the i-the element in eind[eptr[i]] │ │ │ │ │ +to eind[eptr[i+1]-1] │ │ │ │ │ +85 std::vector eptr, eind; │ │ │ │ │ +86 int numVertices = 0; │ │ │ │ │ +87 eptr.push_back(numVertices); │ │ │ │ │ 88 │ │ │ │ │ -89 template< class Entity > │ │ │ │ │ -_9_0 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const │ │ │ │ │ -91 { │ │ │ │ │ -92 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._s_u_b_I_n_d_e_x( entity, subEntity, _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -93 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ -94 return _d_a_t_a__[ index ]; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97 template< class Entity > │ │ │ │ │ -_9_8 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) │ │ │ │ │ -99 { │ │ │ │ │ -100 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._s_u_b_I_n_d_e_x( entity, subEntity, _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -101 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ -102 return _d_a_t_a__[ index ]; │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_5 _S_i_z_e _s_i_z_e () const { return _d_a_t_a__.size(); } │ │ │ │ │ -106 │ │ │ │ │ -_1_0_7 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ) │ │ │ │ │ -108 { │ │ │ │ │ -109 const _S_i_z_e indexSetSize = _i_n_d_e_x_S_e_t()._s_i_z_e( _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -110 _d_a_t_a__.resize( indexSetSize, value ); │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_3 void _s_h_r_i_n_k_T_o_F_i_t () {} │ │ │ │ │ -114 │ │ │ │ │ -_1_1_5 void _f_i_l_l ( const _V_a_l_u_e &value ) { std::fill( _b_e_g_i_n(), _e_n_d(), value ); } │ │ │ │ │ -116 │ │ │ │ │ -_1_1_7 void _s_w_a_p ( _T_h_i_s &other ) │ │ │ │ │ -118 { │ │ │ │ │ -119 _s_t_d_:_:_s_w_a_p( _c_o_d_i_m__, other._c_o_d_i_m__ ); │ │ │ │ │ -120 _s_t_d_:_:_s_w_a_p( _i_n_d_e_x_S_e_t__, other._i_n_d_e_x_S_e_t__ ); │ │ │ │ │ -121 _s_t_d_:_:_s_w_a_p( _d_a_t_a__, other._d_a_t_a__ ); │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -_1_2_4 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const { return _d_a_t_a__.begin(); } │ │ │ │ │ -_1_2_5 _I_t_e_r_a_t_o_r _b_e_g_i_n () { return _d_a_t_a__.begin(); } │ │ │ │ │ -126 │ │ │ │ │ -_1_2_7 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const { return _d_a_t_a__.end(); } │ │ │ │ │ -_1_2_8 _I_t_e_r_a_t_o_r _e_n_d () { return _d_a_t_a__.end(); } │ │ │ │ │ -129 │ │ │ │ │ -_1_3_0 int _c_o_d_i_m_e_n_s_i_o_n () const { return _c_o_d_i_m__; } │ │ │ │ │ +89 for (const auto& element : elements(gv, Partitions::_i_n_t_e_r_i_o_r)) { │ │ │ │ │ +90 const size_t curNumVertices = referenceElement │ │ │ │ │ +(element.type()).size(dimension); │ │ │ │ │ +91 │ │ │ │ │ +92 numVertices += curNumVertices; │ │ │ │ │ +93 eptr.push_back(numVertices); │ │ │ │ │ +94 │ │ │ │ │ +95 for (size_t k = 0; k < curNumVertices; ++k) │ │ │ │ │ +96 eind.push_back(gv.indexSet().subIndex(element, k, dimension)); │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +99 // Partition mesh using ParMETIS │ │ │ │ │ +100 if (0 == mpihelper.rank()) { │ │ │ │ │ +101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator(); │ │ │ │ │ +102 │ │ │ │ │ +103#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ +104 const int OK = │ │ │ │ │ +105#endif │ │ │ │ │ +106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL, │ │ │ │ │ +&wgtflag, &numflag, │ │ │ │ │ +107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(), │ │ │ │ │ +108 options, &edgecut, reinterpret_cast(part.data()), &comm); │ │ │ │ │ +109 │ │ │ │ │ +110#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ +111 if (OK != METIS_OK) │ │ │ │ │ +112 DUNE_THROW(Dune::Exception, "ParMETIS returned an error code."); │ │ │ │ │ +113#endif │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +116 return part; │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +130 static std::vector repartition(const GridView& gv, const Dune:: │ │ │ │ │ +MPIHelper& mpihelper, real_type itr = 1000) { │ │ │ │ │ 131 │ │ │ │ │ -132 protected: │ │ │ │ │ -_1_3_3 const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t () const { return *_i_n_d_e_x_S_e_t__; } │ │ │ │ │ +132 // Create global index map │ │ │ │ │ +133 GlobalIndexSet globalIndex(gv,0); │ │ │ │ │ 134 │ │ │ │ │ -_1_3_5 int _c_o_d_i_m__; │ │ │ │ │ -_1_3_6 const _I_n_d_e_x_S_e_t *_i_n_d_e_x_S_e_t__; │ │ │ │ │ -_1_3_7 Vector _d_a_t_a__; │ │ │ │ │ -138 }; │ │ │ │ │ +135 int numElements = std::distance(gv.template begin<0, Interior_Partition>(), │ │ │ │ │ +136 gv.template end<0, Interior_Partition>()); │ │ │ │ │ +137 │ │ │ │ │ +138 std::vector interiorPart(numElements); │ │ │ │ │ 139 │ │ │ │ │ -140} // namespace Dune │ │ │ │ │ -141 │ │ │ │ │ -142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH │ │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ │ -void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ -> &b) │ │ │ │ │ -DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ +140 // Setup parameters for ParMETIS │ │ │ │ │ +141 idx_type wgtflag = 0; // we don't use weights │ │ │ │ │ +142 idx_type numflag = 0; // we are using C-style arrays │ │ │ │ │ +143 idx_type ncon = 1; // number of balance constraints │ │ │ │ │ +144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, │ │ │ │ │ +output and coupling │ │ │ │ │ +145 idx_type edgecut; // will store number of edges cut by partition │ │ │ │ │ +146 idx_type nparts = mpihelper.size(); // number of parts equals number of │ │ │ │ │ +processes │ │ │ │ │ +147 std::vector tpwgts(ncon*nparts, 1./nparts); // load per │ │ │ │ │ +subdomain and weight (same load on every process) │ │ │ │ │ +148 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight │ │ │ │ │ +tolerance for every weight there is) │ │ │ │ │ +149 │ │ │ │ │ +150 MPI_Comm comm = Dune::MPIHelper::getCommunicator(); │ │ │ │ │ +151 │ │ │ │ │ +152 // Make the number of interior elements of each processor available to all │ │ │ │ │ +processors │ │ │ │ │ +153 std::vector offset(gv.comm().size()); │ │ │ │ │ +154 std::fill(offset.begin(), offset.end(), 0); │ │ │ │ │ +155 │ │ │ │ │ +156 gv.comm().template allgather(&numElements, 1, offset.data()); │ │ │ │ │ +157 │ │ │ │ │ +158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that │ │ │ │ │ +are on process i │ │ │ │ │ +159 std::vector vtxdist(gv.comm().size()+1); │ │ │ │ │ +160 vtxdist[0] = 0; │ │ │ │ │ +161 │ │ │ │ │ +162 for (unsigned int i=1; i xadj, adjncy; │ │ │ │ │ +167 xadj.push_back(0); │ │ │ │ │ +168 │ │ │ │ │ +169 for (const auto& element : elements(gv, Partitions::_i_n_t_e_r_i_o_r)) { │ │ │ │ │ +170 size_t numNeighbors = 0; │ │ │ │ │ +171 │ │ │ │ │ +172 for (const auto& in : intersections(gv, element)) { │ │ │ │ │ +173 if (in.neighbor()) { │ │ │ │ │ +174 adjncy.push_back(globalIndex.index(in.outside())); │ │ │ │ │ +175 │ │ │ │ │ +176 ++numNeighbors; │ │ │ │ │ +177 } │ │ │ │ │ +178 } │ │ │ │ │ +179 │ │ │ │ │ +180 xadj.push_back(xadj.back() + numNeighbors); │ │ │ │ │ +181 } │ │ │ │ │ +182 │ │ │ │ │ +183#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ +184 const int OK = │ │ │ │ │ +185#endif │ │ │ │ │ +186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(), │ │ │ │ │ +NULL, NULL, NULL, │ │ │ │ │ +187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(), │ │ │ │ │ +188 &itr, options, &edgecut, reinterpret_cast(interiorPart.data()), │ │ │ │ │ +&comm); │ │ │ │ │ +189 │ │ │ │ │ +190#if PARMETIS_MAJOR_VERSION >= 4 │ │ │ │ │ +191 if (OK != METIS_OK) │ │ │ │ │ +192 DUNE_THROW(Dune::Exception, "ParMETIS returned error code " << OK); │ │ │ │ │ +193#endif │ │ │ │ │ +194 │ │ │ │ │ +195 // At this point, interiorPart contains a target rank for each interior │ │ │ │ │ +element, and they are sorted │ │ │ │ │ +196 // by the order in which the grid view traverses them. Now we need to do │ │ │ │ │ +two things: │ │ │ │ │ +197 // a) Add additional dummy entries for the ghost elements │ │ │ │ │ +198 // b) Use the element index for the actual ordering. Since there may be │ │ │ │ │ +different types of elements, │ │ │ │ │ +199 // we cannot use the index set directly, but have to go through a Mapper. │ │ │ │ │ +200 │ │ │ │ │ +201 typedef MultipleCodimMultipleGeomTypeMapper ElementMapper; │ │ │ │ │ +202 ElementMapper elementMapper(gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t()); │ │ │ │ │ +203 │ │ │ │ │ +204 std::vector part(gv.size(0)); │ │ │ │ │ +205 std::fill(part.begin(), part.end(), 0); │ │ │ │ │ +206 unsigned int c = 0; │ │ │ │ │ +207 for (const auto& element : elements(gv, Partitions::_i_n_t_e_r_i_o_r)) │ │ │ │ │ +208 part[elementMapper.index(element)] = interiorPart[c++]; │ │ │ │ │ +209 │ │ │ │ │ +210 return part; │ │ │ │ │ +211 } │ │ │ │ │ +212 }; │ │ │ │ │ +213 │ │ │ │ │ +214} // namespace Dune │ │ │ │ │ +215 │ │ │ │ │ +216#else // PARMETIS_MAJOR_VERSION │ │ │ │ │ +217#warning "You seem to be using the ParMETIS emulation layer of scotch, which │ │ │ │ │ +does not work with this file." │ │ │ │ │ +218#endif │ │ │ │ │ +219 │ │ │ │ │ +220#else // HAVE_PARMETIS │ │ │ │ │ +221#warning "PARMETIS was not found, please check your configuration" │ │ │ │ │ +222#endif │ │ │ │ │ +223 │ │ │ │ │ +224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ +_r_a_n_g_e_g_e_n_e_r_a_t_o_r_s_._h_h │ │ │ │ │ +_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ +Mapper for multiple codim and multiple geometry types. │ │ │ │ │ +_g_l_o_b_a_l_i_n_d_e_x_s_e_t_._h_h │ │ │ │ │ +Provides a globally unique index for all entities of a distributed Dune grid. │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgElementLayout() │ │ │ │ │ +layout for elements (codim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -Know your own codimension. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Index Set Interface base class. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ -auto size(GeometryType type) const │ │ │ │ │ -Return total number of entities of given geometry type in entity set . │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:223 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int │ │ │ │ │ -i, unsigned int codim) const │ │ │ │ │ -Map a subentity to an index. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ -IndexType index(const typename Traits::template Codim< cc >::Entity &e) const │ │ │ │ │ -Map entity to index. The result of calling this method with an entity that is │ │ │ │ │ -not in the index set is... │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ -vector-based implementation of the PersistentContainer │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ -PersistentContainerVector(const IndexSet &indexSet, int codim, const Value │ │ │ │ │ -&value, const Allocator &allocator=Allocator()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_S_i_z_e │ │ │ │ │ -Vector::size_type Size │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ -Vector::value_type Value │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_A_l_l_o_c_a_t_o_r │ │ │ │ │ -Vector::allocator_type Allocator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_f_i_l_l │ │ │ │ │ -void fill(const Value &value) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_i_n_d_e_x_S_e_t__ │ │ │ │ │ -const IndexSet * indexSet_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Vector::iterator Iterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ │ -ConstIterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_e_n_d │ │ │ │ │ -ConstIterator end() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_c_o_d_i_m__ │ │ │ │ │ -int codim_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -Vector::const_iterator ConstIterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_d_a_t_a__ │ │ │ │ │ -Vector data_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_e_n_d │ │ │ │ │ -Iterator end() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ -const IndexSet & indexSet() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -int codimension() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_s_i_z_e │ │ │ │ │ -Size size() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_s_w_a_p │ │ │ │ │ -void swap(This &other) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:117 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const Value & operator[](const Entity &entity) const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const Value &value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainervector.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_s_:_:_i_n_t_e_r_i_o_r │ │ │ │ │ +constexpr Interior interior │ │ │ │ │ +PartitionSet for the interior partition. │ │ │ │ │ +DDeeffiinniittiioonn partitionset.hh:272 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vertexorderfactory.hh File Reference │ │ │ │ +dune-grid: persistentcontainermap.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vertexorderfactory.hh File Reference
│ │ │ │ +
persistentcontainermap.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <algorithm>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <functional>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/generalvertexorder.hh>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/common/capabilities.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VertexOrderByIdFactory< IdSet, Index >
 Factory for GeneralVertexOrder objects using an IdSet. More...
class  Dune::PersistentContainerMap< G, IdSet, Map >
 map-based implementation of the PersistentContainer More...
 
struct  Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim >
 type of vertex order object may depend on the dimension of the element More...
class  Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vertexorderfactory.hh File Reference │ │ │ │ │ +persistentcontainermap.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_<_ _I_d_S_e_t_,_ _I_n_d_e_x_ _> │ │ │ │ │ -  Factory for GeneralVertexOrder objects using an _I_d_S_e_t. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ +  map-based implementation of the _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_<_ _I_d_S_e_t_,_ _I_n_d_e_x_ _>_:_:_V_e_r_t_e_x_O_r_d_e_r_<_ _d_i_m_ _> │ │ │ │ │ -  type of vertex order object may depend on the dimension of the element │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _v_a_l_u_e_, │ │ │ │ │ + _i_t_e_r_a_t_o_r_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vertexorderfactory.hh Source File │ │ │ │ +dune-grid: persistentcontainermap.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,82 +74,387 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vertexorderfactory.hh
│ │ │ │ +
persistentcontainermap.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
│ │ │ │ -
7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <algorithm>
│ │ │ │ -
10#include <cstddef>
│ │ │ │ -
11#include <functional>
│ │ │ │ -
12#include <vector>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
15#include <dune/geometry/generalvertexorder.hh>
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9#include <cassert>
│ │ │ │ +
10#include <type_traits>
│ │ │ │ +
11#include <utility>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/hybridutilities.hh>
│ │ │ │ +
14#include <dune/common/typetraits.hh>
│ │ │ │ + │ │ │ │
16
│ │ │ │ -
17namespace Dune {
│ │ │ │ -
18
│ │ │ │ -
20
│ │ │ │ -
31 template<class IdSet, class Index = std::size_t>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 const IdSet& idset;
│ │ │ │ -
34
│ │ │ │ -
35 public:
│ │ │ │ -
37 template<std::size_t dim>
│ │ │ │ -
│ │ │ │ -
38 struct VertexOrder {
│ │ │ │ -
40 typedef GeneralVertexOrder<dim, Index> type;
│ │ │ │ -
41 };
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
44
│ │ │ │ -
53 VertexOrderByIdFactory(const IdSet &idset_) : idset(idset_) { }
│ │ │ │ -
54
│ │ │ │ -
56
│ │ │ │ -
62 template<typename Element>
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
64 make(const Element &e) const {
│ │ │ │ -
65
│ │ │ │ -
66 std::size_t size = referenceElement(e.geometry()).size(Element::mydimension);
│ │ │ │ -
67
│ │ │ │ -
68 std::vector<typename IdSet::IdType> ids(size);
│ │ │ │ -
69 for(std::size_t i = 0; i < size; ++i)
│ │ │ │ -
70 ids[i] = idset.subId(e, i, Element::mydimension);
│ │ │ │ -
71 return GeneralVertexOrder<Element::mydimension, Index>
│ │ │ │ -
72 (e.type(), ids.begin(), ids.end());
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74 };
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
76} // namespace Dune
│ │ │ │ -
77
│ │ │ │ -
78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 // PersistentContainerMap
│ │ │ │ +
21 // ----------------------
│ │ │ │ +
22
│ │ │ │ +
24 template< class G, class IdSet, class Map >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29 protected:
│ │ │ │ +
30 template< class reference, class iterator >
│ │ │ │ +
31 class IteratorWrapper;
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ +
34 typedef G Grid;
│ │ │ │ +
35
│ │ │ │ +
36 typedef typename Map::mapped_type Value;
│ │ │ │ +
37 typedef typename Map::size_type Size;
│ │ │ │ +
38
│ │ │ │ + │ │ │ │ + │ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
42 PersistentContainerMap ( const Grid &grid, int codim, const IdSet &idSet, const Value &value )
│ │ │ │ +
43 : grid_( &grid ),
│ │ │ │ +
44 codim_( codim ),
│ │ │ │ +
45 idSet_( &idSet ),
│ │ │ │ +
46 data_()
│ │ │ │ +
47 {
│ │ │ │ +
48 resize( value );
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51 template< class Entity >
│ │ │ │ +
│ │ │ │ +
52 const Value &operator[] ( const Entity &entity ) const
│ │ │ │ +
53 {
│ │ │ │ +
54 assert( Entity::codimension == codimension() );
│ │ │ │ +
55 typename Map::const_iterator pos = data_.find( idSet().id( entity ) );
│ │ │ │ +
56 assert( pos != data_.end() );
│ │ │ │ +
57 return pos->second;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
60 template< class Entity >
│ │ │ │ +
│ │ │ │ +
61 Value &operator[] ( const Entity &entity )
│ │ │ │ +
62 {
│ │ │ │ +
63 assert( Entity::codimension == codimension() );
│ │ │ │ +
64 typename Map::iterator pos = data_.find( idSet().id( entity ) );
│ │ │ │ +
65 assert( pos != data_.end() );
│ │ │ │ +
66 return pos->second;
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
69 template< class Entity >
│ │ │ │ +
│ │ │ │ +
70 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ +
71 {
│ │ │ │ +
72 typename Map::const_iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
│ │ │ │ +
73 assert( pos != data_.end() );
│ │ │ │ +
74 return pos->second;
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
77 template< class Entity >
│ │ │ │ +
│ │ │ │ +
78 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ +
79 {
│ │ │ │ +
80 typename Map::iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
│ │ │ │ +
81 assert( pos != data_.end() );
│ │ │ │ +
82 return pos->second;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
85 Size size () const { return data_.size(); }
│ │ │ │ +
86
│ │ │ │ +
│ │ │ │ +
87 void resize ( const Value &value = Value() )
│ │ │ │ +
88 {
│ │ │ │ +
89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{},
│ │ │ │ +
90 [ & ]( auto i ){ if( int(i) == this->codimension() ) this->template resize< i >( value ); } );
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93 void shrinkToFit () {}
│ │ │ │ +
94
│ │ │ │ +
95 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ +
97 void swap ( This &other )
│ │ │ │ +
98 {
│ │ │ │ +
99 std::swap( grid_, other.grid_ );
│ │ │ │ +
100 std::swap( codim_, other.codim_ );
│ │ │ │ +
101 std::swap( idSet_, other.idSet_ );
│ │ │ │ +
102 std::swap( data_, other.data_ );
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
107
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
110
│ │ │ │ +
111 int codimension () const { return codim_; }
│ │ │ │ +
112
│ │ │ │ +
113 protected:
│ │ │ │ +
114 const Grid &grid () const { return *grid_; }
│ │ │ │ +
115
│ │ │ │ +
116 template< int codim >
│ │ │ │ +
│ │ │ │ +
117 void resize ( const Value &value );
│ │ │ │ +
118
│ │ │ │ +
119 template< int codim >
│ │ │ │ +
│ │ │ │ +
120 void migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ +
121 std::integral_constant< bool, true > );
│ │ │ │ +
122
│ │ │ │ +
123 template< int codim >
│ │ │ │ +
│ │ │ │ +
124 void migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ +
125 std::integral_constant< bool, false > );
│ │ │ │ +
126
│ │ │ │ +
│ │ │ │ +
127 static void migrateEntry ( const typename IdSet::IdType &id, const Value &value,
│ │ │ │ +
128 Map &oldData, Map &newData );
│ │ │ │ +
129
│ │ │ │ +
130 const IdSet &idSet () const { return *idSet_; }
│ │ │ │ +
131
│ │ │ │ +
132 const Grid *grid_;
│ │ │ │ + │ │ │ │ +
134 const IdSet *idSet_;
│ │ │ │ +
135 Map data_;
│ │ │ │ +
136 };
│ │ │ │ +
137
│ │ │ │ +
138
│ │ │ │ +
139
│ │ │ │ +
140 // PersistentContainerMap::IteratorWrapper
│ │ │ │ +
141 // ---------------------------------------
│ │ │ │ +
142
│ │ │ │ +
143 template< class G, class IdSet, class Map >
│ │ │ │ +
144 template< class value, class iterator >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
146 : public iterator
│ │ │ │ +
147 {
│ │ │ │ + │ │ │ │ +
149
│ │ │ │ +
150 public:
│ │ │ │ +
151 IteratorWrapper ( const iterator &it ) : it_( it ) {}
│ │ │ │ +
152
│ │ │ │ +
153 operator ConstWrapper () const { return ConstWrapper( it_ ); }
│ │ │ │ +
154
│ │ │ │ +
155 value &operator* () { return it_->second; }
│ │ │ │ +
156 value *operator-> () { return &(it_->second); }
│ │ │ │ +
157
│ │ │ │ +
158 bool operator== ( const IteratorWrapper &other ) const { return (it_ == other.it_); }
│ │ │ │ +
159 bool operator!= ( const IteratorWrapper &other ) const { return (it_ != other.it_); }
│ │ │ │ +
160
│ │ │ │ +
161 IteratorWrapper &operator++ () { ++it_; return *this; }
│ │ │ │ +
162
│ │ │ │ +
163 private:
│ │ │ │ +
164 iterator it_;
│ │ │ │ +
165 };
│ │ │ │ +
│ │ │ │ +
166
│ │ │ │ +
167
│ │ │ │ +
168
│ │ │ │ +
169
│ │ │ │ +
170 // Implementation of PersistentContainerMap
│ │ │ │ +
171 // ----------------------------------------
│ │ │ │ +
172
│ │ │ │ +
173 template< class G, class IdSet, class Map >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
176 {
│ │ │ │ +
177 return ConstIterator( data_.begin() );
│ │ │ │ +
178 }
│ │ │ │ +
│ │ │ │ +
179
│ │ │ │ +
180 template< class G, class IdSet, class Map >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
183 {
│ │ │ │ +
184 return Iterator( data_.begin() );
│ │ │ │ +
185 }
│ │ │ │ +
│ │ │ │ +
186
│ │ │ │ +
187
│ │ │ │ +
188 template< class G, class IdSet, class Map >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
191 {
│ │ │ │ +
192 return ConstIterator( data_.end() );
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
195 template< class G, class IdSet, class Map >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
198 {
│ │ │ │ +
199 return Iterator( data_.end() );
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
202
│ │ │ │ +
203 template< class G, class IdSet, class Map >
│ │ │ │ +
204 template< int codim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
206 {
│ │ │ │ +
207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim >::v > hasEntityIterator;
│ │ │ │ +
208 assert( codim == codimension() );
│ │ │ │ +
209
│ │ │ │ +
210 // create empty map and swap it with current map (no need to copy twice)
│ │ │ │ +
211 Map data;
│ │ │ │ +
212 std::swap( data, data_ );
│ │ │ │ +
213
│ │ │ │ +
214 // copy all data from old map into new one (adding new entries, if necessary)
│ │ │ │ +
215 const int maxLevel = grid().maxLevel();
│ │ │ │ +
216 for ( int level = 0; level <= maxLevel; ++level )
│ │ │ │ +
217 migrateLevel< codim >( level, value, data, hasEntityIterator );
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219
│ │ │ │ +
220
│ │ │ │ +
221 template< class G, class IdSet, class Map >
│ │ │ │ +
222 template< int codim >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
224 ::migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ +
225 std::integral_constant< bool, true > )
│ │ │ │ +
226 {
│ │ │ │ +
227 typedef typename Grid::LevelGridView LevelView;
│ │ │ │ +
228 typedef typename LevelView::template Codim< codim >::Iterator LevelIterator;
│ │ │ │ +
229
│ │ │ │ +
230 const LevelView levelView = grid().levelGridView( level );
│ │ │ │ +
231 const LevelIterator end = levelView.template end< codim >();
│ │ │ │ +
232 for( LevelIterator it = levelView.template begin< codim >(); it != end; ++it )
│ │ │ │ +
233 migrateEntry( idSet().id( *it ), value, data, data_ );
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
236
│ │ │ │ +
237 template< class G, class IdSet, class Map >
│ │ │ │ +
238 template< int codim >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
240 ::migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ +
241 std::integral_constant< bool, false > )
│ │ │ │ +
242 {
│ │ │ │ +
243 typedef typename Grid::LevelGridView LevelView;
│ │ │ │ +
244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator;
│ │ │ │ +
245
│ │ │ │ +
246 const LevelView levelView = grid().levelGridView( level );
│ │ │ │ +
247 const LevelIterator end = levelView.template end< 0 >();
│ │ │ │ +
248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it )
│ │ │ │ +
249 {
│ │ │ │ +
250 const typename LevelIterator::Entity &entity = *it;
│ │ │ │ +
251 const int subEntities = entity.subEntities( codim );
│ │ │ │ +
252 for( int i = 0; i < subEntities; ++i )
│ │ │ │ +
253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ );
│ │ │ │ +
254 }
│ │ │ │ +
255 }
│ │ │ │ +
│ │ │ │ +
256
│ │ │ │ +
257
│ │ │ │ +
258 template< class G, class IdSet, class Map >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
260 ::migrateEntry ( const typename IdSet::IdType &id, const Value &value,
│ │ │ │ +
261 Map &oldData, Map &newData )
│ │ │ │ +
262 {
│ │ │ │ +
263 // insert entry for id
│ │ │ │ +
264 const std::pair< typename Map::iterator, bool > inserted
│ │ │ │ +
265 = newData.insert( std::make_pair( id, value ) );
│ │ │ │ +
266
│ │ │ │ +
267 // if entry did not exist previously, copy data
│ │ │ │ +
268 if( inserted.second )
│ │ │ │ +
269 {
│ │ │ │ +
270 const typename Map::iterator pos = oldData.find( id );
│ │ │ │ +
271 if( pos != oldData.end() )
│ │ │ │ +
272 {
│ │ │ │ +
273 inserted.first->second = pos->second;
│ │ │ │ +
274 oldData.erase( pos );
│ │ │ │ +
275 }
│ │ │ │ +
276 }
│ │ │ │ +
277 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
279} // namespace Dune
│ │ │ │ +
280
│ │ │ │ +
281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition common/geometry.hh:558
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ -
IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
Definition indexidset.hh:486
│ │ │ │ -
Factory for GeneralVertexOrder objects using an IdSet.
Definition vertexorderfactory.hh:32
│ │ │ │ -
VertexOrderByIdFactory(const IdSet &idset_)
construct a factory object
Definition vertexorderfactory.hh:53
│ │ │ │ -
VertexOrder< Element::mydimension >::type make(const Element &e) const
construct a vertex ordering object
Definition vertexorderfactory.hh:64
│ │ │ │ -
type of vertex order object may depend on the dimension of the element
Definition vertexorderfactory.hh:38
│ │ │ │ -
GeneralVertexOrder< dim, Index > type
type of vertex order object
Definition vertexorderfactory.hh:40
│ │ │ │ +
IdTypeImp IdType
Type used to represent an id.
Definition indexidset.hh:458
│ │ │ │ +
GridFamily::Traits::LevelGridView LevelGridView
type of view for level grid
Definition common/grid.hh:402
│ │ │ │ +
Export the type of the entity used as parameter in the id(...) method.
Definition indexidset.hh:462
│ │ │ │ +
map-based implementation of the PersistentContainer
Definition persistentcontainermap.hh:26
│ │ │ │ +
void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, false >)
Definition persistentcontainermap.hh:240
│ │ │ │ +
void swap(This &other)
Definition persistentcontainermap.hh:97
│ │ │ │ +
void fill(const Value &value)
Definition persistentcontainermap.hh:95
│ │ │ │ +
G Grid
Definition persistentcontainermap.hh:34
│ │ │ │ +
void resize(const Value &value)
Definition persistentcontainermap.hh:205
│ │ │ │ +
IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator
Definition persistentcontainermap.hh:39
│ │ │ │ +
int codim_
Definition persistentcontainermap.hh:133
│ │ │ │ +
const Grid * grid_
Definition persistentcontainermap.hh:132
│ │ │ │ +
const Value & operator[](const Entity &entity) const
Definition persistentcontainermap.hh:52
│ │ │ │ +
int codimension() const
Definition persistentcontainermap.hh:111
│ │ │ │ +
void resize(const Value &value=Value())
Definition persistentcontainermap.hh:87
│ │ │ │ +
const IdSet & idSet() const
Definition persistentcontainermap.hh:130
│ │ │ │ +
ConstIterator begin() const
Definition persistentcontainermap.hh:175
│ │ │ │ +
static void migrateEntry(const typename IdSet::IdType &id, const Value &value, Map &oldData, Map &newData)
Definition persistentcontainermap.hh:260
│ │ │ │ +
Map::mapped_type Value
Definition persistentcontainermap.hh:36
│ │ │ │ +
Iterator end()
Definition persistentcontainermap.hh:197
│ │ │ │ +
const Grid & grid() const
Definition persistentcontainermap.hh:114
│ │ │ │ +
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainermap.hh:70
│ │ │ │ +
PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const Value &value)
Definition persistentcontainermap.hh:42
│ │ │ │ +
Iterator begin()
Definition persistentcontainermap.hh:182
│ │ │ │ +
Map::size_type Size
Definition persistentcontainermap.hh:37
│ │ │ │ +
ConstIterator end() const
Definition persistentcontainermap.hh:190
│ │ │ │ +
Map data_
Definition persistentcontainermap.hh:135
│ │ │ │ +
Size size() const
Definition persistentcontainermap.hh:85
│ │ │ │ +
IteratorWrapper< Value, typename Map::iterator > Iterator
Definition persistentcontainermap.hh:40
│ │ │ │ +
const IdSet * idSet_
Definition persistentcontainermap.hh:134
│ │ │ │ +
void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, true >)
Definition persistentcontainermap.hh:224
│ │ │ │ +
void shrinkToFit()
Definition persistentcontainermap.hh:93
│ │ │ │ +
Definition persistentcontainermap.hh:147
│ │ │ │ +
IteratorWrapper(const iterator &it)
Definition persistentcontainermap.hh:151
│ │ │ │ +
A set of traits classes to store static information about grid implementation.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,96 +1,432 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -vertexorderfactory.hh │ │ │ │ │ +persistentcontainermap.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH │ │ │ │ │ -7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ +5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ 16 │ │ │ │ │ -17namespace _D_u_n_e { │ │ │ │ │ -18 │ │ │ │ │ -20 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 class _V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y { │ │ │ │ │ -33 const _I_d_S_e_t& idset; │ │ │ │ │ -34 │ │ │ │ │ -35 public: │ │ │ │ │ -37 template │ │ │ │ │ -_3_8 struct _V_e_r_t_e_x_O_r_d_e_r { │ │ │ │ │ -_4_0 typedef GeneralVertexOrder _t_y_p_e; │ │ │ │ │ -41 }; │ │ │ │ │ -42 │ │ │ │ │ -44 │ │ │ │ │ -_5_3 _V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y(const _I_d_S_e_t &idset_) : idset(idset_) { } │ │ │ │ │ -54 │ │ │ │ │ -56 │ │ │ │ │ -62 template │ │ │ │ │ -63 typename _V_e_r_t_e_x_O_r_d_e_r_<_E_l_e_m_e_n_t_:_:_m_y_d_i_m_e_n_s_i_o_n_>_:_:_t_y_p_e │ │ │ │ │ -_6_4 _m_a_k_e(const Element &e) const { │ │ │ │ │ -65 │ │ │ │ │ -66 std::size_t size = _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(e.geometry()).size(Element:: │ │ │ │ │ -mydimension); │ │ │ │ │ -67 │ │ │ │ │ -68 std::vector ids(size); │ │ │ │ │ -69 for(std::size_t i = 0; i < size; ++i) │ │ │ │ │ -70 ids[i] = idset._s_u_b_I_d(e, i, Element::mydimension); │ │ │ │ │ -71 return GeneralVertexOrder │ │ │ │ │ -72 (e.type(), ids.begin(), ids.end()); │ │ │ │ │ -73 } │ │ │ │ │ -74 }; │ │ │ │ │ -75 │ │ │ │ │ -76} // namespace Dune │ │ │ │ │ -77 │ │ │ │ │ -78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 // PersistentContainerMap │ │ │ │ │ +21 // ---------------------- │ │ │ │ │ +22 │ │ │ │ │ +24 template< class G, class IdSet, class Map > │ │ │ │ │ +_2_5 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p │ │ │ │ │ +26 { │ │ │ │ │ +27 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> _T_h_i_s; │ │ │ │ │ +28 │ │ │ │ │ +29 protected: │ │ │ │ │ +30 template< class reference, class iterator > │ │ │ │ │ +31 class _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r; │ │ │ │ │ +32 │ │ │ │ │ +33 public: │ │ │ │ │ +_3_4 typedef G _G_r_i_d; │ │ │ │ │ +35 │ │ │ │ │ +_3_6 typedef typename Map::mapped_type _V_a_l_u_e; │ │ │ │ │ +_3_7 typedef typename Map::size_type _S_i_z_e; │ │ │ │ │ +38 │ │ │ │ │ +_3_9 typedef _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _c_o_n_s_t_ _V_a_l_u_e_,_ _t_y_p_e_n_a_m_e_ _M_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r_ _> │ │ │ │ │ +_C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ +_4_0 typedef _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _V_a_l_u_e_,_ _t_y_p_e_n_a_m_e_ _M_a_p_:_:_i_t_e_r_a_t_o_r_ _> _I_t_e_r_a_t_o_r; │ │ │ │ │ +41 │ │ │ │ │ +_4_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p ( const _G_r_i_d &_g_r_i_d, int codim, const _I_d_S_e_t &_i_d_S_e_t, │ │ │ │ │ +const _V_a_l_u_e &value ) │ │ │ │ │ +43 : _g_r_i_d__( &_g_r_i_d ), │ │ │ │ │ +44 _c_o_d_i_m__( codim ), │ │ │ │ │ +45 _i_d_S_e_t__( &_i_d_S_e_t ), │ │ │ │ │ +46 _d_a_t_a__() │ │ │ │ │ +47 { │ │ │ │ │ +48 _r_e_s_i_z_e( value ); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +51 template< class Entity > │ │ │ │ │ +_5_2 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ +53 { │ │ │ │ │ +54 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +55 typename Map::const_iterator pos = _d_a_t_a__.find( _i_d_S_e_t().id( entity ) ); │ │ │ │ │ +56 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ +57 return pos->second; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +60 template< class Entity > │ │ │ │ │ +_6_1 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +62 { │ │ │ │ │ +63 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +64 typename Map::iterator pos = _d_a_t_a__.find( _i_d_S_e_t().id( entity ) ); │ │ │ │ │ +65 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ +66 return pos->second; │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +69 template< class Entity > │ │ │ │ │ +_7_0 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const │ │ │ │ │ +71 { │ │ │ │ │ +72 typename Map::const_iterator pos = _d_a_t_a__.find( _i_d_S_e_t().subId( entity, │ │ │ │ │ +subEntity, _c_o_d_i_m_e_n_s_i_o_n() ) ); │ │ │ │ │ +73 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ +74 return pos->second; │ │ │ │ │ +75 } │ │ │ │ │ +76 │ │ │ │ │ +77 template< class Entity > │ │ │ │ │ +_7_8 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) │ │ │ │ │ +79 { │ │ │ │ │ +80 typename Map::iterator pos = _d_a_t_a__.find( _i_d_S_e_t().subId( entity, subEntity, │ │ │ │ │ +_c_o_d_i_m_e_n_s_i_o_n() ) ); │ │ │ │ │ +81 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ +82 return pos->second; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_8_5 _S_i_z_e _s_i_z_e () const { return _d_a_t_a__.size(); } │ │ │ │ │ +86 │ │ │ │ │ +_8_7 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ) │ │ │ │ │ +88 { │ │ │ │ │ +89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{}, │ │ │ │ │ +90 [ & ]( auto i ){ if( int(i) == this->_c_o_d_i_m_e_n_s_i_o_n() ) this->template resize< │ │ │ │ │ +i >( value ); } ); │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +_9_3 void _s_h_r_i_n_k_T_o_F_i_t () {} │ │ │ │ │ +94 │ │ │ │ │ +_9_5 void _f_i_l_l ( const _V_a_l_u_e &value ) { std::fill( _b_e_g_i_n(), _e_n_d(), value ); } │ │ │ │ │ +96 │ │ │ │ │ +_9_7 void _s_w_a_p ( _T_h_i_s &other ) │ │ │ │ │ +98 { │ │ │ │ │ +99 _s_t_d_:_:_s_w_a_p( _g_r_i_d__, other._g_r_i_d__ ); │ │ │ │ │ +100 _s_t_d_:_:_s_w_a_p( _c_o_d_i_m__, other._c_o_d_i_m__ ); │ │ │ │ │ +101 _s_t_d_:_:_s_w_a_p( _i_d_S_e_t__, other._i_d_S_e_t__ ); │ │ │ │ │ +102 _s_t_d_:_:_s_w_a_p( _d_a_t_a__, other._d_a_t_a__ ); │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_5 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const; │ │ │ │ │ +_1_0_6 _I_t_e_r_a_t_o_r _b_e_g_i_n (); │ │ │ │ │ +107 │ │ │ │ │ +_1_0_8 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const; │ │ │ │ │ +_1_0_9 _I_t_e_r_a_t_o_r _e_n_d (); │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 int _c_o_d_i_m_e_n_s_i_o_n () const { return _c_o_d_i_m__; } │ │ │ │ │ +112 │ │ │ │ │ +113 protected: │ │ │ │ │ +_1_1_4 const _G_r_i_d &_g_r_i_d () const { return *_g_r_i_d__; } │ │ │ │ │ +115 │ │ │ │ │ +116 template< int codim > │ │ │ │ │ +_1_1_7 void _r_e_s_i_z_e ( const _V_a_l_u_e &value ); │ │ │ │ │ +118 │ │ │ │ │ +119 template< int codim > │ │ │ │ │ +_1_2_0 void _m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ +121 std::integral_constant< bool, true > ); │ │ │ │ │ +122 │ │ │ │ │ +123 template< int codim > │ │ │ │ │ +_1_2_4 void _m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ +125 std::integral_constant< bool, false > ); │ │ │ │ │ +126 │ │ │ │ │ +_1_2_7 static void _m_i_g_r_a_t_e_E_n_t_r_y ( const typename _I_d_S_e_t_:_:_I_d_T_y_p_e &id, const _V_a_l_u_e │ │ │ │ │ +&value, │ │ │ │ │ +128 Map &oldData, Map &newData ); │ │ │ │ │ +129 │ │ │ │ │ +_1_3_0 const _I_d_S_e_t &_i_d_S_e_t () const { return *_i_d_S_e_t__; } │ │ │ │ │ +131 │ │ │ │ │ +_1_3_2 const _G_r_i_d *_g_r_i_d__; │ │ │ │ │ +_1_3_3 int _c_o_d_i_m__; │ │ │ │ │ +_1_3_4 const _I_d_S_e_t *_i_d_S_e_t__; │ │ │ │ │ +_1_3_5 Map _d_a_t_a__; │ │ │ │ │ +136 }; │ │ │ │ │ +137 │ │ │ │ │ +138 │ │ │ │ │ +139 │ │ │ │ │ +140 // PersistentContainerMap::IteratorWrapper │ │ │ │ │ +141 // --------------------------------------- │ │ │ │ │ +142 │ │ │ │ │ +143 template< class G, class IdSet, class Map > │ │ │ │ │ +144 template< class value, class iterator > │ │ │ │ │ +_1_4_5 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r │ │ │ │ │ +146 : public iterator │ │ │ │ │ +147 { │ │ │ │ │ +148 typedef _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _c_o_n_s_t_ _v_a_l_u_e_,_ _t_y_p_e_n_a_m_e_ _M_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r_ _> │ │ │ │ │ +_C_o_n_s_t_W_r_a_p_p_e_r; │ │ │ │ │ +149 │ │ │ │ │ +150 public: │ │ │ │ │ +_1_5_1 _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r ( const iterator &it ) : it_( it ) {} │ │ │ │ │ +152 │ │ │ │ │ +_1_5_3 operator _C_o_n_s_t_W_r_a_p_p_e_r () const { return _C_o_n_s_t_W_r_a_p_p_e_r( it_ ); } │ │ │ │ │ +154 │ │ │ │ │ +_1_5_5 value &operator* () { return it_->second; } │ │ │ │ │ +_1_5_6 value *operator-> () { return &(it_->second); } │ │ │ │ │ +157 │ │ │ │ │ +_1_5_8 bool operator== ( const _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r &other ) const { return (it_ == │ │ │ │ │ +other.it_); } │ │ │ │ │ +_1_5_9 bool operator!= ( const _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r &other ) const { return (it_ != │ │ │ │ │ +other.it_); } │ │ │ │ │ +160 │ │ │ │ │ +_1_6_1 _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r &operator++ () { ++it_; return *this; } │ │ │ │ │ +162 │ │ │ │ │ +163 private: │ │ │ │ │ +164 iterator it_; │ │ │ │ │ +165 }; │ │ │ │ │ +166 │ │ │ │ │ +167 │ │ │ │ │ +168 │ │ │ │ │ +169 │ │ │ │ │ +170 // Implementation of PersistentContainerMap │ │ │ │ │ +171 // ---------------------------------------- │ │ │ │ │ +172 │ │ │ │ │ +173 template< class G, class IdSet, class Map > │ │ │ │ │ +174 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +_1_7_5 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_b_e_g_i_n () const │ │ │ │ │ +176 { │ │ │ │ │ +177 return _C_o_n_s_t_I_t_e_r_a_t_o_r( data_.begin() ); │ │ │ │ │ +178 } │ │ │ │ │ +179 │ │ │ │ │ +180 template< class G, class IdSet, class Map > │ │ │ │ │ +181 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +_1_8_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_b_e_g_i_n () │ │ │ │ │ +183 { │ │ │ │ │ +184 return _I_t_e_r_a_t_o_r( data_.begin() ); │ │ │ │ │ +185 } │ │ │ │ │ +186 │ │ │ │ │ +187 │ │ │ │ │ +188 template< class G, class IdSet, class Map > │ │ │ │ │ +189 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +_1_9_0 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_e_n_d () const │ │ │ │ │ +191 { │ │ │ │ │ +192 return _C_o_n_s_t_I_t_e_r_a_t_o_r( data_.end() ); │ │ │ │ │ +193 } │ │ │ │ │ +194 │ │ │ │ │ +195 template< class G, class IdSet, class Map > │ │ │ │ │ +196 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +_1_9_7 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_e_n_d () │ │ │ │ │ +198 { │ │ │ │ │ +199 return _I_t_e_r_a_t_o_r( data_.end() ); │ │ │ │ │ +200 } │ │ │ │ │ +201 │ │ │ │ │ +202 │ │ │ │ │ +203 template< class G, class IdSet, class Map > │ │ │ │ │ +204 template< int codim > │ │ │ │ │ +_2_0_5 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_r_e_s_i_z_e ( const _V_a_l_u_e │ │ │ │ │ +&value ) │ │ │ │ │ +206 { │ │ │ │ │ +207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim │ │ │ │ │ +>::v > hasEntityIterator; │ │ │ │ │ +208 assert( codim == codimension() ); │ │ │ │ │ +209 │ │ │ │ │ +210 // create empty map and swap it with current map (no need to copy twice) │ │ │ │ │ +211 Map data; │ │ │ │ │ +212 _s_t_d_:_:_s_w_a_p( data, data_ ); │ │ │ │ │ +213 │ │ │ │ │ +214 // copy all data from old map into new one (adding new entries, if │ │ │ │ │ +necessary) │ │ │ │ │ +215 const int maxLevel = grid().maxLevel(); │ │ │ │ │ +216 for ( int level = 0; level <= maxLevel; ++level ) │ │ │ │ │ +217 migrateLevel< codim >( level, value, data, hasEntityIterator ); │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +220 │ │ │ │ │ +221 template< class G, class IdSet, class Map > │ │ │ │ │ +222 template< int codim > │ │ │ │ │ +223 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ +_2_2_4_ _:_:_m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ +225 std::integral_constant< bool, true > ) │ │ │ │ │ +226 { │ │ │ │ │ +227 typedef typename _G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w LevelView; │ │ │ │ │ +228 typedef typename LevelView::template Codim< codim >::Iterator │ │ │ │ │ +LevelIterator; │ │ │ │ │ +229 │ │ │ │ │ +230 const LevelView levelView = grid().levelGridView( level ); │ │ │ │ │ +231 const LevelIterator end = levelView.template end< codim >(); │ │ │ │ │ +232 for( LevelIterator it = levelView.template begin< codim >(); it != end; │ │ │ │ │ +++it ) │ │ │ │ │ +233 migrateEntry( idSet().id( *it ), value, data, data_ ); │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +236 │ │ │ │ │ +237 template< class G, class IdSet, class Map > │ │ │ │ │ +238 template< int codim > │ │ │ │ │ +239 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ +_2_4_0_ _:_:_m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ +241 std::integral_constant< bool, false > ) │ │ │ │ │ +242 { │ │ │ │ │ +243 typedef typename _G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w LevelView; │ │ │ │ │ +244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator; │ │ │ │ │ +245 │ │ │ │ │ +246 const LevelView levelView = grid().levelGridView( level ); │ │ │ │ │ +247 const LevelIterator end = levelView.template end< 0 >(); │ │ │ │ │ +248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it ) │ │ │ │ │ +249 { │ │ │ │ │ +250 const typename LevelIterator::Entity &entity = *it; │ │ │ │ │ +251 const int subEntities = entity.subEntities( codim ); │ │ │ │ │ +252 for( int i = 0; i < subEntities; ++i ) │ │ │ │ │ +253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ ); │ │ │ │ │ +254 } │ │ │ │ │ +255 } │ │ │ │ │ +256 │ │ │ │ │ +257 │ │ │ │ │ +258 template< class G, class IdSet, class Map > │ │ │ │ │ +259 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ +_2_6_0_ _:_:_m_i_g_r_a_t_e_E_n_t_r_y ( const typename _I_d_S_e_t_:_:_I_d_T_y_p_e &id, const _V_a_l_u_e &value, │ │ │ │ │ +261 Map &oldData, Map &newData ) │ │ │ │ │ +262 { │ │ │ │ │ +263 // insert entry for id │ │ │ │ │ +264 const std::pair< typename Map::iterator, bool > inserted │ │ │ │ │ +265 = newData.insert( std::make_pair( id, value ) ); │ │ │ │ │ +266 │ │ │ │ │ +267 // if entry did not exist previously, copy data │ │ │ │ │ +268 if( inserted.second ) │ │ │ │ │ +269 { │ │ │ │ │ +270 const typename Map::iterator pos = oldData.find( id ); │ │ │ │ │ +271 if( pos != oldData.end() ) │ │ │ │ │ +272 { │ │ │ │ │ +273 inserted.first->second = pos->second; │ │ │ │ │ +274 oldData.erase( pos ); │ │ │ │ │ +275 } │ │ │ │ │ +276 } │ │ │ │ │ +277 } │ │ │ │ │ +278 │ │ │ │ │ +279} // namespace Dune │ │ │ │ │ +280 │ │ │ │ │ +281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ │ +void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ +> &b) │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ -auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) │ │ │ │ │ --> decltype(referenceElement(geo, geo.impl())) │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:558 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +Know your own codimension. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ _D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ Id Set Interface. │ │ │ │ │ DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ -IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) │ │ │ │ │ -const │ │ │ │ │ -Get id of subentity i of co-dimension codim of a co-dimension 0 entity. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:486 │ │ │ │ │ -_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y │ │ │ │ │ -Factory for GeneralVertexOrder objects using an IdSet. │ │ │ │ │ -DDeeffiinniittiioonn vertexorderfactory.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y │ │ │ │ │ -VertexOrderByIdFactory(const IdSet &idset_) │ │ │ │ │ -construct a factory object │ │ │ │ │ -DDeeffiinniittiioonn vertexorderfactory.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -VertexOrder< Element::mydimension >::type make(const Element &e) const │ │ │ │ │ -construct a vertex ordering object │ │ │ │ │ -DDeeffiinniittiioonn vertexorderfactory.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_V_e_r_t_e_x_O_r_d_e_r │ │ │ │ │ -type of vertex order object may depend on the dimension of the element │ │ │ │ │ -DDeeffiinniittiioonn vertexorderfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_V_e_r_t_e_x_O_r_d_e_r_:_:_t_y_p_e │ │ │ │ │ -GeneralVertexOrder< dim, Index > type │ │ │ │ │ -type of vertex order object │ │ │ │ │ -DDeeffiinniittiioonn vertexorderfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ +IdTypeImp IdType │ │ │ │ │ +Type used to represent an id. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:458 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +GridFamily::Traits::LevelGridView LevelGridView │ │ │ │ │ +type of view for level grid │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:402 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t_:_:_C_o_d_i_m │ │ │ │ │ +Export the type of the entity used as parameter in the id(...) method. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:462 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p │ │ │ │ │ +map-based implementation of the PersistentContainer │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_m_i_g_r_a_t_e_L_e_v_e_l │ │ │ │ │ +void migrateLevel(int level, const Value &value, Map &data, std:: │ │ │ │ │ +integral_constant< bool, false >) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_w_a_p │ │ │ │ │ +void swap(This &other) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_f_i_l_l │ │ │ │ │ +void fill(const Value &value) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const Value &value) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_c_o_d_i_m__ │ │ │ │ │ +int codim_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_g_r_i_d__ │ │ │ │ │ +const Grid * grid_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const Value & operator[](const Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +int codimension() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const Value &value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_i_d_S_e_t │ │ │ │ │ +const IdSet & idSet() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_b_e_g_i_n │ │ │ │ │ +ConstIterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:175 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_m_i_g_r_a_t_e_E_n_t_r_y │ │ │ │ │ +static void migrateEntry(const typename IdSet::IdType &id, const Value &value, │ │ │ │ │ +Map &oldData, Map &newData) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:260 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_V_a_l_u_e │ │ │ │ │ +Map::mapped_type Value │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_e_n_d │ │ │ │ │ +Iterator end() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p │ │ │ │ │ +PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const │ │ │ │ │ +Value &value) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_S_i_z_e │ │ │ │ │ +Map::size_type Size │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_e_n_d │ │ │ │ │ +ConstIterator end() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:190 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_d_a_t_a__ │ │ │ │ │ +Map data_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_i_z_e │ │ │ │ │ +Size size() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +IteratorWrapper< Value, typename Map::iterator > Iterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_i_d_S_e_t__ │ │ │ │ │ +const IdSet * idSet_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_m_i_g_r_a_t_e_L_e_v_e_l │ │ │ │ │ +void migrateLevel(int level, const Value &value, Map &data, std:: │ │ │ │ │ +integral_constant< bool, true >) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:224 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r │ │ │ │ │ +IteratorWrapper(const iterator &it) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:151 │ │ │ │ │ +_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ +A set of traits classes to store static information about grid implementation. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hostgridaccess.hh File Reference │ │ │ │ +dune-grid: gridinfo-gmsh-main.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,44 +69,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
hostgridaccess.hh File Reference
│ │ │ │ +
gridinfo-gmsh-main.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <string>
│ │ │ │ -#include <dune/grid/geometrygrid/intersection.hh>
│ │ │ │ + │ │ │ │ +

Generic main() function for printing information about a mesh read from a .msh-file. │ │ │ │ +More...

│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <cstdlib>
│ │ │ │ +#include <exception>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <ostream>
│ │ │ │ +#include <sstream>
│ │ │ │ +#include <stdexcept>
│ │ │ │ +#include <string>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/classname.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ +#include <dune/grid/utility/gridinfo.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
 
struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim< codim >
 A Traits struct that collects return types of class member methods. More...
 
struct  Dune::HostGridAccess< IdentityGrid< HG > >
 
struct  Dune::HostGridAccess< IdentityGrid< HG > >::Codim< codim >
 A Traits struct that collects return types of class member methods. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Generic main() function for printing information about a mesh read from a .msh-file.

│ │ │ │ +
Author
Jö Fahlke jorri.nosp@m.t@jo.nosp@m.rrit..nosp@m.de
│ │ │ │ +
Date
2011
│ │ │ │ +

This header contains a generic main() function. To use it for your grid, write a .cc file like this:

#ifdef HAVE_CONFIG_H
│ │ │ │ +
#include "config.h"
│ │ │ │ +
#endif
│ │ │ │ +
│ │ │ │ +
#include <string>
│ │ │ │ +
│ │ │ │ +
#include <dune/grid/mygrid.hh>
│ │ │ │ +
│ │ │ │ +
const std::string programName = "dune-gridinfo-gmsh-mygrid-3d";
│ │ │ │ +
typedef Dune::MyGrid<3> Grid;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
Generic main() function for printing information about a mesh read from a .msh-file.
│ │ │ │ +

Write an automake target for your program as usual. No special libraries are needed for you program, beyond what is needed for the grid in question.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,50 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hostgridaccess.hh File Reference │ │ │ │ │ +gridinfo-gmsh-main.hh File Reference │ │ │ │ │ +Generic _m_a_i_n_(_) function for printing information about a mesh read from a .msh- │ │ │ │ │ +file. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_r_i_d_i_n_f_o_._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_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ - _C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ -  A Traits struct that collects return types of class member methods. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ -  A Traits struct that collects return types of class member methods. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Generic _m_a_i_n_(_) function for printing information about a mesh read from a .msh- │ │ │ │ │ +file. │ │ │ │ │ + Author │ │ │ │ │ + Jö Fahlke _j_o_r_r_i_._n_o_s_p_@_m_._t_@_j_o_._n_o_s_p_@_m_._r_r_i_t_._._n_o_s_p_@_m_._d_e │ │ │ │ │ + Date │ │ │ │ │ + 2011 │ │ │ │ │ +This header contains a generic _m_a_i_n_(_) function. To use it for your grid, write │ │ │ │ │ +a .cc file like this: │ │ │ │ │ +#ifdef HAVE_CONFIG_H │ │ │ │ │ +#include "config.h" │ │ │ │ │ +#endif │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +const std::string programName = "dune-gridinfo-gmsh-mygrid-3d"; │ │ │ │ │ +typedef Dune::MyGrid<3> Grid; │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_r_i_d_i_n_f_o_-_g_m_s_h_-_m_a_i_n_._h_h> │ │ │ │ │ +_g_r_i_d_i_n_f_o_-_g_m_s_h_-_m_a_i_n_._h_h │ │ │ │ │ +Generic main() function for printing information about a mesh read from a .msh- │ │ │ │ │ +file. │ │ │ │ │ +Write an automake target for your program as usual. No special libraries are │ │ │ │ │ +needed for you program, beyond what is needed for the grid in question. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hostgridaccess.hh Source File │ │ │ │ +dune-grid: gridinfo-gmsh-main.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,219 +74,223 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hostgridaccess.hh
│ │ │ │ +
gridinfo-gmsh-main.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │ -
6#define DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <string>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 // External Forward Declarations
│ │ │ │ -
16 // -----------------------------
│ │ │ │ -
17
│ │ │ │ -
18 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ -
19 class GeometryGrid;
│ │ │ │ -
20
│ │ │ │ -
21 template< class >
│ │ │ │ -
22 class IdentityGrid;
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │ +
7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <cstdlib>
│ │ │ │ +
11#include <exception>
│ │ │ │ +
12#include <iostream>
│ │ │ │ +
13#include <memory>
│ │ │ │ +
14#include <ostream>
│ │ │ │ +
15#include <sstream>
│ │ │ │ +
16#include <stdexcept>
│ │ │ │ +
17#include <string>
│ │ │ │ +
18#include <vector>
│ │ │ │ +
19
│ │ │ │ +
20#include <dune/common/classname.hh>
│ │ │ │ +
21#include <dune/common/exceptions.hh>
│ │ │ │ +
22#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
23
│ │ │ │ -
24
│ │ │ │ -
25 // HostGridAccess
│ │ │ │ -
26 // --------------
│ │ │ │ -
27
│ │ │ │ -
28 template< class Grid >
│ │ │ │ -
29 struct HostGridAccess;
│ │ │ │ -
30
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
40 template< class HG, class CoordFunction, class Allocator >
│ │ │ │ -
│ │ │ │ -
41 struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
│ │ │ │ -
42 {
│ │ │ │ - │ │ │ │ -
47
│ │ │ │ -
49 typedef typename Grid::HostGrid HostGrid;
│ │ │ │ -
50
│ │ │ │ -
57 template< int codim >
│ │ │ │ -
│ │ │ │ -
58 struct Codim
│ │ │ │ -
59 {
│ │ │ │ - │ │ │ │ -
62
│ │ │ │ -
64 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
│ │ │ │ -
65 };
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
68 typedef typename Grid::Traits::LeafIntersection LeafIntersection;
│ │ │ │ -
70 typedef typename Grid::Traits::LevelIntersection LevelIntersection;
│ │ │ │ -
71
│ │ │ │ -
73 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
│ │ │ │ -
75 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
│ │ │ │ -
76
│ │ │ │ -
│ │ │ │ -
81 static const HostGrid &hostGrid ( const Grid &grid )
│ │ │ │ -
82 {
│ │ │ │ -
83 return grid.hostGrid();
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 template< class Entity >
│ │ │ │ -
87 static const typename Codim< Entity::codimension >::HostEntity &
│ │ │ │ -
│ │ │ │ -
88 hostEntity ( const Entity &entity )
│ │ │ │ -
89 {
│ │ │ │ -
90 return hostEntity< Entity::codimension >( entity );
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93 template< int codim >
│ │ │ │ -
94 static const typename Codim< codim >::HostEntity &
│ │ │ │ -
│ │ │ │ -
95 hostEntity ( const typename Codim< codim >::Entity &entity )
│ │ │ │ -
96 {
│ │ │ │ -
97 return entity.impl().hostEntity();
│ │ │ │ -
98 }
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
100 template< class HostIntersection >
│ │ │ │ -
101 static const HostIntersection &
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
103 {
│ │ │ │ -
104 return intersection.impl().hostIntersection();
│ │ │ │ -
105 }
│ │ │ │ -
│ │ │ │ -
106 };
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
108
│ │ │ │ -
116 template< class HG >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
118 {
│ │ │ │ - │ │ │ │ -
123
│ │ │ │ -
125 typedef HG HostGrid;
│ │ │ │ -
126
│ │ │ │ -
133 template< int codim >
│ │ │ │ -
│ │ │ │ -
134 struct Codim
│ │ │ │ -
135 {
│ │ │ │ - │ │ │ │ -
138
│ │ │ │ -
140 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
│ │ │ │ -
141 };
│ │ │ │ -
│ │ │ │ -
142
│ │ │ │ - │ │ │ │ - │ │ │ │ -
147
│ │ │ │ -
149 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
│ │ │ │ -
151 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
│ │ │ │ -
152
│ │ │ │ -
│ │ │ │ -
157 static const HostGrid &hostGrid ( const Grid &grid )
│ │ │ │ -
158 {
│ │ │ │ -
159 return grid.getHostGrid();
│ │ │ │ -
160 }
│ │ │ │ -
│ │ │ │ -
161
│ │ │ │ -
162 template< class Entity >
│ │ │ │ -
163 static const typename Codim< Entity::codimension >::HostEntity &
│ │ │ │ -
│ │ │ │ -
164 hostEntity ( const Entity &entity )
│ │ │ │ -
165 {
│ │ │ │ -
166 return hostEntity< Entity::codimension >( entity );
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
169 template< int codim >
│ │ │ │ -
170 static const typename Codim< codim >::HostEntity &
│ │ │ │ -
│ │ │ │ -
171 hostEntity ( const typename Codim< codim >::Entity &entity )
│ │ │ │ -
172 {
│ │ │ │ -
173 return *entity.impl().hostEntity_;
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
176 static const HostLeafIntersection &
│ │ │ │ -
│ │ │ │ -
177 hostIntersection ( const LeafIntersection &intersection )
│ │ │ │ -
178 {
│ │ │ │ -
179 return *intersection.impl().hostIterator_;
│ │ │ │ -
180 }
│ │ │ │ -
│ │ │ │ -
181
│ │ │ │ -
182 static const HostLevelIntersection &
│ │ │ │ -
│ │ │ │ -
183 hostIntersection ( const LevelIntersection &intersection )
│ │ │ │ -
184 {
│ │ │ │ -
185 return *intersection.impl().hostIterator_;
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187 };
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
54#ifdef HEADERCHECK
│ │ │ │ +
55// define so headercheck will run
│ │ │ │ +
56const std::string programName = "headercheck";
│ │ │ │ +
57#endif // HEADERCHECK
│ │ │ │ +
58
│ │ │ │ +
59#ifndef DOXYGEN
│ │ │ │ +
60namespace {
│ │ │ │ +
61 // anonymous namespace so we don't freakishly conflict with another usage()
│ │ │ │ +
62 // function that may be linked in from another compilation unit.
│ │ │ │ +
63 void usage(std::ostream &stream) {
│ │ │ │ +
64 stream << "USAGE:\n"
│ │ │ │ +
65 << " " << programName << " [-R REFINES] GRIDFILE\n"
│ │ │ │ +
66 << "\n"
│ │ │ │ +
67 << "PARAMETERS:\n"
│ │ │ │ +
68 << " -R REFINES How many global refines to do after reading\n"
│ │ │ │ +
69 << " (default: 0)\n"
│ │ │ │ +
70 << " GRIDFILE Name of the .msh file to read the grid from.\n"
│ │ │ │ +
71 << std::flush;
│ │ │ │ +
72 }
│ │ │ │ +
73
│ │ │ │ +
74 bool prefix_match(const std::string &prefix, const std::string &str)
│ │ │ │ +
75 {
│ │ │ │ +
76 return str.compare(0,prefix.size(), prefix) == 0;
│ │ │ │ +
77 }
│ │ │ │ +
78
│ │ │ │ +
79 void error_argument_required(const std::string &opt) {
│ │ │ │ +
80 std::cerr << "Error: option " << opt << " requires argument\n";
│ │ │ │ +
81 usage(std::cerr);
│ │ │ │ +
82 std::exit(1);
│ │ │ │ +
83 }
│ │ │ │ +
84
│ │ │ │ +
85 void error_unknown_option(const std::string &opt) {
│ │ │ │ +
86 std::cerr << "Error: unknown option: " << opt << "\n";
│ │ │ │ +
87 usage(std::cerr);
│ │ │ │ +
88 std::exit(1);
│ │ │ │ +
89 }
│ │ │ │ +
90
│ │ │ │ +
91 void error_parsing_optarg(const std::string &opt, const std::string &error) {
│ │ │ │ +
92 std::cerr << "Error: option " << opt << ": " << error << "\n";
│ │ │ │ +
93 usage(std::cerr);
│ │ │ │ +
94 std::exit(1);
│ │ │ │ +
95 }
│ │ │ │ +
96
│ │ │ │ +
97 template<class T>
│ │ │ │ +
98 void parse(const std::string &arg, T &val) {
│ │ │ │ +
99 std::istringstream s(arg);
│ │ │ │ +
100 s >> val;
│ │ │ │ +
101 bool good = !s.fail();
│ │ │ │ +
102 if(good) {
│ │ │ │ +
103 char dummy;
│ │ │ │ +
104 s >> dummy;
│ │ │ │ +
105 good = s.fail() && s.eof();
│ │ │ │ +
106 }
│ │ │ │ +
107 if(!good) {
│ │ │ │ +
108 std::ostringstream s;
│ │ │ │ +
109 s << "Can't parse \"" << arg << "\" as a " << Dune::className(val);
│ │ │ │ +
110 throw std::runtime_error(s.str());
│ │ │ │ +
111 }
│ │ │ │ +
112 }
│ │ │ │ +
113
│ │ │ │ +
114 std::size_t refines = 0;
│ │ │ │ +
115 std::string gridFileName = "";
│ │ │ │ +
116
│ │ │ │ +
117 void parseOptions(int argc, char **argv) {
│ │ │ │ +
118 std::vector<std::string> params;
│ │ │ │ +
119 for(++argv; *argv; ++argv) {
│ │ │ │ +
120 std::string arg = *argv;
│ │ │ │ +
121 if(prefix_match("-", arg)) {
│ │ │ │ +
122 std::string opt = arg;
│ │ │ │ +
123 if(opt == "--") {
│ │ │ │ +
124 for(++argv; *argv; ++argv)
│ │ │ │ +
125 params.push_back(*argv);
│ │ │ │ +
126 break;
│ │ │ │ +
127 }
│ │ │ │ +
128 else if(prefix_match("-h", opt) || prefix_match("-?", opt) ||
│ │ │ │ +
129 opt == "--help")
│ │ │ │ +
130 {
│ │ │ │ +
131 usage(std::cout);
│ │ │ │ +
132 std::exit(0);
│ │ │ │ +
133 }
│ │ │ │ +
134 else if(opt == "-R" || opt == "--global-refines") {
│ │ │ │ +
135 ++argv;
│ │ │ │ +
136 if(!*argv) error_argument_required(opt);
│ │ │ │ +
137 try { parse(*argv, refines); }
│ │ │ │ +
138 catch(const std::runtime_error &e)
│ │ │ │ +
139 { error_parsing_optarg(opt, e.what()); }
│ │ │ │ +
140 }
│ │ │ │ +
141 else if(prefix_match("-R", opt)) {
│ │ │ │ +
142 try { parse(*argv+std::strlen("-R"), refines); }
│ │ │ │ +
143 catch(const std::runtime_error &e)
│ │ │ │ +
144 { error_parsing_optarg(opt, e.what()); }
│ │ │ │ +
145 }
│ │ │ │ +
146 else if(prefix_match("--global-refines=", opt)) {
│ │ │ │ +
147 try { parse(*argv+std::strlen("--global-refines="), refines); }
│ │ │ │ +
148 catch(const std::runtime_error &e)
│ │ │ │ +
149 { error_parsing_optarg(opt, e.what()); }
│ │ │ │ +
150 }
│ │ │ │ +
151 else
│ │ │ │ +
152 error_unknown_option(opt);
│ │ │ │ +
153 }
│ │ │ │ +
154 else
│ │ │ │ +
155 params.push_back(arg);
│ │ │ │ +
156 }
│ │ │ │ +
157 // check command line arguments
│ │ │ │ +
158 if(params.size() < 1) {
│ │ │ │ +
159 std::cerr << "Need name of a .msh file to read.\n"
│ │ │ │ +
160 << std::endl;
│ │ │ │ +
161 usage(std::cerr);
│ │ │ │ +
162 std::exit(1);
│ │ │ │ +
163 }
│ │ │ │ +
164 if(params.size() > 1) {
│ │ │ │ +
165 std::cerr << "Too many arguments.\n"
│ │ │ │ +
166 << std::endl;
│ │ │ │ +
167 usage(std::cerr);
│ │ │ │ +
168 std::exit(1);
│ │ │ │ +
169 }
│ │ │ │ +
170 gridFileName = params[0];
│ │ │ │ +
171 }
│ │ │ │ +
172}
│ │ │ │ +
173
│ │ │ │ +
174#ifndef HEADERCHECK
│ │ │ │ +
175int main(int argc, char **argv) {
│ │ │ │ +
176 try {
│ │ │ │ +
177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv);
│ │ │ │ +
178
│ │ │ │ +
179 // check that we are not run through mpirun
│ │ │ │ +
180 if(mpiHelper.size() > 1) {
│ │ │ │ +
181 if(mpiHelper.rank() == 0)
│ │ │ │ +
182 std::cerr << programName << ": Sorry, this program works only in "
│ │ │ │ +
183 << "serial." << std::endl;
│ │ │ │ +
184 return 1;
│ │ │ │ +
185 }
│ │ │ │ +
186
│ │ │ │ +
187 parseOptions(argc, argv);
│ │ │ │
188
│ │ │ │ -
189} // namespace Dune
│ │ │ │ -
190
│ │ │ │ -
191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │ -
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
GridFamily::Traits::LeafIntersection LeafIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition common/grid.hh:456
│ │ │ │ -
GridFamily::Traits::LevelIntersection LevelIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition common/grid.hh:461
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
grid wrapper replacing the geometries
Definition geometrygrid/grid.hh:86
│ │ │ │ -
const HostGrid & hostGrid() const
obtain constant reference to the host grid
Definition geometrygrid/grid.hh:538
│ │ │ │ -
traits structure containing types for a codimension
Definition geometrygrid/grid.hh:611
│ │ │ │ -
Definition geometrygrid/intersection.hh:22
│ │ │ │ -
Provides a meta grid that is identical to its host.
Definition identitygrid.hh:88
│ │ │ │ -
HostGridType & getHostGrid() const
Returns the hostgrid this IdentityGrid lives in.
Definition identitygrid.hh:394
│ │ │ │ -
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ -
Grid::HostGrid HostGrid
type of HostGrid
Definition hostgridaccess.hh:49
│ │ │ │ -
HostGrid::Traits::LevelIntersection HostLevelIntersection
type of the host level intersection
Definition hostgridaccess.hh:75
│ │ │ │ -
static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
Definition hostgridaccess.hh:88
│ │ │ │ -
static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
Definition hostgridaccess.hh:95
│ │ │ │ -
static const HostIntersection & hostIntersection(const Intersection< const Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection)
Definition hostgridaccess.hh:102
│ │ │ │ -
GeometryGrid< HG, CoordFunction, Allocator > Grid
Definition hostgridaccess.hh:46
│ │ │ │ -
Grid::Traits::LeafIntersection LeafIntersection
type of the GeometryGrid leaf intersection
Definition hostgridaccess.hh:68
│ │ │ │ -
HostGrid::Traits::LeafIntersection HostLeafIntersection
type of the host leaf intersection
Definition hostgridaccess.hh:73
│ │ │ │ -
static const HostGrid & hostGrid(const Grid &grid)
Get underlying HostGrid.
Definition hostgridaccess.hh:81
│ │ │ │ -
Grid::Traits::LevelIntersection LevelIntersection
type of the GeometryGrid level intersection
Definition hostgridaccess.hh:70
│ │ │ │ -
HostGrid::template Codim< codim >::Entity HostEntity
type of the host entity
Definition hostgridaccess.hh:64
│ │ │ │ -
Grid::template Codim< codim >::Entity Entity
type of the GeometryGrid entity
Definition hostgridaccess.hh:61
│ │ │ │ -
Grid::Traits::LeafIntersection LeafIntersection
type of the IdGrid leaf intersection
Definition hostgridaccess.hh:144
│ │ │ │ -
HG HostGrid
type of HostGrid
Definition hostgridaccess.hh:125
│ │ │ │ -
IdentityGrid< HG > Grid
Definition hostgridaccess.hh:122
│ │ │ │ -
static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
Definition hostgridaccess.hh:171
│ │ │ │ -
HostGrid::Traits::LevelIntersection HostLevelIntersection
type of the host level intersection
Definition hostgridaccess.hh:151
│ │ │ │ -
Grid::Traits::LevelIntersection LevelIntersection
type of the IdGrid level intersection
Definition hostgridaccess.hh:146
│ │ │ │ -
static const HostLeafIntersection & hostIntersection(const LeafIntersection &intersection)
Definition hostgridaccess.hh:177
│ │ │ │ -
HostGrid::Traits::LeafIntersection HostLeafIntersection
type of the host leaf intersection
Definition hostgridaccess.hh:149
│ │ │ │ -
static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
Definition hostgridaccess.hh:164
│ │ │ │ -
static const HostLevelIntersection & hostIntersection(const LevelIntersection &intersection)
Definition hostgridaccess.hh:183
│ │ │ │ -
static const HostGrid & hostGrid(const Grid &grid)
Get underlying HostGrid.
Definition hostgridaccess.hh:157
│ │ │ │ -
Grid::template Codim< codim >::Entity Entity
type of the IdGrid entity
Definition hostgridaccess.hh:137
│ │ │ │ -
HostGrid::template Codim< codim >::Entity HostEntity
type of the host entity
Definition hostgridaccess.hh:140
│ │ │ │ - │ │ │ │ +
189 // read grid
│ │ │ │ +
190 typedef Dune::GmshReader<Grid> Reader;
│ │ │ │ +
191 std::shared_ptr<Grid> gridp(Reader::read(gridFileName));
│ │ │ │ +
192 gridp->globalRefine(refines);
│ │ │ │ +
193
│ │ │ │ +
194 // collect information
│ │ │ │ + │ │ │ │ +
196 Dune::fillGridViewInfoSerial(gridp->leafGridView(), gridViewInfo);
│ │ │ │ +
197
│ │ │ │ +
198 // print it
│ │ │ │ +
199 std::cout << gridViewInfo << std::flush;
│ │ │ │ +
200 }
│ │ │ │ +
201 catch(const std::exception &e) {
│ │ │ │ +
202 std::cerr << "Caught exception of type " << Dune::className(e)
│ │ │ │ +
203 << std::endl
│ │ │ │ +
204 << "e.what(): " << e.what() << std::endl;
│ │ │ │ +
205 throw;
│ │ │ │ +
206 }
│ │ │ │ +
207 catch(const Dune::Exception &e) {
│ │ │ │ +
208 std::cerr << "Caught exception of type " << Dune::className(e)
│ │ │ │ +
209 << std::endl
│ │ │ │ +
210 << "Exception message: " << e << std::endl;
│ │ │ │ +
211 throw;
│ │ │ │ +
212 }
│ │ │ │ +
213 catch(const std::string &s) {
│ │ │ │ +
214 std::cerr << "Caught exception of type " << Dune::className(s)
│ │ │ │ +
215 << std::endl
│ │ │ │ +
216 << "Exception message: " << s << std::endl;
│ │ │ │ +
217 throw;
│ │ │ │ +
218 }
│ │ │ │ +
219 catch(...) {
│ │ │ │ +
220 std::cerr << "Caught exception of unknown type" << std::endl;
│ │ │ │ +
221 throw;
│ │ │ │ +
222 }
│ │ │ │ +
223}
│ │ │ │ +
224#endif // !HEADERCHECK
│ │ │ │ +
225#endif // !DOXYGEN
│ │ │ │ +
226
│ │ │ │ +
227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │ +
int main(int argc, char **argv)
Definition recipe-integration.cc:70
│ │ │ │ + │ │ │ │ +
void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)
fill a GridViewInfo structure from a serial grid
Definition utility/gridinfo.hh:214
│ │ │ │ +
Read Gmsh mesh file.
Definition gmshreader.hh:807
│ │ │ │ +
structure to hold information about a certain GridView.
Definition utility/gridinfo.hh:100
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,303 +1,229 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -hostgridaccess.hh │ │ │ │ │ +gridinfo-gmsh-main.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ -6#define DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -15 // External Forward Declarations │ │ │ │ │ -16 // ----------------------------- │ │ │ │ │ -17 │ │ │ │ │ -18 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ -19 class GeometryGrid; │ │ │ │ │ -20 │ │ │ │ │ -21 template< class > │ │ │ │ │ -22 class IdentityGrid; │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH │ │ │ │ │ +7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19 │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ +22#include │ │ │ │ │ 23 │ │ │ │ │ -24 │ │ │ │ │ -25 // HostGridAccess │ │ │ │ │ -26 // -------------- │ │ │ │ │ -27 │ │ │ │ │ -28 template< class Grid > │ │ │ │ │ -29 struct HostGridAccess; │ │ │ │ │ -30 │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -40 template< class HG, class CoordFunction, class Allocator > │ │ │ │ │ -_4_1 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< _G_e_o_m_e_t_r_y_G_r_i_d< HG, CoordFunction, Allocator > > │ │ │ │ │ -42 { │ │ │ │ │ -_4_6 typedef _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _> _G_r_i_d; │ │ │ │ │ -47 │ │ │ │ │ -_4_9 typedef typename Grid::HostGrid _H_o_s_t_G_r_i_d; │ │ │ │ │ -50 │ │ │ │ │ -57 template< int codim > │ │ │ │ │ -_5_8 struct Codim │ │ │ │ │ -59 { │ │ │ │ │ -_6_1 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -62 │ │ │ │ │ -_6_4 typedef typename HostGrid::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _H_o_s_t_E_n_t_i_t_y; │ │ │ │ │ -65 }; │ │ │ │ │ -66 │ │ │ │ │ -_6_8 typedef typename Grid::Traits::LeafIntersection _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -_7_0 typedef typename Grid::Traits::LevelIntersection _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -71 │ │ │ │ │ -_7_3 typedef typename HostGrid::Traits::LeafIntersection _H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -_7_5 typedef typename HostGrid::Traits::LevelIntersection _H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -76 │ │ │ │ │ -_8_1 static const _H_o_s_t_G_r_i_d &_h_o_s_t_G_r_i_d ( const _G_r_i_d &grid ) │ │ │ │ │ -82 { │ │ │ │ │ -83 return grid._h_o_s_t_G_r_i_d(); │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -86 template< class Entity > │ │ │ │ │ -87 static const typename Codim< Entity::codimension >::HostEntity & │ │ │ │ │ -_8_8 _h_o_s_t_E_n_t_i_t_y ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -89 { │ │ │ │ │ -90 return hostEntity< Entity::codimension >( entity ); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -93 template< int codim > │ │ │ │ │ -94 static const typename Codim< codim >::HostEntity & │ │ │ │ │ -_9_5 _h_o_s_t_E_n_t_i_t_y ( const typename _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &entity ) │ │ │ │ │ -96 { │ │ │ │ │ -97 return entity.impl().hostEntity(); │ │ │ │ │ -98 } │ │ │ │ │ -99 │ │ │ │ │ -100 template< class HostIntersection > │ │ │ │ │ -101 static const HostIntersection & │ │ │ │ │ -_1_0_2 _h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n ( const _I_n_t_e_r_s_e_c_t_i_o_n< const _G_r_i_d, _G_e_o_G_r_i_d_:_:_I_n_t_e_r_s_e_c_t_i_o_n_< │ │ │ │ │ -_c_o_n_s_t_ _G_r_i_d_,_ _H_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n_ _> > &intersection ) │ │ │ │ │ -103 { │ │ │ │ │ -104 return intersection.impl().hostIntersection(); │ │ │ │ │ -105 } │ │ │ │ │ -106 }; │ │ │ │ │ -107 │ │ │ │ │ -108 │ │ │ │ │ -116 template< class HG > │ │ │ │ │ -_1_1_7 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< _I_d_e_n_t_i_t_y_G_r_i_d< HG > > │ │ │ │ │ -118 { │ │ │ │ │ -_1_2_2 typedef _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _> _G_r_i_d; │ │ │ │ │ -123 │ │ │ │ │ -_1_2_5 typedef HG _H_o_s_t_G_r_i_d; │ │ │ │ │ -126 │ │ │ │ │ -133 template< int codim > │ │ │ │ │ -_1_3_4 struct Codim │ │ │ │ │ -135 { │ │ │ │ │ -_1_3_7 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -138 │ │ │ │ │ -_1_4_0 typedef typename HostGrid::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _H_o_s_t_E_n_t_i_t_y; │ │ │ │ │ -141 }; │ │ │ │ │ -142 │ │ │ │ │ -_1_4_4 typedef typename _G_r_i_d_:_:_T_r_a_i_t_s_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -_1_4_6 typedef typename _G_r_i_d_:_:_T_r_a_i_t_s_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -147 │ │ │ │ │ -_1_4_9 typedef typename HostGrid::Traits::LeafIntersection _H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -_1_5_1 typedef typename HostGrid::Traits::LevelIntersection _H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -152 │ │ │ │ │ -_1_5_7 static const _H_o_s_t_G_r_i_d &_h_o_s_t_G_r_i_d ( const _G_r_i_d &grid ) │ │ │ │ │ -158 { │ │ │ │ │ -159 return grid._g_e_t_H_o_s_t_G_r_i_d(); │ │ │ │ │ -160 } │ │ │ │ │ -161 │ │ │ │ │ -162 template< class Entity > │ │ │ │ │ -163 static const typename Codim< Entity::codimension >::HostEntity & │ │ │ │ │ -_1_6_4 _h_o_s_t_E_n_t_i_t_y ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -165 { │ │ │ │ │ -166 return hostEntity< Entity::codimension >( entity ); │ │ │ │ │ -167 } │ │ │ │ │ -168 │ │ │ │ │ -169 template< int codim > │ │ │ │ │ -170 static const typename Codim< codim >::HostEntity & │ │ │ │ │ -_1_7_1 _h_o_s_t_E_n_t_i_t_y ( const typename _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &entity ) │ │ │ │ │ -172 { │ │ │ │ │ -173 return *entity.impl().hostEntity_; │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -176 static const HostLeafIntersection & │ │ │ │ │ -_1_7_7 _h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n ( const _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n &intersection ) │ │ │ │ │ -178 { │ │ │ │ │ -179 return *intersection.impl().hostIterator_; │ │ │ │ │ -180 } │ │ │ │ │ -181 │ │ │ │ │ -182 static const HostLevelIntersection & │ │ │ │ │ -_1_8_3 _h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n ( const _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n &intersection ) │ │ │ │ │ -184 { │ │ │ │ │ -185 return *intersection.impl().hostIterator_; │ │ │ │ │ -186 } │ │ │ │ │ -187 }; │ │ │ │ │ +24#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ +25#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_r_i_d_i_n_f_o_._h_h> │ │ │ │ │ +26 │ │ │ │ │ +54#ifdef HEADERCHECK │ │ │ │ │ +55// define so headercheck will run │ │ │ │ │ +56const std::string programName = "headercheck"; │ │ │ │ │ +57#endif // HEADERCHECK │ │ │ │ │ +58 │ │ │ │ │ +59#ifndef DOXYGEN │ │ │ │ │ +60namespace { │ │ │ │ │ +61 // anonymous namespace so we don't freakishly conflict with another usage() │ │ │ │ │ +62 // function that may be linked in from another compilation unit. │ │ │ │ │ +63 void usage(std::ostream &stream) { │ │ │ │ │ +64 stream << "USAGE:\n" │ │ │ │ │ +65 << " " << programName << " [-R REFINES] GRIDFILE\n" │ │ │ │ │ +66 << "\n" │ │ │ │ │ +67 << "PARAMETERS:\n" │ │ │ │ │ +68 << " -R REFINES How many global refines to do after reading\n" │ │ │ │ │ +69 << " (default: 0)\n" │ │ │ │ │ +70 << " GRIDFILE Name of the .msh file to read the grid from.\n" │ │ │ │ │ +71 << std::flush; │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +74 bool prefix_match(const std::string &prefix, const std::string &str) │ │ │ │ │ +75 { │ │ │ │ │ +76 return str.compare(0,prefix.size(), prefix) == 0; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +79 void error_argument_required(const std::string &opt) { │ │ │ │ │ +80 std::cerr << "Error: option " << opt << " requires argument\n"; │ │ │ │ │ +81 usage(std::cerr); │ │ │ │ │ +82 std::exit(1); │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +85 void error_unknown_option(const std::string &opt) { │ │ │ │ │ +86 std::cerr << "Error: unknown option: " << opt << "\n"; │ │ │ │ │ +87 usage(std::cerr); │ │ │ │ │ +88 std::exit(1); │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +91 void error_parsing_optarg(const std::string &opt, const std::string &error) │ │ │ │ │ +{ │ │ │ │ │ +92 std::cerr << "Error: option " << opt << ": " << error << "\n"; │ │ │ │ │ +93 usage(std::cerr); │ │ │ │ │ +94 std::exit(1); │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97 template │ │ │ │ │ +98 void parse(const std::string &arg, T &val) { │ │ │ │ │ +99 std::istringstream s(arg); │ │ │ │ │ +100 s >> val; │ │ │ │ │ +101 bool good = !s.fail(); │ │ │ │ │ +102 if(good) { │ │ │ │ │ +103 char dummy; │ │ │ │ │ +104 s >> dummy; │ │ │ │ │ +105 good = s.fail() && s.eof(); │ │ │ │ │ +106 } │ │ │ │ │ +107 if(!good) { │ │ │ │ │ +108 std::ostringstream s; │ │ │ │ │ +109 s << "Can't parse \"" << arg << "\" as a " << Dune::className(val); │ │ │ │ │ +110 throw std::runtime_error(s.str()); │ │ │ │ │ +111 } │ │ │ │ │ +112 } │ │ │ │ │ +113 │ │ │ │ │ +114 std::size_t refines = 0; │ │ │ │ │ +115 std::string gridFileName = ""; │ │ │ │ │ +116 │ │ │ │ │ +117 void parseOptions(int argc, char **argv) { │ │ │ │ │ +118 std::vector params; │ │ │ │ │ +119 for(++argv; *argv; ++argv) { │ │ │ │ │ +120 std::string arg = *argv; │ │ │ │ │ +121 if(prefix_match("-", arg)) { │ │ │ │ │ +122 std::string opt = arg; │ │ │ │ │ +123 if(opt == "--") { │ │ │ │ │ +124 for(++argv; *argv; ++argv) │ │ │ │ │ +125 params.push_back(*argv); │ │ │ │ │ +126 break; │ │ │ │ │ +127 } │ │ │ │ │ +128 else if(prefix_match("-h", opt) || prefix_match("-?", opt) || │ │ │ │ │ +129 opt == "--help") │ │ │ │ │ +130 { │ │ │ │ │ +131 usage(std::cout); │ │ │ │ │ +132 std::exit(0); │ │ │ │ │ +133 } │ │ │ │ │ +134 else if(opt == "-R" || opt == "--global-refines") { │ │ │ │ │ +135 ++argv; │ │ │ │ │ +136 if(!*argv) error_argument_required(opt); │ │ │ │ │ +137 try { parse(*argv, refines); } │ │ │ │ │ +138 catch(const std::runtime_error &e) │ │ │ │ │ +139 { error_parsing_optarg(opt, e.what()); } │ │ │ │ │ +140 } │ │ │ │ │ +141 else if(prefix_match("-R", opt)) { │ │ │ │ │ +142 try { parse(*argv+std::strlen("-R"), refines); } │ │ │ │ │ +143 catch(const std::runtime_error &e) │ │ │ │ │ +144 { error_parsing_optarg(opt, e.what()); } │ │ │ │ │ +145 } │ │ │ │ │ +146 else if(prefix_match("--global-refines=", opt)) { │ │ │ │ │ +147 try { parse(*argv+std::strlen("--global-refines="), refines); } │ │ │ │ │ +148 catch(const std::runtime_error &e) │ │ │ │ │ +149 { error_parsing_optarg(opt, e.what()); } │ │ │ │ │ +150 } │ │ │ │ │ +151 else │ │ │ │ │ +152 error_unknown_option(opt); │ │ │ │ │ +153 } │ │ │ │ │ +154 else │ │ │ │ │ +155 params.push_back(arg); │ │ │ │ │ +156 } │ │ │ │ │ +157 // check command line arguments │ │ │ │ │ +158 if(params.size() < 1) { │ │ │ │ │ +159 std::cerr << "Need name of a .msh file to read.\n" │ │ │ │ │ +160 << std::endl; │ │ │ │ │ +161 usage(std::cerr); │ │ │ │ │ +162 std::exit(1); │ │ │ │ │ +163 } │ │ │ │ │ +164 if(params.size() > 1) { │ │ │ │ │ +165 std::cerr << "Too many arguments.\n" │ │ │ │ │ +166 << std::endl; │ │ │ │ │ +167 usage(std::cerr); │ │ │ │ │ +168 std::exit(1); │ │ │ │ │ +169 } │ │ │ │ │ +170 gridFileName = params[0]; │ │ │ │ │ +171 } │ │ │ │ │ +172} │ │ │ │ │ +173 │ │ │ │ │ +174#ifndef HEADERCHECK │ │ │ │ │ +175int _m_a_i_n(int argc, char **argv) { │ │ │ │ │ +176 try { │ │ │ │ │ +177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv); │ │ │ │ │ +178 │ │ │ │ │ +179 // check that we are not run through mpirun │ │ │ │ │ +180 if(mpiHelper.size() > 1) { │ │ │ │ │ +181 if(mpiHelper.rank() == 0) │ │ │ │ │ +182 std::cerr << programName << ": Sorry, this program works only in " │ │ │ │ │ +183 << "serial." << std::endl; │ │ │ │ │ +184 return 1; │ │ │ │ │ +185 } │ │ │ │ │ +186 │ │ │ │ │ +187 parseOptions(argc, argv); │ │ │ │ │ 188 │ │ │ │ │ -189} // namespace Dune │ │ │ │ │ -190 │ │ │ │ │ -191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -Include standard header files. │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -GridFamily::Traits::LeafIntersection LeafIntersection │ │ │ │ │ -A type that is a model of Dune::Intersection, an intersections of two │ │ │ │ │ -codimension 1 of two codimensio... │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:456 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -GridFamily::Traits::LevelIntersection LevelIntersection │ │ │ │ │ -A type that is a model of Dune::Intersection, an intersections of two │ │ │ │ │ -codimension 1 of two codimensio... │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:461 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ -grid wrapper replacing the geometries │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/grid.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d_:_:_h_o_s_t_G_r_i_d │ │ │ │ │ -const HostGrid & hostGrid() const │ │ │ │ │ -obtain constant reference to the host grid │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/grid.hh:538 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -traits structure containing types for a codimension │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/grid.hh:611 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/intersection.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d │ │ │ │ │ -Provides a meta grid that is identical to its host. │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_:_:_g_e_t_H_o_s_t_G_r_i_d │ │ │ │ │ -HostGridType & getHostGrid() const │ │ │ │ │ -Returns the hostgrid this IdentityGrid lives in. │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:394 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ -provides access to host grid objects from GeometryGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_H_o_s_t_G_r_i_d │ │ │ │ │ -Grid::HostGrid HostGrid │ │ │ │ │ -type of HostGrid │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -HostGrid::Traits::LevelIntersection HostLevelIntersection │ │ │ │ │ -type of the host level intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity │ │ │ │ │ -&entity) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -static const Codim< codim >::HostEntity & hostEntity(const typename Codim< │ │ │ │ │ -codim >::Entity &entity) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -static const HostIntersection & hostIntersection(const Intersection< const │ │ │ │ │ -Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ -GeometryGrid< HG, CoordFunction, Allocator > Grid │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Grid::Traits::LeafIntersection LeafIntersection │ │ │ │ │ -type of the GeometryGrid leaf intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -HostGrid::Traits::LeafIntersection HostLeafIntersection │ │ │ │ │ -type of the host leaf intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_h_o_s_t_G_r_i_d │ │ │ │ │ -static const HostGrid & hostGrid(const Grid &grid) │ │ │ │ │ -Get underlying HostGrid. │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ -_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Grid::Traits::LevelIntersection LevelIntersection │ │ │ │ │ -type of the GeometryGrid level intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_C_o_d_i_m_:_: │ │ │ │ │ -_H_o_s_t_E_n_t_i_t_y │ │ │ │ │ -HostGrid::template Codim< codim >::Entity HostEntity │ │ │ │ │ -type of the host entity │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_C_o_d_i_m_:_: │ │ │ │ │ -_E_n_t_i_t_y │ │ │ │ │ -Grid::template Codim< codim >::Entity Entity │ │ │ │ │ -type of the GeometryGrid entity │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Grid::Traits::LeafIntersection LeafIntersection │ │ │ │ │ -type of the IdGrid leaf intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_H_o_s_t_G_r_i_d │ │ │ │ │ -HG HostGrid │ │ │ │ │ -type of HostGrid │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ -IdentityGrid< HG > Grid │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -static const Codim< codim >::HostEntity & hostEntity(const typename Codim< │ │ │ │ │ -codim >::Entity &entity) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -HostGrid::Traits::LevelIntersection HostLevelIntersection │ │ │ │ │ -type of the host level intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Grid::Traits::LevelIntersection LevelIntersection │ │ │ │ │ -type of the IdGrid level intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -static const HostLeafIntersection & hostIntersection(const LeafIntersection │ │ │ │ │ -&intersection) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -HostGrid::Traits::LeafIntersection HostLeafIntersection │ │ │ │ │ -type of the host leaf intersection │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity │ │ │ │ │ -&entity) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -static const HostLevelIntersection & hostIntersection(const LevelIntersection │ │ │ │ │ -&intersection) │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:183 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_G_r_i_d │ │ │ │ │ -static const HostGrid & hostGrid(const Grid &grid) │ │ │ │ │ -Get underlying HostGrid. │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ -Grid::template Codim< codim >::Entity Entity │ │ │ │ │ -type of the IdGrid entity │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_C_o_d_i_m_:_:_H_o_s_t_E_n_t_i_t_y │ │ │ │ │ -HostGrid::template Codim< codim >::Entity HostEntity │ │ │ │ │ -type of the host entity │ │ │ │ │ -DDeeffiinniittiioonn hostgridaccess.hh:140 │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +189 // read grid │ │ │ │ │ +190 typedef _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_<_G_r_i_d_> Reader; │ │ │ │ │ +191 std::shared_ptr gridp(Reader::read(gridFileName)); │ │ │ │ │ +192 gridp->globalRefine(refines); │ │ │ │ │ +193 │ │ │ │ │ +194 // collect information │ │ │ │ │ +195 _D_u_n_e_:_:_G_r_i_d_V_i_e_w_I_n_f_o_<_G_r_i_d_:_:_c_t_y_p_e_> gridViewInfo; │ │ │ │ │ +196 _D_u_n_e_:_:_f_i_l_l_G_r_i_d_V_i_e_w_I_n_f_o_S_e_r_i_a_l(gridp->leafGridView(), gridViewInfo); │ │ │ │ │ +197 │ │ │ │ │ +198 // print it │ │ │ │ │ +199 std::cout << gridViewInfo << std::flush; │ │ │ │ │ +200 } │ │ │ │ │ +201 catch(const std::exception &e) { │ │ │ │ │ +202 std::cerr << "Caught exception of type " << Dune::className(e) │ │ │ │ │ +203 << std::endl │ │ │ │ │ +204 << "e.what(): " << e.what() << std::endl; │ │ │ │ │ +205 throw; │ │ │ │ │ +206 } │ │ │ │ │ +207 catch(const Dune::Exception &e) { │ │ │ │ │ +208 std::cerr << "Caught exception of type " << Dune::className(e) │ │ │ │ │ +209 << std::endl │ │ │ │ │ +210 << "Exception message: " << e << std::endl; │ │ │ │ │ +211 throw; │ │ │ │ │ +212 } │ │ │ │ │ +213 catch(const std::string &s) { │ │ │ │ │ +214 std::cerr << "Caught exception of type " << Dune::className(s) │ │ │ │ │ +215 << std::endl │ │ │ │ │ +216 << "Exception message: " << s << std::endl; │ │ │ │ │ +217 throw; │ │ │ │ │ +218 } │ │ │ │ │ +219 catch(...) { │ │ │ │ │ +220 std::cerr << "Caught exception of unknown type" << std::endl; │ │ │ │ │ +221 throw; │ │ │ │ │ +222 } │ │ │ │ │ +223} │ │ │ │ │ +224#endif // !HEADERCHECK │ │ │ │ │ +225#endif // !DOXYGEN │ │ │ │ │ +226 │ │ │ │ │ +227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH │ │ │ │ │ +_m_a_i_n │ │ │ │ │ +int main(int argc, char **argv) │ │ │ │ │ +DDeeffiinniittiioonn recipe-integration.cc:70 │ │ │ │ │ +_g_m_s_h_r_e_a_d_e_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_f_i_l_l_G_r_i_d_V_i_e_w_I_n_f_o_S_e_r_i_a_l │ │ │ │ │ +void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > │ │ │ │ │ +&gridViewInfo) │ │ │ │ │ +fill a GridViewInfo structure from a serial grid │ │ │ │ │ +DDeeffiinniittiioonn utility/gridinfo.hh:214 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +Read Gmsh mesh file. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:807 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_I_n_f_o │ │ │ │ │ +structure to hold information about a certain GridView. │ │ │ │ │ +DDeeffiinniittiioonn utility/gridinfo.hh:100 │ │ │ │ │ +_g_r_i_d_i_n_f_o_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainermap.hh File Reference │ │ │ │ +dune-grid: vertexorderfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
persistentcontainermap.hh File Reference
│ │ │ │ +
vertexorderfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <algorithm>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/capabilities.hh>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <functional>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/generalvertexorder.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::PersistentContainerMap< G, IdSet, Map >
 map-based implementation of the PersistentContainer More...
class  Dune::VertexOrderByIdFactory< IdSet, Index >
 Factory for GeneralVertexOrder objects using an IdSet. More...
 
class  Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >
struct  Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim >
 type of vertex order object may depend on the dimension of the element More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -persistentcontainermap.hh File Reference │ │ │ │ │ +vertexorderfactory.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ -  map-based implementation of the _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_<_ _I_d_S_e_t_,_ _I_n_d_e_x_ _> │ │ │ │ │ +  Factory for GeneralVertexOrder objects using an _I_d_S_e_t. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _v_a_l_u_e_, │ │ │ │ │ - _i_t_e_r_a_t_o_r_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_<_ _I_d_S_e_t_,_ _I_n_d_e_x_ _>_:_:_V_e_r_t_e_x_O_r_d_e_r_<_ _d_i_m_ _> │ │ │ │ │ +  type of vertex order object may depend on the dimension of the element │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainermap.hh Source File │ │ │ │ +dune-grid: vertexorderfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,387 +74,82 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainermap.hh
│ │ │ │ +
vertexorderfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ -
6#define DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <cassert>
│ │ │ │ -
10#include <type_traits>
│ │ │ │ -
11#include <utility>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/hybridutilities.hh>
│ │ │ │ -
14#include <dune/common/typetraits.hh>
│ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
│ │ │ │ +
7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <algorithm>
│ │ │ │ +
10#include <cstddef>
│ │ │ │ +
11#include <functional>
│ │ │ │ +
12#include <vector>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
15#include <dune/geometry/generalvertexorder.hh>
│ │ │ │
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 // PersistentContainerMap
│ │ │ │ -
21 // ----------------------
│ │ │ │ -
22
│ │ │ │ -
24 template< class G, class IdSet, class Map >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29 protected:
│ │ │ │ -
30 template< class reference, class iterator >
│ │ │ │ -
31 class IteratorWrapper;
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ -
34 typedef G Grid;
│ │ │ │ -
35
│ │ │ │ -
36 typedef typename Map::mapped_type Value;
│ │ │ │ -
37 typedef typename Map::size_type Size;
│ │ │ │ -
38
│ │ │ │ - │ │ │ │ - │ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
42 PersistentContainerMap ( const Grid &grid, int codim, const IdSet &idSet, const Value &value )
│ │ │ │ -
43 : grid_( &grid ),
│ │ │ │ -
44 codim_( codim ),
│ │ │ │ -
45 idSet_( &idSet ),
│ │ │ │ -
46 data_()
│ │ │ │ -
47 {
│ │ │ │ -
48 resize( value );
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51 template< class Entity >
│ │ │ │ -
│ │ │ │ -
52 const Value &operator[] ( const Entity &entity ) const
│ │ │ │ -
53 {
│ │ │ │ -
54 assert( Entity::codimension == codimension() );
│ │ │ │ -
55 typename Map::const_iterator pos = data_.find( idSet().id( entity ) );
│ │ │ │ -
56 assert( pos != data_.end() );
│ │ │ │ -
57 return pos->second;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
60 template< class Entity >
│ │ │ │ -
│ │ │ │ -
61 Value &operator[] ( const Entity &entity )
│ │ │ │ -
62 {
│ │ │ │ -
63 assert( Entity::codimension == codimension() );
│ │ │ │ -
64 typename Map::iterator pos = data_.find( idSet().id( entity ) );
│ │ │ │ -
65 assert( pos != data_.end() );
│ │ │ │ -
66 return pos->second;
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69 template< class Entity >
│ │ │ │ -
│ │ │ │ -
70 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ -
71 {
│ │ │ │ -
72 typename Map::const_iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
│ │ │ │ -
73 assert( pos != data_.end() );
│ │ │ │ -
74 return pos->second;
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
77 template< class Entity >
│ │ │ │ -
│ │ │ │ -
78 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ -
79 {
│ │ │ │ -
80 typename Map::iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
│ │ │ │ -
81 assert( pos != data_.end() );
│ │ │ │ -
82 return pos->second;
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
85 Size size () const { return data_.size(); }
│ │ │ │ -
86
│ │ │ │ -
│ │ │ │ -
87 void resize ( const Value &value = Value() )
│ │ │ │ -
88 {
│ │ │ │ -
89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{},
│ │ │ │ -
90 [ & ]( auto i ){ if( int(i) == this->codimension() ) this->template resize< i >( value ); } );
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93 void shrinkToFit () {}
│ │ │ │ -
94
│ │ │ │ -
95 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
│ │ │ │ -
96
│ │ │ │ -
│ │ │ │ -
97 void swap ( This &other )
│ │ │ │ -
98 {
│ │ │ │ -
99 std::swap( grid_, other.grid_ );
│ │ │ │ -
100 std::swap( codim_, other.codim_ );
│ │ │ │ -
101 std::swap( idSet_, other.idSet_ );
│ │ │ │ -
102 std::swap( data_, other.data_ );
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
107
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
110
│ │ │ │ -
111 int codimension () const { return codim_; }
│ │ │ │ -
112
│ │ │ │ -
113 protected:
│ │ │ │ -
114 const Grid &grid () const { return *grid_; }
│ │ │ │ -
115
│ │ │ │ -
116 template< int codim >
│ │ │ │ -
│ │ │ │ -
117 void resize ( const Value &value );
│ │ │ │ -
118
│ │ │ │ -
119 template< int codim >
│ │ │ │ -
│ │ │ │ -
120 void migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ -
121 std::integral_constant< bool, true > );
│ │ │ │ -
122
│ │ │ │ -
123 template< int codim >
│ │ │ │ -
│ │ │ │ -
124 void migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ -
125 std::integral_constant< bool, false > );
│ │ │ │ -
126
│ │ │ │ -
│ │ │ │ -
127 static void migrateEntry ( const typename IdSet::IdType &id, const Value &value,
│ │ │ │ -
128 Map &oldData, Map &newData );
│ │ │ │ -
129
│ │ │ │ -
130 const IdSet &idSet () const { return *idSet_; }
│ │ │ │ -
131
│ │ │ │ -
132 const Grid *grid_;
│ │ │ │ - │ │ │ │ -
134 const IdSet *idSet_;
│ │ │ │ -
135 Map data_;
│ │ │ │ -
136 };
│ │ │ │ -
137
│ │ │ │ -
138
│ │ │ │ -
139
│ │ │ │ -
140 // PersistentContainerMap::IteratorWrapper
│ │ │ │ -
141 // ---------------------------------------
│ │ │ │ -
142
│ │ │ │ -
143 template< class G, class IdSet, class Map >
│ │ │ │ -
144 template< class value, class iterator >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
146 : public iterator
│ │ │ │ -
147 {
│ │ │ │ - │ │ │ │ -
149
│ │ │ │ -
150 public:
│ │ │ │ -
151 IteratorWrapper ( const iterator &it ) : it_( it ) {}
│ │ │ │ -
152
│ │ │ │ -
153 operator ConstWrapper () const { return ConstWrapper( it_ ); }
│ │ │ │ -
154
│ │ │ │ -
155 value &operator* () { return it_->second; }
│ │ │ │ -
156 value *operator-> () { return &(it_->second); }
│ │ │ │ -
157
│ │ │ │ -
158 bool operator== ( const IteratorWrapper &other ) const { return (it_ == other.it_); }
│ │ │ │ -
159 bool operator!= ( const IteratorWrapper &other ) const { return (it_ != other.it_); }
│ │ │ │ -
160
│ │ │ │ -
161 IteratorWrapper &operator++ () { ++it_; return *this; }
│ │ │ │ -
162
│ │ │ │ -
163 private:
│ │ │ │ -
164 iterator it_;
│ │ │ │ -
165 };
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
167
│ │ │ │ -
168
│ │ │ │ -
169
│ │ │ │ -
170 // Implementation of PersistentContainerMap
│ │ │ │ -
171 // ----------------------------------------
│ │ │ │ -
172
│ │ │ │ -
173 template< class G, class IdSet, class Map >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
176 {
│ │ │ │ -
177 return ConstIterator( data_.begin() );
│ │ │ │ -
178 }
│ │ │ │ -
│ │ │ │ -
179
│ │ │ │ -
180 template< class G, class IdSet, class Map >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
183 {
│ │ │ │ -
184 return Iterator( data_.begin() );
│ │ │ │ -
185 }
│ │ │ │ -
│ │ │ │ -
186
│ │ │ │ -
187
│ │ │ │ -
188 template< class G, class IdSet, class Map >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
191 {
│ │ │ │ -
192 return ConstIterator( data_.end() );
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
195 template< class G, class IdSet, class Map >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
198 {
│ │ │ │ -
199 return Iterator( data_.end() );
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201
│ │ │ │ -
202
│ │ │ │ -
203 template< class G, class IdSet, class Map >
│ │ │ │ -
204 template< int codim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
206 {
│ │ │ │ -
207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim >::v > hasEntityIterator;
│ │ │ │ -
208 assert( codim == codimension() );
│ │ │ │ -
209
│ │ │ │ -
210 // create empty map and swap it with current map (no need to copy twice)
│ │ │ │ -
211 Map data;
│ │ │ │ -
212 std::swap( data, data_ );
│ │ │ │ -
213
│ │ │ │ -
214 // copy all data from old map into new one (adding new entries, if necessary)
│ │ │ │ -
215 const int maxLevel = grid().maxLevel();
│ │ │ │ -
216 for ( int level = 0; level <= maxLevel; ++level )
│ │ │ │ -
217 migrateLevel< codim >( level, value, data, hasEntityIterator );
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
220
│ │ │ │ -
221 template< class G, class IdSet, class Map >
│ │ │ │ -
222 template< int codim >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
224 ::migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ -
225 std::integral_constant< bool, true > )
│ │ │ │ -
226 {
│ │ │ │ -
227 typedef typename Grid::LevelGridView LevelView;
│ │ │ │ -
228 typedef typename LevelView::template Codim< codim >::Iterator LevelIterator;
│ │ │ │ -
229
│ │ │ │ -
230 const LevelView levelView = grid().levelGridView( level );
│ │ │ │ -
231 const LevelIterator end = levelView.template end< codim >();
│ │ │ │ -
232 for( LevelIterator it = levelView.template begin< codim >(); it != end; ++it )
│ │ │ │ -
233 migrateEntry( idSet().id( *it ), value, data, data_ );
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ -
235
│ │ │ │ -
236
│ │ │ │ -
237 template< class G, class IdSet, class Map >
│ │ │ │ -
238 template< int codim >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
240 ::migrateLevel ( int level, const Value &value, Map &data,
│ │ │ │ -
241 std::integral_constant< bool, false > )
│ │ │ │ -
242 {
│ │ │ │ -
243 typedef typename Grid::LevelGridView LevelView;
│ │ │ │ -
244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator;
│ │ │ │ -
245
│ │ │ │ -
246 const LevelView levelView = grid().levelGridView( level );
│ │ │ │ -
247 const LevelIterator end = levelView.template end< 0 >();
│ │ │ │ -
248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it )
│ │ │ │ -
249 {
│ │ │ │ -
250 const typename LevelIterator::Entity &entity = *it;
│ │ │ │ -
251 const int subEntities = entity.subEntities( codim );
│ │ │ │ -
252 for( int i = 0; i < subEntities; ++i )
│ │ │ │ -
253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ );
│ │ │ │ -
254 }
│ │ │ │ -
255 }
│ │ │ │ -
│ │ │ │ -
256
│ │ │ │ -
257
│ │ │ │ -
258 template< class G, class IdSet, class Map >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
260 ::migrateEntry ( const typename IdSet::IdType &id, const Value &value,
│ │ │ │ -
261 Map &oldData, Map &newData )
│ │ │ │ -
262 {
│ │ │ │ -
263 // insert entry for id
│ │ │ │ -
264 const std::pair< typename Map::iterator, bool > inserted
│ │ │ │ -
265 = newData.insert( std::make_pair( id, value ) );
│ │ │ │ -
266
│ │ │ │ -
267 // if entry did not exist previously, copy data
│ │ │ │ -
268 if( inserted.second )
│ │ │ │ -
269 {
│ │ │ │ -
270 const typename Map::iterator pos = oldData.find( id );
│ │ │ │ -
271 if( pos != oldData.end() )
│ │ │ │ -
272 {
│ │ │ │ -
273 inserted.first->second = pos->second;
│ │ │ │ -
274 oldData.erase( pos );
│ │ │ │ -
275 }
│ │ │ │ -
276 }
│ │ │ │ -
277 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
279} // namespace Dune
│ │ │ │ -
280
│ │ │ │ -
281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │ +
20
│ │ │ │ +
31 template<class IdSet, class Index = std::size_t>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 const IdSet& idset;
│ │ │ │ +
34
│ │ │ │ +
35 public:
│ │ │ │ +
37 template<std::size_t dim>
│ │ │ │ +
│ │ │ │ +
38 struct VertexOrder {
│ │ │ │ +
40 typedef GeneralVertexOrder<dim, Index> type;
│ │ │ │ +
41 };
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
44
│ │ │ │ +
53 VertexOrderByIdFactory(const IdSet &idset_) : idset(idset_) { }
│ │ │ │ +
54
│ │ │ │ +
56
│ │ │ │ +
62 template<typename Element>
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
64 make(const Element &e) const {
│ │ │ │ +
65
│ │ │ │ +
66 std::size_t size = referenceElement(e.geometry()).size(Element::mydimension);
│ │ │ │ +
67
│ │ │ │ +
68 std::vector<typename IdSet::IdType> ids(size);
│ │ │ │ +
69 for(std::size_t i = 0; i < size; ++i)
│ │ │ │ +
70 ids[i] = idset.subId(e, i, Element::mydimension);
│ │ │ │ +
71 return GeneralVertexOrder<Element::mydimension, Index>
│ │ │ │ +
72 (e.type(), ids.begin(), ids.end());
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74 };
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76} // namespace Dune
│ │ │ │ +
77
│ │ │ │ +
78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ +
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition common/geometry.hh:558
│ │ │ │
Id Set Interface.
Definition indexidset.hh:452
│ │ │ │ -
IdTypeImp IdType
Type used to represent an id.
Definition indexidset.hh:458
│ │ │ │ -
GridFamily::Traits::LevelGridView LevelGridView
type of view for level grid
Definition common/grid.hh:402
│ │ │ │ -
Export the type of the entity used as parameter in the id(...) method.
Definition indexidset.hh:462
│ │ │ │ -
map-based implementation of the PersistentContainer
Definition persistentcontainermap.hh:26
│ │ │ │ -
void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, false >)
Definition persistentcontainermap.hh:240
│ │ │ │ -
void swap(This &other)
Definition persistentcontainermap.hh:97
│ │ │ │ -
void fill(const Value &value)
Definition persistentcontainermap.hh:95
│ │ │ │ -
G Grid
Definition persistentcontainermap.hh:34
│ │ │ │ -
void resize(const Value &value)
Definition persistentcontainermap.hh:205
│ │ │ │ -
IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator
Definition persistentcontainermap.hh:39
│ │ │ │ -
int codim_
Definition persistentcontainermap.hh:133
│ │ │ │ -
const Grid * grid_
Definition persistentcontainermap.hh:132
│ │ │ │ -
const Value & operator[](const Entity &entity) const
Definition persistentcontainermap.hh:52
│ │ │ │ -
int codimension() const
Definition persistentcontainermap.hh:111
│ │ │ │ -
void resize(const Value &value=Value())
Definition persistentcontainermap.hh:87
│ │ │ │ -
const IdSet & idSet() const
Definition persistentcontainermap.hh:130
│ │ │ │ -
ConstIterator begin() const
Definition persistentcontainermap.hh:175
│ │ │ │ -
static void migrateEntry(const typename IdSet::IdType &id, const Value &value, Map &oldData, Map &newData)
Definition persistentcontainermap.hh:260
│ │ │ │ -
Map::mapped_type Value
Definition persistentcontainermap.hh:36
│ │ │ │ -
Iterator end()
Definition persistentcontainermap.hh:197
│ │ │ │ -
const Grid & grid() const
Definition persistentcontainermap.hh:114
│ │ │ │ -
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainermap.hh:70
│ │ │ │ -
PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const Value &value)
Definition persistentcontainermap.hh:42
│ │ │ │ -
Iterator begin()
Definition persistentcontainermap.hh:182
│ │ │ │ -
Map::size_type Size
Definition persistentcontainermap.hh:37
│ │ │ │ -
ConstIterator end() const
Definition persistentcontainermap.hh:190
│ │ │ │ -
Map data_
Definition persistentcontainermap.hh:135
│ │ │ │ -
Size size() const
Definition persistentcontainermap.hh:85
│ │ │ │ -
IteratorWrapper< Value, typename Map::iterator > Iterator
Definition persistentcontainermap.hh:40
│ │ │ │ -
const IdSet * idSet_
Definition persistentcontainermap.hh:134
│ │ │ │ -
void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, true >)
Definition persistentcontainermap.hh:224
│ │ │ │ -
void shrinkToFit()
Definition persistentcontainermap.hh:93
│ │ │ │ -
Definition persistentcontainermap.hh:147
│ │ │ │ -
IteratorWrapper(const iterator &it)
Definition persistentcontainermap.hh:151
│ │ │ │ -
A set of traits classes to store static information about grid implementation.
│ │ │ │ +
IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
Definition indexidset.hh:486
│ │ │ │ +
Factory for GeneralVertexOrder objects using an IdSet.
Definition vertexorderfactory.hh:32
│ │ │ │ +
VertexOrderByIdFactory(const IdSet &idset_)
construct a factory object
Definition vertexorderfactory.hh:53
│ │ │ │ +
VertexOrder< Element::mydimension >::type make(const Element &e) const
construct a vertex ordering object
Definition vertexorderfactory.hh:64
│ │ │ │ +
type of vertex order object may depend on the dimension of the element
Definition vertexorderfactory.hh:38
│ │ │ │ +
GeneralVertexOrder< dim, Index > type
type of vertex order object
Definition vertexorderfactory.hh:40
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,432 +1,96 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainermap.hh │ │ │ │ │ +vertexorderfactory.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ -6#define DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH │ │ │ │ │ +7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ 16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -20 // PersistentContainerMap │ │ │ │ │ -21 // ---------------------- │ │ │ │ │ -22 │ │ │ │ │ -24 template< class G, class IdSet, class Map > │ │ │ │ │ -_2_5 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p │ │ │ │ │ -26 { │ │ │ │ │ -27 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> _T_h_i_s; │ │ │ │ │ -28 │ │ │ │ │ -29 protected: │ │ │ │ │ -30 template< class reference, class iterator > │ │ │ │ │ -31 class _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r; │ │ │ │ │ -32 │ │ │ │ │ -33 public: │ │ │ │ │ -_3_4 typedef G _G_r_i_d; │ │ │ │ │ -35 │ │ │ │ │ -_3_6 typedef typename Map::mapped_type _V_a_l_u_e; │ │ │ │ │ -_3_7 typedef typename Map::size_type _S_i_z_e; │ │ │ │ │ -38 │ │ │ │ │ -_3_9 typedef _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _c_o_n_s_t_ _V_a_l_u_e_,_ _t_y_p_e_n_a_m_e_ _M_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r_ _> │ │ │ │ │ -_C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -_4_0 typedef _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _V_a_l_u_e_,_ _t_y_p_e_n_a_m_e_ _M_a_p_:_:_i_t_e_r_a_t_o_r_ _> _I_t_e_r_a_t_o_r; │ │ │ │ │ -41 │ │ │ │ │ -_4_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p ( const _G_r_i_d &_g_r_i_d, int codim, const _I_d_S_e_t &_i_d_S_e_t, │ │ │ │ │ -const _V_a_l_u_e &value ) │ │ │ │ │ -43 : _g_r_i_d__( &_g_r_i_d ), │ │ │ │ │ -44 _c_o_d_i_m__( codim ), │ │ │ │ │ -45 _i_d_S_e_t__( &_i_d_S_e_t ), │ │ │ │ │ -46 _d_a_t_a__() │ │ │ │ │ -47 { │ │ │ │ │ -48 _r_e_s_i_z_e( value ); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -51 template< class Entity > │ │ │ │ │ -_5_2 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ -53 { │ │ │ │ │ -54 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -55 typename Map::const_iterator pos = _d_a_t_a__.find( _i_d_S_e_t().id( entity ) ); │ │ │ │ │ -56 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ -57 return pos->second; │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 template< class Entity > │ │ │ │ │ -_6_1 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -62 { │ │ │ │ │ -63 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ -64 typename Map::iterator pos = _d_a_t_a__.find( _i_d_S_e_t().id( entity ) ); │ │ │ │ │ -65 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ -66 return pos->second; │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -69 template< class Entity > │ │ │ │ │ -_7_0 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const │ │ │ │ │ -71 { │ │ │ │ │ -72 typename Map::const_iterator pos = _d_a_t_a__.find( _i_d_S_e_t().subId( entity, │ │ │ │ │ -subEntity, _c_o_d_i_m_e_n_s_i_o_n() ) ); │ │ │ │ │ -73 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ -74 return pos->second; │ │ │ │ │ -75 } │ │ │ │ │ -76 │ │ │ │ │ -77 template< class Entity > │ │ │ │ │ -_7_8 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) │ │ │ │ │ -79 { │ │ │ │ │ -80 typename Map::iterator pos = _d_a_t_a__.find( _i_d_S_e_t().subId( entity, subEntity, │ │ │ │ │ -_c_o_d_i_m_e_n_s_i_o_n() ) ); │ │ │ │ │ -81 assert( pos != _d_a_t_a__.end() ); │ │ │ │ │ -82 return pos->second; │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_5 _S_i_z_e _s_i_z_e () const { return _d_a_t_a__.size(); } │ │ │ │ │ -86 │ │ │ │ │ -_8_7 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ) │ │ │ │ │ -88 { │ │ │ │ │ -89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{}, │ │ │ │ │ -90 [ & ]( auto i ){ if( int(i) == this->_c_o_d_i_m_e_n_s_i_o_n() ) this->template resize< │ │ │ │ │ -i >( value ); } ); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -_9_3 void _s_h_r_i_n_k_T_o_F_i_t () {} │ │ │ │ │ -94 │ │ │ │ │ -_9_5 void _f_i_l_l ( const _V_a_l_u_e &value ) { std::fill( _b_e_g_i_n(), _e_n_d(), value ); } │ │ │ │ │ -96 │ │ │ │ │ -_9_7 void _s_w_a_p ( _T_h_i_s &other ) │ │ │ │ │ -98 { │ │ │ │ │ -99 _s_t_d_:_:_s_w_a_p( _g_r_i_d__, other._g_r_i_d__ ); │ │ │ │ │ -100 _s_t_d_:_:_s_w_a_p( _c_o_d_i_m__, other._c_o_d_i_m__ ); │ │ │ │ │ -101 _s_t_d_:_:_s_w_a_p( _i_d_S_e_t__, other._i_d_S_e_t__ ); │ │ │ │ │ -102 _s_t_d_:_:_s_w_a_p( _d_a_t_a__, other._d_a_t_a__ ); │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_5 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const; │ │ │ │ │ -_1_0_6 _I_t_e_r_a_t_o_r _b_e_g_i_n (); │ │ │ │ │ -107 │ │ │ │ │ -_1_0_8 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const; │ │ │ │ │ -_1_0_9 _I_t_e_r_a_t_o_r _e_n_d (); │ │ │ │ │ -110 │ │ │ │ │ -_1_1_1 int _c_o_d_i_m_e_n_s_i_o_n () const { return _c_o_d_i_m__; } │ │ │ │ │ -112 │ │ │ │ │ -113 protected: │ │ │ │ │ -_1_1_4 const _G_r_i_d &_g_r_i_d () const { return *_g_r_i_d__; } │ │ │ │ │ -115 │ │ │ │ │ -116 template< int codim > │ │ │ │ │ -_1_1_7 void _r_e_s_i_z_e ( const _V_a_l_u_e &value ); │ │ │ │ │ -118 │ │ │ │ │ -119 template< int codim > │ │ │ │ │ -_1_2_0 void _m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ -121 std::integral_constant< bool, true > ); │ │ │ │ │ -122 │ │ │ │ │ -123 template< int codim > │ │ │ │ │ -_1_2_4 void _m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ -125 std::integral_constant< bool, false > ); │ │ │ │ │ -126 │ │ │ │ │ -_1_2_7 static void _m_i_g_r_a_t_e_E_n_t_r_y ( const typename _I_d_S_e_t_:_:_I_d_T_y_p_e &id, const _V_a_l_u_e │ │ │ │ │ -&value, │ │ │ │ │ -128 Map &oldData, Map &newData ); │ │ │ │ │ -129 │ │ │ │ │ -_1_3_0 const _I_d_S_e_t &_i_d_S_e_t () const { return *_i_d_S_e_t__; } │ │ │ │ │ -131 │ │ │ │ │ -_1_3_2 const _G_r_i_d *_g_r_i_d__; │ │ │ │ │ -_1_3_3 int _c_o_d_i_m__; │ │ │ │ │ -_1_3_4 const _I_d_S_e_t *_i_d_S_e_t__; │ │ │ │ │ -_1_3_5 Map _d_a_t_a__; │ │ │ │ │ -136 }; │ │ │ │ │ -137 │ │ │ │ │ -138 │ │ │ │ │ -139 │ │ │ │ │ -140 // PersistentContainerMap::IteratorWrapper │ │ │ │ │ -141 // --------------------------------------- │ │ │ │ │ -142 │ │ │ │ │ -143 template< class G, class IdSet, class Map > │ │ │ │ │ -144 template< class value, class iterator > │ │ │ │ │ -_1_4_5 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r │ │ │ │ │ -146 : public iterator │ │ │ │ │ -147 { │ │ │ │ │ -148 typedef _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_<_ _c_o_n_s_t_ _v_a_l_u_e_,_ _t_y_p_e_n_a_m_e_ _M_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r_ _> │ │ │ │ │ -_C_o_n_s_t_W_r_a_p_p_e_r; │ │ │ │ │ -149 │ │ │ │ │ -150 public: │ │ │ │ │ -_1_5_1 _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r ( const iterator &it ) : it_( it ) {} │ │ │ │ │ -152 │ │ │ │ │ -_1_5_3 operator _C_o_n_s_t_W_r_a_p_p_e_r () const { return _C_o_n_s_t_W_r_a_p_p_e_r( it_ ); } │ │ │ │ │ -154 │ │ │ │ │ -_1_5_5 value &operator* () { return it_->second; } │ │ │ │ │ -_1_5_6 value *operator-> () { return &(it_->second); } │ │ │ │ │ -157 │ │ │ │ │ -_1_5_8 bool operator== ( const _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r &other ) const { return (it_ == │ │ │ │ │ -other.it_); } │ │ │ │ │ -_1_5_9 bool operator!= ( const _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r &other ) const { return (it_ != │ │ │ │ │ -other.it_); } │ │ │ │ │ -160 │ │ │ │ │ -_1_6_1 _I_t_e_r_a_t_o_r_W_r_a_p_p_e_r &operator++ () { ++it_; return *this; } │ │ │ │ │ -162 │ │ │ │ │ -163 private: │ │ │ │ │ -164 iterator it_; │ │ │ │ │ -165 }; │ │ │ │ │ -166 │ │ │ │ │ -167 │ │ │ │ │ -168 │ │ │ │ │ -169 │ │ │ │ │ -170 // Implementation of PersistentContainerMap │ │ │ │ │ -171 // ---------------------------------------- │ │ │ │ │ -172 │ │ │ │ │ -173 template< class G, class IdSet, class Map > │ │ │ │ │ -174 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -_1_7_5 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_b_e_g_i_n () const │ │ │ │ │ -176 { │ │ │ │ │ -177 return _C_o_n_s_t_I_t_e_r_a_t_o_r( data_.begin() ); │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -180 template< class G, class IdSet, class Map > │ │ │ │ │ -181 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -_1_8_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_b_e_g_i_n () │ │ │ │ │ -183 { │ │ │ │ │ -184 return _I_t_e_r_a_t_o_r( data_.begin() ); │ │ │ │ │ -185 } │ │ │ │ │ -186 │ │ │ │ │ -187 │ │ │ │ │ -188 template< class G, class IdSet, class Map > │ │ │ │ │ -189 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -_1_9_0 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_e_n_d () const │ │ │ │ │ -191 { │ │ │ │ │ -192 return _C_o_n_s_t_I_t_e_r_a_t_o_r( data_.end() ); │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -195 template< class G, class IdSet, class Map > │ │ │ │ │ -196 inline typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -_1_9_7 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_e_n_d () │ │ │ │ │ -198 { │ │ │ │ │ -199 return _I_t_e_r_a_t_o_r( data_.end() ); │ │ │ │ │ -200 } │ │ │ │ │ -201 │ │ │ │ │ -202 │ │ │ │ │ -203 template< class G, class IdSet, class Map > │ │ │ │ │ -204 template< int codim > │ │ │ │ │ -_2_0_5 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _>_:_:_r_e_s_i_z_e ( const _V_a_l_u_e │ │ │ │ │ -&value ) │ │ │ │ │ -206 { │ │ │ │ │ -207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim │ │ │ │ │ ->::v > hasEntityIterator; │ │ │ │ │ -208 assert( codim == codimension() ); │ │ │ │ │ -209 │ │ │ │ │ -210 // create empty map and swap it with current map (no need to copy twice) │ │ │ │ │ -211 Map data; │ │ │ │ │ -212 _s_t_d_:_:_s_w_a_p( data, data_ ); │ │ │ │ │ -213 │ │ │ │ │ -214 // copy all data from old map into new one (adding new entries, if │ │ │ │ │ -necessary) │ │ │ │ │ -215 const int maxLevel = grid().maxLevel(); │ │ │ │ │ -216 for ( int level = 0; level <= maxLevel; ++level ) │ │ │ │ │ -217 migrateLevel< codim >( level, value, data, hasEntityIterator ); │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -220 │ │ │ │ │ -221 template< class G, class IdSet, class Map > │ │ │ │ │ -222 template< int codim > │ │ │ │ │ -223 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ -_2_2_4_ _:_:_m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ -225 std::integral_constant< bool, true > ) │ │ │ │ │ -226 { │ │ │ │ │ -227 typedef typename _G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w LevelView; │ │ │ │ │ -228 typedef typename LevelView::template Codim< codim >::Iterator │ │ │ │ │ -LevelIterator; │ │ │ │ │ -229 │ │ │ │ │ -230 const LevelView levelView = grid().levelGridView( level ); │ │ │ │ │ -231 const LevelIterator end = levelView.template end< codim >(); │ │ │ │ │ -232 for( LevelIterator it = levelView.template begin< codim >(); it != end; │ │ │ │ │ -++it ) │ │ │ │ │ -233 migrateEntry( idSet().id( *it ), value, data, data_ ); │ │ │ │ │ -234 } │ │ │ │ │ -235 │ │ │ │ │ -236 │ │ │ │ │ -237 template< class G, class IdSet, class Map > │ │ │ │ │ -238 template< int codim > │ │ │ │ │ -239 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ -_2_4_0_ _:_:_m_i_g_r_a_t_e_L_e_v_e_l ( int level, const _V_a_l_u_e &value, Map &data, │ │ │ │ │ -241 std::integral_constant< bool, false > ) │ │ │ │ │ -242 { │ │ │ │ │ -243 typedef typename _G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w LevelView; │ │ │ │ │ -244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator; │ │ │ │ │ -245 │ │ │ │ │ -246 const LevelView levelView = grid().levelGridView( level ); │ │ │ │ │ -247 const LevelIterator end = levelView.template end< 0 >(); │ │ │ │ │ -248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it ) │ │ │ │ │ -249 { │ │ │ │ │ -250 const typename LevelIterator::Entity &entity = *it; │ │ │ │ │ -251 const int subEntities = entity.subEntities( codim ); │ │ │ │ │ -252 for( int i = 0; i < subEntities; ++i ) │ │ │ │ │ -253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ ); │ │ │ │ │ -254 } │ │ │ │ │ -255 } │ │ │ │ │ -256 │ │ │ │ │ -257 │ │ │ │ │ -258 template< class G, class IdSet, class Map > │ │ │ │ │ -259 inline void _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _I_d_S_e_t_,_ _M_a_p_ _> │ │ │ │ │ -_2_6_0_ _:_:_m_i_g_r_a_t_e_E_n_t_r_y ( const typename _I_d_S_e_t_:_:_I_d_T_y_p_e &id, const _V_a_l_u_e &value, │ │ │ │ │ -261 Map &oldData, Map &newData ) │ │ │ │ │ -262 { │ │ │ │ │ -263 // insert entry for id │ │ │ │ │ -264 const std::pair< typename Map::iterator, bool > inserted │ │ │ │ │ -265 = newData.insert( std::make_pair( id, value ) ); │ │ │ │ │ -266 │ │ │ │ │ -267 // if entry did not exist previously, copy data │ │ │ │ │ -268 if( inserted.second ) │ │ │ │ │ -269 { │ │ │ │ │ -270 const typename Map::iterator pos = oldData.find( id ); │ │ │ │ │ -271 if( pos != oldData.end() ) │ │ │ │ │ -272 { │ │ │ │ │ -273 inserted.first->second = pos->second; │ │ │ │ │ -274 oldData.erase( pos ); │ │ │ │ │ -275 } │ │ │ │ │ -276 } │ │ │ │ │ -277 } │ │ │ │ │ -278 │ │ │ │ │ -279} // namespace Dune │ │ │ │ │ -280 │ │ │ │ │ -281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ │ -void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ -> &b) │ │ │ │ │ -DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ │ +18 │ │ │ │ │ +20 │ │ │ │ │ +31 template │ │ │ │ │ +_3_2 class _V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y { │ │ │ │ │ +33 const _I_d_S_e_t& idset; │ │ │ │ │ +34 │ │ │ │ │ +35 public: │ │ │ │ │ +37 template │ │ │ │ │ +_3_8 struct _V_e_r_t_e_x_O_r_d_e_r { │ │ │ │ │ +_4_0 typedef GeneralVertexOrder _t_y_p_e; │ │ │ │ │ +41 }; │ │ │ │ │ +42 │ │ │ │ │ +44 │ │ │ │ │ +_5_3 _V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y(const _I_d_S_e_t &idset_) : idset(idset_) { } │ │ │ │ │ +54 │ │ │ │ │ +56 │ │ │ │ │ +62 template │ │ │ │ │ +63 typename _V_e_r_t_e_x_O_r_d_e_r_<_E_l_e_m_e_n_t_:_:_m_y_d_i_m_e_n_s_i_o_n_>_:_:_t_y_p_e │ │ │ │ │ +_6_4 _m_a_k_e(const Element &e) const { │ │ │ │ │ +65 │ │ │ │ │ +66 std::size_t size = _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(e.geometry()).size(Element:: │ │ │ │ │ +mydimension); │ │ │ │ │ +67 │ │ │ │ │ +68 std::vector ids(size); │ │ │ │ │ +69 for(std::size_t i = 0; i < size; ++i) │ │ │ │ │ +70 ids[i] = idset._s_u_b_I_d(e, i, Element::mydimension); │ │ │ │ │ +71 return GeneralVertexOrder │ │ │ │ │ +72 (e.type(), ids.begin(), ids.end()); │ │ │ │ │ +73 } │ │ │ │ │ +74 }; │ │ │ │ │ +75 │ │ │ │ │ +76} // namespace Dune │ │ │ │ │ +77 │ │ │ │ │ +78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int codimension │ │ │ │ │ -Know your own codimension. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ +auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) │ │ │ │ │ +-> decltype(referenceElement(geo, geo.impl())) │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:558 │ │ │ │ │ _D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ Id Set Interface. │ │ │ │ │ DDeeffiinniittiioonn indexidset.hh:452 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ -IdTypeImp IdType │ │ │ │ │ -Type used to represent an id. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:458 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -GridFamily::Traits::LevelGridView LevelGridView │ │ │ │ │ -type of view for level grid │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:402 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t_:_:_C_o_d_i_m │ │ │ │ │ -Export the type of the entity used as parameter in the id(...) method. │ │ │ │ │ -DDeeffiinniittiioonn indexidset.hh:462 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p │ │ │ │ │ -map-based implementation of the PersistentContainer │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_m_i_g_r_a_t_e_L_e_v_e_l │ │ │ │ │ -void migrateLevel(int level, const Value &value, Map &data, std:: │ │ │ │ │ -integral_constant< bool, false >) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_w_a_p │ │ │ │ │ -void swap(This &other) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_f_i_l_l │ │ │ │ │ -void fill(const Value &value) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const Value &value) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_c_o_d_i_m__ │ │ │ │ │ -int codim_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_g_r_i_d__ │ │ │ │ │ -const Grid * grid_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const Value & operator[](const Entity &entity) const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -int codimension() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const Value &value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_i_d_S_e_t │ │ │ │ │ -const IdSet & idSet() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_b_e_g_i_n │ │ │ │ │ -ConstIterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_m_i_g_r_a_t_e_E_n_t_r_y │ │ │ │ │ -static void migrateEntry(const typename IdSet::IdType &id, const Value &value, │ │ │ │ │ -Map &oldData, Map &newData) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:260 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_V_a_l_u_e │ │ │ │ │ -Map::mapped_type Value │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_e_n_d │ │ │ │ │ -Iterator end() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p │ │ │ │ │ -PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const │ │ │ │ │ -Value &value) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_S_i_z_e │ │ │ │ │ -Map::size_type Size │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_e_n_d │ │ │ │ │ -ConstIterator end() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:190 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_d_a_t_a__ │ │ │ │ │ -Map data_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_i_z_e │ │ │ │ │ -Size size() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -IteratorWrapper< Value, typename Map::iterator > Iterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_i_d_S_e_t__ │ │ │ │ │ -const IdSet * idSet_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_m_i_g_r_a_t_e_L_e_v_e_l │ │ │ │ │ -void migrateLevel(int level, const Value &value, Map &data, std:: │ │ │ │ │ -integral_constant< bool, true >) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:224 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r_:_:_I_t_e_r_a_t_o_r_W_r_a_p_p_e_r │ │ │ │ │ -IteratorWrapper(const iterator &it) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:151 │ │ │ │ │ -_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ -A set of traits classes to store static information about grid implementation. │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ │ +IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) │ │ │ │ │ +const │ │ │ │ │ +Get id of subentity i of co-dimension codim of a co-dimension 0 entity. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:486 │ │ │ │ │ +_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y │ │ │ │ │ +Factory for GeneralVertexOrder objects using an IdSet. │ │ │ │ │ +DDeeffiinniittiioonn vertexorderfactory.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y │ │ │ │ │ +VertexOrderByIdFactory(const IdSet &idset_) │ │ │ │ │ +construct a factory object │ │ │ │ │ +DDeeffiinniittiioonn vertexorderfactory.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ +VertexOrder< Element::mydimension >::type make(const Element &e) const │ │ │ │ │ +construct a vertex ordering object │ │ │ │ │ +DDeeffiinniittiioonn vertexorderfactory.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_V_e_r_t_e_x_O_r_d_e_r │ │ │ │ │ +type of vertex order object may depend on the dimension of the element │ │ │ │ │ +DDeeffiinniittiioonn vertexorderfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_V_e_r_t_e_x_O_r_d_e_r_B_y_I_d_F_a_c_t_o_r_y_:_:_V_e_r_t_e_x_O_r_d_e_r_:_:_t_y_p_e │ │ │ │ │ +GeneralVertexOrder< dim, Index > type │ │ │ │ │ +type of vertex order object │ │ │ │ │ +DDeeffiinniittiioonn vertexorderfactory.hh:40 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridtype.hh File Reference │ │ │ │ +dune-grid: multiindex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,25 +69,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridtype.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
multiindex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

This file can be included directly following config.h to test if a grid type was correctly selected. │ │ │ │ +

Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes. │ │ │ │ More...

│ │ │ │ - │ │ │ │ +
#include <array>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

│ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::FactoryUtilities::MultiIndex< dim >
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::FactoryUtilities
 
│ │ │ │

Detailed Description

│ │ │ │ -

This file can be included directly following config.h to test if a grid type was correctly selected.

│ │ │ │ -
Author
Andreas Dedner
│ │ │ │ +

Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,18 +1,27 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -gridtype.hh File Reference │ │ │ │ │ -This file can be included directly following config.h to test if a grid type │ │ │ │ │ -was correctly selected. _M_o_r_e_._._. │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +multiindex.hh File Reference │ │ │ │ │ +Implements a multiindex with arbitrary dimension and fixed index ranges This is │ │ │ │ │ +used by various factory classes. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ +namespace   _D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s │ │ │ │ │ +  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file can be included directly following config.h to test if a grid type │ │ │ │ │ -was correctly selected. │ │ │ │ │ - Author │ │ │ │ │ - Andreas Dedner │ │ │ │ │ +Implements a multiindex with arbitrary dimension and fixed index ranges This is │ │ │ │ │ +used by various factory classes. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridtype.hh Source File │ │ │ │ +dune-grid: multiindex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,42 +74,83 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
gridtype.hh
│ │ │ │ +
multiindex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRIDTYPE_HH
│ │ │ │ -
6#define DUNE_GRIDTYPE_HH
│ │ │ │ -
7
│ │ │ │ -
17#ifndef HEADERCHECK
│ │ │ │ -
18
│ │ │ │ -
19// NOGRID is used to specify that no default was set during configure
│ │ │ │ -
20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected
│ │ │ │ -
21// and an error is produced
│ │ │ │ -
22#if defined NOGRID
│ │ │ │ -
23 #if ! HAVE_GRIDTYPE
│ │ │ │ -
24 #error "No grid type selected, use GRIDTYPE=..."
│ │ │ │ -
25 #endif
│ │ │ │ -
26#else
│ │ │ │ -
27 #if ! HAVE_GRIDTYPE
│ │ │ │ -
28 #error "No grid type selected, typo in GRIDTYPE=...?"
│ │ │ │ -
29 #endif
│ │ │ │ -
30#endif
│ │ │ │ -
31
│ │ │ │ -
32#endif // HEADERCHECK
│ │ │ │ -
33
│ │ │ │ -
34#endif // DUNE_GRIDTYPE_HH
│ │ │ │ +
3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH
│ │ │ │ +
4#define DUNE_GRID_UTILITY_MULTIINDEX_HH
│ │ │ │ +
5
│ │ │ │ +
11#include<array>
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
│ │ │ │ +
15 namespace FactoryUtilities
│ │ │ │ +
16 {
│ │ │ │ +
17 template<std::size_t dim>
│ │ │ │ +
│ │ │ │ +
18 class MultiIndex : public std::array<unsigned int,dim>
│ │ │ │ +
19 {
│ │ │ │ +
20 // The range of each component
│ │ │ │ +
21 std::array<unsigned int,dim> limits_;
│ │ │ │ +
22
│ │ │ │ +
23 public:
│ │ │ │ +
│ │ │ │ +
25 MultiIndex(const std::array<unsigned int,dim>& limits) : limits_(limits)
│ │ │ │ +
26 {
│ │ │ │ +
27 std::fill(this->begin(), this->end(), 0);
│ │ │ │ +
28 }
│ │ │ │ +
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
32 {
│ │ │ │ +
33 for (std::size_t i=0; i<dim; i++)
│ │ │ │ +
34 {
│ │ │ │ +
35 // Augment digit
│ │ │ │ +
36 (*this)[i]++;
│ │ │ │ +
37
│ │ │ │ +
38 // If there is no carry-over we can stop here
│ │ │ │ +
39 if ((*this)[i]<limits_[i])
│ │ │ │ +
40 break;
│ │ │ │ +
41
│ │ │ │ +
42 (*this)[i] = 0;
│ │ │ │ +
43 }
│ │ │ │ +
44 return *this;
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
│ │ │ │ +
48 size_t cycle() const
│ │ │ │ +
49 {
│ │ │ │ +
50 size_t result = 1;
│ │ │ │ +
51 for (std::size_t i=0; i<dim; i++)
│ │ │ │ +
52 result *= limits_[i];
│ │ │ │ +
53 return result;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55 };
│ │ │ │ +
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57}
│ │ │ │ +
58
│ │ │ │ +
59#endif
│ │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
Definition multiindex.hh:19
│ │ │ │ +
MultiIndex(const std::array< unsigned int, dim > &limits)
Constructor with a given range for each digit.
Definition multiindex.hh:25
│ │ │ │ +
MultiIndex< dim > & operator++()
Increment the MultiIndex.
Definition multiindex.hh:31
│ │ │ │ +
size_t cycle() const
Compute how many times you can call operator++ before getting to (0,...,0) again.
Definition multiindex.hh:48
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,37 +1,81 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -gridtype.hh │ │ │ │ │ +multiindex.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRIDTYPE_HH │ │ │ │ │ -6#define DUNE_GRIDTYPE_HH │ │ │ │ │ -7 │ │ │ │ │ -17#ifndef HEADERCHECK │ │ │ │ │ -18 │ │ │ │ │ -19// NOGRID is used to specify that no default was set during configure │ │ │ │ │ -20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected │ │ │ │ │ -21// and an error is produced │ │ │ │ │ -22#if defined NOGRID │ │ │ │ │ -23 #if ! HAVE_GRIDTYPE │ │ │ │ │ -24 #error "No grid type selected, use GRIDTYPE=..." │ │ │ │ │ -25 #endif │ │ │ │ │ -26#else │ │ │ │ │ -27 #if ! HAVE_GRIDTYPE │ │ │ │ │ -28 #error "No grid type selected, typo in GRIDTYPE=...?" │ │ │ │ │ -29 #endif │ │ │ │ │ -30#endif │ │ │ │ │ -31 │ │ │ │ │ -32#endif // HEADERCHECK │ │ │ │ │ -33 │ │ │ │ │ -34#endif // DUNE_GRIDTYPE_HH │ │ │ │ │ +3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH │ │ │ │ │ +4#define DUNE_GRID_UTILITY_MULTIINDEX_HH │ │ │ │ │ +5 │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +_1_5 namespace FactoryUtilities │ │ │ │ │ +16 { │ │ │ │ │ +17 template │ │ │ │ │ +_1_8 class _M_u_l_t_i_I_n_d_e_x : public std::array │ │ │ │ │ +19 { │ │ │ │ │ +20 // The range of each component │ │ │ │ │ +21 std::array limits_; │ │ │ │ │ +22 │ │ │ │ │ +23 public: │ │ │ │ │ +_2_5 _M_u_l_t_i_I_n_d_e_x(const std::array& limits) : limits_(limits) │ │ │ │ │ +26 { │ │ │ │ │ +27 std::fill(this->begin(), this->end(), 0); │ │ │ │ │ +28 } │ │ │ │ │ +29 │ │ │ │ │ +_3_1 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_>& _o_p_e_r_a_t_o_r_+_+() │ │ │ │ │ +32 { │ │ │ │ │ +33 for (std::size_t i=0; i &limits) │ │ │ │ │ +Constructor with a given range for each digit. │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ +MultiIndex< dim > & operator++() │ │ │ │ │ +Increment the MultiIndex. │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_c_y_c_l_e │ │ │ │ │ +size_t cycle() const │ │ │ │ │ +Compute how many times you can call operator++ before getting to (0,...,0) │ │ │ │ │ +again. │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:48 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitycommhelper.hh File Reference │ │ │ │ +dune-grid: hostgridaccess.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
entitycommhelper.hh File Reference
│ │ │ │ +
hostgridaccess.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/gridenums.hh>
│ │ │ │ +
#include <string>
│ │ │ │ +#include <dune/grid/geometrygrid/intersection.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >
struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
 
struct  Dune::EntityCommHelper< InteriorBorder_All_Interface >
struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim< codim >
 A Traits struct that collects return types of class member methods. More...
 
struct  Dune::EntityCommHelper< Overlap_OverlapFront_Interface >
struct  Dune::HostGridAccess< IdentityGrid< HG > >
 
struct  Dune::EntityCommHelper< Overlap_All_Interface >
 
struct  Dune::EntityCommHelper< All_All_Interface >
struct  Dune::HostGridAccess< IdentityGrid< HG > >::Codim< codim >
 A Traits struct that collects return types of class member methods. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,31 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -entitycommhelper.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +hostgridaccess.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ + _C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ +  A Traits struct that collects return types of class member methods. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ +  A Traits struct that collects return types of class member methods. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitycommhelper.hh Source File │ │ │ │ +dune-grid: hostgridaccess.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,169 +74,219 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entitycommhelper.hh
│ │ │ │ +
hostgridaccess.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ENTITYCOMMHELPER_HH
│ │ │ │ -
6#define DUNE_ENTITYCOMMHELPER_HH
│ │ │ │ +
5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │ +
6#define DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <string>
│ │ │ │
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ -
12
│ │ │ │ -
13 template< InterfaceType iftype >
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16
│ │ │ │ -
17 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 {
│ │ │ │ -
│ │ │ │ -
20 static bool send ( const PartitionType p )
│ │ │ │ -
21 {
│ │ │ │ -
22 //return (p == InteriorEntity) || (p == BorderEntity);
│ │ │ │ -
23 return (p == BorderEntity);
│ │ │ │ -
24 }
│ │ │ │ -
│ │ │ │ -
25
│ │ │ │ -
│ │ │ │ -
26 static bool receive ( const PartitionType p )
│ │ │ │ -
27 {
│ │ │ │ -
28 //return (p == InteriorEntity) || (p == BorderEntity);
│ │ │ │ -
29 return (p == BorderEntity);
│ │ │ │ -
30 }
│ │ │ │ -
│ │ │ │ -
31 };
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
15 // External Forward Declarations
│ │ │ │ +
16 // -----------------------------
│ │ │ │ +
17
│ │ │ │ +
18 template< class HostGrid, class CoordFunction, class Allocator >
│ │ │ │ +
19 class GeometryGrid;
│ │ │ │ +
20
│ │ │ │ +
21 template< class >
│ │ │ │ +
22 class IdentityGrid;
│ │ │ │ +
23
│ │ │ │ +
24
│ │ │ │ +
25 // HostGridAccess
│ │ │ │ +
26 // --------------
│ │ │ │ +
27
│ │ │ │ +
28 template< class Grid >
│ │ │ │ +
29 struct HostGridAccess;
│ │ │ │ +
30
│ │ │ │ +
31
│ │ │ │
32
│ │ │ │ -
33
│ │ │ │ -
34 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {
│ │ │ │ -
│ │ │ │ -
37 static bool send ( const PartitionType p )
│ │ │ │ -
38 {
│ │ │ │ -
39 return (p == InteriorEntity) || (p == BorderEntity);
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
42 static bool receive ( const PartitionType p )
│ │ │ │ -
43 {
│ │ │ │ -
44 //return true;
│ │ │ │ -
45 return (p != InteriorEntity);
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47 };
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49
│ │ │ │ -
50 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {
│ │ │ │ -
│ │ │ │ -
53 static bool send ( const PartitionType p )
│ │ │ │ -
54 {
│ │ │ │ -
55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
│ │ │ │ -
56 return (p != FrontEntity) && (p != GhostEntity);
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
59 static bool receive ( const PartitionType p )
│ │ │ │ -
60 {
│ │ │ │ -
61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
│ │ │ │ -
62 return (p != GhostEntity);
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64 };
│ │ │ │ +
40 template< class HG, class CoordFunction, class Allocator >
│ │ │ │ +
│ │ │ │ +
41 struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
│ │ │ │ +
42 {
│ │ │ │ + │ │ │ │ +
47
│ │ │ │ +
49 typedef typename Grid::HostGrid HostGrid;
│ │ │ │ +
50
│ │ │ │ +
57 template< int codim >
│ │ │ │ +
│ │ │ │ +
58 struct Codim
│ │ │ │ +
59 {
│ │ │ │ + │ │ │ │ +
62
│ │ │ │ +
64 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
│ │ │ │ +
65 };
│ │ │ │
│ │ │ │ -
65
│ │ │ │
66
│ │ │ │ -
67 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69 {
│ │ │ │ -
│ │ │ │ -
70 static bool send ( const PartitionType p )
│ │ │ │ -
71 {
│ │ │ │ -
72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
│ │ │ │ -
73 return (p != FrontEntity) && (p != GhostEntity);
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
│ │ │ │ -
76 static bool receive ([[maybe_unused]] const PartitionType p)
│ │ │ │ -
77 {
│ │ │ │ -
78 return true;
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80 };
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
82
│ │ │ │ -
83 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
85 {
│ │ │ │ -
│ │ │ │ -
86 static bool send ([[maybe_unused]] const PartitionType p)
│ │ │ │ -
87 {
│ │ │ │ -
88 return true;
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ -
91 static bool receive ([[maybe_unused]] const PartitionType p)
│ │ │ │ -
92 {
│ │ │ │ -
93 return true;
│ │ │ │ -
94 }
│ │ │ │ -
│ │ │ │ -
95 };
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97} // namespace Dune
│ │ │ │ -
98
│ │ │ │ -
99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH
│ │ │ │ - │ │ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ -
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │ -
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ -
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ -
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ -
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
│ │ │ │ -
@ All_All_Interface
send all and receive all entities
Definition gridenums.hh:91
│ │ │ │ -
@ Overlap_All_Interface
send overlap, receive all entities
Definition gridenums.hh:90
│ │ │ │ -
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition gridenums.hh:89
│ │ │ │ -
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition gridenums.hh:87
│ │ │ │ +
68 typedef typename Grid::Traits::LeafIntersection LeafIntersection;
│ │ │ │ +
70 typedef typename Grid::Traits::LevelIntersection LevelIntersection;
│ │ │ │ +
71
│ │ │ │ +
73 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
│ │ │ │ +
75 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
│ │ │ │ +
76
│ │ │ │ +
│ │ │ │ +
81 static const HostGrid &hostGrid ( const Grid &grid )
│ │ │ │ +
82 {
│ │ │ │ +
83 return grid.hostGrid();
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86 template< class Entity >
│ │ │ │ +
87 static const typename Codim< Entity::codimension >::HostEntity &
│ │ │ │ +
│ │ │ │ +
88 hostEntity ( const Entity &entity )
│ │ │ │ +
89 {
│ │ │ │ +
90 return hostEntity< Entity::codimension >( entity );
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93 template< int codim >
│ │ │ │ +
94 static const typename Codim< codim >::HostEntity &
│ │ │ │ +
│ │ │ │ +
95 hostEntity ( const typename Codim< codim >::Entity &entity )
│ │ │ │ +
96 {
│ │ │ │ +
97 return entity.impl().hostEntity();
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
100 template< class HostIntersection >
│ │ │ │ +
101 static const HostIntersection &
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
103 {
│ │ │ │ +
104 return intersection.impl().hostIntersection();
│ │ │ │ +
105 }
│ │ │ │ +
│ │ │ │ +
106 };
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
108
│ │ │ │ +
116 template< class HG >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
118 {
│ │ │ │ + │ │ │ │ +
123
│ │ │ │ +
125 typedef HG HostGrid;
│ │ │ │ +
126
│ │ │ │ +
133 template< int codim >
│ │ │ │ +
│ │ │ │ +
134 struct Codim
│ │ │ │ +
135 {
│ │ │ │ + │ │ │ │ +
138
│ │ │ │ +
140 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
│ │ │ │ +
141 };
│ │ │ │ +
│ │ │ │ +
142
│ │ │ │ + │ │ │ │ + │ │ │ │ +
147
│ │ │ │ +
149 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
│ │ │ │ +
151 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
│ │ │ │ +
152
│ │ │ │ +
│ │ │ │ +
157 static const HostGrid &hostGrid ( const Grid &grid )
│ │ │ │ +
158 {
│ │ │ │ +
159 return grid.getHostGrid();
│ │ │ │ +
160 }
│ │ │ │ +
│ │ │ │ +
161
│ │ │ │ +
162 template< class Entity >
│ │ │ │ +
163 static const typename Codim< Entity::codimension >::HostEntity &
│ │ │ │ +
│ │ │ │ +
164 hostEntity ( const Entity &entity )
│ │ │ │ +
165 {
│ │ │ │ +
166 return hostEntity< Entity::codimension >( entity );
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
169 template< int codim >
│ │ │ │ +
170 static const typename Codim< codim >::HostEntity &
│ │ │ │ +
│ │ │ │ +
171 hostEntity ( const typename Codim< codim >::Entity &entity )
│ │ │ │ +
172 {
│ │ │ │ +
173 return *entity.impl().hostEntity_;
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
176 static const HostLeafIntersection &
│ │ │ │ +
│ │ │ │ +
177 hostIntersection ( const LeafIntersection &intersection )
│ │ │ │ +
178 {
│ │ │ │ +
179 return *intersection.impl().hostIterator_;
│ │ │ │ +
180 }
│ │ │ │ +
│ │ │ │ +
181
│ │ │ │ +
182 static const HostLevelIntersection &
│ │ │ │ +
│ │ │ │ +
183 hostIntersection ( const LevelIntersection &intersection )
│ │ │ │ +
184 {
│ │ │ │ +
185 return *intersection.impl().hostIterator_;
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187 };
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
189} // namespace Dune
│ │ │ │ +
190
│ │ │ │ +
191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition entitycommhelper.hh:14
│ │ │ │ -
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:26
│ │ │ │ -
static bool send(const PartitionType p)
Definition entitycommhelper.hh:20
│ │ │ │ -
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:42
│ │ │ │ -
static bool send(const PartitionType p)
Definition entitycommhelper.hh:37
│ │ │ │ -
static bool send(const PartitionType p)
Definition entitycommhelper.hh:53
│ │ │ │ -
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:59
│ │ │ │ -
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:76
│ │ │ │ -
static bool send(const PartitionType p)
Definition entitycommhelper.hh:70
│ │ │ │ -
static bool send(const PartitionType p)
Definition entitycommhelper.hh:86
│ │ │ │ -
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:91
│ │ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
GridFamily::Traits::LeafIntersection LeafIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition common/grid.hh:456
│ │ │ │ +
GridFamily::Traits::LevelIntersection LevelIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition common/grid.hh:461
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
grid wrapper replacing the geometries
Definition geometrygrid/grid.hh:86
│ │ │ │ +
const HostGrid & hostGrid() const
obtain constant reference to the host grid
Definition geometrygrid/grid.hh:538
│ │ │ │ +
traits structure containing types for a codimension
Definition geometrygrid/grid.hh:611
│ │ │ │ +
Definition geometrygrid/intersection.hh:22
│ │ │ │ +
Provides a meta grid that is identical to its host.
Definition identitygrid.hh:88
│ │ │ │ +
HostGridType & getHostGrid() const
Returns the hostgrid this IdentityGrid lives in.
Definition identitygrid.hh:394
│ │ │ │ +
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ +
Grid::HostGrid HostGrid
type of HostGrid
Definition hostgridaccess.hh:49
│ │ │ │ +
HostGrid::Traits::LevelIntersection HostLevelIntersection
type of the host level intersection
Definition hostgridaccess.hh:75
│ │ │ │ +
static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
Definition hostgridaccess.hh:88
│ │ │ │ +
static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
Definition hostgridaccess.hh:95
│ │ │ │ +
static const HostIntersection & hostIntersection(const Intersection< const Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection)
Definition hostgridaccess.hh:102
│ │ │ │ +
GeometryGrid< HG, CoordFunction, Allocator > Grid
Definition hostgridaccess.hh:46
│ │ │ │ +
Grid::Traits::LeafIntersection LeafIntersection
type of the GeometryGrid leaf intersection
Definition hostgridaccess.hh:68
│ │ │ │ +
HostGrid::Traits::LeafIntersection HostLeafIntersection
type of the host leaf intersection
Definition hostgridaccess.hh:73
│ │ │ │ +
static const HostGrid & hostGrid(const Grid &grid)
Get underlying HostGrid.
Definition hostgridaccess.hh:81
│ │ │ │ +
Grid::Traits::LevelIntersection LevelIntersection
type of the GeometryGrid level intersection
Definition hostgridaccess.hh:70
│ │ │ │ +
HostGrid::template Codim< codim >::Entity HostEntity
type of the host entity
Definition hostgridaccess.hh:64
│ │ │ │ +
Grid::template Codim< codim >::Entity Entity
type of the GeometryGrid entity
Definition hostgridaccess.hh:61
│ │ │ │ +
Grid::Traits::LeafIntersection LeafIntersection
type of the IdGrid leaf intersection
Definition hostgridaccess.hh:144
│ │ │ │ +
HG HostGrid
type of HostGrid
Definition hostgridaccess.hh:125
│ │ │ │ +
IdentityGrid< HG > Grid
Definition hostgridaccess.hh:122
│ │ │ │ +
static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
Definition hostgridaccess.hh:171
│ │ │ │ +
HostGrid::Traits::LevelIntersection HostLevelIntersection
type of the host level intersection
Definition hostgridaccess.hh:151
│ │ │ │ +
Grid::Traits::LevelIntersection LevelIntersection
type of the IdGrid level intersection
Definition hostgridaccess.hh:146
│ │ │ │ +
static const HostLeafIntersection & hostIntersection(const LeafIntersection &intersection)
Definition hostgridaccess.hh:177
│ │ │ │ +
HostGrid::Traits::LeafIntersection HostLeafIntersection
type of the host leaf intersection
Definition hostgridaccess.hh:149
│ │ │ │ +
static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
Definition hostgridaccess.hh:164
│ │ │ │ +
static const HostLevelIntersection & hostIntersection(const LevelIntersection &intersection)
Definition hostgridaccess.hh:183
│ │ │ │ +
static const HostGrid & hostGrid(const Grid &grid)
Get underlying HostGrid.
Definition hostgridaccess.hh:157
│ │ │ │ +
Grid::template Codim< codim >::Entity Entity
type of the IdGrid entity
Definition hostgridaccess.hh:137
│ │ │ │ +
HostGrid::template Codim< codim >::Entity HostEntity
type of the host entity
Definition hostgridaccess.hh:140
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,190 +1,303 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -entitycommhelper.hh │ │ │ │ │ +hostgridaccess.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ENTITYCOMMHELPER_HH │ │ │ │ │ -6#define DUNE_ENTITYCOMMHELPER_HH │ │ │ │ │ +5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ +6#define DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10namespace _D_u_n_e │ │ │ │ │ -11{ │ │ │ │ │ -12 │ │ │ │ │ -13 template< InterfaceType iftype > │ │ │ │ │ -_1_4 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r; │ │ │ │ │ -15 │ │ │ │ │ -16 │ │ │ │ │ -17 template<> │ │ │ │ │ -_1_8 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e > │ │ │ │ │ -19 { │ │ │ │ │ -_2_0 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -21 { │ │ │ │ │ -22 //return (p == InteriorEntity) || (p == BorderEntity); │ │ │ │ │ -23 return (p == _B_o_r_d_e_r_E_n_t_i_t_y); │ │ │ │ │ -24 } │ │ │ │ │ -25 │ │ │ │ │ -_2_6 static bool _r_e_c_e_i_v_e ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -27 { │ │ │ │ │ -28 //return (p == InteriorEntity) || (p == BorderEntity); │ │ │ │ │ -29 return (p == _B_o_r_d_e_r_E_n_t_i_t_y); │ │ │ │ │ -30 } │ │ │ │ │ -31 }; │ │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +15 // External Forward Declarations │ │ │ │ │ +16 // ----------------------------- │ │ │ │ │ +17 │ │ │ │ │ +18 template< class HostGrid, class CoordFunction, class Allocator > │ │ │ │ │ +19 class GeometryGrid; │ │ │ │ │ +20 │ │ │ │ │ +21 template< class > │ │ │ │ │ +22 class IdentityGrid; │ │ │ │ │ +23 │ │ │ │ │ +24 │ │ │ │ │ +25 // HostGridAccess │ │ │ │ │ +26 // -------------- │ │ │ │ │ +27 │ │ │ │ │ +28 template< class Grid > │ │ │ │ │ +29 struct HostGridAccess; │ │ │ │ │ +30 │ │ │ │ │ +31 │ │ │ │ │ 32 │ │ │ │ │ -33 │ │ │ │ │ -34 template<> │ │ │ │ │ -_3_5 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e > │ │ │ │ │ -36 { │ │ │ │ │ -_3_7 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -38 { │ │ │ │ │ -39 return (p == _I_n_t_e_r_i_o_r_E_n_t_i_t_y) || (p == _B_o_r_d_e_r_E_n_t_i_t_y); │ │ │ │ │ -40 } │ │ │ │ │ -41 │ │ │ │ │ -_4_2 static bool _r_e_c_e_i_v_e ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -43 { │ │ │ │ │ -44 //return true; │ │ │ │ │ -45 return (p != _I_n_t_e_r_i_o_r_E_n_t_i_t_y); │ │ │ │ │ -46 } │ │ │ │ │ -47 }; │ │ │ │ │ -48 │ │ │ │ │ -49 │ │ │ │ │ -50 template<> │ │ │ │ │ -_5_1 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e > │ │ │ │ │ -52 { │ │ │ │ │ -_5_3 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -54 { │ │ │ │ │ -55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ -OverlapEntity); │ │ │ │ │ -56 return (p != _F_r_o_n_t_E_n_t_i_t_y) && (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_5_9 static bool _r_e_c_e_i_v_e ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -60 { │ │ │ │ │ -61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ -OverlapEntity) || (p == FrontEntity); │ │ │ │ │ -62 return (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ -63 } │ │ │ │ │ -64 }; │ │ │ │ │ -65 │ │ │ │ │ +40 template< class HG, class CoordFunction, class Allocator > │ │ │ │ │ +_4_1 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< _G_e_o_m_e_t_r_y_G_r_i_d< HG, CoordFunction, Allocator > > │ │ │ │ │ +42 { │ │ │ │ │ +_4_6 typedef _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _> _G_r_i_d; │ │ │ │ │ +47 │ │ │ │ │ +_4_9 typedef typename Grid::HostGrid _H_o_s_t_G_r_i_d; │ │ │ │ │ +50 │ │ │ │ │ +57 template< int codim > │ │ │ │ │ +_5_8 struct Codim │ │ │ │ │ +59 { │ │ │ │ │ +_6_1 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +62 │ │ │ │ │ +_6_4 typedef typename HostGrid::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _H_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +65 }; │ │ │ │ │ 66 │ │ │ │ │ -67 template<> │ │ │ │ │ -_6_8 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e > │ │ │ │ │ -69 { │ │ │ │ │ -_7_0 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ -71 { │ │ │ │ │ -72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ -OverlapEntity); │ │ │ │ │ -73 return (p != _F_r_o_n_t_E_n_t_i_t_y) && (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ -74 } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 static bool _r_e_c_e_i_v_e ([[maybe_unused]] const _P_a_r_t_i_t_i_o_n_T_y_p_e p) │ │ │ │ │ -77 { │ │ │ │ │ -78 return true; │ │ │ │ │ -79 } │ │ │ │ │ -80 }; │ │ │ │ │ -81 │ │ │ │ │ -82 │ │ │ │ │ -83 template<> │ │ │ │ │ -_8_4 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e > │ │ │ │ │ -85 { │ │ │ │ │ -_8_6 static bool _s_e_n_d ([[maybe_unused]] const _P_a_r_t_i_t_i_o_n_T_y_p_e p) │ │ │ │ │ -87 { │ │ │ │ │ -88 return true; │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -_9_1 static bool _r_e_c_e_i_v_e ([[maybe_unused]] const _P_a_r_t_i_t_i_o_n_T_y_p_e p) │ │ │ │ │ -92 { │ │ │ │ │ -93 return true; │ │ │ │ │ -94 } │ │ │ │ │ -95 }; │ │ │ │ │ -96 │ │ │ │ │ -97} // namespace Dune │ │ │ │ │ -98 │ │ │ │ │ -99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType │ │ │ │ │ -Attributes used in the generic overlap model. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y │ │ │ │ │ -@ FrontEntity │ │ │ │ │ -on boundary between overlap and ghost │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ -@ InteriorEntity │ │ │ │ │ -all interior entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -@ GhostEntity │ │ │ │ │ -ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ -@ BorderEntity │ │ │ │ │ -on boundary between interior and overlap │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ InteriorBorder_All_Interface │ │ │ │ │ -send interior and border, receive all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ All_All_Interface │ │ │ │ │ -send all and receive all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ Overlap_All_Interface │ │ │ │ │ -send overlap, receive all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ Overlap_OverlapFront_Interface │ │ │ │ │ -send overlap, receive overlap and front entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e │ │ │ │ │ -@ InteriorBorder_InteriorBorder_Interface │ │ │ │ │ -send/receive interior and border entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:87 │ │ │ │ │ +_6_8 typedef typename Grid::Traits::LeafIntersection _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +_7_0 typedef typename Grid::Traits::LevelIntersection _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +71 │ │ │ │ │ +_7_3 typedef typename HostGrid::Traits::LeafIntersection _H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +_7_5 typedef typename HostGrid::Traits::LevelIntersection _H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +76 │ │ │ │ │ +_8_1 static const _H_o_s_t_G_r_i_d &_h_o_s_t_G_r_i_d ( const _G_r_i_d &grid ) │ │ │ │ │ +82 { │ │ │ │ │ +83 return grid._h_o_s_t_G_r_i_d(); │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +86 template< class Entity > │ │ │ │ │ +87 static const typename Codim< Entity::codimension >::HostEntity & │ │ │ │ │ +_8_8 _h_o_s_t_E_n_t_i_t_y ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +89 { │ │ │ │ │ +90 return hostEntity< Entity::codimension >( entity ); │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +93 template< int codim > │ │ │ │ │ +94 static const typename Codim< codim >::HostEntity & │ │ │ │ │ +_9_5 _h_o_s_t_E_n_t_i_t_y ( const typename _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &entity ) │ │ │ │ │ +96 { │ │ │ │ │ +97 return entity.impl().hostEntity(); │ │ │ │ │ +98 } │ │ │ │ │ +99 │ │ │ │ │ +100 template< class HostIntersection > │ │ │ │ │ +101 static const HostIntersection & │ │ │ │ │ +_1_0_2 _h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n ( const _I_n_t_e_r_s_e_c_t_i_o_n< const _G_r_i_d, _G_e_o_G_r_i_d_:_:_I_n_t_e_r_s_e_c_t_i_o_n_< │ │ │ │ │ +_c_o_n_s_t_ _G_r_i_d_,_ _H_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n_ _> > &intersection ) │ │ │ │ │ +103 { │ │ │ │ │ +104 return intersection.impl().hostIntersection(); │ │ │ │ │ +105 } │ │ │ │ │ +106 }; │ │ │ │ │ +107 │ │ │ │ │ +108 │ │ │ │ │ +116 template< class HG > │ │ │ │ │ +_1_1_7 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s< _I_d_e_n_t_i_t_y_G_r_i_d< HG > > │ │ │ │ │ +118 { │ │ │ │ │ +_1_2_2 typedef _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _> _G_r_i_d; │ │ │ │ │ +123 │ │ │ │ │ +_1_2_5 typedef HG _H_o_s_t_G_r_i_d; │ │ │ │ │ +126 │ │ │ │ │ +133 template< int codim > │ │ │ │ │ +_1_3_4 struct Codim │ │ │ │ │ +135 { │ │ │ │ │ +_1_3_7 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +138 │ │ │ │ │ +_1_4_0 typedef typename HostGrid::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y _H_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +141 }; │ │ │ │ │ +142 │ │ │ │ │ +_1_4_4 typedef typename _G_r_i_d_:_:_T_r_a_i_t_s_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +_1_4_6 typedef typename _G_r_i_d_:_:_T_r_a_i_t_s_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +147 │ │ │ │ │ +_1_4_9 typedef typename HostGrid::Traits::LeafIntersection _H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +_1_5_1 typedef typename HostGrid::Traits::LevelIntersection _H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +152 │ │ │ │ │ +_1_5_7 static const _H_o_s_t_G_r_i_d &_h_o_s_t_G_r_i_d ( const _G_r_i_d &grid ) │ │ │ │ │ +158 { │ │ │ │ │ +159 return grid._g_e_t_H_o_s_t_G_r_i_d(); │ │ │ │ │ +160 } │ │ │ │ │ +161 │ │ │ │ │ +162 template< class Entity > │ │ │ │ │ +163 static const typename Codim< Entity::codimension >::HostEntity & │ │ │ │ │ +_1_6_4 _h_o_s_t_E_n_t_i_t_y ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +165 { │ │ │ │ │ +166 return hostEntity< Entity::codimension >( entity ); │ │ │ │ │ +167 } │ │ │ │ │ +168 │ │ │ │ │ +169 template< int codim > │ │ │ │ │ +170 static const typename Codim< codim >::HostEntity & │ │ │ │ │ +_1_7_1 _h_o_s_t_E_n_t_i_t_y ( const typename _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &entity ) │ │ │ │ │ +172 { │ │ │ │ │ +173 return *entity.impl().hostEntity_; │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +176 static const HostLeafIntersection & │ │ │ │ │ +_1_7_7 _h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n ( const _L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n &intersection ) │ │ │ │ │ +178 { │ │ │ │ │ +179 return *intersection.impl().hostIterator_; │ │ │ │ │ +180 } │ │ │ │ │ +181 │ │ │ │ │ +182 static const HostLevelIntersection & │ │ │ │ │ +_1_8_3 _h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n ( const _L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n &intersection ) │ │ │ │ │ +184 { │ │ │ │ │ +185 return *intersection.impl().hostIterator_; │ │ │ │ │ +186 } │ │ │ │ │ +187 }; │ │ │ │ │ +188 │ │ │ │ │ +189} // namespace Dune │ │ │ │ │ +190 │ │ │ │ │ +191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:14 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ -static bool receive(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ -static bool send(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ -static bool receive(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ -static bool send(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ -static bool send(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ -static bool receive(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ -static bool receive(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ -static bool send(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ -static bool send(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ -static bool receive(const PartitionType p) │ │ │ │ │ -DDeeffiinniittiioonn entitycommhelper.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ +element or with the d... │ │ │ │ │ +DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +GridFamily::Traits::LeafIntersection LeafIntersection │ │ │ │ │ +A type that is a model of Dune::Intersection, an intersections of two │ │ │ │ │ +codimension 1 of two codimensio... │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:456 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +GridFamily::Traits::LevelIntersection LevelIntersection │ │ │ │ │ +A type that is a model of Dune::Intersection, an intersections of two │ │ │ │ │ +codimension 1 of two codimensio... │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:461 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ +grid wrapper replacing the geometries │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/grid.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d_:_:_h_o_s_t_G_r_i_d │ │ │ │ │ +const HostGrid & hostGrid() const │ │ │ │ │ +obtain constant reference to the host grid │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/grid.hh:538 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ +traits structure containing types for a codimension │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/grid.hh:611 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn geometrygrid/intersection.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d │ │ │ │ │ +Provides a meta grid that is identical to its host. │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_:_:_g_e_t_H_o_s_t_G_r_i_d │ │ │ │ │ +HostGridType & getHostGrid() const │ │ │ │ │ +Returns the hostgrid this IdentityGrid lives in. │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:394 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ +provides access to host grid objects from GeometryGrid │ │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_H_o_s_t_G_r_i_d │ │ │ │ │ +Grid::HostGrid HostGrid │ │ │ │ │ +type of HostGrid │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +HostGrid::Traits::LevelIntersection HostLevelIntersection │ │ │ │ │ +type of the host level intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity │ │ │ │ │ +&entity) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +static const Codim< codim >::HostEntity & hostEntity(const typename Codim< │ │ │ │ │ +codim >::Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +static const HostIntersection & hostIntersection(const Intersection< const │ │ │ │ │ +Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ +GeometryGrid< HG, CoordFunction, Allocator > Grid │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Grid::Traits::LeafIntersection LeafIntersection │ │ │ │ │ +type of the GeometryGrid leaf intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +HostGrid::Traits::LeafIntersection HostLeafIntersection │ │ │ │ │ +type of the host leaf intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_h_o_s_t_G_r_i_d │ │ │ │ │ +static const HostGrid & hostGrid(const Grid &grid) │ │ │ │ │ +Get underlying HostGrid. │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_: │ │ │ │ │ +_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Grid::Traits::LevelIntersection LevelIntersection │ │ │ │ │ +type of the GeometryGrid level intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_C_o_d_i_m_:_: │ │ │ │ │ +_H_o_s_t_E_n_t_i_t_y │ │ │ │ │ +HostGrid::template Codim< codim >::Entity HostEntity │ │ │ │ │ +type of the host entity │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_e_o_m_e_t_r_y_G_r_i_d_<_ _H_G_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_,_ _A_l_l_o_c_a_t_o_r_ _>_ _>_:_:_C_o_d_i_m_:_: │ │ │ │ │ +_E_n_t_i_t_y │ │ │ │ │ +Grid::template Codim< codim >::Entity Entity │ │ │ │ │ +type of the GeometryGrid entity │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Grid::Traits::LeafIntersection LeafIntersection │ │ │ │ │ +type of the IdGrid leaf intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_H_o_s_t_G_r_i_d │ │ │ │ │ +HG HostGrid │ │ │ │ │ +type of HostGrid │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ +IdentityGrid< HG > Grid │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +static const Codim< codim >::HostEntity & hostEntity(const typename Codim< │ │ │ │ │ +codim >::Entity &entity) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_H_o_s_t_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +HostGrid::Traits::LevelIntersection HostLevelIntersection │ │ │ │ │ +type of the host level intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Grid::Traits::LevelIntersection LevelIntersection │ │ │ │ │ +type of the IdGrid level intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +static const HostLeafIntersection & hostIntersection(const LeafIntersection │ │ │ │ │ +&intersection) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_H_o_s_t_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +HostGrid::Traits::LeafIntersection HostLeafIntersection │ │ │ │ │ +type of the host leaf intersection │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity │ │ │ │ │ +&entity) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +static const HostLevelIntersection & hostIntersection(const LevelIntersection │ │ │ │ │ +&intersection) │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:183 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_h_o_s_t_G_r_i_d │ │ │ │ │ +static const HostGrid & hostGrid(const Grid &grid) │ │ │ │ │ +Get underlying HostGrid. │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ +Grid::template Codim< codim >::Entity Entity │ │ │ │ │ +type of the IdGrid entity │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_G_ _>_ _>_:_:_C_o_d_i_m_:_:_H_o_s_t_E_n_t_i_t_y │ │ │ │ │ +HostGrid::template Codim< codim >::Entity HostEntity │ │ │ │ │ +type of the host entity │ │ │ │ │ +DDeeffiinniittiioonn hostgridaccess.hh:140 │ │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerinterface.hh File Reference │ │ │ │ +dune-grid: tensorgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,50 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
persistentcontainerinterface.hh File Reference
│ │ │ │ +
tensorgridfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ +

This file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series. │ │ │ │ +More...

│ │ │ │ +
#include <array>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/grid/common/gridfactory.hh>
│ │ │ │ +#include <dune/grid/yaspgrid.hh>
│ │ │ │ +#include <dune/grid/utility/multiindex.hh>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::PersistentContainerInterface< G, T >
 Persistent storage of data on all entities of a grid. More...
class  Dune::TensorGridFactory< Grid >
 A factory class for conveniently creating tensorproduct grids. More...
 
class  Dune::TensorGridFactoryCreator< Grid >
 
class  Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

This file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series.

│ │ │ │ +

The grid generation process is implemented for unstructured grids and for YaspGrid.

│ │ │ │ +
Author
Dominic Kempf
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,19 +2,46 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -persistentcontainerinterface.hh File Reference │ │ │ │ │ +tensorgridfactory.hh File Reference │ │ │ │ │ +This file provides a factory class for tensorproduct grids. This is a │ │ │ │ │ +collection of methods to generate monotonous sequences as needed for a │ │ │ │ │ +tensorproduct grid. Apart from easy ones for locally equidistant grids, there │ │ │ │ │ +are also more involved methods like splitting a range according to a geometric │ │ │ │ │ +series. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_m_u_l_t_i_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_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_<_ _G_,_ _T_ _> │ │ │ │ │ -  Persistent storage of data on all entities of a grid. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_ _> │ │ │ │ │ +  A factory class for conveniently creating tensorproduct grids. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_, │ │ │ │ │ + _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_ _>_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +This file provides a factory class for tensorproduct grids. This is a │ │ │ │ │ +collection of methods to generate monotonous sequences as needed for a │ │ │ │ │ +tensorproduct grid. Apart from easy ones for locally equidistant grids, there │ │ │ │ │ +are also more involved methods like splitting a range according to a geometric │ │ │ │ │ +series. │ │ │ │ │ +The grid generation process is implemented for unstructured grids and for │ │ │ │ │ +YaspGrid. │ │ │ │ │ + Author │ │ │ │ │ + Dominic Kempf │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerinterface.hh Source File │ │ │ │ +dune-grid: tensorgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,124 +74,403 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainerinterface.hh
│ │ │ │ +
tensorgridfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │ -
6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │ -
7
│ │ │ │ -
8#ifndef HEADERCHECK
│ │ │ │ -
9#error "This header exists for documentation purposes only and should never be included directly."
│ │ │ │ -
10#endif
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
53 template< class G, class T >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 {
│ │ │ │ - │ │ │ │ -
57
│ │ │ │ -
58 struct ImplementationDefined;
│ │ │ │ -
59
│ │ │ │ -
60 public:
│ │ │ │ -
61 typedef G Grid;
│ │ │ │ -
62
│ │ │ │ -
63 typedef T Value;
│ │ │ │ +
3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
│ │ │ │ +
4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
│ │ │ │ +
5
│ │ │ │ +
20#include<array>
│ │ │ │ +
21#include<memory>
│ │ │ │ +
22#include<vector>
│ │ │ │ +
23
│ │ │ │ +
24#include <dune/common/fvector.hh>
│ │ │ │ + │ │ │ │ +
26#include <dune/grid/yaspgrid.hh>
│ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29namespace Dune
│ │ │ │ +
30{
│ │ │ │ +
31 // forward declaration of TensorGridFactoryCreator, which is the real factory
│ │ │ │ +
32 // that should be specialized for each grid.
│ │ │ │ +
33 template<typename Grid>
│ │ │ │ +
34 class TensorGridFactoryCreator;
│ │ │ │ +
35
│ │ │ │ +
40 template<typename Grid>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
42 {
│ │ │ │ +
43 public:
│ │ │ │ +
44 typedef typename Grid::Traits::Communication Comm;
│ │ │ │ +
45 typedef typename Grid::ctype ctype;
│ │ │ │ +
46 static const int dim = Grid::dimension;
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 std::unique_ptr<Grid> createGrid(Comm comm = Comm())
│ │ │ │ +
49 {
│ │ │ │ +
50 TensorGridFactoryCreator<Grid> creator(*this);
│ │ │ │ +
51 return creator.createGrid(comm);
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
54 std::array<std::vector<ctype> , dim> coords() const
│ │ │ │ +
55 {
│ │ │ │ +
56 return _coords;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 std::vector<ctype>& operator[](std::size_t d)
│ │ │ │ +
61 {
│ │ │ │ +
62 return _coords[d];
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │
64
│ │ │ │ -
65 typedef ImplementationDefined Size;
│ │ │ │ -
66 typedef ImplementationDefined ConstIterator;
│ │ │ │ -
67 typedef ImplementationDefined Iterator;
│ │ │ │ -
68
│ │ │ │ -
69 // construction
│ │ │ │ +
│ │ │ │ +
66 const std::vector<ctype>& operator[](std::size_t d) const
│ │ │ │ +
67 {
│ │ │ │ +
68 return _coords[d];
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │
70
│ │ │ │ -
79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value = Value() );
│ │ │ │ -
80
│ │ │ │ - │ │ │ │ -
83
│ │ │ │ -
85 const This &operator= ( const This &other );
│ │ │ │ -
86
│ │ │ │ -
87 // element access
│ │ │ │ -
88
│ │ │ │ -
93 template< class Entity >
│ │ │ │ -
94 const Value &operator[] ( const Entity &entity ) const;
│ │ │ │ -
95
│ │ │ │ -
100 template< class Entity >
│ │ │ │ -
101 Value &operator[] ( const Entity &entity );
│ │ │ │ -
102
│ │ │ │ -
108 template< class Entity >
│ │ │ │ -
109 const Value &operator() ( const Entity &entity, int subEntity ) const;
│ │ │ │ -
110
│ │ │ │ -
116 template< class Entity >
│ │ │ │ -
117 Value &operator() ( const Entity &entity, int subEntity );
│ │ │ │ -
118
│ │ │ │ -
119 // capacity
│ │ │ │ -
120
│ │ │ │ -
126 Size size () const;
│ │ │ │ -
127
│ │ │ │ -
141 void resize ( const Value &value = Value() );
│ │ │ │ -
142
│ │ │ │ -
156 void shrinkToFit ();
│ │ │ │ +
│ │ │ │ +
79 void setStart (int d, ctype value)
│ │ │ │ +
80 {
│ │ │ │ +
81 _coords[d].resize(1);
│ │ │ │ +
82 _coords[d][0] = value;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
93 void fillIntervals (int d, int n, ctype h)
│ │ │ │ +
94 {
│ │ │ │ +
95 emptyCheck (d);
│ │ │ │ +
96 for (int i = 0; i < n; i++)
│ │ │ │ +
97 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
│ │ │ │ +
108 void fillRange (int d, int n, ctype end)
│ │ │ │ +
109 {
│ │ │ │ +
110 emptyCheck (d);
│ │ │ │ +
111 const ctype h = (end - _coords[d].back ()) / n;
│ │ │ │ +
112 for (int i = 0; i < n - 1; i++)
│ │ │ │ +
113 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ +
114 _coords[d].push_back (end);
│ │ │ │ +
115 }
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
│ │ │ │ +
125 void fillUntil (int d, ctype h, ctype end)
│ │ │ │ +
126 {
│ │ │ │ +
127 emptyCheck (d);
│ │ │ │ +
128 while (_coords[d].back () < end)
│ │ │ │ +
129 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ +
130 }
│ │ │ │ +
│ │ │ │ +
131
│ │ │ │ +
│ │ │ │ +
144 void geometricFillIntervals (int d, int n, ctype ratio, ctype h0 =
│ │ │ │ +
145 static_cast<ctype> (0))
│ │ │ │ +
146 {
│ │ │ │ +
147 emptyCheck (d);
│ │ │ │ +
148 ctype h = h0;
│ │ │ │ +
149 if (h0 == static_cast<ctype>(0))
│ │ │ │ +
150 h = lastInterval (d) * ratio;
│ │ │ │ +
151 for (int i = 0; i < n; i++)
│ │ │ │ +
152 {
│ │ │ │ +
153 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ +
154 h *= ratio;
│ │ │ │ +
155 }
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │
157
│ │ │ │ -
158 // modifiers
│ │ │ │ -
159
│ │ │ │ -
165 void fill ( const Value &value );
│ │ │ │ -
166
│ │ │ │ -
171 void swap ( This &other );
│ │ │ │ -
172
│ │ │ │ -
173 // iterators
│ │ │ │ -
174
│ │ │ │ - │ │ │ │ - │ │ │ │ -
187
│ │ │ │ - │ │ │ │ - │ │ │ │ -
200
│ │ │ │ -
201 // information
│ │ │ │ -
202
│ │ │ │ -
204 int codimension () const;
│ │ │ │ -
205 };
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
207} // namespace Dune
│ │ │ │ -
208
│ │ │ │ -
209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │ +
│ │ │ │ +
170 void geometricFillUntil (int d, ctype ratio, ctype end, ctype h0 = static_cast<ctype> (0))
│ │ │ │ +
171 {
│ │ │ │ +
172 emptyCheck (d);
│ │ │ │ +
173 ctype h = h0;
│ │ │ │ +
174 if (h0 == static_cast<ctype>(0))
│ │ │ │ +
175 h = lastInterval (d) * ratio;
│ │ │ │ +
176 while (_coords[d].back () < end)
│ │ │ │ +
177 {
│ │ │ │ +
178 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ +
179 h *= ratio;
│ │ │ │ +
180 }
│ │ │ │ +
181 }
│ │ │ │ +
│ │ │ │ +
182
│ │ │ │ +
│ │ │ │ +
197 void geometricFillRange (int d, int n, ctype end, ctype h =
│ │ │ │ +
198 static_cast<ctype> (0),
│ │ │ │ +
199 bool first = true)
│ │ │ │ +
200 {
│ │ │ │ +
201 emptyCheck (d);
│ │ │ │ +
202 if (h < 1e-8)
│ │ │ │ +
203 h = lastInterval (d);
│ │ │ │ +
204 ctype ratio = newton (n, _coords[d].back (), end, h);
│ │ │ │ +
205 if (!first)
│ │ │ │ +
206 {
│ │ │ │ +
207 h = h * pow (ratio, n - 1);
│ │ │ │ +
208 ratio = 1 / ratio;
│ │ │ │ +
209 }
│ │ │ │ +
210 for (int i = 0; i < n - 1; i++)
│ │ │ │ +
211 {
│ │ │ │ +
212 _coords[d].push_back (_coords[d].back () + h);
│ │ │ │ +
213 h *= ratio;
│ │ │ │ +
214 }
│ │ │ │ +
215 _coords[d].push_back (end);
│ │ │ │ +
216 }
│ │ │ │ +
│ │ │ │ +
217
│ │ │ │ +
│ │ │ │ +
219 void print()
│ │ │ │ +
220 {
│ │ │ │ +
221 for (int i=0; i<dim; i++)
│ │ │ │ +
222 {
│ │ │ │ +
223 std::cout << "Container in direction " << i << ":" << std::endl << "Coordinates: ";
│ │ │ │ +
224 for (auto it = _coords[i].begin(); it != _coords[i].end(); ++it)
│ │ │ │ +
225 std::cout << *it << " ";
│ │ │ │ +
226 std::cout << std::endl << "Interval lengths: ";
│ │ │ │ +
227
│ │ │ │ +
228 std::vector<ctype> meshsize;
│ │ │ │ +
229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;)
│ │ │ │ +
230 {
│ │ │ │ +
231 meshsize.push_back(-1.*(*it));
│ │ │ │ +
232 ++it;
│ │ │ │ +
233 meshsize.back() += *it;
│ │ │ │ +
234 }
│ │ │ │ +
235
│ │ │ │ +
236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it)
│ │ │ │ +
237 std::cout << *it << " ";
│ │ │ │ +
238 std::cout << std::endl << "Ratios between interval lengths: ";
│ │ │ │ +
239
│ │ │ │ +
240 std::vector<ctype> ratios;
│ │ │ │ +
241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;)
│ │ │ │ +
242 ratios.push_back((1./(*it)) * *(++it));
│ │ │ │ +
243
│ │ │ │ +
244 for (auto it = ratios.begin(); it != ratios.end(); ++it)
│ │ │ │ +
245 std::cout << *it << " ";
│ │ │ │ +
246 std::cout << std::endl << std::endl << std::endl;
│ │ │ │ +
247 }
│ │ │ │ +
248 }
│ │ │ │ +
│ │ │ │ +
249
│ │ │ │ +
250 private:
│ │ │ │ +
251 // check whether the ith component is empty and add a 0.0 entry if so
│ │ │ │ +
252 void emptyCheck (int i)
│ │ │ │ +
253 {
│ │ │ │ +
254 if (_coords[i].empty ())
│ │ │ │ +
255 _coords[i].push_back (static_cast<ctype> (0));
│ │ │ │ +
256 }
│ │ │ │ +
257
│ │ │ │ +
258 // returns the last interval length in direction d
│ │ │ │ +
259 ctype lastInterval (int d)
│ │ │ │ +
260 {
│ │ │ │ +
261 if (_coords[d].size () < 2)
│ │ │ │ +
262 DUNE_THROW(
│ │ │ │ +
263 GridError,
│ │ │ │ +
264 "Not enough elements in coordinate container to deduce interval length in TensorYaspFactory");
│ │ │ │ +
265 else
│ │ │ │ +
266 return _coords[d].back () - _coords[d][_coords[d].size () - 2];
│ │ │ │ +
267 }
│ │ │ │ +
268
│ │ │ │ +
272 ctype newton (int n, ctype x_s, ctype x_e, ctype h)
│ │ │ │ +
273 {
│ │ │ │ +
274 ctype m = (x_e - x_s) / h;
│ │ │ │ +
275 ctype xold = 0.0;
│ │ │ │ +
276 ctype xnew = x_e - x_s;
│ │ │ │ +
277 while (std::abs (xnew - xold) > 1E-8)
│ │ │ │ +
278 {
│ │ │ │ +
279 xold = xnew;
│ │ │ │ +
280 xnew = xold
│ │ │ │ +
281 - (-pow (xold, n) + m * xold - m + 1)
│ │ │ │ +
282 / (-n * pow (xold, n - 1) + m);
│ │ │ │ +
283 }
│ │ │ │ +
284 if (std::abs (xnew - 1) < 1E-6)
│ │ │ │ +
285 {
│ │ │ │ +
286 xold = x_e - x_s;
│ │ │ │ +
287 xnew = 0.0;
│ │ │ │ +
288 while (std::abs (xnew - xold) > 1E-8)
│ │ │ │ +
289 {
│ │ │ │ +
290 xold = xnew;
│ │ │ │ +
291 xnew = xold
│ │ │ │ +
292 - (-pow (xold, n) + m * xold - m + 1)
│ │ │ │ +
293 / (-n * pow (xold, n - 1) + m);
│ │ │ │ +
294 }
│ │ │ │ +
295 }
│ │ │ │ +
296 return xnew;
│ │ │ │ +
297 }
│ │ │ │ +
298
│ │ │ │ +
299 std::array<std::vector<ctype>, dim> _coords;
│ │ │ │ +
300 };
│ │ │ │ +
│ │ │ │ +
301
│ │ │ │ +
302 // class that implements the actual grid creation process. The default is implementing
│ │ │ │ +
303 // standard creation for unstructured grids. Provide a specialization for other grids.
│ │ │ │ +
304 template<typename Grid>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
306 {
│ │ │ │ +
307 public:
│ │ │ │ +
308 typedef typename Grid::Traits::Communication Comm;
│ │ │ │ +
309 typedef typename Grid::ctype ctype;
│ │ │ │ +
310 static const int dim = Grid::dimension;
│ │ │ │ +
311
│ │ │ │ +
312 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
│ │ │ │ +
313
│ │ │ │ +
│ │ │ │ +
314 std::unique_ptr<Grid> createGrid(Comm comm)
│ │ │ │ +
315 {
│ │ │ │ +
316 // The grid factory
│ │ │ │ + │ │ │ │ +
318
│ │ │ │ +
319 if (comm.rank() == 0)
│ │ │ │ +
320 {
│ │ │ │ +
321 // determine the size of the grid
│ │ │ │ +
322 std::array<unsigned int, dim> vsizes, esizes;
│ │ │ │ +
323 std::size_t size = 1;
│ │ │ │ +
324 for (std::size_t i = 0; i<dim; ++i)
│ │ │ │ +
325 {
│ │ │ │ +
326 vsizes[i] = _factory[i].size();
│ │ │ │ +
327 esizes[i] = vsizes[i] - 1;
│ │ │ │ +
328 size *= vsizes[i];
│ │ │ │ +
329 }
│ │ │ │ +
330
│ │ │ │ +
331 // insert all vertices
│ │ │ │ + │ │ │ │ +
333 for (std::size_t i=0; i<size; ++i, ++index)
│ │ │ │ +
334 {
│ │ │ │ +
335 Dune::FieldVector<ctype, dim> position;
│ │ │ │ +
336 for (std::size_t j = 0; j<dim; ++j)
│ │ │ │ +
337 position[j] = _factory[j][index[j]];
│ │ │ │ +
338 fac.insertVertex(position);
│ │ │ │ +
339 }
│ │ │ │ +
340
│ │ │ │ +
341 // compute the offsets
│ │ │ │ +
342 std::array<std::size_t, dim> offsets;
│ │ │ │ +
343 offsets[0] = 1;
│ │ │ │ +
344 for (std::size_t i=1; i<dim; i++)
│ │ │ │ +
345 offsets[i] = offsets[i-1] * vsizes[i-1];
│ │ │ │ +
346
│ │ │ │ +
347 // Compute an element template (the cube at (0,...,0). All
│ │ │ │ +
348 // other cubes are constructed by moving this template around
│ │ │ │ +
349 unsigned int nCorners = 1<<dim;
│ │ │ │ +
350
│ │ │ │ +
351 std::vector<unsigned int> cornersTemplate(nCorners,0);
│ │ │ │ +
352
│ │ │ │ +
353 for (size_t i=0; i<nCorners; i++)
│ │ │ │ +
354 for (int j=0; j<dim; j++)
│ │ │ │ +
355 if ( i & (1<<j) )
│ │ │ │ +
356 cornersTemplate[i] += offsets[j];
│ │ │ │ +
357
│ │ │ │ +
358 // Insert elements
│ │ │ │ + │ │ │ │ +
360
│ │ │ │ +
361 // Compute the total number of elements to be created
│ │ │ │ +
362 int numElements = eindex.cycle();
│ │ │ │ +
363
│ │ │ │ +
364 for (int i=0; i<numElements; i++, ++eindex)
│ │ │ │ +
365 {
│ │ │ │ +
366 // 'base' is the index of the lower left element corner
│ │ │ │ +
367 unsigned int base = 0;
│ │ │ │ +
368 for (int j=0; j<dim; j++)
│ │ │ │ +
369 base += eindex[j] * offsets[j];
│ │ │ │ +
370
│ │ │ │ +
371 // insert new element
│ │ │ │ +
372 std::vector<unsigned int> corners = cornersTemplate;
│ │ │ │ +
373 for (size_t j=0; j<corners.size(); j++)
│ │ │ │ +
374 corners[j] += base;
│ │ │ │ +
375
│ │ │ │ +
376 fac.insertElement(GeometryTypes::cube(dim), corners);
│ │ │ │ +
377 }
│ │ │ │ +
378 }
│ │ │ │ +
379
│ │ │ │ +
380 return std::unique_ptr<Grid>(fac.createGrid());
│ │ │ │ +
381 }
│ │ │ │ +
│ │ │ │ +
382
│ │ │ │ +
383 private:
│ │ │ │ +
384 const TensorGridFactory<Grid>& _factory;
│ │ │ │ +
385 };
│ │ │ │ +
│ │ │ │ +
386
│ │ │ │ +
387 template<typename ctype, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
389 {
│ │ │ │ +
390 public:
│ │ │ │ + │ │ │ │ +
392 typedef typename Grid::Communication Comm;
│ │ │ │ +
393
│ │ │ │ +
394 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
│ │ │ │ +
395
│ │ │ │ +
│ │ │ │ +
396 std::unique_ptr<Grid> createGrid(Comm comm)
│ │ │ │ +
397 {
│ │ │ │ +
398 return std::make_unique<Grid>(_factory.coords(), std::bitset<dim>(0ULL), 1, comm);
│ │ │ │ +
399 }
│ │ │ │ +
│ │ │ │ +
400 private:
│ │ │ │ +
401 const TensorGridFactory<Grid>& _factory;
│ │ │ │ +
402 };
│ │ │ │ +
│ │ │ │ +
403}
│ │ │ │ +
404
│ │ │ │ +
405#endif
│ │ │ │ +
Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Persistent storage of data on all entities of a grid.
Definition persistentcontainerinterface.hh:55
│ │ │ │ -
ImplementationDefined Size
Definition persistentcontainerinterface.hh:65
│ │ │ │ -
PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value())
constuctor
│ │ │ │ -
const Value & operator[](const Entity &entity) const
access the data associated with an entity
│ │ │ │ -
T Value
Definition persistentcontainerinterface.hh:63
│ │ │ │ -
Size size() const
number of entries in the container
│ │ │ │ -
ImplementationDefined Iterator
Definition persistentcontainerinterface.hh:67
│ │ │ │ -
PersistentContainerInterface(const This &other)
copy constructor
│ │ │ │ -
ImplementationDefined ConstIterator
Definition persistentcontainerinterface.hh:66
│ │ │ │ -
ConstIterator end() const
returns an iterator pointing to the last element of the container
│ │ │ │ -
ConstIterator begin() const
returns an iterator pointing to the first element of the container
│ │ │ │ -
Iterator begin()
returns an iterator pointing to the first element of the container
│ │ │ │ -
Iterator end()
returns an iterator pointing to the last element of the container
│ │ │ │ -
void shrinkToFit()
remove unnecessary entries from container
│ │ │ │ -
int codimension() const
return the codimension, the container attaches data to
│ │ │ │ -
G Grid
Definition persistentcontainerinterface.hh:61
│ │ │ │ -
void swap(This &other)
exchange the content of the container with another one
│ │ │ │ -
void resize(const Value &value=Value())
reserve memory for all entities in the grid
│ │ │ │ -
void fill(const Value &value)
set all accessible entries to a given value
│ │ │ │ -
const Value & operator()(const Entity &entity, int subEntity) const
access the data associated with a subentity
│ │ │ │ -
const This & operator=(const This &other)
assignment operator
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh:532
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:314
│ │ │ │ +
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:346
│ │ │ │ +
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:335
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:372
│ │ │ │ +
Definition multiindex.hh:19
│ │ │ │ +
size_t cycle() const
Compute how many times you can call operator++ before getting to (0,...,0) again.
Definition multiindex.hh:48
│ │ │ │ +
Definition tensorgridfactory.hh:306
│ │ │ │ +
Grid::ctype ctype
Definition tensorgridfactory.hh:309
│ │ │ │ +
Grid::Traits::Communication Comm
Definition tensorgridfactory.hh:308
│ │ │ │ +
TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
Definition tensorgridfactory.hh:312
│ │ │ │ +
std::unique_ptr< Grid > createGrid(Comm comm)
Definition tensorgridfactory.hh:314
│ │ │ │ +
static const int dim
Definition tensorgridfactory.hh:310
│ │ │ │ +
A factory class for conveniently creating tensorproduct grids.
Definition tensorgridfactory.hh:42
│ │ │ │ +
void fillRange(int d, int n, ctype end)
fills the range to end with n intervals in direction d
Definition tensorgridfactory.hh:108
│ │ │ │ +
void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype >(0), bool first=true)
fills a coordinate range in direction d with n intervals according to a geometric series
Definition tensorgridfactory.hh:197
│ │ │ │ +
Grid::ctype ctype
Definition tensorgridfactory.hh:45
│ │ │ │ +
void fillUntil(int d, ctype h, ctype end)
adds intervals in direction d until a given coordinate is reached
Definition tensorgridfactory.hh:125
│ │ │ │ +
void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast< ctype >(0))
adds intervals in direction d according with a given length ratio until a given coordinate is reached
Definition tensorgridfactory.hh:170
│ │ │ │ +
static const int dim
Definition tensorgridfactory.hh:46
│ │ │ │ +
void print()
print the coordinate information given to the factory so far
Definition tensorgridfactory.hh:219
│ │ │ │ +
void fillIntervals(int d, int n, ctype h)
pushs n intervals of length h in direction d
Definition tensorgridfactory.hh:93
│ │ │ │ +
void setStart(int d, ctype value)
set a starting value in a given direction d
Definition tensorgridfactory.hh:79
│ │ │ │ +
void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast< ctype >(0))
adds n intervals in direction d with a given length ratio and a given starting interval length.
Definition tensorgridfactory.hh:144
│ │ │ │ +
std::vector< ctype > & operator[](std::size_t d)
allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
Definition tensorgridfactory.hh:60
│ │ │ │ +
const std::vector< ctype > & operator[](std::size_t d) const
allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
Definition tensorgridfactory.hh:66
│ │ │ │ +
std::unique_ptr< Grid > createGrid(Comm comm=Comm())
Definition tensorgridfactory.hh:48
│ │ │ │ +
Grid::Traits::Communication Comm
Definition tensorgridfactory.hh:44
│ │ │ │ +
std::array< std::vector< ctype >, dim > coords() const
Definition tensorgridfactory.hh:54
│ │ │ │ +
std::unique_ptr< Grid > createGrid(Comm comm)
Definition tensorgridfactory.hh:396
│ │ │ │ +
TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
Definition tensorgridfactory.hh:394
│ │ │ │ + │ │ │ │ +
YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid
Definition tensorgridfactory.hh:391
│ │ │ │ +
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ +
typename Base::Communication Communication
Definition yaspgrid.hh:178
│ │ │ │ +
Coordinate container for a tensor product YaspGrid.
Definition coordinates.hh:245
│ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,165 +1,481 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainerinterface.hh │ │ │ │ │ +tensorgridfactory.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ -6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ -7 │ │ │ │ │ -8#ifndef HEADERCHECK │ │ │ │ │ -9#error "This header exists for documentation purposes only and should never be │ │ │ │ │ -included directly." │ │ │ │ │ -10#endif │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -53 template< class G, class T > │ │ │ │ │ -_5_4 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ +3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH │ │ │ │ │ +4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH │ │ │ │ │ +5 │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ +22#include │ │ │ │ │ +23 │ │ │ │ │ +24#include │ │ │ │ │ +25#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +26#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_._h_h> │ │ │ │ │ +27#include<_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +28 │ │ │ │ │ +29namespace _D_u_n_e │ │ │ │ │ +30{ │ │ │ │ │ +31 // forward declaration of TensorGridFactoryCreator, which is the real │ │ │ │ │ +factory │ │ │ │ │ +32 // that should be specialized for each grid. │ │ │ │ │ +33 template │ │ │ │ │ +34 class TensorGridFactoryCreator; │ │ │ │ │ +35 │ │ │ │ │ +40 template │ │ │ │ │ +_4_1 class _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +42 { │ │ │ │ │ +43 public: │ │ │ │ │ +_4_4 typedef typename Grid::Traits::Communication _C_o_m_m; │ │ │ │ │ +_4_5 typedef typename _G_r_i_d_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ +_4_6 static const int _d_i_m = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +47 │ │ │ │ │ +_4_8 std::unique_ptr _c_r_e_a_t_e_G_r_i_d(_C_o_m_m comm = _C_o_m_m()) │ │ │ │ │ +49 { │ │ │ │ │ +50 _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_G_r_i_d_> creator(*this); │ │ │ │ │ +51 return creator._c_r_e_a_t_e_G_r_i_d(comm); │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 std::array , _d_i_m> _c_o_o_r_d_s() const │ │ │ │ │ 55 { │ │ │ │ │ -56 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_<_ _G_,_ _T_ _> _T_h_i_s; │ │ │ │ │ -57 │ │ │ │ │ -58 struct ImplementationDefined; │ │ │ │ │ -59 │ │ │ │ │ -60 public: │ │ │ │ │ -_6_1 typedef G _G_r_i_d; │ │ │ │ │ -62 │ │ │ │ │ -_6_3 typedef T _V_a_l_u_e; │ │ │ │ │ +56 return _coords; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_0 std::vector& _o_p_e_r_a_t_o_r_[_](std::size_t d) │ │ │ │ │ +61 { │ │ │ │ │ +62 return _coords[d]; │ │ │ │ │ +63 } │ │ │ │ │ 64 │ │ │ │ │ -_6_5 typedef ImplementationDefined _S_i_z_e; │ │ │ │ │ -_6_6 typedef ImplementationDefined _C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -_6_7 typedef ImplementationDefined _I_t_e_r_a_t_o_r; │ │ │ │ │ -68 │ │ │ │ │ -69 // construction │ │ │ │ │ +_6_6 const std::vector& _o_p_e_r_a_t_o_r_[_](std::size_t d) const │ │ │ │ │ +67 { │ │ │ │ │ +68 return _coords[d]; │ │ │ │ │ +69 } │ │ │ │ │ 70 │ │ │ │ │ -_7_9 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e ( _G_r_i_d &grid, int codim, const _V_a_l_u_e &value = │ │ │ │ │ -_V_a_l_u_e() ); │ │ │ │ │ -80 │ │ │ │ │ -_8_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e ( const _T_h_i_s &other ); │ │ │ │ │ -83 │ │ │ │ │ -_8_5 const _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ); │ │ │ │ │ -86 │ │ │ │ │ -87 // element access │ │ │ │ │ -88 │ │ │ │ │ -93 template< class Entity > │ │ │ │ │ -_9_4 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const; │ │ │ │ │ -95 │ │ │ │ │ -100 template< class Entity > │ │ │ │ │ -_1_0_1 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ); │ │ │ │ │ -102 │ │ │ │ │ -108 template< class Entity > │ │ │ │ │ -_1_0_9 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const; │ │ │ │ │ -110 │ │ │ │ │ -116 template< class Entity > │ │ │ │ │ -_1_1_7 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ); │ │ │ │ │ -118 │ │ │ │ │ -119 // capacity │ │ │ │ │ -120 │ │ │ │ │ -_1_2_6 _S_i_z_e _s_i_z_e () const; │ │ │ │ │ -127 │ │ │ │ │ -_1_4_1 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ); │ │ │ │ │ -142 │ │ │ │ │ -_1_5_6 void _s_h_r_i_n_k_T_o_F_i_t (); │ │ │ │ │ +_7_9 void _s_e_t_S_t_a_r_t (int d, _c_t_y_p_e value) │ │ │ │ │ +80 { │ │ │ │ │ +81 _coords[d].resize(1); │ │ │ │ │ +82 _coords[d][0] = value; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_9_3 void _f_i_l_l_I_n_t_e_r_v_a_l_s (int d, int n, _c_t_y_p_e h) │ │ │ │ │ +94 { │ │ │ │ │ +95 emptyCheck (d); │ │ │ │ │ +96 for (int i = 0; i < n; i++) │ │ │ │ │ +97 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ +98 } │ │ │ │ │ +99 │ │ │ │ │ +_1_0_8 void _f_i_l_l_R_a_n_g_e (int d, int n, _c_t_y_p_e end) │ │ │ │ │ +109 { │ │ │ │ │ +110 emptyCheck (d); │ │ │ │ │ +111 const _c_t_y_p_e h = (end - _coords[d].back ()) / n; │ │ │ │ │ +112 for (int i = 0; i < n - 1; i++) │ │ │ │ │ +113 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ +114 _coords[d].push_back (end); │ │ │ │ │ +115 } │ │ │ │ │ +116 │ │ │ │ │ +_1_2_5 void _f_i_l_l_U_n_t_i_l (int d, _c_t_y_p_e h, _c_t_y_p_e end) │ │ │ │ │ +126 { │ │ │ │ │ +127 emptyCheck (d); │ │ │ │ │ +128 while (_coords[d].back () < end) │ │ │ │ │ +129 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +_1_4_4 void _g_e_o_m_e_t_r_i_c_F_i_l_l_I_n_t_e_r_v_a_l_s (int d, int n, _c_t_y_p_e ratio, _c_t_y_p_e h0 = │ │ │ │ │ +145 static_cast<_c_t_y_p_e> (0)) │ │ │ │ │ +146 { │ │ │ │ │ +147 emptyCheck (d); │ │ │ │ │ +148 _c_t_y_p_e h = h0; │ │ │ │ │ +149 if (h0 == static_cast<_c_t_y_p_e>(0)) │ │ │ │ │ +150 h = lastInterval (d) * ratio; │ │ │ │ │ +151 for (int i = 0; i < n; i++) │ │ │ │ │ +152 { │ │ │ │ │ +153 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ +154 h *= ratio; │ │ │ │ │ +155 } │ │ │ │ │ +156 } │ │ │ │ │ 157 │ │ │ │ │ -158 // modifiers │ │ │ │ │ -159 │ │ │ │ │ -_1_6_5 void _f_i_l_l ( const _V_a_l_u_e &value ); │ │ │ │ │ -166 │ │ │ │ │ -_1_7_1 void _s_w_a_p ( _T_h_i_s &other ); │ │ │ │ │ -172 │ │ │ │ │ -173 // iterators │ │ │ │ │ -174 │ │ │ │ │ -_1_8_0 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const; │ │ │ │ │ -_1_8_6 _I_t_e_r_a_t_o_r _b_e_g_i_n (); │ │ │ │ │ -187 │ │ │ │ │ -_1_9_3 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const; │ │ │ │ │ -_1_9_9 _I_t_e_r_a_t_o_r _e_n_d (); │ │ │ │ │ -200 │ │ │ │ │ -201 // information │ │ │ │ │ -202 │ │ │ │ │ -_2_0_4 int _c_o_d_i_m_e_n_s_i_o_n () const; │ │ │ │ │ -205 }; │ │ │ │ │ -206 │ │ │ │ │ -207} // namespace Dune │ │ │ │ │ -208 │ │ │ │ │ -209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ +_1_7_0 void _g_e_o_m_e_t_r_i_c_F_i_l_l_U_n_t_i_l (int d, _c_t_y_p_e ratio, _c_t_y_p_e end, _c_t_y_p_e h0 = │ │ │ │ │ +static_cast<_c_t_y_p_e> (0)) │ │ │ │ │ +171 { │ │ │ │ │ +172 emptyCheck (d); │ │ │ │ │ +173 _c_t_y_p_e h = h0; │ │ │ │ │ +174 if (h0 == static_cast<_c_t_y_p_e>(0)) │ │ │ │ │ +175 h = lastInterval (d) * ratio; │ │ │ │ │ +176 while (_coords[d].back () < end) │ │ │ │ │ +177 { │ │ │ │ │ +178 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ +179 h *= ratio; │ │ │ │ │ +180 } │ │ │ │ │ +181 } │ │ │ │ │ +182 │ │ │ │ │ +_1_9_7 void _g_e_o_m_e_t_r_i_c_F_i_l_l_R_a_n_g_e (int d, int n, _c_t_y_p_e end, _c_t_y_p_e h = │ │ │ │ │ +198 static_cast<_c_t_y_p_e> (0), │ │ │ │ │ +199 bool first = true) │ │ │ │ │ +200 { │ │ │ │ │ +201 emptyCheck (d); │ │ │ │ │ +202 if (h < 1e-8) │ │ │ │ │ +203 h = lastInterval (d); │ │ │ │ │ +204 _c_t_y_p_e ratio = newton (n, _coords[d].back (), end, h); │ │ │ │ │ +205 if (!first) │ │ │ │ │ +206 { │ │ │ │ │ +207 h = h * pow (ratio, n - 1); │ │ │ │ │ +208 ratio = 1 / ratio; │ │ │ │ │ +209 } │ │ │ │ │ +210 for (int i = 0; i < n - 1; i++) │ │ │ │ │ +211 { │ │ │ │ │ +212 _coords[d].push_back (_coords[d].back () + h); │ │ │ │ │ +213 h *= ratio; │ │ │ │ │ +214 } │ │ │ │ │ +215 _coords[d].push_back (end); │ │ │ │ │ +216 } │ │ │ │ │ +217 │ │ │ │ │ +_2_1_9 void _p_r_i_n_t() │ │ │ │ │ +220 { │ │ │ │ │ +221 for (int i=0; i<_d_i_m; i++) │ │ │ │ │ +222 { │ │ │ │ │ +223 std::cout << "Container in direction " << i << ":" << std::endl << │ │ │ │ │ +"Coordinates: "; │ │ │ │ │ +224 for (auto it = _coords[i].begin(); it != _coords[i].end(); ++it) │ │ │ │ │ +225 std::cout << *it << " "; │ │ │ │ │ +226 std::cout << std::endl << "Interval lengths: "; │ │ │ │ │ +227 │ │ │ │ │ +228 std::vector meshsize; │ │ │ │ │ +229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;) │ │ │ │ │ +230 { │ │ │ │ │ +231 meshsize.push_back(-1.*(*it)); │ │ │ │ │ +232 ++it; │ │ │ │ │ +233 meshsize.back() += *it; │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it) │ │ │ │ │ +237 std::cout << *it << " "; │ │ │ │ │ +238 std::cout << std::endl << "Ratios between interval lengths: "; │ │ │ │ │ +239 │ │ │ │ │ +240 std::vector ratios; │ │ │ │ │ +241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;) │ │ │ │ │ +242 ratios.push_back((1./(*it)) * *(++it)); │ │ │ │ │ +243 │ │ │ │ │ +244 for (auto it = ratios.begin(); it != ratios.end(); ++it) │ │ │ │ │ +245 std::cout << *it << " "; │ │ │ │ │ +246 std::cout << std::endl << std::endl << std::endl; │ │ │ │ │ +247 } │ │ │ │ │ +248 } │ │ │ │ │ +249 │ │ │ │ │ +250 private: │ │ │ │ │ +251 // check whether the ith component is empty and add a 0.0 entry if so │ │ │ │ │ +252 void emptyCheck (int i) │ │ │ │ │ +253 { │ │ │ │ │ +254 if (_coords[i].empty ()) │ │ │ │ │ +255 _coords[i].push_back (static_cast<_c_t_y_p_e> (0)); │ │ │ │ │ +256 } │ │ │ │ │ +257 │ │ │ │ │ +258 // returns the last interval length in direction d │ │ │ │ │ +259 _c_t_y_p_e lastInterval (int d) │ │ │ │ │ +260 { │ │ │ │ │ +261 if (_coords[d].size () < 2) │ │ │ │ │ +262 DUNE_THROW( │ │ │ │ │ +263 GridError, │ │ │ │ │ +264 "Not enough elements in coordinate container to deduce interval length in │ │ │ │ │ +TensorYaspFactory"); │ │ │ │ │ +265 else │ │ │ │ │ +266 return _coords[d].back () - _coords[d][_coords[d].size () - 2]; │ │ │ │ │ +267 } │ │ │ │ │ +268 │ │ │ │ │ +272 _c_t_y_p_e newton (int n, _c_t_y_p_e x_s, _c_t_y_p_e x_e, _c_t_y_p_e h) │ │ │ │ │ +273 { │ │ │ │ │ +274 _c_t_y_p_e m = (x_e - x_s) / h; │ │ │ │ │ +275 _c_t_y_p_e xold = 0.0; │ │ │ │ │ +276 _c_t_y_p_e xnew = x_e - x_s; │ │ │ │ │ +277 while (std::abs (xnew - xold) > 1E-8) │ │ │ │ │ +278 { │ │ │ │ │ +279 xold = xnew; │ │ │ │ │ +280 xnew = xold │ │ │ │ │ +281 - (-pow (xold, n) + m * xold - m + 1) │ │ │ │ │ +282 / (-n * pow (xold, n - 1) + m); │ │ │ │ │ +283 } │ │ │ │ │ +284 if (std::abs (xnew - 1) < 1E-6) │ │ │ │ │ +285 { │ │ │ │ │ +286 xold = x_e - x_s; │ │ │ │ │ +287 xnew = 0.0; │ │ │ │ │ +288 while (std::abs (xnew - xold) > 1E-8) │ │ │ │ │ +289 { │ │ │ │ │ +290 xold = xnew; │ │ │ │ │ +291 xnew = xold │ │ │ │ │ +292 - (-pow (xold, n) + m * xold - m + 1) │ │ │ │ │ +293 / (-n * pow (xold, n - 1) + m); │ │ │ │ │ +294 } │ │ │ │ │ +295 } │ │ │ │ │ +296 return xnew; │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +299 std::array, _d_i_m> _coords; │ │ │ │ │ +300 }; │ │ │ │ │ +301 │ │ │ │ │ +302 // class that implements the actual grid creation process. The default is │ │ │ │ │ +implementing │ │ │ │ │ +303 // standard creation for unstructured grids. Provide a specialization for │ │ │ │ │ +other grids. │ │ │ │ │ +304 template │ │ │ │ │ +_3_0_5 class _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ +306 { │ │ │ │ │ +307 public: │ │ │ │ │ +_3_0_8 typedef typename Grid::Traits::Communication _C_o_m_m; │ │ │ │ │ +_3_0_9 typedef typename _G_r_i_d_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ +_3_1_0 static const int _d_i_m = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +311 │ │ │ │ │ +_3_1_2 _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r(const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory) : _factory │ │ │ │ │ +(factory) {} │ │ │ │ │ +313 │ │ │ │ │ +_3_1_4 std::unique_ptr _c_r_e_a_t_e_G_r_i_d(_C_o_m_m comm) │ │ │ │ │ +315 { │ │ │ │ │ +316 // The grid factory │ │ │ │ │ +317 _G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> fac; │ │ │ │ │ +318 │ │ │ │ │ +319 if (comm.rank() == 0) │ │ │ │ │ +320 { │ │ │ │ │ +321 // determine the size of the grid │ │ │ │ │ +322 std::array vsizes, esizes; │ │ │ │ │ +323 std::size_t size = 1; │ │ │ │ │ +324 for (std::size_t i = 0; i<_d_i_m; ++i) │ │ │ │ │ +325 { │ │ │ │ │ +326 vsizes[i] = _factory[i].size(); │ │ │ │ │ +327 esizes[i] = vsizes[i] - 1; │ │ │ │ │ +328 size *= vsizes[i]; │ │ │ │ │ +329 } │ │ │ │ │ +330 │ │ │ │ │ +331 // insert all vertices │ │ │ │ │ +332 _F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_<_d_i_m_> index(vsizes); │ │ │ │ │ +333 for (std::size_t i=0; i position; │ │ │ │ │ +336 for (std::size_t j = 0; j<_d_i_m; ++j) │ │ │ │ │ +337 position[j] = _factory[j][index[j]]; │ │ │ │ │ +338 fac._i_n_s_e_r_t_V_e_r_t_e_x(position); │ │ │ │ │ +339 } │ │ │ │ │ +340 │ │ │ │ │ +341 // compute the offsets │ │ │ │ │ +342 std::array offsets; │ │ │ │ │ +343 offsets[0] = 1; │ │ │ │ │ +344 for (std::size_t i=1; i<_d_i_m; i++) │ │ │ │ │ +345 offsets[i] = offsets[i-1] * vsizes[i-1]; │ │ │ │ │ +346 │ │ │ │ │ +347 // Compute an element template (the cube at (0,...,0). All │ │ │ │ │ +348 // other cubes are constructed by moving this template around │ │ │ │ │ +349 unsigned int nCorners = 1<<_d_i_m; │ │ │ │ │ +350 │ │ │ │ │ +351 std::vector cornersTemplate(nCorners,0); │ │ │ │ │ +352 │ │ │ │ │ +353 for (size_t i=0; i eindex(esizes); │ │ │ │ │ +360 │ │ │ │ │ +361 // Compute the total number of elements to be created │ │ │ │ │ +362 int numElements = eindex._c_y_c_l_e(); │ │ │ │ │ +363 │ │ │ │ │ +364 for (int i=0; i corners = cornersTemplate; │ │ │ │ │ +373 for (size_t j=0; j(fac._c_r_e_a_t_e_G_r_i_d()); │ │ │ │ │ +381 } │ │ │ │ │ +382 │ │ │ │ │ +383 private: │ │ │ │ │ +384 const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& _factory; │ │ │ │ │ +385 }; │ │ │ │ │ +386 │ │ │ │ │ +387 template │ │ │ │ │ +_3_8_8 class _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r<_Y_a_s_p_G_r_i_d > > │ │ │ │ │ +389 { │ │ │ │ │ +390 public: │ │ │ │ │ +_3_9_1 typedef _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_y_p_e_,_ _d_i_m_> > _G_r_i_d; │ │ │ │ │ +_3_9_2 typedef typename _G_r_i_d_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_m_m; │ │ │ │ │ +393 │ │ │ │ │ +_3_9_4 _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r(const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& factory) : _factory │ │ │ │ │ +(factory) {} │ │ │ │ │ +395 │ │ │ │ │ +_3_9_6 std::unique_ptr _c_r_e_a_t_e_G_r_i_d(_C_o_m_m comm) │ │ │ │ │ +397 { │ │ │ │ │ +398 return std::make_unique(_factory.coords(), std::bitset(0ULL), 1, │ │ │ │ │ +comm); │ │ │ │ │ +399 } │ │ │ │ │ +400 private: │ │ │ │ │ +401 const _T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_>& _factory; │ │ │ │ │ +402 }; │ │ │ │ │ +403} │ │ │ │ │ +404 │ │ │ │ │ +405#endif │ │ │ │ │ +_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ +Implements a multiindex with arbitrary dimension and fixed index ranges This is │ │ │ │ │ +used by various facto... │ │ │ │ │ +_y_a_s_p_g_r_i_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ -Persistent storage of data on all entities of a grid. │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerinterface.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_S_i_z_e │ │ │ │ │ -ImplementationDefined Size │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerinterface.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ -PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value()) │ │ │ │ │ -constuctor │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const Value & operator[](const Entity &entity) const │ │ │ │ │ -access the data associated with an entity │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_V_a_l_u_e │ │ │ │ │ -T Value │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerinterface.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_s_i_z_e │ │ │ │ │ -Size size() const │ │ │ │ │ -number of entries in the container │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -ImplementationDefined Iterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerinterface.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ -PersistentContainerInterface(const This &other) │ │ │ │ │ -copy constructor │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -ImplementationDefined ConstIterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerinterface.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_e_n_d │ │ │ │ │ -ConstIterator end() const │ │ │ │ │ -returns an iterator pointing to the last element of the container │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_b_e_g_i_n │ │ │ │ │ -ConstIterator begin() const │ │ │ │ │ -returns an iterator pointing to the first element of the container │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_b_e_g_i_n │ │ │ │ │ -Iterator begin() │ │ │ │ │ -returns an iterator pointing to the first element of the container │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_e_n_d │ │ │ │ │ -Iterator end() │ │ │ │ │ -returns an iterator pointing to the last element of the container │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -remove unnecessary entries from container │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -int codimension() const │ │ │ │ │ -return the codimension, the container attaches data to │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerinterface.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_s_w_a_p │ │ │ │ │ -void swap(This &other) │ │ │ │ │ -exchange the content of the container with another one │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const Value &value=Value()) │ │ │ │ │ -reserve memory for all entities in the grid │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_f_i_l_l │ │ │ │ │ -void fill(const Value &value) │ │ │ │ │ -set all accessible entries to a given value │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ -access the data associated with a subentity │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -const This & operator=(const This &other) │ │ │ │ │ -assignment operator │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +Define type used for coordinates in grid module. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:532 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ │ +virtual void insertElement(const GeometryType &type, const std::vector< │ │ │ │ │ +unsigned int > &vertices) │ │ │ │ │ +Insert an element into the coarse grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:346 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ +virtual void insertVertex(const FieldVector< ctype, dimworld > &pos) │ │ │ │ │ +Insert a vertex into the coarse grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +virtual std::unique_ptr< GridType > createGrid() │ │ │ │ │ +Finalize grid creation and hand over the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:372 │ │ │ │ │ +_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_c_y_c_l_e │ │ │ │ │ +size_t cycle() const │ │ │ │ │ +Compute how many times you can call operator++ before getting to (0,...,0) │ │ │ │ │ +again. │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:306 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:309 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_C_o_m_m │ │ │ │ │ +Grid::Traits::Communication Comm │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:308 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ +TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory) │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:312 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +std::unique_ptr< Grid > createGrid(Comm comm) │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_:_:_d_i_m │ │ │ │ │ +static const int dim │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +A factory class for conveniently creating tensorproduct grids. │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_f_i_l_l_R_a_n_g_e │ │ │ │ │ +void fillRange(int d, int n, ctype end) │ │ │ │ │ +fills the range to end with n intervals in direction d │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_g_e_o_m_e_t_r_i_c_F_i_l_l_R_a_n_g_e │ │ │ │ │ +void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype > │ │ │ │ │ +(0), bool first=true) │ │ │ │ │ +fills a coordinate range in direction d with n intervals according to a │ │ │ │ │ +geometric series │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_f_i_l_l_U_n_t_i_l │ │ │ │ │ +void fillUntil(int d, ctype h, ctype end) │ │ │ │ │ +adds intervals in direction d until a given coordinate is reached │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_g_e_o_m_e_t_r_i_c_F_i_l_l_U_n_t_i_l │ │ │ │ │ +void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast< │ │ │ │ │ +ctype >(0)) │ │ │ │ │ +adds intervals in direction d according with a given length ratio until a given │ │ │ │ │ +coordinate is reached │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m │ │ │ │ │ +static const int dim │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_p_r_i_n_t │ │ │ │ │ +void print() │ │ │ │ │ +print the coordinate information given to the factory so far │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:219 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_f_i_l_l_I_n_t_e_r_v_a_l_s │ │ │ │ │ +void fillIntervals(int d, int n, ctype h) │ │ │ │ │ +pushs n intervals of length h in direction d │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_s_e_t_S_t_a_r_t │ │ │ │ │ +void setStart(int d, ctype value) │ │ │ │ │ +set a starting value in a given direction d │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_g_e_o_m_e_t_r_i_c_F_i_l_l_I_n_t_e_r_v_a_l_s │ │ │ │ │ +void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast< │ │ │ │ │ +ctype >(0)) │ │ │ │ │ +adds n intervals in direction d with a given length ratio and a given starting │ │ │ │ │ +interval length. │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +std::vector< ctype > & operator[](std::size_t d) │ │ │ │ │ +allow to manually tune the factory by overloading operator[] to export the │ │ │ │ │ +coordinate vectors in the ... │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const std::vector< ctype > & operator[](std::size_t d) const │ │ │ │ │ +allow to manually tune the factory by overloading operator[] to export the │ │ │ │ │ +coordinate vectors in the ... │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +std::unique_ptr< Grid > createGrid(Comm comm=Comm()) │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_C_o_m_m │ │ │ │ │ +Grid::Traits::Communication Comm │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_:_:_c_o_o_r_d_s │ │ │ │ │ +std::array< std::vector< ctype >, dim > coords() const │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ +_d_i_m_ _>_ _>_ _>_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +std::unique_ptr< Grid > createGrid(Comm comm) │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:396 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ +_d_i_m_ _>_ _>_ _>_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r │ │ │ │ │ +TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory) │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:394 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ +_d_i_m_ _>_ _>_ _>_:_:_C_o_m_m │ │ │ │ │ +Grid::Communication Comm │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:392 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_G_r_i_d_F_a_c_t_o_r_y_C_r_e_a_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_y_p_e_, │ │ │ │ │ +_d_i_m_ _>_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ +YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid │ │ │ │ │ +DDeeffiinniittiioonn tensorgridfactory.hh:391 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ +[ provides Dune::Grid ] │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_r_i_d_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +typename Base::Communication Communication │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:178 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Coordinate container for a tensor product YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:245 │ │ │ │ │ +_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: multiindex.hh File Reference │ │ │ │ +dune-grid: persistentcontainervector.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,39 +72,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
multiindex.hh File Reference
│ │ │ │ +
persistentcontainervector.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes. │ │ │ │ -More...

│ │ │ │ -
#include <array>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <cassert>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::FactoryUtilities::MultiIndex< dim >
class  Dune::PersistentContainerVector< G, IndexSet, Vector >
 vector-based implementation of the PersistentContainer More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::FactoryUtilities
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,21 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -multiindex.hh File Reference │ │ │ │ │ -Implements a multiindex with arbitrary dimension and fixed index ranges This is │ │ │ │ │ -used by various factory classes. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ +persistentcontainervector.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_<_ _G_,_ _I_n_d_e_x_S_e_t_,_ _V_e_c_t_o_r_ _> │ │ │ │ │ +  vector-based implementation of the _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s │ │ │ │ │ -  │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Implements a multiindex with arbitrary dimension and fixed index ranges This is │ │ │ │ │ -used by various factory classes. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: multiindex.hh Source File │ │ │ │ +dune-grid: persistentcontainervector.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,83 +74,175 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
multiindex.hh
│ │ │ │ +
persistentcontainervector.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH
│ │ │ │ -
4#define DUNE_GRID_UTILITY_MULTIINDEX_HH
│ │ │ │ -
5
│ │ │ │ -
11#include<array>
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
│ │ │ │ -
15 namespace FactoryUtilities
│ │ │ │ -
16 {
│ │ │ │ -
17 template<std::size_t dim>
│ │ │ │ -
│ │ │ │ -
18 class MultiIndex : public std::array<unsigned int,dim>
│ │ │ │ -
19 {
│ │ │ │ -
20 // The range of each component
│ │ │ │ -
21 std::array<unsigned int,dim> limits_;
│ │ │ │ -
22
│ │ │ │ -
23 public:
│ │ │ │ -
│ │ │ │ -
25 MultiIndex(const std::array<unsigned int,dim>& limits) : limits_(limits)
│ │ │ │ -
26 {
│ │ │ │ -
27 std::fill(this->begin(), this->end(), 0);
│ │ │ │ -
28 }
│ │ │ │ -
│ │ │ │ -
29
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 {
│ │ │ │ -
33 for (std::size_t i=0; i<dim; i++)
│ │ │ │ -
34 {
│ │ │ │ -
35 // Augment digit
│ │ │ │ -
36 (*this)[i]++;
│ │ │ │ -
37
│ │ │ │ -
38 // If there is no carry-over we can stop here
│ │ │ │ -
39 if ((*this)[i]<limits_[i])
│ │ │ │ -
40 break;
│ │ │ │ -
41
│ │ │ │ -
42 (*this)[i] = 0;
│ │ │ │ -
43 }
│ │ │ │ -
44 return *this;
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
48 size_t cycle() const
│ │ │ │ -
49 {
│ │ │ │ -
50 size_t result = 1;
│ │ │ │ -
51 for (std::size_t i=0; i<dim; i++)
│ │ │ │ -
52 result *= limits_[i];
│ │ │ │ -
53 return result;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55 };
│ │ │ │ -
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57}
│ │ │ │ -
58
│ │ │ │ -
59#endif
│ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9#include <cassert>
│ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
13
│ │ │ │ +
14 // PersistentContainerVector
│ │ │ │ +
15 // -------------------------
│ │ │ │ +
16
│ │ │ │ +
49 template< class G, class IndexSet, class Vector >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 {
│ │ │ │ + │ │ │ │ +
53
│ │ │ │ +
54 public:
│ │ │ │ +
55 typedef G Grid;
│ │ │ │ +
56
│ │ │ │ +
57 typedef typename Vector::value_type Value;
│ │ │ │ +
58 typedef typename Vector::size_type Size;
│ │ │ │ +
59 typedef typename Vector::const_iterator ConstIterator;
│ │ │ │ +
60 typedef typename Vector::iterator Iterator;
│ │ │ │ +
61
│ │ │ │ +
62 typedef typename Vector::allocator_type Allocator;
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
64 PersistentContainerVector ( const IndexSet &indexSet, int codim, const Value &value,
│ │ │ │ +
65 const Allocator &allocator = Allocator() )
│ │ │ │ +
66 : codim_( codim ),
│ │ │ │ + │ │ │ │ +
68 data_( indexSet.size( codim ), value, allocator )
│ │ │ │ +
69 {}
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
71 template< class Entity >
│ │ │ │ +
│ │ │ │ +
72 const Value &operator[] ( const Entity &entity ) const
│ │ │ │ +
73 {
│ │ │ │ +
74 assert( Entity::codimension == codimension() );
│ │ │ │ +
75 const Size index = indexSet().index( entity );
│ │ │ │ +
76 assert( index < data_.size() );
│ │ │ │ +
77 return data_[ index ];
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
80 template< class Entity >
│ │ │ │ +
│ │ │ │ +
81 Value &operator[] ( const Entity &entity )
│ │ │ │ +
82 {
│ │ │ │ +
83 assert( Entity::codimension == codimension() );
│ │ │ │ +
84 const Size index = indexSet().index( entity );
│ │ │ │ +
85 assert( index < data_.size() );
│ │ │ │ +
86 return data_[ index ];
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
89 template< class Entity >
│ │ │ │ +
│ │ │ │ +
90 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ +
91 {
│ │ │ │ +
92 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
│ │ │ │ +
93 assert( index < data_.size() );
│ │ │ │ +
94 return data_[ index ];
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
97 template< class Entity >
│ │ │ │ +
│ │ │ │ +
98 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ +
99 {
│ │ │ │ +
100 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
│ │ │ │ +
101 assert( index < data_.size() );
│ │ │ │ +
102 return data_[ index ];
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
105 Size size () const { return data_.size(); }
│ │ │ │ +
106
│ │ │ │ +
│ │ │ │ +
107 void resize ( const Value &value = Value() )
│ │ │ │ +
108 {
│ │ │ │ +
109 const Size indexSetSize = indexSet().size( codimension() );
│ │ │ │ +
110 data_.resize( indexSetSize, value );
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
113 void shrinkToFit () {}
│ │ │ │ +
114
│ │ │ │ +
115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
│ │ │ │ +
116
│ │ │ │ +
│ │ │ │ +
117 void swap ( This &other )
│ │ │ │ +
118 {
│ │ │ │ +
119 std::swap( codim_, other.codim_ );
│ │ │ │ +
120 std::swap( indexSet_, other.indexSet_ );
│ │ │ │ +
121 std::swap( data_, other.data_ );
│ │ │ │ +
122 }
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
124 ConstIterator begin () const { return data_.begin(); }
│ │ │ │ +
125 Iterator begin () { return data_.begin(); }
│ │ │ │ +
126
│ │ │ │ +
127 ConstIterator end () const { return data_.end(); }
│ │ │ │ +
128 Iterator end () { return data_.end(); }
│ │ │ │ +
129
│ │ │ │ +
130 int codimension () const { return codim_; }
│ │ │ │ +
131
│ │ │ │ +
132 protected:
│ │ │ │ +
133 const IndexSet &indexSet () const { return *indexSet_; }
│ │ │ │ +
134
│ │ │ │ + │ │ │ │ + │ │ │ │ +
137 Vector data_;
│ │ │ │ +
138 };
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
140} // namespace Dune
│ │ │ │ +
141
│ │ │ │ +
142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ +
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition multiindex.hh:19
│ │ │ │ -
MultiIndex(const std::array< unsigned int, dim > &limits)
Constructor with a given range for each digit.
Definition multiindex.hh:25
│ │ │ │ -
MultiIndex< dim > & operator++()
Increment the MultiIndex.
Definition multiindex.hh:31
│ │ │ │ -
size_t cycle() const
Compute how many times you can call operator++ before getting to (0,...,0) again.
Definition multiindex.hh:48
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ +
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │ +
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition indexidset.hh:223
│ │ │ │ +
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition indexidset.hh:153
│ │ │ │ +
IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition indexidset.hh:113
│ │ │ │ +
vector-based implementation of the PersistentContainer
Definition persistentcontainervector.hh:51
│ │ │ │ +
PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
Definition persistentcontainervector.hh:64
│ │ │ │ +
Iterator begin()
Definition persistentcontainervector.hh:125
│ │ │ │ +
Vector::size_type Size
Definition persistentcontainervector.hh:58
│ │ │ │ +
Vector::value_type Value
Definition persistentcontainervector.hh:57
│ │ │ │ +
Vector::allocator_type Allocator
Definition persistentcontainervector.hh:62
│ │ │ │ +
void fill(const Value &value)
Definition persistentcontainervector.hh:115
│ │ │ │ +
G Grid
Definition persistentcontainervector.hh:55
│ │ │ │ +
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainervector.hh:90
│ │ │ │ +
const IndexSet * indexSet_
Definition persistentcontainervector.hh:136
│ │ │ │ +
Vector::iterator Iterator
Definition persistentcontainervector.hh:60
│ │ │ │ +
ConstIterator begin() const
Definition persistentcontainervector.hh:124
│ │ │ │ +
ConstIterator end() const
Definition persistentcontainervector.hh:127
│ │ │ │ +
int codim_
Definition persistentcontainervector.hh:135
│ │ │ │ +
void shrinkToFit()
Definition persistentcontainervector.hh:113
│ │ │ │ +
Vector::const_iterator ConstIterator
Definition persistentcontainervector.hh:59
│ │ │ │ +
Vector data_
Definition persistentcontainervector.hh:137
│ │ │ │ +
Iterator end()
Definition persistentcontainervector.hh:128
│ │ │ │ +
const IndexSet & indexSet() const
Definition persistentcontainervector.hh:133
│ │ │ │ +
int codimension() const
Definition persistentcontainervector.hh:130
│ │ │ │ +
Size size() const
Definition persistentcontainervector.hh:105
│ │ │ │ +
void swap(This &other)
Definition persistentcontainervector.hh:117
│ │ │ │ +
const Value & operator[](const Entity &entity) const
Definition persistentcontainervector.hh:72
│ │ │ │ +
void resize(const Value &value=Value())
Definition persistentcontainervector.hh:107
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,81 +1,227 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -multiindex.hh │ │ │ │ │ +persistentcontainervector.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH │ │ │ │ │ -4#define DUNE_GRID_UTILITY_MULTIINDEX_HH │ │ │ │ │ -5 │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -_1_5 namespace FactoryUtilities │ │ │ │ │ -16 { │ │ │ │ │ -17 template │ │ │ │ │ -_1_8 class _M_u_l_t_i_I_n_d_e_x : public std::array │ │ │ │ │ -19 { │ │ │ │ │ -20 // The range of each component │ │ │ │ │ -21 std::array limits_; │ │ │ │ │ -22 │ │ │ │ │ -23 public: │ │ │ │ │ -_2_5 _M_u_l_t_i_I_n_d_e_x(const std::array& limits) : limits_(limits) │ │ │ │ │ -26 { │ │ │ │ │ -27 std::fill(this->begin(), this->end(), 0); │ │ │ │ │ -28 } │ │ │ │ │ -29 │ │ │ │ │ -_3_1 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_>& _o_p_e_r_a_t_o_r_+_+() │ │ │ │ │ -32 { │ │ │ │ │ -33 for (std::size_t i=0; i │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ +13 │ │ │ │ │ +14 // PersistentContainerVector │ │ │ │ │ +15 // ------------------------- │ │ │ │ │ +16 │ │ │ │ │ +49 template< class G, class IndexSet, class Vector > │ │ │ │ │ +_5_0 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ +51 { │ │ │ │ │ +52 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_<_ _G_,_ _I_n_d_e_x_S_e_t_,_ _V_e_c_t_o_r_ _> _T_h_i_s; │ │ │ │ │ +53 │ │ │ │ │ +54 public: │ │ │ │ │ +_5_5 typedef G _G_r_i_d; │ │ │ │ │ +56 │ │ │ │ │ +_5_7 typedef typename Vector::value_type _V_a_l_u_e; │ │ │ │ │ +_5_8 typedef typename Vector::size_type _S_i_z_e; │ │ │ │ │ +_5_9 typedef typename Vector::const_iterator _C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ +_6_0 typedef typename Vector::iterator _I_t_e_r_a_t_o_r; │ │ │ │ │ +61 │ │ │ │ │ +_6_2 typedef typename Vector::allocator_type _A_l_l_o_c_a_t_o_r; │ │ │ │ │ +63 │ │ │ │ │ +_6_4 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r ( const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t, int codim, const _V_a_l_u_e │ │ │ │ │ +&value, │ │ │ │ │ +65 const _A_l_l_o_c_a_t_o_r &allocator = _A_l_l_o_c_a_t_o_r() ) │ │ │ │ │ +66 : _c_o_d_i_m__( codim ), │ │ │ │ │ +67 _i_n_d_e_x_S_e_t__( &_i_n_d_e_x_S_e_t ), │ │ │ │ │ +68 _d_a_t_a__( _i_n_d_e_x_S_e_t._s_i_z_e( codim ), value, allocator ) │ │ │ │ │ +69 {} │ │ │ │ │ +70 │ │ │ │ │ +71 template< class Entity > │ │ │ │ │ +_7_2 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ +73 { │ │ │ │ │ +74 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +75 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._i_n_d_e_x( entity ); │ │ │ │ │ +76 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ +77 return _d_a_t_a__[ index ]; │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +80 template< class Entity > │ │ │ │ │ +_8_1 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ +82 { │ │ │ │ │ +83 assert( _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n == _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +84 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._i_n_d_e_x( entity ); │ │ │ │ │ +85 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ +86 return _d_a_t_a__[ index ]; │ │ │ │ │ +87 } │ │ │ │ │ +88 │ │ │ │ │ +89 template< class Entity > │ │ │ │ │ +_9_0 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const │ │ │ │ │ +91 { │ │ │ │ │ +92 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._s_u_b_I_n_d_e_x( entity, subEntity, _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +93 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ +94 return _d_a_t_a__[ index ]; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97 template< class Entity > │ │ │ │ │ +_9_8 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) │ │ │ │ │ +99 { │ │ │ │ │ +100 const _S_i_z_e index = _i_n_d_e_x_S_e_t()._s_u_b_I_n_d_e_x( entity, subEntity, _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +101 assert( index < _d_a_t_a__.size() ); │ │ │ │ │ +102 return _d_a_t_a__[ index ]; │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_5 _S_i_z_e _s_i_z_e () const { return _d_a_t_a__.size(); } │ │ │ │ │ +106 │ │ │ │ │ +_1_0_7 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ) │ │ │ │ │ +108 { │ │ │ │ │ +109 const _S_i_z_e indexSetSize = _i_n_d_e_x_S_e_t()._s_i_z_e( _c_o_d_i_m_e_n_s_i_o_n() ); │ │ │ │ │ +110 _d_a_t_a__.resize( indexSetSize, value ); │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 void _s_h_r_i_n_k_T_o_F_i_t () {} │ │ │ │ │ +114 │ │ │ │ │ +_1_1_5 void _f_i_l_l ( const _V_a_l_u_e &value ) { std::fill( _b_e_g_i_n(), _e_n_d(), value ); } │ │ │ │ │ +116 │ │ │ │ │ +_1_1_7 void _s_w_a_p ( _T_h_i_s &other ) │ │ │ │ │ +118 { │ │ │ │ │ +119 _s_t_d_:_:_s_w_a_p( _c_o_d_i_m__, other._c_o_d_i_m__ ); │ │ │ │ │ +120 _s_t_d_:_:_s_w_a_p( _i_n_d_e_x_S_e_t__, other._i_n_d_e_x_S_e_t__ ); │ │ │ │ │ +121 _s_t_d_:_:_s_w_a_p( _d_a_t_a__, other._d_a_t_a__ ); │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +_1_2_4 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const { return _d_a_t_a__.begin(); } │ │ │ │ │ +_1_2_5 _I_t_e_r_a_t_o_r _b_e_g_i_n () { return _d_a_t_a__.begin(); } │ │ │ │ │ +126 │ │ │ │ │ +_1_2_7 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const { return _d_a_t_a__.end(); } │ │ │ │ │ +_1_2_8 _I_t_e_r_a_t_o_r _e_n_d () { return _d_a_t_a__.end(); } │ │ │ │ │ +129 │ │ │ │ │ +_1_3_0 int _c_o_d_i_m_e_n_s_i_o_n () const { return _c_o_d_i_m__; } │ │ │ │ │ +131 │ │ │ │ │ +132 protected: │ │ │ │ │ +_1_3_3 const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t () const { return *_i_n_d_e_x_S_e_t__; } │ │ │ │ │ +134 │ │ │ │ │ +_1_3_5 int _c_o_d_i_m__; │ │ │ │ │ +_1_3_6 const _I_n_d_e_x_S_e_t *_i_n_d_e_x_S_e_t__; │ │ │ │ │ +_1_3_7 Vector _d_a_t_a__; │ │ │ │ │ +138 }; │ │ │ │ │ +139 │ │ │ │ │ +140} // namespace Dune │ │ │ │ │ +141 │ │ │ │ │ +142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH │ │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ │ +void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ +> &b) │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -MultiIndex(const std::array< unsigned int, dim > &limits) │ │ │ │ │ -Constructor with a given range for each digit. │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ │ -MultiIndex< dim > & operator++() │ │ │ │ │ -Increment the MultiIndex. │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_F_a_c_t_o_r_y_U_t_i_l_i_t_i_e_s_:_:_M_u_l_t_i_I_n_d_e_x_:_:_c_y_c_l_e │ │ │ │ │ -size_t cycle() const │ │ │ │ │ -Compute how many times you can call operator++ before getting to (0,...,0) │ │ │ │ │ -again. │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +Know your own codimension. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Index Set Interface base class. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +auto size(GeometryType type) const │ │ │ │ │ +Return total number of entities of given geometry type in entity set . │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int │ │ │ │ │ +i, unsigned int codim) const │ │ │ │ │ +Map a subentity to an index. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ +IndexType index(const typename Traits::template Codim< cc >::Entity &e) const │ │ │ │ │ +Map entity to index. The result of calling this method with an entity that is │ │ │ │ │ +not in the index set is... │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ +vector-based implementation of the PersistentContainer │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ +PersistentContainerVector(const IndexSet &indexSet, int codim, const Value │ │ │ │ │ +&value, const Allocator &allocator=Allocator()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ │ +Iterator begin() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_S_i_z_e │ │ │ │ │ +Vector::size_type Size │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ +Vector::value_type Value │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_A_l_l_o_c_a_t_o_r │ │ │ │ │ +Vector::allocator_type Allocator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_f_i_l_l │ │ │ │ │ +void fill(const Value &value) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_i_n_d_e_x_S_e_t__ │ │ │ │ │ +const IndexSet * indexSet_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +Vector::iterator Iterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ │ +ConstIterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_e_n_d │ │ │ │ │ +ConstIterator end() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_c_o_d_i_m__ │ │ │ │ │ +int codim_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +Vector::const_iterator ConstIterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_d_a_t_a__ │ │ │ │ │ +Vector data_ │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_e_n_d │ │ │ │ │ +Iterator end() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ +const IndexSet & indexSet() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +int codimension() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_s_i_z_e │ │ │ │ │ +Size size() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_s_w_a_p │ │ │ │ │ +void swap(This &other) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const Value & operator[](const Entity &entity) const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const Value &value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:107 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerwrapper.hh File Reference │ │ │ │ +dune-grid: persistentcontainerinterface.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,25 +72,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
persistentcontainerwrapper.hh File Reference
│ │ │ │ +
persistentcontainerinterface.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │ -#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::PersistentContainerWrapper< G, T >
class  Dune::PersistentContainerInterface< G, T >
 Persistent storage of data on all entities of a grid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +2,19 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -persistentcontainerwrapper.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ +persistentcontainerinterface.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_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_<_ _G_,_ _T_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_<_ _G_,_ _T_ _> │ │ │ │ │ +  Persistent storage of data on all entities of a grid. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerwrapper.hh Source File │ │ │ │ +dune-grid: persistentcontainerinterface.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,150 +74,124 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainerwrapper.hh
│ │ │ │ +
persistentcontainerinterface.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ -
6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13
│ │ │ │ -
14 // PersistentContainerWrapper
│ │ │ │ -
15 // --------------------------
│ │ │ │ -
16
│ │ │ │ -
17 template< class G, class T >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 {
│ │ │ │ - │ │ │ │ -
21
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24 typedef typename HostGridAccess::HostGrid HostGrid;
│ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ -
28 typedef G Grid;
│ │ │ │ -
29
│ │ │ │ - │ │ │ │ - │ │ │ │ -
32
│ │ │ │ - │ │ │ │ - │ │ │ │ -
35
│ │ │ │ -
│ │ │ │ -
36 PersistentContainerWrapper ( const Grid &grid, int codim, const Value &value = Value() )
│ │ │ │ -
37 : hostContainer_( HostGridAccess::hostGrid( grid ), codim, value )
│ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
40 template< class Entity >
│ │ │ │ -
│ │ │ │ -
41 const Value &operator[] ( const Entity &entity ) const
│ │ │ │ -
42 {
│ │ │ │ -
43 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 template< class Entity >
│ │ │ │ -
│ │ │ │ -
47 Value &operator[] ( const Entity &entity )
│ │ │ │ -
48 {
│ │ │ │ -
49 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52 template< class Entity >
│ │ │ │ -
│ │ │ │ -
53 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ -
54 {
│ │ │ │ -
55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ +
8#ifndef HEADERCHECK
│ │ │ │ +
9#error "This header exists for documentation purposes only and should never be included directly."
│ │ │ │ +
10#endif
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
53 template< class G, class T >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ + │ │ │ │
57
│ │ │ │ -
58 template< class Entity >
│ │ │ │ -
│ │ │ │ -
59 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ -
60 {
│ │ │ │ -
61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
64 Size size () const { return hostContainer_.size(); }
│ │ │ │ -
65
│ │ │ │ -
66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value ); }
│ │ │ │ - │ │ │ │ +
58 struct ImplementationDefined;
│ │ │ │ +
59
│ │ │ │ +
60 public:
│ │ │ │ +
61 typedef G Grid;
│ │ │ │ +
62
│ │ │ │ +
63 typedef T Value;
│ │ │ │ +
64
│ │ │ │ +
65 typedef ImplementationDefined Size;
│ │ │ │ +
66 typedef ImplementationDefined ConstIterator;
│ │ │ │ +
67 typedef ImplementationDefined Iterator;
│ │ │ │
68
│ │ │ │ -
69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }
│ │ │ │ +
69 // construction
│ │ │ │
70
│ │ │ │ -
71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }
│ │ │ │ -
72
│ │ │ │ -
73 ConstIterator begin () const { return hostContainer_.begin(); }
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ -
76 ConstIterator end () const { return hostContainer_.end(); }
│ │ │ │ -
77 Iterator end () { return hostContainer_.end(); }
│ │ │ │ -
78
│ │ │ │ -
79 int codimension () const { return hostContainer_.codimension(); }
│ │ │ │ +
79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value = Value() );
│ │ │ │
80
│ │ │ │ -
81 protected:
│ │ │ │ - │ │ │ │ -
83 };
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
85} // namespace Dune
│ │ │ │ + │ │ │ │ +
83
│ │ │ │ +
85 const This &operator= ( const This &other );
│ │ │ │
86
│ │ │ │ -
87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ - │ │ │ │ +
87 // element access
│ │ │ │ +
88
│ │ │ │ +
93 template< class Entity >
│ │ │ │ +
94 const Value &operator[] ( const Entity &entity ) const;
│ │ │ │ +
95
│ │ │ │ +
100 template< class Entity >
│ │ │ │ +
101 Value &operator[] ( const Entity &entity );
│ │ │ │ +
102
│ │ │ │ +
108 template< class Entity >
│ │ │ │ +
109 const Value &operator() ( const Entity &entity, int subEntity ) const;
│ │ │ │ +
110
│ │ │ │ +
116 template< class Entity >
│ │ │ │ +
117 Value &operator() ( const Entity &entity, int subEntity );
│ │ │ │ +
118
│ │ │ │ +
119 // capacity
│ │ │ │ +
120
│ │ │ │ +
126 Size size () const;
│ │ │ │ +
127
│ │ │ │ +
141 void resize ( const Value &value = Value() );
│ │ │ │ +
142
│ │ │ │ +
156 void shrinkToFit ();
│ │ │ │ +
157
│ │ │ │ +
158 // modifiers
│ │ │ │ +
159
│ │ │ │ +
165 void fill ( const Value &value );
│ │ │ │ +
166
│ │ │ │ +
171 void swap ( This &other );
│ │ │ │ +
172
│ │ │ │ +
173 // iterators
│ │ │ │ +
174
│ │ │ │ + │ │ │ │ + │ │ │ │ +
187
│ │ │ │ + │ │ │ │ + │ │ │ │ +
200
│ │ │ │ +
201 // information
│ │ │ │ +
202
│ │ │ │ +
204 int codimension () const;
│ │ │ │ +
205 };
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
207} // namespace Dune
│ │ │ │ +
208
│ │ │ │ +
209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ - │ │ │ │ -
void swap(This &other)
Definition persistentcontainermap.hh:97
│ │ │ │ -
void fill(const Value &value)
Definition persistentcontainermap.hh:95
│ │ │ │ -
int codimension() const
Definition persistentcontainermap.hh:111
│ │ │ │ -
void resize(const Value &value=Value())
Definition persistentcontainermap.hh:87
│ │ │ │ -
ConstIterator begin() const
Definition persistentcontainermap.hh:175
│ │ │ │ -
ConstIterator end() const
Definition persistentcontainermap.hh:190
│ │ │ │ -
Size size() const
Definition persistentcontainermap.hh:85
│ │ │ │ -
void shrinkToFit()
Definition persistentcontainermap.hh:93
│ │ │ │ -
Definition persistentcontainerwrapper.hh:19
│ │ │ │ -
void fill(const Value &value=Value())
Definition persistentcontainerwrapper.hh:69
│ │ │ │ -
PersistentContainer< HostGrid, T >::ConstIterator ConstIterator
Definition persistentcontainerwrapper.hh:34
│ │ │ │ -
Size size() const
Definition persistentcontainerwrapper.hh:64
│ │ │ │ -
ConstIterator begin() const
Definition persistentcontainerwrapper.hh:73
│ │ │ │ -
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainerwrapper.hh:53
│ │ │ │ -
G Grid
Definition persistentcontainerwrapper.hh:28
│ │ │ │ -
const Value & operator[](const Entity &entity) const
Definition persistentcontainerwrapper.hh:41
│ │ │ │ -
void resize(const Value &value=Value())
Definition persistentcontainerwrapper.hh:66
│ │ │ │ -
PersistentContainer< HostGrid, T >::Size Size
Definition persistentcontainerwrapper.hh:31
│ │ │ │ -
int codimension() const
Definition persistentcontainerwrapper.hh:79
│ │ │ │ -
PersistentContainer< HostGrid, T >::Value Value
Definition persistentcontainerwrapper.hh:30
│ │ │ │ -
void swap(This &other)
Definition persistentcontainerwrapper.hh:71
│ │ │ │ -
ConstIterator end() const
Definition persistentcontainerwrapper.hh:76
│ │ │ │ -
PersistentContainerWrapper(const Grid &grid, int codim, const Value &value=Value())
Definition persistentcontainerwrapper.hh:36
│ │ │ │ -
PersistentContainer< HostGrid, T >::Iterator Iterator
Definition persistentcontainerwrapper.hh:33
│ │ │ │ -
void shrinkToFit()
Definition persistentcontainerwrapper.hh:67
│ │ │ │ -
Iterator begin()
Definition persistentcontainerwrapper.hh:74
│ │ │ │ -
PersistentContainer< HostGrid, T > hostContainer_
Definition persistentcontainerwrapper.hh:82
│ │ │ │ -
Iterator end()
Definition persistentcontainerwrapper.hh:77
│ │ │ │ - │ │ │ │ +
Persistent storage of data on all entities of a grid.
Definition persistentcontainerinterface.hh:55
│ │ │ │ +
ImplementationDefined Size
Definition persistentcontainerinterface.hh:65
│ │ │ │ +
PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value())
constuctor
│ │ │ │ +
const Value & operator[](const Entity &entity) const
access the data associated with an entity
│ │ │ │ +
T Value
Definition persistentcontainerinterface.hh:63
│ │ │ │ +
Size size() const
number of entries in the container
│ │ │ │ +
ImplementationDefined Iterator
Definition persistentcontainerinterface.hh:67
│ │ │ │ +
PersistentContainerInterface(const This &other)
copy constructor
│ │ │ │ +
ImplementationDefined ConstIterator
Definition persistentcontainerinterface.hh:66
│ │ │ │ +
ConstIterator end() const
returns an iterator pointing to the last element of the container
│ │ │ │ +
ConstIterator begin() const
returns an iterator pointing to the first element of the container
│ │ │ │ +
Iterator begin()
returns an iterator pointing to the first element of the container
│ │ │ │ +
Iterator end()
returns an iterator pointing to the last element of the container
│ │ │ │ +
void shrinkToFit()
remove unnecessary entries from container
│ │ │ │ +
int codimension() const
return the codimension, the container attaches data to
│ │ │ │ +
G Grid
Definition persistentcontainerinterface.hh:61
│ │ │ │ +
void swap(This &other)
exchange the content of the container with another one
│ │ │ │ +
void resize(const Value &value=Value())
reserve memory for all entities in the grid
│ │ │ │ +
void fill(const Value &value)
set all accessible entries to a given value
│ │ │ │ +
const Value & operator()(const Entity &entity, int subEntity) const
access the data associated with a subentity
│ │ │ │ +
const This & operator=(const This &other)
assignment operator
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,198 +1,165 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainerwrapper.hh │ │ │ │ │ +persistentcontainerinterface.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ -6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ +5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -13 │ │ │ │ │ -14 // PersistentContainerWrapper │ │ │ │ │ -15 // -------------------------- │ │ │ │ │ -16 │ │ │ │ │ -17 template< class G, class T > │ │ │ │ │ -_1_8 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r │ │ │ │ │ -19 { │ │ │ │ │ -20 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_<_ _G_,_ _T_ _> _T_h_i_s; │ │ │ │ │ -21 │ │ │ │ │ -22 typedef _D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_ _> _H_o_s_t_G_r_i_d_A_c_c_e_s_s; │ │ │ │ │ -23 │ │ │ │ │ -24 typedef typename HostGridAccess::HostGrid HostGrid; │ │ │ │ │ -25 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _> _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_H_o_s_t_G_r_i_d; │ │ │ │ │ -26 │ │ │ │ │ -27 public: │ │ │ │ │ -_2_8 typedef G _G_r_i_d; │ │ │ │ │ -29 │ │ │ │ │ -_3_0 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_V_a_l_u_e _V_a_l_u_e; │ │ │ │ │ -_3_1 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_S_i_z_e _S_i_z_e; │ │ │ │ │ -32 │ │ │ │ │ -_3_3 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_I_t_e_r_a_t_o_r _I_t_e_r_a_t_o_r; │ │ │ │ │ -_3_4 typedef typename _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _>_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -_C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -35 │ │ │ │ │ -_3_6 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r ( const _G_r_i_d &grid, int codim, const _V_a_l_u_e &value │ │ │ │ │ -= _V_a_l_u_e() ) │ │ │ │ │ -37 : _h_o_s_t_C_o_n_t_a_i_n_e_r__( _H_o_s_t_G_r_i_d_A_c_c_e_s_s::hostGrid( grid ), codim, value ) │ │ │ │ │ -38 {} │ │ │ │ │ -39 │ │ │ │ │ -40 template< class Entity > │ │ │ │ │ -_4_1 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const │ │ │ │ │ -42 { │ │ │ │ │ -43 return _h_o_s_t_C_o_n_t_a_i_n_e_r__[ HostGridAccess::hostEntity( entity ) ]; │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -46 template< class Entity > │ │ │ │ │ -_4_7 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -48 { │ │ │ │ │ -49 return _h_o_s_t_C_o_n_t_a_i_n_e_r__[ HostGridAccess::hostEntity( entity ) ]; │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -52 template< class Entity > │ │ │ │ │ -_5_3 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const │ │ │ │ │ -54 { │ │ │ │ │ -55 return _h_o_s_t_C_o_n_t_a_i_n_e_r__( HostGridAccess::hostEntity( entity ), subEntity ); │ │ │ │ │ -56 } │ │ │ │ │ +8#ifndef HEADERCHECK │ │ │ │ │ +9#error "This header exists for documentation purposes only and should never be │ │ │ │ │ +included directly." │ │ │ │ │ +10#endif │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +53 template< class G, class T > │ │ │ │ │ +_5_4 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ +55 { │ │ │ │ │ +56 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_<_ _G_,_ _T_ _> _T_h_i_s; │ │ │ │ │ 57 │ │ │ │ │ -58 template< class Entity > │ │ │ │ │ -_5_9 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) │ │ │ │ │ -60 { │ │ │ │ │ -61 return _h_o_s_t_C_o_n_t_a_i_n_e_r__( HostGridAccess::hostEntity( entity ), subEntity ); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_4 _S_i_z_e _s_i_z_e () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._s_i_z_e(); } │ │ │ │ │ -65 │ │ │ │ │ -_6_6 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ) { _h_o_s_t_C_o_n_t_a_i_n_e_r__._r_e_s_i_z_e( value │ │ │ │ │ -); } │ │ │ │ │ -_6_7 void _s_h_r_i_n_k_T_o_F_i_t () { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._s_h_r_i_n_k_T_o_F_i_t(); } │ │ │ │ │ +58 struct ImplementationDefined; │ │ │ │ │ +59 │ │ │ │ │ +60 public: │ │ │ │ │ +_6_1 typedef G _G_r_i_d; │ │ │ │ │ +62 │ │ │ │ │ +_6_3 typedef T _V_a_l_u_e; │ │ │ │ │ +64 │ │ │ │ │ +_6_5 typedef ImplementationDefined _S_i_z_e; │ │ │ │ │ +_6_6 typedef ImplementationDefined _C_o_n_s_t_I_t_e_r_a_t_o_r; │ │ │ │ │ +_6_7 typedef ImplementationDefined _I_t_e_r_a_t_o_r; │ │ │ │ │ 68 │ │ │ │ │ -_6_9 void _f_i_l_l ( const _V_a_l_u_e &value = _V_a_l_u_e() ) { _h_o_s_t_C_o_n_t_a_i_n_e_r__._f_i_l_l( value ); } │ │ │ │ │ +69 // construction │ │ │ │ │ 70 │ │ │ │ │ -_7_1 void _s_w_a_p ( _T_h_i_s &other ) { _h_o_s_t_C_o_n_t_a_i_n_e_r__._s_w_a_p( other._h_o_s_t_C_o_n_t_a_i_n_e_r__ ); } │ │ │ │ │ -72 │ │ │ │ │ -_7_3 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._b_e_g_i_n(); } │ │ │ │ │ -_7_4 _I_t_e_r_a_t_o_r _b_e_g_i_n () { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._b_e_g_i_n(); } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._e_n_d(); } │ │ │ │ │ -_7_7 _I_t_e_r_a_t_o_r _e_n_d () { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._e_n_d(); } │ │ │ │ │ -78 │ │ │ │ │ -_7_9 int _c_o_d_i_m_e_n_s_i_o_n () const { return _h_o_s_t_C_o_n_t_a_i_n_e_r__._c_o_d_i_m_e_n_s_i_o_n(); } │ │ │ │ │ +_7_9 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e ( _G_r_i_d &grid, int codim, const _V_a_l_u_e &value = │ │ │ │ │ +_V_a_l_u_e() ); │ │ │ │ │ 80 │ │ │ │ │ -81 protected: │ │ │ │ │ -_8_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _> _h_o_s_t_C_o_n_t_a_i_n_e_r__; │ │ │ │ │ -83 }; │ │ │ │ │ -84 │ │ │ │ │ -85} // namespace Dune │ │ │ │ │ +_8_2 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e ( const _T_h_i_s &other ); │ │ │ │ │ +83 │ │ │ │ │ +_8_5 const _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ); │ │ │ │ │ 86 │ │ │ │ │ -87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ -_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ │ +87 // element access │ │ │ │ │ +88 │ │ │ │ │ +93 template< class Entity > │ │ │ │ │ +_9_4 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ) const; │ │ │ │ │ +95 │ │ │ │ │ +100 template< class Entity > │ │ │ │ │ +_1_0_1 _V_a_l_u_e &_o_p_e_r_a_t_o_r_[_]_ ( const _E_n_t_i_t_y &entity ); │ │ │ │ │ +102 │ │ │ │ │ +108 template< class Entity > │ │ │ │ │ +_1_0_9 const _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ) const; │ │ │ │ │ +110 │ │ │ │ │ +116 template< class Entity > │ │ │ │ │ +_1_1_7 _V_a_l_u_e &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, int subEntity ); │ │ │ │ │ +118 │ │ │ │ │ +119 // capacity │ │ │ │ │ +120 │ │ │ │ │ +_1_2_6 _S_i_z_e _s_i_z_e () const; │ │ │ │ │ +127 │ │ │ │ │ +_1_4_1 void _r_e_s_i_z_e ( const _V_a_l_u_e &value = _V_a_l_u_e() ); │ │ │ │ │ +142 │ │ │ │ │ +_1_5_6 void _s_h_r_i_n_k_T_o_F_i_t (); │ │ │ │ │ +157 │ │ │ │ │ +158 // modifiers │ │ │ │ │ +159 │ │ │ │ │ +_1_6_5 void _f_i_l_l ( const _V_a_l_u_e &value ); │ │ │ │ │ +166 │ │ │ │ │ +_1_7_1 void _s_w_a_p ( _T_h_i_s &other ); │ │ │ │ │ +172 │ │ │ │ │ +173 // iterators │ │ │ │ │ +174 │ │ │ │ │ +_1_8_0 _C_o_n_s_t_I_t_e_r_a_t_o_r _b_e_g_i_n () const; │ │ │ │ │ +_1_8_6 _I_t_e_r_a_t_o_r _b_e_g_i_n (); │ │ │ │ │ +187 │ │ │ │ │ +_1_9_3 _C_o_n_s_t_I_t_e_r_a_t_o_r _e_n_d () const; │ │ │ │ │ +_1_9_9 _I_t_e_r_a_t_o_r _e_n_d (); │ │ │ │ │ +200 │ │ │ │ │ +201 // information │ │ │ │ │ +202 │ │ │ │ │ +_2_0_4 int _c_o_d_i_m_e_n_s_i_o_n () const; │ │ │ │ │ +205 }; │ │ │ │ │ +206 │ │ │ │ │ +207} // namespace Dune │ │ │ │ │ +208 │ │ │ │ │ +209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ Wrapper class for entities. │ │ │ │ │ DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ -provides access to host grid objects from GeometryGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _H_o_s_t_G_r_i_d_,_ _T_ _> │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_w_a_p │ │ │ │ │ -void swap(This &other) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_f_i_l_l │ │ │ │ │ -void fill(const Value &value) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -int codimension() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const Value &value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_b_e_g_i_n │ │ │ │ │ -ConstIterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_e_n_d │ │ │ │ │ -ConstIterator end() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:190 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_i_z_e │ │ │ │ │ -Size size() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_f_i_l_l │ │ │ │ │ -void fill(const Value &value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ -PersistentContainer< HostGrid, T >::ConstIterator ConstIterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ -Size size() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_b_e_g_i_n │ │ │ │ │ -ConstIterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ +Persistent storage of data on all entities of a grid. │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerinterface.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_S_i_z_e │ │ │ │ │ +ImplementationDefined Size │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerinterface.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ +PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value()) │ │ │ │ │ +constuctor │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ const Value & operator[](const Entity &entity) const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const Value &value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_S_i_z_e │ │ │ │ │ -PersistentContainer< HostGrid, T >::Size Size │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -int codimension() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_V_a_l_u_e │ │ │ │ │ -PersistentContainer< HostGrid, T >::Value Value │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_s_w_a_p │ │ │ │ │ -void swap(This &other) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_e_n_d │ │ │ │ │ +access the data associated with an entity │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_V_a_l_u_e │ │ │ │ │ +T Value │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerinterface.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_s_i_z_e │ │ │ │ │ +Size size() const │ │ │ │ │ +number of entries in the container │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +ImplementationDefined Iterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerinterface.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e │ │ │ │ │ +PersistentContainerInterface(const This &other) │ │ │ │ │ +copy constructor │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_C_o_n_s_t_I_t_e_r_a_t_o_r │ │ │ │ │ +ImplementationDefined ConstIterator │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerinterface.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_e_n_d │ │ │ │ │ ConstIterator end() const │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r │ │ │ │ │ -PersistentContainerWrapper(const Grid &grid, int codim, const Value │ │ │ │ │ -&value=Value()) │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -PersistentContainer< HostGrid, T >::Iterator Iterator │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_b_e_g_i_n │ │ │ │ │ +returns an iterator pointing to the last element of the container │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_b_e_g_i_n │ │ │ │ │ +ConstIterator begin() const │ │ │ │ │ +returns an iterator pointing to the first element of the container │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_b_e_g_i_n │ │ │ │ │ Iterator begin() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_h_o_s_t_C_o_n_t_a_i_n_e_r__ │ │ │ │ │ -PersistentContainer< HostGrid, T > hostContainer_ │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_W_r_a_p_p_e_r_:_:_e_n_d │ │ │ │ │ +returns an iterator pointing to the first element of the container │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_e_n_d │ │ │ │ │ Iterator end() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainerwrapper.hh:77 │ │ │ │ │ -_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h │ │ │ │ │ +returns an iterator pointing to the last element of the container │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +remove unnecessary entries from container │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +int codimension() const │ │ │ │ │ +return the codimension, the container attaches data to │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainerinterface.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_s_w_a_p │ │ │ │ │ +void swap(This &other) │ │ │ │ │ +exchange the content of the container with another one │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const Value &value=Value()) │ │ │ │ │ +reserve memory for all entities in the grid │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_f_i_l_l │ │ │ │ │ +void fill(const Value &value) │ │ │ │ │ +set all accessible entries to a given value │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Value & operator()(const Entity &entity, int subEntity) const │ │ │ │ │ +access the data associated with a subentity │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_t_e_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +const This & operator=(const This &other) │ │ │ │ │ +assignment operator │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridinfo-gmsh-main.hh File Reference │ │ │ │ +dune-grid: entitycommhelper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,55 +69,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridinfo-gmsh-main.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
entitycommhelper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Generic main() function for printing information about a mesh read from a .msh-file. │ │ │ │ -More...

│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <cstdlib>
│ │ │ │ -#include <exception>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <ostream>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <stdexcept>
│ │ │ │ -#include <string>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/classname.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ -#include <dune/grid/utility/gridinfo.hh>
│ │ │ │ +
#include <dune/grid/common/gridenums.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Generic main() function for printing information about a mesh read from a .msh-file.

│ │ │ │ -
Author
Jö Fahlke jorri.nosp@m.t@jo.nosp@m.rrit..nosp@m.de
│ │ │ │ -
Date
2011
│ │ │ │ -

This header contains a generic main() function. To use it for your grid, write a .cc file like this:

#ifdef HAVE_CONFIG_H
│ │ │ │ -
#include "config.h"
│ │ │ │ -
#endif
│ │ │ │ -
│ │ │ │ -
#include <string>
│ │ │ │ -
│ │ │ │ -
#include <dune/grid/mygrid.hh>
│ │ │ │ -
│ │ │ │ -
const std::string programName = "dune-gridinfo-gmsh-mygrid-3d";
│ │ │ │ -
typedef Dune::MyGrid<3> Grid;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
Generic main() function for printing information about a mesh read from a .msh-file.
│ │ │ │ -

Write an automake target for your program as usual. No special libraries are needed for you program, beyond what is needed for the grid in question.

│ │ │ │ -
│ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

struct  Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >
 
struct  Dune::EntityCommHelper< InteriorBorder_All_Interface >
 
struct  Dune::EntityCommHelper< Overlap_OverlapFront_Interface >
 
struct  Dune::EntityCommHelper< Overlap_All_Interface >
 
struct  Dune::EntityCommHelper< All_All_Interface >
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,50 +1,28 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -gridinfo-gmsh-main.hh File Reference │ │ │ │ │ -Generic _m_a_i_n_(_) function for printing information about a mesh read from a .msh- │ │ │ │ │ -file. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_r_i_d_i_n_f_o_._h_h> │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +entitycommhelper.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Generic _m_a_i_n_(_) function for printing information about a mesh read from a .msh- │ │ │ │ │ -file. │ │ │ │ │ - Author │ │ │ │ │ - Jö Fahlke _j_o_r_r_i_._n_o_s_p_@_m_._t_@_j_o_._n_o_s_p_@_m_._r_r_i_t_._._n_o_s_p_@_m_._d_e │ │ │ │ │ - Date │ │ │ │ │ - 2011 │ │ │ │ │ -This header contains a generic _m_a_i_n_(_) function. To use it for your grid, write │ │ │ │ │ -a .cc file like this: │ │ │ │ │ -#ifdef HAVE_CONFIG_H │ │ │ │ │ -#include "config.h" │ │ │ │ │ -#endif │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -const std::string programName = "dune-gridinfo-gmsh-mygrid-3d"; │ │ │ │ │ -typedef Dune::MyGrid<3> Grid; │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_r_i_d_i_n_f_o_-_g_m_s_h_-_m_a_i_n_._h_h> │ │ │ │ │ -_g_r_i_d_i_n_f_o_-_g_m_s_h_-_m_a_i_n_._h_h │ │ │ │ │ -Generic main() function for printing information about a mesh read from a .msh- │ │ │ │ │ -file. │ │ │ │ │ -Write an automake target for your program as usual. No special libraries are │ │ │ │ │ -needed for you program, beyond what is needed for the grid in question. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridinfo-gmsh-main.hh Source File │ │ │ │ +dune-grid: entitycommhelper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,223 +74,169 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridinfo-gmsh-main.hh
│ │ │ │ +
entitycommhelper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │ -
7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <cstdlib>
│ │ │ │ -
11#include <exception>
│ │ │ │ -
12#include <iostream>
│ │ │ │ -
13#include <memory>
│ │ │ │ -
14#include <ostream>
│ │ │ │ -
15#include <sstream>
│ │ │ │ -
16#include <stdexcept>
│ │ │ │ -
17#include <string>
│ │ │ │ -
18#include <vector>
│ │ │ │ -
19
│ │ │ │ -
20#include <dune/common/classname.hh>
│ │ │ │ -
21#include <dune/common/exceptions.hh>
│ │ │ │ -
22#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -
23
│ │ │ │ - │ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
54#ifdef HEADERCHECK
│ │ │ │ -
55// define so headercheck will run
│ │ │ │ -
56const std::string programName = "headercheck";
│ │ │ │ -
57#endif // HEADERCHECK
│ │ │ │ +
5#ifndef DUNE_ENTITYCOMMHELPER_HH
│ │ │ │ +
6#define DUNE_ENTITYCOMMHELPER_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
13 template< InterfaceType iftype >
│ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16
│ │ │ │ +
17 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
19 {
│ │ │ │ +
│ │ │ │ +
20 static bool send ( const PartitionType p )
│ │ │ │ +
21 {
│ │ │ │ +
22 //return (p == InteriorEntity) || (p == BorderEntity);
│ │ │ │ +
23 return (p == BorderEntity);
│ │ │ │ +
24 }
│ │ │ │ +
│ │ │ │ +
25
│ │ │ │ +
│ │ │ │ +
26 static bool receive ( const PartitionType p )
│ │ │ │ +
27 {
│ │ │ │ +
28 //return (p == InteriorEntity) || (p == BorderEntity);
│ │ │ │ +
29 return (p == BorderEntity);
│ │ │ │ +
30 }
│ │ │ │ +
│ │ │ │ +
31 };
│ │ │ │ +
│ │ │ │ +
32
│ │ │ │ +
33
│ │ │ │ +
34 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {
│ │ │ │ +
│ │ │ │ +
37 static bool send ( const PartitionType p )
│ │ │ │ +
38 {
│ │ │ │ +
39 return (p == InteriorEntity) || (p == BorderEntity);
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
42 static bool receive ( const PartitionType p )
│ │ │ │ +
43 {
│ │ │ │ +
44 //return true;
│ │ │ │ +
45 return (p != InteriorEntity);
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47 };
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49
│ │ │ │ +
50 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
52 {
│ │ │ │ +
│ │ │ │ +
53 static bool send ( const PartitionType p )
│ │ │ │ +
54 {
│ │ │ │ +
55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
│ │ │ │ +
56 return (p != FrontEntity) && (p != GhostEntity);
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │
58
│ │ │ │ -
59#ifndef DOXYGEN
│ │ │ │ -
60namespace {
│ │ │ │ -
61 // anonymous namespace so we don't freakishly conflict with another usage()
│ │ │ │ -
62 // function that may be linked in from another compilation unit.
│ │ │ │ -
63 void usage(std::ostream &stream) {
│ │ │ │ -
64 stream << "USAGE:\n"
│ │ │ │ -
65 << " " << programName << " [-R REFINES] GRIDFILE\n"
│ │ │ │ -
66 << "\n"
│ │ │ │ -
67 << "PARAMETERS:\n"
│ │ │ │ -
68 << " -R REFINES How many global refines to do after reading\n"
│ │ │ │ -
69 << " (default: 0)\n"
│ │ │ │ -
70 << " GRIDFILE Name of the .msh file to read the grid from.\n"
│ │ │ │ -
71 << std::flush;
│ │ │ │ -
72 }
│ │ │ │ -
73
│ │ │ │ -
74 bool prefix_match(const std::string &prefix, const std::string &str)
│ │ │ │ -
75 {
│ │ │ │ -
76 return str.compare(0,prefix.size(), prefix) == 0;
│ │ │ │ -
77 }
│ │ │ │ -
78
│ │ │ │ -
79 void error_argument_required(const std::string &opt) {
│ │ │ │ -
80 std::cerr << "Error: option " << opt << " requires argument\n";
│ │ │ │ -
81 usage(std::cerr);
│ │ │ │ -
82 std::exit(1);
│ │ │ │ -
83 }
│ │ │ │ -
84
│ │ │ │ -
85 void error_unknown_option(const std::string &opt) {
│ │ │ │ -
86 std::cerr << "Error: unknown option: " << opt << "\n";
│ │ │ │ -
87 usage(std::cerr);
│ │ │ │ -
88 std::exit(1);
│ │ │ │ -
89 }
│ │ │ │ +
│ │ │ │ +
59 static bool receive ( const PartitionType p )
│ │ │ │ +
60 {
│ │ │ │ +
61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
│ │ │ │ +
62 return (p != GhostEntity);
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64 };
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
66
│ │ │ │ +
67 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69 {
│ │ │ │ +
│ │ │ │ +
70 static bool send ( const PartitionType p )
│ │ │ │ +
71 {
│ │ │ │ +
72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
│ │ │ │ +
73 return (p != FrontEntity) && (p != GhostEntity);
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
│ │ │ │ +
76 static bool receive ([[maybe_unused]] const PartitionType p)
│ │ │ │ +
77 {
│ │ │ │ +
78 return true;
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
82
│ │ │ │ +
83 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
85 {
│ │ │ │ +
│ │ │ │ +
86 static bool send ([[maybe_unused]] const PartitionType p)
│ │ │ │ +
87 {
│ │ │ │ +
88 return true;
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │
90
│ │ │ │ -
91 void error_parsing_optarg(const std::string &opt, const std::string &error) {
│ │ │ │ -
92 std::cerr << "Error: option " << opt << ": " << error << "\n";
│ │ │ │ -
93 usage(std::cerr);
│ │ │ │ -
94 std::exit(1);
│ │ │ │ -
95 }
│ │ │ │ +
│ │ │ │ +
91 static bool receive ([[maybe_unused]] const PartitionType p)
│ │ │ │ +
92 {
│ │ │ │ +
93 return true;
│ │ │ │ +
94 }
│ │ │ │ +
│ │ │ │ +
95 };
│ │ │ │ +
│ │ │ │
96
│ │ │ │ -
97 template<class T>
│ │ │ │ -
98 void parse(const std::string &arg, T &val) {
│ │ │ │ -
99 std::istringstream s(arg);
│ │ │ │ -
100 s >> val;
│ │ │ │ -
101 bool good = !s.fail();
│ │ │ │ -
102 if(good) {
│ │ │ │ -
103 char dummy;
│ │ │ │ -
104 s >> dummy;
│ │ │ │ -
105 good = s.fail() && s.eof();
│ │ │ │ -
106 }
│ │ │ │ -
107 if(!good) {
│ │ │ │ -
108 std::ostringstream s;
│ │ │ │ -
109 s << "Can't parse \"" << arg << "\" as a " << Dune::className(val);
│ │ │ │ -
110 throw std::runtime_error(s.str());
│ │ │ │ -
111 }
│ │ │ │ -
112 }
│ │ │ │ -
113
│ │ │ │ -
114 std::size_t refines = 0;
│ │ │ │ -
115 std::string gridFileName = "";
│ │ │ │ -
116
│ │ │ │ -
117 void parseOptions(int argc, char **argv) {
│ │ │ │ -
118 std::vector<std::string> params;
│ │ │ │ -
119 for(++argv; *argv; ++argv) {
│ │ │ │ -
120 std::string arg = *argv;
│ │ │ │ -
121 if(prefix_match("-", arg)) {
│ │ │ │ -
122 std::string opt = arg;
│ │ │ │ -
123 if(opt == "--") {
│ │ │ │ -
124 for(++argv; *argv; ++argv)
│ │ │ │ -
125 params.push_back(*argv);
│ │ │ │ -
126 break;
│ │ │ │ -
127 }
│ │ │ │ -
128 else if(prefix_match("-h", opt) || prefix_match("-?", opt) ||
│ │ │ │ -
129 opt == "--help")
│ │ │ │ -
130 {
│ │ │ │ -
131 usage(std::cout);
│ │ │ │ -
132 std::exit(0);
│ │ │ │ -
133 }
│ │ │ │ -
134 else if(opt == "-R" || opt == "--global-refines") {
│ │ │ │ -
135 ++argv;
│ │ │ │ -
136 if(!*argv) error_argument_required(opt);
│ │ │ │ -
137 try { parse(*argv, refines); }
│ │ │ │ -
138 catch(const std::runtime_error &e)
│ │ │ │ -
139 { error_parsing_optarg(opt, e.what()); }
│ │ │ │ -
140 }
│ │ │ │ -
141 else if(prefix_match("-R", opt)) {
│ │ │ │ -
142 try { parse(*argv+std::strlen("-R"), refines); }
│ │ │ │ -
143 catch(const std::runtime_error &e)
│ │ │ │ -
144 { error_parsing_optarg(opt, e.what()); }
│ │ │ │ -
145 }
│ │ │ │ -
146 else if(prefix_match("--global-refines=", opt)) {
│ │ │ │ -
147 try { parse(*argv+std::strlen("--global-refines="), refines); }
│ │ │ │ -
148 catch(const std::runtime_error &e)
│ │ │ │ -
149 { error_parsing_optarg(opt, e.what()); }
│ │ │ │ -
150 }
│ │ │ │ -
151 else
│ │ │ │ -
152 error_unknown_option(opt);
│ │ │ │ -
153 }
│ │ │ │ -
154 else
│ │ │ │ -
155 params.push_back(arg);
│ │ │ │ -
156 }
│ │ │ │ -
157 // check command line arguments
│ │ │ │ -
158 if(params.size() < 1) {
│ │ │ │ -
159 std::cerr << "Need name of a .msh file to read.\n"
│ │ │ │ -
160 << std::endl;
│ │ │ │ -
161 usage(std::cerr);
│ │ │ │ -
162 std::exit(1);
│ │ │ │ -
163 }
│ │ │ │ -
164 if(params.size() > 1) {
│ │ │ │ -
165 std::cerr << "Too many arguments.\n"
│ │ │ │ -
166 << std::endl;
│ │ │ │ -
167 usage(std::cerr);
│ │ │ │ -
168 std::exit(1);
│ │ │ │ -
169 }
│ │ │ │ -
170 gridFileName = params[0];
│ │ │ │ -
171 }
│ │ │ │ -
172}
│ │ │ │ -
173
│ │ │ │ -
174#ifndef HEADERCHECK
│ │ │ │ -
175int main(int argc, char **argv) {
│ │ │ │ -
176 try {
│ │ │ │ -
177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv);
│ │ │ │ -
178
│ │ │ │ -
179 // check that we are not run through mpirun
│ │ │ │ -
180 if(mpiHelper.size() > 1) {
│ │ │ │ -
181 if(mpiHelper.rank() == 0)
│ │ │ │ -
182 std::cerr << programName << ": Sorry, this program works only in "
│ │ │ │ -
183 << "serial." << std::endl;
│ │ │ │ -
184 return 1;
│ │ │ │ -
185 }
│ │ │ │ -
186
│ │ │ │ -
187 parseOptions(argc, argv);
│ │ │ │ -
188
│ │ │ │ -
189 // read grid
│ │ │ │ -
190 typedef Dune::GmshReader<Grid> Reader;
│ │ │ │ -
191 std::shared_ptr<Grid> gridp(Reader::read(gridFileName));
│ │ │ │ -
192 gridp->globalRefine(refines);
│ │ │ │ -
193
│ │ │ │ -
194 // collect information
│ │ │ │ - │ │ │ │ -
196 Dune::fillGridViewInfoSerial(gridp->leafGridView(), gridViewInfo);
│ │ │ │ -
197
│ │ │ │ -
198 // print it
│ │ │ │ -
199 std::cout << gridViewInfo << std::flush;
│ │ │ │ -
200 }
│ │ │ │ -
201 catch(const std::exception &e) {
│ │ │ │ -
202 std::cerr << "Caught exception of type " << Dune::className(e)
│ │ │ │ -
203 << std::endl
│ │ │ │ -
204 << "e.what(): " << e.what() << std::endl;
│ │ │ │ -
205 throw;
│ │ │ │ -
206 }
│ │ │ │ -
207 catch(const Dune::Exception &e) {
│ │ │ │ -
208 std::cerr << "Caught exception of type " << Dune::className(e)
│ │ │ │ -
209 << std::endl
│ │ │ │ -
210 << "Exception message: " << e << std::endl;
│ │ │ │ -
211 throw;
│ │ │ │ -
212 }
│ │ │ │ -
213 catch(const std::string &s) {
│ │ │ │ -
214 std::cerr << "Caught exception of type " << Dune::className(s)
│ │ │ │ -
215 << std::endl
│ │ │ │ -
216 << "Exception message: " << s << std::endl;
│ │ │ │ -
217 throw;
│ │ │ │ -
218 }
│ │ │ │ -
219 catch(...) {
│ │ │ │ -
220 std::cerr << "Caught exception of unknown type" << std::endl;
│ │ │ │ -
221 throw;
│ │ │ │ -
222 }
│ │ │ │ -
223}
│ │ │ │ -
224#endif // !HEADERCHECK
│ │ │ │ -
225#endif // !DOXYGEN
│ │ │ │ -
226
│ │ │ │ -
227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │ -
int main(int argc, char **argv)
Definition recipe-integration.cc:70
│ │ │ │ - │ │ │ │ -
void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)
fill a GridViewInfo structure from a serial grid
Definition utility/gridinfo.hh:214
│ │ │ │ -
Read Gmsh mesh file.
Definition gmshreader.hh:807
│ │ │ │ -
structure to hold information about a certain GridView.
Definition utility/gridinfo.hh:100
│ │ │ │ - │ │ │ │ +
97} // namespace Dune
│ │ │ │ +
98
│ │ │ │ +
99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH
│ │ │ │ + │ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ +
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │ +
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ +
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ +
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ +
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
│ │ │ │ +
@ All_All_Interface
send all and receive all entities
Definition gridenums.hh:91
│ │ │ │ +
@ Overlap_All_Interface
send overlap, receive all entities
Definition gridenums.hh:90
│ │ │ │ +
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition gridenums.hh:89
│ │ │ │ +
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition gridenums.hh:87
│ │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
Definition entitycommhelper.hh:14
│ │ │ │ +
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:26
│ │ │ │ +
static bool send(const PartitionType p)
Definition entitycommhelper.hh:20
│ │ │ │ +
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:42
│ │ │ │ +
static bool send(const PartitionType p)
Definition entitycommhelper.hh:37
│ │ │ │ +
static bool send(const PartitionType p)
Definition entitycommhelper.hh:53
│ │ │ │ +
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:59
│ │ │ │ +
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:76
│ │ │ │ +
static bool send(const PartitionType p)
Definition entitycommhelper.hh:70
│ │ │ │ +
static bool send(const PartitionType p)
Definition entitycommhelper.hh:86
│ │ │ │ +
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:91
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,229 +1,190 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -gridinfo-gmsh-main.hh │ │ │ │ │ +entitycommhelper.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH │ │ │ │ │ -7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ -18#include │ │ │ │ │ -19 │ │ │ │ │ -20#include │ │ │ │ │ -21#include │ │ │ │ │ -22#include │ │ │ │ │ -23 │ │ │ │ │ -24#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ -25#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_g_r_i_d_i_n_f_o_._h_h> │ │ │ │ │ -26 │ │ │ │ │ -54#ifdef HEADERCHECK │ │ │ │ │ -55// define so headercheck will run │ │ │ │ │ -56const std::string programName = "headercheck"; │ │ │ │ │ -57#endif // HEADERCHECK │ │ │ │ │ +5#ifndef DUNE_ENTITYCOMMHELPER_HH │ │ │ │ │ +6#define DUNE_ENTITYCOMMHELPER_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ +12 │ │ │ │ │ +13 template< InterfaceType iftype > │ │ │ │ │ +_1_4 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r; │ │ │ │ │ +15 │ │ │ │ │ +16 │ │ │ │ │ +17 template<> │ │ │ │ │ +_1_8 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e > │ │ │ │ │ +19 { │ │ │ │ │ +_2_0 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +21 { │ │ │ │ │ +22 //return (p == InteriorEntity) || (p == BorderEntity); │ │ │ │ │ +23 return (p == _B_o_r_d_e_r_E_n_t_i_t_y); │ │ │ │ │ +24 } │ │ │ │ │ +25 │ │ │ │ │ +_2_6 static bool _r_e_c_e_i_v_e ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +27 { │ │ │ │ │ +28 //return (p == InteriorEntity) || (p == BorderEntity); │ │ │ │ │ +29 return (p == _B_o_r_d_e_r_E_n_t_i_t_y); │ │ │ │ │ +30 } │ │ │ │ │ +31 }; │ │ │ │ │ +32 │ │ │ │ │ +33 │ │ │ │ │ +34 template<> │ │ │ │ │ +_3_5 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e > │ │ │ │ │ +36 { │ │ │ │ │ +_3_7 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +38 { │ │ │ │ │ +39 return (p == _I_n_t_e_r_i_o_r_E_n_t_i_t_y) || (p == _B_o_r_d_e_r_E_n_t_i_t_y); │ │ │ │ │ +40 } │ │ │ │ │ +41 │ │ │ │ │ +_4_2 static bool _r_e_c_e_i_v_e ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +43 { │ │ │ │ │ +44 //return true; │ │ │ │ │ +45 return (p != _I_n_t_e_r_i_o_r_E_n_t_i_t_y); │ │ │ │ │ +46 } │ │ │ │ │ +47 }; │ │ │ │ │ +48 │ │ │ │ │ +49 │ │ │ │ │ +50 template<> │ │ │ │ │ +_5_1 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e > │ │ │ │ │ +52 { │ │ │ │ │ +_5_3 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +54 { │ │ │ │ │ +55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ +OverlapEntity); │ │ │ │ │ +56 return (p != _F_r_o_n_t_E_n_t_i_t_y) && (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ +57 } │ │ │ │ │ 58 │ │ │ │ │ -59#ifndef DOXYGEN │ │ │ │ │ -60namespace { │ │ │ │ │ -61 // anonymous namespace so we don't freakishly conflict with another usage() │ │ │ │ │ -62 // function that may be linked in from another compilation unit. │ │ │ │ │ -63 void usage(std::ostream &stream) { │ │ │ │ │ -64 stream << "USAGE:\n" │ │ │ │ │ -65 << " " << programName << " [-R REFINES] GRIDFILE\n" │ │ │ │ │ -66 << "\n" │ │ │ │ │ -67 << "PARAMETERS:\n" │ │ │ │ │ -68 << " -R REFINES How many global refines to do after reading\n" │ │ │ │ │ -69 << " (default: 0)\n" │ │ │ │ │ -70 << " GRIDFILE Name of the .msh file to read the grid from.\n" │ │ │ │ │ -71 << std::flush; │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -74 bool prefix_match(const std::string &prefix, const std::string &str) │ │ │ │ │ -75 { │ │ │ │ │ -76 return str.compare(0,prefix.size(), prefix) == 0; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79 void error_argument_required(const std::string &opt) { │ │ │ │ │ -80 std::cerr << "Error: option " << opt << " requires argument\n"; │ │ │ │ │ -81 usage(std::cerr); │ │ │ │ │ -82 std::exit(1); │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -85 void error_unknown_option(const std::string &opt) { │ │ │ │ │ -86 std::cerr << "Error: unknown option: " << opt << "\n"; │ │ │ │ │ -87 usage(std::cerr); │ │ │ │ │ -88 std::exit(1); │ │ │ │ │ +_5_9 static bool _r_e_c_e_i_v_e ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +60 { │ │ │ │ │ +61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ +OverlapEntity) || (p == FrontEntity); │ │ │ │ │ +62 return (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ +63 } │ │ │ │ │ +64 }; │ │ │ │ │ +65 │ │ │ │ │ +66 │ │ │ │ │ +67 template<> │ │ │ │ │ +_6_8 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e > │ │ │ │ │ +69 { │ │ │ │ │ +_7_0 static bool _s_e_n_d ( const _P_a_r_t_i_t_i_o_n_T_y_p_e p ) │ │ │ │ │ +71 { │ │ │ │ │ +72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ +OverlapEntity); │ │ │ │ │ +73 return (p != _F_r_o_n_t_E_n_t_i_t_y) && (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 static bool _r_e_c_e_i_v_e ([[maybe_unused]] const _P_a_r_t_i_t_i_o_n_T_y_p_e p) │ │ │ │ │ +77 { │ │ │ │ │ +78 return true; │ │ │ │ │ +79 } │ │ │ │ │ +80 }; │ │ │ │ │ +81 │ │ │ │ │ +82 │ │ │ │ │ +83 template<> │ │ │ │ │ +_8_4 struct _E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r< _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e > │ │ │ │ │ +85 { │ │ │ │ │ +_8_6 static bool _s_e_n_d ([[maybe_unused]] const _P_a_r_t_i_t_i_o_n_T_y_p_e p) │ │ │ │ │ +87 { │ │ │ │ │ +88 return true; │ │ │ │ │ 89 } │ │ │ │ │ 90 │ │ │ │ │ -91 void error_parsing_optarg(const std::string &opt, const std::string &error) │ │ │ │ │ -{ │ │ │ │ │ -92 std::cerr << "Error: option " << opt << ": " << error << "\n"; │ │ │ │ │ -93 usage(std::cerr); │ │ │ │ │ -94 std::exit(1); │ │ │ │ │ -95 } │ │ │ │ │ +_9_1 static bool _r_e_c_e_i_v_e ([[maybe_unused]] const _P_a_r_t_i_t_i_o_n_T_y_p_e p) │ │ │ │ │ +92 { │ │ │ │ │ +93 return true; │ │ │ │ │ +94 } │ │ │ │ │ +95 }; │ │ │ │ │ 96 │ │ │ │ │ -97 template │ │ │ │ │ -98 void parse(const std::string &arg, T &val) { │ │ │ │ │ -99 std::istringstream s(arg); │ │ │ │ │ -100 s >> val; │ │ │ │ │ -101 bool good = !s.fail(); │ │ │ │ │ -102 if(good) { │ │ │ │ │ -103 char dummy; │ │ │ │ │ -104 s >> dummy; │ │ │ │ │ -105 good = s.fail() && s.eof(); │ │ │ │ │ -106 } │ │ │ │ │ -107 if(!good) { │ │ │ │ │ -108 std::ostringstream s; │ │ │ │ │ -109 s << "Can't parse \"" << arg << "\" as a " << Dune::className(val); │ │ │ │ │ -110 throw std::runtime_error(s.str()); │ │ │ │ │ -111 } │ │ │ │ │ -112 } │ │ │ │ │ -113 │ │ │ │ │ -114 std::size_t refines = 0; │ │ │ │ │ -115 std::string gridFileName = ""; │ │ │ │ │ -116 │ │ │ │ │ -117 void parseOptions(int argc, char **argv) { │ │ │ │ │ -118 std::vector params; │ │ │ │ │ -119 for(++argv; *argv; ++argv) { │ │ │ │ │ -120 std::string arg = *argv; │ │ │ │ │ -121 if(prefix_match("-", arg)) { │ │ │ │ │ -122 std::string opt = arg; │ │ │ │ │ -123 if(opt == "--") { │ │ │ │ │ -124 for(++argv; *argv; ++argv) │ │ │ │ │ -125 params.push_back(*argv); │ │ │ │ │ -126 break; │ │ │ │ │ -127 } │ │ │ │ │ -128 else if(prefix_match("-h", opt) || prefix_match("-?", opt) || │ │ │ │ │ -129 opt == "--help") │ │ │ │ │ -130 { │ │ │ │ │ -131 usage(std::cout); │ │ │ │ │ -132 std::exit(0); │ │ │ │ │ -133 } │ │ │ │ │ -134 else if(opt == "-R" || opt == "--global-refines") { │ │ │ │ │ -135 ++argv; │ │ │ │ │ -136 if(!*argv) error_argument_required(opt); │ │ │ │ │ -137 try { parse(*argv, refines); } │ │ │ │ │ -138 catch(const std::runtime_error &e) │ │ │ │ │ -139 { error_parsing_optarg(opt, e.what()); } │ │ │ │ │ -140 } │ │ │ │ │ -141 else if(prefix_match("-R", opt)) { │ │ │ │ │ -142 try { parse(*argv+std::strlen("-R"), refines); } │ │ │ │ │ -143 catch(const std::runtime_error &e) │ │ │ │ │ -144 { error_parsing_optarg(opt, e.what()); } │ │ │ │ │ -145 } │ │ │ │ │ -146 else if(prefix_match("--global-refines=", opt)) { │ │ │ │ │ -147 try { parse(*argv+std::strlen("--global-refines="), refines); } │ │ │ │ │ -148 catch(const std::runtime_error &e) │ │ │ │ │ -149 { error_parsing_optarg(opt, e.what()); } │ │ │ │ │ -150 } │ │ │ │ │ -151 else │ │ │ │ │ -152 error_unknown_option(opt); │ │ │ │ │ -153 } │ │ │ │ │ -154 else │ │ │ │ │ -155 params.push_back(arg); │ │ │ │ │ -156 } │ │ │ │ │ -157 // check command line arguments │ │ │ │ │ -158 if(params.size() < 1) { │ │ │ │ │ -159 std::cerr << "Need name of a .msh file to read.\n" │ │ │ │ │ -160 << std::endl; │ │ │ │ │ -161 usage(std::cerr); │ │ │ │ │ -162 std::exit(1); │ │ │ │ │ -163 } │ │ │ │ │ -164 if(params.size() > 1) { │ │ │ │ │ -165 std::cerr << "Too many arguments.\n" │ │ │ │ │ -166 << std::endl; │ │ │ │ │ -167 usage(std::cerr); │ │ │ │ │ -168 std::exit(1); │ │ │ │ │ -169 } │ │ │ │ │ -170 gridFileName = params[0]; │ │ │ │ │ -171 } │ │ │ │ │ -172} │ │ │ │ │ -173 │ │ │ │ │ -174#ifndef HEADERCHECK │ │ │ │ │ -175int _m_a_i_n(int argc, char **argv) { │ │ │ │ │ -176 try { │ │ │ │ │ -177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv); │ │ │ │ │ -178 │ │ │ │ │ -179 // check that we are not run through mpirun │ │ │ │ │ -180 if(mpiHelper.size() > 1) { │ │ │ │ │ -181 if(mpiHelper.rank() == 0) │ │ │ │ │ -182 std::cerr << programName << ": Sorry, this program works only in " │ │ │ │ │ -183 << "serial." << std::endl; │ │ │ │ │ -184 return 1; │ │ │ │ │ -185 } │ │ │ │ │ -186 │ │ │ │ │ -187 parseOptions(argc, argv); │ │ │ │ │ -188 │ │ │ │ │ -189 // read grid │ │ │ │ │ -190 typedef _D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_<_G_r_i_d_> Reader; │ │ │ │ │ -191 std::shared_ptr gridp(Reader::read(gridFileName)); │ │ │ │ │ -192 gridp->globalRefine(refines); │ │ │ │ │ -193 │ │ │ │ │ -194 // collect information │ │ │ │ │ -195 _D_u_n_e_:_:_G_r_i_d_V_i_e_w_I_n_f_o_<_G_r_i_d_:_:_c_t_y_p_e_> gridViewInfo; │ │ │ │ │ -196 _D_u_n_e_:_:_f_i_l_l_G_r_i_d_V_i_e_w_I_n_f_o_S_e_r_i_a_l(gridp->leafGridView(), gridViewInfo); │ │ │ │ │ -197 │ │ │ │ │ -198 // print it │ │ │ │ │ -199 std::cout << gridViewInfo << std::flush; │ │ │ │ │ -200 } │ │ │ │ │ -201 catch(const std::exception &e) { │ │ │ │ │ -202 std::cerr << "Caught exception of type " << Dune::className(e) │ │ │ │ │ -203 << std::endl │ │ │ │ │ -204 << "e.what(): " << e.what() << std::endl; │ │ │ │ │ -205 throw; │ │ │ │ │ -206 } │ │ │ │ │ -207 catch(const Dune::Exception &e) { │ │ │ │ │ -208 std::cerr << "Caught exception of type " << Dune::className(e) │ │ │ │ │ -209 << std::endl │ │ │ │ │ -210 << "Exception message: " << e << std::endl; │ │ │ │ │ -211 throw; │ │ │ │ │ -212 } │ │ │ │ │ -213 catch(const std::string &s) { │ │ │ │ │ -214 std::cerr << "Caught exception of type " << Dune::className(s) │ │ │ │ │ -215 << std::endl │ │ │ │ │ -216 << "Exception message: " << s << std::endl; │ │ │ │ │ -217 throw; │ │ │ │ │ -218 } │ │ │ │ │ -219 catch(...) { │ │ │ │ │ -220 std::cerr << "Caught exception of unknown type" << std::endl; │ │ │ │ │ -221 throw; │ │ │ │ │ -222 } │ │ │ │ │ -223} │ │ │ │ │ -224#endif // !HEADERCHECK │ │ │ │ │ -225#endif // !DOXYGEN │ │ │ │ │ -226 │ │ │ │ │ -227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH │ │ │ │ │ -_m_a_i_n │ │ │ │ │ -int main(int argc, char **argv) │ │ │ │ │ -DDeeffiinniittiioonn recipe-integration.cc:70 │ │ │ │ │ -_g_m_s_h_r_e_a_d_e_r_._h_h │ │ │ │ │ -_D_u_n_e_:_:_f_i_l_l_G_r_i_d_V_i_e_w_I_n_f_o_S_e_r_i_a_l │ │ │ │ │ -void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > │ │ │ │ │ -&gridViewInfo) │ │ │ │ │ -fill a GridViewInfo structure from a serial grid │ │ │ │ │ -DDeeffiinniittiioonn utility/gridinfo.hh:214 │ │ │ │ │ -_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r │ │ │ │ │ -Read Gmsh mesh file. │ │ │ │ │ -DDeeffiinniittiioonn gmshreader.hh:807 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_I_n_f_o │ │ │ │ │ -structure to hold information about a certain GridView. │ │ │ │ │ -DDeeffiinniittiioonn utility/gridinfo.hh:100 │ │ │ │ │ -_g_r_i_d_i_n_f_o_._h_h │ │ │ │ │ +97} // namespace Dune │ │ │ │ │ +98 │ │ │ │ │ +99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y │ │ │ │ │ +@ FrontEntity │ │ │ │ │ +on boundary between overlap and ghost │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ +@ InteriorEntity │ │ │ │ │ +all interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +@ GhostEntity │ │ │ │ │ +ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ +@ BorderEntity │ │ │ │ │ +on boundary between interior and overlap │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ InteriorBorder_All_Interface │ │ │ │ │ +send interior and border, receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ All_All_Interface │ │ │ │ │ +send all and receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ Overlap_All_Interface │ │ │ │ │ +send overlap, receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ Overlap_OverlapFront_Interface │ │ │ │ │ +send overlap, receive overlap and front entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ InteriorBorder_InteriorBorder_Interface │ │ │ │ │ +send/receive interior and border entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:87 │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +Include standard header files. │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:14 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ +static bool receive(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ +static bool send(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ +static bool receive(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ +static bool send(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ +static bool send(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ +static bool receive(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ +static bool receive(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ +static bool send(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_s_e_n_d │ │ │ │ │ +static bool send(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_C_o_m_m_H_e_l_p_e_r_<_ _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e_ _>_:_:_r_e_c_e_i_v_e │ │ │ │ │ +static bool receive(const PartitionType p) │ │ │ │ │ +DDeeffiinniittiioonn entitycommhelper.hh:91 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01022.html │ │ │ │ @@ -97,31 +97,31 @@ │ │ │ │ #include <dune/common/math.hh>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ #include <dune/common/reservedvector.hh>
│ │ │ │ #include <dune/common/parallel/communication.hh>
│ │ │ │ #include <dune/common/parallel/mpihelper.hh>
│ │ │ │ #include <dune/geometry/axisalignedcubegeometry.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/indexidset.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/indexidset.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ #include <dune/common/parallel/mpicommunication.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/coordinates.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/torus.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/ygrid.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridgeometry.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridentity.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridintersection.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/coordinates.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/torus.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/ygrid.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridgeometry.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridentity.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridintersection.hh>
│ │ │ │ #include <dune/grid/yaspgrid/yaspgridintersectioniterator.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridhierarchiciterator.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridentityseed.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridleveliterator.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridindexsets.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgrididset.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>
│ │ │ │ -#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridhierarchiciterator.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridentityseed.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridleveliterator.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridindexsets.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgrididset.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>
│ │ │ │ +#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>
│ │ │ │ #include <dune/grid/yaspgrid/backuprestore.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html │ │ │ │ @@ -104,16 +104,16 @@ │ │ │ │
21#include <dune/common/math.hh>
│ │ │ │
22#include <dune/common/typetraits.hh>
│ │ │ │
23#include <dune/common/reservedvector.hh>
│ │ │ │
24#include <dune/common/parallel/communication.hh>
│ │ │ │
25#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
26#include <dune/geometry/axisalignedcubegeometry.hh>
│ │ │ │
27#include <dune/geometry/type.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
30
│ │ │ │
31
│ │ │ │
32#if HAVE_MPI
│ │ │ │
33#include <dune/common/parallel/mpicommunication.hh>
│ │ │ │
34#endif
│ │ │ │
35
│ │ │ │
43namespace Dune {
│ │ │ │ @@ -137,27 +137,27 @@ │ │ │ │
61 template<class GridImp> class YaspHierarchicIterator;
│ │ │ │
62 template<class GridImp, bool isLeafIndexSet> class YaspIndexSet;
│ │ │ │
63 template<class GridImp> class YaspGlobalIdSet;
│ │ │ │
64 template<class GridImp> class YaspPersistentContainerIndex;
│ │ │ │
65
│ │ │ │
66} // namespace Dune
│ │ │ │
67
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
81
│ │ │ │
82namespace Dune {
│ │ │ │
83
│ │ │ │
84#if HAVE_MPI
│ │ │ │
85 using YaspCommunication = Communication<MPI_Comm>;
│ │ │ │
86#else
│ │ │ │
87 using YaspCommunication = Communication<No_Comm>;
│ │ │ │ @@ -2065,35 +2065,35 @@ │ │ │ │
2069 };
│ │ │ │
2070
│ │ │ │
2071 }
│ │ │ │
2072
│ │ │ │
2073} // end namespace
│ │ │ │
2074
│ │ │ │
2075// Include the specialization of the StructuredGridFactory class for YaspGrid
│ │ │ │ - │ │ │ │ + │ │ │ │
2077// Include the specialization of the BackupRestoreFacility class for YaspGrid
│ │ │ │ │ │ │ │
2079
│ │ │ │
2080#endif
│ │ │ │ +
level-wise, non-persistent, consecutive indices for YaspGrid
│ │ │ │
The YaspIntersectionIterator class.
│ │ │ │ - │ │ │ │ -
The YaspGeometry class and its specializations.
│ │ │ │ -
This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the...
│ │ │ │ -
Specialization of the StructuredGridFactory class for YaspGrid.
│ │ │ │ -
The YaspEntitySeed class.
│ │ │ │ -
This provides a YGrid, the elemental component of the yaspgrid implementation.
│ │ │ │ -
Specialization of the PersistentContainer for YaspGrid.
│ │ │ │ -
the YaspEntity class and its specializations
│ │ │ │ -
The YaspIntersection class.
│ │ │ │ - │ │ │ │ -
level-wise, non-persistent, consecutive indices for YaspGrid
│ │ │ │ -
This file provides the infrastructure for toroidal communication in YaspGrid.
│ │ │ │ -
The YaspLevelIterator class.
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ + │ │ │ │ +
Specialization of the PersistentContainer for YaspGrid.
│ │ │ │ +
This provides a YGrid, the elemental component of the yaspgrid implementation.
│ │ │ │ +
The YaspGeometry class and its specializations.
│ │ │ │ +
This file provides the infrastructure for toroidal communication in YaspGrid.
│ │ │ │ + │ │ │ │ +
This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the...
│ │ │ │ +
the YaspEntity class and its specializations
│ │ │ │ +
The YaspLevelIterator class.
│ │ │ │ +
Specialization of the StructuredGridFactory class for YaspGrid.
│ │ │ │ +
The YaspIntersection class.
│ │ │ │ +
The YaspEntitySeed class.
│ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ │
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ │
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ │
@ Overlap_Partition
interior, border, and overlap entities
Definition gridenums.hh:139
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2094,46 +2094,46 @@ │ │ │ │ │ YaspGrid │ │ │ │ │ 2076#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_/_s_t_r_u_c_t_u_r_e_d_y_a_s_p_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ 2077// Include the specialization of the BackupRestoreFacility class for │ │ │ │ │ YaspGrid │ │ │ │ │ 2078#include <_d_u_n_e_/_g_r_i_d_/_y_a_s_p_g_r_i_d_/_b_a_c_k_u_p_r_e_s_t_o_r_e_._h_h> │ │ │ │ │ 2079 │ │ │ │ │ 2080#endif │ │ │ │ │ +_y_a_s_p_g_r_i_d_i_n_d_e_x_s_e_t_s_._h_h │ │ │ │ │ +level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ │ │ _y_a_s_p_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ The YaspIntersectionIterator class. │ │ │ │ │ -_y_a_s_p_g_r_i_d_i_d_s_e_t_._h_h │ │ │ │ │ +_y_a_s_p_g_r_i_d_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_y_a_s_p_g_r_i_d_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h │ │ │ │ │ +Specialization of the PersistentContainer for YaspGrid. │ │ │ │ │ +_y_g_r_i_d_._h_h │ │ │ │ │ +This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ _y_a_s_p_g_r_i_d_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ The YaspGeometry class and its specializations. │ │ │ │ │ +_t_o_r_u_s_._h_h │ │ │ │ │ +This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ │ +_y_a_s_p_g_r_i_d_i_d_s_e_t_._h_h │ │ │ │ │ _c_o_o_r_d_i_n_a_t_e_s_._h_h │ │ │ │ │ This provides container classes for the coordinates to be used in YaspGrid Upon │ │ │ │ │ implementation of the... │ │ │ │ │ -_s_t_r_u_c_t_u_r_e_d_y_a_s_p_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ -Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ │ -_y_a_s_p_g_r_i_d_e_n_t_i_t_y_s_e_e_d_._h_h │ │ │ │ │ -The YaspEntitySeed class. │ │ │ │ │ -_y_g_r_i_d_._h_h │ │ │ │ │ -This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ -_y_a_s_p_g_r_i_d_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h │ │ │ │ │ -Specialization of the PersistentContainer for YaspGrid. │ │ │ │ │ _y_a_s_p_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ │ the YaspEntity class and its specializations │ │ │ │ │ -_y_a_s_p_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ -The YaspIntersection class. │ │ │ │ │ -_y_a_s_p_g_r_i_d_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_y_a_s_p_g_r_i_d_i_n_d_e_x_s_e_t_s_._h_h │ │ │ │ │ -level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ │ │ -_t_o_r_u_s_._h_h │ │ │ │ │ -This file provides the infrastructure for toroidal communication in YaspGrid. │ │ │ │ │ _y_a_s_p_g_r_i_d_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ The YaspLevelIterator class. │ │ │ │ │ +_s_t_r_u_c_t_u_r_e_d_y_a_s_p_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ │ +_y_a_s_p_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +The YaspIntersection class. │ │ │ │ │ +_y_a_s_p_g_r_i_d_e_n_t_i_t_y_s_e_e_d_._h_h │ │ │ │ │ +The YaspEntitySeed class. │ │ │ │ │ +_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ +Provides base classes for index and id sets. │ │ │ │ │ _d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ DataHandles. │ │ │ │ │ -_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ -Provides base classes for index and id sets. │ │ │ │ │ _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ │ write a PartitionType to a stream │ │ │ │ │ DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ │ _D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n │ │ │ │ │ CommunicationDirection │ │ │ │ │ Define a type for communication direction parameter. │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01031.html │ │ │ │ @@ -171,16 +171,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::YaspGridFamily< dim, Coordinates >
enum Dune::CommunicationDirection
│ │ │ │
│ │ │ │ │ │ │ │

Define a type for communication direction parameter.

│ │ │ │ -
│ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
Enumerator
ForwardCommunication 

communicate as given in InterfaceType

│ │ │ │
BackwardCommunication 

reverse communication direction

│ │ │ │
│ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │ │ │ │ │ enum Dune::InterfaceType │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Parameter to be used for the communication functions.

│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -224,15 +224,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
InteriorBorder_InteriorBorder_Interface 

send/receive interior and border entities

│ │ │ │
InteriorBorder_All_Interface 

send interior and border, receive all entities

│ │ │ │
Overlap_OverlapFront_Interface 

send overlap, receive overlap and front entities

│ │ │ │
enum Dune::PartitionIteratorType
│ │ │ │
│ │ │ │ │ │ │ │

Parameter to be used for the parallel level- and leaf iterators.

│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -255,15 +255,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
Interior_Partition 

only interior entities

│ │ │ │
InteriorBorder_Partition 

interior and border entities

│ │ │ │
Overlap_Partition 

interior, border, and overlap entities

│ │ │ │
enum Dune::PartitionType
│ │ │ │
│ │ │ │ │ │ │ │

Attributes used in the generic overlap model.

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

The values are ordered intentionally in order to be able to define ranges of partition types.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
InteriorEntity 

all interior entities

│ │ │ │
BorderEntity 

on boundary between interior and overlap

│ │ │ │
OverlapEntity 

all entities lying in the overlap zone

│ │ │ │ @@ -308,15 +308,15 @@ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │

write an InterfaceType to a stream

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

◆ operator<<() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -347,15 +347,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

write a PartitionIteratorType to a stream

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

◆ operator<<() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -386,15 +386,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

write a PartitionType to a stream

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

◆ PartitionName()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -415,15 +415,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Provide names for the partition types.

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

◆ partitionSet()

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01055.html │ │ │ │ @@ -84,19 +84,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

file  boundaryiterators.hh
 Functions for VTK output on the skeleton.
file  boundaryiterators.hh
 Functions for VTK output on the skeleton.
 
file  skeletonfunction.hh
 Functions for VTK output on the skeleton.
file  skeletonfunction.hh
 Functions for VTK output on the skeleton.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune::VTK
 
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01064.html │ │ │ │ @@ -223,33 +223,33 @@ │ │ │ │ │ │ │ │ │ │ │ │
struct  Twist< dim, 2 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Typedefs

typedef Dune::IndexStack< int, 100000 > IndexStack
 
typedef ALBERTA REAL Real
typedef ALBERTA REAL Real
 
typedef ALBERTA REAL_B LocalVector
typedef ALBERTA REAL_B LocalVector
 
typedef ALBERTA REAL_D GlobalVector
typedef ALBERTA REAL_D GlobalVector
 
typedef ALBERTA REAL_DD GlobalMatrix
typedef ALBERTA REAL_DD GlobalMatrix
 
typedef ALBERTA AFF_TRAFO AffineTransformation
typedef ALBERTA AFF_TRAFO AffineTransformation
 
typedef ALBERTA MESH Mesh
typedef ALBERTA MESH Mesh
 
typedef ALBERTA EL Element
typedef ALBERTA EL Element
 
typedef ALBERTA BNDRY_TYPE BoundaryId
typedef ALBERTA BNDRY_TYPE BoundaryId
 
typedef U_CHAR ElementType
 
typedef ALBERTA FE_SPACE DofSpace
typedef ALBERTA FE_SPACE DofSpace
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -317,15 +317,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Functions

template<class K >
static FieldVector< K, 3 > vectorProduct (const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
 
int applyInverseTwist (int twist, int i)
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -336,57 +336,57 @@ │ │ │ │ │ │ │ │

◆ AffineTransformation

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

│ │ │ │ Variables

static void * adaptationDataHandler_
 
static const int dimWorld = DIM_OF_WORLD
static const int dimWorld = DIM_OF_WORLD
 
static const int meshRefined = MESH_REFINED
 
static const int meshCoarsened = MESH_COARSENED
 
static const int InteriorBoundary = INTERIOR
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA AFF_TRAFO Dune::Alberta::AffineTransformationtypedef ALBERTA AFF_TRAFO Dune::Alberta::AffineTransformation
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ BoundaryId

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA BNDRY_TYPE Dune::Alberta::BoundaryIdtypedef ALBERTA BNDRY_TYPE Dune::Alberta::BoundaryId
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ DofSpace

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA FE_SPACE Dune::Alberta::DofSpacetypedef ALBERTA FE_SPACE Dune::Alberta::DofSpace
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Element

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA EL Dune::Alberta::Elementtypedef ALBERTA EL Dune::Alberta::Element
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -406,29 +406,29 @@ │ │ │ │ │ │ │ │

◆ GlobalMatrix

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA REAL_DD Dune::Alberta::GlobalMatrixtypedef ALBERTA REAL_DD Dune::Alberta::GlobalMatrix
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GlobalVector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA REAL_D Dune::Alberta::GlobalVectortypedef ALBERTA REAL_D Dune::Alberta::GlobalVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -448,43 +448,43 @@ │ │ │ │ │ │ │ │

◆ LocalVector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA REAL_B Dune::Alberta::LocalVectortypedef ALBERTA REAL_B Dune::Alberta::LocalVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Mesh

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA MESH Dune::Alberta::Meshtypedef ALBERTA MESH Dune::Alberta::Mesh
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Real

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA REAL Dune::Alberta::Realtypedef ALBERTA REAL Dune::Alberta::Real
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Function Documentation

│ │ │ │ @@ -1271,15 +1271,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
const int Dune::Alberta::dimWorld = DIM_OF_WORLDconst int Dune::Alberta::dimWorld = DIM_OF_WORLD
│ │ │ │
│ │ │ │ static
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01075.html │ │ │ │ @@ -261,16 +261,16 @@ │ │ │ │ │ │ │ │ enum Dune::VTK::DataMode │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Whether to produce conforming or non-conforming output.

│ │ │ │ -
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ +
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │

This applies to the conformity of the data; a non-conforming grid can still be written in conforming data mode, and it is quite possible for data to be non-conforming on a conforming grid.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
conforming 

Output conforming data.

│ │ │ │

Neighboring elements share common vertices and thus have a common DoF on that vertex.

│ │ │ │
nonconforming 

Output non-conforming data.

│ │ │ │

Each element has its own set of vertices. The position of a vertex of one element will coincide with the position of the corresponding vertex on another element. This allows for multiple DoFs (one per element) on the "same" vertex.

│ │ │ │ @@ -288,15 +288,15 @@ │ │ │ │
enum Dune::VTK::FileType
│ │ │ │
│ │ │ │ │ │ │ │

which type of VTK file to write

│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
Enumerator
polyData 

for .vtp files (PolyData)

│ │ │ │
unstructuredGrid 

for .vtu files (UnstructuredGrid)

│ │ │ │
│ │ │ │ │ │ │ │ @@ -311,15 +311,15 @@ │ │ │ │ │ │ │ │ enum Dune::VTK::GeometryType │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Type representing VTK's entity geometry types.

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

Only the types which have a corresponding Dune::GeometryType have been included here. Dune-type names have been used, this mainly makes a difference for vtkPrism, which is known by VTK as VTK_WEDGE.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
vertex 
line 
triangle 
polygon 
quadrilateral 
enum Dune::VTK::OutputType
│ │ │ │
│ │ │ │ │ │ │ │

How the bulk data should be stored in the file.

│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -376,15 +376,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
ascii 

Output to the file is in ascii.

│ │ │ │
base64 

Output to the file is inline base64 binary.

│ │ │ │
appendedraw 

Output is to the file is appended raw binary.

│ │ │ │
│ │ │ │ strong
│ │ │ │
│ │ │ │ │ │ │ │

which precision to use when writing out data to vtk files

│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
int32 
uint8 
uint32 
float32 
float64 
│ │ │ │ @@ -413,15 +413,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

mapping from GeometryType to VTKGeometryType

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

◆ getEndiannessString()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -480,15 +480,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

renumber VTK <-> Dune

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

Since the renumbering never does anything more complex than exchanging two indices, this method works both ways.

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

◆ renumber() [2/2]

│ │ │ │ │ │ │ │ @@ -514,15 +514,15 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

renumber VTK <-> Dune

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

This function is just a convenience shortcut function wrapping renumber(const GeometryType&, int).

│ │ │ │
Parameters
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
tEntity, Intersection or Geometry to do the renumbering in. Basically, anything with a method type() returning a GeometryType should work here.
iIndex to of corner in either Dune or VTK numbering (the result will be in the other numbering)
│ │ │ │
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01894.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::DGFGridFactory< G > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgridfactory.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgridfactory.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DGFGridFactory< G >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -489,16 +489,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01898.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::AlbertaGrid< dim, dimworld > Class Template Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

[ provides Dune::Grid ] │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/agrid.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/agrid.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGrid< dim, dimworld >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -257,15 +257,15 @@ │ │ │ │   │ │ │ │ const GlobalIdSetglobalIdSet () const │ │ │ │  return global IdSet
│ │ │ │   │ │ │ │ const LocalIdSetlocalIdSet () const │ │ │ │  return local IdSet
│ │ │ │   │ │ │ │ -ALBERTA MESHgetMesh () const │ │ │ │ +ALBERTA MESHgetMesh () const │ │ │ │   │ │ │ │ const MeshPointermeshPointer () const │ │ │ │   │ │ │ │ const DofNumberingdofNumbering () const │ │ │ │   │ │ │ │ const LevelProviderlevelProvider () const │ │ │ │   │ │ │ │ @@ -1502,15 +1502,15 @@ │ │ │ │
│ │ │ │ template<int dim, int dimworld = Alberta::dimWorld>
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ALBERTA MESH * Dune::AlbertaGrid< dim, dimworld >::getMesh ALBERTA MESH * Dune::AlbertaGrid< dim, dimworld >::getMesh () const
│ │ │ │
│ │ │ │ @@ -3049,16 +3049,16 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01910.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::AlbertaReader< Grid > Class Template Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/albertareader.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/albertareader.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -251,15 +251,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Dune::GridFactory< GridGridFactory
 
typedef Grid::ctype ctype
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01950.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::CoordCache< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/coordcache.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/coordcache.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -320,15 +320,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Interpolation
 
class  LocalCaching
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01954.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::CoordCache< dim >::LocalCaching Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/coordcache.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/coordcache.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -144,15 +144,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 LocalCaching (const CoordVectorPointer &coords)
 
void operator() (const ElementInfo &elementInfo) const
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01958.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::CoordCache< dim >::Interpolation Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/coordcache.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/coordcache.hh>

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

│ │ │ │ Public Types

typedef Alberta::Patch< dimensionPatch
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01978.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::MeshPointer< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/meshpointer.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/meshpointer.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::MeshPointer< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -778,16 +778,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01982.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofAccess< dim, codim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofadmin.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofadmin.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::DofAccess< dim, codim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -435,15 +435,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01986.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::HierarchyDofNumbering< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofadmin.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofadmin.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::HierarchyDofNumbering< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -523,15 +523,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01998.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Alberta::DofVectorProvider< Dof > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02002.html │ │ │ │ @@ -77,19 +77,19 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofVectorProvider< int > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofvector.hh>

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

│ │ │ │ Public Types

typedef ALBERTA DOF_INT_VEC DofVector
typedef ALBERTA DOF_INT_VEC DofVector
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │

◆ DofVector

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

│ │ │ │ Static Public Member Functions

static DofVectorget (const DofSpace *dofSpace, const std::string &name)
 
static void free (DofVector *dofVector)
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA DOF_INT_VEC Dune::Alberta::DofVectorProvider< int >::DofVectortypedef ALBERTA DOF_INT_VEC Dune::Alberta::DofVectorProvider< int >::DofVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02006.html │ │ │ │ @@ -77,19 +77,19 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofVectorProvider< signed char > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofvector.hh>

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

│ │ │ │ Public Types

typedef ALBERTA DOF_SCHAR_VEC DofVector
typedef ALBERTA DOF_SCHAR_VEC DofVector
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │

◆ DofVector

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

│ │ │ │ Static Public Member Functions

static DofVectorget (const DofSpace *dofSpace, const std::string &name)
 
static void free (DofVector *dofVector)
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA DOF_SCHAR_VEC Dune::Alberta::DofVectorProvider< signed char >::DofVectortypedef ALBERTA DOF_SCHAR_VEC Dune::Alberta::DofVectorProvider< signed char >::DofVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02010.html │ │ │ │ @@ -77,19 +77,19 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofVectorProvider< unsigned char > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofvector.hh>

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

│ │ │ │ Public Types

typedef ALBERTA DOF_UCHAR_VEC DofVector
typedef ALBERTA DOF_UCHAR_VEC DofVector
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │

◆ DofVector

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

│ │ │ │ Static Public Member Functions

static DofVectorget (const DofSpace *dofSpace, const std::string &name)
 
static void free (DofVector *dofVector)
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA DOF_UCHAR_VEC Dune::Alberta::DofVectorProvider< unsigned char >::DofVectortypedef ALBERTA DOF_UCHAR_VEC Dune::Alberta::DofVectorProvider< unsigned char >::DofVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02014.html │ │ │ │ @@ -77,19 +77,19 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofVectorProvider< Real > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofvector.hh>

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

│ │ │ │ Public Types

typedef ALBERTA DOF_REAL_VEC DofVector
typedef ALBERTA DOF_REAL_VEC DofVector
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │

◆ DofVector

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

│ │ │ │ Static Public Member Functions

static DofVectorget (const DofSpace *dofSpace, const std::string &name)
 
static void free (DofVector *dofVector)
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA DOF_REAL_VEC Dune::Alberta::DofVectorProvider< Real >::DofVectortypedef ALBERTA DOF_REAL_VEC Dune::Alberta::DofVectorProvider< Real >::DofVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02018.html │ │ │ │ @@ -77,19 +77,19 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofVectorProvider< GlobalVector > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofvector.hh>

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

│ │ │ │ Public Types

typedef ALBERTA DOF_REAL_D_VEC DofVector
typedef ALBERTA DOF_REAL_D_VEC DofVector
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │

◆ DofVector

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

│ │ │ │ Static Public Member Functions

static DofVectorget (const DofSpace *dofSpace, const std::string &name)
 
static void free (DofVector *dofVector)
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA DOF_REAL_D_VEC Dune::Alberta::DofVectorProvider< GlobalVector >::DofVectortypedef ALBERTA DOF_REAL_D_VEC Dune::Alberta::DofVectorProvider< GlobalVector >::DofVector
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02022.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::DofVectorPointer< Dof > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/dofvector.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::DofVectorPointer< Dof >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -730,15 +730,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02026.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::ElementInfo< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::ElementInfo< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -197,24 +197,24 @@ │ │ │ │   │ │ │ │ const Elementelement () const │ │ │ │   │ │ │ │ const Elementneighbor (int face) const │ │ │ │   │ │ │ │ Elementel () const │ │ │ │   │ │ │ │ -ALBERTA EL_INFO & elInfo () const │ │ │ │ +ALBERTA EL_INFO & elInfo () const │ │ │ │   │ │ │ │ int type () const │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static ElementInfo createFake (const MeshPointer &mesh, const Element *element, int level, int type=0)
 
static ElementInfo createFake (const ALBERTA EL_INFO &elInfo)
static ElementInfo createFake (const ALBERTA EL_INFO &elInfo)
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -613,15 +613,15 @@ │ │ │ │

│ │ │ │ Static Public Attributes

static const int dimension = dim
 
static const int numVertices = NumSubEntities< dimension, dimension >::value
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -743,15 +743,15 @@ │ │ │ │
│ │ │ │ template<int dim>
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ElementInfo< dim > Dune::Alberta::ElementInfo< dim >::createFake (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
│ │ │ │
│ │ │ │ inlinestatic
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ALBERTA EL_INFO & Dune::Alberta::ElementInfo< dim >::elInfo ALBERTA EL_INFO & Dune::Alberta::ElementInfo< dim >::elInfo () const
│ │ │ │
│ │ │ │ @@ -1698,15 +1698,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02034.html │ │ │ │ @@ -77,24 +77,24 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::ElementInfo< dim >::Instance Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/elementinfo.hh>

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

│ │ │ │ Public Member Functions

InstancePtrparent ()
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Attributes

ALBERTA EL_INFO elInfo
ALBERTA EL_INFO elInfo
 
unsigned int refCount
 
Alberta::GeometryCache< dim > geometryCache
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -131,15 +131,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ template<int dim>
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
ALBERTA EL_INFO Dune::Alberta::ElementInfo< dim >::Instance::elInfoALBERTA EL_INFO Dune::Alberta::ElementInfo< dim >::Instance::elInfo
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -171,15 +171,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02038.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ElementInfo< dim >::Stack Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -230,15 +230,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Stack ()
 
 ~Stack ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02042.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ElementInfo< dim >::Seed Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/elementinfo.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -455,15 +455,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Seed ()
 
 Seed (const int macroIndex, const int level, const unsigned long path)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02046.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/treeiterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/treeiterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -674,15 +674,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02050.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridHierarchicIterator< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/hierarchiciterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/hierarchiciterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -541,15 +541,15 @@ │ │ │ │ │ │ │ │

assignment operator

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02054.html │ │ │ │ @@ -1491,15 +1491,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02062.html │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -468,15 +468,15 @@ │ │ │ │
│ │ │ │ template<int codim, int dim, class Grid >
│ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< 0 >::Entity Entity
 
typedef GridImp::ctype ctype
 
 
EntitySeed seed () const
 obtain entity seed
 
unsigned int subEntities (unsigned int cd) const
 Obtain the number of subentities of a given codimension.
 
ALBERTA EL_INFOgetElInfo () const
ALBERTA EL_INFOgetElInfo () const
 needed for the LevelIterator and LeafIterator
 
const ElementInfoelementInfo () const
 
bool equals (const This &other) const
 equality of entities
 
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ALBERTA EL_INFO * Dune::AlbertaGridEntity< codim, dim, Grid >::getElInfo ALBERTA EL_INFO * Dune::AlbertaGridEntity< codim, dim, Grid >::getElInfo () const
│ │ │ │
│ │ │ │ @@ -867,15 +867,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02070.html │ │ │ │ @@ -190,15 +190,15 @@ │ │ │ │   │ │ │ │ PartitionType partitionType () const │ │ │ │  return partition type of this entity
│ │ │ │   │ │ │ │ bool equals (const This &i) const │ │ │ │  equality of entities
│ │ │ │   │ │ │ │ -ALBERTA EL_INFO * getElInfo () const │ │ │ │ +ALBERTA EL_INFO * getElInfo () const │ │ │ │   │ │ │ │ const ElementInfoelementInfo () const │ │ │ │   │ │ │ │ void clearElement () │ │ │ │   │ │ │ │ void setElement (const ElementInfo &elementInfo, int subEntity) │ │ │ │   │ │ │ │ @@ -689,15 +689,15 @@ │ │ │ │
│ │ │ │ template<int dim, class Grid >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ALBERTA EL_INFO * Dune::AlbertaGridEntity< 0, dim, Grid >::getElInfo ALBERTA EL_INFO * Dune::AlbertaGridEntity< 0, dim, Grid >::getElInfo () const
│ │ │ │
│ │ │ │ @@ -1478,15 +1478,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02090.html │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02094.html │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02102.html │ │ │ │ @@ -1036,15 +1036,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02114.html │ │ │ │ @@ -427,15 +427,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02122.html │ │ │ │ @@ -77,32 +77,32 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::GeometryCache< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/geometrycache.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/geometrycache.hh>

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

│ │ │ │ Public Types

typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
 
typedef FieldMatrix< Real, dim, dimWorldJacobianTransposed
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 GeometryCache ()
 
const RealintegrationElement (const ALBERTA EL_INFO &elInfo)
const RealintegrationElement (const ALBERTA EL_INFO &elInfo)
 
const JacobianTransposedjacobianTransposed (const ALBERTA EL_INFO &elInfo)
const JacobianTransposedjacobianTransposed (const ALBERTA EL_INFO &elInfo)
 
const JacobianInverseTransposedjacobianInverseTransposed (const ALBERTA EL_INFO &elInfo)
const JacobianInverseTransposedjacobianInverseTransposed (const ALBERTA EL_INFO &elInfo)
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ JacobianInverseTransposed

│ │ │ │ │ │ │ │
│ │ │ │ @@ -173,15 +173,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -201,15 +201,15 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
const Real & Dune::Alberta::GeometryCache< dim >::integrationElement (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
│ │ │ │
│ │ │ │ inline
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -229,30 +229,30 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
const JacobianInverseTransposed & Dune::Alberta::GeometryCache< dim >::jacobianInverseTransposed (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
│ │ │ │
│ │ │ │ inline
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
const JacobianTransposed & Dune::Alberta::GeometryCache< dim >::jacobianTransposed (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
│ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02126.html │ │ │ │ @@ -77,26 +77,26 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::GeometryCacheProxy< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/geometrycache.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/geometrycache.hh>

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

│ │ │ │ Public Types

typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
 
typedef FieldMatrix< Real, dim, dimWorldJacobianTransposed
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 GeometryCacheProxy (GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
 GeometryCacheProxy (GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
 
const RealintegrationElement ()
 
const JacobianTransposedjacobianTransposed ()
 
const JacobianInverseTransposedjacobianInverseTransposed ()
 
(GeometryCache< dim > & geometryCache,
const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo 
)
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02130.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeometryReference< Implementation > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/geometryreference.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/geometryreference.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GeometryReference< Implementation >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -728,15 +728,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02134.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LocalGeometryReference< mydim, cdim, Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/geometryreference.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/geometryreference.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalGeometryReference< mydim, cdim, Grid >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -738,15 +738,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02154.html │ │ │ │ @@ -916,15 +916,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02166.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridLeafIterator< codim, pitype, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/leafiterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/leafiterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -613,15 +613,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02170.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridLevelIterator< codim, pitype, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/leveliterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/leveliterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -613,15 +613,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02250.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::IndexStack< T, length > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/indexstack.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/indexstack.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -439,15 +439,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

test stack functionality

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

│ │ │ │ Public Member Functions

 IndexStack ()
 Constructor, create new IndexStack.
 
 ~IndexStack ()
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02262.html │ │ │ │ @@ -450,15 +450,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02266.html │ │ │ │ @@ -1018,15 +1018,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02278.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/leafiterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/leafiterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -612,15 +612,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02282.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridLevelProvider< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/level.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/level.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGridLevelProvider< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02290.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::AlbertaGridLevelProvider< dim >::SetLocal Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/level.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/level.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -144,15 +144,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 SetLocal (const DofVectorPointer &level)
 
void operator() (const Alberta::ElementInfo< dim > &elementInfo) const
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02294.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/level.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/level.hh>

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

│ │ │ │ Public Member Functions

 CalcMaxLevel ()
 
void operator() (const Level &dof)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02298.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridLevelProvider< dim >::Interpolation Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/level.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/level.hh>

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

│ │ │ │ Public Types

typedef Alberta::Patch< dimensionPatch
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02302.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/leveliterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/leveliterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -612,15 +612,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02306.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::MacroData< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/macrodata.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/macrodata.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::MacroData< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -904,15 +904,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02310.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::MacroData< dim >::Library< int > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/macrodata.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/macrodata.hh>

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

│ │ │ │ Public Types

typedef Alberta::MacroData< dim > MacroData
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -308,16 +308,16 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02314.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::MacroElement< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/macroelement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/macroelement.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::MacroElement< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02322.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::MeshPointer< dim >::MacroIterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/meshpointer.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/meshpointer.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -448,15 +448,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Alberta::MeshPointer< dim > MeshPointer
 
typedef Alberta::ElementInfo< dim > ElementInfo
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02326.html │ │ │ │ @@ -73,27 +73,27 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::AlbertaError Class Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaError:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02330.html │ │ │ │ @@ -73,27 +73,27 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::AlbertaIOError Class Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaIOError:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02334.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::GlobalSpace Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -174,15 +174,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GlobalMatrix Matrix
 
typedef GlobalVector Vector
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02338.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Alberta::NumSubEntities< dim, codim > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02342.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::NumSubEntities< dim, 0 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 1
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02346.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::NumSubEntities< dim, dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = dim+1
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02350.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::NumSubEntities< 0, 0 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 1
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02354.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::NumSubEntities< 2, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 3
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02358.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::NumSubEntities< 3, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 4
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02362.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::NumSubEntities< 3, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 6
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02366.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Alberta::CodimType< dim, codim > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02370.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::CodimType< dim, 0 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = CENTER
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02374.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::CodimType< dim, dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = VERTEX
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02378.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::CodimType< 2, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = EDGE
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02382.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::CodimType< 3, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = FACE
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02386.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::CodimType< 3, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = EDGE
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02390.html │ │ │ │ @@ -77,19 +77,19 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::FillFlags< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Public Types

typedef ALBERTA FLAGS Flags
typedef ALBERTA FLAGS Flags
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,15 +119,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ template<int dim>
│ │ │ │

│ │ │ │ Static Public Attributes

static const Flags nothing = FILL_NOTHING
 
static const Flags coords = FILL_COORDS
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA FLAGS Dune::Alberta::FillFlags< dim >::Flagstypedef ALBERTA FLAGS Dune::Alberta::FillFlags< dim >::Flags
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ @@ -401,15 +401,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02394.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::RefinementEdge< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 0
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02398.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::RefinementEdge< 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Attributes

static const int value = 2
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02402.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::Dune2AlbertaNumbering< dim, codim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (const int i)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02406.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Dune2AlbertaNumbering< 3, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (const int i)
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -140,15 +140,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02410.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::Generic2AlbertaNumbering< dim, codim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (const int i)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02414.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::Generic2AlbertaNumbering< dim, 1 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (const int i)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02418.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::Generic2AlbertaNumbering< 1, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (const int i)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -111,15 +111,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02422.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Generic2AlbertaNumbering< 3, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (const int i)
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -140,15 +140,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02426.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::NumberingMap< dim, Numbering > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Alberta::NumberingMap< dim, Numbering >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -267,15 +267,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02434.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Alberta::MapVertices< dim, codim > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02438.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::MapVertices< dim, 0 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (int subEntity, int vertex)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02442.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::MapVertices< 2, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (int subEntity, int vertex)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02446.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::MapVertices< 3, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (int subEntity, int vertex)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02450.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::MapVertices< 3, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (int subEntity, int vertex)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02454.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::MapVertices< dim, dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int apply (int subEntity, int vertex)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02458.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Twist< dim, subdim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int twist (const Element *element, int subEntity)
 
│ │ │ │ │ │ │ │

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

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02462.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Twist< dim, 1 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int twist (const Element *element, int subEntity)
 
│ │ │ │ │ │ │ │

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

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02466.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Twist< 1, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int twist (const Element *element, int subEntity)
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -174,15 +174,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02470.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Twist< dim, 2 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int twist (const Element *element, int subEntity)
 
│ │ │ │ │ │ │ │

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

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02474.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Twist< 2, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/misc.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/misc.hh>

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

│ │ │ │ Static Public Member Functions

static int twist (const Element *element, int subEntity)
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -174,15 +174,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02506.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Alberta::ForEachInteriorSubChild< dim, codim > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02510.html │ │ │ │ @@ -78,21 +78,21 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::Patch< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Public Types

typedef Alberta::ElementInfo< dimensionElementInfo
 
typedef ALBERTA RC_LIST_EL ElementList
typedef ALBERTA RC_LIST_EL ElementList
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -144,15 +144,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ template<int dim>
│ │ │ │

│ │ │ │ Public Member Functions

 Patch (ElementList *list, int count)
 
Elementoperator[] (int i) const
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
typedef ALBERTA RC_LIST_EL Dune::Alberta::Patch< dim >::ElementListtypedef ALBERTA RC_LIST_EL Dune::Alberta::Patch< dim >::ElementList
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Constructor & Destructor Documentation

│ │ │ │ @@ -512,15 +512,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02514.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ForEachInteriorSubChild< dim, 0 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Static Public Member Functions

template<class Functor >
static void apply (Functor &functor, const Patch< dim > &patch)
 
│ │ │ │ @@ -126,15 +126,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02518.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ForEachInteriorSubChild< dim, dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Static Public Member Functions

template<class Functor >
static void apply (Functor &functor, const Patch< dim > &patch)
 
│ │ │ │ @@ -126,15 +126,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02522.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ForEachInteriorSubChild< 2, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Static Public Member Functions

template<class Functor >
static void apply (Functor &functor, const Patch< 2 > &patch)
 
│ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02526.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ForEachInteriorSubChild< 3, 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Static Public Member Functions

template<class Functor >
static void apply (Functor &functor, const Patch< 3 > &patch)
 
│ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02530.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Alberta::ForEachInteriorSubChild< 3, 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Static Public Member Functions

template<class Functor >
static void apply (Functor &functor, const Patch< 3 > &patch)
 
│ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02534.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Alberta::GeometryInFather< dim > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02538.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::GeometryInFather< 1 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Public Types

typedef Real LocalVector[dim]
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02542.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::GeometryInFather< 2 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Public Types

typedef Real LocalVector[dim]
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02546.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Alberta::GeometryInFather< 3 > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/refinement.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/refinement.hh>

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

│ │ │ │ Public Types

typedef Real LocalVector[dim]
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02558.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaTransformation Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/transformation.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/transformation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -272,15 +272,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Alberta::Real ctype
 
typedef FieldVector< ctype, dimensionWorldVector
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02562.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::AlbertaMarkerVector< dim, dimworld > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

marker assigning subentities to one element containing them │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/treeiterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/treeiterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AlbertaMarkerVector< dim, dimworld >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -377,15 +377,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return true if marking is up to date

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02574.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::AlbertaMarkerVector< dim, dimworld >::MarkSubEntities< bool >::Codim< codim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/albertagrid/treeiterator.hh>

│ │ │ │ +

#include <dune/grid/albertagrid/treeiterator.hh>

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

│ │ │ │ Public Types

typedef Alberta::ElementInfo< dimension > ElementInfo
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02578.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::AdaptDataHandle< Grid, Impl > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/adaptcallback.hh>

│ │ │ │ +

#include <dune/grid/common/adaptcallback.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AdaptDataHandle< Grid, Impl >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02582.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::AdaptDataHandleInterface< Grid, Impl > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/adaptcallback.hh>

│ │ │ │ +

#include <dune/grid/common/adaptcallback.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AdaptDataHandleInterface< Grid, Impl >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02586.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::CombinedAdaptProlongRestrict< A, B > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

class for combining 2 index sets together for adaptation process │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/adaptcallback.hh>

│ │ │ │ +

#include <dune/grid/common/adaptcallback.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

restrict data to father

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02598.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::DuneBoundaryProjection< dimworld > Struct Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface class for vertex projection at the boundary. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │ +

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DuneBoundaryProjection< dimworld >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -559,15 +559,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 CombinedAdaptProlongRestrict (A &a, B &b)
 constructor storing the two references
 
template<class Entity >
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02602.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Static Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::BoundaryProjectionWrapper< dimworld > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │ +

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BoundaryProjectionWrapper< dimworld >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -634,15 +634,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02606.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Static Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BoundarySegmentWrapper< dim, dimworld > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │ +

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BoundarySegmentWrapper< dim, dimworld >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -665,15 +665,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02610.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Static Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::CircleBoundaryProjection< dimworld > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │ +

#include <dune/grid/common/boundaryprojection.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::CircleBoundaryProjection< dimworld >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -640,15 +640,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

radius of circ

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02614.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::BoundarySegment< dim, dimworld, ctype > Struct Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for classes implementing geometries of boundary segments. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/boundarysegment.hh>

│ │ │ │ +

#include <dune/grid/common/boundarysegment.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BoundarySegment< dim, dimworld, ctype >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
Returns
Object derived from BoundarySegment.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02618.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Types | │ │ │ │ Static Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BoundarySegmentBackupRestore< BndSeg > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/boundarysegment.hh>

│ │ │ │ +

#include <dune/grid/common/boundarysegment.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BoundarySegmentBackupRestore< BndSeg >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
Returns
Object derived from BoundarySegment.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02706.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::MessageBufferIF< MessageBufferImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Communication message buffer interface. This class describes the interface for reading and writing data to the communication message buffer. As message buffers might be deeply implemented in various packages the message buffers implementations cannot be derived from this interface class. Therefore we just apply the engine concept to wrap the message buffer call and make sure that the interface is fulfilled. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/datahandleif.hh>

│ │ │ │ +

#include <dune/grid/common/datahandleif.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -214,15 +214,15 @@ │ │ │ │

│ │ │ │ Public Member Functions

 MessageBufferIF (MessageBufferImp &buff)
 stores reference to original buffer buff
 
template<class T >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02710.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::CommDataHandleIF< DataHandleImp, DataTypeImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/datahandleif.hh>

│ │ │ │ +

#include <dune/grid/common/datahandleif.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -526,15 +526,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02726.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DefaultLevelGridView< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Classes

struct  Codim
 Codim Structure. More...
 
│ │ │ │ @@ -829,15 +829,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02730.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DefaultLeafGridView< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Classes

struct  Codim
 Codim Structure. More...
 
│ │ │ │ @@ -819,15 +819,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02734.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DefaultLevelGridViewTraits< GridImp > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Classes

struct  Codim
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -262,15 +262,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02738.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Public Types | │ │ │ │ List of all members │ │ │ │
Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Classes

struct  Partition
 Define types needed to iterate over entities of a given partition type. More...
 
│ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02742.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >::Partition< pit > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Define types needed to iterate over entities of a given partition type. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Public Types

typedef Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
 iterator over a given codim and partition type
 
│ │ │ │ @@ -116,15 +116,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

iterator over a given codim and partition type

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02746.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
Dune::DefaultLevelGridView< GridImp >::Codim< cd > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Codim Structure. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DefaultLevelGridView< GridImp >::Codim< cd >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │ │ │ │ │
│ │ │ │

Detailed Description

│ │ │ │
template<class GridImp>
│ │ │ │ template<int cd>
│ │ │ │ struct Dune::DefaultLevelGridView< GridImp >::Codim< cd >

Codim Structure.

│ │ │ │

The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02750.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DefaultLeafGridViewTraits< GridImp > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Classes

struct  Codim
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -262,15 +262,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02754.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Public Types | │ │ │ │ List of all members │ │ │ │
Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Classes

struct  Partition
 Define types needed to iterate over entities of a given partition type. More...
 
│ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02758.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd >::Partition< pit > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Define types needed to iterate over entities of a given partition type. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

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

│ │ │ │ Public Types

typedef Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
 iterator over a given codim and partition type
 
│ │ │ │ @@ -116,15 +116,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

iterator over a given codim and partition type

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02762.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
Dune::DefaultLeafGridView< GridImp >::Codim< cd > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Codim Structure. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │ +

#include <dune/grid/common/defaultgridview.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DefaultLeafGridView< GridImp >::Codim< cd >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │ │ │ │ │
│ │ │ │

Detailed Description

│ │ │ │
template<class GridImp>
│ │ │ │ template<int cd>
│ │ │ │ struct Dune::DefaultLeafGridView< GridImp >::Codim< cd >

Codim Structure.

│ │ │ │

The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02766.html │ │ │ │ @@ -945,15 +945,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02786.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::EntityIterator< codim, Grid, IteratorImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

interface class for an iterator over grid entities │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/entityiterator.hh>

│ │ │ │ +

#include <dune/grid/common/entityiterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -512,15 +512,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef IteratorImp Implementation
 type of underlying implementation
 
typedef Grid::template Codim< codim >::Entity Entity
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02790.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/common/entityiterator.hh>

│ │ │ │ +

#include <dune/grid/common/entityiterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -173,15 +173,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef ptrdiff_t difference_type
 
typedef const IteratorImp::Entity value_type
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02798.html │ │ │ │ @@ -76,29 +76,29 @@ │ │ │ │
Dune::GridError Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for exceptions in Dune grid modules. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/exceptions.hh>

│ │ │ │ +

#include <dune/grid/common/exceptions.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GridError:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │

Detailed Description

│ │ │ │

Base class for exceptions in Dune grid modules.

│ │ │ │

The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02826.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Index Set Interface base class. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/indexidset.hh>

│ │ │ │ +

#include <dune/grid/common/indexidset.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -751,15 +751,15 @@ │ │ │ │ │ │ │ │

dimension of the grid (maximum allowed codimension)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02830.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::IdSet< GridImp, IdSetImp, IdTypeImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Id Set Interface. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/indexidset.hh>

│ │ │ │ +

#include <dune/grid/common/indexidset.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdSet< GridImp, IdSetImp, IdTypeImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -484,15 +484,15 @@ │ │ │ │ │ │ │ │

dimension of the grid (maximum allowed codimension)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02882.html │ │ │ │ @@ -303,15 +303,15 @@ │ │ │ │

Detailed Description

│ │ │ │
template<class ViewTraits>
│ │ │ │ class Dune::GridView< ViewTraits >

Grid view abstract base class.

│ │ │ │

Interface class for a view on grids. Grids return two types of view, a view of the leaf grid and of a level grid, which both satisfy the same interface. Through the view the user has access to the iterators, the intersections and the index set.

│ │ │ │

The interface is implemented using the engine concept.

│ │ │ │

The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02902.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >::Codim< cc > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Export the type of the entity used as parameter in the index(...) method. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/indexidset.hh>

│ │ │ │ +

#include <dune/grid/common/indexidset.hh>

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

│ │ │ │ Public Types

typedef Traits::template Codim< cc >::Entity Entity
 
│ │ │ │

Detailed Description

│ │ │ │ @@ -110,15 +110,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02906.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Provide default implementation of method if IndexSet. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/indexidset.hh>

│ │ │ │ +

#include <dune/grid/common/indexidset.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -527,15 +527,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the grid (maximum allowed codimension)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02910.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::IdSet< GridImp, IdSetImp, IdTypeImp >::Codim< cc > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Export the type of the entity used as parameter in the id(...) method. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/indexidset.hh>

│ │ │ │ +

#include <dune/grid/common/indexidset.hh>

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

│ │ │ │ Public Types

using Entity = typename Traits::template Codim< cc >::Entity
 
│ │ │ │

Detailed Description

│ │ │ │ @@ -110,15 +110,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02922.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Mapper< G, MapperImp, IndexType > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Mapper interface. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/mapper.hh>

│ │ │ │ +

#include <dune/grid/common/mapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Mapper< G, MapperImp, IndexType >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -486,15 +486,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Reinitialize mapper after grid has been modified.

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

Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/mcmgmapper.hh>

│ │ │ │ +

#include <dune/grid/common/mcmgmapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MultipleCodimMultipleGeomTypeMapper< GV >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -969,15 +969,15 @@ │ │ │ │ │ │ │ │

Recalculates indices after grid adaptation.

│ │ │ │

After grid adaptation you need to call this to update the stored gridview and recalculate the indices.

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

Multiple codim and multiple geometry type mapper for leaf entities. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/mcmgmapper.hh>

│ │ │ │ +

#include <dune/grid/common/mcmgmapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LeafMultipleCodimMultipleGeomTypeMapper< G >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1018,15 +1018,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Reinitialize mapper after grid has been modified.

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

Multiple codim and multiple geometry type mapper for entities of one level. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/mcmgmapper.hh>

│ │ │ │ +

#include <dune/grid/common/mcmgmapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LevelMultipleCodimMultipleGeomTypeMapper< G >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1025,15 +1025,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Reinitialize mapper after grid has been modified.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02998.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::SingleCodimSingleGeomTypeMapper< GV, c > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implementation class for a single codim and single geometry type mapper. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/scsgmapper.hh>

│ │ │ │ +

#include <dune/grid/common/scsgmapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::SingleCodimSingleGeomTypeMapper< GV, c >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -704,15 +704,15 @@ │ │ │ │ │ │ │ │

Recalculates indices after grid adaptation.

│ │ │ │

After grid adaptation you need to call this to update the stored gridview and recalculate the indices.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03002.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LeafSingleCodimSingleGeomTypeMapper< G, c > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Single codim and single geometry type mapper for leaf entities. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/scsgmapper.hh>

│ │ │ │ +

#include <dune/grid/common/scsgmapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LeafSingleCodimSingleGeomTypeMapper< G, c >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -759,15 +759,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Reinitialize mapper after grid has been modified.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03006.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LevelSingleCodimSingleGeomTypeMapper< G, c > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Single codim and single geometry type mapper for entities of one level. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/scsgmapper.hh>

│ │ │ │ +

#include <dune/grid/common/scsgmapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LevelSingleCodimSingleGeomTypeMapper< G, c >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -760,15 +760,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Reinitialize mapper after grid has been modified.

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

organizes the caching of sizes for one grid and one GeometryType │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/sizecache.hh>

│ │ │ │ +

#include <dune/grid/common/sizecache.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::SizeCache< GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -320,15 +320,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Return number of grid entities of a given codim on a given level in this process.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03110.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Derive an implementation of an analytical coordinate function from this class. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -583,15 +583,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03114.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DiscreteCoordFunction< ct, dimR, Impl > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Derive an implementation of a discrete coordinate function from this class. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DiscreteCoordFunction< ct, dimR, Impl >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -507,15 +507,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03118.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::AnalyticalCoordFunction and the evaluate method mapping $ R^d\to R^r $ has to be supplied. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -396,15 +396,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03122.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::DiscreteCoordFunctionInterface< ct, dimR, Impl > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::DiscreteCoordinateFunction and the evaluate method taking an entity of the host grid together with the number of a vertex returns the coordinate in $ R^r $ of that corner. The user must ensure continuity of this mapping. In addition an adapt method is provided which is called whenever adapt() is called on the Dune::GeometryGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/coordfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DiscreteCoordFunctionInterface< ct, dimR, Impl >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -386,15 +386,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03154.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::GeoGrid::CoordFunctionCaller< HostEntity, CoordFunctionInterface > Class Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03166.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::GeoGrid::CoordVector< mydim, Grid, fake > Class Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03170.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::GeoGrid::CoordVector< mydim, Grid, false > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -157,15 +157,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 CoordVector (const HostEntity &hostEntity, const CoordFunction &coordFunction)
 
template<std::size_t size>
void calculate (std::array< Coordinate, size >(&corners)) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03174.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::GeoGrid::CoordVector< mydim, Grid, true > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -163,15 +163,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 CoordVector (const HostElement &hostElement, const unsigned int subEntity, const CoordFunction &coordFunction)
 
template<std::size_t size>
void calculate (std::array< Coordinate, size >(&corners)) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03178.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::GeoGrid::IntersectionCoordVector< Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -190,15 +190,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 IntersectionCoordVector (const ElementGeometryImpl &elementGeometry, const HostLocalGeometry &hostLocalGeometry)
 
template<std::size_t size>
void calculate (std::array< Coordinate, size >(&corners)) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03182.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::CornerStorage< mydim, cdim, Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/cornerstorage.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/cornerstorage.hh>

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

│ │ │ │ Public Types

typedef Coords::const_iterator const_iterator
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -258,15 +258,15 @@ │ │ │ │

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

update grid caches

│ │ │ │

This method has to be called whenever the underlying host grid changes.

│ │ │ │
Note
If you adapt the host grid through this geometry grid's adaptation or load balancing methods, update is automatically called.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03202.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::HierarchicIterator< G > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │

│ │ │ │ Public Types

typedef Traits::Grid Grid
 
typedef Traits::template Codim< codimension >::Entity Entity
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03318.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::HostCorners< HostEntity > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/hostcorners.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/hostcorners.hh>

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

│ │ │ │ Public Types

typedef HostGeometry::GlobalCoordinate Coordinate
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -225,15 +225,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03322.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::IdenticalCoordFunction< ctype, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/identity.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/identity.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdenticalCoordFunction< ctype, dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -457,15 +457,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03326.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::IdSet< Grid, HostIdSet > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/idset.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/idset.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GeoGrid::IdSet< Grid, HostIdSet >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -569,15 +569,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the grid (maximum allowed codimension)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03338.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::GeoGrid::Iterator< HostGridView, codim, pitype, Grid, fake > Class Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03342.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, pitype, Grid > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03346.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::remove_const< Grid >::type::ctype ctype
 
typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03350.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::remove_const< Grid >::type::ctype ctype
 
typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03354.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::remove_const< Grid >::type::ctype ctype
 
typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03358.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::remove_const< Grid >::type::ctype ctype
 
typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03362.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::remove_const< Grid >::type::ctype ctype
 
typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03366.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::remove_const< Grid >::type::ctype ctype
 
typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03370.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, false > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -481,15 +481,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Traits::Grid Grid
 
typedef Traits::template Codim< codimension >::Entity Entity
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03374.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, true > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/iterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -467,15 +467,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Traits::Grid Grid
 
typedef Traits::template Codim< codimension >::Entity Entity
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03386.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
Dune::HostGridAccess< Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

provides access to host grid objects from GeometryGrid │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ +

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │

Detailed Description

│ │ │ │
template<class Grid>
│ │ │ │ class Dune::HostGridAccess< Grid >

provides access to host grid objects from GeometryGrid

│ │ │ │

provides access to host grid objects from IdentityGrid

│ │ │ │
Template Parameters
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03414.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::IdentityGridEntity< codim, dim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The implementation of entities in a IdentityGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridentity.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridentity.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridEntity< codim, dim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -740,15 +740,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Know dimension of the entity.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03418.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::IdentityGridLevelIterator< codim, pitype, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterator over all entities of a given codimension and level of a grid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridleveliterator.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridleveliterator.hh>

│ │ │ │
GeometryGrid
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< codim >::Entity Entity
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -341,16 +341,16 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03422.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridLevelIntersectionIterator< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

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

│ │ │ │ Public Types

typedef Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp > > Intersection
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -276,16 +276,16 @@ │ │ │ │
│ │ │ │ │ │ │ │

prefix increment

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03426.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::IdentityGridLeafIntersectionIterator< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 These neighbors are accessed via a IntersectionIterator. This allows the implement non-matching meshes. The number of neighbors may be different from the number of an element! │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

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

│ │ │ │ Public Types

typedef Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp > > Intersection
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -280,16 +280,16 @@ │ │ │ │
│ │ │ │ │ │ │ │

prefix increment

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03430.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::IdentityGridHierarchicIterator< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit all entities of codimension 0 obtained through nested, hierarchic refinement of the entity. Iteration over this set of entities is provided by the HierarchicIterator, starting from a given entity. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridhierarchiciterator.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridhierarchiciterator.hh>

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

│ │ │ │ Public Types

typedef GridImp::template Codim< 0 >::Entity Entity
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -342,16 +342,16 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03434.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::IdentityGridEntity< 0, dim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Specialization for codim-0-entities. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridentity.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridentity.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridEntity< 0, dim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1267,15 +1267,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Know dimension of the entity.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03438.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::IdentityGridEntitySeed< codim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The EntitySeed class provides the minimal information needed to restore an Entity using the grid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridentityseed.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridentityseed.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -308,15 +308,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 IdentityGridEntitySeed ()
 Construct an empty (i.e. isValid() == false) seed.
 
 IdentityGridEntitySeed (const HostEntity &hostEntity)
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03442.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridGeometry< mydim, coorddim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridgeometry.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridgeometry.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridGeometry< mydim, coorddim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -926,15 +926,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03446.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridLevelIndexSet< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridLevelIndexSet< GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -804,15 +804,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03450.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridLeafIndexSet< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridLeafIndexSet< GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -787,15 +787,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03454.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridGlobalIdSet< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridGlobalIdSet< GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -435,15 +435,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03458.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridLocalIdSet< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridindexsets.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::IdentityGridLocalIdSet< GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -435,15 +435,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03462.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::IdentityGridLeafIntersection< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 These neighbors are accessed via a IntersectionIterator. This allows the implement non-matching meshes. The number of neighbors may be different from the number of an element! │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridintersections.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridintersections.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -813,15 +813,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return unit outer normal

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03466.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::IdentityGridLevelIntersection< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridintersections.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridintersections.hh>

│ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< 1 >::Geometry Geometry
 
typedef GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -809,15 +809,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return unit outer normal

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03470.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::IdentityGridLeafIterator< codim, pitype, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterator over all entities of a given codimension and level of a grid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/identitygrid/identitygridleafiterator.hh>

│ │ │ │ +

#include <dune/grid/identitygrid/identitygridleafiterator.hh>

│ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< 1 >::Geometry Geometry
 
typedef GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< codim >::Entity Entity
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -322,15 +322,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03474.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::BasicBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/basic.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/basic.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::BasicBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -473,16 +473,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03478.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::dgf::DomainData Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>

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

│ │ │ │ Public Types

typedef DGFBoundaryParameter::type BoundaryParameter
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -355,15 +355,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03482.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::Domain Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>

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

│ │ │ │ Public Types

typedef DGFBoundaryParameter::type BoundaryParameter
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -334,15 +334,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03486.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::BoundaryDomBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::BoundaryDomBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -655,16 +655,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03490.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::BoundarySegBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::BoundarySegBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -582,16 +582,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03494.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::CubeBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/cube.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/cube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::CubeBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -545,16 +545,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03498.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::DimBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/dim.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/dim.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::DimBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -542,16 +542,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03502.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::GeneralBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/general.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/general.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::GeneralBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -545,16 +545,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03506.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::dgf::GridParameterBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Common Grid parameters. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::GridParameterBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -761,15 +761,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03510.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::IntervalBlock Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/interval.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/interval.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::IntervalBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -739,16 +739,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03514.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::IntervalBlock::Interval Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/interval.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/interval.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -240,15 +240,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Interval ()
 
 Interval (const Interval &interval, const std::vector< int > &map)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03518.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::PeriodicFaceTransformationBlock Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::PeriodicFaceTransformationBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -506,16 +506,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03522.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -272,15 +272,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03526.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>

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

│ │ │ │ Public Member Functions

 AffineTransformation (int dimworld)
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -148,15 +148,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03530.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::PolygonBlock Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::PolygonBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -533,15 +533,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03534.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::PolyhedronBlock Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/polyhedron.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/polyhedron.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::PolyhedronBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -503,15 +503,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03538.html │ │ │ │ @@ -217,15 +217,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

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

Implements Dune::dgf::ProjectionBlock::Expression.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03598.html │ │ │ │ @@ -848,15 +848,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03614.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::SimplexBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::SimplexBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -593,16 +593,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03618.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::SimplexGenerationBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::SimplexGenerationBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -730,16 +730,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03622.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::VertexBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/blocks/vertex.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/blocks/vertex.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::VertexBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -533,16 +533,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03626.html │ │ │ │ @@ -76,29 +76,29 @@ │ │ │ │
Dune::DGFException Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

exception class for IO errors in the DGF parser │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfexception.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfexception.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DGFException:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │

Detailed Description

│ │ │ │

exception class for IO errors in the DGF parser

│ │ │ │

The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03630.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DGFCoordFunction< dimD, dimR > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DGFCoordFunction< dimD, dimR >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -478,15 +478,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03634.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, discrete > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03638.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

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

│ │ │ │ Static Public Member Functions

static CoordFunction * create (std::istream &, const HostGrid &)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03642.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

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

│ │ │ │ Static Public Member Functions

static CoordFunction * create (std::istream &, const HostGrid &hostGrid)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03646.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

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

│ │ │ │ Public Types

typedef DGFCoordFunction< dimD, dimR > CoordFunction
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -146,15 +146,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03650.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -512,15 +512,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GeometryGrid< HostGrid, CoordFunction, Allocator > Grid
 
typedef MPIHelper::MPICommunicator MPICommunicator
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03654.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfgeogrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static int refineStepsForHalf ()
 
static double refineWeight ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03662.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DGFGridFactory< IdentityGrid< HostGrid > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfidentitygrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfidentitygrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -432,15 +432,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef IdentityGrid< HostGrid > Grid
 
typedef MPIHelper::MPICommunicator MPICommunicator
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03666.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFGridInfo< IdentityGrid< HostGrid > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfidentitygrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfidentitygrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static int refineStepsForHalf ()
 
static double refineWeight ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03670.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFGridInfo< OneDGrid > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfoned.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfoned.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static int refineStepsForHalf ()
 
static double refineWeight ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03674.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DGFGridFactory< OneDGrid > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfoned.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfoned.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -532,15 +532,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

grid dimension

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03686.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::dgf::UGGridParameterBlock Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfug.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfug.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::UGGridParameterBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -924,16 +924,16 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef OneDGrid Grid
 grid type
 
typedef MPIHelper::MPICommunicator MPICommunicatorType
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03690.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFGridInfo< UGGrid< dim > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfug.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfug.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static int refineStepsForHalf ()
 
static double refineWeight ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03694.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DGFGridFactory< UGGrid< dim > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfug.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfug.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -560,16 +560,16 @@ │ │ │ │
│ │ │ │ │ │ │ │

grid dimension

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03698.html │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │
Dune::DGFWriter< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

write a GridView to a DGF file │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfwriter.hh>

│ │ │ │

│ │ │ │ Public Types

typedef UGGrid< dim > Grid
 grid type
 
typedef MPIHelper::MPICommunicator MPICommunicatorType
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1055,15 +1055,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GV GridView
 type of grid view
 
typedef GridView::Grid Grid
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03702.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::dgf::YaspGridParameterBlock Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Grid parameters for YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::dgf::YaspGridParameterBlock:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -826,15 +826,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03706.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Grid factory for YaspGrid with equidistant coordinates. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -493,15 +493,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid
 
typedef MPIHelper::MPICommunicator MPICommunicatorType
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03710.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Grid factory for YaspGrid with equidistant coordinates. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -493,15 +493,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid
 
typedef MPIHelper::MPICommunicator MPICommunicatorType
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03714.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Placeholder for grid factory for YaspGrid with tensor product coordinates. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -153,15 +153,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

template<typename In >
 DGFGridFactory (const In &)
 
Gridgrid ()
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03718.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFGridInfo< YaspGrid< dim, Coordinates > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/dgfyasp.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static int refineStepsForHalf ()
 
static double refineWeight ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03722.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DGFEntityKey< A > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/entitykey.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/entitykey.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DGFEntityKey< A >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -456,16 +456,16 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03726.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::ElementFaceUtil Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/entitykey.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/entitykey.hh>

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

│ │ │ │ Public Member Functions

template<int dim>
DGFEntityKey< unsigned int > generateSimplexFace (const std ::vector< unsigned int > &element, int f)
 
│ │ │ │ @@ -248,16 +248,16 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03730.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │
Dune::GridPtr< GridType > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Class for constructing grids from DGF files. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/gridptr.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/gridptr.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1338,15 +1338,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  DataHandle
 
class  mygrid_ptr
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03734.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::GridPtr< GridType >::mygrid_ptr Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/gridptr.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/gridptr.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GridPtr< GridType >::mygrid_ptr:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -330,15 +330,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

STL member.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03738.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::GridPtr< GridType >::DataHandle Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/gridptr.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/gridptr.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GridPtr< GridType >::DataHandle:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -710,15 +710,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03742.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Static Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MacroGrid Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/macrogrid.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/macrogrid.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MacroGrid:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1441,15 +1441,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03750.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DGFBoundaryParameter Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Contains types for additional features. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/parser.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/parser.hh>

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

│ │ │ │ Public Types

typedef std::string type
 type of additional boundary parameters
 
│ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

delimiter

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03754.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │
Dune::DuneGridFormatParser Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/dgfparser/parser.hh>

│ │ │ │ +

#include <dune/grid/io/file/dgfparser/parser.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DuneGridFormatParser:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1325,15 +1325,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03758.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::GmshReaderOptions Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Options for read operation. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gmshreader.hh>

│ │ │ │ +

#include <dune/grid/io/file/gmshreader.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

enum  GeometryOrder { firstOrder │ │ │ │ , secondOrder │ │ │ │ }
 
secondOrder 

quadratic boundary approximation.

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03774.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::GmshReaderParser< GridType > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

dimension independent parts for GmshReaderParser │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gmshreader.hh>

│ │ │ │ +

#include <dune/grid/io/file/gmshreader.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -932,15 +932,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 GmshReaderParser (Dune::GridFactory< GridType > &_factory, bool v, bool i)
 
std::vector< int > & boundaryIdMap ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03778.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::GmshReader< GridType > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Read Gmsh mesh file. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gmshreader.hh>

│ │ │ │ +

#include <dune/grid/io/file/gmshreader.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -884,15 +884,15 @@ │ │ │ │
│ │ │ │ Initial value:
=
│ │ │ │
Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03790.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::GmshWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Write Gmsh mesh file. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gmshwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/gmshwriter.hh>

│ │ │ │

│ │ │ │ Public Types

typedef GridType Grid
 
using Opts = Gmsh::ReaderOptions
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -239,15 +239,15 @@ │ │ │ │

If the optional parameter physicalBoundaries is provided, also the boundaries are written on file with the corresponding physical value.

│ │ │ │

The physicalBoundaries vector need to be sorted according to the interesection boundary segment index.

│ │ │ │

Throws an IOError if file could not be opened or an unsupported element type is encountered.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03794.html │ │ │ │ @@ -281,15 +281,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03818.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::b64chunk Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

struct representing the three byte text as well as the four 6 bit chunks │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/b64enc.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/b64enc.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 GmshWriter (const GridView &gridView, int numDigits=6)
 Constructor expecting GridView of Grid to be written.
 
void setPrecision (int numDigits)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using size_type = unsigned char
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -267,15 +267,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03822.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Static Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::VTK::BasicWriter< IteratorFactory > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/basicwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/basicwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::BasicWriter< IteratorFactory >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1012,15 +1012,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03826.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::BoundaryIterator< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

iterate over the GridViews boundary intersections │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/boundaryiterators.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/boundaryiterators.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::BoundaryIterator< GV >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -440,15 +440,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03830.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::VTK::IntersectionIndexSet< ElementIndexSet > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/boundaryiterators.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/boundaryiterators.hh>

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

│ │ │ │ Public Member Functions

 IntersectionIndexSet (const ElementIndexSet &eis_)
 
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03834.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::VTK::NonConformingBoundaryIteratorFactory< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/boundaryiterators.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/boundaryiterators.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::NonConformingBoundaryIteratorFactory< GV >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -536,15 +536,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03838.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Static Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::VTK::NonConformingBoundaryWriter< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/boundarywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/boundarywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::NonConformingBoundaryWriter< GV >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1625,15 +1625,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03842.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::PrintType< T > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

determine a type to safely put another type into a stream │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/common.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/common.hh>

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

│ │ │ │ Public Types

typedef T Type
 type to convert T to before putting it into a stream with <<
 
│ │ │ │ @@ -111,15 +111,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

type to convert T to before putting it into a stream with <<

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03846.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::VTK::PrintType< unsigned char > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/common.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/common.hh>

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

│ │ │ │ Public Types

typedef unsigned Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -99,15 +99,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03850.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::VTK::PrintType< signed char > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/common.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/common.hh>

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

│ │ │ │ Public Types

typedef int Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -99,15 +99,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03854.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::VTK::PrintType< char > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/common.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/common.hh>

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

│ │ │ │ Public Types

typedef std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -99,15 +99,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03858.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::FieldInfo Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Descriptor struct for VTK fields. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/common.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/common.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -307,15 +307,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The type of the data field.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03862.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::Corner< Cell > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

simple class representing a corner of a cell │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/corner.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/corner.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::Corner< Cell >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -386,15 +386,15 @@ │ │ │ │ │ │ │ │

set the index of the corner within the cell in VTK-numbering

│ │ │ │

This requires that the cell is valid

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03866.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::VTK::CornerIterator< CellIterator > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

iterate over the corners of some cell range │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/corneriterator.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/corneriterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::CornerIterator< CellIterator >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -473,15 +473,15 @@ │ │ │ │
│ │ │ │ Initial value:
= std::iterator_traits<CellIterator>::
│ │ │ │
value_type::mydimension
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03870.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::DataArrayWriter Class Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

base class for data array writers │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::DataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -245,15 +245,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03874.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::AsciiDataArrayWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a streaming writer for data array tags, uses ASCII inline format │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::AsciiDataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -263,15 +263,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03878.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::BinaryDataArrayWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a streaming writer for data array tags, uses binary inline format │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::BinaryDataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -270,15 +270,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03882.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::AppendedRawDataArrayWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a streaming writer for data array tags, uses appended raw format │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::AppendedRawDataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented from Dune::VTK::DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03886.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::AppendedBase64DataArrayWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a streaming writer for data array tags, uses appended base64 format │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::AppendedBase64DataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented from Dune::VTK::DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03890.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::NakedBase64DataArrayWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a streaming writer for appended data array tags, uses base64 format │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::NakedBase64DataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -226,15 +226,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03894.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::NakedRawDataArrayWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a streaming writer for appended data arrays, uses raw format │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::NakedRawDataArrayWriter:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -226,15 +226,15 @@ │ │ │ │

whether calls to write may be skipped

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03898.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::DataArrayWriterFactory Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a factory for DataArrayWriters │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

│ │ │ │

│ │ │ │ Public Types

enum class  Type { scalar │ │ │ │ , vector │ │ │ │ , tensor │ │ │ │ }
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -276,15 +276,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

The should never be more than one DataArrayWriter on the same stream around. The returned object should be freed with delete.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03902.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::VTKFunction< GridView > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A base class for grid functions with any return type and dimension. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/function.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/function.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKFunction< GridView >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -369,15 +369,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 DataArrayWriterFactory (OutputType type_, std::ostream &stream_)
 create a DataArrayWriterFactory
 
bool beginAppended ()
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03906.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::P0VTKFunction< GV, V > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/function.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/function.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::P0VTKFunction< GV, V >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -444,15 +444,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03910.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::P1VTKFunction< GV, V > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/function.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/function.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::P1VTKFunction< GV, V >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -444,15 +444,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03914.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::FunctionWriterBase< Cell_ > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for function writers. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::FunctionWriterBase< Cell_ >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -466,15 +466,15 @@ │ │ │ │ Domain&).

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::NonConformingConnectivityWriter< Cell >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03918.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::VTKFunctionWriter< Func > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for function writers. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::VTKFunctionWriter< Func >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -505,15 +505,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

write at the given position

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03922.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::CoordinatesWriter< Cell > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

writer for the Coordinates array │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::CoordinatesWriter< Cell >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -497,15 +497,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

write at the given position

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03926.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::ConformingConnectivityWriter< IteratorFactory > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

writer for the connectivity array in conforming mode │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::ConformingConnectivityWriter< IteratorFactory >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -499,15 +499,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

write at the given corner

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03930.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::NonConformingConnectivityWriter< Cell > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

writer for the connectivity array in nonconforming mode │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::NonConformingConnectivityWriter< Cell >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -423,15 +423,15 @@ │ │ │ │

write at the given corner

│ │ │ │ │ │ │ │

Reimplemented from Dune::VTK::FunctionWriterBase< Cell >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03934.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::OffsetsWriter< Cell > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

writer for the offsets array │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::OffsetsWriter< Cell >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -466,15 +466,15 @@ │ │ │ │ Domain&).

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::NonConformingConnectivityWriter< Cell >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03938.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::TypesWriter< Cell > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

writer for the types array │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/functionwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::TypesWriter< Cell >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -466,15 +466,15 @@ │ │ │ │ Domain&).

│ │ │ │ │ │ │ │

Reimplemented in Dune::VTK::NonConformingConnectivityWriter< Cell >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03942.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::VTK::PointIterator< CellIterator, IS > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

iterate over the points of some corner range │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/pointiterator.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/pointiterator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::PointIterator< CellIterator, IS >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -453,15 +453,15 @@ │ │ │ │
│ │ │ │ Initial value:
= std::iterator_traits<CellIterator>::
│ │ │ │
value_type::mydimension
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03946.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTK::PVTUWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Dump a .vtu/.vtp files contents to a stream. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/pvtuwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/pvtuwriter.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -590,15 +590,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

finish section for the point coordinates

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03950.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::VTK::SkeletonFunctionTraits< GV, RF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/skeletonfunction.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/skeletonfunction.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 PVTUWriter (std::ostream &stream_, FileType fileType_)
 create a PVTUWriter object
 
 ~PVTUWriter ()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -222,15 +222,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GV GridView
 
typedef GV::Intersection Cell
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03954.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::SkeletonFunctionInterface< GV, RF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A prototype for VTKFunctions on the skeleton. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/skeletonfunction.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/skeletonfunction.hh>

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

│ │ │ │ Public Types

typedef SkeletonFunctionTraits< GV, RF > Traits
 
│ │ │ │

│ │ │ │ @@ -185,15 +185,15 @@ │ │ │ │

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03958.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTK::SkeletonFunctionWriter< Func > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

function writer for skeleton functions │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/skeletonfunction.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/skeletonfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::SkeletonFunctionWriter< Func >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -569,15 +569,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

write at the given position

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03962.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::Base64Stream Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

class to base64 encode a stream of data │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/streams.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/streams.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -224,15 +224,15 @@ │ │ │ │ │ │ │ │

encode a data item

│ │ │ │

The result will be written to the stream, eventually. This method may be called multiple times in a row. After this method has been called, no one else may write to the underlying stream until flush() has been called or this writer object has been destroyed.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03966.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RawStream Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

write out data in binary │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/streams.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/streams.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 Base64Stream (std::ostream &s_)
 Construct a Base64Stream.
 
template<class X >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -154,15 +154,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

write data to stream

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03970.html │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │
Dune::SubsamplingVTKWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Writer for the output of subsampled grid functions in the vtk format. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::SubsamplingVTKWriter< GridView >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1670,15 +1670,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 RawStream (std::ostream &theStream)
 make a new stream
 
template<class T >
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03978.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::VTK::ConformingVolumeIteratorFactory< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/volumeiterators.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/volumeiterators.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::ConformingVolumeIteratorFactory< GV >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -536,15 +536,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03982.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::VTK::NonConformingVolumeIteratorFactory< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/volumeiterators.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/volumeiterators.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -526,15 +526,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GV::template Codim< 0 >::Entity Cell
 
typedef GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03986.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Static Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::VTK::ConformingVolumeWriter< GV > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/volumewriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/volumewriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTK::ConformingVolumeWriter< GV >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1705,15 +1705,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03990.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKSequenceWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Writer for the ouput of grid functions in the vtk format. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtksequencewriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtksequencewriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKSequenceWriter< GridView >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -641,15 +641,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03994.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKSequenceWriterBase< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class to write pvd-files which contains a list of all collected vtk-files. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKSequenceWriterBase< GridView >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -546,15 +546,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04014.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │
Dune::VTKWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Writer for the ouput of grid functions in the vtk format. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -2005,15 +2005,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04018.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::VTKLocalFunction Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Type erasure wrapper for VTK data sets. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -514,15 +514,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  FunctionWrapper
 Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. More...
 
struct  FunctionWrapperBase
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04022.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase Struct Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for polymorphic container of underlying data set. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -254,15 +254,15 @@ │ │ │ │

The function must write count scalar values as determined by the VTK::FieldInfo.

│ │ │ │ │ │ │ │

Implemented in Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F >, Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F >, and Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04026.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -288,15 +288,15 @@ │ │ │ │

The function must write count scalar values as determined by the VTK::FieldInfo.

│ │ │ │ │ │ │ │

Implements Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04030.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordinates. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -288,15 +288,15 @@ │ │ │ │

The function must write count scalar values as determined by the VTK::FieldInfo.

│ │ │ │ │ │ │ │

Implements Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04034.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Type erasure implementation for legacy VTKFunctions. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -251,15 +251,15 @@ │ │ │ │

The function must write count scalar values as determined by the VTK::FieldInfo.

│ │ │ │ │ │ │ │

Implements Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04038.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::CellIterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterator over the grids elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::CellIterator:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -164,15 +164,15 @@ │ │ │ │ │ │ │ │
│ │ │ │

get the position of the center of the element, in element-local coordinates

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04042.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::VertexIterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterate over the grid's vertices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::VertexIterator:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

position of vertex inside the entity

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04046.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKWriter< GridView >::CornerIterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterate over the elements' corners. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtkwriter.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VTKWriter< GridView >::CornerIterator:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -281,15 +281,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04050.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::VTK::VTUWriter Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Dump a .vtu/.vtp files contents to a stream. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/vtk/vtuwriter.hh>

│ │ │ │ +

#include <dune/grid/io/file/vtk/vtuwriter.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -821,15 +821,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

enum  Phase { main │ │ │ │ , appended │ │ │ │ }
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04126.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::EntityCommHelper< iftype > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04130.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ +

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static bool send (const PartitionType p)
 
static bool receive (const PartitionType p)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04134.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::EntityCommHelper< InteriorBorder_All_Interface > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ +

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static bool send (const PartitionType p)
 
static bool receive (const PartitionType p)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04138.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::EntityCommHelper< Overlap_OverlapFront_Interface > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ +

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static bool send (const PartitionType p)
 
static bool receive (const PartitionType p)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04142.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::EntityCommHelper< Overlap_All_Interface > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ +

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static bool send (const PartitionType p)
 
static bool receive (const PartitionType p)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04146.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::EntityCommHelper< All_All_Interface > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ +

#include <dune/grid/utility/entitycommhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static bool send (const PartitionType p)
 
static bool receive (const PartitionType p)
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04190.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ +

#include <dune/grid/utility/hostgridaccess.hh>

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

│ │ │ │ Classes

struct  Codim
 A Traits struct that collects return types of class member methods. More...
 
│ │ │ │ @@ -358,15 +358,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04194.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim< codim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A Traits struct that collects return types of class member methods. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ +

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -142,15 +142,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

type of the host entity

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04198.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::HostGridAccess< IdentityGrid< HG > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ +

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │

│ │ │ │ Public Types

typedef Grid::template Codim< codim >::Entity Entity
 type of the GeometryGrid entity
 
typedef HostGrid::template Codim< codim >::Entity HostEntity
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Codim
 A Traits struct that collects return types of class member methods. More...
 
│ │ │ │ @@ -385,15 +385,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04202.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::HostGridAccess< IdentityGrid< HG > >::Codim< codim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A Traits struct that collects return types of class member methods. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ +

#include <dune/grid/utility/hostgridaccess.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -142,15 +142,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

type of the host entity

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04206.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::FactoryUtilities::MultiIndex< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/multiindex.hh>

│ │ │ │ +

#include <dune/grid/utility/multiindex.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::FactoryUtilities::MultiIndex< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -223,15 +223,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

STL member.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04218.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::PersistentContainerInterface< G, T > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Persistent storage of data on all entities of a grid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/persistentcontainerinterface.hh>

│ │ │ │ +

#include <dune/grid/utility/persistentcontainerinterface.hh>

│ │ │ │

│ │ │ │ Public Types

typedef Grid::template Codim< codim >::Entity Entity
 type of the IdGrid entity
 
typedef HostGrid::template Codim< codim >::Entity HostEntity
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -689,15 +689,15 @@ │ │ │ │ │ │ │ │

exchange the content of the container with another one

│ │ │ │
Note
std::swap is overloaded to refor to this method
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04222.html │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │
Dune::PersistentContainerMap< G, IdSet, Map > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

map-based implementation of the PersistentContainer │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/persistentcontainermap.hh>

│ │ │ │ +

#include <dune/grid/utility/persistentcontainermap.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PersistentContainerMap< G, IdSet, Map >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1092,15 +1092,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef G Grid
 
typedef T Value
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04226.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/persistentcontainermap.hh>

│ │ │ │ +

#include <dune/grid/utility/persistentcontainermap.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -314,15 +314,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04230.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::PersistentContainerVector< G, IndexSet, Vector > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

vector-based implementation of the PersistentContainer │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/persistentcontainervector.hh>

│ │ │ │ +

#include <dune/grid/utility/persistentcontainervector.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PersistentContainerVector< G, IndexSet, Vector >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -851,15 +851,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04234.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::PersistentContainerWrapper< G, T > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/persistentcontainerwrapper.hh>

│ │ │ │ +

#include <dune/grid/utility/persistentcontainerwrapper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PersistentContainerWrapper< G, T >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -713,15 +713,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04238.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::TensorGridFactoryCreator< Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/tensorgridfactory.hh>

│ │ │ │ +

#include <dune/grid/utility/tensorgridfactory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -216,15 +216,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Grid::Traits::Communication Comm
 
typedef Grid::ctype ctype
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04242.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::TensorGridFactory< Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A factory class for conveniently creating tensorproduct grids. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/tensorgridfactory.hh>

│ │ │ │ +

#include <dune/grid/utility/tensorgridfactory.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::TensorGridFactory< Grid >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -763,15 +763,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04246.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/tensorgridfactory.hh>

│ │ │ │ +

#include <dune/grid/utility/tensorgridfactory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -185,15 +185,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid
 
typedef Grid::Communication Comm
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04250.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::VertexOrderByIdFactory< IdSet, Index > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for GeneralVertexOrder objects using an IdSet. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/vertexorderfactory.hh>

│ │ │ │ +

#include <dune/grid/utility/vertexorderfactory.hh>

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

│ │ │ │ Classes

struct  VertexOrder
 type of vertex order object may depend on the dimension of the element More...
 
│ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

The returned object will remain valid even after the factory has become singular or has been destroyed.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04254.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

type of vertex order object may depend on the dimension of the element │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/vertexorderfactory.hh>

│ │ │ │ +

#include <dune/grid/utility/vertexorderfactory.hh>

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

│ │ │ │ Public Types

typedef GeneralVertexOrder< dim, Index > type
 type of vertex order object
 
│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

type of vertex order object

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04262.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::YaspGeometry< mydim, cdim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The general version that handles all codimensions but 0 and dim. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridgeometry.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridgeometry.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspGeometry< mydim, cdim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │ │ │ │ │

constructor from midpoint and extension and a bitset defining which unit vectors span the entity

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04266.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::YaspEntity< codim, dim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspEntity< codim, dim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -958,15 +958,15 @@ │ │ │ │ │ │ │ │

Know dimension of the entity.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04270.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::YaspEntitySeed< codim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Describes the minimal information necessary to create a fully functional YaspEntity. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridentityseed.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridentityseed.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -407,15 +407,15 @@ │ │ │ │ │ │ │ │

codimension of entity

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04274.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::YaspLevelIterator< codim, pitype, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterates over entities of one grid level. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridleveliterator.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridleveliterator.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 YaspEntitySeed ()
 default construct an invalid entity seed
 
 YaspEntitySeed (int level, std::array< int, dim > coord, int o=0)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -356,15 +356,15 @@ │ │ │ │ │ │ │ │

entity

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04282.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::YaspIntersection< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

YaspIntersection provides data about intersection with neighboring codim 0 entities. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridintersection.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridintersection.hh>

│ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< codim >::Entity Entity
 
typedef GridImp::YGridLevelIterator YGLI
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -852,15 +852,15 @@ │ │ │ │

│ │ │ │ Public Types

typedef GridImp::YGridLevelIterator YGLI
 
typedef GridImp::YGrid::Iterator I
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04286.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::YaspHierarchicIterator< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

YaspHierarchicIterator enables iteration over son entities of codim 0. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridhierarchiciterator.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridhierarchiciterator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -359,15 +359,15 @@ │ │ │ │

│ │ │ │ Public Types

typedef GridImp::YGridLevelIterator YGLI
 
typedef GridImp::YGrid::Iterator I
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04290.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::YaspIndexSet< GridImp, isLeafIndexSet > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implementation of Level- and LeafIndexSets for YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridindexsets.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridindexsets.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspIndexSet< GridImp, isLeafIndexSet >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -778,15 +778,15 @@ │ │ │ │ │ │ │ │

dimension of the grid (maximum allowed codimension)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04294.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::YaspGlobalIdSet< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

persistent, globally unique Ids │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgrididset.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgrididset.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspGlobalIdSet< GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -391,15 +391,15 @@ │ │ │ │ │ │ │ │

dimension of the grid (maximum allowed codimension)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04298.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::YaspPersistentContainerIndex< Grid > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspPersistentContainerIndex< Grid >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -315,15 +315,15 @@ │ │ │ │
Note
The parameter codim denotes the codimension with respect to the grid, i.e., it must satisfy cc <= codim <= dimension.
│ │ │ │
Returns
An index in the range 0 ... Max number of entities in set - 1.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04362.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::EquidistantCoordinates< ct, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Container for equidistant coordinates in a YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/coordinates.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/coordinates.hh>

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

│ │ │ │ Public Types

typedef ct ctype
 export the coordinate type
 
│ │ │ │ @@ -467,15 +467,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

export dimension

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

Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/coordinates.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/coordinates.hh>

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

│ │ │ │ Public Types

typedef ct ctype
 export the coordinate type
 
│ │ │ │ @@ -512,15 +512,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

export dimension

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

Coordinate container for a tensor product YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/coordinates.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/coordinates.hh>

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

│ │ │ │ Public Types

typedef ct ctype
 export the coordinate type
 
│ │ │ │ @@ -467,15 +467,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

export dimension

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04374.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Yasp::Partitioning< d > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a base class for the yaspgrid partitioning strategy │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Yasp::Partitioning< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -220,15 +220,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implemented in Dune::Yasp::DefaultPartitioning< d >, Dune::Yasp::PowerDPartitioning< d >, Dune::YLoadBalance< d >, and Dune::Yasp::FixedSizePartitioning< d >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04378.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Yasp::DefaultPartitioning< d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Yasp::DefaultPartitioning< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04382.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Yasp::PowerDPartitioning< d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Yasp::PowerDPartitioning< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -206,15 +206,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04386.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Yasp::FixedSizePartitioning< d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Yasp::FixedSizePartitioning< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -244,15 +244,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04390.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::YLoadBalance< d > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

a base class for the yaspgrid partitioning strategy │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YLoadBalance< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -263,15 +263,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04394.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::YLoadBalanceForward< d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YLoadBalanceForward< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -286,15 +286,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

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

Implement the default load balance strategy of yaspgrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YLoadBalanceDefault< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -267,15 +267,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

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

Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YLoadBalancePowerD< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -259,15 +259,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

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

Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/partitioning.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspFixedSizePartitioner< d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -260,15 +260,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implements Dune::Yasp::Partitioning< d >.

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

Specialization of the StructuredGridFactory for YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -201,15 +201,15 @@ │ │ │ │ │ │ │ │

Create a structured simplex grid.

│ │ │ │
Note
Simplices are not supported in YaspGrid, so this functions unconditionally throws a GridError.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04414.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>

│ │ │ │

│ │ │ │ Static Public Member Functions

static std::unique_ptr< GridTypecreateCubeGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
 Create a structured cube grid.
 
static std::unique_ptr< GridTypecreateSimplexGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -199,15 +199,15 @@ │ │ │ │ │ │ │ │

Create a structured simplex grid.

│ │ │ │
Note
Simplices are not supported in YaspGrid, so this functions unconditionally throws a GridError.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04418.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Torus< Communication, d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/torus.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/torus.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Torus< Communication, d >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1136,15 +1136,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return tag used by torus

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04430.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Torus< Communication, d >::ProcListIterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/torus.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/torus.hh>

│ │ │ │

│ │ │ │ Static Public Member Functions

static std::unique_ptr< GridTypecreateCubeGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
 Create a structured cube grid.
 
static std::unique_ptr< GridTypecreateSimplexGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -346,15 +346,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return rank of neighboring process

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04434.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::YaspEntity< 0, dim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspEntity< 0, dim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1463,15 +1463,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Know dimension of the entity.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04438.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::YaspEntity< 0, dim, GridImp >::Codim< cd > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 ProcListIterator (typename std::deque< CommPartner >::const_iterator iter)
 make an iterator
 
int rank () const
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< cd >::Entity Entity
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04442.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::YaspEntity< dim, dim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridentity.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspEntity< dim, dim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -897,15 +897,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Know dimension of the entity.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04446.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::YaspGeometry< mydim, mydim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

specialize for dim=dimworld, i.e. a volume element │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridgeometry.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridgeometry.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspGeometry< mydim, mydim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -198,15 +198,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

copy constructor (skipping temporary variables)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04450.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::YaspGeometry< 0, cdim, GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

specialization for dim=0, this is a vertex │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridgeometry.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridgeometry.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::YaspGeometry< 0, cdim, GridImp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -201,15 +201,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04458.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Specialization of the PersistentContainer for YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -816,15 +816,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04462.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::YGridComponent< Coordinates > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

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

│ │ │ │ Classes

class  Iterator
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │

│ │ │ │

together with an affine mapping.

│ │ │ │

A YGrid is characterized by the following quantities:

│ │ │ │
    │ │ │ │
  • The origin $ o=(o_0,\ldots,o_{d-1}) \in Z^d$,
  • │ │ │ │
  • the size $ s=(s_0,\ldots,s_{d-1}) \in Z^d$,
  • │ │ │ │
  • The shift $ r=(r_0,\ldots,r_{d-1}) \in R^d$.
  • │ │ │ │ -
  • a coordinate container, that gives the mapping of the index to global coordinates (see coordinates.hh)
  • │ │ │ │ +
  • a coordinate container, that gives the mapping of the index to global coordinates (see coordinates.hh)
  • │ │ │ │
│ │ │ │

The shift can be used to interpret the points of a grid as midpoints of cells, faces, edges, etc.

│ │ │ │

Here is a graphical illustration of a grid:

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ A YGrid.
│ │ │ │ @@ -1197,15 +1197,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04466.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::YGridComponent< Coordinates >::Iterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -878,15 +878,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

consecutive index in enclosing grid

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04470.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::YGrid< Coordinates > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

implements a collection of YGridComponents which form a codimension Entities of given codimension c need to be represented by d choose c YgridComponents. All entities in one such component share the same set of spanning unit vectors. A YGrid is used to iterate over the entire set of components the codimension consists of. It doesn't hold any data, but instead holds an iterator range into an array of components (which is owned by YGridLevel). │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 Iterator ()=default
 
 Iterator (const YGridComponent< Coordinates > &r)
 Make iterator pointing to first cell in a grid.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Iterator
 Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. More...
 
│ │ │ │ @@ -528,15 +528,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04474.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::YGrid< Coordinates >::Iterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -840,15 +840,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return the current component number

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04478.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::YGridList< Coordinates > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

implements a collection of multiple std::deque<Intersection> Intersections with neighboring processors are stored as std::deque<Intersection>. Eachsuch intersection only holds one YGridComponent. To do all communication associated with one codimension, multiple such deques have to be concatenated. YGridList manges this concatenation. As for YGrids, YGridList doesn't hold any data, but an iterator range into a data array owned by YGridLevel. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 Iterator ()=default
 default constructor
 
 Iterator (const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, int which=0)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -389,15 +389,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Intersection
 type describing an intersection with a neighboring processor More...
 
class  Iterator
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04482.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::YGridList< Coordinates >::Intersection Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

type describing an intersection with a neighboring processor │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -173,15 +173,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

a YGrid stub, that acts wraps above YGrid Component and handels the index offset

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04486.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::YGridList< Coordinates >::Iterator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/ygrid.hh>

│ │ │ │

│ │ │ │ Public Attributes

YGridComponent< Coordinates > grid
 The intersection as a subgrid of the local grid.
 
int rank
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -289,15 +289,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

compare two iterators

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04491.html │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │
// dune-geometry includes
│ │ │ │
#include<dune/geometry/referenceelements.hh>
│ │ │ │
#include<dune/geometry/quadraturerules.hh>
│ │ │ │
// dune-grid includes
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
int main(int argc, char** argv)
│ │ │ │ +
int main(int argc, char** argv)
│ │ │ │
{
│ │ │ │
// Maybe initialize Mpi
│ │ │ │
[[maybe_unused]] Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
│ │ │ │
│ │ │ │
// [set up grid]
│ │ │ │
const int dim = 4;
│ │ │ │
using Grid = Dune::YaspGrid<dim>;
│ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │
{
│ │ │ │
auto geoI = I.geometry();
│ │ │ │
divergence += f(geoI.center())*I.centerUnitOuterNormal()*geoI.volume();
│ │ │ │
}
│ │ │ │
}
│ │ │ │
std::cout << "divergence = " << divergence << std::endl;
│ │ │ │
}
│ │ │ │ -
int main(int argc, char **argv)
Definition recipe-integration.cc:70
│ │ │ │ +
int main(int argc, char **argv)
Definition recipe-integration.cc:70
│ │ │ │ │ │ │ │
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04492.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │
#include<dune/common/parallel/mpihelper.hh>
│ │ │ │
#include<dune/common/parametertreeparser.hh>
│ │ │ │
#include<dune/common/timer.hh>
│ │ │ │
// dune-grid includes
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
int main(int argc, char** argv)
│ │ │ │ +
int main(int argc, char** argv)
│ │ │ │
{
│ │ │ │
// Maybe initialize Mpi
│ │ │ │
[[maybe_unused]] Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
│ │ │ │
│ │ │ │
// [set up grid]
│ │ │ │
const int dim = 4;
│ │ │ │
using Grid = Dune::YaspGrid<dim>;
│ │ │ │ @@ -122,15 +122,15 @@ │ │ │ │
│ │ │ │
// [access to subentities]
│ │ │ │
const int mycodim = 2;
│ │ │ │
for (const auto& e : elements(gv))
│ │ │ │
for (unsigned int i=0; i<e.subEntities(mycodim); ++i)
│ │ │ │
[[maybe_unused]] auto v = e.template subEntity<codim>(i);
│ │ │ │
}
│ │ │ │ -
int main(int argc, char **argv)
Definition recipe-integration.cc:70
│ │ │ │ +
int main(int argc, char **argv)
Definition recipe-integration.cc:70
│ │ │ │ │ │ │ │
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07199.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Namespaces │ │ │ │
backuprestore.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <type_traits>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/grid/common/backuprestore.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Public Member Functions

 Iterator (const YGridList< Coordinates > &ygl, bool end=false)
 return iterator to begin and end of the container
 
Iteratoroperator++ ()
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07199_source.html │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │
6#define DUNE_GEOGRID_BACKUPRESTORE_HH
│ │ │ │
7
│ │ │ │
8#include <type_traits>
│ │ │ │
9
│ │ │ │
10#include <dune/common/exceptions.hh>
│ │ │ │ │ │ │ │
12
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
15
│ │ │ │
16namespace Dune
│ │ │ │
17{
│ │ │ │
18
│ │ │ │
│ │ │ │
19 namespace GeoGrid
│ │ │ │ @@ -197,15 +197,15 @@ │ │ │ │
99 }
│ │ │ │
100 };
│ │ │ │
│ │ │ │
101
│ │ │ │
102} // namespace Dune
│ │ │ │
103
│ │ │ │
104#endif // #ifndef DUNE_GEOGRID_BACKUPRESTORE_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
facility for writing and reading grids
Definition common/backuprestore.hh:43
│ │ │ │
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │
Definition geometrygrid/backuprestore.hh:27
│ │ │ │
Definition geometrygrid/backuprestore.hh:31
│ │ │ │
const Grid & asImp() const
Definition geometrygrid/backuprestore.hh:43
│ │ │ │
BackupRestoreFacilities()
Definition geometrygrid/backuprestore.hh:35
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07211.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
#include <cassert>
│ │ │ │ #include <type_traits>
│ │ │ │ #include <utility>
│ │ │ │ #include <dune/common/hybridutilities.hh>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::BackupRestoreFacilities< Grid, hasBackupRestoreFacilities >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07211_source.html │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ │
8#include <cassert>
│ │ │ │
9#include <type_traits>
│ │ │ │
10#include <utility>
│ │ │ │
11
│ │ │ │
12#include <dune/common/hybridutilities.hh>
│ │ │ │
13
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
16
│ │ │ │
17namespace Dune
│ │ │ │
18{
│ │ │ │
19
│ │ │ │
20 // Capabilities
│ │ │ │
21 // ------------
│ │ │ │
22
│ │ │ │ @@ -248,15 +248,15 @@ │ │ │ │ │ │ │ │
140
│ │ │ │
141 } // namespace Capabilities
│ │ │ │
142
│ │ │ │
143} // namespace Dune
│ │ │ │
144
│ │ │ │
145#endif // #ifndef DUNE_GEOGRID_CAPABILITIES_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Specialize with 'true' for if the codimension 0 entity of the grid has only one possible geometry typ...
Definition common/capabilities.hh:27
│ │ │ │
static const bool v
Definition common/capabilities.hh:28
│ │ │ │
static const unsigned int topologyId
Definition common/capabilities.hh:31
│ │ │ │
Specialize with 'true' for all codims that a grid implements entities for. (default=false)
Definition common/capabilities.hh:58
│ │ │ │
static const bool v
Definition common/capabilities.hh:59
│ │ │ │
specialize with 'true' for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
Definition common/capabilities.hh:74
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07214.html │ │ │ │ @@ -77,18 +77,18 @@ │ │ │ │ Classes | │ │ │ │ Namespaces │ │ │ │
datahandle.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <iostream>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/albertaheader.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/refinement.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/albertaheader.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/refinement.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::Capabilities::hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07214_source.html │ │ │ │ @@ -88,18 +88,18 @@ │ │ │ │
5#ifndef DUNE_ALBERTAGRIDDATAHANDLE_HH
│ │ │ │
6#define DUNE_ALBERTAGRIDDATAHANDLE_HH
│ │ │ │
7
│ │ │ │
8#include <iostream>
│ │ │ │
9
│ │ │ │ │ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
16
│ │ │ │
17#if HAVE_ALBERTA
│ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
22 namespace Alberta
│ │ │ │ @@ -154,18 +154,18 @@ │ │ │ │
63 }
│ │ │ │
64
│ │ │ │
65}
│ │ │ │
66
│ │ │ │
67#endif // #if HAVE_ALBERTA
│ │ │ │
68
│ │ │ │
69#endif
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ +
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Definition albertagrid/datahandle.hh:27
│ │ │ │
AdaptRestrictProlongHandler(Grid &grid, RestrictProlongOperator &rpOp)
Definition albertagrid/datahandle.hh:42
│ │ │ │
void restrictLocal(const Patch &patch, int i)
Definition albertagrid/datahandle.hh:48
│ │ │ │
void prolongLocal(const Patch &patch, int i)
Definition albertagrid/datahandle.hh:55
│ │ │ │ │ │ │ │
Definition refinement.hh:40
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -73,21 +73,21 @@ │ │ │ │ │ 63 } │ │ │ │ │ 64 │ │ │ │ │ 65} │ │ │ │ │ 66 │ │ │ │ │ 67#endif // #if HAVE_ALBERTA │ │ │ │ │ 68 │ │ │ │ │ 69#endif │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ _e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ │ provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ geometryInFather │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ -_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ DDeeffiinniittiioonn albertagrid/datahandle.hh:27 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r_:_:_A_d_a_p_t_R_e_s_t_r_i_c_t_P_r_o_l_o_n_g_H_a_n_d_l_e_r │ │ │ │ │ AdaptRestrictProlongHandler(Grid &grid, RestrictProlongOperator &rpOp) │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07217.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
datahandle.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ #include <dune/grid/geometrygrid/entity.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::Alberta::AdaptRestrictProlongHandler< Grid, RestrictProlongOperator >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07217_source.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GEOGRID_DATAHANDLE_HH
│ │ │ │
6#define DUNE_GEOGRID_DATAHANDLE_HH
│ │ │ │
7
│ │ │ │
8#include <dune/common/typetraits.hh>
│ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │
17
│ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │ │ │ │ │
86
│ │ │ │
87 } // namespace GeoGrid
│ │ │ │
88
│ │ │ │
89} // namespace Dune
│ │ │ │
90
│ │ │ │
91#endif // #ifndef DUNE_GEOGRID_DATAHANDLE_HH
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ │
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │
Definition geometrygrid/capabilities.hh:116
│ │ │ │
Definition geometrygrid/datahandle.hh:27
│ │ │ │
bool fixedSize(int dim, int codim) const
Definition geometrygrid/datahandle.hh:44
│ │ │ │
bool contains(int dim, int codim) const
Definition geometrygrid/datahandle.hh:36
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07223.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
#include <config.h>
│ │ │ │ #include <cstdio>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/grid/io/file/dgfparser/dgfparser.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DGFPrintInfo
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07226.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
│ │ │ │
#include <vector>
│ │ │ │ #include <dune/grid/albertagrid.hh>
│ │ │ │ #include <dune/grid/albertagrid/gridfactory.hh>
│ │ │ │ #include <dune/grid/io/file/dgfparser/dgfparser.hh>
│ │ │ │ #include <dune/grid/io/file/dgfparser/blocks/projection.hh>
│ │ │ │ #include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07226_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
12
│ │ │ │ │ │ │ │ │ │ │ │
15
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
18
│ │ │ │
19#if HAVE_ALBERTA
│ │ │ │
20
│ │ │ │
21namespace Dune
│ │ │ │
22{
│ │ │ │
23
│ │ │ │
24 // External Forward Declarations
│ │ │ │ @@ -297,15 +297,15 @@ │ │ │ │
186
│ │ │ │
187}
│ │ │ │
188
│ │ │ │
189#endif // #if HAVE_ALBERTA
│ │ │ │
190
│ │ │ │
191#endif // #ifndef DUNE_ALBERTA_DGFPARSER_HH
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Definition dgfgridfactory.hh:38
│ │ │ │
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ │
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition common/intersection.hh:250
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07229.html │ │ │ │ @@ -74,19 +74,19 @@ │ │ │ │ │ │ │ │
│ │ │ │
dgfparser.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "dgfparser/dgfparser.hh"
│ │ │ │ #include <dune/grid/albertagrid/dgfparser.hh>
│ │ │ │ -#include "dgfparser/dgfug.hh"
│ │ │ │ -#include "dgfparser/dgfoned.hh"
│ │ │ │ -#include "dgfparser/dgfyasp.hh"
│ │ │ │ -#include "dgfparser/dgfgeogrid.hh"
│ │ │ │ -#include "dgfparser/dgfidentitygrid.hh"
│ │ │ │ +#include "dgfparser/dgfug.hh"
│ │ │ │ +#include "dgfparser/dgfoned.hh"
│ │ │ │ +#include "dgfparser/dgfyasp.hh"
│ │ │ │ +#include "dgfparser/dgfgeogrid.hh"
│ │ │ │ +#include "dgfparser/dgfidentitygrid.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07229_source.html │ │ │ │ @@ -87,25 +87,25 @@ │ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_DGFPARSER_HH
│ │ │ │
6#define DUNE_DGFPARSER_HH
│ │ │ │
7// include dgf parser
│ │ │ │ │ │ │ │
9/* include the implementations */
│ │ │ │ │ │ │ │ -
11#include "dgfparser/dgfug.hh"
│ │ │ │ -
12#include "dgfparser/dgfoned.hh"
│ │ │ │ -
13#include "dgfparser/dgfyasp.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ +
11#include "dgfparser/dgfug.hh"
│ │ │ │ +
12#include "dgfparser/dgfoned.hh"
│ │ │ │ +
13#include "dgfparser/dgfyasp.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │
16#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -21,16 +21,16 @@ │ │ │ │ │ 10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ 11#include "_d_g_f_p_a_r_s_e_r_/_d_g_f_u_g_._h_h" │ │ │ │ │ 12#include "_d_g_f_p_a_r_s_e_r_/_d_g_f_o_n_e_d_._h_h" │ │ │ │ │ 13#include "_d_g_f_p_a_r_s_e_r_/_d_g_f_y_a_s_p_._h_h" │ │ │ │ │ 14#include "_d_g_f_p_a_r_s_e_r_/_d_g_f_g_e_o_g_r_i_d_._h_h" │ │ │ │ │ 15#include "_d_g_f_p_a_r_s_e_r_/_d_g_f_i_d_e_n_t_i_t_y_g_r_i_d_._h_h" │ │ │ │ │ 16#endif │ │ │ │ │ -_d_g_f_u_g_._h_h │ │ │ │ │ -_d_g_f_o_n_e_d_._h_h │ │ │ │ │ -_d_g_f_g_e_o_g_r_i_d_._h_h │ │ │ │ │ _d_g_f_i_d_e_n_t_i_t_y_g_r_i_d_._h_h │ │ │ │ │ _d_g_f_y_a_s_p_._h_h │ │ │ │ │ +_d_g_f_u_g_._h_h │ │ │ │ │ +_d_g_f_g_e_o_g_r_i_d_._h_h │ │ │ │ │ +_d_g_f_o_n_e_d_._h_h │ │ │ │ │ _d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ _d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07232.html │ │ │ │ @@ -87,37 +87,37 @@ │ │ │ │ #include <vector>
│ │ │ │ #include <memory>
│ │ │ │ #include <map>
│ │ │ │ #include <assert.h>
│ │ │ │ #include <cmath>
│ │ │ │ #include <dune/common/parallel/mpihelper.hh>
│ │ │ │ #include <dune/common/stdstreams.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/gridptr.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/macrogrid.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfgridfactory.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/general.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/polyhedron.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/gridptr.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/macrogrid.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfgridfactory.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/general.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/polyhedron.hh>
│ │ │ │ #include <dune/grid/io/file/dgfparser/blocks/projection.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/vertex.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/vertex.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07232_source.html │ │ │ │ @@ -99,40 +99,40 @@ │ │ │ │
16#include <map>
│ │ │ │
17#include <assert.h>
│ │ │ │
18#include <cmath>
│ │ │ │
19
│ │ │ │
20//- Dune includes
│ │ │ │
21#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
22#include <dune/common/stdstreams.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
25
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
28
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
33
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
49
│ │ │ │
50namespace Dune {
│ │ │ │
51
│ │ │ │
54 template <class GridType>
│ │ │ │
│ │ │ │ │ │ │ │
56 {
│ │ │ │ @@ -147,36 +147,36 @@ │ │ │ │
742 tetrahedral grid for Dune::Alberta then the bisection routine does
│ │ │ │
743 not necessarily terminate. This problem does not occur
│ │ │ │
744 if the grid is constructed using the \b Interval block.
│ │ │ │
745 */
│ │ │ │
746
│ │ │ │
747} // end namespace Dune
│ │ │ │
748#endif
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │
static double refineWeight()
│ │ │ │
static int refineStepsForHalf()
number of globalRefine steps needed to refuce h by 0.5
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -74,37 +74,37 @@ │ │ │ │ │ 742 tetrahedral grid for Dune::Alberta then the bisection routine does │ │ │ │ │ 743 not necessarily terminate. This problem does not occur │ │ │ │ │ 744 if the grid is constructed using the \b Interval block. │ │ │ │ │ 745 */ │ │ │ │ │ 746 │ │ │ │ │ 747} // end namespace Dune │ │ │ │ │ 748#endif │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ _d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ DataHandles. │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ -_d_g_f_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ -_i_n_t_e_r_v_a_l_._h_h │ │ │ │ │ +_m_a_c_r_o_g_r_i_d_._h_h │ │ │ │ │ +_g_r_i_d_p_t_r_._h_h │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ +_b_o_u_n_d_a_r_y_d_o_m_._h_h │ │ │ │ │ _v_e_r_t_e_x_._h_h │ │ │ │ │ -_s_i_m_p_l_e_x_g_e_n_e_r_a_t_i_o_n_._h_h │ │ │ │ │ -_b_o_u_n_d_a_r_y_s_e_g_._h_h │ │ │ │ │ -_p_e_r_i_o_d_i_c_f_a_c_e_t_r_a_n_s_._h_h │ │ │ │ │ -_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_p_o_l_y_h_e_d_r_o_n_._h_h │ │ │ │ │ _g_e_n_e_r_a_l_._h_h │ │ │ │ │ -_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h │ │ │ │ │ -_d_i_m_._h_h │ │ │ │ │ _c_u_b_e_._h_h │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +_s_i_m_p_l_e_x_._h_h │ │ │ │ │ _p_o_l_y_g_o_n_._h_h │ │ │ │ │ -_b_o_u_n_d_a_r_y_d_o_m_._h_h │ │ │ │ │ +_d_i_m_._h_h │ │ │ │ │ +_i_n_t_e_r_v_a_l_._h_h │ │ │ │ │ +_b_o_u_n_d_a_r_y_s_e_g_._h_h │ │ │ │ │ +_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h │ │ │ │ │ +_s_i_m_p_l_e_x_g_e_n_e_r_a_t_i_o_n_._h_h │ │ │ │ │ +_p_o_l_y_h_e_d_r_o_n_._h_h │ │ │ │ │ +_p_e_r_i_o_d_i_c_f_a_c_e_t_r_a_n_s_._h_h │ │ │ │ │ +_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ _e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ -_g_r_i_d_p_t_r_._h_h │ │ │ │ │ -_m_a_c_r_o_g_r_i_d_._h_h │ │ │ │ │ +_d_g_f_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ _p_a_r_s_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ Some simple static information for a given GridType. │ │ │ │ │ DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07235.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
entity.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/grid/common/entity.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ #include <dune/grid/albertagrid/entityseed.hh>
│ │ │ │ #include <dune/grid/albertagrid/geometry.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::DGFGridInfo< GridType >
 Some simple static information for a given GridType. More...
│ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07235_source.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTA_ENTITY_HH
│ │ │ │
6#define DUNE_ALBERTA_ENTITY_HH
│ │ │ │
7
│ │ │ │ │ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │
13
│ │ │ │
14#if HAVE_ALBERTA
│ │ │ │
15
│ │ │ │
16namespace Dune
│ │ │ │
17{
│ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │
121 }
│ │ │ │ │ │ │ │
122
│ │ │ │
123 //***********************************************
│ │ │ │
124 // end of interface methods
│ │ │ │
125 //***********************************************
│ │ │ │
126
│ │ │ │ -
128 ALBERTA EL_INFO *getElInfo () const;
│ │ │ │ +
128 ALBERTA EL_INFO *getElInfo () const;
│ │ │ │
129
│ │ │ │
130 const ElementInfo &elementInfo () const { return elementInfo_; }
│ │ │ │
131
│ │ │ │
133 bool equals ( const This &other ) const;
│ │ │ │
134
│ │ │ │
135 void clearElement ();
│ │ │ │
136 void setElement ( const ElementInfo &elementInfo, int subEntity );
│ │ │ │ @@ -367,15 +367,15 @@ │ │ │ │
344 bool hasBoundaryIntersections () const ;
│ │ │ │
345
│ │ │ │ │ │ │ │
348
│ │ │ │
350 bool equals ( const This &i ) const;
│ │ │ │
351
│ │ │ │
352 // needed for LevelIterator to compare
│ │ │ │ -
353 ALBERTA EL_INFO *getElInfo () const;
│ │ │ │ +
353 ALBERTA EL_INFO *getElInfo () const;
│ │ │ │
354
│ │ │ │
│ │ │ │
355 const ElementInfo &elementInfo () const
│ │ │ │
356 {
│ │ │ │
357 return elementInfo_;
│ │ │ │
358 }
│ │ │ │
│ │ │ │ @@ -426,16 +426,16 @@ │ │ │ │ │ │ │ │
401
│ │ │ │
402} // namespace Dune
│ │ │ │
403
│ │ │ │
404#endif // #if HAVE_ALBERTA
│ │ │ │
405
│ │ │ │
406#endif // #ifndef DUNE_ALBERTA_ENTITY_HH
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │ │ │ │ │
Definition treeiterator.hh:189
│ │ │ │
Definition hierarchiciterator.hh:29
│ │ │ │
Definition albertagrid/intersection.hh:105
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -329,19 +329,19 @@ │ │ │ │ │ 400 }; │ │ │ │ │ 401 │ │ │ │ │ 402} // namespace Dune │ │ │ │ │ 403 │ │ │ │ │ 404#endif // #if HAVE_ALBERTA │ │ │ │ │ 405 │ │ │ │ │ 406#endif // #ifndef DUNE_ALBERTA_ENTITY_HH │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ PartitionType │ │ │ │ │ Attributes used in the generic overlap model. │ │ │ │ │ DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07238.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
│ │ │ │
#include <type_traits>
│ │ │ │ #include <dune/common/iteratorrange.hh>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ #include <dune/geometry/dimension.hh>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include "grid.hh"
│ │ │ │ -#include "rangegenerators.hh"
│ │ │ │ +#include "rangegenerators.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07238_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │
10#include <dune/common/iteratorrange.hh>
│ │ │ │
11#include <dune/common/typetraits.hh>
│ │ │ │
12
│ │ │ │
13#include <dune/geometry/dimension.hh>
│ │ │ │
14#include <dune/geometry/referenceelements.hh>
│ │ │ │
15
│ │ │ │
16#include "grid.hh"
│ │ │ │ -
17#include "rangegenerators.hh"
│ │ │ │ +
17#include "rangegenerators.hh"
│ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
64 template<int cd, int dim, class GridImp, template<int,int,class> class EntityImp>
│ │ │ │
│ │ │ │
65 class Entity
│ │ │ │ @@ -484,15 +484,15 @@ │ │ │ │
690 typedef typename GridImp::template Codim<cd>::Geometry Geo;
│ │ │ │
691 return referenceElement< typename Geo::ctype, Geo::mydimension >(entity.type());
│ │ │ │
692 }
│ │ │ │
│ │ │ │
693}
│ │ │ │
694
│ │ │ │
695#endif // DUNE_GRID_COMMON_ENTITY_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │
const Implementation & impl() const
access to the underlying implementation
Definition common/entity.hh:86
│ │ │ │
bool operator!=(const Entity &other) const
Compares two entities for inequality.
Definition common/entity.hh:176
│ │ │ │
unsigned int subEntities(unsigned int codim) const
Number of subentities for a given codimension.
Definition common/entity.hh:159
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07241.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Namespaces │ │ │ │
entity.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/cornerstorage.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/cornerstorage.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::Entity< cd, dim, GridImp, EntityImp >
 Wrapper class for entities. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07241_source.html │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │
5#ifndef DUNE_GEOGRID_ENTITY_HH
│ │ │ │
6#define DUNE_GEOGRID_ENTITY_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/referenceelements.hh>
│ │ │ │
9
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
13
│ │ │ │
14namespace Dune
│ │ │ │
15{
│ │ │ │
16
│ │ │ │
17 namespace GeoGrid
│ │ │ │
18 {
│ │ │ │
19
│ │ │ │ @@ -823,15 +823,15 @@ │ │ │ │ │ │ │ │
869
│ │ │ │
870 } // namespace GeoGrid
│ │ │ │
871
│ │ │ │
872} // namespace Dune
│ │ │ │
873
│ │ │ │
874#endif // #ifndef DUNE_GEOGRID_ENTITY_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07244.html │ │ │ │ @@ -75,16 +75,16 @@ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
entityseed.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::EntityBase< codim, Grid, false >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07244_source.html │ │ │ │ @@ -84,16 +84,16 @@ │ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTA_ENTITYSEED_HH
│ │ │ │
6#define DUNE_ALBERTA_ENTITYSEED_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
10
│ │ │ │
11namespace Dune
│ │ │ │
12{
│ │ │ │
13
│ │ │ │
14 // Internal Forward Declarations
│ │ │ │
15 // -----------------------------
│ │ │ │
16
│ │ │ │ @@ -211,16 +211,16 @@ │ │ │ │
│ │ │ │
113
│ │ │ │
114#endif // #if HAVE_ALBERTA
│ │ │ │
115
│ │ │ │
116} // end namespace Dune
│ │ │ │
117
│ │ │ │
118#endif // #ifndef DUNE_ALBERTA_ENTITYSEED_HH
│ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ +
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │ │ │ │ │ │ │ │ │
Definition albertagrid/entityseed.hh:18
│ │ │ │
ElementInfo elementInfo(const MeshPointer &mesh) const
Definition albertagrid/entityseed.hh:65
│ │ │ │
AlbertaGridEntitySeed(const ElementInfo &elementInfo, int subEntity)
Definition albertagrid/entityseed.hh:55
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07253.html │ │ │ │ @@ -76,16 +76,16 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
geometry.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/grid/common/geometry.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::AlbertaGridEntitySeed< codim, const AlbertaGrid< dim, dimworld > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07253_source.html │ │ │ │ @@ -85,16 +85,16 @@ │ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTA_GEOMETRY_HH
│ │ │ │
6#define DUNE_ALBERTA_GEOMETRY_HH
│ │ │ │
7
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
11
│ │ │ │
12#if HAVE_ALBERTA
│ │ │ │
13
│ │ │ │
14namespace Dune
│ │ │ │
15{
│ │ │ │
16
│ │ │ │
17 // Forward Declarations
│ │ │ │ @@ -690,16 +690,16 @@ │ │ │ │ │ │ │ │
589
│ │ │ │
590} // namespace Dune
│ │ │ │
591
│ │ │ │
592#endif // #if HAVE_ALBERTA
│ │ │ │
593
│ │ │ │
594#endif // #ifndef DUNE_ALBERTA_GEOMETRY_HH
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition algebra.hh:30
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -535,17 +535,17 @@ │ │ │ │ │ 588 }; │ │ │ │ │ 589 │ │ │ │ │ 590} // namespace Dune │ │ │ │ │ 591 │ │ │ │ │ 592#endif // #if HAVE_ALBERTA │ │ │ │ │ 593 │ │ │ │ │ 594#endif // #ifndef DUNE_ALBERTA_GEOMETRY_HH │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ ALBERTA REAL Real │ │ │ │ │ DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07259.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
│ │ │ │
#include <utility>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ #include <dune/geometry/multilineargeometry.hh>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/cornerstorage.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/cornerstorage.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::AlbertaGridCoordinateReader< codim, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07259_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │
10#include <dune/common/typetraits.hh>
│ │ │ │
11
│ │ │ │
12#include <dune/geometry/multilineargeometry.hh>
│ │ │ │
13#include <dune/geometry/referenceelements.hh>
│ │ │ │
14#include <dune/geometry/type.hh>
│ │ │ │
15
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
22 namespace GeoGrid
│ │ │ │
23 {
│ │ │ │
24
│ │ │ │ @@ -333,15 +333,15 @@ │ │ │ │ │ │ │ │
221
│ │ │ │
222 } // namespace GeoGrid
│ │ │ │
223
│ │ │ │
224} // namespace Dune
│ │ │ │
225
│ │ │ │
226#endif // #ifndef DUNE_GEOGRID_GEOMETRY_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │
Definition cornerstorage.hh:22
│ │ │ │
Definition cornerstorage.hh:174
│ │ │ │
Definition geometrygrid/geometry.hh:30
│ │ │ │
static const unsigned int topologyId
Definition geometrygrid/geometry.hh:37
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07262.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │
#include <algorithm>
│ │ │ │ #include <array>
│ │ │ │ #include <limits>
│ │ │ │ #include <map>
│ │ │ │ #include <memory>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <dune/grid/albertagrid/agrid.hh>
│ │ │ │ +#include <dune/grid/albertagrid/agrid.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::GeoGrid::InferHasSingleGeometryType< hasSingleGeometryType, dim, mydim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07262_source.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │
17#include <map>
│ │ │ │
18#include <memory>
│ │ │ │
19
│ │ │ │
20#include <dune/geometry/referenceelements.hh>
│ │ │ │
21
│ │ │ │ │ │ │ │
23
│ │ │ │ - │ │ │ │ + │ │ │ │
25
│ │ │ │
26#if HAVE_ALBERTA
│ │ │ │
27
│ │ │ │
28namespace Dune
│ │ │ │
29{
│ │ │ │
30
│ │ │ │
48 template< int dim, int dimworld >
│ │ │ │ @@ -557,15 +557,15 @@ │ │ │ │ │ │ │ │
542
│ │ │ │
543}
│ │ │ │
544
│ │ │ │
545#endif // #if HAVE_ALBERTA
│ │ │ │
546
│ │ │ │
547#endif // #ifndef DUNE_ALBERTA_GRIDFACTORY_HH
│ │ │ │ -
provides the AlbertaGrid class
│ │ │ │ +
provides the AlbertaGrid class
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │
int generic2alberta(int codim, int i) const
Definition agrid.hh:493
│ │ │ │
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07265.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │
#include <memory>
│ │ │ │ #include <vector>
│ │ │ │ #include <dune/common/deprecated.hh>
│ │ │ │ #include <dune/common/function.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/parallel/mpihelper.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ +#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GridFactory< AlbertaGrid< dim, dimworld > >
 specialization of the generic GridFactory for AlbertaGrid More...
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07265_source.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │
16#define DUNE_FUNCTION_HH_SILENCE_DEPRECATION
│ │ │ │
17#include <dune/common/function.hh>
│ │ │ │
18#include <dune/common/fvector.hh>
│ │ │ │
19#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
20
│ │ │ │
21#include <dune/geometry/type.hh>
│ │ │ │
22
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
25
│ │ │ │
26namespace Dune
│ │ │ │
27{
│ │ │ │
28
│ │ │ │
71 template <class GridType>
│ │ │ │
│ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │
375
│ │ │ │
376 };
│ │ │ │
│ │ │ │
377
│ │ │ │
378}
│ │ │ │
379
│ │ │ │
380#endif
│ │ │ │ -
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:73
│ │ │ │
virtual void insertBoundarySegment(const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment)
insert an arbitrarily shaped boundary segment
Definition common/gridfactory.hh:192
│ │ │ │
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition common/gridfactory.hh:220
│ │ │ │
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)=0
Insert an element into the coarse grid.
│ │ │ │
virtual std::unique_ptr< GridType > createGrid()=0
Finalize grid creation and hand over the grid.
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07268.html │ │ │ │ @@ -83,18 +83,18 @@ │ │ │ │

provides the GridFamily for AlbertaGrid │ │ │ │ More...

│ │ │ │
#include <dune/common/parallel/communication.hh>
│ │ │ │ #include <dune/grid/common/entity.hh>
│ │ │ │ #include <dune/grid/common/geometry.hh>
│ │ │ │ #include <dune/grid/common/intersection.hh>
│ │ │ │ #include <dune/grid/common/intersectioniterator.hh>
│ │ │ │ -#include <dune/grid/common/entityiterator.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/common/entityiterator.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ #include <dune/grid/albertagrid/gridview.hh>
│ │ │ │ -#include <dune/grid/albertagrid/geometryreference.hh>
│ │ │ │ +#include <dune/grid/albertagrid/geometryreference.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GridFactoryInterface< GridType >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07268_source.html │ │ │ │ @@ -90,19 +90,19 @@ │ │ │ │
7
│ │ │ │
13#include <dune/common/parallel/communication.hh>
│ │ │ │
14
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
20
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
24
│ │ │ │
25#if HAVE_ALBERTA
│ │ │ │
26
│ │ │ │
27namespace Dune
│ │ │ │
28{
│ │ │ │
29
│ │ │ │
30 // External Forward Declarations
│ │ │ │ @@ -239,17 +239,17 @@ │ │ │ │ │ │ │ │
157
│ │ │ │
158}
│ │ │ │
159
│ │ │ │
160#endif // #if HAVE_ALBERTA
│ │ │ │
161
│ │ │ │
162#endif // #ifndef DUNE_ALBERTAGRID_GRIDFAMILTY_HH
│ │ │ │ - │ │ │ │ -
Wrapper and interface classes for element geometries.
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
Wrapper and interface classes for element geometries.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ │ │ │ │
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │
Definition hierarchiciterator.hh:29
│ │ │ │
Definition albertagrid/intersection.hh:105
│ │ │ │
Definition albertagrid/intersectioniterator.hh:27
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -174,17 +174,17 @@ │ │ │ │ │ 157 │ │ │ │ │ 158} │ │ │ │ │ 159 │ │ │ │ │ 160#endif // #if HAVE_ALBERTA │ │ │ │ │ 161 │ │ │ │ │ 162#endif // #ifndef DUNE_ALBERTAGRID_GRIDFAMILTY_HH │ │ │ │ │ _e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _g_e_o_m_e_t_r_y_r_e_f_e_r_e_n_c_e_._h_h │ │ │ │ │ Wrapper and interface classes for element geometries. │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ ALBERTA REAL Real │ │ │ │ │ DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07271.html │ │ │ │ @@ -77,23 +77,23 @@ │ │ │ │ Classes | │ │ │ │ Namespaces │ │ │ │
gridfamily.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/grid/common/grid.hh>
│ │ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ #include <dune/grid/geometrygrid/entity.hh>
│ │ │ │ #include <dune/grid/geometrygrid/entityseed.hh>
│ │ │ │ #include <dune/grid/geometrygrid/geometry.hh>
│ │ │ │ #include <dune/grid/geometrygrid/gridview.hh>
│ │ │ │ #include <dune/grid/geometrygrid/intersection.hh>
│ │ │ │ #include <dune/grid/geometrygrid/intersectioniterator.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/iterator.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/idset.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/iterator.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/idset.hh>
│ │ │ │ #include <dune/grid/geometrygrid/indexsets.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::AlbertaGridFamily< dim, dimworld >
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07271_source.html │ │ │ │ @@ -86,23 +86,23 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GEOGRID_GRIDFAMILY_HH
│ │ │ │
6#define DUNE_GEOGRID_GRIDFAMILY_HH
│ │ │ │
7
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │
20
│ │ │ │
21namespace Dune
│ │ │ │
22{
│ │ │ │
23
│ │ │ │
27 namespace GeoGrid
│ │ │ │
28 {
│ │ │ │ @@ -209,17 +209,17 @@ │ │ │ │ │ │ │ │
123
│ │ │ │
124 } // namespace GeoGrid
│ │ │ │
125
│ │ │ │
126} // namespace Dune
│ │ │ │
127
│ │ │ │
128#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │
interface class for an iterator over grid entities
Definition entityiterator.hh:32
│ │ │ │
Store a reference to an entity with a minimal memory footprint.
Definition common/entityseed.hh:26
│ │ │ │
Wrapper class for geometries.
Definition common/geometry.hh:71
│ │ │ │
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -148,17 +148,17 @@ │ │ │ │ │ 122 }; │ │ │ │ │ 123 │ │ │ │ │ 124 } // namespace GeoGrid │ │ │ │ │ 125 │ │ │ │ │ 126} // namespace Dune │ │ │ │ │ 127 │ │ │ │ │ 128#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH │ │ │ │ │ +_d_e_c_l_a_r_a_t_i_o_n_._h_h │ │ │ │ │ _i_d_s_e_t_._h_h │ │ │ │ │ _i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_d_e_c_l_a_r_a_t_i_o_n_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ element or with the d... │ │ │ │ │ DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07277.html │ │ │ │ @@ -80,16 +80,16 @@ │ │ │ │ │ │ │ │
│ │ │ │
#include <typeinfo>
│ │ │ │ #include <dune/common/std/type_traits.hh>
│ │ │ │ #include <dune/common/iteratorrange.hh>
│ │ │ │ #include <dune/common/parallel/future.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ -#include <dune/grid/common/rangegenerators.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/rangegenerators.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::ExportParams< HG, CF >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07277_source.html │ │ │ │ @@ -92,16 +92,16 @@ │ │ │ │
9
│ │ │ │
10#include <dune/common/std/type_traits.hh>
│ │ │ │
11#include <dune/common/iteratorrange.hh>
│ │ │ │
12#include <dune/common/parallel/future.hh>
│ │ │ │
13
│ │ │ │
14#include <dune/geometry/type.hh>
│ │ │ │
15
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
22 template< int, int, class, class >
│ │ │ │
23 class GridDefaultImplementation;
│ │ │ │
24
│ │ │ │ @@ -404,16 +404,16 @@ │ │ │ │ │ │ │ │
378 };
│ │ │ │ │ │ │ │
379
│ │ │ │
380} // namespace Dune
│ │ │ │
381
│ │ │ │
382#endif // #ifndef DUNE_GRID_COMMON_GRIDVIEW_HH
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ - │ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ + │ │ │ │
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:191
│ │ │ │
Traits::Grid Grid
type of the grid
Definition common/gridview.hh:83
│ │ │ │
ThisType & operator=(const ThisType &other)
assignment operator
Definition common/gridview.hh:172
│ │ │ │
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition common/gridview.hh:237
│ │ │ │
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition common/gridview.hh:180
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07280.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ #include <dune/grid/common/gridview.hh>
│ │ │ │ #include <dune/grid/geometrygrid/datahandle.hh>
│ │ │ │ #include <dune/grid/geometrygrid/indexsets.hh>
│ │ │ │ #include <dune/grid/geometrygrid/intersection.hh>
│ │ │ │ #include <dune/grid/geometrygrid/intersectioniterator.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/iterator.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/iterator.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GridView< ViewTraits >
 Grid view abstract base class. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07280_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │
10
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
22 namespace GeoGrid
│ │ │ │
23 {
│ │ │ │
24
│ │ │ │ @@ -376,15 +376,15 @@ │ │ │ │ │ │ │ │
252
│ │ │ │
253 } // namespace GeoGrid
│ │ │ │
254
│ │ │ │
255} // namespace Dune
│ │ │ │
256
│ │ │ │
257#endif // #ifndef DUNE_GEOGRID_GRIDVIEW_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │
interface class for an iterator over grid entities
Definition entityiterator.hh:32
│ │ │ │
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07283.html │ │ │ │ @@ -81,20 +81,20 @@ │ │ │ │ │ │ │ │
│ │ │ │
#include <array>
│ │ │ │ #include <utility>
│ │ │ │ #include <dune/common/hybridutilities.hh>
│ │ │ │ #include <dune/common/stdstreams.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ -#include <dune/grid/common/indexidset.hh>
│ │ │ │ -#include <dune/grid/albertagrid/indexstack.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/common/indexidset.hh>
│ │ │ │ +#include <dune/grid/albertagrid/indexstack.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ +#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ #include <dune/grid/albertagrid/gridfamily.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::GridViewTraits< HGV, CoordFunction, Allocator >
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07283_source.html │ │ │ │ @@ -91,21 +91,21 @@ │ │ │ │
8#include <array>
│ │ │ │
9#include <utility>
│ │ │ │
10
│ │ │ │
11#include <dune/common/hybridutilities.hh>
│ │ │ │
12#include <dune/common/stdstreams.hh>
│ │ │ │
13
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │
23
│ │ │ │
24#if HAVE_ALBERTA
│ │ │ │
25
│ │ │ │
26namespace Dune
│ │ │ │
27{
│ │ │ │
28
│ │ │ │ @@ -725,20 +725,20 @@ │ │ │ │ │ │ │ │
602
│ │ │ │
603} // namespace Dune
│ │ │ │
604
│ │ │ │
605#endif // #if HAVE_ALBERTA
│ │ │ │
606
│ │ │ │
607#endif // #ifndef DUNE_ALBERTAGRIDINDEXSETS_HH
│ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ -
Provides an index stack that supplies indices for element numbering for a grid (i....
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Provides an index stack that supplies indices for element numbering for a grid (i....
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Dune::IndexStack< int, 100000 > IndexStack
Definition albertagrid/indexsets.hh:31
│ │ │ │
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │
static const int dimension
Definition agrid.hh:145
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -611,22 +611,22 @@ │ │ │ │ │ 603} // namespace Dune │ │ │ │ │ 604 │ │ │ │ │ 605#endif // #if HAVE_ALBERTA │ │ │ │ │ 606 │ │ │ │ │ 607#endif // #ifndef DUNE_ALBERTAGRIDINDEXSETS_HH │ │ │ │ │ _i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ Provides base classes for index and id sets. │ │ │ │ │ +_d_o_f_a_d_m_i_n_._h_h │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ │ _i_n_d_e_x_s_t_a_c_k_._h_h │ │ │ │ │ Provides an index stack that supplies indices for element numbering for a grid │ │ │ │ │ (i.... │ │ │ │ │ _e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ -_d_o_f_a_d_m_i_n_._h_h │ │ │ │ │ -_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_d_e_x_S_t_a_c_k │ │ │ │ │ Dune::IndexStack< int, 100000 > IndexStack │ │ │ │ │ DDeeffiinniittiioonn albertagrid/indexsets.hh:31 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07286.html │ │ │ │ @@ -77,17 +77,17 @@ │ │ │ │ Classes | │ │ │ │ Namespaces │ │ │ │
indexsets.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <vector>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/indexidset.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/indexidset.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::AlbertaGridHierarchicIndexSet< dim, dimworld >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07286_source.html │ │ │ │ @@ -88,18 +88,18 @@ │ │ │ │
5#ifndef DUNE_GEOGRID_INDEXSETS_HH
│ │ │ │
6#define DUNE_GEOGRID_INDEXSETS_HH
│ │ │ │
7
│ │ │ │
8#include <vector>
│ │ │ │
9
│ │ │ │
10#include <dune/common/typetraits.hh>
│ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ - │ │ │ │ + │ │ │ │
16
│ │ │ │
17namespace Dune
│ │ │ │
18{
│ │ │ │
19
│ │ │ │
20 namespace GeoGrid
│ │ │ │
21 {
│ │ │ │
22
│ │ │ │ @@ -207,17 +207,17 @@ │ │ │ │ │ │ │ │
109
│ │ │ │
110 } // namespace GeoGrid
│ │ │ │
111
│ │ │ │
112} // namespace Dune
│ │ │ │
113
│ │ │ │
114#endif // #ifndef DUNE_GEOGRID_INDEXSETS_HH
│ │ │ │ - │ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ - │ │ │ │ + │ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition indexidset.hh:153
│ │ │ │
IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition indexidset.hh:113
│ │ │ │
Export the type of the entity used as parameter in the index(...) method.
Definition indexidset.hh:87
│ │ │ │
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:694
│ │ │ │
Definition geometrygrid/indexsets.hh:29
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07289.html │ │ │ │ @@ -76,16 +76,16 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
intersection.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/albertagrid/transformation.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/transformation.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ #include <dune/grid/albertagrid/geometry.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::IndexSet< Grid, HostIndexSet >
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07289_source.html │ │ │ │ @@ -86,16 +86,16 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTA_INTERSECTION_HH
│ │ │ │
6#define DUNE_ALBERTA_INTERSECTION_HH
│ │ │ │
7
│ │ │ │ │ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │
13
│ │ │ │
14#if HAVE_ALBERTA
│ │ │ │
15
│ │ │ │
16namespace Dune
│ │ │ │
17{
│ │ │ │
18
│ │ │ │ @@ -273,16 +273,16 @@ │ │ │ │ │ │ │ │
185
│ │ │ │
186} // namespace Dune
│ │ │ │
187
│ │ │ │
188#endif // #if HAVE_ALBERTA
│ │ │ │
189
│ │ │ │
190#endif // #ifndef DUNE_ALBERTA_INTERSECTION_HH
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ │ │ │ │
int twistInNeighbor(int face) const
Definition elementinfo.hh:612
│ │ │ │
Definition albertagrid/intersection.hh:105
│ │ │ │
LocalGeometry geometryInOutside() const
Definition intersection.cc:402
│ │ │ │
GridImp::template Codim< 0 >::Entity outside() const
Definition intersection.cc:365
│ │ │ │
AlbertaGridLeafIntersection(const This &other)
Definition albertagrid/intersection.hh:146
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07295.html │ │ │ │ @@ -75,16 +75,16 @@ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
intersection.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/cornerstorage.hh>
│ │ │ │ +
#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/cornerstorage.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::AlbertaGridIntersectionBase< Grid >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07295_source.html │ │ │ │ @@ -84,16 +84,16 @@ │ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GEOGRID_INTERSECTION_HH
│ │ │ │
6#define DUNE_GEOGRID_INTERSECTION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
10
│ │ │ │
11namespace Dune
│ │ │ │
12{
│ │ │ │
13
│ │ │ │
14 namespace GeoGrid
│ │ │ │
15 {
│ │ │ │
16
│ │ │ │ @@ -304,16 +304,16 @@ │ │ │ │
│ │ │ │
186
│ │ │ │
187 } // namespace GeoGrid
│ │ │ │
188
│ │ │ │
189} // namespace Dune
│ │ │ │
190
│ │ │ │
191#endif // #ifndef DUNE_GEOGRID_INTERSECTION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition common/geometry.hh:558
│ │ │ │
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │
Definition cornerstorage.hh:123
│ │ │ │
Definition geometrygrid/intersection.hh:22
│ │ │ │
FieldVector< ctype, dimensionworld > integrationOuterNormal(const FieldVector< ctype, dimension-1 > &local) const
Definition geometrygrid/intersection.hh:126
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -206,16 +206,16 @@ │ │ │ │ │ 185 }; │ │ │ │ │ 186 │ │ │ │ │ 187 } // namespace GeoGrid │ │ │ │ │ 188 │ │ │ │ │ 189} // namespace Dune │ │ │ │ │ 190 │ │ │ │ │ 191#endif // #ifndef DUNE_GEOGRID_INTERSECTION_HH │ │ │ │ │ -_c_o_r_n_e_r_s_t_o_r_a_g_e_._h_h │ │ │ │ │ _d_e_c_l_a_r_a_t_i_o_n_._h_h │ │ │ │ │ +_c_o_r_n_e_r_s_t_o_r_a_g_e_._h_h │ │ │ │ │ _s_t_d │ │ │ │ │ STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ │ auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07307.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
persistentcontainer.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::Intersection< Grid, HostIntersection >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07307_source.html │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTA_PERSISTENTCONTAINER_HH
│ │ │ │
6#define DUNE_ALBERTA_PERSISTENTCONTAINER_HH
│ │ │ │
7
│ │ │ │ │ │ │ │
9
│ │ │ │
10#if HAVE_ALBERTA
│ │ │ │ - │ │ │ │ + │ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │
16 // PersistentContainer for AlbertaGrid
│ │ │ │
17 // -----------------------------------
│ │ │ │
18
│ │ │ │ @@ -119,15 +119,15 @@ │ │ │ │ │ │ │ │
33
│ │ │ │
34} // end namespace Dune
│ │ │ │
35
│ │ │ │
36#endif // #if HAVE_ALBERTA
│ │ │ │
37
│ │ │ │
38#endif // #ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │
PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
Definition albertagrid/persistentcontainer.hh:29
│ │ │ │
Base::Grid Grid
Definition albertagrid/persistentcontainer.hh:26
│ │ │ │
Base::Value Value
Definition albertagrid/persistentcontainer.hh:27
│ │ │ │
A class for storing data during an adaptation cycle.
Definition utility/persistentcontainer.hh:22
│ │ │ │
Base::Value Value
Definition utility/persistentcontainer.hh:27
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07310.html │ │ │ │ @@ -75,17 +75,17 @@ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
persistentcontainer.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ +
#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ #include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │ -#include <dune/grid/utility/persistentcontainerwrapper.hh>
│ │ │ │ +#include <dune/grid/utility/persistentcontainerwrapper.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::PersistentContainer< AlbertaGrid< dim, dimworld >, T >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07310_source.html │ │ │ │ @@ -84,17 +84,17 @@ │ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GEOGRID_PERSISTENTCONTAINER_HH
│ │ │ │
6#define DUNE_GEOGRID_PERSISTENTCONTAINER_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │
12namespace Dune
│ │ │ │
13{
│ │ │ │
14
│ │ │ │
15 // PersistentContainer for GeometryGrid
│ │ │ │
16 // ------------------------------------
│ │ │ │
17
│ │ │ │ @@ -116,16 +116,16 @@ │ │ │ │
│ │ │ │
31 };
│ │ │ │ │ │ │ │
32
│ │ │ │
33} // namespace Dune
│ │ │ │
34
│ │ │ │
35#endif // #ifndef DUNE_GEOGRID_PERSISTENTCONTAINER_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
grid wrapper replacing the geometries
Definition geometrygrid/grid.hh:86
│ │ │ │
Base::Value Value
Definition geometrygrid/persistentcontainer.hh:26
│ │ │ │
Base::Grid Grid
Definition geometrygrid/persistentcontainer.hh:25
│ │ │ │
PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
Definition geometrygrid/persistentcontainer.hh:28
│ │ │ │
A class for storing data during an adaptation cycle.
Definition utility/persistentcontainer.hh:22
│ │ │ │
Base::Value Value
Definition utility/persistentcontainer.hh:27
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07313.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ Functions │ │ │ │
persistentcontainer.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <map>
│ │ │ │ -#include <dune/grid/utility/persistentcontainermap.hh>
│ │ │ │ +#include <dune/grid/utility/persistentcontainermap.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::PersistentContainer< GeometryGrid< HostGrid, CoordFunction, Allocator >, T >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07313_source.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_PERSISTENTCONTAINER_HH
│ │ │ │
6#define DUNE_PERSISTENTCONTAINER_HH
│ │ │ │
7
│ │ │ │
8#include <map>
│ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │
12namespace Dune
│ │ │ │
13{
│ │ │ │
14
│ │ │ │
19 template< class G, class T >
│ │ │ │
│ │ │ │ │ │ │ │ @@ -172,15 +172,15 @@ │ │ │ │
85 a.swap( b );
│ │ │ │
86 }
│ │ │ │
│ │ │ │
87
│ │ │ │
88} // namespace std
│ │ │ │
89
│ │ │ │
90#endif // #ifndef DUNE_PERSISTENTCONTAINER_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
STL namespace.
│ │ │ │
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
A class for storing data during an adaptation cycle.
Definition utility/persistentcontainer.hh:22
│ │ │ │
Base::Value Value
Definition utility/persistentcontainer.hh:27
│ │ │ │
Base::Grid Grid
Definition utility/persistentcontainer.hh:26
│ │ │ │
PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
Definition utility/persistentcontainer.hh:29
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07316.html │ │ │ │ @@ -76,17 +76,17 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
projection.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <memory>
│ │ │ │ -#include <dune/grid/common/boundaryprojection.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/common/boundaryprojection.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::PersistentContainer< G, T >
 A class for storing data during an adaptation cycle. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07316_source.html │ │ │ │ @@ -86,18 +86,18 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_ALBERTA_NODEPROJECTION_HH
│ │ │ │
6#define DUNE_ALBERTA_NODEPROJECTION_HH
│ │ │ │
7
│ │ │ │
8#include <memory>
│ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │
15#if HAVE_ALBERTA
│ │ │ │
16
│ │ │ │
17namespace Dune
│ │ │ │
18{
│ │ │ │
19
│ │ │ │
20 namespace Alberta
│ │ │ │ @@ -320,15 +320,15 @@ │ │ │ │
201
│ │ │ │
202
│ │ │ │
203 // BasicNodeProjection
│ │ │ │
204 // -------------------
│ │ │ │
205
│ │ │ │
│ │ │ │ │ │ │ │ -
207 : public ALBERTA NODE_PROJECTION
│ │ │ │ +
207 : public ALBERTA NODE_PROJECTION
│ │ │ │
208 {
│ │ │ │
│ │ │ │
209 explicit BasicNodeProjection ( unsigned int boundaryIndex )
│ │ │ │
210 : boundaryIndex_( boundaryIndex )
│ │ │ │
211 {
│ │ │ │
212 func = 0;
│ │ │ │
213 }
│ │ │ │ @@ -401,18 +401,18 @@ │ │ │ │
270 }
│ │ │ │
271
│ │ │ │
272}
│ │ │ │
273
│ │ │ │
274#endif // #if HAVE_ALBERTA
│ │ │ │
275
│ │ │ │
276#endif // #ifndef DUNE_ALBERTA_NODEPROJECTION_HH
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
ALBERTA REAL_B LocalVector
Definition misc.hh:49
│ │ │ │
static const int dimWorld
Definition misc.hh:46
│ │ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ │ │ │ │
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Definition elementinfo.hh:752
│ │ │ │
Definition misc.hh:231
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -289,20 +289,20 @@ │ │ │ │ │ 271 │ │ │ │ │ 272} │ │ │ │ │ 273 │ │ │ │ │ 274#endif // #if HAVE_ALBERTA │ │ │ │ │ 275 │ │ │ │ │ 276#endif // #ifndef DUNE_ALBERTA_NODEPROJECTION_HH │ │ │ │ │ _b_o_u_n_d_a_r_y_p_r_o_j_e_c_t_i_o_n_._h_h │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _m_i_s_c_._h_h │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ ALBERTA REAL_B LocalVector │ │ │ │ │ DDeeffiinniittiioonn misc.hh:49 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07319.html │ │ │ │ @@ -77,16 +77,16 @@ │ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ Functions
│ │ │ │
projection.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <map>
│ │ │ │ -#include <dune/grid/common/boundaryprojection.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#include <dune/grid/common/boundaryprojection.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::Alberta::DuneBoundaryProjection< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07319_source.html │ │ │ │ @@ -86,16 +86,16 @@ │ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_DGF_PROJECTIONBLOCK_HH
│ │ │ │
6#define DUNE_DGF_PROJECTIONBLOCK_HH
│ │ │ │
7
│ │ │ │
8#include <map>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │
16 namespace dgf
│ │ │ │
17 {
│ │ │ │
18
│ │ │ │ @@ -353,16 +353,16 @@ │ │ │ │
250 }
│ │ │ │
251
│ │ │ │
252 }
│ │ │ │
253
│ │ │ │
254}
│ │ │ │
255
│ │ │ │
256#endif // #ifndef DUNE_DGF_PROJECTIONBLOCK_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
Definition interval.hh:123
│ │ │ │
Interface class for vertex projection at the boundary.
Definition boundaryprojection.hh:33
│ │ │ │
FieldVector< double, dimworld > CoordinateType
type of coordinate vector
Definition boundaryprojection.hh:42
│ │ │ │
Definition basic.hh:31
│ │ │ │
std::stringstream line
Definition basic.hh:47
│ │ │ │
Definition io/file/dgfparser/blocks/projection.hh:24
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07322.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │
#include <array>
│ │ │ │ #include <memory>
│ │ │ │ #include <vector>
│ │ │ │ #include <tuple>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <dune/grid/utility/multiindex.hh>
│ │ │ │ +#include <dune/grid/utility/multiindex.hh>
│ │ │ │ #include <dune/grid/utility/structuredgridfactory.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::dgf::ProjectionBlock
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07322_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │
15#include <memory>
│ │ │ │
16#include <vector>
│ │ │ │
17#include <tuple>
│ │ │ │
18
│ │ │ │
19#include <dune/common/exceptions.hh>
│ │ │ │
20#include <dune/common/fvector.hh>
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
24
│ │ │ │
25#if HAVE_ALBERTA
│ │ │ │
26
│ │ │ │
27namespace Dune
│ │ │ │
28{
│ │ │ │
29 // Forward Declarations
│ │ │ │ @@ -286,15 +286,15 @@ │ │ │ │ │ │ │ │
225
│ │ │ │
226} // end namespace Dune
│ │ │ │
227
│ │ │ │
228#endif // HAVE_ALBERTA
│ │ │ │
229
│ │ │ │
230#endif // DUNE_ALBERTA_STRUCTUREDGRIDFACTORY_HH
│ │ │ │ -
Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
│ │ │ │ +
Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
[ provides Dune::Grid ]
Definition agrid.hh:109
│ │ │ │
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │
Construct structured cube and simplex grids in unstructured grid managers.
Definition utility/structuredgridfactory.hh:31
│ │ │ │
static void createSimplexGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
insert structured simplex grid into grid factory
Definition utility/structuredgridfactory.hh:181
│ │ │ │
static std::array< unsigned int, dim > computeUnitOffsets(const std::array< unsigned int, dim > &vertices)
Definition albertagrid/structuredgridfactory.hh:110
│ │ │ │
static void createCubeGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Definition albertagrid/structuredgridfactory.hh:206
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07325.html │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ │ #include <cstddef>
│ │ │ │ #include <cstdlib>
│ │ │ │ #include <memory>
│ │ │ │ #include <dune/common/classname.hh>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <dune/grid/utility/multiindex.hh>
│ │ │ │ +#include <dune/grid/utility/multiindex.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::StructuredGridFactory< AlbertaGrid< dim, dimworld > >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07325_source.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │
16#include <memory>
│ │ │ │
17
│ │ │ │
18#include <dune/common/classname.hh>
│ │ │ │
19#include <dune/common/exceptions.hh>
│ │ │ │
20#include <dune/common/fvector.hh>
│ │ │ │
21
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
24
│ │ │ │
25namespace Dune {
│ │ │ │
26
│ │ │ │
29 template <class GridType>
│ │ │ │
│ │ │ │ │ │ │ │
31 {
│ │ │ │ @@ -299,15 +299,15 @@ │ │ │ │
260
│ │ │ │
261 };
│ │ │ │
│ │ │ │
262
│ │ │ │
263} // namespace Dune
│ │ │ │
264
│ │ │ │
265#endif
│ │ │ │ -
Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
│ │ │ │ +
Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Construct structured cube and simplex grids in unstructured grid managers.
Definition utility/structuredgridfactory.hh:31
│ │ │ │
static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured cube grid.
Definition utility/structuredgridfactory.hh:157
│ │ │ │
static void createSimplexGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
insert structured simplex grid into grid factory
Definition utility/structuredgridfactory.hh:181
│ │ │ │
static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
Create a structured simplex grid.
Definition utility/structuredgridfactory.hh:251
│ │ │ │
static void createCubeGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
insert structured cube grid into grid factory
Definition utility/structuredgridfactory.hh:91
│ │ │ │
Communication comm() const
Return the Communication used by the grid factory.
Definition common/gridfactory.hh:297
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07328.html │ │ │ │ @@ -86,28 +86,28 @@ │ │ │ │
#include <iostream>
│ │ │ │ #include <string>
│ │ │ │ #include <vector>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ #include <dune/common/typeutilities.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/common/exceptions.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/exceptions.hh>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ #include <dune/grid/common/gridview.hh>
│ │ │ │ -#include <dune/grid/common/defaultgridview.hh>
│ │ │ │ +#include <dune/grid/common/defaultgridview.hh>
│ │ │ │ #include <dune/grid/common/entityseed.hh>
│ │ │ │ #include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ #include "geometry.hh"
│ │ │ │ #include "entity.hh"
│ │ │ │ #include "intersection.hh"
│ │ │ │ #include "intersectioniterator.hh"
│ │ │ │ -#include "entityiterator.hh"
│ │ │ │ -#include "indexidset.hh"
│ │ │ │ +#include "entityiterator.hh"
│ │ │ │ +#include "indexidset.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::StructuredGridFactory< GridType >
 Construct structured cube and simplex grids in unstructured grid managers. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07328_source.html │ │ │ │ @@ -98,20 +98,20 @@ │ │ │ │
18#include <dune/common/typetraits.hh>
│ │ │ │
19#include <dune/common/typeutilities.hh>
│ │ │ │
20
│ │ │ │
21// dune-geometry includes
│ │ │ │
22#include <dune/geometry/type.hh>
│ │ │ │
23
│ │ │ │
24// local includes
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
32
│ │ │ │
33// include this file after all other, because other files might undef the
│ │ │ │
34// macros that are defined in that file
│ │ │ │
35#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │
36
│ │ │ │
37namespace Dune {
│ │ │ │ @@ -629,24 +629,24 @@ │ │ │ │ │ │ │ │
1114}
│ │ │ │
1115
│ │ │ │
1116#include "geometry.hh"
│ │ │ │
1117#include "entity.hh"
│ │ │ │
1118#include "intersection.hh"
│ │ │ │
1119#include "intersectioniterator.hh"
│ │ │ │ -
1120#include "entityiterator.hh"
│ │ │ │ -
1121#include "indexidset.hh"
│ │ │ │ +
1120#include "entityiterator.hh"
│ │ │ │ +
1121#include "indexidset.hh"
│ │ │ │
1122
│ │ │ │
1123#endif // #ifndef DUNE_GRID_COMMON_GRID_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ - │ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │
Definition geometryreference.hh:139
│ │ │ │
Specialize with 'true' for all codims that a grid implements entities for. (default=false)
Definition common/capabilities.hh:58
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -518,23 +518,23 @@ │ │ │ │ │ 1117#include "_e_n_t_i_t_y_._h_h" │ │ │ │ │ 1118#include "_i_n_t_e_r_s_e_c_t_i_o_n_._h_h" │ │ │ │ │ 1119#include "_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ 1120#include "_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ 1121#include "_i_n_d_e_x_i_d_s_e_t_._h_h" │ │ │ │ │ 1122 │ │ │ │ │ 1123#endif // #ifndef DUNE_GRID_COMMON_GRID_HH │ │ │ │ │ -_e_x_c_e_p_t_i_o_n_s_._h_h │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ _d_e_f_a_u_l_t_g_r_i_d_v_i_e_w_._h_h │ │ │ │ │ +_e_x_c_e_p_t_i_o_n_s_._h_h │ │ │ │ │ +_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ +Provides base classes for index and id sets. │ │ │ │ │ _d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ DataHandles. │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ -Provides base classes for index and id sets. │ │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ _D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ InterfaceType │ │ │ │ │ Parameter to be used for the communication functions. │ │ │ │ │ DDeeffiinniittiioonn gridenums.hh:86 │ │ │ │ │ _D_u_n_e_:_:_l_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< │ │ │ │ │ dim, dimworld, ct, GridFamily > &grid) │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07331.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
#include <memory>
│ │ │ │ #include <dune/common/shared_ptr.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ #include <dune/grid/geometrygrid/backuprestore.hh>
│ │ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ #include <dune/grid/geometrygrid/datahandle.hh>
│ │ │ │ #include <dune/grid/geometrygrid/gridfamily.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/identity.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/identity.hh>
│ │ │ │ #include <dune/grid/geometrygrid/persistentcontainer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::Grid< dim, dimworld, ct, GridFamily >
 Grid abstract base class. More...
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07331_source.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
11
│ │ │ │ │ │ │ │
13
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
20
│ │ │ │
21namespace Dune
│ │ │ │
22{
│ │ │ │
23
│ │ │ │
24 // DefaultCoordFunction
│ │ │ │
25 // --------------------
│ │ │ │ @@ -498,15 +498,15 @@ │ │ │ │
679
│ │ │ │
681 };
│ │ │ │ │ │ │ │
682
│ │ │ │
683} // namespace Dune
│ │ │ │
684
│ │ │ │
685#endif // #ifndef DUNE_GEOGRID_GRID_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Store a reference to an entity with a minimal memory footprint.
Definition common/entityseed.hh:26
│ │ │ │
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │
Definition common/grid.hh:862
│ │ │ │
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │
Definition geometrygrid/backuprestore.hh:27
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07337.html │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ │ #include <dune/common/classname.hh>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/hybridutilities.hh>
│ │ │ │ #include <dune/geometry/multilineargeometry.hh>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::DefaultCoordFunction< HostGrid >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07337_source.html │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │
20#include <dune/common/fvector.hh>
│ │ │ │
21#include <dune/common/hybridutilities.hh>
│ │ │ │
22
│ │ │ │
23#include <dune/geometry/multilineargeometry.hh>
│ │ │ │
24#include <dune/geometry/referenceelements.hh>
│ │ │ │
25#include <dune/geometry/type.hh>
│ │ │ │
26
│ │ │ │ - │ │ │ │ + │ │ │ │
28
│ │ │ │
29namespace Dune {
│ │ │ │
30
│ │ │ │
32 template<class ctype>
│ │ │ │
│ │ │ │
33 struct EntityInfo {
│ │ │ │
35 std::size_t count;
│ │ │ │ @@ -313,15 +313,15 @@ │ │ │ │
277 }
│ │ │ │
│ │ │ │
278
│ │ │ │
279} // namespace Dune
│ │ │ │
280
│ │ │ │
281
│ │ │ │
282#endif // DUNE_GRID_UTILITY_GRIDINFO_HH
│ │ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)
fill a GridViewInfo structure from a serial grid
Definition utility/gridinfo.hh:214
│ │ │ │
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition common/entity.hh:100
│ │ │ │
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition indexidset.hh:223
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

albertagrid → common Relation

│ │ │ │ Classes

struct  Dune::EntityInfo< ctype >
 Structure to hold statistical information about one type of entity. More...
File in dune/grid/albertagridIncludes file in dune/grid/common
agrid.hhadaptcallback.hh
agrid.hhcommon/grid.hh
agrid.hhcommon/gridfactory.hh
agrid.hhsizecache.hh
albertagrid/backuprestore.hhcommon/backuprestore.hh
albertagrid/capabilities.hhcommon/capabilities.hh
albertagrid/datahandle.hhcommon/grid.hh
albertagrid/dgfparser.hhcommon/intersection.hh
albertagrid/entity.hhcommon/entity.hh
albertagrid/geometry.hhcommon/geometry.hh
albertagrid/gridfactory.hhcommon/gridfactory.hh
albertagrid/gridfamily.hhcommon/entity.hh
albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid/gridfamily.hhentityiterator.hh
albertagrid/gridview.hhcommon/capabilities.hh
albertagrid/gridview.hhcommon/gridview.hh
albertagrid/indexsets.hhcommon/grid.hh
albertagrid/indexsets.hhindexidset.hh
albertagrid/intersection.hhcommon/intersection.hh
albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
albertagrid/projection.hhboundaryprojection.hh
albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
albertareader.hhcommon/grid.hh
albertareader.hhcommon/gridfactory.hh
geometryreference.hhcommon/geometry.hh
hierarchiciterator.hhentityiterator.hh
leafiterator.hhentityiterator.hh
leveliterator.hhentityiterator.hh
macrodata.ccexceptions.hh
│ │ │ │ +

albertagrid → common Relation

File in dune/grid/albertagridIncludes file in dune/grid/common
agrid.hhadaptcallback.hh
agrid.hhcommon/grid.hh
agrid.hhcommon/gridfactory.hh
agrid.hhsizecache.hh
albertagrid/backuprestore.hhcommon/backuprestore.hh
albertagrid/capabilities.hhcommon/capabilities.hh
albertagrid/datahandle.hhcommon/grid.hh
albertagrid/dgfparser.hhcommon/intersection.hh
albertagrid/entity.hhcommon/entity.hh
albertagrid/geometry.hhcommon/geometry.hh
albertagrid/gridfactory.hhcommon/gridfactory.hh
albertagrid/gridfamily.hhcommon/entity.hh
albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid/gridfamily.hhentityiterator.hh
albertagrid/gridview.hhcommon/capabilities.hh
albertagrid/gridview.hhcommon/gridview.hh
albertagrid/indexsets.hhcommon/grid.hh
albertagrid/indexsets.hhindexidset.hh
albertagrid/intersection.hhcommon/intersection.hh
albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
albertagrid/projection.hhboundaryprojection.hh
albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
albertareader.hhcommon/grid.hh
albertareader.hhcommon/gridfactory.hh
geometryreference.hhcommon/geometry.hh
hierarchiciterator.hhentityiterator.hh
leafiterator.hhentityiterator.hh
leveliterator.hhentityiterator.hh
macrodata.ccexceptions.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000012.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

albertagrid → io Relation

File in dune/grid/albertagridIncludes file in dune/grid/io
albertagrid/dgfparser.hhfile / dgfparser / blocks / io/file/dgfparser/blocks/projection.hh
albertagrid/dgfparser.hhfile / dgfparser / io/file/dgfparser/dgfparser.hh
albertagrid/dgfparser.hhfile / dgfparser / parser.hh
│ │ │ │ +

albertagrid → io Relation

File in dune/grid/albertagridIncludes file in dune/grid/io
albertagrid/dgfparser.hhfile / dgfparser / blocks / io/file/dgfparser/blocks/projection.hh
albertagrid/dgfparser.hhfile / dgfparser / io/file/dgfparser/dgfparser.hh
albertagrid/dgfparser.hhfile / dgfparser / parser.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000015.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

albertagrid → utility Relation

File in dune/grid/albertagridIncludes file in dune/grid/utility
albertagrid/persistentcontainer.hhpersistentcontainervector.hh
albertagrid/persistentcontainer.hhutility/persistentcontainer.hh
albertagrid/structuredgridfactory.hhmultiindex.hh
albertagrid/structuredgridfactory.hhutility/structuredgridfactory.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000001_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

blocks → common Relation

File in dune/grid/io/file/dgfparser/blocksIncludes file in dune/grid/common
io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
│ │ │ │ +

blocks → common Relation

File in dune/grid/io/file/dgfparser/blocksIncludes file in dune/grid/common
io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000002_000012.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

common → io Relation

File in dune/grid/commonIncludes file in dune/grid/io
boundaryprojection.hhfile / gmshreader.hh
│ │ │ │ +

common → io Relation

File in dune/grid/commonIncludes file in dune/grid/io
boundaryprojection.hhfile / gmshreader.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000001.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

dgfparser → blocks Relation

File in dune/grid/io/file/dgfparserIncludes file in dune/grid/io/file/dgfparser/blocks
dgfgeogrid.hhio/file/dgfparser/blocks/projection.hh
dgfug.hhgridparameter.hh
io/file/dgfparser/dgfparser.ccboundarydom.hh
io/file/dgfparser/dgfparser.hhbasic.hh
io/file/dgfparser/dgfparser.hhboundarydom.hh
io/file/dgfparser/dgfparser.hhboundaryseg.hh
io/file/dgfparser/dgfparser.hhcube.hh
io/file/dgfparser/dgfparser.hhdim.hh
io/file/dgfparser/dgfparser.hhgeneral.hh
io/file/dgfparser/dgfparser.hhgridparameter.hh
io/file/dgfparser/dgfparser.hhinterval.hh
io/file/dgfparser/dgfparser.hhio/file/dgfparser/blocks/projection.hh
io/file/dgfparser/dgfparser.hhperiodicfacetrans.hh
io/file/dgfparser/dgfparser.hhpolygon.hh
io/file/dgfparser/dgfparser.hhpolyhedron.hh
io/file/dgfparser/dgfparser.hhsimplex.hh
io/file/dgfparser/dgfparser.hhsimplexgeneration.hh
io/file/dgfparser/dgfparser.hhvertex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

dgfparser → common Relation

File in dune/grid/io/file/dgfparserIncludes file in dune/grid/common
dgfgeogrid.hhcommon/intersection.hh
dgfgridfactory.hhcommon/intersection.hh
dgfoned.hhcommon/intersection.hh
dgfug.hhcommon/intersection.hh
dgfwriter.hhcommon/grid.hh
dgfwriter.hhrangegenerators.hh
dgfyasp.hhcommon/intersection.hh
gridptr.hhcommon/intersection.hh
gridptr.hhdatahandleif.hh
gridptr.hhgridenums.hh
gridptr.hhpartitionset.hh
gridptr.hhrangegenerators.hh
blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
io/file/dgfparser/dgfparser.hhdatahandleif.hh
io/file/dgfparser/dgfparser.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000015.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

dgfparser → utility Relation

File in dune/grid/io/file/dgfparserIncludes file in dune/grid/utility
dgfgeogrid.hhhostgridaccess.hh
dgfidentitygrid.hhhostgridaccess.hh
│ │ │ │ +

dgfparser → utility Relation

File in dune/grid/io/file/dgfparserIncludes file in dune/grid/utility
dgfgeogrid.hhhostgridaccess.hh
dgfidentitygrid.hhhostgridaccess.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

file → common Relation

File in dune/grid/io/fileIncludes file in dune/grid/common
dgfparser / dgfgeogrid.hhcommon/intersection.hh
dgfparser / dgfgridfactory.hhcommon/intersection.hh
dgfparser / dgfoned.hhcommon/intersection.hh
dgfparser / dgfug.hhcommon/intersection.hh
dgfparser / dgfwriter.hhcommon/grid.hh
dgfparser / dgfwriter.hhrangegenerators.hh
dgfparser / dgfyasp.hhcommon/intersection.hh
gmshreader.hhboundarysegment.hh
gmshreader.hhcommon/gridfactory.hh
gmshwriter.hhcommon/grid.hh
gmshwriter.hhmcmgmapper.hh
gnuplot.hhcommon/grid.hh
dgfparser / gridptr.hhcommon/intersection.hh
dgfparser / gridptr.hhdatahandleif.hh
dgfparser / gridptr.hhgridenums.hh
dgfparser / gridptr.hhpartitionset.hh
dgfparser / gridptr.hhrangegenerators.hh
dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
printgrid.hhmcmgmapper.hh
starcdreader.hhcommon/gridfactory.hh
vtk / function.hhmcmgmapper.hh
vtk / volumeiterators.hhgridenums.hh
vtk / vtkwriter.hhmcmgmapper.hh
vtk / vtkwriter.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000003.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

file → dgfparser Relation

File in dune/grid/io/fileIncludes file in dune/grid/io/file/dgfparser
dgfparser / dgfgeogrid.hhblocks / io/file/dgfparser/blocks/projection.hh
dgfparser / dgfug.hhblocks / gridparameter.hh
io/file/dgfparser.hhdgfgeogrid.hh
io/file/dgfparser.hhdgfidentitygrid.hh
io/file/dgfparser.hhdgfoned.hh
io/file/dgfparser.hhdgfug.hh
io/file/dgfparser.hhdgfyasp.hh
io/file/dgfparser.hhio/file/dgfparser/dgfparser.hh
dgfparser / io/file/dgfparser/dgfparser.ccblocks / boundarydom.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / basic.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundarydom.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundaryseg.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / cube.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / dim.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / general.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / gridparameter.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / interval.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / io/file/dgfparser/blocks/projection.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / periodicfacetrans.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / polygon.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / polyhedron.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplex.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplexgeneration.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / vertex.hh
│ │ │ │ +

file → dgfparser Relation

File in dune/grid/io/fileIncludes file in dune/grid/io/file/dgfparser
dgfparser / dgfgeogrid.hhblocks / io/file/dgfparser/blocks/projection.hh
dgfparser / dgfug.hhblocks / gridparameter.hh
io/file/dgfparser.hhdgfgeogrid.hh
io/file/dgfparser.hhdgfidentitygrid.hh
io/file/dgfparser.hhdgfoned.hh
io/file/dgfparser.hhdgfug.hh
io/file/dgfparser.hhdgfyasp.hh
io/file/dgfparser.hhio/file/dgfparser/dgfparser.hh
dgfparser / io/file/dgfparser/dgfparser.ccblocks / boundarydom.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / basic.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundarydom.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundaryseg.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / cube.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / dim.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / general.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / gridparameter.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / interval.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / io/file/dgfparser/blocks/projection.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / periodicfacetrans.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / polygon.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / polyhedron.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplex.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplexgeneration.hh
dgfparser / io/file/dgfparser/dgfparser.hhblocks / vertex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000009.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

file → gnuplot Relation

File in dune/grid/io/fileIncludes file in dune/grid/io/file/gnuplot
gnuplot.hhgnuplot.cc
│ │ │ │ +

file → gnuplot Relation

File in dune/grid/io/fileIncludes file in dune/grid/io/file/gnuplot
gnuplot.hhgnuplot.cc
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000015.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

file → utility Relation

File in dune/grid/io/fileIncludes file in dune/grid/utility
dgfparser / dgfgeogrid.hhhostgridaccess.hh
dgfparser / dgfidentitygrid.hhhostgridaccess.hh
│ │ │ │ +

file → utility Relation

File in dune/grid/io/fileIncludes file in dune/grid/utility
dgfparser / dgfgeogrid.hhhostgridaccess.hh
dgfparser / dgfidentitygrid.hhhostgridaccess.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000017.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

file → vtk Relation

File in dune/grid/io/fileIncludes file in dune/grid/io/file/vtk
vtk.hhboundarywriter.hh
vtk.hhsubsamplingvtkwriter.hh
vtk.hhvolumewriter.hh
vtk.hhvtksequencewriter.hh
vtk.hhvtkwriter.hh
│ │ │ │ +

file → vtk Relation

File in dune/grid/io/fileIncludes file in dune/grid/io/file/vtk
vtk.hhboundarywriter.hh
vtk.hhsubsamplingvtkwriter.hh
vtk.hhvolumewriter.hh
vtk.hhvtksequencewriter.hh
vtk.hhvtkwriter.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000008_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

geometrygrid → common Relation

File in dune/grid/geometrygridIncludes file in dune/grid/common
cachedcoordfunction.hhgridenums.hh
geometrygrid/backuprestore.hhcommon/backuprestore.hh
geometrygrid/capabilities.hhcommon/capabilities.hh
geometrygrid/datahandle.hhcommon/grid.hh
geometrygrid/datahandle.hhdatahandleif.hh
geometrygrid/entity.hhcommon/grid.hh
geometrygrid/entityseed.hhcommon/entityseed.hh
geometrygrid/geometry.hhcommon/capabilities.hh
geometrygrid/grid.hhcommon/grid.hh
geometrygrid/gridfamily.hhcommon/grid.hh
geometrygrid/gridview.hhcommon/capabilities.hh
geometrygrid/gridview.hhcommon/gridview.hh
geometrygrid/indexsets.hhgridenums.hh
geometrygrid/indexsets.hhindexidset.hh
hostcorners.hhcommon/entity.hh
idset.hhindexidset.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000008_000015.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

geometrygrid → utility Relation

File in dune/grid/geometrygridIncludes file in dune/grid/utility
cachedcoordfunction.hhutility/persistentcontainer.hh
geometrygrid/persistentcontainer.hhpersistentcontainerwrapper.hh
geometrygrid/persistentcontainer.hhutility/persistentcontainer.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000000.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

grid → albertagrid Relation

File in dune/gridIncludes file in dune/grid/albertagrid
albertagrid.hhagrid.hh
albertagrid.hhalbertagrid/gridfactory.hh
albertagrid.hhalbertagrid/persistentcontainer.hh
albertagrid.hhalbertagrid/structuredgridfactory.hh
io / file / io/file/dgfparser.hhalbertagrid/dgfparser.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

grid → common Relation

File in dune/gridIncludes file in dune/grid/common
albertagrid / agrid.hhadaptcallback.hh
albertagrid / agrid.hhcommon/grid.hh
albertagrid / agrid.hhcommon/gridfactory.hh
albertagrid / agrid.hhsizecache.hh
albertagrid / albertagrid/backuprestore.hhcommon/backuprestore.hh
albertagrid / albertagrid/capabilities.hhcommon/capabilities.hh
albertagrid / albertagrid/datahandle.hhcommon/grid.hh
albertagrid / albertagrid/dgfparser.hhcommon/intersection.hh
albertagrid / albertagrid/entity.hhcommon/entity.hh
albertagrid / albertagrid/geometry.hhcommon/geometry.hh
albertagrid / albertagrid/gridfactory.hhcommon/gridfactory.hh
albertagrid / albertagrid/gridfamily.hhcommon/entity.hh
albertagrid / albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid / albertagrid/gridfamily.hhentityiterator.hh
albertagrid / albertagrid/gridview.hhcommon/capabilities.hh
albertagrid / albertagrid/gridview.hhcommon/gridview.hh
albertagrid / albertagrid/indexsets.hhcommon/grid.hh
albertagrid / albertagrid/indexsets.hhindexidset.hh
albertagrid / albertagrid/intersection.hhcommon/intersection.hh
albertagrid / albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
albertagrid / albertagrid/projection.hhboundaryprojection.hh
albertagrid / albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
albertagrid / albertareader.hhcommon/grid.hh
albertagrid / albertareader.hhcommon/gridfactory.hh
geometrygrid / cachedcoordfunction.hhgridenums.hh
io / file / dgfparser / dgfgeogrid.hhcommon/intersection.hh
io / file / dgfparser / dgfgridfactory.hhcommon/intersection.hh
io / file / dgfparser / dgfoned.hhcommon/intersection.hh
io / file / dgfparser / dgfug.hhcommon/intersection.hh
io / file / dgfparser / dgfwriter.hhcommon/grid.hh
io / file / dgfparser / dgfwriter.hhrangegenerators.hh
io / file / dgfparser / dgfyasp.hhcommon/intersection.hh
geometrygrid / geometrygrid/backuprestore.hhcommon/backuprestore.hh
geometrygrid / geometrygrid/capabilities.hhcommon/capabilities.hh
geometrygrid / geometrygrid/datahandle.hhcommon/grid.hh
geometrygrid / geometrygrid/datahandle.hhdatahandleif.hh
geometrygrid / geometrygrid/entity.hhcommon/grid.hh
geometrygrid / geometrygrid/entityseed.hhcommon/entityseed.hh
geometrygrid / geometrygrid/geometry.hhcommon/capabilities.hh
geometrygrid / geometrygrid/grid.hhcommon/grid.hh
geometrygrid / geometrygrid/gridfamily.hhcommon/grid.hh
geometrygrid / geometrygrid/gridview.hhcommon/capabilities.hh
geometrygrid / geometrygrid/gridview.hhcommon/gridview.hh
geometrygrid / geometrygrid/indexsets.hhgridenums.hh
geometrygrid / geometrygrid/indexsets.hhindexidset.hh
albertagrid / geometryreference.hhcommon/geometry.hh
io / file / gmshreader.hhboundarysegment.hh
io / file / gmshreader.hhcommon/gridfactory.hh
io / file / gmshwriter.hhcommon/grid.hh
io / file / gmshwriter.hhmcmgmapper.hh
io / file / gnuplot.hhcommon/grid.hh
io / file / dgfparser / gridptr.hhcommon/intersection.hh
io / file / dgfparser / gridptr.hhdatahandleif.hh
io / file / dgfparser / gridptr.hhgridenums.hh
io / file / dgfparser / gridptr.hhpartitionset.hh
io / file / dgfparser / gridptr.hhrangegenerators.hh
albertagrid / hierarchiciterator.hhentityiterator.hh
geometrygrid / hostcorners.hhcommon/entity.hh
identitygrid.hhcommon/capabilities.hh
identitygrid.hhcommon/grid.hh
geometrygrid / idset.hhindexidset.hh
io / file / dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
io / file / dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
io / file / dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
albertagrid / leafiterator.hhentityiterator.hh
albertagrid / leveliterator.hhentityiterator.hh
albertagrid / macrodata.ccexceptions.hh
onedgrid.hhcommon/capabilities.hh
onedgrid.hhcommon/grid.hh
onedgrid.hhcommon/gridfactory.hh
io / file / printgrid.hhmcmgmapper.hh
io / file / starcdreader.hhcommon/gridfactory.hh
uggrid.hhboundarysegment.hh
uggrid.hhcommon/capabilities.hh
uggrid.hhcommon/grid.hh
yaspgrid.hhcommon/backuprestore.hh
yaspgrid.hhcommon/capabilities.hh
yaspgrid.hhcommon/grid.hh
yaspgrid.hhdatahandleif.hh
yaspgrid.hhindexidset.hh
identitygrid / identitygridentity.hhcommon/grid.hh
identitygrid / identitygridgeometry.hhcommon/geometry.hh
identitygrid / identitygridindexsets.hhindexidset.hh
identitygrid / identitygridintersectioniterator.hhcommon/intersection.hh
identitygrid / identitygridleafiterator.hhgridenums.hh
identitygrid / identitygridleveliterator.hhgridenums.hh
uggrid / uggridfactory.hhboundarysegment.hh
uggrid / uggridfactory.hhcommon/gridfactory.hh
utility / entitycommhelper.hhgridenums.hh
utility / globalindexset.hhgridenums.hh
utility / globalindexset.hhdatahandleif.hh
utility / utility/gridinfo.hhmcmgmapper.hh
utility / hierarchicsearch.hhcommon/grid.hh
utility / hierarchicsearch.hhgridenums.hh
utility / parmetisgridpartitioner.hhmcmgmapper.hh
utility / parmetisgridpartitioner.hhrangegenerators.hh
utility / persistentcontainermap.hhcommon/capabilities.hh
utility / utility/structuredgridfactory.hhcommon/gridfactory.hh
utility / tensorgridfactory.hhcommon/gridfactory.hh
io / file / vtk / function.hhmcmgmapper.hh
io / file / vtk / volumeiterators.hhgridenums.hh
io / file / vtk / vtkwriter.hhmcmgmapper.hh
io / file / vtk / vtkwriter.hhgridenums.hh
yaspgrid / yaspgrid/backuprestore.hhcommon/backuprestore.hh
yaspgrid / torus.hhexceptions.hh
│ │ │ │ +

grid → common Relation

File in dune/gridIncludes file in dune/grid/common
albertagrid / agrid.hhadaptcallback.hh
albertagrid / agrid.hhcommon/grid.hh
albertagrid / agrid.hhcommon/gridfactory.hh
albertagrid / agrid.hhsizecache.hh
albertagrid / albertagrid/backuprestore.hhcommon/backuprestore.hh
albertagrid / albertagrid/capabilities.hhcommon/capabilities.hh
albertagrid / albertagrid/datahandle.hhcommon/grid.hh
albertagrid / albertagrid/dgfparser.hhcommon/intersection.hh
albertagrid / albertagrid/entity.hhcommon/entity.hh
albertagrid / albertagrid/geometry.hhcommon/geometry.hh
albertagrid / albertagrid/gridfactory.hhcommon/gridfactory.hh
albertagrid / albertagrid/gridfamily.hhcommon/entity.hh
albertagrid / albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid / albertagrid/gridfamily.hhentityiterator.hh
albertagrid / albertagrid/gridview.hhcommon/capabilities.hh
albertagrid / albertagrid/gridview.hhcommon/gridview.hh
albertagrid / albertagrid/indexsets.hhcommon/grid.hh
albertagrid / albertagrid/indexsets.hhindexidset.hh
albertagrid / albertagrid/intersection.hhcommon/intersection.hh
albertagrid / albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
albertagrid / albertagrid/projection.hhboundaryprojection.hh
albertagrid / albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
albertagrid / albertareader.hhcommon/grid.hh
albertagrid / albertareader.hhcommon/gridfactory.hh
geometrygrid / cachedcoordfunction.hhgridenums.hh
io / file / dgfparser / dgfgeogrid.hhcommon/intersection.hh
io / file / dgfparser / dgfgridfactory.hhcommon/intersection.hh
io / file / dgfparser / dgfoned.hhcommon/intersection.hh
io / file / dgfparser / dgfug.hhcommon/intersection.hh
io / file / dgfparser / dgfwriter.hhcommon/grid.hh
io / file / dgfparser / dgfwriter.hhrangegenerators.hh
io / file / dgfparser / dgfyasp.hhcommon/intersection.hh
geometrygrid / geometrygrid/backuprestore.hhcommon/backuprestore.hh
geometrygrid / geometrygrid/capabilities.hhcommon/capabilities.hh
geometrygrid / geometrygrid/datahandle.hhcommon/grid.hh
geometrygrid / geometrygrid/datahandle.hhdatahandleif.hh
geometrygrid / geometrygrid/entity.hhcommon/grid.hh
geometrygrid / geometrygrid/entityseed.hhcommon/entityseed.hh
geometrygrid / geometrygrid/geometry.hhcommon/capabilities.hh
geometrygrid / geometrygrid/grid.hhcommon/grid.hh
geometrygrid / geometrygrid/gridfamily.hhcommon/grid.hh
geometrygrid / geometrygrid/gridview.hhcommon/capabilities.hh
geometrygrid / geometrygrid/gridview.hhcommon/gridview.hh
geometrygrid / geometrygrid/indexsets.hhgridenums.hh
geometrygrid / geometrygrid/indexsets.hhindexidset.hh
albertagrid / geometryreference.hhcommon/geometry.hh
io / file / gmshreader.hhboundarysegment.hh
io / file / gmshreader.hhcommon/gridfactory.hh
io / file / gmshwriter.hhcommon/grid.hh
io / file / gmshwriter.hhmcmgmapper.hh
io / file / gnuplot.hhcommon/grid.hh
io / file / dgfparser / gridptr.hhcommon/intersection.hh
io / file / dgfparser / gridptr.hhdatahandleif.hh
io / file / dgfparser / gridptr.hhgridenums.hh
io / file / dgfparser / gridptr.hhpartitionset.hh
io / file / dgfparser / gridptr.hhrangegenerators.hh
albertagrid / hierarchiciterator.hhentityiterator.hh
geometrygrid / hostcorners.hhcommon/entity.hh
identitygrid.hhcommon/capabilities.hh
identitygrid.hhcommon/grid.hh
geometrygrid / idset.hhindexidset.hh
io / file / dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
io / file / dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
io / file / dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
albertagrid / leafiterator.hhentityiterator.hh
albertagrid / leveliterator.hhentityiterator.hh
albertagrid / macrodata.ccexceptions.hh
onedgrid.hhcommon/capabilities.hh
onedgrid.hhcommon/grid.hh
onedgrid.hhcommon/gridfactory.hh
io / file / printgrid.hhmcmgmapper.hh
io / file / starcdreader.hhcommon/gridfactory.hh
uggrid.hhboundarysegment.hh
uggrid.hhcommon/capabilities.hh
uggrid.hhcommon/grid.hh
yaspgrid.hhcommon/backuprestore.hh
yaspgrid.hhcommon/capabilities.hh
yaspgrid.hhcommon/grid.hh
yaspgrid.hhdatahandleif.hh
yaspgrid.hhindexidset.hh
identitygrid / identitygridentity.hhcommon/grid.hh
identitygrid / identitygridgeometry.hhcommon/geometry.hh
identitygrid / identitygridindexsets.hhindexidset.hh
identitygrid / identitygridintersectioniterator.hhcommon/intersection.hh
identitygrid / identitygridleafiterator.hhgridenums.hh
identitygrid / identitygridleveliterator.hhgridenums.hh
uggrid / uggridfactory.hhboundarysegment.hh
uggrid / uggridfactory.hhcommon/gridfactory.hh
utility / entitycommhelper.hhgridenums.hh
utility / globalindexset.hhgridenums.hh
utility / globalindexset.hhdatahandleif.hh
utility / utility/gridinfo.hhmcmgmapper.hh
utility / hierarchicsearch.hhcommon/grid.hh
utility / hierarchicsearch.hhgridenums.hh
utility / parmetisgridpartitioner.hhmcmgmapper.hh
utility / parmetisgridpartitioner.hhrangegenerators.hh
utility / persistentcontainermap.hhcommon/capabilities.hh
utility / utility/structuredgridfactory.hhcommon/gridfactory.hh
utility / tensorgridfactory.hhcommon/gridfactory.hh
io / file / vtk / function.hhmcmgmapper.hh
io / file / vtk / volumeiterators.hhgridenums.hh
io / file / vtk / vtkwriter.hhmcmgmapper.hh
io / file / vtk / vtkwriter.hhgridenums.hh
yaspgrid / yaspgrid/backuprestore.hhcommon/backuprestore.hh
yaspgrid / torus.hhexceptions.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000008.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

grid → geometrygrid Relation

File in dune/gridIncludes file in dune/grid/geometrygrid
geometrygrid.hhgeometrygrid/grid.hh
geometrygrid.hhgeometrygrid/persistentcontainer.hh
utility / hostgridaccess.hhgeometrygrid/intersection.hh
│ │ │ │ +

grid → geometrygrid Relation

File in dune/gridIncludes file in dune/grid/geometrygrid
geometrygrid.hhgeometrygrid/grid.hh
geometrygrid.hhgeometrygrid/persistentcontainer.hh
utility / hostgridaccess.hhgeometrygrid/intersection.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000011.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

grid → identitygrid Relation

File in dune/gridIncludes file in dune/grid/identitygrid
identitygrid.hhidentitygridentity.hh
identitygrid.hhidentitygridentityseed.hh
identitygrid.hhidentitygridgeometry.hh
identitygrid.hhidentitygridhierarchiciterator.hh
identitygrid.hhidentitygridindexsets.hh
identitygrid.hhidentitygridintersectioniterator.hh
identitygrid.hhidentitygridleafiterator.hh
identitygrid.hhidentitygridleveliterator.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000018.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

grid → yaspgrid Relation

File in dune/gridIncludes file in dune/grid/yaspgrid
yaspgrid.hhcoordinates.hh
yaspgrid.hhstructuredyaspgridfactory.hh
yaspgrid.hhtorus.hh
yaspgrid.hhyaspgrid/backuprestore.hh
yaspgrid.hhyaspgridentity.hh
yaspgrid.hhyaspgridentityseed.hh
yaspgrid.hhyaspgridgeometry.hh
yaspgrid.hhyaspgridhierarchiciterator.hh
yaspgrid.hhyaspgrididset.hh
yaspgrid.hhyaspgridindexsets.hh
yaspgrid.hhyaspgridintersection.hh
yaspgrid.hhyaspgridintersectioniterator.hh
yaspgrid.hhyaspgridleveliterator.hh
yaspgrid.hhyaspgridpersistentcontainer.hh
yaspgrid.hhygrid.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000011_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

identitygrid → common Relation

File in dune/grid/identitygridIncludes file in dune/grid/common
identitygridentity.hhcommon/grid.hh
identitygridgeometry.hhcommon/geometry.hh
identitygridindexsets.hhindexidset.hh
identitygridintersectioniterator.hhcommon/intersection.hh
identitygridleafiterator.hhgridenums.hh
identitygridleveliterator.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000012_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

io → common Relation

File in dune/grid/ioIncludes file in dune/grid/common
file / dgfparser / dgfgeogrid.hhcommon/intersection.hh
file / dgfparser / dgfgridfactory.hhcommon/intersection.hh
file / dgfparser / dgfoned.hhcommon/intersection.hh
file / dgfparser / dgfug.hhcommon/intersection.hh
file / dgfparser / dgfwriter.hhcommon/grid.hh
file / dgfparser / dgfwriter.hhrangegenerators.hh
file / dgfparser / dgfyasp.hhcommon/intersection.hh
file / gmshreader.hhboundarysegment.hh
file / gmshreader.hhcommon/gridfactory.hh
file / gmshwriter.hhcommon/grid.hh
file / gmshwriter.hhmcmgmapper.hh
file / gnuplot.hhcommon/grid.hh
file / dgfparser / gridptr.hhcommon/intersection.hh
file / dgfparser / gridptr.hhdatahandleif.hh
file / dgfparser / gridptr.hhgridenums.hh
file / dgfparser / gridptr.hhpartitionset.hh
file / dgfparser / gridptr.hhrangegenerators.hh
file / dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
file / dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
file / dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
file / printgrid.hhmcmgmapper.hh
file / starcdreader.hhcommon/gridfactory.hh
file / vtk / function.hhmcmgmapper.hh
file / vtk / volumeiterators.hhgridenums.hh
file / vtk / vtkwriter.hhmcmgmapper.hh
file / vtk / vtkwriter.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000012_000015.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

io → utility Relation

File in dune/grid/ioIncludes file in dune/grid/utility
file / dgfparser / dgfgeogrid.hhhostgridaccess.hh
file / dgfparser / dgfidentitygrid.hhhostgridaccess.hh
│ │ │ │ +

io → utility Relation

File in dune/grid/ioIncludes file in dune/grid/utility
file / dgfparser / dgfgeogrid.hhhostgridaccess.hh
file / dgfparser / dgfidentitygrid.hhhostgridaccess.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000013_000006.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

recipes → dune Relation

File in doc/recipesIncludes file in dune
recipe-integration.ccgrid / yaspgrid.hh
recipe-iterate-over-grid.ccgrid / yaspgrid.hh
│ │ │ │ +

recipes → dune Relation

File in doc/recipesIncludes file in dune
recipe-integration.ccgrid / yaspgrid.hh
recipe-iterate-over-grid.ccgrid / yaspgrid.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000014_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

uggrid → common Relation

File in dune/grid/uggridIncludes file in dune/grid/common
uggridfactory.hhboundarysegment.hh
uggridfactory.hhcommon/gridfactory.hh
│ │ │ │ +

uggrid → common Relation

File in dune/grid/uggridIncludes file in dune/grid/common
uggridfactory.hhboundarysegment.hh
uggridfactory.hhcommon/gridfactory.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

utility → common Relation

File in dune/grid/utilityIncludes file in dune/grid/common
entitycommhelper.hhgridenums.hh
globalindexset.hhdatahandleif.hh
globalindexset.hhgridenums.hh
hierarchicsearch.hhcommon/grid.hh
hierarchicsearch.hhgridenums.hh
parmetisgridpartitioner.hhmcmgmapper.hh
parmetisgridpartitioner.hhrangegenerators.hh
persistentcontainermap.hhcommon/capabilities.hh
tensorgridfactory.hhcommon/gridfactory.hh
utility/gridinfo.hhmcmgmapper.hh
utility/structuredgridfactory.hhcommon/gridfactory.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000008.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

utility → geometrygrid Relation

File in dune/grid/utilityIncludes file in dune/grid/geometrygrid
hostgridaccess.hhgeometrygrid/intersection.hh
│ │ │ │ +

utility → geometrygrid Relation

File in dune/grid/utilityIncludes file in dune/grid/geometrygrid
hostgridaccess.hhgeometrygrid/intersection.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000012.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

utility → io Relation

File in dune/grid/utilityIncludes file in dune/grid/io
gridinfo-gmsh-main.hhfile / gmshreader.hh
│ │ │ │ +

utility → io Relation

File in dune/grid/utilityIncludes file in dune/grid/io
gridinfo-gmsh-main.hhfile / gmshreader.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000017_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

vtk → common Relation

File in dune/grid/io/file/vtkIncludes file in dune/grid/common
function.hhmcmgmapper.hh
volumeiterators.hhgridenums.hh
vtkwriter.hhgridenums.hh
vtkwriter.hhmcmgmapper.hh
│ │ │ │ +

vtk → common Relation

File in dune/grid/io/file/vtkIncludes file in dune/grid/common
function.hhmcmgmapper.hh
volumeiterators.hhgridenums.hh
vtkwriter.hhgridenums.hh
vtkwriter.hhmcmgmapper.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000018_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

yaspgrid → common Relation

File in dune/grid/yaspgridIncludes file in dune/grid/common
torus.hhexceptions.hh
yaspgrid/backuprestore.hhcommon/backuprestore.hh
│ │ │ │ +

yaspgrid → common Relation

File in dune/grid/yaspgridIncludes file in dune/grid/common
torus.hhexceptions.hh
yaspgrid/backuprestore.hhcommon/backuprestore.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000018_000015.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

yaspgrid → utility Relation

File in dune/grid/yaspgridIncludes file in dune/grid/utility
structuredyaspgridfactory.hhutility/structuredgridfactory.hh
yaspgridpersistentcontainer.hhpersistentcontainervector.hh
yaspgridpersistentcontainer.hhutility/persistentcontainer.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_0009240fada98b921d3b7adcfc3fe68b.html │ │ │ │ @@ -93,123 +93,123 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

 agrid.hh
 provides the AlbertaGrid class
 agrid.hh
 provides the AlbertaGrid class
 
 albertagrid.cc
 albertagrid.cc
 
 albertaheader.hh
 albertaheader.hh
 
 albertareader.hh
 albertareader.hh
 
 algebra.hh
 algebra.hh
 
 backuprestore.hh
 
 capabilities.hh
 
 coordcache.hh
 coordcache.hh
 
 datahandle.hh
 
 dgfparser.cc
 
 dgfparser.hh
 
 dofadmin.hh
 dofadmin.hh
 
 dofvector.hh
 dofvector.hh
 
 elementinfo.cc
 provides a wrapper for ALBERTA's el_info structure
 elementinfo.cc
 provides a wrapper for ALBERTA's el_info structure
 
 elementinfo.hh
 provides a wrapper for ALBERTA's el_info structure
 elementinfo.hh
 provides a wrapper for ALBERTA's el_info structure
 
 entity.cc
 entity.cc
 
 entity.hh
 
 entityseed.hh
 
 geometry.cc
 geometry.cc
 
 geometry.hh
 
 geometrycache.hh
 geometrycache.hh
 
 geometryreference.hh
 Wrapper and interface classes for element geometries.
 geometryreference.hh
 Wrapper and interface classes for element geometries.
 
 gridfactory.hh
 specialization of the generic GridFactory for AlbertaGrid
 
 gridfamily.hh
 provides the GridFamily for AlbertaGrid
 
 gridview.hh
 
 hierarchiciterator.hh
 hierarchiciterator.hh
 
 indexsets.cc
 indexsets.cc
 
 indexsets.hh
 
 indexstack.hh
 Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)
 indexstack.hh
 Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)
 
 intersection.cc
 intersection.cc
 
 intersection.hh
 
 intersectioniterator.hh
 Implementation of the IntersectionIterator for AlbertaGrid.
 
 leafiterator.hh
 leafiterator.hh
 
 level.hh
 level.hh
 
 leveliterator.hh
 leveliterator.hh
 
 macrodata.cc
 provides a wrapper for ALBERTA's macro_data structure
 macrodata.cc
 provides a wrapper for ALBERTA's macro_data structure
 
 macrodata.hh
 provides a wrapper for ALBERTA's macro_data structure
 macrodata.hh
 provides a wrapper for ALBERTA's macro_data structure
 
 macroelement.hh
 macroelement.hh
 
 meshpointer.cc
 meshpointer.cc
 
 meshpointer.hh
 provides a wrapper for ALBERTA's mesh structure
 meshpointer.hh
 provides a wrapper for ALBERTA's mesh structure
 
 misc.hh
 misc.hh
 
 persistentcontainer.hh
 
 projection.hh
 
 refinement.hh
 provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
 refinement.hh
 provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
 
 structuredgridfactory.hh
 specialization of the generic StructuredGridFactory for AlbertaGrid
 
 transformation.hh
 transformation.hh
 
 treeiterator.hh
 treeiterator.hh
 
 undefine-2.0.hh
 Contains #undefs for all preprocessor macros defined by alberta.
 undefine-2.0.hh
 Contains #undefs for all preprocessor macros defined by alberta.
 
 undefine-3.0.hh
 Contains #undefs for all preprocessor macros defined by alberta.
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_3101a3055293843fecabc3e467bfc546.html │ │ │ │ @@ -87,69 +87,69 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 basic.cc
 basic.cc
 
 basic.hh
 basic.hh
 
 boundarydom.cc
 boundarydom.cc
 
 boundarydom.hh
 boundarydom.hh
 
 boundaryseg.cc
 boundaryseg.cc
 
 boundaryseg.hh
 boundaryseg.hh
 
 cube.cc
 cube.cc
 
 cube.hh
 cube.hh
 
 dim.cc
 dim.cc
 
 dim.hh
 dim.hh
 
 general.cc
 general.cc
 
 general.hh
 general.hh
 
 gridparameter.cc
 gridparameter.cc
 
 gridparameter.hh
 gridparameter.hh
 
 interval.cc
 interval.cc
 
 interval.hh
 interval.hh
 
 periodicfacetrans.cc
 periodicfacetrans.cc
 
 periodicfacetrans.hh
 periodicfacetrans.hh
 
 polygon.hh
 polygon.hh
 
 polyhedron.hh
 polyhedron.hh
 
 projection.cc
 projection.cc
 
 projection.hh
 
 simplex.cc
 simplex.cc
 
 simplex.hh
 simplex.hh
 
 simplexgeneration.cc
 simplexgeneration.cc
 
 simplexgeneration.hh
 simplexgeneration.hh
 
 vertex.cc
 vertex.cc
 
 vertex.hh
 vertex.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_51efcf388a7f62d4a2fa1c6b4b0f3d93.html │ │ │ │ @@ -96,49 +96,49 @@ │ │ │ │ Files
 backuprestore.hh
 
 cachedcoordfunction.hh
 
 capabilities.hh
 
 coordfunction.hh
 coordfunction.hh
 
 coordfunctioncaller.hh
 coordfunctioncaller.hh
 
 cornerstorage.hh
 cornerstorage.hh
 
 datahandle.hh
 
 declaration.hh
 declaration.hh
 
 entity.hh
 
 entityseed.hh
 
 geometry.hh
 
 grid.hh
 
 gridfamily.hh
 
 gridview.hh
 
 hostcorners.hh
 hostcorners.hh
 
 identity.hh
 identity.hh
 
 idset.hh
 idset.hh
 
 indexsets.hh
 
 intersection.hh
 
 intersectioniterator.hh
 
 iterator.hh
 iterator.hh
 
 persistentcontainer.hh
 
│ │ │ │
│ │ │ │ │ │ │ │

 blocks
 
 utils
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 dgfexception.hh
 dgfexception.hh
 
 dgfgeogrid.hh
 dgfgeogrid.hh
 
 dgfgridfactory.hh
 dgfgridfactory.hh
 
 dgfidentitygrid.hh
 dgfidentitygrid.hh
 
 dgfoned.hh
 dgfoned.hh
 
 dgfparser.cc
 
 dgfparser.hh
 
 dgfug.cc
 dgfug.cc
 
 dgfug.hh
 dgfug.hh
 
 dgfwriter.hh
 write a GridView to a DGF file
 dgfwriter.hh
 write a GridView to a DGF file
 
 dgfyasp.hh
 dgfyasp.hh
 
 entitykey.hh
 entitykey.hh
 
 entitykey_inline.hh
 entitykey_inline.hh
 
 gridptr.hh
 gridptr.hh
 
 macrogrid.hh
 macrogrid.hh
 
 parser.hh
 parser.hh
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_e5ae0335e78259a61f16e105bf289391.html │ │ │ │ @@ -117,27 +117,27 @@ │ │ │ │  vtk │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 dgfparser.hh
 
 gmshreader.hh
 gmshreader.hh
 
 gmshwriter.hh
 gmshwriter.hh
 
 gnuplot.hh
 Provides gnuplot output for 1D Grids.
 
 printgrid.hh
 printgrid.hh
 
 starcdreader.hh
 
 vtk.hh
 Convenience header which includes all available VTK writers.
 vtk.hh
 Convenience header which includes all available VTK writers.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce.html │ │ │ │ @@ -87,79 +87,79 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 adaptcallback.hh
 interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
 adaptcallback.hh
 interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
 
 backuprestore.hh
 
 boundaryprojection.hh
 boundaryprojection.hh
 
 boundarysegment.hh
 Base class for grid boundary segments of arbitrary geometry.
 boundarysegment.hh
 Base class for grid boundary segments of arbitrary geometry.
 
 capabilities.hh
 A set of traits classes to store static information about grid implementation.
 
 datahandleif.hh
 Describes the parallel communication interface class for MessageBuffers and DataHandles.
 datahandleif.hh
 Describes the parallel communication interface class for MessageBuffers and DataHandles.
 
 defaultgridview.hh
 defaultgridview.hh
 
 entity.hh
 
 entityiterator.hh
 entityiterator.hh
 
 entityseed.hh
 Interface class EntitySeed.
 
 exceptions.hh
 exceptions.hh
 
 geometry.hh
 Wrapper and interface classes for element geometries.
 
 grid.hh
 Different resources needed by all grid implementations.
 
 gridenums.hh
 gridenums.hh
 
 gridfactory.hh
 Provide a generic factory class for unstructured grids.
 
 gridinfo.hh
 Some functions to list information about a grid.
 
 gridview.hh
 
 indexidset.hh
 Provides base classes for index and id sets.
 indexidset.hh
 Provides base classes for index and id sets.
 
 intersection.hh
 
 intersectioniterator.hh
 
 mapper.hh
 Provides classes with basic mappers which are used to attach data to a grid.
 mapper.hh
 Provides classes with basic mappers which are used to attach data to a grid.
 
 mcmgmapper.hh
 Mapper for multiple codim and multiple geometry types.
 mcmgmapper.hh
 Mapper for multiple codim and multiple geometry types.
 
 partitionset.hh
 
 rangegenerators.hh
 rangegenerators.hh
 
 scsgmapper.hh
 Mapper classes are used to attach data to a grid.
 scsgmapper.hh
 Mapper classes are used to attach data to a grid.
 
 sizecache.hh
 Provides size cache classes to implement the grids size method efficiently.
 sizecache.hh
 Provides size cache classes to implement the grids size method efficiently.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz │ │ │ │ ├── dune-grid.tag │ │ │ │ │ ├── dune-grid.tag │ │ │ │ │ │ @@ -19,20 +19,20 @@ │ │ │ │ │ │ dune/grid/modules.txt │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ a07190.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ recipe-integration.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/doc/recipes/ │ │ │ │ │ │ - a00143.html │ │ │ │ │ │ + a00149.html │ │ │ │ │ │ dune/grid/yaspgrid.hh │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ main │ │ │ │ │ │ - a00143.html │ │ │ │ │ │ + a00149.html │ │ │ │ │ │ a3c04138a5bfe5d72780bb7e82a18e627 │ │ │ │ │ │ (int argc, char **argv) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ recipe-iterate-over-grid.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/doc/recipes/ │ │ │ │ │ │ @@ -46,135 +46,135 @@ │ │ │ │ │ │ (int argc, char **argv) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ a00722.html │ │ │ │ │ │ - albertagrid/agrid.hh │ │ │ │ │ │ + albertagrid/agrid.hh │ │ │ │ │ │ albertagrid/gridfactory.hh │ │ │ │ │ │ albertagrid/structuredgridfactory.hh │ │ │ │ │ │ albertagrid/persistentcontainer.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ agrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00707.html │ │ │ │ │ │ + a00704.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ - dune/grid/common/adaptcallback.hh │ │ │ │ │ │ - dune/grid/common/sizecache.hh │ │ │ │ │ │ - albertaheader.hh │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/common/adaptcallback.hh │ │ │ │ │ │ + dune/grid/common/sizecache.hh │ │ │ │ │ │ + albertaheader.hh │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ dune/grid/albertagrid/capabilities.hh │ │ │ │ │ │ dune/grid/albertagrid/backuprestore.hh │ │ │ │ │ │ - dune/grid/albertagrid/coordcache.hh │ │ │ │ │ │ + dune/grid/albertagrid/coordcache.hh │ │ │ │ │ │ dune/grid/albertagrid/gridfamily.hh │ │ │ │ │ │ - dune/grid/albertagrid/level.hh │ │ │ │ │ │ + dune/grid/albertagrid/level.hh │ │ │ │ │ │ dune/grid/albertagrid/intersection.hh │ │ │ │ │ │ dune/grid/albertagrid/intersectioniterator.hh │ │ │ │ │ │ dune/grid/albertagrid/datahandle.hh │ │ │ │ │ │ dune/grid/albertagrid/entityseed.hh │ │ │ │ │ │ indexsets.hh │ │ │ │ │ │ geometry.hh │ │ │ │ │ │ entity.hh │ │ │ │ │ │ - hierarchiciterator.hh │ │ │ │ │ │ - treeiterator.hh │ │ │ │ │ │ - leveliterator.hh │ │ │ │ │ │ - leafiterator.hh │ │ │ │ │ │ - albertagrid.cc │ │ │ │ │ │ + hierarchiciterator.hh │ │ │ │ │ │ + treeiterator.hh │ │ │ │ │ │ + leveliterator.hh │ │ │ │ │ │ + leafiterator.hh │ │ │ │ │ │ + albertagrid.cc │ │ │ │ │ │ dune/grid/albertagrid/undefine-3.0.hh │ │ │ │ │ │ Dune::AlbertaGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _ALBERTA_H_ │ │ │ │ │ │ - a00707.html │ │ │ │ │ │ + a00704.html │ │ │ │ │ │ a1067446415cacb23802d0f38ff2017d7 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00659.html │ │ │ │ │ │ - geometry.cc │ │ │ │ │ │ - entity.cc │ │ │ │ │ │ - intersection.cc │ │ │ │ │ │ + a00635.html │ │ │ │ │ │ + geometry.cc │ │ │ │ │ │ + entity.cc │ │ │ │ │ │ + intersection.cc │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTAGRID_CC │ │ │ │ │ │ - a00659.html │ │ │ │ │ │ + a00635.html │ │ │ │ │ │ a53133f6d063b9eb2237193ae58eef706 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertaheader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DIM_OF_WORLD │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ a362e6794dc8da37bca88774ed43b8e54 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ ALBERTA │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ a4cbe74d935d2e31c4b35398e93623f70 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ ALBERTA_DEBUG │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ a8b7e159f2d6cd4970d240f9748cd2d2a │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _MAX_NOT_DEFINED_ │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ a4b7aa45c1743bf41ef31a987fcd0f372 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _MIN_NOT_DEFINED_ │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ a7d0dab8defd85e01c2f14a68a40b4f32 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _ABS_NOT_DEFINED_ │ │ │ │ │ │ - a00695.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ a0c6debd1ce74543115f35b5661f4f48b │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertareader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00680.html │ │ │ │ │ │ + a00677.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ - dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ + dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ Dune::AlbertaReader │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ algebra.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00650.html │ │ │ │ │ │ + a00719.html │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/backuprestore.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07193.html │ │ │ │ │ │ @@ -191,15 +191,15 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/backuprestore.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07199.html │ │ │ │ │ │ dune/grid/common/backuprestore.hh │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ Dune::GeoGrid::BackupRestoreFacilities │ │ │ │ │ │ Dune::GeoGrid::BackupRestoreFacilities< Grid, true > │ │ │ │ │ │ Dune::BackupRestoreFacility< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ @@ -266,15 +266,15 @@ │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/capabilities.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07211.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ Dune::Capabilities::hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ Dune::Capabilities::hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim > │ │ │ │ │ │ Dune::Capabilities::hasEntityIterator< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim > │ │ │ │ │ │ Dune::Capabilities::canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim > │ │ │ │ │ │ Dune::Capabilities::hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ Dune::Capabilities::isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ Dune::Capabilities::isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ @@ -285,42 +285,42 @@ │ │ │ │ │ │ Dune::Capabilities::CodimCache │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ coordcache.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00704.html │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ + a00617.html │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ + dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ Dune::Alberta::CoordCache │ │ │ │ │ │ Dune::Alberta::CoordCache::LocalCaching │ │ │ │ │ │ Dune::Alberta::CoordCache::Interpolation │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/datahandle.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07214.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ Dune::Alberta::AdaptRestrictProlongHandler │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/datahandle.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07217.html │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ dune/grid/geometrygrid/entity.hh │ │ │ │ │ │ Dune::GeoGrid::CommDataHandle │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ @@ -339,183 +339,183 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ io/file/dgfparser/dgfparser.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ a07223.html │ │ │ │ │ │ dune/grid/io/file/dgfparser/dgfparser.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ Dune::DGFPrintInfo │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/dgfparser.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07226.html │ │ │ │ │ │ dune/grid/albertagrid.hh │ │ │ │ │ │ dune/grid/albertagrid/gridfactory.hh │ │ │ │ │ │ dune/grid/io/file/dgfparser/dgfparser.hh │ │ │ │ │ │ dune/grid/io/file/dgfparser/blocks/projection.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > > │ │ │ │ │ │ Dune::DGFGridInfo< AlbertaGrid< dim, dimworld > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ io/file/dgfparser.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ a07229.html │ │ │ │ │ │ dgfparser/dgfparser.hh │ │ │ │ │ │ dune/grid/albertagrid/dgfparser.hh │ │ │ │ │ │ - dgfparser/dgfug.hh │ │ │ │ │ │ - dgfparser/dgfoned.hh │ │ │ │ │ │ - dgfparser/dgfyasp.hh │ │ │ │ │ │ - dgfparser/dgfgeogrid.hh │ │ │ │ │ │ - dgfparser/dgfidentitygrid.hh │ │ │ │ │ │ + dgfparser/dgfug.hh │ │ │ │ │ │ + dgfparser/dgfoned.hh │ │ │ │ │ │ + dgfparser/dgfyasp.hh │ │ │ │ │ │ + dgfparser/dgfgeogrid.hh │ │ │ │ │ │ + dgfparser/dgfidentitygrid.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ io/file/dgfparser/dgfparser.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ a07232.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/gridptr.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/macrogrid.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfgridfactory.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundaryseg.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/cube.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/dim.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/general.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/gridparameter.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/interval.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/polygon.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/polyhedron.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/gridptr.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/macrogrid.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfgridfactory.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundaryseg.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/cube.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/dim.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/general.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/gridparameter.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/interval.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/polygon.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/polyhedron.hh │ │ │ │ │ │ dune/grid/io/file/dgfparser/blocks/projection.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/simplex.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/vertex.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/simplex.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/vertex.hh │ │ │ │ │ │ Dune::DGFGridInfo │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dofadmin.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00668.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + a00623.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ Dune::Alberta::DofAccess │ │ │ │ │ │ Dune::Alberta::HierarchyDofNumbering │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dofvector.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00683.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ + a00632.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ Dune::Alberta::DofVectorProvider< int > │ │ │ │ │ │ Dune::Alberta::DofVectorProvider< signed char > │ │ │ │ │ │ Dune::Alberta::DofVectorProvider< unsigned char > │ │ │ │ │ │ Dune::Alberta::DofVectorProvider< Real > │ │ │ │ │ │ Dune::Alberta::DofVectorProvider< GlobalVector > │ │ │ │ │ │ Dune::Alberta::DofVectorPointer │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ elementinfo.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00719.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + a00680.html │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ elementinfo.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00662.html │ │ │ │ │ │ - dune/grid/albertagrid/geometrycache.hh │ │ │ │ │ │ - dune/grid/albertagrid/macroelement.hh │ │ │ │ │ │ + a00710.html │ │ │ │ │ │ + dune/grid/albertagrid/geometrycache.hh │ │ │ │ │ │ + dune/grid/albertagrid/macroelement.hh │ │ │ │ │ │ Dune::Alberta::ElementInfo │ │ │ │ │ │ Dune::Alberta::ElementInfo::Instance │ │ │ │ │ │ Dune::Alberta::ElementInfo::Stack │ │ │ │ │ │ Dune::Alberta::ElementInfo::Seed │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ entity.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00710.html │ │ │ │ │ │ + a00638.html │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ │ - a00710.html │ │ │ │ │ │ + a00638.html │ │ │ │ │ │ a52a3d21da8af78e4568aaed1c24da792 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07235.html │ │ │ │ │ │ dune/grid/common/entity.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ dune/grid/albertagrid/entityseed.hh │ │ │ │ │ │ dune/grid/albertagrid/geometry.hh │ │ │ │ │ │ Dune::AlbertaGridEntity │ │ │ │ │ │ Dune::AlbertaGridEntity::Codim │ │ │ │ │ │ Dune::AlbertaGridEntity< 0, dim, Grid > │ │ │ │ │ │ Dune::AlbertaGridEntity< 0, dim, Grid >::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ a07238.html │ │ │ │ │ │ grid.hh │ │ │ │ │ │ - rangegenerators.hh │ │ │ │ │ │ + rangegenerators.hh │ │ │ │ │ │ Dune::Entity │ │ │ │ │ │ Dune::Entity< 0, dim, GridImp, EntityImp > │ │ │ │ │ │ Dune::Entity< 0, dim, GridImp, EntityImp >::Codim │ │ │ │ │ │ Dune::EntityDefaultImplementation │ │ │ │ │ │ Dune::EntityDefaultImplementation< 0, dim, GridImp, EntityImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07241.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ - dune/grid/geometrygrid/cornerstorage.hh │ │ │ │ │ │ + dune/grid/geometrygrid/cornerstorage.hh │ │ │ │ │ │ Dune::GeoGrid::EntityBase< codim, Grid, false > │ │ │ │ │ │ Dune::GeoGrid::EntityBase< codim, Grid, true > │ │ │ │ │ │ Dune::GeoGrid::Entity │ │ │ │ │ │ Dune::GeoGrid::Entity< 0, dim, Grid > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/entityseed.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07244.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ Dune::AlbertaGridEntitySeed< codim, const AlbertaGrid< dim, dimworld > > │ │ │ │ │ │ Dune::AlbertaGridEntitySeed< 0, const AlbertaGrid< dim, dimworld > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/entityseed.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ @@ -534,36 +534,36 @@ │ │ │ │ │ │ Dune::GeoGrid::EntitySeed< codim, Grd, true > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometry.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00617.html │ │ │ │ │ │ - dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ + a00620.html │ │ │ │ │ │ + dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ dune/grid/albertagrid/geometry.hh │ │ │ │ │ │ - dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ + dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ Dune::AlbertaGridLocalGeometryProvider::GeoInFatherCoordReader │ │ │ │ │ │ Dune::AlbertaGridLocalGeometryProvider::FaceCoordReader │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ │ │ - a00617.html │ │ │ │ │ │ + a00620.html │ │ │ │ │ │ a085bbe8bddf730dd71a187dceae4e610 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/geometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07253.html │ │ │ │ │ │ dune/grid/common/geometry.hh │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ Dune::AlbertaGridCoordinateReader │ │ │ │ │ │ Dune::AlbertaGridGeometry │ │ │ │ │ │ Dune::AlbertaGridGlobalGeometry │ │ │ │ │ │ Dune::AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > > │ │ │ │ │ │ Dune::AlbertaGridLocalGeometryProvider │ │ │ │ │ │ Dune::AlbertaGridLocalGeometryProvider::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ @@ -578,62 +578,62 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/geometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07259.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ - dune/grid/geometrygrid/cornerstorage.hh │ │ │ │ │ │ + dune/grid/geometrygrid/cornerstorage.hh │ │ │ │ │ │ Dune::GeoGrid::InferHasSingleGeometryType │ │ │ │ │ │ Dune::GeoGrid::InferHasSingleGeometryType< hasSingleGeometryType, dim, 1 > │ │ │ │ │ │ Dune::GeoGrid::InferHasSingleGeometryType< hasSingleGeometryType, dim, 0 > │ │ │ │ │ │ Dune::GeoGrid::GeometryTraits │ │ │ │ │ │ Dune::GeoGrid::GeometryTraits::CornerStorage │ │ │ │ │ │ Dune::GeoGrid::GeometryTraits::hasSingleGeometryType │ │ │ │ │ │ Dune::GeoGrid::Geometry │ │ │ │ │ │ Dune::GeoGrid::Geometry::Mapping │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrycache.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00632.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ + a00695.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ Dune::Alberta::GeometryCache │ │ │ │ │ │ Dune::Alberta::GeometryCacheProxy │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometryreference.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00635.html │ │ │ │ │ │ + a00650.html │ │ │ │ │ │ dune/grid/common/geometry.hh │ │ │ │ │ │ Dune::GeometryReference │ │ │ │ │ │ Dune::LocalGeometryReference │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/gridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07262.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ - dune/grid/albertagrid/agrid.hh │ │ │ │ │ │ + dune/grid/albertagrid/agrid.hh │ │ │ │ │ │ Dune::GridFactory< AlbertaGrid< dim, dimworld > > │ │ │ │ │ │ Dune::GridFactory< AlbertaGrid< dim, dimworld > >::Codim │ │ │ │ │ │ Dune::GridFactory< AlbertaGrid< dim, dimworld > >::ProjectionFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/gridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ a07265.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + dune/grid/common/boundarysegment.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::GridFactoryInterface │ │ │ │ │ │ Dune::GridFactoryInterface::Codim │ │ │ │ │ │ Dune::GridFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ @@ -647,39 +647,39 @@ │ │ │ │ │ │ albertagrid/gridfamily.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07268.html │ │ │ │ │ │ dune/grid/common/entity.hh │ │ │ │ │ │ dune/grid/common/geometry.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ dune/grid/common/intersectioniterator.hh │ │ │ │ │ │ - dune/grid/common/entityiterator.hh │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/common/entityiterator.hh │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ dune/grid/albertagrid/gridview.hh │ │ │ │ │ │ - dune/grid/albertagrid/geometryreference.hh │ │ │ │ │ │ + dune/grid/albertagrid/geometryreference.hh │ │ │ │ │ │ Dune::AlbertaGridFamily │ │ │ │ │ │ Dune::AlbertaGridFamily::Traits │ │ │ │ │ │ Dune::AlbertaGridFamily::Traits::Codim │ │ │ │ │ │ Dune::AlbertaGridFamily::Traits::Codim::Partition │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/gridfamily.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07271.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ dune/grid/geometrygrid/entity.hh │ │ │ │ │ │ dune/grid/geometrygrid/entityseed.hh │ │ │ │ │ │ dune/grid/geometrygrid/geometry.hh │ │ │ │ │ │ dune/grid/geometrygrid/gridview.hh │ │ │ │ │ │ dune/grid/geometrygrid/intersection.hh │ │ │ │ │ │ dune/grid/geometrygrid/intersectioniterator.hh │ │ │ │ │ │ - dune/grid/geometrygrid/iterator.hh │ │ │ │ │ │ - dune/grid/geometrygrid/idset.hh │ │ │ │ │ │ + dune/grid/geometrygrid/iterator.hh │ │ │ │ │ │ + dune/grid/geometrygrid/idset.hh │ │ │ │ │ │ dune/grid/geometrygrid/indexsets.hh │ │ │ │ │ │ Dune::GeoGrid::ExportParams │ │ │ │ │ │ Dune::GeoGrid::GridFamily │ │ │ │ │ │ Dune::GeoGrid::GridFamily::Traits │ │ │ │ │ │ Dune::GeoGrid::GridFamily::Traits::Codim │ │ │ │ │ │ Dune::GeoGrid::GridFamily::Traits::Codim::Partition │ │ │ │ │ │ Dune │ │ │ │ │ │ @@ -704,16 +704,16 @@ │ │ │ │ │ │ Dune::AlbertaLeafGridView::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/gridview.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ a07277.html │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ - dune/grid/common/rangegenerators.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/common/rangegenerators.hh │ │ │ │ │ │ Dune::GridView │ │ │ │ │ │ Dune::GridView::Codim │ │ │ │ │ │ Dune::GridView::Codim::Partition │ │ │ │ │ │ Dune::GridView::DeprecatedMethodEmptyFuture │ │ │ │ │ │ Dune::GridView::CheckIsConformingImpl │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ @@ -723,100 +723,100 @@ │ │ │ │ │ │ a07280.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ dune/grid/common/gridview.hh │ │ │ │ │ │ dune/grid/geometrygrid/datahandle.hh │ │ │ │ │ │ dune/grid/geometrygrid/indexsets.hh │ │ │ │ │ │ dune/grid/geometrygrid/intersection.hh │ │ │ │ │ │ dune/grid/geometrygrid/intersectioniterator.hh │ │ │ │ │ │ - dune/grid/geometrygrid/iterator.hh │ │ │ │ │ │ + dune/grid/geometrygrid/iterator.hh │ │ │ │ │ │ Dune::GeoGrid::GridViewTraits │ │ │ │ │ │ Dune::GeoGrid::GridViewTraits::Codim │ │ │ │ │ │ Dune::GeoGrid::GridViewTraits::Codim::Partition │ │ │ │ │ │ Dune::GeoGrid::GridView │ │ │ │ │ │ Dune::GeoGrid::GridView::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hierarchiciterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00665.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/common/entityiterator.hh │ │ │ │ │ │ + a00647.html │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/common/entityiterator.hh │ │ │ │ │ │ Dune::AlbertaGridHierarchicIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ indexsets.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00692.html │ │ │ │ │ │ dune/grid/albertagrid/indexsets.hh │ │ │ │ │ │ - dune/grid/albertagrid/agrid.hh │ │ │ │ │ │ + dune/grid/albertagrid/agrid.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/indexsets.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07283.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - dune/grid/common/indexidset.hh │ │ │ │ │ │ - dune/grid/albertagrid/indexstack.hh │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/common/indexidset.hh │ │ │ │ │ │ + dune/grid/albertagrid/indexstack.hh │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ + dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ dune/grid/albertagrid/gridfamily.hh │ │ │ │ │ │ Dune::AlbertaGridHierarchicIndexSet │ │ │ │ │ │ Dune::AlbertaGridHierarchicIndexSet::InitEntityNumber │ │ │ │ │ │ Dune::AlbertaGridIndexSet │ │ │ │ │ │ Dune::AlbertaGridIdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/indexsets.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07286.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/indexidset.hh │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/indexidset.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ Dune::GeoGrid::IndexSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ indexstack.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00623.html │ │ │ │ │ │ + a00662.html │ │ │ │ │ │ Dune::IndexStack │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ intersection.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00626.html │ │ │ │ │ │ + a00644.html │ │ │ │ │ │ dune/grid/albertagrid/intersection.hh │ │ │ │ │ │ Dune::AlbertaGridIntersectionBase::GlobalCoordReader │ │ │ │ │ │ Dune::AlbertaGridIntersectionBase::LocalCoordReader │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ │ - a00626.html │ │ │ │ │ │ + a00644.html │ │ │ │ │ │ a8d4a192c9f43ac0db61703b46cb6a297 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/intersection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07289.html │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ - dune/grid/albertagrid/transformation.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/transformation.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ dune/grid/albertagrid/geometry.hh │ │ │ │ │ │ Dune::AlbertaGridIntersectionBase │ │ │ │ │ │ Dune::AlbertaGridLeafIntersection │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/intersection.hh │ │ │ │ │ │ @@ -827,16 +827,16 @@ │ │ │ │ │ │ Dune::IntersectionDefaultNormalVectors │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/intersection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07295.html │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ - dune/grid/geometrygrid/cornerstorage.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/cornerstorage.hh │ │ │ │ │ │ Dune::GeoGrid::Intersection │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/intersectioniterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ @@ -866,100 +866,100 @@ │ │ │ │ │ │ Dune::GeoGrid::IntersectionIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ leafiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00638.html │ │ │ │ │ │ - dune/grid/common/entityiterator.hh │ │ │ │ │ │ - dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ + a00665.html │ │ │ │ │ │ + dune/grid/common/entityiterator.hh │ │ │ │ │ │ + dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ Dune::AlbertaGridLeafIterator │ │ │ │ │ │ Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ level.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00647.html │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ + a00656.html │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ + dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ Dune::AlbertaGridLevelProvider │ │ │ │ │ │ Dune::AlbertaGridLevelProvider::SetLocal │ │ │ │ │ │ Dune::AlbertaGridLevelProvider::CalcMaxLevel │ │ │ │ │ │ Dune::AlbertaGridLevelProvider::Interpolation │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ leveliterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00620.html │ │ │ │ │ │ - dune/grid/common/entityiterator.hh │ │ │ │ │ │ - dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ + a00659.html │ │ │ │ │ │ + dune/grid/common/entityiterator.hh │ │ │ │ │ │ + dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ Dune::AlbertaGridLevelIterator │ │ │ │ │ │ Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macrodata.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00686.html │ │ │ │ │ │ - dune/grid/common/exceptions.hh │ │ │ │ │ │ - dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ + a00707.html │ │ │ │ │ │ + dune/grid/common/exceptions.hh │ │ │ │ │ │ + dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macrodata.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00701.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ - dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ + a00668.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ + dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ Dune::Alberta::MacroData │ │ │ │ │ │ Dune::Alberta::MacroData::Library │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macroelement.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00629.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + a00689.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ Dune::Alberta::MacroElement │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ meshpointer.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00674.html │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + a00614.html │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ meshpointer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00614.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ + a00674.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ dune/grid/albertagrid/projection.hh │ │ │ │ │ │ Dune::Alberta::MeshPointer │ │ │ │ │ │ Dune::Alberta::MeshPointer::MacroIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ misc.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00689.html │ │ │ │ │ │ - dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ + a00629.html │ │ │ │ │ │ + dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ Dune::AlbertaError │ │ │ │ │ │ Dune::AlbertaIOError │ │ │ │ │ │ Dune::Alberta::GlobalSpace │ │ │ │ │ │ Dune::Alberta::NumSubEntities< dim, 0 > │ │ │ │ │ │ Dune::Alberta::NumSubEntities< dim, dim > │ │ │ │ │ │ Dune::Alberta::NumSubEntities< 0, 0 > │ │ │ │ │ │ Dune::Alberta::NumSubEntities< 2, 1 > │ │ │ │ │ │ @@ -991,81 +991,81 @@ │ │ │ │ │ │ Dune::Alberta::Twist< dim, 2 > │ │ │ │ │ │ Dune::Alberta::Twist< 2, 2 > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ │ - a00689.html │ │ │ │ │ │ + a00629.html │ │ │ │ │ │ ac7a758bde399b9ddaa1d7efc4d08c19a │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/persistentcontainer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07307.html │ │ │ │ │ │ dune/grid/utility/persistentcontainer.hh │ │ │ │ │ │ - dune/grid/utility/persistentcontainervector.hh │ │ │ │ │ │ + dune/grid/utility/persistentcontainervector.hh │ │ │ │ │ │ Dune::PersistentContainer< AlbertaGrid< dim, dimworld >, T > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/persistentcontainer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07310.html │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ dune/grid/utility/persistentcontainer.hh │ │ │ │ │ │ - dune/grid/utility/persistentcontainerwrapper.hh │ │ │ │ │ │ + dune/grid/utility/persistentcontainerwrapper.hh │ │ │ │ │ │ Dune::PersistentContainer< GeometryGrid< HostGrid, CoordFunction, Allocator >, T > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ utility/persistentcontainer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ a07313.html │ │ │ │ │ │ - dune/grid/utility/persistentcontainermap.hh │ │ │ │ │ │ + dune/grid/utility/persistentcontainermap.hh │ │ │ │ │ │ Dune::PersistentContainer │ │ │ │ │ │ Dune::PersistentContainer< const Grid, T > │ │ │ │ │ │ Dune │ │ │ │ │ │ std │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/projection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07316.html │ │ │ │ │ │ - dune/grid/common/boundaryprojection.hh │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/common/boundaryprojection.hh │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ Dune::Alberta::DuneBoundaryProjection │ │ │ │ │ │ Dune::Alberta::ProjectionFactoryInterface │ │ │ │ │ │ Dune::Alberta::ProjectionFactory │ │ │ │ │ │ Dune::Alberta::DuneGlobalBoundaryProjectionFactory │ │ │ │ │ │ Dune::Alberta::BasicNodeProjection │ │ │ │ │ │ Dune::Alberta::NodeProjection │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ io/file/dgfparser/blocks/projection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ a07319.html │ │ │ │ │ │ - dune/grid/common/boundaryprojection.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + dune/grid/common/boundaryprojection.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::ProjectionBlock │ │ │ │ │ │ Dune::dgf::ProjectionBlock::Expression │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ refinement.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00677.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + a00716.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ Dune::Alberta::Patch │ │ │ │ │ │ Dune::Alberta::ForEachInteriorSubChild< dim, 0 > │ │ │ │ │ │ Dune::Alberta::ForEachInteriorSubChild< dim, dim > │ │ │ │ │ │ Dune::Alberta::ForEachInteriorSubChild< 2, 1 > │ │ │ │ │ │ Dune::Alberta::ForEachInteriorSubChild< 3, 1 > │ │ │ │ │ │ Dune::Alberta::ForEachInteriorSubChild< 3, 2 > │ │ │ │ │ │ Dune::Alberta::GeometryInFather< 1 > │ │ │ │ │ │ @@ -1075,99 +1075,99 @@ │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/structuredgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07322.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ - dune/grid/utility/multiindex.hh │ │ │ │ │ │ + dune/grid/utility/multiindex.hh │ │ │ │ │ │ dune/grid/utility/structuredgridfactory.hh │ │ │ │ │ │ Dune::StructuredGridFactory< AlbertaGrid< dim, dimworld > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ utility/structuredgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ a07325.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ - dune/grid/utility/multiindex.hh │ │ │ │ │ │ + dune/grid/utility/multiindex.hh │ │ │ │ │ │ Dune::StructuredGridFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ transformation.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00641.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + a00626.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ Dune::AlbertaTransformation │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ treeiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00671.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + a00698.html │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ Dune::AlbertaMarkerVector │ │ │ │ │ │ Dune::AlbertaMarkerVector::MarkSubEntities::Codim │ │ │ │ │ │ Dune::AlbertaGridTreeIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ undefine-2.0.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00644.html │ │ │ │ │ │ + a00683.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ undefine-3.0.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/ │ │ │ │ │ │ a00653.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ adaptcallback.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00236.html │ │ │ │ │ │ + a00344.html │ │ │ │ │ │ Dune::AdaptDataHandleInterface │ │ │ │ │ │ Dune::AdaptDataHandle │ │ │ │ │ │ Dune::CombinedAdaptProlongRestrict │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundaryprojection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00269.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + a00335.html │ │ │ │ │ │ + dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ Dune::DuneBoundaryProjection │ │ │ │ │ │ Dune::BoundaryProjectionWrapper │ │ │ │ │ │ Dune::BoundarySegmentWrapper │ │ │ │ │ │ Dune::CircleBoundaryProjection │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundarysegment.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00353.html │ │ │ │ │ │ + a00323.html │ │ │ │ │ │ Dune::BoundarySegmentBackupRestore │ │ │ │ │ │ Dune::BoundarySegment │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ datahandleif.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00266.html │ │ │ │ │ │ + a00299.html │ │ │ │ │ │ Dune::MessageBufferIF │ │ │ │ │ │ Dune::CommDataHandleIF │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ defaultgridview.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00263.html │ │ │ │ │ │ + a00290.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ dune/grid/common/gridview.hh │ │ │ │ │ │ Dune::DefaultLevelGridViewTraits │ │ │ │ │ │ Dune::DefaultLevelGridViewTraits::Codim │ │ │ │ │ │ Dune::DefaultLevelGridViewTraits::Codim::Partition │ │ │ │ │ │ Dune::DefaultLevelGridView │ │ │ │ │ │ Dune::DefaultLevelGridView::Codim │ │ │ │ │ │ @@ -1177,44 +1177,44 @@ │ │ │ │ │ │ Dune::DefaultLeafGridView │ │ │ │ │ │ Dune::DefaultLeafGridView::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ entityiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00341.html │ │ │ │ │ │ + a00257.html │ │ │ │ │ │ Dune::EntityIterator │ │ │ │ │ │ std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > > │ │ │ │ │ │ Dune │ │ │ │ │ │ std │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ exceptions.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00251.html │ │ │ │ │ │ + a00293.html │ │ │ │ │ │ Dune::GridError │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/grid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ a07328.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/exceptions.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/exceptions.hh │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ dune/grid/common/gridview.hh │ │ │ │ │ │ - dune/grid/common/defaultgridview.hh │ │ │ │ │ │ + dune/grid/common/defaultgridview.hh │ │ │ │ │ │ dune/grid/common/entityseed.hh │ │ │ │ │ │ geometry.hh │ │ │ │ │ │ entity.hh │ │ │ │ │ │ intersection.hh │ │ │ │ │ │ intersectioniterator.hh │ │ │ │ │ │ - entityiterator.hh │ │ │ │ │ │ - indexidset.hh │ │ │ │ │ │ + entityiterator.hh │ │ │ │ │ │ + indexidset.hh │ │ │ │ │ │ Dune::Grid │ │ │ │ │ │ Dune::Grid::Codim │ │ │ │ │ │ Dune::Grid::Codim::Partition │ │ │ │ │ │ Dune::GridDefaultImplementation │ │ │ │ │ │ Dune::GridTraits │ │ │ │ │ │ Dune::GridTraits::Codim │ │ │ │ │ │ Dune::GridTraits::Codim::Partition │ │ │ │ │ │ @@ -1229,107 +1229,107 @@ │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07331.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/geometrygrid/backuprestore.hh │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ dune/grid/geometrygrid/datahandle.hh │ │ │ │ │ │ dune/grid/geometrygrid/gridfamily.hh │ │ │ │ │ │ - dune/grid/geometrygrid/identity.hh │ │ │ │ │ │ + dune/grid/geometrygrid/identity.hh │ │ │ │ │ │ dune/grid/geometrygrid/persistentcontainer.hh │ │ │ │ │ │ Dune::DefaultCoordFunction │ │ │ │ │ │ Dune::GeometryGrid │ │ │ │ │ │ Dune::GeometryGrid::Codim │ │ │ │ │ │ Dune::GeometryGrid::Codim::Partition │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridenums.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00287.html │ │ │ │ │ │ + a00239.html │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/gridinfo.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ a07334.html │ │ │ │ │ │ grid.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ utility/gridinfo.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ a07337.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ Dune::EntityInfo │ │ │ │ │ │ Dune::GridViewInfoGTCompare │ │ │ │ │ │ Dune::GridViewInfo │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ indexidset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00317.html │ │ │ │ │ │ + a00296.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::IndexSet │ │ │ │ │ │ Dune::IndexSet::Codim │ │ │ │ │ │ Dune::IndexSetDefaultImplementation │ │ │ │ │ │ Dune::IdSet │ │ │ │ │ │ Dune::IdSet::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ mapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00290.html │ │ │ │ │ │ + a00329.html │ │ │ │ │ │ Dune::Mapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ mcmgmapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00281.html │ │ │ │ │ │ - mapper.hh │ │ │ │ │ │ + a00362.html │ │ │ │ │ │ + mapper.hh │ │ │ │ │ │ Dune::MultipleCodimMultipleGeomTypeMapper │ │ │ │ │ │ Dune::LeafMultipleCodimMultipleGeomTypeMapper │ │ │ │ │ │ Dune::LevelMultipleCodimMultipleGeomTypeMapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ partitionset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ a00338.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::PartitionSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Partitions │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ rangegenerators.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00299.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00302.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/common/partitionset.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ scsgmapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00260.html │ │ │ │ │ │ - mapper.hh │ │ │ │ │ │ + a00266.html │ │ │ │ │ │ + mapper.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::SingleCodimSingleGeomTypeMapper │ │ │ │ │ │ Dune::LeafSingleCodimSingleGeomTypeMapper │ │ │ │ │ │ Dune::LevelSingleCodimSingleGeomTypeMapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ sizecache.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/ │ │ │ │ │ │ - a00329.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00287.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ Dune::SizeCache │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ @@ -1337,93 +1337,93 @@ │ │ │ │ │ │ dune/grid/geometrygrid/grid.hh │ │ │ │ │ │ dune/grid/geometrygrid/persistentcontainer.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cachedcoordfunction.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a00566.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunctioncaller.hh │ │ │ │ │ │ + dune/grid/geometrygrid/coordfunctioncaller.hh │ │ │ │ │ │ dune/grid/utility/persistentcontainer.hh │ │ │ │ │ │ Dune::GeoGrid::CoordCache │ │ │ │ │ │ Dune::CachedCoordFunction │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ coordfunction.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00581.html │ │ │ │ │ │ + a00599.html │ │ │ │ │ │ Dune::AnalyticalCoordFunctionInterface │ │ │ │ │ │ Dune::AnalyticalCoordFunction │ │ │ │ │ │ Dune::DiscreteCoordFunctionInterface │ │ │ │ │ │ Dune::DiscreteCoordFunction │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ coordfunctioncaller.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00590.html │ │ │ │ │ │ - dune/grid/geometrygrid/hostcorners.hh │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ + a00608.html │ │ │ │ │ │ + dune/grid/geometrygrid/hostcorners.hh │ │ │ │ │ │ + dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cornerstorage.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00605.html │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunctioncaller.hh │ │ │ │ │ │ + a00587.html │ │ │ │ │ │ + dune/grid/geometrygrid/coordfunctioncaller.hh │ │ │ │ │ │ Dune::GeoGrid::CoordVector< mydim, Grid, false > │ │ │ │ │ │ Dune::GeoGrid::CoordVector< mydim, Grid, true > │ │ │ │ │ │ Dune::GeoGrid::IntersectionCoordVector │ │ │ │ │ │ Dune::GeoGrid::CornerStorage │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ declaration.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00608.html │ │ │ │ │ │ + a00575.html │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hostcorners.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00602.html │ │ │ │ │ │ + a00572.html │ │ │ │ │ │ dune/grid/common/entity.hh │ │ │ │ │ │ Dune::GeoGrid::HostCorners │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00596.html │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ + a00593.html │ │ │ │ │ │ + dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ Dune::IdenticalCoordFunction │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ idset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00575.html │ │ │ │ │ │ - dune/grid/common/indexidset.hh │ │ │ │ │ │ + a00581.html │ │ │ │ │ │ + dune/grid/common/indexidset.hh │ │ │ │ │ │ Dune::GeoGrid::IdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ iterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00584.html │ │ │ │ │ │ + a00602.html │ │ │ │ │ │ dune/grid/geometrygrid/capabilities.hh │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ dune/grid/geometrygrid/entity.hh │ │ │ │ │ │ Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid > │ │ │ │ │ │ Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid > │ │ │ │ │ │ Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid > │ │ │ │ │ │ Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid > │ │ │ │ │ │ Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid > │ │ │ │ │ │ Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid > │ │ │ │ │ │ @@ -1435,289 +1435,289 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ a00728.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - identitygrid/identitygridgeometry.hh │ │ │ │ │ │ - identitygrid/identitygridentity.hh │ │ │ │ │ │ - identitygrid/identitygridentityseed.hh │ │ │ │ │ │ - identitygrid/identitygridintersectioniterator.hh │ │ │ │ │ │ - identitygrid/identitygridleveliterator.hh │ │ │ │ │ │ - identitygrid/identitygridleafiterator.hh │ │ │ │ │ │ - identitygrid/identitygridhierarchiciterator.hh │ │ │ │ │ │ - identitygrid/identitygridindexsets.hh │ │ │ │ │ │ + identitygrid/identitygridgeometry.hh │ │ │ │ │ │ + identitygrid/identitygridentity.hh │ │ │ │ │ │ + identitygrid/identitygridentityseed.hh │ │ │ │ │ │ + identitygrid/identitygridintersectioniterator.hh │ │ │ │ │ │ + identitygrid/identitygridleveliterator.hh │ │ │ │ │ │ + identitygrid/identitygridleafiterator.hh │ │ │ │ │ │ + identitygrid/identitygridhierarchiciterator.hh │ │ │ │ │ │ + identitygrid/identitygridindexsets.hh │ │ │ │ │ │ Dune::IdentityGridFamily │ │ │ │ │ │ Dune::IdentityGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridentity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00749.html │ │ │ │ │ │ + a00740.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::IdentityGridEntity │ │ │ │ │ │ Dune::IdentityGridEntity< 0, dim, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridentityseed.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00743.html │ │ │ │ │ │ + a00737.html │ │ │ │ │ │ Dune::IdentityGridEntitySeed │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridgeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00755.html │ │ │ │ │ │ + a00731.html │ │ │ │ │ │ dune/grid/common/geometry.hh │ │ │ │ │ │ Dune::IdentityGridGeometry │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridhierarchiciterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00746.html │ │ │ │ │ │ + a00734.html │ │ │ │ │ │ Dune::IdentityGridHierarchicIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridindexsets.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00752.html │ │ │ │ │ │ - dune/grid/common/indexidset.hh │ │ │ │ │ │ + a00743.html │ │ │ │ │ │ + dune/grid/common/indexidset.hh │ │ │ │ │ │ Dune::IdentityGridLevelIndexSet │ │ │ │ │ │ Dune::IdentityGridLeafIndexSet │ │ │ │ │ │ Dune::IdentityGridGlobalIdSet │ │ │ │ │ │ Dune::IdentityGridLocalIdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridintersectioniterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00734.html │ │ │ │ │ │ - identitygridintersections.hh │ │ │ │ │ │ - identitygridentity.hh │ │ │ │ │ │ + a00752.html │ │ │ │ │ │ + identitygridintersections.hh │ │ │ │ │ │ + identitygridentity.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ Dune::IdentityGridLeafIntersectionIterator │ │ │ │ │ │ Dune::IdentityGridLevelIntersectionIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridintersections.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00740.html │ │ │ │ │ │ - identitygridleafiterator.hh │ │ │ │ │ │ - dune/grid/identitygrid/identitygridentity.hh │ │ │ │ │ │ + a00755.html │ │ │ │ │ │ + identitygridleafiterator.hh │ │ │ │ │ │ + dune/grid/identitygrid/identitygridentity.hh │ │ │ │ │ │ Dune::IdentityGridLeafIntersection │ │ │ │ │ │ Dune::IdentityGridLevelIntersection │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridleafiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00737.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00746.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::IdentityGridLeafIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridleveliterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00731.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00749.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::IdentityGridLevelIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ basic.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00797.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00875.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ basic.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00830.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ + a00833.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ Dune::dgf::BasicBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundarydom.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00806.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ + a00911.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundarydom.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00842.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + a00836.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ Dune::dgf::DomainData │ │ │ │ │ │ Dune::dgf::Domain │ │ │ │ │ │ Dune::dgf::BoundaryDomBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundaryseg.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00839.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundaryseg.hh │ │ │ │ │ │ + a00851.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundaryseg.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundaryseg.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00785.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00887.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::BoundarySegBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cube.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00848.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/cube.hh │ │ │ │ │ │ + a00872.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/cube.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cube.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00824.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00854.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::CubeBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dim.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00845.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/dim.hh │ │ │ │ │ │ + a00878.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/dim.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dim.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00815.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00881.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::DimBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ general.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00836.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/general.hh │ │ │ │ │ │ + a00860.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/general.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ general.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00800.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00848.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::GeneralBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridparameter.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00821.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/gridparameter.hh │ │ │ │ │ │ + a00839.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/gridparameter.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridparameter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00803.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00890.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::GridParameterBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ interval.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00809.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/interval.hh │ │ │ │ │ │ + a00866.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/interval.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ interval.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00776.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00884.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::IntervalBlock │ │ │ │ │ │ Dune::dgf::IntervalBlock::Interval │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ periodicfacetrans.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00812.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh │ │ │ │ │ │ + a00899.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ periodicfacetrans.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00788.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00905.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::PeriodicFaceTransformationBlock │ │ │ │ │ │ Dune::dgf::PeriodicFaceTransformationBlock::Matrix │ │ │ │ │ │ Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ polygon.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00833.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00869.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::PolygonBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ polyhedron.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00794.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/polygon.hh │ │ │ │ │ │ + a00902.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/polygon.hh │ │ │ │ │ │ Dune::dgf::PolyhedronBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ projection.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00854.html │ │ │ │ │ │ + a00863.html │ │ │ │ │ │ dune/grid/io/file/dgfparser/blocks/projection.hh │ │ │ │ │ │ Dune::dgf::Expr::ConstantExpression │ │ │ │ │ │ Dune::dgf::Expr::VariableExpression │ │ │ │ │ │ Dune::dgf::Expr::FunctionCallExpression │ │ │ │ │ │ Dune::dgf::Expr::VectorExpression │ │ │ │ │ │ Dune::dgf::Expr::BracketExpression │ │ │ │ │ │ Dune::dgf::Expr::MinusExpression │ │ │ │ │ │ @@ -1733,313 +1733,313 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ Dune::dgf::Expr │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplex.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00827.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/simplex.hh │ │ │ │ │ │ + a00896.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/simplex.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplex.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00791.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00857.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::SimplexBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplexgeneration.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00818.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh │ │ │ │ │ │ + a00845.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplexgeneration.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00782.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00893.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::SimplexGenerationBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vertex.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00851.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/vertex.hh │ │ │ │ │ │ + a00908.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/vertex.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vertex.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00779.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00842.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::VertexBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfexception.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00764.html │ │ │ │ │ │ + a00920.html │ │ │ │ │ │ Dune::DGFException │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfgeogrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00869.html │ │ │ │ │ │ + a00941.html │ │ │ │ │ │ dune/grid/geometrygrid.hh │ │ │ │ │ │ dune/grid/io/file/dgfparser/dgfparser.hh │ │ │ │ │ │ dune/grid/io/file/dgfparser/blocks/projection.hh │ │ │ │ │ │ - dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ + dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ Dune::DGFCoordFunction │ │ │ │ │ │ Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false > │ │ │ │ │ │ Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true > │ │ │ │ │ │ Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false > │ │ │ │ │ │ Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00773.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/macrogrid.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + a00947.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/macrogrid.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ Dune::DGFGridFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfidentitygrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00878.html │ │ │ │ │ │ + a00824.html │ │ │ │ │ │ dune/grid/identitygrid.hh │ │ │ │ │ │ dune/grid/io/file/dgfparser/dgfparser.hh │ │ │ │ │ │ - dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ + dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ Dune::DGFGridFactory< IdentityGrid< HostGrid > > │ │ │ │ │ │ Dune::DGFGridInfo< IdentityGrid< HostGrid > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfoned.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00860.html │ │ │ │ │ │ + a00944.html │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ dune/grid/onedgrid.hh │ │ │ │ │ │ dgfparser.hh │ │ │ │ │ │ Dune::DGFGridInfo< OneDGrid > │ │ │ │ │ │ Dune::DGFGridFactory< OneDGrid > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfug.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00863.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfug.hh │ │ │ │ │ │ + a00935.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfug.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfug.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00857.html │ │ │ │ │ │ + a00938.html │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ dune/grid/uggrid.hh │ │ │ │ │ │ dgfparser.hh │ │ │ │ │ │ - blocks/gridparameter.hh │ │ │ │ │ │ + blocks/gridparameter.hh │ │ │ │ │ │ Dune::dgf::UGGridParameterBlock │ │ │ │ │ │ Dune::DGFGridInfo< UGGrid< dim > > │ │ │ │ │ │ Dune::DGFGridFactory< UGGrid< dim > > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00881.html │ │ │ │ │ │ + a00932.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - dune/grid/common/rangegenerators.hh │ │ │ │ │ │ + dune/grid/common/rangegenerators.hh │ │ │ │ │ │ Dune::DGFWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfyasp.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00887.html │ │ │ │ │ │ + a00914.html │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ dune/grid/yaspgrid.hh │ │ │ │ │ │ dgfparser.hh │ │ │ │ │ │ Dune::dgf::YaspGridParameterBlock │ │ │ │ │ │ Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > > │ │ │ │ │ │ Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > > │ │ │ │ │ │ Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > │ │ │ │ │ │ Dune::DGFGridInfo< YaspGrid< dim, Coordinates > > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ entitykey.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00866.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ - entitykey_inline.hh │ │ │ │ │ │ + a00929.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ + entitykey_inline.hh │ │ │ │ │ │ Dune::DGFEntityKey │ │ │ │ │ │ Dune::ElementFaceUtil │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ entitykey_inline.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00884.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + a00917.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridptr.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00872.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ + a00830.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ dune/grid/common/partitionset.hh │ │ │ │ │ │ - dune/grid/common/rangegenerators.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + dune/grid/common/rangegenerators.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ Dune::GridPtr │ │ │ │ │ │ Dune::GridPtr::mygrid_ptr │ │ │ │ │ │ Dune::GridPtr::DataHandle │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macrogrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00875.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + a00827.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ Dune::MacroGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ parser.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00890.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + a00950.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ Dune::DGFBoundaryParameter │ │ │ │ │ │ Dune::DuneGridFormatParser │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgf2dgf.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/utils/ │ │ │ │ │ │ - a00767.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ + a00926.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ main │ │ │ │ │ │ - a00767.html │ │ │ │ │ │ + a00926.html │ │ │ │ │ │ a0ddf1224851353fc92bfbff6f499fa97 │ │ │ │ │ │ (int argc, char *argv[]) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gmsh2dgf.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/utils/ │ │ │ │ │ │ - a00770.html │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ + a00923.html │ │ │ │ │ │ + dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ main │ │ │ │ │ │ - a00770.html │ │ │ │ │ │ + a00923.html │ │ │ │ │ │ a0ddf1224851353fc92bfbff6f499fa97 │ │ │ │ │ │ (int argc, char *argv[]) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gmshreader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ - a00896.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + a00959.html │ │ │ │ │ │ + dune/grid/common/boundarysegment.hh │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ Dune::GmshReaderOptions │ │ │ │ │ │ Dune::GmshReaderParser │ │ │ │ │ │ Dune::GmshReader │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Gmsh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gmshwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ - a00761.html │ │ │ │ │ │ + a00953.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ Dune::GmshWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gnuplot.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ a00965.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - gnuplot/gnuplot.cc │ │ │ │ │ │ + gnuplot/gnuplot.cc │ │ │ │ │ │ Dune::GnuplotWriter │ │ │ │ │ │ Dune::LeafGnuplotWriter │ │ │ │ │ │ Dune::LevelGnuplotWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gnuplot.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/gnuplot/ │ │ │ │ │ │ - a00758.html │ │ │ │ │ │ + a00962.html │ │ │ │ │ │ ../gnuplot.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ printgrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ - a00962.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + a00758.html │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ starcdreader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ a00968.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ Dune::StarCDReader │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vtk.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/ │ │ │ │ │ │ - a00893.html │ │ │ │ │ │ - vtk/boundarywriter.hh │ │ │ │ │ │ - vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ - vtk/vtksequencewriter.hh │ │ │ │ │ │ - vtk/vtkwriter.hh │ │ │ │ │ │ - vtk/volumewriter.hh │ │ │ │ │ │ + a00956.html │ │ │ │ │ │ + vtk/boundarywriter.hh │ │ │ │ │ │ + vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ + vtk/vtksequencewriter.hh │ │ │ │ │ │ + vtk/vtkwriter.hh │ │ │ │ │ │ + vtk/volumewriter.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ b64enc.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00935.html │ │ │ │ │ │ + a00803.html │ │ │ │ │ │ Dune::b64chunk │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ const char │ │ │ │ │ │ base64table │ │ │ │ │ │ a01063.html │ │ │ │ │ │ a0f8eaefa183de6150378561ac93d210a │ │ │ │ │ │ @@ -2052,247 +2052,247 @@ │ │ │ │ │ │ a0f8eaefa183de6150378561ac93d210a │ │ │ │ │ │ [] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ basicwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00929.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00821.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ Dune::VTK::BasicWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundaryiterators.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00956.html │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ + a00779.html │ │ │ │ │ │ + dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ Dune::VTK::BoundaryIterator │ │ │ │ │ │ Dune::VTK::IntersectionIndexSet │ │ │ │ │ │ Dune::VTK::NonConformingBoundaryIteratorFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundarywriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00944.html │ │ │ │ │ │ - dune/grid/io/file/vtk/basicwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/boundaryiterators.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/skeletonfunction.hh │ │ │ │ │ │ + a00764.html │ │ │ │ │ │ + dune/grid/io/file/vtk/basicwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/boundaryiterators.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/skeletonfunction.hh │ │ │ │ │ │ Dune::VTK::NonConformingBoundaryWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00941.html │ │ │ │ │ │ + a00818.html │ │ │ │ │ │ Dune::VTK::PrintType │ │ │ │ │ │ Dune::VTK::PrintType< unsigned char > │ │ │ │ │ │ Dune::VTK::PrintType< signed char > │ │ │ │ │ │ Dune::VTK::PrintType< char > │ │ │ │ │ │ Dune::VTK::FieldInfo │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ corner.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00902.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00815.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ Dune::VTK::Corner │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ corneriterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00920.html │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ + a00767.html │ │ │ │ │ │ + dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ Dune::VTK::CornerIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dataarraywriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00938.html │ │ │ │ │ │ - dune/grid/io/file/vtk/streams.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00782.html │ │ │ │ │ │ + dune/grid/io/file/vtk/streams.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ Dune::VTK::DataArrayWriter │ │ │ │ │ │ Dune::VTK::AsciiDataArrayWriter │ │ │ │ │ │ Dune::VTK::BinaryDataArrayWriter │ │ │ │ │ │ Dune::VTK::AppendedRawDataArrayWriter │ │ │ │ │ │ Dune::VTK::AppendedBase64DataArrayWriter │ │ │ │ │ │ Dune::VTK::NakedBase64DataArrayWriter │ │ │ │ │ │ Dune::VTK::NakedRawDataArrayWriter │ │ │ │ │ │ Dune::VTK::DataArrayWriterFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ function.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00911.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00806.html │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ Dune::VTKFunction │ │ │ │ │ │ Dune::P0VTKFunction │ │ │ │ │ │ Dune::P1VTKFunction │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ functionwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00926.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00773.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ Dune::VTK::FunctionWriterBase │ │ │ │ │ │ Dune::VTK::VTKFunctionWriter │ │ │ │ │ │ Dune::VTK::CoordinatesWriter │ │ │ │ │ │ Dune::VTK::ConformingConnectivityWriter │ │ │ │ │ │ Dune::VTK::NonConformingConnectivityWriter │ │ │ │ │ │ Dune::VTK::OffsetsWriter │ │ │ │ │ │ Dune::VTK::TypesWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ pointiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00947.html │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ + a00785.html │ │ │ │ │ │ + dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ Dune::VTK::PointIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ pvtuwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00950.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00761.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ Dune::VTK::PVTUWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ skeletonfunction.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00932.html │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00797.html │ │ │ │ │ │ + dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ Dune::VTK::SkeletonFunctionTraits │ │ │ │ │ │ Dune::VTK::SkeletonFunctionInterface │ │ │ │ │ │ Dune::VTK::SkeletonFunctionWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ streams.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00905.html │ │ │ │ │ │ - dune/grid/io/file/vtk/b64enc.hh │ │ │ │ │ │ + a00770.html │ │ │ │ │ │ + dune/grid/io/file/vtk/b64enc.hh │ │ │ │ │ │ Dune::Base64Stream │ │ │ │ │ │ Dune::RawStream │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ subsamplingvtkwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00899.html │ │ │ │ │ │ - dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00788.html │ │ │ │ │ │ + dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ Dune::SubsamplingVTKWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ volumeiterators.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00908.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/pointiterator.hh │ │ │ │ │ │ + a00809.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/pointiterator.hh │ │ │ │ │ │ Dune::VTK::ConformingVolumeIteratorFactory │ │ │ │ │ │ Dune::VTK::NonConformingVolumeIteratorFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ volumewriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00914.html │ │ │ │ │ │ - dune/grid/io/file/vtk/basicwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/function.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/volumeiterators.hh │ │ │ │ │ │ + a00794.html │ │ │ │ │ │ + dune/grid/io/file/vtk/basicwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/function.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/volumeiterators.hh │ │ │ │ │ │ Dune::VTK::ConformingVolumeWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vtksequencewriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00917.html │ │ │ │ │ │ - dune/grid/io/file/vtk/vtksequencewriterbase.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ + a00812.html │ │ │ │ │ │ + dune/grid/io/file/vtk/vtksequencewriterbase.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ Dune::VTKSequenceWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vtksequencewriterbase.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00959.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ + a00800.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ Dune::VTKSequenceWriterBase │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vtkwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00923.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/function.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/streams.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00776.html │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/function.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/streams.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ Dune::VTKWriter │ │ │ │ │ │ Dune::VTKWriter::VTKLocalFunction │ │ │ │ │ │ Dune::VTKWriter::VTKLocalFunction::FunctionWrapperBase │ │ │ │ │ │ Dune::VTKWriter::VTKLocalFunction::FunctionWrapper │ │ │ │ │ │ Dune::VTKWriter::VTKLocalFunction::GlobalFunctionWrapper │ │ │ │ │ │ Dune::VTKWriter::VTKLocalFunction::VTKFunctionWrapper │ │ │ │ │ │ Dune::VTKWriter::CellIterator │ │ │ │ │ │ Dune::VTKWriter::VertexIterator │ │ │ │ │ │ Dune::VTKWriter::CornerIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vtuwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00953.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ + a00791.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ Dune::VTK::VTUWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ onedgrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ @@ -2310,15 +2310,15 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ uggrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ a00974.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + dune/grid/common/boundarysegment.hh │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ uggrid/uggridfactory.hh │ │ │ │ │ │ Dune::UGGridFamily │ │ │ │ │ │ Dune::UGGrid │ │ │ │ │ │ Dune::Capabilities::hasEntity< UGGrid< dim >, codim > │ │ │ │ │ │ Dune::Capabilities::hasEntityIterator< UGGrid< dim >, codim > │ │ │ │ │ │ @@ -2393,187 +2393,187 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ uggridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/uggrid/ │ │ │ │ │ │ a00977.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + dune/grid/common/boundarysegment.hh │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ dune/grid/uggrid.hh │ │ │ │ │ │ Dune::GridFactory< UGGrid< dimworld > > │ │ │ │ │ │ Dune::GridFactory< UGGrid< dimworld > >::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ entitycommhelper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01007.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a01019.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface > │ │ │ │ │ │ Dune::EntityCommHelper< InteriorBorder_All_Interface > │ │ │ │ │ │ Dune::EntityCommHelper< Overlap_OverlapFront_Interface > │ │ │ │ │ │ Dune::EntityCommHelper< Overlap_All_Interface > │ │ │ │ │ │ Dune::EntityCommHelper< All_All_Interface > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ globalindexset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ a00983.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ Dune::GlobalIndexSet │ │ │ │ │ │ Dune::GlobalIndexSet::SubPartitionTypeProvider │ │ │ │ │ │ Dune::GlobalIndexSet::SubPartitionTypeProvider< Entity, 0 > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridinfo-gmsh-main.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01019.html │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + a00998.html │ │ │ │ │ │ + dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ dune/grid/utility/gridinfo.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridtype.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01004.html │ │ │ │ │ │ + a00986.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hierarchicsearch.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ a00989.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::HierarchicSearch │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hostgridaccess.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a00998.html │ │ │ │ │ │ + a01007.html │ │ │ │ │ │ dune/grid/geometrygrid/intersection.hh │ │ │ │ │ │ Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > > │ │ │ │ │ │ Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim │ │ │ │ │ │ Dune::HostGridAccess< IdentityGrid< HG > > │ │ │ │ │ │ Dune::HostGridAccess< IdentityGrid< HG > >::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ multiindex.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01013.html │ │ │ │ │ │ + a01004.html │ │ │ │ │ │ Dune::FactoryUtilities::MultiIndex │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::FactoryUtilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ parmetisgridpartitioner.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a00986.html │ │ │ │ │ │ + a00992.html │ │ │ │ │ │ dune/grid/utility/globalindexset.hh │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ - dune/grid/common/rangegenerators.hh │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + dune/grid/common/rangegenerators.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainerinterface.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01010.html │ │ │ │ │ │ + a01016.html │ │ │ │ │ │ Dune::PersistentContainerInterface │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainermap.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01001.html │ │ │ │ │ │ + a00995.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ Dune::PersistentContainerMap │ │ │ │ │ │ Dune::PersistentContainerMap::IteratorWrapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainervector.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a00992.html │ │ │ │ │ │ + a01013.html │ │ │ │ │ │ Dune::PersistentContainerVector │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainerwrapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a01016.html │ │ │ │ │ │ - dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ + a00980.html │ │ │ │ │ │ + dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ dune/grid/utility/persistentcontainer.hh │ │ │ │ │ │ Dune::PersistentContainerWrapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ tensorgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a00980.html │ │ │ │ │ │ + a01010.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ dune/grid/yaspgrid.hh │ │ │ │ │ │ - dune/grid/utility/multiindex.hh │ │ │ │ │ │ + dune/grid/utility/multiindex.hh │ │ │ │ │ │ Dune::TensorGridFactory │ │ │ │ │ │ Dune::TensorGridFactoryCreator │ │ │ │ │ │ Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vertexorderfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/ │ │ │ │ │ │ - a00995.html │ │ │ │ │ │ + a01001.html │ │ │ │ │ │ Dune::VertexOrderByIdFactory │ │ │ │ │ │ Dune::VertexOrderByIdFactory::VertexOrder │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/ │ │ │ │ │ │ a01022.html │ │ │ │ │ │ dune/grid/common/backuprestore.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ - dune/grid/common/indexidset.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ - dune/grid/yaspgrid/coordinates.hh │ │ │ │ │ │ - dune/grid/yaspgrid/torus.hh │ │ │ │ │ │ - dune/grid/yaspgrid/ygrid.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridgeometry.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridentity.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridintersection.hh │ │ │ │ │ │ + dune/grid/common/indexidset.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/yaspgrid/coordinates.hh │ │ │ │ │ │ + dune/grid/yaspgrid/torus.hh │ │ │ │ │ │ + dune/grid/yaspgrid/ygrid.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridgeometry.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridentity.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridintersection.hh │ │ │ │ │ │ dune/grid/yaspgrid/yaspgridintersectioniterator.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridhierarchiciterator.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridentityseed.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridleveliterator.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridindexsets.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgrididset.hh │ │ │ │ │ │ - dune/grid/yaspgrid/yaspgridpersistentcontainer.hh │ │ │ │ │ │ - dune/grid/yaspgrid/structuredyaspgridfactory.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridhierarchiciterator.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridentityseed.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridleveliterator.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridindexsets.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgrididset.hh │ │ │ │ │ │ + dune/grid/yaspgrid/yaspgridpersistentcontainer.hh │ │ │ │ │ │ + dune/grid/yaspgrid/structuredyaspgridfactory.hh │ │ │ │ │ │ dune/grid/yaspgrid/backuprestore.hh │ │ │ │ │ │ Dune::YaspGridFamily │ │ │ │ │ │ Dune::YaspGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ coordinates.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00176.html │ │ │ │ │ │ + a00206.html │ │ │ │ │ │ Dune::EquidistantCoordinates │ │ │ │ │ │ Dune::EquidistantOffsetCoordinates │ │ │ │ │ │ Dune::TensorProductCoordinates │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Yasp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ partitioning.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00227.html │ │ │ │ │ │ + a00179.html │ │ │ │ │ │ Dune::Yasp::Partitioning │ │ │ │ │ │ Dune::Yasp::DefaultPartitioning │ │ │ │ │ │ Dune::Yasp::PowerDPartitioning │ │ │ │ │ │ Dune::Yasp::FixedSizePartitioning │ │ │ │ │ │ Dune::YLoadBalance │ │ │ │ │ │ Dune::YLoadBalanceForward │ │ │ │ │ │ Dune::YLoadBalanceDefault │ │ │ │ │ │ @@ -2581,114 +2581,114 @@ │ │ │ │ │ │ Dune::YaspFixedSizePartitioner │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Yasp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ structuredyaspgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00179.html │ │ │ │ │ │ + a00224.html │ │ │ │ │ │ dune/grid/utility/structuredgridfactory.hh │ │ │ │ │ │ Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > > │ │ │ │ │ │ Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ torus.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00224.html │ │ │ │ │ │ - dune/grid/common/exceptions.hh │ │ │ │ │ │ - partitioning.hh │ │ │ │ │ │ + a00188.html │ │ │ │ │ │ + dune/grid/common/exceptions.hh │ │ │ │ │ │ + partitioning.hh │ │ │ │ │ │ Dune::Torus │ │ │ │ │ │ Dune::Torus::ProcListIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridentity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00194.html │ │ │ │ │ │ + a00209.html │ │ │ │ │ │ Dune::YaspEntity │ │ │ │ │ │ Dune::YaspEntity< 0, dim, GridImp > │ │ │ │ │ │ Dune::YaspEntity< 0, dim, GridImp >::Codim │ │ │ │ │ │ Dune::YaspEntity< dim, dim, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Yasp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridentityseed.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00182.html │ │ │ │ │ │ + a00233.html │ │ │ │ │ │ Dune::YaspEntitySeed │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridgeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00170.html │ │ │ │ │ │ + a00182.html │ │ │ │ │ │ Dune::YaspGeometry │ │ │ │ │ │ Dune::YaspGeometry< mydim, mydim, GridImp > │ │ │ │ │ │ Dune::YaspGeometry< 0, cdim, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridhierarchiciterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00209.html │ │ │ │ │ │ + a00167.html │ │ │ │ │ │ Dune::YaspHierarchicIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgrididset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00167.html │ │ │ │ │ │ + a00191.html │ │ │ │ │ │ Dune::YaspGlobalIdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridindexsets.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00212.html │ │ │ │ │ │ + a00158.html │ │ │ │ │ │ Dune::YaspIndexSet │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridintersection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00203.html │ │ │ │ │ │ + a00230.html │ │ │ │ │ │ Dune::YaspIntersection │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridintersectioniterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ a00161.html │ │ │ │ │ │ Dune::YaspIntersectionIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridleveliterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00233.html │ │ │ │ │ │ + a00212.html │ │ │ │ │ │ Dune::YaspLevelIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridpersistentcontainer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00191.html │ │ │ │ │ │ + a00173.html │ │ │ │ │ │ dune/grid/utility/persistentcontainer.hh │ │ │ │ │ │ - dune/grid/utility/persistentcontainervector.hh │ │ │ │ │ │ + dune/grid/utility/persistentcontainervector.hh │ │ │ │ │ │ ../yaspgrid.hh │ │ │ │ │ │ Dune::YaspPersistentContainerIndex │ │ │ │ │ │ Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ygrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00188.html │ │ │ │ │ │ + a00176.html │ │ │ │ │ │ Dune::YGridComponent │ │ │ │ │ │ Dune::YGridComponent::Iterator │ │ │ │ │ │ Dune::YGrid │ │ │ │ │ │ Dune::YGrid::Iterator │ │ │ │ │ │ Dune::YGridList │ │ │ │ │ │ Dune::YGridList::Intersection │ │ │ │ │ │ Dune::YGridList::Iterator │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/files.html │ │ │ │ @@ -73,247 +73,247 @@ │ │ │ │ │ │ │ │
│ │ │ │
Here is a list of all files with brief descriptions:
│ │ │ │
[detail level 1234567]
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
  doc
 doxygen
  recipes
 recipe-integration.cc
 recipe-integration.cc
 recipe-iterate-over-grid.cc
  dune
  grid
  albertagrid
  common
  geometrygrid
  identitygrid
  io
  uggrid
  utility
  yaspgrid
 albertagrid.hh
 geometrygrid.hh
 identitygrid.hhThe IdentityGrid class
 onedgrid.hhThe OneDGrid class
 uggrid.hhThe UGGrid class
 yaspgrid.hh
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/globals.html │ │ │ │ @@ -69,30 +69,30 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
Here is a list of all file members with links to the files they belong to:
│ │ │ │
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/globals_defs.html │ │ │ │ @@ -69,27 +69,27 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
Here is a list of all macros with links to the files they belong to:
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Here is a list of all functions with links to the files they belong to:
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00143.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00149.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │ #include <dune/common/timer.hh>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/geometry/quadraturerules.hh>
│ │ │ │ #include <dune/grid/yaspgrid.hh>
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Functions

int main (int argc, char **argv)
int main (int argc, char **argv)
 
│ │ │ │

Function Documentation

│ │ │ │ │ │ │ │

◆ main()

│ │ │ │ │ │ │ │
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00587.html │ │ │ │┄ Files 10% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridgeometry.hh File Reference │ │ │ │ +dune-grid: cornerstorage.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,49 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridgeometry.hh File Reference
│ │ │ │ +
cornerstorage.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

The YaspGeometry class and its specializations. │ │ │ │ -More...

│ │ │ │ - │ │ │ │ -

Go to the source code of this file.

│ │ │ │ +
#include <array>
│ │ │ │ +#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspGeometry< mydim, cdim, GridImp >
 The general version that handles all codimensions but 0 and dim. More...
class  Dune::GeoGrid::CoordVector< mydim, Grid, false >
 
class  Dune::YaspGeometry< mydim, mydim, GridImp >
 specialize for dim=dimworld, i.e. a volume element More...
class  Dune::GeoGrid::CoordVector< mydim, Grid, true >
 
class  Dune::YaspGeometry< 0, cdim, GridImp >
 specialization for dim=0, this is a vertex More...
class  Dune::GeoGrid::IntersectionCoordVector< Grid >
 
class  Dune::GeoGrid::CornerStorage< mydim, cdim, Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

The YaspGeometry class and its specializations.

│ │ │ │ -

YaspGeometry realizes the concept of the geometric part of a mesh entity.

│ │ │ │ -

We have specializations for dim == dimworld (elements) and dim == 0 (vertices). The general version implements all other codimensions.

│ │ │ │ -

As of September 2014, the functionality of YaspGeometry is identical to that of AxisAlignedCubeGeometry. The latter cannot be used directly due to the grid interface facade construction (it isn't templated to the GridImp). As soon as template aliases are available, this header boils down to one line.

│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,37 +1,30 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_g_r_i_d │ │ │ │ │ + * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridgeometry.hh File Reference │ │ │ │ │ -The YaspGeometry class and its specializations. _M_o_r_e_._._. │ │ │ │ │ +cornerstorage.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  The general version that handles all codimensions but 0 and dim. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_V_e_c_t_o_r_<_ _m_y_d_i_m_,_ _G_r_i_d_,_ _f_a_l_s_e_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  specialize for dim=dimworld, i.e. a volume element _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_V_e_c_t_o_r_<_ _m_y_d_i_m_,_ _G_r_i_d_,_ _t_r_u_e_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  specialization for dim=0, this is a vertex _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r_<_ _G_r_i_d_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspGeometry class and its specializations. │ │ │ │ │ -YaspGeometry realizes the concept of the geometric part of a mesh entity. │ │ │ │ │ -We have specializations for dim == dimworld (elements) and dim == 0 (vertices). │ │ │ │ │ -The general version implements all other codimensions. │ │ │ │ │ -As of September 2014, the functionality of YaspGeometry is identical to that of │ │ │ │ │ -AxisAlignedCubeGeometry. The latter cannot be used directly due to the grid │ │ │ │ │ -interface facade construction (it isn't templated to the GridImp). As soon as │ │ │ │ │ -template aliases are available, this header boils down to one line. │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ +  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00593_source.html │ │ │ │┄ Files 25% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridgeometry.hh Source File │ │ │ │ +dune-grid: identity.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,101 +70,73 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
yaspgridgeometry.hh
│ │ │ │ +
identity.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ │ +
5#ifndef DUNE_GEOGRID_IDENTITY_HH
│ │ │ │ +
6#define DUNE_GEOGRID_IDENTITY_HH
│ │ │ │
7
│ │ │ │ -
23namespace Dune {
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
13 template< class ctype, unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > >
│ │ │ │ +
17 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21 public:
│ │ │ │ +
22 typedef typename Base :: DomainVector DomainVector;
│ │ │ │ +
23 typedef typename Base :: RangeVector RangeVector;
│ │ │ │
24
│ │ │ │ -
29 template<int mydim,int cdim, class GridImp>
│ │ │ │ -
│ │ │ │ -
30 class YaspGeometry : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,cdim>
│ │ │ │ -
31 {
│ │ │ │ -
32 public:
│ │ │ │ -
34 typedef typename GridImp::ctype ctype;
│ │ │ │ +
25 template< typename... Args >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {}
│ │ │ │ +
│ │ │ │ +
28
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 return x;
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
34 };
│ │ │ │ +
│ │ │ │
35
│ │ │ │ -
│ │ │ │ -
37 YaspGeometry (const FieldVector<ctype, cdim>& ll, const FieldVector<ctype, cdim>& ur, const std::bitset<cdim>& shift)
│ │ │ │ -
38 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(ll,ur,shift)
│ │ │ │ -
39 {
│ │ │ │ -
40 assert(mydim == shift.count());
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42 };
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
45 template<int mydim, class GridImp>
│ │ │ │ -
│ │ │ │ -
46 class YaspGeometry<mydim,mydim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,mydim>
│ │ │ │ -
47 {
│ │ │ │ -
48 public:
│ │ │ │ -
49 typedef typename GridImp::ctype ctype;
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
52 YaspGeometry (const FieldVector<ctype, mydim>& ll, const FieldVector<ctype, mydim>& ur)
│ │ │ │ -
53 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
│ │ │ │ -
54 {}
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
58 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
│ │ │ │ -
59 {}
│ │ │ │ -
│ │ │ │ -
60 };
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
63 template<int cdim, class GridImp>
│ │ │ │ -
│ │ │ │ -
64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>
│ │ │ │ -
65 {
│ │ │ │ -
66 public:
│ │ │ │ -
67 typedef typename GridImp::ctype ctype;
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
70 explicit YaspGeometry ( const FieldVector< ctype, cdim > &p )
│ │ │ │ -
71 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
│ │ │ │ -
72 {}
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset<cdim> &)
│ │ │ │ -
75 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
│ │ │ │ -
76 {}
│ │ │ │ -
│ │ │ │ -
77 };
│ │ │ │ -
│ │ │ │ -
78} // namespace Dune
│ │ │ │ -
79
│ │ │ │ -
80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ │ +
36}
│ │ │ │ +
37
│ │ │ │ +
38#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
The general version that handles all codimensions but 0 and dim.
Definition yaspgridgeometry.hh:31
│ │ │ │ -
YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype, cdim > &ur, const std::bitset< cdim > &shift)
constructor from midpoint and extension and a bitset defining which unit vectors span the entity
Definition yaspgridgeometry.hh:37
│ │ │ │ -
GridImp::ctype ctype
define type used for coordinates in grid module
Definition yaspgridgeometry.hh:34
│ │ │ │ -
YaspGeometry(const YaspGeometry &other)
copy constructor (skipping temporary variables)
Definition yaspgridgeometry.hh:57
│ │ │ │ -
GridImp::ctype ctype
Definition yaspgridgeometry.hh:49
│ │ │ │ -
YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, mydim > &ur)
constructor from midpoint and extension
Definition yaspgridgeometry.hh:52
│ │ │ │ -
YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset< cdim > &)
Definition yaspgridgeometry.hh:74
│ │ │ │ -
YaspGeometry(const FieldVector< ctype, cdim > &p)
constructor
Definition yaspgridgeometry.hh:70
│ │ │ │ -
GridImp::ctype ctype
Definition yaspgridgeometry.hh:67
│ │ │ │ +
Derive an implementation of an analytical coordinate function from this class.
Definition coordfunction.hh:134
│ │ │ │ +
Definition identity.hh:17
│ │ │ │ +
IdenticalCoordFunction(Args &...)
Definition identity.hh:26
│ │ │ │ +
Base::RangeVector RangeVector
Definition identity.hh:23
│ │ │ │ +
RangeVector operator()(const DomainVector &x) const
Definition identity.hh:29
│ │ │ │ +
Base::DomainVector DomainVector
Definition identity.hh:22
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,111 +1,71 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridgeometry.hh │ │ │ │ │ + * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ +identity.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ │ +5#ifndef DUNE_GEOGRID_IDENTITY_HH │ │ │ │ │ +6#define DUNE_GEOGRID_IDENTITY_HH │ │ │ │ │ 7 │ │ │ │ │ -23namespace _D_u_n_e { │ │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ +12 │ │ │ │ │ +13 template< class ctype, unsigned int dim > │ │ │ │ │ +_1_4 class _I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +15 : public _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > > │ │ │ │ │ +17 { │ │ │ │ │ +18 typedef _I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_y_p_e_,_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ +19 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_y_p_e_,_ _d_i_m_,_ _d_i_m_,_ _T_h_i_s_ _> _B_a_s_e; │ │ │ │ │ +20 │ │ │ │ │ +21 public: │ │ │ │ │ +_2_2 typedef typename Base :: DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_2_3 typedef typename Base :: RangeVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ 24 │ │ │ │ │ -29 template │ │ │ │ │ -_3_0 class _Y_a_s_p_G_e_o_m_e_t_r_y : public AxisAlignedCubeGeometry │ │ │ │ │ -31 { │ │ │ │ │ -32 public: │ │ │ │ │ -_3_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +25 template< typename... Args > │ │ │ │ │ +_2_6 _I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n( Args&... ) │ │ │ │ │ +27 {} │ │ │ │ │ +28 │ │ │ │ │ +_2_9 _R_a_n_g_e_V_e_c_t_o_r _o_p_e_r_a_t_o_r_(_)(const _D_o_m_a_i_n_V_e_c_t_o_r& x) const │ │ │ │ │ +30 { │ │ │ │ │ +31 return x; │ │ │ │ │ +32 } │ │ │ │ │ +33 │ │ │ │ │ +34 }; │ │ │ │ │ 35 │ │ │ │ │ -_3_7 _Y_a_s_p_G_e_o_m_e_t_r_y (const FieldVector& ll, const FieldVector& ur, const std::bitset& shift) │ │ │ │ │ -38 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,cdim>(ll,ur,shift) │ │ │ │ │ -39 { │ │ │ │ │ -40 assert(mydim == shift.count()); │ │ │ │ │ -41 } │ │ │ │ │ -42 }; │ │ │ │ │ -43 │ │ │ │ │ -45 template │ │ │ │ │ -_4_6 class _Y_a_s_p_G_e_o_m_e_t_r_y : public │ │ │ │ │ -AxisAlignedCubeGeometry │ │ │ │ │ -47 { │ │ │ │ │ -48 public: │ │ │ │ │ -_4_9 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ -50 │ │ │ │ │ -_5_2 _Y_a_s_p_G_e_o_m_e_t_r_y (const FieldVector& ll, const FieldVector& ur) │ │ │ │ │ -53 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,mydim>(ll,ur) │ │ │ │ │ -54 {} │ │ │ │ │ -55 │ │ │ │ │ -_5_7 _Y_a_s_p_G_e_o_m_e_t_r_y (const _Y_a_s_p_G_e_o_m_e_t_r_y& other) │ │ │ │ │ -58 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,mydim>(other) │ │ │ │ │ -59 {} │ │ │ │ │ -60 }; │ │ │ │ │ -61 │ │ │ │ │ -63 template │ │ │ │ │ -_6_4 class _Y_a_s_p_G_e_o_m_e_t_r_y<0,cdim,GridImp> : public AxisAlignedCubeGeometry │ │ │ │ │ -65 { │ │ │ │ │ -66 public: │ │ │ │ │ -_6_7 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ -68 │ │ │ │ │ -_7_0 explicit _Y_a_s_p_G_e_o_m_e_t_r_y ( const FieldVector< ctype, cdim > &p ) │ │ │ │ │ -71 : AxisAlignedCubeGeometry( p ) │ │ │ │ │ -72 {} │ │ │ │ │ -73 │ │ │ │ │ -_7_4 _Y_a_s_p_G_e_o_m_e_t_r_y ( const FieldVector< ctype, cdim > &p, const FieldVector< │ │ │ │ │ -ctype, cdim > &, const std::bitset &) │ │ │ │ │ -75 : AxisAlignedCubeGeometry( p ) │ │ │ │ │ -76 {} │ │ │ │ │ -77 }; │ │ │ │ │ -78} // namespace Dune │ │ │ │ │ -79 │ │ │ │ │ -80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ │ +36} │ │ │ │ │ +37 │ │ │ │ │ +38#endif │ │ │ │ │ +_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ -The general version that handles all codimensions but 0 and dim. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ -YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype, │ │ │ │ │ -cdim > &ur, const std::bitset< cdim > &shift) │ │ │ │ │ -constructor from midpoint and extension and a bitset defining which unit │ │ │ │ │ -vectors span the entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ │ -GridImp::ctype ctype │ │ │ │ │ -define type used for coordinates in grid module │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ -YaspGeometry(const YaspGeometry &other) │ │ │ │ │ -copy constructor (skipping temporary variables) │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_t_y_p_e │ │ │ │ │ -GridImp::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ -YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, │ │ │ │ │ -mydim > &ur) │ │ │ │ │ -constructor from midpoint and extension │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ -YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype, │ │ │ │ │ -cdim > &, const std::bitset< cdim > &) │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_Y_a_s_p_G_e_o_m_e_t_r_y │ │ │ │ │ -YaspGeometry(const FieldVector< ctype, cdim > &p) │ │ │ │ │ -constructor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_e_o_m_e_t_r_y_<_ _0_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_c_t_y_p_e │ │ │ │ │ -GridImp::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn yaspgridgeometry.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +Derive an implementation of an analytical coordinate function from this class. │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn identity.hh:17 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +IdenticalCoordFunction(Args &...) │ │ │ │ │ +DDeeffiinniittiioonn identity.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Base::RangeVector RangeVector │ │ │ │ │ +DDeeffiinniittiioonn identity.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +RangeVector operator()(const DomainVector &x) const │ │ │ │ │ +DDeeffiinniittiioonn identity.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn identity.hh:22 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00194.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │┄ Files 11% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentity.hh File Reference │ │ │ │ +dune-grid: yaspgridpersistentcontainer.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,52 +72,44 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridentity.hh File Reference
│ │ │ │ +
yaspgridpersistentcontainer.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

the YaspEntity class and its specializations │ │ │ │ +

Specialization of the PersistentContainer for YaspGrid. │ │ │ │ More...

│ │ │ │ -
#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │ +#include <dune/grid/utility/persistentcontainervector.hh>
│ │ │ │ +#include "../yaspgrid.hh"
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspEntity< codim, dim, GridImp >
class  Dune::YaspPersistentContainerIndex< Grid >
 
class  Dune::YaspEntity< 0, dim, GridImp >
 
struct  Dune::YaspEntity< 0, dim, GridImp >::Codim< cd >
 
class  Dune::YaspEntity< dim, dim, GridImp >
class  Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >
 Specialization of the PersistentContainer for YaspGrid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Yasp
 
│ │ │ │

Detailed Description

│ │ │ │ -

the YaspEntity class and its specializations

│ │ │ │ -

YaspEntity realizes the concept a mesh entity.

│ │ │ │ -

We have specializations for

    │ │ │ │ -
  • codim==0 (elements), because they have an extended interface
  • │ │ │ │ -
  • codim==dim (vertices), because they use a special constructor of the AxisAlignedCubeGeometry and are the only entities in a globally refined grid, that may also exist on another level.
  • │ │ │ │ -
│ │ │ │ -

The general version implements all other codimensions.

│ │ │ │ +

Specialization of the PersistentContainer for YaspGrid.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,38 +2,29 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -yaspgridentity.hh File Reference │ │ │ │ │ -the YaspEntity class and its specializations _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +yaspgridpersistentcontainer.hh File Reference │ │ │ │ │ +Specialization of the PersistentContainer for YaspGrid. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_v_e_c_t_o_r_._h_h> │ │ │ │ │ +#include "_._._/_y_a_s_p_g_r_i_d_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_<_ _G_r_i_d_ _> │ │ │ │ │   │ │ │ │ │ - class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _> │ │ │ │ │ +  Specialization of the _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -the YaspEntity class and its specializations │ │ │ │ │ -YaspEntity realizes the concept a mesh entity. │ │ │ │ │ -We have specializations for │ │ │ │ │ - * codim==0 (elements), because they have an extended interface │ │ │ │ │ - * codim==dim (vertices), because they use a special constructor of the │ │ │ │ │ - AxisAlignedCubeGeometry and are the only entities in a globally refined │ │ │ │ │ - grid, that may also exist on another level. │ │ │ │ │ -The general version implements all other codimensions. │ │ │ │ │ +Specialization of the PersistentContainer for YaspGrid. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00203.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00230.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
yaspgridintersection.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

The YaspIntersection class. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspIntersection< GridImp >
 YaspIntersection provides data about intersection with neighboring codim 0 entities. More...
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
yaspgridintersection.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_YASPGRIDINTERSECTION_HH
│ │ │ │
6#define DUNE_GRID_YASPGRIDINTERSECTION_HH
│ │ │ │
7
│ │ │ │
15namespace Dune {
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00227.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │┄ Files 12% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: partitioning.hh File Reference │ │ │ │ +dune-grid: coordfunction.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,71 +65,54 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
partitioning.hh File Reference
│ │ │ │ +
coordfunction.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

This file provides tools to partition YaspGrids. If you want to write your own partitioner, inherit from Yasp::Partitioning and implement the partition() method. You can also browse this file for already available useful partitioners, like Yasp::FixedSizePartitioning. │ │ │ │ -More...

│ │ │ │ -
#include <array>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/common/deprecated.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Yasp::Partitioning< d >
 a base class for the yaspgrid partitioning strategy More...
 
class  Dune::Yasp::DefaultPartitioning< d >
 
class  Dune::Yasp::PowerDPartitioning< d >
 Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
 
class  Dune::Yasp::FixedSizePartitioning< d >
 Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
 
class  Dune::YLoadBalance< d >
 a base class for the yaspgrid partitioning strategy More...
 
class  Dune::YLoadBalanceForward< d >
class  Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >
 Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::AnalyticalCoordFunction and the evaluate method mapping $ R^d\to R^r $ has to be supplied. More...
 
class  Dune::YLoadBalanceDefault< d >
 Implement the default load balance strategy of yaspgrid. More...
class  Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl >
 Derive an implementation of an analytical coordinate function from this class. More...
 
class  Dune::YLoadBalancePowerD< d >
 Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
class  Dune::DiscreteCoordFunctionInterface< ct, dimR, Impl >
 Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::DiscreteCoordinateFunction and the evaluate method taking an entity of the host grid together with the number of a vertex returns the coordinate in $ R^r $ of that corner. The user must ensure continuity of this mapping. In addition an adapt method is provided which is called whenever adapt() is called on the Dune::GeometryGrid. More...
 
class  Dune::YaspFixedSizePartitioner< d >
 Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
class  Dune::DiscreteCoordFunction< ct, dimR, Impl >
 Derive an implementation of a discrete coordinate function from this class. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Yasp
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

This file provides tools to partition YaspGrids. If you want to write your own partitioner, inherit from Yasp::Partitioning and implement the partition() method. You can also browse this file for already available useful partitioners, like Yasp::FixedSizePartitioning.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,62 +1,46 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_g_r_i_d │ │ │ │ │ + * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -partitioning.hh File Reference │ │ │ │ │ -This file provides tools to partition YaspGrids. If you want to write your own │ │ │ │ │ -partitioner, inherit from Yasp::Partitioning and implement the partition() │ │ │ │ │ -method. You can also browse this file for already available useful │ │ │ │ │ -partitioners, like Yasp::FixedSizePartitioning. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +coordfunction.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ -  a base class for the yaspgrid partitioning strategy _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ -  Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ │ - Implement partitioner that gets a fixed partitioning from an array If │ │ │ │ │ -  the given partitioning doesn't match the number of processors, the grid │ │ │ │ │ - should be distributed to, an exception is thrown. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_<_ _d_ _> │ │ │ │ │ -  a base class for the yaspgrid partitioning strategy _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_<_ _d_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t_<_ _d_ _> │ │ │ │ │ -  Implement the default load balance strategy of yaspgrid. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D_<_ _d_ _> │ │ │ │ │ -  Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r_<_ _d_ _> │ │ │ │ │ - Implement partitioner that gets a fixed partitioning from an array If │ │ │ │ │ -  the given partitioning doesn't match the number of processors, the grid │ │ │ │ │ - should be distributed to, an exception is thrown. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ + Interface class for using an analytical function to define the geometry │ │ │ │ │ +  of a _D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d. An implementation should be derived from │ │ │ │ │ + _D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n and the evaluate method mapping [$ R^d\to │ │ │ │ │ + R^r $]has to be supplied. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ +  Derive an implementation of an analytical coordinate function from this │ │ │ │ │ + class. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ + Interface class for using a discrete function to define the geometry of │ │ │ │ │ + a _D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d. An implementation should be derived from Dune:: │ │ │ │ │ + DiscreteCoordinateFunction and the evaluate method taking an entity of │ │ │ │ │ +  the host grid together with the number of a vertex returns the │ │ │ │ │ + coordinate in [$ R^r $]of that corner. The user must ensure continuity │ │ │ │ │ + of this mapping. In addition an adapt method is provided which is │ │ │ │ │ + called whenever _a_d_a_p_t_(_) is called on the _D_u_n_e_:_:_G_e_o_m_e_t_r_y_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ +  Derive an implementation of a discrete coordinate function from this │ │ │ │ │ + class. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ +  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file provides tools to partition YaspGrids. If you want to write your own │ │ │ │ │ -partitioner, inherit from Yasp::Partitioning and implement the partition() │ │ │ │ │ -method. You can also browse this file for already available useful │ │ │ │ │ -partitioners, like Yasp::FixedSizePartitioning. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00227_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html │ │ │ │┄ Files 9% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: partitioning.hh Source File │ │ │ │ +dune-grid: function.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,289 +70,277 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
partitioning.hh
│ │ │ │ +
function.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH
│ │ │ │ -
4#define DUNE_GRID_YASPGRID_PARTITIONING_HH
│ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │ -
13#include<array>
│ │ │ │ -
14
│ │ │ │ -
15#include<dune/common/math.hh>
│ │ │ │ -
16#include <dune/common/deprecated.hh>
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <string>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │ +
12#include <dune/common/fvector.hh>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/geometry/type.hh>
│ │ │ │ +
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
16#include <dune/geometry/multilineargeometry.hh>
│ │ │ │
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ + │ │ │ │ + │ │ │ │
20
│ │ │ │ -
21 namespace Yasp
│ │ │ │ -
22 {
│ │ │ │ -
23
│ │ │ │ -
37 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
40 public:
│ │ │ │ -
41 using iTupel = std::array<int, d>;
│ │ │ │ -
42 virtual ~Partitioning() = default;
│ │ │ │ -
43 virtual void partition(const iTupel&, int, iTupel&, int) const = 0;
│ │ │ │ -
44 };
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
48 {
│ │ │ │ -
49 public:
│ │ │ │ -
50 using iTupel = std::array<int, d>;
│ │ │ │ +
26namespace Dune
│ │ │ │ +
27{
│ │ │ │ +
30
│ │ │ │ +
32 //
│ │ │ │ +
33 // Base VTKFunction
│ │ │ │ +
34 //
│ │ │ │ +
35
│ │ │ │ +
40 template< class GridView >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
42 {
│ │ │ │ +
43 public:
│ │ │ │ +
44 typedef typename GridView::ctype ctype;
│ │ │ │ +
45 constexpr static int dim = GridView::dimension;
│ │ │ │ +
46 typedef typename GridView::template Codim< 0 >::Entity Entity;
│ │ │ │ +
47
│ │ │ │ +
50 virtual int ncomps () const = 0;
│ │ │ │
51
│ │ │ │ -
│ │ │ │ -
57 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ -
58 {
│ │ │ │ -
59 double opt=1E100;
│ │ │ │ -
60 iTupel trydims;
│ │ │ │ -
61
│ │ │ │ -
62 trydims.fill(-1);
│ │ │ │ -
63 dims.fill(-1);
│ │ │ │ -
64
│ │ │ │ -
65 optimize_dims(d-1,size,P,dims,trydims,opt,overlap);
│ │ │ │ -
66 if (dims[0] == -1)
│ │ │ │ -
67 DUNE_THROW(Dune::GridError, "Failed to find a suitable partition");
│ │ │ │ -
68 }
│ │ │ │ +
53
│ │ │ │ +
60 virtual double evaluate (int comp, const Entity& e,
│ │ │ │ +
61 const Dune::FieldVector<ctype,dim>& xi) const = 0;
│ │ │ │ +
62
│ │ │ │ +
64 virtual std::string name () const = 0;
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
67 virtual VTK::Precision precision() const
│ │ │ │ +
68 { return VTK::Precision::float32; }
│ │ │ │
│ │ │ │
69
│ │ │ │ -
70 private:
│ │ │ │ -
71 void optimize_dims (int i, const iTupel& size, int P, iTupel& dims, iTupel& trydims, double &opt, int overlap ) const
│ │ │ │ -
72 {
│ │ │ │ -
73 if (i>0) // test all subdivisions recursively
│ │ │ │ -
74 {
│ │ │ │ -
75 for (int k=1; k<=P; k++)
│ │ │ │ -
76 if (
│ │ │ │ -
77 P%k==0 // k devides P
│ │ │ │ -
78 and (
│ │ │ │ -
79 k == 1 // no neighbors
│ │ │ │ -
80 or
│ │ │ │ -
81 size[i] / k >= 2*overlap // size sufficient for overlap
│ │ │ │ -
82 )
│ │ │ │ -
83 )
│ │ │ │ -
84 {
│ │ │ │ -
85 // P divisible by k
│ │ │ │ -
86 trydims[i] = k;
│ │ │ │ -
87 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap);
│ │ │ │ -
88 }
│ │ │ │ -
89 }
│ │ │ │ -
90 else
│ │ │ │ -
91 {
│ │ │ │ -
92 // found a possible combination
│ │ │ │ -
93 if (
│ │ │ │ -
94 P == 1 // no neighbors
│ │ │ │ -
95 or
│ │ │ │ -
96 size[0] / P >= 2*overlap // size sufficient for overlap
│ │ │ │ -
97 )
│ │ │ │ -
98 trydims[0] = P;
│ │ │ │ -
99 else
│ │ │ │ -
100 return;
│ │ │ │ -
101
│ │ │ │ -
102 // check for optimality
│ │ │ │ -
103 double m = -1.0;
│ │ │ │ -
104
│ │ │ │ -
105 for (int k=0; k<d; k++)
│ │ │ │ -
106 {
│ │ │ │ -
107 double mm=((double)size[k])/((double)trydims[k]);
│ │ │ │ -
108 if (fmod((double)size[k],(double)trydims[k])>0.0001) mm*=3;
│ │ │ │ -
109 if ( mm > m ) m = mm;
│ │ │ │ -
110 }
│ │ │ │ -
111 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims << " norm=" << m << std::endl;
│ │ │ │ -
112 if (m<opt)
│ │ │ │ -
113 {
│ │ │ │ -
114 opt = m;
│ │ │ │ -
115 dims = trydims;
│ │ │ │ -
116 }
│ │ │ │ -
117 }
│ │ │ │ -
118 }
│ │ │ │ -
119 };
│ │ │ │ -
│ │ │ │ -
120
│ │ │ │ -
123 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
125 {
│ │ │ │ -
126 public:
│ │ │ │ -
127 typedef std::array<int, d> iTupel;
│ │ │ │ - │ │ │ │ -
129
│ │ │ │ -
│ │ │ │ -
130 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ -
131 {
│ │ │ │ -
132 for (int i=1; i<=P; ++i)
│ │ │ │ -
133 if (Dune::power(i, d) == P) {
│ │ │ │ -
134 std::fill(dims.begin(), dims.end(),i);
│ │ │ │ -
135 return;
│ │ │ │ -
136 }
│ │ │ │ -
137
│ │ │ │ -
138 DUNE_THROW(GridError, "Power partitioning failed: your number of processes needs to be a " << d << "-th power.");
│ │ │ │ -
139 }
│ │ │ │ -
│ │ │ │ -
140 };
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
146 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
148 {
│ │ │ │ -
149 public:
│ │ │ │ -
150 FixedSizePartitioning(const std::array<int,d>& dims) : _dims(dims) {}
│ │ │ │ -
151
│ │ │ │ - │ │ │ │ -
153
│ │ │ │ -
│ │ │ │ -
154 void partition(const std::array<int,d>&, int P, std::array<int,d>& dims, int overlap) const final
│ │ │ │ -
155 {
│ │ │ │ -
156 int prod = 1;
│ │ │ │ -
157 for (int i=0; i<d; i++)
│ │ │ │ -
158 prod *= _dims[i];
│ │ │ │ -
159 if (P != prod)
│ │ │ │ -
160 DUNE_THROW(Dune::Exception,"Your processor number doesn't match your partitioning information");
│ │ │ │ -
161 dims = _dims;
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ -
164 private:
│ │ │ │ -
165 std::array<int,d> _dims;
│ │ │ │ -
166 };
│ │ │ │ -
│ │ │ │ -
167
│ │ │ │ -
169 }
│ │ │ │ -
170
│ │ │ │ -
174 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
176 {
│ │ │ │ -
177 public:
│ │ │ │ -
178 typedef std::array<int, d> iTupel;
│ │ │ │ -
179 [[deprecated("use the new interface of Yasp::Partitioning")]]
│ │ │ │ -
180 virtual ~YLoadBalance() {}
│ │ │ │ -
│ │ │ │ -
181 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final {
│ │ │ │ -
182 this->loadbalance(size,P,dims);
│ │ │ │ -
183 }
│ │ │ │ -
│ │ │ │ -
184 virtual void loadbalance(const iTupel&, int, iTupel&) const = 0;
│ │ │ │ -
185 };
│ │ │ │ +
71 virtual ~VTKFunction () {}
│ │ │ │ +
72 };
│ │ │ │
│ │ │ │ +
73
│ │ │ │ +
75 //
│ │ │ │ +
76 // P0VTKFunction
│ │ │ │ +
77 //
│ │ │ │ +
78
│ │ │ │ +
80
│ │ │ │ +
94 template<typename GV, typename V>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
96 : public VTKFunction< GV >
│ │ │ │ +
97 {
│ │ │ │ +
99 typedef VTKFunction< GV > Base;
│ │ │ │ + │ │ │ │ +
102
│ │ │ │ +
104 const V& v;
│ │ │ │ +
106 std::string s;
│ │ │ │ +
108 int ncomps_;
│ │ │ │ +
111 int mycomp_;
│ │ │ │ +
113 VTK::Precision prec_;
│ │ │ │ +
115 Mapper mapper;
│ │ │ │ +
116
│ │ │ │ +
117 public:
│ │ │ │ +
118 typedef typename Base::Entity Entity;
│ │ │ │ +
119 typedef typename Base::ctype ctype;
│ │ │ │ +
120 using Base::dim;
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ +
123 int ncomps () const override
│ │ │ │ +
124 {
│ │ │ │ +
125 return 1;
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
│ │ │ │ +
129 double evaluate (int, const Entity& e,
│ │ │ │ +
130 const Dune::FieldVector<ctype,dim>&) const override
│ │ │ │ +
131 {
│ │ │ │ +
132 return v[mapper.index(e)*ncomps_+mycomp_];
│ │ │ │ +
133 }
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
│ │ │ │ +
136 std::string name () const override
│ │ │ │ +
137 {
│ │ │ │ +
138 return s;
│ │ │ │ +
139 }
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │ +
│ │ │ │ +
142 VTK::Precision precision() const override
│ │ │ │ +
143 {
│ │ │ │ +
144 return prec_;
│ │ │ │ +
145 }
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
148
│ │ │ │ +
│ │ │ │ +
165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,
│ │ │ │ +
166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
│ │ │ │ +
167 : v( v_ ),
│ │ │ │ +
168 s( s_ ),
│ │ │ │ +
169 ncomps_(ncomps),
│ │ │ │ +
170 mycomp_(mycomp),
│ │ │ │ +
171 prec_(prec),
│ │ │ │ +
172 mapper( gv, mcmgElementLayout() )
│ │ │ │ +
173 {
│ │ │ │ +
174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
│ │ │ │ +
175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch");
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
179 virtual ~P0VTKFunction() {}
│ │ │ │ +
180 };
│ │ │ │ +
│ │ │ │ +
181
│ │ │ │ +
183 //
│ │ │ │ +
184 // P1VTKFunction
│ │ │ │ +
185 //
│ │ │ │
186
│ │ │ │ -
187DUNE_NO_DEPRECATED_BEGIN
│ │ │ │ -
188 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
190 {
│ │ │ │ -
191 std::unique_ptr<Yasp::Partitioning<d>> p_;
│ │ │ │ -
192 public:
│ │ │ │ -
193 typedef std::array<int, d> iTupel;
│ │ │ │ -
194 YLoadBalanceForward(std::unique_ptr<Yasp::Partitioning<d>> && p) : p_(std::move(p)) {}
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
196 void loadbalance(const iTupel& size, int P, iTupel& dims) const final {
│ │ │ │ -
197 return p_->partition(size,P,dims,1); // assuming the usual overlap of 1
│ │ │ │ -
198 }
│ │ │ │ -
│ │ │ │ -
199 };
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
204 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
206 {
│ │ │ │ -
207 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
209 YLoadBalanceForward<d>(std::make_unique<Yasp::DefaultPartitioning<d>>())
│ │ │ │ -
210 {}
│ │ │ │ -
│ │ │ │ -
211 };
│ │ │ │ -
│ │ │ │ -
212
│ │ │ │ -
216 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
218 {
│ │ │ │ -
219 public:
│ │ │ │ -
220 typedef std::array<int, d> iTupel;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
222 YLoadBalanceForward<d>(std::make_unique<Yasp::PowerDPartitioning<d>>())
│ │ │ │ -
223 {}
│ │ │ │ -
│ │ │ │ -
224 };
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
231 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
233 {
│ │ │ │ -
234 public:
│ │ │ │ -
235 typedef std::array<int, d> iTupel;
│ │ │ │ -
│ │ │ │ -
236 YaspFixedSizePartitioner(const std::array<int,d>& dims) :
│ │ │ │ -
237 YLoadBalanceForward<d>(std::make_unique<Yasp::FixedSizePartitioning<d>>(dims))
│ │ │ │ -
238 {}
│ │ │ │ -
│ │ │ │ -
239 };
│ │ │ │ -
│ │ │ │ -
240
│ │ │ │ -
241DUNE_NO_DEPRECATED_END
│ │ │ │ -
242}
│ │ │ │ -
243
│ │ │ │ -
244#endif
│ │ │ │ -
STL namespace.
│ │ │ │ +
188
│ │ │ │ +
202 template<typename GV, typename V>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
204 : public VTKFunction< GV >
│ │ │ │ +
205 {
│ │ │ │ +
207 typedef VTKFunction< GV > Base;
│ │ │ │ + │ │ │ │ +
210
│ │ │ │ +
212 const V& v;
│ │ │ │ +
214 std::string s;
│ │ │ │ +
216 int ncomps_;
│ │ │ │ +
219 int mycomp_;
│ │ │ │ +
221 VTK::Precision prec_;
│ │ │ │ +
223 Mapper mapper;
│ │ │ │ +
224
│ │ │ │ +
225 public:
│ │ │ │ +
226 typedef typename Base::Entity Entity;
│ │ │ │ +
227 typedef typename Base::ctype ctype;
│ │ │ │ +
228 using Base::dim;
│ │ │ │ +
229
│ │ │ │ +
│ │ │ │ +
231 int ncomps () const override
│ │ │ │ +
232 {
│ │ │ │ +
233 return 1;
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
│ │ │ │ +
237 double evaluate ([[maybe_unused]] int comp, const Entity& e,
│ │ │ │ +
238 const Dune::FieldVector<ctype,dim>& xi) const override
│ │ │ │ +
239 {
│ │ │ │ +
240 const unsigned int myDim = Entity::mydimension;
│ │ │ │ +
241 const unsigned int nVertices = e.subEntities(dim);
│ │ │ │ +
242
│ │ │ │ +
243 std::vector<FieldVector<ctype,1> > cornerValues(nVertices);
│ │ │ │ +
244 for (unsigned i=0; i<nVertices; ++i)
│ │ │ │ +
245 cornerValues[i] = v[mapper.subIndex(e,i,myDim)*ncomps_+mycomp_];
│ │ │ │ +
246
│ │ │ │ +
247 // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars
│ │ │ │ +
248 const MultiLinearGeometry<ctype,dim,1> interpolation(e.type(), cornerValues);
│ │ │ │ +
249 return interpolation.global(xi);
│ │ │ │ +
250 }
│ │ │ │ +
│ │ │ │ +
251
│ │ │ │ +
│ │ │ │ +
253 std::string name () const override
│ │ │ │ +
254 {
│ │ │ │ +
255 return s;
│ │ │ │ +
256 }
│ │ │ │ +
│ │ │ │ +
257
│ │ │ │ +
│ │ │ │ +
259 VTK::Precision precision() const override
│ │ │ │ +
260 {
│ │ │ │ +
261 return prec_;
│ │ │ │ +
262 }
│ │ │ │ +
│ │ │ │ +
263
│ │ │ │ +
265
│ │ │ │ +
│ │ │ │ +
282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,
│ │ │ │ +
283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
│ │ │ │ +
284 : v( v_ ),
│ │ │ │ +
285 s( s_ ),
│ │ │ │ +
286 ncomps_(ncomps),
│ │ │ │ +
287 mycomp_(mycomp),
│ │ │ │ +
288 prec_(prec),
│ │ │ │ +
289 mapper( gv, mcmgVertexLayout() )
│ │ │ │ +
290 {
│ │ │ │ +
291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
│ │ │ │ +
292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch");
│ │ │ │ +
293 }
│ │ │ │ +
│ │ │ │ +
294
│ │ │ │ +
296 virtual ~P1VTKFunction() {}
│ │ │ │ +
297 };
│ │ │ │ +
│ │ │ │ +
298
│ │ │ │ +
300
│ │ │ │ +
301} // namespace Dune
│ │ │ │ +
302
│ │ │ │ +
303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ +
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:145
│ │ │ │ +
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │ +
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ -
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:39
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:41
│ │ │ │ -
virtual ~Partitioning()=default
│ │ │ │ -
virtual void partition(const iTupel &, int, iTupel &, int) const =0
│ │ │ │ -
Definition partitioning.hh:48
│ │ │ │ -
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Distribute a structured grid across a set of processors.
Definition partitioning.hh:57
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:50
│ │ │ │ -
Implement yaspgrid load balance strategy for P=x^{dim} processors.
Definition partitioning.hh:125
│ │ │ │ -
virtual ~PowerDPartitioning()
Definition partitioning.hh:128
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:127
│ │ │ │ -
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Definition partitioning.hh:130
│ │ │ │ -
Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
Definition partitioning.hh:148
│ │ │ │ -
void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, int overlap) const final
Definition partitioning.hh:154
│ │ │ │ -
FixedSizePartitioning(const std::array< int, d > &dims)
Definition partitioning.hh:150
│ │ │ │ -
virtual ~FixedSizePartitioning()
Definition partitioning.hh:152
│ │ │ │ -
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:176
│ │ │ │ -
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Definition partitioning.hh:181
│ │ │ │ -
virtual void loadbalance(const iTupel &, int, iTupel &) const =0
│ │ │ │ -
virtual ~YLoadBalance()
Definition partitioning.hh:180
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:178
│ │ │ │ -
Definition partitioning.hh:190
│ │ │ │ -
void loadbalance(const iTupel &size, int P, iTupel &dims) const final
Definition partitioning.hh:196
│ │ │ │ -
YLoadBalanceForward(std::unique_ptr< Yasp::Partitioning< d > > &&p)
Definition partitioning.hh:194
│ │ │ │ -
virtual ~YLoadBalanceForward()
Definition partitioning.hh:195
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:193
│ │ │ │ -
Implement the default load balance strategy of yaspgrid.
Definition partitioning.hh:206
│ │ │ │ -
YLoadBalanceDefault()
Definition partitioning.hh:208
│ │ │ │ -
Implement yaspgrid load balance strategy for P=x^{dim} processors.
Definition partitioning.hh:218
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:220
│ │ │ │ -
YLoadBalancePowerD()
Definition partitioning.hh:221
│ │ │ │ -
Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
Definition partitioning.hh:233
│ │ │ │ -
YaspFixedSizePartitioner(const std::array< int, d > &dims)
Definition partitioning.hh:236
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:235
│ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ +
static constexpr int mydimension
Dimensionality of the reference element of the entity.
Definition common/entity.hh:112
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ +
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ +
size_type size() const
Return total number of entities in the entity set managed by the mapper.
Definition mcmgmapper.hh:204
│ │ │ │ +
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to starting index in array for dof block.
Definition mcmgmapper.hh:185
│ │ │ │ +
Index index(const EntityType &e) const
Map entity to starting index in array for dof block.
Definition mcmgmapper.hh:171
│ │ │ │ +
A base class for grid functions with any return type and dimension.
Definition function.hh:42
│ │ │ │ +
virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const =0
evaluate single component comp in the entity e at local coordinates xi
│ │ │ │ +
GridView::ctype ctype
Definition function.hh:44
│ │ │ │ +
GridView::template Codim< 0 >::Entity Entity
Definition function.hh:46
│ │ │ │ +
static constexpr int dim
Definition function.hh:45
│ │ │ │ +
virtual std::string name() const =0
get name
│ │ │ │ +
virtual VTK::Precision precision() const
get output precision for the field
Definition function.hh:67
│ │ │ │ +
virtual int ncomps() const =0
│ │ │ │ +
virtual ~VTKFunction()
virtual destructor
Definition function.hh:71
│ │ │ │ +
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
│ │ │ │ +
std::string name() const override
get name
Definition function.hh:136
│ │ │ │ +
Base::ctype ctype
Definition function.hh:119
│ │ │ │ +
double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) const override
evaluate
Definition function.hh:129
│ │ │ │ +
P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
construct from a vector and a name
Definition function.hh:165
│ │ │ │ +
VTK::Precision precision() const override
get output precision for the field
Definition function.hh:142
│ │ │ │ +
Base::Entity Entity
Definition function.hh:118
│ │ │ │ +
virtual ~P0VTKFunction()
destructor
Definition function.hh:179
│ │ │ │ +
int ncomps() const override
return number of components
Definition function.hh:123
│ │ │ │ +
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
│ │ │ │ +
std::string name() const override
get name
Definition function.hh:253
│ │ │ │ +
virtual ~P1VTKFunction()
destructor
Definition function.hh:296
│ │ │ │ +
Base::Entity Entity
Definition function.hh:226
│ │ │ │ +
Base::ctype ctype
Definition function.hh:227
│ │ │ │ +
VTK::Precision precision() const override
get output precision for the field
Definition function.hh:259
│ │ │ │ +
double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const override
evaluate
Definition function.hh:237
│ │ │ │ +
P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
construct from a vector and a name
Definition function.hh:282
│ │ │ │ +
int ncomps() const override
return number of components
Definition function.hh:231
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,329 +1,354 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_g_r_i_d │ │ │ │ │ -partitioning.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _v_t_k │ │ │ │ │ +function.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH │ │ │ │ │ -4#define DUNE_GRID_YASPGRID_PARTITIONING_HH │ │ │ │ │ +3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 5 │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ 17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ 20 │ │ │ │ │ -21 namespace Yasp │ │ │ │ │ -22 { │ │ │ │ │ -23 │ │ │ │ │ -37 template │ │ │ │ │ -_3_8 class _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -39 { │ │ │ │ │ -40 public: │ │ │ │ │ -_4_1 using _i_T_u_p_e_l = std::array; │ │ │ │ │ -_4_2 virtual _~_P_a_r_t_i_t_i_o_n_i_n_g() = default; │ │ │ │ │ -_4_3 virtual void _p_a_r_t_i_t_i_o_n(const _i_T_u_p_e_l&, int, _i_T_u_p_e_l&, int) const = 0; │ │ │ │ │ -44 }; │ │ │ │ │ -45 │ │ │ │ │ -46 template │ │ │ │ │ -_4_7 class _D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g : public _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -48 { │ │ │ │ │ -49 public: │ │ │ │ │ -_5_0 using _i_T_u_p_e_l = std::array; │ │ │ │ │ +26namespace _D_u_n_e │ │ │ │ │ +27{ │ │ │ │ │ +30 │ │ │ │ │ +32 // │ │ │ │ │ +33 // Base VTKFunction │ │ │ │ │ +34 // │ │ │ │ │ +35 │ │ │ │ │ +40 template< class GridView > │ │ │ │ │ +_4_1 class _V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +42 { │ │ │ │ │ +43 public: │ │ │ │ │ +_4_4 typedef typename _G_r_i_d_V_i_e_w_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ +_4_5 constexpr static int _d_i_m = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +_4_6 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity _E_n_t_i_t_y; │ │ │ │ │ +47 │ │ │ │ │ +_5_0 virtual int _n_c_o_m_p_s () const = 0; │ │ │ │ │ 51 │ │ │ │ │ -_5_7 void _p_a_r_t_i_t_i_o_n (const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, int overlap) const │ │ │ │ │ -final │ │ │ │ │ -58 { │ │ │ │ │ -59 double opt=1E100; │ │ │ │ │ -60 _i_T_u_p_e_l trydims; │ │ │ │ │ -61 │ │ │ │ │ -62 trydims.fill(-1); │ │ │ │ │ -63 dims.fill(-1); │ │ │ │ │ -64 │ │ │ │ │ -65 optimize_dims(d-1,size,P,dims,trydims,opt,overlap); │ │ │ │ │ -66 if (dims[0] == -1) │ │ │ │ │ -67 DUNE_THROW(_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r, "Failed to find a suitable partition"); │ │ │ │ │ -68 } │ │ │ │ │ +53 │ │ │ │ │ +_6_0 virtual double _e_v_a_l_u_a_t_e (int comp, const _E_n_t_i_t_y& e, │ │ │ │ │ +61 const Dune::FieldVector& xi) const = 0; │ │ │ │ │ +62 │ │ │ │ │ +_6_4 virtual std::string _n_a_m_e () const = 0; │ │ │ │ │ +65 │ │ │ │ │ +_6_7 virtual _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const │ │ │ │ │ +68 { return _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2; } │ │ │ │ │ 69 │ │ │ │ │ -70 private: │ │ │ │ │ -71 void optimize_dims (int i, const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, _i_T_u_p_e_l& │ │ │ │ │ -trydims, double &opt, int overlap ) const │ │ │ │ │ -72 { │ │ │ │ │ -73 if (i>0) // test all subdivisions recursively │ │ │ │ │ -74 { │ │ │ │ │ -75 for (int k=1; k<=P; k++) │ │ │ │ │ -76 if ( │ │ │ │ │ -77 P%k==0 // k devides P │ │ │ │ │ -78 and ( │ │ │ │ │ -79 k == 1 // no neighbors │ │ │ │ │ -80 or │ │ │ │ │ -81 size[i] / k >= 2*overlap // size sufficient for overlap │ │ │ │ │ -82 ) │ │ │ │ │ -83 ) │ │ │ │ │ -84 { │ │ │ │ │ -85 // P divisible by k │ │ │ │ │ -86 trydims[i] = k; │ │ │ │ │ -87 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap); │ │ │ │ │ -88 } │ │ │ │ │ -89 } │ │ │ │ │ -90 else │ │ │ │ │ -91 { │ │ │ │ │ -92 // found a possible combination │ │ │ │ │ -93 if ( │ │ │ │ │ -94 P == 1 // no neighbors │ │ │ │ │ -95 or │ │ │ │ │ -96 size[0] / P >= 2*overlap // size sufficient for overlap │ │ │ │ │ -97 ) │ │ │ │ │ -98 trydims[0] = P; │ │ │ │ │ -99 else │ │ │ │ │ -100 return; │ │ │ │ │ -101 │ │ │ │ │ -102 // check for optimality │ │ │ │ │ -103 double m = -1.0; │ │ │ │ │ -104 │ │ │ │ │ -105 for (int k=0; k0.0001) mm*=3; │ │ │ │ │ -109 if ( mm > m ) m = mm; │ │ │ │ │ -110 } │ │ │ │ │ -111 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims │ │ │ │ │ -<< " norm=" << m << std::endl; │ │ │ │ │ -112 if (m │ │ │ │ │ -_1_2_4 class _P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g : public _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -125 { │ │ │ │ │ -126 public: │ │ │ │ │ -_1_2_7 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -_1_2_8 virtual _~_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ -129 │ │ │ │ │ -_1_3_0 void _p_a_r_t_i_t_i_o_n (const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, int overlap) const │ │ │ │ │ -final │ │ │ │ │ +_7_1 virtual _~_V_T_K_F_u_n_c_t_i_o_n () {} │ │ │ │ │ +72 }; │ │ │ │ │ +73 │ │ │ │ │ +75 // │ │ │ │ │ +76 // P0VTKFunction │ │ │ │ │ +77 // │ │ │ │ │ +78 │ │ │ │ │ +80 │ │ │ │ │ +94 template │ │ │ │ │ +_9_5 class _P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +96 : public _V_T_K_F_u_n_c_t_i_o_n< GV > │ │ │ │ │ +97 { │ │ │ │ │ +99 typedef _V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _B_a_s_e; │ │ │ │ │ +101 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ │ +102 │ │ │ │ │ +104 const V& v; │ │ │ │ │ +106 std::string s; │ │ │ │ │ +108 int ncomps_; │ │ │ │ │ +111 int mycomp_; │ │ │ │ │ +113 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec_; │ │ │ │ │ +115 _M_a_p_p_e_r mapper; │ │ │ │ │ +116 │ │ │ │ │ +117 public: │ │ │ │ │ +_1_1_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_1_1_9 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ +120 using _B_a_s_e_:_:_d_i_m; │ │ │ │ │ +121 │ │ │ │ │ +_1_2_3 int _n_c_o_m_p_s () const override │ │ │ │ │ +124 { │ │ │ │ │ +125 return 1; │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_9 double _e_v_a_l_u_a_t_e (int, const _E_n_t_i_t_y& e, │ │ │ │ │ +130 const Dune::FieldVector&) const override │ │ │ │ │ 131 { │ │ │ │ │ -132 for (int i=1; i<=P; ++i) │ │ │ │ │ -133 if (Dune::power(i, d) == P) { │ │ │ │ │ -134 std::fill(dims.begin(), dims.end(),i); │ │ │ │ │ -135 return; │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Power partitioning failed: your number of processes │ │ │ │ │ -needs to be a " << d << "-th power."); │ │ │ │ │ +132 return v[mapper._i_n_d_e_x(e)*ncomps_+mycomp_]; │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +_1_3_6 std::string _n_a_m_e () const override │ │ │ │ │ +137 { │ │ │ │ │ +138 return s; │ │ │ │ │ 139 } │ │ │ │ │ -140 }; │ │ │ │ │ -141 │ │ │ │ │ -146 template │ │ │ │ │ -_1_4_7 class _F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g : public _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -148 { │ │ │ │ │ -149 public: │ │ │ │ │ -_1_5_0 _F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g(const std::array& dims) : _dims(dims) {} │ │ │ │ │ -151 │ │ │ │ │ -_1_5_2 virtual _~_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ -153 │ │ │ │ │ -_1_5_4 void _p_a_r_t_i_t_i_o_n(const std::array&, int P, std::array& dims, │ │ │ │ │ -int overlap) const final │ │ │ │ │ -155 { │ │ │ │ │ -156 int prod = 1; │ │ │ │ │ -157 for (int i=0; i _dims; │ │ │ │ │ -166 }; │ │ │ │ │ -167 │ │ │ │ │ -169 } │ │ │ │ │ -170 │ │ │ │ │ -174 template │ │ │ │ │ -_1_7_5 class _Y_L_o_a_d_B_a_l_a_n_c_e : public _Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -176 { │ │ │ │ │ -177 public: │ │ │ │ │ -_1_7_8 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -179 [[deprecated("use the new interface of Yasp::Partitioning")]] │ │ │ │ │ -_1_8_0 virtual _~_Y_L_o_a_d_B_a_l_a_n_c_e() {} │ │ │ │ │ -_1_8_1 void _p_a_r_t_i_t_i_o_n (const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims, int overlap) const │ │ │ │ │ -final { │ │ │ │ │ -182 this->_l_o_a_d_b_a_l_a_n_c_e(size,P,dims); │ │ │ │ │ -183 } │ │ │ │ │ -_1_8_4 virtual void _l_o_a_d_b_a_l_a_n_c_e(const _i_T_u_p_e_l&, int, _i_T_u_p_e_l&) const = 0; │ │ │ │ │ -185 }; │ │ │ │ │ +140 │ │ │ │ │ +_1_4_2 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const override │ │ │ │ │ +143 { │ │ │ │ │ +144 return prec_; │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +148 │ │ │ │ │ +_1_6_5 _P_0_V_T_K_F_u_n_c_t_i_o_n(const GV &gv, const V &v_, const std::string &s_, │ │ │ │ │ +166 int _n_c_o_m_p_s=1, int mycomp=0, _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +167 : v( v_ ), │ │ │ │ │ +168 s( s_ ), │ │ │ │ │ +169 ncomps_(_n_c_o_m_p_s), │ │ │ │ │ +170 mycomp_(mycomp), │ │ │ │ │ +171 prec_(prec), │ │ │ │ │ +172 mapper( gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t() ) │ │ │ │ │ +173 { │ │ │ │ │ +174 if (v.size()!=(unsigned int)(mapper._s_i_z_e()*ncomps_)) │ │ │ │ │ +175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch"); │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 virtual _~_P_0_V_T_K_F_u_n_c_t_i_o_n() {} │ │ │ │ │ +180 }; │ │ │ │ │ +181 │ │ │ │ │ +183 // │ │ │ │ │ +184 // P1VTKFunction │ │ │ │ │ +185 // │ │ │ │ │ 186 │ │ │ │ │ -187DUNE_NO_DEPRECATED_BEGIN │ │ │ │ │ -188 template │ │ │ │ │ -_1_8_9 class _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d : public _Y_L_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ -190 { │ │ │ │ │ -191 std::unique_ptr> p_; │ │ │ │ │ -192 public: │ │ │ │ │ -_1_9_3 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -_1_9_4 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(std::unique_ptr<_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_<_d_>> && p) : p_(_s_t_d:: │ │ │ │ │ -move(p)) {} │ │ │ │ │ -_1_9_5 virtual _~_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d() {} │ │ │ │ │ -_1_9_6 void _l_o_a_d_b_a_l_a_n_c_e(const _i_T_u_p_e_l& size, int P, _i_T_u_p_e_l& dims) const final { │ │ │ │ │ -197 return p_->partition(size,P,dims,1); // assuming the usual overlap of 1 │ │ │ │ │ -198 } │ │ │ │ │ -199 }; │ │ │ │ │ -200 │ │ │ │ │ -204 template │ │ │ │ │ -_2_0_5 class _Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t : public _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ -206 { │ │ │ │ │ -207 public: │ │ │ │ │ -_2_0_8 _Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t() : │ │ │ │ │ -209 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(_s_t_d::make_unique>()) │ │ │ │ │ -210 {} │ │ │ │ │ -211 }; │ │ │ │ │ -212 │ │ │ │ │ -216 template │ │ │ │ │ -_2_1_7 class _Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D : public _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ -218 { │ │ │ │ │ -219 public: │ │ │ │ │ -_2_2_0 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -_2_2_1 _Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D() : │ │ │ │ │ -222 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(_s_t_d::make_unique>()) │ │ │ │ │ -223 {} │ │ │ │ │ -224 }; │ │ │ │ │ -225 │ │ │ │ │ -231 template │ │ │ │ │ -_2_3_2 class _Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r : public _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ -233 { │ │ │ │ │ -234 public: │ │ │ │ │ -_2_3_5 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -_2_3_6 _Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r(const std::array& dims) : │ │ │ │ │ -237 _Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d(_s_t_d::make_unique> │ │ │ │ │ -(dims)) │ │ │ │ │ -238 {} │ │ │ │ │ -239 }; │ │ │ │ │ -240 │ │ │ │ │ -241DUNE_NO_DEPRECATED_END │ │ │ │ │ -242} │ │ │ │ │ -243 │ │ │ │ │ -244#endif │ │ │ │ │ -_s_t_d │ │ │ │ │ -STL namespace. │ │ │ │ │ +188 │ │ │ │ │ +202 template │ │ │ │ │ +_2_0_3 class _P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +204 : public _V_T_K_F_u_n_c_t_i_o_n< GV > │ │ │ │ │ +205 { │ │ │ │ │ +207 typedef _V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _B_a_s_e; │ │ │ │ │ +209 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ │ +210 │ │ │ │ │ +212 const V& v; │ │ │ │ │ +214 std::string s; │ │ │ │ │ +216 int ncomps_; │ │ │ │ │ +219 int mycomp_; │ │ │ │ │ +221 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec_; │ │ │ │ │ +223 _M_a_p_p_e_r mapper; │ │ │ │ │ +224 │ │ │ │ │ +225 public: │ │ │ │ │ +_2_2_6 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_2_2_7 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ +228 using _B_a_s_e_:_:_d_i_m; │ │ │ │ │ +229 │ │ │ │ │ +_2_3_1 int _n_c_o_m_p_s () const override │ │ │ │ │ +232 { │ │ │ │ │ +233 return 1; │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +_2_3_7 double _e_v_a_l_u_a_t_e ([[maybe_unused]] int comp, const _E_n_t_i_t_y& e, │ │ │ │ │ +238 const Dune::FieldVector& xi) const override │ │ │ │ │ +239 { │ │ │ │ │ +240 const unsigned int myDim = _E_n_t_i_t_y_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +241 const unsigned int nVertices = e.subEntities(_d_i_m); │ │ │ │ │ +242 │ │ │ │ │ +243 std::vector > cornerValues(nVertices); │ │ │ │ │ +244 for (unsigned i=0; i interpolation(e.type(), │ │ │ │ │ +cornerValues); │ │ │ │ │ +249 return interpolation.global(xi); │ │ │ │ │ +250 } │ │ │ │ │ +251 │ │ │ │ │ +_2_5_3 std::string _n_a_m_e () const override │ │ │ │ │ +254 { │ │ │ │ │ +255 return s; │ │ │ │ │ +256 } │ │ │ │ │ +257 │ │ │ │ │ +_2_5_9 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const override │ │ │ │ │ +260 { │ │ │ │ │ +261 return prec_; │ │ │ │ │ +262 } │ │ │ │ │ +263 │ │ │ │ │ +265 │ │ │ │ │ +_2_8_2 _P_1_V_T_K_F_u_n_c_t_i_o_n(const GV& gv, const V &v_, const std::string &s_, │ │ │ │ │ +283 int _n_c_o_m_p_s=1, int mycomp=0, _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +284 : v( v_ ), │ │ │ │ │ +285 s( s_ ), │ │ │ │ │ +286 ncomps_(_n_c_o_m_p_s), │ │ │ │ │ +287 mycomp_(mycomp), │ │ │ │ │ +288 prec_(prec), │ │ │ │ │ +289 mapper( gv, _m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t() ) │ │ │ │ │ +290 { │ │ │ │ │ +291 if (v.size()!=(unsigned int)(mapper._s_i_z_e()*ncomps_)) │ │ │ │ │ +292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch"); │ │ │ │ │ +293 } │ │ │ │ │ +294 │ │ │ │ │ +_2_9_6 virtual _~_P_1_V_T_K_F_u_n_c_t_i_o_n() {} │ │ │ │ │ +297 }; │ │ │ │ │ +298 │ │ │ │ │ +300 │ │ │ │ │ +301} // namespace Dune │ │ │ │ │ +302 │ │ │ │ │ +303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ │ +_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ +Mapper for multiple codim and multiple geometry types. │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +The dimension of the grid. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_c_t_y_p_e │ │ │ │ │ +Grid::ctype ctype │ │ │ │ │ +type used for coordinates in grid │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgElementLayout() │ │ │ │ │ +layout for elements (codim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t │ │ │ │ │ +MCMGLayout mcmgVertexLayout() │ │ │ │ │ +layout for vertices (dim-0 entities) │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:107 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ -Base class for exceptions in Dune grid modules. │ │ │ │ │ -DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -a base class for the yaspgrid partitioning strategy │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_~_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -virtual ~Partitioning()=default │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -virtual void partition(const iTupel &, int, iTupel &, int) const =0 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -void partition(const iTupel &size, int P, iTupel &dims, int overlap) const │ │ │ │ │ -final │ │ │ │ │ -Distribute a structured grid across a set of processors. │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_:_:_~_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -virtual ~PowerDPartitioning() │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -void partition(const iTupel &size, int P, iTupel &dims, int overlap) const │ │ │ │ │ -final │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -Implement partitioner that gets a fixed partitioning from an array If the given │ │ │ │ │ -partitioning doesn't ... │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, │ │ │ │ │ -int overlap) const final │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -FixedSizePartitioning(const std::array< int, d > &dims) │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_:_:_~_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -virtual ~FixedSizePartitioning() │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ -a base class for the yaspgrid partitioning strategy │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:176 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_p_a_r_t_i_t_i_o_n │ │ │ │ │ -void partition(const iTupel &size, int P, iTupel &dims, int overlap) const │ │ │ │ │ -final │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:181 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_l_o_a_d_b_a_l_a_n_c_e │ │ │ │ │ -virtual void loadbalance(const iTupel &, int, iTupel &) const =0 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_~_Y_L_o_a_d_B_a_l_a_n_c_e │ │ │ │ │ -virtual ~YLoadBalance() │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:180 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:178 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:190 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_l_o_a_d_b_a_l_a_n_c_e │ │ │ │ │ -void loadbalance(const iTupel &size, int P, iTupel &dims) const final │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ -YLoadBalanceForward(std::unique_ptr< Yasp::Partitioning< d > > &&p) │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:194 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_~_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d │ │ │ │ │ -virtual ~YLoadBalanceForward() │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_F_o_r_w_a_r_d_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:193 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t │ │ │ │ │ -Implement the default load balance strategy of yaspgrid. │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:206 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_D_e_f_a_u_l_t │ │ │ │ │ -YLoadBalanceDefault() │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:208 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D │ │ │ │ │ -Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:218 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D_:_:_Y_L_o_a_d_B_a_l_a_n_c_e_P_o_w_e_r_D │ │ │ │ │ -YLoadBalancePowerD() │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:221 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r │ │ │ │ │ -Implement partitioner that gets a fixed partitioning from an array If the given │ │ │ │ │ -partitioning doesn't ... │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:233 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r │ │ │ │ │ -YaspFixedSizePartitioner(const std::array< int, d > &dims) │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_e_r_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:235 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ +@ float32 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int mydimension │ │ │ │ │ +Dimensionality of the reference element of the entity. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ +A struct that collects all associated types of one implementation from the │ │ │ │ │ +Traits class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ +Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ +size_type size() const │ │ │ │ │ +Return total number of entities in the entity set managed by the mapper. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:204 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ +unsigned int codim) const │ │ │ │ │ +Map subentity of codim 0 entity to starting index in array for dof block. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ +Index index(const EntityType &e) const │ │ │ │ │ +Map entity to starting index in array for dof block. │ │ │ │ │ +DDeeffiinniittiioonn mcmgmapper.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +A base class for grid functions with any return type and dimension. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< │ │ │ │ │ +ctype, dim > &xi) const =0 │ │ │ │ │ +evaluate single component comp in the entity e at local coordinates xi │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ +GridView::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn function.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ +GridView::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn function.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_d_i_m │ │ │ │ │ +static constexpr int dim │ │ │ │ │ +DDeeffiinniittiioonn function.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const =0 │ │ │ │ │ +get name │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ +virtual VTK::Precision precision() const │ │ │ │ │ +get output precision for the field │ │ │ │ │ +DDeeffiinniittiioonn function.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual int ncomps() const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_~_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +virtual ~VTKFunction() │ │ │ │ │ +virtual destructor │ │ │ │ │ +DDeeffiinniittiioonn function.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ +std::string name() const override │ │ │ │ │ +get name │ │ │ │ │ +DDeeffiinniittiioonn function.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ +Base::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn function.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) │ │ │ │ │ +const override │ │ │ │ │ +evaluate │ │ │ │ │ +DDeeffiinniittiioonn function.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, │ │ │ │ │ +int mycomp=0, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +construct from a vector and a name │ │ │ │ │ +DDeeffiinniittiioonn function.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ +VTK::Precision precision() const override │ │ │ │ │ +get output precision for the field │ │ │ │ │ +DDeeffiinniittiioonn function.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn function.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_~_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +virtual ~P0VTKFunction() │ │ │ │ │ +destructor │ │ │ │ │ +DDeeffiinniittiioonn function.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ │ +int ncomps() const override │ │ │ │ │ +return number of components │ │ │ │ │ +DDeeffiinniittiioonn function.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn function.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ +std::string name() const override │ │ │ │ │ +get name │ │ │ │ │ +DDeeffiinniittiioonn function.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_~_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +virtual ~P1VTKFunction() │ │ │ │ │ +destructor │ │ │ │ │ +DDeeffiinniittiioonn function.hh:296 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn function.hh:226 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ +Base::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn function.hh:227 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ +VTK::Precision precision() const override │ │ │ │ │ +get output precision for the field │ │ │ │ │ +DDeeffiinniittiioonn function.hh:259 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim │ │ │ │ │ +> &xi) const override │ │ │ │ │ +evaluate │ │ │ │ │ +DDeeffiinniittiioonn function.hh:237 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ +P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, │ │ │ │ │ +int mycomp=0, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +construct from a vector and a name │ │ │ │ │ +DDeeffiinniittiioonn function.hh:282 │ │ │ │ │ +_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ │ +int ncomps() const override │ │ │ │ │ +return number of components │ │ │ │ │ +DDeeffiinniittiioonn function.hh:231 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00236.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00344.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
adaptcallback.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid │ │ │ │ More...

│ │ │ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00236_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00344_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
adaptcallback.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_COMMON_ADAPTCALLBACK_HH
│ │ │ │
6#define DUNE_GRID_COMMON_ADAPTCALLBACK_HH
│ │ │ │
7
│ │ │ │
14namespace Dune
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00251.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00293.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
exceptions.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <dune/common/exceptions.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::AdaptDataHandleInterface< Grid, Impl >
 Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface. More...
 
class  Dune::AdaptDataHandle< Grid, Impl >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::GridError
 Base class for exceptions in Dune grid modules. More...
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
exceptions.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH
│ │ │ │
6#define DUNE_GRID_COMMON_EXCEPTIONS_HH
│ │ │ │
7
│ │ │ │
8#include <dune/common/exceptions.hh>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00260.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html │ │ │ │┄ Files 11% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: scsgmapper.hh File Reference │ │ │ │ +dune-grid: boundaryprojection.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,47 +72,45 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
scsgmapper.hh File Reference
│ │ │ │ +
boundaryprojection.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Mapper classes are used to attach data to a grid. │ │ │ │ -More...

│ │ │ │ -
#include <iostream>
│ │ │ │ -#include "mapper.hh"
│ │ │ │ -#include <dune/grid/common/grid.hh>
│ │ │ │ +
#include <cmath>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/geometry/multilineargeometry.hh>
│ │ │ │ +#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::SingleCodimSingleGeomTypeMapper< GV, c >
 Implementation class for a single codim and single geometry type mapper. More...
struct  Dune::DuneBoundaryProjection< dimworld >
 Interface class for vertex projection at the boundary. More...
 
class  Dune::BoundaryProjectionWrapper< dimworld >
 
class  Dune::LeafSingleCodimSingleGeomTypeMapper< G, c >
 Single codim and single geometry type mapper for leaf entities. More...
class  Dune::BoundarySegmentWrapper< dim, dimworld >
 
class  Dune::LevelSingleCodimSingleGeomTypeMapper< G, c >
 Single codim and single geometry type mapper for entities of one level. More...
struct  Dune::CircleBoundaryProjection< dimworld >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Mapper classes are used to attach data to a grid.

│ │ │ │ -
Author
Peter Bastian
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,35 +2,32 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -scsgmapper.hh File Reference │ │ │ │ │ -Mapper classes are used to attach data to a grid. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include "_m_a_p_p_e_r_._h_h" │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +boundaryprojection.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_d_a_t_a_h_a_n_d_l_e_i_f_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_V_,_ _c_ _> │ │ │ │ │ -  Implementation class for a single codim and single geometry type │ │ │ │ │ - mapper. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_u_n_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +  Interface class for vertex projection at the boundary. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_,_ _c_ _> │ │ │ │ │ -  Single codim and single geometry type mapper for leaf entities. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_W_r_a_p_p_e_r_<_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_,_ _c_ _> │ │ │ │ │ -  Single codim and single geometry type mapper for entities of one level. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_W_r_a_p_p_e_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_C_i_r_c_l_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Mapper classes are used to attach data to a grid. │ │ │ │ │ - Author │ │ │ │ │ - Peter Bastian │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00260_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00239_source.html │ │ │ │┄ Files 16% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: scsgmapper.hh Source File │ │ │ │ +dune-grid: gridenums.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,208 +74,165 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
scsgmapper.hh
│ │ │ │ +
gridenums.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_SCSGMAPPER_HH
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_GRIDENUMS_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_GRIDENUMS_HH
│ │ │ │
7
│ │ │ │
8#include <iostream>
│ │ │ │ -
9#include "mapper.hh"
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
37 template <typename GV, int c>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 public Mapper<typename GV::Grid,SingleCodimSingleGeomTypeMapper<GV,c>, typename GV::IndexSet::IndexType >
│ │ │ │ -
40 {
│ │ │ │ -
41 public:
│ │ │ │ -
42
│ │ │ │ -
44 typedef typename GV::IndexSet::IndexType Index;
│ │ │ │ -
45
│ │ │ │ -
50 using size_type = decltype(std::declval<typename GV::IndexSet>().size(0));
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 : gridView_(gridView)
│ │ │ │ -
58 , indexSet_(&gridView_.indexSet())
│ │ │ │ -
59 {
│ │ │ │ -
60 // check that grid has only a single geometry type
│ │ │ │ -
61 if (indexSet_->types(c).size() != 1)
│ │ │ │ -
62 DUNE_THROW(GridError, "mapper treats only a single codim and a single geometry type");
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
70 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
71 Index index (const EntityType& e) const
│ │ │ │ -
72 {
│ │ │ │ -
73 static_assert(EntityType::codimension == c, "Entity of wrong codim passed to SingleCodimSingleGeomTypeMapper");
│ │ │ │ -
74 return indexSet_->index(e);
│ │ │ │ -
75 }
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/exceptions.hh>
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune {
│ │ │ │ +
13
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
36 };
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
46 inline std::string PartitionName(PartitionType type)
│ │ │ │ +
47 {
│ │ │ │ +
48 switch(type) {
│ │ │ │ +
49 case InteriorEntity :
│ │ │ │ +
50 return "interior";
│ │ │ │ +
51 case BorderEntity :
│ │ │ │ +
52 return "border";
│ │ │ │ +
53 case OverlapEntity :
│ │ │ │ +
54 return "overlap";
│ │ │ │ +
55 case FrontEntity :
│ │ │ │ +
56 return "front";
│ │ │ │ +
57 case GhostEntity :
│ │ │ │ +
58 return "ghost";
│ │ │ │ +
59 default :
│ │ │ │ +
60 DUNE_THROW(NotImplemented, "name of unknown partition type requested");
│ │ │ │ +
61 }
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
72 inline std::ostream &operator<< ( std::ostream &out, const PartitionType &type )
│ │ │ │ +
73 {
│ │ │ │ +
74 return out << PartitionName( type );
│ │ │ │ +
75 }
│ │ │ │
│ │ │ │
76
│ │ │ │ -
│ │ │ │ -
84 Index subIndex (const typename GV::template Codim<0>::Entity& e,
│ │ │ │ -
85 int i, unsigned int codim) const
│ │ │ │ -
86 {
│ │ │ │ -
87 if (codim != c)
│ │ │ │ -
88 DUNE_THROW(GridError, "Id of wrong codim requested from SingleCodimSingleGeomTypeMapper");
│ │ │ │ -
89 return indexSet_->subIndex(e,i,codim);
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
101 {
│ │ │ │ -
102 return indexSet_->size(c);
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
111 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
112 bool contains (const EntityType& e, Index& result) const
│ │ │ │ -
113 {
│ │ │ │ -
114 result = index(e);
│ │ │ │ -
115 return true;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ -
126 bool contains (const typename GV::template Codim<0>::Entity& e, int i, int cc, Index& result) const
│ │ │ │ -
127 {
│ │ │ │ -
128 result = subIndex(e,i,cc);
│ │ │ │ -
129 return true;
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
│ │ │ │ -
137 void update (const GV& gridView)
│ │ │ │ -
138 {
│ │ │ │ -
139 gridView_ = gridView;
│ │ │ │ -
140 indexSet_ = &gridView_.indexSet();
│ │ │ │ -
141 }
│ │ │ │ -
│ │ │ │ -
142
│ │ │ │ -
│ │ │ │ -
148 void update (GV&& gridView)
│ │ │ │ -
149 {
│ │ │ │ -
150 gridView_ = std::move(gridView);
│ │ │ │ -
151 indexSet_ = &gridView_.indexSet();
│ │ │ │ -
152 }
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
156 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8.")]]
│ │ │ │ -
│ │ │ │ -
157 void update ()
│ │ │ │ -
158 { // nothing to do here
│ │ │ │ -
159 }
│ │ │ │ +
77
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
92 };
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
94
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ +
103 inline std::ostream &operator<< ( std::ostream &out, const InterfaceType &type )
│ │ │ │ +
104 {
│ │ │ │ +
105 switch( type )
│ │ │ │ +
106 {
│ │ │ │ + │ │ │ │ +
108 return out << "interior-border / interior-border interface";
│ │ │ │ +
109
│ │ │ │ + │ │ │ │ +
111 return out << "interior-border / all interface";
│ │ │ │ +
112
│ │ │ │ + │ │ │ │ +
114 return out << "overlap / overlap-front interface";
│ │ │ │ +
115
│ │ │ │ + │ │ │ │ +
117 return out << "overlap / all interface";
│ │ │ │ +
118
│ │ │ │ +
119 case All_All_Interface :
│ │ │ │ +
120 return out << "all / all interface";
│ │ │ │ +
121
│ │ │ │ +
122 default :
│ │ │ │ +
123 return out << "unknown interface";
│ │ │ │ +
124 }
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
127
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
143 };
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
145
│ │ │ │ +
147
│ │ │ │ +
│ │ │ │ +
154 inline std::ostream &operator<< ( std::ostream &out, const PartitionIteratorType &type )
│ │ │ │ +
155 {
│ │ │ │ +
156 static std::string name[ 6 ] = { "interior partition", "interior-border partition", "overlap partition",
│ │ │ │ +
157 "overlap-front partition", "all partition", "ghost partition" };
│ │ │ │ +
158 return out << name[ type ];
│ │ │ │ +
159 }
│ │ │ │
│ │ │ │
160
│ │ │ │ -
161 private:
│ │ │ │ -
162 GV gridView_;
│ │ │ │ -
163 const typename GV::IndexSet* indexSet_;
│ │ │ │ -
164 };
│ │ │ │ -
│ │ │ │ -
165
│ │ │ │ -
184 template <typename G, int c>
│ │ │ │ -
│ │ │ │ -
185 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
│ │ │ │ -
186 LeafSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LeafGridView,c> {
│ │ │ │ - │ │ │ │ -
188 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
193 : Base(grid.leafGridView())
│ │ │ │ -
194 , gridPtr_(&grid)
│ │ │ │ -
195 {}
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
│ │ │ │ -
202 void update ()
│ │ │ │ -
203 {
│ │ │ │ -
204 Base::update(gridPtr_->leafGridView());
│ │ │ │ -
205 }
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
207 private:
│ │ │ │ -
208 const G* gridPtr_;
│ │ │ │ -
209 };
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
222 template <typename G, int c>
│ │ │ │ -
│ │ │ │ -
223 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
│ │ │ │ -
224 LevelSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LevelGridView,c> {
│ │ │ │ - │ │ │ │ -
226 public:
│ │ │ │ -
227 /* @brief The constructor
│ │ │ │ -
228 @param grid A reference to a grid.
│ │ │ │ -
229 @param level A valid level of the grid.
│ │ │ │ -
230 */
│ │ │ │ -
│ │ │ │ -
231 LevelSingleCodimSingleGeomTypeMapper (const G& grid, int level)
│ │ │ │ -
232 : Base(grid.levelGridView(level))
│ │ │ │ -
233 , gridPtr_(&grid)
│ │ │ │ -
234 , level_(level)
│ │ │ │ -
235 {}
│ │ │ │ -
│ │ │ │ -
236
│ │ │ │ -
│ │ │ │ -
242 void update ()
│ │ │ │ -
243 {
│ │ │ │ -
244 Base::update(gridPtr_->levelGridView(level_));
│ │ │ │ -
245 }
│ │ │ │ -
│ │ │ │ -
246
│ │ │ │ -
247 private:
│ │ │ │ -
248 const G* gridPtr_;
│ │ │ │ -
249 int level_;
│ │ │ │ -
250 };
│ │ │ │ -
│ │ │ │ -
251
│ │ │ │ -
253}
│ │ │ │ -
254#endif
│ │ │ │ -
Provides classes with basic mappers which are used to attach data to a grid.
│ │ │ │ -
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │ -
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │ +
161
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
173 };
│ │ │ │ +
│ │ │ │ +
174
│ │ │ │ +
180}
│ │ │ │ +
181#endif
│ │ │ │ +
std::string PartitionName(PartitionType type)
Provide names for the partition types.
Definition gridenums.hh:46
│ │ │ │ +
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │ +
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ +
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │ +
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │ +
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ │ +
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition gridenums.hh:140
│ │ │ │ +
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ │ +
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ │ +
@ Overlap_Partition
interior, border, and overlap entities
Definition gridenums.hh:139
│ │ │ │ +
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │ +
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ │ +
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ +
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ +
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ +
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │ +
@ BackwardCommunication
reverse communication direction
Definition gridenums.hh:172
│ │ │ │ +
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
│ │ │ │ +
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
│ │ │ │ +
@ All_All_Interface
send all and receive all entities
Definition gridenums.hh:91
│ │ │ │ +
@ Overlap_All_Interface
send overlap, receive all entities
Definition gridenums.hh:90
│ │ │ │ +
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition gridenums.hh:89
│ │ │ │ +
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition gridenums.hh:87
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ -
Mapper interface.
Definition mapper.hh:110
│ │ │ │ -
Implementation class for a single codim and single geometry type mapper.
Definition scsgmapper.hh:40
│ │ │ │ -
bool contains(const EntityType &e, Index &result) const
Returns true if the entity is contained in the index set.
Definition scsgmapper.hh:112
│ │ │ │ -
GV::IndexSet::IndexType Index
Number type used for indices.
Definition scsgmapper.hh:44
│ │ │ │ -
bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc, Index &result) const
Returns true if the entity is contained in the index set.
Definition scsgmapper.hh:126
│ │ │ │ -
decltype(std::declval< typename GV::IndexSet >().size(0)) size_type
Number type used for the overall size (the return value of the 'size' method)
Definition scsgmapper.hh:50
│ │ │ │ -
Index index(const EntityType &e) const
Map entity to array index.
Definition scsgmapper.hh:71
│ │ │ │ -
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to array index.
Definition scsgmapper.hh:84
│ │ │ │ -
SingleCodimSingleGeomTypeMapper(const GV &gridView)
Construct mapper from grid and one of its index sets.
Definition scsgmapper.hh:56
│ │ │ │ -
void update(GV &&gridView)
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:148
│ │ │ │ -
size_type size() const
Return total number of entities in the entity set managed by the mapper.
Definition scsgmapper.hh:100
│ │ │ │ -
void update()
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:157
│ │ │ │ -
void update(const GV &gridView)
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:137
│ │ │ │ -
Single codim and single geometry type mapper for leaf entities.
Definition scsgmapper.hh:186
│ │ │ │ -
LeafSingleCodimSingleGeomTypeMapper(const G &grid)
The constructor.
Definition scsgmapper.hh:192
│ │ │ │ -
void update()
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:202
│ │ │ │ -
Single codim and single geometry type mapper for entities of one level.
Definition scsgmapper.hh:224
│ │ │ │ -
LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)
Definition scsgmapper.hh:231
│ │ │ │ -
void update()
Recalculates indices after grid adaptation.
Definition scsgmapper.hh:242
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,250 +1,222 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -scsgmapper.hh │ │ │ │ │ +gridenums.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_SCSGMAPPER_HH │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_GRIDENUMS_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_GRIDENUMS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include "_m_a_p_p_e_r_._h_h" │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -37 template │ │ │ │ │ -_3_8 class _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r : │ │ │ │ │ -39 public _M_a_p_p_e_r, │ │ │ │ │ -typename GV::IndexSet::IndexType > │ │ │ │ │ -40 { │ │ │ │ │ -41 public: │ │ │ │ │ -42 │ │ │ │ │ -_4_4 typedef typename GV::IndexSet::IndexType _I_n_d_e_x; │ │ │ │ │ -45 │ │ │ │ │ -_5_0 using _s_i_z_e___t_y_p_e = decltype(std::declval().size(0)); │ │ │ │ │ -51 │ │ │ │ │ -_5_6 _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r (const GV& gridView) │ │ │ │ │ -57 : gridView_(gridView) │ │ │ │ │ -58 , indexSet_(&gridView_.indexSet()) │ │ │ │ │ -59 { │ │ │ │ │ -60 // check that grid has only a single geometry type │ │ │ │ │ -61 if (indexSet_->types(c).size() != 1) │ │ │ │ │ -62 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "mapper treats only a single codim and a single │ │ │ │ │ -geometry type"); │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -70 template │ │ │ │ │ -_7_1 _I_n_d_e_x _i_n_d_e_x (const EntityType& e) const │ │ │ │ │ -72 { │ │ │ │ │ -73 static_assert(EntityType::codimension == c, "Entity of wrong codim passed to │ │ │ │ │ -SingleCodimSingleGeomTypeMapper"); │ │ │ │ │ -74 return indexSet_->index(e); │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ │ +13 │ │ │ │ │ +_3_0 enum _P_a_r_t_i_t_i_o_n_T_y_p_e { │ │ │ │ │ +_3_1 _I_n_t_e_r_i_o_r_E_n_t_i_t_y=0, │ │ │ │ │ +_3_2 _B_o_r_d_e_r_E_n_t_i_t_y=1 , │ │ │ │ │ +_3_3 _O_v_e_r_l_a_p_E_n_t_i_t_y=2 , │ │ │ │ │ +_3_4 _F_r_o_n_t_E_n_t_i_t_y=3 , │ │ │ │ │ +35 _G_h_o_s_t_E_n_t_i_t_y=4 │ │ │ │ │ +_3_6 }; │ │ │ │ │ +37 │ │ │ │ │ +_4_6 inline std::string _P_a_r_t_i_t_i_o_n_N_a_m_e(_P_a_r_t_i_t_i_o_n_T_y_p_e type) │ │ │ │ │ +47 { │ │ │ │ │ +48 switch(type) { │ │ │ │ │ +49 case _I_n_t_e_r_i_o_r_E_n_t_i_t_y : │ │ │ │ │ +50 return "interior"; │ │ │ │ │ +51 case _B_o_r_d_e_r_E_n_t_i_t_y : │ │ │ │ │ +52 return "border"; │ │ │ │ │ +53 case _O_v_e_r_l_a_p_E_n_t_i_t_y : │ │ │ │ │ +54 return "overlap"; │ │ │ │ │ +55 case _F_r_o_n_t_E_n_t_i_t_y : │ │ │ │ │ +56 return "front"; │ │ │ │ │ +57 case _G_h_o_s_t_E_n_t_i_t_y : │ │ │ │ │ +58 return "ghost"; │ │ │ │ │ +59 default : │ │ │ │ │ +60 DUNE_THROW(NotImplemented, "name of unknown partition type requested"); │ │ │ │ │ +61 } │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +65 │ │ │ │ │ +_7_2 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +&type ) │ │ │ │ │ +73 { │ │ │ │ │ +74 return out << _P_a_r_t_i_t_i_o_n_N_a_m_e( type ); │ │ │ │ │ 75 } │ │ │ │ │ 76 │ │ │ │ │ -_8_4 _I_n_d_e_x _s_u_b_I_n_d_e_x (const typename GV::template Codim<0>::Entity& e, │ │ │ │ │ -85 int i, unsigned int codim) const │ │ │ │ │ -86 { │ │ │ │ │ -87 if (codim != c) │ │ │ │ │ -88 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Id of wrong codim requested from │ │ │ │ │ -SingleCodimSingleGeomTypeMapper"); │ │ │ │ │ -89 return indexSet_->subIndex(e,i,codim); │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -_1_0_0 _s_i_z_e___t_y_p_e _s_i_z_e () const │ │ │ │ │ -101 { │ │ │ │ │ -102 return indexSet_->size(c); │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -111 template │ │ │ │ │ -_1_1_2 bool _c_o_n_t_a_i_n_s (const EntityType& e, _I_n_d_e_x& result) const │ │ │ │ │ -113 { │ │ │ │ │ -114 result = _i_n_d_e_x(e); │ │ │ │ │ -115 return true; │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_2_6 bool _c_o_n_t_a_i_n_s (const typename GV::template Codim<0>::Entity& e, int i, int │ │ │ │ │ -cc, _I_n_d_e_x& result) const │ │ │ │ │ -127 { │ │ │ │ │ -128 result = _s_u_b_I_n_d_e_x(e,i,cc); │ │ │ │ │ -129 return true; │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -_1_3_7 void _u_p_d_a_t_e (const GV& gridView) │ │ │ │ │ -138 { │ │ │ │ │ -139 gridView_ = gridView; │ │ │ │ │ -140 indexSet_ = &gridView_.indexSet(); │ │ │ │ │ -141 } │ │ │ │ │ -142 │ │ │ │ │ -_1_4_8 void _u_p_d_a_t_e (GV&& gridView) │ │ │ │ │ -149 { │ │ │ │ │ -150 gridView_ = std::move(gridView); │ │ │ │ │ -151 indexSet_ = &gridView_.indexSet(); │ │ │ │ │ -152 } │ │ │ │ │ -153 │ │ │ │ │ -156 [[deprecated("Use update(gridView) instead! Will be removed after release │ │ │ │ │ -2.8.")]] │ │ │ │ │ -_1_5_7 void _u_p_d_a_t_e () │ │ │ │ │ -158 { // nothing to do here │ │ │ │ │ +77 │ │ │ │ │ +_8_6 enum _I_n_t_e_r_f_a_c_e_T_y_p_e { │ │ │ │ │ +_8_7 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e=0, │ │ │ │ │ +_8_8 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e=1, │ │ │ │ │ +_8_9 _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e=2, │ │ │ │ │ +_9_0 _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e=3, │ │ │ │ │ +91 _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e=4 │ │ │ │ │ +_9_2 }; │ │ │ │ │ +93 │ │ │ │ │ +94 │ │ │ │ │ +96 │ │ │ │ │ +_1_0_3 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ +&type ) │ │ │ │ │ +104 { │ │ │ │ │ +105 switch( type ) │ │ │ │ │ +106 { │ │ │ │ │ +107 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e : │ │ │ │ │ +108 return out << "interior-border / interior-border interface"; │ │ │ │ │ +109 │ │ │ │ │ +110 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ │ +111 return out << "interior-border / all interface"; │ │ │ │ │ +112 │ │ │ │ │ +113 case _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e : │ │ │ │ │ +114 return out << "overlap / overlap-front interface"; │ │ │ │ │ +115 │ │ │ │ │ +116 case _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ │ +117 return out << "overlap / all interface"; │ │ │ │ │ +118 │ │ │ │ │ +119 case _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ │ +120 return out << "all / all interface"; │ │ │ │ │ +121 │ │ │ │ │ +122 default : │ │ │ │ │ +123 return out << "unknown interface"; │ │ │ │ │ +124 } │ │ │ │ │ +125 } │ │ │ │ │ +126 │ │ │ │ │ +127 │ │ │ │ │ +_1_3_6 enum _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e { │ │ │ │ │ +_1_3_7 _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n=0, │ │ │ │ │ +_1_3_8 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n=1, │ │ │ │ │ +_1_3_9 _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n=2, │ │ │ │ │ +_1_4_0 _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n=3, │ │ │ │ │ +_1_4_1 _A_l_l___P_a_r_t_i_t_i_o_n=4, │ │ │ │ │ +142 _G_h_o_s_t___P_a_r_t_i_t_i_o_n=5 │ │ │ │ │ +_1_4_3 }; │ │ │ │ │ +144 │ │ │ │ │ +145 │ │ │ │ │ +147 │ │ │ │ │ +_1_5_4 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const │ │ │ │ │ +_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e &type ) │ │ │ │ │ +155 { │ │ │ │ │ +156 static std::string name[ 6 ] = { "interior partition", "interior-border │ │ │ │ │ +partition", "overlap partition", │ │ │ │ │ +157 "overlap-front partition", "all partition", "ghost partition" }; │ │ │ │ │ +158 return out << name[ type ]; │ │ │ │ │ 159 } │ │ │ │ │ 160 │ │ │ │ │ -161 private: │ │ │ │ │ -162 GV gridView_; │ │ │ │ │ -163 const typename GV::IndexSet* indexSet_; │ │ │ │ │ -164 }; │ │ │ │ │ -165 │ │ │ │ │ -184 template │ │ │ │ │ -_1_8_5 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be │ │ │ │ │ -removed after release 2.8.")]] │ │ │ │ │ -186 _L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r : public │ │ │ │ │ -_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r { │ │ │ │ │ -187 using _B_a_s_e = _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_t_y_p_e_n_a_m_e_ _G_:_:_L_e_a_f_G_r_i_d_V_i_e_w_,_c_>; │ │ │ │ │ -188 public: │ │ │ │ │ -_1_9_2 _L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r (const G& grid) │ │ │ │ │ -193 : _B_a_s_e(grid._l_e_a_f_G_r_i_d_V_i_e_w()) │ │ │ │ │ -194 , gridPtr_(&grid) │ │ │ │ │ -195 {} │ │ │ │ │ -196 │ │ │ │ │ -_2_0_2 void _u_p_d_a_t_e () │ │ │ │ │ -203 { │ │ │ │ │ -204 Base::update(gridPtr_->leafGridView()); │ │ │ │ │ -205 } │ │ │ │ │ -206 │ │ │ │ │ -207 private: │ │ │ │ │ -208 const G* gridPtr_; │ │ │ │ │ -209 }; │ │ │ │ │ -210 │ │ │ │ │ -222 template │ │ │ │ │ -_2_2_3 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be │ │ │ │ │ -removed after release 2.8.")]] │ │ │ │ │ -224 _L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r : public │ │ │ │ │ -_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r { │ │ │ │ │ -225 using _B_a_s_e = _S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_t_y_p_e_n_a_m_e_ _G_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w_,_c_>; │ │ │ │ │ -226 public: │ │ │ │ │ -227 /* @brief The constructor │ │ │ │ │ -228 @param grid A reference to a grid. │ │ │ │ │ -229 @param level A valid level of the grid. │ │ │ │ │ -230 */ │ │ │ │ │ -_2_3_1 _L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r (const G& grid, int level) │ │ │ │ │ -232 : _B_a_s_e(grid._l_e_v_e_l_G_r_i_d_V_i_e_w(level)) │ │ │ │ │ -233 , gridPtr_(&grid) │ │ │ │ │ -234 , level_(level) │ │ │ │ │ -235 {} │ │ │ │ │ -236 │ │ │ │ │ -_2_4_2 void _u_p_d_a_t_e () │ │ │ │ │ -243 { │ │ │ │ │ -244 Base::update(gridPtr_->levelGridView(level_)); │ │ │ │ │ -245 } │ │ │ │ │ -246 │ │ │ │ │ -247 private: │ │ │ │ │ -248 const G* gridPtr_; │ │ │ │ │ -249 int level_; │ │ │ │ │ -250 }; │ │ │ │ │ -251 │ │ │ │ │ -253} │ │ │ │ │ -254#endif │ │ │ │ │ -_m_a_p_p_e_r_._h_h │ │ │ │ │ -Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ -_D_u_n_e_:_:_l_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< │ │ │ │ │ -dim, dimworld, ct, GridFamily > &grid) │ │ │ │ │ -leaf grid view for the given grid │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:819 │ │ │ │ │ -_D_u_n_e_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< │ │ │ │ │ -dim, dimworld, ct, GridFamily > &grid, int level) │ │ │ │ │ -level grid view for the given grid and level. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:802 │ │ │ │ │ +161 │ │ │ │ │ +_1_7_0 enum _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n { │ │ │ │ │ +_1_7_1 _F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n, │ │ │ │ │ +172 _B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +_1_7_3 }; │ │ │ │ │ +174 │ │ │ │ │ +180} │ │ │ │ │ +181#endif │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_N_a_m_e │ │ │ │ │ +std::string PartitionName(PartitionType type) │ │ │ │ │ +Provide names for the partition types. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ │ +PartitionIteratorType │ │ │ │ │ +Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ │ +write a PartitionType to a stream │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ +PartitionType │ │ │ │ │ +Attributes used in the generic overlap model. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n │ │ │ │ │ +CommunicationDirection │ │ │ │ │ +Define a type for communication direction parameter. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ +InterfaceType │ │ │ │ │ +Parameter to be used for the communication functions. │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ All_Partition │ │ │ │ │ +all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ OverlapFront_Partition │ │ │ │ │ +interior, border, overlap and front entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Interior_Partition │ │ │ │ │ +only interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ InteriorBorder_Partition │ │ │ │ │ +interior and border entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Overlap_Partition │ │ │ │ │ +interior, border, and overlap entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ +@ Ghost_Partition │ │ │ │ │ +only ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y │ │ │ │ │ +@ FrontEntity │ │ │ │ │ +on boundary between overlap and ghost │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ +@ InteriorEntity │ │ │ │ │ +all interior entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ +@ GhostEntity │ │ │ │ │ +ghost entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ +@ BorderEntity │ │ │ │ │ +on boundary between interior and overlap │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ │ +@ OverlapEntity │ │ │ │ │ +all entities lying in the overlap zone │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +@ BackwardCommunication │ │ │ │ │ +reverse communication direction │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:172 │ │ │ │ │ +_D_u_n_e_:_:_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +@ ForwardCommunication │ │ │ │ │ +communicate as given in InterfaceType │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ InteriorBorder_All_Interface │ │ │ │ │ +send interior and border, receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ All_All_Interface │ │ │ │ │ +send all and receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ Overlap_All_Interface │ │ │ │ │ +send overlap, receive all entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ Overlap_OverlapFront_Interface │ │ │ │ │ +send overlap, receive overlap and front entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e │ │ │ │ │ +@ InteriorBorder_InteriorBorder_Interface │ │ │ │ │ +send/receive interior and border entities │ │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:87 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ -Base class for exceptions in Dune grid modules. │ │ │ │ │ -DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r │ │ │ │ │ -Mapper interface. │ │ │ │ │ -DDeeffiinniittiioonn mapper.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -Implementation class for a single codim and single geometry type mapper. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const EntityType &e, Index &result) const │ │ │ │ │ -Returns true if the entity is contained in the index set. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_I_n_d_e_x │ │ │ │ │ -GV::IndexSet::IndexType Index │ │ │ │ │ -Number type used for indices. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ -bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc, │ │ │ │ │ -Index &result) const │ │ │ │ │ -Returns true if the entity is contained in the index set. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:126 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ -decltype(std::declval< typename GV::IndexSet >().size(0)) size_type │ │ │ │ │ -Number type used for the overall size (the return value of the 'size' method) │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ │ -Map entity to array index. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ -unsigned int codim) const │ │ │ │ │ -Map subentity of codim 0 entity to array index. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -SingleCodimSingleGeomTypeMapper(const GV &gridView) │ │ │ │ │ -Construct mapper from grid and one of its index sets. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(GV &&gridView) │ │ │ │ │ -Recalculates indices after grid adaptation. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ -size_type size() const │ │ │ │ │ -Return total number of entities in the entity set managed by the mapper. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -Recalculates indices after grid adaptation. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(const GV &gridView) │ │ │ │ │ -Recalculates indices after grid adaptation. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -Single codim and single geometry type mapper for leaf entities. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -LeafSingleCodimSingleGeomTypeMapper(const G &grid) │ │ │ │ │ -The constructor. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_L_e_a_f_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -Recalculates indices after grid adaptation. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:202 │ │ │ │ │ -_D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -Single codim and single geometry type mapper for entities of one level. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:224 │ │ │ │ │ -_D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_: │ │ │ │ │ -_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level) │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_L_e_v_e_l_S_i_n_g_l_e_C_o_d_i_m_S_i_n_g_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -Recalculates indices after grid adaptation. │ │ │ │ │ -DDeeffiinniittiioonn scsgmapper.hh:242 │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00263.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ │┄ Files 16% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: defaultgridview.hh File Reference │ │ │ │ +dune-grid: refinement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,64 +65,65 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
defaultgridview.hh File Reference
│ │ │ │ +
refinement.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/grid/common/capabilities.hh>
│ │ │ │ -#include <dune/grid/common/gridview.hh>
│ │ │ │ + │ │ │ │ +

provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather │ │ │ │ +More...

│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::DefaultLevelGridViewTraits< GridImp >
 
struct  Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >
class  Dune::Alberta::Patch< dim >
 
struct  Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >::Partition< pit >
 Define types needed to iterate over entities of a given partition type. More...
struct  Dune::Alberta::ForEachInteriorSubChild< dim, 0 >
 
class  Dune::DefaultLevelGridView< GridImp >
struct  Dune::Alberta::ForEachInteriorSubChild< dim, dim >
 
struct  Dune::DefaultLevelGridView< GridImp >::Codim< cd >
 Codim Structure. More...
struct  Dune::Alberta::ForEachInteriorSubChild< 2, 1 >
 
struct  Dune::DefaultLeafGridViewTraits< GridImp >
struct  Dune::Alberta::ForEachInteriorSubChild< 3, 1 >
 
struct  Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd >
struct  Dune::Alberta::ForEachInteriorSubChild< 3, 2 >
 
struct  Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd >::Partition< pit >
 Define types needed to iterate over entities of a given partition type. More...
struct  Dune::Alberta::GeometryInFather< 1 >
 
class  Dune::DefaultLeafGridView< GridImp >
struct  Dune::Alberta::GeometryInFather< 2 >
 
struct  Dune::DefaultLeafGridView< GridImp >::Codim< cd >
 Codim Structure. More...
struct  Dune::Alberta::GeometryInFather< 3 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,49 +1,47 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -defaultgridview.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_v_i_e_w_._h_h> │ │ │ │ │ +refinement.hh File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ +geometryInFather _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _0_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _>_:_:_P_a_r_t_i_t_i_o_n_< │ │ │ │ │ - _p_i_t_ _> │ │ │ │ │ -  Define types needed to iterate over entities of a given partition │ │ │ │ │ - type. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ - class   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _2_,_ _1_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ -  _C_o_d_i_m Structure. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _1_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _2_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _1_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _>_:_:_P_a_r_t_i_t_i_o_n_< │ │ │ │ │ - _p_i_t_ _> │ │ │ │ │ -  Define types needed to iterate over entities of a given partition │ │ │ │ │ - type. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _2_ _> │ │ │ │ │   │ │ │ │ │ - class   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ -  _C_o_d_i_m Structure. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _3_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ +  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ │ +geometryInFather │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00263_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html │ │ │ │┄ Files 14% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: defaultgridview.hh Source File │ │ │ │ +dune-grid: meshpointer.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,539 +70,627 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
defaultgridview.hh
│ │ │ │ +
meshpointer.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
│ │ │ │ -
6#define DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/typetraits.hh>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 template< class GridImp >
│ │ │ │ -
18 class DefaultLevelGridView;
│ │ │ │ -
19
│ │ │ │ -
20 template< class GridImp >
│ │ │ │ -
21 class DefaultLeafGridView;
│ │ │ │ +
13#include <limits>
│ │ │ │ +
14#include <string>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21#if HAVE_ALBERTA
│ │ │ │
22
│ │ │ │ -
23
│ │ │ │ -
24 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ - │ │ │ │ +
23namespace Dune
│ │ │ │ +
24{
│ │ │ │ +
25
│ │ │ │ +
26 namespace Alberta
│ │ │ │ +
27 {
│ │ │ │
28
│ │ │ │ -
30 typedef typename std::remove_const<GridImp>::type Grid;
│ │ │ │ +
29 // External Forward Declarations
│ │ │ │ +
30 // -----------------------------
│ │ │ │
31
│ │ │ │ -
33 typedef typename Grid :: Traits :: LevelIndexSet IndexSet;
│ │ │ │ +
32 template< int dim >
│ │ │ │ +
33 class HierarchyDofNumbering;
│ │ │ │
34
│ │ │ │ -
36 typedef typename Grid :: Traits :: LevelIntersection Intersection;
│ │ │ │ +
35 // MeshPointer
│ │ │ │ +
36 // -----------
│ │ │ │
37
│ │ │ │ -
39 typedef typename Grid :: Traits :: LevelIntersectionIterator
│ │ │ │ - │ │ │ │ -
41
│ │ │ │ -
43 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ +
38 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
43 typedef typename ElementInfo::FillFlags FillFlags;
│ │ │ │
44
│ │ │ │ -
46 [[deprecated("Use Communication instead!")]]
│ │ │ │ - │ │ │ │ -
48
│ │ │ │ -
49 template< int cd >
│ │ │ │ -
│ │ │ │ -
50 struct Codim
│ │ │ │ -
51 {
│ │ │ │ -
52 typedef typename Grid :: Traits
│ │ │ │ -
53 :: template Codim< cd > :: template Partition< All_Partition > :: LevelIterator
│ │ │ │ - │ │ │ │ -
55
│ │ │ │ -
56 typedef typename Grid :: Traits :: template Codim< cd > :: Entity Entity;
│ │ │ │ -
57
│ │ │ │ -
58 typedef typename Grid :: template Codim< cd > :: Geometry Geometry;
│ │ │ │ -
59 typedef typename Grid :: template Codim< cd > :: LocalGeometry
│ │ │ │ - │ │ │ │ -
61
│ │ │ │ -
63 template< PartitionIteratorType pit >
│ │ │ │ -
│ │ │ │ -
64 struct Partition
│ │ │ │ -
65 {
│ │ │ │ -
67 typedef typename Grid :: template Codim< cd >
│ │ │ │ -
68 :: template Partition< pit > :: LevelIterator
│ │ │ │ - │ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71 };
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 constexpr static bool conforming = Capabilities :: isLevelwiseConforming< Grid > :: v;
│ │ │ │ -
74 };
│ │ │ │ +
45 class BoundaryProvider;
│ │ │ │ +
46
│ │ │ │ +
47 template< int dimWorld >
│ │ │ │ +
48 struct Library;
│ │ │ │ +
49
│ │ │ │ +
50 public:
│ │ │ │ +
51 class MacroIterator;
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 : mesh_( 0 )
│ │ │ │ +
55 {}
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
│ │ │ │ +
57 explicit MeshPointer ( Mesh *mesh )
│ │ │ │ +
58 : mesh_( mesh )
│ │ │ │ +
59 {}
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
61 operator Mesh * () const
│ │ │ │ +
62 {
│ │ │ │ +
63 return mesh_;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
66 explicit operator bool () const
│ │ │ │ +
67 {
│ │ │ │ +
68 return (bool)mesh_;
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
72 {
│ │ │ │ +
73 return MacroIterator( *this, false );
│ │ │ │ +
74 }
│ │ │ │
│ │ │ │
75
│ │ │ │ -
76
│ │ │ │ -
77 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
79 {
│ │ │ │ - │ │ │ │ -
81
│ │ │ │ -
82 public:
│ │ │ │ - │ │ │ │ -
84
│ │ │ │ -
86 typedef typename Traits::Grid Grid;
│ │ │ │ -
87
│ │ │ │ -
89 typedef typename Traits :: IndexSet IndexSet;
│ │ │ │ -
90
│ │ │ │ -
92 typedef typename Traits :: Intersection Intersection;
│ │ │ │ -
93
│ │ │ │ -
95 typedef typename Traits :: IntersectionIterator IntersectionIterator;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
77 {
│ │ │ │ +
78 return MacroIterator( *this, true );
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
81 int numMacroElements () const;
│ │ │ │ +
82 int size ( int codim ) const;
│ │ │ │ +
83
│ │ │ │ +
84 // create a mesh from a macrodata structure
│ │ │ │ +
85 // params: macroData - macro data structure
│ │ │ │ +
86 // returns: number of boundary segments
│ │ │ │ +
│ │ │ │ +
87 unsigned int create ( const MacroData< dim > &macroData );
│ │ │ │ +
88
│ │ │ │ +
89 // create a mesh from a macrodata structure, adding projections
│ │ │ │ +
90 // params: macroData - macro data structure
│ │ │ │ +
91 // projectionFactory - factory for the projections
│ │ │ │ +
92 // returns: number of boundary segments
│ │ │ │ +
93 template< class Proj, class Impl >
│ │ │ │ +
│ │ │ │ +
94 unsigned int create ( const MacroData< dim > &macroData,
│ │ │ │ +
95 const ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
│ │ │ │
96
│ │ │ │ -
98 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ -
99
│ │ │ │ -
101 [[deprecated("Use Communication instead!")]]
│ │ │ │ - │ │ │ │ -
103
│ │ │ │ -
105 template< int cd >
│ │ │ │ -
106 struct Codim : public Traits :: template Codim<cd> {};
│ │ │ │ -
107
│ │ │ │ -
108 constexpr static bool conforming = Traits :: conforming;
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ -
110 DefaultLevelGridView ( const Grid &grid, int level )
│ │ │ │ -
111 : grid_( &grid ),
│ │ │ │ -
112 level_( level )
│ │ │ │ -
113 {}
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ +
97 // create a mesh from a file
│ │ │ │ +
98 // params: filename - file name of an Alberta macro triangulation
│ │ │ │ +
99 // binary - read binary?
│ │ │ │ +
100 // returns: number of boundary segments
│ │ │ │ +
│ │ │ │ +
101 unsigned int create ( const std::string &filename, bool binary = false );
│ │ │ │ +
102
│ │ │ │ +
103 // read back a mesh from a file
│ │ │ │ +
104 // params: filename - file name of an Alberta save file
│ │ │ │ +
105 // time - variable to receive the time stored in the file
│ │ │ │ +
106 // returns: number of boundary segments
│ │ │ │ +
107 //
│ │ │ │ +
108 // notes: - projections are not preserved
│ │ │ │ +
109 // - we assume that projections are added in the same order they
│ │ │ │ +
110 // inserted in when the grid was created (otherwise the boundary
│ │ │ │ +
111 // indices change)
│ │ │ │ +
│ │ │ │ +
112 unsigned int read ( const std::string &filename, Real &time );
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
114 bool write ( const std::string &filename, Real time ) const;
│ │ │ │ +
115
│ │ │ │
│ │ │ │ -
116 const Grid &grid () const
│ │ │ │ -
117 {
│ │ │ │ -
118 assert( grid_ );
│ │ │ │ -
119 return *grid_;
│ │ │ │ -
120 }
│ │ │ │ -
│ │ │ │ +
116 void release ();
│ │ │ │ +
117
│ │ │ │ +
118 template< class Functor >
│ │ │ │ +
│ │ │ │ +
119 void hierarchicTraverse ( Functor &functor,
│ │ │ │ +
120 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
│ │ │ │
121
│ │ │ │ +
122 template< class Functor >
│ │ │ │
│ │ │ │ -
123 const IndexSet &indexSet () const
│ │ │ │ -
124 {
│ │ │ │ -
125 return grid().levelIndexSet( level_ );
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ +
123 void leafTraverse ( Functor &functor,
│ │ │ │ +
124 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
│ │ │ │ +
125
│ │ │ │ +
│ │ │ │ +
126 bool coarsen ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
│ │ │ │
127
│ │ │ │ -
129 bool isConforming() const { return bool(Traits::conforming); }
│ │ │ │ -
130
│ │ │ │ -
│ │ │ │ -
132 int size ( int codim ) const
│ │ │ │ -
133 {
│ │ │ │ -
134 return grid().size( level_, codim );
│ │ │ │ -
135 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
128 bool refine ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
│ │ │ │ +
129
│ │ │ │ +
130 private:
│ │ │ │ +
131 static ALBERTA NODE_PROJECTION *
│ │ │ │ +
132 initNodeProjection ( [[maybe_unused]] Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );
│ │ │ │ +
133 template< class ProjectionProvider >
│ │ │ │ +
134 static ALBERTA NODE_PROJECTION *
│ │ │ │ +
135 initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );
│ │ │ │
136
│ │ │ │ -
│ │ │ │ -
138 int size ( const GeometryType &type ) const
│ │ │ │ -
139 {
│ │ │ │ -
140 return grid().size( level_, type );
│ │ │ │ -
141 }
│ │ │ │ -
│ │ │ │ -
142
│ │ │ │ -
144 template< int cd >
│ │ │ │ -
│ │ │ │ -
145 typename Codim< cd > :: Iterator begin () const
│ │ │ │ -
146 {
│ │ │ │ -
147 return grid().template lbegin< cd, All_Partition >( level_ );
│ │ │ │ -
148 }
│ │ │ │ -
│ │ │ │ -
149
│ │ │ │ -
151 template< int cd, PartitionIteratorType pit >
│ │ │ │ -
│ │ │ │ -
152 typename Codim< cd > :: template Partition< pit > :: Iterator begin () const
│ │ │ │ -
153 {
│ │ │ │ -
154 return grid().template lbegin< cd, pit >( level_ );
│ │ │ │ -
155 }
│ │ │ │ -
│ │ │ │ -
156
│ │ │ │ -
158 template< int cd >
│ │ │ │ -
│ │ │ │ -
159 typename Codim< cd > :: Iterator end () const
│ │ │ │ -
160 {
│ │ │ │ -
161 return grid().template lend< cd, All_Partition >( level_ );
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ -
165 template< int cd, PartitionIteratorType pit >
│ │ │ │ -
│ │ │ │ -
166 typename Codim< cd > :: template Partition< pit > :: Iterator end () const
│ │ │ │ -
167 {
│ │ │ │ -
168 return grid().template lend< cd, pit >( level_ );
│ │ │ │ -
169 }
│ │ │ │ -
│ │ │ │ -
170
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
173 ibegin ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ -
174 {
│ │ │ │ -
175 return entity.impl().ilevelbegin();
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
180 iend ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ -
181 {
│ │ │ │ -
182 return entity.impl().ilevelend();
│ │ │ │ -
183 }
│ │ │ │ -
│ │ │ │ -
184
│ │ │ │ -
│ │ │ │ -
186 const Communication &comm () const
│ │ │ │ -
187 {
│ │ │ │ -
188 return grid().comm();
│ │ │ │ -
189 }
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
│ │ │ │ -
192 int overlapSize(int codim) const
│ │ │ │ -
193 {
│ │ │ │ -
194 return grid().overlapSize(level_, codim);
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
│ │ │ │ -
198 int ghostSize(int codim) const
│ │ │ │ -
199 {
│ │ │ │ -
200 return grid().ghostSize(level_, codim);
│ │ │ │ -
201 }
│ │ │ │ +
137 Mesh *mesh_;
│ │ │ │ +
138 };
│ │ │ │ +
139
│ │ │ │ +
140
│ │ │ │ +
141
│ │ │ │ +
142 // MeshPointer::Library
│ │ │ │ +
143 // --------------------
│ │ │ │ +
144
│ │ │ │ +
145 template< int dim >
│ │ │ │ +
146 template< int dimWorld >
│ │ │ │ +
147 struct MeshPointer< dim >::Library
│ │ │ │ +
148 {
│ │ │ │ + │ │ │ │ +
150
│ │ │ │ +
151 static inline unsigned int boundaryCount = 0;
│ │ │ │ +
152 static inline const void *projectionFactory = nullptr;
│ │ │ │ +
153
│ │ │ │ +
154 static void
│ │ │ │ +
155 create ( MeshPointer &ptr, const MacroData< dim > &macroData,
│ │ │ │ +
156 ALBERTA NODE_PROJECTION *(*initNodeProjection)( Mesh *, ALBERTA MACRO_EL *, int ) );
│ │ │ │ +
157 static void release ( MeshPointer &ptr );
│ │ │ │ +
158 };
│ │ │ │ +
159
│ │ │ │ +
160
│ │ │ │ +
161
│ │ │ │ +
162 // MeshPointer::MacroIterator
│ │ │ │ +
163 // --------------------------
│ │ │ │ +
164
│ │ │ │ +
165 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
167 {
│ │ │ │ + │ │ │ │ +
169
│ │ │ │ +
170 friend class MeshPointer< dim >;
│ │ │ │ +
171
│ │ │ │ +
172 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
175
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
177 : mesh_(),
│ │ │ │ +
178 index_( -1 )
│ │ │ │ +
179 {}
│ │ │ │ +
│ │ │ │ +
180
│ │ │ │ +
181 private:
│ │ │ │ +
182
│ │ │ │ +
183 explicit MacroIterator ( const MeshPointer &mesh, bool end = false )
│ │ │ │ +
184 : mesh_( mesh ),
│ │ │ │ +
185 index_( end ? mesh.numMacroElements() : 0 )
│ │ │ │ +
186 {}
│ │ │ │ +
187
│ │ │ │ +
188 public:
│ │ │ │ +
│ │ │ │ +
189 bool done () const
│ │ │ │ +
190 {
│ │ │ │ +
191 return (index_ >= mesh().numMacroElements());
│ │ │ │ +
192 }
│ │ │ │ +
│ │ │ │ +
193
│ │ │ │ +
│ │ │ │ +
194 bool equals ( const MacroIterator &other ) const
│ │ │ │ +
195 {
│ │ │ │ +
196 return (index_ == other.index_);
│ │ │ │ +
197 }
│ │ │ │ +
│ │ │ │ +
198
│ │ │ │ +
│ │ │ │ +
199 void increment ()
│ │ │ │ +
200 {
│ │ │ │ +
201 assert( !done() );
│ │ │ │ +
202 ++index_;
│ │ │ │ +
203 }
│ │ │ │
│ │ │ │ -
202
│ │ │ │ -
204 template< class DataHandleImp, class DataType >
│ │ │ │ +
204
│ │ │ │
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
208 {
│ │ │ │ -
209 return grid().communicate( data, iftype, dir, level_ );
│ │ │ │ -
210 }
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
212 private:
│ │ │ │ -
213 const Grid *grid_;
│ │ │ │ -
214 int level_;
│ │ │ │ -
215 };
│ │ │ │ -
│ │ │ │ -
216
│ │ │ │ -
217
│ │ │ │ -
218 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
206 {
│ │ │ │ +
207 assert( !done() );
│ │ │ │ +
208 return static_cast< const MacroElement & >( mesh().mesh_->macro_els[ index_ ] );
│ │ │ │ +
209 }
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
│ │ │ │ +
211 const MeshPointer &mesh () const
│ │ │ │ +
212 {
│ │ │ │ +
213 return mesh_;
│ │ │ │ +
214 }
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
│ │ │ │ +
216 This &operator++ ()
│ │ │ │ +
217 {
│ │ │ │ +
218 increment();
│ │ │ │ +
219 return *this;
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │
221
│ │ │ │ -
223 typedef typename std::remove_const<GridImp>::type Grid;
│ │ │ │ -
224
│ │ │ │ -
226 typedef typename Grid :: Traits :: LeafIndexSet IndexSet;
│ │ │ │ -
227
│ │ │ │ -
229 typedef typename Grid :: Traits :: LeafIntersection Intersection;
│ │ │ │ -
230
│ │ │ │ -
232 typedef typename Grid :: Traits :: LeafIntersectionIterator
│ │ │ │ - │ │ │ │ -
234
│ │ │ │ -
236 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ -
237
│ │ │ │ -
239 [[deprecated("Use Communication instead!")]]
│ │ │ │ - │ │ │ │ -
241
│ │ │ │ -
242 template< int cd >
│ │ │ │ -
│ │ │ │ -
243 struct Codim
│ │ │ │ -
244 {
│ │ │ │ -
245 typedef typename Grid :: Traits
│ │ │ │ -
246 :: template Codim< cd > :: template Partition< All_Partition > :: LeafIterator
│ │ │ │ - │ │ │ │ -
248
│ │ │ │ -
249 typedef typename Grid :: Traits :: template Codim< cd > :: Entity Entity;
│ │ │ │ +
│ │ │ │ +
222 ElementInfo operator* () const
│ │ │ │ +
223 {
│ │ │ │ +
224 return elementInfo();
│ │ │ │ +
225 }
│ │ │ │ +
│ │ │ │ +
226
│ │ │ │ +
│ │ │ │ +
227 bool operator== ( const MacroIterator &other ) const
│ │ │ │ +
228 {
│ │ │ │ +
229 return equals( other );
│ │ │ │ +
230 }
│ │ │ │ +
│ │ │ │ +
231
│ │ │ │ +
│ │ │ │ +
232 bool operator!= ( const MacroIterator &other ) const
│ │ │ │ +
233 {
│ │ │ │ +
234 return !equals( other );
│ │ │ │ +
235 }
│ │ │ │ +
│ │ │ │ +
236
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
238 elementInfo ( typename FillFlags::Flags fillFlags = FillFlags::standard ) const
│ │ │ │ +
239 {
│ │ │ │ +
240 if( done() )
│ │ │ │ +
241 return ElementInfo();
│ │ │ │ +
242 else
│ │ │ │ +
243 return ElementInfo( mesh(), macroElement(), fillFlags );
│ │ │ │ +
244 }
│ │ │ │ +
│ │ │ │ +
245
│ │ │ │ +
246 private:
│ │ │ │ +
247 MeshPointer mesh_;
│ │ │ │ +
248 int index_;
│ │ │ │ +
249 };
│ │ │ │ +
│ │ │ │
250
│ │ │ │ -
251 typedef typename Grid :: template Codim< cd > :: Geometry Geometry;
│ │ │ │ -
252 typedef typename Grid :: template Codim< cd > :: LocalGeometry
│ │ │ │ - │ │ │ │ -
254
│ │ │ │ -
256 template <PartitionIteratorType pit >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
258 {
│ │ │ │ -
260 typedef typename Grid :: template Codim< cd >
│ │ │ │ -
261 :: template Partition< pit > :: LeafIterator
│ │ │ │ - │ │ │ │ -
263 };
│ │ │ │ -
│ │ │ │ -
264 };
│ │ │ │ -
│ │ │ │ -
265
│ │ │ │ -
266 constexpr static bool conforming = Capabilities :: isLeafwiseConforming< Grid > :: v;
│ │ │ │ -
267 };
│ │ │ │ +
251
│ │ │ │ +
252
│ │ │ │ +
253 // Implementation of MeshPointer
│ │ │ │ +
254 // -----------------------------
│ │ │ │ +
255
│ │ │ │ +
256 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
258 {
│ │ │ │ +
259 return (mesh_ ? mesh_->n_macro_el : 0);
│ │ │ │ +
260 }
│ │ │ │ +
│ │ │ │ +
261
│ │ │ │ +
262
│ │ │ │ +
263 template<>
│ │ │ │ +
│ │ │ │ +
264 inline int MeshPointer< 1 >::size( int codim ) const
│ │ │ │ +
265 {
│ │ │ │ +
266 assert( (codim >= 0) && (codim <= 1) );
│ │ │ │ +
267 return (codim == 0 ? mesh_->n_elements : mesh_->n_vertices);
│ │ │ │ +
268 }
│ │ │ │
│ │ │ │ -
268
│ │ │ │
269
│ │ │ │ -
270 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
272 {
│ │ │ │ - │ │ │ │ -
274
│ │ │ │ -
275 public:
│ │ │ │ - │ │ │ │ -
277
│ │ │ │ -
279 typedef typename Traits::Grid Grid;
│ │ │ │ -
280
│ │ │ │ -
282 typedef typename Traits :: IndexSet IndexSet;
│ │ │ │ -
283
│ │ │ │ -
285 typedef typename Traits :: Intersection Intersection;
│ │ │ │ -
286
│ │ │ │ -
288 typedef typename Traits :: IntersectionIterator IntersectionIterator;
│ │ │ │ -
289
│ │ │ │ -
291 typedef typename Grid :: Traits :: Communication Communication;
│ │ │ │ -
292
│ │ │ │ -
294 [[deprecated("Use Communication instead!")]]
│ │ │ │ - │ │ │ │ +
270 template<>
│ │ │ │ +
│ │ │ │ +
271 inline int MeshPointer< 2 >::size( int codim ) const
│ │ │ │ +
272 {
│ │ │ │ +
273 assert( (codim >= 0) && (codim <= 2) );
│ │ │ │ +
274 if( codim == 0 )
│ │ │ │ +
275 return mesh_->n_elements;
│ │ │ │ +
276 else if( codim == 2 )
│ │ │ │ +
277 return mesh_->n_vertices;
│ │ │ │ +
278 else
│ │ │ │ +
279 return mesh_->n_edges;
│ │ │ │ +
280 }
│ │ │ │ +
│ │ │ │ +
281
│ │ │ │ +
282 template<>
│ │ │ │ +
│ │ │ │ +
283 inline int MeshPointer< 3 >::size( int codim ) const
│ │ │ │ +
284 {
│ │ │ │ +
285 assert( (codim >= 0) && (codim <= 3) );
│ │ │ │ +
286 if( codim == 0 )
│ │ │ │ +
287 return mesh_->n_elements;
│ │ │ │ +
288 else if( codim == 3 )
│ │ │ │ +
289 return mesh_->n_vertices;
│ │ │ │ +
290 else if( codim == 1 )
│ │ │ │ +
291 return mesh_->n_faces;
│ │ │ │ +
292 else
│ │ │ │ +
293 return mesh_->n_edges;
│ │ │ │ +
294 }
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │
296
│ │ │ │ -
298 template< int cd >
│ │ │ │ -
299 struct Codim : public Traits :: template Codim<cd> {};
│ │ │ │ -
300
│ │ │ │ -
301 constexpr static bool conforming = Traits :: conforming;
│ │ │ │ +
297 template< int dim >
│ │ │ │ +
298 inline unsigned int MeshPointer< dim >
│ │ │ │ +
│ │ │ │ +
299 ::create ( const MacroData< dim > &macroData )
│ │ │ │ +
300 {
│ │ │ │ +
301 release();
│ │ │ │
302
│ │ │ │ -
303 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
305 : grid_( &grid )
│ │ │ │ -
306 {}
│ │ │ │ +
303 Library< dimWorld >::boundaryCount = 0;
│ │ │ │ +
304 Library< dimWorld >::create( *this, macroData, &initNodeProjection );
│ │ │ │ +
305 return Library< dimWorld >::boundaryCount;
│ │ │ │ +
306 }
│ │ │ │
│ │ │ │
307
│ │ │ │ -
│ │ │ │ -
309 const Grid &grid () const
│ │ │ │ -
310 {
│ │ │ │ -
311 assert( grid_ );
│ │ │ │ -
312 return *grid_;
│ │ │ │ -
313 }
│ │ │ │ -
│ │ │ │ -
314
│ │ │ │ -
│ │ │ │ -
316 const IndexSet &indexSet () const
│ │ │ │ -
317 {
│ │ │ │ -
318 return grid().leafIndexSet();
│ │ │ │ -
319 }
│ │ │ │ -
│ │ │ │ -
320
│ │ │ │ -
322 bool isConforming() const { return bool(Traits::conforming); }
│ │ │ │ -
323
│ │ │ │ -
│ │ │ │ -
325 int size ( int codim ) const
│ │ │ │ -
326 {
│ │ │ │ -
327 return grid().size( codim );
│ │ │ │ -
328 }
│ │ │ │ -
│ │ │ │ -
329
│ │ │ │ +
308
│ │ │ │ +
309 template< int dim >
│ │ │ │ +
310 template< class Proj, class Impl >
│ │ │ │ +
311 inline unsigned int MeshPointer< dim >
│ │ │ │ +
│ │ │ │ +
312 ::create ( const MacroData< dim > &macroData,
│ │ │ │ +
313 const ProjectionFactoryInterface< Proj, Impl > &projectionFactory )
│ │ │ │ +
314 {
│ │ │ │ + │ │ │ │ +
316
│ │ │ │ +
317 release();
│ │ │ │ +
318
│ │ │ │ +
319 Library< dimWorld >::boundaryCount = 0;
│ │ │ │ +
320 Library< dimWorld >::projectionFactory = &projectionFactory;
│ │ │ │ +
321 Library< dimWorld >::create( *this, macroData, &initNodeProjection< ProjectionFactory > );
│ │ │ │ +
322 Library< dimWorld >::projectionFactory = nullptr;
│ │ │ │ +
323 return Library< dimWorld >::boundaryCount;
│ │ │ │ +
324 }
│ │ │ │ +
│ │ │ │ +
325
│ │ │ │ +
326
│ │ │ │ +
327
│ │ │ │ +
328
│ │ │ │ +
329 template< int dim >
│ │ │ │ +
330 inline unsigned int MeshPointer< dim >
│ │ │ │
│ │ │ │ -
331 int size ( const GeometryType &type ) const
│ │ │ │ -
332 {
│ │ │ │ -
333 return grid().size( type );
│ │ │ │ -
334 }
│ │ │ │ -
│ │ │ │ -
335
│ │ │ │ -
337 template< int cd >
│ │ │ │ -
│ │ │ │ -
338 typename Codim< cd > :: Iterator begin () const
│ │ │ │ -
339 {
│ │ │ │ -
340 return grid().template leafbegin< cd, All_Partition >();
│ │ │ │ -
341 }
│ │ │ │ -
│ │ │ │ -
342
│ │ │ │ -
344 template< int cd, PartitionIteratorType pit >
│ │ │ │ -
│ │ │ │ -
345 typename Codim< cd > :: template Partition< pit > :: Iterator begin () const
│ │ │ │ -
346 {
│ │ │ │ -
347 return grid().template leafbegin< cd, pit >();
│ │ │ │ -
348 }
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
351 template< int cd >
│ │ │ │ -
│ │ │ │ -
352 typename Codim< cd > :: Iterator end () const
│ │ │ │ -
353 {
│ │ │ │ -
354 return grid().template leafend< cd, All_Partition >();
│ │ │ │ -
355 }
│ │ │ │ -
│ │ │ │ -
356
│ │ │ │ -
358 template< int cd, PartitionIteratorType pit >
│ │ │ │ -
│ │ │ │ -
359 typename Codim< cd > :: template Partition< pit > :: Iterator end () const
│ │ │ │ -
360 {
│ │ │ │ -
361 return grid().template leafend< cd, pit >();
│ │ │ │ -
362 }
│ │ │ │ -
│ │ │ │ -
363
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
366 ibegin ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ -
367 {
│ │ │ │ -
368 return entity.impl().ileafbegin();
│ │ │ │ -
369 }
│ │ │ │ -
│ │ │ │ -
370
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
373 iend ( const typename Codim< 0 > :: Entity &entity ) const
│ │ │ │ -
374 {
│ │ │ │ -
375 return entity.impl().ileafend();
│ │ │ │ -
376 }
│ │ │ │ -
│ │ │ │ -
377
│ │ │ │ -
│ │ │ │ -
379 const Communication &comm () const
│ │ │ │ -
380 {
│ │ │ │ -
381 return grid().comm();
│ │ │ │ -
382 }
│ │ │ │ -
│ │ │ │ -
383
│ │ │ │ +
331 ::create ( const std::string &filename, bool binary )
│ │ │ │ +
332 {
│ │ │ │ +
333 MacroData< dim > macroData;
│ │ │ │ +
334 macroData.read( filename, binary );
│ │ │ │ +
335 const unsigned int boundaryCount = create( macroData );
│ │ │ │ +
336 macroData.release();
│ │ │ │ +
337 return boundaryCount;
│ │ │ │ +
338 }
│ │ │ │ +
│ │ │ │ +
339
│ │ │ │ +
340
│ │ │ │ +
341 template< int dim >
│ │ │ │ +
│ │ │ │ +
342 inline unsigned int MeshPointer< dim >::read ( const std::string &filename, Real &time )
│ │ │ │ +
343 {
│ │ │ │ +
344 release();
│ │ │ │ +
345
│ │ │ │ +
346 Library< dimWorld >::boundaryCount = 0;
│ │ │ │ +
347 mesh_ = ALBERTA read_mesh_xdr( filename.c_str(), &time, NULL, NULL );
│ │ │ │ +
348 return Library< dimWorld >::boundaryCount;
│ │ │ │ +
349 }
│ │ │ │ +
│ │ │ │ +
350
│ │ │ │ +
351
│ │ │ │ +
352 template< int dim >
│ │ │ │ +
│ │ │ │ +
353 inline bool MeshPointer< dim >::write ( const std::string &filename, Real time ) const
│ │ │ │ +
354 {
│ │ │ │ +
355 int success = ALBERTA write_mesh_xdr( mesh_, filename.c_str(), time );
│ │ │ │ +
356 return (success == 0);
│ │ │ │ +
357 }
│ │ │ │ +
│ │ │ │ +
358
│ │ │ │ +
359
│ │ │ │ +
360 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
362 {
│ │ │ │ +
363 Library< dimWorld >::release( *this );
│ │ │ │ +
364 }
│ │ │ │ +
│ │ │ │ +
365
│ │ │ │ +
366
│ │ │ │ +
367 template< int dim >
│ │ │ │ +
368 template< class Functor >
│ │ │ │ +
369 inline void MeshPointer< dim >
│ │ │ │ +
│ │ │ │ +
370 ::hierarchicTraverse ( Functor &functor,
│ │ │ │ +
371 typename FillFlags::Flags fillFlags ) const
│ │ │ │ +
372 {
│ │ │ │ +
373 const MacroIterator eit = end();
│ │ │ │ +
374 for( MacroIterator it = begin(); it != eit; ++it )
│ │ │ │ +
375 {
│ │ │ │ +
376 const ElementInfo info = it.elementInfo( fillFlags );
│ │ │ │ +
377 info.hierarchicTraverse( functor );
│ │ │ │ +
378 }
│ │ │ │ +
379 }
│ │ │ │ +
│ │ │ │ +
380
│ │ │ │ +
381
│ │ │ │ +
382 template< int dim >
│ │ │ │ +
383 template< class Functor >
│ │ │ │ +
384 inline void MeshPointer< dim >
│ │ │ │
│ │ │ │ -
385 int overlapSize(int codim) const
│ │ │ │ -
386 {
│ │ │ │ -
387 return grid().overlapSize(codim);
│ │ │ │ -
388 }
│ │ │ │ -
│ │ │ │ -
389
│ │ │ │ -
│ │ │ │ -
391 int ghostSize(int codim) const
│ │ │ │ -
392 {
│ │ │ │ -
393 return grid().ghostSize(codim);
│ │ │ │ +
385 ::leafTraverse ( Functor &functor,
│ │ │ │ +
386 typename FillFlags::Flags fillFlags ) const
│ │ │ │ +
387 {
│ │ │ │ +
388 const MacroIterator eit = end();
│ │ │ │ +
389 for( MacroIterator it = begin(); it != eit; ++it )
│ │ │ │ +
390 {
│ │ │ │ +
391 const ElementInfo info = it.elementInfo( fillFlags );
│ │ │ │ +
392 info.leafTraverse( functor );
│ │ │ │ +
393 }
│ │ │ │
394 }
│ │ │ │
│ │ │ │
395
│ │ │ │ -
397 template< class DataHandleImp, class DataType >
│ │ │ │ +
396
│ │ │ │ +
397 template< int dim >
│ │ │ │
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
401 {
│ │ │ │ -
402 return grid().communicate( data, iftype, dir );
│ │ │ │ -
403 }
│ │ │ │ -
│ │ │ │ -
404
│ │ │ │ -
405 private:
│ │ │ │ -
406 const Grid *grid_;
│ │ │ │ -
407 };
│ │ │ │ -
│ │ │ │ -
408
│ │ │ │ -
409}
│ │ │ │ -
410
│ │ │ │ -
411#endif
│ │ │ │ -
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ │ -
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ │ +
398 inline bool MeshPointer< dim >::coarsen ( typename FillFlags::Flags fillFlags )
│ │ │ │ +
399 {
│ │ │ │ +
400 const bool coarsened = (ALBERTA coarsen( mesh_, fillFlags ) == meshCoarsened);
│ │ │ │ +
401 if( coarsened )
│ │ │ │ +
402 ALBERTA dof_compress( mesh_ );
│ │ │ │ +
403 return coarsened;
│ │ │ │ +
404 }
│ │ │ │ +
│ │ │ │ +
405
│ │ │ │ +
406 template< int dim >
│ │ │ │ +
│ │ │ │ +
407 inline bool MeshPointer< dim >::refine ( typename FillFlags::Flags fillFlags )
│ │ │ │ +
408 {
│ │ │ │ +
409 return (ALBERTA refine( mesh_, fillFlags ) == meshRefined);
│ │ │ │ +
410 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
411
│ │ │ │ +
412
│ │ │ │ +
413 template< int dim >
│ │ │ │ +
414 inline ALBERTA NODE_PROJECTION *
│ │ │ │ +
415 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroEl, int n )
│ │ │ │ +
416 {
│ │ │ │ +
417 const MacroElement &macroElement = static_cast< const MacroElement & >( *macroEl );
│ │ │ │ +
418 if( (n > 0) && macroElement.isBoundary( n-1 ) )
│ │ │ │ +
419 return new BasicNodeProjection( Library< dimWorld >::boundaryCount++ );
│ │ │ │ +
420 else
│ │ │ │ +
421 return 0;
│ │ │ │ +
422 }
│ │ │ │ +
423
│ │ │ │ +
424
│ │ │ │ +
425 template< int dim >
│ │ │ │ +
426 template< class ProjectionFactory >
│ │ │ │ +
427 inline ALBERTA NODE_PROJECTION *
│ │ │ │ +
428 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroEl, int n )
│ │ │ │ +
429 {
│ │ │ │ +
430 typedef typename ProjectionFactory::Projection Projection;
│ │ │ │ +
431
│ │ │ │ +
432 const MacroElement &macroElement = static_cast< const MacroElement & >( *macroEl );
│ │ │ │ +
433
│ │ │ │ +
434 MeshPointer< dim > meshPointer( mesh );
│ │ │ │ +
435 ElementInfo elementInfo( meshPointer, macroElement, FillFlags::standard );
│ │ │ │ +
436 const ProjectionFactory &projectionFactory = *static_cast< const ProjectionFactory * >( Library< dimWorld >::projectionFactory );
│ │ │ │ +
437 if( (n > 0) && macroElement.isBoundary( n-1 ) )
│ │ │ │ +
438 {
│ │ │ │ +
439 const unsigned int boundaryIndex = Library< dimWorld >::boundaryCount++;
│ │ │ │ +
440 if( projectionFactory.hasProjection( elementInfo, n-1 ) )
│ │ │ │ +
441 {
│ │ │ │ +
442 Projection projection = projectionFactory.projection( elementInfo, n-1 );
│ │ │ │ +
443 return new NodeProjection< dim, Projection >( boundaryIndex, projection );
│ │ │ │ +
444 }
│ │ │ │ +
445 else
│ │ │ │ +
446 return new BasicNodeProjection( boundaryIndex );
│ │ │ │ +
447 }
│ │ │ │ +
448 else if( (dim < dimWorld) && (n == 0) )
│ │ │ │ +
449 {
│ │ │ │ +
450 const unsigned int boundaryIndex = std::numeric_limits< unsigned int >::max();
│ │ │ │ +
451 if( projectionFactory.hasProjection( elementInfo ) )
│ │ │ │ +
452 {
│ │ │ │ +
453 Projection projection = projectionFactory.projection( elementInfo );
│ │ │ │ +
454 return new NodeProjection< dim, Projection >( boundaryIndex, projection );
│ │ │ │ +
455 }
│ │ │ │ +
456 else
│ │ │ │ +
457 return 0;
│ │ │ │ +
458 }
│ │ │ │ +
459 else
│ │ │ │ +
460 return 0;
│ │ │ │ +
461 }
│ │ │ │ +
462
│ │ │ │ +
463 } // namespace Alberta
│ │ │ │ +
464
│ │ │ │ +
465} // namespace Dune
│ │ │ │ +
466
│ │ │ │ +
467#endif // #if HAVE_ALBERTA
│ │ │ │ +
468
│ │ │ │ +
469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's macro_data structure
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition defaultgridview.hh:79
│ │ │ │ -
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:152
│ │ │ │ -
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition defaultgridview.hh:138
│ │ │ │ -
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:145
│ │ │ │ -
Communication CollectiveCommunication
Definition defaultgridview.hh:102
│ │ │ │ -
IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition defaultgridview.hh:180
│ │ │ │ -
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:166
│ │ │ │ -
DefaultLevelGridViewTraits< GridImp > Traits
Definition defaultgridview.hh:83
│ │ │ │ -
const IndexSet & indexSet() const
obtain the index set
Definition defaultgridview.hh:123
│ │ │ │ -
const Communication & comm() const
obtain communication object
Definition defaultgridview.hh:186
│ │ │ │ -
static constexpr bool conforming
Definition defaultgridview.hh:108
│ │ │ │ -
Traits::IndexSet IndexSet
type of the index set
Definition defaultgridview.hh:89
│ │ │ │ -
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition defaultgridview.hh:205
│ │ │ │ -
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:95
│ │ │ │ -
int size(int codim) const
obtain number of entities in a given codimension
Definition defaultgridview.hh:132
│ │ │ │ -
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition defaultgridview.hh:192
│ │ │ │ -
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:159
│ │ │ │ -
IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition defaultgridview.hh:173
│ │ │ │ -
DefaultLevelGridView(const Grid &grid, int level)
Definition defaultgridview.hh:110
│ │ │ │ -
Traits::Intersection Intersection
type of the intersection
Definition defaultgridview.hh:92
│ │ │ │ -
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:98
│ │ │ │ -
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition defaultgridview.hh:129
│ │ │ │ -
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition defaultgridview.hh:198
│ │ │ │ -
Traits::Grid Grid
type of the grid
Definition defaultgridview.hh:86
│ │ │ │ -
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition defaultgridview.hh:116
│ │ │ │ -
Definition defaultgridview.hh:272
│ │ │ │ -
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition defaultgridview.hh:398
│ │ │ │ -
DefaultLeafGridViewTraits< GridImp > Traits
Definition defaultgridview.hh:276
│ │ │ │ -
Communication CollectiveCommunication
Definition defaultgridview.hh:295
│ │ │ │ -
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:359
│ │ │ │ -
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition defaultgridview.hh:309
│ │ │ │ -
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:345
│ │ │ │ -
IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition defaultgridview.hh:366
│ │ │ │ -
Traits::Intersection Intersection
type of the intersection
Definition defaultgridview.hh:285
│ │ │ │ -
IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition defaultgridview.hh:373
│ │ │ │ -
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition defaultgridview.hh:352
│ │ │ │ -
Traits::Grid Grid
type of the grid
Definition defaultgridview.hh:279
│ │ │ │ -
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition defaultgridview.hh:331
│ │ │ │ -
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition defaultgridview.hh:322
│ │ │ │ -
Traits::IndexSet IndexSet
type of the index set
Definition defaultgridview.hh:282
│ │ │ │ -
const Communication & comm() const
obtain communication object
Definition defaultgridview.hh:379
│ │ │ │ -
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:291
│ │ │ │ -
DefaultLeafGridView(const Grid &grid)
Definition defaultgridview.hh:304
│ │ │ │ -
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition defaultgridview.hh:385
│ │ │ │ -
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition defaultgridview.hh:338
│ │ │ │ -
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition defaultgridview.hh:391
│ │ │ │ -
int size(int codim) const
obtain number of entities in a given codimension
Definition defaultgridview.hh:325
│ │ │ │ -
const IndexSet & indexSet() const
obtain the index set
Definition defaultgridview.hh:316
│ │ │ │ -
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:288
│ │ │ │ -
static constexpr bool conforming
Definition defaultgridview.hh:301
│ │ │ │ -
Definition defaultgridview.hh:26
│ │ │ │ -
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:43
│ │ │ │ -
static constexpr bool conforming
Definition defaultgridview.hh:73
│ │ │ │ -
Grid::Traits::LevelIntersection Intersection
type of the intersection
Definition defaultgridview.hh:36
│ │ │ │ -
Grid::Traits::LevelIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:40
│ │ │ │ -
Grid::Traits::LevelIndexSet IndexSet
type of the index set
Definition defaultgridview.hh:33
│ │ │ │ -
Communication CollectiveCommunication
Definition defaultgridview.hh:47
│ │ │ │ -
std::remove_const< GridImp >::type Grid
type of the grid
Definition defaultgridview.hh:30
│ │ │ │ -
DefaultLevelGridView< GridImp > GridViewImp
Definition defaultgridview.hh:27
│ │ │ │ -
Definition defaultgridview.hh:51
│ │ │ │ -
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator Iterator
Definition defaultgridview.hh:54
│ │ │ │ -
Grid::Traits::template Codim< cd >::Entity Entity
Definition defaultgridview.hh:56
│ │ │ │ -
Grid::template Codim< cd >::Geometry Geometry
Definition defaultgridview.hh:58
│ │ │ │ -
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition defaultgridview.hh:60
│ │ │ │ -
Define types needed to iterate over entities of a given partition type.
Definition defaultgridview.hh:65
│ │ │ │ -
Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
iterator over a given codim and partition type
Definition defaultgridview.hh:69
│ │ │ │ -
Codim Structure.
Definition defaultgridview.hh:106
│ │ │ │ -
Definition defaultgridview.hh:219
│ │ │ │ -
std::remove_const< GridImp >::type Grid
type of the grid
Definition defaultgridview.hh:223
│ │ │ │ -
DefaultLeafGridView< GridImp > GridViewImp
Definition defaultgridview.hh:220
│ │ │ │ -
static constexpr bool conforming
Definition defaultgridview.hh:266
│ │ │ │ -
Communication CollectiveCommunication
Definition defaultgridview.hh:240
│ │ │ │ -
Grid::Traits::LeafIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition defaultgridview.hh:233
│ │ │ │ -
Grid::Traits::LeafIntersection Intersection
type of the intersection
Definition defaultgridview.hh:229
│ │ │ │ -
Grid::Traits::LeafIndexSet IndexSet
type of the index set
Definition defaultgridview.hh:226
│ │ │ │ -
Grid::Traits::Communication Communication
type of the communication
Definition defaultgridview.hh:236
│ │ │ │ -
Definition defaultgridview.hh:244
│ │ │ │ -
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LeafIterator Iterator
Definition defaultgridview.hh:247
│ │ │ │ -
Grid::Traits::template Codim< cd >::Entity Entity
Definition defaultgridview.hh:249
│ │ │ │ -
Grid::template Codim< cd >::Geometry Geometry
Definition defaultgridview.hh:251
│ │ │ │ -
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition defaultgridview.hh:253
│ │ │ │ -
Define types needed to iterate over entities of a given partition type.
Definition defaultgridview.hh:258
│ │ │ │ -
Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
iterator over a given codim and partition type
Definition defaultgridview.hh:262
│ │ │ │ -
Codim Structure.
Definition defaultgridview.hh:299
│ │ │ │ -
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
A set of traits classes to store static information about grid implementation.
│ │ │ │ - │ │ │ │ +
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
static const int meshRefined
Definition misc.hh:56
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │ +
static const int meshCoarsened
Definition misc.hh:57
│ │ │ │ +
Definition meshpointer.hh:40
│ │ │ │ +
int numMacroElements() const
Definition meshpointer.hh:257
│ │ │ │ +
unsigned int create(const MacroData< dim > &macroData, const ProjectionFactoryInterface< Proj, Impl > &projectionFactory)
Definition meshpointer.hh:312
│ │ │ │ +
void release()
Definition meshpointer.hh:361
│ │ │ │ +
unsigned int read(const std::string &filename, Real &time)
Definition meshpointer.hh:342
│ │ │ │ +
MacroIterator end() const
Definition meshpointer.hh:76
│ │ │ │ +
bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing)
Definition meshpointer.hh:398
│ │ │ │ +
int size(int codim) const
│ │ │ │ +
unsigned int create(const std::string &filename, bool binary=false)
Definition meshpointer.hh:331
│ │ │ │ +
void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:385
│ │ │ │ +
unsigned int create(const MacroData< dim > &macroData)
Definition meshpointer.hh:299
│ │ │ │ +
MacroIterator begin() const
Definition meshpointer.hh:71
│ │ │ │ +
MeshPointer(Mesh *mesh)
Definition meshpointer.hh:57
│ │ │ │ +
bool write(const std::string &filename, Real time) const
Definition meshpointer.hh:353
│ │ │ │ +
bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing)
Definition meshpointer.hh:407
│ │ │ │ +
MeshPointer()
Definition meshpointer.hh:53
│ │ │ │ +
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ │ +
Definition elementinfo.hh:43
│ │ │ │ +
void hierarchicTraverse(Functor &functor) const
Definition elementinfo.hh:695
│ │ │ │ +
void leafTraverse(Functor &functor) const
Definition elementinfo.hh:708
│ │ │ │ +
Definition macrodata.hh:30
│ │ │ │ +
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ │ +
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ │ +
Definition macroelement.hh:24
│ │ │ │ +
bool isBoundary(const int face) const
Definition macroelement.hh:42
│ │ │ │ +
Definition meshpointer.hh:167
│ │ │ │ +
const MeshPointer & mesh() const
Definition meshpointer.hh:211
│ │ │ │ +
const MacroElement & macroElement() const
Definition meshpointer.hh:205
│ │ │ │ +
Alberta::ElementInfo< dim > ElementInfo
Definition meshpointer.hh:174
│ │ │ │ +
Alberta::MeshPointer< dim > MeshPointer
Definition meshpointer.hh:173
│ │ │ │ +
ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:238
│ │ │ │ +
bool done() const
Definition meshpointer.hh:189
│ │ │ │ +
void increment()
Definition meshpointer.hh:199
│ │ │ │ +
bool equals(const MacroIterator &other) const
Definition meshpointer.hh:194
│ │ │ │ +
MacroIterator()
Definition meshpointer.hh:176
│ │ │ │ +
Definition misc.hh:231
│ │ │ │ +
static const Flags nothing
Definition misc.hh:234
│ │ │ │ +
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ │ +
static const Flags standard
Definition misc.hh:258
│ │ │ │ +
Definition albertagrid/projection.hh:135
│ │ │ │ +
Base::Projection Projection
Definition albertagrid/projection.hh:140
│ │ │ │ +
Definition albertagrid/projection.hh:80
│ │ │ │ +
Definition albertagrid/projection.hh:208
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,690 +1,643 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ -defaultgridview.hh │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ +meshpointer.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH │ │ │ │ │ -6#define DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_v_i_e_w_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 template< class GridImp > │ │ │ │ │ -18 class DefaultLevelGridView; │ │ │ │ │ -19 │ │ │ │ │ -20 template< class GridImp > │ │ │ │ │ -21 class DefaultLeafGridView; │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ +20 │ │ │ │ │ +21#if HAVE_ALBERTA │ │ │ │ │ 22 │ │ │ │ │ -23 │ │ │ │ │ -24 template< class GridImp > │ │ │ │ │ -_2_5 struct _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s │ │ │ │ │ -26 { │ │ │ │ │ -_2_7 typedef _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _G_r_i_d_V_i_e_w_I_m_p; │ │ │ │ │ +23namespace _D_u_n_e │ │ │ │ │ +24{ │ │ │ │ │ +25 │ │ │ │ │ +26 namespace Alberta │ │ │ │ │ +27 { │ │ │ │ │ 28 │ │ │ │ │ -_3_0 typedef typename std::remove_const::type _G_r_i_d; │ │ │ │ │ +29 // External Forward Declarations │ │ │ │ │ +30 // ----------------------------- │ │ │ │ │ 31 │ │ │ │ │ -_3_3 typedef typename Grid :: Traits :: LevelIndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ +32 template< int dim > │ │ │ │ │ +33 class HierarchyDofNumbering; │ │ │ │ │ 34 │ │ │ │ │ -_3_6 typedef typename Grid :: Traits :: LevelIntersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +35 // MeshPointer │ │ │ │ │ +36 // ----------- │ │ │ │ │ 37 │ │ │ │ │ -39 typedef typename Grid :: Traits :: LevelIntersectionIterator │ │ │ │ │ -_4_0 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -41 │ │ │ │ │ -_4_3 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +38 template< int dim > │ │ │ │ │ +_3_9 class _M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +40 { │ │ │ │ │ +41 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +42 typedef typename _E_l_e_m_e_n_t_I_n_f_o_:_:_M_a_c_r_o_E_l_e_m_e_n_t _M_a_c_r_o_E_l_e_m_e_n_t; │ │ │ │ │ +43 typedef typename _E_l_e_m_e_n_t_I_n_f_o_:_:_F_i_l_l_F_l_a_g_s _F_i_l_l_F_l_a_g_s; │ │ │ │ │ 44 │ │ │ │ │ -46 [[deprecated("Use Communication instead!")]] │ │ │ │ │ -_4_7 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -48 │ │ │ │ │ -49 template< int cd > │ │ │ │ │ -_5_0 struct _C_o_d_i_m │ │ │ │ │ -51 { │ │ │ │ │ -52 typedef typename Grid :: Traits │ │ │ │ │ -53 :: template _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _A_l_l___P_a_r_t_i_t_i_o_n_ _> :: │ │ │ │ │ -LevelIterator │ │ │ │ │ -_5_4 _I_t_e_r_a_t_o_r; │ │ │ │ │ -55 │ │ │ │ │ -_5_6 typedef typename Grid :: Traits :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -57 │ │ │ │ │ -_5_8 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -59 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -_6_0 _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -61 │ │ │ │ │ -63 template< PartitionIteratorType pit > │ │ │ │ │ -_6_4 struct _P_a_r_t_i_t_i_o_n │ │ │ │ │ -65 { │ │ │ │ │ -67 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ -68 :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: LevelIterator │ │ │ │ │ -_6_9 _I_t_e_r_a_t_o_r; │ │ │ │ │ -70 }; │ │ │ │ │ -71 }; │ │ │ │ │ -72 │ │ │ │ │ -_7_3 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Capabilities :: isLevelwiseConforming< │ │ │ │ │ -Grid > :: v; │ │ │ │ │ -74 }; │ │ │ │ │ +45 class BoundaryProvider; │ │ │ │ │ +46 │ │ │ │ │ +47 template< int dimWorld > │ │ │ │ │ +48 struct Library; │ │ │ │ │ +49 │ │ │ │ │ +50 public: │ │ │ │ │ +51 class _M_a_c_r_o_I_t_e_r_a_t_o_r; │ │ │ │ │ +52 │ │ │ │ │ +_5_3 _M_e_s_h_P_o_i_n_t_e_r () │ │ │ │ │ +54 : mesh_( 0 ) │ │ │ │ │ +55 {} │ │ │ │ │ +56 │ │ │ │ │ +_5_7 explicit _M_e_s_h_P_o_i_n_t_e_r ( _M_e_s_h *mesh ) │ │ │ │ │ +58 : mesh_( mesh ) │ │ │ │ │ +59 {} │ │ │ │ │ +60 │ │ │ │ │ +_6_1 operator _M_e_s_h * () const │ │ │ │ │ +62 { │ │ │ │ │ +63 return mesh_; │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +_6_6 explicit operator bool () const │ │ │ │ │ +67 { │ │ │ │ │ +68 return (bool)mesh_; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 _M_a_c_r_o_I_t_e_r_a_t_o_r _b_e_g_i_n () const │ │ │ │ │ +72 { │ │ │ │ │ +73 return _M_a_c_r_o_I_t_e_r_a_t_o_r( *this, false ); │ │ │ │ │ +74 } │ │ │ │ │ 75 │ │ │ │ │ -76 │ │ │ │ │ -77 template< class GridImp > │ │ │ │ │ -_7_8 class _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -79 { │ │ │ │ │ -80 typedef _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s_T_y_p_e; │ │ │ │ │ -81 │ │ │ │ │ -82 public: │ │ │ │ │ -_8_3 typedef _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_G_r_i_d_I_m_p_> _T_r_a_i_t_s; │ │ │ │ │ -84 │ │ │ │ │ -_8_6 typedef typename _T_r_a_i_t_s_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ -87 │ │ │ │ │ -_8_9 typedef typename Traits :: IndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ -90 │ │ │ │ │ -_9_2 typedef typename Traits :: Intersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -93 │ │ │ │ │ -_9_5 typedef typename Traits :: IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +_7_6 _M_a_c_r_o_I_t_e_r_a_t_o_r _e_n_d () const │ │ │ │ │ +77 { │ │ │ │ │ +78 return _M_a_c_r_o_I_t_e_r_a_t_o_r( *this, true ); │ │ │ │ │ +79 } │ │ │ │ │ +80 │ │ │ │ │ +_8_1 int _n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s () const; │ │ │ │ │ +_8_2 int _s_i_z_e ( int codim ) const; │ │ │ │ │ +83 │ │ │ │ │ +84 // create a mesh from a macrodata structure │ │ │ │ │ +85 // params: macroData - macro data structure │ │ │ │ │ +86 // returns: number of boundary segments │ │ │ │ │ +_8_7 unsigned int _c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData ); │ │ │ │ │ +88 │ │ │ │ │ +89 // create a mesh from a macrodata structure, adding projections │ │ │ │ │ +90 // params: macroData - macro data structure │ │ │ │ │ +91 // projectionFactory - factory for the projections │ │ │ │ │ +92 // returns: number of boundary segments │ │ │ │ │ +93 template< class Proj, class Impl > │ │ │ │ │ +_9_4 unsigned int _c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData, │ │ │ │ │ +95 const _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory ); │ │ │ │ │ 96 │ │ │ │ │ -_9_8 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -99 │ │ │ │ │ -101 [[deprecated("Use Communication instead!")]] │ │ │ │ │ -_1_0_2 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -103 │ │ │ │ │ -105 template< int cd > │ │ │ │ │ -_1_0_6 struct _C_o_d_i_m : public _T_r_a_i_t_s :: _t_e_m_p_l_a_t_e _C_o_d_i_m {}; │ │ │ │ │ -107 │ │ │ │ │ -_1_0_8 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Traits :: conforming; │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 _D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w ( const _G_r_i_d &_g_r_i_d, int level ) │ │ │ │ │ -111 : grid_( &_g_r_i_d ), │ │ │ │ │ -112 level_( level ) │ │ │ │ │ -113 {} │ │ │ │ │ -114 │ │ │ │ │ -_1_1_6 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ -117 { │ │ │ │ │ -118 _a_s_s_e_r_t( grid_ ); │ │ │ │ │ -119 return *grid_; │ │ │ │ │ -120 } │ │ │ │ │ +97 // create a mesh from a file │ │ │ │ │ +98 // params: filename - file name of an Alberta macro triangulation │ │ │ │ │ +99 // binary - read binary? │ │ │ │ │ +100 // returns: number of boundary segments │ │ │ │ │ +_1_0_1 unsigned int _c_r_e_a_t_e ( const std::string &filename, bool binary = false ); │ │ │ │ │ +102 │ │ │ │ │ +103 // read back a mesh from a file │ │ │ │ │ +104 // params: filename - file name of an Alberta save file │ │ │ │ │ +105 // time - variable to receive the time stored in the file │ │ │ │ │ +106 // returns: number of boundary segments │ │ │ │ │ +107 // │ │ │ │ │ +108 // notes: - projections are not preserved │ │ │ │ │ +109 // - we assume that projections are added in the same order they │ │ │ │ │ +110 // inserted in when the grid was created (otherwise the boundary │ │ │ │ │ +111 // indices change) │ │ │ │ │ +_1_1_2 unsigned int _r_e_a_d ( const std::string &filename, _R_e_a_l &time ); │ │ │ │ │ +113 │ │ │ │ │ +_1_1_4 bool _w_r_i_t_e ( const std::string &filename, _R_e_a_l time ) const; │ │ │ │ │ +115 │ │ │ │ │ +_1_1_6 void _r_e_l_e_a_s_e (); │ │ │ │ │ +117 │ │ │ │ │ +118 template< class Functor > │ │ │ │ │ +_1_1_9 void _h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ +120 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ) const; │ │ │ │ │ 121 │ │ │ │ │ -_1_2_3 const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t () const │ │ │ │ │ -124 { │ │ │ │ │ -125 return _g_r_i_d().levelIndexSet( level_ ); │ │ │ │ │ -126 } │ │ │ │ │ +122 template< class Functor > │ │ │ │ │ +_1_2_3 void _l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ +124 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ) const; │ │ │ │ │ +125 │ │ │ │ │ +_1_2_6 bool _c_o_a_r_s_e_n ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ 127 │ │ │ │ │ -_1_2_9 bool _i_s_C_o_n_f_o_r_m_i_n_g() const { return _b_o_o_l(Traits::conforming); } │ │ │ │ │ -130 │ │ │ │ │ -_1_3_2 int _s_i_z_e ( int _c_o_d_i_m ) const │ │ │ │ │ -133 { │ │ │ │ │ -134 return _g_r_i_d().size( level_, _c_o_d_i_m ); │ │ │ │ │ -135 } │ │ │ │ │ +_1_2_8 bool _r_e_f_i_n_e ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ +129 │ │ │ │ │ +130 private: │ │ │ │ │ +131 static _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ +132 initNodeProjection ( [[maybe_unused]] _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ +*macroElement, int n ); │ │ │ │ │ +133 template< class ProjectionProvider > │ │ │ │ │ +134 static _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ +135 initNodeProjection ( _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL *macroElement, int n ); │ │ │ │ │ 136 │ │ │ │ │ -_1_3_8 int _s_i_z_e ( const GeometryType &type ) const │ │ │ │ │ -139 { │ │ │ │ │ -140 return _g_r_i_d().size( level_, type ); │ │ │ │ │ -141 } │ │ │ │ │ -142 │ │ │ │ │ -144 template< int cd > │ │ │ │ │ -_1_4_5 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _b_e_g_i_n () const │ │ │ │ │ -146 { │ │ │ │ │ -147 return _g_r_i_d().template _l_b_e_g_i_n_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level_ ); │ │ │ │ │ -148 } │ │ │ │ │ -149 │ │ │ │ │ -151 template< int cd, PartitionIteratorType pit > │ │ │ │ │ -_1_5_2 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _b_e_g_i_n () │ │ │ │ │ -const │ │ │ │ │ -153 { │ │ │ │ │ -154 return _g_r_i_d().template _l_b_e_g_i_n_<_ _c_d_,_ _p_i_t_ _>( level_ ); │ │ │ │ │ -155 } │ │ │ │ │ -156 │ │ │ │ │ -158 template< int cd > │ │ │ │ │ -_1_5_9 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _e_n_d () const │ │ │ │ │ -160 { │ │ │ │ │ -161 return _g_r_i_d().template _l_e_n_d_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level_ ); │ │ │ │ │ -162 } │ │ │ │ │ -163 │ │ │ │ │ -165 template< int cd, PartitionIteratorType pit > │ │ │ │ │ -_1_6_6 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _e_n_d () const │ │ │ │ │ +137 _M_e_s_h *mesh_; │ │ │ │ │ +138 }; │ │ │ │ │ +139 │ │ │ │ │ +140 │ │ │ │ │ +141 │ │ │ │ │ +142 // MeshPointer::Library │ │ │ │ │ +143 // -------------------- │ │ │ │ │ +144 │ │ │ │ │ +145 template< int dim > │ │ │ │ │ +146 template< int dimWorld > │ │ │ │ │ +147 struct _M_e_s_h_P_o_i_n_t_e_r< dim >::Library │ │ │ │ │ +148 { │ │ │ │ │ +149 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +150 │ │ │ │ │ +151 static inline unsigned int boundaryCount = 0; │ │ │ │ │ +152 static inline const void *projectionFactory = nullptr; │ │ │ │ │ +153 │ │ │ │ │ +154 static void │ │ │ │ │ +155 _c_r_e_a_t_e ( _M_e_s_h_P_o_i_n_t_e_r &ptr, const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData, │ │ │ │ │ +156 _A_L_B_E_R_T_A NODE_PROJECTION *(*initNodeProjection)( _M_e_s_h *, _A_L_B_E_R_T_A MACRO_EL *, │ │ │ │ │ +int ) ); │ │ │ │ │ +157 static void _r_e_l_e_a_s_e ( _M_e_s_h_P_o_i_n_t_e_r &ptr ); │ │ │ │ │ +158 }; │ │ │ │ │ +159 │ │ │ │ │ +160 │ │ │ │ │ +161 │ │ │ │ │ +162 // MeshPointer::MacroIterator │ │ │ │ │ +163 // -------------------------- │ │ │ │ │ +164 │ │ │ │ │ +165 template< int dim > │ │ │ │ │ +_1_6_6 class _M_e_s_h_P_o_i_n_t_e_r< dim >::_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ 167 { │ │ │ │ │ -168 return _g_r_i_d().template _l_e_n_d_<_ _c_d_,_ _p_i_t_ _>( level_ ); │ │ │ │ │ -169 } │ │ │ │ │ -170 │ │ │ │ │ -172 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_1_7_3 _i_b_e_g_i_n ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ -174 { │ │ │ │ │ -175 return entity.impl().ilevelbegin(); │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -179 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_1_8_0 _i_e_n_d ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ -181 { │ │ │ │ │ -182 return entity.impl().ilevelend(); │ │ │ │ │ -183 } │ │ │ │ │ -184 │ │ │ │ │ -_1_8_6 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ -187 { │ │ │ │ │ -188 return _g_r_i_d().comm(); │ │ │ │ │ -189 } │ │ │ │ │ -190 │ │ │ │ │ -_1_9_2 int _o_v_e_r_l_a_p_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ -193 { │ │ │ │ │ -194 return _g_r_i_d().overlapSize(level_, _c_o_d_i_m); │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -_1_9_8 int _g_h_o_s_t_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ -199 { │ │ │ │ │ -200 return _g_r_i_d().ghostSize(level_, _c_o_d_i_m); │ │ │ │ │ -201 } │ │ │ │ │ -202 │ │ │ │ │ -204 template< class DataHandleImp, class DataType > │ │ │ │ │ -_2_0_5 void _c_o_m_m_u_n_i_c_a_t_e ( _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_ _> &data, │ │ │ │ │ -206 _I_n_t_e_r_f_a_c_e_T_y_p_e _i_f_t_y_p_e, │ │ │ │ │ -207 _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n _d_i_r ) const │ │ │ │ │ -208 { │ │ │ │ │ -209 return _g_r_i_d().communicate( data, _i_f_t_y_p_e, _d_i_r, level_ ); │ │ │ │ │ -210 } │ │ │ │ │ -211 │ │ │ │ │ -212 private: │ │ │ │ │ -213 const _G_r_i_d *grid_; │ │ │ │ │ -214 int level_; │ │ │ │ │ -215 }; │ │ │ │ │ -216 │ │ │ │ │ -217 │ │ │ │ │ -218 template< class GridImp > │ │ │ │ │ -_2_1_9 struct _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s { │ │ │ │ │ -_2_2_0 typedef _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _G_r_i_d_V_i_e_w_I_m_p; │ │ │ │ │ +_1_6_8 typedef _M_a_c_r_o_I_t_e_r_a_t_o_r _T_h_i_s; │ │ │ │ │ +169 │ │ │ │ │ +170 friend class _M_e_s_h_P_o_i_n_t_e_r< dim >; │ │ │ │ │ +171 │ │ │ │ │ +172 public: │ │ │ │ │ +_1_7_3 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +_1_7_4 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +175 │ │ │ │ │ +_1_7_6 _M_a_c_r_o_I_t_e_r_a_t_o_r () │ │ │ │ │ +177 : mesh_(), │ │ │ │ │ +178 index_( -1 ) │ │ │ │ │ +179 {} │ │ │ │ │ +180 │ │ │ │ │ +181 private: │ │ │ │ │ +182 │ │ │ │ │ +183 explicit _M_a_c_r_o_I_t_e_r_a_t_o_r ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, bool _e_n_d = false ) │ │ │ │ │ +184 : mesh_( mesh ), │ │ │ │ │ +185 index_( _e_n_d ? mesh._n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s() : 0 ) │ │ │ │ │ +186 {} │ │ │ │ │ +187 │ │ │ │ │ +188 public: │ │ │ │ │ +_1_8_9 bool _d_o_n_e () const │ │ │ │ │ +190 { │ │ │ │ │ +191 return (index_ >= mesh()._n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s()); │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +_1_9_4 bool _e_q_u_a_l_s ( const _M_a_c_r_o_I_t_e_r_a_t_o_r &other ) const │ │ │ │ │ +195 { │ │ │ │ │ +196 return (index_ == other.index_); │ │ │ │ │ +197 } │ │ │ │ │ +198 │ │ │ │ │ +_1_9_9 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ +200 { │ │ │ │ │ +201 assert( !done() ); │ │ │ │ │ +202 ++index_; │ │ │ │ │ +203 } │ │ │ │ │ +204 │ │ │ │ │ +_2_0_5 const _M_a_c_r_o_E_l_e_m_e_n_t &_m_a_c_r_o_E_l_e_m_e_n_t () const │ │ │ │ │ +206 { │ │ │ │ │ +207 assert( !done() ); │ │ │ │ │ +208 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & >( mesh().mesh_->macro_els[ index_ │ │ │ │ │ +] ); │ │ │ │ │ +209 } │ │ │ │ │ +210 │ │ │ │ │ +_2_1_1 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h () const │ │ │ │ │ +212 { │ │ │ │ │ +213 return mesh_; │ │ │ │ │ +214 } │ │ │ │ │ +215 │ │ │ │ │ +_2_1_6 _T_h_i_s &operator++ () │ │ │ │ │ +217 { │ │ │ │ │ +218 increment(); │ │ │ │ │ +219 return *this; │ │ │ │ │ +220 } │ │ │ │ │ 221 │ │ │ │ │ -_2_2_3 typedef typename std::remove_const::type _G_r_i_d; │ │ │ │ │ -224 │ │ │ │ │ -_2_2_6 typedef typename Grid :: Traits :: LeafIndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ -227 │ │ │ │ │ -_2_2_9 typedef typename Grid :: Traits :: LeafIntersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -230 │ │ │ │ │ -232 typedef typename Grid :: Traits :: LeafIntersectionIterator │ │ │ │ │ -_2_3_3 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -234 │ │ │ │ │ -_2_3_6 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -237 │ │ │ │ │ -239 [[deprecated("Use Communication instead!")]] │ │ │ │ │ -_2_4_0 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -241 │ │ │ │ │ -242 template< int cd > │ │ │ │ │ -_2_4_3 struct _C_o_d_i_m │ │ │ │ │ -244 { │ │ │ │ │ -245 typedef typename Grid :: Traits │ │ │ │ │ -246 :: template _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _A_l_l___P_a_r_t_i_t_i_o_n_ _> :: │ │ │ │ │ -LeafIterator │ │ │ │ │ -_2_4_7 _I_t_e_r_a_t_o_r; │ │ │ │ │ -248 │ │ │ │ │ -_2_4_9 typedef typename Grid :: Traits :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_2_2_2 _E_l_e_m_e_n_t_I_n_f_o operator* () const │ │ │ │ │ +223 { │ │ │ │ │ +224 return elementInfo(); │ │ │ │ │ +225 } │ │ │ │ │ +226 │ │ │ │ │ +_2_2_7 bool operator== ( const _M_a_c_r_o_I_t_e_r_a_t_o_r &other ) const │ │ │ │ │ +228 { │ │ │ │ │ +229 return equals( other ); │ │ │ │ │ +230 } │ │ │ │ │ +231 │ │ │ │ │ +_2_3_2 bool operator!= ( const _M_a_c_r_o_I_t_e_r_a_t_o_r &other ) const │ │ │ │ │ +233 { │ │ │ │ │ +234 return !equals( other ); │ │ │ │ │ +235 } │ │ │ │ │ +236 │ │ │ │ │ +237 _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +_2_3_8 _e_l_e_m_e_n_t_I_n_f_o ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ) │ │ │ │ │ +const │ │ │ │ │ +239 { │ │ │ │ │ +240 if( done() ) │ │ │ │ │ +241 return _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ +242 else │ │ │ │ │ +243 return _E_l_e_m_e_n_t_I_n_f_o( mesh(), macroElement(), fillFlags ); │ │ │ │ │ +244 } │ │ │ │ │ +245 │ │ │ │ │ +246 private: │ │ │ │ │ +247 _M_e_s_h_P_o_i_n_t_e_r mesh_; │ │ │ │ │ +248 int index_; │ │ │ │ │ +249 }; │ │ │ │ │ 250 │ │ │ │ │ -_2_5_1 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -252 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> _:_:_ _L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -_2_5_3 _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -254 │ │ │ │ │ -256 template │ │ │ │ │ -_2_5_7 struct _P_a_r_t_i_t_i_o_n │ │ │ │ │ +251 │ │ │ │ │ +252 │ │ │ │ │ +253 // Implementation of MeshPointer │ │ │ │ │ +254 // ----------------------------- │ │ │ │ │ +255 │ │ │ │ │ +256 template< int dim > │ │ │ │ │ +_2_5_7 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s () const │ │ │ │ │ 258 { │ │ │ │ │ -260 typedef typename Grid :: template _C_o_d_i_m_<_ _c_d_ _> │ │ │ │ │ -261 :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: LeafIterator │ │ │ │ │ -_2_6_2 _I_t_e_r_a_t_o_r; │ │ │ │ │ -263 }; │ │ │ │ │ -264 }; │ │ │ │ │ -265 │ │ │ │ │ -_2_6_6 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Capabilities :: isLeafwiseConforming< │ │ │ │ │ -Grid > :: v; │ │ │ │ │ -267 }; │ │ │ │ │ -268 │ │ │ │ │ +259 return (mesh_ ? mesh_->n_macro_el : 0); │ │ │ │ │ +260 } │ │ │ │ │ +261 │ │ │ │ │ +262 │ │ │ │ │ +263 template<> │ │ │ │ │ +_2_6_4 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _1_ _>_:_:_s_i_z_e( int codim ) const │ │ │ │ │ +265 { │ │ │ │ │ +266 assert( (codim >= 0) && (codim <= 1) ); │ │ │ │ │ +267 return (codim == 0 ? mesh_->n_elements : mesh_->n_vertices); │ │ │ │ │ +268 } │ │ │ │ │ 269 │ │ │ │ │ -270 template< class GridImp > │ │ │ │ │ -_2_7_1 class _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ +270 template<> │ │ │ │ │ +_2_7_1 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _2_ _>_:_:_s_i_z_e( int codim ) const │ │ │ │ │ 272 { │ │ │ │ │ -273 typedef _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s_T_y_p_e; │ │ │ │ │ -274 │ │ │ │ │ -275 public: │ │ │ │ │ -_2_7_6 typedef _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_<_G_r_i_d_I_m_p_> _T_r_a_i_t_s; │ │ │ │ │ -277 │ │ │ │ │ -_2_7_9 typedef typename _T_r_a_i_t_s_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ -280 │ │ │ │ │ -_2_8_2 typedef typename Traits :: IndexSet _I_n_d_e_x_S_e_t; │ │ │ │ │ -283 │ │ │ │ │ -_2_8_5 typedef typename Traits :: Intersection _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -286 │ │ │ │ │ -_2_8_8 typedef typename Traits :: IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -289 │ │ │ │ │ -_2_9_1 typedef typename Grid :: Traits :: Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -292 │ │ │ │ │ -294 [[deprecated("Use Communication instead!")]] │ │ │ │ │ -_2_9_5 typedef _C_o_m_m_u_n_i_c_a_t_i_o_n _C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +273 assert( (codim >= 0) && (codim <= 2) ); │ │ │ │ │ +274 if( codim == 0 ) │ │ │ │ │ +275 return mesh_->n_elements; │ │ │ │ │ +276 else if( codim == 2 ) │ │ │ │ │ +277 return mesh_->n_vertices; │ │ │ │ │ +278 else │ │ │ │ │ +279 return mesh_->n_edges; │ │ │ │ │ +280 } │ │ │ │ │ +281 │ │ │ │ │ +282 template<> │ │ │ │ │ +_2_8_3 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _3_ _>_:_:_s_i_z_e( int codim ) const │ │ │ │ │ +284 { │ │ │ │ │ +285 assert( (codim >= 0) && (codim <= 3) ); │ │ │ │ │ +286 if( codim == 0 ) │ │ │ │ │ +287 return mesh_->n_elements; │ │ │ │ │ +288 else if( codim == 3 ) │ │ │ │ │ +289 return mesh_->n_vertices; │ │ │ │ │ +290 else if( codim == 1 ) │ │ │ │ │ +291 return mesh_->n_faces; │ │ │ │ │ +292 else │ │ │ │ │ +293 return mesh_->n_edges; │ │ │ │ │ +294 } │ │ │ │ │ +295 │ │ │ │ │ 296 │ │ │ │ │ -298 template< int cd > │ │ │ │ │ -_2_9_9 struct _C_o_d_i_m : public _T_r_a_i_t_s :: _t_e_m_p_l_a_t_e _C_o_d_i_m {}; │ │ │ │ │ -300 │ │ │ │ │ -_3_0_1 constexpr static bool _c_o_n_f_o_r_m_i_n_g = Traits :: conforming; │ │ │ │ │ +297 template< int dim > │ │ │ │ │ +298 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +_2_9_9_ _:_:_c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData ) │ │ │ │ │ +300 { │ │ │ │ │ +301 release(); │ │ │ │ │ 302 │ │ │ │ │ -303 public: │ │ │ │ │ -_3_0_4 _D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w ( const _G_r_i_d &_g_r_i_d ) │ │ │ │ │ -305 : grid_( &_g_r_i_d ) │ │ │ │ │ -306 {} │ │ │ │ │ +303 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ +304 Library< dimWorld >::create( *this, macroData, &initNodeProjection ); │ │ │ │ │ +305 return Library< dimWorld >::boundaryCount; │ │ │ │ │ +306 } │ │ │ │ │ 307 │ │ │ │ │ -_3_0_9 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ -310 { │ │ │ │ │ -311 _a_s_s_e_r_t( grid_ ); │ │ │ │ │ -312 return *grid_; │ │ │ │ │ -313 } │ │ │ │ │ -314 │ │ │ │ │ -_3_1_6 const _I_n_d_e_x_S_e_t &_i_n_d_e_x_S_e_t () const │ │ │ │ │ -317 { │ │ │ │ │ -318 return _g_r_i_d().leafIndexSet(); │ │ │ │ │ -319 } │ │ │ │ │ -320 │ │ │ │ │ -_3_2_2 bool _i_s_C_o_n_f_o_r_m_i_n_g() const { return _b_o_o_l(Traits::conforming); } │ │ │ │ │ -323 │ │ │ │ │ -_3_2_5 int _s_i_z_e ( int _c_o_d_i_m ) const │ │ │ │ │ -326 { │ │ │ │ │ -327 return _g_r_i_d().size( _c_o_d_i_m ); │ │ │ │ │ -328 } │ │ │ │ │ -329 │ │ │ │ │ -_3_3_1 int _s_i_z_e ( const GeometryType &type ) const │ │ │ │ │ +308 │ │ │ │ │ +309 template< int dim > │ │ │ │ │ +310 template< class Proj, class Impl > │ │ │ │ │ +311 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +_3_1_2_ _:_:_c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData, │ │ │ │ │ +313 const _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory ) │ │ │ │ │ +314 { │ │ │ │ │ +315 typedef _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ +316 │ │ │ │ │ +317 release(); │ │ │ │ │ +318 │ │ │ │ │ +319 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ +320 Library< dimWorld >::projectionFactory = &projectionFactory; │ │ │ │ │ +321 Library< dimWorld >::create( *this, macroData, &initNodeProjection< │ │ │ │ │ +ProjectionFactory > ); │ │ │ │ │ +322 Library< dimWorld >::projectionFactory = nullptr; │ │ │ │ │ +323 return Library< dimWorld >::boundaryCount; │ │ │ │ │ +324 } │ │ │ │ │ +325 │ │ │ │ │ +326 │ │ │ │ │ +327 │ │ │ │ │ +328 │ │ │ │ │ +329 template< int dim > │ │ │ │ │ +330 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +_3_3_1_ _:_:_c_r_e_a_t_e ( const std::string &filename, bool binary ) │ │ │ │ │ 332 { │ │ │ │ │ -333 return _g_r_i_d().size( type ); │ │ │ │ │ -334 } │ │ │ │ │ -335 │ │ │ │ │ -337 template< int cd > │ │ │ │ │ -_3_3_8 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _b_e_g_i_n () const │ │ │ │ │ -339 { │ │ │ │ │ -340 return _g_r_i_d().template _l_e_a_f_b_e_g_i_n_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ -341 } │ │ │ │ │ -342 │ │ │ │ │ -344 template< int cd, PartitionIteratorType pit > │ │ │ │ │ -_3_4_5 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _b_e_g_i_n () │ │ │ │ │ -const │ │ │ │ │ -346 { │ │ │ │ │ -347 return _g_r_i_d().template _l_e_a_f_b_e_g_i_n_<_ _c_d_,_ _p_i_t_ _>(); │ │ │ │ │ -348 } │ │ │ │ │ -349 │ │ │ │ │ -351 template< int cd > │ │ │ │ │ -_3_5_2 typename _C_o_d_i_m_<_ _c_d_ _> :: Iterator _e_n_d () const │ │ │ │ │ -353 { │ │ │ │ │ -354 return _g_r_i_d().template _l_e_a_f_e_n_d_<_ _c_d_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>(); │ │ │ │ │ -355 } │ │ │ │ │ -356 │ │ │ │ │ -358 template< int cd, PartitionIteratorType pit > │ │ │ │ │ -_3_5_9 typename _C_o_d_i_m_<_ _c_d_ _> :: template _P_a_r_t_i_t_i_o_n_<_ _p_i_t_ _> :: Iterator _e_n_d () const │ │ │ │ │ -360 { │ │ │ │ │ -361 return _g_r_i_d().template _l_e_a_f_e_n_d_<_ _c_d_,_ _p_i_t_ _>(); │ │ │ │ │ -362 } │ │ │ │ │ -363 │ │ │ │ │ -365 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_3_6_6 _i_b_e_g_i_n ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ -367 { │ │ │ │ │ -368 return entity.impl().ileafbegin(); │ │ │ │ │ -369 } │ │ │ │ │ -370 │ │ │ │ │ -372 _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -_3_7_3 _i_e_n_d ( const typename _C_o_d_i_m_<_ _0_ _>_ _:_:_ _E_n_t_i_t_y &entity ) const │ │ │ │ │ -374 { │ │ │ │ │ -375 return entity.impl().ileafend(); │ │ │ │ │ -376 } │ │ │ │ │ -377 │ │ │ │ │ -_3_7_9 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ -380 { │ │ │ │ │ -381 return _g_r_i_d().comm(); │ │ │ │ │ -382 } │ │ │ │ │ -383 │ │ │ │ │ -_3_8_5 int _o_v_e_r_l_a_p_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ -386 { │ │ │ │ │ -387 return _g_r_i_d().overlapSize(_c_o_d_i_m); │ │ │ │ │ -388 } │ │ │ │ │ -389 │ │ │ │ │ -_3_9_1 int _g_h_o_s_t_S_i_z_e(int _c_o_d_i_m) const │ │ │ │ │ -392 { │ │ │ │ │ -393 return _g_r_i_d().ghostSize(_c_o_d_i_m); │ │ │ │ │ +333 _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> macroData; │ │ │ │ │ +334 macroData._r_e_a_d( filename, binary ); │ │ │ │ │ +335 const unsigned int boundaryCount = create( macroData ); │ │ │ │ │ +336 macroData._r_e_l_e_a_s_e(); │ │ │ │ │ +337 return boundaryCount; │ │ │ │ │ +338 } │ │ │ │ │ +339 │ │ │ │ │ +340 │ │ │ │ │ +341 template< int dim > │ │ │ │ │ +_3_4_2 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_r_e_a_d ( const std::string &filename, │ │ │ │ │ +_R_e_a_l &time ) │ │ │ │ │ +343 { │ │ │ │ │ +344 release(); │ │ │ │ │ +345 │ │ │ │ │ +346 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ +347 mesh_ = _A_L_B_E_R_T_A read_mesh_xdr( filename.c_str(), &time, NULL, NULL ); │ │ │ │ │ +348 return Library< dimWorld >::boundaryCount; │ │ │ │ │ +349 } │ │ │ │ │ +350 │ │ │ │ │ +351 │ │ │ │ │ +352 template< int dim > │ │ │ │ │ +_3_5_3 inline bool _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_w_r_i_t_e ( const std::string &filename, _R_e_a_l │ │ │ │ │ +time ) const │ │ │ │ │ +354 { │ │ │ │ │ +355 int success = _A_L_B_E_R_T_A write_mesh_xdr( mesh_, filename.c_str(), time ); │ │ │ │ │ +356 return (success == 0); │ │ │ │ │ +357 } │ │ │ │ │ +358 │ │ │ │ │ +359 │ │ │ │ │ +360 template< int dim > │ │ │ │ │ +_3_6_1 inline void _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_r_e_l_e_a_s_e () │ │ │ │ │ +362 { │ │ │ │ │ +363 Library< dimWorld >::release( *this ); │ │ │ │ │ +364 } │ │ │ │ │ +365 │ │ │ │ │ +366 │ │ │ │ │ +367 template< int dim > │ │ │ │ │ +368 template< class Functor > │ │ │ │ │ +369 inline void _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +_3_7_0_ _:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ +371 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) const │ │ │ │ │ +372 { │ │ │ │ │ +373 const _M_a_c_r_o_I_t_e_r_a_t_o_r eit = end(); │ │ │ │ │ +374 for( _M_a_c_r_o_I_t_e_r_a_t_o_r it = begin(); it != eit; ++it ) │ │ │ │ │ +375 { │ │ │ │ │ +376 const _E_l_e_m_e_n_t_I_n_f_o info = it.elementInfo( fillFlags ); │ │ │ │ │ +377 info._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( functor ); │ │ │ │ │ +378 } │ │ │ │ │ +379 } │ │ │ │ │ +380 │ │ │ │ │ +381 │ │ │ │ │ +382 template< int dim > │ │ │ │ │ +383 template< class Functor > │ │ │ │ │ +384 inline void _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ +_3_8_5_ _:_:_l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ +386 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) const │ │ │ │ │ +387 { │ │ │ │ │ +388 const _M_a_c_r_o_I_t_e_r_a_t_o_r eit = end(); │ │ │ │ │ +389 for( _M_a_c_r_o_I_t_e_r_a_t_o_r it = begin(); it != eit; ++it ) │ │ │ │ │ +390 { │ │ │ │ │ +391 const _E_l_e_m_e_n_t_I_n_f_o info = it.elementInfo( fillFlags ); │ │ │ │ │ +392 info._l_e_a_f_T_r_a_v_e_r_s_e( functor ); │ │ │ │ │ +393 } │ │ │ │ │ 394 } │ │ │ │ │ 395 │ │ │ │ │ -397 template< class DataHandleImp, class DataType > │ │ │ │ │ -_3_9_8 void _c_o_m_m_u_n_i_c_a_t_e ( _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_ _> &data, │ │ │ │ │ -399 _I_n_t_e_r_f_a_c_e_T_y_p_e _i_f_t_y_p_e, │ │ │ │ │ -400 _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n _d_i_r ) const │ │ │ │ │ -401 { │ │ │ │ │ -402 return _g_r_i_d().communicate( data, _i_f_t_y_p_e, _d_i_r ); │ │ │ │ │ -403 } │ │ │ │ │ -404 │ │ │ │ │ -405 private: │ │ │ │ │ -406 const _G_r_i_d *grid_; │ │ │ │ │ -407 }; │ │ │ │ │ -408 │ │ │ │ │ -409} │ │ │ │ │ -410 │ │ │ │ │ -411#endif │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n │ │ │ │ │ -CommunicationDirection │ │ │ │ │ -Define a type for communication direction parameter. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ │ -InterfaceType │ │ │ │ │ -Parameter to be used for the communication functions. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:86 │ │ │ │ │ +396 │ │ │ │ │ +397 template< int dim > │ │ │ │ │ +_3_9_8 inline bool _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_c_o_a_r_s_e_n ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ +fillFlags ) │ │ │ │ │ +399 { │ │ │ │ │ +400 const bool coarsened = (_A_L_B_E_R_T_A coarsen( mesh_, fillFlags ) == │ │ │ │ │ +_m_e_s_h_C_o_a_r_s_e_n_e_d); │ │ │ │ │ +401 if( coarsened ) │ │ │ │ │ +402 _A_L_B_E_R_T_A dof_compress( mesh_ ); │ │ │ │ │ +403 return coarsened; │ │ │ │ │ +404 } │ │ │ │ │ +405 │ │ │ │ │ +406 template< int dim > │ │ │ │ │ +_4_0_7 inline bool _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_r_e_f_i_n_e ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ +fillFlags ) │ │ │ │ │ +408 { │ │ │ │ │ +409 return (_A_L_B_E_R_T_A refine( mesh_, fillFlags ) == _m_e_s_h_R_e_f_i_n_e_d); │ │ │ │ │ +410 } │ │ │ │ │ +411 │ │ │ │ │ +412 │ │ │ │ │ +413 template< int dim > │ │ │ │ │ +414 inline _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ +415 _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_i_n_i_t_N_o_d_e_P_r_o_j_e_c_t_i_o_n ( _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ +*macroEl, int n ) │ │ │ │ │ +416 { │ │ │ │ │ +417 const _M_a_c_r_o_E_l_e_m_e_n_t ¯oElement = static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & > │ │ │ │ │ +( *macroEl ); │ │ │ │ │ +418 if( (n > 0) && macroElement._i_s_B_o_u_n_d_a_r_y( n-1 ) ) │ │ │ │ │ +419 return new _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n( Library< dimWorld >::boundaryCount++ ); │ │ │ │ │ +420 else │ │ │ │ │ +421 return 0; │ │ │ │ │ +422 } │ │ │ │ │ +423 │ │ │ │ │ +424 │ │ │ │ │ +425 template< int dim > │ │ │ │ │ +426 template< class ProjectionFactory > │ │ │ │ │ +427 inline _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ +428 MeshPointer< dim >::initNodeProjection ( _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ +*macroEl, int n ) │ │ │ │ │ +429 { │ │ │ │ │ +430 typedef typename _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_:_:_P_r_o_j_e_c_t_i_o_n Projection; │ │ │ │ │ +431 │ │ │ │ │ +432 const MacroElement ¯oElement = static_cast< const MacroElement & > │ │ │ │ │ +( *macroEl ); │ │ │ │ │ +433 │ │ │ │ │ +434 MeshPointer< dim > meshPointer( mesh ); │ │ │ │ │ +435 ElementInfo elementInfo( meshPointer, macroElement, _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ); │ │ │ │ │ +436 const ProjectionFactory &projectionFactory = *static_cast< const │ │ │ │ │ +ProjectionFactory * >( Library< dimWorld >::projectionFactory ); │ │ │ │ │ +437 if( (n > 0) && macroElement.isBoundary( n-1 ) ) │ │ │ │ │ +438 { │ │ │ │ │ +439 const unsigned int boundaryIndex = Library< dimWorld >::boundaryCount++; │ │ │ │ │ +440 if( projectionFactory.hasProjection( elementInfo, n-1 ) ) │ │ │ │ │ +441 { │ │ │ │ │ +442 Projection projection = projectionFactory.projection( elementInfo, n-1 ); │ │ │ │ │ +443 return new NodeProjection< dim, Projection >( boundaryIndex, projection ); │ │ │ │ │ +444 } │ │ │ │ │ +445 else │ │ │ │ │ +446 return new BasicNodeProjection( boundaryIndex ); │ │ │ │ │ +447 } │ │ │ │ │ +448 else if( (dim < _d_i_m_W_o_r_l_d) && (n == 0) ) │ │ │ │ │ +449 { │ │ │ │ │ +450 const unsigned int boundaryIndex = std::numeric_limits< unsigned int >::max │ │ │ │ │ +(); │ │ │ │ │ +451 if( projectionFactory.hasProjection( elementInfo ) ) │ │ │ │ │ +452 { │ │ │ │ │ +453 Projection projection = projectionFactory.projection( elementInfo ); │ │ │ │ │ +454 return new NodeProjection< dim, Projection >( boundaryIndex, projection ); │ │ │ │ │ +455 } │ │ │ │ │ +456 else │ │ │ │ │ +457 return 0; │ │ │ │ │ +458 } │ │ │ │ │ +459 else │ │ │ │ │ +460 return 0; │ │ │ │ │ +461 } │ │ │ │ │ +462 │ │ │ │ │ +463 } // namespace Alberta │ │ │ │ │ +464 │ │ │ │ │ +465} // namespace Dune │ │ │ │ │ +466 │ │ │ │ │ +467#endif // #if HAVE_ALBERTA │ │ │ │ │ +468 │ │ │ │ │ +469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_m_a_c_r_o_d_a_t_a_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ -Codim< cd >::template Partition< pit >::Iterator begin() const │ │ │ │ │ -obtain begin iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ -int size(const GeometryType &type) const │ │ │ │ │ -obtain number of entities with a given geometry type │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ -Codim< cd >::Iterator begin() const │ │ │ │ │ -obtain begin iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Communication CollectiveCommunication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_e_n_d │ │ │ │ │ -IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ -obtain end intersection iterator with respect to this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:180 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ -Codim< cd >::template Partition< pit >::Iterator end() const │ │ │ │ │ -obtain end iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_T_r_a_i_t_s │ │ │ │ │ -DefaultLevelGridViewTraits< GridImp > Traits │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ -const IndexSet & indexSet() const │ │ │ │ │ -obtain the index set │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_c_o_m_m │ │ │ │ │ -const Communication & comm() const │ │ │ │ │ -obtain communication object │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -static constexpr bool conforming │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Traits::IndexSet IndexSet │ │ │ │ │ -type of the index set │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_c_o_m_m_u_n_i_c_a_t_e │ │ │ │ │ -void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, │ │ │ │ │ -InterfaceType iftype, CommunicationDirection dir) const │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Traits::IntersectionIterator IntersectionIterator │ │ │ │ │ -type of the intersection iterator │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ -int size(int codim) const │ │ │ │ │ -obtain number of entities in a given codimension │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_o_v_e_r_l_a_p_S_i_z_e │ │ │ │ │ -int overlapSize(int codim) const │ │ │ │ │ -Return size of the overlap region for a given codim on the grid view. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ -Codim< cd >::Iterator end() const │ │ │ │ │ -obtain end iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_b_e_g_i_n │ │ │ │ │ -IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ -obtain begin intersection iterator with respect to this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:173 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -DefaultLevelGridView(const Grid &grid, int level) │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Traits::Intersection Intersection │ │ │ │ │ -type of the intersection │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Grid::Traits::Communication Communication │ │ │ │ │ -type of the communication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_i_s_C_o_n_f_o_r_m_i_n_g │ │ │ │ │ -bool isConforming() const │ │ │ │ │ -return true if current state of grid view represents a conforming grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_g_h_o_s_t_S_i_z_e │ │ │ │ │ -int ghostSize(int codim) const │ │ │ │ │ -Return size of the ghost region for a given codim on the grid view. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:198 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ -Traits::Grid Grid │ │ │ │ │ -type of the grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -obtain a const reference to the underlying hierarchic grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_c_o_m_m_u_n_i_c_a_t_e │ │ │ │ │ -void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, │ │ │ │ │ -InterfaceType iftype, CommunicationDirection dir) const │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:398 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_T_r_a_i_t_s │ │ │ │ │ -DefaultLeafGridViewTraits< GridImp > Traits │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:276 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Communication CollectiveCommunication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:295 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ -Codim< cd >::template Partition< pit >::Iterator end() const │ │ │ │ │ -obtain end iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:359 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -obtain a const reference to the underlying hierarchic grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:309 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ -Codim< cd >::template Partition< pit >::Iterator begin() const │ │ │ │ │ -obtain begin iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:345 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_b_e_g_i_n │ │ │ │ │ -IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ -obtain begin intersection iterator with respect to this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:366 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Traits::Intersection Intersection │ │ │ │ │ -type of the intersection │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_e_n_d │ │ │ │ │ -IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const │ │ │ │ │ -obtain end intersection iterator with respect to this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:373 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_e_n_d │ │ │ │ │ -Codim< cd >::Iterator end() const │ │ │ │ │ -obtain end iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:352 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ -Traits::Grid Grid │ │ │ │ │ -type of the grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:279 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ -int size(const GeometryType &type) const │ │ │ │ │ -obtain number of entities with a given geometry type │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:331 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_s_C_o_n_f_o_r_m_i_n_g │ │ │ │ │ -bool isConforming() const │ │ │ │ │ -return true if current state of grid view represents a conforming grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:322 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Traits::IndexSet IndexSet │ │ │ │ │ -type of the index set │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:282 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_c_o_m_m │ │ │ │ │ -const Communication & comm() const │ │ │ │ │ -obtain communication object │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:379 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Grid::Traits::Communication Communication │ │ │ │ │ -type of the communication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:291 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w │ │ │ │ │ -DefaultLeafGridView(const Grid &grid) │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:304 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_o_v_e_r_l_a_p_S_i_z_e │ │ │ │ │ -int overlapSize(int codim) const │ │ │ │ │ -Return size of the overlap region for a given codim on the grid view. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:385 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_b_e_g_i_n │ │ │ │ │ -Codim< cd >::Iterator begin() const │ │ │ │ │ -obtain begin iterator for this view │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:338 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_g_h_o_s_t_S_i_z_e │ │ │ │ │ -int ghostSize(int codim) const │ │ │ │ │ -Return size of the ghost region for a given codim on the grid view. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:391 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ +ALBERTA MESH Mesh │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d │ │ │ │ │ +static const int meshRefined │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ +static const int dimWorld │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d │ │ │ │ │ +static const int meshCoarsened │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s │ │ │ │ │ +int numMacroElements() const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:257 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +unsigned int create(const MacroData< dim > ¯oData, const │ │ │ │ │ +ProjectionFactoryInterface< Proj, Impl > &projectionFactory) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:312 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:361 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_a_d │ │ │ │ │ +unsigned int read(const std::string &filename, Real &time) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:342 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_e_n_d │ │ │ │ │ +MacroIterator end() const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_o_a_r_s_e_n │ │ │ │ │ +bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:398 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_s_i_z_e │ │ │ │ │ int size(int codim) const │ │ │ │ │ -obtain number of entities in a given codimension │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:325 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_i_n_d_e_x_S_e_t │ │ │ │ │ -const IndexSet & indexSet() const │ │ │ │ │ -obtain the index set │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:316 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Traits::IntersectionIterator IntersectionIterator │ │ │ │ │ -type of the intersection iterator │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:288 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -static constexpr bool conforming │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:301 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Grid::Traits::Communication Communication │ │ │ │ │ -type of the communication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -static constexpr bool conforming │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Grid::Traits::LevelIntersection Intersection │ │ │ │ │ -type of the intersection │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Grid::Traits::LevelIntersectionIterator IntersectionIterator │ │ │ │ │ -type of the intersection iterator │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Grid::Traits::LevelIndexSet IndexSet │ │ │ │ │ -type of the index set │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Communication CollectiveCommunication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d │ │ │ │ │ -std::remove_const< GridImp >::type Grid │ │ │ │ │ -type of the grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d_V_i_e_w_I_m_p │ │ │ │ │ -DefaultLevelGridView< GridImp > GridViewImp │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Grid::Traits::template Codim< cd >::template Partition< All_Partition >:: │ │ │ │ │ -LevelIterator Iterator │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ -Grid::Traits::template Codim< cd >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< cd >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< cd >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n │ │ │ │ │ -Define types needed to iterate over entities of a given partition type. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator │ │ │ │ │ -iterator over a given codim and partition type │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_v_e_l_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -Codim Structure. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:219 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d │ │ │ │ │ -std::remove_const< GridImp >::type Grid │ │ │ │ │ -type of the grid │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:223 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_G_r_i_d_V_i_e_w_I_m_p │ │ │ │ │ -DefaultLeafGridView< GridImp > GridViewImp │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ -static constexpr bool conforming │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:266 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_l_l_e_c_t_i_v_e_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Communication CollectiveCommunication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Grid::Traits::LeafIntersectionIterator IntersectionIterator │ │ │ │ │ -type of the intersection iterator │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:233 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Grid::Traits::LeafIntersection Intersection │ │ │ │ │ -type of the intersection │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:229 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ -Grid::Traits::LeafIndexSet IndexSet │ │ │ │ │ -type of the index set │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:226 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -Grid::Traits::Communication Communication │ │ │ │ │ -type of the communication │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:244 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Grid::Traits::template Codim< cd >::template Partition< All_Partition >:: │ │ │ │ │ -LeafIterator Iterator │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:247 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ -Grid::Traits::template Codim< cd >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< cd >::Geometry Geometry │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:251 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -Grid::template Codim< cd >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n │ │ │ │ │ -Define types needed to iterate over entities of a given partition type. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:258 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_T_r_a_i_t_s_:_:_C_o_d_i_m_:_:_P_a_r_t_i_t_i_o_n_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator │ │ │ │ │ -iterator over a given codim and partition type │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:262 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_L_e_a_f_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -Codim Structure. │ │ │ │ │ -DDeeffiinniittiioonn defaultgridview.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -Mesh entities of codimension 0 ("elements") allow to visit all intersections │ │ │ │ │ -with "neighboring" eleme... │ │ │ │ │ -DDeeffiinniittiioonn common/intersectioniterator.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ -A set of traits classes to store static information about grid implementation. │ │ │ │ │ -_g_r_i_d_v_i_e_w_._h_h │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +unsigned int create(const std::string &filename, bool binary=false) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:331 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ +void leafTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ +fillFlags=FillFlags::standard) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:385 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +unsigned int create(const MacroData< dim > ¯oData) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:299 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_b_e_g_i_n │ │ │ │ │ +MacroIterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +MeshPointer(Mesh *mesh) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +bool write(const std::string &filename, Real time) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:353 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_f_i_n_e │ │ │ │ │ +bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing) │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:407 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +MeshPointer() │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ +void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ +fillFlags=FillFlags::standard) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ +void hierarchicTraverse(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:695 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ +void leafTraverse(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:708 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +release the macro data structure │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ │ +void read(const std::string &filename, bool binary=false) │ │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ +bool isBoundary(const int face) const │ │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_m_e_s_h │ │ │ │ │ +const MeshPointer & mesh() const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:211 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_m_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ +const MacroElement & macroElement() const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dim > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +Alberta::MeshPointer< dim > MeshPointer │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:173 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags:: │ │ │ │ │ +standard) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_d_o_n_e │ │ │ │ │ +bool done() const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const MacroIterator &other) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:194 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ +MacroIterator() │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:176 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ +static const Flags nothing │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ +ALBERTA FLAGS Flags │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ │ +static const Flags standard │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:258 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_:_:_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ +Base::Projection Projection │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ │ +_p_r_o_j_e_c_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00269.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00257.html │ │ │ │┄ Files 8% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryprojection.hh File Reference │ │ │ │ +dune-grid: entityiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,44 +72,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundaryprojection.hh File Reference
│ │ │ │ +
entityiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cmath>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/multilineargeometry.hh>
│ │ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ -#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <iterator>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::DuneBoundaryProjection< dimworld >
 Interface class for vertex projection at the boundary. More...
class  Dune::EntityIterator< codim, Grid, IteratorImp >
 interface class for an iterator over grid entities More...
 
class  Dune::BoundaryProjectionWrapper< dimworld >
 
class  Dune::BoundarySegmentWrapper< dim, dimworld >
 
struct  Dune::CircleBoundaryProjection< dimworld >
struct  std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  std
 STL namespace.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,32 +2,27 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -boundaryprojection.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_d_a_t_a_h_a_n_d_l_e_i_f_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_g_m_s_h_r_e_a_d_e_r_._h_h> │ │ │ │ │ +entityiterator.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_u_n_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -  Interface class for vertex projection at the boundary. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_E_n_t_i_t_y_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_,_ _I_t_e_r_a_t_o_r_I_m_p_ _> │ │ │ │ │ +  interface class for an iterator over grid entities _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ - class   _D_u_n_e_:_:_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_W_r_a_p_p_e_r_<_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_W_r_a_p_p_e_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_C_i_r_c_l_e_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_<_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +struct   _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<_ _D_u_n_e_:_:_E_n_t_i_t_y_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_,_ _I_t_e_r_a_t_o_r_I_m_p_ _> │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _s_t_d │ │ │ │ │ +  STL namespace. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00269_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
boundaryprojection.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
│ │ │ │
6#define DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
│ │ │ │
7
│ │ │ │
8//- system includes
│ │ │ │ @@ -93,17 +93,17 @@ │ │ │ │
10#include <memory>
│ │ │ │
11
│ │ │ │
12//- Dune includes
│ │ │ │
13#include <dune/common/fvector.hh>
│ │ │ │
14
│ │ │ │
15#include <dune/geometry/multilineargeometry.hh>
│ │ │ │
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
20
│ │ │ │
21namespace Dune
│ │ │ │
22{
│ │ │ │
25 template <int dimworld>
│ │ │ │
26 struct DuneBoundaryProjection;
│ │ │ │
27
│ │ │ │
30 template <int dimworld>
│ │ │ │ @@ -359,17 +359,17 @@ │ │ │ │
264 const double radius_;
│ │ │ │
265 };
│ │ │ │
│ │ │ │
266
│ │ │ │
267} // end namespace
│ │ │ │
268
│ │ │ │
269#endif // #ifndef DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ -
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ - │ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Interface class for vertex projection at the boundary.
Definition boundaryprojection.hh:33
│ │ │ │
DuneBoundaryProjection< dimworld > ThisType
Definition boundaryprojection.hh:34
│ │ │ │
virtual void backup(ObjectStreamType &buffer) const
write DuneBoundaryProjection's data to stream buffer
Definition boundaryprojection.hh:52
│ │ │ │
static std::unique_ptr< ThisType > restoreFromBuffer(MessageBufferIF< BufferImp > &buffer)
Definition boundaryprojection.hh:85
│ │ │ │
virtual CoordinateType operator()(const CoordinateType &global) const =0
projection operator projection a global coordinate
│ │ │ │
void toBuffer(BufferImp &buffer) const
Definition boundaryprojection.hh:58
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00281.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00362.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -88,17 +88,17 @@ │ │ │ │ #include <iostream>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/common/rangeutilities.hh>
│ │ │ │ #include <dune/geometry/dimension.hh>
│ │ │ │ #include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ #include <dune/geometry/typeindex.hh>
│ │ │ │ -#include "mapper.hh"
│ │ │ │ +#include "mapper.hh"
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00281_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00362_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
mcmgmapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │
6#ifndef DUNE_GRID_COMMON_MCMGMAPPER_HH
│ │ │ │
7#define DUNE_GRID_COMMON_MCMGMAPPER_HH
│ │ │ │
8
│ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │
12#include <dune/common/exceptions.hh>
│ │ │ │
13#include <dune/common/rangeutilities.hh>
│ │ │ │
14#include <dune/geometry/dimension.hh>
│ │ │ │
15#include <dune/geometry/referenceelements.hh>
│ │ │ │
16#include <dune/geometry/type.hh>
│ │ │ │
17#include <dune/geometry/typeindex.hh>
│ │ │ │
18
│ │ │ │ -
19#include "mapper.hh"
│ │ │ │ +
19#include "mapper.hh"
│ │ │ │
20
│ │ │ │
27namespace Dune
│ │ │ │
28{
│ │ │ │
36 //
│ │ │ │
37 // Common Layout templates
│ │ │ │
38 //
│ │ │ │
39
│ │ │ │ @@ -410,15 +410,15 @@ │ │ │ │
471 const G* gridPtr_;
│ │ │ │
472 int level_;
│ │ │ │
473 };
│ │ │ │
│ │ │ │
474
│ │ │ │
476}
│ │ │ │
477#endif
│ │ │ │ -
Provides classes with basic mappers which are used to attach data to a grid.
│ │ │ │ +
Provides classes with basic mappers which are used to attach data to a grid.
│ │ │ │
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition common/grid.hh:819
│ │ │ │
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition common/grid.hh:802
│ │ │ │
MCMGLayout mcmgLayout(Codim< codim >)
layout for entities of codimension codim
Definition mcmgmapper.hh:72
│ │ │ │
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │
std::function< size_t(GeometryType, int)> MCMGLayout
layout function for MultipleCodimMultipleGeomTypeMapper
Definition mcmgmapper.hh:64
│ │ │ │
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00317.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00296.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │

Provides base classes for index and id sets. │ │ │ │ More...

│ │ │ │
#include <vector>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/grid/common/grid.hh>
│ │ │ │ #include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::MultipleCodimMultipleGeomTypeMapper< GV >
 Implementation class for a multiple codim and multiple geometry type mapper. More...
 
class  Dune::LeafMultipleCodimMultipleGeomTypeMapper< G >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
indexidset.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │
6#ifndef DUNE_GRID_COMMON_INDEXIDSET_HH
│ │ │ │
7#define DUNE_GRID_COMMON_INDEXIDSET_HH
│ │ │ │
8
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00341.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00572.html │ │ │ │┄ Files 6% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entityiterator.hh File Reference │ │ │ │ +dune-grid: hostcorners.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,41 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
entityiterator.hh File Reference
│ │ │ │ +
hostcorners.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iterator>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/entity.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >
 Index Set Interface base class. More...
 
struct  Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >::Codim< cc >
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::EntityIterator< codim, Grid, IteratorImp >
 interface class for an iterator over grid entities More...
 
struct  std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
class  Dune::GeoGrid::HostCorners< HostEntity >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  std
 STL namespace.
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,24 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ + * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -entityiterator.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hostcorners.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_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_:_:_E_n_t_i_t_y_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_,_ _I_t_e_r_a_t_o_r_I_m_p_ _> │ │ │ │ │ -  interface class for an iterator over grid entities _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<_ _D_u_n_e_:_:_E_n_t_i_t_y_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_,_ _I_t_e_r_a_t_o_r_I_m_p_ _> │ │ │ │ │ - _> │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_o_s_t_C_o_r_n_e_r_s_<_ _H_o_s_t_E_n_t_i_t_y_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _s_t_d │ │ │ │ │ -  STL namespace. │ │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ +  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00341_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00257_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
entityiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH
│ │ │ │
6#define DUNE_GRID_COMMON_ENTITYITERATOR_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00353.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │ More...

│ │ │ │
#include <map>
│ │ │ │ #include <sstream>
│ │ │ │ #include <dune/common/singleton.hh>
│ │ │ │ #include <dune/common/parameterizedobject.hh>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00353_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
boundarysegment.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
│ │ │ │
6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
│ │ │ │
7
│ │ │ │
8#include <map>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00206.html │ │ │ │┄ Files 15% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: iterator.hh File Reference │ │ │ │ +dune-grid: coordinates.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,64 +65,69 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
iterator.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
coordinates.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/entity.hh>
│ │ │ │ + │ │ │ │ +

This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the tensorproduct feature, the coordinate information has been encapsulated to keep performance for the equidistant grid. Containers for equidistant and tensorproduct grids are provided here. │ │ │ │ +More...

│ │ │ │ +
#include <array>
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::BoundarySegmentBackupRestore< BndSeg >
 
struct  Dune::BoundarySegment< dim, dimworld, ctype >
 Base class for classes implementing geometries of boundary segments. More...
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid >
class  Dune::EquidistantCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid. More...
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid >
class  Dune::EquidistantOffsetCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid with non-trivial origin. More...
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid >
 
class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, false >
 
class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, true >
 
class  Dune::GeoGrid::HierarchicIterator< G >
class  Dune::TensorProductCoordinates< ct, dim >
 Coordinate container for a tensor product YaspGrid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
namespace  Dune::Yasp
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<class ct , int dim>
std::ostream & Dune::operator<< (std::ostream &s, EquidistantCoordinates< ct, dim > &c)
 
template<class ct , int dim>
std::ostream & Dune::operator<< (std::ostream &s, EquidistantOffsetCoordinates< ct, dim > &c)
 
template<class ct , int dim>
std::ostream & Dune::operator<< (std::ostream &s, TensorProductCoordinates< ct, dim > &c)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the tensorproduct feature, the coordinate information has been encapsulated to keep performance for the equidistant grid. Containers for equidistant and tensorproduct grids are provided here.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,49 +1,55 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -iterator.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_d_e_c_l_a_r_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_e_n_t_i_t_y_._h_h> │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +_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 │ │ │ │ │ +coordinates.hh File Reference │ │ │ │ │ +This provides container classes for the coordinates to be used in YaspGrid Upon │ │ │ │ │ +implementation of the tensorproduct feature, the coordinate information has │ │ │ │ │ +been encapsulated to keep performance for the equidistant grid. Containers for │ │ │ │ │ +equidistant and tensorproduct grids are provided here. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_, │ │ │ │ │ - _G_r_i_d_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ │ +  Container for equidistant coordinates in a _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_, │ │ │ │ │ - _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ │ +  Container for equidistant coordinates in a _Y_a_s_p_G_r_i_d with non-trivial │ │ │ │ │ + origin. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ - _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_, │ │ │ │ │ - _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ │ +  Coordinate container for a tensor product _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ -  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ +namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s< ct, │ │ │ │ │ + dim > &c) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, │ │ │ │ │ + _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s< ct, dim > &c) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s< │ │ │ │ │ + ct, dim > &c) │ │ │ │ │ +  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +This provides container classes for the coordinates to be used in YaspGrid Upon │ │ │ │ │ +implementation of the tensorproduct feature, the coordinate information has │ │ │ │ │ +been encapsulated to keep performance for the equidistant grid. Containers for │ │ │ │ │ +equidistant and tensorproduct grids are provided here. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html │ │ │ │┄ Files 24% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: iterator.hh Source File │ │ │ │ +dune-grid: basicwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,596 +70,496 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
iterator.hh
│ │ │ │ +
basicwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GEOGRID_ITERATOR_HH
│ │ │ │ -
6#define DUNE_GEOGRID_ITERATOR_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9
│ │ │ │ -
10#include <type_traits>
│ │ │ │ -
11#include <utility>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <fstream>
│ │ │ │ +
10#include <iomanip>
│ │ │ │ +
11#include <iterator>
│ │ │ │ +
12#include <list>
│ │ │ │ +
13#include <memory>
│ │ │ │ +
14#include <sstream>
│ │ │ │ +
15#include <string>
│ │ │ │ +
16
│ │ │ │ +
17#include <dune/common/parallel/mpiguard.hh>
│ │ │ │ +
18#include <dune/common/path.hh>
│ │ │ │ +
19
│ │ │ │ +
20#include <dune/geometry/referenceelements.hh>
│ │ │ │
21
│ │ │ │ -
22 namespace GeoGrid
│ │ │ │ -
23 {
│ │ │ │ -
24
│ │ │ │ -
25 // Internal Forward Declarations
│ │ │ │ -
26 // -----------------------------
│ │ │ │ -
27
│ │ │ │ -
28 template< class HostGridView, int codim, PartitionIteratorType pitype, class Grid,
│ │ │ │ -
29 bool fake = !Capabilities::hasHostEntity< Grid, codim >::v >
│ │ │ │ -
30 class Iterator;
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27namespace Dune
│ │ │ │ +
28{
│ │ │ │
31
│ │ │ │ -
32 template< class Grid >
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35
│ │ │ │ -
36
│ │ │ │ -
37 // PartitionIteratorFilter
│ │ │ │ -
38 // -----------------------
│ │ │ │ +
│ │ │ │ +
32 namespace VTK {
│ │ │ │ +
33
│ │ │ │ +
34 template<typename IteratorFactory>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 typedef typename IteratorFactory::CellIterator CellIterator;
│ │ │ │ +
37 typedef typename IteratorFactory::CornerIterator CornerIterator;
│ │ │ │ +
38 typedef typename IteratorFactory::PointIterator PointIterator;
│ │ │ │
39
│ │ │ │ -
40 template< int codim, PartitionIteratorType pitype, class Grid >
│ │ │ │ - │ │ │ │ -
42
│ │ │ │ -
43 template< int codim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 {
│ │ │ │ -
46 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ -
47 static const int codimension = codim;
│ │ │ │ +
40 typedef typename IteratorFactory::Cell Cell;
│ │ │ │ +
41
│ │ │ │ +
42 public:
│ │ │ │ + │ │ │ │ +
44
│ │ │ │ +
45 private:
│ │ │ │ +
46 typedef std::list<std::shared_ptr<FunctionWriter> > WriterList;
│ │ │ │ +
47 typedef typename WriterList::const_iterator WIterator;
│ │ │ │
48
│ │ │ │ -
49 static const PartitionIteratorType Element_Partition = Interior_Partition;
│ │ │ │ -
50
│ │ │ │ -
51 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ -
52 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ -
53 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
55 static bool apply ( const RefElement &refElement,
│ │ │ │ -
56 const Element &element, int subEntity )
│ │ │ │ -
57 {
│ │ │ │ -
58 const int size = refElement.size( subEntity, codim, dimension );
│ │ │ │ -
59 for( int i = 0; i < size; ++i )
│ │ │ │ -
60 {
│ │ │ │ -
61 const int j = refElement.subEntity( subEntity, codim, i, dimension );
│ │ │ │ -
62 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
│ │ │ │ -
63 if( type == InteriorEntity )
│ │ │ │ -
64 return true;
│ │ │ │ -
65 }
│ │ │ │ -
66 return false;
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68 };
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
70 template< int codim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
72 {
│ │ │ │ -
73 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ -
74 static const int codimension = codim;
│ │ │ │ +
49 typedef typename Cell::Geometry::ctype ctype;
│ │ │ │ +
50 static const unsigned celldim = Cell::mydimension;
│ │ │ │ +
51 typedef ReferenceElements<ctype, celldim> Refelems;
│ │ │ │ +
52
│ │ │ │ +
53 static const FileType fileType = celldim == 1
│ │ │ │ + │ │ │ │ +
55
│ │ │ │ +
56 const IteratorFactory& factory;
│ │ │ │ +
57
│ │ │ │ +
58 WriterList cellData;
│ │ │ │ +
59 WriterList pointData;
│ │ │ │ +
60
│ │ │ │ + │ │ │ │ +
62 typename IteratorFactory::ConnectivityWriter connectivity;
│ │ │ │ +
63 OffsetsWriter<Cell> offsets;
│ │ │ │ + │ │ │ │ +
65
│ │ │ │ +
66 public:
│ │ │ │ +
│ │ │ │ +
67 BasicWriter(const IteratorFactory& factory_)
│ │ │ │ +
68 : factory(factory_), connectivity(factory.makeConnectivity())
│ │ │ │ +
69 { }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
72 //
│ │ │ │ +
73 // Methods for adding data
│ │ │ │ +
74 //
│ │ │ │
75
│ │ │ │ -
76 static const PartitionIteratorType Element_Partition = Interior_Partition;
│ │ │ │ -
77
│ │ │ │ -
78 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ -
79 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ -
80 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
82 static bool apply ( const RefElement &refElement,
│ │ │ │ -
83 const Element &element, int subEntity )
│ │ │ │ -
84 {
│ │ │ │ -
85 return true;
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87 };
│ │ │ │ +
│ │ │ │ +
76 void addCellData(const std::shared_ptr<FunctionWriter>& writer) {
│ │ │ │ +
77 cellData.push_back(writer);
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
80 void addPointData(const std::shared_ptr<FunctionWriter>& writer) {
│ │ │ │ +
81 pointData.push_back(writer);
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
│ │ │ │ +
84 void clear() {
│ │ │ │ +
85 cellData.clear();
│ │ │ │ +
86 pointData.clear();
│ │ │ │ +
87 }
│ │ │ │
│ │ │ │
88
│ │ │ │ -
89 template< int codim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 {
│ │ │ │ -
92 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ -
93 static const int codimension = codim;
│ │ │ │ +
89 protected:
│ │ │ │ +
91 //
│ │ │ │ +
92 // Methods for writing single functions
│ │ │ │ +
93 //
│ │ │ │
94
│ │ │ │ -
95 static const PartitionIteratorType Element_Partition = Overlap_Partition;
│ │ │ │ -
96
│ │ │ │ -
97 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ -
98 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ -
99 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
101 static bool apply ( const RefElement &refElement,
│ │ │ │ -
102 const Element &element, int subEntity )
│ │ │ │ -
103 {
│ │ │ │ -
104 if( element.partitionType() == InteriorEntity )
│ │ │ │ -
105 return true;
│ │ │ │ -
106
│ │ │ │ -
107 const int size = refElement.size( subEntity, codim, dimension );
│ │ │ │ -
108 for( int i = 0; i < size; ++i )
│ │ │ │ -
109 {
│ │ │ │ -
110 const int j = refElement.subEntity( subEntity, codim, i, dimension );
│ │ │ │ -
111 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
│ │ │ │ -
112 if( (type == OverlapEntity) || (type == BorderEntity) )
│ │ │ │ -
113 return true;
│ │ │ │ -
114 }
│ │ │ │ -
115 return false;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117 };
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
119 template< int codim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
121 {
│ │ │ │ -
122 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ -
123 static const int codimension = codim;
│ │ │ │ -
124
│ │ │ │ -
125 static const PartitionIteratorType Element_Partition = Overlap_Partition;
│ │ │ │ -
126
│ │ │ │ -
127 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ -
128 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ -
129 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ -
130
│ │ │ │ -
│ │ │ │ -
131 static bool apply ( const RefElement &refElement,
│ │ │ │ -
132 const Element &element, int subEntity )
│ │ │ │ -
133 {
│ │ │ │ -
134 return true;
│ │ │ │ -
135 }
│ │ │ │ -
│ │ │ │ -
136 };
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
96 FunctionWriter& functionWriter,
│ │ │ │ +
97 unsigned ncells) const
│ │ │ │ +
98 {
│ │ │ │ +
99 if(functionWriter.beginWrite(vtuWriter, ncells)) {
│ │ │ │ +
100 const CellIterator& cellend = factory.endCells();
│ │ │ │ +
101 for(CellIterator cellit = factory.beginCells(); cellit != cellend;
│ │ │ │ +
102 ++cellit)
│ │ │ │ +
103 functionWriter.write(*cellit, Refelems::general(cellit->type()).
│ │ │ │ +
104 position(0,0));
│ │ │ │ +
105 }
│ │ │ │ +
106 functionWriter.endWrite();
│ │ │ │ +
107 }
│ │ │ │ +
│ │ │ │ +
108
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
110 FunctionWriter& functionWriter,
│ │ │ │ +
111 unsigned npoints) const
│ │ │ │ +
112 {
│ │ │ │ +
113 if(functionWriter.beginWrite(vtuWriter, npoints)) {
│ │ │ │ +
114 const PointIterator& pend = factory.endPoints();
│ │ │ │ +
115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit)
│ │ │ │ +
116 functionWriter.write(pit->cell(), pit->duneIndex());
│ │ │ │ +
117 }
│ │ │ │ +
118 functionWriter.endWrite();
│ │ │ │ +
119 }
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
122 FunctionWriter& functionWriter,
│ │ │ │ +
123 unsigned ncorners) const
│ │ │ │ +
124 {
│ │ │ │ +
125 if(functionWriter.beginWrite(vtuWriter, ncorners)) {
│ │ │ │ +
126 const CornerIterator& cend = factory.endCorners();
│ │ │ │ +
127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit)
│ │ │ │ +
128 functionWriter.write(cit->cell(), cit->duneIndex());
│ │ │ │ +
129 }
│ │ │ │ +
130 functionWriter.endWrite();
│ │ │ │ +
131 }
│ │ │ │ +
│ │ │ │ +
132
│ │ │ │ +
134 //
│ │ │ │ +
135 // Methods for writing whole sections
│ │ │ │ +
136 //
│ │ │ │
137
│ │ │ │ -
138 template< int codim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
140 {
│ │ │ │ -
141 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ -
142 static const int codimension = codim;
│ │ │ │ -
143
│ │ │ │ -
144 static const PartitionIteratorType Element_Partition = All_Partition;
│ │ │ │ -
145
│ │ │ │ -
146 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ -
147 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ -
148 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ -
149
│ │ │ │ -
│ │ │ │ -
150 static bool apply ( const RefElement &refElement,
│ │ │ │ -
151 const Element &element, int subEntity )
│ │ │ │ -
152 {
│ │ │ │ -
153 return true;
│ │ │ │ -
154 }
│ │ │ │ -
│ │ │ │ -
155 };
│ │ │ │ +
│ │ │ │ +
138 static std::string getFirstScalar(const WriterList& data) {
│ │ │ │ +
139 const WIterator& wend = data.end();
│ │ │ │ +
140 for(WIterator wit = data.begin(); wit != wend; ++wit)
│ │ │ │ +
141 if((*wit)->ncomps() == 1)
│ │ │ │ +
142 return (*wit)->name();
│ │ │ │ +
143 return "";
│ │ │ │ +
144 }
│ │ │ │
│ │ │ │ +
145
│ │ │ │ +
│ │ │ │ +
146 static std::string getFirstVector(const WriterList& data) {
│ │ │ │ +
147 const WIterator& wend = data.end();
│ │ │ │ +
148 for(WIterator wit = data.begin(); wit != wend; ++wit)
│ │ │ │ +
149 if((*wit)->ncomps() == 3)
│ │ │ │ +
150 return (*wit)->name();
│ │ │ │ +
151 return "";
│ │ │ │ +
152 }
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
│ │ │ │ +
154 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {
│ │ │ │ +
155 if(cellData.empty()) return;
│ │ │ │
156
│ │ │ │ -
157 template< int codim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
159 {
│ │ │ │ -
160 static const int dimension = std::remove_const< Grid >::type::dimension;
│ │ │ │ -
161 static const int codimension = codim;
│ │ │ │ -
162
│ │ │ │ -
163 static const PartitionIteratorType Element_Partition = Ghost_Partition;
│ │ │ │ +
157 vtuWriter.beginCellData(getFirstScalar(cellData),
│ │ │ │ +
158 getFirstVector(cellData));
│ │ │ │ +
159 const WIterator& wend = cellData.end();
│ │ │ │ +
160 for(WIterator wit = cellData.begin(); wit != wend; ++wit)
│ │ │ │ +
161 writeCellFunction(vtuWriter, **wit, ncells);
│ │ │ │ +
162 vtuWriter.endCellData();
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │
164
│ │ │ │ -
165 typedef typename std::remove_const< Grid >::type::ctype ctype;
│ │ │ │ -
166 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
│ │ │ │ -
167 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
│ │ │ │ -
168
│ │ │ │ -
│ │ │ │ -
169 static bool apply ( const RefElement &refElement,
│ │ │ │ -
170 const Element &element, int subEntity )
│ │ │ │ -
171 {
│ │ │ │ -
172 const int size = refElement.size( subEntity, codim, dimension );
│ │ │ │ -
173 for( int i = 0; i < size; ++i )
│ │ │ │ -
174 {
│ │ │ │ -
175 const int j = refElement.subEntity( subEntity, codim, i, dimension );
│ │ │ │ -
176 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
│ │ │ │ -
177 if( type == GhostEntity )
│ │ │ │ -
178 return true;
│ │ │ │ -
179 }
│ │ │ │ -
180 return false;
│ │ │ │ -
181 }
│ │ │ │ -
│ │ │ │ -
182 };
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
184
│ │ │ │ -
185
│ │ │ │ -
186 // Iterator (real)
│ │ │ │ -
187 // ---------------
│ │ │ │ -
188
│ │ │ │ -
189 template< class HostGridView, int codim, PartitionIteratorType pitype, class G >
│ │ │ │ -
│ │ │ │ -
190 class Iterator< HostGridView, codim, pitype, G, false >
│ │ │ │ -
191 {
│ │ │ │ -
192 typedef typename std::remove_const< G >::type::Traits Traits;
│ │ │ │ -
193
│ │ │ │ -
194 public:
│ │ │ │ -
195 typedef typename Traits::Grid Grid;
│ │ │ │ +
│ │ │ │ +
165 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {
│ │ │ │ +
166 if(pointData.empty()) return;
│ │ │ │ +
167
│ │ │ │ +
168 vtuWriter.beginPointData(getFirstScalar(pointData),
│ │ │ │ +
169 getFirstVector(pointData));
│ │ │ │ +
170 const WIterator& wend = pointData.end();
│ │ │ │ +
171 for(WIterator wit = pointData.begin(); wit != wend; ++wit)
│ │ │ │ +
172 writePointFunction(vtuWriter, **wit, npoints);
│ │ │ │ +
173 vtuWriter.endPointData();
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
│ │ │ │ +
176 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ +
177 unsigned ncorners) {
│ │ │ │ +
178 vtuWriter.beginPoints();
│ │ │ │ +
179 writePointFunction(vtuWriter, coords, npoints);
│ │ │ │ +
180 vtuWriter.endPoints();
│ │ │ │ +
181
│ │ │ │ +
182 vtuWriter.beginCells();
│ │ │ │ +
183 writeCornerFunction(vtuWriter, connectivity, ncorners);
│ │ │ │ +
184 writeCellFunction(vtuWriter, offsets, ncells);
│ │ │ │ +
185 if(fileType != polyData)
│ │ │ │ +
186 writeCellFunction(vtuWriter, types, ncells);
│ │ │ │ +
187 vtuWriter.endCells();
│ │ │ │ +
188 }
│ │ │ │ +
│ │ │ │ +
189
│ │ │ │ +
│ │ │ │ +
190 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ +
191 unsigned ncorners) {
│ │ │ │ +
192 writeCellData(vtuWriter, ncells);
│ │ │ │ +
193 writePointData(vtuWriter, npoints);
│ │ │ │ +
194 writeGrid(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ +
195 }
│ │ │ │ +
│ │ │ │
196
│ │ │ │ -
197 static const int codimension = codim;
│ │ │ │ -
198
│ │ │ │ -
199 typedef typename Traits::template Codim< codimension >::Entity Entity;
│ │ │ │ -
200
│ │ │ │ -
201 static const bool fake = false;
│ │ │ │ -
202
│ │ │ │ -
203 private:
│ │ │ │ - │ │ │ │ +
197 public:
│ │ │ │ +
│ │ │ │ +
198 void writePiece(const std::string& filename, OutputType outputType) {
│ │ │ │ +
199 std::ofstream stream;
│ │ │ │ +
200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
201 std::ios_base::eofbit);
│ │ │ │ +
202 stream.open(filename.c_str(), std::ios::binary);
│ │ │ │ +
203
│ │ │ │ +
204 VTUWriter vtuWriter(stream, outputType, fileType);
│ │ │ │
205
│ │ │ │ -
206 typedef typename HostGridView::template Codim< codim >::template Partition< pitype >::Iterator HostEntityIterator;
│ │ │ │ -
207
│ │ │ │ -
208 public:
│ │ │ │ -
209 Iterator () : grid_( nullptr ) {}
│ │ │ │ -
210
│ │ │ │ -
│ │ │ │ -
211 Iterator ( const Grid &grid, HostEntityIterator hostEntityIterator )
│ │ │ │ -
212 : grid_( &grid ),
│ │ │ │ -
213 hostEntityIterator_( std::move( hostEntityIterator ) )
│ │ │ │ -
214 {}
│ │ │ │ -
│ │ │ │ -
215
│ │ │ │ -
│ │ │ │ -
216 void increment ()
│ │ │ │ -
217 {
│ │ │ │ -
218 ++hostEntityIterator_;
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ +
206 unsigned ncells = std::distance(factory.beginCells(),
│ │ │ │ +
207 factory.endCells());
│ │ │ │ +
208 unsigned npoints = std::distance(factory.beginPoints(),
│ │ │ │ +
209 factory.endPoints());
│ │ │ │ +
210 unsigned ncorners = std::distance(factory.beginCorners(),
│ │ │ │ +
211 factory.endCorners());
│ │ │ │ +
212
│ │ │ │ +
213 vtuWriter.beginMain(ncells, npoints);
│ │ │ │ +
214 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ +
215 vtuWriter.endMain();
│ │ │ │ +
216
│ │ │ │ +
217 if(vtuWriter.beginAppended())
│ │ │ │ +
218 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ +
219 vtuWriter.endAppended();
│ │ │ │
220
│ │ │ │ -
│ │ │ │ -
221 bool equals ( const Iterator &rhs ) const
│ │ │ │ -
222 {
│ │ │ │ -
223 return hostEntityIterator_ == rhs.hostEntityIterator_;
│ │ │ │ -
224 }
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
227 {
│ │ │ │ -
228 return EntityImpl( grid(), *hostEntityIterator_ );
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230
│ │ │ │ -
231 int level () const { return hostEntityIterator_.level(); }
│ │ │ │ -
232
│ │ │ │ -
│ │ │ │ -
233 const Grid &grid () const
│ │ │ │ -
234 {
│ │ │ │ -
235 assert( grid_ );
│ │ │ │ -
236 return *grid_;
│ │ │ │ -
237 }
│ │ │ │ -
│ │ │ │ -
238
│ │ │ │ -
│ │ │ │ -
239 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ -
240 {
│ │ │ │ -
241 HostEntityIterator hostEntityIterator = hostGridView.template begin< codimension, pitype >();
│ │ │ │ -
242 return Iterator( grid, std::move( hostEntityIterator ) );
│ │ │ │ -
243 }
│ │ │ │ -
│ │ │ │ -
244
│ │ │ │ -
│ │ │ │ -
245 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ -
246 {
│ │ │ │ -
247 HostEntityIterator hostEntityIterator = hostGridView.template end< codimension, pitype >();
│ │ │ │ -
248 return Iterator( grid, std::move( hostEntityIterator ) );
│ │ │ │ -
249 }
│ │ │ │ +
221 }
│ │ │ │
│ │ │ │ +
222
│ │ │ │ +
224
│ │ │ │ +
│ │ │ │ +
240 void writeCollection(const std::string name,
│ │ │ │ +
241 const std::string& piecename,
│ │ │ │ +
242 const std::string& piecepath)
│ │ │ │ +
243 {
│ │ │ │ +
244 std::ofstream stream;
│ │ │ │ +
245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
246 std::ios_base::eofbit);
│ │ │ │ +
247 stream.open(name.c_str(), std::ios::binary);
│ │ │ │ +
248
│ │ │ │ +
249 PVTUWriter writer(stream, fileType);
│ │ │ │
250
│ │ │ │ -
251 private:
│ │ │ │ -
252 const Grid *grid_;
│ │ │ │ -
253 HostEntityIterator hostEntityIterator_;
│ │ │ │ -
254 };
│ │ │ │ -
│ │ │ │ -
255
│ │ │ │ -
256
│ │ │ │ -
257
│ │ │ │ -
258 // Iterator (fake)
│ │ │ │ -
259 // ---------------
│ │ │ │ -
260
│ │ │ │ -
261 template< class HostGridView, int codim, PartitionIteratorType pitype, class G >
│ │ │ │ -
│ │ │ │ -
262 class Iterator< HostGridView, codim, pitype, G, true >
│ │ │ │ -
263 {
│ │ │ │ -
264 typedef typename std::remove_const< G >::type::Traits Traits;
│ │ │ │ -
265
│ │ │ │ -
266 public:
│ │ │ │ -
267 typedef typename Traits::Grid Grid;
│ │ │ │ -
268
│ │ │ │ -
269 static const int codimension = codim;
│ │ │ │ -
270
│ │ │ │ -
271 typedef typename Traits::template Codim< codimension >::Entity Entity;
│ │ │ │ -
272
│ │ │ │ -
273 private:
│ │ │ │ - │ │ │ │ +
251 writer.beginMain();
│ │ │ │ +
252
│ │ │ │ +
253 // PPointData
│ │ │ │ +
254 writer.beginPointData(getFirstScalar(pointData),
│ │ │ │ +
255 getFirstVector(pointData));
│ │ │ │ +
256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)
│ │ │ │ +
257 (*it)->addArray(writer);
│ │ │ │ +
258 writer.endPointData();
│ │ │ │ +
259
│ │ │ │ +
260 // PCellData
│ │ │ │ +
261 writer.beginCellData(getFirstScalar(cellData),
│ │ │ │ +
262 getFirstVector(cellData));
│ │ │ │ +
263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)
│ │ │ │ +
264 (*it)->addArray(writer);
│ │ │ │ +
265 writer.endCellData();
│ │ │ │ +
266
│ │ │ │ +
267 // PPoints
│ │ │ │ +
268 writer.beginPoints();
│ │ │ │ +
269 coords.addArray(writer);
│ │ │ │ +
270 writer.endPoints();
│ │ │ │ +
271
│ │ │ │ +
272 // Pieces
│ │ │ │ +
273 for( int i = 0; i < factory.comm().size(); ++i )
│ │ │ │ +
274 writer.addPiece(getParallelPieceName(piecename, piecepath, i));
│ │ │ │
275
│ │ │ │ - │ │ │ │ -
277
│ │ │ │ -
278 typedef typename HostGridView::template Codim<0>::template Partition< Filter::Element_Partition >::Iterator HostElementIterator;
│ │ │ │ -
279 typedef typename HostElementIterator::Entity HostElement;
│ │ │ │ -
280 typedef typename HostGridView::IndexSet HostIndexSet;
│ │ │ │ -
281
│ │ │ │ -
282 public:
│ │ │ │ -
283 Iterator () : grid_( nullptr ), subEntity_( -1 ), hostIndexSet_( nullptr ) {}
│ │ │ │ -
284
│ │ │ │ -
│ │ │ │ -
285 Iterator ( const Grid &grid, HostElementIterator hostElementIterator, HostElementIterator hostEnd, const HostIndexSet &hostIndexSet )
│ │ │ │ -
286 : grid_( &grid ),
│ │ │ │ -
287 hostElementIterator_( hostElementIterator ),
│ │ │ │ -
288 hostEnd_( hostEnd ),
│ │ │ │ -
289 subEntity_( -1 ),
│ │ │ │ -
290 hostIndexSet_( &hostIndexSet )
│ │ │ │ -
291 {
│ │ │ │ -
292 if( hostElementIterator_ != hostEnd_ )
│ │ │ │ -
293 {
│ │ │ │ -
294 visited_.resize( hostIndexSet_->size( codimension ), false );
│ │ │ │ -
295 increment();
│ │ │ │ -
296 }
│ │ │ │ -
297 }
│ │ │ │ -
│ │ │ │ -
298
│ │ │ │ -
│ │ │ │ -
299 void increment ()
│ │ │ │ -
300 {
│ │ │ │ -
301 typedef typename Traits::ctype ctype;
│ │ │ │ -
302
│ │ │ │ -
303 while( hostElementIterator_ != hostEnd_ )
│ │ │ │ -
304 {
│ │ │ │ -
305 const HostElement &hostElement = *hostElementIterator_;
│ │ │ │ -
306
│ │ │ │ -
307 auto refElement = referenceElement< ctype, Traits::dimension >( hostElement.type() );
│ │ │ │ -
308
│ │ │ │ -
309 ++subEntity_;
│ │ │ │ -
310 const int count = refElement.size( codimension );
│ │ │ │ -
311 for( ; subEntity_ < count; ++subEntity_ )
│ │ │ │ -
312 {
│ │ │ │ -
313 if( !Filter::apply( refElement, hostElement, subEntity_ ) )
│ │ │ │ -
314 continue;
│ │ │ │ -
315
│ │ │ │ -
316 const size_t index = hostIndexSet_->subIndex( hostElement, subEntity_, codimension );
│ │ │ │ -
317 if( !visited_[ index ] )
│ │ │ │ -
318 {
│ │ │ │ -
319 visited_[ index ] = true;
│ │ │ │ -
320 return;
│ │ │ │ -
321 }
│ │ │ │ -
322 }
│ │ │ │ -
323 ++hostElementIterator_;
│ │ │ │ -
324 subEntity_ = -1;
│ │ │ │ -
325 }
│ │ │ │ -
326 }
│ │ │ │ -
│ │ │ │ -
327
│ │ │ │ -
│ │ │ │ -
328 bool equals ( const Iterator &rhs ) const
│ │ │ │ -
329 {
│ │ │ │ -
330 return hostElementIterator_ == rhs.hostElementIterator_ && ( hostElementIterator_ == hostEnd_ || subEntity_ == rhs.subEntity_ );
│ │ │ │ -
331 }
│ │ │ │ -
│ │ │ │ -
332
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
334 {
│ │ │ │ -
335 return EntityImpl( grid(), *hostElementIterator_, subEntity_ );
│ │ │ │ -
336 }
│ │ │ │ -
│ │ │ │ -
337
│ │ │ │ -
338 int level () const { return hostElementIterator_.level(); }
│ │ │ │ -
339
│ │ │ │ -
│ │ │ │ -
340 const Grid &grid () const
│ │ │ │ -
341 {
│ │ │ │ -
342 assert( grid_ );
│ │ │ │ -
343 return *grid_;
│ │ │ │ -
344 }
│ │ │ │ +
276 writer.endMain();
│ │ │ │ +
277 }
│ │ │ │
│ │ │ │ +
278
│ │ │ │ +
280 //
│ │ │ │ +
281 // Filename generators
│ │ │ │ +
282 //
│ │ │ │ +
283
│ │ │ │ +
285
│ │ │ │ +
│ │ │ │ +
295 std::string getParallelPieceName(const std::string& name,
│ │ │ │ +
296 const std::string& path, int rank) const
│ │ │ │ +
297 {
│ │ │ │ +
298 std::ostringstream s;
│ │ │ │ +
299 if(path.size() > 0) {
│ │ │ │ +
300 s << path;
│ │ │ │ +
301 if(path[path.size()-1] != '/')
│ │ │ │ +
302 s << '/';
│ │ │ │ +
303 }
│ │ │ │ +
304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ +
305 << ':';
│ │ │ │ +
306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';
│ │ │ │ +
307 s << name;
│ │ │ │ +
308 switch(fileType) {
│ │ │ │ +
309 case polyData : s << ".vtp"; break;
│ │ │ │ +
310 case unstructuredGrid : s << ".vtu"; break;
│ │ │ │ +
311 }
│ │ │ │ +
312 return s.str();
│ │ │ │ +
313 }
│ │ │ │ +
│ │ │ │ +
314
│ │ │ │ +
316
│ │ │ │ +
│ │ │ │ +
325 std::string getParallelHeaderName(const std::string& name,
│ │ │ │ +
326 const std::string& path) const
│ │ │ │ +
327 {
│ │ │ │ +
328 std::ostringstream s;
│ │ │ │ +
329 if(path.size() > 0) {
│ │ │ │ +
330 s << path;
│ │ │ │ +
331 if(path[path.size()-1] != '/')
│ │ │ │ +
332 s << '/';
│ │ │ │ +
333 }
│ │ │ │ +
334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ +
335 << ':';
│ │ │ │ +
336 s << name;
│ │ │ │ +
337 switch(fileType) {
│ │ │ │ +
338 case polyData : s << ".pvtp"; break;
│ │ │ │ +
339 case unstructuredGrid : s << ".pvtu"; break;
│ │ │ │ +
340 }
│ │ │ │ +
341 return s.str();
│ │ │ │ +
342 }
│ │ │ │ +
│ │ │ │ +
343
│ │ │ │
345
│ │ │ │ -
│ │ │ │ -
346 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ -
347 {
│ │ │ │ -
348 HostElementIterator first = hostGridView.template begin< 0, Filter::Element_Partition >();
│ │ │ │ -
349 HostElementIterator last = hostGridView.template end< 0, Filter::Element_Partition >();
│ │ │ │ -
350 return Iterator( grid, std::move( first ), std::move( last ), hostGridView.indexSet() );
│ │ │ │ -
351 }
│ │ │ │ -
│ │ │ │ -
352
│ │ │ │ -
│ │ │ │ -
353 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )
│ │ │ │ -
354 {
│ │ │ │ -
355 HostElementIterator last = hostGridView.template end< 0, Filter::Element_Partition >();
│ │ │ │ -
356 return Iterator( grid, last, last, hostGridView.indexSet() );
│ │ │ │ -
357 }
│ │ │ │ -
│ │ │ │ -
358
│ │ │ │ -
359 private:
│ │ │ │ -
360 const Grid *grid_;
│ │ │ │ -
361 HostElementIterator hostElementIterator_, hostEnd_;
│ │ │ │ -
362 int subEntity_;
│ │ │ │ -
363 const HostIndexSet *hostIndexSet_;
│ │ │ │ -
364 std::vector< bool > visited_;
│ │ │ │ -
365 };
│ │ │ │ +
│ │ │ │ +
357 std::string getSerialPieceName(const std::string& name,
│ │ │ │ +
358 const std::string& path) const
│ │ │ │ +
359 {
│ │ │ │ +
360 switch(fileType) {
│ │ │ │ +
361 case polyData : return concatPaths(path, name+".vtp");
│ │ │ │ +
362 case unstructuredGrid : return concatPaths(path, name+".vtu");
│ │ │ │ +
363 }
│ │ │ │ +
364 return concatPaths(path, name); // unknown fileType
│ │ │ │ +
365 }
│ │ │ │
│ │ │ │
366
│ │ │ │ -
367
│ │ │ │ -
368
│ │ │ │ -
369 // HierarchicIterator
│ │ │ │ -
370 // ------------------
│ │ │ │ +
368 //
│ │ │ │ +
369 // User interface functions for writing
│ │ │ │ +
370 //
│ │ │ │
371
│ │ │ │ -
372 template< class G >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
374 {
│ │ │ │ -
375 typedef typename std::remove_const< G >::type::Traits Traits;
│ │ │ │ -
376
│ │ │ │ -
377 public:
│ │ │ │ -
378 typedef typename Traits::Grid Grid;
│ │ │ │ -
379
│ │ │ │ -
380 static const int codimension = 0;
│ │ │ │ -
381
│ │ │ │ -
382 typedef typename Traits::template Codim< codimension >::Entity Entity;
│ │ │ │ -
383
│ │ │ │ -
384 private:
│ │ │ │ - │ │ │ │ -
386
│ │ │ │ -
387 typedef typename Grid::HostGrid::HierarchicIterator HostEntityIterator;
│ │ │ │ -
388
│ │ │ │ -
389 public:
│ │ │ │ -
390 HierarchicIterator () : grid_( nullptr ) {}
│ │ │ │ -
391
│ │ │ │ -
│ │ │ │ -
392 HierarchicIterator ( const Grid &grid, HostEntityIterator hostEntityIterator )
│ │ │ │ -
393 : grid_( &grid ),
│ │ │ │ -
394 hostEntityIterator_( std::move( hostEntityIterator ) )
│ │ │ │ -
395 {}
│ │ │ │ -
│ │ │ │ -
396
│ │ │ │ -
│ │ │ │ -
397 void increment ()
│ │ │ │ -
398 {
│ │ │ │ -
399 ++hostEntityIterator_;
│ │ │ │ -
400 }
│ │ │ │ -
│ │ │ │ -
401
│ │ │ │ -
│ │ │ │ -
402 bool equals ( const HierarchicIterator &rhs ) const
│ │ │ │ -
403 {
│ │ │ │ -
404 return hostEntityIterator_ == rhs.hostEntityIterator_;
│ │ │ │ -
405 }
│ │ │ │ -
│ │ │ │ -
406
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
408 {
│ │ │ │ -
409 return EntityImpl( grid(), *hostEntityIterator_ );
│ │ │ │ -
410 }
│ │ │ │ -
│ │ │ │ -
411
│ │ │ │ -
412 int level () const { return hostEntityIterator_.level(); }
│ │ │ │ -
413
│ │ │ │ -
│ │ │ │ -
414 const Grid &grid () const
│ │ │ │ -
415 {
│ │ │ │ -
416 assert( grid_ );
│ │ │ │ -
417 return *grid_;
│ │ │ │ -
418 }
│ │ │ │ -
│ │ │ │ +
373
│ │ │ │ +
│ │ │ │ +
395 std::string pwrite(const std::string& name, const std::string& path,
│ │ │ │ +
396 const std::string& extendpath, OutputType outputType)
│ │ │ │ +
397 {
│ │ │ │ +
398 MPIGuard guard(factory.comm());
│ │ │ │ +
399
│ │ │ │ +
400 // do some magic because paraview can only cope with relative paths to
│ │ │ │ +
401 // piece files
│ │ │ │ +
402 std::ofstream file;
│ │ │ │ +
403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
404 std::ios_base::eofbit);
│ │ │ │ +
405 std::string piecepath = concatPaths(path, extendpath);
│ │ │ │ +
406 std::string relpiecepath = relativePath(path, piecepath);
│ │ │ │ +
407
│ │ │ │ +
408 // write this processes .vtu/.vtp piece file
│ │ │ │ +
409 std::string fullname = getParallelPieceName(name, piecepath,
│ │ │ │ +
410 factory.comm().rank());
│ │ │ │ +
411 writePiece(fullname, outputType);
│ │ │ │ +
412
│ │ │ │ +
413 // if we are rank 0, write .pvtu/.pvtp parallel header
│ │ │ │ +
414 fullname = getParallelHeaderName(name, path);
│ │ │ │ +
415 if(factory.comm().rank() == 0)
│ │ │ │ +
416 writeCollection(fullname, name, relpiecepath);
│ │ │ │ +
417
│ │ │ │ +
418 guard.finalize();
│ │ │ │
419
│ │ │ │ -
420 private:
│ │ │ │ -
421 const Grid *grid_;
│ │ │ │ -
422 HostEntityIterator hostEntityIterator_;
│ │ │ │ -
423 };
│ │ │ │ -
│ │ │ │ -
424
│ │ │ │ -
425 } // namespace GeoGrid
│ │ │ │ -
426
│ │ │ │ -
427} // namespace Dune
│ │ │ │ -
428
│ │ │ │ -
429#endif // #ifndef DUNE_GEOGRID_ITERATOR_HH
│ │ │ │ - │ │ │ │ -
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ │ -
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ │ -
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition gridenums.hh:140
│ │ │ │ -
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ │ -
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ │ -
@ Overlap_Partition
interior, border, and overlap entities
Definition gridenums.hh:139
│ │ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ │ -
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ │ -
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ │ -
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ │ -
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ │ -
STL namespace.
│ │ │ │ +
420 return fullname;
│ │ │ │ +
421 }
│ │ │ │ +
│ │ │ │ +
422
│ │ │ │ +
│ │ │ │ +
436 std::string write(const std::string &name, OutputType outputType)
│ │ │ │ +
437 {
│ │ │ │ +
438 // in the parallel case, just use pwrite, it has all the necessary
│ │ │ │ +
439 // stuff, so we don't need to reimplement it here.
│ │ │ │ +
440 if(factory.comm().size() > 1)
│ │ │ │ +
441 return pwrite(name, "", "", outputType);
│ │ │ │ +
442
│ │ │ │ +
443 // generate filename for process data
│ │ │ │ +
444 std::string pieceName = getSerialPieceName(name, "");
│ │ │ │ +
445
│ │ │ │ +
446 writePiece(pieceName, outputType);
│ │ │ │ +
447
│ │ │ │ +
448 return pieceName;
│ │ │ │ +
449 }
│ │ │ │ +
│ │ │ │ +
450
│ │ │ │ +
451 };
│ │ │ │ +
│ │ │ │ +
452
│ │ │ │ +
453 } // namespace VTK
│ │ │ │ +
│ │ │ │ +
454
│ │ │ │ +
456
│ │ │ │ +
457} // namespace Dune
│ │ │ │ +
458
│ │ │ │ +
459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:694
│ │ │ │ -
Definition iterator.hh:374
│ │ │ │ -
static const int codimension
Definition iterator.hh:380
│ │ │ │ -
int level() const
Definition iterator.hh:412
│ │ │ │ -
void increment()
Definition iterator.hh:397
│ │ │ │ -
bool equals(const HierarchicIterator &rhs) const
Definition iterator.hh:402
│ │ │ │ -
Entity dereference() const
Definition iterator.hh:407
│ │ │ │ -
HierarchicIterator()
Definition iterator.hh:390
│ │ │ │ -
HierarchicIterator(const Grid &grid, HostEntityIterator hostEntityIterator)
Definition iterator.hh:392
│ │ │ │ -
Traits::Grid Grid
Definition iterator.hh:378
│ │ │ │ -
const Grid & grid() const
Definition iterator.hh:414
│ │ │ │ -
Traits::template Codim< codimension >::Entity Entity
Definition iterator.hh:382
│ │ │ │ -
Definition iterator.hh:30
│ │ │ │ - │ │ │ │ -
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:51
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:52
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:55
│ │ │ │ -
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:53
│ │ │ │ -
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:80
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:82
│ │ │ │ -
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:78
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:79
│ │ │ │ -
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:99
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:98
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:101
│ │ │ │ -
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:97
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:128
│ │ │ │ -
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:127
│ │ │ │ -
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:129
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:131
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:150
│ │ │ │ -
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:146
│ │ │ │ -
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:148
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:147
│ │ │ │ -
Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
Definition iterator.hh:167
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:166
│ │ │ │ -
std::remove_const< Grid >::type::ctype ctype
Definition iterator.hh:165
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:169
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Entity dereference() const
Definition iterator.hh:226
│ │ │ │ - │ │ │ │ - │ │ │ │ -
bool equals(const Iterator &rhs) const
Definition iterator.hh:221
│ │ │ │ -
static Iterator begin(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:239
│ │ │ │ -
Traits::template Codim< codimension >::Entity Entity
Definition iterator.hh:199
│ │ │ │ -
const Grid & grid() const
Definition iterator.hh:233
│ │ │ │ -
static Iterator end(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:245
│ │ │ │ -
Iterator(const Grid &grid, HostEntityIterator hostEntityIterator)
Definition iterator.hh:211
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
const Grid & grid() const
Definition iterator.hh:340
│ │ │ │ -
static Iterator end(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:353
│ │ │ │ -
static Iterator begin(const Grid &grid, const HostGridView &hostGridView)
Definition iterator.hh:346
│ │ │ │ -
bool equals(const Iterator &rhs) const
Definition iterator.hh:328
│ │ │ │ -
Entity dereference() const
Definition iterator.hh:333
│ │ │ │ -
Iterator(const Grid &grid, HostElementIterator hostElementIterator, HostElementIterator hostEnd, const HostIndexSet &hostIndexSet)
Definition iterator.hh:285
│ │ │ │ -
Traits::template Codim< codimension >::Entity Entity
Definition iterator.hh:271
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ +
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ +
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ +
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ +
Definition basicwriter.hh:35
│ │ │ │ +
void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const
Definition basicwriter.hh:154
│ │ │ │ +
BasicWriter(const IteratorFactory &factory_)
Definition basicwriter.hh:67
│ │ │ │ +
std::string getSerialPieceName(const std::string &name, const std::string &path) const
return name of a serial piece file
Definition basicwriter.hh:357
│ │ │ │ +
void writeCollection(const std::string name, const std::string &piecename, const std::string &piecepath)
write header file in parallel case to stream
Definition basicwriter.hh:240
│ │ │ │ +
void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:176
│ │ │ │ +
void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:190
│ │ │ │ +
std::string pwrite(const std::string &name, const std::string &path, const std::string &extendpath, OutputType outputType)
write output; interface might change later
Definition basicwriter.hh:395
│ │ │ │ +
void clear()
Definition basicwriter.hh:84
│ │ │ │ +
void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncells) const
Definition basicwriter.hh:95
│ │ │ │ +
void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncorners) const
Definition basicwriter.hh:121
│ │ │ │ +
std::string getParallelHeaderName(const std::string &name, const std::string &path) const
return name of a parallel header file
Definition basicwriter.hh:325
│ │ │ │ +
void writePointData(VTUWriter &vtuWriter, unsigned npoints) const
Definition basicwriter.hh:165
│ │ │ │ +
static std::string getFirstVector(const WriterList &data)
Definition basicwriter.hh:146
│ │ │ │ +
FunctionWriterBase< Cell > FunctionWriter
Definition basicwriter.hh:43
│ │ │ │ +
void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned npoints) const
Definition basicwriter.hh:109
│ │ │ │ +
void writePiece(const std::string &filename, OutputType outputType)
Definition basicwriter.hh:198
│ │ │ │ +
void addCellData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:76
│ │ │ │ +
static std::string getFirstScalar(const WriterList &data)
Definition basicwriter.hh:138
│ │ │ │ +
std::string getParallelPieceName(const std::string &name, const std::string &path, int rank) const
return name of a parallel piece file
Definition basicwriter.hh:295
│ │ │ │ +
std::string write(const std::string &name, OutputType outputType)
write output (interface might change later)
Definition basicwriter.hh:436
│ │ │ │ +
void addPointData(const std::shared_ptr< FunctionWriter > &writer)
Definition basicwriter.hh:80
│ │ │ │ +
Base class for function writers.
Definition functionwriter.hh:34
│ │ │ │ +
virtual void write(const Cell &, const Domain &)
write at the given position
Definition functionwriter.hh:59
│ │ │ │ +
virtual void endWrite()=0
signal end of writing
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
start writing with the given writer
│ │ │ │ +
writer for the Coordinates array
Definition functionwriter.hh:147
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:165
│ │ │ │ +
writer for the offsets array
Definition functionwriter.hh:300
│ │ │ │ +
writer for the types array
Definition functionwriter.hh:340
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ +
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition pvtuwriter.hh:195
│ │ │ │ +
void endCellData()
finish CellData section
Definition pvtuwriter.hh:155
│ │ │ │ +
void beginMain(unsigned ghostLevel=0)
start the main PPolyData/PUnstructuredGrid section
Definition pvtuwriter.hh:189
│ │ │ │ +
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition pvtuwriter.hh:146
│ │ │ │ +
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition pvtuwriter.hh:120
│ │ │ │ +
void addPiece(const std::string &filename)
Add a serial piece to the output file.
Definition pvtuwriter.hh:215
│ │ │ │ +
void endPointData()
finish PointData section
Definition pvtuwriter.hh:129
│ │ │ │ +
void endPoints()
finish section for the point coordinates
Definition pvtuwriter.hh:171
│ │ │ │ +
void beginPoints()
start section for the point coordinates
Definition pvtuwriter.hh:166
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ +
bool beginAppended()
start the appended data section
Definition vtuwriter.hh:345
│ │ │ │ +
void endAppended()
finish the appended data section
Definition vtuwriter.hh:359
│ │ │ │ +
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ +
void beginMain(unsigned ncells, unsigned npoints)
start the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:310
│ │ │ │ +
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ +
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ +
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ +
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ +
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ +
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ +
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │ +
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:320
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,729 +1,608 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -iterator.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _v_t_k │ │ │ │ │ +basicwriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GEOGRID_ITERATOR_HH │ │ │ │ │ -6#define DUNE_GEOGRID_ITERATOR_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_a_p_a_b_i_l_i_t_i_e_s_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_d_e_c_l_a_r_a_t_i_o_n_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_e_n_t_i_t_y_._h_h> │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include │ │ │ │ │ +18#include │ │ │ │ │ +19 │ │ │ │ │ +20#include │ │ │ │ │ 21 │ │ │ │ │ -22 namespace GeoGrid │ │ │ │ │ -23 { │ │ │ │ │ -24 │ │ │ │ │ -25 // Internal Forward Declarations │ │ │ │ │ -26 // ----------------------------- │ │ │ │ │ -27 │ │ │ │ │ -28 template< class HostGridView, int codim, _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e pitype, class │ │ │ │ │ -Grid, │ │ │ │ │ -29 bool fake = !Capabilities::hasHostEntity< Grid, codim >::v > │ │ │ │ │ -_3_0 class _I_t_e_r_a_t_o_r; │ │ │ │ │ +22#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ +23#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +24#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +25#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +26 │ │ │ │ │ +27namespace _D_u_n_e │ │ │ │ │ +28{ │ │ │ │ │ 31 │ │ │ │ │ -32 template< class Grid > │ │ │ │ │ -33 class _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ -34 │ │ │ │ │ -35 │ │ │ │ │ -36 │ │ │ │ │ -37 // PartitionIteratorFilter │ │ │ │ │ -38 // ----------------------- │ │ │ │ │ +_3_2 namespace VTK { │ │ │ │ │ +33 │ │ │ │ │ +34 template │ │ │ │ │ +_3_5 class _B_a_s_i_c_W_r_i_t_e_r { │ │ │ │ │ +36 typedef typename IteratorFactory::CellIterator CellIterator; │ │ │ │ │ +37 typedef typename IteratorFactory::CornerIterator CornerIterator; │ │ │ │ │ +38 typedef typename IteratorFactory::PointIterator PointIterator; │ │ │ │ │ 39 │ │ │ │ │ -40 template< int codim, PartitionIteratorType pitype, class Grid > │ │ │ │ │ -_4_1 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r; │ │ │ │ │ -42 │ │ │ │ │ -43 template< int codim, class Grid > │ │ │ │ │ -_4_4 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ -45 { │ │ │ │ │ -_4_6 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ -_4_7 static const int codimension = codim; │ │ │ │ │ +40 typedef typename IteratorFactory::Cell Cell; │ │ │ │ │ +41 │ │ │ │ │ +42 public: │ │ │ │ │ +_4_3 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _F_u_n_c_t_i_o_n_W_r_i_t_e_r; │ │ │ │ │ +44 │ │ │ │ │ +45 private: │ │ │ │ │ +46 typedef std::list > WriterList; │ │ │ │ │ +47 typedef typename WriterList::const_iterator WIterator; │ │ │ │ │ 48 │ │ │ │ │ -_4_9 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n; │ │ │ │ │ -50 │ │ │ │ │ -_5_1 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ -_5_2 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ ->::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_5_3 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ -54 │ │ │ │ │ -_5_5 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ -56 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ -57 { │ │ │ │ │ -58 const int size = refElement.size( subEntity, codim, dimension ); │ │ │ │ │ -59 for( int i = 0; i < size; ++i ) │ │ │ │ │ -60 { │ │ │ │ │ -61 const int j = refElement.subEntity( subEntity, codim, i, dimension ); │ │ │ │ │ -62 _P_a_r_t_i_t_i_o_n_T_y_p_e type = element.template subEntity< dimension >( j │ │ │ │ │ -).partitionType(); │ │ │ │ │ -63 if( type == _I_n_t_e_r_i_o_r_E_n_t_i_t_y ) │ │ │ │ │ -64 return true; │ │ │ │ │ -65 } │ │ │ │ │ -66 return false; │ │ │ │ │ -67 } │ │ │ │ │ -68 }; │ │ │ │ │ -69 │ │ │ │ │ -70 template< int codim, class Grid > │ │ │ │ │ -_7_1 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ -72 { │ │ │ │ │ -_7_3 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ -_7_4 static const int codimension = codim; │ │ │ │ │ +49 typedef typename Cell::Geometry::ctype ctype; │ │ │ │ │ +50 static const unsigned celldim = Cell::mydimension; │ │ │ │ │ +51 typedef ReferenceElements Refelems; │ │ │ │ │ +52 │ │ │ │ │ +53 static const _F_i_l_e_T_y_p_e fileType = celldim == 1 │ │ │ │ │ +54 ? _p_o_l_y_D_a_t_a : _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d; │ │ │ │ │ +55 │ │ │ │ │ +56 const IteratorFactory& factory; │ │ │ │ │ +57 │ │ │ │ │ +58 WriterList cellData; │ │ │ │ │ +59 WriterList pointData; │ │ │ │ │ +60 │ │ │ │ │ +61 _C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_<_C_e_l_l_> coords; │ │ │ │ │ +62 typename IteratorFactory::ConnectivityWriter connectivity; │ │ │ │ │ +63 _O_f_f_s_e_t_s_W_r_i_t_e_r_<_C_e_l_l_> offsets; │ │ │ │ │ +64 _T_y_p_e_s_W_r_i_t_e_r_<_C_e_l_l_> types; │ │ │ │ │ +65 │ │ │ │ │ +66 public: │ │ │ │ │ +_6_7 _B_a_s_i_c_W_r_i_t_e_r(const IteratorFactory& factory_) │ │ │ │ │ +68 : factory(factory_), connectivity(factory.makeConnectivity()) │ │ │ │ │ +69 { } │ │ │ │ │ +70 │ │ │ │ │ +72 // │ │ │ │ │ +73 // Methods for adding data │ │ │ │ │ +74 // │ │ │ │ │ 75 │ │ │ │ │ -_7_6 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n; │ │ │ │ │ -77 │ │ │ │ │ -_7_8 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ -_7_9 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ ->::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_8_0 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ -81 │ │ │ │ │ -_8_2 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ -83 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ -84 { │ │ │ │ │ -85 return true; │ │ │ │ │ -86 } │ │ │ │ │ -87 }; │ │ │ │ │ +_7_6 void _a_d_d_C_e_l_l_D_a_t_a(const std::shared_ptr& writer) { │ │ │ │ │ +77 cellData.push_back(writer); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +_8_0 void _a_d_d_P_o_i_n_t_D_a_t_a(const std::shared_ptr& writer) { │ │ │ │ │ +81 pointData.push_back(writer); │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +_8_4 void _c_l_e_a_r() { │ │ │ │ │ +85 cellData.clear(); │ │ │ │ │ +86 pointData.clear(); │ │ │ │ │ +87 } │ │ │ │ │ 88 │ │ │ │ │ -89 template< int codim, class Grid > │ │ │ │ │ -_9_0 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ -91 { │ │ │ │ │ -_9_2 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ -_9_3 static const int codimension = codim; │ │ │ │ │ +89 protected: │ │ │ │ │ +91 // │ │ │ │ │ +92 // Methods for writing single functions │ │ │ │ │ +93 // │ │ │ │ │ 94 │ │ │ │ │ -_9_5 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n; │ │ │ │ │ -96 │ │ │ │ │ -_9_7 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ -_9_8 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ ->::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_9_9 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ -100 │ │ │ │ │ -_1_0_1 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ -102 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ -103 { │ │ │ │ │ -104 if( element.partitionType() == _I_n_t_e_r_i_o_r_E_n_t_i_t_y ) │ │ │ │ │ -105 return true; │ │ │ │ │ -106 │ │ │ │ │ -107 const int size = refElement.size( subEntity, codim, dimension ); │ │ │ │ │ -108 for( int i = 0; i < size; ++i ) │ │ │ │ │ -109 { │ │ │ │ │ -110 const int j = refElement.subEntity( subEntity, codim, i, dimension ); │ │ │ │ │ -111 _P_a_r_t_i_t_i_o_n_T_y_p_e type = element.template subEntity< dimension >( j │ │ │ │ │ -).partitionType(); │ │ │ │ │ -112 if( (type == _O_v_e_r_l_a_p_E_n_t_i_t_y) || (type == _B_o_r_d_e_r_E_n_t_i_t_y) ) │ │ │ │ │ -113 return true; │ │ │ │ │ -114 } │ │ │ │ │ -115 return false; │ │ │ │ │ -116 } │ │ │ │ │ -117 }; │ │ │ │ │ -118 │ │ │ │ │ -119 template< int codim, class Grid > │ │ │ │ │ -_1_2_0 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ -121 { │ │ │ │ │ -_1_2_2 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ -_1_2_3 static const int codimension = codim; │ │ │ │ │ -124 │ │ │ │ │ -_1_2_5 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n; │ │ │ │ │ -126 │ │ │ │ │ -_1_2_7 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ -_1_2_8 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ ->::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_1_2_9 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ -130 │ │ │ │ │ -_1_3_1 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ -132 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ -133 { │ │ │ │ │ -134 return true; │ │ │ │ │ -135 } │ │ │ │ │ -136 }; │ │ │ │ │ +_9_5 void _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(_V_T_U_W_r_i_t_e_r& vtuWriter, │ │ │ │ │ +96 _F_u_n_c_t_i_o_n_W_r_i_t_e_r& functionWriter, │ │ │ │ │ +97 unsigned ncells) const │ │ │ │ │ +98 { │ │ │ │ │ +99 if(functionWriter._b_e_g_i_n_W_r_i_t_e(vtuWriter, ncells)) { │ │ │ │ │ +100 const CellIterator& cellend = factory.endCells(); │ │ │ │ │ +101 for(CellIterator cellit = factory.beginCells(); cellit != cellend; │ │ │ │ │ +102 ++cellit) │ │ │ │ │ +103 functionWriter._w_r_i_t_e(*cellit, Refelems::general(cellit->type()). │ │ │ │ │ +104 position(0,0)); │ │ │ │ │ +105 } │ │ │ │ │ +106 functionWriter._e_n_d_W_r_i_t_e(); │ │ │ │ │ +107 } │ │ │ │ │ +108 │ │ │ │ │ +_1_0_9 void _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(_V_T_U_W_r_i_t_e_r& vtuWriter, │ │ │ │ │ +110 _F_u_n_c_t_i_o_n_W_r_i_t_e_r& functionWriter, │ │ │ │ │ +111 unsigned npoints) const │ │ │ │ │ +112 { │ │ │ │ │ +113 if(functionWriter._b_e_g_i_n_W_r_i_t_e(vtuWriter, npoints)) { │ │ │ │ │ +114 const PointIterator& pend = factory.endPoints(); │ │ │ │ │ +115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit) │ │ │ │ │ +116 functionWriter._w_r_i_t_e(pit->cell(), pit->duneIndex()); │ │ │ │ │ +117 } │ │ │ │ │ +118 functionWriter._e_n_d_W_r_i_t_e(); │ │ │ │ │ +119 } │ │ │ │ │ +120 │ │ │ │ │ +_1_2_1 void _w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n(_V_T_U_W_r_i_t_e_r& vtuWriter, │ │ │ │ │ +122 _F_u_n_c_t_i_o_n_W_r_i_t_e_r& functionWriter, │ │ │ │ │ +123 unsigned ncorners) const │ │ │ │ │ +124 { │ │ │ │ │ +125 if(functionWriter._b_e_g_i_n_W_r_i_t_e(vtuWriter, ncorners)) { │ │ │ │ │ +126 const CornerIterator& cend = factory.endCorners(); │ │ │ │ │ +127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit) │ │ │ │ │ +128 functionWriter._w_r_i_t_e(cit->cell(), cit->duneIndex()); │ │ │ │ │ +129 } │ │ │ │ │ +130 functionWriter._e_n_d_W_r_i_t_e(); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +134 // │ │ │ │ │ +135 // Methods for writing whole sections │ │ │ │ │ +136 // │ │ │ │ │ 137 │ │ │ │ │ -138 template< int codim, class Grid > │ │ │ │ │ -_1_3_9 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _A_l_l___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ -140 { │ │ │ │ │ -_1_4_1 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ -_1_4_2 static const int codimension = codim; │ │ │ │ │ -143 │ │ │ │ │ -_1_4_4 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _A_l_l___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +_1_3_8 static std::string _g_e_t_F_i_r_s_t_S_c_a_l_a_r(const WriterList& data) { │ │ │ │ │ +139 const WIterator& wend = data.end(); │ │ │ │ │ +140 for(WIterator wit = data.begin(); wit != wend; ++wit) │ │ │ │ │ +141 if((*wit)->ncomps() == 1) │ │ │ │ │ +142 return (*wit)->name(); │ │ │ │ │ +143 return ""; │ │ │ │ │ +144 } │ │ │ │ │ 145 │ │ │ │ │ -_1_4_6 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ -_1_4_7 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ ->::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_1_4_8 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ -149 │ │ │ │ │ -_1_5_0 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ -151 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ -152 { │ │ │ │ │ -153 return true; │ │ │ │ │ -154 } │ │ │ │ │ -155 }; │ │ │ │ │ +_1_4_6 static std::string _g_e_t_F_i_r_s_t_V_e_c_t_o_r(const WriterList& data) { │ │ │ │ │ +147 const WIterator& wend = data.end(); │ │ │ │ │ +148 for(WIterator wit = data.begin(); wit != wend; ++wit) │ │ │ │ │ +149 if((*wit)->ncomps() == 3) │ │ │ │ │ +150 return (*wit)->name(); │ │ │ │ │ +151 return ""; │ │ │ │ │ +152 } │ │ │ │ │ +153 │ │ │ │ │ +_1_5_4 void _w_r_i_t_e_C_e_l_l_D_a_t_a(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells) const { │ │ │ │ │ +155 if(cellData.empty()) return; │ │ │ │ │ 156 │ │ │ │ │ -157 template< int codim, class Grid > │ │ │ │ │ -_1_5_8 struct _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r< codim, _G_h_o_s_t___P_a_r_t_i_t_i_o_n, _G_r_i_d > │ │ │ │ │ -159 { │ │ │ │ │ -_1_6_0 static const int dimension = std::remove_const< Grid >::type::dimension; │ │ │ │ │ -_1_6_1 static const int codimension = codim; │ │ │ │ │ -162 │ │ │ │ │ -_1_6_3 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e Element_Partition = _G_h_o_s_t___P_a_r_t_i_t_i_o_n; │ │ │ │ │ +157 vtuWriter._b_e_g_i_n_C_e_l_l_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(cellData), │ │ │ │ │ +158 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ +159 const WIterator& wend = cellData.end(); │ │ │ │ │ +160 for(WIterator wit = cellData.begin(); wit != wend; ++wit) │ │ │ │ │ +161 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, **wit, ncells); │ │ │ │ │ +162 vtuWriter._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +163 } │ │ │ │ │ 164 │ │ │ │ │ -_1_6_5 typedef typename std::remove_const< Grid >::type::ctype _c_t_y_p_e; │ │ │ │ │ -_1_6_6 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 │ │ │ │ │ ->::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_1_6_7 typedef Transitional::ReferenceElement< ctype, Dim > _R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ -168 │ │ │ │ │ -_1_6_9 static bool _a_p_p_l_y ( const _R_e_f_E_l_e_m_e_n_t &refElement, │ │ │ │ │ -170 const _E_l_e_m_e_n_t &element, int subEntity ) │ │ │ │ │ -171 { │ │ │ │ │ -172 const int size = refElement.size( subEntity, codim, dimension ); │ │ │ │ │ -173 for( int i = 0; i < size; ++i ) │ │ │ │ │ -174 { │ │ │ │ │ -175 const int j = refElement.subEntity( subEntity, codim, i, dimension ); │ │ │ │ │ -176 _P_a_r_t_i_t_i_o_n_T_y_p_e type = element.template subEntity< dimension >( j │ │ │ │ │ -).partitionType(); │ │ │ │ │ -177 if( type == _G_h_o_s_t_E_n_t_i_t_y ) │ │ │ │ │ -178 return true; │ │ │ │ │ -179 } │ │ │ │ │ -180 return false; │ │ │ │ │ -181 } │ │ │ │ │ -182 }; │ │ │ │ │ -183 │ │ │ │ │ -184 │ │ │ │ │ -185 │ │ │ │ │ -186 // Iterator (real) │ │ │ │ │ -187 // --------------- │ │ │ │ │ -188 │ │ │ │ │ -189 template< class HostGridView, int codim, PartitionIteratorType pitype, │ │ │ │ │ -class G > │ │ │ │ │ -_1_9_0 class _I_t_e_r_a_t_o_r< HostGridView, codim, pitype, G, false > │ │ │ │ │ -191 { │ │ │ │ │ -192 typedef typename std::remove_const< G >::type::Traits Traits; │ │ │ │ │ -193 │ │ │ │ │ -194 public: │ │ │ │ │ -_1_9_5 typedef typename Traits::Grid _G_r_i_d; │ │ │ │ │ +_1_6_5 void _w_r_i_t_e_P_o_i_n_t_D_a_t_a(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned npoints) const { │ │ │ │ │ +166 if(pointData.empty()) return; │ │ │ │ │ +167 │ │ │ │ │ +168 vtuWriter._b_e_g_i_n_P_o_i_n_t_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(pointData), │ │ │ │ │ +169 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ +170 const WIterator& wend = pointData.end(); │ │ │ │ │ +171 for(WIterator wit = pointData.begin(); wit != wend; ++wit) │ │ │ │ │ +172 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, **wit, npoints); │ │ │ │ │ +173 vtuWriter._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +_1_7_6 void _w_r_i_t_e_G_r_i_d(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ +177 unsigned ncorners) { │ │ │ │ │ +178 vtuWriter._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +179 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, coords, npoints); │ │ │ │ │ +180 vtuWriter._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +181 │ │ │ │ │ +182 vtuWriter._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ +183 _w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n(vtuWriter, connectivity, ncorners); │ │ │ │ │ +184 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, offsets, ncells); │ │ │ │ │ +185 if(fileType != _p_o_l_y_D_a_t_a) │ │ │ │ │ +186 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, types, ncells); │ │ │ │ │ +187 vtuWriter._e_n_d_C_e_l_l_s(); │ │ │ │ │ +188 } │ │ │ │ │ +189 │ │ │ │ │ +_1_9_0 void _w_r_i_t_e_A_l_l(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ +191 unsigned ncorners) { │ │ │ │ │ +192 _w_r_i_t_e_C_e_l_l_D_a_t_a(vtuWriter, ncells); │ │ │ │ │ +193 _w_r_i_t_e_P_o_i_n_t_D_a_t_a(vtuWriter, npoints); │ │ │ │ │ +194 _w_r_i_t_e_G_r_i_d(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ +195 } │ │ │ │ │ 196 │ │ │ │ │ -_1_9_7 static const int codimension = codim; │ │ │ │ │ -198 │ │ │ │ │ -_1_9_9 typedef typename Traits::template Codim< codimension >::Entity _E_n_t_i_t_y; │ │ │ │ │ -200 │ │ │ │ │ -_2_0_1 static const bool fake = false; │ │ │ │ │ -202 │ │ │ │ │ -203 private: │ │ │ │ │ -204 typedef _G_e_o_G_r_i_d_:_:_E_n_t_i_t_y_<_ _c_o_d_i_m_e_n_s_i_o_n_,_ _T_r_a_i_t_s_:_:_d_i_m_e_n_s_i_o_n_,_ _G_ _> _E_n_t_i_t_y_I_m_p_l; │ │ │ │ │ +197 public: │ │ │ │ │ +_1_9_8 void _w_r_i_t_e_P_i_e_c_e(const std::string& filename, _O_u_t_p_u_t_T_y_p_e outputType) { │ │ │ │ │ +199 std::ofstream stream; │ │ │ │ │ +200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +201 std::ios_base::eofbit); │ │ │ │ │ +202 stream.open(filename.c_str(), std::ios::binary); │ │ │ │ │ +203 │ │ │ │ │ +204 _V_T_U_W_r_i_t_e_r vtuWriter(stream, outputType, fileType); │ │ │ │ │ 205 │ │ │ │ │ -206 typedef typename HostGridView::template Codim< codim >::template Partition< │ │ │ │ │ -pitype >::Iterator HostEntityIterator; │ │ │ │ │ -207 │ │ │ │ │ -208 public: │ │ │ │ │ -_2_0_9 _I_t_e_r_a_t_o_r () : grid_( nullptr ) {} │ │ │ │ │ -210 │ │ │ │ │ -_2_1_1 _I_t_e_r_a_t_o_r ( const _G_r_i_d &grid, HostEntityIterator hostEntityIterator ) │ │ │ │ │ -212 : grid_( &grid ), │ │ │ │ │ -213 hostEntityIterator_( _s_t_d::move( hostEntityIterator ) ) │ │ │ │ │ -214 {} │ │ │ │ │ -215 │ │ │ │ │ -_2_1_6 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -217 { │ │ │ │ │ -218 ++hostEntityIterator_; │ │ │ │ │ -219 } │ │ │ │ │ +206 unsigned ncells = std::distance(factory.beginCells(), │ │ │ │ │ +207 factory.endCells()); │ │ │ │ │ +208 unsigned npoints = std::distance(factory.beginPoints(), │ │ │ │ │ +209 factory.endPoints()); │ │ │ │ │ +210 unsigned ncorners = std::distance(factory.beginCorners(), │ │ │ │ │ +211 factory.endCorners()); │ │ │ │ │ +212 │ │ │ │ │ +213 vtuWriter._b_e_g_i_n_M_a_i_n(ncells, npoints); │ │ │ │ │ +214 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ +215 vtuWriter._e_n_d_M_a_i_n(); │ │ │ │ │ +216 │ │ │ │ │ +217 if(vtuWriter._b_e_g_i_n_A_p_p_e_n_d_e_d()) │ │ │ │ │ +218 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ +219 vtuWriter._e_n_d_A_p_p_e_n_d_e_d(); │ │ │ │ │ 220 │ │ │ │ │ -_2_2_1 bool _e_q_u_a_l_s ( const _I_t_e_r_a_t_o_r &rhs ) const │ │ │ │ │ -222 { │ │ │ │ │ -223 return hostEntityIterator_ == rhs.hostEntityIterator_; │ │ │ │ │ -224 } │ │ │ │ │ -225 │ │ │ │ │ -_2_2_6 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ -227 { │ │ │ │ │ -228 return _E_n_t_i_t_y_I_m_p_l( grid(), *hostEntityIterator_ ); │ │ │ │ │ -229 } │ │ │ │ │ -230 │ │ │ │ │ -_2_3_1 int _l_e_v_e_l () const { return hostEntityIterator_.level(); } │ │ │ │ │ -232 │ │ │ │ │ -_2_3_3 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ -234 { │ │ │ │ │ -235 assert( grid_ ); │ │ │ │ │ -236 return *grid_; │ │ │ │ │ -237 } │ │ │ │ │ -238 │ │ │ │ │ -_2_3_9 static _I_t_e_r_a_t_o_r _b_e_g_i_n ( const _G_r_i_d &grid, const HostGridView &hostGridView │ │ │ │ │ -) │ │ │ │ │ -240 { │ │ │ │ │ -241 HostEntityIterator hostEntityIterator = hostGridView.template begin< │ │ │ │ │ -codimension, pitype >(); │ │ │ │ │ -242 return _I_t_e_r_a_t_o_r( grid, std::move( hostEntityIterator ) ); │ │ │ │ │ -243 } │ │ │ │ │ -244 │ │ │ │ │ -_2_4_5 static _I_t_e_r_a_t_o_r _e_n_d ( const _G_r_i_d &grid, const HostGridView &hostGridView ) │ │ │ │ │ -246 { │ │ │ │ │ -247 HostEntityIterator hostEntityIterator = hostGridView.template end< │ │ │ │ │ -codimension, pitype >(); │ │ │ │ │ -248 return _I_t_e_r_a_t_o_r( grid, std::move( hostEntityIterator ) ); │ │ │ │ │ -249 } │ │ │ │ │ +221 } │ │ │ │ │ +222 │ │ │ │ │ +224 │ │ │ │ │ +_2_4_0 void _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(const std::string name, │ │ │ │ │ +241 const std::string& piecename, │ │ │ │ │ +242 const std::string& piecepath) │ │ │ │ │ +243 { │ │ │ │ │ +244 std::ofstream stream; │ │ │ │ │ +245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +246 std::ios_base::eofbit); │ │ │ │ │ +247 stream.open(name.c_str(), std::ios::binary); │ │ │ │ │ +248 │ │ │ │ │ +249 _P_V_T_U_W_r_i_t_e_r writer(stream, fileType); │ │ │ │ │ 250 │ │ │ │ │ -251 private: │ │ │ │ │ -252 const _G_r_i_d *grid_; │ │ │ │ │ -253 HostEntityIterator hostEntityIterator_; │ │ │ │ │ -254 }; │ │ │ │ │ -255 │ │ │ │ │ -256 │ │ │ │ │ -257 │ │ │ │ │ -258 // Iterator (fake) │ │ │ │ │ -259 // --------------- │ │ │ │ │ -260 │ │ │ │ │ -261 template< class HostGridView, int codim, PartitionIteratorType pitype, │ │ │ │ │ -class G > │ │ │ │ │ -_2_6_2 class _I_t_e_r_a_t_o_r< HostGridView, codim, pitype, G, true > │ │ │ │ │ -263 { │ │ │ │ │ -264 typedef typename std::remove_const< G >::type::Traits Traits; │ │ │ │ │ -265 │ │ │ │ │ -266 public: │ │ │ │ │ -_2_6_7 typedef typename Traits::Grid _G_r_i_d; │ │ │ │ │ -268 │ │ │ │ │ -_2_6_9 static const int codimension = codim; │ │ │ │ │ -270 │ │ │ │ │ -_2_7_1 typedef typename Traits::template Codim< codimension >::Entity _E_n_t_i_t_y; │ │ │ │ │ -272 │ │ │ │ │ -273 private: │ │ │ │ │ -274 typedef _G_e_o_G_r_i_d_:_:_E_n_t_i_t_y_<_ _c_o_d_i_m_e_n_s_i_o_n_,_ _T_r_a_i_t_s_:_:_d_i_m_e_n_s_i_o_n_,_ _G_ _> _E_n_t_i_t_y_I_m_p_l; │ │ │ │ │ +251 writer._b_e_g_i_n_M_a_i_n(); │ │ │ │ │ +252 │ │ │ │ │ +253 // PPointData │ │ │ │ │ +254 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(pointData), │ │ │ │ │ +255 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ +256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it) │ │ │ │ │ +257 (*it)->addArray(writer); │ │ │ │ │ +258 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +259 │ │ │ │ │ +260 // PCellData │ │ │ │ │ +261 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(_g_e_t_F_i_r_s_t_S_c_a_l_a_r(cellData), │ │ │ │ │ +262 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ +263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it) │ │ │ │ │ +264 (*it)->addArray(writer); │ │ │ │ │ +265 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +266 │ │ │ │ │ +267 // PPoints │ │ │ │ │ +268 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +269 coords._a_d_d_A_r_r_a_y(writer); │ │ │ │ │ +270 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +271 │ │ │ │ │ +272 // Pieces │ │ │ │ │ +273 for( int i = 0; i < factory.comm().size(); ++i ) │ │ │ │ │ +274 writer._a_d_d_P_i_e_c_e(_g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(piecename, piecepath, i)); │ │ │ │ │ 275 │ │ │ │ │ -276 typedef _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _t_y_p_e_n_a_m_e_ _H_o_s_t_G_r_i_d_V_i_e_w_:_:_G_r_i_d │ │ │ │ │ -_> _F_i_l_t_e_r; │ │ │ │ │ -277 │ │ │ │ │ -278 typedef typename HostGridView::template Codim<0>::template Partition< │ │ │ │ │ -Filter::Element_Partition >::Iterator HostElementIterator; │ │ │ │ │ -279 typedef typename HostElementIterator::Entity HostElement; │ │ │ │ │ -280 typedef typename HostGridView::IndexSet HostIndexSet; │ │ │ │ │ -281 │ │ │ │ │ -282 public: │ │ │ │ │ -_2_8_3 _I_t_e_r_a_t_o_r () : grid_( nullptr ), subEntity_( -1 ), hostIndexSet_( nullptr ) │ │ │ │ │ -{} │ │ │ │ │ -284 │ │ │ │ │ -_2_8_5 _I_t_e_r_a_t_o_r ( const _G_r_i_d &grid, HostElementIterator hostElementIterator, │ │ │ │ │ -HostElementIterator hostEnd, const HostIndexSet &hostIndexSet ) │ │ │ │ │ -286 : grid_( &grid ), │ │ │ │ │ -287 hostElementIterator_( hostElementIterator ), │ │ │ │ │ -288 hostEnd_( hostEnd ), │ │ │ │ │ -289 subEntity_( -1 ), │ │ │ │ │ -290 hostIndexSet_( &hostIndexSet ) │ │ │ │ │ -291 { │ │ │ │ │ -292 if( hostElementIterator_ != hostEnd_ ) │ │ │ │ │ -293 { │ │ │ │ │ -294 visited_.resize( hostIndexSet_->size( codimension ), false ); │ │ │ │ │ -295 increment(); │ │ │ │ │ -296 } │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -_2_9_9 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -300 { │ │ │ │ │ -301 typedef typename Traits::ctype ctype; │ │ │ │ │ -302 │ │ │ │ │ -303 while( hostElementIterator_ != hostEnd_ ) │ │ │ │ │ -304 { │ │ │ │ │ -305 const HostElement &hostElement = *hostElementIterator_; │ │ │ │ │ -306 │ │ │ │ │ -307 auto refElement = referenceElement< ctype, Traits::dimension > │ │ │ │ │ -( hostElement.type() ); │ │ │ │ │ -308 │ │ │ │ │ -309 ++subEntity_; │ │ │ │ │ -310 const int count = refElement.size( codimension ); │ │ │ │ │ -311 for( ; subEntity_ < count; ++subEntity_ ) │ │ │ │ │ -312 { │ │ │ │ │ -313 if( !Filter::apply( refElement, hostElement, subEntity_ ) ) │ │ │ │ │ -314 continue; │ │ │ │ │ -315 │ │ │ │ │ -316 const size_t index = hostIndexSet_->subIndex( hostElement, subEntity_, │ │ │ │ │ -codimension ); │ │ │ │ │ -317 if( !visited_[ index ] ) │ │ │ │ │ -318 { │ │ │ │ │ -319 visited_[ index ] = true; │ │ │ │ │ -320 return; │ │ │ │ │ -321 } │ │ │ │ │ -322 } │ │ │ │ │ -323 ++hostElementIterator_; │ │ │ │ │ -324 subEntity_ = -1; │ │ │ │ │ -325 } │ │ │ │ │ -326 } │ │ │ │ │ -327 │ │ │ │ │ -_3_2_8 bool _e_q_u_a_l_s ( const _I_t_e_r_a_t_o_r &rhs ) const │ │ │ │ │ -329 { │ │ │ │ │ -330 return hostElementIterator_ == rhs.hostElementIterator_ && │ │ │ │ │ -( hostElementIterator_ == hostEnd_ || subEntity_ == rhs.subEntity_ ); │ │ │ │ │ -331 } │ │ │ │ │ -332 │ │ │ │ │ -_3_3_3 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ -334 { │ │ │ │ │ -335 return _E_n_t_i_t_y_I_m_p_l( grid(), *hostElementIterator_, subEntity_ ); │ │ │ │ │ -336 } │ │ │ │ │ -337 │ │ │ │ │ -_3_3_8 int _l_e_v_e_l () const { return hostElementIterator_.level(); } │ │ │ │ │ -339 │ │ │ │ │ -_3_4_0 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ -341 { │ │ │ │ │ -342 assert( grid_ ); │ │ │ │ │ -343 return *grid_; │ │ │ │ │ -344 } │ │ │ │ │ +276 writer._e_n_d_M_a_i_n(); │ │ │ │ │ +277 } │ │ │ │ │ +278 │ │ │ │ │ +280 // │ │ │ │ │ +281 // Filename generators │ │ │ │ │ +282 // │ │ │ │ │ +283 │ │ │ │ │ +285 │ │ │ │ │ +_2_9_5 std::string _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ +296 const std::string& path, int rank) const │ │ │ │ │ +297 { │ │ │ │ │ +298 std::ostringstream s; │ │ │ │ │ +299 if(path.size() > 0) { │ │ │ │ │ +300 s << path; │ │ │ │ │ +301 if(path[path.size()-1] != '/') │ │ │ │ │ +302 s << '/'; │ │ │ │ │ +303 } │ │ │ │ │ +304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ +305 << ':'; │ │ │ │ │ +306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':'; │ │ │ │ │ +307 s << name; │ │ │ │ │ +308 switch(fileType) { │ │ │ │ │ +309 case _p_o_l_y_D_a_t_a : s << ".vtp"; break; │ │ │ │ │ +310 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".vtu"; break; │ │ │ │ │ +311 } │ │ │ │ │ +312 return s.str(); │ │ │ │ │ +313 } │ │ │ │ │ +314 │ │ │ │ │ +316 │ │ │ │ │ +_3_2_5 std::string _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(const std::string& name, │ │ │ │ │ +326 const std::string& path) const │ │ │ │ │ +327 { │ │ │ │ │ +328 std::ostringstream s; │ │ │ │ │ +329 if(path.size() > 0) { │ │ │ │ │ +330 s << path; │ │ │ │ │ +331 if(path[path.size()-1] != '/') │ │ │ │ │ +332 s << '/'; │ │ │ │ │ +333 } │ │ │ │ │ +334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ +335 << ':'; │ │ │ │ │ +336 s << name; │ │ │ │ │ +337 switch(fileType) { │ │ │ │ │ +338 case _p_o_l_y_D_a_t_a : s << ".pvtp"; break; │ │ │ │ │ +339 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".pvtu"; break; │ │ │ │ │ +340 } │ │ │ │ │ +341 return s.str(); │ │ │ │ │ +342 } │ │ │ │ │ +343 │ │ │ │ │ 345 │ │ │ │ │ -_3_4_6 static _I_t_e_r_a_t_o_r _b_e_g_i_n ( const _G_r_i_d &grid, const HostGridView &hostGridView │ │ │ │ │ -) │ │ │ │ │ -347 { │ │ │ │ │ -348 HostElementIterator first = hostGridView.template begin< 0, Filter:: │ │ │ │ │ -Element_Partition >(); │ │ │ │ │ -349 HostElementIterator last = hostGridView.template end< 0, Filter:: │ │ │ │ │ -Element_Partition >(); │ │ │ │ │ -350 return _I_t_e_r_a_t_o_r( grid, std::move( first ), std::move( last ), │ │ │ │ │ -hostGridView.indexSet() ); │ │ │ │ │ -351 } │ │ │ │ │ -352 │ │ │ │ │ -_3_5_3 static _I_t_e_r_a_t_o_r _e_n_d ( const _G_r_i_d &grid, const HostGridView &hostGridView ) │ │ │ │ │ -354 { │ │ │ │ │ -355 HostElementIterator last = hostGridView.template end< 0, Filter:: │ │ │ │ │ -Element_Partition >(); │ │ │ │ │ -356 return _I_t_e_r_a_t_o_r( grid, last, last, hostGridView.indexSet() ); │ │ │ │ │ -357 } │ │ │ │ │ -358 │ │ │ │ │ -359 private: │ │ │ │ │ -360 const _G_r_i_d *grid_; │ │ │ │ │ -361 HostElementIterator hostElementIterator_, hostEnd_; │ │ │ │ │ -362 int subEntity_; │ │ │ │ │ -363 const HostIndexSet *hostIndexSet_; │ │ │ │ │ -364 std::vector< bool > visited_; │ │ │ │ │ -365 }; │ │ │ │ │ +_3_5_7 std::string _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ +358 const std::string& path) const │ │ │ │ │ +359 { │ │ │ │ │ +360 switch(fileType) { │ │ │ │ │ +361 case _p_o_l_y_D_a_t_a : return concatPaths(path, name+".vtp"); │ │ │ │ │ +362 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : return concatPaths(path, name+".vtu"); │ │ │ │ │ +363 } │ │ │ │ │ +364 return concatPaths(path, name); // unknown fileType │ │ │ │ │ +365 } │ │ │ │ │ 366 │ │ │ │ │ -367 │ │ │ │ │ -368 │ │ │ │ │ -369 // HierarchicIterator │ │ │ │ │ -370 // ------------------ │ │ │ │ │ +368 // │ │ │ │ │ +369 // User interface functions for writing │ │ │ │ │ +370 // │ │ │ │ │ 371 │ │ │ │ │ -372 template< class G > │ │ │ │ │ -_3_7_3 class _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -374 { │ │ │ │ │ -375 typedef typename std::remove_const< G >::type::Traits Traits; │ │ │ │ │ -376 │ │ │ │ │ -377 public: │ │ │ │ │ -_3_7_8 typedef typename Traits::Grid _G_r_i_d; │ │ │ │ │ -379 │ │ │ │ │ -_3_8_0 static const int _c_o_d_i_m_e_n_s_i_o_n = 0; │ │ │ │ │ -381 │ │ │ │ │ -_3_8_2 typedef typename Traits::template Codim< codimension >::Entity _E_n_t_i_t_y; │ │ │ │ │ -383 │ │ │ │ │ -384 private: │ │ │ │ │ -385 typedef _G_e_o_G_r_i_d_:_:_E_n_t_i_t_y_<_ _c_o_d_i_m_e_n_s_i_o_n_,_ _T_r_a_i_t_s_:_:_d_i_m_e_n_s_i_o_n_,_ _G_ _> _E_n_t_i_t_y_I_m_p_l; │ │ │ │ │ -386 │ │ │ │ │ -387 typedef typename Grid::HostGrid::HierarchicIterator HostEntityIterator; │ │ │ │ │ -388 │ │ │ │ │ -389 public: │ │ │ │ │ -_3_9_0 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () : grid_( nullptr ) {} │ │ │ │ │ -391 │ │ │ │ │ -_3_9_2 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const _G_r_i_d &_g_r_i_d, HostEntityIterator │ │ │ │ │ -hostEntityIterator ) │ │ │ │ │ -393 : grid_( &_g_r_i_d ), │ │ │ │ │ -394 hostEntityIterator_( _s_t_d::move( hostEntityIterator ) ) │ │ │ │ │ -395 {} │ │ │ │ │ -396 │ │ │ │ │ -_3_9_7 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -398 { │ │ │ │ │ -399 ++hostEntityIterator_; │ │ │ │ │ -400 } │ │ │ │ │ -401 │ │ │ │ │ -_4_0_2 bool _e_q_u_a_l_s ( const _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r &rhs ) const │ │ │ │ │ -403 { │ │ │ │ │ -404 return hostEntityIterator_ == rhs.hostEntityIterator_; │ │ │ │ │ -405 } │ │ │ │ │ -406 │ │ │ │ │ -_4_0_7 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ -408 { │ │ │ │ │ -409 return _E_n_t_i_t_y_I_m_p_l( _g_r_i_d(), *hostEntityIterator_ ); │ │ │ │ │ -410 } │ │ │ │ │ -411 │ │ │ │ │ -_4_1_2 int _l_e_v_e_l () const { return hostEntityIterator_.level(); } │ │ │ │ │ -413 │ │ │ │ │ -_4_1_4 const _G_r_i_d &_g_r_i_d () const │ │ │ │ │ -415 { │ │ │ │ │ -416 assert( grid_ ); │ │ │ │ │ -417 return *grid_; │ │ │ │ │ -418 } │ │ │ │ │ +373 │ │ │ │ │ +_3_9_5 std::string _p_w_r_i_t_e(const std::string& name, const std::string& path, │ │ │ │ │ +396 const std::string& extendpath, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ +397 { │ │ │ │ │ +398 MPIGuard guard(factory.comm()); │ │ │ │ │ +399 │ │ │ │ │ +400 // do some magic because paraview can only cope with relative paths to │ │ │ │ │ +401 // piece files │ │ │ │ │ +402 std::ofstream file; │ │ │ │ │ +403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +404 std::ios_base::eofbit); │ │ │ │ │ +405 std::string piecepath = concatPaths(path, extendpath); │ │ │ │ │ +406 std::string relpiecepath = relativePath(path, piecepath); │ │ │ │ │ +407 │ │ │ │ │ +408 // write this processes .vtu/.vtp piece file │ │ │ │ │ +409 std::string fullname = _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(name, piecepath, │ │ │ │ │ +410 factory.comm().rank()); │ │ │ │ │ +411 _w_r_i_t_e_P_i_e_c_e(fullname, outputType); │ │ │ │ │ +412 │ │ │ │ │ +413 // if we are rank 0, write .pvtu/.pvtp parallel header │ │ │ │ │ +414 fullname = _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(name, path); │ │ │ │ │ +415 if(factory.comm().rank() == 0) │ │ │ │ │ +416 _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(fullname, name, relpiecepath); │ │ │ │ │ +417 │ │ │ │ │ +418 guard.finalize(); │ │ │ │ │ 419 │ │ │ │ │ -420 private: │ │ │ │ │ -421 const _G_r_i_d *grid_; │ │ │ │ │ -422 HostEntityIterator hostEntityIterator_; │ │ │ │ │ -423 }; │ │ │ │ │ -424 │ │ │ │ │ -425 } // namespace GeoGrid │ │ │ │ │ -426 │ │ │ │ │ -427} // namespace Dune │ │ │ │ │ -428 │ │ │ │ │ -429#endif // #ifndef DUNE_GEOGRID_ITERATOR_HH │ │ │ │ │ -_d_e_c_l_a_r_a_t_i_o_n_._h_h │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ │ -PartitionIteratorType │ │ │ │ │ -Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ │ -PartitionType │ │ │ │ │ -Attributes used in the generic overlap model. │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ All_Partition │ │ │ │ │ -all entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ OverlapFront_Partition │ │ │ │ │ -interior, border, overlap and front entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Interior_Partition │ │ │ │ │ -only interior entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ InteriorBorder_Partition │ │ │ │ │ -interior and border entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Overlap_Partition │ │ │ │ │ -interior, border, and overlap entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ │ -@ Ghost_Partition │ │ │ │ │ -only ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ │ -@ InteriorEntity │ │ │ │ │ -all interior entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ │ -@ GhostEntity │ │ │ │ │ -ghost entities │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ │ -@ BorderEntity │ │ │ │ │ -on boundary between interior and overlap │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ │ -@ OverlapEntity │ │ │ │ │ -all entities lying in the overlap zone │ │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:33 │ │ │ │ │ -_s_t_d │ │ │ │ │ -STL namespace. │ │ │ │ │ +420 return fullname; │ │ │ │ │ +421 } │ │ │ │ │ +422 │ │ │ │ │ +_4_3_6 std::string _w_r_i_t_e(const std::string &name, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ +437 { │ │ │ │ │ +438 // in the parallel case, just use pwrite, it has all the necessary │ │ │ │ │ +439 // stuff, so we don't need to reimplement it here. │ │ │ │ │ +440 if(factory.comm().size() > 1) │ │ │ │ │ +441 return _p_w_r_i_t_e(name, "", "", outputType); │ │ │ │ │ +442 │ │ │ │ │ +443 // generate filename for process data │ │ │ │ │ +444 std::string pieceName = _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(name, ""); │ │ │ │ │ +445 │ │ │ │ │ +446 _w_r_i_t_e_P_i_e_c_e(pieceName, outputType); │ │ │ │ │ +447 │ │ │ │ │ +448 return pieceName; │ │ │ │ │ +449 } │ │ │ │ │ +450 │ │ │ │ │ +451 }; │ │ │ │ │ +452 │ │ │ │ │ +453 } // namespace VTK │ │ │ │ │ +454 │ │ │ │ │ +456 │ │ │ │ │ +457} // namespace Dune │ │ │ │ │ +458 │ │ │ │ │ +459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ +_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_E_n_t_i_t_y │ │ │ │ │ -DUNE-conform implementation of the entity. │ │ │ │ │ -DDeeffiinniittiioonn geometrygrid/entity.hh:694 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:374 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int codimension │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:380 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:412 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:397 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const HierarchicIterator &rhs) const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:402 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity dereference() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:407 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -HierarchicIterator() │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:390 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -HierarchicIterator(const Grid &grid, HostEntityIterator hostEntityIterator) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:392 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_G_r_i_d │ │ │ │ │ -Traits::Grid Grid │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:378 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:414 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -Traits::template Codim< codimension >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:382 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_c_t_y_p_e │ │ │ │ │ -std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_E_l_e_m_e_n_t │ │ │ │ │ -std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_a_p_p_l_y │ │ │ │ │ -static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ -_>_:_:_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ -_>_:_:_a_p_p_l_y │ │ │ │ │ -static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ -_>_:_:_c_t_y_p_e │ │ │ │ │ -std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d │ │ │ │ │ -_>_:_:_E_l_e_m_e_n_t │ │ │ │ │ -std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_E_l_e_m_e_n_t │ │ │ │ │ -std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_c_t_y_p_e │ │ │ │ │ -std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_E_l_e_m_e_n_t │ │ │ │ │ -std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_c_t_y_p_e │ │ │ │ │ -std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_a_p_p_l_y │ │ │ │ │ -static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_c_t_y_p_e │ │ │ │ │ -std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:146 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_E_l_e_m_e_n_t │ │ │ │ │ -std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_: │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_E_l_e_m_e_n_t │ │ │ │ │ -std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:166 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_c_t_y_p_e │ │ │ │ │ -std::remove_const< Grid >::type::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_F_i_l_t_e_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static bool apply(const RefElement &refElement, const Element &element, int │ │ │ │ │ -subEntity) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator() │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:209 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_G_r_i_d │ │ │ │ │ -Traits::Grid Grid │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity dereference() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:226 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:216 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const Iterator &rhs) const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:221 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_b_e_g_i_n │ │ │ │ │ -static Iterator begin(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:239 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ -Traits::template Codim< codimension >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:233 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_e_n_d │ │ │ │ │ -static Iterator end(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:245 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _f_a_l_s_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator(const Grid &grid, HostEntityIterator hostEntityIterator) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:211 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_G_r_i_d │ │ │ │ │ -Traits::Grid Grid │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:267 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:338 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_g_r_i_d │ │ │ │ │ -const Grid & grid() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:340 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_e_n_d │ │ │ │ │ -static Iterator end(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:353 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_b_e_g_i_n │ │ │ │ │ -static Iterator begin(const Grid &grid, const HostGridView &hostGridView) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const Iterator &rhs) const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:328 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity dereference() const │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:333 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator(const Grid &grid, HostElementIterator hostElementIterator, │ │ │ │ │ -HostElementIterator hostEnd, const HostIndexSet &hostIndexSet) │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ -Traits::template Codim< codimension >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_t_e_r_a_t_o_r_<_ _H_o_s_t_G_r_i_d_V_i_e_w_,_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_,_ _t_r_u_e_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator() │ │ │ │ │ -DDeeffiinniittiioonn iterator.hh:283 │ │ │ │ │ -_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ -_e_n_t_i_t_y_._h_h │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ +OutputType │ │ │ │ │ +How the bulk data should be stored in the file. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ +FileType │ │ │ │ │ +which type of VTK file to write │ │ │ │ │ +DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ +@ polyData │ │ │ │ │ +for .vtp files (PolyData) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ +@ unstructuredGrid │ │ │ │ │ +for .vtu files (UnstructuredGrid) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a │ │ │ │ │ +void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_B_a_s_i_c_W_r_i_t_e_r │ │ │ │ │ +BasicWriter(const IteratorFactory &factory_) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e │ │ │ │ │ +std::string getSerialPieceName(const std::string &name, const std::string │ │ │ │ │ +&path) const │ │ │ │ │ +return name of a serial piece file │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:357 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_o_l_l_e_c_t_i_o_n │ │ │ │ │ +void writeCollection(const std::string name, const std::string &piecename, │ │ │ │ │ +const std::string &piecepath) │ │ │ │ │ +write header file in parallel case to stream │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d │ │ │ │ │ +void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ +unsigned ncorners) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:176 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_A_l_l │ │ │ │ │ +void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned │ │ │ │ │ +ncorners) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:190 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_p_w_r_i_t_e │ │ │ │ │ +std::string pwrite(const std::string &name, const std::string &path, const │ │ │ │ │ +std::string &extendpath, OutputType outputType) │ │ │ │ │ +write output; interface might change later │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:395 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_c_l_e_a_r │ │ │ │ │ +void clear() │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n │ │ │ │ │ +void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, │ │ │ │ │ +unsigned ncells) const │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n │ │ │ │ │ +void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, │ │ │ │ │ +unsigned ncorners) const │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:121 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e │ │ │ │ │ +std::string getParallelHeaderName(const std::string &name, const std::string │ │ │ │ │ +&path) const │ │ │ │ │ +return name of a parallel header file │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:325 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void writePointData(VTUWriter &vtuWriter, unsigned npoints) const │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_F_i_r_s_t_V_e_c_t_o_r │ │ │ │ │ +static std::string getFirstVector(const WriterList &data) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +FunctionWriterBase< Cell > FunctionWriter │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n │ │ │ │ │ +void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, │ │ │ │ │ +unsigned npoints) const │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e_P_i_e_c_e │ │ │ │ │ +void writePiece(const std::string &filename, OutputType outputType) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:198 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_F_i_r_s_t_S_c_a_l_a_r │ │ │ │ │ +static std::string getFirstScalar(const WriterList &data) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e │ │ │ │ │ +std::string getParallelPieceName(const std::string &name, const std::string │ │ │ │ │ +&path, int rank) const │ │ │ │ │ +return name of a parallel piece file │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:295 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +std::string write(const std::string &name, OutputType outputType) │ │ │ │ │ +write output (interface might change later) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:436 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_B_a_s_i_c_W_r_i_t_e_r_:_:_a_d_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void addPointData(const std::shared_ptr< FunctionWriter > &writer) │ │ │ │ │ +DDeeffiinniittiioonn basicwriter.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +Base class for function writers. │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const Cell &, const Domain &) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite()=0 │ │ │ │ │ +signal end of writing │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0 │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ +writer for the Coordinates array │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ │ +writer for the offsets array │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:300 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r │ │ │ │ │ +writer for the types array │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:340 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ +void endMain() │ │ │ │ │ +finish the main PolyData/UnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void endCellData() │ │ │ │ │ +finish CellData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ +void beginMain(unsigned ghostLevel=0) │ │ │ │ │ +start the main PPolyData/PUnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ +void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start CellData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:146 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start PointData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:120 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_P_i_e_c_e │ │ │ │ │ +void addPiece(const std::string &filename) │ │ │ │ │ +Add a serial piece to the output file. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:215 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void endPointData() │ │ │ │ │ +finish PointData section │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +void endPoints() │ │ │ │ │ +finish section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +void beginPoints() │ │ │ │ │ +start section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ │ +bool beginAppended() │ │ │ │ │ +start the appended data section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:345 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_A_p_p_e_n_d_e_d │ │ │ │ │ +void endAppended() │ │ │ │ │ +finish the appended data section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void endCellData() │ │ │ │ │ +finish CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ │ +void beginMain(unsigned ncells, unsigned npoints) │ │ │ │ │ +start the main PolyData/UnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +void beginCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void endPointData() │ │ │ │ │ +finish PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ +void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start CellData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ +void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ +&vectors="") │ │ │ │ │ +start PointData section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +void endPoints() │ │ │ │ │ +finish section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +void endCells() │ │ │ │ │ +start section for the grid cells/PolyData lines │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +void beginPoints() │ │ │ │ │ +start section for the point coordinates │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ │ +void endMain() │ │ │ │ │ +finish the main PolyData/UnstructuredGrid section │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:320 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00158.html │ │ │ │┄ Files 8% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunctioncaller.hh File Reference │ │ │ │ +dune-grid: yaspgridindexsets.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,44 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
coordfunctioncaller.hh File Reference
│ │ │ │ +
yaspgridindexsets.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/geometrygrid/hostcorners.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ + │ │ │ │ +

level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ │ +More...

│ │ │ │ + │ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::YaspIndexSet< GridImp, isLeafIndexSet >
 Implementation of Level- and LeafIndexSets for YaspGrid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

level-wise, non-persistent, consecutive indices for YaspGrid

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,23 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -coordfunctioncaller.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_h_o_s_t_c_o_r_n_e_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +yaspgridindexsets.hh File Reference │ │ │ │ │ +level-wise, non-persistent, consecutive indices for YaspGrid _M_o_r_e_._._. │ │ │ │ │ _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_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _i_s_L_e_a_f_I_n_d_e_x_S_e_t_ _> │ │ │ │ │ +  Implementation of Level- and LeafIndexSets for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ -  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html │ │ │ │┄ Files 21% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunctioncaller.hh Source File │ │ │ │ +dune-grid: algebra.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,127 +70,201 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
coordfunctioncaller.hh
│ │ │ │ +
algebra.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ │ -
6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │ +
6#define DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ │ +
9#include <dune/common/fmatrix.hh>
│ │ │ │
10
│ │ │ │
11namespace Dune
│ │ │ │
12{
│ │ │ │
13
│ │ │ │ -
14 namespace GeoGrid
│ │ │ │ +
14 namespace Alberta
│ │ │ │
15 {
│ │ │ │
16
│ │ │ │ -
17 // CoordFunctionCaller
│ │ │ │ -
18 // -------------------
│ │ │ │ -
19
│ │ │ │ -
20 template< class HostEntity, class CoordFunctionInterface >
│ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ -
24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
│ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ - │ │ │ │ +
17 template< class K >
│ │ │ │ +
18 inline static FieldVector< K, 3 >
│ │ │ │ +
│ │ │ │ +
19 vectorProduct ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v )
│ │ │ │ +
20 {
│ │ │ │ +
21 FieldVector< K, 3 > w;
│ │ │ │ +
22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ];
│ │ │ │ +
23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ];
│ │ │ │ +
24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ];
│ │ │ │ +
25 return w;
│ │ │ │ +
26 }
│ │ │ │ +
│ │ │ │ +
27
│ │ │ │
28
│ │ │ │ -
29 static const int codimension = HostEntity::codimension;
│ │ │ │ -
30
│ │ │ │ -
31 public:
│ │ │ │ -
32 typedef typename CoordFunctionInterface::RangeVector RangeVector;
│ │ │ │ -
33
│ │ │ │ -
34 CoordFunctionCaller ( const HostEntity &hostEntity,
│ │ │ │ -
35 const CoordFunctionInterface &coordFunction )
│ │ │ │ -
36 : hostCorners_( hostEntity ),
│ │ │ │ -
37 coordFunction_( coordFunction )
│ │ │ │ -
38 {}
│ │ │ │ -
39
│ │ │ │ -
40 void evaluate ( unsigned int i, RangeVector &y ) const
│ │ │ │ -
41 {
│ │ │ │ -
42 coordFunction_.evaluate( hostCorners_[ i ], y );
│ │ │ │ -
43 }
│ │ │ │ -
44
│ │ │ │ -
45 GeometryType type () const
│ │ │ │ -
46 {
│ │ │ │ -
47 return hostCorners_.type();
│ │ │ │ -
48 }
│ │ │ │ -
49
│ │ │ │ -
50 std::size_t size () const
│ │ │ │ -
51 {
│ │ │ │ -
52 return hostCorners_.size();
│ │ │ │ -
53 }
│ │ │ │ -
54
│ │ │ │ -
55 private:
│ │ │ │ -
56 const HostCorners< HostEntity > hostCorners_;
│ │ │ │ -
57 const CoordFunctionInterface &coordFunction_;
│ │ │ │ -
58 };
│ │ │ │ -
59
│ │ │ │ -
60 template< class HostEntity, class ct, unsigned int dimR, class Impl >
│ │ │ │ -
61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ -
62 {
│ │ │ │ -
63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
│ │ │ │ -
64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
│ │ │ │ -
65
│ │ │ │ -
66 typedef typename CoordFunctionInterface::RangeVector RangeVector;
│ │ │ │ -
67
│ │ │ │ -
68 public:
│ │ │ │ -
69 CoordFunctionCaller ( const HostEntity &hostEntity,
│ │ │ │ -
70 const CoordFunctionInterface &coordFunction )
│ │ │ │ -
71 : hostEntity_( hostEntity ),
│ │ │ │ -
72 coordFunction_( coordFunction )
│ │ │ │ -
73 {}
│ │ │ │ -
74
│ │ │ │ -
75 void evaluate ( unsigned int i, RangeVector &y ) const
│ │ │ │ -
76 {
│ │ │ │ -
77 coordFunction_.evaluate( hostEntity_, i, y );
│ │ │ │ -
78 }
│ │ │ │ +
29 template< class K, int m >
│ │ │ │ +
│ │ │ │ +
30 inline static K determinant ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix )
│ │ │ │ +
31 {
│ │ │ │ +
32 return K( 1 );
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
35 template< class K >
│ │ │ │ +
│ │ │ │ +
36 inline static K determinant ( const FieldMatrix< K, 1, 1 > &matrix )
│ │ │ │ +
37 {
│ │ │ │ +
38 return matrix[ 0 ][ 0 ];
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
41 template< class K, int m >
│ │ │ │ +
│ │ │ │ +
42 inline static K determinant ( const FieldMatrix< K, 1, m > &matrix )
│ │ │ │ +
43 {
│ │ │ │ +
44 using std::sqrt;
│ │ │ │ +
45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ];
│ │ │ │ +
46 for( int i = 1; i < m; ++i )
│ │ │ │ +
47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ];
│ │ │ │ +
48 return sqrt( sum );
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51 template< class K >
│ │ │ │ +
│ │ │ │ +
52 inline static K determinant ( const FieldMatrix< K, 2, 2 > &matrix )
│ │ │ │ +
53 {
│ │ │ │ +
54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ][ 0 ];
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57 template< class K >
│ │ │ │ +
│ │ │ │ +
58 inline static K determinant ( const FieldMatrix< K, 2, 3 > &matrix )
│ │ │ │ +
59 {
│ │ │ │ +
60 return vectorProduct( matrix[ 0 ], matrix[ 1 ] ).two_norm();
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
63 template< class K, int m >
│ │ │ │ +
│ │ │ │ +
64 inline static K determinant ( const FieldMatrix< K, 2, m > &matrix )
│ │ │ │ +
65 {
│ │ │ │ +
66 using std::sqrt;
│ │ │ │ +
67 const K tmpA = matrix[ 0 ].two_norm2();
│ │ │ │ +
68 const K tmpB = matrix[ 1 ].two_norm2();
│ │ │ │ +
69 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
│ │ │ │ +
70 return sqrt( tmpA * tmpB - tmpC * tmpC );
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 template< class K >
│ │ │ │ +
│ │ │ │ +
74 inline static K determinant ( const FieldMatrix< K, 3, 3 > &matrix )
│ │ │ │ +
75 {
│ │ │ │ +
76 return matrix[ 0 ] * vectorProduct( matrix[ 1 ], matrix[ 2 ] );
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │
79
│ │ │ │ -
80 GeometryType type () const
│ │ │ │ -
81 {
│ │ │ │ -
82 return hostEntity_.type();
│ │ │ │ -
83 }
│ │ │ │ -
84
│ │ │ │ -
85 std::size_t size () const
│ │ │ │ -
86 {
│ │ │ │ -
87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
│ │ │ │ -
88 return refElement.size( HostEntity::mydimension );
│ │ │ │ -
89 }
│ │ │ │ -
90
│ │ │ │ -
91 private:
│ │ │ │ -
92 const HostEntity &hostEntity_;
│ │ │ │ -
93 const CoordFunctionInterface &coordFunction_;
│ │ │ │ -
94 };
│ │ │ │ -
95
│ │ │ │ -
96 } // namespace GeoGrid
│ │ │ │ -
97
│ │ │ │ -
98} // namespace Dune
│ │ │ │ -
99
│ │ │ │ -
100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
80 template< class K, int m >
│ │ │ │ +
│ │ │ │ +
81 inline static K invert ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix,
│ │ │ │ +
82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse )
│ │ │ │ +
83 {
│ │ │ │ +
84 return K( 1 );
│ │ │ │ +
85 }
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
87 template< class K >
│ │ │ │ +
│ │ │ │ +
88 inline static K invert ( const FieldMatrix< K, 1, 1 > &matrix,
│ │ │ │ +
89 FieldMatrix< K, 1, 1 > &inverse )
│ │ │ │ +
90 {
│ │ │ │ +
91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ];
│ │ │ │ +
92 return matrix[ 0 ][ 0 ];
│ │ │ │ +
93 }
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95 template< class K, int m >
│ │ │ │ +
│ │ │ │ +
96 inline static K invert ( const FieldMatrix< K, 1, m > &matrix,
│ │ │ │ +
97 FieldMatrix< K, m, 1 > &inverse )
│ │ │ │ +
98 {
│ │ │ │ +
99 using std::sqrt;
│ │ │ │ +
100 K detSqr = matrix[ 0 ].two_norm2();
│ │ │ │ +
101 K invDetSqr = K( 1 ) / detSqr;
│ │ │ │ +
102 for( int i = 0; i < m; ++i )
│ │ │ │ +
103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ];
│ │ │ │ +
104 return sqrt( detSqr );
│ │ │ │ +
105 }
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
107 template< class K >
│ │ │ │ +
│ │ │ │ +
108 inline static K invert ( const FieldMatrix< K, 2, 2 > &matrix,
│ │ │ │ +
109 FieldMatrix< K, 2, 2 > &inverse )
│ │ │ │ +
110 {
│ │ │ │ +
111 K det = determinant( matrix );
│ │ │ │ +
112 K invDet = K( 1 ) / det;
│ │ │ │ +
113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ];
│ │ │ │ +
114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ];
│ │ │ │ +
115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ];
│ │ │ │ +
116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ];
│ │ │ │ +
117 return det;
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120 template< class K, int m >
│ │ │ │ +
│ │ │ │ +
121 inline static K invert ( const FieldMatrix< K, 2, m > &matrix,
│ │ │ │ +
122 FieldMatrix< K, m, 2 > &inverse )
│ │ │ │ +
123 {
│ │ │ │ +
124 using std::sqrt;
│ │ │ │ +
125 const K tmpA = matrix[ 0 ].two_norm2();
│ │ │ │ +
126 const K tmpB = matrix[ 1 ].two_norm2();
│ │ │ │ +
127 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
│ │ │ │ +
128 const K detSqr = tmpA * tmpB - tmpC * tmpC;
│ │ │ │ +
129 const K invDetSqr = K( 1 ) / detSqr;
│ │ │ │ +
130 for( int i = 0; i < m; ++i )
│ │ │ │ +
131 {
│ │ │ │ +
132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix[ 1 ][ i ]);
│ │ │ │ +
133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix[ 0 ][ i ]);
│ │ │ │ +
134 }
│ │ │ │ +
135 return sqrt( detSqr );
│ │ │ │ +
136 }
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
138 template< class K >
│ │ │ │ +
│ │ │ │ +
139 inline static K invert ( const FieldMatrix< K, 3, 3 > &matrix,
│ │ │ │ +
140 FieldMatrix< K, 3, 3 > &inverse )
│ │ │ │ +
141 {
│ │ │ │ +
142 return FMatrixHelp::invertMatrix( matrix, inverse );
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144 }
│ │ │ │ +
145
│ │ │ │ +
146}
│ │ │ │ +
147
│ │ │ │ +
148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
GeometryType
Type representing VTK's entity geometry types.
Definition common.hh:132
│ │ │ │ -
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
Definition coordfunction.hh:44
│ │ │ │ -
Definition coordfunctioncaller.hh:21
│ │ │ │ +
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition algebra.hh:30
│ │ │ │ +
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ │ +
static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
Definition algebra.hh:19
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,132 +1,179 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -coordfunctioncaller.hh │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ +algebra.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ │ -6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ │ +6#define DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_h_o_s_t_c_o_r_n_e_r_s_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ 11namespace _D_u_n_e │ │ │ │ │ 12{ │ │ │ │ │ 13 │ │ │ │ │ -14 namespace GeoGrid │ │ │ │ │ +14 namespace Alberta │ │ │ │ │ 15 { │ │ │ │ │ 16 │ │ │ │ │ -17 // CoordFunctionCaller │ │ │ │ │ -18 // ------------------- │ │ │ │ │ -19 │ │ │ │ │ -20 template< class HostEntity, class CoordFunctionInterface > │ │ │ │ │ -_2_1 class _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r; │ │ │ │ │ -22 │ │ │ │ │ -23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR, │ │ │ │ │ -class Impl > │ │ │ │ │ -24 class _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r< HostEntity, _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e< ct, │ │ │ │ │ -dimD, dimR, Impl > > │ │ │ │ │ -25 { │ │ │ │ │ -26 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> │ │ │ │ │ -CoordFunctionInterface; │ │ │ │ │ -27 typedef _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r_<_ _H_o_s_t_E_n_t_i_t_y_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_ _> This; │ │ │ │ │ +17 template< class K > │ │ │ │ │ +18 inline static FieldVector< K, 3 > │ │ │ │ │ +_1_9 _v_e_c_t_o_r_P_r_o_d_u_c_t ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v ) │ │ │ │ │ +20 { │ │ │ │ │ +21 FieldVector< K, 3 > w; │ │ │ │ │ +22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ]; │ │ │ │ │ +23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ]; │ │ │ │ │ +24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ]; │ │ │ │ │ +25 return w; │ │ │ │ │ +26 } │ │ │ │ │ +27 │ │ │ │ │ 28 │ │ │ │ │ -29 static const int codimension = HostEntity::codimension; │ │ │ │ │ -30 │ │ │ │ │ -31 public: │ │ │ │ │ -32 typedef typename CoordFunctionInterface::RangeVector RangeVector; │ │ │ │ │ -33 │ │ │ │ │ -34 _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r ( const HostEntity &hostEntity, │ │ │ │ │ -35 const CoordFunctionInterface &coordFunction ) │ │ │ │ │ -36 : hostCorners_( hostEntity ), │ │ │ │ │ -37 coordFunction_( coordFunction ) │ │ │ │ │ -38 {} │ │ │ │ │ -39 │ │ │ │ │ -40 void evaluate ( unsigned int i, RangeVector &y ) const │ │ │ │ │ -41 { │ │ │ │ │ -42 coordFunction_.evaluate( hostCorners_[ i ], y ); │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -45 GeometryType type () const │ │ │ │ │ -46 { │ │ │ │ │ -47 return hostCorners_.type(); │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -50 std::size_t size () const │ │ │ │ │ -51 { │ │ │ │ │ -52 return hostCorners_.size(); │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -55 private: │ │ │ │ │ -56 const HostCorners< HostEntity > hostCorners_; │ │ │ │ │ -57 const CoordFunctionInterface &coordFunction_; │ │ │ │ │ -58 }; │ │ │ │ │ -59 │ │ │ │ │ -60 template< class HostEntity, class ct, unsigned int dimR, class Impl > │ │ │ │ │ -61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, │ │ │ │ │ -dimR, Impl > > │ │ │ │ │ -62 { │ │ │ │ │ -63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > │ │ │ │ │ -CoordFunctionInterface; │ │ │ │ │ -64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This; │ │ │ │ │ -65 │ │ │ │ │ -66 typedef typename CoordFunctionInterface::RangeVector RangeVector; │ │ │ │ │ -67 │ │ │ │ │ -68 public: │ │ │ │ │ -69 CoordFunctionCaller ( const HostEntity &hostEntity, │ │ │ │ │ -70 const CoordFunctionInterface &coordFunction ) │ │ │ │ │ -71 : hostEntity_( hostEntity ), │ │ │ │ │ -72 coordFunction_( coordFunction ) │ │ │ │ │ -73 {} │ │ │ │ │ -74 │ │ │ │ │ -75 void evaluate ( unsigned int i, RangeVector &y ) const │ │ │ │ │ -76 { │ │ │ │ │ -77 coordFunction_.evaluate( hostEntity_, i, y ); │ │ │ │ │ -78 } │ │ │ │ │ +29 template< class K, int m > │ │ │ │ │ +_3_0 inline static K _d_e_t_e_r_m_i_n_a_n_t ( [[maybe_unused]] const FieldMatrix< K, 0, m > │ │ │ │ │ +&matrix ) │ │ │ │ │ +31 { │ │ │ │ │ +32 return K( 1 ); │ │ │ │ │ +33 } │ │ │ │ │ +34 │ │ │ │ │ +35 template< class K > │ │ │ │ │ +_3_6 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 1, 1 > &matrix ) │ │ │ │ │ +37 { │ │ │ │ │ +38 return matrix[ 0 ][ 0 ]; │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +41 template< class K, int m > │ │ │ │ │ +_4_2 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 1, m > &matrix ) │ │ │ │ │ +43 { │ │ │ │ │ +44 using std::sqrt; │ │ │ │ │ +45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ]; │ │ │ │ │ +46 for( int i = 1; i < m; ++i ) │ │ │ │ │ +47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ]; │ │ │ │ │ +48 return sqrt( sum ); │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +51 template< class K > │ │ │ │ │ +_5_2 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 2, 2 > &matrix ) │ │ │ │ │ +53 { │ │ │ │ │ +54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ] │ │ │ │ │ +[ 0 ]; │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +57 template< class K > │ │ │ │ │ +_5_8 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 2, 3 > &matrix ) │ │ │ │ │ +59 { │ │ │ │ │ +60 return _v_e_c_t_o_r_P_r_o_d_u_c_t( matrix[ 0 ], matrix[ 1 ] ).two_norm(); │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +63 template< class K, int m > │ │ │ │ │ +_6_4 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 2, m > &matrix ) │ │ │ │ │ +65 { │ │ │ │ │ +66 using std::sqrt; │ │ │ │ │ +67 const K tmpA = matrix[ 0 ].two_norm2(); │ │ │ │ │ +68 const K tmpB = matrix[ 1 ].two_norm2(); │ │ │ │ │ +69 const K tmpC = matrix[ 0 ] * matrix[ 1 ]; │ │ │ │ │ +70 return sqrt( tmpA * tmpB - tmpC * tmpC ); │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +73 template< class K > │ │ │ │ │ +_7_4 inline static K _d_e_t_e_r_m_i_n_a_n_t ( const FieldMatrix< K, 3, 3 > &matrix ) │ │ │ │ │ +75 { │ │ │ │ │ +76 return matrix[ 0 ] * _v_e_c_t_o_r_P_r_o_d_u_c_t( matrix[ 1 ], matrix[ 2 ] ); │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ 79 │ │ │ │ │ -80 _G_e_o_m_e_t_r_y_T_y_p_e type () const │ │ │ │ │ -81 { │ │ │ │ │ -82 return hostEntity_.type(); │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -85 std::size_t size () const │ │ │ │ │ -86 { │ │ │ │ │ -87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() ); │ │ │ │ │ -88 return refElement.size( HostEntity::mydimension ); │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -91 private: │ │ │ │ │ -92 const HostEntity &hostEntity_; │ │ │ │ │ -93 const CoordFunctionInterface &coordFunction_; │ │ │ │ │ -94 }; │ │ │ │ │ -95 │ │ │ │ │ -96 } // namespace GeoGrid │ │ │ │ │ -97 │ │ │ │ │ -98} // namespace Dune │ │ │ │ │ -99 │ │ │ │ │ -100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ │ -_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ -_h_o_s_t_c_o_r_n_e_r_s_._h_h │ │ │ │ │ +80 template< class K, int m > │ │ │ │ │ +_8_1 inline static K _i_n_v_e_r_t ( [[maybe_unused]] const FieldMatrix< K, 0, m > │ │ │ │ │ +&matrix, │ │ │ │ │ +82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse ) │ │ │ │ │ +83 { │ │ │ │ │ +84 return K( 1 ); │ │ │ │ │ +85 } │ │ │ │ │ +86 │ │ │ │ │ +87 template< class K > │ │ │ │ │ +_8_8 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 1, 1 > &matrix, │ │ │ │ │ +89 FieldMatrix< K, 1, 1 > &inverse ) │ │ │ │ │ +90 { │ │ │ │ │ +91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ]; │ │ │ │ │ +92 return matrix[ 0 ][ 0 ]; │ │ │ │ │ +93 } │ │ │ │ │ +94 │ │ │ │ │ +95 template< class K, int m > │ │ │ │ │ +_9_6 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 1, m > &matrix, │ │ │ │ │ +97 FieldMatrix< K, m, 1 > &inverse ) │ │ │ │ │ +98 { │ │ │ │ │ +99 using std::sqrt; │ │ │ │ │ +100 K detSqr = matrix[ 0 ].two_norm2(); │ │ │ │ │ +101 K invDetSqr = K( 1 ) / detSqr; │ │ │ │ │ +102 for( int i = 0; i < m; ++i ) │ │ │ │ │ +103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ]; │ │ │ │ │ +104 return sqrt( detSqr ); │ │ │ │ │ +105 } │ │ │ │ │ +106 │ │ │ │ │ +107 template< class K > │ │ │ │ │ +_1_0_8 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 2, 2 > &matrix, │ │ │ │ │ +109 FieldMatrix< K, 2, 2 > &inverse ) │ │ │ │ │ +110 { │ │ │ │ │ +111 K det = _d_e_t_e_r_m_i_n_a_n_t( matrix ); │ │ │ │ │ +112 K invDet = K( 1 ) / det; │ │ │ │ │ +113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ]; │ │ │ │ │ +114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ]; │ │ │ │ │ +115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ]; │ │ │ │ │ +116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ]; │ │ │ │ │ +117 return det; │ │ │ │ │ +118 } │ │ │ │ │ +119 │ │ │ │ │ +120 template< class K, int m > │ │ │ │ │ +_1_2_1 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 2, m > &matrix, │ │ │ │ │ +122 FieldMatrix< K, m, 2 > &inverse ) │ │ │ │ │ +123 { │ │ │ │ │ +124 using std::sqrt; │ │ │ │ │ +125 const K tmpA = matrix[ 0 ].two_norm2(); │ │ │ │ │ +126 const K tmpB = matrix[ 1 ].two_norm2(); │ │ │ │ │ +127 const K tmpC = matrix[ 0 ] * matrix[ 1 ]; │ │ │ │ │ +128 const K detSqr = tmpA * tmpB - tmpC * tmpC; │ │ │ │ │ +129 const K invDetSqr = K( 1 ) / detSqr; │ │ │ │ │ +130 for( int i = 0; i < m; ++i ) │ │ │ │ │ +131 { │ │ │ │ │ +132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix[ 1 │ │ │ │ │ +][ i ]); │ │ │ │ │ +133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix[ 0 │ │ │ │ │ +][ i ]); │ │ │ │ │ +134 } │ │ │ │ │ +135 return sqrt( detSqr ); │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 template< class K > │ │ │ │ │ +_1_3_9 inline static K _i_n_v_e_r_t ( const FieldMatrix< K, 3, 3 > &matrix, │ │ │ │ │ +140 FieldMatrix< K, 3, 3 > &inverse ) │ │ │ │ │ +141 { │ │ │ │ │ +142 return FMatrixHelp::invertMatrix( matrix, inverse ); │ │ │ │ │ +143 } │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +146} │ │ │ │ │ +147 │ │ │ │ │ +148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GeometryType │ │ │ │ │ -Type representing VTK's entity geometry types. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ -Interface class for using an analytical function to define the geometry of a │ │ │ │ │ -Dune::GeometryGrid.... │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r │ │ │ │ │ -DDeeffiinniittiioonn coordfunctioncaller.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ │ +static K determinant(const FieldMatrix< K, 0, m > &matrix) │ │ │ │ │ +DDeeffiinniittiioonn algebra.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ │ +static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ │ +&inverse) │ │ │ │ │ +DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_v_e_c_t_o_r_P_r_o_d_u_c_t │ │ │ │ │ +static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const │ │ │ │ │ +FieldVector< K, 3 > &v) │ │ │ │ │ +DDeeffiinniittiioonn algebra.hh:19 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00596.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00593.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -75,17 +75,17 @@ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
identity.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ │ +
#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdenticalCoordFunction< ctype, dim >
 
│ │ │ │

│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00605.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ │┄ Files 10% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cornerstorage.hh File Reference │ │ │ │ +dune-grid: level.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cornerstorage.hh File Reference
│ │ │ │ +
level.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <cstdlib>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ +#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::GeoGrid::CoordVector< mydim, Grid, false >
class  Dune::AlbertaGridLevelProvider< dim >
 
class  Dune::GeoGrid::CoordVector< mydim, Grid, true >
class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
 
class  Dune::GeoGrid::IntersectionCoordVector< Grid >
class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
 
class  Dune::GeoGrid::CornerStorage< mydim, cdim, Grid >
struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,30 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cornerstorage.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_g_e_o_m_e_t_r_y_g_r_i_d_/_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h> │ │ │ │ │ +level.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_V_e_c_t_o_r_<_ _m_y_d_i_m_,_ _G_r_i_d_,_ _f_a_l_s_e_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_V_e_c_t_o_r_<_ _m_y_d_i_m_,_ _G_r_i_d_,_ _t_r_u_e_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_S_e_t_L_o_c_a_l │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r_<_ _G_r_i_d_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o_G_r_i_d │ │ │ │ │ -  namespace containing the implementations of _G_e_o_m_e_t_r_y_G_r_i_d │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,24 +77,24 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
cornerstorage.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_GEOGRID_CORNERSTORAGE_HH
│ │ │ │
6#define DUNE_GEOGRID_CORNERSTORAGE_HH
│ │ │ │
7
│ │ │ │
8#include <array>
│ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │
12namespace Dune
│ │ │ │
13{
│ │ │ │
14
│ │ │ │
15 namespace GeoGrid
│ │ │ │
16 {
│ │ │ │
17
│ │ │ │ @@ -317,15 +317,15 @@ │ │ │ │
│ │ │ │
207
│ │ │ │
208 } // namespace GeoGrid
│ │ │ │
209
│ │ │ │
210} // namespace Dune
│ │ │ │
211
│ │ │ │
212#endif // #ifndef DUNE_GEOGRID_CORNERSTORAGE_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │
Definition coordfunctioncaller.hh:21
│ │ │ │
Definition cornerstorage.hh:22
│ │ │ │
CoordVector(const HostEntity &hostEntity, const CoordFunction &coordFunction)
Definition cornerstorage.hh:48
│ │ │ │
void calculate(std::array< Coordinate, size >(&corners)) const
Definition cornerstorage.hh:54
│ │ │ │
CoordVector(const HostElement &hostElement, const unsigned int subEntity, const CoordFunction &coordFunction)
Definition cornerstorage.hh:90
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html │ │ │ │┄ Files 8% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.hh Source File │ │ │ │ +dune-grid: treeiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,623 +74,647 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
meshpointer.hh
│ │ │ │ +
treeiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │ -
6#define DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │ -
7
│ │ │ │ -
13#include <limits>
│ │ │ │ -
14#include <string>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21#if HAVE_ALBERTA
│ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
25
│ │ │ │ -
26 namespace Alberta
│ │ │ │ -
27 {
│ │ │ │ -
28
│ │ │ │ -
29 // External Forward Declarations
│ │ │ │ -
30 // -----------------------------
│ │ │ │ -
31
│ │ │ │ -
32 template< int dim >
│ │ │ │ -
33 class HierarchyDofNumbering;
│ │ │ │ -
34
│ │ │ │ -
35 // MeshPointer
│ │ │ │ -
36 // -----------
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_ALBERTA_TREEITERATOR_HH
│ │ │ │ +
7#define DUNE_ALBERTA_TREEITERATOR_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/hybridutilities.hh>
│ │ │ │ +
12#include <dune/common/typetraits.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17#if HAVE_ALBERTA
│ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
22 // AlbertaMarkerVector
│ │ │ │ +
23 // -------------------
│ │ │ │ +
24
│ │ │ │ +
33 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {
│ │ │ │ + │ │ │ │
37
│ │ │ │ -
38 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
43 typedef typename ElementInfo::FillFlags FillFlags;
│ │ │ │ -
44
│ │ │ │ -
45 class BoundaryProvider;
│ │ │ │ + │ │ │ │ +
39
│ │ │ │ +
40 //friend class AlbertaGrid< dim, dimworld >;
│ │ │ │ +
41
│ │ │ │ +
42 static const int dimension = Grid::dimension;
│ │ │ │ +
43
│ │ │ │ + │ │ │ │ + │ │ │ │
46
│ │ │ │ -
47 template< int dimWorld >
│ │ │ │ -
48 struct Library;
│ │ │ │ -
49
│ │ │ │ -
50 public:
│ │ │ │ -
51 class MacroIterator;
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 : mesh_( 0 )
│ │ │ │ -
55 {}
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
│ │ │ │ -
57 explicit MeshPointer ( Mesh *mesh )
│ │ │ │ -
58 : mesh_( mesh )
│ │ │ │ -
59 {}
│ │ │ │ +
47 template< bool >
│ │ │ │ +
48 struct NoMarkSubEntities;
│ │ │ │ +
49 template< bool >
│ │ │ │ +
50 struct MarkSubEntities;
│ │ │ │ +
51
│ │ │ │ +
52 public:
│ │ │ │ +
│ │ │ │ +
54 explicit AlbertaMarkerVector ( const DofNumbering &dofNumbering )
│ │ │ │ +
55 : dofNumbering_( dofNumbering )
│ │ │ │ +
56 {
│ │ │ │ +
57 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ +
58 marker_[ codim ] = 0;
│ │ │ │ +
59 }
│ │ │ │
│ │ │ │
60
│ │ │ │
│ │ │ │ -
61 operator Mesh * () const
│ │ │ │ -
62 {
│ │ │ │ -
63 return mesh_;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
66 explicit operator bool () const
│ │ │ │ -
67 {
│ │ │ │ -
68 return (bool)mesh_;
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
72 {
│ │ │ │ -
73 return MacroIterator( *this, false );
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ +
61 AlbertaMarkerVector ( const This &other )
│ │ │ │ +
62 : dofNumbering_( other.dofNumbering_ )
│ │ │ │ +
63 {
│ │ │ │ +
64 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ +
65 marker_[ codim ] = 0;
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69 {
│ │ │ │ +
70 clear();
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 private:
│ │ │ │ +
74 This &operator= ( const This & );
│ │ │ │
75
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
77 {
│ │ │ │ -
78 return MacroIterator( *this, true );
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ +
76 public:
│ │ │ │ +
78 template< int codim >
│ │ │ │ +
│ │ │ │ +
79 bool subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const;
│ │ │ │
80
│ │ │ │ -
│ │ │ │ -
81 int numMacroElements () const;
│ │ │ │ -
82 int size ( int codim ) const;
│ │ │ │ +
81 template< int firstCodim, class Iterator >
│ │ │ │ +
│ │ │ │ +
82 void markSubEntities ( const Iterator &begin, const Iterator &end );
│ │ │ │
83
│ │ │ │ -
84 // create a mesh from a macrodata structure
│ │ │ │ -
85 // params: macroData - macro data structure
│ │ │ │ -
86 // returns: number of boundary segments
│ │ │ │ -
│ │ │ │ -
87 unsigned int create ( const MacroData< dim > &macroData );
│ │ │ │ -
88
│ │ │ │ -
89 // create a mesh from a macrodata structure, adding projections
│ │ │ │ -
90 // params: macroData - macro data structure
│ │ │ │ -
91 // projectionFactory - factory for the projections
│ │ │ │ -
92 // returns: number of boundary segments
│ │ │ │ -
93 template< class Proj, class Impl >
│ │ │ │ -
│ │ │ │ -
94 unsigned int create ( const MacroData< dim > &macroData,
│ │ │ │ -
95 const ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
│ │ │ │ -
96
│ │ │ │ -
97 // create a mesh from a file
│ │ │ │ -
98 // params: filename - file name of an Alberta macro triangulation
│ │ │ │ -
99 // binary - read binary?
│ │ │ │ -
100 // returns: number of boundary segments
│ │ │ │ +
│ │ │ │ +
84 void clear ()
│ │ │ │ +
85 {
│ │ │ │ +
86 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ +
87 {
│ │ │ │ +
88 if( marker_[ codim ] != 0 )
│ │ │ │ +
89 delete[] marker_[ codim ];
│ │ │ │ +
90 marker_[ codim ] = 0;
│ │ │ │ +
91 }
│ │ │ │ +
92 }
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
│ │ │ │ +
95 bool up2Date () const
│ │ │ │ +
96 {
│ │ │ │ +
97 return (marker_[ dimension ] != 0);
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │
│ │ │ │ -
101 unsigned int create ( const std::string &filename, bool binary = false );
│ │ │ │ +
101 void print ( std::ostream &out = std::cout ) const;
│ │ │ │
102
│ │ │ │ -
103 // read back a mesh from a file
│ │ │ │ -
104 // params: filename - file name of an Alberta save file
│ │ │ │ -
105 // time - variable to receive the time stored in the file
│ │ │ │ -
106 // returns: number of boundary segments
│ │ │ │ -
107 //
│ │ │ │ -
108 // notes: - projections are not preserved
│ │ │ │ -
109 // - we assume that projections are added in the same order they
│ │ │ │ -
110 // inserted in when the grid was created (otherwise the boundary
│ │ │ │ -
111 // indices change)
│ │ │ │ -
│ │ │ │ -
112 unsigned int read ( const std::string &filename, Real &time );
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
114 bool write ( const std::string &filename, Real time ) const;
│ │ │ │ -
115
│ │ │ │ -
│ │ │ │ -
116 void release ();
│ │ │ │ -
117
│ │ │ │ -
118 template< class Functor >
│ │ │ │ -
│ │ │ │ -
119 void hierarchicTraverse ( Functor &functor,
│ │ │ │ -
120 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
│ │ │ │ -
121
│ │ │ │ -
122 template< class Functor >
│ │ │ │ -
│ │ │ │ -
123 void leafTraverse ( Functor &functor,
│ │ │ │ -
124 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
│ │ │ │ +
103 private:
│ │ │ │ +
104 const DofNumbering &dofNumbering_;
│ │ │ │ +
105 int *marker_[ dimension+1 ];
│ │ │ │ +
106 };
│ │ │ │ +
107
│ │ │ │ +
108
│ │ │ │ +
109
│ │ │ │ +
110 // AlbertaMarkerVector::NoMarkSubEntities
│ │ │ │ +
111 // --------------------------------------
│ │ │ │ +
112
│ │ │ │ +
113 template< int dim, int dimworld >
│ │ │ │ +
114 template< bool >
│ │ │ │ +
115 struct AlbertaMarkerVector< dim, dimworld >::NoMarkSubEntities
│ │ │ │ +
116 {
│ │ │ │ +
117 template< int firstCodim, class Iterator >
│ │ │ │ +
118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering,
│ │ │ │ +
119 [[maybe_unused]] int *(&marker)[ dimension + 1 ],
│ │ │ │ +
120 [[maybe_unused]] const Iterator &begin,
│ │ │ │ +
121 [[maybe_unused]] const Iterator &end )
│ │ │ │ +
122 {}
│ │ │ │ +
123 };
│ │ │ │ +
124
│ │ │ │
125
│ │ │ │ -
│ │ │ │ -
126 bool coarsen ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ -
128 bool refine ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
│ │ │ │ +
126
│ │ │ │ +
127 // AlbertaMarkerVector::MarkSubEntities
│ │ │ │ +
128 // ------------------------------------
│ │ │ │
129
│ │ │ │ -
130 private:
│ │ │ │ -
131 static ALBERTA NODE_PROJECTION *
│ │ │ │ -
132 initNodeProjection ( [[maybe_unused]] Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );
│ │ │ │ -
133 template< class ProjectionProvider >
│ │ │ │ -
134 static ALBERTA NODE_PROJECTION *
│ │ │ │ -
135 initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );
│ │ │ │ -
136
│ │ │ │ -
137 Mesh *mesh_;
│ │ │ │ -
138 };
│ │ │ │ -
139
│ │ │ │ +
130 template< int dim, int dimworld >
│ │ │ │ +
131 template< bool >
│ │ │ │ +
132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities
│ │ │ │ +
133 {
│ │ │ │ +
134 template< int codim >
│ │ │ │ +
│ │ │ │ +
135 struct Codim
│ │ │ │ +
136 {
│ │ │ │ +
137 static const int numSubEntities = Alberta::NumSubEntities< dimension, codim >::value;
│ │ │ │ +
138
│ │ │ │ + │ │ │ │
140
│ │ │ │ -
141
│ │ │ │ -
142 // MeshPointer::Library
│ │ │ │ -
143 // --------------------
│ │ │ │ -
144
│ │ │ │ -
145 template< int dim >
│ │ │ │ -
146 template< int dimWorld >
│ │ │ │ -
147 struct MeshPointer< dim >::Library
│ │ │ │ -
148 {
│ │ │ │ - │ │ │ │ -
150
│ │ │ │ -
151 static inline unsigned int boundaryCount = 0;
│ │ │ │ -
152 static inline const void *projectionFactory = nullptr;
│ │ │ │ -
153
│ │ │ │ -
154 static void
│ │ │ │ -
155 create ( MeshPointer &ptr, const MacroData< dim > &macroData,
│ │ │ │ -
156 ALBERTA NODE_PROJECTION *(*initNodeProjection)( Mesh *, ALBERTA MACRO_EL *, int ) );
│ │ │ │ -
157 static void release ( MeshPointer &ptr );
│ │ │ │ -
158 };
│ │ │ │ -
159
│ │ │ │ -
160
│ │ │ │ -
161
│ │ │ │ -
162 // MeshPointer::MacroIterator
│ │ │ │ -
163 // --------------------------
│ │ │ │ +
│ │ │ │ +
141 static void apply ( const DofNumbering &dofNumbering,
│ │ │ │ +
142 int *(&marker)[ dimension + 1 ],
│ │ │ │ +
143 const ElementInfo &elementInfo )
│ │ │ │ +
144 {
│ │ │ │ +
145 int *array = marker[ codim ];
│ │ │ │ +
146
│ │ │ │ +
147 const int index = dofNumbering( elementInfo, 0, 0 );
│ │ │ │ +
148 for( int i = 0; i < numSubEntities; ++i )
│ │ │ │ +
149 {
│ │ │ │ +
150 int &mark = array[ dofNumbering( elementInfo, codim, i ) ];
│ │ │ │ +
151 mark = std::max( index, mark );
│ │ │ │ +
152 }
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154 };
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
156 template< int firstCodim, class Iterator >
│ │ │ │ +
157 static void mark ( const DofNumbering &dofNumbering, int *(&marker)[ dimension + 1 ],
│ │ │ │ +
158 const Iterator &begin, const Iterator &end )
│ │ │ │ +
159 {
│ │ │ │ +
160 for( int codim = firstCodim; codim <= dimension; ++codim )
│ │ │ │ +
161 {
│ │ │ │ +
162 const int size = dofNumbering.size( codim );
│ │ │ │ +
163 marker[ codim ] = new int[ size ];
│ │ │ │
164
│ │ │ │ -
165 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
167 {
│ │ │ │ - │ │ │ │ +
165 int *array = marker[ codim ];
│ │ │ │ +
166 for( int i = 0; i < size; ++i )
│ │ │ │ +
167 array[ i ] = -1;
│ │ │ │ +
168 }
│ │ │ │
169
│ │ │ │ -
170 friend class MeshPointer< dim >;
│ │ │ │ -
171
│ │ │ │ -
172 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
175
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
177 : mesh_(),
│ │ │ │ -
178 index_( -1 )
│ │ │ │ -
179 {}
│ │ │ │ -
│ │ │ │ +
170 for( Iterator it = begin; it != end; ++it )
│ │ │ │ +
171 {
│ │ │ │ +
172 const ElementInfo &elementInfo = it->impl().elementInfo();
│ │ │ │ +
173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{},
│ │ │ │ +
174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker, elementInfo ); } );
│ │ │ │ +
175 }
│ │ │ │ +
176 }
│ │ │ │ +
177 };
│ │ │ │ +
178
│ │ │ │ +
179
│ │ │ │
180
│ │ │ │ -
181 private:
│ │ │ │ -
182
│ │ │ │ -
183 explicit MacroIterator ( const MeshPointer &mesh, bool end = false )
│ │ │ │ -
184 : mesh_( mesh ),
│ │ │ │ -
185 index_( end ? mesh.numMacroElements() : 0 )
│ │ │ │ -
186 {}
│ │ │ │ -
187
│ │ │ │ -
188 public:
│ │ │ │ -
│ │ │ │ -
189 bool done () const
│ │ │ │ -
190 {
│ │ │ │ -
191 return (index_ >= mesh().numMacroElements());
│ │ │ │ -
192 }
│ │ │ │ -
│ │ │ │ -
193
│ │ │ │ -
│ │ │ │ -
194 bool equals ( const MacroIterator &other ) const
│ │ │ │ -
195 {
│ │ │ │ -
196 return (index_ == other.index_);
│ │ │ │ -
197 }
│ │ │ │ -
│ │ │ │ -
198
│ │ │ │ -
│ │ │ │ -
199 void increment ()
│ │ │ │ -
200 {
│ │ │ │ -
201 assert( !done() );
│ │ │ │ -
202 ++index_;
│ │ │ │ -
203 }
│ │ │ │ -
│ │ │ │ -
204
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
206 {
│ │ │ │ -
207 assert( !done() );
│ │ │ │ -
208 return static_cast< const MacroElement & >( mesh().mesh_->macro_els[ index_ ] );
│ │ │ │ -
209 }
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
│ │ │ │ -
211 const MeshPointer &mesh () const
│ │ │ │ -
212 {
│ │ │ │ -
213 return mesh_;
│ │ │ │ -
214 }
│ │ │ │ -
│ │ │ │ +
181 // AlbertaGridTreeIterator
│ │ │ │ +
182 // -----------------------
│ │ │ │ +
183
│ │ │ │ +
187 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
189 {
│ │ │ │ + │ │ │ │ +
191
│ │ │ │ +
192 public:
│ │ │ │ +
193 static const int dimension = GridImp::dimension;
│ │ │ │ +
194 static const int codimension = codim;
│ │ │ │ +
195 static const int dimensionworld = GridImp::dimensionworld;
│ │ │ │ +
196
│ │ │ │ +
197 private:
│ │ │ │ +
198 friend class AlbertaGrid< dimension, dimensionworld >;
│ │ │ │ +
199
│ │ │ │ +
200 static const int numSubEntities
│ │ │ │ + │ │ │ │ +
202
│ │ │ │ +
203 public:
│ │ │ │ + │ │ │ │ +
205 typedef typename MeshPointer::MacroIterator MacroIterator;
│ │ │ │ +
206
│ │ │ │ +
207 typedef typename GridImp::template Codim< codim >::Entity Entity;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
210 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │ │ +
211
│ │ │ │ + │ │ │ │ +
213
│ │ │ │ +
│ │ │ │ + │ │ │ │
215
│ │ │ │ -
│ │ │ │ -
216 This &operator++ ()
│ │ │ │ -
217 {
│ │ │ │ -
218 increment();
│ │ │ │ -
219 return *this;
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
218
│ │ │ │ +
│ │ │ │ +
220 This &operator= ( const This &other );
│ │ │ │
221
│ │ │ │ -
│ │ │ │ -
222 ElementInfo operator* () const
│ │ │ │ -
223 {
│ │ │ │ -
224 return elementInfo();
│ │ │ │ -
225 }
│ │ │ │ -
│ │ │ │ -
226
│ │ │ │ -
│ │ │ │ -
227 bool operator== ( const MacroIterator &other ) const
│ │ │ │ -
228 {
│ │ │ │ -
229 return equals( other );
│ │ │ │ -
230 }
│ │ │ │ -
│ │ │ │ -
231
│ │ │ │ -
│ │ │ │ -
232 bool operator!= ( const MacroIterator &other ) const
│ │ │ │ -
233 {
│ │ │ │ -
234 return !equals( other );
│ │ │ │ -
235 }
│ │ │ │ -
│ │ │ │ -
236
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
238 elementInfo ( typename FillFlags::Flags fillFlags = FillFlags::standard ) const
│ │ │ │ -
239 {
│ │ │ │ -
240 if( done() )
│ │ │ │ -
241 return ElementInfo();
│ │ │ │ -
242 else
│ │ │ │ -
243 return ElementInfo( mesh(), macroElement(), fillFlags );
│ │ │ │ -
244 }
│ │ │ │ -
│ │ │ │ -
245
│ │ │ │ -
246 private:
│ │ │ │ -
247 MeshPointer mesh_;
│ │ │ │ -
248 int index_;
│ │ │ │ -
249 };
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
223 AlbertaGridTreeIterator ( const GridImp &grid, int travLevel );
│ │ │ │ +
224
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
227 const MarkerVector *marker,
│ │ │ │ +
228 int travLevel );
│ │ │ │ +
229
│ │ │ │ +
│ │ │ │ +
231 bool equals ( const This &other ) const
│ │ │ │ +
232 {
│ │ │ │ +
233 return entity_.impl().equals( other.entity_.impl() );
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
238 {
│ │ │ │ +
239 return entity_;
│ │ │ │ +
240 }
│ │ │ │ +
│ │ │ │ +
241
│ │ │ │ +
│ │ │ │ +
243 int level () const
│ │ │ │ +
244 {
│ │ │ │ +
245 return entity_.impl().level();
│ │ │ │ +
246 }
│ │ │ │ +
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ +
249 void increment();
│ │ │ │
250
│ │ │ │ -
251
│ │ │ │ -
252
│ │ │ │ -
253 // Implementation of MeshPointer
│ │ │ │ -
254 // -----------------------------
│ │ │ │ -
255
│ │ │ │ -
256 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
258 {
│ │ │ │ -
259 return (mesh_ ? mesh_->n_macro_el : 0);
│ │ │ │ -
260 }
│ │ │ │ -
│ │ │ │ -
261
│ │ │ │ +
251 protected:
│ │ │ │ +
│ │ │ │ +
253 const GridImp &grid () const
│ │ │ │ +
254 {
│ │ │ │ +
255 return entity_.impl().grid();
│ │ │ │ +
256 }
│ │ │ │ +
│ │ │ │ +
257
│ │ │ │ +
258 private:
│ │ │ │ +
259 void nextElement ( ElementInfo &elementInfo );
│ │ │ │ +
260 void nextElementStop (ElementInfo &elementInfo );
│ │ │ │ +
261 bool stopAtElement ( const ElementInfo &elementInfo ) const;
│ │ │ │
262
│ │ │ │ -
263 template<>
│ │ │ │ -
│ │ │ │ -
264 inline int MeshPointer< 1 >::size( int codim ) const
│ │ │ │ -
265 {
│ │ │ │ -
266 assert( (codim >= 0) && (codim <= 1) );
│ │ │ │ -
267 return (codim == 0 ? mesh_->n_elements : mesh_->n_vertices);
│ │ │ │ -
268 }
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
270 template<>
│ │ │ │ -
│ │ │ │ -
271 inline int MeshPointer< 2 >::size( int codim ) const
│ │ │ │ -
272 {
│ │ │ │ -
273 assert( (codim >= 0) && (codim <= 2) );
│ │ │ │ -
274 if( codim == 0 )
│ │ │ │ -
275 return mesh_->n_elements;
│ │ │ │ -
276 else if( codim == 2 )
│ │ │ │ -
277 return mesh_->n_vertices;
│ │ │ │ -
278 else
│ │ │ │ -
279 return mesh_->n_edges;
│ │ │ │ -
280 }
│ │ │ │ -
│ │ │ │ +
263 void goNext ( ElementInfo &elementInfo );
│ │ │ │ +
264 void goNext ( const std::integral_constant< int, 0 > cdVariable,
│ │ │ │ +
265 ElementInfo &elementInfo );
│ │ │ │ +
266 void goNext ( const std::integral_constant< int, 1 > cdVariable,
│ │ │ │ +
267 ElementInfo &elementInfo );
│ │ │ │ +
268 template< int cd >
│ │ │ │ +
269 void goNext ( const std::integral_constant< int, cd > cdVariable,
│ │ │ │ +
270 ElementInfo &elementInfo );
│ │ │ │ +
271
│ │ │ │ +
272 mutable Entity entity_;
│ │ │ │ +
273
│ │ │ │ +
275 int level_;
│ │ │ │ +
276
│ │ │ │ +
278 int subEntity_;
│ │ │ │ +
279
│ │ │ │ +
280 MacroIterator macroIterator_;
│ │ │ │
281
│ │ │ │ -
282 template<>
│ │ │ │ -
│ │ │ │ -
283 inline int MeshPointer< 3 >::size( int codim ) const
│ │ │ │ -
284 {
│ │ │ │ -
285 assert( (codim >= 0) && (codim <= 3) );
│ │ │ │ -
286 if( codim == 0 )
│ │ │ │ -
287 return mesh_->n_elements;
│ │ │ │ -
288 else if( codim == 3 )
│ │ │ │ -
289 return mesh_->n_vertices;
│ │ │ │ -
290 else if( codim == 1 )
│ │ │ │ -
291 return mesh_->n_faces;
│ │ │ │ -
292 else
│ │ │ │ -
293 return mesh_->n_edges;
│ │ │ │ -
294 }
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
296
│ │ │ │ -
297 template< int dim >
│ │ │ │ -
298 inline unsigned int MeshPointer< dim >
│ │ │ │ -
│ │ │ │ -
299 ::create ( const MacroData< dim > &macroData )
│ │ │ │ -
300 {
│ │ │ │ -
301 release();
│ │ │ │ -
302
│ │ │ │ -
303 Library< dimWorld >::boundaryCount = 0;
│ │ │ │ -
304 Library< dimWorld >::create( *this, macroData, &initNodeProjection );
│ │ │ │ -
305 return Library< dimWorld >::boundaryCount;
│ │ │ │ -
306 }
│ │ │ │ -
│ │ │ │ -
307
│ │ │ │ -
308
│ │ │ │ -
309 template< int dim >
│ │ │ │ -
310 template< class Proj, class Impl >
│ │ │ │ -
311 inline unsigned int MeshPointer< dim >
│ │ │ │ -
│ │ │ │ -
312 ::create ( const MacroData< dim > &macroData,
│ │ │ │ -
313 const ProjectionFactoryInterface< Proj, Impl > &projectionFactory )
│ │ │ │ -
314 {
│ │ │ │ - │ │ │ │ -
316
│ │ │ │ -
317 release();
│ │ │ │ -
318
│ │ │ │ -
319 Library< dimWorld >::boundaryCount = 0;
│ │ │ │ -
320 Library< dimWorld >::projectionFactory = &projectionFactory;
│ │ │ │ -
321 Library< dimWorld >::create( *this, macroData, &initNodeProjection< ProjectionFactory > );
│ │ │ │ -
322 Library< dimWorld >::projectionFactory = nullptr;
│ │ │ │ -
323 return Library< dimWorld >::boundaryCount;
│ │ │ │ -
324 }
│ │ │ │ -
│ │ │ │ -
325
│ │ │ │ -
326
│ │ │ │ -
327
│ │ │ │ -
328
│ │ │ │ -
329 template< int dim >
│ │ │ │ -
330 inline unsigned int MeshPointer< dim >
│ │ │ │ -
│ │ │ │ -
331 ::create ( const std::string &filename, bool binary )
│ │ │ │ -
332 {
│ │ │ │ -
333 MacroData< dim > macroData;
│ │ │ │ -
334 macroData.read( filename, binary );
│ │ │ │ -
335 const unsigned int boundaryCount = create( macroData );
│ │ │ │ -
336 macroData.release();
│ │ │ │ -
337 return boundaryCount;
│ │ │ │ -
338 }
│ │ │ │ +
282 // knows on which element a point,edge,face is viewed
│ │ │ │ +
283 const MarkerVector *marker_;
│ │ │ │ +
284 };
│ │ │ │ +
285
│ │ │ │ +
286
│ │ │ │ +
287
│ │ │ │ +
288 // Implementation of AlbertaMarkerVector
│ │ │ │ +
289 // -------------------------------------
│ │ │ │ +
290
│ │ │ │ +
291 template< int dim, int dimworld >
│ │ │ │ +
292 template< int codim >
│ │ │ │ +
293 inline bool AlbertaMarkerVector< dim, dimworld >
│ │ │ │ +
│ │ │ │ +
294 ::subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const
│ │ │ │ +
295 {
│ │ │ │ +
296 assert( marker_[ codim ] != 0 );
│ │ │ │ +
297
│ │ │ │ +
298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity );
│ │ │ │ +
299 const int markIndex = marker_[ codim ][ subIndex ];
│ │ │ │ +
300 assert( (markIndex >= 0) );
│ │ │ │ +
301
│ │ │ │ +
302 const int index = dofNumbering_( elementInfo, 0, 0 );
│ │ │ │ +
303 return (markIndex == index);
│ │ │ │ +
304 }
│ │ │ │ +
│ │ │ │ +
305
│ │ │ │ +
306
│ │ │ │ +
307 template< int dim, int dimworld >
│ │ │ │ +
308 template< int firstCodim, class Iterator >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
310 ::markSubEntities ( const Iterator &begin, const Iterator &end )
│ │ │ │ +
311 {
│ │ │ │ +
312 clear();
│ │ │ │ +
313 std::conditional< (firstCodim <= dimension), MarkSubEntities<true>, NoMarkSubEntities<false> >::type
│ │ │ │ +
314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin, end );
│ │ │ │ +
315 }
│ │ │ │
│ │ │ │ +
316
│ │ │ │ +
317
│ │ │ │ +
318 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ +
319 inline void AlbertaMarkerVector< dim, dimworld >::print ( std::ostream &out ) const
│ │ │ │ +
320 {
│ │ │ │ +
321 for( int codim = 1; codim <= dimension; ++codim )
│ │ │ │ +
322 {
│ │ │ │ +
323 int *marker = marker_[ codim ];
│ │ │ │ +
324 if( marker != 0 )
│ │ │ │ +
325 {
│ │ │ │ +
326 const int size = dofNumbering_.size( codim );
│ │ │ │ +
327 out << std::endl;
│ │ │ │ +
328 out << "Codimension " << codim << " (" << size << " entries)" << std::endl;
│ │ │ │ +
329 for( int i = 0; i < size; ++i )
│ │ │ │ +
330 out << "subentity " << i << " visited on Element " << marker[ i ] << std::endl;
│ │ │ │ +
331 }
│ │ │ │ +
332 }
│ │ │ │ +
333 }
│ │ │ │ +
│ │ │ │ +
334
│ │ │ │ +
335
│ │ │ │ +
336
│ │ │ │ +
337 // Implementation of AlbertaGridTreeIterator
│ │ │ │ +
338 // -----------------------------------------
│ │ │ │
339
│ │ │ │ -
340
│ │ │ │ -
341 template< int dim >
│ │ │ │ +
340 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ + │ │ │ │
│ │ │ │ -
342 inline unsigned int MeshPointer< dim >::read ( const std::string &filename, Real &time )
│ │ │ │ -
343 {
│ │ │ │ -
344 release();
│ │ │ │ -
345
│ │ │ │ -
346 Library< dimWorld >::boundaryCount = 0;
│ │ │ │ -
347 mesh_ = ALBERTA read_mesh_xdr( filename.c_str(), &time, NULL, NULL );
│ │ │ │ -
348 return Library< dimWorld >::boundaryCount;
│ │ │ │ -
349 }
│ │ │ │ -
│ │ │ │ -
350
│ │ │ │ -
351
│ │ │ │ -
352 template< int dim >
│ │ │ │ -
│ │ │ │ -
353 inline bool MeshPointer< dim >::write ( const std::string &filename, Real time ) const
│ │ │ │ -
354 {
│ │ │ │ -
355 int success = ALBERTA write_mesh_xdr( mesh_, filename.c_str(), time );
│ │ │ │ -
356 return (success == 0);
│ │ │ │ -
357 }
│ │ │ │ -
│ │ │ │ -
358
│ │ │ │ -
359
│ │ │ │ -
360 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
362 {
│ │ │ │ -
363 Library< dimWorld >::release( *this );
│ │ │ │ -
364 }
│ │ │ │ -
│ │ │ │ -
365
│ │ │ │ -
366
│ │ │ │ -
367 template< int dim >
│ │ │ │ -
368 template< class Functor >
│ │ │ │ -
369 inline void MeshPointer< dim >
│ │ │ │ -
│ │ │ │ -
370 ::hierarchicTraverse ( Functor &functor,
│ │ │ │ -
371 typename FillFlags::Flags fillFlags ) const
│ │ │ │ -
372 {
│ │ │ │ -
373 const MacroIterator eit = end();
│ │ │ │ -
374 for( MacroIterator it = begin(); it != eit; ++it )
│ │ │ │ -
375 {
│ │ │ │ -
376 const ElementInfo info = it.elementInfo( fillFlags );
│ │ │ │ -
377 info.hierarchicTraverse( functor );
│ │ │ │ -
378 }
│ │ │ │ -
379 }
│ │ │ │ + │ │ │ │ +
343 : entity_(),
│ │ │ │ +
344 level_( -1 ),
│ │ │ │ +
345 subEntity_( -1 ),
│ │ │ │ +
346 macroIterator_(),
│ │ │ │ +
347 marker_( NULL )
│ │ │ │ +
348 {}
│ │ │ │ +
│ │ │ │ +
349
│ │ │ │ +
350 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
352 ::AlbertaGridTreeIterator ( const GridImp &grid,
│ │ │ │ +
353 const MarkerVector *marker,
│ │ │ │ +
354 int travLevel )
│ │ │ │ +
355 : entity_( EntityImp( grid ) ),
│ │ │ │ +
356 level_( travLevel ),
│ │ │ │ +
357 subEntity_( (codim == 0 ? 0 : -1) ),
│ │ │ │ +
358 macroIterator_( grid.meshPointer().begin() ),
│ │ │ │ +
359 marker_( marker )
│ │ │ │ +
360 {
│ │ │ │ +
361 ElementInfo elementInfo = *macroIterator_;
│ │ │ │ +
362 nextElementStop( elementInfo );
│ │ │ │ +
363 if( codim > 0 )
│ │ │ │ +
364 goNext( elementInfo );
│ │ │ │ +
365 // it is ok to set the invalid ElementInfo
│ │ │ │ +
366 entity_.impl().setElement( elementInfo, subEntity_ );
│ │ │ │ +
367 }
│ │ │ │ +
│ │ │ │ +
368
│ │ │ │ +
369
│ │ │ │ +
370 // Make LevelIterator with point to element from previous iterations
│ │ │ │ +
371 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
373 ::AlbertaGridTreeIterator ( const GridImp &grid,
│ │ │ │ +
374 int travLevel )
│ │ │ │ +
375 : entity_( EntityImp( grid ) ),
│ │ │ │ +
376 level_( travLevel ),
│ │ │ │ +
377 subEntity_( -1 ),
│ │ │ │ +
378 macroIterator_( grid.meshPointer().end() ),
│ │ │ │ +
379 marker_( 0 )
│ │ │ │ +
380 {}
│ │ │ │
│ │ │ │ -
380
│ │ │ │
381
│ │ │ │ -
382 template< int dim >
│ │ │ │ -
383 template< class Functor >
│ │ │ │ -
384 inline void MeshPointer< dim >
│ │ │ │ -
│ │ │ │ -
385 ::leafTraverse ( Functor &functor,
│ │ │ │ -
386 typename FillFlags::Flags fillFlags ) const
│ │ │ │ -
387 {
│ │ │ │ -
388 const MacroIterator eit = end();
│ │ │ │ -
389 for( MacroIterator it = begin(); it != eit; ++it )
│ │ │ │ -
390 {
│ │ │ │ -
391 const ElementInfo info = it.elementInfo( fillFlags );
│ │ │ │ -
392 info.leafTraverse( functor );
│ │ │ │ -
393 }
│ │ │ │ -
394 }
│ │ │ │ -
│ │ │ │ -
395
│ │ │ │ -
396
│ │ │ │ -
397 template< int dim >
│ │ │ │ +
382
│ │ │ │ +
383 // Make LevelIterator with point to element from previous iterations
│ │ │ │ +
384 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
387 : entity_( other.entity_ ),
│ │ │ │ +
388 level_( other.level_ ),
│ │ │ │ +
389 subEntity_( other.subEntity_ ),
│ │ │ │ +
390 macroIterator_( other.macroIterator_ ),
│ │ │ │ +
391 marker_( other.marker_ )
│ │ │ │ +
392 {}
│ │ │ │ +
│ │ │ │ +
393
│ │ │ │ +
394
│ │ │ │ +
395 // Make LevelIterator with point to element from previous iterations
│ │ │ │ +
396 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ + │ │ │ │
│ │ │ │ -
398 inline bool MeshPointer< dim >::coarsen ( typename FillFlags::Flags fillFlags )
│ │ │ │ -
399 {
│ │ │ │ -
400 const bool coarsened = (ALBERTA coarsen( mesh_, fillFlags ) == meshCoarsened);
│ │ │ │ -
401 if( coarsened )
│ │ │ │ -
402 ALBERTA dof_compress( mesh_ );
│ │ │ │ -
403 return coarsened;
│ │ │ │ -
404 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
399 {
│ │ │ │ +
400 entity_ = other.entity_;
│ │ │ │ +
401 level_ = other.level_;
│ │ │ │ +
402 subEntity_ = other.subEntity_;
│ │ │ │ +
403 macroIterator_ = other.macroIterator_;
│ │ │ │ +
404 marker_ = other.marker_;
│ │ │ │
405
│ │ │ │ -
406 template< int dim >
│ │ │ │ -
│ │ │ │ -
407 inline bool MeshPointer< dim >::refine ( typename FillFlags::Flags fillFlags )
│ │ │ │ -
408 {
│ │ │ │ -
409 return (ALBERTA refine( mesh_, fillFlags ) == meshRefined);
│ │ │ │ -
410 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
411
│ │ │ │ -
412
│ │ │ │ -
413 template< int dim >
│ │ │ │ -
414 inline ALBERTA NODE_PROJECTION *
│ │ │ │ -
415 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroEl, int n )
│ │ │ │ -
416 {
│ │ │ │ -
417 const MacroElement &macroElement = static_cast< const MacroElement & >( *macroEl );
│ │ │ │ -
418 if( (n > 0) && macroElement.isBoundary( n-1 ) )
│ │ │ │ -
419 return new BasicNodeProjection( Library< dimWorld >::boundaryCount++ );
│ │ │ │ -
420 else
│ │ │ │ -
421 return 0;
│ │ │ │ -
422 }
│ │ │ │ -
423
│ │ │ │ -
424
│ │ │ │ -
425 template< int dim >
│ │ │ │ -
426 template< class ProjectionFactory >
│ │ │ │ -
427 inline ALBERTA NODE_PROJECTION *
│ │ │ │ -
428 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroEl, int n )
│ │ │ │ -
429 {
│ │ │ │ -
430 typedef typename ProjectionFactory::Projection Projection;
│ │ │ │ -
431
│ │ │ │ -
432 const MacroElement &macroElement = static_cast< const MacroElement & >( *macroEl );
│ │ │ │ -
433
│ │ │ │ -
434 MeshPointer< dim > meshPointer( mesh );
│ │ │ │ -
435 ElementInfo elementInfo( meshPointer, macroElement, FillFlags::standard );
│ │ │ │ -
436 const ProjectionFactory &projectionFactory = *static_cast< const ProjectionFactory * >( Library< dimWorld >::projectionFactory );
│ │ │ │ -
437 if( (n > 0) && macroElement.isBoundary( n-1 ) )
│ │ │ │ -
438 {
│ │ │ │ -
439 const unsigned int boundaryIndex = Library< dimWorld >::boundaryCount++;
│ │ │ │ -
440 if( projectionFactory.hasProjection( elementInfo, n-1 ) )
│ │ │ │ -
441 {
│ │ │ │ -
442 Projection projection = projectionFactory.projection( elementInfo, n-1 );
│ │ │ │ -
443 return new NodeProjection< dim, Projection >( boundaryIndex, projection );
│ │ │ │ -
444 }
│ │ │ │ -
445 else
│ │ │ │ -
446 return new BasicNodeProjection( boundaryIndex );
│ │ │ │ -
447 }
│ │ │ │ -
448 else if( (dim < dimWorld) && (n == 0) )
│ │ │ │ -
449 {
│ │ │ │ -
450 const unsigned int boundaryIndex = std::numeric_limits< unsigned int >::max();
│ │ │ │ -
451 if( projectionFactory.hasProjection( elementInfo ) )
│ │ │ │ -
452 {
│ │ │ │ -
453 Projection projection = projectionFactory.projection( elementInfo );
│ │ │ │ -
454 return new NodeProjection< dim, Projection >( boundaryIndex, projection );
│ │ │ │ -
455 }
│ │ │ │ -
456 else
│ │ │ │ -
457 return 0;
│ │ │ │ -
458 }
│ │ │ │ -
459 else
│ │ │ │ -
460 return 0;
│ │ │ │ -
461 }
│ │ │ │ -
462
│ │ │ │ -
463 } // namespace Alberta
│ │ │ │ -
464
│ │ │ │ -
465} // namespace Dune
│ │ │ │ -
466
│ │ │ │ -
467#endif // #if HAVE_ALBERTA
│ │ │ │ -
468
│ │ │ │ -
469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │ +
406 return *this;
│ │ │ │ +
407 }
│ │ │ │
│ │ │ │ +
408
│ │ │ │ +
409
│ │ │ │ +
410 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
412 {
│ │ │ │ +
413 ElementInfo elementInfo = entity_.impl().elementInfo_;
│ │ │ │ +
414 goNext ( elementInfo );
│ │ │ │ +
415 // it is ok to set the invalid ElementInfo
│ │ │ │ +
416 entity_.impl().setElement( elementInfo, subEntity_ );
│ │ │ │ +
417 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
418
│ │ │ │ +
419
│ │ │ │ +
420 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ + │ │ │ │ +
422 ::nextElement ( ElementInfo &elementInfo )
│ │ │ │ +
423 {
│ │ │ │ +
424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) )
│ │ │ │ +
425 {
│ │ │ │ +
426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) )
│ │ │ │ +
427 elementInfo = elementInfo.father();
│ │ │ │ +
428 if( elementInfo.level() == 0 )
│ │ │ │ +
429 {
│ │ │ │ +
430 ++macroIterator_;
│ │ │ │ +
431 elementInfo = *macroIterator_;
│ │ │ │ +
432 }
│ │ │ │ +
433 else
│ │ │ │ +
434 elementInfo = elementInfo.father().child( 1 );
│ │ │ │ +
435 }
│ │ │ │ +
436 else
│ │ │ │ +
437 elementInfo = elementInfo.child( 0 );
│ │ │ │ +
438 }
│ │ │ │ +
439
│ │ │ │ +
440
│ │ │ │ +
441 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ +
443 ::nextElementStop ( ElementInfo &elementInfo )
│ │ │ │ +
444 {
│ │ │ │ +
445 while( !(!elementInfo || stopAtElement( elementInfo )) )
│ │ │ │ +
446 nextElement( elementInfo );
│ │ │ │ +
447 }
│ │ │ │ +
448
│ │ │ │ +
449
│ │ │ │ +
450 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ +
452 ::stopAtElement ( const ElementInfo &elementInfo ) const
│ │ │ │ +
453 {
│ │ │ │ +
454 if( !elementInfo )
│ │ │ │ +
455 return true;
│ │ │ │ +
456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level()));
│ │ │ │ +
457 }
│ │ │ │ +
458
│ │ │ │ +
459
│ │ │ │ +
460 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ +
462 ::goNext ( ElementInfo &elementInfo )
│ │ │ │ +
463 {
│ │ │ │ +
464 std::integral_constant< int, codim > codimVariable;
│ │ │ │ +
465 goNext( codimVariable, elementInfo );
│ │ │ │ +
466 }
│ │ │ │ +
467
│ │ │ │ +
468 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ +
470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */,
│ │ │ │ +
471 ElementInfo &elementInfo )
│ │ │ │ +
472 {
│ │ │ │ +
473 assert( stopAtElement( elementInfo ) );
│ │ │ │ +
474
│ │ │ │ +
475 nextElement( elementInfo );
│ │ │ │ +
476 nextElementStop( elementInfo );
│ │ │ │ +
477 }
│ │ │ │ +
478
│ │ │ │ +
479 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ +
481 ::goNext ( const std::integral_constant< int, 1 > cdVariable,
│ │ │ │ +
482 ElementInfo &elementInfo )
│ │ │ │ +
483 {
│ │ │ │ +
484 assert( stopAtElement( elementInfo ) );
│ │ │ │ +
485
│ │ │ │ +
486 ++subEntity_;
│ │ │ │ +
487 if( subEntity_ >= numSubEntities )
│ │ │ │ +
488 {
│ │ │ │ +
489 subEntity_ = 0;
│ │ │ │ +
490 nextElement( elementInfo );
│ │ │ │ +
491 nextElementStop( elementInfo );
│ │ │ │ +
492 if( !elementInfo )
│ │ │ │ +
493 return;
│ │ │ │ +
494 }
│ │ │ │ +
495
│ │ │ │ +
496 if( leafIterator )
│ │ │ │ +
497 {
│ │ │ │ +
498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ : subEntity_);
│ │ │ │ +
499
│ │ │ │ +
500 const ALBERTA EL *neighbor = elementInfo.elInfo().neigh[ face ];
│ │ │ │ +
501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) )
│ │ │ │ +
502 {
│ │ │ │ +
503 // face is reached from element with largest number
│ │ │ │ +
504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 );
│ │ │ │ +
505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 );
│ │ │ │ +
506 if( elIndex < nbIndex )
│ │ │ │ +
507 goNext( cdVariable, elementInfo );
│ │ │ │ +
508 }
│ │ │ │ +
509 // uncomment this assertion only if codimension 1 entities are marked
│ │ │ │ +
510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) );
│ │ │ │ +
511 }
│ │ │ │ +
512 else
│ │ │ │ +
513 {
│ │ │ │ +
514 assert( marker_ != 0 );
│ │ │ │ +
515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) )
│ │ │ │ +
516 goNext( cdVariable, elementInfo );
│ │ │ │ +
517 }
│ │ │ │ +
518 }
│ │ │ │ +
519
│ │ │ │ +
520 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ +
521 template< int cd >
│ │ │ │ +
522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ +
523 ::goNext ( const std::integral_constant< int, cd > cdVariable,
│ │ │ │ +
524 ElementInfo &elementInfo )
│ │ │ │ +
525 {
│ │ │ │ +
526 assert( stopAtElement( elementInfo ) );
│ │ │ │ +
527
│ │ │ │ +
528 ++subEntity_;
│ │ │ │ +
529 if( subEntity_ >= numSubEntities )
│ │ │ │ +
530 {
│ │ │ │ +
531 subEntity_ = 0;
│ │ │ │ +
532 nextElement( elementInfo );
│ │ │ │ +
533 nextElementStop( elementInfo );
│ │ │ │ +
534 if( !elementInfo )
│ │ │ │ +
535 return;
│ │ │ │ +
536 }
│ │ │ │ +
537
│ │ │ │ +
538 assert( marker_ != 0 );
│ │ │ │ +
539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ ) )
│ │ │ │ +
540 goNext( cdVariable, elementInfo );
│ │ │ │ +
541 }
│ │ │ │ +
542
│ │ │ │ +
543}
│ │ │ │ +
544
│ │ │ │ +
545#endif // #if HAVE_ALBERTA
│ │ │ │ +
546
│ │ │ │ +
547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ -
provides a wrapper for ALBERTA's macro_data structure
│ │ │ │ +
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
static const int meshRefined
Definition misc.hh:56
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ -
static const int meshCoarsened
Definition misc.hh:57
│ │ │ │ -
Definition meshpointer.hh:40
│ │ │ │ -
int numMacroElements() const
Definition meshpointer.hh:257
│ │ │ │ -
unsigned int create(const MacroData< dim > &macroData, const ProjectionFactoryInterface< Proj, Impl > &projectionFactory)
Definition meshpointer.hh:312
│ │ │ │ -
void release()
Definition meshpointer.hh:361
│ │ │ │ -
unsigned int read(const std::string &filename, Real &time)
Definition meshpointer.hh:342
│ │ │ │ -
MacroIterator end() const
Definition meshpointer.hh:76
│ │ │ │ -
bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing)
Definition meshpointer.hh:398
│ │ │ │ -
int size(int codim) const
│ │ │ │ -
unsigned int create(const std::string &filename, bool binary=false)
Definition meshpointer.hh:331
│ │ │ │ -
void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:385
│ │ │ │ -
unsigned int create(const MacroData< dim > &macroData)
Definition meshpointer.hh:299
│ │ │ │ -
MacroIterator begin() const
Definition meshpointer.hh:71
│ │ │ │ -
MeshPointer(Mesh *mesh)
Definition meshpointer.hh:57
│ │ │ │ -
bool write(const std::string &filename, Real time) const
Definition meshpointer.hh:353
│ │ │ │ -
bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing)
Definition meshpointer.hh:407
│ │ │ │ -
MeshPointer()
Definition meshpointer.hh:53
│ │ │ │ -
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ │ -
Definition elementinfo.hh:43
│ │ │ │ -
void hierarchicTraverse(Functor &functor) const
Definition elementinfo.hh:695
│ │ │ │ -
void leafTraverse(Functor &functor) const
Definition elementinfo.hh:708
│ │ │ │ -
Definition macrodata.hh:30
│ │ │ │ -
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ │ -
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ │ -
Definition macroelement.hh:24
│ │ │ │ -
bool isBoundary(const int face) const
Definition macroelement.hh:42
│ │ │ │ -
Definition meshpointer.hh:167
│ │ │ │ -
const MeshPointer & mesh() const
Definition meshpointer.hh:211
│ │ │ │ -
const MacroElement & macroElement() const
Definition meshpointer.hh:205
│ │ │ │ -
Alberta::ElementInfo< dim > ElementInfo
Definition meshpointer.hh:174
│ │ │ │ -
Alberta::MeshPointer< dim > MeshPointer
Definition meshpointer.hh:173
│ │ │ │ -
ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:238
│ │ │ │ -
bool done() const
Definition meshpointer.hh:189
│ │ │ │ -
void increment()
Definition meshpointer.hh:199
│ │ │ │ -
bool equals(const MacroIterator &other) const
Definition meshpointer.hh:194
│ │ │ │ -
MacroIterator()
Definition meshpointer.hh:176
│ │ │ │ -
Definition misc.hh:231
│ │ │ │ -
static const Flags nothing
Definition misc.hh:234
│ │ │ │ -
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ │ -
static const Flags standard
Definition misc.hh:258
│ │ │ │ -
Definition albertagrid/projection.hh:135
│ │ │ │ -
Base::Projection Projection
Definition albertagrid/projection.hh:140
│ │ │ │ -
Definition albertagrid/projection.hh:80
│ │ │ │ -
Definition albertagrid/projection.hh:208
│ │ │ │ - │ │ │ │ + │ │ │ │ +
static const int dimension
Definition agrid.hh:145
│ │ │ │ + │ │ │ │ + │ │ │ │ +
int size(int codim) const
Definition dofadmin.hh:163
│ │ │ │ + │ │ │ │ +
Definition treeiterator.hh:189
│ │ │ │ +
bool equals(const This &other) const
equality
Definition treeiterator.hh:231
│ │ │ │ +
MakeableInterfaceObject< Entity > EntityObject
Definition treeiterator.hh:208
│ │ │ │ +
Alberta::MeshPointer< dimension > MeshPointer
Definition treeiterator.hh:204
│ │ │ │ +
AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int travLevel)
Constructor making begin iterator.
Definition treeiterator.hh:352
│ │ │ │ +
AlbertaGridTreeIterator(const GridImp &grid, int travLevel)
Constructor making end iterator.
Definition treeiterator.hh:373
│ │ │ │ +
EntityObject::ImplementationType EntityImp
Definition treeiterator.hh:209
│ │ │ │ +
static const int codimension
Definition treeiterator.hh:194
│ │ │ │ +
MeshPointer::MacroIterator MacroIterator
Definition treeiterator.hh:205
│ │ │ │ +
This & operator=(const This &other)
Constructor making end iterator.
Definition treeiterator.hh:398
│ │ │ │ +
Entity & dereference() const
dereferencing
Definition treeiterator.hh:237
│ │ │ │ +
AlbertaMarkerVector< dimension, dimensionworld > MarkerVector
Definition treeiterator.hh:212
│ │ │ │ +
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ │ +
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ │ +
static const int dimensionworld
Definition treeiterator.hh:195
│ │ │ │ +
AlbertaGridTreeIterator()
Definition treeiterator.hh:342
│ │ │ │ +
void increment()
increment
Definition treeiterator.hh:411
│ │ │ │ +
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ │ +
static const int dimension
Definition treeiterator.hh:193
│ │ │ │ +
AlbertaGridTreeIterator(const This &other)
Constructor making end iterator.
Definition treeiterator.hh:386
│ │ │ │ +
EntityImp::ElementInfo ElementInfo
Definition treeiterator.hh:210
│ │ │ │ +
Definition misc.hh:148
│ │ │ │ +
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ +
AlbertaMarkerVector(const DofNumbering &dofNumbering)
create AlbertaMarkerVector with empty vectors
Definition treeiterator.hh:54
│ │ │ │ +
bool up2Date() const
return true if marking is up to date
Definition treeiterator.hh:95
│ │ │ │ +
bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const
visit subentity on this element?
Definition treeiterator.hh:294
│ │ │ │ +
void markSubEntities(const Iterator &begin, const Iterator &end)
Definition treeiterator.hh:310
│ │ │ │ +
~AlbertaMarkerVector()
Definition treeiterator.hh:68
│ │ │ │ +
void clear()
Definition treeiterator.hh:84
│ │ │ │ +
AlbertaMarkerVector(const This &other)
Definition treeiterator.hh:61
│ │ │ │ +
void print(std::ostream &out=std::cout) const
print for debugin' only
Definition treeiterator.hh:319
│ │ │ │ + │ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition treeiterator.hh:139
│ │ │ │ +
static void apply(const DofNumbering &dofNumbering, int *(&marker)[dimension+1], const ElementInfo &elementInfo)
Definition treeiterator.hh:141
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ + │ │ │ │ +
InterfaceType::Implementation ImplementationType
Definition common/grid.hh:1108
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,643 +1,690 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -meshpointer.hh │ │ │ │ │ +treeiterator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ -6#define DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ -7 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -21#if HAVE_ALBERTA │ │ │ │ │ -22 │ │ │ │ │ -23namespace _D_u_n_e │ │ │ │ │ -24{ │ │ │ │ │ -25 │ │ │ │ │ -26 namespace Alberta │ │ │ │ │ -27 { │ │ │ │ │ -28 │ │ │ │ │ -29 // External Forward Declarations │ │ │ │ │ -30 // ----------------------------- │ │ │ │ │ -31 │ │ │ │ │ -32 template< int dim > │ │ │ │ │ -33 class HierarchyDofNumbering; │ │ │ │ │ -34 │ │ │ │ │ -35 // MeshPointer │ │ │ │ │ -36 // ----------- │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ +7#define DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +16 │ │ │ │ │ +17#if HAVE_ALBERTA │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 │ │ │ │ │ +22 // AlbertaMarkerVector │ │ │ │ │ +23 // ------------------- │ │ │ │ │ +24 │ │ │ │ │ +33 template< int dim, int dimworld > │ │ │ │ │ +_3_4 class _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +35 { │ │ │ │ │ +36 typedef _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> _T_h_i_s; │ │ │ │ │ 37 │ │ │ │ │ -38 template< int dim > │ │ │ │ │ -_3_9 class _M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -40 { │ │ │ │ │ -41 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -42 typedef typename _E_l_e_m_e_n_t_I_n_f_o_:_:_M_a_c_r_o_E_l_e_m_e_n_t _M_a_c_r_o_E_l_e_m_e_n_t; │ │ │ │ │ -43 typedef typename _E_l_e_m_e_n_t_I_n_f_o_:_:_F_i_l_l_F_l_a_g_s _F_i_l_l_F_l_a_g_s; │ │ │ │ │ -44 │ │ │ │ │ -45 class BoundaryProvider; │ │ │ │ │ +38 typedef _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> _G_r_i_d; │ │ │ │ │ +39 │ │ │ │ │ +40 //friend class AlbertaGrid< dim, dimworld >; │ │ │ │ │ +41 │ │ │ │ │ +42 static const int dimension = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +43 │ │ │ │ │ +44 typedef _A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ │ +45 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ 46 │ │ │ │ │ -47 template< int dimWorld > │ │ │ │ │ -48 struct Library; │ │ │ │ │ -49 │ │ │ │ │ -50 public: │ │ │ │ │ -51 class _M_a_c_r_o_I_t_e_r_a_t_o_r; │ │ │ │ │ -52 │ │ │ │ │ -_5_3 _M_e_s_h_P_o_i_n_t_e_r () │ │ │ │ │ -54 : mesh_( 0 ) │ │ │ │ │ -55 {} │ │ │ │ │ -56 │ │ │ │ │ -_5_7 explicit _M_e_s_h_P_o_i_n_t_e_r ( _M_e_s_h *mesh ) │ │ │ │ │ -58 : mesh_( mesh ) │ │ │ │ │ -59 {} │ │ │ │ │ +47 template< bool > │ │ │ │ │ +48 struct NoMarkSubEntities; │ │ │ │ │ +49 template< bool > │ │ │ │ │ +50 struct MarkSubEntities; │ │ │ │ │ +51 │ │ │ │ │ +52 public: │ │ │ │ │ +_5_4 explicit _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering ) │ │ │ │ │ +55 : dofNumbering_( dofNumbering ) │ │ │ │ │ +56 { │ │ │ │ │ +57 for( int codim = 0; codim <= dimension; ++codim ) │ │ │ │ │ +58 marker_[ codim ] = 0; │ │ │ │ │ +59 } │ │ │ │ │ 60 │ │ │ │ │ -_6_1 operator _M_e_s_h * () const │ │ │ │ │ -62 { │ │ │ │ │ -63 return mesh_; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_6 explicit operator bool () const │ │ │ │ │ -67 { │ │ │ │ │ -68 return (bool)mesh_; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -_7_1 _M_a_c_r_o_I_t_e_r_a_t_o_r _b_e_g_i_n () const │ │ │ │ │ -72 { │ │ │ │ │ -73 return _M_a_c_r_o_I_t_e_r_a_t_o_r( *this, false ); │ │ │ │ │ -74 } │ │ │ │ │ +_6_1 _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r ( const _T_h_i_s &other ) │ │ │ │ │ +62 : dofNumbering_( other.dofNumbering_ ) │ │ │ │ │ +63 { │ │ │ │ │ +64 for( int codim = 0; codim <= dimension; ++codim ) │ │ │ │ │ +65 marker_[ codim ] = 0; │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 _~_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r () │ │ │ │ │ +69 { │ │ │ │ │ +70 _c_l_e_a_r(); │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +73 private: │ │ │ │ │ +74 This &operator= ( const This & ); │ │ │ │ │ 75 │ │ │ │ │ -_7_6 _M_a_c_r_o_I_t_e_r_a_t_o_r _e_n_d () const │ │ │ │ │ -77 { │ │ │ │ │ -78 return _M_a_c_r_o_I_t_e_r_a_t_o_r( *this, true ); │ │ │ │ │ -79 } │ │ │ │ │ +76 public: │ │ │ │ │ +78 template< int codim > │ │ │ │ │ +_7_9 bool _s_u_b_E_n_t_i_t_y_O_n_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) │ │ │ │ │ +const; │ │ │ │ │ 80 │ │ │ │ │ -_8_1 int _n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s () const; │ │ │ │ │ -_8_2 int _s_i_z_e ( int codim ) const; │ │ │ │ │ +81 template< int firstCodim, class Iterator > │ │ │ │ │ +_8_2 void _m_a_r_k_S_u_b_E_n_t_i_t_i_e_s ( const Iterator &begin, const Iterator &end ); │ │ │ │ │ 83 │ │ │ │ │ -84 // create a mesh from a macrodata structure │ │ │ │ │ -85 // params: macroData - macro data structure │ │ │ │ │ -86 // returns: number of boundary segments │ │ │ │ │ -_8_7 unsigned int _c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData ); │ │ │ │ │ -88 │ │ │ │ │ -89 // create a mesh from a macrodata structure, adding projections │ │ │ │ │ -90 // params: macroData - macro data structure │ │ │ │ │ -91 // projectionFactory - factory for the projections │ │ │ │ │ -92 // returns: number of boundary segments │ │ │ │ │ -93 template< class Proj, class Impl > │ │ │ │ │ -_9_4 unsigned int _c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData, │ │ │ │ │ -95 const _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory ); │ │ │ │ │ -96 │ │ │ │ │ -97 // create a mesh from a file │ │ │ │ │ -98 // params: filename - file name of an Alberta macro triangulation │ │ │ │ │ -99 // binary - read binary? │ │ │ │ │ -100 // returns: number of boundary segments │ │ │ │ │ -_1_0_1 unsigned int _c_r_e_a_t_e ( const std::string &filename, bool binary = false ); │ │ │ │ │ +_8_4 void _c_l_e_a_r () │ │ │ │ │ +85 { │ │ │ │ │ +86 for( int codim = 0; codim <= dimension; ++codim ) │ │ │ │ │ +87 { │ │ │ │ │ +88 if( marker_[ codim ] != 0 ) │ │ │ │ │ +89 delete[] marker_[ codim ]; │ │ │ │ │ +90 marker_[ codim ] = 0; │ │ │ │ │ +91 } │ │ │ │ │ +92 } │ │ │ │ │ +93 │ │ │ │ │ +_9_5 bool _u_p_2_D_a_t_e () const │ │ │ │ │ +96 { │ │ │ │ │ +97 return (marker_[ dimension ] != 0); │ │ │ │ │ +98 } │ │ │ │ │ +99 │ │ │ │ │ +_1_0_1 void _p_r_i_n_t ( std::ostream &out = std::cout ) const; │ │ │ │ │ 102 │ │ │ │ │ -103 // read back a mesh from a file │ │ │ │ │ -104 // params: filename - file name of an Alberta save file │ │ │ │ │ -105 // time - variable to receive the time stored in the file │ │ │ │ │ -106 // returns: number of boundary segments │ │ │ │ │ -107 // │ │ │ │ │ -108 // notes: - projections are not preserved │ │ │ │ │ -109 // - we assume that projections are added in the same order they │ │ │ │ │ -110 // inserted in when the grid was created (otherwise the boundary │ │ │ │ │ -111 // indices change) │ │ │ │ │ -_1_1_2 unsigned int _r_e_a_d ( const std::string &filename, _R_e_a_l &time ); │ │ │ │ │ -113 │ │ │ │ │ -_1_1_4 bool _w_r_i_t_e ( const std::string &filename, _R_e_a_l time ) const; │ │ │ │ │ -115 │ │ │ │ │ -_1_1_6 void _r_e_l_e_a_s_e (); │ │ │ │ │ -117 │ │ │ │ │ -118 template< class Functor > │ │ │ │ │ -_1_1_9 void _h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ -120 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ) const; │ │ │ │ │ -121 │ │ │ │ │ -122 template< class Functor > │ │ │ │ │ -_1_2_3 void _l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ -124 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ) const; │ │ │ │ │ +103 private: │ │ │ │ │ +104 const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering_; │ │ │ │ │ +105 int *marker_[ dimension+1 ]; │ │ │ │ │ +106 }; │ │ │ │ │ +107 │ │ │ │ │ +108 │ │ │ │ │ +109 │ │ │ │ │ +110 // AlbertaMarkerVector::NoMarkSubEntities │ │ │ │ │ +111 // -------------------------------------- │ │ │ │ │ +112 │ │ │ │ │ +113 template< int dim, int dimworld > │ │ │ │ │ +114 template< bool > │ │ │ │ │ +115 struct _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r< dim, dimworld >::NoMarkSubEntities │ │ │ │ │ +116 { │ │ │ │ │ +117 template< int firstCodim, class Iterator > │ │ │ │ │ +118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering, │ │ │ │ │ +119 [[maybe_unused]] int *(&marker)[ dimension + 1 ], │ │ │ │ │ +120 [[maybe_unused]] const Iterator &begin, │ │ │ │ │ +121 [[maybe_unused]] const Iterator &end ) │ │ │ │ │ +122 {} │ │ │ │ │ +123 }; │ │ │ │ │ +124 │ │ │ │ │ 125 │ │ │ │ │ -_1_2_6 bool _c_o_a_r_s_e_n ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 bool _r_e_f_i_n_e ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ +126 │ │ │ │ │ +127 // AlbertaMarkerVector::MarkSubEntities │ │ │ │ │ +128 // ------------------------------------ │ │ │ │ │ 129 │ │ │ │ │ -130 private: │ │ │ │ │ -131 static _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ -132 initNodeProjection ( [[maybe_unused]] _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ -*macroElement, int n ); │ │ │ │ │ -133 template< class ProjectionProvider > │ │ │ │ │ -134 static _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ -135 initNodeProjection ( _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL *macroElement, int n ); │ │ │ │ │ -136 │ │ │ │ │ -137 _M_e_s_h *mesh_; │ │ │ │ │ -138 }; │ │ │ │ │ -139 │ │ │ │ │ +130 template< int dim, int dimworld > │ │ │ │ │ +131 template< bool > │ │ │ │ │ +132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities │ │ │ │ │ +133 { │ │ │ │ │ +134 template< int codim > │ │ │ │ │ +_1_3_5 struct _C_o_d_i_m │ │ │ │ │ +136 { │ │ │ │ │ +_1_3_7 static const int numSubEntities = _A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _c_o_d_i_m │ │ │ │ │ +_>_:_:_v_a_l_u_e; │ │ │ │ │ +138 │ │ │ │ │ +_1_3_9 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ 140 │ │ │ │ │ -141 │ │ │ │ │ -142 // MeshPointer::Library │ │ │ │ │ -143 // -------------------- │ │ │ │ │ -144 │ │ │ │ │ -145 template< int dim > │ │ │ │ │ -146 template< int dimWorld > │ │ │ │ │ -147 struct _M_e_s_h_P_o_i_n_t_e_r< dim >::Library │ │ │ │ │ -148 { │ │ │ │ │ -149 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -150 │ │ │ │ │ -151 static inline unsigned int boundaryCount = 0; │ │ │ │ │ -152 static inline const void *projectionFactory = nullptr; │ │ │ │ │ -153 │ │ │ │ │ -154 static void │ │ │ │ │ -155 _c_r_e_a_t_e ( _M_e_s_h_P_o_i_n_t_e_r &ptr, const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData, │ │ │ │ │ -156 _A_L_B_E_R_T_A NODE_PROJECTION *(*initNodeProjection)( _M_e_s_h *, _A_L_B_E_R_T_A MACRO_EL *, │ │ │ │ │ -int ) ); │ │ │ │ │ -157 static void _r_e_l_e_a_s_e ( _M_e_s_h_P_o_i_n_t_e_r &ptr ); │ │ │ │ │ -158 }; │ │ │ │ │ -159 │ │ │ │ │ -160 │ │ │ │ │ -161 │ │ │ │ │ -162 // MeshPointer::MacroIterator │ │ │ │ │ -163 // -------------------------- │ │ │ │ │ +_1_4_1 static void _a_p_p_l_y ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering, │ │ │ │ │ +142 int *(&_m_a_r_k_e_r)[ dimension + 1 ], │ │ │ │ │ +143 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) │ │ │ │ │ +144 { │ │ │ │ │ +145 int *array = _m_a_r_k_e_r[ _c_o_d_i_m ]; │ │ │ │ │ +146 │ │ │ │ │ +147 const int index = dofNumbering( elementInfo, 0, 0 ); │ │ │ │ │ +148 for( int i = 0; i < numSubEntities; ++i ) │ │ │ │ │ +149 { │ │ │ │ │ +150 int &mark = array[ dofNumbering( elementInfo, _c_o_d_i_m, i ) ]; │ │ │ │ │ +151 mark = std::max( index, mark ); │ │ │ │ │ +152 } │ │ │ │ │ +153 } │ │ │ │ │ +154 }; │ │ │ │ │ +155 │ │ │ │ │ +156 template< int firstCodim, class Iterator > │ │ │ │ │ +157 static void mark ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering, int *(&marker) │ │ │ │ │ +[ dimension + 1 ], │ │ │ │ │ +158 const Iterator &begin, const Iterator &end ) │ │ │ │ │ +159 { │ │ │ │ │ +160 for( int codim = firstCodim; codim <= dimension; ++codim ) │ │ │ │ │ +161 { │ │ │ │ │ +162 const int size = dofNumbering._s_i_z_e( codim ); │ │ │ │ │ +163 marker[ codim ] = new int[ size ]; │ │ │ │ │ 164 │ │ │ │ │ -165 template< int dim > │ │ │ │ │ -_1_6_6 class _M_e_s_h_P_o_i_n_t_e_r< dim >::_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ -167 { │ │ │ │ │ -_1_6_8 typedef _M_a_c_r_o_I_t_e_r_a_t_o_r _T_h_i_s; │ │ │ │ │ +165 int *array = marker[ codim ]; │ │ │ │ │ +166 for( int i = 0; i < size; ++i ) │ │ │ │ │ +167 array[ i ] = -1; │ │ │ │ │ +168 } │ │ │ │ │ 169 │ │ │ │ │ -170 friend class _M_e_s_h_P_o_i_n_t_e_r< dim >; │ │ │ │ │ -171 │ │ │ │ │ -172 public: │ │ │ │ │ -_1_7_3 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -_1_7_4 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -175 │ │ │ │ │ -_1_7_6 _M_a_c_r_o_I_t_e_r_a_t_o_r () │ │ │ │ │ -177 : mesh_(), │ │ │ │ │ -178 index_( -1 ) │ │ │ │ │ -179 {} │ │ │ │ │ +170 for( Iterator it = begin; it != end; ++it ) │ │ │ │ │ +171 { │ │ │ │ │ +172 const ElementInfo &elementInfo = it->impl().elementInfo(); │ │ │ │ │ +173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{}, │ │ │ │ │ +174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker, │ │ │ │ │ +elementInfo ); } ); │ │ │ │ │ +175 } │ │ │ │ │ +176 } │ │ │ │ │ +177 }; │ │ │ │ │ +178 │ │ │ │ │ +179 │ │ │ │ │ 180 │ │ │ │ │ -181 private: │ │ │ │ │ -182 │ │ │ │ │ -183 explicit _M_a_c_r_o_I_t_e_r_a_t_o_r ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, bool _e_n_d = false ) │ │ │ │ │ -184 : mesh_( mesh ), │ │ │ │ │ -185 index_( _e_n_d ? mesh._n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s() : 0 ) │ │ │ │ │ -186 {} │ │ │ │ │ -187 │ │ │ │ │ -188 public: │ │ │ │ │ -_1_8_9 bool _d_o_n_e () const │ │ │ │ │ -190 { │ │ │ │ │ -191 return (index_ >= mesh()._n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s()); │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -_1_9_4 bool _e_q_u_a_l_s ( const _M_a_c_r_o_I_t_e_r_a_t_o_r &other ) const │ │ │ │ │ -195 { │ │ │ │ │ -196 return (index_ == other.index_); │ │ │ │ │ -197 } │ │ │ │ │ -198 │ │ │ │ │ -_1_9_9 void _i_n_c_r_e_m_e_n_t () │ │ │ │ │ -200 { │ │ │ │ │ -201 assert( !done() ); │ │ │ │ │ -202 ++index_; │ │ │ │ │ -203 } │ │ │ │ │ -204 │ │ │ │ │ -_2_0_5 const _M_a_c_r_o_E_l_e_m_e_n_t &_m_a_c_r_o_E_l_e_m_e_n_t () const │ │ │ │ │ -206 { │ │ │ │ │ -207 assert( !done() ); │ │ │ │ │ -208 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & >( mesh().mesh_->macro_els[ index_ │ │ │ │ │ -] ); │ │ │ │ │ -209 } │ │ │ │ │ -210 │ │ │ │ │ -_2_1_1 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h () const │ │ │ │ │ -212 { │ │ │ │ │ -213 return mesh_; │ │ │ │ │ -214 } │ │ │ │ │ +181 // AlbertaGridTreeIterator │ │ │ │ │ +182 // ----------------------- │ │ │ │ │ +183 │ │ │ │ │ +187 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +_1_8_8 class _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +189 { │ │ │ │ │ +190 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> _T_h_i_s; │ │ │ │ │ +191 │ │ │ │ │ +192 public: │ │ │ │ │ +_1_9_3 static const int _d_i_m_e_n_s_i_o_n = GridImp::dimension; │ │ │ │ │ +_1_9_4 static const int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ +_1_9_5 static const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d = GridImp::dimensionworld; │ │ │ │ │ +196 │ │ │ │ │ +197 private: │ │ │ │ │ +198 friend class _A_l_b_e_r_t_a_G_r_i_d< _d_i_m_e_n_s_i_o_n, _d_i_m_e_n_s_i_o_n_w_o_r_l_d >; │ │ │ │ │ +199 │ │ │ │ │ +200 static const int numSubEntities │ │ │ │ │ +201 = _A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_v_a_l_u_e; │ │ │ │ │ +202 │ │ │ │ │ +203 public: │ │ │ │ │ +_2_0_4 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +_2_0_5 typedef typename MeshPointer::MacroIterator _M_a_c_r_o_I_t_e_r_a_t_o_r; │ │ │ │ │ +206 │ │ │ │ │ +_2_0_7 typedef typename GridImp::template Codim< codim >::Entity _E_n_t_i_t_y; │ │ │ │ │ +_2_0_8 typedef _M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ +_2_0_9 typedef typename _E_n_t_i_t_y_O_b_j_e_c_t_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e _E_n_t_i_t_y_I_m_p; │ │ │ │ │ +_2_1_0 typedef typename EntityImp::ElementInfo _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +211 │ │ │ │ │ +_2_1_2 typedef _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_w_o_r_l_d_ _> _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ +213 │ │ │ │ │ +_2_1_4 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r (); │ │ │ │ │ 215 │ │ │ │ │ -_2_1_6 _T_h_i_s &operator++ () │ │ │ │ │ -217 { │ │ │ │ │ -218 increment(); │ │ │ │ │ -219 return *this; │ │ │ │ │ -220 } │ │ │ │ │ +_2_1_7 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const _T_h_i_s &other ); │ │ │ │ │ +218 │ │ │ │ │ +_2_2_0 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ); │ │ │ │ │ 221 │ │ │ │ │ -_2_2_2 _E_l_e_m_e_n_t_I_n_f_o operator* () const │ │ │ │ │ -223 { │ │ │ │ │ -224 return elementInfo(); │ │ │ │ │ -225 } │ │ │ │ │ -226 │ │ │ │ │ -_2_2_7 bool operator== ( const _M_a_c_r_o_I_t_e_r_a_t_o_r &other ) const │ │ │ │ │ -228 { │ │ │ │ │ -229 return equals( other ); │ │ │ │ │ -230 } │ │ │ │ │ -231 │ │ │ │ │ -_2_3_2 bool operator!= ( const _M_a_c_r_o_I_t_e_r_a_t_o_r &other ) const │ │ │ │ │ -233 { │ │ │ │ │ -234 return !equals( other ); │ │ │ │ │ -235 } │ │ │ │ │ -236 │ │ │ │ │ -237 _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -_2_3_8 _e_l_e_m_e_n_t_I_n_f_o ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags = _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ) │ │ │ │ │ -const │ │ │ │ │ -239 { │ │ │ │ │ -240 if( done() ) │ │ │ │ │ -241 return _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ │ -242 else │ │ │ │ │ -243 return _E_l_e_m_e_n_t_I_n_f_o( mesh(), macroElement(), fillFlags ); │ │ │ │ │ -244 } │ │ │ │ │ -245 │ │ │ │ │ -246 private: │ │ │ │ │ -247 _M_e_s_h_P_o_i_n_t_e_r mesh_; │ │ │ │ │ -248 int index_; │ │ │ │ │ -249 }; │ │ │ │ │ +_2_2_3 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int travLevel ); │ │ │ │ │ +224 │ │ │ │ │ +_2_2_6 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ +227 const _M_a_r_k_e_r_V_e_c_t_o_r *marker, │ │ │ │ │ +228 int travLevel ); │ │ │ │ │ +229 │ │ │ │ │ +_2_3_1 bool _e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ │ +232 { │ │ │ │ │ +233 return entity_.impl().equals( other.entity_.impl() ); │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +_2_3_7 _E_n_t_i_t_y &_d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ +238 { │ │ │ │ │ +239 return entity_; │ │ │ │ │ +240 } │ │ │ │ │ +241 │ │ │ │ │ +_2_4_3 int _l_e_v_e_l () const │ │ │ │ │ +244 { │ │ │ │ │ +245 return entity_.impl().level(); │ │ │ │ │ +246 } │ │ │ │ │ +247 │ │ │ │ │ +_2_4_9 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ 250 │ │ │ │ │ -251 │ │ │ │ │ -252 │ │ │ │ │ -253 // Implementation of MeshPointer │ │ │ │ │ -254 // ----------------------------- │ │ │ │ │ -255 │ │ │ │ │ -256 template< int dim > │ │ │ │ │ -_2_5_7 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s () const │ │ │ │ │ -258 { │ │ │ │ │ -259 return (mesh_ ? mesh_->n_macro_el : 0); │ │ │ │ │ -260 } │ │ │ │ │ -261 │ │ │ │ │ +251 protected: │ │ │ │ │ +_2_5_3 const GridImp &_g_r_i_d () const │ │ │ │ │ +254 { │ │ │ │ │ +255 return entity_.impl().grid(); │ │ │ │ │ +256 } │ │ │ │ │ +257 │ │ │ │ │ +258 private: │ │ │ │ │ +259 void nextElement ( _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +260 void nextElementStop (_E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +261 bool stopAtElement ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const; │ │ │ │ │ 262 │ │ │ │ │ -263 template<> │ │ │ │ │ -_2_6_4 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _1_ _>_:_:_s_i_z_e( int codim ) const │ │ │ │ │ -265 { │ │ │ │ │ -266 assert( (codim >= 0) && (codim <= 1) ); │ │ │ │ │ -267 return (codim == 0 ? mesh_->n_elements : mesh_->n_vertices); │ │ │ │ │ -268 } │ │ │ │ │ -269 │ │ │ │ │ -270 template<> │ │ │ │ │ -_2_7_1 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _2_ _>_:_:_s_i_z_e( int codim ) const │ │ │ │ │ -272 { │ │ │ │ │ -273 assert( (codim >= 0) && (codim <= 2) ); │ │ │ │ │ -274 if( codim == 0 ) │ │ │ │ │ -275 return mesh_->n_elements; │ │ │ │ │ -276 else if( codim == 2 ) │ │ │ │ │ -277 return mesh_->n_vertices; │ │ │ │ │ -278 else │ │ │ │ │ -279 return mesh_->n_edges; │ │ │ │ │ -280 } │ │ │ │ │ +263 void goNext ( _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +264 void goNext ( const std::integral_constant< int, 0 > cdVariable, │ │ │ │ │ +265 _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +266 void goNext ( const std::integral_constant< int, 1 > cdVariable, │ │ │ │ │ +267 _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +268 template< int cd > │ │ │ │ │ +269 void goNext ( const std::integral_constant< int, cd > cdVariable, │ │ │ │ │ +270 _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +271 │ │ │ │ │ +272 mutable _E_n_t_i_t_y entity_; │ │ │ │ │ +273 │ │ │ │ │ +275 int level_; │ │ │ │ │ +276 │ │ │ │ │ +278 int subEntity_; │ │ │ │ │ +279 │ │ │ │ │ +280 _M_a_c_r_o_I_t_e_r_a_t_o_r macroIterator_; │ │ │ │ │ 281 │ │ │ │ │ -282 template<> │ │ │ │ │ -_2_8_3 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _3_ _>_:_:_s_i_z_e( int codim ) const │ │ │ │ │ -284 { │ │ │ │ │ -285 assert( (codim >= 0) && (codim <= 3) ); │ │ │ │ │ -286 if( codim == 0 ) │ │ │ │ │ -287 return mesh_->n_elements; │ │ │ │ │ -288 else if( codim == 3 ) │ │ │ │ │ -289 return mesh_->n_vertices; │ │ │ │ │ -290 else if( codim == 1 ) │ │ │ │ │ -291 return mesh_->n_faces; │ │ │ │ │ -292 else │ │ │ │ │ -293 return mesh_->n_edges; │ │ │ │ │ -294 } │ │ │ │ │ -295 │ │ │ │ │ -296 │ │ │ │ │ -297 template< int dim > │ │ │ │ │ -298 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -_2_9_9_ _:_:_c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData ) │ │ │ │ │ -300 { │ │ │ │ │ -301 release(); │ │ │ │ │ -302 │ │ │ │ │ -303 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ -304 Library< dimWorld >::create( *this, macroData, &initNodeProjection ); │ │ │ │ │ -305 return Library< dimWorld >::boundaryCount; │ │ │ │ │ -306 } │ │ │ │ │ -307 │ │ │ │ │ -308 │ │ │ │ │ -309 template< int dim > │ │ │ │ │ -310 template< class Proj, class Impl > │ │ │ │ │ -311 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -_3_1_2_ _:_:_c_r_e_a_t_e ( const _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> ¯oData, │ │ │ │ │ -313 const _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> &projectionFactory ) │ │ │ │ │ -314 { │ │ │ │ │ -315 typedef _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e_<_ _P_r_o_j_,_ _I_m_p_l_ _> _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ +282 // knows on which element a point,edge,face is viewed │ │ │ │ │ +283 const _M_a_r_k_e_r_V_e_c_t_o_r *marker_; │ │ │ │ │ +284 }; │ │ │ │ │ +285 │ │ │ │ │ +286 │ │ │ │ │ +287 │ │ │ │ │ +288 // Implementation of AlbertaMarkerVector │ │ │ │ │ +289 // ------------------------------------- │ │ │ │ │ +290 │ │ │ │ │ +291 template< int dim, int dimworld > │ │ │ │ │ +292 template< int codim > │ │ │ │ │ +293 inline bool AlbertaMarkerVector< dim, dimworld > │ │ │ │ │ +_2_9_4 ::subEntityOnElement ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) │ │ │ │ │ +const │ │ │ │ │ +295 { │ │ │ │ │ +296 assert( marker_[ codim ] != 0 ); │ │ │ │ │ +297 │ │ │ │ │ +298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity ); │ │ │ │ │ +299 const int markIndex = marker_[ codim ][ subIndex ]; │ │ │ │ │ +300 assert( (markIndex >= 0) ); │ │ │ │ │ +301 │ │ │ │ │ +302 const int index = dofNumbering_( elementInfo, 0, 0 ); │ │ │ │ │ +303 return (markIndex == index); │ │ │ │ │ +304 } │ │ │ │ │ +305 │ │ │ │ │ +306 │ │ │ │ │ +307 template< int dim, int dimworld > │ │ │ │ │ +308 template< int firstCodim, class Iterator > │ │ │ │ │ +309 inline void _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_3_1_0_ _:_:_m_a_r_k_S_u_b_E_n_t_i_t_i_e_s ( const Iterator &begin, const Iterator &end ) │ │ │ │ │ +311 { │ │ │ │ │ +312 clear(); │ │ │ │ │ +313 std::conditional< (firstCodim <= dimension), MarkSubEntities, │ │ │ │ │ +NoMarkSubEntities >::type │ │ │ │ │ +314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin, end │ │ │ │ │ +); │ │ │ │ │ +315 } │ │ │ │ │ 316 │ │ │ │ │ -317 release(); │ │ │ │ │ -318 │ │ │ │ │ -319 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ -320 Library< dimWorld >::projectionFactory = &projectionFactory; │ │ │ │ │ -321 Library< dimWorld >::create( *this, macroData, &initNodeProjection< │ │ │ │ │ -ProjectionFactory > ); │ │ │ │ │ -322 Library< dimWorld >::projectionFactory = nullptr; │ │ │ │ │ -323 return Library< dimWorld >::boundaryCount; │ │ │ │ │ -324 } │ │ │ │ │ -325 │ │ │ │ │ -326 │ │ │ │ │ -327 │ │ │ │ │ -328 │ │ │ │ │ -329 template< int dim > │ │ │ │ │ -330 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -_3_3_1_ _:_:_c_r_e_a_t_e ( const std::string &filename, bool binary ) │ │ │ │ │ -332 { │ │ │ │ │ -333 _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> macroData; │ │ │ │ │ -334 macroData._r_e_a_d( filename, binary ); │ │ │ │ │ -335 const unsigned int boundaryCount = create( macroData ); │ │ │ │ │ -336 macroData._r_e_l_e_a_s_e(); │ │ │ │ │ -337 return boundaryCount; │ │ │ │ │ -338 } │ │ │ │ │ +317 │ │ │ │ │ +318 template< int dim, int dimworld > │ │ │ │ │ +_3_1_9 inline void _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_p_r_i_n_t ( std::ostream &out │ │ │ │ │ +) const │ │ │ │ │ +320 { │ │ │ │ │ +321 for( int codim = 1; codim <= dimension; ++codim ) │ │ │ │ │ +322 { │ │ │ │ │ +323 int *marker = marker_[ codim ]; │ │ │ │ │ +324 if( marker != 0 ) │ │ │ │ │ +325 { │ │ │ │ │ +326 const int size = dofNumbering_.size( codim ); │ │ │ │ │ +327 out << std::endl; │ │ │ │ │ +328 out << "Codimension " << codim << " (" << size << " entries)" << std::endl; │ │ │ │ │ +329 for( int i = 0; i < size; ++i ) │ │ │ │ │ +330 out << "subentity " << i << " visited on Element " << marker[ i ] << std:: │ │ │ │ │ +endl; │ │ │ │ │ +331 } │ │ │ │ │ +332 } │ │ │ │ │ +333 } │ │ │ │ │ +334 │ │ │ │ │ +335 │ │ │ │ │ +336 │ │ │ │ │ +337 // Implementation of AlbertaGridTreeIterator │ │ │ │ │ +338 // ----------------------------------------- │ │ │ │ │ 339 │ │ │ │ │ -340 │ │ │ │ │ -341 template< int dim > │ │ │ │ │ -_3_4_2 inline unsigned int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_r_e_a_d ( const std::string &filename, │ │ │ │ │ -_R_e_a_l &time ) │ │ │ │ │ -343 { │ │ │ │ │ -344 release(); │ │ │ │ │ -345 │ │ │ │ │ -346 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ -347 mesh_ = _A_L_B_E_R_T_A read_mesh_xdr( filename.c_str(), &time, NULL, NULL ); │ │ │ │ │ -348 return Library< dimWorld >::boundaryCount; │ │ │ │ │ -349 } │ │ │ │ │ -350 │ │ │ │ │ -351 │ │ │ │ │ -352 template< int dim > │ │ │ │ │ -_3_5_3 inline bool _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_w_r_i_t_e ( const std::string &filename, _R_e_a_l │ │ │ │ │ -time ) const │ │ │ │ │ -354 { │ │ │ │ │ -355 int success = _A_L_B_E_R_T_A write_mesh_xdr( mesh_, filename.c_str(), time ); │ │ │ │ │ -356 return (success == 0); │ │ │ │ │ -357 } │ │ │ │ │ -358 │ │ │ │ │ -359 │ │ │ │ │ -360 template< int dim > │ │ │ │ │ -_3_6_1 inline void _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_r_e_l_e_a_s_e () │ │ │ │ │ -362 { │ │ │ │ │ -363 Library< dimWorld >::release( *this ); │ │ │ │ │ -364 } │ │ │ │ │ -365 │ │ │ │ │ -366 │ │ │ │ │ -367 template< int dim > │ │ │ │ │ -368 template< class Functor > │ │ │ │ │ -369 inline void _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -_3_7_0_ _:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ -371 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) const │ │ │ │ │ -372 { │ │ │ │ │ -373 const _M_a_c_r_o_I_t_e_r_a_t_o_r eit = end(); │ │ │ │ │ -374 for( _M_a_c_r_o_I_t_e_r_a_t_o_r it = begin(); it != eit; ++it ) │ │ │ │ │ -375 { │ │ │ │ │ -376 const _E_l_e_m_e_n_t_I_n_f_o info = it.elementInfo( fillFlags ); │ │ │ │ │ -377 info._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( functor ); │ │ │ │ │ -378 } │ │ │ │ │ -379 } │ │ │ │ │ -380 │ │ │ │ │ +340 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +341 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +_3_4_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r () │ │ │ │ │ +343 : entity_(), │ │ │ │ │ +344 level_( -1 ), │ │ │ │ │ +345 subEntity_( -1 ), │ │ │ │ │ +346 macroIterator_(), │ │ │ │ │ +347 marker_( NULL ) │ │ │ │ │ +348 {} │ │ │ │ │ +349 │ │ │ │ │ +350 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +351 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +_3_5_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ │ +353 const _M_a_r_k_e_r_V_e_c_t_o_r *marker, │ │ │ │ │ +354 int travLevel ) │ │ │ │ │ +355 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ +356 level_( travLevel ), │ │ │ │ │ +357 subEntity_( (codim == 0 ? 0 : -1) ), │ │ │ │ │ +358 macroIterator_( grid.meshPointer().begin() ), │ │ │ │ │ +359 marker_( marker ) │ │ │ │ │ +360 { │ │ │ │ │ +361 _E_l_e_m_e_n_t_I_n_f_o elementInfo = *macroIterator_; │ │ │ │ │ +362 nextElementStop( elementInfo ); │ │ │ │ │ +363 if( codim > 0 ) │ │ │ │ │ +364 goNext( elementInfo ); │ │ │ │ │ +365 // it is ok to set the invalid ElementInfo │ │ │ │ │ +366 entity_.impl().setElement( elementInfo, subEntity_ ); │ │ │ │ │ +367 } │ │ │ │ │ +368 │ │ │ │ │ +369 │ │ │ │ │ +370 // Make LevelIterator with point to element from previous iterations │ │ │ │ │ +371 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +372 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +_3_7_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ │ +374 int travLevel ) │ │ │ │ │ +375 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ +376 level_( travLevel ), │ │ │ │ │ +377 subEntity_( -1 ), │ │ │ │ │ +378 macroIterator_( grid.meshPointer().end() ), │ │ │ │ │ +379 marker_( 0 ) │ │ │ │ │ +380 {} │ │ │ │ │ 381 │ │ │ │ │ -382 template< int dim > │ │ │ │ │ -383 template< class Functor > │ │ │ │ │ -384 inline void _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ │ -_3_8_5_ _:_:_l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor, │ │ │ │ │ -386 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) const │ │ │ │ │ -387 { │ │ │ │ │ -388 const _M_a_c_r_o_I_t_e_r_a_t_o_r eit = end(); │ │ │ │ │ -389 for( _M_a_c_r_o_I_t_e_r_a_t_o_r it = begin(); it != eit; ++it ) │ │ │ │ │ -390 { │ │ │ │ │ -391 const _E_l_e_m_e_n_t_I_n_f_o info = it.elementInfo( fillFlags ); │ │ │ │ │ -392 info._l_e_a_f_T_r_a_v_e_r_s_e( functor ); │ │ │ │ │ -393 } │ │ │ │ │ -394 } │ │ │ │ │ -395 │ │ │ │ │ -396 │ │ │ │ │ -397 template< int dim > │ │ │ │ │ -_3_9_8 inline bool _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_c_o_a_r_s_e_n ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ -fillFlags ) │ │ │ │ │ +382 │ │ │ │ │ +383 // Make LevelIterator with point to element from previous iterations │ │ │ │ │ +384 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +385 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +_3_8_6_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r( const _T_h_i_s &other ) │ │ │ │ │ +387 : entity_( other.entity_ ), │ │ │ │ │ +388 level_( other.level_ ), │ │ │ │ │ +389 subEntity_( other.subEntity_ ), │ │ │ │ │ +390 macroIterator_( other.macroIterator_ ), │ │ │ │ │ +391 marker_( other.marker_ ) │ │ │ │ │ +392 {} │ │ │ │ │ +393 │ │ │ │ │ +394 │ │ │ │ │ +395 // Make LevelIterator with point to element from previous iterations │ │ │ │ │ +396 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +397 inline typename _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _>_:_: │ │ │ │ │ +_T_h_i_s & │ │ │ │ │ +_3_9_8 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const │ │ │ │ │ +_T_h_i_s &other ) │ │ │ │ │ 399 { │ │ │ │ │ -400 const bool coarsened = (_A_L_B_E_R_T_A coarsen( mesh_, fillFlags ) == │ │ │ │ │ -_m_e_s_h_C_o_a_r_s_e_n_e_d); │ │ │ │ │ -401 if( coarsened ) │ │ │ │ │ -402 _A_L_B_E_R_T_A dof_compress( mesh_ ); │ │ │ │ │ -403 return coarsened; │ │ │ │ │ -404 } │ │ │ │ │ +400 entity_ = other.entity_; │ │ │ │ │ +401 level_ = other.level_; │ │ │ │ │ +402 subEntity_ = other.subEntity_; │ │ │ │ │ +403 macroIterator_ = other.macroIterator_; │ │ │ │ │ +404 marker_ = other.marker_; │ │ │ │ │ 405 │ │ │ │ │ -406 template< int dim > │ │ │ │ │ -_4_0_7 inline bool _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_r_e_f_i_n_e ( typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ -fillFlags ) │ │ │ │ │ -408 { │ │ │ │ │ -409 return (_A_L_B_E_R_T_A refine( mesh_, fillFlags ) == _m_e_s_h_R_e_f_i_n_e_d); │ │ │ │ │ -410 } │ │ │ │ │ -411 │ │ │ │ │ -412 │ │ │ │ │ -413 template< int dim > │ │ │ │ │ -414 inline _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ -415 _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_i_n_i_t_N_o_d_e_P_r_o_j_e_c_t_i_o_n ( _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ -*macroEl, int n ) │ │ │ │ │ -416 { │ │ │ │ │ -417 const _M_a_c_r_o_E_l_e_m_e_n_t ¯oElement = static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & > │ │ │ │ │ -( *macroEl ); │ │ │ │ │ -418 if( (n > 0) && macroElement._i_s_B_o_u_n_d_a_r_y( n-1 ) ) │ │ │ │ │ -419 return new _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n( Library< dimWorld >::boundaryCount++ ); │ │ │ │ │ -420 else │ │ │ │ │ -421 return 0; │ │ │ │ │ -422 } │ │ │ │ │ -423 │ │ │ │ │ -424 │ │ │ │ │ -425 template< int dim > │ │ │ │ │ -426 template< class ProjectionFactory > │ │ │ │ │ -427 inline _A_L_B_E_R_T_A NODE_PROJECTION * │ │ │ │ │ -428 MeshPointer< dim >::initNodeProjection ( _M_e_s_h *mesh, _A_L_B_E_R_T_A MACRO_EL │ │ │ │ │ -*macroEl, int n ) │ │ │ │ │ +406 return *this; │ │ │ │ │ +407 } │ │ │ │ │ +408 │ │ │ │ │ +409 │ │ │ │ │ +410 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +_4_1_1 inline void _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _>_:_: │ │ │ │ │ +_i_n_c_r_e_m_e_n_t () │ │ │ │ │ +412 { │ │ │ │ │ +413 _E_l_e_m_e_n_t_I_n_f_o elementInfo = entity_.impl().elementInfo_; │ │ │ │ │ +414 goNext ( elementInfo ); │ │ │ │ │ +415 // it is ok to set the invalid ElementInfo │ │ │ │ │ +416 entity_.impl().setElement( elementInfo, subEntity_ ); │ │ │ │ │ +417 } │ │ │ │ │ +418 │ │ │ │ │ +419 │ │ │ │ │ +420 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +421 inline void _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +422_ _:_:_n_e_x_t_E_l_e_m_e_n_t ( ElementInfo &elementInfo ) │ │ │ │ │ +423 { │ │ │ │ │ +424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) ) │ │ │ │ │ +425 { │ │ │ │ │ +426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) ) │ │ │ │ │ +427 elementInfo = elementInfo.father(); │ │ │ │ │ +428 if( elementInfo.level() == 0 ) │ │ │ │ │ 429 { │ │ │ │ │ -430 typedef typename _P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_:_:_P_r_o_j_e_c_t_i_o_n Projection; │ │ │ │ │ -431 │ │ │ │ │ -432 const MacroElement ¯oElement = static_cast< const MacroElement & > │ │ │ │ │ -( *macroEl ); │ │ │ │ │ -433 │ │ │ │ │ -434 MeshPointer< dim > meshPointer( mesh ); │ │ │ │ │ -435 ElementInfo elementInfo( meshPointer, macroElement, _F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d ); │ │ │ │ │ -436 const ProjectionFactory &projectionFactory = *static_cast< const │ │ │ │ │ -ProjectionFactory * >( Library< dimWorld >::projectionFactory ); │ │ │ │ │ -437 if( (n > 0) && macroElement.isBoundary( n-1 ) ) │ │ │ │ │ -438 { │ │ │ │ │ -439 const unsigned int boundaryIndex = Library< dimWorld >::boundaryCount++; │ │ │ │ │ -440 if( projectionFactory.hasProjection( elementInfo, n-1 ) ) │ │ │ │ │ -441 { │ │ │ │ │ -442 Projection projection = projectionFactory.projection( elementInfo, n-1 ); │ │ │ │ │ -443 return new NodeProjection< dim, Projection >( boundaryIndex, projection ); │ │ │ │ │ -444 } │ │ │ │ │ -445 else │ │ │ │ │ -446 return new BasicNodeProjection( boundaryIndex ); │ │ │ │ │ +430 ++macroIterator_; │ │ │ │ │ +431 elementInfo = *macroIterator_; │ │ │ │ │ +432 } │ │ │ │ │ +433 else │ │ │ │ │ +434 elementInfo = elementInfo.father().child( 1 ); │ │ │ │ │ +435 } │ │ │ │ │ +436 else │ │ │ │ │ +437 elementInfo = elementInfo.child( 0 ); │ │ │ │ │ +438 } │ │ │ │ │ +439 │ │ │ │ │ +440 │ │ │ │ │ +441 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ +443 ::nextElementStop ( ElementInfo &elementInfo ) │ │ │ │ │ +444 { │ │ │ │ │ +445 while( !(!elementInfo || stopAtElement( elementInfo )) ) │ │ │ │ │ +446 nextElement( elementInfo ); │ │ │ │ │ 447 } │ │ │ │ │ -448 else if( (dim < _d_i_m_W_o_r_l_d) && (n == 0) ) │ │ │ │ │ -449 { │ │ │ │ │ -450 const unsigned int boundaryIndex = std::numeric_limits< unsigned int >::max │ │ │ │ │ -(); │ │ │ │ │ -451 if( projectionFactory.hasProjection( elementInfo ) ) │ │ │ │ │ -452 { │ │ │ │ │ -453 Projection projection = projectionFactory.projection( elementInfo ); │ │ │ │ │ -454 return new NodeProjection< dim, Projection >( boundaryIndex, projection ); │ │ │ │ │ -455 } │ │ │ │ │ -456 else │ │ │ │ │ -457 return 0; │ │ │ │ │ -458 } │ │ │ │ │ -459 else │ │ │ │ │ -460 return 0; │ │ │ │ │ -461 } │ │ │ │ │ -462 │ │ │ │ │ -463 } // namespace Alberta │ │ │ │ │ -464 │ │ │ │ │ -465} // namespace Dune │ │ │ │ │ -466 │ │ │ │ │ -467#endif // #if HAVE_ALBERTA │ │ │ │ │ -468 │ │ │ │ │ -469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ +448 │ │ │ │ │ +449 │ │ │ │ │ +450 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ +452 ::stopAtElement ( const ElementInfo &elementInfo ) const │ │ │ │ │ +453 { │ │ │ │ │ +454 if( !elementInfo ) │ │ │ │ │ +455 return true; │ │ │ │ │ +456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level │ │ │ │ │ +())); │ │ │ │ │ +457 } │ │ │ │ │ +458 │ │ │ │ │ +459 │ │ │ │ │ +460 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ +462 ::goNext ( ElementInfo &elementInfo ) │ │ │ │ │ +463 { │ │ │ │ │ +464 std::integral_constant< int, codim > codimVariable; │ │ │ │ │ +465 goNext( codimVariable, elementInfo ); │ │ │ │ │ +466 } │ │ │ │ │ +467 │ │ │ │ │ +468 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ +470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */, │ │ │ │ │ +471 ElementInfo &elementInfo ) │ │ │ │ │ +472 { │ │ │ │ │ +473 assert( stopAtElement( elementInfo ) ); │ │ │ │ │ +474 │ │ │ │ │ +475 nextElement( elementInfo ); │ │ │ │ │ +476 nextElementStop( elementInfo ); │ │ │ │ │ +477 } │ │ │ │ │ +478 │ │ │ │ │ +479 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ +481 ::goNext ( const std::integral_constant< int, 1 > cdVariable, │ │ │ │ │ +482 ElementInfo &elementInfo ) │ │ │ │ │ +483 { │ │ │ │ │ +484 assert( stopAtElement( elementInfo ) ); │ │ │ │ │ +485 │ │ │ │ │ +486 ++subEntity_; │ │ │ │ │ +487 if( subEntity_ >= numSubEntities ) │ │ │ │ │ +488 { │ │ │ │ │ +489 subEntity_ = 0; │ │ │ │ │ +490 nextElement( elementInfo ); │ │ │ │ │ +491 nextElementStop( elementInfo ); │ │ │ │ │ +492 if( !elementInfo ) │ │ │ │ │ +493 return; │ │ │ │ │ +494 } │ │ │ │ │ +495 │ │ │ │ │ +496 if( leafIterator ) │ │ │ │ │ +497 { │ │ │ │ │ +498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ : │ │ │ │ │ +subEntity_); │ │ │ │ │ +499 │ │ │ │ │ +500 const _A_L_B_E_R_T_A EL *neighbor = elementInfo.elInfo().neigh[ face ]; │ │ │ │ │ +501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) ) │ │ │ │ │ +502 { │ │ │ │ │ +503 // face is reached from element with largest number │ │ │ │ │ +504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 ); │ │ │ │ │ +505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 ); │ │ │ │ │ +506 if( elIndex < nbIndex ) │ │ │ │ │ +507 goNext( cdVariable, elementInfo ); │ │ │ │ │ +508 } │ │ │ │ │ +509 // uncomment this assertion only if codimension 1 entities are marked │ │ │ │ │ +510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo, │ │ │ │ │ +subEntity_ ) ); │ │ │ │ │ +511 } │ │ │ │ │ +512 else │ │ │ │ │ +513 { │ │ │ │ │ +514 assert( marker_ != 0 ); │ │ │ │ │ +515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) ) │ │ │ │ │ +516 goNext( cdVariable, elementInfo ); │ │ │ │ │ +517 } │ │ │ │ │ +518 } │ │ │ │ │ +519 │ │ │ │ │ +520 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ +521 template< int cd > │ │ │ │ │ +522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ +523 ::goNext ( const std::integral_constant< int, cd > cdVariable, │ │ │ │ │ +524 ElementInfo &elementInfo ) │ │ │ │ │ +525 { │ │ │ │ │ +526 assert( stopAtElement( elementInfo ) ); │ │ │ │ │ +527 │ │ │ │ │ +528 ++subEntity_; │ │ │ │ │ +529 if( subEntity_ >= numSubEntities ) │ │ │ │ │ +530 { │ │ │ │ │ +531 subEntity_ = 0; │ │ │ │ │ +532 nextElement( elementInfo ); │ │ │ │ │ +533 nextElementStop( elementInfo ); │ │ │ │ │ +534 if( !elementInfo ) │ │ │ │ │ +535 return; │ │ │ │ │ +536 } │ │ │ │ │ +537 │ │ │ │ │ +538 assert( marker_ != 0 ); │ │ │ │ │ +539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ ) │ │ │ │ │ +) │ │ │ │ │ +540 goNext( cdVariable, elementInfo ); │ │ │ │ │ +541 } │ │ │ │ │ +542 │ │ │ │ │ +543} │ │ │ │ │ +544 │ │ │ │ │ +545#endif // #if HAVE_ALBERTA │ │ │ │ │ +546 │ │ │ │ │ +547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ +_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ -_m_a_c_r_o_d_a_t_a_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ │ -ALBERTA MESH Mesh │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d │ │ │ │ │ -static const int meshRefined │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d │ │ │ │ │ -static const int meshCoarsened │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s │ │ │ │ │ -int numMacroElements() const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:257 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -unsigned int create(const MacroData< dim > ¯oData, const │ │ │ │ │ -ProjectionFactoryInterface< Proj, Impl > &projectionFactory) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:312 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:361 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_a_d │ │ │ │ │ -unsigned int read(const std::string &filename, Real &time) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:342 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_e_n_d │ │ │ │ │ -MacroIterator end() const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_o_a_r_s_e_n │ │ │ │ │ -bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:398 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn agrid.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_s_i_z_e │ │ │ │ │ int size(int codim) const │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -unsigned int create(const std::string &filename, bool binary=false) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:331 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ -void leafTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:385 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ -unsigned int create(const MacroData< dim > ¯oData) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:299 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_b_e_g_i_n │ │ │ │ │ -MacroIterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -MeshPointer(Mesh *mesh) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -bool write(const std::string &filename, Real time) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:353 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_f_i_n_e │ │ │ │ │ -bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing) │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:407 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -MeshPointer() │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ -void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ -void hierarchicTraverse(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:695 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ -void leafTraverse(Functor &functor) const │ │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:708 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -release the macro data structure │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ │ -void read(const std::string &filename, bool binary=false) │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ │ -bool isBoundary(const int face) const │ │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_m_e_s_h │ │ │ │ │ -const MeshPointer & mesh() const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:211 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_m_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ │ -const MacroElement & macroElement() const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -Alberta::ElementInfo< dim > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:174 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -Alberta::MeshPointer< dim > MeshPointer │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:173 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags:: │ │ │ │ │ -standard) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_d_o_n_e │ │ │ │ │ -bool done() const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const This &other) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_O_b_j_e_c_t │ │ │ │ │ +MakeableInterfaceObject< Entity > EntityObject │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:208 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:204 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int │ │ │ │ │ +travLevel) │ │ │ │ │ +Constructor making begin iterator. │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:352 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridTreeIterator(const GridImp &grid, int travLevel) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:373 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_I_m_p │ │ │ │ │ +EntityObject::ImplementationType EntityImp │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:209 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int codimension │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:194 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ +MeshPointer::MacroIterator MacroIterator │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &other) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:398 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ +Entity & dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:237 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +AlbertaMarkerVector< dimension, dimensionworld > MarkerVector │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:212 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ +GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +ask for level of entities │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +static const int dimensionworld │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridTreeIterator() │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:342 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ void increment() │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const MacroIterator &other) const │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:194 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ -MacroIterator() │ │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:176 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ -static const Flags nothing │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ │ -ALBERTA FLAGS Flags │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ │ -static const Flags standard │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:258 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_:_:_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ -Base::Projection Projection │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ │ -_p_r_o_j_e_c_t_i_o_n_._h_h │ │ │ │ │ +increment │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ │ +const GridImp & grid() const │ │ │ │ │ +obtain a reference to the grid │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:193 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ +AlbertaGridTreeIterator(const This &other) │ │ │ │ │ +Constructor making end iterator. │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:386 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +EntityImp::ElementInfo ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +marker assigning subentities to one element containing them │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +AlbertaMarkerVector(const DofNumbering &dofNumbering) │ │ │ │ │ +create AlbertaMarkerVector with empty vectors │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_u_p_2_D_a_t_e │ │ │ │ │ +bool up2Date() const │ │ │ │ │ +return true if marking is up to date │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_s_u_b_E_n_t_i_t_y_O_n_E_l_e_m_e_n_t │ │ │ │ │ +bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const │ │ │ │ │ +visit subentity on this element? │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:294 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_m_a_r_k_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ +void markSubEntities(const Iterator &begin, const Iterator &end) │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:310 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_~_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +~AlbertaMarkerVector() │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_c_l_e_a_r │ │ │ │ │ +void clear() │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ +AlbertaMarkerVector(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &out=std::cout) const │ │ │ │ │ +print for debugin' only │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_:_:_C_o_d_i_m │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_:_:_C_o_d_i_m_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_:_:_C_o_d_i_m_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(const DofNumbering &dofNumbering, int *(&marker) │ │ │ │ │ +[dimension+1], const ElementInfo &elementInfo) │ │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> │ │ │ │ │ +_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _>_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e │ │ │ │ │ +InterfaceType::Implementation ImplementationType │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:1108 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00641.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00302.html │ │ │ │┄ Files 14% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: transformation.hh File Reference │ │ │ │ +dune-grid: rangegenerators.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,31 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
transformation.hh File Reference
│ │ │ │ +
rangegenerators.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +
#include <dune/common/iteratorrange.hh>
│ │ │ │ +#include <dune/common/rangeutilities.hh>
│ │ │ │ +#include <dune/geometry/dimension.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/partitionset.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::AlbertaTransformation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,21 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -transformation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ + * _c_o_m_m_o_n │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +rangegenerators.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_p_a_r_t_i_t_i_o_n_s_e_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_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html │ │ │ │┄ Files 18% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: transformation.hh Source File │ │ │ │ +dune-grid: vtksequencewriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,102 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
transformation.hh
│ │ │ │ +
vtksequencewriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │ -
6#define DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/common/fvector.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21 public:
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24 static const int dimension = Alberta::dimWorld;
│ │ │ │ -
25
│ │ │ │ -
26 typedef FieldVector< ctype, dimension > WorldVector;
│ │ │ │ -
27
│ │ │ │ -
28 explicit
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),
│ │ │ │ -
31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )
│ │ │ │ -
32 {}
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 const GlobalSpace::Vector &shift )
│ │ │ │ -
36 : matrix_( matrix ),
│ │ │ │ -
37 shift_( shift )
│ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
40 WorldVector evaluate ( const WorldVector &x ) const
│ │ │ │ -
41 {
│ │ │ │ - │ │ │ │ -
43 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
44 {
│ │ │ │ -
45 const GlobalSpace::Vector &row = matrix_[ i ];
│ │ │ │ -
46 y[ i ] = shift_[ i ];
│ │ │ │ -
47 for( int j = 0; j < dimension; ++j )
│ │ │ │ -
48 y[ i ] += row[ j ] * x[ j ];
│ │ │ │ -
49 }
│ │ │ │ -
50 return y;
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 {
│ │ │ │ -
55 // Note: ALBERTA requires the matrix to be orthogonal
│ │ │ │ -
56 WorldVector x( ctype( 0 ) );
│ │ │ │ -
57 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
58 {
│ │ │ │ -
59 const GlobalSpace::Vector &row = matrix_[ i ];
│ │ │ │ -
60 const ctype v = y[ i ] - shift_[ i ];
│ │ │ │ -
61 for( int j = 0; j < dimension; ++j )
│ │ │ │ -
62 x[ j ] += row[ j ] * v;
│ │ │ │ -
63 }
│ │ │ │ -
64 return x;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 private:
│ │ │ │ -
68 const GlobalSpace::Matrix &matrix_;
│ │ │ │ -
69 const GlobalSpace::Vector &shift_;
│ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72}
│ │ │ │ -
73
│ │ │ │ -
74#endif // #if HAVE_ALBERTA
│ │ │ │ -
75
│ │ │ │ -
76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_VTKSEQUENCE_HH
│ │ │ │ +
7#define DUNE_VTKSEQUENCE_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <memory>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
17
│ │ │ │ +
26 template< class GridView >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 public VTKSequenceWriterBase<GridView>
│ │ │ │ +
29 {
│ │ │ │ +
30 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43 const std::string& name )
│ │ │ │ + │ │ │ │ +
45 name,
│ │ │ │ +
46 "",
│ │ │ │ +
47 "",
│ │ │ │ +
48 vtkWriter->gridView_.comm().rank(),
│ │ │ │ +
49 vtkWriter->gridView_.comm().size())
│ │ │ │ +
50 {}
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
70 const std::string& name,
│ │ │ │ +
71 const std::string& path,
│ │ │ │ +
72 const std::string& extendpath )
│ │ │ │ + │ │ │ │ +
74 name,
│ │ │ │ +
75 path,
│ │ │ │ +
76 extendpath,
│ │ │ │ +
77 vtkWriter->gridView_.comm().rank(),
│ │ │ │ +
78 vtkWriter->gridView_.comm().size())
│ │ │ │ +
79 {}
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
87 explicit VTKSequenceWriter ( const GridView &gridView,
│ │ │ │ +
88 const std::string& name,
│ │ │ │ +
89 const std::string& path,
│ │ │ │ +
90 const std::string& extendpath,
│ │ │ │ + │ │ │ │ +
92 : VTKSequenceWriterBase<GridView>(std::make_shared<VTKWriter<GridView> >(gridView,dm),
│ │ │ │ +
93 name,path,extendpath,
│ │ │ │ +
94 gridView.comm().rank(), gridView.comm().size())
│ │ │ │ +
95 {}
│ │ │ │ +
│ │ │ │ +
96 };
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
98} // end namespace Dune
│ │ │ │ +
99
│ │ │ │ +
100#endif
│ │ │ │ +
Provides file i/o for the visualization toolkit.
│ │ │ │ +
Provides subsampled file i/o for the visualization toolkit.
│ │ │ │ + │ │ │ │ +
STL namespace.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ -
Definition misc.hh:102
│ │ │ │ -
GlobalMatrix Matrix
Definition misc.hh:106
│ │ │ │ -
GlobalVector Vector
Definition misc.hh:107
│ │ │ │ -
Definition transformation.hh:18
│ │ │ │ -
AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL)
Definition transformation.hh:29
│ │ │ │ -
static const int dimension
Definition transformation.hh:24
│ │ │ │ -
FieldVector< ctype, dimension > WorldVector
Definition transformation.hh:26
│ │ │ │ -
AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace::Vector &shift)
Definition transformation.hh:34
│ │ │ │ -
Alberta::Real ctype
Definition transformation.hh:22
│ │ │ │ -
WorldVector evaluateInverse(const WorldVector &y) const
Definition transformation.hh:53
│ │ │ │ -
WorldVector evaluate(const WorldVector &x) const
Definition transformation.hh:40
│ │ │ │ +
DataMode
Whether to produce conforming or non-conforming output.
Definition common.hh:67
│ │ │ │ +
@ conforming
Output conforming data.
Definition common.hh:73
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
Writer for the ouput of grid functions in the vtk format.
Definition vtksequencewriter.hh:29
│ │ │ │ +
VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath)
Constructor with a given VTKWriter or SubsamplingVTKWriter.
Definition vtksequencewriter.hh:69
│ │ │ │ +
VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name)
Constructor with a given VTKWriter or SubsamplingVTKWriter.
Definition vtksequencewriter.hh:42
│ │ │ │ +
VTKSequenceWriter(const GridView &gridView, const std::string &name, const std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::conforming)
Constructor creating its own VTKWriter object.
Definition vtksequencewriter.hh:87
│ │ │ │ +
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition vtksequencewriterbase.hh:34
│ │ │ │ +
const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
Definition vtksequencewriterbase.hh:63
│ │ │ │ +
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,133 +1,122 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -transformation.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _v_t_k │ │ │ │ │ +vtksequencewriter.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ -6#define DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12#if HAVE_ALBERTA │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -_1_7 class _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -18 { │ │ │ │ │ -19 typedef _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e _G_l_o_b_a_l_S_p_a_c_e; │ │ │ │ │ -20 │ │ │ │ │ -21 public: │ │ │ │ │ -_2_2 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ │ -23 │ │ │ │ │ -_2_4 static const int _d_i_m_e_n_s_i_o_n = _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d; │ │ │ │ │ -25 │ │ │ │ │ -_2_6 typedef FieldVector< ctype, dimension > _W_o_r_l_d_V_e_c_t_o_r; │ │ │ │ │ -27 │ │ │ │ │ -28 explicit │ │ │ │ │ -_2_9 _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( const _A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *trafo = NULL ) │ │ │ │ │ -30 : matrix_( (trafo != NULL ? trafo->M : _G_l_o_b_a_l_S_p_a_c_e::identityMatrix()) ), │ │ │ │ │ -31 shift_( (trafo != NULL ? trafo->t : _G_l_o_b_a_l_S_p_a_c_e::nullVector()) ) │ │ │ │ │ -32 {} │ │ │ │ │ -33 │ │ │ │ │ -_3_4 _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( const _G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x &matrix, │ │ │ │ │ -35 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &shift ) │ │ │ │ │ -36 : matrix_( matrix ), │ │ │ │ │ -37 shift_( shift ) │ │ │ │ │ -38 {} │ │ │ │ │ -39 │ │ │ │ │ -_4_0 _W_o_r_l_d_V_e_c_t_o_r _e_v_a_l_u_a_t_e ( const _W_o_r_l_d_V_e_c_t_o_r &x ) const │ │ │ │ │ -41 { │ │ │ │ │ -42 _W_o_r_l_d_V_e_c_t_o_r y; │ │ │ │ │ -43 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -44 { │ │ │ │ │ -45 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &row = matrix_[ i ]; │ │ │ │ │ -46 y[ i ] = shift_[ i ]; │ │ │ │ │ -47 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ -48 y[ i ] += row[ j ] * x[ j ]; │ │ │ │ │ -49 } │ │ │ │ │ -50 return y; │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -_5_3 _W_o_r_l_d_V_e_c_t_o_r _e_v_a_l_u_a_t_e_I_n_v_e_r_s_e ( const _W_o_r_l_d_V_e_c_t_o_r &y ) const │ │ │ │ │ -54 { │ │ │ │ │ -55 // Note: ALBERTA requires the matrix to be orthogonal │ │ │ │ │ -56 _W_o_r_l_d_V_e_c_t_o_r x( _c_t_y_p_e( 0 ) ); │ │ │ │ │ -57 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -58 { │ │ │ │ │ -59 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &row = matrix_[ i ]; │ │ │ │ │ -60 const _c_t_y_p_e v = y[ i ] - shift_[ i ]; │ │ │ │ │ -61 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ -62 x[ j ] += row[ j ] * v; │ │ │ │ │ -63 } │ │ │ │ │ -64 return x; │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 private: │ │ │ │ │ -68 const _G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x &matrix_; │ │ │ │ │ -69 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &shift_; │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72} │ │ │ │ │ -73 │ │ │ │ │ -74#endif // #if HAVE_ALBERTA │ │ │ │ │ -75 │ │ │ │ │ -76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_VTKSEQUENCE_HH │ │ │ │ │ +7#define DUNE_VTKSEQUENCE_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ +17 │ │ │ │ │ +26 template< class GridView > │ │ │ │ │ +_2_7 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r : │ │ │ │ │ +28 public _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +29 { │ │ │ │ │ +30 public: │ │ │ │ │ +_4_2 _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r ( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > _v_t_k_W_r_i_t_e_r, │ │ │ │ │ +43 const std::string& name ) │ │ │ │ │ +44 : _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>(_v_t_k_W_r_i_t_e_r, │ │ │ │ │ +45 name, │ │ │ │ │ +46 "", │ │ │ │ │ +47 "", │ │ │ │ │ +48 _v_t_k_W_r_i_t_e_r->gridView_.comm().rank(), │ │ │ │ │ +49 _v_t_k_W_r_i_t_e_r->gridView_.comm().size()) │ │ │ │ │ +50 {} │ │ │ │ │ +51 │ │ │ │ │ +_6_9 _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r ( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > _v_t_k_W_r_i_t_e_r, │ │ │ │ │ +70 const std::string& name, │ │ │ │ │ +71 const std::string& path, │ │ │ │ │ +72 const std::string& extendpath ) │ │ │ │ │ +73 : _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>(_v_t_k_W_r_i_t_e_r, │ │ │ │ │ +74 name, │ │ │ │ │ +75 path, │ │ │ │ │ +76 extendpath, │ │ │ │ │ +77 _v_t_k_W_r_i_t_e_r->gridView_.comm().rank(), │ │ │ │ │ +78 _v_t_k_W_r_i_t_e_r->gridView_.comm().size()) │ │ │ │ │ +79 {} │ │ │ │ │ +80 │ │ │ │ │ +_8_7 explicit _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r ( const _G_r_i_d_V_i_e_w &gridView, │ │ │ │ │ +88 const std::string& name, │ │ │ │ │ +89 const std::string& path, │ │ │ │ │ +90 const std::string& extendpath, │ │ │ │ │ +91 _V_T_K_:_:_D_a_t_a_M_o_d_e dm = _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g ) │ │ │ │ │ +92 : _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e<_G_r_i_d_V_i_e_w>(_s_t_d::make_shared<_V_T_K_W_r_i_t_e_r<_G_r_i_d_V_i_e_w> > │ │ │ │ │ +(gridView,dm), │ │ │ │ │ +93 name,path,extendpath, │ │ │ │ │ +94 gridView.comm().rank(), gridView.comm().size()) │ │ │ │ │ +95 {} │ │ │ │ │ +96 }; │ │ │ │ │ +97 │ │ │ │ │ +98} // end namespace Dune │ │ │ │ │ +99 │ │ │ │ │ +100#endif │ │ │ │ │ +_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides file i/o for the visualization toolkit. │ │ │ │ │ +_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides subsampled file i/o for the visualization toolkit. │ │ │ │ │ +_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x │ │ │ │ │ -GlobalMatrix Matrix │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r │ │ │ │ │ -GlobalVector Vector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL) │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_W_o_r_l_d_V_e_c_t_o_r │ │ │ │ │ -FieldVector< ctype, dimension > WorldVector │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace:: │ │ │ │ │ -Vector &shift) │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ -Alberta::Real ctype │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_e_v_a_l_u_a_t_e_I_n_v_e_r_s_e │ │ │ │ │ -WorldVector evaluateInverse(const WorldVector &y) const │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -WorldVector evaluate(const WorldVector &x) const │ │ │ │ │ -DDeeffiinniittiioonn transformation.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e │ │ │ │ │ +DataMode │ │ │ │ │ +Whether to produce conforming or non-conforming output. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +@ conforming │ │ │ │ │ +Output conforming data. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ +Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriter.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ +VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const │ │ │ │ │ +std::string &name, const std::string &path, const std::string &extendpath) │ │ │ │ │ +Constructor with a given VTKWriter or SubsamplingVTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriter.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ +VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const │ │ │ │ │ +std::string &name) │ │ │ │ │ +Constructor with a given VTKWriter or SubsamplingVTKWriter. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriter.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r │ │ │ │ │ +VTKSequenceWriter(const GridView &gridView, const std::string &name, const │ │ │ │ │ +std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK:: │ │ │ │ │ +conforming) │ │ │ │ │ +Constructor creating its own VTKWriter object. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriter.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +Base class to write pvd-files which contains a list of all collected vtk-files. │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e_:_:_v_t_k_W_r_i_t_e_r │ │ │ │ │ +const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const │ │ │ │ │ +DDeeffiinniittiioonn vtksequencewriterbase.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ +Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00698.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -78,18 +78,18 @@ │ │ │ │ Namespaces
│ │ │ │
treeiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <utility>
│ │ │ │ #include <dune/common/hybridutilities.hh>
│ │ │ │ #include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html │ │ │ │┄ Files 20% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: treeiterator.hh Source File │ │ │ │ +dune-grid: refinement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,647 +74,454 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
treeiterator.hh
│ │ │ │ +
refinement.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_ALBERTA_TREEITERATOR_HH
│ │ │ │ -
7#define DUNE_ALBERTA_TREEITERATOR_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/hybridutilities.hh>
│ │ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17#if HAVE_ALBERTA
│ │ │ │ +
5#ifndef DUNE_ALBERTA_REFINEMENT_HH
│ │ │ │ +
6#define DUNE_ALBERTA_REFINEMENT_HH
│ │ │ │ +
7
│ │ │ │ +
14#include <cassert>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21
│ │ │ │ -
22 // AlbertaMarkerVector
│ │ │ │ -
23 // -------------------
│ │ │ │ -
24
│ │ │ │ -
33 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {
│ │ │ │ - │ │ │ │ +
19#if HAVE_ALBERTA
│ │ │ │ +
20
│ │ │ │ +
21namespace Dune
│ │ │ │ +
22{
│ │ │ │ +
23
│ │ │ │ +
24 namespace Alberta
│ │ │ │ +
25 {
│ │ │ │ +
26
│ │ │ │ +
27 // Internal Forward Declarations
│ │ │ │ +
28 // -----------------------------
│ │ │ │ +
29
│ │ │ │ +
30 template< int dim, int codim >
│ │ │ │ + │ │ │ │ +
32
│ │ │ │ +
33
│ │ │ │ +
34
│ │ │ │ +
35 // Patch
│ │ │ │ +
36 // -----
│ │ │ │
37
│ │ │ │ - │ │ │ │ -
39
│ │ │ │ -
40 //friend class AlbertaGrid< dim, dimworld >;
│ │ │ │ -
41
│ │ │ │ -
42 static const int dimension = Grid::dimension;
│ │ │ │ -
43
│ │ │ │ - │ │ │ │ - │ │ │ │ -
46
│ │ │ │ -
47 template< bool >
│ │ │ │ -
48 struct NoMarkSubEntities;
│ │ │ │ -
49 template< bool >
│ │ │ │ -
50 struct MarkSubEntities;
│ │ │ │ -
51
│ │ │ │ -
52 public:
│ │ │ │ -
│ │ │ │ -
54 explicit AlbertaMarkerVector ( const DofNumbering &dofNumbering )
│ │ │ │ -
55 : dofNumbering_( dofNumbering )
│ │ │ │ -
56 {
│ │ │ │ -
57 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ -
58 marker_[ codim ] = 0;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
61 AlbertaMarkerVector ( const This &other )
│ │ │ │ -
62 : dofNumbering_( other.dofNumbering_ )
│ │ │ │ -
63 {
│ │ │ │ -
64 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ -
65 marker_[ codim ] = 0;
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69 {
│ │ │ │ -
70 clear();
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 private:
│ │ │ │ -
74 This &operator= ( const This & );
│ │ │ │ -
75
│ │ │ │ -
76 public:
│ │ │ │ -
78 template< int codim >
│ │ │ │ -
│ │ │ │ -
79 bool subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const;
│ │ │ │ -
80
│ │ │ │ -
81 template< int firstCodim, class Iterator >
│ │ │ │ -
│ │ │ │ -
82 void markSubEntities ( const Iterator &begin, const Iterator &end );
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ -
84 void clear ()
│ │ │ │ -
85 {
│ │ │ │ -
86 for( int codim = 0; codim <= dimension; ++codim )
│ │ │ │ -
87 {
│ │ │ │ -
88 if( marker_[ codim ] != 0 )
│ │ │ │ -
89 delete[] marker_[ codim ];
│ │ │ │ -
90 marker_[ codim ] = 0;
│ │ │ │ -
91 }
│ │ │ │ -
92 }
│ │ │ │ +
38 template< int dim >
│ │ │ │ +
│ │ │ │ +
39 class Patch
│ │ │ │ +
40 {
│ │ │ │ +
41 typedef Patch< dim > This;
│ │ │ │ +
42
│ │ │ │ +
43 static_assert(((dim >= 1) && (dim <= 3)),
│ │ │ │ +
44 "Alberta supports only dimensions 1, 2, 3");
│ │ │ │ +
45
│ │ │ │ +
46 public:
│ │ │ │ +
47 static const int dimension = dim;
│ │ │ │ +
48
│ │ │ │ + │ │ │ │ +
50
│ │ │ │ +
51 typedef ALBERTA RC_LIST_EL ElementList;
│ │ │ │ +
52
│ │ │ │ +
53 private:
│ │ │ │ +
54 ElementList *list_;
│ │ │ │ +
55 int count_;
│ │ │ │ +
56
│ │ │ │ +
57 public:
│ │ │ │ +
│ │ │ │ +
58 Patch ( ElementList *list, int count )
│ │ │ │ +
59 : list_( list ),
│ │ │ │ +
60 count_( count )
│ │ │ │ +
61 {
│ │ │ │ +
62 assert( count > 0 );
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
65 Element *operator[] ( int i ) const;
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ +
67 int count () const
│ │ │ │ +
68 {
│ │ │ │ +
69 return count_;
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72 template< class LevelProvider >
│ │ │ │ +
73 ElementInfo elementInfo ( int i, const LevelProvider &levelProvider ) const;
│ │ │ │ +
74
│ │ │ │ +
75 int elementType ( int i ) const;
│ │ │ │ +
76 bool hasNeighbor ( int i, int neighbor ) const;
│ │ │ │ +
77 int neighborIndex ( int i, int neighbor ) const;
│ │ │ │ +
78
│ │ │ │ +
79 template< class Functor >
│ │ │ │ +
│ │ │ │ +
80 void forEach ( Functor &functor ) const
│ │ │ │ +
81 {
│ │ │ │ +
82 for( int i = 0; i < count(); ++i )
│ │ │ │ +
83 functor( (*this)[ i ] );
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86 template< int codim, class Functor >
│ │ │ │ +
│ │ │ │ +
87 void forEachInteriorSubChild ( Functor &functor ) const
│ │ │ │ +
88 {
│ │ │ │ + │ │ │ │ +
90 }
│ │ │ │
│ │ │ │ +
91 };
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │
93
│ │ │ │ +
94 template< int dim >
│ │ │ │
│ │ │ │ -
95 bool up2Date () const
│ │ │ │ +
95 inline Element *Patch< dim >::operator[] ( int i ) const
│ │ │ │
96 {
│ │ │ │ -
97 return (marker_[ dimension ] != 0);
│ │ │ │ -
98 }
│ │ │ │ +
97 assert( (i >= 0) && (i < count()) );
│ │ │ │ +
98 return list_[ i ].el_info.el;
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
101
│ │ │ │ +
102 template< int dim >
│ │ │ │ +
103 template< class LevelProvider >
│ │ │ │ +
104 inline typename Patch< dim >::ElementInfo
│ │ │ │ +
│ │ │ │ +
105 Patch< dim >::elementInfo ( int i, const LevelProvider &levelProvider ) const
│ │ │ │ +
106 {
│ │ │ │ +
107 assert( (i >= 0) && (i < count()) );
│ │ │ │ +
108 return ElementInfo::createFake( list_[ i ].el_info );
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
111 template<>
│ │ │ │ +
112 template< class LevelProvider >
│ │ │ │ +
113 inline typename Patch< 2 >::ElementInfo
│ │ │ │ +
│ │ │ │ +
114 Patch< 2 >::elementInfo ( int i, const LevelProvider &levelProvider ) const
│ │ │ │ +
115 {
│ │ │ │ +
116 assert( (i >= 0) && (i < count()) );
│ │ │ │ +
117 const MeshPointer< 2 > &mesh = levelProvider.mesh();
│ │ │ │ +
118 const Element *element = (*this)[ i ];
│ │ │ │ +
119 const int level = levelProvider( element );
│ │ │ │ +
120 return ElementInfo::createFake( mesh, element, level );
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122
│ │ │ │ +
123
│ │ │ │ +
124 template< int dim >
│ │ │ │ +
│ │ │ │ +
125 inline int Patch< dim >::elementType ( int i ) const
│ │ │ │ +
126 {
│ │ │ │ +
127 assert( (i >= 0) && (i < count()) );
│ │ │ │ +
128 return list_[ i ].el_info.el_type;
│ │ │ │ +
129 }
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
131
│ │ │ │ +
132 template< int dim >
│ │ │ │ +
│ │ │ │ +
133 inline bool Patch< dim >::hasNeighbor ( int i, int neighbor ) const
│ │ │ │ +
134 {
│ │ │ │ +
135 return (list_[ i ].neigh[ neighbor ] != NULL);
│ │ │ │ +
136 }
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
138 template< int dim >
│ │ │ │ +
│ │ │ │ +
139 inline int Patch< dim >::neighborIndex ( int i, int neighbor ) const
│ │ │ │ +
140 {
│ │ │ │ +
141 assert( hasNeighbor( i, neighbor ) );
│ │ │ │ +
142 return (list_[ i ].neigh[ neighbor ]->no);
│ │ │ │ +
143 }
│ │ │ │
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ -
101 void print ( std::ostream &out = std::cout ) const;
│ │ │ │ -
102
│ │ │ │ -
103 private:
│ │ │ │ -
104 const DofNumbering &dofNumbering_;
│ │ │ │ -
105 int *marker_[ dimension+1 ];
│ │ │ │ -
106 };
│ │ │ │ -
107
│ │ │ │ -
108
│ │ │ │ -
109
│ │ │ │ -
110 // AlbertaMarkerVector::NoMarkSubEntities
│ │ │ │ -
111 // --------------------------------------
│ │ │ │ -
112
│ │ │ │ -
113 template< int dim, int dimworld >
│ │ │ │ -
114 template< bool >
│ │ │ │ -
115 struct AlbertaMarkerVector< dim, dimworld >::NoMarkSubEntities
│ │ │ │ -
116 {
│ │ │ │ -
117 template< int firstCodim, class Iterator >
│ │ │ │ -
118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering,
│ │ │ │ -
119 [[maybe_unused]] int *(&marker)[ dimension + 1 ],
│ │ │ │ -
120 [[maybe_unused]] const Iterator &begin,
│ │ │ │ -
121 [[maybe_unused]] const Iterator &end )
│ │ │ │ -
122 {}
│ │ │ │ -
123 };
│ │ │ │ -
124
│ │ │ │ -
125
│ │ │ │ -
126
│ │ │ │ -
127 // AlbertaMarkerVector::MarkSubEntities
│ │ │ │ -
128 // ------------------------------------
│ │ │ │ -
129
│ │ │ │ -
130 template< int dim, int dimworld >
│ │ │ │ -
131 template< bool >
│ │ │ │ -
132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities
│ │ │ │ -
133 {
│ │ │ │ -
134 template< int codim >
│ │ │ │ -
│ │ │ │ -
135 struct Codim
│ │ │ │ -
136 {
│ │ │ │ -
137 static const int numSubEntities = Alberta::NumSubEntities< dimension, codim >::value;
│ │ │ │ -
138
│ │ │ │ - │ │ │ │ -
140
│ │ │ │ -
│ │ │ │ -
141 static void apply ( const DofNumbering &dofNumbering,
│ │ │ │ -
142 int *(&marker)[ dimension + 1 ],
│ │ │ │ -
143 const ElementInfo &elementInfo )
│ │ │ │ -
144 {
│ │ │ │ -
145 int *array = marker[ codim ];
│ │ │ │ +
144
│ │ │ │ +
145
│ │ │ │
146
│ │ │ │ -
147 const int index = dofNumbering( elementInfo, 0, 0 );
│ │ │ │ -
148 for( int i = 0; i < numSubEntities; ++i )
│ │ │ │ -
149 {
│ │ │ │ -
150 int &mark = array[ dofNumbering( elementInfo, codim, i ) ];
│ │ │ │ -
151 mark = std::max( index, mark );
│ │ │ │ -
152 }
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154 };
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
156 template< int firstCodim, class Iterator >
│ │ │ │ -
157 static void mark ( const DofNumbering &dofNumbering, int *(&marker)[ dimension + 1 ],
│ │ │ │ -
158 const Iterator &begin, const Iterator &end )
│ │ │ │ -
159 {
│ │ │ │ -
160 for( int codim = firstCodim; codim <= dimension; ++codim )
│ │ │ │ -
161 {
│ │ │ │ -
162 const int size = dofNumbering.size( codim );
│ │ │ │ -
163 marker[ codim ] = new int[ size ];
│ │ │ │ +
147 // ForEachInteriorSubChild
│ │ │ │ +
148 // -----------------------
│ │ │ │ +
149
│ │ │ │ +
150 template< int dim >
│ │ │ │ +
│ │ │ │ +
151 struct ForEachInteriorSubChild< dim, 0 >
│ │ │ │ +
152 {
│ │ │ │ +
153 template< class Functor >
│ │ │ │ +
│ │ │ │ +
154 static void apply ( Functor &functor, const Patch< dim > &patch )
│ │ │ │ +
155 {
│ │ │ │ +
156 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ +
157 {
│ │ │ │ +
158 Element *const father = patch[ i ];
│ │ │ │ +
159 functor( father->child[ 0 ], 0 );
│ │ │ │ +
160 functor( father->child[ 1 ], 0 );
│ │ │ │ +
161 }
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163 };
│ │ │ │ +
│ │ │ │
164
│ │ │ │ -
165 int *array = marker[ codim ];
│ │ │ │ -
166 for( int i = 0; i < size; ++i )
│ │ │ │ -
167 array[ i ] = -1;
│ │ │ │ -
168 }
│ │ │ │ -
169
│ │ │ │ -
170 for( Iterator it = begin; it != end; ++it )
│ │ │ │ -
171 {
│ │ │ │ -
172 const ElementInfo &elementInfo = it->impl().elementInfo();
│ │ │ │ -
173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{},
│ │ │ │ -
174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker, elementInfo ); } );
│ │ │ │ -
175 }
│ │ │ │ -
176 }
│ │ │ │ -
177 };
│ │ │ │ -
178
│ │ │ │ -
179
│ │ │ │ -
180
│ │ │ │ -
181 // AlbertaGridTreeIterator
│ │ │ │ -
182 // -----------------------
│ │ │ │ +
165 template< int dim >
│ │ │ │ +
│ │ │ │ +
166 struct ForEachInteriorSubChild< dim, dim >
│ │ │ │ +
167 {
│ │ │ │ +
168 template< class Functor >
│ │ │ │ +
│ │ │ │ +
169 static void apply ( Functor &functor, const Patch< dim > &patch )
│ │ │ │ +
170 {
│ │ │ │ +
171 functor( patch[ 0 ]->child[ 0 ], dim );
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173 };
│ │ │ │ +
│ │ │ │ +
174
│ │ │ │ +
175 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
177 {
│ │ │ │ +
178 template< class Functor >
│ │ │ │ +
│ │ │ │ +
179 static void apply ( Functor &functor, const Patch< 2 > &patch )
│ │ │ │ +
180 {
│ │ │ │ +
181 // see alberta/src/2d/lagrange_2_2d.c for details
│ │ │ │ +
182 Element *const firstFather = patch[ 0 ];
│ │ │ │
183
│ │ │ │ -
187 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
189 {
│ │ │ │ - │ │ │ │ -
191
│ │ │ │ -
192 public:
│ │ │ │ -
193 static const int dimension = GridImp::dimension;
│ │ │ │ -
194 static const int codimension = codim;
│ │ │ │ -
195 static const int dimensionworld = GridImp::dimensionworld;
│ │ │ │ -
196
│ │ │ │ -
197 private:
│ │ │ │ -
198 friend class AlbertaGrid< dimension, dimensionworld >;
│ │ │ │ -
199
│ │ │ │ -
200 static const int numSubEntities
│ │ │ │ - │ │ │ │ -
202
│ │ │ │ -
203 public:
│ │ │ │ - │ │ │ │ -
205 typedef typename MeshPointer::MacroIterator MacroIterator;
│ │ │ │ +
184 Element *const firstChild = firstFather->child[ 0 ];
│ │ │ │ +
185 functor( firstChild, 0 );
│ │ │ │ +
186 functor( firstChild, 1 );
│ │ │ │ +
187
│ │ │ │ +
188 functor( firstFather->child[ 1 ], 1 );
│ │ │ │ +
189
│ │ │ │ +
190 if( patch.count() > 1 )
│ │ │ │ +
191 {
│ │ │ │ +
192 Element *const father = patch[ 1 ];
│ │ │ │ +
193 functor( father->child[ 0 ], 1 );
│ │ │ │ +
194 }
│ │ │ │ +
195 }
│ │ │ │ +
│ │ │ │ +
196 };
│ │ │ │ +
│ │ │ │ +
197
│ │ │ │ +
198 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
200 {
│ │ │ │ +
201 template< class Functor >
│ │ │ │ +
│ │ │ │ +
202 static void apply ( Functor &functor, const Patch< 3 > &patch )
│ │ │ │ +
203 {
│ │ │ │ +
204 // see alberta/src/3d/lagrange_3_3d.c for details
│ │ │ │ +
205 Element *const firstFather = patch[ 0 ];
│ │ │ │
206
│ │ │ │ -
207 typedef typename GridImp::template Codim< codim >::Entity Entity;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
210 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │ │ +
207 Element *const firstChild = firstFather->child[ 0 ];
│ │ │ │ +
208 functor( firstChild, 0 );
│ │ │ │ +
209 functor( firstChild, 1 );
│ │ │ │ +
210 functor( firstChild, 2 );
│ │ │ │
211
│ │ │ │ - │ │ │ │ -
213
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
212 Element *const secondChild = firstFather->child[ 1 ];
│ │ │ │ +
213 functor( secondChild, 1 );
│ │ │ │ +
214 functor( secondChild, 2 );
│ │ │ │
215
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
218
│ │ │ │ -
│ │ │ │ -
220 This &operator= ( const This &other );
│ │ │ │ -
221
│ │ │ │ -
│ │ │ │ -
223 AlbertaGridTreeIterator ( const GridImp &grid, int travLevel );
│ │ │ │ -
224
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
227 const MarkerVector *marker,
│ │ │ │ -
228 int travLevel );
│ │ │ │ -
229
│ │ │ │ -
│ │ │ │ -
231 bool equals ( const This &other ) const
│ │ │ │ -
232 {
│ │ │ │ -
233 return entity_.impl().equals( other.entity_.impl() );
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ +
216 for( int i = 1; i < patch.count(); ++i )
│ │ │ │ +
217 {
│ │ │ │ +
218 Element *const father = patch[ i ];
│ │ │ │ +
219 const int type = patch.elementType( i );
│ │ │ │ +
220
│ │ │ │ +
221 int lr_set = 0;
│ │ │ │ +
222 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
│ │ │ │ +
223 lr_set |= 1;
│ │ │ │ +
224 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
│ │ │ │ +
225 lr_set |= 2;
│ │ │ │ +
226 assert( lr_set != 0 );
│ │ │ │ +
227
│ │ │ │ +
228 functor( father->child[ 0 ], 0 );
│ │ │ │ +
229 switch( lr_set )
│ │ │ │ +
230 {
│ │ │ │ +
231 case 1 :
│ │ │ │ +
232 functor( father->child[ 0 ], 2 );
│ │ │ │ +
233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) );
│ │ │ │ +
234 break;
│ │ │ │
235
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
238 {
│ │ │ │ -
239 return entity_;
│ │ │ │ -
240 }
│ │ │ │ -
│ │ │ │ -
241
│ │ │ │ -
│ │ │ │ -
243 int level () const
│ │ │ │ -
244 {
│ │ │ │ -
245 return entity_.impl().level();
│ │ │ │ -
246 }
│ │ │ │ -
│ │ │ │ -
247
│ │ │ │ +
236 case 2 :
│ │ │ │ +
237 functor( father->child[ 0 ], 1 );
│ │ │ │ +
238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) );
│ │ │ │ +
239 break;
│ │ │ │ +
240 }
│ │ │ │ +
241 }
│ │ │ │ +
242 }
│ │ │ │ +
│ │ │ │ +
243 };
│ │ │ │ +
│ │ │ │ +
244
│ │ │ │ +
245 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
247 {
│ │ │ │ +
248 template< class Functor >
│ │ │ │
│ │ │ │ -
249 void increment();
│ │ │ │ -
250
│ │ │ │ -
251 protected:
│ │ │ │ -
│ │ │ │ -
253 const GridImp &grid () const
│ │ │ │ -
254 {
│ │ │ │ -
255 return entity_.impl().grid();
│ │ │ │ -
256 }
│ │ │ │ -
│ │ │ │ -
257
│ │ │ │ -
258 private:
│ │ │ │ -
259 void nextElement ( ElementInfo &elementInfo );
│ │ │ │ -
260 void nextElementStop (ElementInfo &elementInfo );
│ │ │ │ -
261 bool stopAtElement ( const ElementInfo &elementInfo ) const;
│ │ │ │ -
262
│ │ │ │ -
263 void goNext ( ElementInfo &elementInfo );
│ │ │ │ -
264 void goNext ( const std::integral_constant< int, 0 > cdVariable,
│ │ │ │ -
265 ElementInfo &elementInfo );
│ │ │ │ -
266 void goNext ( const std::integral_constant< int, 1 > cdVariable,
│ │ │ │ -
267 ElementInfo &elementInfo );
│ │ │ │ -
268 template< int cd >
│ │ │ │ -
269 void goNext ( const std::integral_constant< int, cd > cdVariable,
│ │ │ │ -
270 ElementInfo &elementInfo );
│ │ │ │ +
249 static void apply ( Functor &functor, const Patch< 3 > &patch )
│ │ │ │ +
250 {
│ │ │ │ +
251 // see alberta/src/3d/lagrange_2_3d.c for details
│ │ │ │ +
252 Element *const firstFather = patch[ 0 ];
│ │ │ │ +
253
│ │ │ │ +
254 Element *const firstChild = firstFather->child[ 0 ];
│ │ │ │ +
255 functor( firstChild, 2 );
│ │ │ │ +
256 functor( firstChild, 4 );
│ │ │ │ +
257 functor( firstChild, 5 );
│ │ │ │ +
258
│ │ │ │ +
259 functor( firstFather->child[ 1 ], 2 );
│ │ │ │ +
260
│ │ │ │ +
261 for( int i = 1; i < patch.count(); ++i )
│ │ │ │ +
262 {
│ │ │ │ +
263 Element *const father = patch[ i ];
│ │ │ │ +
264
│ │ │ │ +
265 int lr_set = 0;
│ │ │ │ +
266 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
│ │ │ │ +
267 lr_set = 1;
│ │ │ │ +
268 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
│ │ │ │ +
269 lr_set += 2;
│ │ │ │ +
270 assert( lr_set != 0 );
│ │ │ │
271
│ │ │ │ -
272 mutable Entity entity_;
│ │ │ │ -
273
│ │ │ │ -
275 int level_;
│ │ │ │ -
276
│ │ │ │ -
278 int subEntity_;
│ │ │ │ -
279
│ │ │ │ -
280 MacroIterator macroIterator_;
│ │ │ │ -
281
│ │ │ │ -
282 // knows on which element a point,edge,face is viewed
│ │ │ │ -
283 const MarkerVector *marker_;
│ │ │ │ -
284 };
│ │ │ │ +
272 switch( lr_set )
│ │ │ │ +
273 {
│ │ │ │ +
274 case 1 :
│ │ │ │ +
275 functor( father->child[ 0 ], 4 );
│ │ │ │ +
276 break;
│ │ │ │ +
277
│ │ │ │ +
278 case 2 :
│ │ │ │ +
279 functor( father->child[ 0 ], 5 );
│ │ │ │ +
280 break;
│ │ │ │ +
281 }
│ │ │ │ +
282 }
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
284 };
│ │ │ │ +
│ │ │ │
285
│ │ │ │
286
│ │ │ │
287
│ │ │ │ -
288 // Implementation of AlbertaMarkerVector
│ │ │ │ -
289 // -------------------------------------
│ │ │ │ +
288 // GeometryInFather
│ │ │ │ +
289 // ----------------
│ │ │ │
290
│ │ │ │ -
291 template< int dim, int dimworld >
│ │ │ │ -
292 template< int codim >
│ │ │ │ -
293 inline bool AlbertaMarkerVector< dim, dimworld >
│ │ │ │ -
│ │ │ │ -
294 ::subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const
│ │ │ │ -
295 {
│ │ │ │ -
296 assert( marker_[ codim ] != 0 );
│ │ │ │ -
297
│ │ │ │ -
298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity );
│ │ │ │ -
299 const int markIndex = marker_[ codim ][ subIndex ];
│ │ │ │ -
300 assert( (markIndex >= 0) );
│ │ │ │ -
301
│ │ │ │ -
302 const int index = dofNumbering_( elementInfo, 0, 0 );
│ │ │ │ -
303 return (markIndex == index);
│ │ │ │ -
304 }
│ │ │ │ -
│ │ │ │ -
305
│ │ │ │ -
306
│ │ │ │ -
307 template< int dim, int dimworld >
│ │ │ │ -
308 template< int firstCodim, class Iterator >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
310 ::markSubEntities ( const Iterator &begin, const Iterator &end )
│ │ │ │ -
311 {
│ │ │ │ -
312 clear();
│ │ │ │ -
313 std::conditional< (firstCodim <= dimension), MarkSubEntities<true>, NoMarkSubEntities<false> >::type
│ │ │ │ -
314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin, end );
│ │ │ │ -
315 }
│ │ │ │ -
│ │ │ │ -
316
│ │ │ │ +
291 template< int dim >
│ │ │ │ + │ │ │ │ +
293
│ │ │ │ +
294 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
296 {
│ │ │ │ +
297 static const int dim = 1;
│ │ │ │ +
298
│ │ │ │ +
299 typedef Real LocalVector[ dim ];
│ │ │ │ +
300
│ │ │ │ +
301 static const LocalVector &
│ │ │ │ +
│ │ │ │ +
302 coordinate ( int child, int /* orientation */, int i )
│ │ │ │ +
303 {
│ │ │ │ +
304 static const Real coords[ 2 ][ dim+1 ][ dim ]
│ │ │ │ +
305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } };
│ │ │ │ +
306 assert( (i >= 0) && (i <= dim) );
│ │ │ │ +
307 return coords[ child ][ i ];
│ │ │ │ +
308 }
│ │ │ │ +
│ │ │ │ +
309 };
│ │ │ │ +
│ │ │ │ +
310
│ │ │ │ +
311 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
313 {
│ │ │ │ +
314 static const int dim = 2;
│ │ │ │ +
315
│ │ │ │ +
316 typedef Real LocalVector[ dim ];
│ │ │ │
317
│ │ │ │ -
318 template< int dim, int dimworld >
│ │ │ │ +
318 static const LocalVector &
│ │ │ │
│ │ │ │ -
319 inline void AlbertaMarkerVector< dim, dimworld >::print ( std::ostream &out ) const
│ │ │ │ -
320 {
│ │ │ │ -
321 for( int codim = 1; codim <= dimension; ++codim )
│ │ │ │ -
322 {
│ │ │ │ -
323 int *marker = marker_[ codim ];
│ │ │ │ -
324 if( marker != 0 )
│ │ │ │ -
325 {
│ │ │ │ -
326 const int size = dofNumbering_.size( codim );
│ │ │ │ -
327 out << std::endl;
│ │ │ │ -
328 out << "Codimension " << codim << " (" << size << " entries)" << std::endl;
│ │ │ │ -
329 for( int i = 0; i < size; ++i )
│ │ │ │ -
330 out << "subentity " << i << " visited on Element " << marker[ i ] << std::endl;
│ │ │ │ -
331 }
│ │ │ │ -
332 }
│ │ │ │ -
333 }
│ │ │ │ -
│ │ │ │ -
334
│ │ │ │ +
319 coordinate ( int child, int /* orientation */, int i )
│ │ │ │ +
320 {
│ │ │ │ +
321 static const Real coords[ 2 ][ dim+1 ][ dim ]
│ │ │ │ +
322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} },
│ │ │ │ +
323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } };
│ │ │ │ +
324 assert( (i >= 0) && (i <= dim) );
│ │ │ │ +
325 return coords[ child ][ i ];
│ │ │ │ +
326 }
│ │ │ │ +
│ │ │ │ +
327 };
│ │ │ │ +
│ │ │ │ +
328
│ │ │ │ +
329 template<>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
331 {
│ │ │ │ +
332 static const int dim = 3;
│ │ │ │ +
333
│ │ │ │ +
334 typedef Real LocalVector[ dim ];
│ │ │ │
335
│ │ │ │ -
336
│ │ │ │ -
337 // Implementation of AlbertaGridTreeIterator
│ │ │ │ -
338 // -----------------------------------------
│ │ │ │ -
339
│ │ │ │ -
340 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
343 : entity_(),
│ │ │ │ -
344 level_( -1 ),
│ │ │ │ -
345 subEntity_( -1 ),
│ │ │ │ -
346 macroIterator_(),
│ │ │ │ -
347 marker_( NULL )
│ │ │ │ -
348 {}
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
350 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
352 ::AlbertaGridTreeIterator ( const GridImp &grid,
│ │ │ │ -
353 const MarkerVector *marker,
│ │ │ │ -
354 int travLevel )
│ │ │ │ -
355 : entity_( EntityImp( grid ) ),
│ │ │ │ -
356 level_( travLevel ),
│ │ │ │ -
357 subEntity_( (codim == 0 ? 0 : -1) ),
│ │ │ │ -
358 macroIterator_( grid.meshPointer().begin() ),
│ │ │ │ -
359 marker_( marker )
│ │ │ │ -
360 {
│ │ │ │ -
361 ElementInfo elementInfo = *macroIterator_;
│ │ │ │ -
362 nextElementStop( elementInfo );
│ │ │ │ -
363 if( codim > 0 )
│ │ │ │ -
364 goNext( elementInfo );
│ │ │ │ -
365 // it is ok to set the invalid ElementInfo
│ │ │ │ -
366 entity_.impl().setElement( elementInfo, subEntity_ );
│ │ │ │ -
367 }
│ │ │ │ -
│ │ │ │ -
368
│ │ │ │ -
369
│ │ │ │ -
370 // Make LevelIterator with point to element from previous iterations
│ │ │ │ -
371 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
373 ::AlbertaGridTreeIterator ( const GridImp &grid,
│ │ │ │ -
374 int travLevel )
│ │ │ │ -
375 : entity_( EntityImp( grid ) ),
│ │ │ │ -
376 level_( travLevel ),
│ │ │ │ -
377 subEntity_( -1 ),
│ │ │ │ -
378 macroIterator_( grid.meshPointer().end() ),
│ │ │ │ -
379 marker_( 0 )
│ │ │ │ -
380 {}
│ │ │ │ -
│ │ │ │ -
381
│ │ │ │ -
382
│ │ │ │ -
383 // Make LevelIterator with point to element from previous iterations
│ │ │ │ -
384 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
387 : entity_( other.entity_ ),
│ │ │ │ -
388 level_( other.level_ ),
│ │ │ │ -
389 subEntity_( other.subEntity_ ),
│ │ │ │ -
390 macroIterator_( other.macroIterator_ ),
│ │ │ │ -
391 marker_( other.marker_ )
│ │ │ │ -
392 {}
│ │ │ │ -
│ │ │ │ -
393
│ │ │ │ -
394
│ │ │ │ -
395 // Make LevelIterator with point to element from previous iterations
│ │ │ │ -
396 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
399 {
│ │ │ │ -
400 entity_ = other.entity_;
│ │ │ │ -
401 level_ = other.level_;
│ │ │ │ -
402 subEntity_ = other.subEntity_;
│ │ │ │ -
403 macroIterator_ = other.macroIterator_;
│ │ │ │ -
404 marker_ = other.marker_;
│ │ │ │ -
405
│ │ │ │ -
406 return *this;
│ │ │ │ -
407 }
│ │ │ │ -
│ │ │ │ -
408
│ │ │ │ -
409
│ │ │ │ -
410 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
412 {
│ │ │ │ -
413 ElementInfo elementInfo = entity_.impl().elementInfo_;
│ │ │ │ -
414 goNext ( elementInfo );
│ │ │ │ -
415 // it is ok to set the invalid ElementInfo
│ │ │ │ -
416 entity_.impl().setElement( elementInfo, subEntity_ );
│ │ │ │ -
417 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
418
│ │ │ │ -
419
│ │ │ │ -
420 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ - │ │ │ │ -
422 ::nextElement ( ElementInfo &elementInfo )
│ │ │ │ -
423 {
│ │ │ │ -
424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) )
│ │ │ │ -
425 {
│ │ │ │ -
426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) )
│ │ │ │ -
427 elementInfo = elementInfo.father();
│ │ │ │ -
428 if( elementInfo.level() == 0 )
│ │ │ │ -
429 {
│ │ │ │ -
430 ++macroIterator_;
│ │ │ │ -
431 elementInfo = *macroIterator_;
│ │ │ │ -
432 }
│ │ │ │ -
433 else
│ │ │ │ -
434 elementInfo = elementInfo.father().child( 1 );
│ │ │ │ -
435 }
│ │ │ │ -
436 else
│ │ │ │ -
437 elementInfo = elementInfo.child( 0 );
│ │ │ │ -
438 }
│ │ │ │ -
439
│ │ │ │ -
440
│ │ │ │ -
441 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ -
443 ::nextElementStop ( ElementInfo &elementInfo )
│ │ │ │ -
444 {
│ │ │ │ -
445 while( !(!elementInfo || stopAtElement( elementInfo )) )
│ │ │ │ -
446 nextElement( elementInfo );
│ │ │ │ -
447 }
│ │ │ │ -
448
│ │ │ │ -
449
│ │ │ │ -
450 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ -
452 ::stopAtElement ( const ElementInfo &elementInfo ) const
│ │ │ │ -
453 {
│ │ │ │ -
454 if( !elementInfo )
│ │ │ │ -
455 return true;
│ │ │ │ -
456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level()));
│ │ │ │ -
457 }
│ │ │ │ -
458
│ │ │ │ -
459
│ │ │ │ -
460 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ -
462 ::goNext ( ElementInfo &elementInfo )
│ │ │ │ -
463 {
│ │ │ │ -
464 std::integral_constant< int, codim > codimVariable;
│ │ │ │ -
465 goNext( codimVariable, elementInfo );
│ │ │ │ -
466 }
│ │ │ │ -
467
│ │ │ │ -
468 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ -
470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */,
│ │ │ │ -
471 ElementInfo &elementInfo )
│ │ │ │ -
472 {
│ │ │ │ -
473 assert( stopAtElement( elementInfo ) );
│ │ │ │ -
474
│ │ │ │ -
475 nextElement( elementInfo );
│ │ │ │ -
476 nextElementStop( elementInfo );
│ │ │ │ -
477 }
│ │ │ │ -
478
│ │ │ │ -
479 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ -
481 ::goNext ( const std::integral_constant< int, 1 > cdVariable,
│ │ │ │ -
482 ElementInfo &elementInfo )
│ │ │ │ -
483 {
│ │ │ │ -
484 assert( stopAtElement( elementInfo ) );
│ │ │ │ -
485
│ │ │ │ -
486 ++subEntity_;
│ │ │ │ -
487 if( subEntity_ >= numSubEntities )
│ │ │ │ -
488 {
│ │ │ │ -
489 subEntity_ = 0;
│ │ │ │ -
490 nextElement( elementInfo );
│ │ │ │ -
491 nextElementStop( elementInfo );
│ │ │ │ -
492 if( !elementInfo )
│ │ │ │ -
493 return;
│ │ │ │ -
494 }
│ │ │ │ -
495
│ │ │ │ -
496 if( leafIterator )
│ │ │ │ -
497 {
│ │ │ │ -
498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ : subEntity_);
│ │ │ │ -
499
│ │ │ │ -
500 const ALBERTA EL *neighbor = elementInfo.elInfo().neigh[ face ];
│ │ │ │ -
501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) )
│ │ │ │ -
502 {
│ │ │ │ -
503 // face is reached from element with largest number
│ │ │ │ -
504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 );
│ │ │ │ -
505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 );
│ │ │ │ -
506 if( elIndex < nbIndex )
│ │ │ │ -
507 goNext( cdVariable, elementInfo );
│ │ │ │ -
508 }
│ │ │ │ -
509 // uncomment this assertion only if codimension 1 entities are marked
│ │ │ │ -
510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) );
│ │ │ │ -
511 }
│ │ │ │ -
512 else
│ │ │ │ -
513 {
│ │ │ │ -
514 assert( marker_ != 0 );
│ │ │ │ -
515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) )
│ │ │ │ -
516 goNext( cdVariable, elementInfo );
│ │ │ │ -
517 }
│ │ │ │ -
518 }
│ │ │ │ -
519
│ │ │ │ -
520 template< int codim, class GridImp, bool leafIterator >
│ │ │ │ -
521 template< int cd >
│ │ │ │ -
522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
│ │ │ │ -
523 ::goNext ( const std::integral_constant< int, cd > cdVariable,
│ │ │ │ -
524 ElementInfo &elementInfo )
│ │ │ │ -
525 {
│ │ │ │ -
526 assert( stopAtElement( elementInfo ) );
│ │ │ │ -
527
│ │ │ │ -
528 ++subEntity_;
│ │ │ │ -
529 if( subEntity_ >= numSubEntities )
│ │ │ │ -
530 {
│ │ │ │ -
531 subEntity_ = 0;
│ │ │ │ -
532 nextElement( elementInfo );
│ │ │ │ -
533 nextElementStop( elementInfo );
│ │ │ │ -
534 if( !elementInfo )
│ │ │ │ -
535 return;
│ │ │ │ -
536 }
│ │ │ │ -
537
│ │ │ │ -
538 assert( marker_ != 0 );
│ │ │ │ -
539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ ) )
│ │ │ │ -
540 goNext( cdVariable, elementInfo );
│ │ │ │ -
541 }
│ │ │ │ -
542
│ │ │ │ -
543}
│ │ │ │ -
544
│ │ │ │ -
545#endif // #if HAVE_ALBERTA
│ │ │ │ -
546
│ │ │ │ -
547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
336 static const LocalVector &
│ │ │ │ +
│ │ │ │ +
337 coordinate ( int child, int orientation, int i )
│ │ │ │ +
338 {
│ │ │ │ +
339 static const Real coords[ 2 ][ dim+1 ][ dim ]
│ │ │ │ +
340 = { { {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} },
│ │ │ │ +
341 { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} } };
│ │ │ │ +
342 static const int flip[ 2 ][ 2 ][ dim+1 ]
│ │ │ │ +
343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } };
│ │ │ │ +
344 assert( (i >= 0) && (i <= dim) );
│ │ │ │ +
345 i = flip[ child ][ orientation ][ i ];
│ │ │ │ +
346 return coords[ child ][ i ];
│ │ │ │ +
347 }
│ │ │ │
│ │ │ │ +
348 };
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
349
│ │ │ │ +
350 }
│ │ │ │ +
351
│ │ │ │ +
352}
│ │ │ │ +
353
│ │ │ │ +
354#endif // #if HAVE_ALBERTA
│ │ │ │ +
355
│ │ │ │ +
356#endif
│ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ - │ │ │ │ -
static const int dimension
Definition agrid.hh:145
│ │ │ │ - │ │ │ │ - │ │ │ │ -
int size(int codim) const
Definition dofadmin.hh:163
│ │ │ │ +
ALBERTA REAL_B LocalVector
Definition misc.hh:49
│ │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
Definition meshpointer.hh:40
│ │ │ │ │ │ │ │ -
Definition treeiterator.hh:189
│ │ │ │ -
bool equals(const This &other) const
equality
Definition treeiterator.hh:231
│ │ │ │ -
MakeableInterfaceObject< Entity > EntityObject
Definition treeiterator.hh:208
│ │ │ │ -
Alberta::MeshPointer< dimension > MeshPointer
Definition treeiterator.hh:204
│ │ │ │ -
AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int travLevel)
Constructor making begin iterator.
Definition treeiterator.hh:352
│ │ │ │ -
AlbertaGridTreeIterator(const GridImp &grid, int travLevel)
Constructor making end iterator.
Definition treeiterator.hh:373
│ │ │ │ -
EntityObject::ImplementationType EntityImp
Definition treeiterator.hh:209
│ │ │ │ -
static const int codimension
Definition treeiterator.hh:194
│ │ │ │ -
MeshPointer::MacroIterator MacroIterator
Definition treeiterator.hh:205
│ │ │ │ -
This & operator=(const This &other)
Constructor making end iterator.
Definition treeiterator.hh:398
│ │ │ │ -
Entity & dereference() const
dereferencing
Definition treeiterator.hh:237
│ │ │ │ -
AlbertaMarkerVector< dimension, dimensionworld > MarkerVector
Definition treeiterator.hh:212
│ │ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ │ -
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ │ -
static const int dimensionworld
Definition treeiterator.hh:195
│ │ │ │ -
AlbertaGridTreeIterator()
Definition treeiterator.hh:342
│ │ │ │ -
void increment()
increment
Definition treeiterator.hh:411
│ │ │ │ -
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ │ -
static const int dimension
Definition treeiterator.hh:193
│ │ │ │ -
AlbertaGridTreeIterator(const This &other)
Constructor making end iterator.
Definition treeiterator.hh:386
│ │ │ │ -
EntityImp::ElementInfo ElementInfo
Definition treeiterator.hh:210
│ │ │ │ -
Definition misc.hh:148
│ │ │ │ -
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ │ -
AlbertaMarkerVector(const DofNumbering &dofNumbering)
create AlbertaMarkerVector with empty vectors
Definition treeiterator.hh:54
│ │ │ │ -
bool up2Date() const
return true if marking is up to date
Definition treeiterator.hh:95
│ │ │ │ -
bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const
visit subentity on this element?
Definition treeiterator.hh:294
│ │ │ │ -
void markSubEntities(const Iterator &begin, const Iterator &end)
Definition treeiterator.hh:310
│ │ │ │ -
~AlbertaMarkerVector()
Definition treeiterator.hh:68
│ │ │ │ -
void clear()
Definition treeiterator.hh:84
│ │ │ │ -
AlbertaMarkerVector(const This &other)
Definition treeiterator.hh:61
│ │ │ │ -
void print(std::ostream &out=std::cout) const
print for debugin' only
Definition treeiterator.hh:319
│ │ │ │ - │ │ │ │ -
Alberta::ElementInfo< dimension > ElementInfo
Definition treeiterator.hh:139
│ │ │ │ -
static void apply(const DofNumbering &dofNumbering, int *(&marker)[dimension+1], const ElementInfo &elementInfo)
Definition treeiterator.hh:141
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ - │ │ │ │ -
InterfaceType::Implementation ImplementationType
Definition common/grid.hh:1108
│ │ │ │ +
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Definition elementinfo.hh:752
│ │ │ │ +
Definition refinement.hh:31
│ │ │ │ +
Definition refinement.hh:40
│ │ │ │ +
int neighborIndex(int i, int neighbor) const
Definition refinement.hh:139
│ │ │ │ +
int elementType(int i) const
Definition refinement.hh:125
│ │ │ │ +
int count() const
Definition refinement.hh:67
│ │ │ │ +
ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const
Definition refinement.hh:105
│ │ │ │ +
void forEach(Functor &functor) const
Definition refinement.hh:80
│ │ │ │ +
Element * operator[](int i) const
Definition refinement.hh:95
│ │ │ │ +
void forEachInteriorSubChild(Functor &functor) const
Definition refinement.hh:87
│ │ │ │ +
static const int dimension
Definition refinement.hh:47
│ │ │ │ +
bool hasNeighbor(int i, int neighbor) const
Definition refinement.hh:133
│ │ │ │ +
Patch(ElementList *list, int count)
Definition refinement.hh:58
│ │ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition refinement.hh:49
│ │ │ │ +
ALBERTA RC_LIST_EL ElementList
Definition refinement.hh:51
│ │ │ │ +
static void apply(Functor &functor, const Patch< dim > &patch)
Definition refinement.hh:154
│ │ │ │ +
static void apply(Functor &functor, const Patch< dim > &patch)
Definition refinement.hh:169
│ │ │ │ +
static void apply(Functor &functor, const Patch< 2 > &patch)
Definition refinement.hh:179
│ │ │ │ +
static void apply(Functor &functor, const Patch< 3 > &patch)
Definition refinement.hh:202
│ │ │ │ +
static void apply(Functor &functor, const Patch< 3 > &patch)
Definition refinement.hh:249
│ │ │ │ +
Definition refinement.hh:292
│ │ │ │ +
static const LocalVector & coordinate(int child, int, int i)
Definition refinement.hh:302
│ │ │ │ +
static const LocalVector & coordinate(int child, int, int i)
Definition refinement.hh:319
│ │ │ │ +
static const LocalVector & coordinate(int child, int orientation, int i)
Definition refinement.hh:337
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,690 +1,454 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -treeiterator.hh │ │ │ │ │ +refinement.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ -7#define DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ -16 │ │ │ │ │ -17#if HAVE_ALBERTA │ │ │ │ │ +5#ifndef DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ │ +6#define DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ │ +7 │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ │ 18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 │ │ │ │ │ -22 // AlbertaMarkerVector │ │ │ │ │ -23 // ------------------- │ │ │ │ │ -24 │ │ │ │ │ -33 template< int dim, int dimworld > │ │ │ │ │ -_3_4 class _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -35 { │ │ │ │ │ -36 typedef _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> _T_h_i_s; │ │ │ │ │ +19#if HAVE_ALBERTA │ │ │ │ │ +20 │ │ │ │ │ +21namespace _D_u_n_e │ │ │ │ │ +22{ │ │ │ │ │ +23 │ │ │ │ │ +24 namespace Alberta │ │ │ │ │ +25 { │ │ │ │ │ +26 │ │ │ │ │ +27 // Internal Forward Declarations │ │ │ │ │ +28 // ----------------------------- │ │ │ │ │ +29 │ │ │ │ │ +30 template< int dim, int codim > │ │ │ │ │ +_3_1 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d; │ │ │ │ │ +32 │ │ │ │ │ +33 │ │ │ │ │ +34 │ │ │ │ │ +35 // Patch │ │ │ │ │ +36 // ----- │ │ │ │ │ 37 │ │ │ │ │ -38 typedef _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> _G_r_i_d; │ │ │ │ │ -39 │ │ │ │ │ -40 //friend class AlbertaGrid< dim, dimworld >; │ │ │ │ │ -41 │ │ │ │ │ -42 static const int dimension = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -43 │ │ │ │ │ -44 typedef _A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ │ -45 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -46 │ │ │ │ │ -47 template< bool > │ │ │ │ │ -48 struct NoMarkSubEntities; │ │ │ │ │ -49 template< bool > │ │ │ │ │ -50 struct MarkSubEntities; │ │ │ │ │ -51 │ │ │ │ │ -52 public: │ │ │ │ │ -_5_4 explicit _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering ) │ │ │ │ │ -55 : dofNumbering_( dofNumbering ) │ │ │ │ │ -56 { │ │ │ │ │ -57 for( int codim = 0; codim <= dimension; ++codim ) │ │ │ │ │ -58 marker_[ codim ] = 0; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_1 _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r ( const _T_h_i_s &other ) │ │ │ │ │ -62 : dofNumbering_( other.dofNumbering_ ) │ │ │ │ │ -63 { │ │ │ │ │ -64 for( int codim = 0; codim <= dimension; ++codim ) │ │ │ │ │ -65 marker_[ codim ] = 0; │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 _~_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r () │ │ │ │ │ -69 { │ │ │ │ │ -70 _c_l_e_a_r(); │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 private: │ │ │ │ │ -74 This &operator= ( const This & ); │ │ │ │ │ -75 │ │ │ │ │ -76 public: │ │ │ │ │ -78 template< int codim > │ │ │ │ │ -_7_9 bool _s_u_b_E_n_t_i_t_y_O_n_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) │ │ │ │ │ -const; │ │ │ │ │ -80 │ │ │ │ │ -81 template< int firstCodim, class Iterator > │ │ │ │ │ -_8_2 void _m_a_r_k_S_u_b_E_n_t_i_t_i_e_s ( const Iterator &begin, const Iterator &end ); │ │ │ │ │ -83 │ │ │ │ │ -_8_4 void _c_l_e_a_r () │ │ │ │ │ -85 { │ │ │ │ │ -86 for( int codim = 0; codim <= dimension; ++codim ) │ │ │ │ │ -87 { │ │ │ │ │ -88 if( marker_[ codim ] != 0 ) │ │ │ │ │ -89 delete[] marker_[ codim ]; │ │ │ │ │ -90 marker_[ codim ] = 0; │ │ │ │ │ -91 } │ │ │ │ │ -92 } │ │ │ │ │ +38 template< int dim > │ │ │ │ │ +_3_9 class _P_a_t_c_h │ │ │ │ │ +40 { │ │ │ │ │ +41 typedef _P_a_t_c_h_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ +42 │ │ │ │ │ +43 static_assert(((dim >= 1) && (dim <= 3)), │ │ │ │ │ +44 "Alberta supports only dimensions 1, 2, 3"); │ │ │ │ │ +45 │ │ │ │ │ +46 public: │ │ │ │ │ +_4_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +48 │ │ │ │ │ +_4_9 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +50 │ │ │ │ │ +_5_1 typedef _A_L_B_E_R_T_A RC_LIST_EL _E_l_e_m_e_n_t_L_i_s_t; │ │ │ │ │ +52 │ │ │ │ │ +53 private: │ │ │ │ │ +54 _E_l_e_m_e_n_t_L_i_s_t *list_; │ │ │ │ │ +55 int count_; │ │ │ │ │ +56 │ │ │ │ │ +57 public: │ │ │ │ │ +_5_8 _P_a_t_c_h ( _E_l_e_m_e_n_t_L_i_s_t *list, int _c_o_u_n_t ) │ │ │ │ │ +59 : list_( list ), │ │ │ │ │ +60 count_( _c_o_u_n_t ) │ │ │ │ │ +61 { │ │ │ │ │ +62 assert( _c_o_u_n_t > 0 ); │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +65 _E_l_e_m_e_n_t *_o_p_e_r_a_t_o_r_[_]_ ( int i ) const; │ │ │ │ │ +66 │ │ │ │ │ +_6_7 int _c_o_u_n_t () const │ │ │ │ │ +68 { │ │ │ │ │ +69 return count_; │ │ │ │ │ +70 } │ │ │ │ │ +71 │ │ │ │ │ +72 template< class LevelProvider > │ │ │ │ │ +73 _E_l_e_m_e_n_t_I_n_f_o _e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) const; │ │ │ │ │ +74 │ │ │ │ │ +75 int _e_l_e_m_e_n_t_T_y_p_e ( int i ) const; │ │ │ │ │ +76 bool _h_a_s_N_e_i_g_h_b_o_r ( int i, int neighbor ) const; │ │ │ │ │ +77 int _n_e_i_g_h_b_o_r_I_n_d_e_x ( int i, int neighbor ) const; │ │ │ │ │ +78 │ │ │ │ │ +79 template< class Functor > │ │ │ │ │ +_8_0 void _f_o_r_E_a_c_h ( Functor &functor ) const │ │ │ │ │ +81 { │ │ │ │ │ +82 for( int i = 0; i < _c_o_u_n_t(); ++i ) │ │ │ │ │ +83 functor( (*this)[ i ] ); │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +86 template< int codim, class Functor > │ │ │ │ │ +_8_7 void _f_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d ( Functor &functor ) const │ │ │ │ │ +88 { │ │ │ │ │ +89 _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_a_p_p_l_y( functor, *this ); │ │ │ │ │ +90 } │ │ │ │ │ +91 }; │ │ │ │ │ +92 │ │ │ │ │ 93 │ │ │ │ │ -_9_5 bool _u_p_2_D_a_t_e () const │ │ │ │ │ +94 template< int dim > │ │ │ │ │ +_9_5 inline _E_l_e_m_e_n_t *_P_a_t_c_h_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_[_]_ ( int i ) const │ │ │ │ │ 96 { │ │ │ │ │ -97 return (marker_[ dimension ] != 0); │ │ │ │ │ -98 } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_1 void _p_r_i_n_t ( std::ostream &out = std::cout ) const; │ │ │ │ │ -102 │ │ │ │ │ -103 private: │ │ │ │ │ -104 const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering_; │ │ │ │ │ -105 int *marker_[ dimension+1 ]; │ │ │ │ │ -106 }; │ │ │ │ │ -107 │ │ │ │ │ -108 │ │ │ │ │ -109 │ │ │ │ │ -110 // AlbertaMarkerVector::NoMarkSubEntities │ │ │ │ │ -111 // -------------------------------------- │ │ │ │ │ -112 │ │ │ │ │ -113 template< int dim, int dimworld > │ │ │ │ │ -114 template< bool > │ │ │ │ │ -115 struct _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r< dim, dimworld >::NoMarkSubEntities │ │ │ │ │ -116 { │ │ │ │ │ -117 template< int firstCodim, class Iterator > │ │ │ │ │ -118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering, │ │ │ │ │ -119 [[maybe_unused]] int *(&marker)[ dimension + 1 ], │ │ │ │ │ -120 [[maybe_unused]] const Iterator &begin, │ │ │ │ │ -121 [[maybe_unused]] const Iterator &end ) │ │ │ │ │ -122 {} │ │ │ │ │ -123 }; │ │ │ │ │ -124 │ │ │ │ │ -125 │ │ │ │ │ -126 │ │ │ │ │ -127 // AlbertaMarkerVector::MarkSubEntities │ │ │ │ │ -128 // ------------------------------------ │ │ │ │ │ -129 │ │ │ │ │ -130 template< int dim, int dimworld > │ │ │ │ │ -131 template< bool > │ │ │ │ │ -132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities │ │ │ │ │ -133 { │ │ │ │ │ -134 template< int codim > │ │ │ │ │ -_1_3_5 struct _C_o_d_i_m │ │ │ │ │ -136 { │ │ │ │ │ -_1_3_7 static const int numSubEntities = _A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _c_o_d_i_m │ │ │ │ │ -_>_:_:_v_a_l_u_e; │ │ │ │ │ -138 │ │ │ │ │ -_1_3_9 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ -140 │ │ │ │ │ -_1_4_1 static void _a_p_p_l_y ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering, │ │ │ │ │ -142 int *(&_m_a_r_k_e_r)[ dimension + 1 ], │ │ │ │ │ -143 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) │ │ │ │ │ -144 { │ │ │ │ │ -145 int *array = _m_a_r_k_e_r[ _c_o_d_i_m ]; │ │ │ │ │ +97 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ +98 return list_[ i ].el_info.el; │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +101 │ │ │ │ │ +102 template< int dim > │ │ │ │ │ +103 template< class LevelProvider > │ │ │ │ │ +104 inline typename _P_a_t_c_h_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +_1_0_5 _P_a_t_c_h_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) │ │ │ │ │ +const │ │ │ │ │ +106 { │ │ │ │ │ +107 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ +108 return _E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e( list_[ i ].el_info ); │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +111 template<> │ │ │ │ │ +112 template< class LevelProvider > │ │ │ │ │ +113 inline typename _P_a_t_c_h_<_ _2_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +_1_1_4 _P_a_t_c_h_<_ _2_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) const │ │ │ │ │ +115 { │ │ │ │ │ +116 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ +117 const _M_e_s_h_P_o_i_n_t_e_r_<_ _2_ _> &mesh = levelProvider.mesh(); │ │ │ │ │ +118 const _E_l_e_m_e_n_t *element = (*this)[ i ]; │ │ │ │ │ +119 const int level = levelProvider( element ); │ │ │ │ │ +120 return _E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e( mesh, element, level ); │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +123 │ │ │ │ │ +124 template< int dim > │ │ │ │ │ +_1_2_5 inline int _P_a_t_c_h_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t_T_y_p_e ( int i ) const │ │ │ │ │ +126 { │ │ │ │ │ +127 assert( (i >= 0) && (i < count()) ); │ │ │ │ │ +128 return list_[ i ].el_info.el_type; │ │ │ │ │ +129 } │ │ │ │ │ +130 │ │ │ │ │ +131 │ │ │ │ │ +132 template< int dim > │ │ │ │ │ +_1_3_3 inline bool _P_a_t_c_h_<_ _d_i_m_ _>_:_:_h_a_s_N_e_i_g_h_b_o_r ( int i, int neighbor ) const │ │ │ │ │ +134 { │ │ │ │ │ +135 return (list_[ i ].neigh[ neighbor ] != NULL); │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 template< int dim > │ │ │ │ │ +_1_3_9 inline int _P_a_t_c_h_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r_I_n_d_e_x ( int i, int neighbor ) const │ │ │ │ │ +140 { │ │ │ │ │ +141 assert( hasNeighbor( i, neighbor ) ); │ │ │ │ │ +142 return (list_[ i ].neigh[ neighbor ]->no); │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +145 │ │ │ │ │ 146 │ │ │ │ │ -147 const int index = dofNumbering( elementInfo, 0, 0 ); │ │ │ │ │ -148 for( int i = 0; i < numSubEntities; ++i ) │ │ │ │ │ -149 { │ │ │ │ │ -150 int &mark = array[ dofNumbering( elementInfo, _c_o_d_i_m, i ) ]; │ │ │ │ │ -151 mark = std::max( index, mark ); │ │ │ │ │ -152 } │ │ │ │ │ -153 } │ │ │ │ │ -154 }; │ │ │ │ │ -155 │ │ │ │ │ -156 template< int firstCodim, class Iterator > │ │ │ │ │ -157 static void mark ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering, int *(&marker) │ │ │ │ │ -[ dimension + 1 ], │ │ │ │ │ -158 const Iterator &begin, const Iterator &end ) │ │ │ │ │ -159 { │ │ │ │ │ -160 for( int codim = firstCodim; codim <= dimension; ++codim ) │ │ │ │ │ -161 { │ │ │ │ │ -162 const int size = dofNumbering._s_i_z_e( codim ); │ │ │ │ │ -163 marker[ codim ] = new int[ size ]; │ │ │ │ │ +147 // ForEachInteriorSubChild │ │ │ │ │ +148 // ----------------------- │ │ │ │ │ +149 │ │ │ │ │ +150 template< int dim > │ │ │ │ │ +_1_5_1 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< dim, 0 > │ │ │ │ │ +152 { │ │ │ │ │ +153 template< class Functor > │ │ │ │ │ +_1_5_4 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _d_i_m_ _> &patch ) │ │ │ │ │ +155 { │ │ │ │ │ +156 for( int i = 0; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ +157 { │ │ │ │ │ +158 _E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ +159 functor( father->child[ 0 ], 0 ); │ │ │ │ │ +160 functor( father->child[ 1 ], 0 ); │ │ │ │ │ +161 } │ │ │ │ │ +162 } │ │ │ │ │ +163 }; │ │ │ │ │ 164 │ │ │ │ │ -165 int *array = marker[ codim ]; │ │ │ │ │ -166 for( int i = 0; i < size; ++i ) │ │ │ │ │ -167 array[ i ] = -1; │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -170 for( Iterator it = begin; it != end; ++it ) │ │ │ │ │ -171 { │ │ │ │ │ -172 const ElementInfo &elementInfo = it->impl().elementInfo(); │ │ │ │ │ -173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{}, │ │ │ │ │ -174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker, │ │ │ │ │ -elementInfo ); } ); │ │ │ │ │ -175 } │ │ │ │ │ -176 } │ │ │ │ │ -177 }; │ │ │ │ │ -178 │ │ │ │ │ -179 │ │ │ │ │ -180 │ │ │ │ │ -181 // AlbertaGridTreeIterator │ │ │ │ │ -182 // ----------------------- │ │ │ │ │ +165 template< int dim > │ │ │ │ │ +_1_6_6 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< dim, dim > │ │ │ │ │ +167 { │ │ │ │ │ +168 template< class Functor > │ │ │ │ │ +_1_6_9 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _d_i_m_ _> &patch ) │ │ │ │ │ +170 { │ │ │ │ │ +171 functor( patch[ 0 ]->child[ 0 ], dim ); │ │ │ │ │ +172 } │ │ │ │ │ +173 }; │ │ │ │ │ +174 │ │ │ │ │ +175 template<> │ │ │ │ │ +_1_7_6 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< 2, 1 > │ │ │ │ │ +177 { │ │ │ │ │ +178 template< class Functor > │ │ │ │ │ +_1_7_9 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _2_ _> &patch ) │ │ │ │ │ +180 { │ │ │ │ │ +181 // see alberta/src/2d/lagrange_2_2d.c for details │ │ │ │ │ +182 _E_l_e_m_e_n_t *const firstFather = patch[ 0 ]; │ │ │ │ │ 183 │ │ │ │ │ -187 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -_1_8_8 class _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -189 { │ │ │ │ │ -190 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> _T_h_i_s; │ │ │ │ │ -191 │ │ │ │ │ -192 public: │ │ │ │ │ -_1_9_3 static const int _d_i_m_e_n_s_i_o_n = GridImp::dimension; │ │ │ │ │ -_1_9_4 static const int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ -_1_9_5 static const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d = GridImp::dimensionworld; │ │ │ │ │ -196 │ │ │ │ │ -197 private: │ │ │ │ │ -198 friend class _A_l_b_e_r_t_a_G_r_i_d< _d_i_m_e_n_s_i_o_n, _d_i_m_e_n_s_i_o_n_w_o_r_l_d >; │ │ │ │ │ -199 │ │ │ │ │ -200 static const int numSubEntities │ │ │ │ │ -201 = _A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_v_a_l_u_e; │ │ │ │ │ -202 │ │ │ │ │ -203 public: │ │ │ │ │ -_2_0_4 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ -_2_0_5 typedef typename MeshPointer::MacroIterator _M_a_c_r_o_I_t_e_r_a_t_o_r; │ │ │ │ │ +184 _E_l_e_m_e_n_t *const firstChild = firstFather->child[ 0 ]; │ │ │ │ │ +185 functor( firstChild, 0 ); │ │ │ │ │ +186 functor( firstChild, 1 ); │ │ │ │ │ +187 │ │ │ │ │ +188 functor( firstFather->child[ 1 ], 1 ); │ │ │ │ │ +189 │ │ │ │ │ +190 if( patch._c_o_u_n_t() > 1 ) │ │ │ │ │ +191 { │ │ │ │ │ +192 _E_l_e_m_e_n_t *const father = patch[ 1 ]; │ │ │ │ │ +193 functor( father->child[ 0 ], 1 ); │ │ │ │ │ +194 } │ │ │ │ │ +195 } │ │ │ │ │ +196 }; │ │ │ │ │ +197 │ │ │ │ │ +198 template<> │ │ │ │ │ +_1_9_9 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< 3, 1 > │ │ │ │ │ +200 { │ │ │ │ │ +201 template< class Functor > │ │ │ │ │ +_2_0_2 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _3_ _> &patch ) │ │ │ │ │ +203 { │ │ │ │ │ +204 // see alberta/src/3d/lagrange_3_3d.c for details │ │ │ │ │ +205 _E_l_e_m_e_n_t *const firstFather = patch[ 0 ]; │ │ │ │ │ 206 │ │ │ │ │ -_2_0_7 typedef typename GridImp::template Codim< codim >::Entity _E_n_t_i_t_y; │ │ │ │ │ -_2_0_8 typedef _M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ -_2_0_9 typedef typename _E_n_t_i_t_y_O_b_j_e_c_t_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e _E_n_t_i_t_y_I_m_p; │ │ │ │ │ -_2_1_0 typedef typename EntityImp::ElementInfo _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +207 _E_l_e_m_e_n_t *const firstChild = firstFather->child[ 0 ]; │ │ │ │ │ +208 functor( firstChild, 0 ); │ │ │ │ │ +209 functor( firstChild, 1 ); │ │ │ │ │ +210 functor( firstChild, 2 ); │ │ │ │ │ 211 │ │ │ │ │ -_2_1_2 typedef _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_w_o_r_l_d_ _> _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ │ -213 │ │ │ │ │ -_2_1_4 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r (); │ │ │ │ │ +212 _E_l_e_m_e_n_t *const secondChild = firstFather->child[ 1 ]; │ │ │ │ │ +213 functor( secondChild, 1 ); │ │ │ │ │ +214 functor( secondChild, 2 ); │ │ │ │ │ 215 │ │ │ │ │ -_2_1_7 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const _T_h_i_s &other ); │ │ │ │ │ -218 │ │ │ │ │ -_2_2_0 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ); │ │ │ │ │ -221 │ │ │ │ │ -_2_2_3 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int travLevel ); │ │ │ │ │ -224 │ │ │ │ │ -_2_2_6 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ │ -227 const _M_a_r_k_e_r_V_e_c_t_o_r *marker, │ │ │ │ │ -228 int travLevel ); │ │ │ │ │ -229 │ │ │ │ │ -_2_3_1 bool _e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ │ -232 { │ │ │ │ │ -233 return entity_.impl().equals( other.entity_.impl() ); │ │ │ │ │ -234 } │ │ │ │ │ +216 for( int i = 1; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ +217 { │ │ │ │ │ +218 _E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ +219 const int type = patch._e_l_e_m_e_n_t_T_y_p_e( i ); │ │ │ │ │ +220 │ │ │ │ │ +221 int lr_set = 0; │ │ │ │ │ +222 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 0 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 0 ) < i) ) │ │ │ │ │ +223 lr_set |= 1; │ │ │ │ │ +224 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 1 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 1 ) < i) ) │ │ │ │ │ +225 lr_set |= 2; │ │ │ │ │ +226 assert( lr_set != 0 ); │ │ │ │ │ +227 │ │ │ │ │ +228 functor( father->child[ 0 ], 0 ); │ │ │ │ │ +229 switch( lr_set ) │ │ │ │ │ +230 { │ │ │ │ │ +231 case 1 : │ │ │ │ │ +232 functor( father->child[ 0 ], 2 ); │ │ │ │ │ +233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) ); │ │ │ │ │ +234 break; │ │ │ │ │ 235 │ │ │ │ │ -_2_3_7 _E_n_t_i_t_y &_d_e_r_e_f_e_r_e_n_c_e () const │ │ │ │ │ -238 { │ │ │ │ │ -239 return entity_; │ │ │ │ │ +236 case 2 : │ │ │ │ │ +237 functor( father->child[ 0 ], 1 ); │ │ │ │ │ +238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) ); │ │ │ │ │ +239 break; │ │ │ │ │ 240 } │ │ │ │ │ -241 │ │ │ │ │ -_2_4_3 int _l_e_v_e_l () const │ │ │ │ │ -244 { │ │ │ │ │ -245 return entity_.impl().level(); │ │ │ │ │ -246 } │ │ │ │ │ -247 │ │ │ │ │ -_2_4_9 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ │ -250 │ │ │ │ │ -251 protected: │ │ │ │ │ -_2_5_3 const GridImp &_g_r_i_d () const │ │ │ │ │ -254 { │ │ │ │ │ -255 return entity_.impl().grid(); │ │ │ │ │ -256 } │ │ │ │ │ -257 │ │ │ │ │ -258 private: │ │ │ │ │ -259 void nextElement ( _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ -260 void nextElementStop (_E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ -261 bool stopAtElement ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const; │ │ │ │ │ -262 │ │ │ │ │ -263 void goNext ( _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ -264 void goNext ( const std::integral_constant< int, 0 > cdVariable, │ │ │ │ │ -265 _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ -266 void goNext ( const std::integral_constant< int, 1 > cdVariable, │ │ │ │ │ -267 _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ -268 template< int cd > │ │ │ │ │ -269 void goNext ( const std::integral_constant< int, cd > cdVariable, │ │ │ │ │ -270 _E_l_e_m_e_n_t_I_n_f_o &elementInfo ); │ │ │ │ │ +241 } │ │ │ │ │ +242 } │ │ │ │ │ +243 }; │ │ │ │ │ +244 │ │ │ │ │ +245 template<> │ │ │ │ │ +_2_4_6 struct _F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d< 3, 2 > │ │ │ │ │ +247 { │ │ │ │ │ +248 template< class Functor > │ │ │ │ │ +_2_4_9 static void _a_p_p_l_y ( Functor &functor, const _P_a_t_c_h_<_ _3_ _> &patch ) │ │ │ │ │ +250 { │ │ │ │ │ +251 // see alberta/src/3d/lagrange_2_3d.c for details │ │ │ │ │ +252 _E_l_e_m_e_n_t *const firstFather = patch[ 0 ]; │ │ │ │ │ +253 │ │ │ │ │ +254 _E_l_e_m_e_n_t *const firstChild = firstFather->child[ 0 ]; │ │ │ │ │ +255 functor( firstChild, 2 ); │ │ │ │ │ +256 functor( firstChild, 4 ); │ │ │ │ │ +257 functor( firstChild, 5 ); │ │ │ │ │ +258 │ │ │ │ │ +259 functor( firstFather->child[ 1 ], 2 ); │ │ │ │ │ +260 │ │ │ │ │ +261 for( int i = 1; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ +262 { │ │ │ │ │ +263 _E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ +264 │ │ │ │ │ +265 int lr_set = 0; │ │ │ │ │ +266 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 0 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 0 ) < i) ) │ │ │ │ │ +267 lr_set = 1; │ │ │ │ │ +268 if( patch._h_a_s_N_e_i_g_h_b_o_r( i, 1 ) && (patch._n_e_i_g_h_b_o_r_I_n_d_e_x( i, 1 ) < i) ) │ │ │ │ │ +269 lr_set += 2; │ │ │ │ │ +270 assert( lr_set != 0 ); │ │ │ │ │ 271 │ │ │ │ │ -272 mutable _E_n_t_i_t_y entity_; │ │ │ │ │ -273 │ │ │ │ │ -275 int level_; │ │ │ │ │ -276 │ │ │ │ │ -278 int subEntity_; │ │ │ │ │ -279 │ │ │ │ │ -280 _M_a_c_r_o_I_t_e_r_a_t_o_r macroIterator_; │ │ │ │ │ -281 │ │ │ │ │ -282 // knows on which element a point,edge,face is viewed │ │ │ │ │ -283 const _M_a_r_k_e_r_V_e_c_t_o_r *marker_; │ │ │ │ │ +272 switch( lr_set ) │ │ │ │ │ +273 { │ │ │ │ │ +274 case 1 : │ │ │ │ │ +275 functor( father->child[ 0 ], 4 ); │ │ │ │ │ +276 break; │ │ │ │ │ +277 │ │ │ │ │ +278 case 2 : │ │ │ │ │ +279 functor( father->child[ 0 ], 5 ); │ │ │ │ │ +280 break; │ │ │ │ │ +281 } │ │ │ │ │ +282 } │ │ │ │ │ +283 } │ │ │ │ │ 284 }; │ │ │ │ │ 285 │ │ │ │ │ 286 │ │ │ │ │ 287 │ │ │ │ │ -288 // Implementation of AlbertaMarkerVector │ │ │ │ │ -289 // ------------------------------------- │ │ │ │ │ +288 // GeometryInFather │ │ │ │ │ +289 // ---------------- │ │ │ │ │ 290 │ │ │ │ │ -291 template< int dim, int dimworld > │ │ │ │ │ -292 template< int codim > │ │ │ │ │ -293 inline bool AlbertaMarkerVector< dim, dimworld > │ │ │ │ │ -_2_9_4 ::subEntityOnElement ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int subEntity ) │ │ │ │ │ -const │ │ │ │ │ -295 { │ │ │ │ │ -296 assert( marker_[ codim ] != 0 ); │ │ │ │ │ -297 │ │ │ │ │ -298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity ); │ │ │ │ │ -299 const int markIndex = marker_[ codim ][ subIndex ]; │ │ │ │ │ -300 assert( (markIndex >= 0) ); │ │ │ │ │ -301 │ │ │ │ │ -302 const int index = dofNumbering_( elementInfo, 0, 0 ); │ │ │ │ │ -303 return (markIndex == index); │ │ │ │ │ -304 } │ │ │ │ │ -305 │ │ │ │ │ -306 │ │ │ │ │ -307 template< int dim, int dimworld > │ │ │ │ │ -308 template< int firstCodim, class Iterator > │ │ │ │ │ -309 inline void _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_3_1_0_ _:_:_m_a_r_k_S_u_b_E_n_t_i_t_i_e_s ( const Iterator &begin, const Iterator &end ) │ │ │ │ │ -311 { │ │ │ │ │ -312 clear(); │ │ │ │ │ -313 std::conditional< (firstCodim <= dimension), MarkSubEntities, │ │ │ │ │ -NoMarkSubEntities >::type │ │ │ │ │ -314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin, end │ │ │ │ │ -); │ │ │ │ │ -315 } │ │ │ │ │ -316 │ │ │ │ │ +291 template< int dim > │ │ │ │ │ +_2_9_2 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r; │ │ │ │ │ +293 │ │ │ │ │ +294 template<> │ │ │ │ │ +_2_9_5 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r< 1 > │ │ │ │ │ +296 { │ │ │ │ │ +_2_9_7 static const int dim = 1; │ │ │ │ │ +298 │ │ │ │ │ +_2_9_9 typedef _R_e_a_l _L_o_c_a_l_V_e_c_t_o_r[ dim ]; │ │ │ │ │ +300 │ │ │ │ │ +301 static const _L_o_c_a_l_V_e_c_t_o_r & │ │ │ │ │ +_3_0_2 _c_o_o_r_d_i_n_a_t_e ( int child, int /* orientation */, int i ) │ │ │ │ │ +303 { │ │ │ │ │ +304 static const _R_e_a_l coords[ 2 ][ dim+1 ][ dim ] │ │ │ │ │ +305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } }; │ │ │ │ │ +306 assert( (i >= 0) && (i <= dim) ); │ │ │ │ │ +307 return coords[ child ][ i ]; │ │ │ │ │ +308 } │ │ │ │ │ +309 }; │ │ │ │ │ +310 │ │ │ │ │ +311 template<> │ │ │ │ │ +_3_1_2 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r< 2 > │ │ │ │ │ +313 { │ │ │ │ │ +_3_1_4 static const int dim = 2; │ │ │ │ │ +315 │ │ │ │ │ +_3_1_6 typedef _R_e_a_l _L_o_c_a_l_V_e_c_t_o_r[ dim ]; │ │ │ │ │ 317 │ │ │ │ │ -318 template< int dim, int dimworld > │ │ │ │ │ -_3_1_9 inline void _A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_p_r_i_n_t ( std::ostream &out │ │ │ │ │ -) const │ │ │ │ │ +318 static const _L_o_c_a_l_V_e_c_t_o_r & │ │ │ │ │ +_3_1_9 _c_o_o_r_d_i_n_a_t_e ( int child, int /* orientation */, int i ) │ │ │ │ │ 320 { │ │ │ │ │ -321 for( int codim = 1; codim <= dimension; ++codim ) │ │ │ │ │ -322 { │ │ │ │ │ -323 int *marker = marker_[ codim ]; │ │ │ │ │ -324 if( marker != 0 ) │ │ │ │ │ -325 { │ │ │ │ │ -326 const int size = dofNumbering_.size( codim ); │ │ │ │ │ -327 out << std::endl; │ │ │ │ │ -328 out << "Codimension " << codim << " (" << size << " entries)" << std::endl; │ │ │ │ │ -329 for( int i = 0; i < size; ++i ) │ │ │ │ │ -330 out << "subentity " << i << " visited on Element " << marker[ i ] << std:: │ │ │ │ │ -endl; │ │ │ │ │ -331 } │ │ │ │ │ -332 } │ │ │ │ │ -333 } │ │ │ │ │ -334 │ │ │ │ │ +321 static const _R_e_a_l coords[ 2 ][ dim+1 ][ dim ] │ │ │ │ │ +322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} }, │ │ │ │ │ +323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } }; │ │ │ │ │ +324 assert( (i >= 0) && (i <= dim) ); │ │ │ │ │ +325 return coords[ child ][ i ]; │ │ │ │ │ +326 } │ │ │ │ │ +327 }; │ │ │ │ │ +328 │ │ │ │ │ +329 template<> │ │ │ │ │ +_3_3_0 struct _G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r< 3 > │ │ │ │ │ +331 { │ │ │ │ │ +_3_3_2 static const int dim = 3; │ │ │ │ │ +333 │ │ │ │ │ +_3_3_4 typedef _R_e_a_l _L_o_c_a_l_V_e_c_t_o_r[ dim ]; │ │ │ │ │ 335 │ │ │ │ │ -336 │ │ │ │ │ -337 // Implementation of AlbertaGridTreeIterator │ │ │ │ │ -338 // ----------------------------------------- │ │ │ │ │ -339 │ │ │ │ │ -340 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -341 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ -_3_4_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r () │ │ │ │ │ -343 : entity_(), │ │ │ │ │ -344 level_( -1 ), │ │ │ │ │ -345 subEntity_( -1 ), │ │ │ │ │ -346 macroIterator_(), │ │ │ │ │ -347 marker_( NULL ) │ │ │ │ │ -348 {} │ │ │ │ │ +336 static const _L_o_c_a_l_V_e_c_t_o_r & │ │ │ │ │ +_3_3_7 _c_o_o_r_d_i_n_a_t_e ( int child, int orientation, int i ) │ │ │ │ │ +338 { │ │ │ │ │ +339 static const _R_e_a_l coords[ 2 ][ dim+1 ][ dim ] │ │ │ │ │ +340 = { { {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} }, │ │ │ │ │ +341 { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.5, 0.0, 0.0} } }; │ │ │ │ │ +342 static const int flip[ 2 ][ 2 ][ dim+1 ] │ │ │ │ │ +343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } }; │ │ │ │ │ +344 assert( (i >= 0) && (i <= dim) ); │ │ │ │ │ +345 i = flip[ child ][ orientation ][ i ]; │ │ │ │ │ +346 return coords[ child ][ i ]; │ │ │ │ │ +347 } │ │ │ │ │ +348 }; │ │ │ │ │ 349 │ │ │ │ │ -350 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -351 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ -_3_5_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ │ -353 const _M_a_r_k_e_r_V_e_c_t_o_r *marker, │ │ │ │ │ -354 int travLevel ) │ │ │ │ │ -355 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ -356 level_( travLevel ), │ │ │ │ │ -357 subEntity_( (codim == 0 ? 0 : -1) ), │ │ │ │ │ -358 macroIterator_( grid.meshPointer().begin() ), │ │ │ │ │ -359 marker_( marker ) │ │ │ │ │ -360 { │ │ │ │ │ -361 _E_l_e_m_e_n_t_I_n_f_o elementInfo = *macroIterator_; │ │ │ │ │ -362 nextElementStop( elementInfo ); │ │ │ │ │ -363 if( codim > 0 ) │ │ │ │ │ -364 goNext( elementInfo ); │ │ │ │ │ -365 // it is ok to set the invalid ElementInfo │ │ │ │ │ -366 entity_.impl().setElement( elementInfo, subEntity_ ); │ │ │ │ │ -367 } │ │ │ │ │ -368 │ │ │ │ │ -369 │ │ │ │ │ -370 // Make LevelIterator with point to element from previous iterations │ │ │ │ │ -371 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -372 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ -_3_7_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ │ -374 int travLevel ) │ │ │ │ │ -375 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ │ -376 level_( travLevel ), │ │ │ │ │ -377 subEntity_( -1 ), │ │ │ │ │ -378 macroIterator_( grid.meshPointer().end() ), │ │ │ │ │ -379 marker_( 0 ) │ │ │ │ │ -380 {} │ │ │ │ │ -381 │ │ │ │ │ -382 │ │ │ │ │ -383 // Make LevelIterator with point to element from previous iterations │ │ │ │ │ -384 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -385 inline _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ -_3_8_6_ _:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r( const _T_h_i_s &other ) │ │ │ │ │ -387 : entity_( other.entity_ ), │ │ │ │ │ -388 level_( other.level_ ), │ │ │ │ │ -389 subEntity_( other.subEntity_ ), │ │ │ │ │ -390 macroIterator_( other.macroIterator_ ), │ │ │ │ │ -391 marker_( other.marker_ ) │ │ │ │ │ -392 {} │ │ │ │ │ -393 │ │ │ │ │ -394 │ │ │ │ │ -395 // Make LevelIterator with point to element from previous iterations │ │ │ │ │ -396 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -397 inline typename _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _>_:_: │ │ │ │ │ -_T_h_i_s & │ │ │ │ │ -_3_9_8 _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const │ │ │ │ │ -_T_h_i_s &other ) │ │ │ │ │ -399 { │ │ │ │ │ -400 entity_ = other.entity_; │ │ │ │ │ -401 level_ = other.level_; │ │ │ │ │ -402 subEntity_ = other.subEntity_; │ │ │ │ │ -403 macroIterator_ = other.macroIterator_; │ │ │ │ │ -404 marker_ = other.marker_; │ │ │ │ │ -405 │ │ │ │ │ -406 return *this; │ │ │ │ │ -407 } │ │ │ │ │ -408 │ │ │ │ │ -409 │ │ │ │ │ -410 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -_4_1_1 inline void _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _>_:_: │ │ │ │ │ -_i_n_c_r_e_m_e_n_t () │ │ │ │ │ -412 { │ │ │ │ │ -413 _E_l_e_m_e_n_t_I_n_f_o elementInfo = entity_.impl().elementInfo_; │ │ │ │ │ -414 goNext ( elementInfo ); │ │ │ │ │ -415 // it is ok to set the invalid ElementInfo │ │ │ │ │ -416 entity_.impl().setElement( elementInfo, subEntity_ ); │ │ │ │ │ -417 } │ │ │ │ │ -418 │ │ │ │ │ -419 │ │ │ │ │ -420 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -421 inline void _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ -422_ _:_:_n_e_x_t_E_l_e_m_e_n_t ( ElementInfo &elementInfo ) │ │ │ │ │ -423 { │ │ │ │ │ -424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) ) │ │ │ │ │ -425 { │ │ │ │ │ -426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) ) │ │ │ │ │ -427 elementInfo = elementInfo.father(); │ │ │ │ │ -428 if( elementInfo.level() == 0 ) │ │ │ │ │ -429 { │ │ │ │ │ -430 ++macroIterator_; │ │ │ │ │ -431 elementInfo = *macroIterator_; │ │ │ │ │ -432 } │ │ │ │ │ -433 else │ │ │ │ │ -434 elementInfo = elementInfo.father().child( 1 ); │ │ │ │ │ -435 } │ │ │ │ │ -436 else │ │ │ │ │ -437 elementInfo = elementInfo.child( 0 ); │ │ │ │ │ -438 } │ │ │ │ │ -439 │ │ │ │ │ -440 │ │ │ │ │ -441 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ -443 ::nextElementStop ( ElementInfo &elementInfo ) │ │ │ │ │ -444 { │ │ │ │ │ -445 while( !(!elementInfo || stopAtElement( elementInfo )) ) │ │ │ │ │ -446 nextElement( elementInfo ); │ │ │ │ │ -447 } │ │ │ │ │ -448 │ │ │ │ │ -449 │ │ │ │ │ -450 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ -452 ::stopAtElement ( const ElementInfo &elementInfo ) const │ │ │ │ │ -453 { │ │ │ │ │ -454 if( !elementInfo ) │ │ │ │ │ -455 return true; │ │ │ │ │ -456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level │ │ │ │ │ -())); │ │ │ │ │ -457 } │ │ │ │ │ -458 │ │ │ │ │ -459 │ │ │ │ │ -460 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ -462 ::goNext ( ElementInfo &elementInfo ) │ │ │ │ │ -463 { │ │ │ │ │ -464 std::integral_constant< int, codim > codimVariable; │ │ │ │ │ -465 goNext( codimVariable, elementInfo ); │ │ │ │ │ -466 } │ │ │ │ │ -467 │ │ │ │ │ -468 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ -470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */, │ │ │ │ │ -471 ElementInfo &elementInfo ) │ │ │ │ │ -472 { │ │ │ │ │ -473 assert( stopAtElement( elementInfo ) ); │ │ │ │ │ -474 │ │ │ │ │ -475 nextElement( elementInfo ); │ │ │ │ │ -476 nextElementStop( elementInfo ); │ │ │ │ │ -477 } │ │ │ │ │ -478 │ │ │ │ │ -479 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ -481 ::goNext ( const std::integral_constant< int, 1 > cdVariable, │ │ │ │ │ -482 ElementInfo &elementInfo ) │ │ │ │ │ -483 { │ │ │ │ │ -484 assert( stopAtElement( elementInfo ) ); │ │ │ │ │ -485 │ │ │ │ │ -486 ++subEntity_; │ │ │ │ │ -487 if( subEntity_ >= numSubEntities ) │ │ │ │ │ -488 { │ │ │ │ │ -489 subEntity_ = 0; │ │ │ │ │ -490 nextElement( elementInfo ); │ │ │ │ │ -491 nextElementStop( elementInfo ); │ │ │ │ │ -492 if( !elementInfo ) │ │ │ │ │ -493 return; │ │ │ │ │ -494 } │ │ │ │ │ -495 │ │ │ │ │ -496 if( leafIterator ) │ │ │ │ │ -497 { │ │ │ │ │ -498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ : │ │ │ │ │ -subEntity_); │ │ │ │ │ -499 │ │ │ │ │ -500 const _A_L_B_E_R_T_A EL *neighbor = elementInfo.elInfo().neigh[ face ]; │ │ │ │ │ -501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) ) │ │ │ │ │ -502 { │ │ │ │ │ -503 // face is reached from element with largest number │ │ │ │ │ -504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 ); │ │ │ │ │ -505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 ); │ │ │ │ │ -506 if( elIndex < nbIndex ) │ │ │ │ │ -507 goNext( cdVariable, elementInfo ); │ │ │ │ │ -508 } │ │ │ │ │ -509 // uncomment this assertion only if codimension 1 entities are marked │ │ │ │ │ -510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo, │ │ │ │ │ -subEntity_ ) ); │ │ │ │ │ -511 } │ │ │ │ │ -512 else │ │ │ │ │ -513 { │ │ │ │ │ -514 assert( marker_ != 0 ); │ │ │ │ │ -515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) ) │ │ │ │ │ -516 goNext( cdVariable, elementInfo ); │ │ │ │ │ -517 } │ │ │ │ │ -518 } │ │ │ │ │ -519 │ │ │ │ │ -520 template< int codim, class GridImp, bool leafIterator > │ │ │ │ │ -521 template< int cd > │ │ │ │ │ -522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator > │ │ │ │ │ -523 ::goNext ( const std::integral_constant< int, cd > cdVariable, │ │ │ │ │ -524 ElementInfo &elementInfo ) │ │ │ │ │ -525 { │ │ │ │ │ -526 assert( stopAtElement( elementInfo ) ); │ │ │ │ │ -527 │ │ │ │ │ -528 ++subEntity_; │ │ │ │ │ -529 if( subEntity_ >= numSubEntities ) │ │ │ │ │ -530 { │ │ │ │ │ -531 subEntity_ = 0; │ │ │ │ │ -532 nextElement( elementInfo ); │ │ │ │ │ -533 nextElementStop( elementInfo ); │ │ │ │ │ -534 if( !elementInfo ) │ │ │ │ │ -535 return; │ │ │ │ │ -536 } │ │ │ │ │ -537 │ │ │ │ │ -538 assert( marker_ != 0 ); │ │ │ │ │ -539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ ) │ │ │ │ │ -) │ │ │ │ │ -540 goNext( cdVariable, elementInfo ); │ │ │ │ │ -541 } │ │ │ │ │ -542 │ │ │ │ │ -543} │ │ │ │ │ -544 │ │ │ │ │ -545#endif // #if HAVE_ALBERTA │ │ │ │ │ -546 │ │ │ │ │ -547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ -_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ +350 } │ │ │ │ │ +351 │ │ │ │ │ +352} │ │ │ │ │ +353 │ │ │ │ │ +354#endif // #if HAVE_ALBERTA │ │ │ │ │ +355 │ │ │ │ │ +356#endif │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn agrid.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_s_i_z_e │ │ │ │ │ -int size(int codim) const │ │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_L_o_c_a_l_V_e_c_t_o_r │ │ │ │ │ +ALBERTA REAL_B LocalVector │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +ALBERTA EL Element │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ +ALBERTA REAL Real │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const This &other) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_O_b_j_e_c_t │ │ │ │ │ -MakeableInterfaceObject< Entity > EntityObject │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:208 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ -Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:204 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int │ │ │ │ │ -travLevel) │ │ │ │ │ -Constructor making begin iterator. │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:352 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridTreeIterator(const GridImp &grid, int travLevel) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:373 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y_I_m_p │ │ │ │ │ -EntityObject::ImplementationType EntityImp │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:209 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int codimension │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:194 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ │ -MeshPointer::MacroIterator MacroIterator │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const This &other) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:398 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ │ -Entity & dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:237 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -AlbertaMarkerVector< dimension, dimensionworld > MarkerVector │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:212 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ │ -int level() const │ │ │ │ │ -ask for level of entities │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static const int dimensionworld │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridTreeIterator() │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:342 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ │ -const GridImp & grid() const │ │ │ │ │ -obtain a reference to the grid │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ │ +static ElementInfo createFake(const MeshPointer &mesh, const Element *element, │ │ │ │ │ +int level, int type=0) │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:752 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_n_e_i_g_h_b_o_r_I_n_d_e_x │ │ │ │ │ +int neighborIndex(int i, int neighbor) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_e_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ +int elementType(int i) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_c_o_u_n_t │ │ │ │ │ +int count() const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_f_o_r_E_a_c_h │ │ │ │ │ +void forEach(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +Element * operator[](int i) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_f_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d │ │ │ │ │ +void forEachInteriorSubChild(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:193 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ │ -AlbertaGridTreeIterator(const This &other) │ │ │ │ │ -Constructor making end iterator. │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:386 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ -EntityImp::ElementInfo ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -marker assigning subentities to one element containing them │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -AlbertaMarkerVector(const DofNumbering &dofNumbering) │ │ │ │ │ -create AlbertaMarkerVector with empty vectors │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_u_p_2_D_a_t_e │ │ │ │ │ -bool up2Date() const │ │ │ │ │ -return true if marking is up to date │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_s_u_b_E_n_t_i_t_y_O_n_E_l_e_m_e_n_t │ │ │ │ │ -bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const │ │ │ │ │ -visit subentity on this element? │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:294 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_m_a_r_k_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -void markSubEntities(const Iterator &begin, const Iterator &end) │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:310 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_~_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -~AlbertaMarkerVector() │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_c_l_e_a_r │ │ │ │ │ -void clear() │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ │ -AlbertaMarkerVector(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_p_r_i_n_t │ │ │ │ │ -void print(std::ostream &out=std::cout) const │ │ │ │ │ -print for debugin' only │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_:_:_C_o_d_i_m │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_:_:_C_o_d_i_m_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_h_a_s_N_e_i_g_h_b_o_r │ │ │ │ │ +bool hasNeighbor(int i, int neighbor) const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_P_a_t_c_h │ │ │ │ │ +Patch(ElementList *list, int count) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ Alberta::ElementInfo< dimension > ElementInfo │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:139 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_:_:_C_o_d_i_m_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(const DofNumbering &dofNumbering, int *(&marker) │ │ │ │ │ -[dimension+1], const ElementInfo &elementInfo) │ │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _> │ │ │ │ │ -_D_u_n_e_:_:_M_a_k_e_a_b_l_e_I_n_t_e_r_f_a_c_e_O_b_j_e_c_t_<_ _E_n_t_i_t_y_ _>_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_y_p_e │ │ │ │ │ -InterfaceType::Implementation ImplementationType │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:1108 │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_E_l_e_m_e_n_t_L_i_s_t │ │ │ │ │ +ALBERTA RC_LIST_EL ElementList │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _0_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(Functor &functor, const Patch< dim > &patch) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _d_i_m_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(Functor &functor, const Patch< dim > &patch) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:169 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _2_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(Functor &functor, const Patch< 2 > &patch) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _1_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(Functor &functor, const Patch< 3 > &patch) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:202 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _2_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(Functor &functor, const Patch< 3 > &patch) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:249 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:292 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _1_ _>_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +static const LocalVector & coordinate(int child, int, int i) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:302 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _2_ _>_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +static const LocalVector & coordinate(int child, int, int i) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:319 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _3_ _>_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +static const LocalVector & coordinate(int child, int orientation, int i) │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:337 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html │ │ │ │┄ Files 14% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertareader.hh Source File │ │ │ │ +dune-grid: yaspgridpersistentcontainer.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,138 +70,157 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
albertareader.hh
│ │ │ │ +
yaspgridpersistentcontainer.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ │ -
6#define DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ +
12#include <cassert>
│ │ │ │ +
13#include <vector>
│ │ │ │
14
│ │ │ │ -
15#if HAVE_ALBERTA
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
25 public:
│ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28 typedef typename Grid::ctype ctype;
│ │ │ │ -
29
│ │ │ │ -
30 static const int dimension = Grid::dimension;
│ │ │ │ - │ │ │ │ -
32
│ │ │ │ -
33 private:
│ │ │ │ -
34 static_assert(dimensionworld == Alberta::dimWorld,
│ │ │ │ -
35 "AlbertaReader: world dimension must match ALBERTA's world dimension.");
│ │ │ │ + │ │ │ │ + │ │ │ │ +
17#include "../yaspgrid.hh"
│ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
33 template<typename Grid>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {
│ │ │ │
36
│ │ │ │ - │ │ │ │ -
38
│ │ │ │ -
39 MacroData macroData_;
│ │ │ │ -
40
│ │ │ │ -
41 AlbertaReader ( const This & );
│ │ │ │ -
42 This &operator= ( const This & );
│ │ │ │ +
37 public:
│ │ │ │ +
│ │ │ │ +
38 YaspPersistentContainerIndex(const Grid & grid, int codim)
│ │ │ │ +
39 : _grid(grid), _codim(codim)
│ │ │ │ +
40 {
│ │ │ │ +
41 recomputeOffsets();
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │
43
│ │ │ │ -
44 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
46 {}
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 void readGrid ( const std::string &fileName, GridFactory &factory )
│ │ │ │ -
49 {
│ │ │ │ -
50 // read ALBERTA macro triangulation
│ │ │ │ -
51 macroData_.read( fileName, false );
│ │ │ │ -
52
│ │ │ │ -
53 // insert all vertices into the factory
│ │ │ │ -
54 const int numVertices = macroData_.vertexCount();
│ │ │ │ -
55 for( int i = 0; i < numVertices; ++i )
│ │ │ │ -
56 {
│ │ │ │ -
57 FieldVector< ctype, dimensionworld > v;
│ │ │ │ -
58 const Alberta::GlobalVector &coords = macroData_.vertex( i );
│ │ │ │ -
59 for( int j = 0; j < dimensionworld; ++j )
│ │ │ │ -
60 v[ j ] = coords[ j ];
│ │ │ │ -
61 factory.insertVertex( v );
│ │ │ │ -
62 }
│ │ │ │ -
63
│ │ │ │ -
64 // insert all elements into the factory
│ │ │ │ -
65 std::vector< unsigned int > vertices( dimension+1 );
│ │ │ │ -
66 const int numElements = macroData_.elementCount();
│ │ │ │ -
67 for( int i = 0; i < numElements; ++i )
│ │ │ │ -
68 {
│ │ │ │ -
69 const typename MacroData::ElementId &id = macroData_.element( i );
│ │ │ │ -
70 for( int j = 0; j <= dimension; ++j )
│ │ │ │ -
71 vertices[ j ] = id[ j ];
│ │ │ │ -
72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );
│ │ │ │ -
73 }
│ │ │ │ -
74
│ │ │ │ -
75 // release ALBERTA macro data
│ │ │ │ -
76 macroData_.release();
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78 };
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
80}
│ │ │ │ -
81
│ │ │ │ -
82#endif // #if HAVE_ALBERTA
│ │ │ │ -
83
│ │ │ │ -
84#endif
│ │ │ │ -
provides a wrapper for ALBERTA's macro_data structure
│ │ │ │ +
45 typedef std::size_t IndexType;
│ │ │ │ +
46
│ │ │ │ +
48 template<class Entity>
│ │ │ │ +
│ │ │ │ +
49 IndexType index (const Entity& e) const
│ │ │ │ +
50 {
│ │ │ │ +
51 static const int cc = Entity::codimension;
│ │ │ │ +
52 std::size_t level = e.level();
│ │ │ │ +
53 return _grid.indexsets[level]->template index<cc>(e) + _offsets[level];
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
57 template< class Entity >
│ │ │ │ +
│ │ │ │ +
58 IndexType subIndex ( const Entity &e, int i, unsigned int codim ) const
│ │ │ │ +
59 {
│ │ │ │ +
60
│ │ │ │ +
61 static const int cc = Entity::codimension;
│ │ │ │ +
62 std::size_t level = e.level();
│ │ │ │ +
63 return _grid.indexsets[level]->template subIndex<cc>(e,i,codim) + _offsets[level];
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
67 std::size_t size (int /* codim */) const
│ │ │ │ +
68 {
│ │ │ │ +
69 if (_grid.indexsets.size()+1 != _offsets.size())
│ │ │ │ +
70 recomputeOffsets();
│ │ │ │ +
71 return _offsets.back();
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
74 private:
│ │ │ │ +
75 void recomputeOffsets() const
│ │ │ │ +
76 {
│ │ │ │ +
77 _offsets.resize(_grid.indexsets.size()+1,0);
│ │ │ │ +
78 _offsets[0] = 0;
│ │ │ │ +
79 for (std::size_t i=0; i<_grid.indexsets.size(); i++)
│ │ │ │ +
80 _offsets[i+1] = _offsets[i] + _grid.indexsets[i]->size(_codim);
│ │ │ │ +
81 }
│ │ │ │ +
82
│ │ │ │ +
83 const Grid& _grid;
│ │ │ │ +
84 int _codim;
│ │ │ │ +
85 mutable std::vector<std::size_t> _offsets;
│ │ │ │ +
86 };
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
94 template<int dim, class CoordCont, class T>
│ │ │ │ +
│ │ │ │ +
95 class PersistentContainer< YaspGrid<dim, CoordCont>, T >
│ │ │ │ +
96 /* We have to pass the reference to the IndexSet to the constructor
│ │ │ │ +
97 of the PersistentContainerVector. In order to have a valid
│ │ │ │ +
98 indexset available, we inherit from a private indexset
│ │ │ │ +
99 */
│ │ │ │ +
100 : private YaspPersistentContainerIndex< const YaspGrid<dim, CoordCont> >,
│ │ │ │ +
101 public PersistentContainerVector< YaspGrid<dim, CoordCont>,
│ │ │ │ +
102 YaspPersistentContainerIndex< const YaspGrid<dim, CoordCont> >,
│ │ │ │ +
103 std::vector<T> >
│ │ │ │ +
104 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
107
│ │ │ │ +
108 public:
│ │ │ │ +
109 typedef typename Base::Grid Grid;
│ │ │ │ +
110 typedef typename Base::Value Value;
│ │ │ │ +
111
│ │ │ │ +
112 using Base::size;
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
114 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
│ │ │ │ +
115 : IndexSet(grid, codim),
│ │ │ │ +
116 Base(*this, codim, value)
│ │ │ │ +
117 {}
│ │ │ │ +
│ │ │ │ +
118 };
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120} // end namespace Dune
│ │ │ │ +
121
│ │ │ │ +
122#endif // end DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
Definition albertareader.hh:22
│ │ │ │ -
Grid::ctype ctype
Definition albertareader.hh:28
│ │ │ │ -
static const int dimensionworld
Definition albertareader.hh:31
│ │ │ │ -
static const int dimension
Definition albertareader.hh:30
│ │ │ │ -
Dune::GridFactory< Grid > GridFactory
Definition albertareader.hh:26
│ │ │ │ -
AlbertaReader()
Definition albertareader.hh:45
│ │ │ │ -
void readGrid(const std::string &fileName, GridFactory &factory)
Definition albertareader.hh:48
│ │ │ │ - │ │ │ │ -
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ │ -
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ │ -
int elementCount() const
Definition macrodata.hh:68
│ │ │ │ -
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ │ -
int vertexCount() const
Definition macrodata.hh:63
│ │ │ │ -
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ │ -
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ -
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh:532
│ │ │ │ - │ │ │ │ -
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:346
│ │ │ │ -
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:335
│ │ │ │ -
Provide a generic factory class for unstructured grids.
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
int level() const
The level of this entity.
Definition common/entity.hh:124
│ │ │ │ +
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
int size(int level, int codim) const
Return number of grid entities of a given codim on a given level in this process.
Definition common/grid.hh:552
│ │ │ │ +
A class for storing data during an adaptation cycle.
Definition utility/persistentcontainer.hh:22
│ │ │ │ +
Base::Value Value
Definition utility/persistentcontainer.hh:27
│ │ │ │ +
const Grid & grid() const
Definition persistentcontainermap.hh:114
│ │ │ │ +
Size size() const
Definition persistentcontainermap.hh:85
│ │ │ │ +
vector-based implementation of the PersistentContainer
Definition persistentcontainervector.hh:51
│ │ │ │ +
Vector::value_type Value
Definition persistentcontainervector.hh:57
│ │ │ │ +
G Grid
Definition persistentcontainervector.hh:55
│ │ │ │ +
[ provides Dune::Grid ]
Definition yaspgrid.hh:163
│ │ │ │ +
Definition yaspgridpersistentcontainer.hh:35
│ │ │ │ +
IndexType index(const Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition yaspgridpersistentcontainer.hh:49
│ │ │ │ +
std::size_t size(int) const
Return total number of entities of given geometry type in entity set .
Definition yaspgridpersistentcontainer.hh:67
│ │ │ │ +
IndexType subIndex(const Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition yaspgridpersistentcontainer.hh:58
│ │ │ │ +
YaspPersistentContainerIndex(const Grid &grid, int codim)
Definition yaspgridpersistentcontainer.hh:38
│ │ │ │ +
std::size_t IndexType
The type used for the indices.
Definition yaspgridpersistentcontainer.hh:45
│ │ │ │ +
Base::Grid Grid
Definition yaspgridpersistentcontainer.hh:109
│ │ │ │ +
Base::Value Value
Definition yaspgridpersistentcontainer.hh:110
│ │ │ │ +
PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
Definition yaspgridpersistentcontainer.hh:114
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,176 +1,193 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -albertareader.hh │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +yaspgridpersistentcontainer.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ │ -6#define DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ 14 │ │ │ │ │ -15#if HAVE_ALBERTA │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -20 template< class Grid > │ │ │ │ │ -_2_1 class _A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ │ -22 { │ │ │ │ │ -23 typedef _A_l_b_e_r_t_a_R_e_a_d_e_r_<_ _G_r_i_d_ _> _T_h_i_s; │ │ │ │ │ -24 │ │ │ │ │ -25 public: │ │ │ │ │ -_2_6 typedef _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_ _> _G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ -27 │ │ │ │ │ -_2_8 typedef typename _G_r_i_d_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -29 │ │ │ │ │ -_3_0 static const int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_3_1 static const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -32 │ │ │ │ │ -33 private: │ │ │ │ │ -34 static_assert(_d_i_m_e_n_s_i_o_n_w_o_r_l_d == _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d, │ │ │ │ │ -35 "AlbertaReader: world dimension must match ALBERTA's world dimension."); │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_v_e_c_t_o_r_._h_h> │ │ │ │ │ +17#include "../yaspgrid.hh" │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 │ │ │ │ │ +33 template │ │ │ │ │ +_3_4 class _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x │ │ │ │ │ +35 { │ │ │ │ │ 36 │ │ │ │ │ -37 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> _M_a_c_r_o_D_a_t_a; │ │ │ │ │ -38 │ │ │ │ │ -39 _M_a_c_r_o_D_a_t_a macroData_; │ │ │ │ │ -40 │ │ │ │ │ -41 _A_l_b_e_r_t_a_R_e_a_d_e_r ( const _T_h_i_s & ); │ │ │ │ │ -42 _T_h_i_s &operator= ( const _T_h_i_s & ); │ │ │ │ │ +37 public: │ │ │ │ │ +_3_8 _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x(const _G_r_i_d & grid, int codim) │ │ │ │ │ +39 : _grid(grid), _codim(codim) │ │ │ │ │ +40 { │ │ │ │ │ +41 recomputeOffsets(); │ │ │ │ │ +42 } │ │ │ │ │ 43 │ │ │ │ │ -44 public: │ │ │ │ │ -_4_5 _A_l_b_e_r_t_a_R_e_a_d_e_r () │ │ │ │ │ -46 {} │ │ │ │ │ -47 │ │ │ │ │ -_4_8 void _r_e_a_d_G_r_i_d ( const std::string &fileName, _G_r_i_d_F_a_c_t_o_r_y &factory ) │ │ │ │ │ -49 { │ │ │ │ │ -50 // read ALBERTA macro triangulation │ │ │ │ │ -51 macroData_._r_e_a_d( fileName, false ); │ │ │ │ │ -52 │ │ │ │ │ -53 // insert all vertices into the factory │ │ │ │ │ -54 const int numVertices = macroData_._v_e_r_t_e_x_C_o_u_n_t(); │ │ │ │ │ -55 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ -56 { │ │ │ │ │ -57 FieldVector< ctype, dimensionworld > v; │ │ │ │ │ -58 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r &coords = macroData_._v_e_r_t_e_x( i ); │ │ │ │ │ -59 for( int j = 0; j < _d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++j ) │ │ │ │ │ -60 v[ j ] = coords[ j ]; │ │ │ │ │ -61 factory._i_n_s_e_r_t_V_e_r_t_e_x( v ); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64 // insert all elements into the factory │ │ │ │ │ -65 std::vector< unsigned int > vertices( _d_i_m_e_n_s_i_o_n+1 ); │ │ │ │ │ -66 const int numElements = macroData_._e_l_e_m_e_n_t_C_o_u_n_t(); │ │ │ │ │ -67 for( int i = 0; i < numElements; ++i ) │ │ │ │ │ +_4_5 typedef std::size_t _I_n_d_e_x_T_y_p_e; │ │ │ │ │ +46 │ │ │ │ │ +48 template │ │ │ │ │ +_4_9 _I_n_d_e_x_T_y_p_e _i_n_d_e_x (const _E_n_t_i_t_y& e) const │ │ │ │ │ +50 { │ │ │ │ │ +51 static const int cc = _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +52 std::size_t level = e._l_e_v_e_l(); │ │ │ │ │ +53 return _grid.indexsets[level]->template index(e) + _offsets[level]; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +57 template< class Entity > │ │ │ │ │ +_5_8 _I_n_d_e_x_T_y_p_e _s_u_b_I_n_d_e_x ( const _E_n_t_i_t_y &e, int i, unsigned int codim ) const │ │ │ │ │ +59 { │ │ │ │ │ +60 │ │ │ │ │ +61 static const int cc = _E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +62 std::size_t level = e._l_e_v_e_l(); │ │ │ │ │ +63 return _grid.indexsets[level]->template subIndex(e,i,codim) + _offsets │ │ │ │ │ +[level]; │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +_6_7 std::size_t _s_i_z_e (int /* codim */) const │ │ │ │ │ 68 { │ │ │ │ │ -69 const typename _M_a_c_r_o_D_a_t_a_:_:_E_l_e_m_e_n_t_I_d &id = macroData_._e_l_e_m_e_n_t( i ); │ │ │ │ │ -70 for( int j = 0; j <= _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ │ -71 vertices[ j ] = id[ j ]; │ │ │ │ │ -72 factory._i_n_s_e_r_t_E_l_e_m_e_n_t( GeometryTypes::simplex( _d_i_m_e_n_s_i_o_n ), vertices ); │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -75 // release ALBERTA macro data │ │ │ │ │ -76 macroData_._r_e_l_e_a_s_e(); │ │ │ │ │ -77 } │ │ │ │ │ -78 }; │ │ │ │ │ -79 │ │ │ │ │ -80} │ │ │ │ │ -81 │ │ │ │ │ -82#endif // #if HAVE_ALBERTA │ │ │ │ │ -83 │ │ │ │ │ -84#endif │ │ │ │ │ -_m_a_c_r_o_d_a_t_a_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ +69 if (_grid.indexsets._s_i_z_e()+1 != _offsets.size()) │ │ │ │ │ +70 recomputeOffsets(); │ │ │ │ │ +71 return _offsets.back(); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +74 private: │ │ │ │ │ +75 void recomputeOffsets() const │ │ │ │ │ +76 { │ │ │ │ │ +77 _offsets.resize(_grid.indexsets._s_i_z_e()+1,0); │ │ │ │ │ +78 _offsets[0] = 0; │ │ │ │ │ +79 for (std::size_t i=0; i<_grid.indexsets._s_i_z_e(); i++) │ │ │ │ │ +80 _offsets[i+1] = _offsets[i] + _grid.indexsets[i]->_s_i_z_e(_codim); │ │ │ │ │ +81 } │ │ │ │ │ +82 │ │ │ │ │ +83 const Grid& _grid; │ │ │ │ │ +84 int _codim; │ │ │ │ │ +85 mutable std::vector _offsets; │ │ │ │ │ +86 }; │ │ │ │ │ +87 │ │ │ │ │ +94 template │ │ │ │ │ +_9_5 class _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r< _Y_a_s_p_G_r_i_d, T > │ │ │ │ │ +96 /* We have to pass the reference to the IndexSet to the constructor │ │ │ │ │ +97 of the PersistentContainerVector. In order to have a valid │ │ │ │ │ +98 indexset available, we inherit from a private indexset │ │ │ │ │ +99 */ │ │ │ │ │ +100 : private _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x< const YaspGrid >, │ │ │ │ │ +101 public _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r< YaspGrid, │ │ │ │ │ +102 YaspPersistentContainerIndex< const YaspGrid >, │ │ │ │ │ +103 std::vector > │ │ │ │ │ +104 { │ │ │ │ │ +105 typedef _Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_<_ _c_o_n_s_t_ _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _C_o_o_r_d_C_o_n_t_> > │ │ │ │ │ +_I_n_d_e_x_S_e_t; │ │ │ │ │ +106 typedef _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_<_ _Y_a_s_p_G_r_i_d_<_d_i_m_,_ _C_o_o_r_d_C_o_n_t_>, _I_n_d_e_x_S_e_t, │ │ │ │ │ +std::vector > _B_a_s_e; │ │ │ │ │ +107 │ │ │ │ │ +108 public: │ │ │ │ │ +_1_0_9 typedef typename _B_a_s_e_:_:_G_r_i_d _G_r_i_d; │ │ │ │ │ +_1_1_0 typedef typename _B_a_s_e_:_:_V_a_l_u_e _V_a_l_u_e; │ │ │ │ │ +111 │ │ │ │ │ +112 using _B_a_s_e_:_:_s_i_z_e; │ │ │ │ │ +113 │ │ │ │ │ +_1_1_4 _P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r ( const _G_r_i_d &_g_r_i_d, int codim, const _V_a_l_u_e &value = │ │ │ │ │ +_V_a_l_u_e() ) │ │ │ │ │ +115 : _I_n_d_e_x_S_e_t(_g_r_i_d, codim), │ │ │ │ │ +116 _B_a_s_e(*this, codim, value) │ │ │ │ │ +117 {} │ │ │ │ │ +118 }; │ │ │ │ │ +119 │ │ │ │ │ +120} // end namespace Dune │ │ │ │ │ +121 │ │ │ │ │ +122#endif // end DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH │ │ │ │ │ +_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_v_e_c_t_o_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ │ -Grid::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static const int dimensionworld │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -Dune::GridFactory< Grid > GridFactory │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ │ -AlbertaReader() │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_r_e_a_d_G_r_i_d │ │ │ │ │ -void readGrid(const std::string &fileName, GridFactory &factory) │ │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ │ -int ElementId[numVertices] │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -release the macro data structure │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t_C_o_u_n_t │ │ │ │ │ -int elementCount() const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x │ │ │ │ │ -GlobalVector & vertex(int i) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:255 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x_C_o_u_n_t │ │ │ │ │ -int vertexCount() const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t │ │ │ │ │ -ElementId & element(int i) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:246 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ │ -void read(const std::string &filename, bool binary=false) │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static constexpr int dimensionworld │ │ │ │ │ -The dimension of the world the grid lives in. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ │ -ct ctype │ │ │ │ │ -Define type used for coordinates in grid module. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:532 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_ _G_r_i_d_ _> │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ │ -virtual void insertElement(const GeometryType &type, const std::vector< │ │ │ │ │ -unsigned int > &vertices) │ │ │ │ │ -Insert an element into the coarse grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridfactory.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ -virtual void insertVertex(const FieldVector< ctype, dimworld > &pos) │ │ │ │ │ -Insert a vertex into the coarse grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridfactory.hh:335 │ │ │ │ │ -_g_r_i_d_f_a_c_t_o_r_y_._h_h │ │ │ │ │ -Provide a generic factory class for unstructured grids. │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Wrapper class for entities. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +The level of this entity. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_E_n_t_i_t_y_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static constexpr int codimension │ │ │ │ │ +Know your own codimension. │ │ │ │ │ +DDeeffiinniittiioonn common/entity.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ +Grid abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_s_i_z_e │ │ │ │ │ +int size(int level, int codim) const │ │ │ │ │ +Return number of grid entities of a given codim on a given level in this │ │ │ │ │ +process. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:552 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r │ │ │ │ │ +A class for storing data during an adaptation cycle. │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_:_:_V_a_l_u_e │ │ │ │ │ +Base::Value Value │ │ │ │ │ +DDeeffiinniittiioonn utility/persistentcontainer.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_<_ _G_,_ _G_:_:_L_o_c_a_l_I_d_S_e_t_,_ _s_t_d_:_:_m_a_p_<_ _G_:_:_L_o_c_a_l_I_d_S_e_t_:_: │ │ │ │ │ +_I_d_T_y_p_e_,_ _T_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ +const Grid & grid() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_M_a_p_:_:_s_i_z_e │ │ │ │ │ +Size size() const │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r │ │ │ │ │ +vector-based implementation of the PersistentContainer │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_V_a_l_u_e │ │ │ │ │ +Vector::value_type Value │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_V_e_c_t_o_r_:_:_G_r_i_d │ │ │ │ │ +G Grid │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainervector.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_r_i_d │ │ │ │ │ +[ provides Dune::Grid ] │ │ │ │ │ +DDeeffiinniittiioonn yaspgrid.hh:163 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ │ +IndexType index(const Entity &e) const │ │ │ │ │ +Map entity to index. The result of calling this method with an entity that is │ │ │ │ │ +not in the index set is... │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(int) const │ │ │ │ │ +Return total number of entities of given geometry type in entity set . │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +IndexType subIndex(const Entity &e, int i, unsigned int codim) const │ │ │ │ │ +Map a subentity to an index. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x │ │ │ │ │ +YaspPersistentContainerIndex(const Grid &grid, int codim) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_I_n_d_e_x_:_:_I_n_d_e_x_T_y_p_e │ │ │ │ │ +std::size_t IndexType │ │ │ │ │ +The type used for the indices. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _>_:_:_G_r_i_d │ │ │ │ │ +Base::Grid Grid │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _>_:_:_V_a_l_u_e │ │ │ │ │ +Base::Value Value │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r_<_ _Y_a_s_p_G_r_i_d_<_ _d_i_m_,_ _C_o_o_r_d_C_o_n_t_ _>_,_ _T_ _>_:_:_P_e_r_s_i_s_t_e_n_t_C_o_n_t_a_i_n_e_r │ │ │ │ │ +PersistentContainer(const Grid &grid, int codim, const Value &value=Value()) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridpersistentcontainer.hh:114 │ │ │ │ │ +_p_e_r_s_i_s_t_e_n_t_c_o_n_t_a_i_n_e_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00701_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html │ │ │ │┄ Files 14% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.hh Source File │ │ │ │ +dune-grid: boundarydom.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,522 +70,419 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
macrodata.hh
│ │ │ │ +
boundarydom.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_ALBERTA_MACRODATA_HH
│ │ │ │ -
6#define DUNE_ALBERTA_MACRODATA_HH
│ │ │ │ +
5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ │
7
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14#include <dune/common/fmatrix.hh>
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │
15
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20#if HAVE_ALBERTA
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
18
│ │ │ │ +
19 namespace dgf
│ │ │ │ +
20 {
│ │ │ │
21
│ │ │ │ -
22namespace Dune
│ │ │ │ -
23{
│ │ │ │ -
24
│ │ │ │ -
25 namespace Alberta
│ │ │ │ -
26 {
│ │ │ │ -
27
│ │ │ │ -
28 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31 typedef MacroData< dim > This;
│ │ │ │ -
32
│ │ │ │ -
33 typedef ALBERTA MACRO_DATA Data;
│ │ │ │ -
34
│ │ │ │ -
35 static const int dimension = dim;
│ │ │ │ -
36 static const int numVertices = NumSubEntities< dimension, dimension >::value;
│ │ │ │ -
37 static const int numEdges = NumSubEntities< dimension, dimension-1 >::value;
│ │ │ │ -
38
│ │ │ │ -
39 static const int initialSize = 4096;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ + │ │ │ │ +
25
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 : id_( 0 ),
│ │ │ │ +
28 parameter_( DGFBoundaryParameter::defaultValue() ),
│ │ │ │ +
29 defaultData_( false )
│ │ │ │ +
30 { }
│ │ │ │ +
│ │ │ │ +
31
│ │ │ │ + │ │ │ │ +
33
│ │ │ │ +
34 // constructor
│ │ │ │ +
│ │ │ │ +
35 DomainData ( int id, BoundaryParameter parameter, bool defaultData = false )
│ │ │ │ +
36 : id_( id ),
│ │ │ │ +
37 parameter_( parameter ),
│ │ │ │ +
38 defaultData_( defaultData )
│ │ │ │ +
39 { }
│ │ │ │ +
│ │ │ │
40
│ │ │ │ -
41 public:
│ │ │ │ -
42 template< int >
│ │ │ │ -
43 struct Library;
│ │ │ │ -
44
│ │ │ │ -
45 template< int > friend struct InstantiateMacroDataLibrary;
│ │ │ │ +
41 // return id
│ │ │ │ +
│ │ │ │ +
42 int id () const
│ │ │ │ +
43 {
│ │ │ │ +
44 return id_;
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │
46
│ │ │ │ -
47 public:
│ │ │ │ -
48 typedef int ElementId[ numVertices ];
│ │ │ │ -
49
│ │ │ │ -
50 static const int supportPeriodicity = 1;
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53 : data_( NULL ),
│ │ │ │ -
54 vertexCount_( -1 ),
│ │ │ │ -
55 elementCount_( -1 )
│ │ │ │ -
56 {}
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
58 operator Data * () const
│ │ │ │ -
59 {
│ │ │ │ -
60 return data_;
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ -
63 int vertexCount () const
│ │ │ │ -
64 {
│ │ │ │ -
65 return (vertexCount_ < 0 ? data_->n_total_vertices : vertexCount_);
│ │ │ │ -
66 }
│ │ │ │ +
47 // return true, if additional parameters given
│ │ │ │ +
│ │ │ │ +
48 bool hasParameter () const
│ │ │ │ +
49 {
│ │ │ │ +
50 return (!parameter_.empty());
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
53 // return additional parameters
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return parameter_;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
59 // reset data
│ │ │ │ +
│ │ │ │ +
60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )
│ │ │ │ +
61 {
│ │ │ │ +
62 id_ = id;
│ │ │ │ +
63 parameter_ = parameter;
│ │ │ │ +
64 defaultData_ = defaultData;
│ │ │ │ +
65 }
│ │ │ │
│ │ │ │ -
67
│ │ │ │ +
66
│ │ │ │ +
67 // returns true if data origins from default boundary domain
│ │ │ │
│ │ │ │ -
68 int elementCount () const
│ │ │ │ +
68 bool isDefault () const
│ │ │ │
69 {
│ │ │ │ -
70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_);
│ │ │ │ +
70 return defaultData_;
│ │ │ │
71 }
│ │ │ │
│ │ │ │
72
│ │ │ │ -
│ │ │ │ -
73 ElementId &element ( int i ) const;
│ │ │ │ -
│ │ │ │ -
74 GlobalVector &vertex ( int i ) const;
│ │ │ │ -
│ │ │ │ -
75 int &neighbor ( int element, int i ) const;
│ │ │ │ -
│ │ │ │ -
76 BoundaryId &boundaryId ( int element, int i ) const;
│ │ │ │ -
77
│ │ │ │ -
│ │ │ │ -
82 void create ();
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ -
92 void finalize ();
│ │ │ │ +
│ │ │ │ +
73 friend std::ostream & operator<< ( std :: ostream & os, const DomainData & ddata )
│ │ │ │ +
74 {
│ │ │ │ +
75 os << "domain data: id = " << ddata.id();
│ │ │ │ +
76 if( ddata.hasParameter() )
│ │ │ │ +
77 os << ", parameter = " << ddata.parameter();
│ │ │ │ +
78 return os;
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81 private:
│ │ │ │ +
82 int id_;
│ │ │ │ +
83 BoundaryParameter parameter_;
│ │ │ │ +
84 bool defaultData_;
│ │ │ │ +
85
│ │ │ │ +
86 }; // end struct DomainData
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
89 struct Domain
│ │ │ │ +
90 {
│ │ │ │ +
91 // dimension of world coordinates
│ │ │ │ +
92 const int dimensionworld;
│ │ │ │
93
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
112 void setOrientation ( const Real orientation );
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
124 bool checkNeighbors () const;
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ -
127 void release ()
│ │ │ │ -
128 {
│ │ │ │ -
129 if( data_ != NULL )
│ │ │ │ -
130 {
│ │ │ │ -
131 ALBERTA free_macro_data( data_ );
│ │ │ │ -
132 data_ = NULL;
│ │ │ │ -
133 }
│ │ │ │ -
134 vertexCount_ = elementCount_ = -1;
│ │ │ │ -
135 }
│ │ │ │ -
│ │ │ │ -
136
│ │ │ │ -
│ │ │ │ -
142 int insertElement ( const ElementId &id );
│ │ │ │ -
143
│ │ │ │ -
│ │ │ │ -
149 int insertVertex ( const GlobalVector &coords )
│ │ │ │ -
150 {
│ │ │ │ -
151 assert( vertexCount_ >= 0 );
│ │ │ │ -
152 if( vertexCount_ >= data_->n_total_vertices )
│ │ │ │ -
153 resizeVertices( 2*vertexCount_ );
│ │ │ │ -
154 copy( coords, vertex( vertexCount_ ) );
│ │ │ │ -
155 return vertexCount_++;
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
│ │ │ │ -
163 int insertVertex ( const FieldVector< Real, dimWorld > &coords )
│ │ │ │ -
164 {
│ │ │ │ -
165 assert( vertexCount_ >= 0 );
│ │ │ │ -
166 if( vertexCount_ >= data_->n_total_vertices )
│ │ │ │ -
167 resizeVertices( 2*vertexCount_ );
│ │ │ │ -
168 copy( coords, vertex( vertexCount_ ) );
│ │ │ │ -
169 return vertexCount_++;
│ │ │ │ -
170 }
│ │ │ │ -
│ │ │ │ -
171
│ │ │ │ -
│ │ │ │ -
172 void insertWallTrafo ( const GlobalMatrix &m, const GlobalVector &t );
│ │ │ │ -
│ │ │ │ -
173 void insertWallTrafo ( const FieldMatrix< Real, dimWorld, dimWorld > &matrix,
│ │ │ │ -
174 const FieldVector< Real, dimWorld > &shift );
│ │ │ │ -
175
│ │ │ │ -
│ │ │ │ -
176 void checkCycles ();
│ │ │ │ -
177
│ │ │ │ -
│ │ │ │ -
178 void read ( const std::string &filename, bool binary = false );
│ │ │ │ -
179
│ │ │ │ -
│ │ │ │ -
180 bool write ( const std::string &filename, bool binary = false ) const
│ │ │ │ -
181 {
│ │ │ │ -
182 if( binary )
│ │ │ │ -
183 return ALBERTA write_macro_data_xdr( data_, filename.c_str() );
│ │ │ │ -
184 else
│ │ │ │ -
185 return ALBERTA write_macro_data( data_, filename.c_str() );
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
188 private:
│ │ │ │ -
189 template< class Vector >
│ │ │ │ -
190 void copy ( const Vector &x, GlobalVector &y )
│ │ │ │ -
191 {
│ │ │ │ -
192 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ -
193 y[ i ] = x[ i ];
│ │ │ │ -
194 }
│ │ │ │ -
195
│ │ │ │ -
196 void resizeElements ( const int newSize );
│ │ │ │ + │ │ │ │ +
95
│ │ │ │ +
96 // constructor
│ │ │ │ +
│ │ │ │ +
97 Domain( std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter & parameter )
│ │ │ │ +
98 : dimensionworld( p1.size() ),
│ │ │ │ +
99 left_( p1 ),
│ │ │ │ +
100 right_( p2 ),
│ │ │ │ +
101 data_( id, parameter )
│ │ │ │ +
102 {
│ │ │ │ +
103 if( int( p2.size() ) != dimensionworld )
│ │ │ │ +
104 {
│ │ │ │ +
105 DUNE_THROW(DGFException,
│ │ │ │ +
106 "ERROR in " << *this << "!");
│ │ │ │ +
107 }
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
110 // constructor
│ │ │ │ +
│ │ │ │ +
111 Domain( std::vector< double > p1, std::vector< double > p2, DomainData & data )
│ │ │ │ +
112 : dimensionworld( p1.size() ),
│ │ │ │ +
113 left_( p1 ),
│ │ │ │ +
114 right_( p2 ),
│ │ │ │ +
115 data_( data )
│ │ │ │ +
116 {
│ │ │ │ +
117 if( int( p2.size() ) != dimensionworld )
│ │ │ │ +
118 {
│ │ │ │ +
119 DUNE_THROW(DGFException,
│ │ │ │ +
120 "ERROR in " << *this << "!");
│ │ │ │ +
121 }
│ │ │ │ +
122 }
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
124 // copy constructor
│ │ │ │ +
│ │ │ │ +
125 Domain ( const Domain & other )
│ │ │ │ + │ │ │ │ +
127 left_( other.left_ ),
│ │ │ │ +
128 right_( other.right_ ),
│ │ │ │ +
129 data_( other.data_ )
│ │ │ │ +
130 {
│ │ │ │ +
131 if( dimensionworld != other.dimensionworld )
│ │ │ │ +
132 {
│ │ │ │ +
133 DUNE_THROW(DGFException,
│ │ │ │ +
134 "ERROR in " << *this << "!");
│ │ │ │ +
135 }
│ │ │ │ +
136 }
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
138 // assignment
│ │ │ │ +
│ │ │ │ +
139 Domain & operator = ( const Domain & other )
│ │ │ │ +
140 {
│ │ │ │ +
141 if( dimensionworld != other.dimensionworld )
│ │ │ │ +
142 {
│ │ │ │ +
143 DUNE_THROW(DGFException,
│ │ │ │ +
144 "ERROR in " << *this << "!");
│ │ │ │ +
145 }
│ │ │ │ +
146
│ │ │ │ +
147 left_ = other.left_;
│ │ │ │ +
148 right_= other.right_;
│ │ │ │ +
149 data_= other.data_;
│ │ │ │ +
150 return *this;
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │ +
152
│ │ │ │ +
153 // return true if point is contained in boundary domain
│ │ │ │ +
154 template< class Vector >
│ │ │ │ +
│ │ │ │ +
155 bool contains ( const Vector & x ) const
│ │ │ │ +
156 {
│ │ │ │ +
157 bool ret = true;
│ │ │ │ +
158 for( int i = 0; i < dimensionworld; ++i )
│ │ │ │ +
159 {
│ │ │ │ +
160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] )
│ │ │ │ +
161 ret = false;
│ │ │ │ +
162 }
│ │ │ │ +
163 return ret;
│ │ │ │ +
164 }
│ │ │ │ +
│ │ │ │ +
165
│ │ │ │ +
│ │ │ │ +
166 const DomainData & data () const
│ │ │ │ +
167 {
│ │ │ │ +
168 return data_;
│ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │ +
170
│ │ │ │ +
171 // for error messages
│ │ │ │ +
│ │ │ │ +
172 friend std::ostream & operator<< ( std :: ostream &os, const Domain & domain )
│ │ │ │ +
173 {
│ │ │ │ +
174 os << "domain: " << std::endl;
│ │ │ │ +
175 os << "left = ";
│ │ │ │ +
176 for( int i = 0; i < domain.dimensionworld; ++i )
│ │ │ │ +
177 os << domain.left_[ i ] << " ";
│ │ │ │ +
178 os << std::endl;
│ │ │ │ +
179 os << "right = ";
│ │ │ │ +
180 for( int i = 0; i < domain.dimensionworld; ++i )
│ │ │ │ +
181 os << domain.right_[ i ] << " ";
│ │ │ │ +
182 os << std::endl;
│ │ │ │ +
183 os << domain.data();
│ │ │ │ +
184 return os;
│ │ │ │ +
185 }
│ │ │ │ +
│ │ │ │ +
186
│ │ │ │ +
187 private:
│ │ │ │ +
188 std::vector< double > left_, right_;
│ │ │ │ +
189 DomainData data_;
│ │ │ │ +
190
│ │ │ │ +
191 };
│ │ │ │ +
│ │ │ │ +
192
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
194 : public BasicBlock
│ │ │ │ +
195 {
│ │ │ │ +
196 typedef DGFBoundaryParameter::type BoundaryParameter;
│ │ │ │
197
│ │ │ │ -
198 void resizeVertices ( const int newSize )
│ │ │ │ -
199 {
│ │ │ │ -
200 const int oldSize = data_->n_total_vertices;
│ │ │ │ -
201 data_->n_total_vertices = newSize;
│ │ │ │ -
202 data_->coords = memReAlloc< GlobalVector >( data_->coords, oldSize, newSize );
│ │ │ │ -
203 assert( (data_->coords != NULL) || (newSize == 0) );
│ │ │ │ -
204 }
│ │ │ │ -
205
│ │ │ │ -
206 private:
│ │ │ │ -
207 Data *data_;
│ │ │ │ -
208 int vertexCount_;
│ │ │ │ -
209 int elementCount_;
│ │ │ │ -
210 };
│ │ │ │ -
211
│ │ │ │ -
212
│ │ │ │ -
213
│ │ │ │ -
214 // MacroData::Library
│ │ │ │ -
215 // ------------------
│ │ │ │ -
216
│ │ │ │ -
217 template< int dim >
│ │ │ │ -
218 template< int >
│ │ │ │ -
│ │ │ │ -
219 struct MacroData< dim >::Library
│ │ │ │ -
220 {
│ │ │ │ - │ │ │ │ -
222
│ │ │ │ -
223 static bool checkNeighbors ( const MacroData &macroData );
│ │ │ │ -
224 static void markLongestEdge ( MacroData &macroData );
│ │ │ │ -
225 static void setOrientation ( [[maybe_unused]] MacroData &macroData,
│ │ │ │ -
226 [[maybe_unused]] const Real orientation );
│ │ │ │ -
227
│ │ │ │ -
228 private:
│ │ │ │ -
229 static Real edgeLength ( const MacroData &macroData, const ElementId &e, int edge );
│ │ │ │ -
230 static int longestEdge ( const MacroData &macroData, const ElementId &e );
│ │ │ │ -
231
│ │ │ │ -
232 template< class Type >
│ │ │ │ -
233 static void rotate ( Type *array, int i, int shift );
│ │ │ │ +
198 // the dimension of the vertices (is given from user)
│ │ │ │ +
199 int dimworld_;
│ │ │ │ +
200
│ │ │ │ +
201 // internal counter
│ │ │ │ +
202 int counter_;
│ │ │ │ +
203
│ │ │ │ +
204 // default values if given
│ │ │ │ +
205 DomainData * default_;
│ │ │ │ +
206
│ │ │ │ +
207 // storage for all domains;
│ │ │ │ +
208 int ndomains_;
│ │ │ │ +
209 std::vector< Domain > domains_;
│ │ │ │ +
210
│ │ │ │ +
211 public:
│ │ │ │ +
212 // initialize vertex block and get first vertex
│ │ │ │ +
213 BoundaryDomBlock ( std::istream & in, int cdimworld );
│ │ │ │ +
214
│ │ │ │ +
215 // destructor
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
217 {
│ │ │ │ +
218 if( default_ )
│ │ │ │ +
219 delete default_;
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221
│ │ │ │ +
222 // go to next domain in block
│ │ │ │ +
│ │ │ │ +
223 bool next ()
│ │ │ │ +
224 {
│ │ │ │ +
225 counter_++;
│ │ │ │ +
226 return ( counter_ < ndomains_ );
│ │ │ │ +
227 }
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
229 // return domain
│ │ │ │ +
│ │ │ │ +
230 const Domain & domain () const
│ │ │ │ +
231 {
│ │ │ │ +
232 return domains_.at( counter_ );
│ │ │ │ +
233 }
│ │ │ │ +
│ │ │ │
234
│ │ │ │ -
235 static void rotate ( MacroData &macroData, int i, int shift );
│ │ │ │ -
236 static void swap ( MacroData &macroData, int el, int v1, int v2 );
│ │ │ │ -
237 };
│ │ │ │ +
235 // return true if default is given
│ │ │ │ +
│ │ │ │ +
236 bool hasDefaultData () const
│ │ │ │ +
237 {
│ │ │ │ +
238 return bool( default_ );
│ │ │ │ +
239 }
│ │ │ │
│ │ │ │ -
238
│ │ │ │ -
239
│ │ │ │
240
│ │ │ │ -
241 // Implementation of MacroData
│ │ │ │ -
242 // ---------------------------
│ │ │ │ -
243
│ │ │ │ -
244 template< int dim >
│ │ │ │ -
245 inline typename MacroData< dim >::ElementId &
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
247 {
│ │ │ │ -
248 assert( (i >= 0) && (i < data_->n_macro_elements) );
│ │ │ │ -
249 const int offset = i * numVertices;
│ │ │ │ -
250 return *reinterpret_cast< ElementId * >( data_->mel_vertices + offset );
│ │ │ │ -
251 }
│ │ │ │ -
│ │ │ │ -
252
│ │ │ │ -
253
│ │ │ │ -
254 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
256 {
│ │ │ │ -
257 assert( (i >= 0) && (i < data_->n_total_vertices) );
│ │ │ │ -
258 return data_->coords[ i ];
│ │ │ │ -
259 }
│ │ │ │ -
│ │ │ │ -
260
│ │ │ │ -
261
│ │ │ │ -
262 template< int dim >
│ │ │ │ -
│ │ │ │ -
263 inline int &MacroData< dim >::neighbor ( int element, int i ) const
│ │ │ │ -
264 {
│ │ │ │ -
265 assert( (element >= 0) && (element < data_->n_macro_elements) );
│ │ │ │ -
266 assert( (i >= 0) && (i < numVertices) );
│ │ │ │ -
267 return data_->neigh[ element*numVertices + i ];
│ │ │ │ -
268 }
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
270
│ │ │ │ -
271 template< int dim >
│ │ │ │ -
│ │ │ │ -
272 inline BoundaryId &MacroData< dim >::boundaryId ( int element, int i ) const
│ │ │ │ -
273 {
│ │ │ │ -
274 assert( (element >= 0) && (element < data_->n_macro_elements) );
│ │ │ │ -
275 assert( (i >= 0) && (i < numVertices) );
│ │ │ │ -
276 return data_->boundary[ element*numVertices + i ];
│ │ │ │ -
277 }
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
279
│ │ │ │ -
280 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
282 {
│ │ │ │ -
283 release();
│ │ │ │ -
284 data_ = ALBERTA alloc_macro_data( dim, initialSize, initialSize );
│ │ │ │ -
285 data_->boundary = memAlloc< BoundaryId >( initialSize*numVertices );
│ │ │ │ -
286 if( dim == 3 )
│ │ │ │ -
287 data_->el_type = memAlloc< ElementType >( initialSize );
│ │ │ │ -
288 vertexCount_ = elementCount_ = 0;
│ │ │ │ -
289 elementCount_ = 0;
│ │ │ │ -
290 }
│ │ │ │ -
│ │ │ │ +
241 // return default data
│ │ │ │ +
│ │ │ │ +
242 const DomainData * defaultData () const
│ │ │ │ +
243 {
│ │ │ │ +
244 return default_;
│ │ │ │ +
245 }
│ │ │ │ +
│ │ │ │ +
246
│ │ │ │ +
247 // return true if any boundary domain block has
│ │ │ │ +
248 // additional parameters
│ │ │ │ +
249 bool hasParameter () const;
│ │ │ │ +
250
│ │ │ │ +
│ │ │ │ +
251 void reset ()
│ │ │ │ +
252 {
│ │ │ │ + │ │ │ │ +
254 counter_ = -1;
│ │ │ │ +
255 }
│ │ │ │ +
│ │ │ │ +
256
│ │ │ │ +
257 // return true while block is active
│ │ │ │ +
│ │ │ │ +
258 bool ok ()
│ │ │ │ +
259 {
│ │ │ │ +
260 return ( counter_ <= ndomains_ );
│ │ │ │ +
261 }
│ │ │ │ +
│ │ │ │ +
262
│ │ │ │ +
263 // return data if all vectors in array are contained within
│ │ │ │ +
264 // a single domain
│ │ │ │ +
265 template< class Vector >
│ │ │ │ +
│ │ │ │ +
266 const DomainData * contains ( const std::vector< Vector > & v ) const
│ │ │ │ +
267 {
│ │ │ │ +
268 std::vector< int > index( ndomains_ );
│ │ │ │ +
269 for( int i = 0; i < ndomains_; ++i)
│ │ │ │ +
270 index[ i ] = i;
│ │ │ │ +
271
│ │ │ │ +
272 size_t N = v.size();
│ │ │ │ +
273 for( size_t i = 0; i < N; ++i )
│ │ │ │ +
274 {
│ │ │ │ +
275 if( index.empty() )
│ │ │ │ +
276 break;
│ │ │ │ +
277
│ │ │ │ +
278 const int n = index.size();
│ │ │ │ +
279 assert( n > 0 );
│ │ │ │ +
280 for( int j = n-1; j >= 0; --j )
│ │ │ │ +
281 {
│ │ │ │ +
282 bool inside = domains_[ index[ j ] ].contains( v[ i ] );
│ │ │ │ +
283 if( !inside )
│ │ │ │ +
284 index.erase( index.begin() + j );
│ │ │ │ +
285 }
│ │ │ │ +
286 }
│ │ │ │ +
287
│ │ │ │ +
288 // check wheter no boundary domain found
│ │ │ │ +
289 if( index.empty() )
│ │ │ │ +
290 return default_;
│ │ │ │
291
│ │ │ │ -
292
│ │ │ │ -
293 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
295 {
│ │ │ │ -
296 if( (vertexCount_ >= 0) && (elementCount_ >= 0) )
│ │ │ │ -
297 {
│ │ │ │ -
298 resizeVertices( vertexCount_ );
│ │ │ │ -
299 resizeElements( elementCount_ );
│ │ │ │ -
300 ALBERTA compute_neigh_fast( data_ );
│ │ │ │ -
301
│ │ │ │ -
302 // assign default boundary id (if none is assigned)
│ │ │ │ -
303 for( int element = 0; element < elementCount_; ++element )
│ │ │ │ -
304 {
│ │ │ │ -
305 for( int i = 0; i < numVertices; ++i )
│ │ │ │ -
306 {
│ │ │ │ -
307 BoundaryId &id = boundaryId( element, i );
│ │ │ │ -
308 if( neighbor( element, i ) >= 0 )
│ │ │ │ -
309 {
│ │ │ │ -
310 assert( id == InteriorBoundary );
│ │ │ │ -
311 id = InteriorBoundary;
│ │ │ │ -
312 }
│ │ │ │ -
313 else
│ │ │ │ -
314 id = (id == InteriorBoundary ? DirichletBoundary : id);
│ │ │ │ -
315 }
│ │ │ │ -
316 }
│ │ │ │ -
317
│ │ │ │ -
318 vertexCount_ = elementCount_ = -1;
│ │ │ │ -
319 }
│ │ │ │ -
320 assert( (vertexCount_ < 0) && (elementCount_ < 0) );
│ │ │ │ -
321 }
│ │ │ │ -
│ │ │ │ -
322
│ │ │ │ -
323
│ │ │ │ -
324 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
326 {
│ │ │ │ - │ │ │ │ -
328 }
│ │ │ │ -
│ │ │ │ -
329
│ │ │ │ -
330
│ │ │ │ -
331 template< int dim >
│ │ │ │ -
│ │ │ │ -
332 inline void MacroData< dim >::setOrientation ( const Real orientation )
│ │ │ │ -
333 {
│ │ │ │ -
334 Library< dimWorld >::setOrientation( *this, orientation );
│ │ │ │ -
335 }
│ │ │ │ -
│ │ │ │ -
336
│ │ │ │ -
337
│ │ │ │ -
338 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
340 {
│ │ │ │ - │ │ │ │ -
342 }
│ │ │ │ -
│ │ │ │ -
343
│ │ │ │ -
344
│ │ │ │ -
345 template< int dim >
│ │ │ │ -
│ │ │ │ -
346 inline int MacroData< dim >::insertElement ( const ElementId &id )
│ │ │ │ -
347 {
│ │ │ │ -
348 assert( elementCount_ >= 0 );
│ │ │ │ -
349 if( elementCount_ >= data_->n_macro_elements )
│ │ │ │ -
350 resizeElements( 2*elementCount_ );
│ │ │ │ -
351
│ │ │ │ -
352 ElementId &e = element( elementCount_ );
│ │ │ │ -
353 for( int i = 0; i < numVertices; ++i )
│ │ │ │ -
354 {
│ │ │ │ -
355 e[ i ] = id[ i ];
│ │ │ │ -
356 boundaryId( elementCount_, i ) = InteriorBoundary;
│ │ │ │ -
357 }
│ │ │ │ -
358 if( dim == 3 )
│ │ │ │ -
359 data_->el_type[ elementCount_ ] = 0;
│ │ │ │ -
360
│ │ │ │ -
361 return elementCount_++;
│ │ │ │ -
362 }
│ │ │ │ -
│ │ │ │ -
363
│ │ │ │ -
364
│ │ │ │ -
365 template< int dim >
│ │ │ │ -
366 inline void MacroData< dim >
│ │ │ │ -
│ │ │ │ -
367 ::insertWallTrafo ( const GlobalMatrix &matrix, const GlobalVector &shift )
│ │ │ │ -
368 {
│ │ │ │ -
369 int &count = data_->n_wall_trafos;
│ │ │ │ -
370 AffineTransformation *&array = data_->wall_trafos;
│ │ │ │ -
371
│ │ │ │ -
372 // resize wall trafo array
│ │ │ │ -
373 array = memReAlloc< AffineTransformation >( array, count, count+1 );
│ │ │ │ -
374 assert( data_->wall_trafos != NULL );
│ │ │ │ -
375
│ │ │ │ -
376 // copy matrix and shift
│ │ │ │ -
377 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ -
378 copy( matrix[ i ], array[ count ].M[ i ] );
│ │ │ │ -
379 copy( shift, array[ count ].t );
│ │ │ │ -
380 ++count;
│ │ │ │ -
381 }
│ │ │ │ -
│ │ │ │ -
382
│ │ │ │ -
383 template< int dim >
│ │ │ │ -
384 inline void MacroData< dim >
│ │ │ │ -
│ │ │ │ -
385 ::insertWallTrafo ( const FieldMatrix< Real, dimWorld, dimWorld > &matrix,
│ │ │ │ -
386 const FieldVector< Real, dimWorld > &shift )
│ │ │ │ -
387 {
│ │ │ │ -
388 int &count = data_->n_wall_trafos;
│ │ │ │ -
389 AffineTransformation *&array = data_->wall_trafos;
│ │ │ │ -
390
│ │ │ │ -
391 // resize wall trafo array
│ │ │ │ -
392 array = memReAlloc< AffineTransformation >( array, count, count+1 );
│ │ │ │ -
393 assert( data_->wall_trafos != NULL );
│ │ │ │ -
394
│ │ │ │ -
395 // copy matrix and shift
│ │ │ │ -
396 for( int i = 0; i < dimWorld; ++i )
│ │ │ │ -
397 copy( matrix[ i ], array[ count ].M[ i ] );
│ │ │ │ -
398 copy( shift, array[ count ].t );
│ │ │ │ -
399 ++count;
│ │ │ │ -
400 }
│ │ │ │ -
│ │ │ │ -
401
│ │ │ │ -
402
│ │ │ │ -
403 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
405 {
│ │ │ │ -
406 // ensure that the macro data has been finalized
│ │ │ │ -
407 finalize();
│ │ │ │ -
408 ALBERTA macro_test( data_, NULL );
│ │ │ │ -
409 }
│ │ │ │ -
│ │ │ │ -
410
│ │ │ │ -
411
│ │ │ │ -
412 template< int dim >
│ │ │ │ -
│ │ │ │ -
413 inline void MacroData< dim >::read ( const std::string &filename, bool binary )
│ │ │ │ -
414 {
│ │ │ │ -
415 release();
│ │ │ │ -
416 if( binary )
│ │ │ │ -
417 data_ = ALBERTA read_macro_xdr( filename.c_str() );
│ │ │ │ -
418 else
│ │ │ │ -
419 data_ = ALBERTA read_macro( filename.c_str() );
│ │ │ │ -
420 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
421
│ │ │ │ -
422
│ │ │ │ -
423 template< int dim >
│ │ │ │ -
424 inline void MacroData< dim >::resizeElements ( const int newSize )
│ │ │ │ -
425 {
│ │ │ │ -
426 const int oldSize = data_->n_macro_elements;
│ │ │ │ -
427 data_->n_macro_elements = newSize;
│ │ │ │ -
428 data_->mel_vertices = memReAlloc( data_->mel_vertices, oldSize*numVertices, newSize*numVertices );
│ │ │ │ -
429 data_->boundary = memReAlloc( data_->boundary, oldSize*numVertices, newSize*numVertices );
│ │ │ │ -
430 if( dim == 3 )
│ │ │ │ -
431 data_->el_type = memReAlloc( data_->el_type, oldSize, newSize );
│ │ │ │ -
432 assert( (newSize == 0) || (data_->mel_vertices != NULL) );
│ │ │ │ -
433 }
│ │ │ │ -
434
│ │ │ │ -
435 }
│ │ │ │ -
436
│ │ │ │ -
437}
│ │ │ │ -
438
│ │ │ │ -
439#endif // #if HAVE_ALBERTA
│ │ │ │ -
440
│ │ │ │ -
441#endif
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
292 // check for ambiguity
│ │ │ │ +
293 if( index.size() > 1 )
│ │ │ │ +
294 dwarn << "WARNING: ambiguous boundary domain assignment, use first boundary domain in list" << std::endl;
│ │ │ │ +
295
│ │ │ │ +
296 return &domains_[ index[ 0 ] ].data();
│ │ │ │ +
297 }
│ │ │ │ +
│ │ │ │ +
298
│ │ │ │ +
299 private:
│ │ │ │ +
300 void readBlock ();
│ │ │ │ +
301 };
│ │ │ │ +
│ │ │ │ +
302
│ │ │ │ +
303 } // end namespace dgf
│ │ │ │ +
304
│ │ │ │ +
305} // end namespace Dune
│ │ │ │ +
306
│ │ │ │ +
307#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ │ -
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ │ -
ALBERTA BNDRY_TYPE BoundaryId
Definition misc.hh:61
│ │ │ │ -
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ -
Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
Definition misc.hh:85
│ │ │ │ -
static const int DirichletBoundary
Definition misc.hh:60
│ │ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ │ -
Definition macrodata.hh:30
│ │ │ │ -
friend struct InstantiateMacroDataLibrary
Definition macrodata.hh:45
│ │ │ │ -
BoundaryId & boundaryId(int element, int i) const
Definition macrodata.hh:272
│ │ │ │ -
int insertVertex(const GlobalVector &coords)
insert vertex
Definition macrodata.hh:149
│ │ │ │ -
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ │ -
static const int supportPeriodicity
Definition macrodata.hh:50
│ │ │ │ -
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ │ -
int elementCount() const
Definition macrodata.hh:68
│ │ │ │ -
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ │ -
int vertexCount() const
Definition macrodata.hh:63
│ │ │ │ -
void markLongestEdge()
mark the longest edge of all elements as refinement edges
Definition macrodata.hh:325
│ │ │ │ -
int insertVertex(const FieldVector< Real, dimWorld > &coords)
insert vertex
Definition macrodata.hh:163
│ │ │ │ -
bool checkNeighbors() const
check the neighbor information
Definition macrodata.hh:339
│ │ │ │ -
void insertWallTrafo(const FieldMatrix< Real, dimWorld, dimWorld > &matrix, const FieldVector< Real, dimWorld > &shift)
Definition macrodata.hh:385
│ │ │ │ -
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ │ -
void checkCycles()
Definition macrodata.hh:404
│ │ │ │ -
int & neighbor(int element, int i) const
Definition macrodata.hh:263
│ │ │ │ -
MacroData()
Definition macrodata.hh:52
│ │ │ │ -
void finalize()
compress macro data structure
Definition macrodata.hh:294
│ │ │ │ -
void insertWallTrafo(const GlobalMatrix &m, const GlobalVector &t)
Definition macrodata.hh:367
│ │ │ │ -
void setOrientation(const Real orientation)
set the orientation of all elements
Definition macrodata.hh:332
│ │ │ │ -
void create()
create a new macro data structure
Definition macrodata.hh:281
│ │ │ │ -
int insertElement(const ElementId &id)
insert element
Definition macrodata.hh:346
│ │ │ │ -
bool write(const std::string &filename, bool binary=false) const
Definition macrodata.hh:180
│ │ │ │ -
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ │ -
Definition macrodata.hh:220
│ │ │ │ -
static void markLongestEdge(MacroData &macroData)
│ │ │ │ -
Alberta::MacroData< dim > MacroData
Definition macrodata.hh:221
│ │ │ │ -
Definition misc.hh:148
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
void reset()
Definition basic.hh:51
│ │ │ │ +
Definition boundarydom.hh:23
│ │ │ │ +
void reset(int id, BoundaryParameter parameter, bool defaultData=false)
Definition boundarydom.hh:60
│ │ │ │ +
~DomainData()
Definition boundarydom.hh:32
│ │ │ │ +
DGFBoundaryParameter::type BoundaryParameter
Definition boundarydom.hh:24
│ │ │ │ +
DomainData()
Definition boundarydom.hh:26
│ │ │ │ +
int id() const
Definition boundarydom.hh:42
│ │ │ │ +
const BoundaryParameter & parameter() const
Definition boundarydom.hh:54
│ │ │ │ +
friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata)
Definition boundarydom.hh:73
│ │ │ │ +
bool hasParameter() const
Definition boundarydom.hh:48
│ │ │ │ +
DomainData(int id, BoundaryParameter parameter, bool defaultData=false)
Definition boundarydom.hh:35
│ │ │ │ +
bool isDefault() const
Definition boundarydom.hh:68
│ │ │ │ +
Definition boundarydom.hh:90
│ │ │ │ +
Domain(std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter &parameter)
Definition boundarydom.hh:97
│ │ │ │ +
Domain(const Domain &other)
Definition boundarydom.hh:125
│ │ │ │ +
const int dimensionworld
Definition boundarydom.hh:92
│ │ │ │ +
bool contains(const Vector &x) const
Definition boundarydom.hh:155
│ │ │ │ +
DGFBoundaryParameter::type BoundaryParameter
Definition boundarydom.hh:94
│ │ │ │ +
friend std::ostream & operator<<(std ::ostream &os, const Domain &domain)
Definition boundarydom.hh:172
│ │ │ │ +
Domain & operator=(const Domain &other)
Definition boundarydom.hh:139
│ │ │ │ +
const DomainData & data() const
Definition boundarydom.hh:166
│ │ │ │ +
Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data)
Definition boundarydom.hh:111
│ │ │ │ +
Definition boundarydom.hh:195
│ │ │ │ +
~BoundaryDomBlock()
Definition boundarydom.hh:216
│ │ │ │ +
bool hasParameter() const
Definition boundarydom.cc:138
│ │ │ │ +
const Domain & domain() const
Definition boundarydom.hh:230
│ │ │ │ +
const DomainData * contains(const std::vector< Vector > &v) const
Definition boundarydom.hh:266
│ │ │ │ +
bool next()
Definition boundarydom.hh:223
│ │ │ │ +
void reset()
Definition boundarydom.hh:251
│ │ │ │ +
bool ok()
Definition boundarydom.hh:258
│ │ │ │ +
bool hasDefaultData() const
Definition boundarydom.hh:236
│ │ │ │ +
const DomainData * defaultData() const
Definition boundarydom.hh:242
│ │ │ │ +
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
Contains types for additional features.
Definition parser.hh:23
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,531 +1,438 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -macrodata.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +boundarydom.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_ALBERTA_MACRODATA_HH │ │ │ │ │ -6#define DUNE_ALBERTA_MACRODATA_HH │ │ │ │ │ +5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +14 │ │ │ │ │ 15 │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ │ -19 │ │ │ │ │ -20#if HAVE_ALBERTA │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ +18 │ │ │ │ │ +19 namespace dgf │ │ │ │ │ +20 { │ │ │ │ │ 21 │ │ │ │ │ -22namespace _D_u_n_e │ │ │ │ │ -23{ │ │ │ │ │ -24 │ │ │ │ │ -25 namespace Alberta │ │ │ │ │ -26 { │ │ │ │ │ -27 │ │ │ │ │ -28 template< int dim > │ │ │ │ │ -_2_9 class _M_a_c_r_o_D_a_t_a │ │ │ │ │ -30 { │ │ │ │ │ -31 typedef _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ -32 │ │ │ │ │ -33 typedef _A_L_B_E_R_T_A MACRO_DATA Data; │ │ │ │ │ -34 │ │ │ │ │ -35 static const int dimension = dim; │ │ │ │ │ -36 static const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ │ -_v_a_l_u_e; │ │ │ │ │ -37 static const int numEdges = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dimension, dimension-1 >::value; │ │ │ │ │ -38 │ │ │ │ │ -39 static const int initialSize = 4096; │ │ │ │ │ +_2_2 struct _D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +23 { │ │ │ │ │ +_2_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ │ +25 │ │ │ │ │ +_2_6 _D_o_m_a_i_n_D_a_t_a () │ │ │ │ │ +27 : id_( 0 ), │ │ │ │ │ +28 parameter_( _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r::defaultValue() ), │ │ │ │ │ +29 defaultData_( false ) │ │ │ │ │ +30 { } │ │ │ │ │ +31 │ │ │ │ │ +_3_2 _~_D_o_m_a_i_n_D_a_t_a () { } │ │ │ │ │ +33 │ │ │ │ │ +34 // constructor │ │ │ │ │ +_3_5 _D_o_m_a_i_n_D_a_t_a ( int id, _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r _p_a_r_a_m_e_t_e_r, bool defaultData = false ) │ │ │ │ │ +36 : id_( _i_d ), │ │ │ │ │ +37 parameter_( _p_a_r_a_m_e_t_e_r ), │ │ │ │ │ +38 defaultData_( defaultData ) │ │ │ │ │ +39 { } │ │ │ │ │ 40 │ │ │ │ │ -41 public: │ │ │ │ │ -42 template< int > │ │ │ │ │ -43 struct _L_i_b_r_a_r_y; │ │ │ │ │ -44 │ │ │ │ │ -_4_5 template< int > friend struct _I_n_s_t_a_n_t_i_a_t_e_M_a_c_r_o_D_a_t_a_L_i_b_r_a_r_y; │ │ │ │ │ +41 // return id │ │ │ │ │ +_4_2 int _i_d () const │ │ │ │ │ +43 { │ │ │ │ │ +44 return id_; │ │ │ │ │ +45 } │ │ │ │ │ 46 │ │ │ │ │ -47 public: │ │ │ │ │ -_4_8 typedef int _E_l_e_m_e_n_t_I_d[ numVertices ]; │ │ │ │ │ -49 │ │ │ │ │ -_5_0 static const int _s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y = 1; │ │ │ │ │ -51 │ │ │ │ │ -_5_2 _M_a_c_r_o_D_a_t_a () │ │ │ │ │ -53 : data_( NULL ), │ │ │ │ │ -54 vertexCount_( -1 ), │ │ │ │ │ -55 elementCount_( -1 ) │ │ │ │ │ -56 {} │ │ │ │ │ -57 │ │ │ │ │ -_5_8 operator Data * () const │ │ │ │ │ -59 { │ │ │ │ │ -60 return data_; │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -_6_3 int _v_e_r_t_e_x_C_o_u_n_t () const │ │ │ │ │ -64 { │ │ │ │ │ -65 return (vertexCount_ < 0 ? data_->n_total_vertices : vertexCount_); │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 int _e_l_e_m_e_n_t_C_o_u_n_t () const │ │ │ │ │ +47 // return true, if additional parameters given │ │ │ │ │ +_4_8 bool _h_a_s_P_a_r_a_m_e_t_e_r () const │ │ │ │ │ +49 { │ │ │ │ │ +50 return (!parameter_.empty()); │ │ │ │ │ +51 } │ │ │ │ │ +52 │ │ │ │ │ +53 // return additional parameters │ │ │ │ │ +_5_4 const _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r & _p_a_r_a_m_e_t_e_r () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return parameter_; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +59 // reset data │ │ │ │ │ +_6_0 void _r_e_s_e_t ( int id, _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r _p_a_r_a_m_e_t_e_r, bool defaultData = false ) │ │ │ │ │ +61 { │ │ │ │ │ +62 id_ = _i_d; │ │ │ │ │ +63 parameter_ = _p_a_r_a_m_e_t_e_r; │ │ │ │ │ +64 defaultData_ = defaultData; │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +67 // returns true if data origins from default boundary domain │ │ │ │ │ +_6_8 bool _i_s_D_e_f_a_u_l_t () const │ │ │ │ │ 69 { │ │ │ │ │ -70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_); │ │ │ │ │ +70 return defaultData_; │ │ │ │ │ 71 } │ │ │ │ │ 72 │ │ │ │ │ -_7_3 _E_l_e_m_e_n_t_I_d &_e_l_e_m_e_n_t ( int i ) const; │ │ │ │ │ -_7_4 _G_l_o_b_a_l_V_e_c_t_o_r &_v_e_r_t_e_x ( int i ) const; │ │ │ │ │ -_7_5 int &_n_e_i_g_h_b_o_r ( int _e_l_e_m_e_n_t, int i ) const; │ │ │ │ │ -_7_6 _B_o_u_n_d_a_r_y_I_d &_b_o_u_n_d_a_r_y_I_d ( int _e_l_e_m_e_n_t, int i ) const; │ │ │ │ │ -77 │ │ │ │ │ -_8_2 void _c_r_e_a_t_e (); │ │ │ │ │ -83 │ │ │ │ │ -_9_2 void _f_i_n_a_l_i_z_e (); │ │ │ │ │ +_7_3 friend std::ostream & _o_p_e_r_a_t_o_r_<_<_ ( std :: ostream & os, const _D_o_m_a_i_n_D_a_t_a & │ │ │ │ │ +ddata ) │ │ │ │ │ +74 { │ │ │ │ │ +75 os << "domain data: id = " << ddata._i_d(); │ │ │ │ │ +76 if( ddata._h_a_s_P_a_r_a_m_e_t_e_r() ) │ │ │ │ │ +77 os << ", parameter = " << ddata._p_a_r_a_m_e_t_e_r(); │ │ │ │ │ +78 return os; │ │ │ │ │ +79 } │ │ │ │ │ +80 │ │ │ │ │ +81 private: │ │ │ │ │ +82 int id_; │ │ │ │ │ +83 _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r parameter_; │ │ │ │ │ +84 bool defaultData_; │ │ │ │ │ +85 │ │ │ │ │ +86 }; // end struct DomainData │ │ │ │ │ +87 │ │ │ │ │ +88 │ │ │ │ │ +_8_9 struct _D_o_m_a_i_n │ │ │ │ │ +90 { │ │ │ │ │ +91 // dimension of world coordinates │ │ │ │ │ +_9_2 const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ 93 │ │ │ │ │ -_1_0_2 void _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e (); │ │ │ │ │ -103 │ │ │ │ │ -_1_1_2 void _s_e_t_O_r_i_e_n_t_a_t_i_o_n ( const _R_e_a_l orientation ); │ │ │ │ │ -113 │ │ │ │ │ -_1_2_4 bool _c_h_e_c_k_N_e_i_g_h_b_o_r_s () const; │ │ │ │ │ -125 │ │ │ │ │ -_1_2_7 void _r_e_l_e_a_s_e () │ │ │ │ │ -128 { │ │ │ │ │ -129 if( data_ != NULL ) │ │ │ │ │ +_9_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ │ +95 │ │ │ │ │ +96 // constructor │ │ │ │ │ +_9_7 _D_o_m_a_i_n( std::vector< double > p1, std::vector< double > p2, int id, │ │ │ │ │ +_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r & parameter ) │ │ │ │ │ +98 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( p1.size() ), │ │ │ │ │ +99 left_( p1 ), │ │ │ │ │ +100 right_( p2 ), │ │ │ │ │ +101 data_( id, parameter ) │ │ │ │ │ +102 { │ │ │ │ │ +103 if( int( p2.size() ) != _d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ +104 { │ │ │ │ │ +105 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ +106 "ERROR in " << *this << "!"); │ │ │ │ │ +107 } │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +110 // constructor │ │ │ │ │ +_1_1_1 _D_o_m_a_i_n( std::vector< double > p1, std::vector< double > p2, _D_o_m_a_i_n_D_a_t_a & │ │ │ │ │ +_d_a_t_a ) │ │ │ │ │ +112 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( p1.size() ), │ │ │ │ │ +113 left_( p1 ), │ │ │ │ │ +114 right_( p2 ), │ │ │ │ │ +115 data_( _d_a_t_a ) │ │ │ │ │ +116 { │ │ │ │ │ +117 if( int( p2.size() ) != _d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ +118 { │ │ │ │ │ +119 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ +120 "ERROR in " << *this << "!"); │ │ │ │ │ +121 } │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +124 // copy constructor │ │ │ │ │ +_1_2_5 _D_o_m_a_i_n ( const _D_o_m_a_i_n & other ) │ │ │ │ │ +126 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( other._d_i_m_e_n_s_i_o_n_w_o_r_l_d ), │ │ │ │ │ +127 left_( other.left_ ), │ │ │ │ │ +128 right_( other.right_ ), │ │ │ │ │ +129 data_( other.data_ ) │ │ │ │ │ 130 { │ │ │ │ │ -131 _A_L_B_E_R_T_A free_macro_data( data_ ); │ │ │ │ │ -132 data_ = NULL; │ │ │ │ │ -133 } │ │ │ │ │ -134 vertexCount_ = elementCount_ = -1; │ │ │ │ │ +131 if( _d_i_m_e_n_s_i_o_n_w_o_r_l_d != other._d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ +132 { │ │ │ │ │ +133 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ +134 "ERROR in " << *this << "!"); │ │ │ │ │ 135 } │ │ │ │ │ -136 │ │ │ │ │ -_1_4_2 int _i_n_s_e_r_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_d &id ); │ │ │ │ │ -143 │ │ │ │ │ -_1_4_9 int _i_n_s_e_r_t_V_e_r_t_e_x ( const _G_l_o_b_a_l_V_e_c_t_o_r &coords ) │ │ │ │ │ -150 { │ │ │ │ │ -151 assert( vertexCount_ >= 0 ); │ │ │ │ │ -152 if( vertexCount_ >= data_->n_total_vertices ) │ │ │ │ │ -153 resizeVertices( 2*vertexCount_ ); │ │ │ │ │ -154 copy( coords, _v_e_r_t_e_x( vertexCount_ ) ); │ │ │ │ │ -155 return vertexCount_++; │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -_1_6_3 int _i_n_s_e_r_t_V_e_r_t_e_x ( const FieldVector< Real, dimWorld > &coords ) │ │ │ │ │ -164 { │ │ │ │ │ -165 assert( vertexCount_ >= 0 ); │ │ │ │ │ -166 if( vertexCount_ >= data_->n_total_vertices ) │ │ │ │ │ -167 resizeVertices( 2*vertexCount_ ); │ │ │ │ │ -168 copy( coords, _v_e_r_t_e_x( vertexCount_ ) ); │ │ │ │ │ -169 return vertexCount_++; │ │ │ │ │ -170 } │ │ │ │ │ -171 │ │ │ │ │ -_1_7_2 void _i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const _G_l_o_b_a_l_M_a_t_r_i_x &m, const _G_l_o_b_a_l_V_e_c_t_o_r &t ); │ │ │ │ │ -_1_7_3 void _i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const FieldMatrix< Real, dimWorld, dimWorld > │ │ │ │ │ -&matrix, │ │ │ │ │ -174 const FieldVector< Real, dimWorld > &shift ); │ │ │ │ │ -175 │ │ │ │ │ -_1_7_6 void _c_h_e_c_k_C_y_c_l_e_s (); │ │ │ │ │ -177 │ │ │ │ │ -_1_7_8 void _r_e_a_d ( const std::string &filename, bool binary = false ); │ │ │ │ │ -179 │ │ │ │ │ -_1_8_0 bool _w_r_i_t_e ( const std::string &filename, bool binary = false ) const │ │ │ │ │ -181 { │ │ │ │ │ -182 if( binary ) │ │ │ │ │ -183 return _A_L_B_E_R_T_A write_macro_data_xdr( data_, filename.c_str() ); │ │ │ │ │ -184 else │ │ │ │ │ -185 return _A_L_B_E_R_T_A write_macro_data( data_, filename.c_str() ); │ │ │ │ │ -186 } │ │ │ │ │ -187 │ │ │ │ │ -188 private: │ │ │ │ │ -189 template< class Vector > │ │ │ │ │ -190 void copy ( const Vector &x, _G_l_o_b_a_l_V_e_c_t_o_r &y ) │ │ │ │ │ -191 { │ │ │ │ │ -192 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ -193 y[ i ] = x[ i ]; │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -196 void resizeElements ( const int newSize ); │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 // assignment │ │ │ │ │ +_1_3_9 _D_o_m_a_i_n & _o_p_e_r_a_t_o_r_ _=_ ( const _D_o_m_a_i_n & other ) │ │ │ │ │ +140 { │ │ │ │ │ +141 if( _d_i_m_e_n_s_i_o_n_w_o_r_l_d != other._d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ │ +142 { │ │ │ │ │ +143 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ │ +144 "ERROR in " << *this << "!"); │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +147 left_ = other.left_; │ │ │ │ │ +148 right_= other.right_; │ │ │ │ │ +149 data_= other.data_; │ │ │ │ │ +150 return *this; │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +153 // return true if point is contained in boundary domain │ │ │ │ │ +154 template< class Vector > │ │ │ │ │ +_1_5_5 bool _c_o_n_t_a_i_n_s ( const Vector & x ) const │ │ │ │ │ +156 { │ │ │ │ │ +157 bool ret = true; │ │ │ │ │ +158 for( int i = 0; i < _d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++i ) │ │ │ │ │ +159 { │ │ │ │ │ +160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] ) │ │ │ │ │ +161 ret = false; │ │ │ │ │ +162 } │ │ │ │ │ +163 return ret; │ │ │ │ │ +164 } │ │ │ │ │ +165 │ │ │ │ │ +_1_6_6 const _D_o_m_a_i_n_D_a_t_a & _d_a_t_a () const │ │ │ │ │ +167 { │ │ │ │ │ +168 return data_; │ │ │ │ │ +169 } │ │ │ │ │ +170 │ │ │ │ │ +171 // for error messages │ │ │ │ │ +_1_7_2 friend std::ostream & _o_p_e_r_a_t_o_r_<_<_ ( std :: ostream &os, const _D_o_m_a_i_n & │ │ │ │ │ +domain ) │ │ │ │ │ +173 { │ │ │ │ │ +174 os << "domain: " << std::endl; │ │ │ │ │ +175 os << "left = "; │ │ │ │ │ +176 for( int i = 0; i < domain._d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++i ) │ │ │ │ │ +177 os << domain.left_[ i ] << " "; │ │ │ │ │ +178 os << std::endl; │ │ │ │ │ +179 os << "right = "; │ │ │ │ │ +180 for( int i = 0; i < domain._d_i_m_e_n_s_i_o_n_w_o_r_l_d; ++i ) │ │ │ │ │ +181 os << domain.right_[ i ] << " "; │ │ │ │ │ +182 os << std::endl; │ │ │ │ │ +183 os << domain._d_a_t_a(); │ │ │ │ │ +184 return os; │ │ │ │ │ +185 } │ │ │ │ │ +186 │ │ │ │ │ +187 private: │ │ │ │ │ +188 std::vector< double > left_, right_; │ │ │ │ │ +189 _D_o_m_a_i_n_D_a_t_a data_; │ │ │ │ │ +190 │ │ │ │ │ +191 }; │ │ │ │ │ +192 │ │ │ │ │ +_1_9_3 class _B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ +194 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +195 { │ │ │ │ │ +196 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e BoundaryParameter; │ │ │ │ │ 197 │ │ │ │ │ -198 void resizeVertices ( const int newSize ) │ │ │ │ │ -199 { │ │ │ │ │ -200 const int oldSize = data_->n_total_vertices; │ │ │ │ │ -201 data_->n_total_vertices = newSize; │ │ │ │ │ -202 data_->coords = memReAlloc< GlobalVector >( data_->coords, oldSize, newSize │ │ │ │ │ -); │ │ │ │ │ -203 assert( (data_->coords != NULL) || (newSize == 0) ); │ │ │ │ │ -204 } │ │ │ │ │ -205 │ │ │ │ │ -206 private: │ │ │ │ │ -207 Data *data_; │ │ │ │ │ -208 int vertexCount_; │ │ │ │ │ -209 int elementCount_; │ │ │ │ │ -210 }; │ │ │ │ │ -211 │ │ │ │ │ -212 │ │ │ │ │ -213 │ │ │ │ │ -214 // MacroData::Library │ │ │ │ │ -215 // ------------------ │ │ │ │ │ -216 │ │ │ │ │ -217 template< int dim > │ │ │ │ │ -218 template< int > │ │ │ │ │ -_2_1_9 struct _M_a_c_r_o_D_a_t_a< dim >::_L_i_b_r_a_r_y │ │ │ │ │ -220 { │ │ │ │ │ -_2_2_1 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> _M_a_c_r_o_D_a_t_a; │ │ │ │ │ -222 │ │ │ │ │ -223 static bool _c_h_e_c_k_N_e_i_g_h_b_o_r_s ( const _M_a_c_r_o_D_a_t_a ¯oData ); │ │ │ │ │ -_2_2_4 static void _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e ( _M_a_c_r_o_D_a_t_a ¯oData ); │ │ │ │ │ -225 static void _s_e_t_O_r_i_e_n_t_a_t_i_o_n ( [[maybe_unused]] _M_a_c_r_o_D_a_t_a ¯oData, │ │ │ │ │ -226 [[maybe_unused]] const _R_e_a_l orientation ); │ │ │ │ │ -227 │ │ │ │ │ -228 private: │ │ │ │ │ -229 static _R_e_a_l edgeLength ( const _M_a_c_r_o_D_a_t_a ¯oData, const _E_l_e_m_e_n_t_I_d &e, │ │ │ │ │ -int edge ); │ │ │ │ │ -230 static int longestEdge ( const _M_a_c_r_o_D_a_t_a ¯oData, const _E_l_e_m_e_n_t_I_d &e ); │ │ │ │ │ -231 │ │ │ │ │ -232 template< class Type > │ │ │ │ │ -233 static void rotate ( Type *array, int i, int shift ); │ │ │ │ │ +198 // the dimension of the vertices (is given from user) │ │ │ │ │ +199 int dimworld_; │ │ │ │ │ +200 │ │ │ │ │ +201 // internal counter │ │ │ │ │ +202 int counter_; │ │ │ │ │ +203 │ │ │ │ │ +204 // default values if given │ │ │ │ │ +205 _D_o_m_a_i_n_D_a_t_a * default_; │ │ │ │ │ +206 │ │ │ │ │ +207 // storage for all domains; │ │ │ │ │ +208 int ndomains_; │ │ │ │ │ +209 std::vector< Domain > domains_; │ │ │ │ │ +210 │ │ │ │ │ +211 public: │ │ │ │ │ +212 // initialize vertex block and get first vertex │ │ │ │ │ +213 _B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k ( std::istream & in, int cdimworld ); │ │ │ │ │ +214 │ │ │ │ │ +215 // destructor │ │ │ │ │ +_2_1_6 _~_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k () │ │ │ │ │ +217 { │ │ │ │ │ +218 if( default_ ) │ │ │ │ │ +219 delete default_; │ │ │ │ │ +220 } │ │ │ │ │ +221 │ │ │ │ │ +222 // go to next domain in block │ │ │ │ │ +_2_2_3 bool _n_e_x_t () │ │ │ │ │ +224 { │ │ │ │ │ +225 counter_++; │ │ │ │ │ +226 return ( counter_ < ndomains_ ); │ │ │ │ │ +227 } │ │ │ │ │ +228 │ │ │ │ │ +229 // return domain │ │ │ │ │ +_2_3_0 const _D_o_m_a_i_n & _d_o_m_a_i_n () const │ │ │ │ │ +231 { │ │ │ │ │ +232 return domains_.at( counter_ ); │ │ │ │ │ +233 } │ │ │ │ │ 234 │ │ │ │ │ -235 static void rotate ( _M_a_c_r_o_D_a_t_a ¯oData, int i, int shift ); │ │ │ │ │ -236 static void swap ( _M_a_c_r_o_D_a_t_a ¯oData, int el, int v1, int v2 ); │ │ │ │ │ -237 }; │ │ │ │ │ -238 │ │ │ │ │ -239 │ │ │ │ │ +235 // return true if default is given │ │ │ │ │ +_2_3_6 bool _h_a_s_D_e_f_a_u_l_t_D_a_t_a () const │ │ │ │ │ +237 { │ │ │ │ │ +238 return bool( default_ ); │ │ │ │ │ +239 } │ │ │ │ │ 240 │ │ │ │ │ -241 // Implementation of MacroData │ │ │ │ │ -242 // --------------------------- │ │ │ │ │ -243 │ │ │ │ │ -244 template< int dim > │ │ │ │ │ -245 inline typename _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_d & │ │ │ │ │ -_2_4_6 _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t ( int i ) const │ │ │ │ │ -247 { │ │ │ │ │ -248 assert( (i >= 0) && (i < data_->n_macro_elements) ); │ │ │ │ │ -249 const int offset = i * numVertices; │ │ │ │ │ -250 return *reinterpret_cast< ElementId * >( data_->mel_vertices + offset ); │ │ │ │ │ -251 } │ │ │ │ │ -252 │ │ │ │ │ -253 │ │ │ │ │ -254 template< int dim > │ │ │ │ │ -_2_5_5 inline _G_l_o_b_a_l_V_e_c_t_o_r &_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_v_e_r_t_e_x ( int i ) const │ │ │ │ │ -256 { │ │ │ │ │ -257 assert( (i >= 0) && (i < data_->n_total_vertices) ); │ │ │ │ │ -258 return data_->coords[ i ]; │ │ │ │ │ -259 } │ │ │ │ │ -260 │ │ │ │ │ -261 │ │ │ │ │ -262 template< int dim > │ │ │ │ │ -_2_6_3 inline int &_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( int element, int i ) const │ │ │ │ │ -264 { │ │ │ │ │ -265 assert( (element >= 0) && (element < data_->n_macro_elements) ); │ │ │ │ │ -266 assert( (i >= 0) && (i < numVertices) ); │ │ │ │ │ -267 return data_->neigh[ element*numVertices + i ]; │ │ │ │ │ -268 } │ │ │ │ │ -269 │ │ │ │ │ -270 │ │ │ │ │ -271 template< int dim > │ │ │ │ │ -_2_7_2 inline _B_o_u_n_d_a_r_y_I_d &_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( int element, int i ) │ │ │ │ │ -const │ │ │ │ │ -273 { │ │ │ │ │ -274 assert( (element >= 0) && (element < data_->n_macro_elements) ); │ │ │ │ │ -275 assert( (i >= 0) && (i < numVertices) ); │ │ │ │ │ -276 return data_->boundary[ element*numVertices + i ]; │ │ │ │ │ -277 } │ │ │ │ │ -278 │ │ │ │ │ -279 │ │ │ │ │ -280 template< int dim > │ │ │ │ │ -_2_8_1 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e () │ │ │ │ │ -282 { │ │ │ │ │ -283 release(); │ │ │ │ │ -284 data_ = _A_L_B_E_R_T_A alloc_macro_data( dim, initialSize, initialSize ); │ │ │ │ │ -285 data_->boundary = memAlloc< BoundaryId >( initialSize*numVertices ); │ │ │ │ │ -286 if( dim == 3 ) │ │ │ │ │ -287 data_->el_type = memAlloc< ElementType >( initialSize ); │ │ │ │ │ -288 vertexCount_ = elementCount_ = 0; │ │ │ │ │ -289 elementCount_ = 0; │ │ │ │ │ -290 } │ │ │ │ │ +241 // return default data │ │ │ │ │ +_2_4_2 const _D_o_m_a_i_n_D_a_t_a * _d_e_f_a_u_l_t_D_a_t_a () const │ │ │ │ │ +243 { │ │ │ │ │ +244 return default_; │ │ │ │ │ +245 } │ │ │ │ │ +246 │ │ │ │ │ +247 // return true if any boundary domain block has │ │ │ │ │ +248 // additional parameters │ │ │ │ │ +249 bool _h_a_s_P_a_r_a_m_e_t_e_r () const; │ │ │ │ │ +250 │ │ │ │ │ +_2_5_1 void _r_e_s_e_t () │ │ │ │ │ +252 { │ │ │ │ │ +253 _B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t(); │ │ │ │ │ +254 counter_ = -1; │ │ │ │ │ +255 } │ │ │ │ │ +256 │ │ │ │ │ +257 // return true while block is active │ │ │ │ │ +_2_5_8 bool _o_k () │ │ │ │ │ +259 { │ │ │ │ │ +260 return ( counter_ <= ndomains_ ); │ │ │ │ │ +261 } │ │ │ │ │ +262 │ │ │ │ │ +263 // return data if all vectors in array are contained within │ │ │ │ │ +264 // a single domain │ │ │ │ │ +265 template< class Vector > │ │ │ │ │ +_2_6_6 const _D_o_m_a_i_n_D_a_t_a * _c_o_n_t_a_i_n_s ( const std::vector< Vector > & v ) const │ │ │ │ │ +267 { │ │ │ │ │ +268 std::vector< int > index( ndomains_ ); │ │ │ │ │ +269 for( int i = 0; i < ndomains_; ++i) │ │ │ │ │ +270 index[ i ] = i; │ │ │ │ │ +271 │ │ │ │ │ +272 size_t N = v.size(); │ │ │ │ │ +273 for( size_t i = 0; i < N; ++i ) │ │ │ │ │ +274 { │ │ │ │ │ +275 if( index.empty() ) │ │ │ │ │ +276 break; │ │ │ │ │ +277 │ │ │ │ │ +278 const int n = index.size(); │ │ │ │ │ +279 assert( n > 0 ); │ │ │ │ │ +280 for( int j = n-1; j >= 0; --j ) │ │ │ │ │ +281 { │ │ │ │ │ +282 bool inside = domains_[ index[ j ] ].contains( v[ i ] ); │ │ │ │ │ +283 if( !inside ) │ │ │ │ │ +284 index.erase( index.begin() + j ); │ │ │ │ │ +285 } │ │ │ │ │ +286 } │ │ │ │ │ +287 │ │ │ │ │ +288 // check wheter no boundary domain found │ │ │ │ │ +289 if( index.empty() ) │ │ │ │ │ +290 return default_; │ │ │ │ │ 291 │ │ │ │ │ -292 │ │ │ │ │ -293 template< int dim > │ │ │ │ │ -_2_9_4 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_f_i_n_a_l_i_z_e () │ │ │ │ │ -295 { │ │ │ │ │ -296 if( (vertexCount_ >= 0) && (elementCount_ >= 0) ) │ │ │ │ │ -297 { │ │ │ │ │ -298 resizeVertices( vertexCount_ ); │ │ │ │ │ -299 resizeElements( elementCount_ ); │ │ │ │ │ -300 _A_L_B_E_R_T_A compute_neigh_fast( data_ ); │ │ │ │ │ -301 │ │ │ │ │ -302 // assign default boundary id (if none is assigned) │ │ │ │ │ -303 for( int element = 0; element < elementCount_; ++element ) │ │ │ │ │ -304 { │ │ │ │ │ -305 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ -306 { │ │ │ │ │ -307 _B_o_u_n_d_a_r_y_I_d &id = boundaryId( element, i ); │ │ │ │ │ -308 if( neighbor( element, i ) >= 0 ) │ │ │ │ │ -309 { │ │ │ │ │ -310 assert( id == _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y ); │ │ │ │ │ -311 id = _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y; │ │ │ │ │ -312 } │ │ │ │ │ -313 else │ │ │ │ │ -314 id = (id == _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y ? _D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y : id); │ │ │ │ │ -315 } │ │ │ │ │ -316 } │ │ │ │ │ -317 │ │ │ │ │ -318 vertexCount_ = elementCount_ = -1; │ │ │ │ │ -319 } │ │ │ │ │ -320 assert( (vertexCount_ < 0) && (elementCount_ < 0) ); │ │ │ │ │ -321 } │ │ │ │ │ -322 │ │ │ │ │ -323 │ │ │ │ │ -324 template< int dim > │ │ │ │ │ -_3_2_5 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e () │ │ │ │ │ -326 { │ │ │ │ │ -327 _L_i_b_r_a_r_y_<_ _d_i_m_W_o_r_l_d_ _>_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e( *this ); │ │ │ │ │ -328 } │ │ │ │ │ -329 │ │ │ │ │ -330 │ │ │ │ │ -331 template< int dim > │ │ │ │ │ -_3_3_2 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n ( const _R_e_a_l orientation ) │ │ │ │ │ -333 { │ │ │ │ │ -334 _L_i_b_r_a_r_y_<_ _d_i_m_W_o_r_l_d_ _>_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n( *this, orientation ); │ │ │ │ │ -335 } │ │ │ │ │ -336 │ │ │ │ │ -337 │ │ │ │ │ -338 template< int dim > │ │ │ │ │ -_3_3_9 inline bool _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s () const │ │ │ │ │ -340 { │ │ │ │ │ -341 return _L_i_b_r_a_r_y_<_ _d_i_m_W_o_r_l_d_ _>_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s( *this ); │ │ │ │ │ -342 } │ │ │ │ │ -343 │ │ │ │ │ -344 │ │ │ │ │ -345 template< int dim > │ │ │ │ │ -_3_4_6 inline int _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t ( const ElementId &id ) │ │ │ │ │ -347 { │ │ │ │ │ -348 assert( elementCount_ >= 0 ); │ │ │ │ │ -349 if( elementCount_ >= data_->n_macro_elements ) │ │ │ │ │ -350 resizeElements( 2*elementCount_ ); │ │ │ │ │ -351 │ │ │ │ │ -352 ElementId &e = element( elementCount_ ); │ │ │ │ │ -353 for( int i = 0; i < numVertices; ++i ) │ │ │ │ │ -354 { │ │ │ │ │ -355 e[ i ] = id[ i ]; │ │ │ │ │ -356 boundaryId( elementCount_, i ) = _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y; │ │ │ │ │ -357 } │ │ │ │ │ -358 if( dim == 3 ) │ │ │ │ │ -359 data_->el_type[ elementCount_ ] = 0; │ │ │ │ │ -360 │ │ │ │ │ -361 return elementCount_++; │ │ │ │ │ -362 } │ │ │ │ │ -363 │ │ │ │ │ -364 │ │ │ │ │ -365 template< int dim > │ │ │ │ │ -366 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ │ -_3_6_7_ _:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const _G_l_o_b_a_l_M_a_t_r_i_x &matrix, const _G_l_o_b_a_l_V_e_c_t_o_r &shift ) │ │ │ │ │ -368 { │ │ │ │ │ -369 int &count = data_->n_wall_trafos; │ │ │ │ │ -370 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *&array = data_->wall_trafos; │ │ │ │ │ -371 │ │ │ │ │ -372 // resize wall trafo array │ │ │ │ │ -373 array = memReAlloc< AffineTransformation >( array, count, count+1 ); │ │ │ │ │ -374 assert( data_->wall_trafos != NULL ); │ │ │ │ │ -375 │ │ │ │ │ -376 // copy matrix and shift │ │ │ │ │ -377 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ -378 copy( matrix[ i ], array[ count ].M[ i ] ); │ │ │ │ │ -379 copy( shift, array[ count ].t ); │ │ │ │ │ -380 ++count; │ │ │ │ │ -381 } │ │ │ │ │ -382 │ │ │ │ │ -383 template< int dim > │ │ │ │ │ -384 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ │ -_3_8_5_ _:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o ( const FieldMatrix< Real, dimWorld, dimWorld > &matrix, │ │ │ │ │ -386 const FieldVector< Real, dimWorld > &shift ) │ │ │ │ │ -387 { │ │ │ │ │ -388 int &count = data_->n_wall_trafos; │ │ │ │ │ -389 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *&array = data_->wall_trafos; │ │ │ │ │ -390 │ │ │ │ │ -391 // resize wall trafo array │ │ │ │ │ -392 array = memReAlloc< AffineTransformation >( array, count, count+1 ); │ │ │ │ │ -393 assert( data_->wall_trafos != NULL ); │ │ │ │ │ -394 │ │ │ │ │ -395 // copy matrix and shift │ │ │ │ │ -396 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ │ -397 copy( matrix[ i ], array[ count ].M[ i ] ); │ │ │ │ │ -398 copy( shift, array[ count ].t ); │ │ │ │ │ -399 ++count; │ │ │ │ │ -400 } │ │ │ │ │ -401 │ │ │ │ │ -402 │ │ │ │ │ -403 template< int dim > │ │ │ │ │ -_4_0_4 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_c_h_e_c_k_C_y_c_l_e_s () │ │ │ │ │ -405 { │ │ │ │ │ -406 // ensure that the macro data has been finalized │ │ │ │ │ -407 finalize(); │ │ │ │ │ -408 _A_L_B_E_R_T_A macro_test( data_, NULL ); │ │ │ │ │ -409 } │ │ │ │ │ -410 │ │ │ │ │ -411 │ │ │ │ │ -412 template< int dim > │ │ │ │ │ -_4_1_3 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_r_e_a_d ( const std::string &filename, bool │ │ │ │ │ -binary ) │ │ │ │ │ -414 { │ │ │ │ │ -415 release(); │ │ │ │ │ -416 if( binary ) │ │ │ │ │ -417 data_ = _A_L_B_E_R_T_A read_macro_xdr( filename.c_str() ); │ │ │ │ │ -418 else │ │ │ │ │ -419 data_ = _A_L_B_E_R_T_A read_macro( filename.c_str() ); │ │ │ │ │ -420 } │ │ │ │ │ -421 │ │ │ │ │ -422 │ │ │ │ │ -423 template< int dim > │ │ │ │ │ -424 inline void _M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_r_e_s_i_z_e_E_l_e_m_e_n_t_s ( const int newSize ) │ │ │ │ │ -425 { │ │ │ │ │ -426 const int oldSize = data_->n_macro_elements; │ │ │ │ │ -427 data_->n_macro_elements = newSize; │ │ │ │ │ -428 data_->mel_vertices = _m_e_m_R_e_A_l_l_o_c( data_->mel_vertices, oldSize*numVertices, │ │ │ │ │ -newSize*numVertices ); │ │ │ │ │ -429 data_->boundary = _m_e_m_R_e_A_l_l_o_c( data_->boundary, oldSize*numVertices, │ │ │ │ │ -newSize*numVertices ); │ │ │ │ │ -430 if( dim == 3 ) │ │ │ │ │ -431 data_->el_type = _m_e_m_R_e_A_l_l_o_c( data_->el_type, oldSize, newSize ); │ │ │ │ │ -432 assert( (newSize == 0) || (data_->mel_vertices != NULL) ); │ │ │ │ │ -433 } │ │ │ │ │ -434 │ │ │ │ │ -435 } │ │ │ │ │ -436 │ │ │ │ │ -437} │ │ │ │ │ -438 │ │ │ │ │ -439#endif // #if HAVE_ALBERTA │ │ │ │ │ -440 │ │ │ │ │ -441#endif │ │ │ │ │ -_a_l_g_e_b_r_a_._h_h │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ -_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +292 // check for ambiguity │ │ │ │ │ +293 if( index.size() > 1 ) │ │ │ │ │ +294 dwarn << "WARNING: ambiguous boundary domain assignment, use first boundary │ │ │ │ │ +domain in list" << std::endl; │ │ │ │ │ +295 │ │ │ │ │ +296 return &domains_[ index[ 0 ] ].data(); │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +299 private: │ │ │ │ │ +300 void readBlock (); │ │ │ │ │ +301 }; │ │ │ │ │ +302 │ │ │ │ │ +303 } // end namespace dgf │ │ │ │ │ +304 │ │ │ │ │ +305} // end namespace Dune │ │ │ │ │ +306 │ │ │ │ │ +307#endif │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ │ -ALBERTA REAL_DD GlobalMatrix │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ │ -ALBERTA BNDRY_TYPE BoundaryId │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y │ │ │ │ │ -static const int InteriorBoundary │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ │ -ALBERTA REAL Real │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c │ │ │ │ │ -Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ -static const int DirichletBoundary │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ │ -static const int dimWorld │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_I_n_s_t_a_n_t_i_a_t_e_M_a_c_r_o_D_a_t_a_L_i_b_r_a_r_y │ │ │ │ │ -friend struct InstantiateMacroDataLibrary │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -BoundaryId & boundaryId(int element, int i) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ -int insertVertex(const GlobalVector &coords) │ │ │ │ │ -insert vertex │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ │ -int ElementId[numVertices] │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y │ │ │ │ │ -static const int supportPeriodicity │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ │ -void release() │ │ │ │ │ -release the macro data structure │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t_C_o_u_n_t │ │ │ │ │ -int elementCount() const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x │ │ │ │ │ -GlobalVector & vertex(int i) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:255 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x_C_o_u_n_t │ │ │ │ │ -int vertexCount() const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ -void markLongestEdge() │ │ │ │ │ -mark the longest edge of all elements as refinement edges │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:325 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ │ -int insertVertex(const FieldVector< Real, dimWorld > &coords) │ │ │ │ │ -insert vertex │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s │ │ │ │ │ -bool checkNeighbors() const │ │ │ │ │ -check the neighbor information │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:339 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o │ │ │ │ │ -void insertWallTrafo(const FieldMatrix< Real, dimWorld, dimWorld > &matrix, │ │ │ │ │ -const FieldVector< Real, dimWorld > &shift) │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:385 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t │ │ │ │ │ -ElementId & element(int i) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:246 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_h_e_c_k_C_y_c_l_e_s │ │ │ │ │ -void checkCycles() │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:404 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_n_e_i_g_h_b_o_r │ │ │ │ │ -int & neighbor(int element, int i) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:263 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ -MacroData() │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_f_i_n_a_l_i_z_e │ │ │ │ │ -void finalize() │ │ │ │ │ -compress macro data structure │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:294 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o │ │ │ │ │ -void insertWallTrafo(const GlobalMatrix &m, const GlobalVector &t) │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:367 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ -void setOrientation(const Real orientation) │ │ │ │ │ -set the orientation of all elements │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:332 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_r_e_a_t_e │ │ │ │ │ -void create() │ │ │ │ │ -create a new macro data structure │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:281 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ │ -int insertElement(const ElementId &id) │ │ │ │ │ -insert element │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:346 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_w_r_i_t_e │ │ │ │ │ -bool write(const std::string &filename, bool binary=false) const │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:180 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ │ -void read(const std::string &filename, bool binary=false) │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ │ -static void markLongestEdge(MacroData ¯oData) │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ │ -Alberta::MacroData< dim > MacroData │ │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:221 │ │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ +void reset() │ │ │ │ │ +DDeeffiinniittiioonn basic.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_r_e_s_e_t │ │ │ │ │ +void reset(int id, BoundaryParameter parameter, bool defaultData=false) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_~_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +~DomainData() │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +DGFBoundaryParameter::type BoundaryParameter │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +DomainData() │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_i_d │ │ │ │ │ +int id() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ +const BoundaryParameter & parameter() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_h_a_s_P_a_r_a_m_e_t_e_r │ │ │ │ │ +bool hasParameter() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │ +DomainData(int id, BoundaryParameter parameter, bool defaultData=false) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a_:_:_i_s_D_e_f_a_u_l_t │ │ │ │ │ +bool isDefault() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_D_o_m_a_i_n │ │ │ │ │ +Domain(std::vector< double > p1, std::vector< double > p2, int id, │ │ │ │ │ +BoundaryParameter ¶meter) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_D_o_m_a_i_n │ │ │ │ │ +Domain(const Domain &other) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:125 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ +const int dimensionworld │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const Vector &x) const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +DGFBoundaryParameter::type BoundaryParameter │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +friend std::ostream & operator<<(std ::ostream &os, const Domain &domain) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:172 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +Domain & operator=(const Domain &other) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_d_a_t_a │ │ │ │ │ +const DomainData & data() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:166 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_:_:_D_o_m_a_i_n │ │ │ │ │ +Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data) │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_~_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ │ +~BoundaryDomBlock() │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:216 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_h_a_s_P_a_r_a_m_e_t_e_r │ │ │ │ │ +bool hasParameter() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.cc:138 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_d_o_m_a_i_n │ │ │ │ │ +const Domain & domain() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:230 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +const DomainData * contains(const std::vector< Vector > &v) const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:266 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_n_e_x_t │ │ │ │ │ +bool next() │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_r_e_s_e_t │ │ │ │ │ +void reset() │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:251 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_o_k │ │ │ │ │ +bool ok() │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:258 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_h_a_s_D_e_f_a_u_l_t_D_a_t_a │ │ │ │ │ +bool hasDefaultData() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k_:_:_d_e_f_a_u_l_t_D_a_t_a │ │ │ │ │ +const DomainData * defaultData() const │ │ │ │ │ +DDeeffiinniittiioonn boundarydom.hh:242 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_E_x_c_e_p_t_i_o_n │ │ │ │ │ +exception class for IO errors in the DGF parser │ │ │ │ │ +DDeeffiinniittiioonn dgfexception.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ +Contains types for additional features. │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ +std::string type │ │ │ │ │ +type of additional boundary parameters │ │ │ │ │ +DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Namespaces
│ │ │ │
indexsets.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <config.h>
│ │ │ │ #include <dune/grid/albertagrid/indexsets.hh>
│ │ │ │ -#include <dune/grid/albertagrid/agrid.hh>
│ │ │ │ +#include <dune/grid/albertagrid/agrid.hh>
│ │ │ │

│ │ │ │ Classes

class  Dune::AlbertaMarkerVector< dim, dimworld >
 marker assigning subentities to one element containing them More...
 
struct  Dune::AlbertaMarkerVector< dim, dimworld >::MarkSubEntities< bool >::Codim< codim >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ │┄ Files 12% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfoned.hh Source File │ │ │ │ +dune-grid: level.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,295 +70,331 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfoned.hh
│ │ │ │ +
level.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ -
6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_LEVEL_HH
│ │ │ │ +
6#define DUNE_ALBERTA_LEVEL_HH
│ │ │ │
7
│ │ │ │ -
8//- C++ includes
│ │ │ │ -
9#include <algorithm>
│ │ │ │ -
10#include <fstream>
│ │ │ │ -
11#include <iostream>
│ │ │ │ -
12#include <istream>
│ │ │ │ -
13#include <vector>
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <cstdlib>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ -
15//- dune-common includes
│ │ │ │ -
16#include <dune/common/exceptions.hh>
│ │ │ │ -
17
│ │ │ │ -
18//- dune-grid includes
│ │ │ │ - │ │ │ │ -
20#include <dune/grid/onedgrid.hh>
│ │ │ │ -
21
│ │ │ │ -
22//- local includes
│ │ │ │ -
23#include "dgfparser.hh"
│ │ │ │ -
24
│ │ │ │ -
25
│ │ │ │ -
26namespace
│ │ │ │ -
27{
│ │ │ │ -
28 // helper method used below
│ │ │ │ -
29 double getfirst ( std::vector< double > v )
│ │ │ │ -
30 {
│ │ │ │ -
31 return v[ 0 ];
│ │ │ │ -
32 }
│ │ │ │ -
33} // end anonymous namespace
│ │ │ │ +
15#if HAVE_ALBERTA
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 // AlbertaGridLevelProvider
│ │ │ │ +
21 // ------------------------
│ │ │ │ +
22
│ │ │ │ +
23 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ + │ │ │ │ +
27
│ │ │ │ +
28 typedef unsigned char Level;
│ │ │ │ +
29
│ │ │ │ + │ │ │ │ + │ │ │ │ +
32
│ │ │ │ + │ │ │ │
34
│ │ │ │ -
35
│ │ │ │ -
36
│ │ │ │ -
37namespace Dune
│ │ │ │ -
38{
│ │ │ │ -
39
│ │ │ │ -
40 // DGFGridInfo
│ │ │ │ -
41 // -----------
│ │ │ │ -
42
│ │ │ │ -
43 template< >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 {
│ │ │ │ -
│ │ │ │ -
46 static int refineStepsForHalf ()
│ │ │ │ -
47 {
│ │ │ │ -
48 return 1;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ +
35 static const Level isNewFlag = (1 << 7);
│ │ │ │ +
36 static const Level levelMask = (1 << 7) - 1;
│ │ │ │ +
37
│ │ │ │ +
38 class SetLocal;
│ │ │ │ +
39 class CalcMaxLevel;
│ │ │ │ +
40
│ │ │ │ +
41 template< Level flags >
│ │ │ │ +
42 struct ClearFlags;
│ │ │ │ +
43
│ │ │ │ +
44 struct Interpolation;
│ │ │ │ +
45
│ │ │ │ +
46 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
50
│ │ │ │
│ │ │ │ -
51 static double refineWeight ()
│ │ │ │ -
52 {
│ │ │ │ -
53 return 0.5;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55 };
│ │ │ │ +
51 Level operator() ( const Alberta::Element *element ) const
│ │ │ │ +
52 {
│ │ │ │ +
53 const Level *array = (Level *)level_;
│ │ │ │ +
54 return array[ dofAccess_( element, 0 ) ] & levelMask;
│ │ │ │ +
55 }
│ │ │ │
│ │ │ │
56
│ │ │ │ -
57
│ │ │ │ -
58
│ │ │ │ -
59 // DGFGridFactory< OneDGrid >
│ │ │ │ -
60 // --------------------------
│ │ │ │ +
│ │ │ │ +
57 Level operator() ( const ElementInfo &elementInfo ) const
│ │ │ │ +
58 {
│ │ │ │ +
59 return (*this)( elementInfo.el() );
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │
61
│ │ │ │ -
62 template< >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 {
│ │ │ │ -
66 typedef OneDGrid Grid;
│ │ │ │ -
68 const static int dimension = Grid::dimension;
│ │ │ │ -
70 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ -
71
│ │ │ │ +
│ │ │ │ +
62 bool isNew ( const Alberta::Element *element ) const
│ │ │ │ +
63 {
│ │ │ │ +
64 const Level *array = (Level *)level_;
│ │ │ │ +
65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0);
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
68 bool isNew ( const ElementInfo &elementInfo ) const
│ │ │ │ +
69 {
│ │ │ │ +
70 return isNew( elementInfo.el() );
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │
│ │ │ │ -
73 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
74 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
75 : grid_( 0 ),
│ │ │ │ -
76 emptyParameters_( 0 )
│ │ │ │ -
77 {
│ │ │ │ -
78 generate( input, comm );
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
│ │ │ │ -
82 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
83 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
84 : grid_( 0 ),
│ │ │ │ -
85 emptyParameters_( 0 )
│ │ │ │ -
86 {
│ │ │ │ -
87 std::ifstream input( filename.c_str() );
│ │ │ │ -
88 generate( input, comm );
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ -
92 Grid *grid () const
│ │ │ │ -
93 {
│ │ │ │ -
94 return grid_;
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
98 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
99 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
100 {
│ │ │ │ -
101 return false;
│ │ │ │ -
102 }
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
104 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
105 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
106 {
│ │ │ │ -
107 // OneDGrid returns boundary segment index;
│ │ │ │ -
108 // we return the index as the method boundaryId is deprecated
│ │ │ │ -
109 return intersection.boundarySegmentIndex();
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
113 template< class Entity >
│ │ │ │ -
│ │ │ │ -
114 int numParameters ( const Entity & ) const
│ │ │ │ -
115 {
│ │ │ │ -
116 return 0;
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
120 template< int codim >
│ │ │ │ -
│ │ │ │ -
121 int numParameters () const
│ │ │ │ -
122 {
│ │ │ │ -
123 return 0;
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
126 template< class Entity >
│ │ │ │ -
│ │ │ │ -
127 std::vector< double >& parameter ( const Entity &entity )
│ │ │ │ -
128 {
│ │ │ │ -
129 return parameter< Entity::codimension >( entity );
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
133 template< int codim >
│ │ │ │ -
│ │ │ │ -
134 std::vector< double > &parameter ( [[maybe_unused]] const typename Grid::Codim< codim >::Entity &element )
│ │ │ │ -
135 {
│ │ │ │ -
136 return emptyParameters_;
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
141 {
│ │ │ │ -
142 return false;
│ │ │ │ -
143 }
│ │ │ │ +
73 Level maxLevel () const
│ │ │ │ +
74 {
│ │ │ │ +
75 CalcMaxLevel calcFromCache;
│ │ │ │ +
76 level_.forEach( calcFromCache );
│ │ │ │ +
77#ifndef NDEBUG
│ │ │ │ +
78 CalcMaxLevel calcFromGrid;
│ │ │ │ +
79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );
│ │ │ │ +
80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );
│ │ │ │ +
81#endif
│ │ │ │ +
82 return calcFromCache.maxLevel();;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
86 {
│ │ │ │ +
87 return MeshPointer( level_.dofSpace()->mesh );
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ +
90 void markAllOld ()
│ │ │ │ +
91 {
│ │ │ │ +
92 ClearFlags< isNewFlag > clearIsNew;
│ │ │ │ +
93 level_.forEach( clearIsNew );
│ │ │ │ +
94 }
│ │ │ │ +
│ │ │ │ +
95
│ │ │ │ +
│ │ │ │ +
96 void create ( const DofNumbering &dofNumbering )
│ │ │ │ +
97 {
│ │ │ │ +
98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );
│ │ │ │ +
99 dofAccess_ = DofAccess( dofSpace );
│ │ │ │ +
100
│ │ │ │ +
101 level_.create( dofSpace, "Element level" );
│ │ │ │ +
102 assert( level_ );
│ │ │ │ +
103 level_.template setupInterpolation< Interpolation >();
│ │ │ │ +
104
│ │ │ │ +
105 SetLocal setLocal( level_ );
│ │ │ │ + │ │ │ │ +
107 }
│ │ │ │ +
│ │ │ │ +
108
│ │ │ │ +
│ │ │ │ +
109 void release ()
│ │ │ │ +
110 {
│ │ │ │ +
111 level_.release();
│ │ │ │ +
112 dofAccess_ = DofAccess();
│ │ │ │ +
113 }
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
115 private:
│ │ │ │ +
116 DofVectorPointer level_;
│ │ │ │ +
117 DofAccess dofAccess_;
│ │ │ │ +
118 };
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120
│ │ │ │ +
121
│ │ │ │ +
122 // AlbertaGridLevelProvider::SetLocal
│ │ │ │ +
123 // ----------------------------------
│ │ │ │ +
124
│ │ │ │ +
125 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
127 {
│ │ │ │ +
128 DofVectorPointer level_;
│ │ │ │ +
129 DofAccess dofAccess_;
│ │ │ │ +
130
│ │ │ │ +
131 public:
│ │ │ │ +
│ │ │ │ +
132 explicit SetLocal ( const DofVectorPointer &level )
│ │ │ │ +
133 : level_( level ),
│ │ │ │ +
134 dofAccess_( level.dofSpace() )
│ │ │ │ +
135 {}
│ │ │ │ +
│ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
137 void operator() ( const Alberta::ElementInfo< dim > &elementInfo ) const
│ │ │ │ +
138 {
│ │ │ │ +
139 Level *const array = (Level *)level_;
│ │ │ │ +
140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo.level();
│ │ │ │ +
141 }
│ │ │ │
│ │ │ │ +
142 };
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │
144
│ │ │ │ -
146 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
147 const DGFBoundaryParameter::type &boundaryParameter ( [[maybe_unused]] const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
148 {
│ │ │ │ - │ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
152 private:
│ │ │ │ -
153 // generate grid
│ │ │ │ -
154 void generate ( std::istream &input, MPICommunicatorType comm );
│ │ │ │ -
155
│ │ │ │ -
156 Grid *grid_;
│ │ │ │ -
157 std::vector< double > emptyParameters_;
│ │ │ │ -
158 };
│ │ │ │ -
│ │ │ │ -
159
│ │ │ │ -
160
│ │ │ │ -
161
│ │ │ │ -
162 // Implementation of DGFGridFactory< OneDGrid >
│ │ │ │ -
163 // --------------------------------------------
│ │ │ │ -
164
│ │ │ │ -
165 inline void DGFGridFactory< OneDGrid >::generate ( std::istream &input, [[maybe_unused]] MPICommunicatorType comm )
│ │ │ │ -
166 {
│ │ │ │ -
167 // try to open interval block
│ │ │ │ -
168 dgf::IntervalBlock intervalBlock( input );
│ │ │ │ -
169
│ │ │ │ -
170 // try to open vertex block
│ │ │ │ -
171 int dimensionworld = Grid::dimensionworld;
│ │ │ │ -
172 dgf::VertexBlock vertexBlock( input, dimensionworld );
│ │ │ │ -
173
│ │ │ │ -
174 // check at least one block is active
│ │ │ │ -
175 if( !( vertexBlock.isactive() || intervalBlock.isactive() ))
│ │ │ │ -
176 DUNE_THROW( DGFException, "No readable block found" );
│ │ │ │ -
177
│ │ │ │ -
178 std::vector< std::vector< double > > vertices;
│ │ │ │ +
145
│ │ │ │ +
146 // AlbertaGridLevelProvider::CalcMaxLevel
│ │ │ │ +
147 // --------------------------------------
│ │ │ │ +
148
│ │ │ │ +
149 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
151 {
│ │ │ │ +
152 Level maxLevel_;
│ │ │ │ +
153
│ │ │ │ +
154 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
156 : maxLevel_( 0 )
│ │ │ │ +
157 {}
│ │ │ │ +
│ │ │ │ +
158
│ │ │ │ +
│ │ │ │ +
159 void operator() ( const Level &dof )
│ │ │ │ +
160 {
│ │ │ │ +
161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) );
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163
│ │ │ │ +
│ │ │ │ +
164 void operator() ( const Alberta::ElementInfo< dim > &elementInfo )
│ │ │ │ +
165 {
│ │ │ │ +
166 maxLevel_ = std::max( maxLevel_, Level( elementInfo.level() ) );
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
│ │ │ │ +
169 Level maxLevel () const
│ │ │ │ +
170 {
│ │ │ │ +
171 return maxLevel_;
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173 };
│ │ │ │ +
│ │ │ │ +
174
│ │ │ │ +
175
│ │ │ │ +
176
│ │ │ │ +
177 // AlbertaGridLevelProvider::ClearFlags
│ │ │ │ +
178 // ------------------------------------
│ │ │ │
179
│ │ │ │ -
180 // read vertices first
│ │ │ │ -
181 if( vertexBlock.isactive() )
│ │ │ │ -
182 {
│ │ │ │ -
183 int nparameter = 0;
│ │ │ │ -
184 std::vector< std::vector< double > > parameter;
│ │ │ │ -
185 vertexBlock.get( vertices, parameter, nparameter );
│ │ │ │ -
186
│ │ │ │ -
187 if( nparameter > 0 )
│ │ │ │ -
188 std::cerr << "Warning: vertex parameters will be ignored" << std::endl;
│ │ │ │ -
189 }
│ │ │ │ +
180 template< int dim >
│ │ │ │ +
181 template< typename AlbertaGridLevelProvider< dim >::Level flags >
│ │ │ │ +
182 struct AlbertaGridLevelProvider< dim >::ClearFlags
│ │ │ │ +
183 {
│ │ │ │ +
184 void operator() ( Level &dof ) const
│ │ │ │ +
185 {
│ │ │ │ +
186 dof &= ~flags;
│ │ │ │ +
187 }
│ │ │ │ +
188 };
│ │ │ │ +
189
│ │ │ │
190
│ │ │ │ -
191 // get vertices from interval block
│ │ │ │ -
192 if ( intervalBlock.isactive() )
│ │ │ │ -
193 {
│ │ │ │ -
194 if( intervalBlock.dimw() != dimensionworld )
│ │ │ │ -
195 {
│ │ │ │ -
196 DUNE_THROW( DGFException, "Error: wrong coordinate dimension in interval block \
│ │ │ │ -
197 (got " << intervalBlock.dimw() << ", expected " << dimensionworld << ")" );
│ │ │ │ -
198 }
│ │ │ │ +
191
│ │ │ │ +
192 // AlbertaGridLevelProvider::Interpolation
│ │ │ │ +
193 // ---------------------------------------
│ │ │ │ +
194
│ │ │ │ +
195 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
197 {
│ │ │ │ +
198 static const int dimension = dim;
│ │ │ │
199
│ │ │ │ -
200 int nintervals = intervalBlock.numIntervals();
│ │ │ │ -
201 for( int i = 0; i < nintervals; ++i )
│ │ │ │ -
202 intervalBlock.getVtx( i, vertices );
│ │ │ │ -
203 }
│ │ │ │ -
204
│ │ │ │ -
205 // copy to vector of doubles
│ │ │ │ -
206 std::vector< double > vtx( vertices.size() );
│ │ │ │ -
207 transform( vertices.begin(), vertices.end(), vtx.begin(), getfirst );
│ │ │ │ -
208
│ │ │ │ -
209 // remove duplicates
│ │ │ │ -
210 std::sort( vtx.begin(), vtx.end() );
│ │ │ │ -
211 std::vector< double >::iterator it = std::unique( vtx.begin(), vtx.end() );
│ │ │ │ -
212 vtx.erase( it, vtx.end() );
│ │ │ │ -
213 if( vertices.size() != vtx.size() )
│ │ │ │ -
214 std::cerr << "Warning: removed duplicate vertices" << std::endl;
│ │ │ │ -
215
│ │ │ │ -
216 // create grid
│ │ │ │ -
217 grid_ = new OneDGrid( vtx );
│ │ │ │ -
218 }
│ │ │ │ -
219
│ │ │ │ -
220} // end namespace Dune
│ │ │ │ + │ │ │ │ +
201
│ │ │ │ +
│ │ │ │ +
202 static void interpolateVector ( const DofVectorPointer &dofVector,
│ │ │ │ +
203 const Patch &patch )
│ │ │ │ +
204 {
│ │ │ │ +
205 const DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ │ +
206 Level *array = (Level *)dofVector;
│ │ │ │ +
207
│ │ │ │ +
208 for( int i = 0; i < patch.count(); ++i )
│ │ │ │ +
209 {
│ │ │ │ +
210 const Alberta::Element *const father = patch[ i ];
│ │ │ │ +
211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );
│ │ │ │ +
212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag;
│ │ │ │ +
213 for( int i = 0; i < 2; ++i )
│ │ │ │ +
214 {
│ │ │ │ +
215 const Alberta::Element *child = father->child[ i ];
│ │ │ │ +
216 array[ dofAccess( child, 0 ) ] = childLevel;
│ │ │ │ +
217 }
│ │ │ │ +
218 }
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220 };
│ │ │ │ +
│ │ │ │
221
│ │ │ │ -
222#endif // #ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ -
The OneDGrid class.
│ │ │ │ +
222}
│ │ │ │ +
223
│ │ │ │ +
224#endif // #if HAVE_ALBERTA
│ │ │ │ +
225
│ │ │ │ +
226#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's mesh structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ │ -
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ -
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:236
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ -
GridFamily::Traits::template Codim< cd >::Entity Entity
A type that is a model of a Dune::Entity<cd,dim,...>.
Definition common/grid.hh:419
│ │ │ │ -
static double refineWeight()
Definition dgfoned.hh:51
│ │ │ │ -
static int refineStepsForHalf()
Definition dgfoned.hh:46
│ │ │ │ -
OneDGrid Grid
grid type
Definition dgfoned.hh:66
│ │ │ │ -
std::vector< double > & parameter(const typename Grid::Codim< codim >::Entity &element)
return empty vector
Definition dgfoned.hh:134
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
MPI communicator type.
Definition dgfoned.hh:70
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
return invalid default value
Definition dgfoned.hh:147
│ │ │ │ -
std::vector< double > & parameter(const Entity &entity)
Definition dgfoned.hh:127
│ │ │ │ -
int boundaryId(const Dune::Intersection< GG, II > &intersection) const
Definition dgfoned.hh:105
│ │ │ │ -
Grid * grid() const
get grid
Definition dgfoned.hh:92
│ │ │ │ -
bool haveBoundaryParameters() const
OneDGrid does not support boundary parameters.
Definition dgfoned.hh:140
│ │ │ │ -
int numParameters(const Entity &) const
OneDGrid does not support parameters, returns 0.
Definition dgfoned.hh:114
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking filename
Definition dgfoned.hh:82
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking istream
Definition dgfoned.hh:73
│ │ │ │ -
int numParameters() const
OneDGrid does not support parameters, returns 0.
Definition dgfoned.hh:121
│ │ │ │ -
bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
always returns false
Definition dgfoned.hh:99
│ │ │ │ -
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ -
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ │ -
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │ -
One-dimensional adaptive grid.
Definition onedgrid.hh:94
│ │ │ │ - │ │ │ │ - │ │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ │ +
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ │ +
Definition meshpointer.hh:40
│ │ │ │ +
void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:385
│ │ │ │ +
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ │ + │ │ │ │ +
Definition dofadmin.hh:93
│ │ │ │ +
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ │ + │ │ │ │ +
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ │ +
void release()
Definition dofvector.hh:254
│ │ │ │ +
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ │ +
void forEach(Functor &functor) const
Definition dofvector.hh:264
│ │ │ │ +
Definition elementinfo.hh:43
│ │ │ │ +
int level() const
Definition elementinfo.hh:533
│ │ │ │ +
Element * el() const
Definition elementinfo.hh:737
│ │ │ │ +
Definition level.hh:25
│ │ │ │ +
bool isNew(const Alberta::Element *element) const
Definition level.hh:62
│ │ │ │ +
bool isNew(const ElementInfo &elementInfo) const
Definition level.hh:68
│ │ │ │ +
Alberta::MeshPointer< dim > MeshPointer
Definition level.hh:48
│ │ │ │ +
MeshPointer mesh() const
Definition level.hh:85
│ │ │ │ +
void create(const DofNumbering &dofNumbering)
Definition level.hh:96
│ │ │ │ +
Level maxLevel() const
Definition level.hh:73
│ │ │ │ +
Alberta::HierarchyDofNumbering< dim > DofNumbering
Definition level.hh:49
│ │ │ │ +
void release()
Definition level.hh:109
│ │ │ │ +
Level operator()(const Alberta::Element *element) const
Definition level.hh:51
│ │ │ │ +
void markAllOld()
Definition level.hh:90
│ │ │ │ +
Alberta::ElementInfo< dim > ElementInfo
Definition level.hh:47
│ │ │ │ + │ │ │ │ +
SetLocal(const DofVectorPointer &level)
Definition level.hh:132
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Level maxLevel() const
Definition level.hh:169
│ │ │ │ + │ │ │ │ +
Alberta::Patch< dimension > Patch
Definition level.hh:200
│ │ │ │ +
static void interpolateVector(const DofVectorPointer &dofVector, const Patch &patch)
Definition level.hh:202
│ │ │ │ +
Definition misc.hh:231
│ │ │ │ +
static const Flags nothing
Definition misc.hh:234
│ │ │ │ +
Definition refinement.hh:40
│ │ │ │ +
int count() const
Definition refinement.hh:67
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,346 +1,355 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _i_o │ │ │ │ │ - * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfoned.hh │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ +level.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ -6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_LEVEL_HH │ │ │ │ │ +6#define DUNE_ALBERTA_LEVEL_HH │ │ │ │ │ 7 │ │ │ │ │ -8//- C++ includes │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ │ 14 │ │ │ │ │ -15//- dune-common includes │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18//- dune-grid includes │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_o_n_e_d_g_r_i_d_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22//- local includes │ │ │ │ │ -23#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ -24 │ │ │ │ │ -25 │ │ │ │ │ -26namespace │ │ │ │ │ -27{ │ │ │ │ │ -28 // helper method used below │ │ │ │ │ -29 double getfirst ( std::vector< double > v ) │ │ │ │ │ -30 { │ │ │ │ │ -31 return v[ 0 ]; │ │ │ │ │ -32 } │ │ │ │ │ -33} // end anonymous namespace │ │ │ │ │ +15#if HAVE_ALBERTA │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 // AlbertaGridLevelProvider │ │ │ │ │ +21 // ------------------------ │ │ │ │ │ +22 │ │ │ │ │ +23 template< int dim > │ │ │ │ │ +_2_4 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ │ +25 { │ │ │ │ │ +26 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ +27 │ │ │ │ │ +28 typedef unsigned char Level; │ │ │ │ │ +29 │ │ │ │ │ +30 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _L_e_v_e_l_ _> _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r; │ │ │ │ │ +31 typedef _A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _0_ _> _D_o_f_A_c_c_e_s_s; │ │ │ │ │ +32 │ │ │ │ │ +33 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ │ 34 │ │ │ │ │ -35 │ │ │ │ │ -36 │ │ │ │ │ -37namespace _D_u_n_e │ │ │ │ │ -38{ │ │ │ │ │ -39 │ │ │ │ │ -40 // DGFGridInfo │ │ │ │ │ -41 // ----------- │ │ │ │ │ -42 │ │ │ │ │ -43 template< > │ │ │ │ │ -_4_4 struct _D_G_F_G_r_i_d_I_n_f_o< _O_n_e_D_G_r_i_d > │ │ │ │ │ -45 { │ │ │ │ │ -_4_6 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ -47 { │ │ │ │ │ -48 return 1; │ │ │ │ │ -49 } │ │ │ │ │ +35 static const Level isNewFlag = (1 << 7); │ │ │ │ │ +36 static const Level levelMask = (1 << 7) - 1; │ │ │ │ │ +37 │ │ │ │ │ +38 class _S_e_t_L_o_c_a_l; │ │ │ │ │ +39 class _C_a_l_c_M_a_x_L_e_v_e_l; │ │ │ │ │ +40 │ │ │ │ │ +41 template< Level flags > │ │ │ │ │ +42 struct ClearFlags; │ │ │ │ │ +43 │ │ │ │ │ +44 struct _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +45 │ │ │ │ │ +46 public: │ │ │ │ │ +_4_7 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ │ +_4_8 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ │ +_4_9 typedef _A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ │ 50 │ │ │ │ │ -_5_1 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ +_5_1 Level _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element ) const │ │ │ │ │ 52 { │ │ │ │ │ -53 return 0.5; │ │ │ │ │ -54 } │ │ │ │ │ -55 }; │ │ │ │ │ +53 const Level *array = (Level *)level_; │ │ │ │ │ +54 return array[ dofAccess_( element, 0 ) ] & levelMask; │ │ │ │ │ +55 } │ │ │ │ │ 56 │ │ │ │ │ -57 │ │ │ │ │ -58 │ │ │ │ │ -59 // DGFGridFactory< OneDGrid > │ │ │ │ │ -60 // -------------------------- │ │ │ │ │ +_5_7 Level _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ │ +58 { │ │ │ │ │ +59 return (*this)( elementInfo._e_l() ); │ │ │ │ │ +60 } │ │ │ │ │ 61 │ │ │ │ │ -62 template< > │ │ │ │ │ -_6_3 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _O_n_e_D_G_r_i_d > │ │ │ │ │ -64 { │ │ │ │ │ -_6_6 typedef _O_n_e_D_G_r_i_d _G_r_i_d; │ │ │ │ │ -_6_8 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_7_0 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ -71 │ │ │ │ │ -_7_3 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -74 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -75 : grid_( 0 ), │ │ │ │ │ -76 emptyParameters_( 0 ) │ │ │ │ │ -77 { │ │ │ │ │ -78 generate( input, comm ); │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -_8_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -83 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -84 : grid_( 0 ), │ │ │ │ │ -85 emptyParameters_( 0 ) │ │ │ │ │ +_6_2 bool _i_s_N_e_w ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element ) const │ │ │ │ │ +63 { │ │ │ │ │ +64 const Level *array = (Level *)level_; │ │ │ │ │ +65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0); │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 bool _i_s_N_e_w ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ │ +69 { │ │ │ │ │ +70 return _i_s_N_e_w( elementInfo._e_l() ); │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +_7_3 Level _m_a_x_L_e_v_e_l () const │ │ │ │ │ +74 { │ │ │ │ │ +75 _C_a_l_c_M_a_x_L_e_v_e_l calcFromCache; │ │ │ │ │ +76 level_._f_o_r_E_a_c_h( calcFromCache ); │ │ │ │ │ +77#ifndef NDEBUG │ │ │ │ │ +78 _C_a_l_c_M_a_x_L_e_v_e_l calcFromGrid; │ │ │ │ │ +79 _m_e_s_h()._l_e_a_f_T_r_a_v_e_r_s_e( calcFromGrid, _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ +80 assert( calcFromCache._m_a_x_L_e_v_e_l() == calcFromGrid._m_a_x_L_e_v_e_l() ); │ │ │ │ │ +81#endif │ │ │ │ │ +82 return calcFromCache._m_a_x_L_e_v_e_l();; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_8_5 _M_e_s_h_P_o_i_n_t_e_r _m_e_s_h () const │ │ │ │ │ 86 { │ │ │ │ │ -87 std::ifstream input( filename.c_str() ); │ │ │ │ │ -88 generate( input, comm ); │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -_9_2 _G_r_i_d *_g_r_i_d () const │ │ │ │ │ -93 { │ │ │ │ │ -94 return grid_; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -98 template< class GG, class II > │ │ │ │ │ -_9_9 bool _w_a_s_I_n_s_e_r_t_e_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ -100 { │ │ │ │ │ -101 return false; │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -104 template< class GG, class II > │ │ │ │ │ -_1_0_5 int _b_o_u_n_d_a_r_y_I_d ( const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ -106 { │ │ │ │ │ -107 // OneDGrid returns boundary segment index; │ │ │ │ │ -108 // we return the index as the method boundaryId is deprecated │ │ │ │ │ -109 return intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x(); │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -113 template< class Entity > │ │ │ │ │ -_1_1_4 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ -115 { │ │ │ │ │ -116 return 0; │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -120 template< int codim > │ │ │ │ │ -_1_2_1 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -122 { │ │ │ │ │ -123 return 0; │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -126 template< class Entity > │ │ │ │ │ -_1_2_7 std::vector< double >& _p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -128 { │ │ │ │ │ -129 return parameter< Entity::codimension >( entity ); │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -133 template< int codim > │ │ │ │ │ -_1_3_4 std::vector< double > &_p_a_r_a_m_e_t_e_r ( [[maybe_unused]] const typename _G_r_i_d_:_: │ │ │ │ │ -_C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_E_n_t_i_t_y &element ) │ │ │ │ │ -135 { │ │ │ │ │ -136 return emptyParameters_; │ │ │ │ │ -137 } │ │ │ │ │ -138 │ │ │ │ │ -_1_4_0 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -141 { │ │ │ │ │ -142 return false; │ │ │ │ │ -143 } │ │ │ │ │ +87 return _M_e_s_h_P_o_i_n_t_e_r( level_._d_o_f_S_p_a_c_e()->mesh ); │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +_9_0 void _m_a_r_k_A_l_l_O_l_d () │ │ │ │ │ +91 { │ │ │ │ │ +92 ClearFlags< isNewFlag > clearIsNew; │ │ │ │ │ +93 level_._f_o_r_E_a_c_h( clearIsNew ); │ │ │ │ │ +94 } │ │ │ │ │ +95 │ │ │ │ │ +_9_6 void _c_r_e_a_t_e ( const _D_o_f_N_u_m_b_e_r_i_n_g &dofNumbering ) │ │ │ │ │ +97 { │ │ │ │ │ +98 const _A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e *const dofSpace = dofNumbering._d_o_f_S_p_a_c_e( 0 ); │ │ │ │ │ +99 dofAccess_ = _D_o_f_A_c_c_e_s_s( dofSpace ); │ │ │ │ │ +100 │ │ │ │ │ +101 level_._c_r_e_a_t_e( dofSpace, "Element level" ); │ │ │ │ │ +102 assert( level_ ); │ │ │ │ │ +103 level_.template setupInterpolation< Interpolation >(); │ │ │ │ │ +104 │ │ │ │ │ +105 _S_e_t_L_o_c_a_l setLocal( level_ ); │ │ │ │ │ +106 _m_e_s_h()._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( setLocal, _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g ); │ │ │ │ │ +107 } │ │ │ │ │ +108 │ │ │ │ │ +_1_0_9 void _r_e_l_e_a_s_e () │ │ │ │ │ +110 { │ │ │ │ │ +111 level_._r_e_l_e_a_s_e(); │ │ │ │ │ +112 dofAccess_ = _D_o_f_A_c_c_e_s_s(); │ │ │ │ │ +113 } │ │ │ │ │ +114 │ │ │ │ │ +115 private: │ │ │ │ │ +116 DofVectorPointer level_; │ │ │ │ │ +117 DofAccess dofAccess_; │ │ │ │ │ +118 }; │ │ │ │ │ +119 │ │ │ │ │ +120 │ │ │ │ │ +121 │ │ │ │ │ +122 // AlbertaGridLevelProvider::SetLocal │ │ │ │ │ +123 // ---------------------------------- │ │ │ │ │ +124 │ │ │ │ │ +125 template< int dim > │ │ │ │ │ +_1_2_6 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_S_e_t_L_o_c_a_l │ │ │ │ │ +127 { │ │ │ │ │ +128 _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r level_; │ │ │ │ │ +129 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ +130 │ │ │ │ │ +131 public: │ │ │ │ │ +_1_3_2 explicit _S_e_t_L_o_c_a_l ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r &level ) │ │ │ │ │ +133 : level_( level ), │ │ │ │ │ +134 dofAccess_( level.dofSpace() ) │ │ │ │ │ +135 {} │ │ │ │ │ +136 │ │ │ │ │ +_1_3_7 void _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &elementInfo ) const │ │ │ │ │ +138 { │ │ │ │ │ +139 Level *const array = (Level *)level_; │ │ │ │ │ +140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo._l_e_v_e_l(); │ │ │ │ │ +141 } │ │ │ │ │ +142 }; │ │ │ │ │ +143 │ │ │ │ │ 144 │ │ │ │ │ -146 template< class GG, class II > │ │ │ │ │ -_1_4_7 const _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e &_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r ( [[maybe_unused]] │ │ │ │ │ -const _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_G_,_ _I_I_ _> &intersection ) const │ │ │ │ │ -148 { │ │ │ │ │ -149 return _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e(); │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -152 private: │ │ │ │ │ -153 // generate grid │ │ │ │ │ -154 void generate ( std::istream &input, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm ); │ │ │ │ │ -155 │ │ │ │ │ -156 _G_r_i_d *grid_; │ │ │ │ │ -157 std::vector< double > emptyParameters_; │ │ │ │ │ -158 }; │ │ │ │ │ -159 │ │ │ │ │ -160 │ │ │ │ │ -161 │ │ │ │ │ -162 // Implementation of DGFGridFactory< OneDGrid > │ │ │ │ │ -163 // -------------------------------------------- │ │ │ │ │ -164 │ │ │ │ │ -165 inline void DGFGridFactory< OneDGrid >::generate ( std::istream &input, [ │ │ │ │ │ -[maybe_unused]] MPICommunicatorType comm ) │ │ │ │ │ -166 { │ │ │ │ │ -167 // try to open interval block │ │ │ │ │ -168 dgf::IntervalBlock intervalBlock( input ); │ │ │ │ │ -169 │ │ │ │ │ -170 // try to open vertex block │ │ │ │ │ -171 int dimensionworld = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -172 dgf::VertexBlock vertexBlock( input, dimensionworld ); │ │ │ │ │ -173 │ │ │ │ │ -174 // check at least one block is active │ │ │ │ │ -175 if( !( vertexBlock.isactive() || intervalBlock.isactive() )) │ │ │ │ │ -176 DUNE_THROW( DGFException, "No readable block found" ); │ │ │ │ │ -177 │ │ │ │ │ -178 std::vector< std::vector< double > > vertices; │ │ │ │ │ +145 │ │ │ │ │ +146 // AlbertaGridLevelProvider::CalcMaxLevel │ │ │ │ │ +147 // -------------------------------------- │ │ │ │ │ +148 │ │ │ │ │ +149 template< int dim > │ │ │ │ │ +_1_5_0 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ +151 { │ │ │ │ │ +152 Level maxLevel_; │ │ │ │ │ +153 │ │ │ │ │ +154 public: │ │ │ │ │ +_1_5_5 _C_a_l_c_M_a_x_L_e_v_e_l () │ │ │ │ │ +156 : maxLevel_( 0 ) │ │ │ │ │ +157 {} │ │ │ │ │ +158 │ │ │ │ │ +_1_5_9 void _o_p_e_r_a_t_o_r_(_)_ ( const Level &dof ) │ │ │ │ │ +160 { │ │ │ │ │ +161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) ); │ │ │ │ │ +162 } │ │ │ │ │ +163 │ │ │ │ │ +_1_6_4 void _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &elementInfo ) │ │ │ │ │ +165 { │ │ │ │ │ +166 maxLevel_ = std::max( maxLevel_, Level( elementInfo._l_e_v_e_l() ) ); │ │ │ │ │ +167 } │ │ │ │ │ +168 │ │ │ │ │ +_1_6_9 Level _m_a_x_L_e_v_e_l () const │ │ │ │ │ +170 { │ │ │ │ │ +171 return maxLevel_; │ │ │ │ │ +172 } │ │ │ │ │ +173 }; │ │ │ │ │ +174 │ │ │ │ │ +175 │ │ │ │ │ +176 │ │ │ │ │ +177 // AlbertaGridLevelProvider::ClearFlags │ │ │ │ │ +178 // ------------------------------------ │ │ │ │ │ 179 │ │ │ │ │ -180 // read vertices first │ │ │ │ │ -181 if( vertexBlock.isactive() ) │ │ │ │ │ -182 { │ │ │ │ │ -183 int nparameter = 0; │ │ │ │ │ -184 std::vector< std::vector< double > > _p_a_r_a_m_e_t_e_r; │ │ │ │ │ -185 vertexBlock.get( vertices, _p_a_r_a_m_e_t_e_r, nparameter ); │ │ │ │ │ -186 │ │ │ │ │ -187 if( nparameter > 0 ) │ │ │ │ │ -188 std::cerr << "Warning: vertex parameters will be ignored" << std::endl; │ │ │ │ │ -189 } │ │ │ │ │ +180 template< int dim > │ │ │ │ │ +181 template< typename AlbertaGridLevelProvider< dim >::Level flags > │ │ │ │ │ +182 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::ClearFlags │ │ │ │ │ +183 { │ │ │ │ │ +184 void _o_p_e_r_a_t_o_r_(_)_ ( Level &dof ) const │ │ │ │ │ +185 { │ │ │ │ │ +186 dof &= ~flags; │ │ │ │ │ +187 } │ │ │ │ │ +188 }; │ │ │ │ │ +189 │ │ │ │ │ 190 │ │ │ │ │ -191 // get vertices from interval block │ │ │ │ │ -192 if ( intervalBlock.isactive() ) │ │ │ │ │ -193 { │ │ │ │ │ -194 if( intervalBlock.dimw() != dimensionworld ) │ │ │ │ │ -195 { │ │ │ │ │ -196 DUNE_THROW( DGFException, "Error: wrong coordinate dimension in interval │ │ │ │ │ -block \ │ │ │ │ │ -197 (got " << intervalBlock.dimw() << ", expected " << dimensionworld << ")" ); │ │ │ │ │ -198 } │ │ │ │ │ +191 │ │ │ │ │ +192 // AlbertaGridLevelProvider::Interpolation │ │ │ │ │ +193 // --------------------------------------- │ │ │ │ │ +194 │ │ │ │ │ +195 template< int dim > │ │ │ │ │ +_1_9_6 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +197 { │ │ │ │ │ +_1_9_8 static const int dimension = dim; │ │ │ │ │ 199 │ │ │ │ │ -200 int nintervals = intervalBlock.numIntervals(); │ │ │ │ │ -201 for( int i = 0; i < nintervals; ++i ) │ │ │ │ │ -202 intervalBlock.getVtx( i, vertices ); │ │ │ │ │ -203 } │ │ │ │ │ -204 │ │ │ │ │ -205 // copy to vector of doubles │ │ │ │ │ -206 std::vector< double > vtx( vertices.size() ); │ │ │ │ │ -207 transform( vertices.begin(), vertices.end(), vtx.begin(), getfirst ); │ │ │ │ │ -208 │ │ │ │ │ -209 // remove duplicates │ │ │ │ │ -210 std::sort( vtx.begin(), vtx.end() ); │ │ │ │ │ -211 std::vector< double >::iterator it = std::unique( vtx.begin(), vtx.end() ); │ │ │ │ │ -212 vtx.erase( it, vtx.end() ); │ │ │ │ │ -213 if( vertices.size() != vtx.size() ) │ │ │ │ │ -214 std::cerr << "Warning: removed duplicate vertices" << std::endl; │ │ │ │ │ -215 │ │ │ │ │ -216 // create grid │ │ │ │ │ -217 grid_ = new OneDGrid( vtx ); │ │ │ │ │ +_2_0_0 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> _P_a_t_c_h; │ │ │ │ │ +201 │ │ │ │ │ +_2_0_2 static void _i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r &dofVector, │ │ │ │ │ +203 const _P_a_t_c_h &patch ) │ │ │ │ │ +204 { │ │ │ │ │ +205 const _D_o_f_A_c_c_e_s_s dofAccess( dofVector._d_o_f_S_p_a_c_e() ); │ │ │ │ │ +206 Level *array = (Level *)dofVector; │ │ │ │ │ +207 │ │ │ │ │ +208 for( int i = 0; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ │ +209 { │ │ │ │ │ +210 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ │ +211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask ); │ │ │ │ │ +212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag; │ │ │ │ │ +213 for( int i = 0; i < 2; ++i ) │ │ │ │ │ +214 { │ │ │ │ │ +215 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *child = father->child[ i ]; │ │ │ │ │ +216 array[ dofAccess( child, 0 ) ] = childLevel; │ │ │ │ │ +217 } │ │ │ │ │ 218 } │ │ │ │ │ -219 │ │ │ │ │ -220} // end namespace Dune │ │ │ │ │ +219 } │ │ │ │ │ +220 }; │ │ │ │ │ 221 │ │ │ │ │ -222#endif // #ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ -_o_n_e_d_g_r_i_d_._h_h │ │ │ │ │ -The OneDGrid class. │ │ │ │ │ +222} │ │ │ │ │ +223 │ │ │ │ │ +224#endif // #if HAVE_ALBERTA │ │ │ │ │ +225 │ │ │ │ │ +226#endif │ │ │ │ │ +_d_o_f_a_d_m_i_n_._h_h │ │ │ │ │ +_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ │ +_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ │ +provides a wrapper for ALBERTA's mesh structure │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Element &element) │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ │ -size_t boundarySegmentIndex() const │ │ │ │ │ -index of the boundary segment within the macro grid │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static constexpr int dimensionworld │ │ │ │ │ -The dimension of the world the grid lives in. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m_:_:_E_n_t_i_t_y │ │ │ │ │ -GridFamily::Traits::template Codim< cd >::Entity Entity │ │ │ │ │ -A type that is a model of a Dune::Entity. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:419 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _O_n_e_D_G_r_i_d_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ -static double refineWeight() │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _O_n_e_D_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_G_r_i_d │ │ │ │ │ -OneDGrid Grid │ │ │ │ │ -grid type │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const typename Grid::Codim< codim >::Entity │ │ │ │ │ -&element) │ │ │ │ │ -return empty vector │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicatorType │ │ │ │ │ -MPI communicator type. │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r │ │ │ │ │ -const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< │ │ │ │ │ -GG, II > &intersection) const │ │ │ │ │ -return invalid default value │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_g_r_i_d │ │ │ │ │ -Grid * grid() const │ │ │ │ │ -get grid │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -bool haveBoundaryParameters() const │ │ │ │ │ -OneDGrid does not support boundary parameters. │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters(const Entity &) const │ │ │ │ │ -OneDGrid does not support parameters, returns 0. │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicatorType │ │ │ │ │ -comm=MPIHelper::getCommunicator()) │ │ │ │ │ -constructor taking filename │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -constructor taking istream │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -OneDGrid does not support parameters, returns 0. │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _O_n_e_D_G_r_i_d_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Dune::Intersection< GG, II > &intersection) const │ │ │ │ │ -always returns false │ │ │ │ │ -DDeeffiinniittiioonn dgfoned.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ -Some simple static information for a given GridType. │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_d_e_f_a_u_l_t_V_a_l_u_e │ │ │ │ │ -static const type & defaultValue() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e │ │ │ │ │ -std::string type │ │ │ │ │ -type of additional boundary parameters │ │ │ │ │ -DDeeffiinniittiioonn parser.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_O_n_e_D_G_r_i_d │ │ │ │ │ -One-dimensional adaptive grid. │ │ │ │ │ -DDeeffiinniittiioonn onedgrid.hh:94 │ │ │ │ │ -_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ │ +ALBERTA EL Element │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ │ +ALBERTA FE_SPACE DofSpace │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ │ +void leafTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ +fillFlags=FillFlags::standard) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:385 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ │ +void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ │ +fillFlags=FillFlags::standard) const │ │ │ │ │ +DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * dofSpace(int codim) const │ │ │ │ │ +DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _L_e_v_e_l_ _> │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ │ +const DofSpace * dofSpace() const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_f_o_r_E_a_c_h │ │ │ │ │ +void forEach(Functor &functor) const │ │ │ │ │ +DDeeffiinniittiioonn dofvector.hh:264 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ │ +int level() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ │ +Element * el() const │ │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn level.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_i_s_N_e_w │ │ │ │ │ +bool isNew(const Alberta::Element *element) const │ │ │ │ │ +DDeeffiinniittiioonn level.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_i_s_N_e_w │ │ │ │ │ +bool isNew(const ElementInfo &elementInfo) const │ │ │ │ │ +DDeeffiinniittiioonn level.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ │ +Alberta::MeshPointer< dim > MeshPointer │ │ │ │ │ +DDeeffiinniittiioonn level.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_e_s_h │ │ │ │ │ +MeshPointer mesh() const │ │ │ │ │ +DDeeffiinniittiioonn level.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_c_r_e_a_t_e │ │ │ │ │ +void create(const DofNumbering &dofNumbering) │ │ │ │ │ +DDeeffiinniittiioonn level.hh:96 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ +Level maxLevel() const │ │ │ │ │ +DDeeffiinniittiioonn level.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ │ +Alberta::HierarchyDofNumbering< dim > DofNumbering │ │ │ │ │ +DDeeffiinniittiioonn level.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ │ +void release() │ │ │ │ │ +DDeeffiinniittiioonn level.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +Level operator()(const Alberta::Element *element) const │ │ │ │ │ +DDeeffiinniittiioonn level.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_a_r_k_A_l_l_O_l_d │ │ │ │ │ +void markAllOld() │ │ │ │ │ +DDeeffiinniittiioonn level.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ │ +Alberta::ElementInfo< dim > ElementInfo │ │ │ │ │ +DDeeffiinniittiioonn level.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_S_e_t_L_o_c_a_l │ │ │ │ │ +DDeeffiinniittiioonn level.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_S_e_t_L_o_c_a_l_:_:_S_e_t_L_o_c_a_l │ │ │ │ │ +SetLocal(const DofVectorPointer &level) │ │ │ │ │ +DDeeffiinniittiioonn level.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ +DDeeffiinniittiioonn level.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ │ +CalcMaxLevel() │ │ │ │ │ +DDeeffiinniittiioonn level.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ +Level maxLevel() const │ │ │ │ │ +DDeeffiinniittiioonn level.hh:169 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn level.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_a_t_c_h │ │ │ │ │ +Alberta::Patch< dimension > Patch │ │ │ │ │ +DDeeffiinniittiioonn level.hh:200 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r │ │ │ │ │ +static void interpolateVector(const DofVectorPointer &dofVector, const Patch │ │ │ │ │ +&patch) │ │ │ │ │ +DDeeffiinniittiioonn level.hh:202 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ │ +static const Flags nothing │ │ │ │ │ +DDeeffiinniittiioonn misc.hh:234 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_c_o_u_n_t │ │ │ │ │ +int count() const │ │ │ │ │ +DDeeffiinniittiioonn refinement.hh:67 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00866_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html │ │ │ │┄ Files 18% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey.hh Source File │ │ │ │ +dune-grid: yaspgridindexsets.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,221 +70,147 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entitykey.hh
│ │ │ │ +
yaspgridindexsets.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGFEnTITYKEY_HH
│ │ │ │ -
6#define DUNE_DGFEnTITYKEY_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
14namespace Dune {
│ │ │ │
15
│ │ │ │ -
16 // DGFEntityKey
│ │ │ │ -
17 // ------------
│ │ │ │ -
18
│ │ │ │ -
19 template< class A >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 {
│ │ │ │ -
22 DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey = true );
│ │ │ │ -
23 DGFEntityKey ( const std::vector< A > &key,
│ │ │ │ -
24 int N, int offset, bool setOrigKey = true );
│ │ │ │ - │ │ │ │ -
26
│ │ │ │ - │ │ │ │ +
22 template<class GridImp, bool isLeafIndexSet>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, unsigned int >
│ │ │ │ +
25 {
│ │ │ │ + │ │ │ │ + │ │ │ │
28
│ │ │ │ -
│ │ │ │ -
29 inline const A &operator[] ( int i ) const;
│ │ │ │ -
│ │ │ │ -
30 inline bool operator < ( const DGFEntityKey< A > &k ) const;
│ │ │ │ +
29 public:
│ │ │ │ +
30 typedef typename Base::IndexType IndexType;
│ │ │ │
31
│ │ │ │ -
32 void orientation ( int base, std :: vector< std :: vector< double > > &vtx );
│ │ │ │ -
33 void print( std :: ostream &out = std :: cerr ) const;
│ │ │ │ -
34
│ │ │ │ +
32 using Base::subIndex;
│ │ │ │ +
33
│ │ │ │
│ │ │ │ -
35 inline bool origKeySet () const;
│ │ │ │ -
│ │ │ │ -
36 inline const A &origKey ( int i ) const;
│ │ │ │ -
│ │ │ │ -
37 inline int size () const;
│ │ │ │ -
38
│ │ │ │ -
39 private:
│ │ │ │ -
40 std :: vector< A > key_, origKey_;
│ │ │ │ -
41 bool origKeySet_;
│ │ │ │ -
42 };
│ │ │ │ -
43
│ │ │ │ -
44
│ │ │ │ -
45 template< class A >
│ │ │ │ -
│ │ │ │ -
46 inline const A &DGFEntityKey< A > :: operator[] ( int i ) const
│ │ │ │ -
47 {
│ │ │ │ -
48 return key_[ i ];
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ +
35 YaspIndexSet ( const GridImp &g, int l )
│ │ │ │ +
36 : grid( g ),
│ │ │ │ +
37 level( l )
│ │ │ │ +
38 {
│ │ │ │ +
39 assert(not isLeafIndexSet);
│ │ │ │ +
40
│ │ │ │ +
41 // contains a single element type;
│ │ │ │ +
42 for (int codim=0; codim<=GridImp::dimension; codim++)
│ │ │ │ +
43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
47 YaspIndexSet ( const GridImp &g )
│ │ │ │ +
48 : grid( g )
│ │ │ │ +
49 {
│ │ │ │ +
50 assert(isLeafIndexSet);
│ │ │ │
51
│ │ │ │ -
52 template< class A >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 {
│ │ │ │ -
55 // assert(k.key_.size()==key_.size());
│ │ │ │ -
56 return key_ < k.key_;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59
│ │ │ │ -
60 template< class A >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
62 {
│ │ │ │ -
63 return origKeySet_;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
66
│ │ │ │ -
67 template< class A >
│ │ │ │ -
│ │ │ │ -
68 inline const A &DGFEntityKey< A > :: origKey ( int i ) const
│ │ │ │ -
69 {
│ │ │ │ -
70 return origKey_[ i ];
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
74 template< class A >
│ │ │ │ -
│ │ │ │ -
75 inline int DGFEntityKey< A > :: size () const
│ │ │ │ -
76 {
│ │ │ │ -
77 return key_.size();
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ +
52 // contains a single element type;
│ │ │ │ +
53 for (int codim=0; codim<=GridImp::dimension; codim++)
│ │ │ │ +
54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
58 template<int cc>
│ │ │ │ +
│ │ │ │ +
59 IndexType index (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e) const
│ │ │ │ +
60 {
│ │ │ │ +
61 return e.impl().compressedIndex();
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
65 template< int cc >
│ │ │ │ +
│ │ │ │ +
66 IndexType subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
│ │ │ │ +
67 int i, unsigned int codim ) const
│ │ │ │ +
68 {
│ │ │ │ +
69 return e.impl().subCompressedIndex(i, codim);
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
73 std::size_t size (GeometryType type) const
│ │ │ │ +
74 {
│ │ │ │ +
75 return (isLeafIndexSet)
│ │ │ │ +
76 ? grid.size( type )
│ │ │ │ +
77 : grid.size( level, type );
│ │ │ │ +
78 }
│ │ │ │
│ │ │ │
79
│ │ │ │ -
80
│ │ │ │ -
81
│ │ │ │ -
82 // ElementFaceUtil
│ │ │ │ -
83 // ---------------
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
86 {
│ │ │ │ -
87 inline static int nofFaces ( int dim, const std::vector< unsigned int > &element );
│ │ │ │ -
88 inline static int faceSize ( int dim, bool simpl );
│ │ │ │ -
89
│ │ │ │ - │ │ │ │ -
91 generateFace ( int dim, const std::vector< unsigned int > &element, int f );
│ │ │ │ -
92
│ │ │ │ -
93 private:
│ │ │ │ -
94 template< int dim >
│ │ │ │ - │ │ │ │ -
96 generateCubeFace( const std::vector< unsigned int > &element, int f );
│ │ │ │ -
97
│ │ │ │ -
98 template< int dim >
│ │ │ │ - │ │ │ │ -
100 generateSimplexFace ( const std::vector< unsigned int > &element, int f );
│ │ │ │ -
101 };
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
104 inline int ElementFaceUtil::nofFaces ( int dim, const std::vector< unsigned int > &element )
│ │ │ │ -
105 {
│ │ │ │ -
106 switch( dim )
│ │ │ │ -
107 {
│ │ │ │ -
108 case 1 :
│ │ │ │ -
109 return 2;
│ │ │ │ -
110 case 2 :
│ │ │ │ -
111 switch( element.size() )
│ │ │ │ -
112 {
│ │ │ │ -
113 case 3 :
│ │ │ │ -
114 return 3;
│ │ │ │ -
115 case 4 :
│ │ │ │ -
116 return 4;
│ │ │ │ -
117 default :
│ │ │ │ -
118 return -1;
│ │ │ │ -
119 }
│ │ │ │ -
120 case 3 :
│ │ │ │ -
121 switch( element.size() )
│ │ │ │ -
122 {
│ │ │ │ -
123 case 4 :
│ │ │ │ -
124 return 4;
│ │ │ │ -
125 case 8 :
│ │ │ │ -
126 return 6;
│ │ │ │ -
127 default :
│ │ │ │ -
128 return -1;
│ │ │ │ -
129 }
│ │ │ │ -
130 default :
│ │ │ │ -
131 return -1;
│ │ │ │ -
132 }
│ │ │ │ -
133 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
135
│ │ │ │ -
│ │ │ │ -
136 inline int ElementFaceUtil::faceSize( int dim, bool simpl )
│ │ │ │ -
137 {
│ │ │ │ -
138 switch( dim )
│ │ │ │ -
139 {
│ │ │ │ -
140 case 1 :
│ │ │ │ -
141 return 1;
│ │ │ │ -
142 case 2 :
│ │ │ │ -
143 return 2;
│ │ │ │ -
144 case 3 :
│ │ │ │ -
145 return (simpl ? 3 : 4);
│ │ │ │ -
146 default :
│ │ │ │ -
147 return -1;
│ │ │ │ -
148 }
│ │ │ │ -
149 }
│ │ │ │ -
│ │ │ │ -
150
│ │ │ │ -
151} //end namespace Dune
│ │ │ │ -
152
│ │ │ │ -
153// inlcude inline implementation
│ │ │ │ -
154#include "entitykey_inline.hh"
│ │ │ │ -
155#endif
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
81 std::size_t size (int codim) const
│ │ │ │ +
82 {
│ │ │ │ +
83 return (isLeafIndexSet)
│ │ │ │ +
84 ? grid.size( codim )
│ │ │ │ +
85 : grid.size( level, codim );
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
89 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
90 bool contains (const EntityType& e) const
│ │ │ │ +
91 {
│ │ │ │ +
92 return (isLeafIndexSet)
│ │ │ │ +
93 ? e.level() == grid.maxLevel()
│ │ │ │ +
94 : e.level() == level;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
97 std::vector< GeometryType > types ( int codim ) const { return mytypes[ codim ]; }
│ │ │ │ +
98
│ │ │ │ +
│ │ │ │ +
100 const std::vector<GeometryType>& geomTypes (int codim) const
│ │ │ │ +
101 {
│ │ │ │ +
102 return mytypes[codim];
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
105 private:
│ │ │ │ +
106 const GridImp& grid;
│ │ │ │ +
107 int level;
│ │ │ │ +
108 std::vector<GeometryType> mytypes[std::remove_const<GridImp>::type::dimension+1];
│ │ │ │ +
109 };
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
111} // namespace Dune
│ │ │ │ +
112
│ │ │ │ +
113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition entitykey.hh:21
│ │ │ │ -
bool operator<(const DGFEntityKey< A > &k) const
Definition entitykey.hh:53
│ │ │ │ -
DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)
Definition entitykey_inline.hh:64
│ │ │ │ -
bool origKeySet() const
Definition entitykey.hh:61
│ │ │ │ -
int size() const
Definition entitykey.hh:75
│ │ │ │ -
void orientation(int base, std ::vector< std ::vector< double > > &vtx)
Definition entitykey_inline.hh:78
│ │ │ │ -
const A & origKey(int i) const
Definition entitykey.hh:68
│ │ │ │ -
DGFEntityKey(const std::vector< A > &key, int N, int offset, bool setOrigKey=true)
│ │ │ │ -
void print(std ::ostream &out=std ::cerr) const
Definition entitykey_inline.hh:105
│ │ │ │ -
const A & operator[](int i) const
Definition entitykey.hh:46
│ │ │ │ -
Definition entitykey.hh:86
│ │ │ │ -
static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
Definition entitykey_inline.hh:145
│ │ │ │ -
static int faceSize(int dim, bool simpl)
Definition entitykey.hh:136
│ │ │ │ -
static int nofFaces(int dim, const std::vector< unsigned int > &element)
Definition entitykey.hh:104
│ │ │ │ +
Index Set Interface base class.
Definition indexidset.hh:78
│ │ │ │ +
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition indexidset.hh:153
│ │ │ │ +
Export the type of the entity used as parameter in the index(...) method.
Definition indexidset.hh:87
│ │ │ │ +
Implementation of Level- and LeafIndexSets for YaspGrid.
Definition yaspgridindexsets.hh:25
│ │ │ │ +
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition yaspgridindexsets.hh:100
│ │ │ │ +
YaspIndexSet(const GridImp &g)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:47
│ │ │ │ +
YaspIndexSet(const GridImp &g, int l)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:35
│ │ │ │ +
IndexType index(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e) const
get index of an entity
Definition yaspgridindexsets.hh:59
│ │ │ │ +
bool contains(const EntityType &e) const
return true if the given entity is contained in .
Definition yaspgridindexsets.hh:90
│ │ │ │ +
std::size_t size(GeometryType type) const
get number of entities of given type and level (the level is known to the object)
Definition yaspgridindexsets.hh:73
│ │ │ │ +
IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
get index of subentity of an entity
Definition yaspgridindexsets.hh:66
│ │ │ │ +
std::vector< GeometryType > types(int codim) const
Definition yaspgridindexsets.hh:97
│ │ │ │ +
std::size_t size(int codim) const
return size of set for a given codim
Definition yaspgridindexsets.hh:81
│ │ │ │ +
Base::IndexType IndexType
Definition yaspgridindexsets.hh:30
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,219 +1,168 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _i_o │ │ │ │ │ - * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -entitykey.hh │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +yaspgridindexsets.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGFEnTITYKEY_HH │ │ │ │ │ -6#define DUNE_DGFEnTITYKEY_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ │ 15 │ │ │ │ │ -16 // DGFEntityKey │ │ │ │ │ -17 // ------------ │ │ │ │ │ -18 │ │ │ │ │ -19 template< class A > │ │ │ │ │ -_2_0 struct _D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ -21 { │ │ │ │ │ -22 _D_G_F_E_n_t_i_t_y_K_e_y ( const std :: vector< A > &key, bool setOrigKey = true ); │ │ │ │ │ -_2_3 _D_G_F_E_n_t_i_t_y_K_e_y ( const std::vector< A > &key, │ │ │ │ │ -24 int N, int offset, bool setOrigKey = true ); │ │ │ │ │ -25 _D_G_F_E_n_t_i_t_y_K_e_y ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ); │ │ │ │ │ -26 │ │ │ │ │ -27 _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &_o_p_e_r_a_t_o_r_=_ ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ); │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ +24 : public _I_n_d_e_x_S_e_t< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, │ │ │ │ │ +unsigned int > │ │ │ │ │ +25 { │ │ │ │ │ +26 typedef _Y_a_s_p_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _i_s_L_e_a_f_I_n_d_e_x_S_e_t_ _> _T_h_i_s; │ │ │ │ │ +27 typedef _I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _T_h_i_s_,_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> _B_a_s_e; │ │ │ │ │ 28 │ │ │ │ │ -_2_9 inline const A &_o_p_e_r_a_t_o_r_[_]_ ( int i ) const; │ │ │ │ │ -_3_0 inline bool _o_p_e_r_a_t_o_r_ _<_ ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) const; │ │ │ │ │ +29 public: │ │ │ │ │ +_3_0 typedef typename _B_a_s_e_:_:_I_n_d_e_x_T_y_p_e _I_n_d_e_x_T_y_p_e; │ │ │ │ │ 31 │ │ │ │ │ -32 void _o_r_i_e_n_t_a_t_i_o_n ( int base, std :: vector< std :: vector< double > > &vtx │ │ │ │ │ -); │ │ │ │ │ -33 void _p_r_i_n_t( std :: ostream &out = std :: cerr ) const; │ │ │ │ │ -34 │ │ │ │ │ -_3_5 inline bool _o_r_i_g_K_e_y_S_e_t () const; │ │ │ │ │ -_3_6 inline const A &_o_r_i_g_K_e_y ( int i ) const; │ │ │ │ │ -_3_7 inline int _s_i_z_e () const; │ │ │ │ │ -38 │ │ │ │ │ -39 private: │ │ │ │ │ -40 std :: vector< A > key_, origKey_; │ │ │ │ │ -41 bool origKeySet_; │ │ │ │ │ -42 }; │ │ │ │ │ -43 │ │ │ │ │ -44 │ │ │ │ │ -45 template< class A > │ │ │ │ │ -_4_6 inline const A &_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_p_e_r_a_t_o_r_[_]_ ( int i ) const │ │ │ │ │ -47 { │ │ │ │ │ -48 return key_[ i ]; │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ +32 using _B_a_s_e_:_:_s_u_b_I_n_d_e_x; │ │ │ │ │ +33 │ │ │ │ │ +_3_5 _Y_a_s_p_I_n_d_e_x_S_e_t ( const GridImp &g, int l ) │ │ │ │ │ +36 : grid( g ), │ │ │ │ │ +37 level( l ) │ │ │ │ │ +38 { │ │ │ │ │ +39 assert(not isLeafIndexSet); │ │ │ │ │ +40 │ │ │ │ │ +41 // contains a single element type; │ │ │ │ │ +42 for (int codim=0; codim<=GridImp::dimension; codim++) │ │ │ │ │ +43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim)); │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +_4_7 _Y_a_s_p_I_n_d_e_x_S_e_t ( const GridImp &g ) │ │ │ │ │ +48 : grid( g ) │ │ │ │ │ +49 { │ │ │ │ │ +50 assert(isLeafIndexSet); │ │ │ │ │ 51 │ │ │ │ │ -52 template< class A > │ │ │ │ │ -_5_3 inline bool _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_p_e_r_a_t_o_r_<_ ( const _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _> &k ) │ │ │ │ │ -const │ │ │ │ │ -54 { │ │ │ │ │ -55 // assert(k.key_.size()==key_.size()); │ │ │ │ │ -56 return key_ < k.key_; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -59 │ │ │ │ │ -60 template< class A > │ │ │ │ │ -_6_1 inline bool _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_r_i_g_K_e_y_S_e_t () const │ │ │ │ │ -62 { │ │ │ │ │ -63 return origKeySet_; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -66 │ │ │ │ │ -67 template< class A > │ │ │ │ │ -_6_8 inline const A &_D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _o_r_i_g_K_e_y ( int i ) const │ │ │ │ │ -69 { │ │ │ │ │ -70 return origKey_[ i ]; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 │ │ │ │ │ -74 template< class A > │ │ │ │ │ -_7_5 inline int _D_G_F_E_n_t_i_t_y_K_e_y_<_ _A_ _>_ _:_:_ _s_i_z_e () const │ │ │ │ │ -76 { │ │ │ │ │ -77 return key_._s_i_z_e(); │ │ │ │ │ +52 // contains a single element type; │ │ │ │ │ +53 for (int codim=0; codim<=GridImp::dimension; codim++) │ │ │ │ │ +54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim)); │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +58 template │ │ │ │ │ +_5_9 _I_n_d_e_x_T_y_p_e _i_n_d_e_x (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim::Entity& e) const │ │ │ │ │ +60 { │ │ │ │ │ +61 return e.impl().compressedIndex(); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +65 template< int cc > │ │ │ │ │ +_6_6 _I_n_d_e_x_T_y_p_e _s_u_b_I_n_d_e_x ( const typename std::remove_const< GridImp >::type:: │ │ │ │ │ +Traits::template Codim< cc >::Entity &e, │ │ │ │ │ +67 int i, unsigned int codim ) const │ │ │ │ │ +68 { │ │ │ │ │ +69 return e.impl().subCompressedIndex(i, codim); │ │ │ │ │ +70 } │ │ │ │ │ +71 │ │ │ │ │ +_7_3 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ +74 { │ │ │ │ │ +75 return (isLeafIndexSet) │ │ │ │ │ +76 ? grid.size( type ) │ │ │ │ │ +77 : grid.size( level, type ); │ │ │ │ │ 78 } │ │ │ │ │ 79 │ │ │ │ │ -80 │ │ │ │ │ -81 │ │ │ │ │ -82 // ElementFaceUtil │ │ │ │ │ -83 // --------------- │ │ │ │ │ -84 │ │ │ │ │ -_8_5 struct _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l │ │ │ │ │ -86 { │ │ │ │ │ -87 inline static int _n_o_f_F_a_c_e_s ( int dim, const std::vector< unsigned int > │ │ │ │ │ -&element ); │ │ │ │ │ -88 inline static int _f_a_c_e_S_i_z_e ( int dim, bool simpl ); │ │ │ │ │ -89 │ │ │ │ │ -90 static _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ -91 _g_e_n_e_r_a_t_e_F_a_c_e ( int dim, const std::vector< unsigned int > &element, int f ); │ │ │ │ │ -92 │ │ │ │ │ -93 private: │ │ │ │ │ -94 template< int dim > │ │ │ │ │ -95 static _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ -96 generateCubeFace( const std::vector< unsigned int > &element, int f ); │ │ │ │ │ -97 │ │ │ │ │ -98 template< int dim > │ │ │ │ │ -99 static _D_G_F_E_n_t_i_t_y_K_e_y_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ │ -100 generateSimplexFace ( const std::vector< unsigned int > &element, int f ); │ │ │ │ │ -101 }; │ │ │ │ │ -102 │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 inline int _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_n_o_f_F_a_c_e_s ( int dim, const std::vector< unsigned │ │ │ │ │ -int > &element ) │ │ │ │ │ -105 { │ │ │ │ │ -106 switch( dim ) │ │ │ │ │ -107 { │ │ │ │ │ -108 case 1 : │ │ │ │ │ -109 return 2; │ │ │ │ │ -110 case 2 : │ │ │ │ │ -111 switch( element.size() ) │ │ │ │ │ -112 { │ │ │ │ │ -113 case 3 : │ │ │ │ │ -114 return 3; │ │ │ │ │ -115 case 4 : │ │ │ │ │ -116 return 4; │ │ │ │ │ -117 default : │ │ │ │ │ -118 return -1; │ │ │ │ │ -119 } │ │ │ │ │ -120 case 3 : │ │ │ │ │ -121 switch( element.size() ) │ │ │ │ │ -122 { │ │ │ │ │ -123 case 4 : │ │ │ │ │ -124 return 4; │ │ │ │ │ -125 case 8 : │ │ │ │ │ -126 return 6; │ │ │ │ │ -127 default : │ │ │ │ │ -128 return -1; │ │ │ │ │ -129 } │ │ │ │ │ -130 default : │ │ │ │ │ -131 return -1; │ │ │ │ │ -132 } │ │ │ │ │ -133 } │ │ │ │ │ -134 │ │ │ │ │ -135 │ │ │ │ │ -_1_3_6 inline int _E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_f_a_c_e_S_i_z_e( int dim, bool simpl ) │ │ │ │ │ -137 { │ │ │ │ │ -138 switch( dim ) │ │ │ │ │ -139 { │ │ │ │ │ -140 case 1 : │ │ │ │ │ -141 return 1; │ │ │ │ │ -142 case 2 : │ │ │ │ │ -143 return 2; │ │ │ │ │ -144 case 3 : │ │ │ │ │ -145 return (simpl ? 3 : 4); │ │ │ │ │ -146 default : │ │ │ │ │ -147 return -1; │ │ │ │ │ -148 } │ │ │ │ │ -149 } │ │ │ │ │ -150 │ │ │ │ │ -151} //end namespace Dune │ │ │ │ │ -152 │ │ │ │ │ -153// inlcude inline implementation │ │ │ │ │ -154#include "_e_n_t_i_t_y_k_e_y___i_n_l_i_n_e_._h_h" │ │ │ │ │ -155#endif │ │ │ │ │ -_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ -_e_n_t_i_t_y_k_e_y___i_n_l_i_n_e_._h_h │ │ │ │ │ +_8_1 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ +82 { │ │ │ │ │ +83 return (isLeafIndexSet) │ │ │ │ │ +84 ? grid.size( codim ) │ │ │ │ │ +85 : grid.size( level, codim ); │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +89 template │ │ │ │ │ +_9_0 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ +91 { │ │ │ │ │ +92 return (isLeafIndexSet) │ │ │ │ │ +93 ? e.level() == grid.maxLevel() │ │ │ │ │ +94 : e.level() == level; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +_9_7 std::vector< GeometryType > _t_y_p_e_s ( int codim ) const { return mytypes │ │ │ │ │ +[ codim ]; } │ │ │ │ │ +98 │ │ │ │ │ +_1_0_0 const std::vector& _g_e_o_m_T_y_p_e_s (int codim) const │ │ │ │ │ +101 { │ │ │ │ │ +102 return mytypes[codim]; │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +105 private: │ │ │ │ │ +106 const GridImp& grid; │ │ │ │ │ +107 int level; │ │ │ │ │ +108 std::vector mytypes[std::remove_const::type:: │ │ │ │ │ +dimension+1]; │ │ │ │ │ +109 }; │ │ │ │ │ +110 │ │ │ │ │ +111} // namespace Dune │ │ │ │ │ +112 │ │ │ │ │ +113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ -bool operator<(const DGFEntityKey< A > &k) const │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k) │ │ │ │ │ -DDeeffiinniittiioonn entitykey_inline.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_r_i_g_K_e_y_S_e_t │ │ │ │ │ -bool origKeySet() const │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_s_i_z_e │ │ │ │ │ -int size() const │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_r_i_e_n_t_a_t_i_o_n │ │ │ │ │ -void orientation(int base, std ::vector< std ::vector< double > > &vtx) │ │ │ │ │ -DDeeffiinniittiioonn entitykey_inline.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_r_i_g_K_e_y │ │ │ │ │ -const A & origKey(int i) const │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_D_G_F_E_n_t_i_t_y_K_e_y │ │ │ │ │ -DGFEntityKey(const std::vector< A > &key, int N, int offset, bool │ │ │ │ │ -setOrigKey=true) │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_p_r_i_n_t │ │ │ │ │ -void print(std ::ostream &out=std ::cerr) const │ │ │ │ │ -DDeeffiinniittiioonn entitykey_inline.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_E_n_t_i_t_y_K_e_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const A & operator[](int i) const │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_g_e_n_e_r_a_t_e_F_a_c_e │ │ │ │ │ -static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< │ │ │ │ │ -unsigned int > &element, int f) │ │ │ │ │ -DDeeffiinniittiioonn entitykey_inline.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_f_a_c_e_S_i_z_e │ │ │ │ │ -static int faceSize(int dim, bool simpl) │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_E_l_e_m_e_n_t_F_a_c_e_U_t_i_l_:_:_n_o_f_F_a_c_e_s │ │ │ │ │ -static int nofFaces(int dim, const std::vector< unsigned int > &element) │ │ │ │ │ -DDeeffiinniittiioonn entitykey.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Index Set Interface base class. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int │ │ │ │ │ +i, unsigned int codim) const │ │ │ │ │ +Map a subentity to an index. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t_:_:_C_o_d_i_m │ │ │ │ │ +Export the type of the entity used as parameter in the index(...) method. │ │ │ │ │ +DDeeffiinniittiioonn indexidset.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ +Implementation of Level- and LeafIndexSets for YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_g_e_o_m_T_y_p_e_s │ │ │ │ │ +const std::vector< GeometryType > & geomTypes(int codim) const │ │ │ │ │ +deliver all geometry types used in this grid │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ +YaspIndexSet(const GridImp &g) │ │ │ │ │ +Level grid view constructor stores reference to a grid and level. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_Y_a_s_p_I_n_d_e_x_S_e_t │ │ │ │ │ +YaspIndexSet(const GridImp &g, int l) │ │ │ │ │ +Level grid view constructor stores reference to a grid and level. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_i_n_d_e_x │ │ │ │ │ +IndexType index(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ +template Codim< cc >::Entity &e) const │ │ │ │ │ +get index of an entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ │ +bool contains(const EntityType &e) const │ │ │ │ │ +return true if the given entity is contained in . │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(GeometryType type) const │ │ │ │ │ +get number of entities of given type and level (the level is known to the │ │ │ │ │ +object) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ +IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ │ +template Codim< cc >::Entity &e, int i, unsigned int codim) const │ │ │ │ │ +get index of subentity of an entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ +std::vector< GeometryType > types(int codim) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_s_i_z_e │ │ │ │ │ +std::size_t size(int codim) const │ │ │ │ │ +return size of set for a given codim │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_I_n_d_e_x_T_y_p_e │ │ │ │ │ +Base::IndexType IndexType │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:30 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html │ │ │ │┄ Files 0% similar despite different names │ │ │ │ @@ -77,26 +77,26 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
macrogrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5#ifndef DUNE_DGF_MACROGRID_HH
│ │ │ │
6#define DUNE_DGF_MACROGRID_HH
│ │ │ │
7
│ │ │ │
8
│ │ │ │
9#include <iostream>
│ │ │ │
10
│ │ │ │
11#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ - │ │ │ │ + │ │ │ │
13
│ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │
17 // forward declarations
│ │ │ │
18 // --------------------
│ │ │ │
19 class DuneGridFormatParser;
│ │ │ │ @@ -165,15 +165,15 @@ │ │ │ │
89 MPICommunicatorType MPICOMM_;
│ │ │ │
90 };
│ │ │ │
│ │ │ │
91
│ │ │ │
92} // end namespace Dune
│ │ │ │
93
│ │ │ │
94#endif
│ │ │ │ - │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Definition dgfgridfactory.hh:38
│ │ │ │
Definition macrogrid.hh:23
│ │ │ │
MacroGrid(const char *filename, MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition macrogrid.hh:32
│ │ │ │
MacroGrid(MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition macrogrid.hh:38
│ │ │ │
GridType * createGrid()
returns pointer to a new instance of type GridType created from a DGF file
Definition macrogrid.hh:45
│ │ │ │
MPIHelper::MPICommunicator MPICommunicatorType
Definition macrogrid.hh:28
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html │ │ │ │┄ Files 14% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfidentitygrid.hh Source File │ │ │ │ +dune-grid: skeletonfunction.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,179 +70,189 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfidentitygrid.hh
│ │ │ │ +
skeletonfunction.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │ -
6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/common/typetraits.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 // DGFGridFactory for IdentityGrid
│ │ │ │ -
18 // -------------------------------
│ │ │ │ -
19
│ │ │ │ -
20 template< class HostGrid >
│ │ │ │ -
│ │ │ │ -
21 struct DGFGridFactory< IdentityGrid< HostGrid > >
│ │ │ │ -
22 {
│ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
25 const static int dimension = Grid::dimension;
│ │ │ │ -
26 typedef MPIHelper::MPICommunicator MPICommunicator;
│ │ │ │ -
27 typedef typename Grid::template Codim<0>::Entity Element;
│ │ │ │ -
28 typedef typename Grid::template Codim<dimension>::Entity Vertex;
│ │ │ │ -
29
│ │ │ │ -
│ │ │ │ -
30 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
31 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ -
32 : dgfHostFactory_( input, comm ),
│ │ │ │ -
33 grid_( 0 )
│ │ │ │ -
34 {
│ │ │ │ -
35 HostGrid *hostGrid = dgfHostFactory_.grid();
│ │ │ │ -
36 assert( hostGrid != 0 );
│ │ │ │ -
37 grid_ = new Grid( *hostGrid );
│ │ │ │ -
38 }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
40 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
41 MPICommunicator comm = MPIHelper::getCommunicator() )
│ │ │ │ -
42 : dgfHostFactory_( filename, comm ),
│ │ │ │ -
43 grid_( 0 )
│ │ │ │ -
44 {
│ │ │ │ -
45 HostGrid *hostGrid = dgfHostFactory_.grid();
│ │ │ │ -
46 assert( hostGrid != 0 );
│ │ │ │ -
47 std::ifstream input( filename.c_str() );
│ │ │ │ -
48 grid_ = new Grid( *hostGrid );
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 Grid *grid () const
│ │ │ │ -
52 {
│ │ │ │ -
53 return grid_;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
56 template< class Intersection >
│ │ │ │ -
│ │ │ │ -
57 bool wasInserted ( const Intersection &intersection ) const
│ │ │ │ -
58 {
│ │ │ │ -
59 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62 template< class Intersection >
│ │ │ │ -
│ │ │ │ -
63 int boundaryId ( const Intersection &intersection ) const
│ │ │ │ -
64 {
│ │ │ │ -
65 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68 template< int codim >
│ │ │ │ -
│ │ │ │ -
69 int numParameters () const
│ │ │ │ -
70 {
│ │ │ │ -
71 return dgfHostFactory_.template numParameters< codim >();
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74 template< class Entity >
│ │ │ │ -
│ │ │ │ -
75 std::vector< double > &parameter ( const Entity &entity )
│ │ │ │ -
76 {
│ │ │ │ -
77 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
80 private:
│ │ │ │ -
81 DGFGridFactory< HostGrid > dgfHostFactory_;
│ │ │ │ -
82 Grid *grid_;
│ │ │ │ -
83 };
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <memory>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
18
│ │ │ │ +
19namespace Dune {
│ │ │ │ +
20
│ │ │ │ +
23
│ │ │ │ +
29 namespace VTK {
│ │ │ │ +
30
│ │ │ │ +
32 //
│ │ │ │ +
33 // Prototype for VTKFunktions on the skeleton
│ │ │ │ +
34 //
│ │ │ │ +
35
│ │ │ │ +
36 template<typename GV, typename RF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 typedef GV GridView;
│ │ │ │ +
39 typedef typename GV::Intersection Cell;
│ │ │ │ +
40
│ │ │ │ +
41 typedef typename GV::ctype DomainField;
│ │ │ │ +
42 static const unsigned dimDomain = GV::dimension-1;
│ │ │ │ +
43 typedef FieldVector<DomainField, dimDomain> Domain;
│ │ │ │ +
44
│ │ │ │ +
45 typedef RF RangeField;
│ │ │ │ +
46 typedef std::vector<RangeField> Range;
│ │ │ │ +
47 };
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
50 template <typename GV, typename RF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
52 public:
│ │ │ │ + │ │ │ │ +
54
│ │ │ │ +
56 unsigned dimRange() const;
│ │ │ │ +
57
│ │ │ │ +
59
│ │ │ │ +
65 void evaluate(const typename Traits::Cell& c,
│ │ │ │ +
66 const typename Traits::Domain& xl,
│ │ │ │ +
67 typename Traits::Range& result) const;
│ │ │ │ +
68 };
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
71 //
│ │ │ │ +
72 // Class for writing SkeletonFunctions
│ │ │ │ +
73 //
│ │ │ │ +
74
│ │ │ │ +
76
│ │ │ │ +
80 template<typename Func>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
82 : public FunctionWriterBase<typename Func::Traits::Cell>
│ │ │ │ +
83 {
│ │ │ │ +
84 typedef typename Func::Traits::RangeField RF;
│ │ │ │
85
│ │ │ │ -
86
│ │ │ │ -
87 // DGFGridInfo for IdGrid
│ │ │ │ -
88 // ----------------------
│ │ │ │ -
89
│ │ │ │ -
90 template< class HostGrid >
│ │ │ │ -
│ │ │ │ -
91 struct DGFGridInfo< IdentityGrid< HostGrid > >
│ │ │ │ -
92 {
│ │ │ │ +
86 std::shared_ptr<const Func> func;
│ │ │ │ +
87 std::string name_;
│ │ │ │ +
88 unsigned dimR;
│ │ │ │ +
89 VTK::Precision precision_;
│ │ │ │ +
90 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
91
│ │ │ │ +
92 public:
│ │ │ │
│ │ │ │ -
93 static int refineStepsForHalf ()
│ │ │ │ -
94 {
│ │ │ │ - │ │ │ │ -
96 }
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
│ │ │ │ -
98 static double refineWeight ()
│ │ │ │ -
99 {
│ │ │ │ - │ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102 };
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
104}
│ │ │ │ -
105
│ │ │ │ -
106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │ -
The IdentityGrid class.
│ │ │ │ - │ │ │ │ +
93 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ │ +
94 const std::string& name, unsigned dimR_,
│ │ │ │ + │ │ │ │ +
96 : func(func_), name_(name), dimR(dimR_), precision_(prec)
│ │ │ │ +
97 { }
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
│ │ │ │ +
99 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ │ +
100 const std::string& name,
│ │ │ │ + │ │ │ │ +
102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)
│ │ │ │ +
103 { }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
106 virtual std::string name() const { return name_; }
│ │ │ │ +
107
│ │ │ │ +
109 virtual unsigned ncomps() const { return dimR; }
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
112 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ +
113 writer.addArray(name(), ncomps(), precision_);
│ │ │ │ +
114 }
│ │ │ │ +
│ │ │ │ +
115
│ │ │ │ +
│ │ │ │ +
117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ +
118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ +
119 nitems, precision_));
│ │ │ │ +
120 return !arraywriter->writeIsNoop();
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122
│ │ │ │ +
│ │ │ │ +
124 virtual void write(const typename Func::Traits::Cell& cell,
│ │ │ │ +
125 const typename Func::Traits::Domain& xl) {
│ │ │ │ +
126 typename Func::Traits::Range result;
│ │ │ │ +
127 func->evaluate(cell, xl, result);
│ │ │ │ +
128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)
│ │ │ │ +
129 arraywriter->write(result[d]);
│ │ │ │ +
130 for(unsigned d = result.size(); d < dimR; ++d)
│ │ │ │ +
131 arraywriter->write(0);
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
133
│ │ │ │ +
│ │ │ │ +
135 virtual void endWrite() {
│ │ │ │ +
136 arraywriter.reset();
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138 };
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
140 } // namespace VTK
│ │ │ │ +
141
│ │ │ │ +
143
│ │ │ │ +
144} // namespace Dune
│ │ │ │ +
145
│ │ │ │ +
146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition dgfgridfactory.hh:38
│ │ │ │ -
G Grid
Definition dgfgridfactory.hh:39
│ │ │ │ -
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
Provides a meta grid that is identical to its host.
Definition identitygrid.hh:88
│ │ │ │ -
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ │ -
Grid::template Codim< dimension >::Entity Vertex
Definition dgfidentitygrid.hh:28
│ │ │ │ -
IdentityGrid< HostGrid > Grid
Definition dgfidentitygrid.hh:23
│ │ │ │ -
std::vector< double > & parameter(const Entity &entity)
Definition dgfidentitygrid.hh:75
│ │ │ │ -
int numParameters() const
Definition dgfidentitygrid.hh:69
│ │ │ │ -
Grid * grid() const
Definition dgfidentitygrid.hh:51
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfidentitygrid.hh:40
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
Definition dgfidentitygrid.hh:30
│ │ │ │ -
int boundaryId(const Intersection &intersection) const
Definition dgfidentitygrid.hh:63
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicator
Definition dgfidentitygrid.hh:26
│ │ │ │ -
Grid::template Codim< 0 >::Entity Element
Definition dgfidentitygrid.hh:27
│ │ │ │ -
bool wasInserted(const Intersection &intersection) const
Definition dgfidentitygrid.hh:57
│ │ │ │ -
static int refineStepsForHalf()
Definition dgfidentitygrid.hh:93
│ │ │ │ -
static double refineWeight()
Definition dgfidentitygrid.hh:98
│ │ │ │ -
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ -
static double refineWeight()
│ │ │ │ -
static int refineStepsForHalf()
number of globalRefine steps needed to refuce h by 0.5
│ │ │ │ - │ │ │ │ +
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ +
Base class for function writers.
Definition functionwriter.hh:34
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ +
void addArray(const std::string &name, unsigned ncomps, Precision prec)
Add an array to the output file.
Definition pvtuwriter.hh:207
│ │ │ │ +
Definition skeletonfunction.hh:37
│ │ │ │ +
RF RangeField
Definition skeletonfunction.hh:45
│ │ │ │ +
FieldVector< DomainField, dimDomain > Domain
Definition skeletonfunction.hh:43
│ │ │ │ +
GV GridView
Definition skeletonfunction.hh:38
│ │ │ │ +
std::vector< RangeField > Range
Definition skeletonfunction.hh:46
│ │ │ │ +
GV::Intersection Cell
Definition skeletonfunction.hh:39
│ │ │ │ +
GV::ctype DomainField
Definition skeletonfunction.hh:41
│ │ │ │ +
static const unsigned dimDomain
Definition skeletonfunction.hh:42
│ │ │ │ +
A prototype for VTKFunctions on the skeleton.
Definition skeletonfunction.hh:51
│ │ │ │ +
unsigned dimRange() const
get dimension of the Range
│ │ │ │ +
SkeletonFunctionTraits< GV, RF > Traits
Definition skeletonfunction.hh:53
│ │ │ │ +
void evaluate(const typename Traits::Cell &c, const typename Traits::Domain &xl, typename Traits::Range &result) const
evaluate at local point xl in Cell c, store in result
│ │ │ │ +
function writer for skeleton functions
Definition skeletonfunction.hh:83
│ │ │ │ +
virtual std::string name() const
return name
Definition skeletonfunction.hh:106
│ │ │ │ +
SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, VTK::Precision prec=VTK::Precision::float32)
Definition skeletonfunction.hh:99
│ │ │ │ +
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition skeletonfunction.hh:112
│ │ │ │ +
virtual void write(const typename Func::Traits::Cell &cell, const typename Func::Traits::Domain &xl)
write at the given position
Definition skeletonfunction.hh:124
│ │ │ │ +
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition skeletonfunction.hh:117
│ │ │ │ +
SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32)
Definition skeletonfunction.hh:93
│ │ │ │ +
virtual void endWrite()
signal end of writing
Definition skeletonfunction.hh:135
│ │ │ │ +
virtual unsigned ncomps() const
return number of components of the vector
Definition skeletonfunction.hh:109
│ │ │ │ +
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ +
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,209 +2,233 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _d_g_f_p_a_r_s_e_r │ │ │ │ │ -dgfidentitygrid.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +skeletonfunction.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ │ -6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_p_a_r_s_e_r_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_u_t_i_l_i_t_y_/_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 // DGFGridFactory for IdentityGrid │ │ │ │ │ -18 // ------------------------------- │ │ │ │ │ -19 │ │ │ │ │ -20 template< class HostGrid > │ │ │ │ │ -_2_1 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _I_d_e_n_t_i_t_y_G_r_i_d< HostGrid > > │ │ │ │ │ -22 { │ │ │ │ │ -_2_3 typedef _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _> _G_r_i_d; │ │ │ │ │ -24 │ │ │ │ │ -_2_5 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_2_6 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r; │ │ │ │ │ -_2_7 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity _E_l_e_m_e_n_t; │ │ │ │ │ -_2_8 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim::Entity _V_e_r_t_e_x; │ │ │ │ │ -29 │ │ │ │ │ -_3_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -31 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -32 : dgfHostFactory_( input, comm ), │ │ │ │ │ -33 grid_( 0 ) │ │ │ │ │ -34 { │ │ │ │ │ -35 HostGrid *hostGrid = dgfHostFactory_.grid(); │ │ │ │ │ -36 assert( hostGrid != 0 ); │ │ │ │ │ -37 grid_ = new _G_r_i_d( *hostGrid ); │ │ │ │ │ -38 } │ │ │ │ │ -39 │ │ │ │ │ -_4_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -41 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -42 : dgfHostFactory_( filename, comm ), │ │ │ │ │ -43 grid_( 0 ) │ │ │ │ │ -44 { │ │ │ │ │ -45 HostGrid *hostGrid = dgfHostFactory_.grid(); │ │ │ │ │ -46 assert( hostGrid != 0 ); │ │ │ │ │ -47 std::ifstream input( filename.c_str() ); │ │ │ │ │ -48 grid_ = new _G_r_i_d( *hostGrid ); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -_5_1 _G_r_i_d *_g_r_i_d () const │ │ │ │ │ -52 { │ │ │ │ │ -53 return grid_; │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -56 template< class Intersection > │ │ │ │ │ -_5_7 bool _w_a_s_I_n_s_e_r_t_e_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ -58 { │ │ │ │ │ -59 return dgfHostFactory_.wasInserted( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -( intersection ) ); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -62 template< class Intersection > │ │ │ │ │ -_6_3 int _b_o_u_n_d_a_r_y_I_d ( const _I_n_t_e_r_s_e_c_t_i_o_n &intersection ) const │ │ │ │ │ -64 { │ │ │ │ │ -65 return dgfHostFactory_.boundaryId( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -( intersection ) ); │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -68 template< int codim > │ │ │ │ │ -_6_9 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -70 { │ │ │ │ │ -71 return dgfHostFactory_.template numParameters< codim >(); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -74 template< class Entity > │ │ │ │ │ -_7_5 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ │ -76 { │ │ │ │ │ -77 return dgfHostFactory_.parameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_E_n_t_i_t_y( entity │ │ │ │ │ -) ); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -80 private: │ │ │ │ │ -81 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_ _> dgfHostFactory_; │ │ │ │ │ -82 _G_r_i_d *grid_; │ │ │ │ │ -83 }; │ │ │ │ │ -84 │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e { │ │ │ │ │ +20 │ │ │ │ │ +23 │ │ │ │ │ +29 namespace VTK { │ │ │ │ │ +30 │ │ │ │ │ +32 // │ │ │ │ │ +33 // Prototype for VTKFunktions on the skeleton │ │ │ │ │ +34 // │ │ │ │ │ +35 │ │ │ │ │ +36 template │ │ │ │ │ +_3_7 struct _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s { │ │ │ │ │ +_3_8 typedef GV _G_r_i_d_V_i_e_w; │ │ │ │ │ +_3_9 typedef typename GV::Intersection _C_e_l_l; │ │ │ │ │ +40 │ │ │ │ │ +_4_1 typedef typename GV::ctype _D_o_m_a_i_n_F_i_e_l_d; │ │ │ │ │ +_4_2 static const unsigned _d_i_m_D_o_m_a_i_n = GV::dimension-1; │ │ │ │ │ +_4_3 typedef FieldVector _D_o_m_a_i_n; │ │ │ │ │ +44 │ │ │ │ │ +_4_5 typedef RF _R_a_n_g_e_F_i_e_l_d; │ │ │ │ │ +_4_6 typedef std::vector _R_a_n_g_e; │ │ │ │ │ +47 }; │ │ │ │ │ +48 │ │ │ │ │ +50 template │ │ │ │ │ +_5_1 class _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e { │ │ │ │ │ +52 public: │ │ │ │ │ +_5_3 typedef _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_<_G_V_,_ _R_F_> _T_r_a_i_t_s; │ │ │ │ │ +54 │ │ │ │ │ +_5_6 unsigned _d_i_m_R_a_n_g_e() const; │ │ │ │ │ +57 │ │ │ │ │ +59 │ │ │ │ │ +_6_5 void _e_v_a_l_u_a_t_e(const typename _T_r_a_i_t_s_:_:_C_e_l_l& c, │ │ │ │ │ +66 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n& xl, │ │ │ │ │ +67 typename _T_r_a_i_t_s_:_:_R_a_n_g_e& result) const; │ │ │ │ │ +68 }; │ │ │ │ │ +69 │ │ │ │ │ +71 // │ │ │ │ │ +72 // Class for writing SkeletonFunctions │ │ │ │ │ +73 // │ │ │ │ │ +74 │ │ │ │ │ +76 │ │ │ │ │ +80 template │ │ │ │ │ +_8_1 class _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +82 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +83 { │ │ │ │ │ +84 typedef typename Func::Traits::RangeField RF; │ │ │ │ │ 85 │ │ │ │ │ -86 │ │ │ │ │ -87 // DGFGridInfo for IdGrid │ │ │ │ │ -88 // ---------------------- │ │ │ │ │ -89 │ │ │ │ │ -90 template< class HostGrid > │ │ │ │ │ -_9_1 struct _D_G_F_G_r_i_d_I_n_f_o< _I_d_e_n_t_i_t_y_G_r_i_d< HostGrid > > │ │ │ │ │ -92 { │ │ │ │ │ -_9_3 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ -94 { │ │ │ │ │ -95 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f(); │ │ │ │ │ -96 } │ │ │ │ │ -97 │ │ │ │ │ -_9_8 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ -99 { │ │ │ │ │ -100 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t(); │ │ │ │ │ -101 } │ │ │ │ │ -102 }; │ │ │ │ │ -103 │ │ │ │ │ -104} │ │ │ │ │ -105 │ │ │ │ │ -106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ │ -_i_d_e_n_t_i_t_y_g_r_i_d_._h_h │ │ │ │ │ -The IdentityGrid class. │ │ │ │ │ -_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ │ +86 std::shared_ptr func; │ │ │ │ │ +87 std::string name_; │ │ │ │ │ +88 unsigned dimR; │ │ │ │ │ +89 _V_T_K_:_:_P_r_e_c_i_s_i_o_n precision_; │ │ │ │ │ +90 std::shared_ptr arraywriter; │ │ │ │ │ +91 │ │ │ │ │ +92 public: │ │ │ │ │ +_9_3 _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ │ +94 const std::string& _n_a_m_e, unsigned dimR_, │ │ │ │ │ +95 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +96 : func(func_), name_(_n_a_m_e), dimR(dimR_), precision_(prec) │ │ │ │ │ +97 { } │ │ │ │ │ +98 │ │ │ │ │ +_9_9 _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ │ +100 const std::string& _n_a_m_e, │ │ │ │ │ +101 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +102 : func(func_), name_(_n_a_m_e), dimR(func->dimRange()), precision_(prec) │ │ │ │ │ +103 { } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_6 virtual std::string _n_a_m_e() const { return name_; } │ │ │ │ │ +107 │ │ │ │ │ +_1_0_9 virtual unsigned _n_c_o_m_p_s() const { return dimR; } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_2 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ +113 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +_1_1_7 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ +118 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ +119 nitems, precision_)); │ │ │ │ │ +120 return !arraywriter->writeIsNoop(); │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +_1_2_4 virtual void _w_r_i_t_e(const typename Func::Traits::Cell& cell, │ │ │ │ │ +125 const typename Func::Traits::Domain& xl) { │ │ │ │ │ +126 typename Func::Traits::Range result; │ │ │ │ │ +127 func->evaluate(cell, xl, result); │ │ │ │ │ +128 for(unsigned d = 0; d < result.size() && d < dimR; ++d) │ │ │ │ │ +129 arraywriter->write(result[d]); │ │ │ │ │ +130 for(unsigned d = result.size(); d < dimR; ++d) │ │ │ │ │ +131 arraywriter->write(0); │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +_1_3_5 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ +136 arraywriter.reset(); │ │ │ │ │ +137 } │ │ │ │ │ +138 }; │ │ │ │ │ +139 │ │ │ │ │ +140 } // namespace VTK │ │ │ │ │ +141 │ │ │ │ │ +143 │ │ │ │ │ +144} // namespace Dune │ │ │ │ │ +145 │ │ │ │ │ +146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ +_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_G_r_i_d │ │ │ │ │ -G Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn dgfgridfactory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" │ │ │ │ │ -element or with the d... │ │ │ │ │ -DDeeffiinniittiioonn common/intersection.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Wrapper class for entities. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ │ -Grid abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d │ │ │ │ │ -Provides a meta grid that is identical to its host. │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ │ -provides access to host grid objects from GeometryGrid │ │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_V_e_r_t_e_x │ │ │ │ │ -Grid::template Codim< dimension >::Entity Vertex │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_G_r_i_d │ │ │ │ │ -IdentityGrid< HostGrid > Grid │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_p_a_r_a_m_e_t_e_r │ │ │ │ │ -std::vector< double > & parameter(const Entity &entity) │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_n_u_m_P_a_r_a_m_e_t_e_r_s │ │ │ │ │ -int numParameters() const │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_g_r_i_d │ │ │ │ │ -Grid * grid() const │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ -DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ │ -int boundaryId(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r │ │ │ │ │ -MPIHelper::MPICommunicator MPICommunicator │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_E_l_e_m_e_n_t │ │ │ │ │ -Grid::template Codim< 0 >::Entity Element │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_w_a_s_I_n_s_e_r_t_e_d │ │ │ │ │ -bool wasInserted(const Intersection &intersection) const │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_<_ _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _>_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ -static double refineWeight() │ │ │ │ │ -DDeeffiinniittiioonn dgfidentitygrid.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o │ │ │ │ │ -Some simple static information for a given GridType. │ │ │ │ │ -DDeeffiinniittiioonn io/file/dgfparser/dgfparser.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_:_:_r_e_f_i_n_e_W_e_i_g_h_t │ │ │ │ │ -static double refineWeight() │ │ │ │ │ -_D_u_n_e_:_:_D_G_F_G_r_i_d_I_n_f_o_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f │ │ │ │ │ -static int refineStepsForHalf() │ │ │ │ │ -number of globalRefine steps needed to refuce h by 0.5 │ │ │ │ │ -_d_g_f_p_a_r_s_e_r_._h_h │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision │ │ │ │ │ +which precision to use when writing out data to vtk files │ │ │ │ │ +DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ +@ float32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ +Base class for function writers. │ │ │ │ │ +DDeeffiinniittiioonn functionwriter.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +void addArray(const std::string &name, unsigned ncomps, Precision prec) │ │ │ │ │ +Add an array to the output file. │ │ │ │ │ +DDeeffiinniittiioonn pvtuwriter.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_R_a_n_g_e_F_i_e_l_d │ │ │ │ │ +RF RangeField │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_D_o_m_a_i_n │ │ │ │ │ +FieldVector< DomainField, dimDomain > Domain │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +GV GridView │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_R_a_n_g_e │ │ │ │ │ +std::vector< RangeField > Range │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_C_e_l_l │ │ │ │ │ +GV::Intersection Cell │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_D_o_m_a_i_n_F_i_e_l_d │ │ │ │ │ +GV::ctype DomainField │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s_:_:_d_i_m_D_o_m_a_i_n │ │ │ │ │ +static const unsigned dimDomain │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ +A prototype for VTKFunctions on the skeleton. │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +unsigned dimRange() const │ │ │ │ │ +get dimension of the Range │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_T_r_a_i_t_s │ │ │ │ │ +SkeletonFunctionTraits< GV, RF > Traits │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const typename Traits::Cell &c, const typename Traits::Domain │ │ │ │ │ +&xl, typename Traits::Range &result) const │ │ │ │ │ +evaluate at local point xl in Cell c, store in result │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +function writer for skeleton functions │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ +virtual std::string name() const │ │ │ │ │ +return name │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std:: │ │ │ │ │ +string &name, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ +virtual void addArray(PVTUWriter &writer) │ │ │ │ │ +add this field to the given parallel writer │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ +virtual void write(const typename Func::Traits::Cell &cell, const typename │ │ │ │ │ +Func::Traits::Domain &xl) │ │ │ │ │ +write at the given position │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ +virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ +start writing with the given writer │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:117 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ +SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std:: │ │ │ │ │ +string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ +virtual void endWrite() │ │ │ │ │ +signal end of writing │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ +virtual unsigned ncomps() const │ │ │ │ │ +return number of components of the vector │ │ │ │ │ +DDeeffiinniittiioonn skeletonfunction.hh:109 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ +Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ +DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ +unsigned nitems, Precision prec) │ │ │ │ │ +acquire a DataArrayWriter │ │ │ │ │ +DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html │ │ │ │┄ Files 14% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: subsamplingvtkwriter.hh Source File │ │ │ │ +dune-grid: coordinates.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,408 +70,388 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
subsamplingvtkwriter.hh
│ │ │ │ +
coordinates.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_SUBSAMPLINGVTKWRITER_HH
│ │ │ │ -
7#define DUNE_SUBSAMPLINGVTKWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <ostream>
│ │ │ │ -
10#include <memory>
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_COORDINATES_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <vector>
│ │ │ │
11
│ │ │ │ -
12#include <dune/common/indent.hh>
│ │ │ │ -
13#include <dune/geometry/type.hh>
│ │ │ │ -
14#include <dune/geometry/virtualrefinement.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
24namespace Dune
│ │ │ │ -
25{
│ │ │ │ -
37 template< class GridView >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 : public VTKWriter<GridView>
│ │ │ │ -
40 {
│ │ │ │ - │ │ │ │ -
42 constexpr static int dim = GridView::dimension;
│ │ │ │ -
43 constexpr static int dimw = GridView::dimensionworld;
│ │ │ │ -
44 typedef typename GridView::Grid::ctype ctype;
│ │ │ │ -
45 typedef typename GridView::template Codim< 0 >::Entity Entity;
│ │ │ │ -
46 typedef VirtualRefinement<dim, ctype> Refinement;
│ │ │ │ -
47 typedef typename Refinement::IndexVector IndexVector;
│ │ │ │ -
48 typedef typename Refinement::ElementIterator SubElementIterator;
│ │ │ │ -
49 typedef typename Refinement::VertexIterator SubVertexIterator;
│ │ │ │ -
50
│ │ │ │ -
51 typedef typename Base::CellIterator CellIterator;
│ │ │ │ -
52 typedef typename Base::FunctionIterator FunctionIterator;
│ │ │ │ -
53 using Base::cellBegin;
│ │ │ │ -
54 using Base::cellEnd;
│ │ │ │ -
55 using Base::celldata;
│ │ │ │ -
56 using Base::ncells;
│ │ │ │ -
57 using Base::ncorners;
│ │ │ │ -
58 using Base::nvertices;
│ │ │ │ -
59 using Base::outputtype;
│ │ │ │ - │ │ │ │ -
61 using Base::vertexEnd;
│ │ │ │ -
62 using Base::vertexdata;
│ │ │ │ -
63
│ │ │ │ -
64 public:
│ │ │ │ -
│ │ │ │ -
80 explicit SubsamplingVTKWriter (const GridView &gridView,
│ │ │ │ -
81 Dune::RefinementIntervals intervals_, bool coerceToSimplex_ = false,
│ │ │ │ - │ │ │ │ -
83 : Base(gridView, VTK::nonconforming, coordPrecision)
│ │ │ │ -
84 , intervals(intervals_), coerceToSimplex(coerceToSimplex_)
│ │ │ │ -
85 {
│ │ │ │ -
86 if(intervals_.intervals() < 1) {
│ │ │ │ -
87 DUNE_THROW(Dune::IOError,"SubsamplingVTKWriter: Refinement intervals must be larger than zero! (One interval means no subsampling)");
│ │ │ │ -
88 }
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
91 private:
│ │ │ │ -
92 GeometryType subsampledGeometryType(GeometryType geometryType)
│ │ │ │ -
93 {
│ │ │ │ -
94 return (geometryType.isCube() && !coerceToSimplex ? geometryType : GeometryTypes::simplex(dim));
│ │ │ │ -
95 }
│ │ │ │ -
96
│ │ │ │ -
97 template<typename SubIterator>
│ │ │ │ -
98 struct IteratorSelector
│ │ │ │ -
99 {};
│ │ │ │ +
12#include <dune/common/fvector.hh>
│ │ │ │ +
13
│ │ │ │ +
21namespace Dune
│ │ │ │ +
22{
│ │ │ │ +
27 template<class ct, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 public:
│ │ │ │ +
32 typedef ct ctype;
│ │ │ │ +
34 static const int dimension = dim;
│ │ │ │ +
35
│ │ │ │ + │ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
45 EquidistantCoordinates(const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
│ │ │ │ +
46 : _s(s)
│ │ │ │ +
47 {
│ │ │ │ +
48 for (int i=0; i<dim; i++)
│ │ │ │ +
49 _h[i] = upperRight[i] / _s[i];
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ +
56 inline ct meshsize(int d, [[maybe_unused]] int i) const
│ │ │ │ +
57 {
│ │ │ │ +
58 return _h[d];
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
65 inline ct coordinate(int d, int i) const
│ │ │ │ +
66 {
│ │ │ │ +
67 return i*_h[d];
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
73 inline int size(int d) const
│ │ │ │ +
74 {
│ │ │ │ +
75 return _s[d];
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
│ │ │ │ +
84 EquidistantCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ │ +
85 {
│ │ │ │ +
86 //determine new size and meshsize
│ │ │ │ +
87 std::array<int,dim> news;
│ │ │ │ +
88 Dune::FieldVector<ct,dim> newUpperRight;
│ │ │ │ +
89
│ │ │ │ +
90 for (int i=0; i<dim; i++)
│ │ │ │ +
91 {
│ │ │ │ +
92 news[i] = 2 * _s[i];
│ │ │ │ +
93 if (!keep_ovlp)
│ │ │ │ +
94 {
│ │ │ │ +
95 if (ovlp_low[i])
│ │ │ │ +
96 news[i] -= overlap;
│ │ │ │ +
97 if (ovlp_up[i])
│ │ │ │ +
98 news[i] -= overlap;
│ │ │ │ +
99 }
│ │ │ │
100
│ │ │ │ -
101 SubElementIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
│ │ │ │ -
102 {
│ │ │ │ -
103 return refinement.eBegin(intervals);
│ │ │ │ +
101 newUpperRight[i] = (_h[i] / ct(2.)) * news[i];
│ │ │ │ +
102 }
│ │ │ │ +
103 return EquidistantCoordinates<ct,dim>(newUpperRight,news);
│ │ │ │
104 }
│ │ │ │ +
│ │ │ │
105
│ │ │ │ -
106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
│ │ │ │ -
107 {
│ │ │ │ -
108 return refinement.vBegin(intervals);
│ │ │ │ -
109 }
│ │ │ │ -
110
│ │ │ │ -
111 SubElementIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
│ │ │ │ -
112 {
│ │ │ │ -
113 return refinement.eEnd(intervals);
│ │ │ │ -
114 }
│ │ │ │ -
115
│ │ │ │ -
116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
│ │ │ │ -
117 {
│ │ │ │ -
118 return refinement.vEnd(intervals);
│ │ │ │ -
119 }
│ │ │ │ -
120
│ │ │ │ -
121 template<typename Data, typename Iterator, typename SubIterator>
│ │ │ │ -
122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries, IteratorSelector<SubIterator> sis)
│ │ │ │ -
123 {
│ │ │ │ -
124 for (auto it = data.begin(),
│ │ │ │ -
125 iend = data.end();
│ │ │ │ -
126 it != iend;
│ │ │ │ -
127 ++it)
│ │ │ │ -
128 {
│ │ │ │ -
129 const auto& f = *it;
│ │ │ │ -
130 VTK::FieldInfo fieldInfo = f.fieldInfo();
│ │ │ │ -
131 std::size_t writecomps = fieldInfo.size();
│ │ │ │ -
132 switch (fieldInfo.type())
│ │ │ │ -
133 {
│ │ │ │ - │ │ │ │ -
135 break;
│ │ │ │ - │ │ │ │ -
137 // vtk file format: a vector data always should have 3 comps (with
│ │ │ │ -
138 // 3rd comp = 0 in 2D case)
│ │ │ │ -
139 if (writecomps > 3)
│ │ │ │ -
140 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
│ │ │ │ -
141 writecomps = 3;
│ │ │ │ -
142 break;
│ │ │ │ - │ │ │ │ -
144 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet");
│ │ │ │ -
145 }
│ │ │ │ -
146 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ -
147 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision()));
│ │ │ │ -
148 if(!p->writeIsNoop())
│ │ │ │ -
149 for (Iterator eit = begin; eit!=end; ++eit)
│ │ │ │ -
150 {
│ │ │ │ -
151 const Entity & e = *eit;
│ │ │ │ -
152 f.bind(e);
│ │ │ │ -
153 Refinement &refinement =
│ │ │ │ -
154 buildRefinement<dim, ctype>(eit->type(),
│ │ │ │ -
155 subsampledGeometryType(eit->type()));
│ │ │ │ -
156 for(SubIterator sit = refinementBegin(refinement,intervals,sis),
│ │ │ │ -
157 send = refinementEnd(refinement,intervals,sis);
│ │ │ │ -
158 sit != send;
│ │ │ │ -
159 ++sit)
│ │ │ │ -
160 {
│ │ │ │ -
161 f.write(sit.coords(),*p);
│ │ │ │ -
162 // expand 2D-Vectors to 3D for VTK format
│ │ │ │ -
163 for(unsigned j = f.fieldInfo().size(); j < writecomps; j++)
│ │ │ │ -
164 p->write(0.0);
│ │ │ │ -
165 }
│ │ │ │ -
166 f.unbind();
│ │ │ │ -
167 }
│ │ │ │ -
168 }
│ │ │ │ -
169 }
│ │ │ │ -
170
│ │ │ │ -
171
│ │ │ │ -
172 protected:
│ │ │ │ -
174 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_);
│ │ │ │ -
175
│ │ │ │ -
177 virtual void writeCellData(VTK::VTUWriter& writer);
│ │ │ │ -
178
│ │ │ │ -
180 virtual void writeVertexData(VTK::VTUWriter& writer);
│ │ │ │ -
181
│ │ │ │ -
183 virtual void writeGridPoints(VTK::VTUWriter& writer);
│ │ │ │ -
184
│ │ │ │ -
186 virtual void writeGridCells(VTK::VTUWriter& writer);
│ │ │ │ -
187
│ │ │ │ -
188 public:
│ │ │ │ - │ │ │ │ -
190 using Base::addCellData;
│ │ │ │ -
191
│ │ │ │ -
192 private:
│ │ │ │ -
193 // hide addVertexData -- adding raw data directly without a VTKFunction
│ │ │ │ -
194 // currently does not make sense for subsampled meshes, as the higher order
│ │ │ │ -
195 // information is missing. See FS#676.
│ │ │ │ -
196 template<class V>
│ │ │ │ -
197 void addVertexData (const V& v, const std::string &name, int ncomps=1);
│ │ │ │ -
198 template<class V>
│ │ │ │ -
199 void addCellData (const V& v, const std::string &name, int ncomps=1);
│ │ │ │ -
200
│ │ │ │ -
201 Dune::RefinementIntervals intervals;
│ │ │ │ -
202 bool coerceToSimplex;
│ │ │ │ -
203 };
│ │ │ │ -
│ │ │ │ -
204
│ │ │ │ -
206 template <class GridView>
│ │ │ │ -
│ │ │ │ -
207 void SubsamplingVTKWriter<GridView>::countEntities(int &nvertices_, int &ncells_, int &ncorners_)
│ │ │ │ -
208 {
│ │ │ │ -
209 nvertices_ = 0;
│ │ │ │ -
210 ncells_ = 0;
│ │ │ │ -
211 ncorners_ = 0;
│ │ │ │ -
212 for (CellIterator it=this->cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ -
213 {
│ │ │ │ -
214 Refinement &refinement = buildRefinement<dim, ctype>(it->type(), subsampledGeometryType(it->type()));
│ │ │ │ -
215
│ │ │ │ -
216 ncells_ += refinement.nElements(intervals);
│ │ │ │ -
217 nvertices_ += refinement.nVertices(intervals);
│ │ │ │ -
218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin(intervals).vertexIndices().size();
│ │ │ │ -
219 }
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
222
│ │ │ │ -
224 template <class GridView>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
226 {
│ │ │ │ -
227 if(celldata.size() == 0)
│ │ │ │ -
228 return;
│ │ │ │ -
229
│ │ │ │ -
230 // Find the names of the first scalar and vector data fields.
│ │ │ │ -
231 // These will be marked as the default fields (the ones that ParaView shows
│ │ │ │ -
232 // when the file has just been opened).
│ │ │ │ -
233 std::string defaultScalarField, defaultVectorField;
│ │ │ │ -
234 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames(celldata);
│ │ │ │ -
235
│ │ │ │ -
236 writer.beginCellData(defaultScalarField, defaultVectorField);
│ │ │ │ -
237 writeData(writer,celldata,cellBegin(),cellEnd(),ncells,IteratorSelector<SubElementIterator>());
│ │ │ │ -
238 writer.endCellData();
│ │ │ │ -
239 }
│ │ │ │ -
│ │ │ │ -
240
│ │ │ │ -
242 template <class GridView>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
244 {
│ │ │ │ -
245 if(vertexdata.size() == 0)
│ │ │ │ -
246 return;
│ │ │ │ -
247
│ │ │ │ -
248 // Find the names of the first scalar and vector data fields.
│ │ │ │ -
249 // These will be marked as the default fields (the ones that ParaView shows
│ │ │ │ -
250 // when the file has just been opened).
│ │ │ │ -
251 std::string defaultScalarField, defaultVectorField;
│ │ │ │ -
252 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames(vertexdata);
│ │ │ │ -
253
│ │ │ │ -
254 writer.beginPointData(defaultScalarField, defaultVectorField);
│ │ │ │ -
255 writeData(writer,vertexdata,cellBegin(),cellEnd(),nvertices,IteratorSelector<SubVertexIterator>());
│ │ │ │ -
256 writer.endPointData();
│ │ │ │ -
257 }
│ │ │ │ +
│ │ │ │ +
107 void print(std::ostream& s) const
│ │ │ │ +
108 {
│ │ │ │ +
109 s << "Printing equidistant coordinate information:" << std::endl;
│ │ │ │ +
110 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
113 private:
│ │ │ │ +
114 Dune::FieldVector<ct,dim> _h;
│ │ │ │ +
115 std::array<int,dim> _s;
│ │ │ │ +
116 };
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
118 template<class ct, int dim>
│ │ │ │ +
│ │ │ │ +
119 inline std::ostream& operator<< (std::ostream& s, EquidistantCoordinates<ct,dim>& c)
│ │ │ │ +
120 {
│ │ │ │ +
121 c.print(s);
│ │ │ │ +
122 return s;
│ │ │ │ +
123 }
│ │ │ │ +
│ │ │ │ +
124
│ │ │ │ +
129 template<class ct, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
131 {
│ │ │ │ +
132 public:
│ │ │ │ +
134 typedef ct ctype;
│ │ │ │ +
136 static const int dimension = dim;
│ │ │ │ +
137
│ │ │ │ + │ │ │ │ +
140
│ │ │ │ +
│ │ │ │ +
149 EquidistantOffsetCoordinates(const Dune::FieldVector<ct,dim>& lowerLeft, const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
│ │ │ │ +
150 : _origin(lowerLeft), _s(s)
│ │ │ │ +
151 {
│ │ │ │ +
152 for (int i=0; i<dim; i++)
│ │ │ │ +
153 _h[i] = (upperRight[i] - lowerLeft[i]) / s[i];
│ │ │ │ +
154 }
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
│ │ │ │ +
160 inline ct meshsize(int d, [[maybe_unused]] int i) const
│ │ │ │ +
161 {
│ │ │ │ +
162 return _h[d];
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │ +
164
│ │ │ │ +
│ │ │ │ +
169 inline ct coordinate(int d, int i) const
│ │ │ │ +
170 {
│ │ │ │ +
171 return _origin[d] + i*_h[d];
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
│ │ │ │ +
177 inline int size(int d) const
│ │ │ │ +
178 {
│ │ │ │ +
179 return _s[d];
│ │ │ │ +
180 }
│ │ │ │
│ │ │ │ -
258
│ │ │ │ -
260 template <class GridView>
│ │ │ │ +
181
│ │ │ │ +
│ │ │ │ +
185 inline ct origin(int d) const
│ │ │ │ +
186 {
│ │ │ │ +
187 return _origin[d];
│ │ │ │ +
188 }
│ │ │ │ +
│ │ │ │ +
189
│ │ │ │ +
│ │ │ │ +
196 EquidistantOffsetCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ │ +
197 {
│ │ │ │ +
198 //determine new size and meshsize
│ │ │ │ +
199 std::array<int,dim> news;
│ │ │ │ +
200 Dune::FieldVector<ct,dim> newUpperRight;
│ │ │ │ +
201
│ │ │ │ +
202 for (int i=0; i<dim; i++)
│ │ │ │ +
203 {
│ │ │ │ +
204 news[i] = 2 * _s[i];
│ │ │ │ +
205 if (!keep_ovlp)
│ │ │ │ +
206 {
│ │ │ │ +
207 if (ovlp_low[i])
│ │ │ │ +
208 news[i] -= overlap;
│ │ │ │ +
209 if (ovlp_up[i])
│ │ │ │ +
210 news[i] -= overlap;
│ │ │ │ +
211 }
│ │ │ │ +
212
│ │ │ │ +
213 newUpperRight[i] = _origin[i] + (_h[i] / ct(2.)) * news[i];
│ │ │ │ +
214 }
│ │ │ │ +
215 return EquidistantOffsetCoordinates<ct,dim>(_origin,newUpperRight,news);
│ │ │ │ +
216 }
│ │ │ │ +
│ │ │ │ +
217
│ │ │ │ +
│ │ │ │ +
219 void print(std::ostream& s) const
│ │ │ │ +
220 {
│ │ │ │ +
221 s << "Printing equidistant coordinate information:" << std::endl;
│ │ │ │ +
222 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
│ │ │ │ +
223 s << "Offset to origin: " << _origin << std::endl;
│ │ │ │ +
224 }
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
226 private:
│ │ │ │ +
227 Dune::FieldVector<ct,dim> _origin;
│ │ │ │ +
228 Dune::FieldVector<ct,dim> _h;
│ │ │ │ +
229 std::array<int,dim> _s;
│ │ │ │ +
230 };
│ │ │ │ +
│ │ │ │ +
231
│ │ │ │ +
232 template<class ct, int dim>
│ │ │ │ +
│ │ │ │ +
233 inline std::ostream& operator<< (std::ostream& s, EquidistantOffsetCoordinates<ct,dim>& c)
│ │ │ │ +
234 {
│ │ │ │ +
235 c.print(s);
│ │ │ │ +
236 return s;
│ │ │ │ +
237 }
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
243 template<class ct, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
245 {
│ │ │ │ +
246 public:
│ │ │ │ +
248 typedef ct ctype;
│ │ │ │ +
250 static const int dimension = dim;
│ │ │ │ +
251
│ │ │ │ + │ │ │ │ +
254
│ │ │ │
│ │ │ │ - │ │ │ │ -
262 {
│ │ │ │ -
263 writer.beginPoints();
│ │ │ │ +
261 TensorProductCoordinates(const std::array<std::vector<ct>,dim>& c, const std::array<int,dim>& offset)
│ │ │ │ +
262 : _c(c),_offset(offset)
│ │ │ │ +
263 {}
│ │ │ │ +
│ │ │ │
264
│ │ │ │ -
265 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ -
266 (writer.makeArrayWriter("Coordinates", 3, nvertices, this->coordPrecision()));
│ │ │ │ -
267 if(!p->writeIsNoop())
│ │ │ │ -
268 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
│ │ │ │ -
269 {
│ │ │ │ -
270 Refinement &refinement =
│ │ │ │ -
271 buildRefinement<dim, ctype>(i->type(),
│ │ │ │ -
272 subsampledGeometryType(i->type()));
│ │ │ │ -
273 for(SubVertexIterator sit = refinement.vBegin(intervals),
│ │ │ │ -
274 send = refinement.vEnd(intervals);
│ │ │ │ -
275 sit != send; ++sit)
│ │ │ │ -
276 {
│ │ │ │ -
277 FieldVector<ctype, dimw> coords = i->geometry().global(sit.coords());
│ │ │ │ -
278 for (int j=0; j<std::min(int(dimw),3); j++)
│ │ │ │ -
279 p->write(coords[j]);
│ │ │ │ -
280 for (int j=std::min(int(dimw),3); j<3; j++)
│ │ │ │ -
281 p->write(0.0);
│ │ │ │ -
282 }
│ │ │ │ -
283 }
│ │ │ │ -
284 // free the VTK::DataArrayWriter before touching the stream
│ │ │ │ -
285 p.reset();
│ │ │ │ -
286
│ │ │ │ -
287 writer.endPoints();
│ │ │ │ -
288 }
│ │ │ │ -
│ │ │ │ -
289
│ │ │ │ -
291 template <class GridView>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
293 {
│ │ │ │ -
294 writer.beginCells();
│ │ │ │ -
295
│ │ │ │ -
296 // connectivity
│ │ │ │ -
297 {
│ │ │ │ -
298 std::shared_ptr<VTK::DataArrayWriter> p1
│ │ │ │ -
299 (writer.makeArrayWriter("connectivity", 1, ncorners, VTK::Precision::int32));
│ │ │ │ -
300 // The offset within the index numbering
│ │ │ │ -
301 if(!p1->writeIsNoop()) {
│ │ │ │ -
302 int offset = 0;
│ │ │ │ -
303 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
│ │ │ │ -
304 {
│ │ │ │ -
305 GeometryType coercedToType = subsampledGeometryType(i->type());
│ │ │ │ -
306 Refinement &refinement =
│ │ │ │ -
307 buildRefinement<dim, ctype>(i->type(), coercedToType);
│ │ │ │ -
308 for(SubElementIterator sit = refinement.eBegin(intervals),
│ │ │ │ -
309 send = refinement.eEnd(intervals);
│ │ │ │ -
310 sit != send; ++sit)
│ │ │ │ -
311 {
│ │ │ │ -
312 IndexVector indices = sit.vertexIndices();
│ │ │ │ -
313 for(unsigned int ii = 0; ii < indices.size(); ++ii)
│ │ │ │ -
314 p1->write(offset+indices[VTK::renumber(coercedToType, ii)]);
│ │ │ │ -
315 }
│ │ │ │ -
316 offset += refinement.nVertices(intervals);
│ │ │ │ -
317 }
│ │ │ │ -
318 }
│ │ │ │ -
319 }
│ │ │ │ -
320
│ │ │ │ -
321 // offsets
│ │ │ │ -
322 {
│ │ │ │ -
323 std::shared_ptr<VTK::DataArrayWriter> p2
│ │ │ │ -
324 (writer.makeArrayWriter("offsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ -
325 if(!p2->writeIsNoop()) {
│ │ │ │ -
326 // The offset into the connectivity array
│ │ │ │ -
327 int offset = 0;
│ │ │ │ -
328 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
│ │ │ │ -
329 {
│ │ │ │ -
330 Refinement &refinement =
│ │ │ │ -
331 buildRefinement<dim, ctype>(i->type(),
│ │ │ │ -
332 subsampledGeometryType(i->type()));
│ │ │ │ -
333 unsigned int verticesPerCell =
│ │ │ │ -
334 refinement.eBegin(intervals).vertexIndices().size();
│ │ │ │ -
335 for(int element = 0; element < refinement.nElements(intervals);
│ │ │ │ -
336 ++element)
│ │ │ │ -
337 {
│ │ │ │ -
338 offset += verticesPerCell;
│ │ │ │ -
339 p2->write(offset);
│ │ │ │ -
340 }
│ │ │ │ -
341 }
│ │ │ │ +
│ │ │ │ +
269 inline ct meshsize(int d, int i) const
│ │ │ │ +
270 {
│ │ │ │ +
271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]];
│ │ │ │ +
272 }
│ │ │ │ +
│ │ │ │ +
273
│ │ │ │ +
│ │ │ │ +
278 inline ct coordinate(int d, int i) const
│ │ │ │ +
279 {
│ │ │ │ +
280 return _c[d][i-_offset[d]];
│ │ │ │ +
281 }
│ │ │ │ +
│ │ │ │ +
282
│ │ │ │ +
│ │ │ │ +
286 inline int size(int d) const
│ │ │ │ +
287 {
│ │ │ │ +
288 return _c[d].size() - 1;
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
290
│ │ │ │ +
│ │ │ │ +
297 TensorProductCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ │ +
298 {
│ │ │ │ +
299 std::array<std::vector<ct>,dim> newcoords;
│ │ │ │ +
300 std::array<int,dim> newoffset(_offset);
│ │ │ │ +
301 for (int i=0; i<dim; i++)
│ │ │ │ +
302 {
│ │ │ │ +
303 newoffset[i] *= 2;
│ │ │ │ +
304
│ │ │ │ +
305 //determine new size
│ │ │ │ +
306 int newsize = 2 * _c[i].size() - 1;
│ │ │ │ +
307 if (!keep_ovlp)
│ │ │ │ +
308 {
│ │ │ │ +
309 if (ovlp_low[i])
│ │ │ │ +
310 {
│ │ │ │ +
311 newoffset[i] += overlap;
│ │ │ │ +
312 newsize -= overlap;
│ │ │ │ +
313 }
│ │ │ │ +
314 if (ovlp_up[i])
│ │ │ │ +
315 newsize -= overlap;
│ │ │ │ +
316 }
│ │ │ │ +
317 newcoords[i].resize(newsize);
│ │ │ │ +
318
│ │ │ │ +
319 typename std::vector<ct>::const_iterator it = _c[i].begin();
│ │ │ │ +
320 typename std::vector<ct>::const_iterator end = _c[i].end()-1;
│ │ │ │ +
321 typename std::vector<ct>::iterator iit = newcoords[i].begin() - 1;
│ │ │ │ +
322 if (!keep_ovlp)
│ │ │ │ +
323 {
│ │ │ │ +
324 if (ovlp_low[i])
│ │ │ │ +
325 {
│ │ │ │ +
326 it += overlap/2;
│ │ │ │ +
327 if (overlap%2)
│ │ │ │ +
328 *(++iit) = (*it + *(++it)) / ct(2.);
│ │ │ │ +
329 }
│ │ │ │ +
330 if (ovlp_up[i])
│ │ │ │ +
331 end -= overlap/2;
│ │ │ │ +
332 }
│ │ │ │ +
333
│ │ │ │ +
334 for (;it!=end;)
│ │ │ │ +
335 {
│ │ │ │ +
336 *(++iit) = *it;
│ │ │ │ +
337 *(++iit) = (*it + *(++it)) / ct(2.);
│ │ │ │ +
338 }
│ │ │ │ +
339
│ │ │ │ +
340 if (++iit != newcoords[i].end())
│ │ │ │ +
341 *iit = *it;
│ │ │ │
342 }
│ │ │ │ -
343 }
│ │ │ │ -
344
│ │ │ │ -
345 // types
│ │ │ │ -
346 if (dim>1)
│ │ │ │ -
347 {
│ │ │ │ -
348 std::shared_ptr<VTK::DataArrayWriter> p3
│ │ │ │ -
349 (writer.makeArrayWriter("types", 1, ncells, VTK::Precision::uint8));
│ │ │ │ -
350 if(!p3->writeIsNoop())
│ │ │ │ -
351 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ -
352 {
│ │ │ │ -
353 GeometryType coerceTo = subsampledGeometryType(it->type());
│ │ │ │ -
354 Refinement &refinement =
│ │ │ │ -
355 buildRefinement<dim, ctype>(it->type(), coerceTo);
│ │ │ │ -
356 int vtktype = VTK::geometryType(coerceTo);
│ │ │ │ -
357 for(int i = 0; i < refinement.nElements(intervals); ++i)
│ │ │ │ -
358 p3->write(vtktype);
│ │ │ │ -
359 }
│ │ │ │ -
360 }
│ │ │ │ -
361
│ │ │ │ -
362 writer.endCells();
│ │ │ │ -
363 }
│ │ │ │ -
│ │ │ │ -
364}
│ │ │ │ -
365
│ │ │ │ -
366#endif // DUNE_SUBSAMPLINGVTKWRITER_HH
│ │ │ │ -
Provides file i/o for the visualization toolkit.
│ │ │ │ - │ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:151
│ │ │ │ +
343 return TensorProductCoordinates<ct,dim>(newcoords, newoffset);
│ │ │ │ +
344 }
│ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
│ │ │ │ +
347 void print(std::ostream& s) const
│ │ │ │ +
348 {
│ │ │ │ +
349 s << "Printing TensorProduct Coordinate information:" << std::endl;
│ │ │ │ +
350 for (int i=0; i<dim; i++)
│ │ │ │ +
351 {
│ │ │ │ +
352 s << "Direction " << i << ": " << _c[i].size() << " coordinates" << std::endl;
│ │ │ │ +
353 for (std::size_t j=0; j<_c[i].size(); j++)
│ │ │ │ +
354 s << _c[i][j] << std::endl;
│ │ │ │ +
355 }
│ │ │ │ +
356 }
│ │ │ │ +
│ │ │ │ +
357
│ │ │ │ +
358 private:
│ │ │ │ +
359 std::array<std::vector<ct>,dim> _c;
│ │ │ │ +
360 std::array<int,dim> _offset;
│ │ │ │ +
361 };
│ │ │ │ +
│ │ │ │ +
362
│ │ │ │ +
363 template<class ct, int dim>
│ │ │ │ +
│ │ │ │ +
364 inline std::ostream& operator<< (std::ostream& s, TensorProductCoordinates<ct,dim>& c)
│ │ │ │ +
365 {
│ │ │ │ +
366 c.print(s);
│ │ │ │ +
367 return s;
│ │ │ │ +
368 }
│ │ │ │ +
│ │ │ │ +
369
│ │ │ │ +
│ │ │ │ +
370 namespace Yasp {
│ │ │ │ +
371 template<class ctype, std::size_t dim>
│ │ │ │ +
372 bool checkIfMonotonous(const std::array<std::vector<ctype>, dim>& coords)
│ │ │ │ +
373 {
│ │ │ │ +
374 for (std::size_t i=0; i<dim; i++)
│ │ │ │ +
375 {
│ │ │ │ +
376 if (coords[i].size() <= 1)
│ │ │ │ +
377 return false;
│ │ │ │ +
378 for (std::size_t j=1; j<coords[i].size(); j++)
│ │ │ │ +
379 if (coords[i][j] < coords[i][j-1])
│ │ │ │ +
380 return false;
│ │ │ │ +
381 }
│ │ │ │ +
382 return true;
│ │ │ │ +
383 }
│ │ │ │ +
384 } // namespace Yasp
│ │ │ │ +
│ │ │ │ +
385} // namespace Dune
│ │ │ │ +
386
│ │ │ │ +
387#endif
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ -
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ -
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ -
@ tensor
tensor field (always 3x3)
│ │ │ │ -
@ vector
vector-valued field (always 3D, will be padded if necessary)
│ │ │ │ - │ │ │ │ -
Writer for the output of subsampled grid functions in the vtk format.
Definition subsamplingvtkwriter.hh:40
│ │ │ │ -
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition subsamplingvtkwriter.hh:261
│ │ │ │ -
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition subsamplingvtkwriter.hh:243
│ │ │ │ -
SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK::Precision::float32)
Construct a SubsamplingVTKWriter working on a specific GridView.
Definition subsamplingvtkwriter.hh:80
│ │ │ │ -
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition subsamplingvtkwriter.hh:207
│ │ │ │ -
virtual void writeCellData(VTK::VTUWriter &writer)
write cell data
Definition subsamplingvtkwriter.hh:225
│ │ │ │ -
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition subsamplingvtkwriter.hh:292
│ │ │ │ -
Writer for the ouput of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ -
VertexIterator vertexBegin() const
Definition vtkwriter.hh:508
│ │ │ │ -
void addVertexData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the vertices of the grid to the visualization.
Definition vtkwriter.hh:713
│ │ │ │ -
CellIterator cellEnd() const
Definition vtkwriter.hh:402
│ │ │ │ -
std::list< VTKLocalFunction > vertexdata
Definition vtkwriter.hh:1585
│ │ │ │ -
void addCellData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the cells of the grid to the visualization.
Definition vtkwriter.hh:649
│ │ │ │ -
CellIterator cellBegin() const
Definition vtkwriter.hh:397
│ │ │ │ -
VTK::OutputType outputtype
Definition vtkwriter.hh:1609
│ │ │ │ -
std::list< VTKLocalFunction > celldata
Definition vtkwriter.hh:1584
│ │ │ │ -
VTK::Precision coordPrecision() const
get the precision with which coordinates are written out
Definition vtkwriter.hh:782
│ │ │ │ -
std::list< VTKLocalFunction >::const_iterator FunctionIterator
Definition vtkwriter.hh:376
│ │ │ │ -
int nvertices
Definition vtkwriter.hh:1592
│ │ │ │ -
int ncells
Definition vtkwriter.hh:1591
│ │ │ │ -
VertexIterator vertexEnd() const
Definition vtkwriter.hh:515
│ │ │ │ -
int ncorners
Definition vtkwriter.hh:1593
│ │ │ │ -
Iterator over the grids elements.
Definition vtkwriter.hh:385
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ -
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ -
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ │ -
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ │ -
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ │ -
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ │ -
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ │ -
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ │ -
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ │ -
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ │ +
Container for equidistant coordinates in a YaspGrid.
Definition coordinates.hh:29
│ │ │ │ +
ct coordinate(int d, int i) const
Definition coordinates.hh:65
│ │ │ │ +
int size(int d) const
Definition coordinates.hh:73
│ │ │ │ +
static const int dimension
export dimension
Definition coordinates.hh:34
│ │ │ │ +
void print(std::ostream &s) const
print information on this container
Definition coordinates.hh:107
│ │ │ │ +
EquidistantCoordinates()
default constructor
Definition coordinates.hh:37
│ │ │ │ +
EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
Definition coordinates.hh:84
│ │ │ │ +
ct ctype
export the coordinate type
Definition coordinates.hh:32
│ │ │ │ +
EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > &s)
construct a container with all necessary information
Definition coordinates.hh:45
│ │ │ │ +
ct meshsize(int d, int i) const
Definition coordinates.hh:56
│ │ │ │ +
Container for equidistant coordinates in a YaspGrid with non-trivial origin.
Definition coordinates.hh:131
│ │ │ │ +
EquidistantOffsetCoordinates()
default constructor
Definition coordinates.hh:139
│ │ │ │ +
EquidistantOffsetCoordinates(const Dune::FieldVector< ct, dim > &lowerLeft, const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > &s)
construct a container with all necessary information
Definition coordinates.hh:149
│ │ │ │ +
EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
Definition coordinates.hh:196
│ │ │ │ +
void print(std::ostream &s) const
print information on this container
Definition coordinates.hh:219
│ │ │ │ +
ct meshsize(int d, int i) const
Definition coordinates.hh:160
│ │ │ │ +
ct origin(int d) const
Definition coordinates.hh:185
│ │ │ │ +
int size(int d) const
Definition coordinates.hh:177
│ │ │ │ +
ct ctype
export the coordinate type
Definition coordinates.hh:134
│ │ │ │ +
static const int dimension
export dimension
Definition coordinates.hh:136
│ │ │ │ +
ct coordinate(int d, int i) const
Definition coordinates.hh:169
│ │ │ │ +
Coordinate container for a tensor product YaspGrid.
Definition coordinates.hh:245
│ │ │ │ +
void print(std::ostream &s) const
print information on this container
Definition coordinates.hh:347
│ │ │ │ +
ct meshsize(int d, int i) const
Definition coordinates.hh:269
│ │ │ │ +
ct coordinate(int d, int i) const
Definition coordinates.hh:278
│ │ │ │ +
static const int dimension
export dimension
Definition coordinates.hh:250
│ │ │ │ +
TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
Definition coordinates.hh:297
│ │ │ │ +
TensorProductCoordinates(const std::array< std::vector< ct >, dim > &c, const std::array< int, dim > &offset)
construct a container with all necessary information
Definition coordinates.hh:261
│ │ │ │ +
TensorProductCoordinates()
the default constructor
Definition coordinates.hh:253
│ │ │ │ +
ct ctype
export the coordinate type
Definition coordinates.hh:248
│ │ │ │ +
int size(int d) const
Definition coordinates.hh:286
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,528 +1,426 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _i_o │ │ │ │ │ - * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -subsamplingvtkwriter.hh │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +coordinates.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_SUBSAMPLINGVTKWRITER_HH │ │ │ │ │ -7#define DUNE_SUBSAMPLINGVTKWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_COORDINATES_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -24namespace _D_u_n_e │ │ │ │ │ -25{ │ │ │ │ │ -37 template< class GridView > │ │ │ │ │ -_3_8 class _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r │ │ │ │ │ -39 : public _V_T_K_W_r_i_t_e_r │ │ │ │ │ -40 { │ │ │ │ │ -41 typedef _V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> _B_a_s_e; │ │ │ │ │ -42 constexpr static int dim = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -43 constexpr static int dimw = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -44 typedef typename GridView::Grid::ctype ctype; │ │ │ │ │ -45 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Entity; │ │ │ │ │ -46 typedef VirtualRefinement Refinement; │ │ │ │ │ -47 typedef typename Refinement::IndexVector IndexVector; │ │ │ │ │ -48 typedef typename Refinement::ElementIterator SubElementIterator; │ │ │ │ │ -49 typedef typename Refinement::VertexIterator SubVertexIterator; │ │ │ │ │ -50 │ │ │ │ │ -51 typedef typename _B_a_s_e_:_:_C_e_l_l_I_t_e_r_a_t_o_r _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ -52 typedef typename _B_a_s_e_:_:_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r FunctionIterator; │ │ │ │ │ -53 using _B_a_s_e_:_:_c_e_l_l_B_e_g_i_n; │ │ │ │ │ -54 using _B_a_s_e_:_:_c_e_l_l_E_n_d; │ │ │ │ │ -55 using _B_a_s_e_:_:_c_e_l_l_d_a_t_a; │ │ │ │ │ -56 using _B_a_s_e_:_:_n_c_e_l_l_s; │ │ │ │ │ -57 using _B_a_s_e_:_:_n_c_o_r_n_e_r_s; │ │ │ │ │ -58 using _B_a_s_e_:_:_n_v_e_r_t_i_c_e_s; │ │ │ │ │ -59 using _B_a_s_e_:_:_o_u_t_p_u_t_t_y_p_e; │ │ │ │ │ -60 using _B_a_s_e_:_:_v_e_r_t_e_x_B_e_g_i_n; │ │ │ │ │ -61 using _B_a_s_e_:_:_v_e_r_t_e_x_E_n_d; │ │ │ │ │ -62 using _B_a_s_e_:_:_v_e_r_t_e_x_d_a_t_a; │ │ │ │ │ -63 │ │ │ │ │ -64 public: │ │ │ │ │ -_8_0 explicit _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r (const _G_r_i_d_V_i_e_w &gridView, │ │ │ │ │ -81 Dune::RefinementIntervals intervals_, bool coerceToSimplex_ = false, │ │ │ │ │ -82 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _c_o_o_r_d_P_r_e_c_i_s_i_o_n = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -83 : _B_a_s_e(gridView, VTK::nonconforming, _c_o_o_r_d_P_r_e_c_i_s_i_o_n) │ │ │ │ │ -84 , intervals(intervals_), coerceToSimplex(coerceToSimplex_) │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +21namespace _D_u_n_e │ │ │ │ │ +22{ │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +29 { │ │ │ │ │ +30 public: │ │ │ │ │ +_3_2 typedef ct _c_t_y_p_e; │ │ │ │ │ +_3_4 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +35 │ │ │ │ │ +_3_7 _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ │ +38 │ │ │ │ │ +_4_5 _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s(const Dune::FieldVector& upperRight, const │ │ │ │ │ +std::array& s) │ │ │ │ │ +46 : _s(s) │ │ │ │ │ +47 { │ │ │ │ │ +48 for (int i=0; i _r_e_f_i_n_e(std::bitset ovlp_low, std:: │ │ │ │ │ +bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ 85 { │ │ │ │ │ -86 if(intervals_.intervals() < 1) { │ │ │ │ │ -87 DUNE_THROW(Dune::IOError,"SubsamplingVTKWriter: Refinement intervals must be │ │ │ │ │ -larger than zero! (One interval means no subsampling)"); │ │ │ │ │ -88 } │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -91 private: │ │ │ │ │ -92 GeometryType subsampledGeometryType(GeometryType geometryType) │ │ │ │ │ -93 { │ │ │ │ │ -94 return (geometryType.isCube() && !coerceToSimplex ? geometryType : │ │ │ │ │ -GeometryTypes::simplex(dim)); │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97 template │ │ │ │ │ -98 struct IteratorSelector │ │ │ │ │ -99 {}; │ │ │ │ │ +86 //determine new size and meshsize │ │ │ │ │ +87 std::array news; │ │ │ │ │ +88 Dune::FieldVector newUpperRight; │ │ │ │ │ +89 │ │ │ │ │ +90 for (int i=0; i) │ │ │ │ │ -102 { │ │ │ │ │ -103 return refinement.eBegin(intervals); │ │ │ │ │ +101 newUpperRight[i] = (_h[i] / ct(2.)) * news[i]; │ │ │ │ │ +102 } │ │ │ │ │ +103 return _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>(newUpperRight,news); │ │ │ │ │ 104 } │ │ │ │ │ 105 │ │ │ │ │ -106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune:: │ │ │ │ │ -RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ -107 { │ │ │ │ │ -108 return refinement.vBegin(intervals); │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -111 SubElementIterator refinementEnd(const Refinement& refinement, Dune:: │ │ │ │ │ -RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ -112 { │ │ │ │ │ -113 return refinement.eEnd(intervals); │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune:: │ │ │ │ │ -RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ -117 { │ │ │ │ │ -118 return refinement.vEnd(intervals); │ │ │ │ │ -119 } │ │ │ │ │ -120 │ │ │ │ │ -121 template │ │ │ │ │ -122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator │ │ │ │ │ -begin, const Iterator end, int nentries, IteratorSelector sis) │ │ │ │ │ -123 { │ │ │ │ │ -124 for (auto it = data.begin(), │ │ │ │ │ -125 iend = data.end(); │ │ │ │ │ -126 it != iend; │ │ │ │ │ -127 ++it) │ │ │ │ │ -128 { │ │ │ │ │ -129 const auto& f = *it; │ │ │ │ │ -130 VTK::FieldInfo fieldInfo = f.fieldInfo(); │ │ │ │ │ -131 std::size_t writecomps = fieldInfo.size(); │ │ │ │ │ -132 switch (fieldInfo.type()) │ │ │ │ │ -133 { │ │ │ │ │ -134 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r: │ │ │ │ │ -135 break; │ │ │ │ │ -136 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r: │ │ │ │ │ -137 // vtk file format: a vector data always should have 3 comps (with │ │ │ │ │ -138 // 3rd comp = 0 in 2D case) │ │ │ │ │ -139 if (writecomps > 3) │ │ │ │ │ -140 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components │ │ │ │ │ -(components was " << writecomps << ")"); │ │ │ │ │ -141 writecomps = 3; │ │ │ │ │ -142 break; │ │ │ │ │ -143 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r: │ │ │ │ │ -144 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet"); │ │ │ │ │ -145 } │ │ │ │ │ -146 std::shared_ptr p │ │ │ │ │ -147 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision │ │ │ │ │ -())); │ │ │ │ │ -148 if(!p->writeIsNoop()) │ │ │ │ │ -149 for (Iterator eit = begin; eit!=end; ++eit) │ │ │ │ │ -150 { │ │ │ │ │ -151 const Entity & e = *eit; │ │ │ │ │ -152 f.bind(e); │ │ │ │ │ -153 Refinement &refinement = │ │ │ │ │ -154 buildRefinement(eit->type(), │ │ │ │ │ -155 subsampledGeometryType(eit->type())); │ │ │ │ │ -156 for(SubIterator sit = refinementBegin(refinement,intervals,sis), │ │ │ │ │ -157 send = refinementEnd(refinement,intervals,sis); │ │ │ │ │ -158 sit != send; │ │ │ │ │ -159 ++sit) │ │ │ │ │ -160 { │ │ │ │ │ -161 f.write(sit.coords(),*p); │ │ │ │ │ -162 // expand 2D-Vectors to 3D for VTK format │ │ │ │ │ -163 for(unsigned j = f.fieldInfo().size(); j < writecomps; j++) │ │ │ │ │ -164 p->write(0.0); │ │ │ │ │ -165 } │ │ │ │ │ -166 f.unbind(); │ │ │ │ │ -167 } │ │ │ │ │ -168 } │ │ │ │ │ -169 } │ │ │ │ │ -170 │ │ │ │ │ -171 │ │ │ │ │ -172 protected: │ │ │ │ │ -174 virtual void _c_o_u_n_t_E_n_t_i_t_i_e_s(int &nvertices_, int &ncells_, int &ncorners_); │ │ │ │ │ -175 │ │ │ │ │ -177 virtual void _w_r_i_t_e_C_e_l_l_D_a_t_a(VTK::VTUWriter& writer); │ │ │ │ │ -178 │ │ │ │ │ -180 virtual void _w_r_i_t_e_V_e_r_t_e_x_D_a_t_a(VTK::VTUWriter& writer); │ │ │ │ │ +_1_0_7 void _p_r_i_n_t(std::ostream& s) const │ │ │ │ │ +108 { │ │ │ │ │ +109 s << "Printing equidistant coordinate information:" << std::endl; │ │ │ │ │ +110 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl; │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +113 private: │ │ │ │ │ +114 Dune::FieldVector _h; │ │ │ │ │ +115 std::array _s; │ │ │ │ │ +116 }; │ │ │ │ │ +117 │ │ │ │ │ +118 template │ │ │ │ │ +_1_1_9 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ +_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>& c) │ │ │ │ │ +120 { │ │ │ │ │ +121 c._p_r_i_n_t(s); │ │ │ │ │ +122 return s; │ │ │ │ │ +123 } │ │ │ │ │ +124 │ │ │ │ │ +129 template │ │ │ │ │ +_1_3_0 class _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +131 { │ │ │ │ │ +132 public: │ │ │ │ │ +_1_3_4 typedef ct _c_t_y_p_e; │ │ │ │ │ +_1_3_6 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +137 │ │ │ │ │ +_1_3_9 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ │ +140 │ │ │ │ │ +_1_4_9 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s(const Dune::FieldVector& lowerLeft, │ │ │ │ │ +const Dune::FieldVector& upperRight, const std::array& s) │ │ │ │ │ +150 : _origin(lowerLeft), _s(s) │ │ │ │ │ +151 { │ │ │ │ │ +152 for (int i=0; i │ │ │ │ │ -197 void addVertexData (const V& v, const std::string &name, int ncomps=1); │ │ │ │ │ -198 template │ │ │ │ │ -199 void addCellData (const V& v, const std::string &name, int ncomps=1); │ │ │ │ │ -200 │ │ │ │ │ -201 Dune::RefinementIntervals intervals; │ │ │ │ │ -202 bool coerceToSimplex; │ │ │ │ │ -203 }; │ │ │ │ │ -204 │ │ │ │ │ -206 template │ │ │ │ │ -_2_0_7 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_c_o_u_n_t_E_n_t_i_t_i_e_s(int &nvertices_, int │ │ │ │ │ -&ncells_, int &ncorners_) │ │ │ │ │ -208 { │ │ │ │ │ -209 nvertices_ = 0; │ │ │ │ │ -210 ncells_ = 0; │ │ │ │ │ -211 ncorners_ = 0; │ │ │ │ │ -212 for (_C_e_l_l_I_t_e_r_a_t_o_r it=this->cellBegin(); it!=cellEnd(); ++it) │ │ │ │ │ -213 { │ │ │ │ │ -214 Refinement &refinement = buildRefinement(it->type(), │ │ │ │ │ -subsampledGeometryType(it->type())); │ │ │ │ │ -215 │ │ │ │ │ -216 ncells_ += refinement.nElements(intervals); │ │ │ │ │ -217 nvertices_ += refinement.nVertices(intervals); │ │ │ │ │ -218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin │ │ │ │ │ -(intervals).vertexIndices().size(); │ │ │ │ │ -219 } │ │ │ │ │ -220 } │ │ │ │ │ -221 │ │ │ │ │ -222 │ │ │ │ │ -224 template │ │ │ │ │ -_2_2_5 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ -226 { │ │ │ │ │ -227 if(celldata.size() == 0) │ │ │ │ │ -228 return; │ │ │ │ │ -229 │ │ │ │ │ -230 // Find the names of the first scalar and vector data fields. │ │ │ │ │ -231 // These will be marked as the default fields (the ones that ParaView shows │ │ │ │ │ -232 // when the file has just been opened). │ │ │ │ │ -233 std::string defaultScalarField, defaultVectorField; │ │ │ │ │ -234 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames │ │ │ │ │ -(celldata); │ │ │ │ │ -235 │ │ │ │ │ -236 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(defaultScalarField, defaultVectorField); │ │ │ │ │ -237 writeData(writer,celldata,cellBegin(),cellEnd │ │ │ │ │ -(),ncells,IteratorSelector()); │ │ │ │ │ -238 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ -239 } │ │ │ │ │ -240 │ │ │ │ │ -242 template │ │ │ │ │ -_2_4_3 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_V_e_r_t_e_x_D_a_t_a(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& │ │ │ │ │ -writer) │ │ │ │ │ -244 { │ │ │ │ │ -245 if(vertexdata.size() == 0) │ │ │ │ │ -246 return; │ │ │ │ │ -247 │ │ │ │ │ -248 // Find the names of the first scalar and vector data fields. │ │ │ │ │ -249 // These will be marked as the default fields (the ones that ParaView shows │ │ │ │ │ -250 // when the file has just been opened). │ │ │ │ │ -251 std::string defaultScalarField, defaultVectorField; │ │ │ │ │ -252 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames │ │ │ │ │ -(vertexdata); │ │ │ │ │ -253 │ │ │ │ │ -254 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(defaultScalarField, defaultVectorField); │ │ │ │ │ -255 writeData(writer,vertexdata,cellBegin(),cellEnd │ │ │ │ │ -(),nvertices,IteratorSelector()); │ │ │ │ │ -256 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ -257 } │ │ │ │ │ -258 │ │ │ │ │ -260 template │ │ │ │ │ -_2_6_1 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_G_r_i_d_P_o_i_n_t_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& │ │ │ │ │ -writer) │ │ │ │ │ -262 { │ │ │ │ │ -263 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +_1_8_5 inline ct _o_r_i_g_i_n(int d) const │ │ │ │ │ +186 { │ │ │ │ │ +187 return _origin[d]; │ │ │ │ │ +188 } │ │ │ │ │ +189 │ │ │ │ │ +_1_9_6 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_> _r_e_f_i_n_e(std::bitset ovlp_low, │ │ │ │ │ +std::bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ +197 { │ │ │ │ │ +198 //determine new size and meshsize │ │ │ │ │ +199 std::array news; │ │ │ │ │ +200 Dune::FieldVector newUpperRight; │ │ │ │ │ +201 │ │ │ │ │ +202 for (int i=0; i(_origin,newUpperRight,news); │ │ │ │ │ +216 } │ │ │ │ │ +217 │ │ │ │ │ +_2_1_9 void _p_r_i_n_t(std::ostream& s) const │ │ │ │ │ +220 { │ │ │ │ │ +221 s << "Printing equidistant coordinate information:" << std::endl; │ │ │ │ │ +222 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl; │ │ │ │ │ +223 s << "Offset to origin: " << _origin << std::endl; │ │ │ │ │ +224 } │ │ │ │ │ +225 │ │ │ │ │ +226 private: │ │ │ │ │ +227 Dune::FieldVector _origin; │ │ │ │ │ +228 Dune::FieldVector _h; │ │ │ │ │ +229 std::array _s; │ │ │ │ │ +230 }; │ │ │ │ │ +231 │ │ │ │ │ +232 template │ │ │ │ │ +_2_3_3 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ +_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>& c) │ │ │ │ │ +234 { │ │ │ │ │ +235 c._p_r_i_n_t(s); │ │ │ │ │ +236 return s; │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +243 template │ │ │ │ │ +_2_4_4 class _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +245 { │ │ │ │ │ +246 public: │ │ │ │ │ +_2_4_8 typedef ct _c_t_y_p_e; │ │ │ │ │ +_2_5_0 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +251 │ │ │ │ │ +_2_5_3 _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ │ +254 │ │ │ │ │ +_2_6_1 _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s(const std::array,dim>& c, const │ │ │ │ │ +std::array& offset) │ │ │ │ │ +262 : _c(c),_offset(offset) │ │ │ │ │ +263 {} │ │ │ │ │ 264 │ │ │ │ │ -265 std::shared_ptr p │ │ │ │ │ -266 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("Coordinates", 3, nvertices, this->coordPrecision │ │ │ │ │ -())); │ │ │ │ │ -267 if(!p->writeIsNoop()) │ │ │ │ │ -268 for (_C_e_l_l_I_t_e_r_a_t_o_r i=cellBegin(); i!=cellEnd(); ++i) │ │ │ │ │ -269 { │ │ │ │ │ -270 Refinement &refinement = │ │ │ │ │ -271 buildRefinement(i->type(), │ │ │ │ │ -272 subsampledGeometryType(i->type())); │ │ │ │ │ -273 for(SubVertexIterator sit = refinement.vBegin(intervals), │ │ │ │ │ -274 send = refinement.vEnd(intervals); │ │ │ │ │ -275 sit != send; ++sit) │ │ │ │ │ -276 { │ │ │ │ │ -277 FieldVector coords = i->geometry().global(sit.coords()); │ │ │ │ │ -278 for (int j=0; jwrite(coords[j]); │ │ │ │ │ -280 for (int j=std::min(int(dimw),3); j<3; j++) │ │ │ │ │ -281 p->write(0.0); │ │ │ │ │ -282 } │ │ │ │ │ -283 } │ │ │ │ │ -284 // free the VTK::DataArrayWriter before touching the stream │ │ │ │ │ -285 p.reset(); │ │ │ │ │ -286 │ │ │ │ │ -287 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ -288 } │ │ │ │ │ -289 │ │ │ │ │ -291 template │ │ │ │ │ -_2_9_2 void _S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_>_:_:_w_r_i_t_e_G_r_i_d_C_e_l_l_s(_V_T_K_:_:_V_T_U_W_r_i_t_e_r& writer) │ │ │ │ │ -293 { │ │ │ │ │ -294 writer._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ -295 │ │ │ │ │ -296 // connectivity │ │ │ │ │ -297 { │ │ │ │ │ -298 std::shared_ptr p1 │ │ │ │ │ -299 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("connectivity", 1, ncorners, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_: │ │ │ │ │ -_i_n_t_3_2)); │ │ │ │ │ -300 // The offset within the index numbering │ │ │ │ │ -301 if(!p1->writeIsNoop()) { │ │ │ │ │ -302 int offset = 0; │ │ │ │ │ -303 for (_C_e_l_l_I_t_e_r_a_t_o_r i=cellBegin(); i!=cellEnd(); ++i) │ │ │ │ │ -304 { │ │ │ │ │ -305 GeometryType coercedToType = subsampledGeometryType(i->type()); │ │ │ │ │ -306 Refinement &refinement = │ │ │ │ │ -307 buildRefinement(i->type(), coercedToType); │ │ │ │ │ -308 for(SubElementIterator sit = refinement.eBegin(intervals), │ │ │ │ │ -309 send = refinement.eEnd(intervals); │ │ │ │ │ -310 sit != send; ++sit) │ │ │ │ │ -311 { │ │ │ │ │ -312 IndexVector indices = sit.vertexIndices(); │ │ │ │ │ -313 for(unsigned int ii = 0; ii < indices.size(); ++ii) │ │ │ │ │ -314 p1->write(offset+indices[_V_T_K_:_:_r_e_n_u_m_b_e_r(coercedToType, ii)]); │ │ │ │ │ -315 } │ │ │ │ │ -316 offset += refinement.nVertices(intervals); │ │ │ │ │ -317 } │ │ │ │ │ -318 } │ │ │ │ │ -319 } │ │ │ │ │ -320 │ │ │ │ │ -321 // offsets │ │ │ │ │ -322 { │ │ │ │ │ -323 std::shared_ptr p2 │ │ │ │ │ -324 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("offsets", 1, ncells, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ -325 if(!p2->writeIsNoop()) { │ │ │ │ │ -326 // The offset into the connectivity array │ │ │ │ │ -327 int offset = 0; │ │ │ │ │ -328 for (_C_e_l_l_I_t_e_r_a_t_o_r i=cellBegin(); i!=cellEnd(); ++i) │ │ │ │ │ -329 { │ │ │ │ │ -330 Refinement &refinement = │ │ │ │ │ -331 buildRefinement(i->type(), │ │ │ │ │ -332 subsampledGeometryType(i->type())); │ │ │ │ │ -333 unsigned int verticesPerCell = │ │ │ │ │ -334 refinement.eBegin(intervals).vertexIndices().size(); │ │ │ │ │ -335 for(int element = 0; element < refinement.nElements(intervals); │ │ │ │ │ -336 ++element) │ │ │ │ │ -337 { │ │ │ │ │ -338 offset += verticesPerCell; │ │ │ │ │ -339 p2->write(offset); │ │ │ │ │ -340 } │ │ │ │ │ -341 } │ │ │ │ │ +_2_6_9 inline ct _m_e_s_h_s_i_z_e(int d, int i) const │ │ │ │ │ +270 { │ │ │ │ │ +271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]]; │ │ │ │ │ +272 } │ │ │ │ │ +273 │ │ │ │ │ +_2_7_8 inline ct _c_o_o_r_d_i_n_a_t_e(int d, int i) const │ │ │ │ │ +279 { │ │ │ │ │ +280 return _c[d][i-_offset[d]]; │ │ │ │ │ +281 } │ │ │ │ │ +282 │ │ │ │ │ +_2_8_6 inline int _s_i_z_e(int d) const │ │ │ │ │ +287 { │ │ │ │ │ +288 return _c[d].size() - 1; │ │ │ │ │ +289 } │ │ │ │ │ +290 │ │ │ │ │ +_2_9_7 _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_> _r_e_f_i_n_e(std::bitset ovlp_low, std:: │ │ │ │ │ +bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ +298 { │ │ │ │ │ +299 std::array,dim> newcoords; │ │ │ │ │ +300 std::array newoffset(_offset); │ │ │ │ │ +301 for (int i=0; i::const_iterator it = _c[i].begin(); │ │ │ │ │ +320 typename std::vector::const_iterator end = _c[i].end()-1; │ │ │ │ │ +321 typename std::vector::iterator iit = newcoords[i].begin() - 1; │ │ │ │ │ +322 if (!keep_ovlp) │ │ │ │ │ +323 { │ │ │ │ │ +324 if (ovlp_low[i]) │ │ │ │ │ +325 { │ │ │ │ │ +326 it += overlap/2; │ │ │ │ │ +327 if (overlap%2) │ │ │ │ │ +328 *(++iit) = (*it + *(++it)) / ct(2.); │ │ │ │ │ +329 } │ │ │ │ │ +330 if (ovlp_up[i]) │ │ │ │ │ +331 end -= overlap/2; │ │ │ │ │ +332 } │ │ │ │ │ +333 │ │ │ │ │ +334 for (;it!=end;) │ │ │ │ │ +335 { │ │ │ │ │ +336 *(++iit) = *it; │ │ │ │ │ +337 *(++iit) = (*it + *(++it)) / ct(2.); │ │ │ │ │ +338 } │ │ │ │ │ +339 │ │ │ │ │ +340 if (++iit != newcoords[i].end()) │ │ │ │ │ +341 *iit = *it; │ │ │ │ │ 342 } │ │ │ │ │ -343 } │ │ │ │ │ -344 │ │ │ │ │ -345 // types │ │ │ │ │ -346 if (dim>1) │ │ │ │ │ -347 { │ │ │ │ │ -348 std::shared_ptr p3 │ │ │ │ │ -349 (writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r("types", 1, ncells, _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8)); │ │ │ │ │ -350 if(!p3->writeIsNoop()) │ │ │ │ │ -351 for (_C_e_l_l_I_t_e_r_a_t_o_r it=cellBegin(); it!=cellEnd(); ++it) │ │ │ │ │ -352 { │ │ │ │ │ -353 GeometryType coerceTo = subsampledGeometryType(it->type()); │ │ │ │ │ -354 Refinement &refinement = │ │ │ │ │ -355 buildRefinement(it->type(), coerceTo); │ │ │ │ │ -356 int vtktype = _V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e(coerceTo); │ │ │ │ │ -357 for(int i = 0; i < refinement.nElements(intervals); ++i) │ │ │ │ │ -358 p3->write(vtktype); │ │ │ │ │ -359 } │ │ │ │ │ -360 } │ │ │ │ │ -361 │ │ │ │ │ -362 writer._e_n_d_C_e_l_l_s(); │ │ │ │ │ -363 } │ │ │ │ │ -364} │ │ │ │ │ -365 │ │ │ │ │ -366#endif // DUNE_SUBSAMPLINGVTKWRITER_HH │ │ │ │ │ -_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ │ -static constexpr int dimensionworld │ │ │ │ │ -The dimension of the world the grid lives in. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:151 │ │ │ │ │ +343 return _T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>(newcoords, newoffset); │ │ │ │ │ +344 } │ │ │ │ │ +345 │ │ │ │ │ +_3_4_7 void _p_r_i_n_t(std::ostream& s) const │ │ │ │ │ +348 { │ │ │ │ │ +349 s << "Printing TensorProduct Coordinate information:" << std::endl; │ │ │ │ │ +350 for (int i=0; i,dim> _c; │ │ │ │ │ +360 std::array _offset; │ │ │ │ │ +361 }; │ │ │ │ │ +362 │ │ │ │ │ +363 template │ │ │ │ │ +_3_6_4 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, │ │ │ │ │ +_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_>& c) │ │ │ │ │ +365 { │ │ │ │ │ +366 c._p_r_i_n_t(s); │ │ │ │ │ +367 return s; │ │ │ │ │ +368 } │ │ │ │ │ +369 │ │ │ │ │ +_3_7_0 namespace Yasp { │ │ │ │ │ +371 template │ │ │ │ │ +372 bool checkIfMonotonous(const std::array, dim>& coords) │ │ │ │ │ +373 { │ │ │ │ │ +374 for (std::size_t i=0; i Dune │ │ │ │ │ -DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ -mapping from GeometryType to VTKGeometryType │ │ │ │ │ -DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ -Grid view abstract base class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -A struct that collects all associated types of one implementation from the │ │ │ │ │ -Traits class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r │ │ │ │ │ -@ tensor │ │ │ │ │ -tensor field (always 3x3) │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r │ │ │ │ │ -@ vector │ │ │ │ │ -vector-valued field (always 3D, will be padded if necessary) │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r │ │ │ │ │ -@ scalar │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r │ │ │ │ │ -Writer for the output of subsampled grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d_P_o_i_n_t_s │ │ │ │ │ -virtual void writeGridPoints(VTK::VTUWriter &writer) │ │ │ │ │ -write the positions of vertices │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:261 │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -virtual void writeVertexData(VTK::VTUWriter &writer) │ │ │ │ │ -write vertex data │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r │ │ │ │ │ -SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals │ │ │ │ │ -intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK:: │ │ │ │ │ -Precision::float32) │ │ │ │ │ -Construct a SubsamplingVTKWriter working on a specific GridView. │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_c_o_u_n_t_E_n_t_i_t_i_e_s │ │ │ │ │ -virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_) │ │ │ │ │ -count the vertices, cells and corners │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_C_e_l_l_D_a_t_a │ │ │ │ │ -virtual void writeCellData(VTK::VTUWriter &writer) │ │ │ │ │ -write cell data │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:225 │ │ │ │ │ -_D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_:_:_w_r_i_t_e_G_r_i_d_C_e_l_l_s │ │ │ │ │ -virtual void writeGridCells(VTK::VTUWriter &writer) │ │ │ │ │ -write the connectivity array │ │ │ │ │ -DDeeffiinniittiioonn subsamplingvtkwriter.hh:292 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r │ │ │ │ │ -Writer for the ouput of grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_B_e_g_i_n │ │ │ │ │ -VertexIterator vertexBegin() const │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:508 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(const std::shared_ptr< const VTKFunction > &p) │ │ │ │ │ -Add a grid function that lives on the vertices of the grid to the │ │ │ │ │ -visualization. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:713 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_E_n_d │ │ │ │ │ -CellIterator cellEnd() const │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:402 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_d_a_t_a │ │ │ │ │ -std::list< VTKLocalFunction > vertexdata │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1585 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const std::shared_ptr< const VTKFunction > &p) │ │ │ │ │ -Add a grid function that lives on the cells of the grid to the visualization. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:649 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_B_e_g_i_n │ │ │ │ │ -CellIterator cellBegin() const │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:397 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_o_u_t_p_u_t_t_y_p_e │ │ │ │ │ -VTK::OutputType outputtype │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1609 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_e_l_l_d_a_t_a │ │ │ │ │ -std::list< VTKLocalFunction > celldata │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1584 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_c_o_o_r_d_P_r_e_c_i_s_i_o_n │ │ │ │ │ -VTK::Precision coordPrecision() const │ │ │ │ │ -get the precision with which coordinates are written out │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:782 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -std::list< VTKLocalFunction >::const_iterator FunctionIterator │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:376 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_v_e_r_t_i_c_e_s │ │ │ │ │ -int nvertices │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1592 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_e_l_l_s │ │ │ │ │ -int ncells │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1591 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_v_e_r_t_e_x_E_n_d │ │ │ │ │ -VertexIterator vertexEnd() const │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:515 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_o_r_n_e_r_s │ │ │ │ │ -int ncorners │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1593 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ -Iterator over the grids elements. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:385 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ -unsigned nitems, Precision prec) │ │ │ │ │ -acquire a DataArrayWriter │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void endCellData() │ │ │ │ │ -finish CellData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ -void beginCells() │ │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void endPointData() │ │ │ │ │ -finish PointData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ │ -void beginCellData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start CellData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ │ -void beginPointData(const std::string &scalars="", const std::string │ │ │ │ │ -&vectors="") │ │ │ │ │ -start PointData section │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -void endPoints() │ │ │ │ │ -finish section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ -void endCells() │ │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -void beginPoints() │ │ │ │ │ -start section for the point coordinates │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Container for equidistant coordinates in a YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +ct coordinate(int d, int i) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_s_i_z_e │ │ │ │ │ +int size(int d) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +export dimension │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &s) const │ │ │ │ │ +print information on this container │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +EquidistantCoordinates() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_r_e_f_i_n_e │ │ │ │ │ +EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std:: │ │ │ │ │ +bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +export the coordinate type │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const │ │ │ │ │ +std::array< int, dim > &s) │ │ │ │ │ +construct a container with all necessary information │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +ct meshsize(int d, int i) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Container for equidistant coordinates in a YaspGrid with non-trivial origin. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +EquidistantOffsetCoordinates() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +EquidistantOffsetCoordinates(const Dune::FieldVector< ct, dim > &lowerLeft, │ │ │ │ │ +const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > │ │ │ │ │ +&s) │ │ │ │ │ +construct a container with all necessary information │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_r_e_f_i_n_e │ │ │ │ │ +EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, │ │ │ │ │ +std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &s) const │ │ │ │ │ +print information on this container │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:219 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +ct meshsize(int d, int i) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_o_r_i_g_i_n │ │ │ │ │ +ct origin(int d) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_s_i_z_e │ │ │ │ │ +int size(int d) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +export the coordinate type │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +export dimension │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +ct coordinate(int d, int i) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:169 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +Coordinate container for a tensor product YaspGrid. │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:245 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_p_r_i_n_t │ │ │ │ │ +void print(std::ostream &s) const │ │ │ │ │ +print information on this container │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:347 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_m_e_s_h_s_i_z_e │ │ │ │ │ +ct meshsize(int d, int i) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:269 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ │ +ct coordinate(int d, int i) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:278 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +export dimension │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:250 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_r_e_f_i_n_e │ │ │ │ │ +TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std:: │ │ │ │ │ +bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:297 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +TensorProductCoordinates(const std::array< std::vector< ct >, dim > &c, const │ │ │ │ │ +std::array< int, dim > &offset) │ │ │ │ │ +construct a container with all necessary information │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:261 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ │ +TensorProductCoordinates() │ │ │ │ │ +the default constructor │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +export the coordinate type │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:248 │ │ │ │ │ +_D_u_n_e_:_:_T_e_n_s_o_r_P_r_o_d_u_c_t_C_o_o_r_d_i_n_a_t_e_s_:_:_s_i_z_e │ │ │ │ │ +int size(int d) const │ │ │ │ │ +DDeeffiinniittiioonn coordinates.hh:286 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00908_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html │ │ │ │┄ Files 1% similar despite different names │ │ │ │ @@ -77,28 +77,28 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
volumeiterators.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │
6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ │
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ │
8
│ │ │ │ - │ │ │ │ + │ │ │ │
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │
16namespace Dune {
│ │ │ │
19
│ │ │ │
20 namespace VTK {
│ │ │ │
21
│ │ │ │
22 template<typename GV>
│ │ │ │
│ │ │ │ @@ -247,19 +247,19 @@ │ │ │ │
130
│ │ │ │
131 } // namespace VTK
│ │ │ │
132
│ │ │ │
134
│ │ │ │
135} // namespace Dune
│ │ │ │
136
│ │ │ │
137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
simple class representing a corner of a cell
Definition corner.hh:25
│ │ │ │
iterate over the corners of some cell range
Definition corneriterator.hh:39
│ │ │ │
writer for the connectivity array in conforming mode
Definition functionwriter.hh:195
│ │ │ │
writer for the connectivity array in nonconforming mode
Definition functionwriter.hh:261
│ │ │ │
iterate over the points of some corner range
Definition pointiterator.hh:58
│ │ │ │
Definition volumeiterators.hh:23
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -141,18 +141,18 @@ │ │ │ │ │ 131 } // namespace VTK │ │ │ │ │ 132 │ │ │ │ │ 134 │ │ │ │ │ 135} // namespace Dune │ │ │ │ │ 136 │ │ │ │ │ 137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH │ │ │ │ │ _g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ │ _c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ _f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ _p_o_i_n_t_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_c_o_r_n_e_r_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r │ │ │ │ │ simple class representing a corner of a cell │ │ │ │ │ DDeeffiinniittiioonn corner.hh:25 │ │ │ │ │ _D_u_n_e_:_:_V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html │ │ │ │┄ Files 22% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: function.hh Source File │ │ │ │ +dune-grid: common.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,273 +74,380 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
function.hh
│ │ │ │ +
common.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH
│ │ │ │
8
│ │ │ │ -
9#include <string>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ +
9#include <limits>
│ │ │ │ +
10#include <sstream>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <cstdint>
│ │ │ │
13
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
16#include <dune/geometry/multilineargeometry.hh>
│ │ │ │ +
14#include <dune/common/exceptions.hh>
│ │ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ │ +
16#include <dune/common/typetraits.hh>
│ │ │ │
17
│ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
26namespace Dune
│ │ │ │ -
27{
│ │ │ │ -
30
│ │ │ │ -
32 //
│ │ │ │ -
33 // Base VTKFunction
│ │ │ │ -
34 //
│ │ │ │ -
35
│ │ │ │ -
40 template< class GridView >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
42 {
│ │ │ │ -
43 public:
│ │ │ │ -
44 typedef typename GridView::ctype ctype;
│ │ │ │ -
45 constexpr static int dim = GridView::dimension;
│ │ │ │ -
46 typedef typename GridView::template Codim< 0 >::Entity Entity;
│ │ │ │ -
47
│ │ │ │ -
50 virtual int ncomps () const = 0;
│ │ │ │ -
51
│ │ │ │ -
53
│ │ │ │ -
60 virtual double evaluate (int comp, const Entity& e,
│ │ │ │ -
61 const Dune::FieldVector<ctype,dim>& xi) const = 0;
│ │ │ │ -
62
│ │ │ │ -
64 virtual std::string name () const = 0;
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
67 virtual VTK::Precision precision() const
│ │ │ │ -
68 { return VTK::Precision::float32; }
│ │ │ │ -
│ │ │ │ +
25namespace Dune
│ │ │ │ +
26{
│ │ │ │ +
29
│ │ │ │ +
30 namespace VTK {
│ │ │ │ +
31
│ │ │ │ +
33 //
│ │ │ │ +
34 // VTKOptions
│ │ │ │ +
35 //
│ │ │ │ +
36
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
52 // //! Output to the file is compressed inline binary.
│ │ │ │ +
53 // binarycompressed,
│ │ │ │ +
54 // //! Output is compressed and appended to the file.
│ │ │ │ +
55 // compressedappended
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
67 enum DataMode {
│ │ │ │
69
│ │ │ │ -
71 virtual ~VTKFunction () {}
│ │ │ │ -
72 };
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
75 //
│ │ │ │ -
76 // P0VTKFunction
│ │ │ │ -
77 //
│ │ │ │ -
78
│ │ │ │ -
80
│ │ │ │ -
94 template<typename GV, typename V>
│ │ │ │ + │ │ │ │ +
75
│ │ │ │ + │ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
85 //
│ │ │ │ +
86 // PrintType
│ │ │ │ +
87 //
│ │ │ │ +
88
│ │ │ │ +
90
│ │ │ │ +
94 template<typename T>
│ │ │ │
│ │ │ │ - │ │ │ │ -
96 : public VTKFunction< GV >
│ │ │ │ -
97 {
│ │ │ │ -
99 typedef VTKFunction< GV > Base;
│ │ │ │ - │ │ │ │ -
102
│ │ │ │ -
104 const V& v;
│ │ │ │ -
106 std::string s;
│ │ │ │ -
108 int ncomps_;
│ │ │ │ -
111 int mycomp_;
│ │ │ │ -
113 VTK::Precision prec_;
│ │ │ │ -
115 Mapper mapper;
│ │ │ │ +
95 struct PrintType {
│ │ │ │ +
97 typedef T Type;
│ │ │ │ +
98 };
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
100 template<>
│ │ │ │ +
│ │ │ │ +
101 struct PrintType<unsigned char> {
│ │ │ │ +
102 typedef unsigned Type;
│ │ │ │ +
103 };
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
105 template<>
│ │ │ │ +
│ │ │ │ +
106 struct PrintType<signed char> {
│ │ │ │ +
107 typedef int Type;
│ │ │ │ +
108 };
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
110 template<>
│ │ │ │ +
│ │ │ │ +
111 struct PrintType<char> {
│ │ │ │ +
112 typedef std::conditional<std::numeric_limits<char>::is_signed,
│ │ │ │ +
113 int, unsigned>::type
│ │ │ │ + │ │ │ │ +
115 };
│ │ │ │ +
│ │ │ │
116
│ │ │ │ -
117 public:
│ │ │ │ -
118 typedef typename Base::Entity Entity;
│ │ │ │ -
119 typedef typename Base::ctype ctype;
│ │ │ │ -
120 using Base::dim;
│ │ │ │ +
118 //
│ │ │ │ +
119 // VTK::GeometryType related stuff
│ │ │ │ +
120 //
│ │ │ │
121
│ │ │ │ -
│ │ │ │ -
123 int ncomps () const override
│ │ │ │ -
124 {
│ │ │ │ -
125 return 1;
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ -
129 double evaluate (int, const Entity& e,
│ │ │ │ -
130 const Dune::FieldVector<ctype,dim>&) const override
│ │ │ │ -
131 {
│ │ │ │ -
132 return v[mapper.index(e)*ncomps_+mycomp_];
│ │ │ │ -
133 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
│ │ │ │ -
136 std::string name () const override
│ │ │ │ -
137 {
│ │ │ │ -
138 return s;
│ │ │ │ -
139 }
│ │ │ │ -
│ │ │ │ -
140
│ │ │ │ -
│ │ │ │ -
142 VTK::Precision precision() const override
│ │ │ │ -
143 {
│ │ │ │ -
144 return prec_;
│ │ │ │ -
145 }
│ │ │ │ +
123
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
134 line = 3,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
140 prism = 13,
│ │ │ │ + │ │ │ │ +
142 polyhedron = 42
│ │ │ │ +
143 };
│ │ │ │
│ │ │ │ +
144
│ │ │ │
146
│ │ │ │ -
148
│ │ │ │ -
│ │ │ │ -
165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,
│ │ │ │ -
166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
│ │ │ │ -
167 : v( v_ ),
│ │ │ │ -
168 s( s_ ),
│ │ │ │ -
169 ncomps_(ncomps),
│ │ │ │ -
170 mycomp_(mycomp),
│ │ │ │ -
171 prec_(prec),
│ │ │ │ -
172 mapper( gv, mcmgElementLayout() )
│ │ │ │ -
173 {
│ │ │ │ -
174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
│ │ │ │ -
175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch");
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
179 virtual ~P0VTKFunction() {}
│ │ │ │ -
180 };
│ │ │ │ -
│ │ │ │ -
181
│ │ │ │ -
183 //
│ │ │ │ -
184 // P1VTKFunction
│ │ │ │ -
185 //
│ │ │ │ -
186
│ │ │ │ -
188
│ │ │ │ -
202 template<typename GV, typename V>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
204 : public VTKFunction< GV >
│ │ │ │ -
205 {
│ │ │ │ -
207 typedef VTKFunction< GV > Base;
│ │ │ │ - │ │ │ │ -
210
│ │ │ │ -
212 const V& v;
│ │ │ │ -
214 std::string s;
│ │ │ │ -
216 int ncomps_;
│ │ │ │ -
219 int mycomp_;
│ │ │ │ -
221 VTK::Precision prec_;
│ │ │ │ -
223 Mapper mapper;
│ │ │ │ -
224
│ │ │ │ -
225 public:
│ │ │ │ -
226 typedef typename Base::Entity Entity;
│ │ │ │ -
227 typedef typename Base::ctype ctype;
│ │ │ │ -
228 using Base::dim;
│ │ │ │ -
229
│ │ │ │ -
│ │ │ │ -
231 int ncomps () const override
│ │ │ │ -
232 {
│ │ │ │ -
233 return 1;
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ -
235
│ │ │ │ -
│ │ │ │ -
237 double evaluate ([[maybe_unused]] int comp, const Entity& e,
│ │ │ │ -
238 const Dune::FieldVector<ctype,dim>& xi) const override
│ │ │ │ -
239 {
│ │ │ │ -
240 const unsigned int myDim = Entity::mydimension;
│ │ │ │ -
241 const unsigned int nVertices = e.subEntities(dim);
│ │ │ │ -
242
│ │ │ │ -
243 std::vector<FieldVector<ctype,1> > cornerValues(nVertices);
│ │ │ │ -
244 for (unsigned i=0; i<nVertices; ++i)
│ │ │ │ -
245 cornerValues[i] = v[mapper.subIndex(e,i,myDim)*ncomps_+mycomp_];
│ │ │ │ -
246
│ │ │ │ -
247 // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars
│ │ │ │ -
248 const MultiLinearGeometry<ctype,dim,1> interpolation(e.type(), cornerValues);
│ │ │ │ -
249 return interpolation.global(xi);
│ │ │ │ -
250 }
│ │ │ │ -
│ │ │ │ -
251
│ │ │ │ -
│ │ │ │ -
253 std::string name () const override
│ │ │ │ -
254 {
│ │ │ │ -
255 return s;
│ │ │ │ -
256 }
│ │ │ │ -
│ │ │ │ -
257
│ │ │ │ -
│ │ │ │ -
259 VTK::Precision precision() const override
│ │ │ │ -
260 {
│ │ │ │ -
261 return prec_;
│ │ │ │ -
262 }
│ │ │ │ -
│ │ │ │ -
263
│ │ │ │ -
265
│ │ │ │ -
│ │ │ │ -
282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,
│ │ │ │ -
283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
│ │ │ │ -
284 : v( v_ ),
│ │ │ │ -
285 s( s_ ),
│ │ │ │ -
286 ncomps_(ncomps),
│ │ │ │ -
287 mycomp_(mycomp),
│ │ │ │ -
288 prec_(prec),
│ │ │ │ -
289 mapper( gv, mcmgVertexLayout() )
│ │ │ │ -
290 {
│ │ │ │ -
291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
│ │ │ │ -
292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch");
│ │ │ │ -
293 }
│ │ │ │ -
│ │ │ │ -
294
│ │ │ │ -
296 virtual ~P1VTKFunction() {}
│ │ │ │ -
297 };
│ │ │ │ +
│ │ │ │ +
151 inline GeometryType geometryType(const Dune::GeometryType& t)
│ │ │ │ +
152 {
│ │ │ │ +
153 if (t.isVertex()) return vertex;
│ │ │ │ +
154 if (t.isLine()) return line;
│ │ │ │ +
155 if (t.isTriangle()) return triangle;
│ │ │ │ +
156 if (t.isQuadrilateral()) return quadrilateral;
│ │ │ │ +
157 if (t.isTetrahedron()) return tetrahedron;
│ │ │ │ +
158 if (t.isPyramid()) return pyramid;
│ │ │ │ +
159 if (t.isPrism()) return prism;
│ │ │ │ +
160 if (t.isHexahedron()) return hexahedron;
│ │ │ │ +
161
│ │ │ │ +
162 if (t.isNone() )
│ │ │ │ +
163 {
│ │ │ │ +
164 if( t.dim() == 2 ) return polygon;
│ │ │ │ +
165 if( t.dim() == 3 ) return polyhedron;
│ │ │ │ +
166 }
│ │ │ │ +
167
│ │ │ │ +
168 DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t);
│ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │ +
170
│ │ │ │ +
172 //
│ │ │ │ +
173 // Functions for transforming the index of a corner inside an entity
│ │ │ │ +
174 // between Dune and VTK
│ │ │ │ +
175 //
│ │ │ │ +
176
│ │ │ │ +
178
│ │ │ │ +
│ │ │ │ +
186 inline int renumber(const Dune::GeometryType &t, int i)
│ │ │ │ +
187 {
│ │ │ │ +
188 static const int quadRenumbering[4] = {0,1,3,2};
│ │ │ │ +
189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6};
│ │ │ │ +
190 static const int prismRenumbering[6] = {0,2,1,3,5,4};
│ │ │ │ +
191 static const int pyramidRenumbering[5] = {0,1,3,2,4};
│ │ │ │ +
192
│ │ │ │ +
193 if (t.isQuadrilateral()) return quadRenumbering[i];
│ │ │ │ +
194 if (t.isPyramid()) return pyramidRenumbering[i];
│ │ │ │ +
195 if (t.isPrism()) return prismRenumbering[i];
│ │ │ │ +
196 if (t.isHexahedron()) return cubeRenumbering[i];
│ │ │ │ +
197
│ │ │ │ +
198 return i;
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
202
│ │ │ │ +
216 template<typename T>
│ │ │ │ +
│ │ │ │ +
217 int renumber(const T& t, int i)
│ │ │ │ +
218 {
│ │ │ │ +
219 return renumber(t.type(), i);
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221
│ │ │ │ +
223 //
│ │ │ │ +
224 // Determine Endianness
│ │ │ │ +
225 //
│ │ │ │ +
226
│ │ │ │ +
228
│ │ │ │ +
│ │ │ │ +
232 inline std::string getEndiannessString()
│ │ │ │ +
233 {
│ │ │ │ +
234 short i = 1;
│ │ │ │ +
235 if (reinterpret_cast<char*>(&i)[1] == 1)
│ │ │ │ +
236 return "BigEndian";
│ │ │ │ +
237 else
│ │ │ │ +
238 return "LittleEndian";
│ │ │ │ +
239 }
│ │ │ │ +
│ │ │ │ +
240
│ │ │ │ +
242 //
│ │ │ │ +
243 // which type of vtkfile to write
│ │ │ │ +
244 //
│ │ │ │ +
245
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ +
252 enum FileType {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
257 };
│ │ │ │ +
│ │ │ │ +
258
│ │ │ │ +
259
│ │ │ │ +
261 //
│ │ │ │ +
262 // which precision to use when writing out data
│ │ │ │ +
263 //
│ │ │ │ +
264
│ │ │ │ +
266
│ │ │ │ +
│ │ │ │ +
271 enum class Precision {
│ │ │ │ +
272 int32,
│ │ │ │ +
273 uint8,
│ │ │ │ +
274 uint32,
│ │ │ │ +
275 float32,
│ │ │ │ +
276 float64
│ │ │ │ +
277 };
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
│ │ │ │ +
280 inline std::string toString(Precision p)
│ │ │ │ +
281 {
│ │ │ │ +
282 switch(p)
│ │ │ │ +
283 {
│ │ │ │ + │ │ │ │ +
285 return "Float32";
│ │ │ │ + │ │ │ │ +
287 return "Float64";
│ │ │ │ + │ │ │ │ +
289 return "UInt32";
│ │ │ │ +
290 case Precision::uint8:
│ │ │ │ +
291 return "UInt8";
│ │ │ │ +
292 case Precision::int32:
│ │ │ │ +
293 return "Int32";
│ │ │ │ +
294 default:
│ │ │ │ +
295 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
│ │ │ │ +
296 }
│ │ │ │ +
297 }
│ │ │ │
│ │ │ │
298
│ │ │ │ -
300
│ │ │ │ -
301} // namespace Dune
│ │ │ │ -
302
│ │ │ │ -
303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:148
│ │ │ │ -
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:145
│ │ │ │ -
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │ -
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │ +
│ │ │ │ +
300 inline std::size_t typeSize(Precision p)
│ │ │ │ +
301 {
│ │ │ │ +
302 switch(p)
│ │ │ │ +
303 {
│ │ │ │ + │ │ │ │ +
305 return sizeof(float);
│ │ │ │ + │ │ │ │ +
307 return sizeof(double);
│ │ │ │ + │ │ │ │ +
309 return sizeof(std::uint32_t);
│ │ │ │ +
310 case Precision::uint8:
│ │ │ │ +
311 return sizeof(std::uint8_t);
│ │ │ │ +
312 case Precision::int32:
│ │ │ │ +
313 return sizeof(std::int32_t);
│ │ │ │ +
314 default:
│ │ │ │ +
315 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
│ │ │ │ +
316 }
│ │ │ │ +
317 }
│ │ │ │ +
│ │ │ │ +
318
│ │ │ │ +
320
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
328 {
│ │ │ │ +
329
│ │ │ │ +
330 public:
│ │ │ │ +
331
│ │ │ │ +
│ │ │ │ +
333 enum class Type {
│ │ │ │ +
336 scalar,
│ │ │ │ +
338 vector,
│ │ │ │ +
340 tensor
│ │ │ │ +
341 };
│ │ │ │ +
│ │ │ │ +
342
│ │ │ │ +
│ │ │ │ +
344 FieldInfo(std::string name, Type type, std::size_t size, Precision prec = Precision::float32)
│ │ │ │ +
345 : _name(name)
│ │ │ │ +
346 , _type(type)
│ │ │ │ +
347 , _size(size)
│ │ │ │ +
348 , _prec(prec)
│ │ │ │ +
349 {}
│ │ │ │ +
│ │ │ │ +
350
│ │ │ │ +
│ │ │ │ +
352 std::string name() const
│ │ │ │ +
353 {
│ │ │ │ +
354 return _name;
│ │ │ │ +
355 }
│ │ │ │ +
│ │ │ │ +
356
│ │ │ │ +
│ │ │ │ +
358 Type type() const
│ │ │ │ +
359 {
│ │ │ │ +
360 return _type;
│ │ │ │ +
361 }
│ │ │ │ +
│ │ │ │ +
362
│ │ │ │ +
│ │ │ │ +
364 std::size_t size() const
│ │ │ │ +
365 {
│ │ │ │ +
366 return _size;
│ │ │ │ +
367 }
│ │ │ │ +
│ │ │ │ +
368
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
371 {
│ │ │ │ +
372 return _prec;
│ │ │ │ +
373 }
│ │ │ │ +
│ │ │ │ +
374
│ │ │ │ +
375 private:
│ │ │ │ +
376
│ │ │ │ +
377 std::string _name;
│ │ │ │ +
378 Type _type;
│ │ │ │ +
379 std::size_t _size;
│ │ │ │ +
380 Precision _prec;
│ │ │ │ +
381
│ │ │ │ +
382 };
│ │ │ │ +
│ │ │ │ +
383
│ │ │ │ +
384
│ │ │ │ +
385 } // namespace VTK
│ │ │ │ +
386
│ │ │ │ +
388
│ │ │ │ +
389} // namespace Dune
│ │ │ │ +
390
│ │ │ │ +
391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ -
static constexpr int mydimension
Dimensionality of the reference element of the entity.
Definition common/entity.hh:112
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:118
│ │ │ │ -
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ -
size_type size() const
Return total number of entities in the entity set managed by the mapper.
Definition mcmgmapper.hh:204
│ │ │ │ -
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to starting index in array for dof block.
Definition mcmgmapper.hh:185
│ │ │ │ -
Index index(const EntityType &e) const
Map entity to starting index in array for dof block.
Definition mcmgmapper.hh:171
│ │ │ │ -
A base class for grid functions with any return type and dimension.
Definition function.hh:42
│ │ │ │ -
virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const =0
evaluate single component comp in the entity e at local coordinates xi
│ │ │ │ -
GridView::ctype ctype
Definition function.hh:44
│ │ │ │ -
GridView::template Codim< 0 >::Entity Entity
Definition function.hh:46
│ │ │ │ -
static constexpr int dim
Definition function.hh:45
│ │ │ │ -
virtual std::string name() const =0
get name
│ │ │ │ -
virtual VTK::Precision precision() const
get output precision for the field
Definition function.hh:67
│ │ │ │ -
virtual int ncomps() const =0
│ │ │ │ -
virtual ~VTKFunction()
virtual destructor
Definition function.hh:71
│ │ │ │ -
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
│ │ │ │ -
std::string name() const override
get name
Definition function.hh:136
│ │ │ │ -
Base::ctype ctype
Definition function.hh:119
│ │ │ │ -
double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) const override
evaluate
Definition function.hh:129
│ │ │ │ -
P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
construct from a vector and a name
Definition function.hh:165
│ │ │ │ -
VTK::Precision precision() const override
get output precision for the field
Definition function.hh:142
│ │ │ │ -
Base::Entity Entity
Definition function.hh:118
│ │ │ │ -
virtual ~P0VTKFunction()
destructor
Definition function.hh:179
│ │ │ │ -
int ncomps() const override
return number of components
Definition function.hh:123
│ │ │ │ -
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
│ │ │ │ -
std::string name() const override
get name
Definition function.hh:253
│ │ │ │ -
virtual ~P1VTKFunction()
destructor
Definition function.hh:296
│ │ │ │ -
Base::Entity Entity
Definition function.hh:226
│ │ │ │ -
Base::ctype ctype
Definition function.hh:227
│ │ │ │ -
VTK::Precision precision() const override
get output precision for the field
Definition function.hh:259
│ │ │ │ -
double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const override
evaluate
Definition function.hh:237
│ │ │ │ -
P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
construct from a vector and a name
Definition function.hh:282
│ │ │ │ -
int ncomps() const override
return number of components
Definition function.hh:231
│ │ │ │ + │ │ │ │ +
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ │ +
@ ascii
Output to the file is in ascii.
Definition common.hh:45
│ │ │ │ +
@ appendedraw
Output is to the file is appended raw binary.
Definition common.hh:49
│ │ │ │ +
@ appendedbase64
Output is to the file is appended base64 binary.
Definition common.hh:51
│ │ │ │ +
@ base64
Output to the file is inline base64 binary.
Definition common.hh:47
│ │ │ │ +
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
│ │ │ │ +
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ │ +
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ │ +
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ │ +
std::string toString(Precision p)
map precision to VTK type name
Definition common.hh:280
│ │ │ │ +
DataMode
Whether to produce conforming or non-conforming output.
Definition common.hh:67
│ │ │ │ +
@ conforming
Output conforming data.
Definition common.hh:73
│ │ │ │ +
@ nonconforming
Output non-conforming data.
Definition common.hh:81
│ │ │ │ +
std::size_t typeSize(Precision p)
map precision to byte size
Definition common.hh:300
│ │ │ │ +
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ +
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ │ +
GeometryType
Type representing VTK's entity geometry types.
Definition common.hh:132
│ │ │ │ +
@ line
Definition common.hh:134
│ │ │ │ +
@ pyramid
Definition common.hh:141
│ │ │ │ +
@ polyhedron
Definition common.hh:142
│ │ │ │ +
@ quadrilateral
Definition common.hh:137
│ │ │ │ +
@ vertex
Definition common.hh:133
│ │ │ │ +
@ tetrahedron
Definition common.hh:138
│ │ │ │ +
@ prism
Definition common.hh:140
│ │ │ │ +
@ hexahedron
Definition common.hh:139
│ │ │ │ +
@ triangle
Definition common.hh:135
│ │ │ │ +
@ polygon
Definition common.hh:136
│ │ │ │ +
determine a type to safely put another type into a stream
Definition common.hh:95
│ │ │ │ +
T Type
type to convert T to before putting it into a stream with <<
Definition common.hh:97
│ │ │ │ +
unsigned Type
Definition common.hh:102
│ │ │ │ +
int Type
Definition common.hh:107
│ │ │ │ +
std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type Type
Definition common.hh:114
│ │ │ │ +
Descriptor struct for VTK fields.
Definition common.hh:328
│ │ │ │ +
std::size_t size() const
The number of components in the data field.
Definition common.hh:364
│ │ │ │ +
Precision precision() const
The precision used for the output of the data field.
Definition common.hh:370
│ │ │ │ +
Type
VTK data type.
Definition common.hh:333
│ │ │ │ +
@ tensor
tensor field (always 3x3)
│ │ │ │ +
@ vector
vector-valued field (always 3D, will be padded if necessary)
│ │ │ │ + │ │ │ │ +
FieldInfo(std::string name, Type type, std::size_t size, Precision prec=Precision::float32)
Create a FieldInfo instance with the given name, type and size.
Definition common.hh:344
│ │ │ │ +
Type type() const
The type of the data field.
Definition common.hh:358
│ │ │ │ +
std::string name() const
The name of the data field.
Definition common.hh:352
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,352 +3,451 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ * _v_t_k │ │ │ │ │ -function.hh │ │ │ │ │ +common.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH │ │ │ │ │ 8 │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ 17 │ │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -26namespace _D_u_n_e │ │ │ │ │ -27{ │ │ │ │ │ -30 │ │ │ │ │ -32 // │ │ │ │ │ -33 // Base VTKFunction │ │ │ │ │ -34 // │ │ │ │ │ -35 │ │ │ │ │ -40 template< class GridView > │ │ │ │ │ -_4_1 class _V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -42 { │ │ │ │ │ -43 public: │ │ │ │ │ -_4_4 typedef typename _G_r_i_d_V_i_e_w_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -_4_5 constexpr static int _d_i_m = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -_4_6 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity _E_n_t_i_t_y; │ │ │ │ │ -47 │ │ │ │ │ -_5_0 virtual int _n_c_o_m_p_s () const = 0; │ │ │ │ │ -51 │ │ │ │ │ -53 │ │ │ │ │ -_6_0 virtual double _e_v_a_l_u_a_t_e (int comp, const _E_n_t_i_t_y& e, │ │ │ │ │ -61 const Dune::FieldVector& xi) const = 0; │ │ │ │ │ -62 │ │ │ │ │ -_6_4 virtual std::string _n_a_m_e () const = 0; │ │ │ │ │ -65 │ │ │ │ │ -_6_7 virtual _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const │ │ │ │ │ -68 { return _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2; } │ │ │ │ │ +25namespace _D_u_n_e │ │ │ │ │ +26{ │ │ │ │ │ +29 │ │ │ │ │ +30 namespace VTK { │ │ │ │ │ +31 │ │ │ │ │ +33 // │ │ │ │ │ +34 // VTKOptions │ │ │ │ │ +35 // │ │ │ │ │ +36 │ │ │ │ │ +38 │ │ │ │ │ +_4_3 enum _O_u_t_p_u_t_T_y_p_e { │ │ │ │ │ +_4_5 _a_s_c_i_i, │ │ │ │ │ +_4_7 _b_a_s_e_6_4, │ │ │ │ │ +_4_9 _a_p_p_e_n_d_e_d_r_a_w, │ │ │ │ │ +51 _a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ +52 // //! Output to the file is compressed inline binary. │ │ │ │ │ +53 // binarycompressed, │ │ │ │ │ +54 // //! Output is compressed and appended to the file. │ │ │ │ │ +55 // compressedappended │ │ │ │ │ +_5_6 }; │ │ │ │ │ +58 │ │ │ │ │ +_6_7 enum _D_a_t_a_M_o_d_e { │ │ │ │ │ 69 │ │ │ │ │ -_7_1 virtual _~_V_T_K_F_u_n_c_t_i_o_n () {} │ │ │ │ │ -72 }; │ │ │ │ │ -73 │ │ │ │ │ -75 // │ │ │ │ │ -76 // P0VTKFunction │ │ │ │ │ -77 // │ │ │ │ │ -78 │ │ │ │ │ -80 │ │ │ │ │ -94 template │ │ │ │ │ -_9_5 class _P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -96 : public _V_T_K_F_u_n_c_t_i_o_n< GV > │ │ │ │ │ -97 { │ │ │ │ │ -99 typedef _V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _B_a_s_e; │ │ │ │ │ -101 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ │ -102 │ │ │ │ │ -104 const V& v; │ │ │ │ │ -106 std::string s; │ │ │ │ │ -108 int ncomps_; │ │ │ │ │ -111 int mycomp_; │ │ │ │ │ -113 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec_; │ │ │ │ │ -115 _M_a_p_p_e_r mapper; │ │ │ │ │ +_7_3 _c_o_n_f_o_r_m_i_n_g, │ │ │ │ │ +75 │ │ │ │ │ +81 _n_o_n_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +_8_2 }; │ │ │ │ │ +83 │ │ │ │ │ +85 // │ │ │ │ │ +86 // PrintType │ │ │ │ │ +87 // │ │ │ │ │ +88 │ │ │ │ │ +90 │ │ │ │ │ +94 template │ │ │ │ │ +_9_5 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ +_9_7 typedef T _T_y_p_e; │ │ │ │ │ +98 }; │ │ │ │ │ +99 │ │ │ │ │ +100 template<> │ │ │ │ │ +_1_0_1 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ +_1_0_2 typedef unsigned _T_y_p_e; │ │ │ │ │ +103 }; │ │ │ │ │ +104 │ │ │ │ │ +105 template<> │ │ │ │ │ +_1_0_6 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ +_1_0_7 typedef int _T_y_p_e; │ │ │ │ │ +108 }; │ │ │ │ │ +109 │ │ │ │ │ +110 template<> │ │ │ │ │ +_1_1_1 struct _P_r_i_n_t_T_y_p_e { │ │ │ │ │ +112 typedef std::conditional::is_signed, │ │ │ │ │ +113 int, unsigned>::type │ │ │ │ │ +_1_1_4 _T_y_p_e; │ │ │ │ │ +115 }; │ │ │ │ │ 116 │ │ │ │ │ -117 public: │ │ │ │ │ -_1_1_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_1_1_9 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -120 using _B_a_s_e_:_:_d_i_m; │ │ │ │ │ +118 // │ │ │ │ │ +119 // VTK::GeometryType related stuff │ │ │ │ │ +120 // │ │ │ │ │ 121 │ │ │ │ │ -_1_2_3 int _n_c_o_m_p_s () const override │ │ │ │ │ -124 { │ │ │ │ │ -125 return 1; │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_9 double _e_v_a_l_u_a_t_e (int, const _E_n_t_i_t_y& e, │ │ │ │ │ -130 const Dune::FieldVector&) const override │ │ │ │ │ -131 { │ │ │ │ │ -132 return v[mapper._i_n_d_e_x(e)*ncomps_+mycomp_]; │ │ │ │ │ -133 } │ │ │ │ │ -134 │ │ │ │ │ -_1_3_6 std::string _n_a_m_e () const override │ │ │ │ │ -137 { │ │ │ │ │ -138 return s; │ │ │ │ │ -139 } │ │ │ │ │ -140 │ │ │ │ │ -_1_4_2 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const override │ │ │ │ │ -143 { │ │ │ │ │ -144 return prec_; │ │ │ │ │ -145 } │ │ │ │ │ +123 │ │ │ │ │ +_1_3_2 enum _G_e_o_m_e_t_r_y_T_y_p_e { │ │ │ │ │ +_1_3_3 _v_e_r_t_e_x = 1, │ │ │ │ │ +_1_3_4 _l_i_n_e = 3, │ │ │ │ │ +_1_3_5 _t_r_i_a_n_g_l_e = 5, │ │ │ │ │ +_1_3_6 _p_o_l_y_g_o_n = 7, │ │ │ │ │ +_1_3_7 _q_u_a_d_r_i_l_a_t_e_r_a_l = 9, │ │ │ │ │ +_1_3_8 _t_e_t_r_a_h_e_d_r_o_n = 10, │ │ │ │ │ +_1_3_9 _h_e_x_a_h_e_d_r_o_n = 12, │ │ │ │ │ +_1_4_0 _p_r_i_s_m = 13, │ │ │ │ │ +_1_4_1 _p_y_r_a_m_i_d = 14, │ │ │ │ │ +142 _p_o_l_y_h_e_d_r_o_n = 42 │ │ │ │ │ +_1_4_3 }; │ │ │ │ │ +144 │ │ │ │ │ 146 │ │ │ │ │ -148 │ │ │ │ │ -_1_6_5 _P_0_V_T_K_F_u_n_c_t_i_o_n(const GV &gv, const V &v_, const std::string &s_, │ │ │ │ │ -166 int _n_c_o_m_p_s=1, int mycomp=0, _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -167 : v( v_ ), │ │ │ │ │ -168 s( s_ ), │ │ │ │ │ -169 ncomps_(_n_c_o_m_p_s), │ │ │ │ │ -170 mycomp_(mycomp), │ │ │ │ │ -171 prec_(prec), │ │ │ │ │ -172 mapper( gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t() ) │ │ │ │ │ -173 { │ │ │ │ │ -174 if (v.size()!=(unsigned int)(mapper._s_i_z_e()*ncomps_)) │ │ │ │ │ -175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch"); │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 virtual _~_P_0_V_T_K_F_u_n_c_t_i_o_n() {} │ │ │ │ │ -180 }; │ │ │ │ │ -181 │ │ │ │ │ -183 // │ │ │ │ │ -184 // P1VTKFunction │ │ │ │ │ -185 // │ │ │ │ │ -186 │ │ │ │ │ -188 │ │ │ │ │ -202 template │ │ │ │ │ -_2_0_3 class _P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -204 : public _V_T_K_F_u_n_c_t_i_o_n< GV > │ │ │ │ │ -205 { │ │ │ │ │ -207 typedef _V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _B_a_s_e; │ │ │ │ │ -209 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ │ -210 │ │ │ │ │ -212 const V& v; │ │ │ │ │ -214 std::string s; │ │ │ │ │ -216 int ncomps_; │ │ │ │ │ -219 int mycomp_; │ │ │ │ │ -221 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec_; │ │ │ │ │ -223 _M_a_p_p_e_r mapper; │ │ │ │ │ -224 │ │ │ │ │ -225 public: │ │ │ │ │ -_2_2_6 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_2_2_7 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -228 using _B_a_s_e_:_:_d_i_m; │ │ │ │ │ -229 │ │ │ │ │ -_2_3_1 int _n_c_o_m_p_s () const override │ │ │ │ │ -232 { │ │ │ │ │ -233 return 1; │ │ │ │ │ -234 } │ │ │ │ │ -235 │ │ │ │ │ -_2_3_7 double _e_v_a_l_u_a_t_e ([[maybe_unused]] int comp, const _E_n_t_i_t_y& e, │ │ │ │ │ -238 const Dune::FieldVector& xi) const override │ │ │ │ │ -239 { │ │ │ │ │ -240 const unsigned int myDim = _E_n_t_i_t_y_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -241 const unsigned int nVertices = e.subEntities(_d_i_m); │ │ │ │ │ -242 │ │ │ │ │ -243 std::vector > cornerValues(nVertices); │ │ │ │ │ -244 for (unsigned i=0; i interpolation(e.type(), │ │ │ │ │ -cornerValues); │ │ │ │ │ -249 return interpolation.global(xi); │ │ │ │ │ -250 } │ │ │ │ │ -251 │ │ │ │ │ -_2_5_3 std::string _n_a_m_e () const override │ │ │ │ │ -254 { │ │ │ │ │ -255 return s; │ │ │ │ │ -256 } │ │ │ │ │ -257 │ │ │ │ │ -_2_5_9 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const override │ │ │ │ │ -260 { │ │ │ │ │ -261 return prec_; │ │ │ │ │ -262 } │ │ │ │ │ -263 │ │ │ │ │ -265 │ │ │ │ │ -_2_8_2 _P_1_V_T_K_F_u_n_c_t_i_o_n(const GV& gv, const V &v_, const std::string &s_, │ │ │ │ │ -283 int _n_c_o_m_p_s=1, int mycomp=0, _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -284 : v( v_ ), │ │ │ │ │ -285 s( s_ ), │ │ │ │ │ -286 ncomps_(_n_c_o_m_p_s), │ │ │ │ │ -287 mycomp_(mycomp), │ │ │ │ │ -288 prec_(prec), │ │ │ │ │ -289 mapper( gv, _m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t() ) │ │ │ │ │ -290 { │ │ │ │ │ -291 if (v.size()!=(unsigned int)(mapper._s_i_z_e()*ncomps_)) │ │ │ │ │ -292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch"); │ │ │ │ │ -293 } │ │ │ │ │ -294 │ │ │ │ │ -_2_9_6 virtual _~_P_1_V_T_K_F_u_n_c_t_i_o_n() {} │ │ │ │ │ -297 }; │ │ │ │ │ +_1_5_1 inline _G_e_o_m_e_t_r_y_T_y_p_e _g_e_o_m_e_t_r_y_T_y_p_e(const Dune::GeometryType& t) │ │ │ │ │ +152 { │ │ │ │ │ +153 if (t.isVertex()) return _v_e_r_t_e_x; │ │ │ │ │ +154 if (t.isLine()) return _l_i_n_e; │ │ │ │ │ +155 if (t.isTriangle()) return _t_r_i_a_n_g_l_e; │ │ │ │ │ +156 if (t.isQuadrilateral()) return _q_u_a_d_r_i_l_a_t_e_r_a_l; │ │ │ │ │ +157 if (t.isTetrahedron()) return _t_e_t_r_a_h_e_d_r_o_n; │ │ │ │ │ +158 if (t.isPyramid()) return _p_y_r_a_m_i_d; │ │ │ │ │ +159 if (t.isPrism()) return _p_r_i_s_m; │ │ │ │ │ +160 if (t.isHexahedron()) return _h_e_x_a_h_e_d_r_o_n; │ │ │ │ │ +161 │ │ │ │ │ +162 if (t.isNone() ) │ │ │ │ │ +163 { │ │ │ │ │ +164 if( t.dim() == 2 ) return _p_o_l_y_g_o_n; │ │ │ │ │ +165 if( t.dim() == 3 ) return _p_o_l_y_h_e_d_r_o_n; │ │ │ │ │ +166 } │ │ │ │ │ +167 │ │ │ │ │ +168 DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t); │ │ │ │ │ +169 } │ │ │ │ │ +170 │ │ │ │ │ +172 // │ │ │ │ │ +173 // Functions for transforming the index of a corner inside an entity │ │ │ │ │ +174 // between Dune and VTK │ │ │ │ │ +175 // │ │ │ │ │ +176 │ │ │ │ │ +178 │ │ │ │ │ +_1_8_6 inline int _r_e_n_u_m_b_e_r(const Dune::GeometryType &t, int i) │ │ │ │ │ +187 { │ │ │ │ │ +188 static const int quadRenumbering[4] = {0,1,3,2}; │ │ │ │ │ +189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6}; │ │ │ │ │ +190 static const int prismRenumbering[6] = {0,2,1,3,5,4}; │ │ │ │ │ +191 static const int pyramidRenumbering[5] = {0,1,3,2,4}; │ │ │ │ │ +192 │ │ │ │ │ +193 if (t.isQuadrilateral()) return quadRenumbering[i]; │ │ │ │ │ +194 if (t.isPyramid()) return pyramidRenumbering[i]; │ │ │ │ │ +195 if (t.isPrism()) return prismRenumbering[i]; │ │ │ │ │ +196 if (t.isHexahedron()) return cubeRenumbering[i]; │ │ │ │ │ +197 │ │ │ │ │ +198 return i; │ │ │ │ │ +199 } │ │ │ │ │ +200 │ │ │ │ │ +202 │ │ │ │ │ +216 template │ │ │ │ │ +_2_1_7 int _r_e_n_u_m_b_e_r(const T& t, int i) │ │ │ │ │ +218 { │ │ │ │ │ +219 return _r_e_n_u_m_b_e_r(t.type(), i); │ │ │ │ │ +220 } │ │ │ │ │ +221 │ │ │ │ │ +223 // │ │ │ │ │ +224 // Determine Endianness │ │ │ │ │ +225 // │ │ │ │ │ +226 │ │ │ │ │ +228 │ │ │ │ │ +_2_3_2 inline std::string _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g() │ │ │ │ │ +233 { │ │ │ │ │ +234 short i = 1; │ │ │ │ │ +235 if (reinterpret_cast(&i)[1] == 1) │ │ │ │ │ +236 return "BigEndian"; │ │ │ │ │ +237 else │ │ │ │ │ +238 return "LittleEndian"; │ │ │ │ │ +239 } │ │ │ │ │ +240 │ │ │ │ │ +242 // │ │ │ │ │ +243 // which type of vtkfile to write │ │ │ │ │ +244 // │ │ │ │ │ +245 │ │ │ │ │ +247 │ │ │ │ │ +_2_5_2 enum _F_i_l_e_T_y_p_e { │ │ │ │ │ +_2_5_4 _p_o_l_y_D_a_t_a, │ │ │ │ │ +256 _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ +_2_5_7 }; │ │ │ │ │ +258 │ │ │ │ │ +259 │ │ │ │ │ +261 // │ │ │ │ │ +262 // which precision to use when writing out data │ │ │ │ │ +263 // │ │ │ │ │ +264 │ │ │ │ │ +266 │ │ │ │ │ +_2_7_1 enum class _P_r_e_c_i_s_i_o_n { │ │ │ │ │ +272 _i_n_t_3_2, │ │ │ │ │ +273 _u_i_n_t_8, │ │ │ │ │ +274 _u_i_n_t_3_2, │ │ │ │ │ +275 _f_l_o_a_t_3_2, │ │ │ │ │ +276 _f_l_o_a_t_6_4 │ │ │ │ │ +277 }; │ │ │ │ │ +278 │ │ │ │ │ +_2_8_0 inline std::string _t_o_S_t_r_i_n_g(_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ +281 { │ │ │ │ │ +282 switch(p) │ │ │ │ │ +283 { │ │ │ │ │ +284 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2: │ │ │ │ │ +285 return "Float32"; │ │ │ │ │ +286 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4: │ │ │ │ │ +287 return "Float64"; │ │ │ │ │ +288 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2: │ │ │ │ │ +289 return "UInt32"; │ │ │ │ │ +290 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8: │ │ │ │ │ +291 return "UInt8"; │ │ │ │ │ +292 case _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2: │ │ │ │ │ +293 return "Int32"; │ │ │ │ │ +294 default: │ │ │ │ │ +295 DUNE_THROW(Dune::NotImplemented, "Unknown precision type"); │ │ │ │ │ +296 } │ │ │ │ │ +297 } │ │ │ │ │ 298 │ │ │ │ │ -300 │ │ │ │ │ -301} // namespace Dune │ │ │ │ │ -302 │ │ │ │ │ -303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ │ -_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ -Mapper for multiple codim and multiple geometry types. │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -The dimension of the grid. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_c_t_y_p_e │ │ │ │ │ -Grid::ctype ctype │ │ │ │ │ -type used for coordinates in grid │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:145 │ │ │ │ │ -_D_u_n_e_:_:_m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t │ │ │ │ │ -MCMGLayout mcmgElementLayout() │ │ │ │ │ -layout for elements (codim-0 entities) │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t │ │ │ │ │ -MCMGLayout mcmgVertexLayout() │ │ │ │ │ -layout for vertices (dim-0 entities) │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:107 │ │ │ │ │ +_3_0_0 inline std::size_t _t_y_p_e_S_i_z_e(_P_r_e_c_i_s_i_o_n p) │ │ │ │ │ +301 { │ │ │ │ │ +302 switch(p) │ │ │ │ │ +303 { │ │ │ │ │ +304 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2: │ │ │ │ │ +305 return sizeof(float); │ │ │ │ │ +306 case _P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4: │ │ │ │ │ +307 return sizeof(double); │ │ │ │ │ +308 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2: │ │ │ │ │ +309 return sizeof(std::uint32_t); │ │ │ │ │ +310 case _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8: │ │ │ │ │ +311 return sizeof(std::uint8_t); │ │ │ │ │ +312 case _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2: │ │ │ │ │ +313 return sizeof(std::int32_t); │ │ │ │ │ +314 default: │ │ │ │ │ +315 DUNE_THROW(Dune::NotImplemented, "Unknown precision type"); │ │ │ │ │ +316 } │ │ │ │ │ +317 } │ │ │ │ │ +318 │ │ │ │ │ +320 │ │ │ │ │ +_3_2_7 class _F_i_e_l_d_I_n_f_o │ │ │ │ │ +328 { │ │ │ │ │ +329 │ │ │ │ │ +330 public: │ │ │ │ │ +331 │ │ │ │ │ +_3_3_3 enum class _T_y_p_e { │ │ │ │ │ +336 _s_c_a_l_a_r, │ │ │ │ │ +338 _v_e_c_t_o_r, │ │ │ │ │ +340 _t_e_n_s_o_r │ │ │ │ │ +341 }; │ │ │ │ │ +342 │ │ │ │ │ +_3_4_4 _F_i_e_l_d_I_n_f_o(std::string _n_a_m_e, _T_y_p_e _t_y_p_e, std::size_t _s_i_z_e, _P_r_e_c_i_s_i_o_n prec = │ │ │ │ │ +_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ +345 : _name(_n_a_m_e) │ │ │ │ │ +346 , _type(_t_y_p_e) │ │ │ │ │ +347 , _size(_s_i_z_e) │ │ │ │ │ +348 , _prec(prec) │ │ │ │ │ +349 {} │ │ │ │ │ +350 │ │ │ │ │ +_3_5_2 std::string _n_a_m_e() const │ │ │ │ │ +353 { │ │ │ │ │ +354 return _name; │ │ │ │ │ +355 } │ │ │ │ │ +356 │ │ │ │ │ +_3_5_8 _T_y_p_e _t_y_p_e() const │ │ │ │ │ +359 { │ │ │ │ │ +360 return _type; │ │ │ │ │ +361 } │ │ │ │ │ +362 │ │ │ │ │ +_3_6_4 std::size_t _s_i_z_e() const │ │ │ │ │ +365 { │ │ │ │ │ +366 return _size; │ │ │ │ │ +367 } │ │ │ │ │ +368 │ │ │ │ │ +_3_7_0 _P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const │ │ │ │ │ +371 { │ │ │ │ │ +372 return _prec; │ │ │ │ │ +373 } │ │ │ │ │ +374 │ │ │ │ │ +375 private: │ │ │ │ │ +376 │ │ │ │ │ +377 std::string _name; │ │ │ │ │ +378 _T_y_p_e _type; │ │ │ │ │ +379 std::size_t _size; │ │ │ │ │ +380 _P_r_e_c_i_s_i_o_n _prec; │ │ │ │ │ +381 │ │ │ │ │ +382 }; │ │ │ │ │ +383 │ │ │ │ │ +384 │ │ │ │ │ +385 } // namespace VTK │ │ │ │ │ +386 │ │ │ │ │ +388 │ │ │ │ │ +389} // namespace Dune │ │ │ │ │ +390 │ │ │ │ │ +391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ _D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ Precision │ │ │ │ │ which precision to use when writing out data to vtk files │ │ │ │ │ DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ +@ int32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_3_2 │ │ │ │ │ +@ uint32 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ +@ uint8 │ │ │ │ │ _D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ @ float32 │ │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int mydimension │ │ │ │ │ -Dimensionality of the reference element of the entity. │ │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ │ -A struct that collects all associated types of one implementation from the │ │ │ │ │ -Traits class. │ │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ │ -Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_i_z_e │ │ │ │ │ -size_type size() const │ │ │ │ │ -Return total number of entities in the entity set managed by the mapper. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:204 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ │ -Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, │ │ │ │ │ -unsigned int codim) const │ │ │ │ │ -Map subentity of codim 0 entity to starting index in array for dof block. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:185 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ │ -Map entity to starting index in array for dof block. │ │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -A base class for grid functions with any return type and dimension. │ │ │ │ │ -DDeeffiinniittiioonn function.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< │ │ │ │ │ -ctype, dim > &xi) const =0 │ │ │ │ │ -evaluate single component comp in the entity e at local coordinates xi │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ -GridView::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn function.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ -GridView::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn function.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_d_i_m │ │ │ │ │ -static constexpr int dim │ │ │ │ │ -DDeeffiinniittiioonn function.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const =0 │ │ │ │ │ -get name │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ -virtual VTK::Precision precision() const │ │ │ │ │ -get output precision for the field │ │ │ │ │ -DDeeffiinniittiioonn function.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual int ncomps() const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_~_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -virtual ~VTKFunction() │ │ │ │ │ -virtual destructor │ │ │ │ │ -DDeeffiinniittiioonn function.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ │ -DDeeffiinniittiioonn function.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ -std::string name() const override │ │ │ │ │ -get name │ │ │ │ │ -DDeeffiinniittiioonn function.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ -Base::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn function.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) │ │ │ │ │ -const override │ │ │ │ │ -evaluate │ │ │ │ │ -DDeeffiinniittiioonn function.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, │ │ │ │ │ -int mycomp=0, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ -construct from a vector and a name │ │ │ │ │ -DDeeffiinniittiioonn function.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ -VTK::Precision precision() const override │ │ │ │ │ -get output precision for the field │ │ │ │ │ -DDeeffiinniittiioonn function.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn function.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_~_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -virtual ~P0VTKFunction() │ │ │ │ │ -destructor │ │ │ │ │ -DDeeffiinniittiioonn function.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ │ -int ncomps() const override │ │ │ │ │ -return number of components │ │ │ │ │ -DDeeffiinniittiioonn function.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ │ -DDeeffiinniittiioonn function.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ │ -std::string name() const override │ │ │ │ │ -get name │ │ │ │ │ -DDeeffiinniittiioonn function.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_~_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -virtual ~P1VTKFunction() │ │ │ │ │ -destructor │ │ │ │ │ -DDeeffiinniittiioonn function.hh:296 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn function.hh:226 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ -Base::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn function.hh:227 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ -VTK::Precision precision() const override │ │ │ │ │ -get output precision for the field │ │ │ │ │ -DDeeffiinniittiioonn function.hh:259 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim │ │ │ │ │ -> &xi) const override │ │ │ │ │ -evaluate │ │ │ │ │ -DDeeffiinniittiioonn function.hh:237 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ │ -P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, │ │ │ │ │ -int mycomp=0, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ -construct from a vector and a name │ │ │ │ │ -DDeeffiinniittiioonn function.hh:282 │ │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ │ -int ncomps() const override │ │ │ │ │ -return number of components │ │ │ │ │ -DDeeffiinniittiioonn function.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_6_4 │ │ │ │ │ +@ float64 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ │ +OutputType │ │ │ │ │ +How the bulk data should be stored in the file. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_s_c_i_i │ │ │ │ │ +@ ascii │ │ │ │ │ +Output to the file is in ascii. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_r_a_w │ │ │ │ │ +@ appendedraw │ │ │ │ │ +Output is to the file is appended raw binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_a_p_p_e_n_d_e_d_b_a_s_e_6_4 │ │ │ │ │ +@ appendedbase64 │ │ │ │ │ +Output is to the file is appended base64 binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_b_a_s_e_6_4 │ │ │ │ │ +@ base64 │ │ │ │ │ +Output to the file is inline base64 binary. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_r_e_n_u_m_b_e_r │ │ │ │ │ +int renumber(const Dune::GeometryType &t, int i) │ │ │ │ │ +renumber VTK <-> Dune │ │ │ │ │ +DDeeffiinniittiioonn common.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ │ +FileType │ │ │ │ │ +which type of VTK file to write │ │ │ │ │ +DDeeffiinniittiioonn common.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ │ +@ polyData │ │ │ │ │ +for .vtp files (PolyData) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:254 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ │ +@ unstructuredGrid │ │ │ │ │ +for .vtu files (UnstructuredGrid) │ │ │ │ │ +DDeeffiinniittiioonn common.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_o_S_t_r_i_n_g │ │ │ │ │ +std::string toString(Precision p) │ │ │ │ │ +map precision to VTK type name │ │ │ │ │ +DDeeffiinniittiioonn common.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_M_o_d_e │ │ │ │ │ +DataMode │ │ │ │ │ +Whether to produce conforming or non-conforming output. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +@ conforming │ │ │ │ │ +Output conforming data. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g │ │ │ │ │ +@ nonconforming │ │ │ │ │ +Output non-conforming data. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_y_p_e_S_i_z_e │ │ │ │ │ +std::size_t typeSize(Precision p) │ │ │ │ │ +map precision to byte size │ │ │ │ │ +DDeeffiinniittiioonn common.hh:300 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ +mapping from GeometryType to VTKGeometryType │ │ │ │ │ +DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ │ +std::string getEndiannessString() │ │ │ │ │ +determine endianness of this C++ implementation │ │ │ │ │ +DDeeffiinniittiioonn common.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ +GeometryType │ │ │ │ │ +Type representing VTK's entity geometry types. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_l_i_n_e │ │ │ │ │ +@ line │ │ │ │ │ +DDeeffiinniittiioonn common.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_y_r_a_m_i_d │ │ │ │ │ +@ pyramid │ │ │ │ │ +DDeeffiinniittiioonn common.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_h_e_d_r_o_n │ │ │ │ │ +@ polyhedron │ │ │ │ │ +DDeeffiinniittiioonn common.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l │ │ │ │ │ +@ quadrilateral │ │ │ │ │ +DDeeffiinniittiioonn common.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_v_e_r_t_e_x │ │ │ │ │ +@ vertex │ │ │ │ │ +DDeeffiinniittiioonn common.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_e_t_r_a_h_e_d_r_o_n │ │ │ │ │ +@ tetrahedron │ │ │ │ │ +DDeeffiinniittiioonn common.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_r_i_s_m │ │ │ │ │ +@ prism │ │ │ │ │ +DDeeffiinniittiioonn common.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_h_e_x_a_h_e_d_r_o_n │ │ │ │ │ +@ hexahedron │ │ │ │ │ +DDeeffiinniittiioonn common.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_t_r_i_a_n_g_l_e │ │ │ │ │ +@ triangle │ │ │ │ │ +DDeeffiinniittiioonn common.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_g_o_n │ │ │ │ │ +@ polygon │ │ │ │ │ +DDeeffiinniittiioonn common.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e │ │ │ │ │ +determine a type to safely put another type into a stream │ │ │ │ │ +DDeeffiinniittiioonn common.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_:_:_T_y_p_e │ │ │ │ │ +T Type │ │ │ │ │ +type to convert T to before putting it into a stream with << │ │ │ │ │ +DDeeffiinniittiioonn common.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_T_y_p_e │ │ │ │ │ +unsigned Type │ │ │ │ │ +DDeeffiinniittiioonn common.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _s_i_g_n_e_d_ _c_h_a_r_ _>_:_:_T_y_p_e │ │ │ │ │ +int Type │ │ │ │ │ +DDeeffiinniittiioonn common.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_P_r_i_n_t_T_y_p_e_<_ _c_h_a_r_ _>_:_:_T_y_p_e │ │ │ │ │ +std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type │ │ │ │ │ +Type │ │ │ │ │ +DDeeffiinniittiioonn common.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ +Descriptor struct for VTK fields. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:328 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +The number of components in the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:364 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ │ +Precision precision() const │ │ │ │ │ +The precision used for the output of the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:370 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +VTK data type. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:333 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r │ │ │ │ │ +@ tensor │ │ │ │ │ +tensor field (always 3x3) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r │ │ │ │ │ +@ vector │ │ │ │ │ +vector-valued field (always 3D, will be padded if necessary) │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r │ │ │ │ │ +@ scalar │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_F_i_e_l_d_I_n_f_o │ │ │ │ │ +FieldInfo(std::string name, Type type, std::size_t size, Precision │ │ │ │ │ +prec=Precision::float32) │ │ │ │ │ +Create a FieldInfo instance with the given name, type and size. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:344 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_t_y_p_e │ │ │ │ │ +Type type() const │ │ │ │ │ +The type of the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:358 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_n_a_m_e │ │ │ │ │ +std::string name() const │ │ │ │ │ +The name of the data field. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:352 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00926_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │┄ Files 22% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: functionwriter.hh Source File │ │ │ │ +dune-grid: coordfunction.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,479 +70,374 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
functionwriter.hh
│ │ │ │ +
coordfunction.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <memory>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <typeinfo>
│ │ │ │ -
13#include <vector>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ │ -
16#include <dune/common/fvector.hh>
│ │ │ │ -
17
│ │ │ │ -
18#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
19
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
5#ifndef DUNE_GEOGRID_COORDFUNCTION_HH
│ │ │ │ +
6#define DUNE_GEOGRID_COORDFUNCTION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ +
11#include <dune/common/std/type_traits.hh>
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 // Internal Forward Declarations
│ │ │ │ +
17 // -----------------------------
│ │ │ │ +
18
│ │ │ │ +
19 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ +
20 class AnalyticalCoordFunction;
│ │ │ │ +
21
│ │ │ │ +
22 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ +
23 class DiscreteCoordFunction;
│ │ │ │
24
│ │ │ │ -
25namespace Dune
│ │ │ │ -
26{
│ │ │ │ +
25
│ │ │ │ +
26
│ │ │ │ +
27 // AnalyticalCoordFunctionInterface
│ │ │ │ +
28 // --------------------------------
│ │ │ │
29
│ │ │ │ -
30 namespace VTK {
│ │ │ │ -
31
│ │ │ │ -
33 template<typename Cell_>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 typedef typename Cell_::Geometry::ctype DF;
│ │ │ │ -
36 static const unsigned mydim = Cell_::mydimension;
│ │ │ │ -
37 typedef ReferenceElements<DF, mydim> Refelems;
│ │ │ │ -
38
│ │ │ │ -
39 public:
│ │ │ │ -
40 typedef FieldVector<DF, mydim> Domain;
│ │ │ │ -
41 typedef Cell_ Cell;
│ │ │ │ -
42
│ │ │ │ -
44 virtual std::string name() const = 0;
│ │ │ │ -
45
│ │ │ │ -
47 virtual unsigned ncomps() const = 0;
│ │ │ │ +
42 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
44 {
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ +
47 friend class AnalyticalCoordFunction< ct, dimD, dimR, Impl >;
│ │ │ │
48
│ │ │ │ -
50 virtual void addArray(PVTUWriter& writer) = 0;
│ │ │ │ -
52 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) = 0;
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
59 virtual void write(const Cell& /* cell */, const Domain& /* xl */) {
│ │ │ │ -
60 DUNE_THROW(NotImplemented, "FunctionWriterBase::write(const Cell&, "
│ │ │ │ -
61 "const Domain&): Either the derived class " <<
│ │ │ │ -
62 typeid(*this).name() << " failed to implement this method "
│ │ │ │ -
63 "or this method is not meant to be called on the derived "
│ │ │ │ -
64 "class and was called in error.");
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
71 virtual void write(const Cell& cell, unsigned cornerIndex) {
│ │ │ │ -
72 write(cell,
│ │ │ │ -
73 Refelems::general(cell.type()).position(cornerIndex, mydim));
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
76 virtual void endWrite() = 0;
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
82 //
│ │ │ │ -
83 // A Generic Function writer for VTKFunctions
│ │ │ │ -
84 //
│ │ │ │ -
85
│ │ │ │ -
87 template<typename Func>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
89 : public FunctionWriterBase<typename Func::Entity>
│ │ │ │ -
90 {
│ │ │ │ - │ │ │ │ -
92 std::shared_ptr<const Func> func;
│ │ │ │ -
93 VTK::Precision precision_;
│ │ │ │ -
94 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
49 public:
│ │ │ │ +
50 typedef This Interface;
│ │ │ │ +
51 typedef Impl Implementation;
│ │ │ │ +
52
│ │ │ │ +
54 typedef ct ctype;
│ │ │ │ +
55
│ │ │ │ +
57 static const unsigned int dimDomain = dimD;
│ │ │ │ +
59 static const unsigned int dimRange = dimR;
│ │ │ │ +
60
│ │ │ │ +
62 typedef FieldVector< ctype, dimDomain > DomainVector;
│ │ │ │ +
64 typedef FieldVector< ctype, dimRange > RangeVector;
│ │ │ │ +
65
│ │ │ │ +
66 private:
│ │ │ │ + │ │ │ │ +
68 AnalyticalCoordFunctionInterface ( const This & ) = default;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
71 This &operator= ( const This & ) = default;
│ │ │ │ +
72 This &operator= ( This && ) = default;
│ │ │ │ +
73
│ │ │ │ +
74 // helper for picking the correct version of evaluate further down
│ │ │ │ +
75 template<typename F, typename DV>
│ │ │ │ +
76 using has_operator_parentheses = decltype(std::declval<F>()(std::declval<DV>()));
│ │ │ │ +
77
│ │ │ │ +
78 public:
│ │ │ │ +
79
│ │ │ │ +
80#ifdef DOXYGEN
│ │ │ │ +
81
│ │ │ │ +
83 void evaluate ( const DomainVector &x, RangeVector &y ) const;
│ │ │ │ +
84
│ │ │ │ +
85#else
│ │ │ │ +
86
│ │ │ │ +
87 template<typename DV>
│ │ │ │ +
88 std::enable_if_t<
│ │ │ │ +
89 Std::is_detected<has_operator_parentheses,Impl,DV>::value
│ │ │ │ +
90 >
│ │ │ │ +
91 evaluate ( const DV &x, RangeVector &y ) const
│ │ │ │ +
92 {
│ │ │ │ +
93 y = asImp()(x);
│ │ │ │ +
94 }
│ │ │ │
95
│ │ │ │ -
96 public:
│ │ │ │ -
│ │ │ │ -
97 VTKFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ │ - │ │ │ │ -
99 : func(func_), precision_(prec)
│ │ │ │ -
100 { }
│ │ │ │ -
│ │ │ │ -
101
│ │ │ │ -
103 virtual std::string name() const { return func->name(); }
│ │ │ │ -
104
│ │ │ │ -
│ │ │ │ -
106 virtual unsigned ncomps() const {
│ │ │ │ -
107 if(func->ncomps() == 2) return 3;
│ │ │ │ -
108 else return func->ncomps();
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ +
96 template<typename DV>
│ │ │ │ +
97 std::enable_if_t<
│ │ │ │ +
98 not Std::is_detected<has_operator_parentheses,Impl,DV>::value
│ │ │ │ +
99 >
│ │ │ │ +
100 evaluate ( const DV &x, RangeVector &y ) const
│ │ │ │ +
101 {
│ │ │ │ +
102 assert(
│ │ │ │ +
103 static_cast<void(This::*)(const DomainVector&, RangeVector&) const>(&This::evaluate) !=
│ │ │ │ +
104 static_cast<void(Impl::*)(const DomainVector&, RangeVector&) const>(&Impl::evaluate) &&
│ │ │ │ +
105 "You need to implement either operator() or evaluate() in your coordinate function!");
│ │ │ │ +
106 asImp().evaluate( x, y );
│ │ │ │ +
107 }
│ │ │ │ +
108
│ │ │ │ +
109#endif // DOXYGEN
│ │ │ │
110
│ │ │ │ -
│ │ │ │ -
112 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
113 writer.addArray(name(), ncomps(), precision_);
│ │ │ │ -
114 }
│ │ │ │ -
│ │ │ │ -
115
│ │ │ │ -
│ │ │ │ -
117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ -
119 nitems, precision_));
│ │ │ │ -
120 return !arraywriter->writeIsNoop();
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
122
│ │ │ │ -
│ │ │ │ -
124 virtual void write(const typename Base::Cell& cell,
│ │ │ │ -
125 const typename Base::Domain& xl) {
│ │ │ │ -
126 for(int d = 0; d < func->ncomps(); ++d)
│ │ │ │ -
127 arraywriter->write(func->evaluate(d, cell, xl));
│ │ │ │ -
128 for(unsigned d = func->ncomps(); d < ncomps(); ++d)
│ │ │ │ -
129 arraywriter->write(0);
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
│ │ │ │ -
133 virtual void endWrite() {
│ │ │ │ -
134 arraywriter.reset();
│ │ │ │ -
135 }
│ │ │ │ -
│ │ │ │ -
136 };
│ │ │ │ -
│ │ │ │ +
111 protected:
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ +
113 const Implementation &asImp () const
│ │ │ │ +
114 {
│ │ │ │ +
115 return static_cast< const Implementation & >( *this );
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
119 {
│ │ │ │ +
120 return static_cast< Implementation & >( *this );
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122 };
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
124
│ │ │ │ +
125
│ │ │ │ +
126 // AnalyticalCoordFunction
│ │ │ │ +
127 // -----------------------
│ │ │ │ +
131 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
133 : public AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >
│ │ │ │ +
134 {
│ │ │ │ + │ │ │ │ + │ │ │ │
137
│ │ │ │ -
139 //
│ │ │ │ -
140 // Writers for the grid information
│ │ │ │ -
141 //
│ │ │ │ -
142
│ │ │ │ -
144 template<typename Cell>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
146 : public FunctionWriterBase<Cell>
│ │ │ │ -
147 {
│ │ │ │ - │ │ │ │ +
138 public:
│ │ │ │ +
139 typedef typename Base :: DomainVector DomainVector;
│ │ │ │ +
140 typedef typename Base :: RangeVector RangeVector;
│ │ │ │ +
141
│ │ │ │ +
142 protected:
│ │ │ │ + │ │ │ │ +
144 AnalyticalCoordFunction ( const This & ) = default;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
147 This &operator= ( const This & ) = default;
│ │ │ │ +
148 This &operator= ( This && ) = default;
│ │ │ │
149
│ │ │ │ -
150 VTK::Precision precision_;
│ │ │ │ -
151 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ -
152
│ │ │ │ -
153 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
155 : precision_(prec)
│ │ │ │ -
156 {}
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
159 virtual std::string name() const { return "Coordinates"; }
│ │ │ │ -
160
│ │ │ │ -
162 virtual unsigned ncomps() const { return 3; }
│ │ │ │ -
163
│ │ │ │ -
│ │ │ │ -
165 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
166 writer.addArray(name(), ncomps(), precision_);
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
│ │ │ │ -
170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ -
172 nitems, precision_));
│ │ │ │ -
173 return !arraywriter->writeIsNoop();
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
176 virtual void write(const typename Base::Cell& cell,
│ │ │ │ -
177 const typename Base::Domain& xl) {
│ │ │ │ -
178 FieldVector<typename Base::Cell::Geometry::ctype, Base::Cell::Geometry::coorddimension> xg
│ │ │ │ -
179 = cell.geometry().global(xl);
│ │ │ │ -
180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d)
│ │ │ │ -
181 arraywriter->write(xg[d]);
│ │ │ │ -
182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)
│ │ │ │ -
183 arraywriter->write(0);
│ │ │ │ -
184 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
186 virtual void endWrite() {
│ │ │ │ -
187 arraywriter.reset();
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189 };
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
192 template<typename IteratorFactory>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
194 : public FunctionWriterBase<typename IteratorFactory::Cell>
│ │ │ │ -
195 {
│ │ │ │ - │ │ │ │ -
197 static const unsigned mydim = Base::Cell::mydimension;
│ │ │ │ -
198
│ │ │ │ -
199 const IteratorFactory& factory;
│ │ │ │ -
200 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ -
201 std::vector<unsigned> pointIndices;
│ │ │ │ -
202
│ │ │ │ -
203 public:
│ │ │ │ -
│ │ │ │ -
205 ConformingConnectivityWriter(const IteratorFactory& factory_)
│ │ │ │ -
206 : factory(factory_)
│ │ │ │ -
207 { }
│ │ │ │ -
│ │ │ │ -
208
│ │ │ │ -
210 virtual std::string name() const { return "connectivity"; }
│ │ │ │ -
211
│ │ │ │ -
213 virtual unsigned ncomps() const { return 1; }
│ │ │ │ -
214
│ │ │ │ -
│ │ │ │ -
216 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
217 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
│ │ │ │ -
221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ -
223 nitems, Precision::int32));
│ │ │ │ -
224 if(arraywriter->writeIsNoop())
│ │ │ │ -
225 return false;
│ │ │ │ -
226
│ │ │ │ -
228 pointIndices.resize(factory.indexSet().size(mydim));
│ │ │ │ -
229 const typename IteratorFactory::PointIterator& pend =
│ │ │ │ -
230 factory.endPoints();
│ │ │ │ -
231 typename IteratorFactory::PointIterator pit = factory.beginPoints();
│ │ │ │ -
232 unsigned counter = 0;
│ │ │ │ -
233 while(pit != pend) {
│ │ │ │ -
234 pointIndices[factory.indexSet().subIndex
│ │ │ │ -
235 (pit->cell(), pit->duneIndex(), mydim)] = counter;
│ │ │ │ -
236 ++counter;
│ │ │ │ -
237 ++pit;
│ │ │ │ -
238 }
│ │ │ │ -
239 return true;
│ │ │ │ -
240 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)
│ │ │ │ -
243 {
│ │ │ │ -
244 // if pointIndices is empty, we're in writeIsNoop mode
│ │ │ │ -
245 if(pointIndices.size() == 0)
│ │ │ │ -
246 return;
│ │ │ │ -
247 arraywriter->write(pointIndices[factory.indexSet().subIndex
│ │ │ │ -
248 (cell, cornerIndex, mydim)]);
│ │ │ │ -
249 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
251 virtual void endWrite() {
│ │ │ │ -
252 arraywriter.reset();
│ │ │ │ -
253 pointIndices.clear();
│ │ │ │ -
254 }
│ │ │ │ -
│ │ │ │ -
255 };
│ │ │ │ -
│ │ │ │ -
256
│ │ │ │ -
258 template<typename Cell>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
260 : public FunctionWriterBase<Cell>
│ │ │ │ -
261 {
│ │ │ │ -
262 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ -
263 unsigned counter;
│ │ │ │ -
264
│ │ │ │ -
265 public:
│ │ │ │ -
267 virtual std::string name() const { return "connectivity"; }
│ │ │ │ -
268
│ │ │ │ -
270 virtual unsigned ncomps() const { return 1; }
│ │ │ │ -
271
│ │ │ │ -
│ │ │ │ -
273 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
274 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ │ -
275 }
│ │ │ │ +
150 private:
│ │ │ │ +
151
│ │ │ │ +
152 };
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
154
│ │ │ │ +
155
│ │ │ │ +
156 // DiscreteCoordFunctionInterface
│ │ │ │ +
157 // ------------------------------
│ │ │ │ +
158
│ │ │ │ +
173 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
175 {
│ │ │ │ + │ │ │ │ +
177
│ │ │ │ +
178 friend class DiscreteCoordFunction< ct, dimR, Impl >;
│ │ │ │ +
179
│ │ │ │ +
180 public:
│ │ │ │ + │ │ │ │ +
182 typedef Impl Implementation;
│ │ │ │ +
183
│ │ │ │ +
185 typedef ct ctype;
│ │ │ │ +
186
│ │ │ │ +
188 static const unsigned int dimRange = dimR;
│ │ │ │ +
189
│ │ │ │ +
191 typedef FieldVector< ctype, dimRange > RangeVector;
│ │ │ │ +
192
│ │ │ │ +
193 private:
│ │ │ │ + │ │ │ │ +
195 DiscreteCoordFunctionInterface ( const This & ) = default;
│ │ │ │ +
196 DiscreteCoordFunctionInterface ( This && ) = default;
│ │ │ │ + │ │ │ │ +
198 This &operator= ( const This & ) = default;
│ │ │ │ +
199 This &operator= ( This && ) = default;
│ │ │ │ +
200
│ │ │ │ +
201 public:
│ │ │ │ +
210 template< class HostEntity >
│ │ │ │ +
│ │ │ │ +
211 void evaluate ( const HostEntity &hostEntity, unsigned int corner,
│ │ │ │ +
212 RangeVector &y ) const
│ │ │ │ +
213 {
│ │ │ │ +
214 asImp().evaluate( hostEntity, corner, y );
│ │ │ │ +
215 }
│ │ │ │ +
│ │ │ │ +
216
│ │ │ │ +
│ │ │ │ +
220 void adapt ()
│ │ │ │ +
221 {
│ │ │ │ +
222 asImp().adapt();
│ │ │ │ +
223 }
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
225 protected:
│ │ │ │ +
│ │ │ │ +
226 const Implementation &asImp () const
│ │ │ │ +
227 {
│ │ │ │ +
228 return static_cast< const Implementation & >( *this );
│ │ │ │ +
229 }
│ │ │ │ +
│ │ │ │ +
230
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
232 {
│ │ │ │ +
233 return static_cast< Implementation & >( *this );
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235 };
│ │ │ │ +
│ │ │ │ +
236
│ │ │ │ +
237
│ │ │ │ +
238
│ │ │ │ +
239 // DiscreteCoordFunction
│ │ │ │ +
240 // ---------------------
│ │ │ │ +
241 //
│ │ │ │ +
245 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
247 : public DiscreteCoordFunctionInterface< ct, dimR, Impl >
│ │ │ │ +
248 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
251
│ │ │ │ +
252 public:
│ │ │ │ +
253 typedef typename Base :: RangeVector RangeVector;
│ │ │ │ +
254
│ │ │ │ +
255 protected:
│ │ │ │ + │ │ │ │ +
257 DiscreteCoordFunction ( const This & ) = default;
│ │ │ │ +
258 DiscreteCoordFunction ( This && ) = default;
│ │ │ │ + │ │ │ │ +
260 This &operator= ( const This & ) = default;
│ │ │ │ +
261 This &operator= ( This && ) = default;
│ │ │ │ +
262
│ │ │ │ +
│ │ │ │ +
263 void adapt ()
│ │ │ │ +
264 {}
│ │ │ │ +
│ │ │ │ +
265
│ │ │ │ +
266 private:
│ │ │ │ +
267 template< class HostEntity >
│ │ │ │ +
268 void evaluate ( const HostEntity &hostEntity, unsigned int corner,
│ │ │ │ +
269 RangeVector &y ) const;
│ │ │ │ +
270 };
│ │ │ │
│ │ │ │ +
271
│ │ │ │ +
272
│ │ │ │ +
273
│ │ │ │ +
274 namespace GeoGrid
│ │ │ │ +
275 {
│ │ │ │
276
│ │ │ │ -
│ │ │ │ -
278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ -
280 nitems, Precision::int32));
│ │ │ │ -
281 counter = 0;
│ │ │ │ -
282 return !arraywriter->writeIsNoop();
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)
│ │ │ │ -
286 {
│ │ │ │ -
287 arraywriter->write(counter);
│ │ │ │ -
288 ++counter;
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
291 virtual void endWrite() {
│ │ │ │ -
292 arraywriter.reset();
│ │ │ │ -
293 }
│ │ │ │ -
│ │ │ │ -
294 };
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
297 template<typename Cell>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
299 : public FunctionWriterBase<Cell>
│ │ │ │ -
300 {
│ │ │ │ - │ │ │ │ -
302
│ │ │ │ -
303 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ -
304 unsigned offset;
│ │ │ │ -
305
│ │ │ │ -
306 public:
│ │ │ │ -
308 virtual std::string name() const { return "offsets"; }
│ │ │ │ -
309
│ │ │ │ -
311 virtual unsigned ncomps() const { return 1; }
│ │ │ │ -
312
│ │ │ │ -
│ │ │ │ -
314 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
315 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ │ -
316 }
│ │ │ │ -
│ │ │ │ +
277 // isCoordFunctionInterface
│ │ │ │ +
278 // ------------------------
│ │ │ │ +
279
│ │ │ │ +
280 template< class CoordFunctionInterface >
│ │ │ │ +
281 struct isCoordFunctionInterface
│ │ │ │ +
282 {
│ │ │ │ +
283 static const bool value = false;
│ │ │ │ +
284 };
│ │ │ │ +
285
│ │ │ │ +
286 template< class ct, unsigned int dimD, unsigned int dimR, class Impl >
│ │ │ │ +
287 struct isCoordFunctionInterface
│ │ │ │ +
288 < AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
│ │ │ │ +
289 {
│ │ │ │ +
290 static const bool value = true;
│ │ │ │ +
291 };
│ │ │ │ +
292
│ │ │ │ +
293 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ +
294 struct isCoordFunctionInterface
│ │ │ │ +
295 < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ +
296 {
│ │ │ │ +
297 static const bool value = true;
│ │ │ │ +
298 };
│ │ │ │ +
299
│ │ │ │ +
300
│ │ │ │ +
301
│ │ │ │ +
302 // isDiscreteCoordFunctionInterface
│ │ │ │ +
303 // --------------------------------
│ │ │ │ +
304
│ │ │ │ +
305 template< class CoordFunctionInterface >
│ │ │ │ +
306 struct isDiscreteCoordFunctionInterface
│ │ │ │ +
307 {
│ │ │ │ +
308 static const bool value = false;
│ │ │ │ +
309 };
│ │ │ │ +
310
│ │ │ │ +
311 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ +
312 struct isDiscreteCoordFunctionInterface
│ │ │ │ +
313 < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ +
314 {
│ │ │ │ +
315 static const bool value = true;
│ │ │ │ +
316 };
│ │ │ │
317
│ │ │ │ -
│ │ │ │ -
319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ │ -
321 nitems, Precision::int32));
│ │ │ │ -
322 offset = 0;
│ │ │ │ -
323 return !arraywriter->writeIsNoop();
│ │ │ │ -
324 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
326 virtual void write(const Cell& cell, const typename Base::Domain&) {
│ │ │ │ -
327 offset += cell.geometry().corners();
│ │ │ │ -
328 arraywriter->write(offset);
│ │ │ │ -
329 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
331 virtual void endWrite() {
│ │ │ │ -
332 arraywriter.reset();
│ │ │ │ -
333 }
│ │ │ │ -
│ │ │ │ -
334 };
│ │ │ │ -
│ │ │ │ -
335
│ │ │ │ -
337 template<typename Cell>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
339 : public FunctionWriterBase<Cell>
│ │ │ │ -
340 {
│ │ │ │ - │ │ │ │ +
318
│ │ │ │ +
319
│ │ │ │ +
320 // AdaptCoordFunction
│ │ │ │ +
321 // ------------------
│ │ │ │ +
322
│ │ │ │ +
323 template< class CoordFunctionInterface >
│ │ │ │ +
324 struct AdaptCoordFunction
│ │ │ │ +
325 {
│ │ │ │ +
326 static void adapt ( CoordFunctionInterface & )
│ │ │ │ +
327 {}
│ │ │ │ +
328 };
│ │ │ │ +
329
│ │ │ │ +
330 template< class ct, unsigned int dimR, class Impl >
│ │ │ │ +
331 struct AdaptCoordFunction< DiscreteCoordFunctionInterface< ct, dimR, Impl > >
│ │ │ │ +
332 {
│ │ │ │ +
333 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
│ │ │ │ +
334
│ │ │ │ +
335 static void adapt ( CoordFunctionInterface &coordFunction )
│ │ │ │ +
336 {
│ │ │ │ +
337 coordFunction.adapt();
│ │ │ │ +
338 }
│ │ │ │ +
339 };
│ │ │ │ +
340
│ │ │ │ +
341 } // namespace GeoGrid
│ │ │ │
342
│ │ │ │ -
343 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ +
343} // namespace Dune
│ │ │ │
344
│ │ │ │ -
345 public:
│ │ │ │ -
347 virtual std::string name() const { return "types"; }
│ │ │ │ -
348
│ │ │ │ -
350 virtual unsigned ncomps() const { return 1; }
│ │ │ │ -
351
│ │ │ │ -
│ │ │ │ -
353 virtual void addArray(PVTUWriter& writer) {
│ │ │ │ -
354 writer.addArray(name(), ncomps(), Precision::uint8);
│ │ │ │ -
355 }
│ │ │ │ -
│ │ │ │ -
356
│ │ │ │ -
│ │ │ │ -
358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ │ -
359 arraywriter.reset(writer.makeArrayWriter
│ │ │ │ -
360 ( name(), ncomps(), nitems, Precision::uint8));
│ │ │ │ -
361 return !arraywriter->writeIsNoop();
│ │ │ │ -
362 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
364 virtual void write(const Cell& cell, const typename Base::Domain&) {
│ │ │ │ -
365 arraywriter->write(geometryType(cell.type()));
│ │ │ │ -
366 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
368 virtual void endWrite() {
│ │ │ │ -
369 arraywriter.reset();
│ │ │ │ -
370 }
│ │ │ │ -
│ │ │ │ -
371 };
│ │ │ │ -
│ │ │ │ -
372
│ │ │ │ -
373 } // namespace VTK
│ │ │ │ -
374
│ │ │ │ -
376
│ │ │ │ -
377} // namespace Dune
│ │ │ │ -
378
│ │ │ │ -
379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ │ -
Data array writers for the VTKWriter.
│ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ - │ │ │ │ - │ │ │ │ +
345#endif // #ifndef DUNE_GEOGRID_COORDFUNCTION_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
│ │ │ │ -
Base class for function writers.
Definition functionwriter.hh:34
│ │ │ │ -
virtual std::string name() const =0
return name
│ │ │ │ -
virtual unsigned ncomps() const =0
return number of components of the vector
│ │ │ │ -
virtual void write(const Cell &, const Domain &)
write at the given position
Definition functionwriter.hh:59
│ │ │ │ -
Cell_ Cell
Definition functionwriter.hh:41
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)=0
add this field to the given parallel writer
│ │ │ │ -
virtual void endWrite()=0
signal end of writing
│ │ │ │ -
FieldVector< DF, mydim > Domain
Definition functionwriter.hh:40
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
start writing with the given writer
│ │ │ │ -
virtual ~FunctionWriterBase()
destructor
Definition functionwriter.hh:78
│ │ │ │ -
virtual void write(const Cell &cell, unsigned cornerIndex)
write at the given corner
Definition functionwriter.hh:71
│ │ │ │ -
Base class for function writers.
Definition functionwriter.hh:90
│ │ │ │ -
VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision prec=VTK::Precision::float32)
Definition functionwriter.hh:97
│ │ │ │ -
virtual std::string name() const
return name
Definition functionwriter.hh:103
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:106
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:117
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:112
│ │ │ │ -
virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
write at the given position
Definition functionwriter.hh:124
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:133
│ │ │ │ -
writer for the Coordinates array
Definition functionwriter.hh:147
│ │ │ │ -
virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
write at the given position
Definition functionwriter.hh:176
│ │ │ │ -
virtual std::string name() const
return name
Definition functionwriter.hh:159
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:186
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:162
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:165
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:170
│ │ │ │ -
CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32)
Definition functionwriter.hh:154
│ │ │ │ -
writer for the connectivity array in conforming mode
Definition functionwriter.hh:195
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:216
│ │ │ │ -
virtual std::string name() const
return name
Definition functionwriter.hh:210
│ │ │ │ -
virtual void write(const typename Base::Cell &cell, unsigned cornerIndex)
write at the given corner
Definition functionwriter.hh:242
│ │ │ │ -
ConformingConnectivityWriter(const IteratorFactory &factory_)
create a writer with the given iteratorfactory
Definition functionwriter.hh:205
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:213
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:221
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:251
│ │ │ │ -
writer for the connectivity array in nonconforming mode
Definition functionwriter.hh:261
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:270
│ │ │ │ -
virtual std::string name() const
return name
Definition functionwriter.hh:267
│ │ │ │ -
virtual void write(const Cell &, unsigned)
write at the given corner
Definition functionwriter.hh:285
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:273
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:278
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:291
│ │ │ │ -
writer for the offsets array
Definition functionwriter.hh:300
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:314
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:331
│ │ │ │ -
virtual std::string name() const
return name
Definition functionwriter.hh:308
│ │ │ │ -
virtual void write(const Cell &cell, const typename Base::Domain &)
write at the given position
Definition functionwriter.hh:326
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:319
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:311
│ │ │ │ -
writer for the types array
Definition functionwriter.hh:340
│ │ │ │ -
virtual unsigned ncomps() const
return number of components of the vector
Definition functionwriter.hh:350
│ │ │ │ -
virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
start writing with the given writer
Definition functionwriter.hh:358
│ │ │ │ -
virtual std::string name() const
return name
Definition functionwriter.hh:347
│ │ │ │ -
virtual void write(const Cell &cell, const typename Base::Domain &)
write at the given position
Definition functionwriter.hh:364
│ │ │ │ -
virtual void addArray(PVTUWriter &writer)
add this field to the given parallel writer
Definition functionwriter.hh:353
│ │ │ │ -
virtual void endWrite()
signal end of writing
Definition functionwriter.hh:368
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition pvtuwriter.hh:62
│ │ │ │ -
void addArray(const std::string &name, unsigned ncomps, Precision prec)
Add an array to the output file.
Definition pvtuwriter.hh:207
│ │ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ │ -
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ │ +
Derive an implementation of an analytical coordinate function from this class.
Definition coordfunction.hh:134
│ │ │ │ +
Base::DomainVector DomainVector
Definition coordfunction.hh:139
│ │ │ │ + │ │ │ │ + │ │ │ │ +
AnalyticalCoordFunction(This &&)=default
│ │ │ │ +
Base::RangeVector RangeVector
Definition coordfunction.hh:140
│ │ │ │ +
This & operator=(const This &)=default
│ │ │ │ +
AnalyticalCoordFunction(const This &)=default
│ │ │ │ +
Derive an implementation of a discrete coordinate function from this class.
Definition coordfunction.hh:248
│ │ │ │ +
This & operator=(const This &)=default
│ │ │ │ +
void adapt()
Definition coordfunction.hh:263
│ │ │ │ + │ │ │ │ +
DiscreteCoordFunction(This &&)=default
│ │ │ │ + │ │ │ │ +
DiscreteCoordFunction(const This &)=default
│ │ │ │ +
Base::RangeVector RangeVector
Definition coordfunction.hh:253
│ │ │ │ +
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
Definition coordfunction.hh:44
│ │ │ │ +
Impl Implementation
Definition coordfunction.hh:51
│ │ │ │ +
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition coordfunction.hh:64
│ │ │ │ +
void evaluate(const DomainVector &x, RangeVector &y) const
evaluate method for global mapping
│ │ │ │ +
static const unsigned int dimRange
dimension of the range vector
Definition coordfunction.hh:59
│ │ │ │ +
ct ctype
field type of the coordinate vector
Definition coordfunction.hh:54
│ │ │ │ +
static const unsigned int dimDomain
dimension of the range vector (dimensionworld of host grid)
Definition coordfunction.hh:57
│ │ │ │ +
const Implementation & asImp() const
Definition coordfunction.hh:113
│ │ │ │ +
This Interface
Definition coordfunction.hh:50
│ │ │ │ +
Implementation & asImp()
Definition coordfunction.hh:118
│ │ │ │ +
FieldVector< ctype, dimDomain > DomainVector
domain vector for the evaluate method
Definition coordfunction.hh:62
│ │ │ │ +
Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid....
Definition coordfunction.hh:175
│ │ │ │ +
static const unsigned int dimRange
dimension of the range vector
Definition coordfunction.hh:188
│ │ │ │ +
void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector &y) const
evaluate method
Definition coordfunction.hh:211
│ │ │ │ +
Implementation & asImp()
Definition coordfunction.hh:231
│ │ │ │ +
ct ctype
field type of the coordinate vector
Definition coordfunction.hh:185
│ │ │ │ +
void adapt()
method called from grid.adapt() method to allow adaptation of the discrete coordinate function
Definition coordfunction.hh:220
│ │ │ │ +
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition coordfunction.hh:191
│ │ │ │ +
const Implementation & asImp() const
Definition coordfunction.hh:226
│ │ │ │ +
Impl Implementation
Definition coordfunction.hh:182
│ │ │ │ +
This Interface
Definition coordfunction.hh:181
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,578 +1,429 @@ │ │ │ │ │ dune-grid 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _i_o │ │ │ │ │ - * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -functionwriter.hh │ │ │ │ │ + * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ +coordfunction.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include │ │ │ │ │ -19 │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ │ -22#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ -23#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ │ +5#ifndef DUNE_GEOGRID_COORDFUNCTION_HH │ │ │ │ │ +6#define DUNE_GEOGRID_COORDFUNCTION_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 // Internal Forward Declarations │ │ │ │ │ +17 // ----------------------------- │ │ │ │ │ +18 │ │ │ │ │ +19 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ +20 class AnalyticalCoordFunction; │ │ │ │ │ +21 │ │ │ │ │ +22 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ +23 class DiscreteCoordFunction; │ │ │ │ │ 24 │ │ │ │ │ -25namespace _D_u_n_e │ │ │ │ │ -26{ │ │ │ │ │ +25 │ │ │ │ │ +26 │ │ │ │ │ +27 // AnalyticalCoordFunctionInterface │ │ │ │ │ +28 // -------------------------------- │ │ │ │ │ 29 │ │ │ │ │ -30 namespace VTK { │ │ │ │ │ -31 │ │ │ │ │ -33 template │ │ │ │ │ -_3_4 class _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e { │ │ │ │ │ -35 typedef typename Cell_::Geometry::ctype DF; │ │ │ │ │ -36 static const unsigned mydim = Cell_::mydimension; │ │ │ │ │ -37 typedef ReferenceElements Refelems; │ │ │ │ │ -38 │ │ │ │ │ -39 public: │ │ │ │ │ -_4_0 typedef FieldVector _D_o_m_a_i_n; │ │ │ │ │ -_4_1 typedef Cell_ _C_e_l_l; │ │ │ │ │ -42 │ │ │ │ │ -_4_4 virtual std::string _n_a_m_e() const = 0; │ │ │ │ │ -45 │ │ │ │ │ -_4_7 virtual unsigned _n_c_o_m_p_s() const = 0; │ │ │ │ │ +42 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ +_4_3 class _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ +44 { │ │ │ │ │ +45 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ +46 │ │ │ │ │ +47 friend class _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n< ct, dimD, dimR, Impl >; │ │ │ │ │ 48 │ │ │ │ │ -_5_0 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) = 0; │ │ │ │ │ -_5_2 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) = 0; │ │ │ │ │ -54 │ │ │ │ │ -_5_9 virtual void _w_r_i_t_e(const _C_e_l_l& /* cell */, const _D_o_m_a_i_n& /* xl */) { │ │ │ │ │ -60 DUNE_THROW(NotImplemented, "FunctionWriterBase::write(const Cell&, " │ │ │ │ │ -61 "const Domain&): Either the derived class " << │ │ │ │ │ -62 typeid(*this).name() << " failed to implement this method " │ │ │ │ │ -63 "or this method is not meant to be called on the derived " │ │ │ │ │ -64 "class and was called in error."); │ │ │ │ │ -65 } │ │ │ │ │ -67 │ │ │ │ │ -_7_1 virtual void _w_r_i_t_e(const _C_e_l_l& cell, unsigned cornerIndex) { │ │ │ │ │ -72 _w_r_i_t_e(cell, │ │ │ │ │ -73 Refelems::general(cell.type()).position(cornerIndex, mydim)); │ │ │ │ │ -74 } │ │ │ │ │ -_7_6 virtual void _e_n_d_W_r_i_t_e() = 0; │ │ │ │ │ -_7_8 virtual _~_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e() {} │ │ │ │ │ -79 }; │ │ │ │ │ -80 │ │ │ │ │ -82 // │ │ │ │ │ -83 // A Generic Function writer for VTKFunctions │ │ │ │ │ -84 // │ │ │ │ │ -85 │ │ │ │ │ -87 template │ │ │ │ │ -_8_8 class _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -89 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -90 { │ │ │ │ │ -91 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_t_y_p_e_n_a_m_e_ _F_u_n_c_:_:_E_n_t_i_t_y_> _B_a_s_e; │ │ │ │ │ -92 std::shared_ptr func; │ │ │ │ │ -93 _V_T_K_:_:_P_r_e_c_i_s_i_o_n precision_; │ │ │ │ │ -94 std::shared_ptr arraywriter; │ │ │ │ │ +49 public: │ │ │ │ │ +_5_0 typedef _T_h_i_s _I_n_t_e_r_f_a_c_e; │ │ │ │ │ +_5_1 typedef Impl _I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ │ +52 │ │ │ │ │ +_5_4 typedef ct _c_t_y_p_e; │ │ │ │ │ +55 │ │ │ │ │ +_5_7 static const unsigned int _d_i_m_D_o_m_a_i_n = dimD; │ │ │ │ │ +_5_9 static const unsigned int _d_i_m_R_a_n_g_e = dimR; │ │ │ │ │ +60 │ │ │ │ │ +_6_2 typedef FieldVector< ctype, dimDomain > _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_6_4 typedef FieldVector< ctype, dimRange > _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +65 │ │ │ │ │ +66 private: │ │ │ │ │ +67 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ +68 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( const _T_h_i_s & ) = default; │ │ │ │ │ +69 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( _T_h_i_s && ) = default; │ │ │ │ │ +70 _~_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ +71 _T_h_i_s &operator= ( const _T_h_i_s & ) = default; │ │ │ │ │ +72 _T_h_i_s &operator= ( _T_h_i_s && ) = default; │ │ │ │ │ +73 │ │ │ │ │ +74 // helper for picking the correct version of evaluate further down │ │ │ │ │ +75 template │ │ │ │ │ +76 using has_operator_parentheses = decltype(std::declval()(std::declval │ │ │ │ │ +())); │ │ │ │ │ +77 │ │ │ │ │ +78 public: │ │ │ │ │ +79 │ │ │ │ │ +80#ifdef DOXYGEN │ │ │ │ │ +81 │ │ │ │ │ +_8_3 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const; │ │ │ │ │ +84 │ │ │ │ │ +85#else │ │ │ │ │ +86 │ │ │ │ │ +87 template │ │ │ │ │ +88 std::enable_if_t< │ │ │ │ │ +89 Std::is_detected::value │ │ │ │ │ +90 > │ │ │ │ │ +91 _e_v_a_l_u_a_t_e ( const DV &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ +92 { │ │ │ │ │ +93 y = _a_s_I_m_p()(x); │ │ │ │ │ +94 } │ │ │ │ │ 95 │ │ │ │ │ -96 public: │ │ │ │ │ -_9_7 _V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ │ -98 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -99 : func(func_), precision_(prec) │ │ │ │ │ -100 { } │ │ │ │ │ -101 │ │ │ │ │ -_1_0_3 virtual std::string _n_a_m_e() const { return func->name(); } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_6 virtual unsigned _n_c_o_m_p_s() const { │ │ │ │ │ -107 if(func->ncomps() == 2) return 3; │ │ │ │ │ -108 else return func->ncomps(); │ │ │ │ │ -109 } │ │ │ │ │ +96 template │ │ │ │ │ +97 std::enable_if_t< │ │ │ │ │ +98 not Std::is_detected::value │ │ │ │ │ +99 > │ │ │ │ │ +100 _e_v_a_l_u_a_t_e ( const DV &x, _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ +101 { │ │ │ │ │ +102 assert( │ │ │ │ │ +103 static_cast(&_T_h_i_s_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e) != │ │ │ │ │ +104 static_cast(&Impl:: │ │ │ │ │ +evaluate) && │ │ │ │ │ +105 "You need to implement either operator() or evaluate() in your coordinate │ │ │ │ │ +function!"); │ │ │ │ │ +106 _a_s_I_m_p().evaluate( x, y ); │ │ │ │ │ +107 } │ │ │ │ │ +108 │ │ │ │ │ +109#endif // DOXYGEN │ │ │ │ │ 110 │ │ │ │ │ -_1_1_2 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -113 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -_1_1_7 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -118 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ -119 nitems, precision_)); │ │ │ │ │ -120 return !arraywriter->writeIsNoop(); │ │ │ │ │ +111 protected: │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 const _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () const │ │ │ │ │ +114 { │ │ │ │ │ +115 return static_cast< const _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_1_8 _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () │ │ │ │ │ +119 { │ │ │ │ │ +120 return static_cast< _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ 121 } │ │ │ │ │ -122 │ │ │ │ │ -_1_2_4 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, │ │ │ │ │ -125 const typename _B_a_s_e_:_:_D_o_m_a_i_n& xl) { │ │ │ │ │ -126 for(int d = 0; d < func->ncomps(); ++d) │ │ │ │ │ -127 arraywriter->write(func->evaluate(d, cell, xl)); │ │ │ │ │ -128 for(unsigned d = func->ncomps(); d < _n_c_o_m_p_s(); ++d) │ │ │ │ │ -129 arraywriter->write(0); │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -_1_3_3 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -134 arraywriter.reset(); │ │ │ │ │ -135 } │ │ │ │ │ -136 }; │ │ │ │ │ +122 }; │ │ │ │ │ +123 │ │ │ │ │ +124 │ │ │ │ │ +125 │ │ │ │ │ +126 // AnalyticalCoordFunction │ │ │ │ │ +127 // ----------------------- │ │ │ │ │ +131 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ +_1_3_2 class _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +133 : public _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e< ct, dimD, dimR, Impl > │ │ │ │ │ +134 { │ │ │ │ │ +135 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ +136 typedef _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_D_,_ _d_i_m_R_,_ _I_m_p_l_ _> _B_a_s_e; │ │ │ │ │ 137 │ │ │ │ │ -139 // │ │ │ │ │ -140 // Writers for the grid information │ │ │ │ │ -141 // │ │ │ │ │ -142 │ │ │ │ │ -144 template │ │ │ │ │ -_1_4_5 class _C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ -146 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -147 { │ │ │ │ │ -148 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ │ +138 public: │ │ │ │ │ +_1_3_9 typedef typename Base :: DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_1_4_0 typedef typename Base :: RangeVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +141 │ │ │ │ │ +142 protected: │ │ │ │ │ +_1_4_3 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ +_1_4_4 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n ( const _T_h_i_s & ) = default; │ │ │ │ │ +_1_4_5 _A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n ( _T_h_i_s && ) = default; │ │ │ │ │ +_1_4_6 _~_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ +_1_4_7 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = default; │ │ │ │ │ +_1_4_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( _T_h_i_s && ) = default; │ │ │ │ │ 149 │ │ │ │ │ -150 _V_T_K_:_:_P_r_e_c_i_s_i_o_n precision_; │ │ │ │ │ -151 std::shared_ptr arraywriter; │ │ │ │ │ -152 │ │ │ │ │ -153 public: │ │ │ │ │ -_1_5_4 explicit _C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r(_V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ │ -155 : precision_(prec) │ │ │ │ │ -156 {} │ │ │ │ │ -157 │ │ │ │ │ -_1_5_9 virtual std::string _n_a_m_e() const { return "Coordinates"; } │ │ │ │ │ -160 │ │ │ │ │ -_1_6_2 virtual unsigned _n_c_o_m_p_s() const { return 3; } │ │ │ │ │ -163 │ │ │ │ │ -_1_6_5 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -166 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ │ -167 } │ │ │ │ │ -168 │ │ │ │ │ -_1_7_0 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -171 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ -172 nitems, precision_)); │ │ │ │ │ -173 return !arraywriter->writeIsNoop(); │ │ │ │ │ -174 } │ │ │ │ │ -_1_7_6 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, │ │ │ │ │ -177 const typename _B_a_s_e_:_:_D_o_m_a_i_n& xl) { │ │ │ │ │ -178 FieldVector xg │ │ │ │ │ -179 = cell.geometry().global(xl); │ │ │ │ │ -180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d) │ │ │ │ │ -181 arraywriter->write(xg[d]); │ │ │ │ │ -182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d) │ │ │ │ │ -183 arraywriter->write(0); │ │ │ │ │ -184 } │ │ │ │ │ -_1_8_6 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -187 arraywriter.reset(); │ │ │ │ │ -188 } │ │ │ │ │ -189 }; │ │ │ │ │ -190 │ │ │ │ │ -192 template │ │ │ │ │ -_1_9_3 class _C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -194 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -195 { │ │ │ │ │ -196 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_t_y_p_e_n_a_m_e_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l_> _B_a_s_e; │ │ │ │ │ -197 static const unsigned mydim = Base::Cell::mydimension; │ │ │ │ │ -198 │ │ │ │ │ -199 const IteratorFactory& factory; │ │ │ │ │ -200 std::shared_ptr arraywriter; │ │ │ │ │ -201 std::vector pointIndices; │ │ │ │ │ -202 │ │ │ │ │ -203 public: │ │ │ │ │ -_2_0_5 _C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(const IteratorFactory& factory_) │ │ │ │ │ -206 : factory(factory_) │ │ │ │ │ -207 { } │ │ │ │ │ -208 │ │ │ │ │ -_2_1_0 virtual std::string _n_a_m_e() const { return "connectivity"; } │ │ │ │ │ -211 │ │ │ │ │ -_2_1_3 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ -214 │ │ │ │ │ -_2_1_6 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -217 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -_2_2_1 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -222 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ -223 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ -224 if(arraywriter->writeIsNoop()) │ │ │ │ │ -225 return false; │ │ │ │ │ -226 │ │ │ │ │ -228 pointIndices.resize(factory.indexSet().size(mydim)); │ │ │ │ │ -229 const typename IteratorFactory::PointIterator& pend = │ │ │ │ │ -230 factory.endPoints(); │ │ │ │ │ -231 typename IteratorFactory::PointIterator pit = factory.beginPoints(); │ │ │ │ │ -232 unsigned counter = 0; │ │ │ │ │ -233 while(pit != pend) { │ │ │ │ │ -234 pointIndices[factory.indexSet().subIndex │ │ │ │ │ -235 (pit->cell(), pit->duneIndex(), mydim)] = counter; │ │ │ │ │ -236 ++counter; │ │ │ │ │ -237 ++pit; │ │ │ │ │ -238 } │ │ │ │ │ -239 return true; │ │ │ │ │ -240 } │ │ │ │ │ -_2_4_2 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, unsigned cornerIndex) │ │ │ │ │ -243 { │ │ │ │ │ -244 // if pointIndices is empty, we're in writeIsNoop mode │ │ │ │ │ -245 if(pointIndices.size() == 0) │ │ │ │ │ -246 return; │ │ │ │ │ -247 arraywriter->write(pointIndices[factory.indexSet().subIndex │ │ │ │ │ -248 (cell, cornerIndex, mydim)]); │ │ │ │ │ -249 } │ │ │ │ │ -_2_5_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -252 arraywriter.reset(); │ │ │ │ │ -253 pointIndices.clear(); │ │ │ │ │ -254 } │ │ │ │ │ -255 }; │ │ │ │ │ -256 │ │ │ │ │ -258 template │ │ │ │ │ -_2_5_9 class _N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -260 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -261 { │ │ │ │ │ -262 std::shared_ptr arraywriter; │ │ │ │ │ -263 unsigned counter; │ │ │ │ │ -264 │ │ │ │ │ -265 public: │ │ │ │ │ -_2_6_7 virtual std::string _n_a_m_e() const { return "connectivity"; } │ │ │ │ │ -268 │ │ │ │ │ -_2_7_0 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ +150 private: │ │ │ │ │ +151 │ │ │ │ │ +152 }; │ │ │ │ │ +153 │ │ │ │ │ +154 │ │ │ │ │ +155 │ │ │ │ │ +156 // DiscreteCoordFunctionInterface │ │ │ │ │ +157 // ------------------------------ │ │ │ │ │ +158 │ │ │ │ │ +173 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ +_1_7_4 class _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ +175 { │ │ │ │ │ +176 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ +177 │ │ │ │ │ +178 friend class _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n< ct, dimR, Impl >; │ │ │ │ │ +179 │ │ │ │ │ +180 public: │ │ │ │ │ +_1_8_1 typedef _T_h_i_s _I_n_t_e_r_f_a_c_e; │ │ │ │ │ +_1_8_2 typedef Impl _I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ │ +183 │ │ │ │ │ +_1_8_5 typedef ct _c_t_y_p_e; │ │ │ │ │ +186 │ │ │ │ │ +_1_8_8 static const unsigned int _d_i_m_R_a_n_g_e = dimR; │ │ │ │ │ +189 │ │ │ │ │ +_1_9_1 typedef FieldVector< ctype, dimRange > _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +192 │ │ │ │ │ +193 private: │ │ │ │ │ +194 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ +195 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( const _T_h_i_s & ) = default; │ │ │ │ │ +196 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e ( _T_h_i_s && ) = default; │ │ │ │ │ +197 _~_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e () = default; │ │ │ │ │ +198 _T_h_i_s &operator= ( const _T_h_i_s & ) = default; │ │ │ │ │ +199 _T_h_i_s &operator= ( _T_h_i_s && ) = default; │ │ │ │ │ +200 │ │ │ │ │ +201 public: │ │ │ │ │ +210 template< class HostEntity > │ │ │ │ │ +_2_1_1 void _e_v_a_l_u_a_t_e ( const HostEntity &hostEntity, unsigned int corner, │ │ │ │ │ +212 _R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ +213 { │ │ │ │ │ +214 _a_s_I_m_p().evaluate( hostEntity, corner, y ); │ │ │ │ │ +215 } │ │ │ │ │ +216 │ │ │ │ │ +_2_2_0 void _a_d_a_p_t () │ │ │ │ │ +221 { │ │ │ │ │ +222 _a_s_I_m_p().adapt(); │ │ │ │ │ +223 } │ │ │ │ │ +224 │ │ │ │ │ +225 protected: │ │ │ │ │ +_2_2_6 const _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () const │ │ │ │ │ +227 { │ │ │ │ │ +228 return static_cast< const _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ +229 } │ │ │ │ │ +230 │ │ │ │ │ +_2_3_1 _I_m_p_l_e_m_e_n_t_a_t_i_o_n &_a_s_I_m_p () │ │ │ │ │ +232 { │ │ │ │ │ +233 return static_cast< _I_m_p_l_e_m_e_n_t_a_t_i_o_n & >( *this ); │ │ │ │ │ +234 } │ │ │ │ │ +235 }; │ │ │ │ │ +236 │ │ │ │ │ +237 │ │ │ │ │ +238 │ │ │ │ │ +239 // DiscreteCoordFunction │ │ │ │ │ +240 // --------------------- │ │ │ │ │ +241 // │ │ │ │ │ +245 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ +_2_4_6 class _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +247 : public _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e< ct, dimR, Impl > │ │ │ │ │ +248 { │ │ │ │ │ +249 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ +250 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_<_ _c_t_,_ _d_i_m_R_,_ _I_m_p_l_ _> _B_a_s_e; │ │ │ │ │ +251 │ │ │ │ │ +252 public: │ │ │ │ │ +_2_5_3 typedef typename Base :: RangeVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +254 │ │ │ │ │ +255 protected: │ │ │ │ │ +_2_5_6 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ +_2_5_7 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n ( const _T_h_i_s & ) = default; │ │ │ │ │ +_2_5_8 _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n ( _T_h_i_s && ) = default; │ │ │ │ │ +_2_5_9 _~_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n () = default; │ │ │ │ │ +_2_6_0 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = default; │ │ │ │ │ +_2_6_1 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( _T_h_i_s && ) = default; │ │ │ │ │ +262 │ │ │ │ │ +_2_6_3 void _a_d_a_p_t () │ │ │ │ │ +264 {} │ │ │ │ │ +265 │ │ │ │ │ +266 private: │ │ │ │ │ +267 template< class HostEntity > │ │ │ │ │ +268 void evaluate ( const HostEntity &hostEntity, unsigned int corner, │ │ │ │ │ +269 _R_a_n_g_e_V_e_c_t_o_r &y ) const; │ │ │ │ │ +270 }; │ │ │ │ │ 271 │ │ │ │ │ -_2_7_3 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -274 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ │ -275 } │ │ │ │ │ +272 │ │ │ │ │ +273 │ │ │ │ │ +274 namespace GeoGrid │ │ │ │ │ +275 { │ │ │ │ │ 276 │ │ │ │ │ -_2_7_8 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -279 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ -280 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ -281 counter = 0; │ │ │ │ │ -282 return !arraywriter->writeIsNoop(); │ │ │ │ │ -283 } │ │ │ │ │ -_2_8_5 virtual void _w_r_i_t_e(const _C_e_l_l& /* cell */, unsigned /* cornerIndex */) │ │ │ │ │ -286 { │ │ │ │ │ -287 arraywriter->write(counter); │ │ │ │ │ -288 ++counter; │ │ │ │ │ -289 } │ │ │ │ │ -_2_9_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -292 arraywriter.reset(); │ │ │ │ │ -293 } │ │ │ │ │ -294 }; │ │ │ │ │ -295 │ │ │ │ │ -297 template │ │ │ │ │ -_2_9_8 class _O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ │ -299 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -300 { │ │ │ │ │ -301 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ │ -302 │ │ │ │ │ -303 std::shared_ptr arraywriter; │ │ │ │ │ -304 unsigned offset; │ │ │ │ │ -305 │ │ │ │ │ -306 public: │ │ │ │ │ -_3_0_8 virtual std::string _n_a_m_e() const { return "offsets"; } │ │ │ │ │ -309 │ │ │ │ │ -_3_1_1 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ -312 │ │ │ │ │ -_3_1_4 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -315 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ │ -316 } │ │ │ │ │ +277 // isCoordFunctionInterface │ │ │ │ │ +278 // ------------------------ │ │ │ │ │ +279 │ │ │ │ │ +280 template< class CoordFunctionInterface > │ │ │ │ │ +281 struct isCoordFunctionInterface │ │ │ │ │ +282 { │ │ │ │ │ +283 static const bool value = false; │ │ │ │ │ +284 }; │ │ │ │ │ +285 │ │ │ │ │ +286 template< class ct, unsigned int dimD, unsigned int dimR, class Impl > │ │ │ │ │ +287 struct isCoordFunctionInterface │ │ │ │ │ +288 < AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > > │ │ │ │ │ +289 { │ │ │ │ │ +290 static const bool value = true; │ │ │ │ │ +291 }; │ │ │ │ │ +292 │ │ │ │ │ +293 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ +294 struct isCoordFunctionInterface │ │ │ │ │ +295 < DiscreteCoordFunctionInterface< ct, dimR, Impl > > │ │ │ │ │ +296 { │ │ │ │ │ +297 static const bool value = true; │ │ │ │ │ +298 }; │ │ │ │ │ +299 │ │ │ │ │ +300 │ │ │ │ │ +301 │ │ │ │ │ +302 // isDiscreteCoordFunctionInterface │ │ │ │ │ +303 // -------------------------------- │ │ │ │ │ +304 │ │ │ │ │ +305 template< class CoordFunctionInterface > │ │ │ │ │ +306 struct isDiscreteCoordFunctionInterface │ │ │ │ │ +307 { │ │ │ │ │ +308 static const bool value = false; │ │ │ │ │ +309 }; │ │ │ │ │ +310 │ │ │ │ │ +311 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ +312 struct isDiscreteCoordFunctionInterface │ │ │ │ │ +313 < DiscreteCoordFunctionInterface< ct, dimR, Impl > > │ │ │ │ │ +314 { │ │ │ │ │ +315 static const bool value = true; │ │ │ │ │ +316 }; │ │ │ │ │ 317 │ │ │ │ │ -_3_1_9 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -320 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ │ -321 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ │ -322 offset = 0; │ │ │ │ │ -323 return !arraywriter->writeIsNoop(); │ │ │ │ │ -324 } │ │ │ │ │ -_3_2_6 virtual void _w_r_i_t_e(const _C_e_l_l& cell, const typename _B_a_s_e_:_:_D_o_m_a_i_n&) { │ │ │ │ │ -327 offset += cell.geometry().corners(); │ │ │ │ │ -328 arraywriter->write(offset); │ │ │ │ │ -329 } │ │ │ │ │ -_3_3_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -332 arraywriter.reset(); │ │ │ │ │ -333 } │ │ │ │ │ -334 }; │ │ │ │ │ -335 │ │ │ │ │ -337 template │ │ │ │ │ -_3_3_8 class _T_y_p_e_s_W_r_i_t_e_r │ │ │ │ │ -339 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -340 { │ │ │ │ │ -341 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ │ +318 │ │ │ │ │ +319 │ │ │ │ │ +320 // AdaptCoordFunction │ │ │ │ │ +321 // ------------------ │ │ │ │ │ +322 │ │ │ │ │ +323 template< class CoordFunctionInterface > │ │ │ │ │ +324 struct AdaptCoordFunction │ │ │ │ │ +325 { │ │ │ │ │ +326 static void adapt ( CoordFunctionInterface & ) │ │ │ │ │ +327 {} │ │ │ │ │ +328 }; │ │ │ │ │ +329 │ │ │ │ │ +330 template< class ct, unsigned int dimR, class Impl > │ │ │ │ │ +331 struct AdaptCoordFunction< DiscreteCoordFunctionInterface< ct, dimR, Impl > │ │ │ │ │ +> │ │ │ │ │ +332 { │ │ │ │ │ +333 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > │ │ │ │ │ +CoordFunctionInterface; │ │ │ │ │ +334 │ │ │ │ │ +335 static void adapt ( CoordFunctionInterface &coordFunction ) │ │ │ │ │ +336 { │ │ │ │ │ +337 coordFunction.adapt(); │ │ │ │ │ +338 } │ │ │ │ │ +339 }; │ │ │ │ │ +340 │ │ │ │ │ +341 } // namespace GeoGrid │ │ │ │ │ 342 │ │ │ │ │ -343 std::shared_ptr arraywriter; │ │ │ │ │ +343} // namespace Dune │ │ │ │ │ 344 │ │ │ │ │ -345 public: │ │ │ │ │ -_3_4_7 virtual std::string _n_a_m_e() const { return "types"; } │ │ │ │ │ -348 │ │ │ │ │ -_3_5_0 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ │ -351 │ │ │ │ │ -_3_5_3 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ │ -354 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8); │ │ │ │ │ -355 } │ │ │ │ │ -356 │ │ │ │ │ -_3_5_8 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ │ -359 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -360 ( _n_a_m_e(), _n_c_o_m_p_s(), nitems, _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8)); │ │ │ │ │ -361 return !arraywriter->writeIsNoop(); │ │ │ │ │ -362 } │ │ │ │ │ -_3_6_4 virtual void _w_r_i_t_e(const _C_e_l_l& cell, const typename _B_a_s_e_:_:_D_o_m_a_i_n&) { │ │ │ │ │ -365 arraywriter->write(_g_e_o_m_e_t_r_y_T_y_p_e(cell.type())); │ │ │ │ │ -366 } │ │ │ │ │ -_3_6_8 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ │ -369 arraywriter.reset(); │ │ │ │ │ -370 } │ │ │ │ │ -371 }; │ │ │ │ │ -372 │ │ │ │ │ -373 } // namespace VTK │ │ │ │ │ -374 │ │ │ │ │ -376 │ │ │ │ │ -377} // namespace Dune │ │ │ │ │ -378 │ │ │ │ │ -379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ │ -_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ │ -Data array writers for the VTKWriter. │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ -_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +345#endif // #ifndef DUNE_GEOGRID_COORDFUNCTION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -Precision │ │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2 │ │ │ │ │ -@ int32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8 │ │ │ │ │ -@ uint8 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ │ -@ float32 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ │ -GeometryType geometryType(const Dune::GeometryType &t) │ │ │ │ │ -mapping from GeometryType to VTKGeometryType │ │ │ │ │ -DDeeffiinniittiioonn common.hh:151 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -Base class for function writers. │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const =0 │ │ │ │ │ -return name │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const =0 │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const Cell &, const Domain &) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_C_e_l_l │ │ │ │ │ -Cell_ Cell │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer)=0 │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite()=0 │ │ │ │ │ -signal end of writing │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_D_o_m_a_i_n │ │ │ │ │ -FieldVector< DF, mydim > Domain │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0 │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_~_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ │ -virtual ~FunctionWriterBase() │ │ │ │ │ -destructor │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const Cell &cell, unsigned cornerIndex) │ │ │ │ │ -write at the given corner │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -Base class for function writers. │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r │ │ │ │ │ -VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision │ │ │ │ │ -prec=VTK::Precision::float32) │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:117 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const typename Base::Cell &cell, const typename Base::Domain │ │ │ │ │ -&xl) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ -writer for the Coordinates array │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const typename Base::Cell &cell, const typename Base::Domain │ │ │ │ │ -&xl) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:176 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:162 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r_:_:_C_o_o_r_d_i_n_a_t_e_s_W_r_i_t_e_r │ │ │ │ │ -CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32) │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -writer for the connectivity array in conforming mode │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:216 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const typename Base::Cell &cell, unsigned cornerIndex) │ │ │ │ │ -write at the given corner │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:242 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -ConformingConnectivityWriter(const IteratorFactory &factory_) │ │ │ │ │ -create a writer with the given iteratorfactory │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:213 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:221 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:251 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -writer for the connectivity array in nonconforming mode │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:261 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:270 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:267 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const Cell &, unsigned) │ │ │ │ │ -write at the given corner │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:285 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:273 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:278 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:291 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ │ -writer for the offsets array │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:300 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:331 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:308 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const Cell &cell, const typename Base::Domain &) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:326 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:319 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_f_f_s_e_t_s_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:311 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r │ │ │ │ │ -writer for the types array │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:340 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_n_c_o_m_p_s │ │ │ │ │ -virtual unsigned ncomps() const │ │ │ │ │ -return number of components of the vector │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:350 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_b_e_g_i_n_W_r_i_t_e │ │ │ │ │ -virtual bool beginWrite(VTUWriter &writer, std::size_t nitems) │ │ │ │ │ -start writing with the given writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:358 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_n_a_m_e │ │ │ │ │ -virtual std::string name() const │ │ │ │ │ -return name │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:347 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_w_r_i_t_e │ │ │ │ │ -virtual void write(const Cell &cell, const typename Base::Domain &) │ │ │ │ │ -write at the given position │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:364 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -virtual void addArray(PVTUWriter &writer) │ │ │ │ │ -add this field to the given parallel writer │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:353 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_T_y_p_e_s_W_r_i_t_e_r_:_:_e_n_d_W_r_i_t_e │ │ │ │ │ -virtual void endWrite() │ │ │ │ │ -signal end of writing │ │ │ │ │ -DDeeffiinniittiioonn functionwriter.hh:368 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_V_T_U_W_r_i_t_e_r_:_:_a_d_d_A_r_r_a_y │ │ │ │ │ -void addArray(const std::string &name, unsigned ncomps, Precision prec) │ │ │ │ │ -Add an array to the output file. │ │ │ │ │ -DDeeffiinniittiioonn pvtuwriter.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ │ -DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ │ -unsigned nitems, Precision prec) │ │ │ │ │ -acquire a DataArrayWriter │ │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +Derive an implementation of an analytical coordinate function from this class. │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +AnalyticalCoordFunction()=default │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_~_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +~AnalyticalCoordFunction()=default │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +AnalyticalCoordFunction(This &&)=default │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Base::RangeVector RangeVector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &)=default │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +AnalyticalCoordFunction(const This &)=default │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +Derive an implementation of a discrete coordinate function from this class. │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:248 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &)=default │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_a_d_a_p_t │ │ │ │ │ +void adapt() │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:263 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DiscreteCoordFunction()=default │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DiscreteCoordFunction(This &&)=default │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_~_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +~DiscreteCoordFunction()=default │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DiscreteCoordFunction(const This &)=default │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Base::RangeVector RangeVector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ +Interface class for using an analytical function to define the geometry of a │ │ │ │ │ +Dune::GeometryGrid.... │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +Impl Implementation │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimRange > RangeVector │ │ │ │ │ +range vector for the evaluate method │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, RangeVector &y) const │ │ │ │ │ +evaluate method for global mapping │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +dimension of the range vector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +field type of the coordinate vector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_D_o_m_a_i_n │ │ │ │ │ +static const unsigned int dimDomain │ │ │ │ │ +dimension of the range vector (dimensionworld of host grid) │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ +const Implementation & asImp() const │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_n_t_e_r_f_a_c_e │ │ │ │ │ +This Interface │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ +Implementation & asImp() │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_A_n_a_l_y_t_i_c_a_l_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimDomain > DomainVector │ │ │ │ │ +domain vector for the evaluate method │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e │ │ │ │ │ +Interface class for using a discrete function to define the geometry of a │ │ │ │ │ +Dune::GeometryGrid.... │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:175 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +dimension of the range vector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:188 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector │ │ │ │ │ +&y) const │ │ │ │ │ +evaluate method │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:211 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ +Implementation & asImp() │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_c_t_y_p_e │ │ │ │ │ +ct ctype │ │ │ │ │ +field type of the coordinate vector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:185 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_d_a_p_t │ │ │ │ │ +void adapt() │ │ │ │ │ +method called from grid.adapt() method to allow adaptation of the discrete │ │ │ │ │ +coordinate function │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +FieldVector< ctype, dimRange > RangeVector │ │ │ │ │ +range vector for the evaluate method │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_a_s_I_m_p │ │ │ │ │ +const Implementation & asImp() const │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:226 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ │ +Impl Implementation │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_I_n_t_e_r_f_a_c_e_:_:_I_n_t_e_r_f_a_c_e │ │ │ │ │ +This Interface │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:181 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8